From 74986a82f152011a6e3a3d8f56c490e210c0d669 Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 11 Jan 2019 14:04:37 -0500 Subject: [PATCH] feat: new resources (#17) * feat: Added support for R4 resources and environment setup * feat: Added support for automatic changleog generation * fix: fixed issues with filenames in newly generated code 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. --- CHANGELOG.md | 23 + FAQ.md | 5 +- README.md | 2 +- package.json | 21 +- src/config.js | 3 +- src/environment.js | 19 + src/index.js | 7 +- src/resources/1_0_2/inputs/account.input.js | 235 +- src/resources/1_0_2/inputs/address.input.js | 212 +- src/resources/1_0_2/inputs/age.input.js | 7 +- .../1_0_2/inputs/allergyintolerance.input.js | 305 +- .../allergyintolerancereaction.input.js | 178 +- .../1_0_2/inputs/annotation.input.js | 87 +- .../1_0_2/inputs/appointment.input.js | 285 +- .../inputs/appointmentparticipant.input.js | 100 +- .../1_0_2/inputs/appointmentresponse.input.js | 211 +- .../1_0_2/inputs/attachment.input.js | 188 +- .../1_0_2/inputs/auditevent.input.js | 132 +- .../1_0_2/inputs/auditeventevent.input.js | 150 +- .../1_0_2/inputs/auditeventobject.input.js | 165 +- .../inputs/auditeventobjectdetail.input.js | 72 +- .../inputs/auditeventparticipant.input.js | 189 +- .../auditeventparticipantnetwork.input.js | 86 +- .../1_0_2/inputs/auditeventsource.input.js | 78 +- .../1_0_2/inputs/backboneelement.input.js | 38 +- src/resources/1_0_2/inputs/basic.input.js | 152 +- src/resources/1_0_2/inputs/binary.input.js | 110 +- src/resources/1_0_2/inputs/bodysite.input.js | 155 +- src/resources/1_0_2/inputs/bundle.input.js | 142 +- .../1_0_2/inputs/bundleentry.input.js | 102 +- .../1_0_2/inputs/bundleentryrequest.input.js | 167 +- .../1_0_2/inputs/bundleentryresponse.input.js | 117 +- .../1_0_2/inputs/bundleentrysearch.input.js | 86 +- .../1_0_2/inputs/bundlelink.input.js | 76 +- src/resources/1_0_2/inputs/careplan.input.js | 283 +- .../1_0_2/inputs/careplanactivity.input.js | 81 +- .../inputs/careplanactivitydetail.input.js | 275 +- .../1_0_2/inputs/careplanparticipant.input.js | 64 +- .../1_0_2/inputs/careplanrelatedplan.input.js | 77 +- src/resources/1_0_2/inputs/claim.input.js | 432 ++- .../1_0_2/inputs/claimcoverage.input.js | 158 +- .../1_0_2/inputs/claimdiagnosis.input.js | 73 +- src/resources/1_0_2/inputs/claimitem.input.js | 261 +- .../1_0_2/inputs/claimitemdetail.input.js | 167 +- .../inputs/claimitemdetailsubdetail.input.js | 154 +- .../1_0_2/inputs/claimitemprosthesis.input.js | 91 +- .../1_0_2/inputs/claimmissingteeth.input.js | 84 +- .../1_0_2/inputs/claimpayee.input.js | 81 +- .../1_0_2/inputs/claimresponse.input.js | 377 +- .../inputs/claimresponseadditem.input.js | 118 +- .../claimresponseadditemadjudication.input.js | 78 +- .../claimresponseadditemdetail.input.js | 73 +- ...responseadditemdetailadjudication.input.js | 78 +- .../inputs/claimresponsecoverage.input.js | 158 +- .../1_0_2/inputs/claimresponseerror.input.js | 115 +- .../1_0_2/inputs/claimresponseitem.input.js | 93 +- .../claimresponseitemadjudication.input.js | 78 +- .../inputs/claimresponseitemdetail.input.js | 83 +- ...aimresponseitemdetailadjudication.input.js | 78 +- .../claimresponseitemdetailsubdetail.input.js | 69 +- ...seitemdetailsubdetailadjudication.input.js | 78 +- .../1_0_2/inputs/claimresponsenote.input.js | 89 +- .../1_0_2/inputs/clinicalimpression.input.js | 324 +- .../inputs/clinicalimpressionfinding.input.js | 65 +- .../clinicalimpressioninvestigations.input.js | 62 +- .../clinicalimpressionruledout.input.js | 64 +- .../1_0_2/inputs/codeableconcept.input.js | 56 +- src/resources/1_0_2/inputs/coding.input.js | 133 +- .../1_0_2/inputs/communication.input.js | 245 +- .../inputs/communicationpayload.input.js | 79 +- .../inputs/communicationrequest.input.js | 266 +- .../communicationrequestpayload.input.js | 79 +- .../1_0_2/inputs/composition.input.js | 277 +- .../1_0_2/inputs/compositionattester.input.js | 87 +- .../1_0_2/inputs/compositionevent.input.js | 74 +- .../1_0_2/inputs/compositionsection.input.js | 139 +- .../1_0_2/inputs/conceptmap.input.js | 396 +- .../1_0_2/inputs/conceptmapcontact.input.js | 70 +- .../1_0_2/inputs/conceptmapelement.input.js | 90 +- .../inputs/conceptmapelementtarget.input.js | 139 +- .../conceptmapelementtargetdependson.input.js | 101 +- src/resources/1_0_2/inputs/condition.input.js | 433 ++- .../1_0_2/inputs/conditionevidence.input.js | 64 +- .../1_0_2/inputs/conditionstage.input.js | 64 +- .../1_0_2/inputs/conformance.input.js | 447 ++- .../1_0_2/inputs/conformancecontact.input.js | 70 +- .../1_0_2/inputs/conformancedocument.input.js | 90 +- .../inputs/conformanceimplementation.input.js | 81 +- .../inputs/conformancemessaging.input.js | 103 +- .../conformancemessagingendpoint.input.js | 76 +- .../inputs/conformancemessagingevent.input.js | 149 +- .../1_0_2/inputs/conformancerest.input.js | 168 +- .../conformancerestinteraction.input.js | 82 +- .../inputs/conformancerestoperation.input.js | 67 +- .../inputs/conformancerestresource.input.js | 261 +- ...onformancerestresourceinteraction.input.js | 82 +- ...onformancerestresourcesearchparam.input.js | 178 +- .../inputs/conformancerestsecurity.input.js | 100 +- ...onformancerestsecuritycertificate.input.js | 73 +- .../1_0_2/inputs/conformancesoftware.input.js | 93 +- .../1_0_2/inputs/contactpoint.input.js | 124 +- src/resources/1_0_2/inputs/contract.input.js | 286 +- .../1_0_2/inputs/contractactor.input.js | 58 +- .../1_0_2/inputs/contractfriendly.input.js | 63 +- .../1_0_2/inputs/contractlegal.input.js | 58 +- .../1_0_2/inputs/contractrule.input.js | 63 +- .../1_0_2/inputs/contractsigner.input.js | 76 +- .../1_0_2/inputs/contractterm.input.js | 161 +- .../1_0_2/inputs/contracttermactor.input.js | 60 +- .../inputs/contracttermvalueditem.input.js | 160 +- .../1_0_2/inputs/contractvalueditem.input.js | 158 +- src/resources/1_0_2/inputs/count.input.js | 7 +- src/resources/1_0_2/inputs/coverage.input.js | 274 +- .../1_0_2/inputs/dataelement.input.js | 332 +- .../1_0_2/inputs/dataelementcontact.input.js | 70 +- .../1_0_2/inputs/dataelementmapping.input.js | 118 +- .../1_0_2/inputs/detectedissue.input.js | 234 +- .../inputs/detectedissuemitigation.input.js | 83 +- src/resources/1_0_2/inputs/device.input.js | 328 +- .../1_0_2/inputs/devicecomponent.input.js | 221 +- ...ecomponentproductionspecification.input.js | 78 +- .../1_0_2/inputs/devicemetric.input.js | 229 +- .../inputs/devicemetriccalibration.input.js | 94 +- .../1_0_2/inputs/deviceuserequest.input.js | 301 +- .../1_0_2/inputs/deviceusestatement.input.js | 223 +- .../1_0_2/inputs/diagnosticorder.input.js | 231 +- .../inputs/diagnosticorderevent.input.js | 103 +- .../1_0_2/inputs/diagnosticorderitem.input.js | 93 +- .../1_0_2/inputs/diagnosticreport.input.js | 315 +- .../inputs/diagnosticreportimage.input.js | 67 +- src/resources/1_0_2/inputs/distance.input.js | 7 +- .../1_0_2/inputs/documentmanifest.input.js | 258 +- .../inputs/documentmanifestcontent.input.js | 62 +- .../inputs/documentmanifestrelated.input.js | 62 +- .../1_0_2/inputs/documentreference.input.js | 305 +- .../inputs/documentreferencecontent.input.js | 62 +- .../inputs/documentreferencecontext.input.js | 119 +- .../documentreferencecontextrelated.input.js | 62 +- .../documentreferencerelatesto.input.js | 75 +- .../1_0_2/inputs/domainresource.input.js | 112 +- src/resources/1_0_2/inputs/duration.input.js | 7 +- src/resources/1_0_2/inputs/element.input.js | 44 +- .../1_0_2/inputs/elementdefinition.input.js | 3425 +++++++++-------- .../inputs/elementdefinitionbase.input.js | 94 +- .../inputs/elementdefinitionbinding.input.js | 110 +- .../elementdefinitionconstraint.input.js | 139 +- .../inputs/elementdefinitionmapping.input.js | 93 +- .../inputs/elementdefinitionslicing.input.js | 117 +- .../inputs/elementdefinitiontype.input.js | 103 +- .../1_0_2/inputs/eligibilityrequest.input.js | 170 +- .../1_0_2/inputs/eligibilityresponse.input.js | 217 +- src/resources/1_0_2/inputs/encounter.input.js | 296 +- .../inputs/encounterhospitalization.input.js | 148 +- .../1_0_2/inputs/encounterlocation.input.js | 85 +- .../inputs/encounterparticipant.input.js | 70 +- .../inputs/encounterstatushistory.input.js | 74 +- .../1_0_2/inputs/enrollmentrequest.input.js | 198 +- .../1_0_2/inputs/enrollmentresponse.input.js | 217 +- .../1_0_2/inputs/episodeofcare.input.js | 211 +- .../inputs/episodeofcarecareteam.input.js | 72 +- .../episodeofcarestatushistory.input.js | 76 +- .../inputs/explanationofbenefit.input.js | 217 +- src/resources/1_0_2/inputs/extension.input.js | 560 +-- .../1_0_2/inputs/familymemberhistory.input.js | 391 +- .../familymemberhistorycondition.input.js | 123 +- src/resources/1_0_2/inputs/flag.input.js | 182 +- src/resources/1_0_2/inputs/goal.input.js | 311 +- .../1_0_2/inputs/goaloutcome.input.js | 58 +- src/resources/1_0_2/inputs/group.input.js | 213 +- .../1_0_2/inputs/groupcharacteristic.input.js | 126 +- .../1_0_2/inputs/groupmember.input.js | 78 +- .../1_0_2/inputs/healthcareservice.input.js | 389 +- .../healthcareserviceavailabletime.input.js | 123 +- .../healthcareservicenotavailable.input.js | 69 +- .../healthcareserviceservicetype.input.js | 60 +- src/resources/1_0_2/inputs/humanname.input.js | 152 +- .../1_0_2/inputs/identifier.input.js | 123 +- .../inputs/imagingobjectselection.input.js | 204 +- .../imagingobjectselectionstudy.input.js | 107 +- ...imagingobjectselectionstudyseries.input.js | 98 +- ...bjectselectionstudyseriesinstance.input.js | 106 +- ...electionstudyseriesinstanceframes.input.js | 76 +- .../1_0_2/inputs/imagingstudy.input.js | 302 +- .../1_0_2/inputs/imagingstudyseries.input.js | 211 +- .../imagingstudyseriesinstance.input.js | 134 +- .../1_0_2/inputs/immunization.input.js | 344 +- .../inputs/immunizationexplanation.input.js | 57 +- .../inputs/immunizationreaction.input.js | 85 +- .../immunizationrecommendation.input.js | 126 +- ...ationrecommendationrecommendation.input.js | 144 +- ...dationrecommendationdatecriterion.input.js | 74 +- ...ommendationrecommendationprotocol.input.js | 109 +- .../immunizationvaccinationprotocol.input.js | 162 +- .../1_0_2/inputs/implementationguide.input.js | 383 +- .../implementationguidecontact.input.js | 70 +- .../implementationguidedependency.input.js | 84 +- .../inputs/implementationguideglobal.input.js | 73 +- .../implementationguidepackage.input.js | 88 +- ...mplementationguidepackageresource.input.js | 155 +- .../inputs/implementationguidepage.input.js | 160 +- src/resources/1_0_2/inputs/list.input.js | 263 +- src/resources/1_0_2/inputs/listentry.input.js | 95 +- src/resources/1_0_2/inputs/location.input.js | 254 +- .../1_0_2/inputs/locationposition.input.js | 99 +- src/resources/1_0_2/inputs/media.input.js | 271 +- .../1_0_2/inputs/medication.input.js | 149 +- .../inputs/medicationadministration.input.js | 300 +- .../medicationadministrationdosage.input.js | 138 +- .../1_0_2/inputs/medicationdispense.input.js | 307 +- ...dicationdispensedosageinstruction.input.js | 204 +- .../medicationdispensesubstitution.input.js | 75 +- .../1_0_2/inputs/medicationorder.input.js | 312 +- .../medicationorderdispenserequest.input.js | 112 +- .../medicationorderdosageinstruction.input.js | 204 +- .../medicationordersubstitution.input.js | 66 +- .../1_0_2/inputs/medicationpackage.input.js | 56 +- .../inputs/medicationpackagecontent.input.js | 58 +- .../1_0_2/inputs/medicationproduct.input.js | 68 +- .../inputs/medicationproductbatch.input.js | 80 +- .../medicationproductingredient.input.js | 63 +- .../1_0_2/inputs/medicationstatement.input.js | 303 +- .../inputs/medicationstatementdosage.input.js | 194 +- .../1_0_2/inputs/messageheader.input.js | 213 +- .../inputs/messageheaderdestination.input.js | 82 +- .../inputs/messageheaderresponse.input.js | 94 +- .../1_0_2/inputs/messageheadersource.input.js | 124 +- src/resources/1_0_2/inputs/meta.input.js | 115 +- src/resources/1_0_2/inputs/money.input.js | 7 +- .../1_0_2/inputs/namingsystem.input.js | 317 +- .../1_0_2/inputs/namingsystemcontact.input.js | 70 +- .../inputs/namingsystemuniqueid.input.js | 113 +- src/resources/1_0_2/inputs/narrative.input.js | 78 +- .../1_0_2/inputs/nutritionorder.input.js | 233 +- .../nutritionorderenteralformula.input.js | 170 +- ...orderenteralformulaadministration.input.js | 78 +- .../inputs/nutritionorderoraldiet.input.js | 117 +- .../nutritionorderoraldietnutrient.input.js | 59 +- .../nutritionorderoraldiettexture.input.js | 62 +- .../inputs/nutritionordersupplement.input.js | 110 +- .../1_0_2/inputs/observation.input.js | 472 ++- .../inputs/observationcomponent.input.js | 197 +- .../inputs/observationreferencerange.input.js | 102 +- .../1_0_2/inputs/observationrelated.input.js | 77 +- .../1_0_2/inputs/operationdefinition.input.js | 438 ++- .../operationdefinitioncontact.input.js | 70 +- .../operationdefinitionparameter.input.js | 168 +- ...erationdefinitionparameterbinding.input.js | 99 +- .../1_0_2/inputs/operationoutcome.input.js | 106 +- .../inputs/operationoutcomeissue.input.js | 138 +- src/resources/1_0_2/inputs/order.input.js | 176 +- .../1_0_2/inputs/orderresponse.input.js | 195 +- src/resources/1_0_2/inputs/orderwhen.input.js | 55 +- .../1_0_2/inputs/organization.input.js | 179 +- .../1_0_2/inputs/organizationcontact.input.js | 74 +- .../1_0_2/inputs/parameters.input.js | 79 +- .../1_0_2/inputs/parametersparameter.input.js | 481 +-- src/resources/1_0_2/inputs/patient.input.js | 332 +- .../1_0_2/inputs/patientanimal.input.js | 77 +- .../inputs/patientcommunication.input.js | 69 +- .../1_0_2/inputs/patientcontact.input.js | 124 +- .../1_0_2/inputs/patientlink.input.js | 75 +- .../1_0_2/inputs/paymentnotice.input.js | 198 +- .../inputs/paymentreconciliation.input.js | 263 +- .../paymentreconciliationdetail.input.js | 115 +- .../inputs/paymentreconciliationnote.input.js | 67 +- src/resources/1_0_2/inputs/period.input.js | 66 +- src/resources/1_0_2/inputs/person.input.js | 207 +- .../1_0_2/inputs/personlink.input.js | 74 +- .../1_0_2/inputs/practitioner.input.js | 221 +- .../practitionerpractitionerrole.input.js | 103 +- .../inputs/practitionerqualification.input.js | 75 +- src/resources/1_0_2/inputs/procedure.input.js | 369 +- .../inputs/procedurefocaldevice.input.js | 65 +- .../1_0_2/inputs/procedureperformer.input.js | 59 +- .../1_0_2/inputs/procedurerequest.input.js | 323 +- .../1_0_2/inputs/processrequest.input.js | 297 +- .../1_0_2/inputs/processrequestitem.input.js | 55 +- .../1_0_2/inputs/processresponse.input.js | 242 +- .../inputs/processresponsenotes.input.js | 68 +- .../1_0_2/inputs/provenance.input.js | 207 +- .../1_0_2/inputs/provenanceagent.input.js | 81 +- .../provenanceagentrelatedagent.input.js | 74 +- .../1_0_2/inputs/provenanceentity.input.js | 108 +- src/resources/1_0_2/inputs/quantity.input.js | 131 +- .../1_0_2/inputs/questionnaire.input.js | 221 +- .../1_0_2/inputs/questionnairegroup.input.js | 160 +- .../questionnairegroupquestion.input.js | 174 +- .../inputs/questionnaireresponse.input.js | 204 +- .../questionnaireresponsegroup.input.js | 118 +- ...uestionnaireresponsegroupquestion.input.js | 92 +- ...nnaireresponsegroupquestionanswer.input.js | 268 +- src/resources/1_0_2/inputs/range.input.js | 44 +- src/resources/1_0_2/inputs/ratio.input.js | 44 +- src/resources/1_0_2/inputs/reference.input.js | 72 +- .../1_0_2/inputs/referralrequest.input.js | 303 +- .../1_0_2/inputs/relatedperson.input.js | 207 +- src/resources/1_0_2/inputs/resource.input.js | 107 +- .../1_0_2/inputs/riskassessment.input.js | 206 +- .../inputs/riskassessmentprediction.input.js | 146 +- .../1_0_2/inputs/sampleddata.input.js | 161 +- src/resources/1_0_2/inputs/schedule.input.js | 152 +- .../1_0_2/inputs/searchparameter.input.js | 384 +- .../inputs/searchparametercontact.input.js | 70 +- src/resources/1_0_2/inputs/signature.input.js | 133 +- .../1_0_2/inputs/simplequantity.input.js | 7 +- src/resources/1_0_2/inputs/slot.input.js | 215 +- src/resources/1_0_2/inputs/specimen.input.js | 207 +- .../1_0_2/inputs/specimencollection.input.js | 131 +- .../1_0_2/inputs/specimencontainer.input.js | 120 +- .../1_0_2/inputs/specimentreatment.input.js | 76 +- .../1_0_2/inputs/structuredefinition.input.js | 533 +-- .../structuredefinitioncontact.input.js | 70 +- .../structuredefinitiondifferential.input.js | 53 +- .../structuredefinitionmapping.input.js | 117 +- .../structuredefinitionsnapshot.input.js | 53 +- .../1_0_2/inputs/subscription.input.js | 221 +- .../1_0_2/inputs/subscriptionchannel.input.js | 121 +- src/resources/1_0_2/inputs/substance.input.js | 160 +- .../1_0_2/inputs/substanceingredient.input.js | 60 +- .../1_0_2/inputs/substanceinstance.input.js | 78 +- .../1_0_2/inputs/supplydelivery.input.js | 221 +- .../1_0_2/inputs/supplyrequest.input.js | 213 +- .../1_0_2/inputs/supplyrequestwhen.input.js | 55 +- .../1_0_2/inputs/testscript.input.js | 412 +- .../1_0_2/inputs/testscriptcontact.input.js | 70 +- .../1_0_2/inputs/testscriptfixture.input.js | 93 +- .../1_0_2/inputs/testscriptmetadata.input.js | 62 +- .../testscriptmetadatacapability.input.js | 148 +- .../inputs/testscriptmetadatalink.input.js | 76 +- .../1_0_2/inputs/testscriptsetup.input.js | 53 +- .../inputs/testscriptsetupaction.input.js | 55 +- .../testscriptsetupactionassert.input.js | 388 +- .../testscriptsetupactionoperation.input.js | 298 +- ...setupactionoperationrequestheader.input.js | 70 +- .../1_0_2/inputs/testscriptteardown.input.js | 52 +- .../inputs/testscriptteardownaction.input.js | 35 +- .../1_0_2/inputs/testscripttest.input.js | 92 +- .../inputs/testscripttestaction.input.js | 35 +- .../1_0_2/inputs/testscriptvariable.input.js | 116 +- src/resources/1_0_2/inputs/timing.input.js | 67 +- .../1_0_2/inputs/timingrepeat.input.js | 259 +- src/resources/1_0_2/inputs/valueset.input.js | 418 +- .../1_0_2/inputs/valuesetcodesystem.input.js | 116 +- .../inputs/valuesetcodesystemconcept.input.js | 132 +- ...uesetcodesystemconceptdesignation.input.js | 83 +- .../1_0_2/inputs/valuesetcompose.input.js | 68 +- .../inputs/valuesetcomposeinclude.input.js | 101 +- .../valuesetcomposeincludeconcept.input.js | 80 +- .../valuesetcomposeincludefilter.input.js | 106 +- .../1_0_2/inputs/valuesetcontact.input.js | 70 +- .../1_0_2/inputs/valuesetexpansion.input.js | 142 +- .../inputs/valuesetexpansioncontains.input.js | 138 +- .../valuesetexpansionparameter.input.js | 155 +- .../1_0_2/inputs/visionprescription.input.js | 184 +- .../visionprescriptiondispense.input.js | 291 +- .../1_0_2/parameters/account.parameters.js | 76 +- .../allergyintolerance.parameters.js | 132 +- .../parameters/appointment.parameters.js | 69 +- .../appointmentresponse.parameters.js | 57 +- .../1_0_2/parameters/auditevent.parameters.js | 148 +- .../1_0_2/parameters/basic.parameters.js | 56 +- .../1_0_2/parameters/binary.parameters.js | 8 +- .../1_0_2/parameters/bodysite.parameters.js | 26 +- .../1_0_2/parameters/bundle.parameters.js | 21 +- .../1_0_2/parameters/careplan.parameters.js | 105 +- .../1_0_2/parameters/claim.parameters.js | 40 +- .../parameters/claimresponse.parameters.js | 8 +- .../clinicalimpression.parameters.js | 126 +- .../1_0_2/parameters/common.parameters.js | 52 - .../parameters/communication.parameters.js | 106 +- .../communicationrequest.parameters.js | 119 +- .../parameters/composition.parameters.js | 142 +- .../1_0_2/parameters/conceptmap.parameters.js | 154 +- .../1_0_2/parameters/condition.parameters.js | 127 +- .../parameters/conformance.parameters.js | 144 +- .../1_0_2/parameters/contract.parameters.js | 44 +- .../1_0_2/parameters/coverage.parameters.js | 70 +- .../parameters/dataelement.parameters.js | 110 +- .../parameters/detectedissue.parameters.js | 52 +- .../1_0_2/parameters/device.parameters.js | 76 +- .../parameters/devicecomponent.parameters.js | 24 +- .../parameters/devicemetric.parameters.js | 42 +- .../parameters/deviceuserequest.parameters.js | 24 +- .../deviceusestatement.parameters.js | 24 +- .../parameters/diagnosticorder.parameters.js | 144 +- .../parameters/diagnosticreport.parameters.js | 129 +- .../parameters/documentmanifest.parameters.js | 114 +- .../documentreference.parameters.js | 233 +- .../eligibilityrequest.parameters.js | 8 +- .../eligibilityresponse.parameters.js | 8 +- .../1_0_2/parameters/encounter.parameters.js | 175 +- .../enrollmentrequest.parameters.js | 26 +- .../enrollmentresponse.parameters.js | 8 +- .../parameters/episodeofcare.parameters.js | 86 +- .../explanationofbenefit.parameters.js | 8 +- .../familymemberhistory.parameters.js | 66 +- .../1_0_2/parameters/flag.parameters.js | 44 +- .../1_0_2/parameters/goal.parameters.js | 49 +- .../1_0_2/parameters/group.parameters.js | 76 +- .../healthcareservice.parameters.js | 64 +- .../imagingobjectselection.parameters.js | 60 +- .../parameters/imagingstudy.parameters.js | 96 +- .../parameters/immunization.parameters.js | 145 +- .../immunizationrecommendation.parameters.js | 81 +- .../implementationguide.parameters.js | 90 +- .../1_0_2/parameters/list.parameters.js | 104 +- .../1_0_2/parameters/location.parameters.js | 119 +- .../1_0_2/parameters/media.parameters.js | 72 +- .../1_0_2/parameters/medication.parameters.js | 52 +- .../medicationadministration.parameters.js | 96 +- .../medicationdispense.parameters.js | 112 +- .../parameters/medicationorder.parameters.js | 70 +- .../medicationstatement.parameters.js | 64 +- .../parameters/messageheader.parameters.js | 130 +- .../parameters/namingsystem.parameters.js | 124 +- .../parameters/nutritionorder.parameters.js | 88 +- .../parameters/observation.parameters.js | 216 +- .../operationdefinition.parameters.js | 116 +- .../1_0_2/parameters/order.parameters.js | 73 +- .../parameters/orderresponse.parameters.js | 50 +- .../parameters/organization.parameters.js | 97 +- .../1_0_2/parameters/patient.parameters.js | 230 +- .../parameters/paymentnotice.parameters.js | 8 +- .../paymentreconciliation.parameters.js | 8 +- .../1_0_2/parameters/person.parameters.js | 171 +- .../parameters/practitioner.parameters.js | 167 +- .../1_0_2/parameters/procedure.parameters.js | 76 +- .../parameters/procedurerequest.parameters.js | 52 +- .../parameters/processrequest.parameters.js | 38 +- .../parameters/processresponse.parameters.js | 42 +- .../1_0_2/parameters/provenance.parameters.js | 92 +- .../parameters/questionnaire.parameters.js | 60 +- .../questionnaireresponse.parameters.js | 64 +- .../parameters/referralrequest.parameters.js | 74 +- .../parameters/relatedperson.parameters.js | 129 +- .../1_0_2/parameters/resource.parameters.js | 69 + .../parameters/riskassessment.parameters.js | 74 +- .../1_0_2/parameters/schedule.parameters.js | 29 +- .../parameters/searchparameter.parameters.js | 57 +- .../1_0_2/parameters/slot.parameters.js | 44 +- .../1_0_2/parameters/specimen.parameters.js | 99 +- .../structuredefinition.parameters.js | 190 +- .../parameters/subscription.parameters.js | 58 +- .../1_0_2/parameters/substance.parameters.js | 66 +- .../parameters/supplydelivery.parameters.js | 38 +- .../parameters/supplyrequest.parameters.js | 64 +- .../1_0_2/parameters/testscript.parameters.js | 62 +- .../1_0_2/parameters/valueset.parameters.js | 119 +- .../visionprescription.parameters.js | 46 +- .../1_0_2/profiles/account/mutation.js | 55 +- src/resources/1_0_2/profiles/account/query.js | 42 +- .../account/{index.js => register.js} | 16 +- .../1_0_2/profiles/account/resolver.js | 62 +- .../profiles/allergyintolerance/mutation.js | 59 +- .../profiles/allergyintolerance/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/allergyintolerance/resolver.js | 62 +- .../1_0_2/profiles/appointment/mutation.js | 59 +- .../1_0_2/profiles/appointment/query.js | 42 +- .../appointment/{index.js => register.js} | 16 +- .../1_0_2/profiles/appointment/resolver.js | 62 +- .../profiles/appointmentresponse/mutation.js | 59 +- .../profiles/appointmentresponse/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/appointmentresponse/resolver.js | 62 +- .../1_0_2/profiles/auditevent/mutation.js | 59 +- .../1_0_2/profiles/auditevent/query.js | 42 +- .../auditevent/{index.js => register.js} | 16 +- .../1_0_2/profiles/auditevent/resolver.js | 62 +- .../1_0_2/profiles/basic/mutation.js | 55 +- src/resources/1_0_2/profiles/basic/query.js | 42 +- .../profiles/basic/{index.js => register.js} | 10 +- .../1_0_2/profiles/basic/resolver.js | 65 +- .../1_0_2/profiles/binary/mutation.js | 55 +- src/resources/1_0_2/profiles/binary/query.js | 42 +- .../profiles/binary/{index.js => register.js} | 16 +- .../1_0_2/profiles/binary/resolver.js | 65 +- .../1_0_2/profiles/bodysite/mutation.js | 59 +- .../1_0_2/profiles/bodysite/query.js | 42 +- .../bodysite/{index.js => register.js} | 16 +- .../1_0_2/profiles/bodysite/resolver.js | 62 +- .../1_0_2/profiles/bundle/mutation.js | 55 +- src/resources/1_0_2/profiles/bundle/query.js | 40 +- .../profiles/bundle/{index.js => register.js} | 16 +- .../1_0_2/profiles/bundle/resolver.js | 65 +- .../1_0_2/profiles/careplan/mutation.js | 59 +- .../1_0_2/profiles/careplan/query.js | 42 +- .../careplan/{index.js => register.js} | 16 +- .../1_0_2/profiles/careplan/resolver.js | 62 +- .../1_0_2/profiles/claim/mutation.js | 55 +- src/resources/1_0_2/profiles/claim/query.js | 42 +- .../profiles/claim/{index.js => register.js} | 10 +- .../1_0_2/profiles/claim/resolver.js | 65 +- .../1_0_2/profiles/claimresponse/mutation.js | 59 +- .../1_0_2/profiles/claimresponse/query.js | 42 +- .../claimresponse/{index.js => register.js} | 16 +- .../1_0_2/profiles/claimresponse/resolver.js | 62 +- .../profiles/clinicalimpression/mutation.js | 59 +- .../profiles/clinicalimpression/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/clinicalimpression/resolver.js | 62 +- .../1_0_2/profiles/communication/mutation.js | 59 +- .../1_0_2/profiles/communication/query.js | 42 +- .../communication/{index.js => register.js} | 16 +- .../1_0_2/profiles/communication/resolver.js | 62 +- .../profiles/communicationrequest/mutation.js | 59 +- .../profiles/communicationrequest/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/communicationrequest/resolver.js | 62 +- .../1_0_2/profiles/composition/mutation.js | 59 +- .../1_0_2/profiles/composition/query.js | 42 +- .../composition/{index.js => register.js} | 16 +- .../1_0_2/profiles/composition/resolver.js | 62 +- .../1_0_2/profiles/conceptmap/mutation.js | 59 +- .../1_0_2/profiles/conceptmap/query.js | 42 +- .../conceptmap/{index.js => register.js} | 16 +- .../1_0_2/profiles/conceptmap/resolver.js | 62 +- .../1_0_2/profiles/condition/mutation.js | 59 +- .../1_0_2/profiles/condition/query.js | 42 +- .../condition/{index.js => register.js} | 16 +- .../1_0_2/profiles/condition/resolver.js | 62 +- .../1_0_2/profiles/conformance/mutation.js | 59 +- .../1_0_2/profiles/conformance/query.js | 42 +- .../conformance/{index.js => register.js} | 16 +- .../1_0_2/profiles/conformance/resolver.js | 62 +- .../1_0_2/profiles/contract/mutation.js | 59 +- .../1_0_2/profiles/contract/query.js | 42 +- .../contract/{index.js => register.js} | 16 +- .../1_0_2/profiles/contract/resolver.js | 62 +- .../1_0_2/profiles/coverage/mutation.js | 59 +- .../1_0_2/profiles/coverage/query.js | 42 +- .../coverage/{index.js => register.js} | 16 +- .../1_0_2/profiles/coverage/resolver.js | 62 +- .../1_0_2/profiles/dataelement/mutation.js | 59 +- .../1_0_2/profiles/dataelement/query.js | 42 +- .../dataelement/{index.js => register.js} | 16 +- .../1_0_2/profiles/dataelement/resolver.js | 62 +- .../1_0_2/profiles/detectedissue/mutation.js | 59 +- .../1_0_2/profiles/detectedissue/query.js | 42 +- .../detectedissue/{index.js => register.js} | 16 +- .../1_0_2/profiles/detectedissue/resolver.js | 62 +- .../1_0_2/profiles/device/mutation.js | 55 +- src/resources/1_0_2/profiles/device/query.js | 42 +- .../profiles/device/{index.js => register.js} | 16 +- .../1_0_2/profiles/device/resolver.js | 65 +- .../profiles/devicecomponent/mutation.js | 59 +- .../1_0_2/profiles/devicecomponent/query.js | 42 +- .../devicecomponent/{index.js => register.js} | 16 +- .../profiles/devicecomponent/resolver.js | 62 +- .../1_0_2/profiles/devicemetric/mutation.js | 59 +- .../1_0_2/profiles/devicemetric/query.js | 42 +- .../devicemetric/{index.js => register.js} | 16 +- .../1_0_2/profiles/devicemetric/resolver.js | 62 +- .../profiles/deviceuserequest/mutation.js | 59 +- .../1_0_2/profiles/deviceuserequest/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/deviceuserequest/resolver.js | 62 +- .../profiles/deviceusestatement/mutation.js | 59 +- .../profiles/deviceusestatement/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/deviceusestatement/resolver.js | 62 +- .../profiles/diagnosticorder/mutation.js | 59 +- .../1_0_2/profiles/diagnosticorder/query.js | 42 +- .../diagnosticorder/{index.js => register.js} | 16 +- .../profiles/diagnosticorder/resolver.js | 62 +- .../profiles/diagnosticreport/mutation.js | 59 +- .../1_0_2/profiles/diagnosticreport/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/diagnosticreport/resolver.js | 62 +- .../profiles/documentmanifest/mutation.js | 59 +- .../1_0_2/profiles/documentmanifest/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/documentmanifest/resolver.js | 62 +- .../profiles/documentreference/mutation.js | 59 +- .../1_0_2/profiles/documentreference/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/documentreference/resolver.js | 62 +- .../profiles/eligibilityrequest/mutation.js | 59 +- .../profiles/eligibilityrequest/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/eligibilityrequest/resolver.js | 62 +- .../profiles/eligibilityresponse/mutation.js | 59 +- .../profiles/eligibilityresponse/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/eligibilityresponse/resolver.js | 62 +- .../1_0_2/profiles/encounter/mutation.js | 59 +- .../1_0_2/profiles/encounter/query.js | 42 +- .../encounter/{index.js => register.js} | 16 +- .../1_0_2/profiles/encounter/resolver.js | 62 +- .../profiles/enrollmentrequest/mutation.js | 59 +- .../1_0_2/profiles/enrollmentrequest/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/enrollmentrequest/resolver.js | 62 +- .../profiles/enrollmentresponse/mutation.js | 59 +- .../profiles/enrollmentresponse/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/enrollmentresponse/resolver.js | 62 +- .../1_0_2/profiles/episodeofcare/mutation.js | 59 +- .../1_0_2/profiles/episodeofcare/query.js | 42 +- .../episodeofcare/{index.js => register.js} | 16 +- .../1_0_2/profiles/episodeofcare/resolver.js | 62 +- .../profiles/explanationofbenefit/mutation.js | 59 +- .../profiles/explanationofbenefit/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/explanationofbenefit/resolver.js | 62 +- .../profiles/familymemberhistory/mutation.js | 59 +- .../profiles/familymemberhistory/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/familymemberhistory/resolver.js | 62 +- src/resources/1_0_2/profiles/flag/mutation.js | 55 +- src/resources/1_0_2/profiles/flag/query.js | 42 +- .../profiles/flag/{index.js => register.js} | 10 +- src/resources/1_0_2/profiles/flag/resolver.js | 60 +- src/resources/1_0_2/profiles/goal/mutation.js | 55 +- src/resources/1_0_2/profiles/goal/query.js | 42 +- .../profiles/goal/{index.js => register.js} | 10 +- src/resources/1_0_2/profiles/goal/resolver.js | 60 +- .../1_0_2/profiles/group/mutation.js | 55 +- src/resources/1_0_2/profiles/group/query.js | 42 +- .../profiles/group/{index.js => register.js} | 10 +- .../1_0_2/profiles/group/resolver.js | 65 +- .../profiles/healthcareservice/mutation.js | 59 +- .../1_0_2/profiles/healthcareservice/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/healthcareservice/resolver.js | 62 +- .../imagingobjectselection/mutation.js | 59 +- .../profiles/imagingobjectselection/query.js | 42 +- .../{index.js => register.js} | 16 +- .../imagingobjectselection/resolver.js | 62 +- .../1_0_2/profiles/imagingstudy/mutation.js | 59 +- .../1_0_2/profiles/imagingstudy/query.js | 42 +- .../imagingstudy/{index.js => register.js} | 16 +- .../1_0_2/profiles/imagingstudy/resolver.js | 62 +- .../1_0_2/profiles/immunization/mutation.js | 59 +- .../1_0_2/profiles/immunization/query.js | 42 +- .../immunization/{index.js => register.js} | 16 +- .../1_0_2/profiles/immunization/resolver.js | 62 +- .../immunizationrecommendation/mutation.js | 68 +- .../immunizationrecommendation/query.js | 45 +- .../{index.js => register.js} | 16 +- .../immunizationrecommendation/resolver.js | 62 +- .../profiles/implementationguide/mutation.js | 59 +- .../profiles/implementationguide/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/implementationguide/resolver.js | 62 +- src/resources/1_0_2/profiles/list/mutation.js | 55 +- src/resources/1_0_2/profiles/list/query.js | 42 +- .../profiles/list/{index.js => register.js} | 10 +- src/resources/1_0_2/profiles/list/resolver.js | 60 +- .../1_0_2/profiles/location/mutation.js | 59 +- .../1_0_2/profiles/location/query.js | 42 +- .../location/{index.js => register.js} | 16 +- .../1_0_2/profiles/location/resolver.js | 62 +- .../1_0_2/profiles/media/mutation.js | 55 +- src/resources/1_0_2/profiles/media/query.js | 42 +- .../profiles/media/{index.js => register.js} | 10 +- .../1_0_2/profiles/media/resolver.js | 65 +- .../1_0_2/profiles/medication/mutation.js | 59 +- .../1_0_2/profiles/medication/query.js | 42 +- .../medication/{index.js => register.js} | 16 +- .../1_0_2/profiles/medication/resolver.js | 62 +- .../medicationadministration/mutation.js | 59 +- .../medicationadministration/query.js | 45 +- .../{index.js => register.js} | 16 +- .../medicationadministration/resolver.js | 62 +- .../profiles/medicationdispense/mutation.js | 59 +- .../profiles/medicationdispense/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/medicationdispense/resolver.js | 62 +- .../profiles/medicationorder/mutation.js | 59 +- .../1_0_2/profiles/medicationorder/query.js | 42 +- .../medicationorder/{index.js => register.js} | 16 +- .../profiles/medicationorder/resolver.js | 62 +- .../profiles/medicationstatement/mutation.js | 59 +- .../profiles/medicationstatement/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/medicationstatement/resolver.js | 62 +- .../1_0_2/profiles/messageheader/mutation.js | 59 +- .../1_0_2/profiles/messageheader/query.js | 42 +- .../messageheader/{index.js => register.js} | 16 +- .../1_0_2/profiles/messageheader/resolver.js | 62 +- .../1_0_2/profiles/namingsystem/mutation.js | 59 +- .../1_0_2/profiles/namingsystem/query.js | 42 +- .../namingsystem/{index.js => register.js} | 16 +- .../1_0_2/profiles/namingsystem/resolver.js | 62 +- .../1_0_2/profiles/nutritionorder/mutation.js | 59 +- .../1_0_2/profiles/nutritionorder/query.js | 42 +- .../nutritionorder/{index.js => register.js} | 16 +- .../1_0_2/profiles/nutritionorder/resolver.js | 62 +- .../1_0_2/profiles/observation/mutation.js | 59 +- .../1_0_2/profiles/observation/query.js | 42 +- .../observation/{index.js => register.js} | 16 +- .../1_0_2/profiles/observation/resolver.js | 62 +- .../profiles/operationdefinition/mutation.js | 59 +- .../profiles/operationdefinition/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/operationdefinition/resolver.js | 62 +- .../1_0_2/profiles/order/mutation.js | 55 +- src/resources/1_0_2/profiles/order/query.js | 42 +- .../profiles/order/{index.js => register.js} | 10 +- .../1_0_2/profiles/order/resolver.js | 65 +- .../1_0_2/profiles/orderresponse/mutation.js | 59 +- .../1_0_2/profiles/orderresponse/query.js | 42 +- .../orderresponse/{index.js => register.js} | 16 +- .../1_0_2/profiles/orderresponse/resolver.js | 62 +- .../1_0_2/profiles/organization/mutation.js | 59 +- .../1_0_2/profiles/organization/query.js | 42 +- .../organization/{index.js => register.js} | 16 +- .../1_0_2/profiles/organization/resolver.js | 62 +- .../1_0_2/profiles/patient/mutation.js | 55 +- src/resources/1_0_2/profiles/patient/query.js | 42 +- .../patient/{index.js => register.js} | 16 +- .../1_0_2/profiles/patient/resolver.js | 62 +- .../1_0_2/profiles/paymentnotice/mutation.js | 59 +- .../1_0_2/profiles/paymentnotice/query.js | 42 +- .../paymentnotice/{index.js => register.js} | 16 +- .../1_0_2/profiles/paymentnotice/resolver.js | 62 +- .../paymentreconciliation/mutation.js | 59 +- .../profiles/paymentreconciliation/query.js | 42 +- .../{index.js => register.js} | 16 +- .../paymentreconciliation/resolver.js | 62 +- .../1_0_2/profiles/person/mutation.js | 55 +- src/resources/1_0_2/profiles/person/query.js | 42 +- .../profiles/person/{index.js => register.js} | 16 +- .../1_0_2/profiles/person/resolver.js | 65 +- .../1_0_2/profiles/practitioner/mutation.js | 59 +- .../1_0_2/profiles/practitioner/query.js | 42 +- .../practitioner/{index.js => register.js} | 16 +- .../1_0_2/profiles/practitioner/resolver.js | 62 +- .../1_0_2/profiles/procedure/mutation.js | 59 +- .../1_0_2/profiles/procedure/query.js | 42 +- .../procedure/{index.js => register.js} | 16 +- .../1_0_2/profiles/procedure/resolver.js | 62 +- .../profiles/procedurerequest/mutation.js | 59 +- .../1_0_2/profiles/procedurerequest/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/procedurerequest/resolver.js | 62 +- .../1_0_2/profiles/processrequest/mutation.js | 59 +- .../1_0_2/profiles/processrequest/query.js | 42 +- .../processrequest/{index.js => register.js} | 16 +- .../1_0_2/profiles/processrequest/resolver.js | 62 +- .../profiles/processresponse/mutation.js | 59 +- .../1_0_2/profiles/processresponse/query.js | 42 +- .../processresponse/{index.js => register.js} | 16 +- .../profiles/processresponse/resolver.js | 62 +- .../1_0_2/profiles/provenance/mutation.js | 59 +- .../1_0_2/profiles/provenance/query.js | 42 +- .../provenance/{index.js => register.js} | 16 +- .../1_0_2/profiles/provenance/resolver.js | 62 +- .../1_0_2/profiles/questionnaire/mutation.js | 59 +- .../1_0_2/profiles/questionnaire/query.js | 42 +- .../questionnaire/{index.js => register.js} | 16 +- .../1_0_2/profiles/questionnaire/resolver.js | 62 +- .../questionnaireresponse/mutation.js | 59 +- .../profiles/questionnaireresponse/query.js | 42 +- .../{index.js => register.js} | 16 +- .../questionnaireresponse/resolver.js | 62 +- .../profiles/referralrequest/mutation.js | 59 +- .../1_0_2/profiles/referralrequest/query.js | 42 +- .../referralrequest/{index.js => register.js} | 16 +- .../profiles/referralrequest/resolver.js | 62 +- .../1_0_2/profiles/relatedperson/mutation.js | 59 +- .../1_0_2/profiles/relatedperson/query.js | 42 +- .../relatedperson/{index.js => register.js} | 16 +- .../1_0_2/profiles/relatedperson/resolver.js | 62 +- .../1_0_2/profiles/riskassessment/mutation.js | 59 +- .../1_0_2/profiles/riskassessment/query.js | 42 +- .../riskassessment/{index.js => register.js} | 16 +- .../1_0_2/profiles/riskassessment/resolver.js | 62 +- .../1_0_2/profiles/schedule/mutation.js | 59 +- .../1_0_2/profiles/schedule/query.js | 42 +- .../schedule/{index.js => register.js} | 16 +- .../1_0_2/profiles/schedule/resolver.js | 62 +- .../profiles/searchparameter/mutation.js | 59 +- .../1_0_2/profiles/searchparameter/query.js | 42 +- .../searchparameter/{index.js => register.js} | 16 +- .../profiles/searchparameter/resolver.js | 62 +- src/resources/1_0_2/profiles/slot/mutation.js | 55 +- src/resources/1_0_2/profiles/slot/query.js | 42 +- .../profiles/slot/{index.js => register.js} | 10 +- src/resources/1_0_2/profiles/slot/resolver.js | 60 +- .../1_0_2/profiles/specimen/mutation.js | 59 +- .../1_0_2/profiles/specimen/query.js | 42 +- .../specimen/{index.js => register.js} | 16 +- .../1_0_2/profiles/specimen/resolver.js | 62 +- .../profiles/structuredefinition/mutation.js | 59 +- .../profiles/structuredefinition/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/structuredefinition/resolver.js | 62 +- .../1_0_2/profiles/subscription/mutation.js | 59 +- .../1_0_2/profiles/subscription/query.js | 42 +- .../subscription/{index.js => register.js} | 16 +- .../1_0_2/profiles/subscription/resolver.js | 62 +- .../1_0_2/profiles/substance/mutation.js | 59 +- .../1_0_2/profiles/substance/query.js | 42 +- .../substance/{index.js => register.js} | 16 +- .../1_0_2/profiles/substance/resolver.js | 62 +- .../1_0_2/profiles/supplydelivery/mutation.js | 59 +- .../1_0_2/profiles/supplydelivery/query.js | 42 +- .../supplydelivery/{index.js => register.js} | 16 +- .../1_0_2/profiles/supplydelivery/resolver.js | 62 +- .../1_0_2/profiles/supplyrequest/mutation.js | 59 +- .../1_0_2/profiles/supplyrequest/query.js | 42 +- .../supplyrequest/{index.js => register.js} | 16 +- .../1_0_2/profiles/supplyrequest/resolver.js | 62 +- .../1_0_2/profiles/testscript/mutation.js | 59 +- .../1_0_2/profiles/testscript/query.js | 42 +- .../testscript/{index.js => register.js} | 16 +- .../1_0_2/profiles/testscript/resolver.js | 62 +- .../1_0_2/profiles/valueset/mutation.js | 59 +- .../1_0_2/profiles/valueset/query.js | 42 +- .../valueset/{index.js => register.js} | 16 +- .../1_0_2/profiles/valueset/resolver.js | 62 +- .../profiles/visionprescription/mutation.js | 59 +- .../profiles/visionprescription/query.js | 42 +- .../{index.js => register.js} | 16 +- .../profiles/visionprescription/resolver.js | 62 +- .../1_0_2/scalars/base64binary.scalar.js | 14 +- src/resources/1_0_2/scalars/boolean.scalar.js | 24 + src/resources/1_0_2/scalars/code.scalar.js | 11 +- src/resources/1_0_2/scalars/date.scalar.js | 40 +- .../1_0_2/scalars/date.scalar.test.js | 50 - .../1_0_2/scalars/datetime.scalar.js | 46 +- src/resources/1_0_2/scalars/decimal.scalar.js | 24 + src/resources/1_0_2/scalars/id.scalar.js | 18 +- src/resources/1_0_2/scalars/instant.scalar.js | 21 +- src/resources/1_0_2/scalars/integer.scalar.js | 23 + .../1_0_2/scalars/markdown.scalar.js | 24 + src/resources/1_0_2/scalars/oid.scalar.js | 34 +- .../1_0_2/scalars/oid.scalar.test.js | 42 - .../1_0_2/scalars/positiveint.scalar.js | 35 +- src/resources/1_0_2/scalars/string.scalar.js | 24 + src/resources/1_0_2/scalars/time.scalar.js | 38 +- .../1_0_2/scalars/time.scalar.test.js | 44 - src/resources/1_0_2/scalars/token.scalar.js | 17 +- .../1_0_2/scalars/unsignedint.scalar.js | 37 +- .../1_0_2/scalars/unsignedint.scalar.test.js | 42 - src/resources/1_0_2/scalars/uri.scalar.js | 11 +- src/resources/1_0_2/scalars/uuid.scalar.js | 34 +- .../1_0_2/scalars/uuid.scalar.test.js | 95 - src/resources/1_0_2/scalars/xhtml.scalar.js | 11 +- src/resources/1_0_2/schemas/account.schema.js | 269 +- src/resources/1_0_2/schemas/address.schema.js | 209 +- src/resources/1_0_2/schemas/age.schema.js | 6 +- .../schemas/allergyintolerance.schema.js | 343 +- .../allergyintolerancereaction.schema.js | 177 +- .../1_0_2/schemas/annotation.schema.js | 108 +- .../1_0_2/schemas/appointment.schema.js | 297 +- .../schemas/appointmentparticipant.schema.js | 131 +- .../schemas/appointmentresponse.schema.js | 250 +- .../1_0_2/schemas/attachment.schema.js | 183 +- .../1_0_2/schemas/auditevent.schema.js | 131 +- .../1_0_2/schemas/auditeventevent.schema.js | 149 +- .../1_0_2/schemas/auditeventobject.schema.js | 175 +- .../schemas/auditeventobjectdetail.schema.js | 75 +- .../schemas/auditeventparticipant.schema.js | 220 +- .../auditeventparticipantnetwork.schema.js | 81 +- .../1_0_2/schemas/auditeventsource.schema.js | 77 +- .../1_0_2/schemas/backboneelement.schema.js | 37 +- src/resources/1_0_2/schemas/basic.schema.js | 173 +- src/resources/1_0_2/schemas/binary.schema.js | 109 +- .../1_0_2/schemas/bodysite.schema.js | 166 +- src/resources/1_0_2/schemas/bundle.schema.js | 141 +- .../1_0_2/schemas/bundleentry.schema.js | 97 +- .../schemas/bundleentryrequest.schema.js | 170 +- .../schemas/bundleentryresponse.schema.js | 120 +- .../1_0_2/schemas/bundleentrysearch.schema.js | 81 +- .../1_0_2/schemas/bundlelink.schema.js | 79 +- .../1_0_2/schemas/careplan.schema.js | 369 +- .../1_0_2/schemas/careplanactivity.schema.js | 140 +- .../schemas/careplanactivitydetail.schema.js | 341 +- .../schemas/careplanparticipant.schema.js | 79 +- .../schemas/careplanrelatedplan.schema.js | 88 +- src/resources/1_0_2/schemas/claim.schema.js | 499 ++- .../1_0_2/schemas/claimcoverage.schema.js | 177 +- .../1_0_2/schemas/claimdiagnosis.schema.js | 68 +- .../1_0_2/schemas/claimitem.schema.js | 266 +- .../1_0_2/schemas/claimitemdetail.schema.js | 166 +- .../claimitemdetailsubdetail.schema.js | 157 +- .../schemas/claimitemprosthesis.schema.js | 86 +- .../1_0_2/schemas/claimmissingteeth.schema.js | 79 +- .../1_0_2/schemas/claimpayee.schema.js | 94 +- .../1_0_2/schemas/claimresponse.schema.js | 403 +- .../schemas/claimresponseadditem.schema.js | 117 +- ...claimresponseadditemadjudication.schema.js | 81 +- .../claimresponseadditemdetail.schema.js | 70 +- ...esponseadditemdetailadjudication.schema.js | 81 +- .../schemas/claimresponsecoverage.schema.js | 177 +- .../schemas/claimresponseerror.schema.js | 110 +- .../1_0_2/schemas/claimresponseitem.schema.js | 92 +- .../claimresponseitemadjudication.schema.js | 81 +- .../schemas/claimresponseitemdetail.schema.js | 80 +- ...imresponseitemdetailadjudication.schema.js | 81 +- ...claimresponseitemdetailsubdetail.schema.js | 66 +- ...eitemdetailsubdetailadjudication.schema.js | 81 +- .../1_0_2/schemas/claimresponsenote.schema.js | 84 +- .../schemas/clinicalimpression.schema.js | 474 ++- .../clinicalimpressionfinding.schema.js | 68 +- ...clinicalimpressioninvestigations.schema.js | 89 +- .../clinicalimpressionruledout.schema.js | 67 +- .../1_0_2/schemas/codeableconcept.schema.js | 55 +- src/resources/1_0_2/schemas/coding.schema.js | 136 +- .../1_0_2/schemas/communication.schema.js | 322 +- .../schemas/communicationpayload.schema.js | 95 +- .../schemas/communicationrequest.schema.js | 347 +- .../communicationrequestpayload.schema.js | 96 +- .../1_0_2/schemas/composition.schema.js | 329 +- .../schemas/compositionattester.schema.js | 105 +- .../1_0_2/schemas/compositionevent.schema.js | 81 +- .../schemas/compositionsection.schema.js | 153 +- .../1_0_2/schemas/conceptmap.schema.js | 432 ++- .../1_0_2/schemas/conceptmapcontact.schema.js | 67 +- .../1_0_2/schemas/conceptmapelement.schema.js | 89 +- .../schemas/conceptmapelementtarget.schema.js | 138 +- ...conceptmapelementtargetdependson.schema.js | 104 +- .../1_0_2/schemas/condition.schema.js | 465 ++- .../1_0_2/schemas/conditionevidence.schema.js | 71 +- .../1_0_2/schemas/conditionstage.schema.js | 81 +- .../1_0_2/schemas/conformance.schema.js | 459 ++- .../schemas/conformancecontact.schema.js | 67 +- .../schemas/conformancedocument.schema.js | 105 +- .../conformanceimplementation.schema.js | 84 +- .../schemas/conformancemessaging.schema.js | 104 +- .../conformancemessagingendpoint.schema.js | 71 +- .../conformancemessagingevent.schema.js | 175 +- .../1_0_2/schemas/conformancerest.schema.js | 167 +- .../conformancerestinteraction.schema.js | 85 +- .../conformancerestoperation.schema.js | 82 +- .../schemas/conformancerestresource.schema.js | 265 +- ...nformancerestresourceinteraction.schema.js | 85 +- ...nformancerestresourcesearchparam.schema.js | 177 +- .../schemas/conformancerestsecurity.schema.js | 99 +- ...nformancerestsecuritycertificate.schema.js | 72 +- .../schemas/conformancesoftware.schema.js | 96 +- .../1_0_2/schemas/contactpoint.schema.js | 119 +- .../1_0_2/schemas/contract.schema.js | 337 +- .../1_0_2/schemas/contractactor.schema.js | 105 +- .../1_0_2/schemas/contractfriendly.schema.js | 84 +- .../1_0_2/schemas/contractlegal.schema.js | 78 +- .../1_0_2/schemas/contractrule.schema.js | 74 +- .../1_0_2/schemas/contractsigner.schema.js | 105 +- .../1_0_2/schemas/contractterm.schema.js | 172 +- .../1_0_2/schemas/contracttermactor.schema.js | 106 +- .../schemas/contracttermvalueditem.schema.js | 165 +- .../schemas/contractvalueditem.schema.js | 163 +- src/resources/1_0_2/schemas/count.schema.js | 6 +- .../1_0_2/schemas/coverage.schema.js | 299 +- .../1_0_2/schemas/dataelement.schema.js | 332 +- .../schemas/dataelementcontact.schema.js | 67 +- .../schemas/dataelementmapping.schema.js | 121 +- .../1_0_2/schemas/detectedissue.schema.js | 264 +- .../schemas/detectedissuemitigation.schema.js | 88 +- src/resources/1_0_2/schemas/device.schema.js | 347 +- .../1_0_2/schemas/devicecomponent.schema.js | 232 +- ...componentproductionspecification.schema.js | 73 +- .../1_0_2/schemas/devicemetric.schema.js | 240 +- .../schemas/devicemetriccalibration.schema.js | 93 +- .../1_0_2/schemas/deviceuserequest.schema.js | 335 +- .../schemas/deviceusestatement.schema.js | 251 +- .../1_0_2/schemas/diagnosticorder.schema.js | 303 +- .../schemas/diagnosticorderevent.schema.js | 114 +- .../schemas/diagnosticorderitem.schema.js | 105 +- .../1_0_2/schemas/diagnosticreport.schema.js | 428 +- .../schemas/diagnosticreportimage.schema.js | 82 +- .../1_0_2/schemas/distance.schema.js | 6 +- .../1_0_2/schemas/documentmanifest.schema.js | 334 +- .../schemas/documentmanifestcontent.schema.js | 73 +- .../schemas/documentmanifestrelated.schema.js | 63 +- .../1_0_2/schemas/documentreference.schema.js | 373 +- .../documentreferencecontent.schema.js | 59 +- .../documentreferencecontext.schema.js | 127 +- .../documentreferencecontextrelated.schema.js | 63 +- .../documentreferencerelatesto.schema.js | 85 +- .../1_0_2/schemas/domainresource.schema.js | 111 +- .../1_0_2/schemas/duration.schema.js | 6 +- src/resources/1_0_2/schemas/element.schema.js | 43 +- .../1_0_2/schemas/elementdefinition.schema.js | 3425 +++++++++-------- .../schemas/elementdefinitionbase.schema.js | 93 +- .../elementdefinitionbinding.schema.js | 121 +- .../elementdefinitionconstraint.schema.js | 142 +- .../elementdefinitionmapping.schema.js | 96 +- .../elementdefinitionslicing.schema.js | 116 +- .../schemas/elementdefinitiontype.schema.js | 100 +- .../schemas/eligibilityrequest.schema.js | 188 +- .../schemas/eligibilityresponse.schema.js | 244 +- .../1_0_2/schemas/encounter.schema.js | 363 +- .../encounterhospitalization.schema.js | 182 +- .../1_0_2/schemas/encounterlocation.schema.js | 95 +- .../schemas/encounterparticipant.schema.js | 77 +- .../schemas/encounterstatushistory.schema.js | 69 +- .../1_0_2/schemas/enrollmentrequest.schema.js | 239 +- .../schemas/enrollmentresponse.schema.js | 243 +- .../1_0_2/schemas/episodeofcare.schema.js | 257 +- .../schemas/episodeofcarecareteam.schema.js | 80 +- .../episodeofcarestatushistory.schema.js | 71 +- .../schemas/explanationofbenefit.schema.js | 244 +- .../1_0_2/schemas/extension.schema.js | 560 +-- .../schemas/familymemberhistory.schema.js | 404 +- .../familymemberhistorycondition.schema.js | 126 +- src/resources/1_0_2/schemas/flag.schema.js | 238 +- src/resources/1_0_2/schemas/goal.schema.js | 377 +- .../1_0_2/schemas/goaloutcome.schema.js | 60 +- src/resources/1_0_2/schemas/group.schema.js | 213 +- .../schemas/groupcharacteristic.schema.js | 125 +- .../1_0_2/schemas/groupmember.schema.js | 107 +- .../1_0_2/schemas/healthcareservice.schema.js | 424 +- .../healthcareserviceavailabletime.schema.js | 122 +- .../healthcareservicenotavailable.schema.js | 72 +- .../healthcareserviceservicetype.schema.js | 57 +- .../1_0_2/schemas/humanname.schema.js | 149 +- .../1_0_2/schemas/identifier.schema.js | 130 +- .../schemas/imagingobjectselection.schema.js | 240 +- .../imagingobjectselectionstudy.schema.js | 115 +- ...magingobjectselectionstudyseries.schema.js | 95 +- ...jectselectionstudyseriesinstance.schema.js | 103 +- ...lectionstudyseriesinstanceframes.schema.js | 73 +- .../1_0_2/schemas/imagingstudy.schema.js | 349 +- .../schemas/imagingstudyseries.schema.js | 210 +- .../imagingstudyseriesinstance.schema.js | 133 +- .../1_0_2/schemas/immunization.schema.js | 389 +- .../schemas/immunizationexplanation.schema.js | 56 +- .../schemas/immunizationreaction.schema.js | 91 +- .../immunizationrecommendation.schema.js | 136 +- ...tionrecommendationrecommendation.schema.js | 177 +- ...ationrecommendationdatecriterion.schema.js | 69 +- ...mmendationrecommendationprotocol.schema.js | 120 +- .../immunizationvaccinationprotocol.schema.js | 168 +- .../schemas/implementationguide.schema.js | 385 +- .../implementationguidecontact.schema.js | 67 +- .../implementationguidedependency.schema.js | 79 +- .../implementationguideglobal.schema.js | 84 +- .../implementationguidepackage.schema.js | 87 +- ...plementationguidepackageresource.schema.js | 177 +- .../schemas/implementationguidepage.schema.js | 159 +- src/resources/1_0_2/schemas/list.schema.js | 305 +- .../1_0_2/schemas/listentry.schema.js | 106 +- .../1_0_2/schemas/location.schema.js | 266 +- .../1_0_2/schemas/locationposition.schema.js | 102 +- src/resources/1_0_2/schemas/media.schema.js | 303 +- .../1_0_2/schemas/medication.schema.js | 157 +- .../medicationadministration.schema.js | 364 +- .../medicationadministrationdosage.schema.js | 144 +- .../schemas/medicationdispense.schema.js | 369 +- ...icationdispensedosageinstruction.schema.js | 215 +- .../medicationdispensesubstitution.schema.js | 89 +- .../1_0_2/schemas/medicationorder.schema.js | 354 +- .../medicationorderdispenserequest.schema.js | 114 +- ...medicationorderdosageinstruction.schema.js | 215 +- .../medicationordersubstitution.schema.js | 61 +- .../1_0_2/schemas/medicationpackage.schema.js | 55 +- .../medicationpackagecontent.schema.js | 68 +- .../1_0_2/schemas/medicationproduct.schema.js | 67 +- .../schemas/medicationproductbatch.schema.js | 75 +- .../medicationproductingredient.schema.js | 80 +- .../schemas/medicationstatement.schema.js | 364 +- .../medicationstatementdosage.schema.js | 204 +- .../1_0_2/schemas/messageheader.schema.js | 260 +- .../messageheaderdestination.schema.js | 92 +- .../schemas/messageheaderresponse.schema.js | 100 +- .../schemas/messageheadersource.schema.js | 127 +- src/resources/1_0_2/schemas/meta.schema.js | 114 +- src/resources/1_0_2/schemas/money.schema.js | 6 +- .../1_0_2/schemas/namingsystem.schema.js | 323 +- .../schemas/namingsystemcontact.schema.js | 67 +- .../schemas/namingsystemuniqueid.schema.js | 112 +- .../1_0_2/schemas/narrative.schema.js | 73 +- .../1_0_2/schemas/nutritionorder.schema.js | 268 +- .../nutritionorderenteralformula.schema.js | 167 +- ...rderenteralformulaadministration.schema.js | 77 +- .../schemas/nutritionorderoraldiet.schema.js | 118 +- .../nutritionorderoraldietnutrient.schema.js | 58 +- .../nutritionorderoraldiettexture.schema.js | 61 +- .../nutritionordersupplement.schema.js | 107 +- .../1_0_2/schemas/observation.schema.js | 543 ++- .../schemas/observationcomponent.schema.js | 200 +- .../observationreferencerange.schema.js | 97 +- .../schemas/observationrelated.schema.js | 94 +- .../schemas/operationdefinition.schema.js | 446 ++- .../operationdefinitioncontact.schema.js | 67 +- .../operationdefinitionparameter.schema.js | 174 +- ...rationdefinitionparameterbinding.schema.js | 111 +- .../1_0_2/schemas/operationoutcome.schema.js | 105 +- .../schemas/operationoutcomeissue.schema.js | 137 +- src/resources/1_0_2/schemas/order.schema.js | 246 +- .../1_0_2/schemas/orderresponse.schema.js | 234 +- .../1_0_2/schemas/orderwhen.schema.js | 54 +- .../1_0_2/schemas/organization.schema.js | 185 +- .../schemas/organizationcontact.schema.js | 73 +- .../1_0_2/schemas/parameters.schema.js | 78 +- .../schemas/parametersparameter.schema.js | 479 +-- src/resources/1_0_2/schemas/patient.schema.js | 354 +- .../1_0_2/schemas/patientanimal.schema.js | 72 +- .../schemas/patientcommunication.schema.js | 68 +- .../1_0_2/schemas/patientcontact.schema.js | 125 +- .../1_0_2/schemas/patientlink.schema.js | 85 +- .../1_0_2/schemas/paymentnotice.schema.js | 230 +- .../schemas/paymentreconciliation.schema.js | 290 +- .../paymentreconciliationdetail.schema.js | 141 +- .../paymentreconciliationnote.schema.js | 62 +- src/resources/1_0_2/schemas/period.schema.js | 65 +- src/resources/1_0_2/schemas/person.schema.js | 212 +- .../1_0_2/schemas/personlink.schema.js | 99 +- .../1_0_2/schemas/practitioner.schema.js | 222 +- .../practitionerpractitionerrole.schema.js | 130 +- .../practitionerqualification.schema.js | 84 +- .../1_0_2/schemas/procedure.schema.js | 459 ++- .../schemas/procedurefocaldevice.schema.js | 76 +- .../schemas/procedureperformer.schema.js | 75 +- .../1_0_2/schemas/procedurerequest.schema.js | 393 +- .../1_0_2/schemas/processrequest.schema.js | 328 +- .../schemas/processrequestitem.schema.js | 58 +- .../1_0_2/schemas/processresponse.schema.js | 268 +- .../schemas/processresponsenotes.schema.js | 63 +- .../1_0_2/schemas/provenance.schema.js | 227 +- .../1_0_2/schemas/provenanceagent.schema.js | 106 +- .../provenanceagentrelatedagent.schema.js | 69 +- .../1_0_2/schemas/provenanceentity.schema.js | 111 +- .../1_0_2/schemas/quantity.schema.js | 134 +- .../1_0_2/schemas/questionnaire.schema.js | 221 +- .../schemas/questionnairegroup.schema.js | 159 +- .../questionnairegroupquestion.schema.js | 180 +- .../schemas/questionnaireresponse.schema.js | 260 +- .../questionnaireresponsegroup.schema.js | 126 +- ...estionnaireresponsegroupquestion.schema.js | 89 +- ...naireresponsegroupquestionanswer.schema.js | 279 +- src/resources/1_0_2/schemas/range.schema.js | 43 +- src/resources/1_0_2/schemas/ratio.schema.js | 43 +- .../1_0_2/schemas/reference.schema.js | 67 +- .../1_0_2/schemas/referralrequest.schema.js | 362 +- .../1_0_2/schemas/relatedperson.schema.js | 217 +- .../1_0_2/schemas/resource.schema.js | 106 +- .../1_0_2/schemas/resourcelist.schema.js | 664 ++-- .../1_0_2/schemas/riskassessment.schema.js | 256 +- .../riskassessmentprediction.schema.js | 145 +- .../1_0_2/schemas/sampleddata.schema.js | 160 +- .../1_0_2/schemas/schedule.schema.js | 186 +- .../1_0_2/schemas/searchparameter.schema.js | 384 +- .../schemas/searchparametercontact.schema.js | 67 +- .../1_0_2/schemas/signature.schema.js | 164 +- .../1_0_2/schemas/simplequantity.schema.js | 6 +- src/resources/1_0_2/schemas/slot.schema.js | 227 +- .../1_0_2/schemas/specimen.schema.js | 244 +- .../schemas/specimencollection.schema.js | 142 +- .../1_0_2/schemas/specimencontainer.schema.js | 130 +- .../1_0_2/schemas/specimentreatment.schema.js | 89 +- .../schemas/structuredefinition.schema.js | 533 +-- .../structuredefinitioncontact.schema.js | 67 +- .../structuredefinitiondifferential.schema.js | 50 +- .../structuredefinitionmapping.schema.js | 120 +- .../structuredefinitionsnapshot.schema.js | 50 +- .../1_0_2/schemas/subscription.schema.js | 221 +- .../schemas/subscriptionchannel.schema.js | 124 +- .../1_0_2/schemas/substance.schema.js | 160 +- .../schemas/substanceingredient.schema.js | 71 +- .../1_0_2/schemas/substanceinstance.schema.js | 77 +- .../1_0_2/schemas/supplydelivery.schema.js | 265 +- .../1_0_2/schemas/supplyrequest.schema.js | 269 +- .../1_0_2/schemas/supplyrequestwhen.schema.js | 54 +- .../1_0_2/schemas/testscript.schema.js | 423 +- .../1_0_2/schemas/testscriptcontact.schema.js | 67 +- .../1_0_2/schemas/testscriptfixture.schema.js | 98 +- .../schemas/testscriptmetadata.schema.js | 61 +- .../testscriptmetadatacapability.schema.js | 160 +- .../schemas/testscriptmetadatalink.schema.js | 79 +- .../1_0_2/schemas/testscriptsetup.schema.js | 50 +- .../schemas/testscriptsetupaction.schema.js | 54 +- .../testscriptsetupactionassert.schema.js | 391 +- .../testscriptsetupactionoperation.schema.js | 297 +- ...etupactionoperationrequestheader.schema.js | 73 +- .../schemas/testscriptteardown.schema.js | 49 +- .../testscriptteardownaction.schema.js | 34 +- .../1_0_2/schemas/testscripttest.schema.js | 91 +- .../schemas/testscripttestaction.schema.js | 34 +- .../schemas/testscriptvariable.schema.js | 119 +- src/resources/1_0_2/schemas/timing.schema.js | 66 +- .../1_0_2/schemas/timingrepeat.schema.js | 258 +- .../1_0_2/schemas/valueset.schema.js | 418 +- .../schemas/valuesetcodesystem.schema.js | 115 +- .../valuesetcodesystemconcept.schema.js | 131 +- ...esetcodesystemconceptdesignation.schema.js | 86 +- .../1_0_2/schemas/valuesetcompose.schema.js | 67 +- .../schemas/valuesetcomposeinclude.schema.js | 104 +- .../valuesetcomposeincludeconcept.schema.js | 83 +- .../valuesetcomposeincludefilter.schema.js | 101 +- .../1_0_2/schemas/valuesetcontact.schema.js | 67 +- .../1_0_2/schemas/valuesetexpansion.schema.js | 141 +- .../valuesetexpansioncontains.schema.js | 141 +- .../valuesetexpansionparameter.schema.js | 154 +- .../schemas/visionprescription.schema.js | 207 +- .../visionprescriptiondispense.schema.js | 290 +- src/resources/3_0_1/inputs/account.input.js | 246 +- .../3_0_1/inputs/accountcoverage.input.js | 74 +- .../3_0_1/inputs/accountguarantor.input.js | 76 +- .../3_0_1/inputs/activitydefinition.input.js | 661 ++-- .../activitydefinitiondynamicvalue.input.js | 117 +- .../activitydefinitionparticipant.input.js | 74 +- src/resources/3_0_1/inputs/address.input.js | 209 +- .../3_0_1/inputs/adverseevent.input.js | 280 +- .../inputs/adverseeventsuspectentity.input.js | 124 +- src/resources/3_0_1/inputs/age.input.js | 81 +- .../3_0_1/inputs/allergyintolerance.input.js | 378 +- .../allergyintolerancereaction.input.js | 157 +- .../3_0_1/inputs/annotation.input.js | 86 +- .../3_0_1/inputs/appointment.input.js | 384 +- .../inputs/appointmentparticipant.input.js | 99 +- .../3_0_1/inputs/appointmentresponse.input.js | 212 +- .../3_0_1/inputs/attachment.input.js | 191 +- .../3_0_1/inputs/auditevent.input.js | 234 +- .../3_0_1/inputs/auditeventagent.input.js | 190 +- .../inputs/auditeventagentnetwork.input.js | 85 +- .../3_0_1/inputs/auditevententity.input.js | 162 +- .../inputs/auditevententitydetail.input.js | 78 +- .../3_0_1/inputs/auditeventsource.input.js | 77 +- .../3_0_1/inputs/backboneelement.input.js | 41 +- src/resources/3_0_1/inputs/basic.input.js | 153 +- src/resources/3_0_1/inputs/binary.input.js | 120 +- src/resources/3_0_1/inputs/bodysite.input.js | 176 +- src/resources/3_0_1/inputs/bundle.input.js | 153 +- .../3_0_1/inputs/bundleentry.input.js | 101 +- .../3_0_1/inputs/bundleentryrequest.input.js | 168 +- .../3_0_1/inputs/bundleentryresponse.input.js | 130 +- .../3_0_1/inputs/bundleentrysearch.input.js | 86 +- .../3_0_1/inputs/bundlelink.input.js | 77 +- .../3_0_1/inputs/capabilitystatement.input.js | 554 +-- .../capabilitystatementdocument.input.js | 91 +- ...capabilitystatementimplementation.input.js | 82 +- .../capabilitystatementmessaging.input.js | 122 +- ...abilitystatementmessagingendpoint.input.js | 76 +- ...capabilitystatementmessagingevent.input.js | 150 +- ...tatementmessagingsupportedmessage.input.js | 76 +- .../inputs/capabilitystatementrest.input.js | 157 +- ...apabilitystatementrestinteraction.input.js | 83 +- .../capabilitystatementrestoperation.input.js | 68 +- .../capabilitystatementrestresource.input.js | 320 +- ...ystatementrestresourceinteraction.input.js | 83 +- ...ystatementrestresourcesearchparam.input.js | 122 +- .../capabilitystatementrestsecurity.input.js | 101 +- ...ystatementrestsecuritycertificate.input.js | 76 +- .../capabilitystatementsoftware.input.js | 94 +- src/resources/3_0_1/inputs/careplan.input.js | 330 +- .../3_0_1/inputs/careplanactivity.input.js | 92 +- .../inputs/careplanactivitydetail.input.js | 292 +- src/resources/3_0_1/inputs/careteam.input.js | 228 +- .../3_0_1/inputs/careteamparticipant.input.js | 81 +- .../3_0_1/inputs/chargeitem.input.js | 392 +- .../inputs/chargeitemparticipant.input.js | 64 +- src/resources/3_0_1/inputs/claim.input.js | 418 +- .../3_0_1/inputs/claimaccident.input.js | 86 +- .../3_0_1/inputs/claimcareteam.input.js | 111 +- .../3_0_1/inputs/claimdiagnosis.input.js | 101 +- .../3_0_1/inputs/claiminformation.input.js | 177 +- .../3_0_1/inputs/claiminsurance.input.js | 141 +- src/resources/3_0_1/inputs/claimitem.input.js | 345 +- .../3_0_1/inputs/claimitemdetail.input.js | 183 +- .../inputs/claimitemdetailsubdetail.input.js | 173 +- .../3_0_1/inputs/claimpayee.input.js | 71 +- .../3_0_1/inputs/claimprocedure.input.js | 102 +- .../3_0_1/inputs/claimrelated.input.js | 71 +- .../3_0_1/inputs/claimresponse.input.js | 338 +- .../inputs/claimresponseadditem.input.js | 145 +- .../claimresponseadditemdetail.input.js | 116 +- .../3_0_1/inputs/claimresponseerror.input.js | 115 +- .../inputs/claimresponseinsurance.input.js | 137 +- .../3_0_1/inputs/claimresponseitem.input.js | 93 +- .../claimresponseitemadjudication.input.js | 88 +- .../inputs/claimresponseitemdetail.input.js | 87 +- .../claimresponseitemdetailsubdetail.input.js | 73 +- .../inputs/claimresponsepayment.input.js | 106 +- .../inputs/claimresponseprocessnote.input.js | 100 +- .../3_0_1/inputs/clinicalimpression.input.js | 347 +- .../inputs/clinicalimpressionfinding.input.js | 80 +- .../clinicalimpressioninvestigation.input.js | 61 +- .../3_0_1/inputs/codeableconcept.input.js | 57 +- .../3_0_1/inputs/codesystem.input.js | 529 +-- .../3_0_1/inputs/codesystemconcept.input.js | 119 +- .../codesystemconceptdesignation.input.js | 86 +- .../inputs/codesystemconceptproperty.input.js | 147 +- .../3_0_1/inputs/codesystemfilter.input.js | 113 +- .../3_0_1/inputs/codesystemproperty.input.js | 126 +- src/resources/3_0_1/inputs/coding.input.js | 132 +- .../3_0_1/inputs/communication.input.js | 332 +- .../inputs/communicationpayload.input.js | 80 +- .../inputs/communicationrequest.input.js | 346 +- .../communicationrequestpayload.input.js | 80 +- .../communicationrequestrequester.input.js | 61 +- .../inputs/compartmentdefinition.input.js | 357 +- .../compartmentdefinitionresource.input.js | 101 +- .../3_0_1/inputs/composition.input.js | 288 +- .../3_0_1/inputs/compositionattester.input.js | 86 +- .../3_0_1/inputs/compositionevent.input.js | 73 +- .../inputs/compositionrelatesto.input.js | 82 +- .../3_0_1/inputs/compositionsection.input.js | 136 +- .../3_0_1/inputs/conceptmap.input.js | 431 ++- .../3_0_1/inputs/conceptmapgroup.input.js | 145 +- .../inputs/conceptmapgroupelement.input.js | 87 +- .../conceptmapgroupelementtarget.input.js | 134 +- ...eptmapgroupelementtargetdependson.input.js | 122 +- .../inputs/conceptmapgroupunmapped.input.js | 126 +- src/resources/3_0_1/inputs/condition.input.js | 426 +- .../3_0_1/inputs/conditionevidence.input.js | 63 +- .../3_0_1/inputs/conditionstage.input.js | 63 +- src/resources/3_0_1/inputs/consent.input.js | 322 +- .../3_0_1/inputs/consentactor.input.js | 64 +- .../3_0_1/inputs/consentdata.input.js | 76 +- .../3_0_1/inputs/consentexcept.input.js | 160 +- .../3_0_1/inputs/consentexceptactor.input.js | 64 +- .../3_0_1/inputs/consentexceptdata.input.js | 76 +- .../3_0_1/inputs/consentpolicy.input.js | 83 +- .../3_0_1/inputs/contactdetail.input.js | 53 +- .../3_0_1/inputs/contactpoint.input.js | 123 +- src/resources/3_0_1/inputs/contract.input.js | 354 +- .../3_0_1/inputs/contractagent.input.js | 58 +- .../3_0_1/inputs/contractfriendly.input.js | 62 +- .../3_0_1/inputs/contractlegal.input.js | 57 +- .../3_0_1/inputs/contractrule.input.js | 62 +- .../3_0_1/inputs/contractsigner.input.js | 70 +- .../3_0_1/inputs/contractterm.input.js | 178 +- .../3_0_1/inputs/contracttermagent.input.js | 60 +- .../inputs/contracttermvalueditem.input.js | 159 +- .../3_0_1/inputs/contractvalueditem.input.js | 157 +- .../3_0_1/inputs/contributor.input.js | 79 +- src/resources/3_0_1/inputs/count.input.js | 81 +- src/resources/3_0_1/inputs/coverage.input.js | 308 +- .../3_0_1/inputs/coveragegrouping.input.js | 257 +- .../3_0_1/inputs/dataelement.input.js | 367 +- .../3_0_1/inputs/dataelementmapping.input.js | 120 +- .../3_0_1/inputs/datarequirement.input.js | 117 +- .../inputs/datarequirementcodefilter.input.js | 126 +- .../inputs/datarequirementdatefilter.input.js | 97 +- .../3_0_1/inputs/detectedissue.input.js | 253 +- .../inputs/detectedissuemitigation.input.js | 82 +- src/resources/3_0_1/inputs/device.input.js | 332 +- .../3_0_1/inputs/devicecomponent.input.js | 228 +- ...ecomponentproductionspecification.input.js | 79 +- .../3_0_1/inputs/devicemetric.input.js | 234 +- .../inputs/devicemetriccalibration.input.js | 97 +- .../3_0_1/inputs/devicerequest.input.js | 364 +- .../inputs/devicerequestrequester.input.js | 61 +- src/resources/3_0_1/inputs/deviceudi.input.js | 181 +- .../3_0_1/inputs/deviceusestatement.input.js | 237 +- .../3_0_1/inputs/diagnosticreport.input.js | 316 +- .../inputs/diagnosticreportimage.input.js | 66 +- .../inputs/diagnosticreportperformer.input.js | 63 +- src/resources/3_0_1/inputs/distance.input.js | 81 +- .../3_0_1/inputs/documentmanifest.input.js | 259 +- .../inputs/documentmanifestcontent.input.js | 61 +- .../inputs/documentmanifestrelated.input.js | 61 +- .../3_0_1/inputs/documentreference.input.js | 314 +- .../inputs/documentreferencecontent.input.js | 64 +- .../inputs/documentreferencecontext.input.js | 118 +- .../documentreferencecontextrelated.input.js | 61 +- .../documentreferencerelatesto.input.js | 74 +- .../3_0_1/inputs/domainresource.input.js | 113 +- src/resources/3_0_1/inputs/dosage.input.js | 231 +- src/resources/3_0_1/inputs/duration.input.js | 81 +- src/resources/3_0_1/inputs/element.input.js | 42 +- .../3_0_1/inputs/elementdefinition.input.js | 2475 ++++++------ .../inputs/elementdefinitionbase.input.js | 97 +- .../inputs/elementdefinitionbinding.input.js | 111 +- .../elementdefinitionconstraint.input.js | 183 +- .../inputs/elementdefinitionexample.input.js | 617 +-- .../inputs/elementdefinitionmapping.input.js | 115 +- .../inputs/elementdefinitionslicing.input.js | 110 +- ...entdefinitionslicingdiscriminator.input.js | 79 +- .../inputs/elementdefinitiontype.input.js | 145 +- .../3_0_1/inputs/eligibilityrequest.input.js | 287 +- .../3_0_1/inputs/eligibilityresponse.input.js | 252 +- .../inputs/eligibilityresponseerror.input.js | 53 +- .../eligibilityresponseinsurance.input.js | 73 +- ...tyresponseinsurancebenefitbalance.input.js | 166 +- ...einsurancebenefitbalancefinancial.input.js | 115 +- src/resources/3_0_1/inputs/encounter.input.js | 307 +- .../inputs/encounterclasshistory.input.js | 60 +- .../3_0_1/inputs/encounterdiagnosis.input.js | 81 +- .../inputs/encounterhospitalization.input.js | 131 +- .../3_0_1/inputs/encounterlocation.input.js | 84 +- .../inputs/encounterparticipant.input.js | 69 +- .../inputs/encounterstatushistory.input.js | 74 +- src/resources/3_0_1/inputs/endpoint.input.js | 259 +- .../3_0_1/inputs/enrollmentrequest.input.js | 184 +- .../3_0_1/inputs/enrollmentresponse.input.js | 204 +- .../3_0_1/inputs/episodeofcare.input.js | 224 +- .../inputs/episodeofcarediagnosis.input.js | 81 +- .../episodeofcarestatushistory.input.js | 76 +- .../3_0_1/inputs/expansionprofile.input.js | 493 +-- .../expansionprofiledesignation.input.js | 57 +- ...xpansionprofiledesignationexclude.input.js | 52 +- ...filedesignationexcludedesignation.input.js | 71 +- ...xpansionprofiledesignationinclude.input.js | 52 +- ...filedesignationincludedesignation.input.js | 70 +- .../expansionprofileexcludedsystem.input.js | 78 +- .../expansionprofilefixedversion.input.js | 101 +- .../inputs/explanationofbenefit.input.js | 511 +-- .../explanationofbenefitaccident.input.js | 85 +- .../explanationofbenefitadditem.input.js | 148 +- ...explanationofbenefitadditemdetail.input.js | 115 +- ...xplanationofbenefitbenefitbalance.input.js | 166 +- ...nofbenefitbenefitbalancefinancial.input.js | 115 +- .../explanationofbenefitcareteam.input.js | 112 +- .../explanationofbenefitdiagnosis.input.js | 101 +- .../explanationofbenefitinformation.input.js | 177 +- .../explanationofbenefitinsurance.input.js | 69 +- .../inputs/explanationofbenefititem.input.js | 377 +- ...lanationofbenefititemadjudication.input.js | 88 +- .../explanationofbenefititemdetail.input.js | 213 +- ...ationofbenefititemdetailsubdetail.input.js | 199 +- .../inputs/explanationofbenefitpayee.input.js | 70 +- .../explanationofbenefitpayment.input.js | 106 +- .../explanationofbenefitprocedure.input.js | 102 +- .../explanationofbenefitprocessnote.input.js | 100 +- .../explanationofbenefitrelated.input.js | 71 +- src/resources/3_0_1/inputs/extension.input.js | 612 +-- .../3_0_1/inputs/familymemberhistory.input.js | 474 ++- .../familymemberhistorycondition.input.js | 123 +- src/resources/3_0_1/inputs/flag.input.js | 183 +- src/resources/3_0_1/inputs/goal.input.js | 298 +- .../3_0_1/inputs/goaltarget.input.js | 114 +- .../3_0_1/inputs/graphdefinition.input.js | 357 +- .../3_0_1/inputs/graphdefinitionlink.input.js | 136 +- .../inputs/graphdefinitionlinktarget.input.js | 89 +- ...phdefinitionlinktargetcompartment.input.js | 109 +- src/resources/3_0_1/inputs/group.input.js | 234 +- .../3_0_1/inputs/groupcharacteristic.input.js | 126 +- .../3_0_1/inputs/groupmember.input.js | 77 +- .../3_0_1/inputs/guidanceresponse.input.js | 271 +- .../3_0_1/inputs/healthcareservice.input.js | 412 +- .../healthcareserviceavailabletime.input.js | 123 +- .../healthcareservicenotavailable.input.js | 70 +- src/resources/3_0_1/inputs/humanname.input.js | 149 +- .../3_0_1/inputs/identifier.input.js | 122 +- .../3_0_1/inputs/imagingmanifest.input.js | 179 +- .../inputs/imagingmanifeststudy.input.js | 92 +- .../imagingmanifeststudyseries.input.js | 86 +- ...magingmanifeststudyseriesinstance.input.js | 76 +- .../3_0_1/inputs/imagingstudy.input.js | 336 +- .../3_0_1/inputs/imagingstudyseries.input.js | 212 +- .../imagingstudyseriesinstance.input.js | 108 +- .../3_0_1/inputs/immunization.input.js | 349 +- .../inputs/immunizationexplanation.input.js | 60 +- .../inputs/immunizationpractitioner.input.js | 61 +- .../inputs/immunizationreaction.input.js | 84 +- .../immunizationrecommendation.input.js | 127 +- ...ationrecommendationrecommendation.input.js | 153 +- ...dationrecommendationdatecriterion.input.js | 74 +- ...ommendationrecommendationprotocol.input.js | 113 +- .../immunizationvaccinationprotocol.input.js | 161 +- .../3_0_1/inputs/implementationguide.input.js | 394 +- .../implementationguidedependency.input.js | 84 +- .../inputs/implementationguideglobal.input.js | 72 +- .../implementationguidepackage.input.js | 87 +- ...mplementationguidepackageresource.input.js | 156 +- .../inputs/implementationguidepage.input.js | 159 +- src/resources/3_0_1/inputs/library.input.js | 505 +-- src/resources/3_0_1/inputs/linkage.input.js | 137 +- .../3_0_1/inputs/linkageitem.input.js | 74 +- src/resources/3_0_1/inputs/list.input.js | 256 +- src/resources/3_0_1/inputs/listentry.input.js | 94 +- src/resources/3_0_1/inputs/location.input.js | 301 +- .../3_0_1/inputs/locationposition.input.js | 99 +- src/resources/3_0_1/inputs/measure.input.js | 703 ++-- .../3_0_1/inputs/measuregroup.input.js | 98 +- .../inputs/measuregrouppopulation.input.js | 113 +- .../inputs/measuregroupstratifier.input.js | 91 +- .../3_0_1/inputs/measurereport.input.js | 223 +- .../3_0_1/inputs/measurereportgroup.input.js | 90 +- .../measurereportgrouppopulation.input.js | 86 +- .../measurereportgroupstratifier.input.js | 65 +- ...asurereportgroupstratifierstratum.input.js | 93 +- ...tgroupstratifierstratumpopulation.input.js | 86 +- .../inputs/measuresupplementaldata.input.js | 99 +- src/resources/3_0_1/inputs/media.input.js | 339 +- .../3_0_1/inputs/medication.input.js | 212 +- .../inputs/medicationadministration.input.js | 361 +- .../medicationadministrationdosage.input.js | 127 +- ...medicationadministrationperformer.input.js | 60 +- .../3_0_1/inputs/medicationdispense.input.js | 391 +- .../medicationdispenseperformer.input.js | 62 +- .../medicationdispensesubstitution.input.js | 94 +- .../inputs/medicationingredient.input.js | 89 +- .../3_0_1/inputs/medicationpackage.input.js | 69 +- .../inputs/medicationpackagebatch.input.js | 79 +- .../inputs/medicationpackagecontent.input.js | 65 +- .../3_0_1/inputs/medicationrequest.input.js | 396 +- .../medicationrequestdispenserequest.input.js | 101 +- .../medicationrequestrequester.input.js | 62 +- .../medicationrequestsubstitution.input.js | 71 +- .../3_0_1/inputs/medicationstatement.input.js | 346 +- .../3_0_1/inputs/messagedefinition.input.js | 460 ++- .../messagedefinitionallowedresponse.input.js | 70 +- .../inputs/messagedefinitionfocus.input.js | 116 +- .../3_0_1/inputs/messageheader.input.js | 224 +- .../inputs/messageheaderdestination.input.js | 81 +- .../inputs/messageheaderresponse.input.js | 96 +- .../3_0_1/inputs/messageheadersource.input.js | 123 +- src/resources/3_0_1/inputs/meta.input.js | 121 +- .../3_0_1/inputs/metadataresource.input.js | 183 + src/resources/3_0_1/inputs/money.input.js | 81 +- .../3_0_1/inputs/namingsystem.input.js | 328 +- .../inputs/namingsystemuniqueid.input.js | 132 +- src/resources/3_0_1/inputs/narrative.input.js | 78 +- .../3_0_1/inputs/nutritionorder.input.js | 234 +- .../nutritionorderenteralformula.input.js | 167 +- ...orderenteralformulaadministration.input.js | 81 +- .../inputs/nutritionorderoraldiet.input.js | 118 +- .../nutritionorderoraldietnutrient.input.js | 62 +- .../nutritionorderoraldiettexture.input.js | 65 +- .../inputs/nutritionordersupplement.input.js | 107 +- .../3_0_1/inputs/observation.input.js | 503 +-- .../inputs/observationcomponent.input.js | 210 +- .../inputs/observationreferencerange.input.js | 113 +- .../3_0_1/inputs/observationrelated.input.js | 76 +- .../3_0_1/inputs/operationdefinition.input.js | 491 +-- .../operationdefinitionoverload.input.js | 71 +- .../operationdefinitionparameter.input.js | 191 +- ...erationdefinitionparameterbinding.input.js | 98 +- .../3_0_1/inputs/operationoutcome.input.js | 107 +- .../inputs/operationoutcomeissue.input.js | 157 +- .../3_0_1/inputs/organization.input.js | 210 +- .../3_0_1/inputs/organizationcontact.input.js | 77 +- .../3_0_1/inputs/parameterdefinition.input.js | 158 +- .../3_0_1/inputs/parameters.input.js | 80 +- .../3_0_1/inputs/parametersparameter.input.js | 519 +-- src/resources/3_0_1/inputs/patient.input.js | 333 +- .../3_0_1/inputs/patientanimal.input.js | 77 +- .../inputs/patientcommunication.input.js | 71 +- .../3_0_1/inputs/patientcontact.input.js | 123 +- .../3_0_1/inputs/patientlink.input.js | 74 +- .../3_0_1/inputs/paymentnotice.input.js | 214 +- .../inputs/paymentreconciliation.input.js | 254 +- .../paymentreconciliationdetail.input.js | 114 +- .../paymentreconciliationprocessnote.input.js | 66 +- src/resources/3_0_1/inputs/period.input.js | 69 +- src/resources/3_0_1/inputs/person.input.js | 208 +- .../3_0_1/inputs/personlink.input.js | 73 +- .../3_0_1/inputs/plandefinition.input.js | 505 +-- .../inputs/plandefinitionaction.input.js | 434 ++- .../plandefinitionactioncondition.input.js | 116 +- .../plandefinitionactiondynamicvalue.input.js | 117 +- .../plandefinitionactionparticipant.input.js | 74 +- ...plandefinitionactionrelatedaction.input.js | 100 +- .../3_0_1/inputs/plandefinitiongoal.input.js | 115 +- .../inputs/plandefinitiongoaltarget.input.js | 92 +- .../3_0_1/inputs/practitioner.input.js | 214 +- .../inputs/practitionerqualification.input.js | 74 +- .../3_0_1/inputs/practitionerrole.input.js | 250 +- .../practitionerroleavailabletime.input.js | 123 +- .../practitionerrolenotavailable.input.js | 70 +- src/resources/3_0_1/inputs/procedure.input.js | 410 +- .../inputs/procedurefocaldevice.input.js | 64 +- .../3_0_1/inputs/procedureperformer.input.js | 69 +- .../3_0_1/inputs/procedurerequest.input.js | 462 ++- .../inputs/procedurerequestrequester.input.js | 62 +- .../3_0_1/inputs/processrequest.input.js | 292 +- .../3_0_1/inputs/processrequestitem.input.js | 55 +- .../3_0_1/inputs/processresponse.input.js | 248 +- .../processresponseprocessnote.input.js | 67 +- .../3_0_1/inputs/provenance.input.js | 212 +- .../3_0_1/inputs/provenanceagent.input.js | 122 +- .../3_0_1/inputs/provenanceentity.input.js | 103 +- src/resources/3_0_1/inputs/quantity.input.js | 132 +- .../3_0_1/inputs/questionnaire.input.js | 457 ++- .../3_0_1/inputs/questionnaireitem.input.js | 497 +-- .../questionnaireitemenablewhen.input.js | 312 +- .../inputs/questionnaireitemoption.input.js | 144 +- .../inputs/questionnaireresponse.input.js | 226 +- .../inputs/questionnaireresponseitem.input.js | 123 +- .../questionnaireresponseitemanswer.input.js | 271 +- src/resources/3_0_1/inputs/range.input.js | 47 +- src/resources/3_0_1/inputs/ratio.input.js | 47 +- src/resources/3_0_1/inputs/reference.input.js | 81 +- .../3_0_1/inputs/referralrequest.input.js | 410 +- .../inputs/referralrequestrequester.input.js | 61 +- .../3_0_1/inputs/relatedartifact.input.js | 132 +- .../3_0_1/inputs/relatedperson.input.js | 224 +- .../3_0_1/inputs/requestgroup.input.js | 292 +- .../3_0_1/inputs/requestgroupaction.input.js | 349 +- .../requestgroupactioncondition.input.js | 116 +- .../requestgroupactionrelatedaction.input.js | 100 +- .../3_0_1/inputs/researchstudy.input.js | 313 +- .../3_0_1/inputs/researchstudyarm.input.js | 86 +- .../3_0_1/inputs/researchsubject.input.js | 199 +- src/resources/3_0_1/inputs/resource.input.js | 109 +- .../3_0_1/inputs/riskassessment.input.js | 300 +- .../inputs/riskassessmentprediction.input.js | 145 +- .../3_0_1/inputs/sampleddata.input.js | 162 +- src/resources/3_0_1/inputs/schedule.input.js | 197 +- .../3_0_1/inputs/searchparameter.input.js | 540 +-- .../inputs/searchparametercomponent.input.js | 69 +- src/resources/3_0_1/inputs/sequence.input.js | 279 +- .../3_0_1/inputs/sequencequality.input.js | 281 +- .../inputs/sequencereferenceseq.input.js | 168 +- .../3_0_1/inputs/sequencerepository.input.js | 162 +- .../3_0_1/inputs/sequencevariant.input.js | 150 +- .../3_0_1/inputs/servicedefinition.input.js | 495 +-- src/resources/3_0_1/inputs/signature.input.js | 166 +- .../3_0_1/inputs/simplequantity.input.js | 7 +- src/resources/3_0_1/inputs/slot.input.js | 256 +- src/resources/3_0_1/inputs/specimen.input.js | 228 +- .../3_0_1/inputs/specimencollection.input.js | 114 +- .../3_0_1/inputs/specimencontainer.input.js | 121 +- .../3_0_1/inputs/specimenprocessing.input.js | 105 +- .../3_0_1/inputs/structuredefinition.input.js | 586 +-- .../structuredefinitiondifferential.input.js | 53 +- .../structuredefinitionmapping.input.js | 119 +- .../structuredefinitionsnapshot.input.js | 53 +- .../3_0_1/inputs/structuremap.input.js | 401 +- .../3_0_1/inputs/structuremapgroup.input.js | 147 +- .../inputs/structuremapgroupinput.input.js | 110 +- .../inputs/structuremapgrouprule.input.js | 106 +- .../structuremapgroupruledependent.input.js | 74 +- .../structuremapgrouprulesource.input.js | 767 ++-- .../structuremapgroupruletarget.input.js | 174 +- ...ucturemapgroupruletargetparameter.input.js | 121 +- .../inputs/structuremapstructure.input.js | 114 +- .../3_0_1/inputs/subscription.input.js | 222 +- .../3_0_1/inputs/subscriptionchannel.input.js | 121 +- src/resources/3_0_1/inputs/substance.input.js | 180 +- .../3_0_1/inputs/substanceingredient.input.js | 71 +- .../3_0_1/inputs/substanceinstance.input.js | 81 +- .../3_0_1/inputs/supplydelivery.input.js | 234 +- .../supplydeliverysupplieditem.input.js | 74 +- .../3_0_1/inputs/supplyrequest.input.js | 266 +- .../inputs/supplyrequestordereditem.input.js | 73 +- .../inputs/supplyrequestrequester.input.js | 61 +- src/resources/3_0_1/inputs/task.input.js | 428 +- src/resources/3_0_1/inputs/taskinput.input.js | 504 +-- .../3_0_1/inputs/taskoutput.input.js | 501 +-- .../3_0_1/inputs/taskrequester.input.js | 59 +- .../3_0_1/inputs/taskrestriction.input.js | 81 +- .../3_0_1/inputs/testreport.input.js | 270 +- .../inputs/testreportparticipant.input.js | 96 +- .../3_0_1/inputs/testreportsetup.input.js | 53 +- .../inputs/testreportsetupaction.input.js | 58 +- .../testreportsetupactionassert.input.js | 92 +- .../testreportsetupactionoperation.input.js | 93 +- .../3_0_1/inputs/testreportteardown.input.js | 52 +- .../inputs/testreportteardownaction.input.js | 38 +- .../3_0_1/inputs/testreporttest.input.js | 91 +- .../inputs/testreporttestaction.input.js | 38 +- .../3_0_1/inputs/testscript.input.js | 467 ++- .../inputs/testscriptdestination.input.js | 70 +- .../3_0_1/inputs/testscriptfixture.input.js | 92 +- .../3_0_1/inputs/testscriptmetadata.input.js | 62 +- .../testscriptmetadatacapability.input.js | 163 +- .../inputs/testscriptmetadatalink.input.js | 77 +- .../3_0_1/inputs/testscriptorigin.input.js | 69 +- .../3_0_1/inputs/testscriptrule.input.js | 60 +- .../3_0_1/inputs/testscriptruleparam.input.js | 80 +- .../3_0_1/inputs/testscriptruleset.input.js | 63 +- .../inputs/testscriptrulesetrule.input.js | 71 +- .../testscriptrulesetruleparam.input.js | 80 +- .../3_0_1/inputs/testscriptsetup.input.js | 53 +- .../inputs/testscriptsetupaction.input.js | 58 +- .../testscriptsetupactionassert.input.js | 490 +-- .../testscriptsetupactionassertrule.input.js | 71 +- ...tscriptsetupactionassertruleparam.input.js | 80 +- ...estscriptsetupactionassertruleset.input.js | 72 +- ...criptsetupactionassertrulesetrule.input.js | 75 +- ...setupactionassertrulesetruleparam.input.js | 80 +- .../testscriptsetupactionoperation.input.js | 338 +- ...setupactionoperationrequestheader.input.js | 71 +- .../3_0_1/inputs/testscriptteardown.input.js | 52 +- .../inputs/testscriptteardownaction.input.js | 38 +- .../3_0_1/inputs/testscripttest.input.js | 91 +- .../inputs/testscripttestaction.input.js | 38 +- .../3_0_1/inputs/testscriptvariable.input.js | 198 +- src/resources/3_0_1/inputs/timing.input.js | 70 +- .../3_0_1/inputs/timingrepeat.input.js | 338 +- .../3_0_1/inputs/triggerdefinition.input.js | 130 +- .../3_0_1/inputs/usagecontext.input.js | 80 +- src/resources/3_0_1/inputs/valueset.input.js | 421 +- .../3_0_1/inputs/valuesetcompose.input.js | 96 +- .../inputs/valuesetcomposeinclude.input.js | 119 +- .../valuesetcomposeincludeconcept.input.js | 94 +- ...tcomposeincludeconceptdesignation.input.js | 86 +- .../valuesetcomposeincludefilter.input.js | 106 +- .../3_0_1/inputs/valuesetexpansion.input.js | 142 +- .../inputs/valuesetexpansioncontains.input.js | 159 +- .../valuesetexpansionparameter.input.js | 156 +- .../3_0_1/inputs/visionprescription.input.js | 204 +- .../visionprescriptiondispense.input.js | 283 +- .../3_0_1/parameters/account.parameters.js | 78 +- .../activitydefinition.parameters.js | 160 +- .../parameters/adverseevent.parameters.js | 83 +- .../allergyintolerance.parameters.js | 141 +- .../parameters/appointment.parameters.js | 84 +- .../appointmentresponse.parameters.js | 53 +- .../3_0_1/parameters/auditevent.parameters.js | 180 +- .../3_0_1/parameters/basic.parameters.js | 52 +- .../3_0_1/parameters/binary.parameters.js | 8 +- .../3_0_1/parameters/bodysite.parameters.js | 24 +- .../3_0_1/parameters/bundle.parameters.js | 33 +- .../capabilitystatement.parameters.js | 164 +- .../3_0_1/parameters/careplan.parameters.js | 166 +- .../3_0_1/parameters/careteam.parameters.js | 65 +- .../3_0_1/parameters/chargeitem.parameters.js | 146 +- .../3_0_1/parameters/claim.parameters.js | 112 +- .../parameters/claimresponse.parameters.js | 78 +- .../clinicalimpression.parameters.js | 110 +- .../3_0_1/parameters/codesystem.parameters.js | 123 +- .../3_0_1/parameters/common.parameters.js | 52 - .../parameters/communication.parameters.js | 133 +- .../communicationrequest.parameters.js | 145 +- .../compartmentdefinition.parameters.js | 88 +- .../parameters/composition.parameters.js | 147 +- .../3_0_1/parameters/conceptmap.parameters.js | 188 +- .../3_0_1/parameters/condition.parameters.js | 201 +- .../3_0_1/parameters/consent.parameters.js | 115 +- .../3_0_1/parameters/contract.parameters.js | 80 +- .../3_0_1/parameters/coverage.parameters.js | 117 +- .../parameters/dataelement.parameters.js | 116 +- .../parameters/detectedissue.parameters.js | 43 +- .../3_0_1/parameters/device.parameters.js | 98 +- .../parameters/devicecomponent.parameters.js | 32 +- .../parameters/devicemetric.parameters.js | 42 +- .../parameters/devicerequest.parameters.js | 133 +- .../deviceusestatement.parameters.js | 37 +- .../parameters/diagnosticreport.parameters.js | 132 +- .../parameters/documentmanifest.parameters.js | 109 +- .../documentreference.parameters.js | 229 +- .../parameters/domainresource.parameters.js | 16 + .../eligibilityrequest.parameters.js | 62 +- .../eligibilityresponse.parameters.js | 72 +- .../3_0_1/parameters/encounter.parameters.js | 167 +- .../3_0_1/parameters/endpoint.parameters.js | 45 +- .../enrollmentrequest.parameters.js | 30 +- .../enrollmentresponse.parameters.js | 24 +- .../parameters/episodeofcare.parameters.js | 68 +- .../parameters/expansionprofile.parameters.js | 70 +- .../explanationofbenefit.parameters.js | 108 +- .../familymemberhistory.parameters.js | 62 +- .../3_0_1/parameters/flag.parameters.js | 49 +- .../3_0_1/parameters/goal.parameters.js | 55 +- .../parameters/graphdefinition.parameters.js | 76 +- .../3_0_1/parameters/group.parameters.js | 70 +- .../parameters/guidanceresponse.parameters.js | 31 +- .../healthcareservice.parameters.js | 87 +- .../parameters/imagingmanifest.parameters.js | 62 +- .../parameters/imagingstudy.parameters.js | 138 +- .../parameters/immunization.parameters.js | 120 +- .../immunizationrecommendation.parameters.js | 87 +- .../implementationguide.parameters.js | 88 +- .../3_0_1/parameters/library.parameters.js | 156 +- .../3_0_1/parameters/linkage.parameters.js | 22 +- .../3_0_1/parameters/list.parameters.js | 99 +- .../3_0_1/parameters/location.parameters.js | 133 +- .../3_0_1/parameters/measure.parameters.js | 156 +- .../parameters/measurereport.parameters.js | 19 +- .../3_0_1/parameters/media.parameters.js | 114 +- .../3_0_1/parameters/medication.parameters.js | 79 +- .../medicationadministration.parameters.js | 112 +- .../medicationdispense.parameters.js | 126 +- .../medicationrequest.parameters.js | 124 +- .../medicationstatement.parameters.js | 91 +- .../messagedefinition.parameters.js | 116 +- .../parameters/messageheader.parameters.js | 136 +- .../parameters/namingsystem.parameters.js | 134 +- .../parameters/nutritionorder.parameters.js | 80 +- .../parameters/observation.parameters.js | 314 +- .../operationdefinition.parameters.js | 136 +- .../parameters/organization.parameters.js | 108 +- .../3_0_1/parameters/patient.parameters.js | 204 +- .../parameters/paymentnotice.parameters.js | 70 +- .../paymentreconciliation.parameters.js | 72 +- .../3_0_1/parameters/person.parameters.js | 161 +- .../parameters/plandefinition.parameters.js | 156 +- .../parameters/practitioner.parameters.js | 131 +- .../parameters/practitionerrole.parameters.js | 102 +- .../3_0_1/parameters/procedure.parameters.js | 114 +- .../parameters/procedurerequest.parameters.js | 175 +- .../parameters/processrequest.parameters.js | 36 +- .../parameters/processresponse.parameters.js | 36 +- .../3_0_1/parameters/provenance.parameters.js | 96 +- .../parameters/questionnaire.parameters.js | 98 +- .../questionnaireresponse.parameters.js | 90 +- .../parameters/referralrequest.parameters.js | 166 +- .../parameters/relatedperson.parameters.js | 133 +- .../parameters/requestgroup.parameters.js | 110 +- .../parameters/researchstudy.parameters.js | 109 +- .../parameters/researchsubject.parameters.js | 33 +- .../3_0_1/parameters/resource.parameters.js | 62 + .../parameters/riskassessment.parameters.js | 74 +- .../3_0_1/parameters/schedule.parameters.js | 37 +- .../parameters/searchparameter.parameters.js | 127 +- .../3_0_1/parameters/sequence.parameters.js | 51 +- .../servicedefinition.parameters.js | 160 +- .../3_0_1/parameters/slot.parameters.js | 42 +- .../3_0_1/parameters/specimen.parameters.js | 103 +- .../structuredefinition.parameters.js | 196 +- .../parameters/structuremap.parameters.js | 80 +- .../parameters/subscription.parameters.js | 61 +- .../3_0_1/parameters/substance.parameters.js | 72 +- .../parameters/supplydelivery.parameters.js | 38 +- .../parameters/supplyrequest.parameters.js | 50 +- .../3_0_1/parameters/task.parameters.js | 175 +- .../3_0_1/parameters/testreport.parameters.js | 58 +- .../3_0_1/parameters/testscript.parameters.js | 86 +- .../3_0_1/parameters/valueset.parameters.js | 99 +- .../visionprescription.parameters.js | 41 +- .../profiles/__mocks__/undefined.export.js | 1 - .../3_0_1/profiles/account/mutation.js | 55 +- src/resources/3_0_1/profiles/account/query.js | 43 +- .../account/{index.js => register.js} | 16 +- .../3_0_1/profiles/account/resolver.js | 62 +- .../profiles/activitydefinition/mutation.js | 59 +- .../profiles/activitydefinition/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/activitydefinition/resolver.js | 62 +- .../3_0_1/profiles/adverseevent/mutation.js | 59 +- .../3_0_1/profiles/adverseevent/query.js | 48 +- .../adverseevent/{index.js => register.js} | 16 +- .../3_0_1/profiles/adverseevent/resolver.js | 62 +- .../profiles/allergyintolerance/mutation.js | 59 +- .../profiles/allergyintolerance/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/allergyintolerance/resolver.js | 62 +- .../3_0_1/profiles/appointment/mutation.js | 59 +- .../3_0_1/profiles/appointment/query.js | 43 +- .../appointment/{index.js => register.js} | 16 +- .../3_0_1/profiles/appointment/resolver.js | 62 +- .../profiles/appointmentresponse/mutation.js | 59 +- .../profiles/appointmentresponse/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/appointmentresponse/resolver.js | 62 +- .../3_0_1/profiles/auditevent/mutation.js | 59 +- .../3_0_1/profiles/auditevent/query.js | 43 +- .../auditevent/{index.js => register.js} | 16 +- .../3_0_1/profiles/auditevent/resolver.js | 62 +- .../3_0_1/profiles/basic/mutation.js | 55 +- src/resources/3_0_1/profiles/basic/query.js | 43 +- .../profiles/basic/{index.js => register.js} | 10 +- .../3_0_1/profiles/basic/resolver.js | 65 +- .../3_0_1/profiles/binary/mutation.js | 55 +- src/resources/3_0_1/profiles/binary/query.js | 43 +- .../profiles/binary/{index.js => register.js} | 16 +- .../3_0_1/profiles/binary/resolver.js | 65 +- .../3_0_1/profiles/bodysite/mutation.js | 59 +- .../3_0_1/profiles/bodysite/query.js | 43 +- .../bodysite/{index.js => register.js} | 16 +- .../3_0_1/profiles/bodysite/resolver.js | 62 +- .../3_0_1/profiles/bundle/mutation.js | 55 +- src/resources/3_0_1/profiles/bundle/query.js | 41 +- .../profiles/bundle/{index.js => register.js} | 16 +- .../3_0_1/profiles/bundle/resolver.js | 65 +- .../profiles/capabilitystatement/mutation.js | 59 +- .../profiles/capabilitystatement/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/capabilitystatement/resolver.js | 62 +- .../3_0_1/profiles/careplan/mutation.js | 59 +- .../3_0_1/profiles/careplan/query.js | 43 +- .../careplan/{index.js => register.js} | 16 +- .../3_0_1/profiles/careplan/resolver.js | 62 +- .../3_0_1/profiles/careteam/mutation.js | 59 +- .../3_0_1/profiles/careteam/query.js | 43 +- .../careteam/{index.js => register.js} | 16 +- .../3_0_1/profiles/careteam/resolver.js | 62 +- .../3_0_1/profiles/chargeitem/mutation.js | 59 +- .../3_0_1/profiles/chargeitem/query.js | 43 +- .../chargeitem/{index.js => register.js} | 16 +- .../3_0_1/profiles/chargeitem/resolver.js | 62 +- .../3_0_1/profiles/claim/mutation.js | 55 +- src/resources/3_0_1/profiles/claim/query.js | 43 +- .../profiles/claim/{index.js => register.js} | 10 +- .../3_0_1/profiles/claim/resolver.js | 65 +- .../3_0_1/profiles/claimresponse/mutation.js | 59 +- .../3_0_1/profiles/claimresponse/query.js | 48 +- .../claimresponse/{index.js => register.js} | 16 +- .../3_0_1/profiles/claimresponse/resolver.js | 62 +- .../profiles/clinicalimpression/mutation.js | 59 +- .../profiles/clinicalimpression/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/clinicalimpression/resolver.js | 62 +- .../3_0_1/profiles/codesystem/mutation.js | 59 +- .../3_0_1/profiles/codesystem/query.js | 43 +- .../codesystem/{index.js => register.js} | 16 +- .../3_0_1/profiles/codesystem/resolver.js | 62 +- .../3_0_1/profiles/communication/mutation.js | 59 +- .../3_0_1/profiles/communication/query.js | 48 +- .../communication/{index.js => register.js} | 16 +- .../3_0_1/profiles/communication/resolver.js | 62 +- .../profiles/communicationrequest/mutation.js | 59 +- .../profiles/communicationrequest/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/communicationrequest/resolver.js | 62 +- .../compartmentdefinition/mutation.js | 59 +- .../profiles/compartmentdefinition/query.js | 48 +- .../{index.js => register.js} | 16 +- .../compartmentdefinition/resolver.js | 62 +- .../3_0_1/profiles/composition/mutation.js | 59 +- .../3_0_1/profiles/composition/query.js | 43 +- .../composition/{index.js => register.js} | 16 +- .../3_0_1/profiles/composition/resolver.js | 62 +- .../3_0_1/profiles/conceptmap/mutation.js | 59 +- .../3_0_1/profiles/conceptmap/query.js | 43 +- .../conceptmap/{index.js => register.js} | 16 +- .../3_0_1/profiles/conceptmap/resolver.js | 62 +- .../3_0_1/profiles/condition/mutation.js | 59 +- .../3_0_1/profiles/condition/query.js | 43 +- .../condition/{index.js => register.js} | 16 +- .../3_0_1/profiles/condition/resolver.js | 62 +- .../3_0_1/profiles/consent/mutation.js | 55 +- src/resources/3_0_1/profiles/consent/query.js | 43 +- .../consent/{index.js => register.js} | 16 +- .../3_0_1/profiles/consent/resolver.js | 62 +- .../3_0_1/profiles/contract/mutation.js | 59 +- .../3_0_1/profiles/contract/query.js | 43 +- .../contract/{index.js => register.js} | 16 +- .../3_0_1/profiles/contract/resolver.js | 62 +- .../3_0_1/profiles/coverage/mutation.js | 59 +- .../3_0_1/profiles/coverage/query.js | 43 +- .../coverage/{index.js => register.js} | 16 +- .../3_0_1/profiles/coverage/resolver.js | 62 +- .../3_0_1/profiles/dataelement/mutation.js | 59 +- .../3_0_1/profiles/dataelement/query.js | 43 +- .../dataelement/{index.js => register.js} | 16 +- .../3_0_1/profiles/dataelement/resolver.js | 62 +- .../3_0_1/profiles/detectedissue/mutation.js | 59 +- .../3_0_1/profiles/detectedissue/query.js | 48 +- .../detectedissue/{index.js => register.js} | 16 +- .../3_0_1/profiles/detectedissue/resolver.js | 62 +- .../3_0_1/profiles/device/mutation.js | 55 +- src/resources/3_0_1/profiles/device/query.js | 43 +- .../profiles/device/{index.js => register.js} | 16 +- .../3_0_1/profiles/device/resolver.js | 65 +- .../profiles/devicecomponent/mutation.js | 59 +- .../3_0_1/profiles/devicecomponent/query.js | 48 +- .../devicecomponent/{index.js => register.js} | 16 +- .../profiles/devicecomponent/resolver.js | 62 +- .../3_0_1/profiles/devicemetric/mutation.js | 59 +- .../3_0_1/profiles/devicemetric/query.js | 48 +- .../devicemetric/{index.js => register.js} | 16 +- .../3_0_1/profiles/devicemetric/resolver.js | 62 +- .../3_0_1/profiles/devicerequest/mutation.js | 59 +- .../3_0_1/profiles/devicerequest/query.js | 48 +- .../devicerequest/{index.js => register.js} | 16 +- .../3_0_1/profiles/devicerequest/resolver.js | 62 +- .../profiles/deviceusestatement/mutation.js | 59 +- .../profiles/deviceusestatement/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/deviceusestatement/resolver.js | 62 +- .../profiles/diagnosticreport/mutation.js | 59 +- .../3_0_1/profiles/diagnosticreport/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/diagnosticreport/resolver.js | 62 +- .../profiles/documentmanifest/mutation.js | 59 +- .../3_0_1/profiles/documentmanifest/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/documentmanifest/resolver.js | 62 +- .../profiles/documentreference/mutation.js | 59 +- .../3_0_1/profiles/documentreference/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/documentreference/resolver.js | 62 +- .../profiles/eligibilityrequest/mutation.js | 59 +- .../profiles/eligibilityrequest/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/eligibilityrequest/resolver.js | 62 +- .../profiles/eligibilityresponse/mutation.js | 59 +- .../profiles/eligibilityresponse/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/eligibilityresponse/resolver.js | 62 +- .../3_0_1/profiles/encounter/mutation.js | 59 +- .../3_0_1/profiles/encounter/query.js | 43 +- .../encounter/{index.js => register.js} | 16 +- .../3_0_1/profiles/encounter/resolver.js | 62 +- .../3_0_1/profiles/endpoint/mutation.js | 59 +- .../3_0_1/profiles/endpoint/query.js | 43 +- .../endpoint/{index.js => register.js} | 16 +- .../3_0_1/profiles/endpoint/resolver.js | 62 +- .../profiles/enrollmentrequest/mutation.js | 59 +- .../3_0_1/profiles/enrollmentrequest/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/enrollmentrequest/resolver.js | 62 +- .../profiles/enrollmentresponse/mutation.js | 59 +- .../profiles/enrollmentresponse/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/enrollmentresponse/resolver.js | 62 +- .../3_0_1/profiles/episodeofcare/mutation.js | 59 +- .../3_0_1/profiles/episodeofcare/query.js | 48 +- .../episodeofcare/{index.js => register.js} | 16 +- .../3_0_1/profiles/episodeofcare/resolver.js | 62 +- .../profiles/expansionprofile/mutation.js | 59 +- .../3_0_1/profiles/expansionprofile/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/expansionprofile/resolver.js | 62 +- .../profiles/explanationofbenefit/mutation.js | 59 +- .../profiles/explanationofbenefit/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/explanationofbenefit/resolver.js | 62 +- .../profiles/familymemberhistory/mutation.js | 59 +- .../profiles/familymemberhistory/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/familymemberhistory/resolver.js | 62 +- src/resources/3_0_1/profiles/flag/mutation.js | 55 +- src/resources/3_0_1/profiles/flag/query.js | 43 +- .../profiles/flag/{index.js => register.js} | 10 +- src/resources/3_0_1/profiles/flag/resolver.js | 60 +- src/resources/3_0_1/profiles/goal/mutation.js | 55 +- src/resources/3_0_1/profiles/goal/query.js | 43 +- .../profiles/goal/{index.js => register.js} | 10 +- src/resources/3_0_1/profiles/goal/resolver.js | 60 +- .../profiles/graphdefinition/mutation.js | 59 +- .../3_0_1/profiles/graphdefinition/query.js | 48 +- .../graphdefinition/{index.js => register.js} | 16 +- .../profiles/graphdefinition/resolver.js | 62 +- .../3_0_1/profiles/group/mutation.js | 55 +- src/resources/3_0_1/profiles/group/query.js | 43 +- .../profiles/group/{index.js => register.js} | 10 +- .../3_0_1/profiles/group/resolver.js | 65 +- .../profiles/guidanceresponse/mutation.js | 59 +- .../3_0_1/profiles/guidanceresponse/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/guidanceresponse/resolver.js | 62 +- .../profiles/healthcareservice/mutation.js | 59 +- .../3_0_1/profiles/healthcareservice/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/healthcareservice/resolver.js | 62 +- .../profiles/imagingmanifest/mutation.js | 59 +- .../3_0_1/profiles/imagingmanifest/query.js | 48 +- .../imagingmanifest/{index.js => register.js} | 16 +- .../profiles/imagingmanifest/resolver.js | 62 +- .../3_0_1/profiles/imagingstudy/mutation.js | 59 +- .../3_0_1/profiles/imagingstudy/query.js | 48 +- .../imagingstudy/{index.js => register.js} | 16 +- .../3_0_1/profiles/imagingstudy/resolver.js | 62 +- .../3_0_1/profiles/immunization/mutation.js | 59 +- .../3_0_1/profiles/immunization/query.js | 48 +- .../immunization/{index.js => register.js} | 16 +- .../3_0_1/profiles/immunization/resolver.js | 62 +- .../immunizationrecommendation/mutation.js | 68 +- .../immunizationrecommendation/query.js | 51 +- .../{index.js => register.js} | 16 +- .../immunizationrecommendation/resolver.js | 62 +- .../profiles/implementationguide/mutation.js | 59 +- .../profiles/implementationguide/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/implementationguide/resolver.js | 62 +- .../3_0_1/profiles/library/mutation.js | 55 +- src/resources/3_0_1/profiles/library/query.js | 43 +- .../library/{index.js => register.js} | 16 +- .../3_0_1/profiles/library/resolver.js | 62 +- .../3_0_1/profiles/linkage/mutation.js | 55 +- src/resources/3_0_1/profiles/linkage/query.js | 43 +- .../linkage/{index.js => register.js} | 16 +- .../3_0_1/profiles/linkage/resolver.js | 62 +- src/resources/3_0_1/profiles/list/mutation.js | 55 +- src/resources/3_0_1/profiles/list/query.js | 43 +- .../profiles/list/{index.js => register.js} | 10 +- src/resources/3_0_1/profiles/list/resolver.js | 60 +- .../3_0_1/profiles/location/mutation.js | 59 +- .../3_0_1/profiles/location/query.js | 43 +- .../location/{index.js => register.js} | 16 +- .../3_0_1/profiles/location/resolver.js | 62 +- .../3_0_1/profiles/measure/mutation.js | 55 +- src/resources/3_0_1/profiles/measure/query.js | 43 +- .../measure/{index.js => register.js} | 16 +- .../3_0_1/profiles/measure/resolver.js | 62 +- .../3_0_1/profiles/measurereport/mutation.js | 59 +- .../3_0_1/profiles/measurereport/query.js | 48 +- .../measurereport/{index.js => register.js} | 16 +- .../3_0_1/profiles/measurereport/resolver.js | 62 +- .../3_0_1/profiles/media/mutation.js | 55 +- src/resources/3_0_1/profiles/media/query.js | 43 +- .../profiles/media/{index.js => register.js} | 10 +- .../3_0_1/profiles/media/resolver.js | 65 +- .../3_0_1/profiles/medication/mutation.js | 59 +- .../3_0_1/profiles/medication/query.js | 43 +- .../medication/{index.js => register.js} | 16 +- .../3_0_1/profiles/medication/resolver.js | 62 +- .../medicationadministration/mutation.js | 59 +- .../medicationadministration/query.js | 51 +- .../{index.js => register.js} | 16 +- .../medicationadministration/resolver.js | 62 +- .../profiles/medicationdispense/mutation.js | 59 +- .../profiles/medicationdispense/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/medicationdispense/resolver.js | 62 +- .../profiles/medicationrequest/mutation.js | 59 +- .../3_0_1/profiles/medicationrequest/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/medicationrequest/resolver.js | 62 +- .../profiles/medicationstatement/mutation.js | 59 +- .../profiles/medicationstatement/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/medicationstatement/resolver.js | 62 +- .../profiles/messagedefinition/mutation.js | 59 +- .../3_0_1/profiles/messagedefinition/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/messagedefinition/resolver.js | 62 +- .../3_0_1/profiles/messageheader/mutation.js | 59 +- .../3_0_1/profiles/messageheader/query.js | 48 +- .../messageheader/{index.js => register.js} | 16 +- .../3_0_1/profiles/messageheader/resolver.js | 62 +- .../3_0_1/profiles/namingsystem/mutation.js | 59 +- .../3_0_1/profiles/namingsystem/query.js | 48 +- .../namingsystem/{index.js => register.js} | 16 +- .../3_0_1/profiles/namingsystem/resolver.js | 62 +- .../3_0_1/profiles/nutritionorder/mutation.js | 59 +- .../3_0_1/profiles/nutritionorder/query.js | 48 +- .../nutritionorder/{index.js => register.js} | 16 +- .../3_0_1/profiles/nutritionorder/resolver.js | 62 +- .../3_0_1/profiles/observation/mutation.js | 59 +- .../3_0_1/profiles/observation/query.js | 43 +- .../observation/{index.js => register.js} | 16 +- .../3_0_1/profiles/observation/resolver.js | 62 +- .../profiles/operationdefinition/mutation.js | 59 +- .../profiles/operationdefinition/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/operationdefinition/resolver.js | 62 +- .../3_0_1/profiles/organization/mutation.js | 59 +- .../3_0_1/profiles/organization/query.js | 48 +- .../organization/{index.js => register.js} | 16 +- .../3_0_1/profiles/organization/resolver.js | 62 +- .../3_0_1/profiles/patient/mutation.js | 55 +- src/resources/3_0_1/profiles/patient/query.js | 43 +- .../patient/{index.js => register.js} | 16 +- .../3_0_1/profiles/patient/resolver.js | 62 +- .../3_0_1/profiles/paymentnotice/mutation.js | 59 +- .../3_0_1/profiles/paymentnotice/query.js | 48 +- .../paymentnotice/{index.js => register.js} | 16 +- .../3_0_1/profiles/paymentnotice/resolver.js | 62 +- .../paymentreconciliation/mutation.js | 59 +- .../profiles/paymentreconciliation/query.js | 48 +- .../{index.js => register.js} | 16 +- .../paymentreconciliation/resolver.js | 62 +- .../3_0_1/profiles/person/mutation.js | 55 +- src/resources/3_0_1/profiles/person/query.js | 43 +- .../profiles/person/{index.js => register.js} | 16 +- .../3_0_1/profiles/person/resolver.js | 65 +- .../3_0_1/profiles/plandefinition/mutation.js | 59 +- .../3_0_1/profiles/plandefinition/query.js | 48 +- .../plandefinition/{index.js => register.js} | 16 +- .../3_0_1/profiles/plandefinition/resolver.js | 62 +- .../3_0_1/profiles/practitioner/mutation.js | 59 +- .../3_0_1/profiles/practitioner/query.js | 48 +- .../practitioner/{index.js => register.js} | 16 +- .../3_0_1/profiles/practitioner/resolver.js | 62 +- .../profiles/practitionerrole/mutation.js | 59 +- .../3_0_1/profiles/practitionerrole/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/practitionerrole/resolver.js | 62 +- .../3_0_1/profiles/procedure/mutation.js | 59 +- .../3_0_1/profiles/procedure/query.js | 43 +- .../procedure/{index.js => register.js} | 16 +- .../3_0_1/profiles/procedure/resolver.js | 62 +- .../profiles/procedurerequest/mutation.js | 59 +- .../3_0_1/profiles/procedurerequest/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/procedurerequest/resolver.js | 62 +- .../3_0_1/profiles/processrequest/mutation.js | 59 +- .../3_0_1/profiles/processrequest/query.js | 48 +- .../processrequest/{index.js => register.js} | 16 +- .../3_0_1/profiles/processrequest/resolver.js | 62 +- .../profiles/processresponse/mutation.js | 59 +- .../3_0_1/profiles/processresponse/query.js | 48 +- .../processresponse/{index.js => register.js} | 16 +- .../profiles/processresponse/resolver.js | 62 +- .../3_0_1/profiles/provenance/mutation.js | 59 +- .../3_0_1/profiles/provenance/query.js | 43 +- .../provenance/{index.js => register.js} | 16 +- .../3_0_1/profiles/provenance/resolver.js | 62 +- .../3_0_1/profiles/questionnaire/mutation.js | 59 +- .../3_0_1/profiles/questionnaire/query.js | 48 +- .../questionnaire/{index.js => register.js} | 16 +- .../3_0_1/profiles/questionnaire/resolver.js | 62 +- .../questionnaireresponse/mutation.js | 59 +- .../profiles/questionnaireresponse/query.js | 48 +- .../{index.js => register.js} | 16 +- .../questionnaireresponse/resolver.js | 62 +- .../profiles/referralrequest/mutation.js | 59 +- .../3_0_1/profiles/referralrequest/query.js | 48 +- .../referralrequest/{index.js => register.js} | 16 +- .../profiles/referralrequest/resolver.js | 62 +- .../3_0_1/profiles/relatedperson/mutation.js | 59 +- .../3_0_1/profiles/relatedperson/query.js | 48 +- .../relatedperson/{index.js => register.js} | 16 +- .../3_0_1/profiles/relatedperson/resolver.js | 62 +- .../3_0_1/profiles/requestgroup/mutation.js | 59 +- .../3_0_1/profiles/requestgroup/query.js | 48 +- .../requestgroup/{index.js => register.js} | 16 +- .../3_0_1/profiles/requestgroup/resolver.js | 62 +- .../3_0_1/profiles/researchstudy/mutation.js | 59 +- .../3_0_1/profiles/researchstudy/query.js | 48 +- .../researchstudy/{index.js => register.js} | 16 +- .../3_0_1/profiles/researchstudy/resolver.js | 62 +- .../profiles/researchsubject/mutation.js | 59 +- .../3_0_1/profiles/researchsubject/query.js | 48 +- .../researchsubject/{index.js => register.js} | 16 +- .../profiles/researchsubject/resolver.js | 62 +- .../3_0_1/profiles/riskassessment/mutation.js | 59 +- .../3_0_1/profiles/riskassessment/query.js | 48 +- .../riskassessment/{index.js => register.js} | 16 +- .../3_0_1/profiles/riskassessment/resolver.js | 62 +- .../3_0_1/profiles/schedule/mutation.js | 59 +- .../3_0_1/profiles/schedule/query.js | 43 +- .../schedule/{index.js => register.js} | 16 +- .../3_0_1/profiles/schedule/resolver.js | 62 +- .../profiles/searchparameter/mutation.js | 59 +- .../3_0_1/profiles/searchparameter/query.js | 48 +- .../searchparameter/{index.js => register.js} | 16 +- .../profiles/searchparameter/resolver.js | 62 +- .../3_0_1/profiles/sequence/mutation.js | 59 +- .../3_0_1/profiles/sequence/query.js | 43 +- .../sequence/{index.js => register.js} | 16 +- .../3_0_1/profiles/sequence/resolver.js | 62 +- .../profiles/servicedefinition/mutation.js | 59 +- .../3_0_1/profiles/servicedefinition/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/servicedefinition/resolver.js | 62 +- src/resources/3_0_1/profiles/slot/mutation.js | 55 +- src/resources/3_0_1/profiles/slot/query.js | 43 +- .../profiles/slot/{index.js => register.js} | 10 +- src/resources/3_0_1/profiles/slot/resolver.js | 60 +- .../3_0_1/profiles/specimen/mutation.js | 59 +- .../3_0_1/profiles/specimen/query.js | 43 +- .../specimen/{index.js => register.js} | 16 +- .../3_0_1/profiles/specimen/resolver.js | 62 +- .../profiles/structuredefinition/mutation.js | 59 +- .../profiles/structuredefinition/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/structuredefinition/resolver.js | 62 +- .../3_0_1/profiles/structuremap/mutation.js | 59 +- .../3_0_1/profiles/structuremap/query.js | 48 +- .../structuremap/{index.js => register.js} | 16 +- .../3_0_1/profiles/structuremap/resolver.js | 62 +- .../3_0_1/profiles/subscription/mutation.js | 59 +- .../3_0_1/profiles/subscription/query.js | 48 +- .../subscription/{index.js => register.js} | 16 +- .../3_0_1/profiles/subscription/resolver.js | 62 +- .../3_0_1/profiles/substance/mutation.js | 59 +- .../3_0_1/profiles/substance/query.js | 43 +- .../substance/{index.js => register.js} | 16 +- .../3_0_1/profiles/substance/resolver.js | 62 +- .../3_0_1/profiles/supplydelivery/mutation.js | 59 +- .../3_0_1/profiles/supplydelivery/query.js | 48 +- .../supplydelivery/{index.js => register.js} | 16 +- .../3_0_1/profiles/supplydelivery/resolver.js | 62 +- .../3_0_1/profiles/supplyrequest/mutation.js | 59 +- .../3_0_1/profiles/supplyrequest/query.js | 48 +- .../supplyrequest/{index.js => register.js} | 16 +- .../3_0_1/profiles/supplyrequest/resolver.js | 62 +- src/resources/3_0_1/profiles/task/mutation.js | 55 +- src/resources/3_0_1/profiles/task/query.js | 43 +- .../profiles/task/{index.js => register.js} | 10 +- src/resources/3_0_1/profiles/task/resolver.js | 60 +- .../3_0_1/profiles/testreport/mutation.js | 59 +- .../3_0_1/profiles/testreport/query.js | 43 +- .../testreport/{index.js => register.js} | 16 +- .../3_0_1/profiles/testreport/resolver.js | 62 +- .../3_0_1/profiles/testscript/mutation.js | 59 +- .../3_0_1/profiles/testscript/query.js | 43 +- .../testscript/{index.js => register.js} | 16 +- .../3_0_1/profiles/testscript/resolver.js | 62 +- .../3_0_1/profiles/valueset/mutation.js | 59 +- .../3_0_1/profiles/valueset/query.js | 43 +- .../valueset/{index.js => register.js} | 16 +- .../3_0_1/profiles/valueset/resolver.js | 62 +- .../profiles/visionprescription/mutation.js | 59 +- .../profiles/visionprescription/query.js | 48 +- .../{index.js => register.js} | 16 +- .../profiles/visionprescription/resolver.js | 62 +- src/resources/3_0_1/scalars/base64.scalar.js | 35 - .../3_0_1/scalars/base64binary.scalar.js | 13 +- src/resources/3_0_1/scalars/boolean.scalar.js | 24 + src/resources/3_0_1/scalars/code.scalar.js | 11 +- src/resources/3_0_1/scalars/date.scalar.js | 40 +- .../3_0_1/scalars/date.scalar.test.js | 50 - .../3_0_1/scalars/datetime.scalar.js | 45 +- .../3_0_1/scalars/datetime.scalar.test.js | 102 - src/resources/3_0_1/scalars/decimal.scalar.js | 24 + src/resources/3_0_1/scalars/id.scalar.js | 19 +- src/resources/3_0_1/scalars/instant.scalar.js | 21 +- src/resources/3_0_1/scalars/integer.scalar.js | 23 + .../3_0_1/scalars/markdown.scalar.js | 24 + src/resources/3_0_1/scalars/oid.scalar.js | 34 +- .../3_0_1/scalars/oid.scalar.test.js | 42 - .../3_0_1/scalars/positiveint.scalar.js | 37 +- .../3_0_1/scalars/positiveint.scalar.test.js | 46 - src/resources/3_0_1/scalars/string.scalar.js | 24 + src/resources/3_0_1/scalars/time.scalar.js | 39 +- .../3_0_1/scalars/time.scalar.test.js | 44 - src/resources/3_0_1/scalars/token.scalar.js | 18 +- .../3_0_1/scalars/unsignedint.scalar.js | 37 +- .../3_0_1/scalars/unsignedint.scalar.test.js | 42 - src/resources/3_0_1/scalars/uri.scalar.js | 11 +- src/resources/3_0_1/scalars/uuid.scalar.js | 34 +- .../3_0_1/scalars/uuid.scalar.test.js | 95 - src/resources/3_0_1/scalars/xhtml.scalar.js | 11 +- src/resources/3_0_1/schemas/account.schema.js | 280 +- .../3_0_1/schemas/accountcoverage.schema.js | 86 +- .../3_0_1/schemas/accountguarantor.schema.js | 97 +- .../schemas/activitydefinition.schema.js | 699 ++-- .../activitydefinitiondynamicvalue.schema.js | 112 +- .../activitydefinitionparticipant.schema.js | 73 +- src/resources/3_0_1/schemas/address.schema.js | 208 +- .../3_0_1/schemas/adverseevent.schema.js | 402 +- .../adverseeventsuspectentity.schema.js | 169 +- src/resources/3_0_1/schemas/age.schema.js | 80 +- .../schemas/allergyintolerance.schema.js | 417 +- .../allergyintolerancereaction.schema.js | 156 +- .../3_0_1/schemas/annotation.schema.js | 107 +- .../3_0_1/schemas/appointment.schema.js | 438 ++- .../schemas/appointmentparticipant.schema.js | 131 +- .../schemas/appointmentresponse.schema.js | 251 +- .../3_0_1/schemas/attachment.schema.js | 186 +- .../3_0_1/schemas/auditevent.schema.js | 234 +- .../3_0_1/schemas/auditeventagent.schema.js | 221 +- .../schemas/auditeventagentnetwork.schema.js | 80 +- .../3_0_1/schemas/auditevententity.schema.js | 170 +- .../schemas/auditevententitydetail.schema.js | 79 +- .../3_0_1/schemas/auditeventsource.schema.js | 76 +- .../3_0_1/schemas/backboneelement.schema.js | 36 +- src/resources/3_0_1/schemas/basic.schema.js | 174 +- src/resources/3_0_1/schemas/binary.schema.js | 127 +- .../3_0_1/schemas/bodysite.schema.js | 187 +- src/resources/3_0_1/schemas/bundle.schema.js | 152 +- .../3_0_1/schemas/bundleentry.schema.js | 101 +- .../schemas/bundleentryrequest.schema.js | 169 +- .../schemas/bundleentryresponse.schema.js | 134 +- .../3_0_1/schemas/bundleentrysearch.schema.js | 85 +- .../3_0_1/schemas/bundlelink.schema.js | 78 +- .../schemas/capabilitystatement.schema.js | 568 +-- .../capabilitystatementdocument.schema.js | 104 +- ...apabilitystatementimplementation.schema.js | 83 +- .../capabilitystatementmessaging.schema.js | 119 +- ...bilitystatementmessagingendpoint.schema.js | 75 +- ...apabilitystatementmessagingevent.schema.js | 174 +- ...atementmessagingsupportedmessage.schema.js | 89 +- .../schemas/capabilitystatementrest.schema.js | 156 +- ...pabilitystatementrestinteraction.schema.js | 84 +- ...capabilitystatementrestoperation.schema.js | 81 +- .../capabilitystatementrestresource.schema.js | 326 +- ...statementrestresourceinteraction.schema.js | 84 +- ...statementrestresourcesearchparam.schema.js | 123 +- .../capabilitystatementrestsecurity.schema.js | 100 +- ...statementrestsecuritycertificate.schema.js | 71 +- .../capabilitystatementsoftware.schema.js | 95 +- .../3_0_1/schemas/careplan.schema.js | 492 ++- .../3_0_1/schemas/careplanactivity.schema.js | 148 +- .../schemas/careplanactivitydetail.schema.js | 380 +- .../3_0_1/schemas/careteam.schema.js | 274 +- .../schemas/careteamparticipant.schema.js | 112 +- .../3_0_1/schemas/chargeitem.schema.js | 536 ++- .../schemas/chargeitemparticipant.schema.js | 94 +- src/resources/3_0_1/schemas/claim.schema.js | 480 ++- .../3_0_1/schemas/claimaccident.schema.js | 93 +- .../3_0_1/schemas/claimcareteam.schema.js | 128 +- .../3_0_1/schemas/claimdiagnosis.schema.js | 114 +- .../3_0_1/schemas/claiminformation.schema.js | 185 +- .../3_0_1/schemas/claiminsurance.schema.js | 160 +- .../3_0_1/schemas/claimitem.schema.js | 376 +- .../3_0_1/schemas/claimitemdetail.schema.js | 195 +- .../claimitemdetailsubdetail.schema.js | 185 +- .../3_0_1/schemas/claimpayee.schema.js | 92 +- .../3_0_1/schemas/claimprocedure.schema.js | 113 +- .../3_0_1/schemas/claimrelated.schema.js | 77 +- .../3_0_1/schemas/claimresponse.schema.js | 383 +- .../schemas/claimresponseadditem.schema.js | 140 +- .../claimresponseadditemdetail.schema.js | 111 +- .../schemas/claimresponseerror.schema.js | 114 +- .../schemas/claimresponseinsurance.schema.js | 156 +- .../3_0_1/schemas/claimresponseitem.schema.js | 96 +- .../claimresponseitemadjudication.schema.js | 91 +- .../schemas/claimresponseitemdetail.schema.js | 88 +- ...claimresponseitemdetailsubdetail.schema.js | 74 +- .../schemas/claimresponsepayment.schema.js | 101 +- .../claimresponseprocessnote.schema.js | 95 +- .../schemas/clinicalimpression.schema.js | 448 ++- .../clinicalimpressionfinding.schema.js | 100 +- .../clinicalimpressioninvestigation.schema.js | 97 +- .../3_0_1/schemas/codeableconcept.schema.js | 54 +- .../3_0_1/schemas/codesystem.schema.js | 529 +-- .../3_0_1/schemas/codesystemconcept.schema.js | 120 +- .../codesystemconceptdesignation.schema.js | 87 +- .../codesystemconceptproperty.schema.js | 146 +- .../3_0_1/schemas/codesystemfilter.schema.js | 112 +- .../schemas/codesystemproperty.schema.js | 127 +- src/resources/3_0_1/schemas/coding.schema.js | 135 +- .../3_0_1/schemas/communication.schema.js | 485 ++- .../schemas/communicationpayload.schema.js | 94 +- .../schemas/communicationrequest.schema.js | 485 ++- .../communicationrequestpayload.schema.js | 95 +- .../communicationrequestrequester.schema.js | 97 +- .../schemas/compartmentdefinition.schema.js | 359 +- .../compartmentdefinitionresource.schema.js | 100 +- .../3_0_1/schemas/composition.schema.js | 340 +- .../schemas/compositionattester.schema.js | 105 +- .../3_0_1/schemas/compositionevent.schema.js | 85 +- .../schemas/compositionrelatesto.schema.js | 93 +- .../schemas/compositionsection.schema.js | 152 +- .../3_0_1/schemas/conceptmap.schema.js | 443 ++- .../3_0_1/schemas/conceptmapgroup.schema.js | 144 +- .../schemas/conceptmapgroupelement.schema.js | 88 +- .../conceptmapgroupelementtarget.schema.js | 133 +- ...ptmapgroupelementtargetdependson.schema.js | 123 +- .../schemas/conceptmapgroupunmapped.schema.js | 127 +- .../3_0_1/schemas/condition.schema.js | 474 ++- .../3_0_1/schemas/conditionevidence.schema.js | 75 +- .../3_0_1/schemas/conditionstage.schema.js | 85 +- src/resources/3_0_1/schemas/consent.schema.js | 391 +- .../3_0_1/schemas/consentactor.schema.js | 102 +- .../3_0_1/schemas/consentdata.schema.js | 88 +- .../3_0_1/schemas/consentexcept.schema.js | 161 +- .../schemas/consentexceptactor.schema.js | 102 +- .../3_0_1/schemas/consentexceptdata.schema.js | 88 +- .../3_0_1/schemas/consentpolicy.schema.js | 78 +- .../3_0_1/schemas/contactdetail.schema.js | 52 +- .../3_0_1/schemas/contactpoint.schema.js | 118 +- .../3_0_1/schemas/contract.schema.js | 417 +- .../3_0_1/schemas/contractagent.schema.js | 106 +- .../3_0_1/schemas/contractfriendly.schema.js | 84 +- .../3_0_1/schemas/contractlegal.schema.js | 78 +- .../3_0_1/schemas/contractrule.schema.js | 74 +- .../3_0_1/schemas/contractsigner.schema.js | 99 +- .../3_0_1/schemas/contractterm.schema.js | 192 +- .../3_0_1/schemas/contracttermagent.schema.js | 107 +- .../schemas/contracttermvalueditem.schema.js | 165 +- .../schemas/contractvalueditem.schema.js | 163 +- .../3_0_1/schemas/contributor.schema.js | 78 +- src/resources/3_0_1/schemas/count.schema.js | 80 +- .../3_0_1/schemas/coverage.schema.js | 376 +- .../3_0_1/schemas/coveragegrouping.schema.js | 252 +- .../3_0_1/schemas/dataelement.schema.js | 367 +- .../schemas/dataelementmapping.schema.js | 121 +- .../3_0_1/schemas/datarequirement.schema.js | 116 +- .../datarequirementcodefilter.schema.js | 133 +- .../datarequirementdatefilter.schema.js | 98 +- .../3_0_1/schemas/detectedissue.schema.js | 283 +- .../schemas/detectedissuemitigation.schema.js | 88 +- src/resources/3_0_1/schemas/device.schema.js | 351 +- .../3_0_1/schemas/devicecomponent.schema.js | 239 +- ...componentproductionspecification.schema.js | 74 +- .../3_0_1/schemas/devicemetric.schema.js | 245 +- .../schemas/devicemetriccalibration.schema.js | 92 +- .../3_0_1/schemas/devicerequest.schema.js | 515 ++- .../schemas/devicerequestrequester.schema.js | 89 +- .../3_0_1/schemas/deviceudi.schema.js | 176 +- .../schemas/deviceusestatement.schema.js | 281 +- .../3_0_1/schemas/diagnosticreport.schema.js | 423 +- .../schemas/diagnosticreportimage.schema.js | 81 +- .../diagnosticreportperformer.schema.js | 81 +- .../3_0_1/schemas/distance.schema.js | 80 +- .../3_0_1/schemas/documentmanifest.schema.js | 335 +- .../schemas/documentmanifestcontent.schema.js | 73 +- .../schemas/documentmanifestrelated.schema.js | 67 +- .../3_0_1/schemas/documentreference.schema.js | 382 +- .../documentreferencecontent.schema.js | 63 +- .../documentreferencecontext.schema.js | 131 +- .../documentreferencecontextrelated.schema.js | 67 +- .../documentreferencerelatesto.schema.js | 85 +- .../3_0_1/schemas/domainresource.schema.js | 112 +- src/resources/3_0_1/schemas/dosage.schema.js | 230 +- .../3_0_1/schemas/duration.schema.js | 80 +- src/resources/3_0_1/schemas/element.schema.js | 41 +- .../3_0_1/schemas/elementdefinition.schema.js | 2475 ++++++------ .../schemas/elementdefinitionbase.schema.js | 98 +- .../elementdefinitionbinding.schema.js | 120 +- .../elementdefinitionconstraint.schema.js | 184 +- .../elementdefinitionexample.schema.js | 617 +-- .../elementdefinitionmapping.schema.js | 116 +- .../elementdefinitionslicing.schema.js | 109 +- ...ntdefinitionslicingdiscriminator.schema.js | 80 +- .../schemas/elementdefinitiontype.schema.js | 146 +- .../schemas/eligibilityrequest.schema.js | 332 +- .../schemas/eligibilityresponse.schema.js | 281 +- .../eligibilityresponseerror.schema.js | 52 +- .../eligibilityresponseinsurance.schema.js | 85 +- ...yresponseinsurancebenefitbalance.schema.js | 165 +- ...insurancebenefitbalancefinancial.schema.js | 116 +- .../3_0_1/schemas/encounter.schema.js | 374 +- .../schemas/encounterclasshistory.schema.js | 59 +- .../schemas/encounterdiagnosis.schema.js | 99 +- .../encounterhospitalization.schema.js | 144 +- .../3_0_1/schemas/encounterlocation.schema.js | 95 +- .../schemas/encounterparticipant.schema.js | 81 +- .../schemas/encounterstatushistory.schema.js | 73 +- .../3_0_1/schemas/endpoint.schema.js | 265 +- .../3_0_1/schemas/enrollmentrequest.schema.js | 215 +- .../schemas/enrollmentresponse.schema.js | 230 +- .../3_0_1/schemas/episodeofcare.schema.js | 282 +- .../schemas/episodeofcarediagnosis.schema.js | 93 +- .../episodeofcarestatushistory.schema.js | 75 +- .../3_0_1/schemas/expansionprofile.schema.js | 495 +-- .../expansionprofiledesignation.schema.js | 52 +- ...pansionprofiledesignationexclude.schema.js | 47 +- ...iledesignationexcludedesignation.schema.js | 66 +- ...pansionprofiledesignationinclude.schema.js | 47 +- ...iledesignationincludedesignation.schema.js | 65 +- .../expansionprofileexcludedsystem.schema.js | 79 +- .../expansionprofilefixedversion.schema.js | 102 +- .../schemas/explanationofbenefit.schema.js | 595 +-- .../explanationofbenefitaccident.schema.js | 93 +- .../explanationofbenefitadditem.schema.js | 143 +- ...xplanationofbenefitadditemdetail.schema.js | 110 +- ...planationofbenefitbenefitbalance.schema.js | 165 +- ...ofbenefitbenefitbalancefinancial.schema.js | 116 +- .../explanationofbenefitcareteam.schema.js | 130 +- .../explanationofbenefitdiagnosis.schema.js | 115 +- .../explanationofbenefitinformation.schema.js | 186 +- .../explanationofbenefitinsurance.schema.js | 77 +- .../explanationofbenefititem.schema.js | 409 +- ...anationofbenefititemadjudication.schema.js | 91 +- .../explanationofbenefititemdetail.schema.js | 225 +- ...tionofbenefititemdetailsubdetail.schema.js | 211 +- .../explanationofbenefitpayee.schema.js | 91 +- .../explanationofbenefitpayment.schema.js | 101 +- .../explanationofbenefitprocedure.schema.js | 114 +- .../explanationofbenefitprocessnote.schema.js | 95 +- .../explanationofbenefitrelated.schema.js | 77 +- .../3_0_1/schemas/extension.schema.js | 612 +-- .../schemas/familymemberhistory.schema.js | 531 ++- .../familymemberhistorycondition.schema.js | 122 +- src/resources/3_0_1/schemas/flag.schema.js | 251 +- src/resources/3_0_1/schemas/goal.schema.js | 375 +- .../3_0_1/schemas/goaltarget.schema.js | 109 +- .../3_0_1/schemas/graphdefinition.schema.js | 357 +- .../schemas/graphdefinitionlink.schema.js | 135 +- .../graphdefinitionlinktarget.schema.js | 90 +- ...hdefinitionlinktargetcompartment.schema.js | 110 +- src/resources/3_0_1/schemas/group.schema.js | 234 +- .../schemas/groupcharacteristic.schema.js | 125 +- .../3_0_1/schemas/groupmember.schema.js | 107 +- .../3_0_1/schemas/guidanceresponse.schema.js | 348 +- .../3_0_1/schemas/healthcareservice.schema.js | 457 ++- .../healthcareserviceavailabletime.schema.js | 126 +- .../healthcareservicenotavailable.schema.js | 71 +- .../3_0_1/schemas/humanname.schema.js | 148 +- .../3_0_1/schemas/identifier.schema.js | 129 +- .../3_0_1/schemas/imagingmanifest.schema.js | 215 +- .../schemas/imagingmanifeststudy.schema.js | 113 +- .../imagingmanifeststudyseries.schema.js | 100 +- ...agingmanifeststudyseriesinstance.schema.js | 75 +- .../3_0_1/schemas/imagingstudy.schema.js | 423 +- .../schemas/imagingstudyseries.schema.js | 236 +- .../imagingstudyseriesinstance.schema.js | 109 +- .../3_0_1/schemas/immunization.schema.js | 380 +- .../schemas/immunizationexplanation.schema.js | 55 +- .../immunizationpractitioner.schema.js | 73 +- .../schemas/immunizationreaction.schema.js | 91 +- .../immunizationrecommendation.schema.js | 137 +- ...tionrecommendationrecommendation.schema.js | 187 +- ...ationrecommendationdatecriterion.schema.js | 73 +- ...mmendationrecommendationprotocol.schema.js | 120 +- .../immunizationvaccinationprotocol.schema.js | 167 +- .../schemas/implementationguide.schema.js | 396 +- .../implementationguidedependency.schema.js | 83 +- .../implementationguideglobal.schema.js | 84 +- .../implementationguidepackage.schema.js | 86 +- ...plementationguidepackageresource.schema.js | 174 +- .../schemas/implementationguidepage.schema.js | 158 +- src/resources/3_0_1/schemas/library.schema.js | 505 +-- src/resources/3_0_1/schemas/linkage.schema.js | 150 +- .../3_0_1/schemas/linkageitem.schema.js | 74 +- src/resources/3_0_1/schemas/list.schema.js | 298 +- .../3_0_1/schemas/listentry.schema.js | 106 +- .../3_0_1/schemas/location.schema.js | 325 +- .../3_0_1/schemas/locationposition.schema.js | 102 +- src/resources/3_0_1/schemas/measure.schema.js | 715 ++-- .../3_0_1/schemas/measuregroup.schema.js | 97 +- .../schemas/measuregrouppopulation.schema.js | 116 +- .../schemas/measuregroupstratifier.schema.js | 86 +- .../3_0_1/schemas/measurereport.schema.js | 253 +- .../schemas/measurereportgroup.schema.js | 93 +- .../measurereportgrouppopulation.schema.js | 92 +- .../measurereportgroupstratifier.schema.js | 60 +- ...surereportgroupstratifierstratum.schema.js | 92 +- ...groupstratifierstratumpopulation.schema.js | 93 +- .../schemas/measuresupplementaldata.schema.js | 96 +- src/resources/3_0_1/schemas/media.schema.js | 407 +- .../3_0_1/schemas/medication.schema.js | 219 +- .../medicationadministration.schema.js | 500 ++- .../medicationadministrationdosage.schema.js | 122 +- ...edicationadministrationperformer.schema.js | 92 +- .../schemas/medicationdispense.schema.js | 520 ++- .../medicationdispenseperformer.schema.js | 98 +- .../medicationdispensesubstitution.schema.js | 107 +- .../schemas/medicationingredient.schema.js | 107 +- .../3_0_1/schemas/medicationpackage.schema.js | 64 +- .../schemas/medicationpackagebatch.schema.js | 74 +- .../medicationpackagecontent.schema.js | 76 +- .../3_0_1/schemas/medicationrequest.schema.js | 548 ++- ...medicationrequestdispenserequest.schema.js | 107 +- .../medicationrequestrequester.schema.js | 98 +- .../medicationrequestsubstitution.schema.js | 70 +- .../schemas/medicationstatement.schema.js | 494 ++- .../3_0_1/schemas/messagedefinition.schema.js | 496 ++- ...messagedefinitionallowedresponse.schema.js | 84 +- .../schemas/messagedefinitionfocus.schema.js | 124 +- .../3_0_1/schemas/messageheader.schema.js | 283 +- .../messageheaderdestination.schema.js | 91 +- .../schemas/messageheaderresponse.schema.js | 103 +- .../schemas/messageheadersource.schema.js | 126 +- src/resources/3_0_1/schemas/meta.schema.js | 116 +- .../3_0_1/schemas/metadataresource.schema.js | 184 + src/resources/3_0_1/schemas/money.schema.js | 80 +- .../3_0_1/schemas/namingsystem.schema.js | 334 +- .../schemas/namingsystemuniqueid.schema.js | 131 +- .../3_0_1/schemas/narrative.schema.js | 77 +- .../3_0_1/schemas/nutritionorder.schema.js | 269 +- .../nutritionorderenteralformula.schema.js | 166 +- ...rderenteralformulaadministration.schema.js | 76 +- .../schemas/nutritionorderoraldiet.schema.js | 117 +- .../nutritionorderoraldietnutrient.schema.js | 57 +- .../nutritionorderoraldiettexture.schema.js | 60 +- .../nutritionordersupplement.schema.js | 106 +- .../3_0_1/schemas/observation.schema.js | 618 +-- .../schemas/observationcomponent.schema.js | 211 +- .../observationreferencerange.schema.js | 110 +- .../schemas/observationrelated.schema.js | 98 +- .../schemas/operationdefinition.schema.js | 499 +-- .../operationdefinitionoverload.schema.js | 68 +- .../operationdefinitionparameter.schema.js | 197 +- ...rationdefinitionparameterbinding.schema.js | 111 +- .../3_0_1/schemas/operationoutcome.schema.js | 106 +- .../schemas/operationoutcomeissue.schema.js | 156 +- .../3_0_1/schemas/organization.schema.js | 228 +- .../schemas/organizationcontact.schema.js | 72 +- .../schemas/parameterdefinition.schema.js | 164 +- .../3_0_1/schemas/parameters.schema.js | 79 +- .../schemas/parametersparameter.schema.js | 521 +-- src/resources/3_0_1/schemas/patient.schema.js | 355 +- .../3_0_1/schemas/patientanimal.schema.js | 76 +- .../schemas/patientcommunication.schema.js | 70 +- .../3_0_1/schemas/patientcontact.schema.js | 129 +- .../3_0_1/schemas/patientlink.schema.js | 91 +- .../3_0_1/schemas/paymentnotice.schema.js | 245 +- .../schemas/paymentreconciliation.schema.js | 281 +- .../paymentreconciliationdetail.schema.js | 141 +- ...paymentreconciliationprocessnote.schema.js | 61 +- src/resources/3_0_1/schemas/period.schema.js | 64 +- src/resources/3_0_1/schemas/person.schema.js | 213 +- .../3_0_1/schemas/personlink.schema.js | 99 +- .../3_0_1/schemas/plandefinition.schema.js | 517 +-- .../schemas/plandefinitionaction.schema.js | 458 ++- .../plandefinitionactioncondition.schema.js | 117 +- ...plandefinitionactiondynamicvalue.schema.js | 112 +- .../plandefinitionactionparticipant.schema.js | 73 +- ...landefinitionactionrelatedaction.schema.js | 99 +- .../schemas/plandefinitiongoal.schema.js | 116 +- .../plandefinitiongoaltarget.schema.js | 87 +- .../3_0_1/schemas/practitioner.schema.js | 213 +- .../practitionerqualification.schema.js | 84 +- .../3_0_1/schemas/practitionerrole.schema.js | 302 +- .../practitionerroleavailabletime.schema.js | 126 +- .../practitionerrolenotavailable.schema.js | 71 +- .../3_0_1/schemas/procedure.schema.js | 576 ++- .../schemas/procedurefocaldevice.schema.js | 76 +- .../schemas/procedureperformer.schema.js | 104 +- .../3_0_1/schemas/procedurerequest.schema.js | 620 ++- .../procedurerequestrequester.schema.js | 90 +- .../3_0_1/schemas/processrequest.schema.js | 323 +- .../schemas/processrequestitem.schema.js | 58 +- .../3_0_1/schemas/processresponse.schema.js | 287 +- .../processresponseprocessnote.schema.js | 62 +- .../3_0_1/schemas/provenance.schema.js | 232 +- .../3_0_1/schemas/provenanceagent.schema.js | 180 +- .../3_0_1/schemas/provenanceentity.schema.js | 115 +- .../3_0_1/schemas/quantity.schema.js | 133 +- .../3_0_1/schemas/questionnaire.schema.js | 457 ++- .../3_0_1/schemas/questionnaireitem.schema.js | 509 +-- .../questionnaireitemenablewhen.schema.js | 323 +- .../schemas/questionnaireitemoption.schema.js | 143 +- .../schemas/questionnaireresponse.schema.js | 326 +- .../questionnaireresponseitem.schema.js | 129 +- .../questionnaireresponseitemanswer.schema.js | 282 +- src/resources/3_0_1/schemas/range.schema.js | 42 +- src/resources/3_0_1/schemas/ratio.schema.js | 42 +- .../3_0_1/schemas/reference.schema.js | 76 +- .../3_0_1/schemas/referralrequest.schema.js | 556 ++- .../referralrequestrequester.schema.js | 97 +- .../3_0_1/schemas/relatedartifact.schema.js | 140 +- .../3_0_1/schemas/relatedperson.schema.js | 234 +- .../3_0_1/schemas/requestgroup.schema.js | 372 +- .../schemas/requestgroupaction.schema.js | 385 +- .../requestgroupactioncondition.schema.js | 117 +- .../requestgroupactionrelatedaction.schema.js | 99 +- .../3_0_1/schemas/researchstudy.schema.js | 373 +- .../3_0_1/schemas/researchstudyarm.schema.js | 87 +- .../3_0_1/schemas/researchsubject.schema.js | 229 +- .../3_0_1/schemas/resource.schema.js | 108 +- .../3_0_1/schemas/resourcelist.schema.js | 825 ++-- .../3_0_1/schemas/riskassessment.schema.js | 375 +- .../riskassessmentprediction.schema.js | 144 +- .../3_0_1/schemas/sampleddata.schema.js | 161 +- .../3_0_1/schemas/schedule.schema.js | 237 +- .../3_0_1/schemas/searchparameter.schema.js | 540 +-- .../searchparametercomponent.schema.js | 83 +- .../3_0_1/schemas/sequence.schema.js | 316 +- .../3_0_1/schemas/sequencequality.schema.js | 280 +- .../schemas/sequencereferenceseq.schema.js | 175 +- .../schemas/sequencerepository.schema.js | 163 +- .../3_0_1/schemas/sequencevariant.schema.js | 158 +- .../3_0_1/schemas/servicedefinition.schema.js | 501 +-- .../3_0_1/schemas/signature.schema.js | 222 +- .../3_0_1/schemas/simplequantity.schema.js | 6 +- src/resources/3_0_1/schemas/slot.schema.js | 268 +- .../3_0_1/schemas/specimen.schema.js | 277 +- .../schemas/specimencollection.schema.js | 121 +- .../3_0_1/schemas/specimencontainer.schema.js | 129 +- .../schemas/specimenprocessing.schema.js | 120 +- .../schemas/structuredefinition.schema.js | 586 +-- .../structuredefinitiondifferential.schema.js | 54 +- .../structuredefinitionmapping.schema.js | 120 +- .../structuredefinitionsnapshot.schema.js | 54 +- .../3_0_1/schemas/structuremap.schema.js | 401 +- .../3_0_1/schemas/structuremapgroup.schema.js | 146 +- .../schemas/structuremapgroupinput.schema.js | 111 +- .../schemas/structuremapgrouprule.schema.js | 105 +- .../structuremapgroupruledependent.schema.js | 73 +- .../structuremapgrouprulesource.schema.js | 767 ++-- .../structuremapgroupruletarget.schema.js | 173 +- ...cturemapgroupruletargetparameter.schema.js | 120 +- .../schemas/structuremapstructure.schema.js | 115 +- .../3_0_1/schemas/subscription.schema.js | 222 +- .../schemas/subscriptionchannel.schema.js | 120 +- .../3_0_1/schemas/substance.schema.js | 180 +- .../schemas/substanceingredient.schema.js | 84 +- .../3_0_1/schemas/substanceinstance.schema.js | 76 +- .../3_0_1/schemas/supplydelivery.schema.js | 298 +- .../supplydeliverysupplieditem.schema.js | 90 +- .../3_0_1/schemas/supplyrequest.schema.js | 313 +- .../supplyrequestordereditem.schema.js | 89 +- .../schemas/supplyrequestrequester.schema.js | 97 +- src/resources/3_0_1/schemas/task.schema.js | 517 ++- .../3_0_1/schemas/taskinput.schema.js | 504 +-- .../3_0_1/schemas/taskoutput.schema.js | 501 +-- .../3_0_1/schemas/taskrequester.schema.js | 94 +- .../3_0_1/schemas/taskrestriction.schema.js | 111 +- .../3_0_1/schemas/testreport.schema.js | 282 +- .../schemas/testreportparticipant.schema.js | 97 +- .../3_0_1/schemas/testreportsetup.schema.js | 54 +- .../schemas/testreportsetupaction.schema.js | 53 +- .../testreportsetupactionassert.schema.js | 93 +- .../testreportsetupactionoperation.schema.js | 94 +- .../schemas/testreportteardown.schema.js | 53 +- .../testreportteardownaction.schema.js | 33 +- .../3_0_1/schemas/testreporttest.schema.js | 90 +- .../schemas/testreporttestaction.schema.js | 33 +- .../3_0_1/schemas/testscript.schema.js | 478 ++- .../schemas/testscriptdestination.schema.js | 73 +- .../3_0_1/schemas/testscriptfixture.schema.js | 98 +- .../schemas/testscriptmetadata.schema.js | 65 +- .../testscriptmetadatacapability.schema.js | 175 +- .../schemas/testscriptmetadatalink.schema.js | 78 +- .../3_0_1/schemas/testscriptorigin.schema.js | 72 +- .../3_0_1/schemas/testscriptrule.schema.js | 74 +- .../schemas/testscriptruleparam.schema.js | 81 +- .../3_0_1/schemas/testscriptruleset.schema.js | 77 +- .../schemas/testscriptrulesetrule.schema.js | 72 +- .../testscriptrulesetruleparam.schema.js | 81 +- .../3_0_1/schemas/testscriptsetup.schema.js | 54 +- .../schemas/testscriptsetupaction.schema.js | 53 +- .../testscriptsetupactionassert.schema.js | 493 +-- .../testscriptsetupactionassertrule.schema.js | 72 +- ...scriptsetupactionassertruleparam.schema.js | 81 +- ...stscriptsetupactionassertruleset.schema.js | 73 +- ...riptsetupactionassertrulesetrule.schema.js | 76 +- ...etupactionassertrulesetruleparam.schema.js | 81 +- .../testscriptsetupactionoperation.schema.js | 337 +- ...etupactionoperationrequestheader.schema.js | 72 +- .../schemas/testscriptteardown.schema.js | 53 +- .../testscriptteardownaction.schema.js | 33 +- .../3_0_1/schemas/testscripttest.schema.js | 90 +- .../schemas/testscripttestaction.schema.js | 33 +- .../schemas/testscriptvariable.schema.js | 199 +- src/resources/3_0_1/schemas/timing.schema.js | 65 +- .../3_0_1/schemas/timingrepeat.schema.js | 337 +- .../3_0_1/schemas/triggerdefinition.schema.js | 140 +- .../3_0_1/schemas/usagecontext.schema.js | 79 +- .../3_0_1/schemas/valueset.schema.js | 421 +- .../3_0_1/schemas/valuesetcompose.schema.js | 95 +- .../schemas/valuesetcomposeinclude.schema.js | 122 +- .../valuesetcomposeincludeconcept.schema.js | 93 +- ...composeincludeconceptdesignation.schema.js | 87 +- .../valuesetcomposeincludefilter.schema.js | 105 +- .../3_0_1/schemas/valuesetexpansion.schema.js | 141 +- .../valuesetexpansioncontains.schema.js | 160 +- .../valuesetexpansionparameter.schema.js | 155 +- .../schemas/visionprescription.schema.js | 227 +- .../visionprescriptiondispense.schema.js | 282 +- src/resources/4_0_0/inputs/account.input.js | 152 + .../4_0_0/inputs/accountcoverage.input.js | 53 + .../4_0_0/inputs/accountguarantor.input.js | 57 + .../4_0_0/inputs/activitydefinition.input.js | 472 +++ .../activitydefinitiondynamicvalue.input.js | 52 + .../activitydefinitionparticipant.input.js | 51 + src/resources/4_0_0/inputs/address.input.js | 123 + .../4_0_0/inputs/adverseevent.input.js | 198 + .../inputs/adverseeventsuspectentity.input.js | 48 + ...dverseeventsuspectentitycausality.input.js | 56 + src/resources/4_0_0/inputs/age.input.js | 83 + .../4_0_0/inputs/allergyintolerance.input.js | 216 ++ .../allergyintolerancereaction.input.js | 91 + .../4_0_0/inputs/annotation.input.js | 62 + .../4_0_0/inputs/appointment.input.js | 238 ++ .../inputs/appointmentparticipant.input.js | 69 + .../4_0_0/inputs/appointmentresponse.input.js | 141 + .../4_0_0/inputs/attachment.input.js | 111 + .../4_0_0/inputs/auditevent.input.js | 153 + .../4_0_0/inputs/auditeventagent.input.js | 111 + .../inputs/auditeventagentnetwork.input.js | 57 + .../4_0_0/inputs/auditevententity.input.js | 89 + .../inputs/auditevententitydetail.input.js | 62 + .../4_0_0/inputs/auditeventsource.input.js | 55 + .../4_0_0/inputs/backboneelement.input.js | 37 + src/resources/4_0_0/inputs/basic.input.js | 113 + src/resources/4_0_0/inputs/binary.input.js | 87 + .../biologicallyderivedproduct.input.js | 152 + ...logicallyderivedproductcollection.input.js | 58 + ...gicallyderivedproductmanipulation.input.js | 57 + ...logicallyderivedproductprocessing.input.js | 65 + ...biologicallyderivedproductstorage.input.js | 66 + .../4_0_0/inputs/bodystructure.input.js | 130 + src/resources/4_0_0/inputs/bundle.input.js | 112 + .../4_0_0/inputs/bundleentry.input.js | 67 + .../4_0_0/inputs/bundleentryrequest.input.js | 100 + .../4_0_0/inputs/bundleentryresponse.input.js | 84 + .../4_0_0/inputs/bundleentrysearch.input.js | 58 + .../4_0_0/inputs/bundlelink.input.js | 56 + .../4_0_0/inputs/capabilitystatement.input.js | 306 ++ .../capabilitystatementdocument.input.js | 69 + ...capabilitystatementimplementation.input.js | 63 + .../capabilitystatementmessaging.input.js | 71 + ...abilitystatementmessagingendpoint.input.js | 53 + ...tatementmessagingsupportedmessage.input.js | 59 + .../inputs/capabilitystatementrest.input.js | 88 + ...apabilitystatementrestinteraction.input.js | 58 + .../capabilitystatementrestresource.input.js | 194 + ...ystatementrestresourceinteraction.input.js | 58 + ...itystatementrestresourceoperation.input.js | 68 + ...ystatementrestresourcesearchparam.input.js | 77 + .../capabilitystatementrestsecurity.input.js | 60 + .../capabilitystatementsoftware.input.js | 64 + src/resources/4_0_0/inputs/careplan.input.js | 231 ++ .../4_0_0/inputs/careplanactivity.input.js | 60 + .../inputs/careplanactivitydetail.input.js | 175 + src/resources/4_0_0/inputs/careteam.input.js | 153 + .../4_0_0/inputs/careteamparticipant.input.js | 55 + .../4_0_0/inputs/catalogentry.input.js | 164 + .../inputs/catalogentryrelatedentry.input.js | 52 + .../4_0_0/inputs/chargeitem.input.js | 255 ++ .../inputs/chargeitemdefinition.input.js | 275 ++ ...chargeitemdefinitionapplicability.input.js | 66 + ...chargeitemdefinitionpropertygroup.input.js | 43 + ...nitionpropertygrouppricecomponent.input.js | 66 + .../4_0_0/inputs/chargeitemperformer.input.js | 47 + src/resources/4_0_0/inputs/claim.input.js | 226 ++ .../4_0_0/inputs/claimaccident.input.js | 61 + .../4_0_0/inputs/claimcareteam.input.js | 71 + .../4_0_0/inputs/claimdiagnosis.input.js | 70 + .../4_0_0/inputs/claiminsurance.input.js | 94 + src/resources/4_0_0/inputs/claimitem.input.js | 180 + .../4_0_0/inputs/claimitemdetail.input.js | 104 + .../inputs/claimitemdetailsubdetail.input.js | 99 + .../4_0_0/inputs/claimpayee.input.js | 47 + .../4_0_0/inputs/claimprocedure.input.js | 73 + .../4_0_0/inputs/claimrelated.input.js | 49 + .../4_0_0/inputs/claimresponse.input.js | 236 ++ .../inputs/claimresponseadditem.input.js | 164 + .../claimresponseadditemdetail.input.js | 90 + ...aimresponseadditemdetailsubdetail.input.js | 83 + .../4_0_0/inputs/claimresponseerror.input.js | 73 + .../inputs/claimresponseinsurance.input.js | 79 + .../4_0_0/inputs/claimresponseitem.input.js | 68 + .../claimresponseitemadjudication.input.js | 62 + .../inputs/claimresponseitemdetail.input.js | 62 + .../claimresponseitemdetailsubdetail.input.js | 56 + .../inputs/claimresponsepayment.input.js | 70 + .../inputs/claimresponseprocessnote.input.js | 70 + .../4_0_0/inputs/claimresponsetotal.input.js | 46 + .../4_0_0/inputs/claimsupportinginfo.input.js | 112 + .../4_0_0/inputs/clinicalimpression.input.js | 212 + .../inputs/clinicalimpressionfinding.input.js | 54 + .../clinicalimpressioninvestigation.input.js | 46 + .../4_0_0/inputs/codeableconcept.input.js | 46 + .../4_0_0/inputs/codesystem.input.js | 313 ++ .../4_0_0/inputs/codesystemconcept.input.js | 77 + .../codesystemconceptdesignation.input.js | 58 + .../inputs/codesystemconceptproperty.input.js | 102 + .../4_0_0/inputs/codesystemfilter.input.js | 72 + .../4_0_0/inputs/codesystemproperty.input.js | 79 + src/resources/4_0_0/inputs/coding.input.js | 85 + .../4_0_0/inputs/communication.input.js | 225 ++ .../inputs/communicationpayload.input.js | 57 + .../inputs/communicationrequest.input.js | 221 ++ .../communicationrequestpayload.input.js | 57 + .../inputs/compartmentdefinition.input.js | 209 + .../compartmentdefinitionresource.input.js | 66 + .../4_0_0/inputs/composition.input.js | 177 + .../4_0_0/inputs/compositionattester.input.js | 59 + .../4_0_0/inputs/compositionevent.input.js | 51 + .../inputs/compositionrelatesto.input.js | 56 + .../4_0_0/inputs/compositionsection.input.js | 92 + .../4_0_0/inputs/conceptmap.input.js | 262 ++ .../4_0_0/inputs/conceptmapgroup.input.js | 90 + .../inputs/conceptmapgroupelement.input.js | 60 + .../conceptmapgroupelementtarget.input.js | 85 + ...eptmapgroupelementtargetdependson.input.js | 79 + .../inputs/conceptmapgroupunmapped.input.js | 79 + src/resources/4_0_0/inputs/condition.input.js | 231 ++ .../4_0_0/inputs/conditionevidence.input.js | 46 + .../4_0_0/inputs/conditionstage.input.js | 51 + src/resources/4_0_0/inputs/consent.input.js | 162 + .../4_0_0/inputs/consentpolicy.input.js | 57 + .../4_0_0/inputs/consentprovision.input.js | 90 + .../inputs/consentprovisionactor.input.js | 47 + .../inputs/consentprovisiondata.input.js | 53 + .../4_0_0/inputs/consentverification.input.js | 60 + .../4_0_0/inputs/contactdetail.input.js | 45 + .../4_0_0/inputs/contactpoint.input.js | 76 + src/resources/4_0_0/inputs/contract.input.js | 301 ++ .../inputs/contractcontentdefinition.input.js | 81 + .../4_0_0/inputs/contractfriendly.input.js | 47 + .../4_0_0/inputs/contractlegal.input.js | 45 + .../4_0_0/inputs/contractrule.input.js | 47 + .../4_0_0/inputs/contractsigner.input.js | 52 + .../4_0_0/inputs/contractterm.input.js | 100 + .../4_0_0/inputs/contracttermaction.input.js | 190 + .../inputs/contracttermactionsubject.input.js | 46 + .../4_0_0/inputs/contracttermasset.input.js | 116 + .../inputs/contracttermassetcontext.input.js | 54 + .../contracttermassetvalueditem.input.js | 139 + .../4_0_0/inputs/contracttermoffer.input.js | 94 + .../inputs/contracttermofferanswer.input.js | 144 + .../inputs/contracttermofferparty.input.js | 45 + .../inputs/contracttermsecuritylabel.input.js | 63 + .../4_0_0/inputs/contributor.input.js | 57 + src/resources/4_0_0/inputs/count.input.js | 83 + src/resources/4_0_0/inputs/coverage.input.js | 191 + .../4_0_0/inputs/coverageclass.input.js | 60 + .../inputs/coveragecosttobeneficiary.input.js | 57 + ...overagecosttobeneficiaryexception.input.js | 45 + .../coverageeligibilityrequest.input.js | 182 + ...verageeligibilityrequestinsurance.input.js | 63 + .../coverageeligibilityrequestitem.input.js | 91 + ...geeligibilityrequestitemdiagnosis.input.js | 46 + ...eeligibilityrequestsupportinginfo.input.js | 64 + .../coverageeligibilityresponse.input.js | 199 + .../coverageeligibilityresponseerror.input.js | 42 + ...erageeligibilityresponseinsurance.input.js | 64 + ...eeligibilityresponseinsuranceitem.input.js | 130 + ...ilityresponseinsuranceitembenefit.input.js | 92 + .../4_0_0/inputs/datarequirement.input.js | 100 + .../inputs/datarequirementcodefilter.input.js | 67 + .../inputs/datarequirementdatefilter.input.js | 72 + .../4_0_0/inputs/datarequirementsort.input.js | 51 + .../4_0_0/inputs/detectedissue.input.js | 170 + .../inputs/detectedissueevidence.input.js | 46 + .../inputs/detectedissuemitigation.input.js | 56 + src/resources/4_0_0/inputs/device.input.js | 247 ++ .../4_0_0/inputs/devicedefinition.input.js | 214 + .../devicedefinitioncapability.input.js | 45 + .../devicedefinitiondevicename.input.js | 56 + .../inputs/devicedefinitionmaterial.input.js | 58 + .../inputs/devicedefinitionproperty.input.js | 50 + .../devicedefinitionspecialization.input.js | 55 + ...vicedefinitionudideviceidentifier.input.js | 64 + .../4_0_0/inputs/devicedevicename.input.js | 56 + .../4_0_0/inputs/devicemetric.input.js | 149 + .../inputs/devicemetriccalibration.input.js | 62 + .../4_0_0/inputs/deviceproperty.input.js | 50 + .../4_0_0/inputs/devicerequest.input.js | 243 ++ .../inputs/devicerequestparameter.input.js | 62 + .../inputs/devicespecialization.input.js | 51 + .../4_0_0/inputs/deviceudicarrier.input.js | 97 + .../4_0_0/inputs/deviceusestatement.input.js | 164 + .../4_0_0/inputs/deviceversion.input.js | 53 + .../4_0_0/inputs/diagnosticreport.input.js | 197 + .../inputs/diagnosticreportmedia.input.js | 51 + src/resources/4_0_0/inputs/distance.input.js | 83 + .../4_0_0/inputs/documentmanifest.input.js | 163 + .../inputs/documentmanifestrelated.input.js | 46 + .../4_0_0/inputs/documentreference.input.js | 178 + .../inputs/documentreferencecontent.input.js | 47 + .../inputs/documentreferencecontext.input.js | 70 + .../documentreferencerelatesto.input.js | 52 + .../4_0_0/inputs/domainresource.input.js | 84 + src/resources/4_0_0/inputs/dosage.input.js | 119 + .../4_0_0/inputs/dosagedoseandrate.input.js | 56 + src/resources/4_0_0/inputs/duration.input.js | 82 + .../inputs/effectevidencesynthesis.input.js | 310 ++ .../effectevidencesynthesiscertainty.input.js | 51 + ...siscertaintycertaintysubcomponent.input.js | 49 + ...ctevidencesynthesiseffectestimate.input.js | 73 + ...iseffectestimateprecisionestimate.input.js | 66 + ...videncesynthesisresultsbyexposure.input.js | 65 + ...effectevidencesynthesissamplesize.input.js | 63 + src/resources/4_0_0/inputs/element.input.js | 32 + .../4_0_0/inputs/elementdefinition.input.js | 1495 +++++++ .../inputs/elementdefinitionbase.input.js | 63 + .../inputs/elementdefinitionbinding.input.js | 64 + .../elementdefinitionconstraint.input.js | 105 + .../inputs/elementdefinitionexample.input.js | 399 ++ .../inputs/elementdefinitionmapping.input.js | 72 + .../inputs/elementdefinitionslicing.input.js | 69 + ...entdefinitionslicingdiscriminator.input.js | 53 + .../inputs/elementdefinitiontype.input.js | 85 + src/resources/4_0_0/inputs/encounter.input.js | 196 + .../inputs/encounterclasshistory.input.js | 45 + .../4_0_0/inputs/encounterdiagnosis.input.js | 56 + .../inputs/encounterhospitalization.input.js | 76 + .../4_0_0/inputs/encounterlocation.input.js | 62 + .../inputs/encounterparticipant.input.js | 49 + .../inputs/encounterstatushistory.input.js | 52 + src/resources/4_0_0/inputs/endpoint.input.js | 163 + .../4_0_0/inputs/enrollmentrequest.input.js | 123 + .../4_0_0/inputs/enrollmentresponse.input.js | 136 + .../4_0_0/inputs/episodeofcare.input.js | 147 + .../inputs/episodeofcarediagnosis.input.js | 56 + .../episodeofcarestatushistory.input.js | 53 + .../4_0_0/inputs/eventdefinition.input.js | 309 ++ src/resources/4_0_0/inputs/evidence.input.js | 291 ++ .../4_0_0/inputs/evidencevariable.input.js | 295 ++ .../evidencevariablecharacteristic.input.js | 135 + .../4_0_0/inputs/examplescenario.input.js | 217 ++ .../inputs/examplescenarioactor.input.js | 70 + .../inputs/examplescenarioinstance.input.js | 83 + ...scenarioinstancecontainedinstance.input.js | 55 + .../examplescenarioinstanceversion.input.js | 53 + .../inputs/examplescenarioprocess.input.js | 73 + .../examplescenarioprocessstep.input.js | 56 + ...plescenarioprocessstepalternative.input.js | 57 + ...amplescenarioprocessstepoperation.input.js | 106 + .../inputs/explanationofbenefit.input.js | 330 ++ .../explanationofbenefitaccident.input.js | 60 + .../explanationofbenefitadditem.input.js | 166 + ...explanationofbenefitadditemdetail.input.js | 90 + ...onofbenefitadditemdetailsubdetail.input.js | 83 + ...xplanationofbenefitbenefitbalance.input.js | 90 + ...nofbenefitbenefitbalancefinancial.input.js | 82 + .../explanationofbenefitcareteam.input.js | 71 + .../explanationofbenefitdiagnosis.input.js | 70 + .../explanationofbenefitinsurance.input.js | 63 + .../inputs/explanationofbenefititem.input.js | 198 + ...lanationofbenefititemadjudication.input.js | 62 + .../explanationofbenefititemdetail.input.js | 117 + ...ationofbenefititemdetailsubdetail.input.js | 111 + .../inputs/explanationofbenefitpayee.input.js | 46 + .../explanationofbenefitpayment.input.js | 69 + .../explanationofbenefitprocedure.input.js | 73 + .../explanationofbenefitprocessnote.input.js | 69 + .../explanationofbenefitrelated.input.js | 49 + ...xplanationofbenefitsupportinginfo.input.js | 112 + .../inputs/explanationofbenefittotal.input.js | 46 + .../4_0_0/inputs/expression.input.js | 82 + src/resources/4_0_0/inputs/extension.input.js | 400 ++ .../4_0_0/inputs/familymemberhistory.input.js | 271 ++ .../familymemberhistorycondition.input.js | 88 + src/resources/4_0_0/inputs/flag.input.js | 125 + src/resources/4_0_0/inputs/goal.input.js | 182 + .../4_0_0/inputs/goaltarget.input.js | 109 + .../4_0_0/inputs/graphdefinition.input.js | 214 + .../4_0_0/inputs/graphdefinitionlink.input.js | 85 + .../inputs/graphdefinitionlinktarget.input.js | 69 + ...phdefinitionlinktargetcompartment.input.js | 80 + src/resources/4_0_0/inputs/group.input.js | 160 + .../4_0_0/inputs/groupcharacteristic.input.js | 87 + .../4_0_0/inputs/groupmember.input.js | 57 + .../4_0_0/inputs/guidanceresponse.input.js | 188 + .../4_0_0/inputs/healthcareservice.input.js | 233 ++ .../healthcareserviceavailabletime.input.js | 79 + .../healthcareserviceeligibility.input.js | 48 + .../healthcareservicenotavailable.input.js | 52 + src/resources/4_0_0/inputs/humanname.input.js | 94 + .../4_0_0/inputs/identifier.input.js | 75 + .../4_0_0/inputs/imagingstudy.input.js | 203 + .../4_0_0/inputs/imagingstudyseries.input.js | 116 + .../imagingstudyseriesinstance.input.js | 69 + .../imagingstudyseriesperformer.input.js | 46 + .../4_0_0/inputs/immunization.input.js | 253 ++ .../inputs/immunizationeducation.input.js | 72 + .../inputs/immunizationevaluation.input.js | 191 + .../inputs/immunizationperformer.input.js | 46 + .../immunizationprotocolapplied.input.js | 90 + .../inputs/immunizationreaction.input.js | 58 + .../immunizationrecommendation.input.js | 117 + ...ationrecommendationrecommendation.input.js | 134 + ...dationrecommendationdatecriterion.input.js | 51 + .../4_0_0/inputs/implementationguide.input.js | 251 ++ .../implementationguidedefinition.input.js | 70 + ...ementationguidedefinitiongrouping.input.js | 55 + ...implementationguidedefinitionpage.input.js | 69 + ...mentationguidedefinitionparameter.input.js | 56 + ...ementationguidedefinitionresource.input.js | 105 + ...ementationguidedefinitiontemplate.input.js | 62 + .../implementationguidedependson.input.js | 69 + .../inputs/implementationguideglobal.input.js | 57 + .../implementationguidemanifest.input.js | 83 + .../implementationguidemanifestpage.input.js | 61 + ...plementationguidemanifestresource.input.js | 74 + .../4_0_0/inputs/insuranceplan.input.js | 165 + .../inputs/insuranceplancontact.input.js | 53 + .../inputs/insuranceplancoverage.input.js | 53 + .../insuranceplancoveragebenefit.input.js | 58 + ...insuranceplancoveragebenefitlimit.input.js | 45 + .../4_0_0/inputs/insuranceplanplan.input.js | 67 + .../insuranceplanplangeneralcost.input.js | 63 + .../insuranceplanplanspecificcost.input.js | 49 + ...uranceplanplanspecificcostbenefit.input.js | 48 + ...ceplanplanspecificcostbenefitcost.input.js | 57 + src/resources/4_0_0/inputs/invoice.input.js | 173 + .../4_0_0/inputs/invoicelineitem.input.js | 63 + .../invoicelineitempricecomponent.input.js | 66 + .../4_0_0/inputs/invoiceparticipant.input.js | 47 + src/resources/4_0_0/inputs/library.input.js | 320 ++ src/resources/4_0_0/inputs/linkage.input.js | 107 + .../4_0_0/inputs/linkageitem.input.js | 52 + src/resources/4_0_0/inputs/list.input.js | 159 + src/resources/4_0_0/inputs/listentry.input.js | 65 + src/resources/4_0_0/inputs/location.input.js | 197 + .../inputs/locationhoursofoperation.input.js | 73 + .../4_0_0/inputs/locationposition.input.js | 68 + .../4_0_0/inputs/marketingstatus.input.js | 69 + src/resources/4_0_0/inputs/measure.input.js | 410 ++ .../4_0_0/inputs/measuregroup.input.js | 58 + .../inputs/measuregrouppopulation.input.js | 56 + .../inputs/measuregroupstratifier.input.js | 63 + .../measuregroupstratifiercomponent.input.js | 57 + .../4_0_0/inputs/measurereport.input.js | 158 + .../4_0_0/inputs/measurereportgroup.input.js | 56 + .../measurereportgrouppopulation.input.js | 54 + .../measurereportgroupstratifier.input.js | 48 + ...asurereportgroupstratifierstratum.input.js | 59 + ...rtgroupstratifierstratumcomponent.input.js | 45 + ...tgroupstratifierstratumpopulation.input.js | 54 + .../inputs/measuresupplementaldata.input.js | 60 + src/resources/4_0_0/inputs/media.input.js | 229 ++ .../4_0_0/inputs/medication.input.js | 124 + .../inputs/medicationadministration.input.js | 207 + .../medicationadministrationdosage.input.js | 76 + ...medicationadministrationperformer.input.js | 47 + .../4_0_0/inputs/medicationbatch.input.js | 55 + .../4_0_0/inputs/medicationdispense.input.js | 222 ++ .../medicationdispenseperformer.input.js | 47 + .../medicationdispensesubstitution.input.js | 63 + .../inputs/medicationingredient.input.js | 63 + .../4_0_0/inputs/medicationknowledge.input.js | 212 + ...knowledgeadministrationguidelines.input.js | 59 + ...dgeadministrationguidelinesdosage.input.js | 46 + ...nguidelinespatientcharacteristics.input.js | 58 + .../inputs/medicationknowledgecost.input.js | 56 + ...cationknowledgedrugcharacteristic.input.js | 66 + .../medicationknowledgeingredient.input.js | 63 + .../medicationknowledgekinetics.input.js | 50 + ...onknowledgemedicineclassification.input.js | 47 + ...icationknowledgemonitoringprogram.input.js | 48 + .../medicationknowledgemonograph.input.js | 45 + .../medicationknowledgepackaging.input.js | 46 + .../medicationknowledgeregulatory.input.js | 59 + ...ionknowledgeregulatorymaxdispense.input.js | 46 + ...cationknowledgeregulatoryschedule.input.js | 41 + ...onknowledgeregulatorysubstitution.input.js | 52 + ...owledgerelatedmedicationknowledge.input.js | 47 + .../4_0_0/inputs/medicationrequest.input.js | 296 ++ .../medicationrequestdispenserequest.input.js | 76 + ...requestdispenserequestinitialfill.input.js | 46 + .../medicationrequestsubstitution.input.js | 58 + .../4_0_0/inputs/medicationstatement.input.js | 194 + .../4_0_0/inputs/medicinalproduct.input.js | 188 + .../medicinalproductauthorization.input.js | 182 + ...zationjurisdictionalauthorization.input.js | 56 + ...inalproductauthorizationprocedure.input.js | 58 + .../medicinalproductcontraindication.input.js | 122 + ...oductcontraindicationothertherapy.input.js | 52 + .../medicinalproductindication.input.js | 128 + ...inalproductindicationothertherapy.input.js | 52 + .../medicinalproductingredient.input.js | 118 + ...oductingredientspecifiedsubstance.input.js | 57 + ...redientspecifiedsubstancestrength.input.js | 77 + ...ubstancestrengthreferencestrength.input.js | 65 + ...dicinalproductingredientsubstance.input.js | 41 + .../medicinalproductinteraction.input.js | 126 + ...inalproductinteractioninteractant.input.js | 47 + .../medicinalproductmanufactured.input.js | 119 + ...uctmanufacturingbusinessoperation.input.js | 66 + .../inputs/medicinalproductname.input.js | 55 + ...dicinalproductnamecountrylanguage.input.js | 49 + .../medicinalproductnamenamepart.input.js | 50 + .../inputs/medicinalproductpackaged.input.js | 133 + ...nalproductpackagedbatchidentifier.input.js | 47 + ...dicinalproductpackagedpackageitem.input.js | 83 + .../medicinalproductpharmaceutical.input.js | 124 + ...ductpharmaceuticalcharacteristics.input.js | 45 + ...armaceuticalrouteofadministration.input.js | 72 + ...outeofadministrationtargetspecies.input.js | 49 + ...tiontargetspecieswithdrawalperiod.input.js | 55 + ...edicinalproductspecialdesignation.input.js | 75 + ...medicinalproductundesirableeffect.input.js | 107 + .../4_0_0/inputs/messagedefinition.input.js | 297 ++ .../messagedefinitionallowedresponse.input.js | 58 + .../inputs/messagedefinitionfocus.input.js | 80 + .../4_0_0/inputs/messageheader.input.js | 152 + .../inputs/messageheaderdestination.input.js | 64 + .../inputs/messageheaderresponse.input.js | 63 + .../4_0_0/inputs/messageheadersource.input.js | 79 + src/resources/4_0_0/inputs/meta.input.js | 86 + .../4_0_0/inputs/metadataresource.input.js | 181 + .../4_0_0/inputs/molecularsequence.input.js | 181 + .../inputs/molecularsequencequality.input.js | 162 + .../molecularsequencequalityroc.input.js | 108 + .../molecularsequencereferenceseq.input.js | 111 + .../molecularsequencerepository.input.js | 97 + ...molecularsequencestructurevariant.input.js | 69 + ...ularsequencestructurevariantinner.input.js | 57 + ...ularsequencestructurevariantouter.input.js | 57 + .../inputs/molecularsequencevariant.input.js | 92 + src/resources/4_0_0/inputs/money.input.js | 50 + .../4_0_0/inputs/moneyquantity.input.js | 12 + .../4_0_0/inputs/namingsystem.input.js | 192 + .../inputs/namingsystemuniqueid.input.js | 82 + src/resources/4_0_0/inputs/narrative.input.js | 55 + .../4_0_0/inputs/nutritionorder.input.js | 196 + .../nutritionorderenteralformula.input.js | 98 + ...orderenteralformulaadministration.input.js | 56 + .../inputs/nutritionorderoraldiet.input.js | 75 + .../nutritionorderoraldietnutrient.input.js | 45 + .../nutritionorderoraldiettexture.input.js | 46 + .../inputs/nutritionordersupplement.input.js | 70 + .../4_0_0/inputs/observation.input.js | 312 ++ .../inputs/observationcomponent.input.js | 136 + .../inputs/observationdefinition.input.js | 165 + ...vationdefinitionqualifiedinterval.input.js | 90 + ...tiondefinitionquantitativedetails.input.js | 68 + .../inputs/observationreferencerange.input.js | 71 + .../4_0_0/inputs/operationdefinition.input.js | 315 ++ .../operationdefinitionoverload.input.js | 52 + .../operationdefinitionparameter.input.js | 124 + ...erationdefinitionparameterbinding.input.js | 59 + ...definitionparameterreferencedfrom.input.js | 57 + .../4_0_0/inputs/operationoutcome.input.js | 91 + .../inputs/operationoutcomeissue.input.js | 91 + .../4_0_0/inputs/organization.input.js | 141 + .../inputs/organizationaffiliation.input.js | 149 + .../4_0_0/inputs/organizationcontact.input.js | 53 + .../4_0_0/inputs/parameterdefinition.input.js | 102 + .../4_0_0/inputs/parameters.input.js | 67 + .../4_0_0/inputs/parametersparameter.input.js | 340 ++ src/resources/4_0_0/inputs/patient.input.js | 201 + .../inputs/patientcommunication.input.js | 53 + .../4_0_0/inputs/patientcontact.input.js | 75 + .../4_0_0/inputs/patientlink.input.js | 52 + .../4_0_0/inputs/paymentnotice.input.js | 151 + .../inputs/paymentreconciliation.input.js | 178 + .../paymentreconciliationdetail.input.js | 91 + .../paymentreconciliationprocessnote.input.js | 55 + src/resources/4_0_0/inputs/period.input.js | 51 + src/resources/4_0_0/inputs/person.input.js | 141 + .../4_0_0/inputs/personlink.input.js | 52 + .../4_0_0/inputs/plandefinition.input.js | 328 ++ .../inputs/plandefinitionaction.input.js | 275 ++ .../plandefinitionactioncondition.input.js | 51 + .../plandefinitionactiondynamicvalue.input.js | 51 + .../plandefinitionactionparticipant.input.js | 51 + ...plandefinitionactionrelatedaction.input.js | 65 + .../4_0_0/inputs/plandefinitiongoal.input.js | 69 + .../inputs/plandefinitiongoaltarget.input.js | 61 + .../4_0_0/inputs/population.input.js | 58 + .../4_0_0/inputs/practitioner.input.js | 144 + .../inputs/practitionerqualification.input.js | 54 + .../4_0_0/inputs/practitionerrole.input.js | 162 + .../practitionerroleavailabletime.input.js | 79 + .../practitionerrolenotavailable.input.js | 52 + src/resources/4_0_0/inputs/procedure.input.js | 267 ++ .../inputs/procedurefocaldevice.input.js | 47 + .../4_0_0/inputs/procedureperformer.input.js | 51 + .../4_0_0/inputs/prodcharacteristic.input.js | 105 + .../4_0_0/inputs/productshelflife.input.js | 57 + .../4_0_0/inputs/provenance.input.js | 150 + .../4_0_0/inputs/provenanceagent.input.js | 57 + .../4_0_0/inputs/provenanceentity.input.js | 51 + src/resources/4_0_0/inputs/quantity.input.js | 83 + .../4_0_0/inputs/questionnaire.input.js | 273 ++ .../4_0_0/inputs/questionnaireitem.input.js | 174 + .../questionnaireitemansweroption.input.js | 101 + .../questionnaireitemenablewhen.input.js | 147 + .../inputs/questionnaireiteminitial.input.js | 124 + .../inputs/questionnaireresponse.input.js | 155 + .../inputs/questionnaireresponseitem.input.js | 74 + .../questionnaireresponseitemanswer.input.js | 143 + src/resources/4_0_0/inputs/range.input.js | 40 + src/resources/4_0_0/inputs/ratio.input.js | 40 + src/resources/4_0_0/inputs/reference.input.js | 68 + .../4_0_0/inputs/relatedartifact.input.js | 99 + .../4_0_0/inputs/relatedperson.input.js | 153 + .../relatedpersoncommunication.input.js | 53 + .../4_0_0/inputs/requestgroup.input.js | 200 + .../4_0_0/inputs/requestgroupaction.input.js | 199 + .../requestgroupactioncondition.input.js | 51 + .../requestgroupactionrelatedaction.input.js | 65 + .../4_0_0/inputs/researchdefinition.input.js | 353 ++ .../inputs/researchelementdefinition.input.js | 364 ++ ...chelementdefinitioncharacteristic.input.js | 173 + .../4_0_0/inputs/researchstudy.input.js | 210 + .../4_0_0/inputs/researchstudyarm.input.js | 60 + .../inputs/researchstudyobjective.input.js | 50 + .../4_0_0/inputs/researchsubject.input.js | 135 + src/resources/4_0_0/inputs/resource.input.js | 61 + .../4_0_0/inputs/riskassessment.input.js | 183 + .../inputs/riskassessmentprediction.input.js | 92 + .../inputs/riskevidencesynthesis.input.js | 294 ++ .../riskevidencesynthesiscertainty.input.js | 51 + ...siscertaintycertaintysubcomponent.input.js | 49 + ...riskevidencesynthesisriskestimate.input.js | 87 + ...esisriskestimateprecisionestimate.input.js | 66 + .../riskevidencesynthesissamplesize.input.js | 63 + .../4_0_0/inputs/sampleddata.input.js | 100 + src/resources/4_0_0/inputs/schedule.input.js | 134 + .../4_0_0/inputs/searchparameter.input.js | 318 ++ .../inputs/searchparametercomponent.input.js | 58 + .../4_0_0/inputs/servicerequest.input.js | 316 ++ src/resources/4_0_0/inputs/signature.input.js | 89 + .../4_0_0/inputs/simplequantity.input.js | 11 + src/resources/4_0_0/inputs/slot.input.js | 161 + src/resources/4_0_0/inputs/specimen.input.js | 152 + .../4_0_0/inputs/specimencollection.input.js | 86 + .../4_0_0/inputs/specimencontainer.input.js | 74 + .../4_0_0/inputs/specimendefinition.input.js | 113 + .../specimendefinitiontypetested.input.js | 91 + ...imendefinitiontypetestedcontainer.input.js | 91 + ...nitiontypetestedcontaineradditive.input.js | 47 + ...cimendefinitiontypetestedhandling.input.js | 61 + .../4_0_0/inputs/specimenprocessing.input.js | 69 + .../4_0_0/inputs/structuredefinition.input.js | 309 ++ .../structuredefinitioncontext.input.js | 58 + .../structuredefinitiondifferential.input.js | 43 + .../structuredefinitionmapping.input.js | 77 + .../structuredefinitionsnapshot.input.js | 43 + .../4_0_0/inputs/structuremap.input.js | 237 ++ .../4_0_0/inputs/structuremapgroup.input.js | 90 + .../inputs/structuremapgroupinput.input.js | 71 + .../inputs/structuremapgrouprule.input.js | 70 + .../structuremapgroupruledependent.input.js | 54 + .../structuremapgrouprulesource.input.js | 486 +++ .../structuremapgroupruletarget.input.js | 102 + ...ucturemapgroupruletargetparameter.input.js | 81 + .../inputs/structuremapstructure.input.js | 73 + .../4_0_0/inputs/subscription.input.js | 141 + .../4_0_0/inputs/subscriptionchannel.input.js | 77 + src/resources/4_0_0/inputs/substance.input.js | 123 + .../4_0_0/inputs/substanceamount.input.js | 74 + .../substanceamountreferencerange.input.js | 39 + .../4_0_0/inputs/substanceingredient.input.js | 50 + .../4_0_0/inputs/substanceinstance.input.js | 56 + .../inputs/substancenucleicacid.input.js | 119 + .../substancenucleicacidsubunit.input.js | 91 + ...ubstancenucleicacidsubunitlinkage.input.js | 69 + .../substancenucleicacidsubunitsugar.input.js | 61 + .../4_0_0/inputs/substancepolymer.input.js | 111 + .../substancepolymermonomerset.input.js | 46 + ...polymermonomersetstartingmaterial.input.js | 57 + .../inputs/substancepolymerrepeat.input.js | 63 + .../substancepolymerrepeatrepeatunit.input.js | 64 + ...trepeatunitdegreeofpolymerisation.input.js | 44 + ...epeatunitstructuralrepresentation.input.js | 52 + .../4_0_0/inputs/substanceprotein.input.js | 115 + .../inputs/substanceproteinsubunit.input.js | 100 + .../substancereferenceinformation.input.js | 119 + ...eferenceinformationclassification.input.js | 52 + ...substancereferenceinformationgene.input.js | 48 + ...cereferenceinformationgeneelement.input.js | 48 + ...bstancereferenceinformationtarget.input.js | 80 + .../inputs/substancesourcematerial.input.js | 168 + ...sourcematerialfractiondescription.input.js | 51 + .../substancesourcematerialorganism.input.js | 78 + ...tancesourcematerialorganismauthor.input.js | 51 + ...tancesourcematerialorganismhybrid.input.js | 80 + ...cematerialorganismorganismgeneral.input.js | 52 + ...ancesourcematerialpartdescription.input.js | 46 + .../inputs/substancespecification.input.js | 172 + .../substancespecificationcode.input.js | 67 + .../substancespecificationmoiety.input.js | 80 + .../substancespecificationname.input.js | 85 + ...ubstancespecificationnameofficial.input.js | 53 + .../substancespecificationproperty.input.js | 77 + ...ubstancespecificationrelationship.input.js | 100 + .../substancespecificationstructure.input.js | 79 + ...ancespecificationstructureisotope.input.js | 58 + ...onstructureisotopemolecularweight.input.js | 50 + ...cificationstructurerepresentation.input.js | 55 + .../4_0_0/inputs/supplydelivery.input.js | 151 + .../supplydeliverysupplieditem.input.js | 51 + .../4_0_0/inputs/supplyrequest.input.js | 180 + .../inputs/supplyrequestparameter.input.js | 62 + src/resources/4_0_0/inputs/task.input.js | 266 ++ src/resources/4_0_0/inputs/taskinput.input.js | 331 ++ .../4_0_0/inputs/taskoutput.input.js | 330 ++ .../4_0_0/inputs/taskrestriction.input.js | 56 + .../inputs/terminologycapabilities.input.js | 277 ++ .../terminologycapabilitiesclosure.input.js | 45 + ...terminologycapabilitiescodesystem.input.js | 63 + ...logycapabilitiescodesystemversion.input.js | 88 + ...pabilitiescodesystemversionfilter.input.js | 54 + .../terminologycapabilitiesexpansion.input.js | 75 + ...ogycapabilitiesexpansionparameter.input.js | 54 + ...inologycapabilitiesimplementation.input.js | 56 + .../terminologycapabilitiessoftware.input.js | 55 + ...erminologycapabilitiestranslation.input.js | 46 + ...rminologycapabilitiesvalidatecode.input.js | 46 + .../4_0_0/inputs/testreport.input.js | 171 + .../inputs/testreportparticipant.input.js | 63 + .../4_0_0/inputs/testreportsetup.input.js | 43 + .../inputs/testreportsetupaction.input.js | 45 + .../testreportsetupactionassert.input.js | 62 + .../testreportsetupactionoperation.input.js | 63 + .../4_0_0/inputs/testreportteardown.input.js | 43 + .../inputs/testreportteardownaction.input.js | 36 + .../4_0_0/inputs/testreporttest.input.js | 63 + .../inputs/testreporttestaction.input.js | 36 + .../4_0_0/inputs/testscript.input.js | 259 ++ .../inputs/testscriptdestination.input.js | 52 + .../4_0_0/inputs/testscriptfixture.input.js | 63 + .../4_0_0/inputs/testscriptmetadata.input.js | 49 + .../testscriptmetadatacapability.input.js | 107 + .../inputs/testscriptmetadatalink.input.js | 56 + .../4_0_0/inputs/testscriptorigin.input.js | 52 + .../4_0_0/inputs/testscriptsetup.input.js | 43 + .../inputs/testscriptsetupaction.input.js | 45 + .../testscriptsetupactionassert.input.js | 250 ++ .../testscriptsetupactionoperation.input.js | 195 + ...setupactionoperationrequestheader.input.js | 53 + .../4_0_0/inputs/testscriptteardown.input.js | 43 + .../inputs/testscriptteardownaction.input.js | 36 + .../4_0_0/inputs/testscripttest.input.js | 63 + .../inputs/testscripttestaction.input.js | 36 + .../4_0_0/inputs/testscriptvariable.input.js | 116 + src/resources/4_0_0/inputs/timing.input.js | 55 + .../4_0_0/inputs/timingrepeat.input.js | 185 + .../4_0_0/inputs/triggerdefinition.input.js | 88 + .../4_0_0/inputs/usagecontext.input.js | 58 + src/resources/4_0_0/inputs/valueset.input.js | 236 ++ .../4_0_0/inputs/valuesetcompose.input.js | 66 + .../inputs/valuesetcomposeinclude.input.js | 79 + .../valuesetcomposeincludeconcept.input.js | 65 + ...tcomposeincludeconceptdesignation.input.js | 58 + .../valuesetcomposeincludefilter.input.js | 68 + .../4_0_0/inputs/valuesetexpansion.input.js | 89 + .../inputs/valuesetexpansioncontains.input.js | 97 + .../valuesetexpansionparameter.input.js | 109 + .../4_0_0/inputs/verificationresult.input.js | 175 + .../verificationresultattestation.input.js | 89 + .../verificationresultprimarysource.input.js | 74 + .../verificationresultvalidator.input.js | 56 + .../4_0_0/inputs/visionprescription.input.js | 139 + ...sionprescriptionlensspecification.input.js | 144 + ...rescriptionlensspecificationprism.input.js | 57 + .../4_0_0/parameters/account.parameters.js | 67 + .../activitydefinition.parameters.js | 175 + .../parameters/adverseevent.parameters.js | 96 + .../allergyintolerance.parameters.js | 128 + .../parameters/appointment.parameters.js | 137 + .../appointmentresponse.parameters.js | 60 + .../4_0_0/parameters/auditevent.parameters.js | 138 + .../4_0_0/parameters/basic.parameters.js | 53 + .../parameters/bodystructure.parameters.js | 38 + .../4_0_0/parameters/bundle.parameters.js | 49 + .../capabilitystatement.parameters.js | 189 + .../4_0_0/parameters/careplan.parameters.js | 158 + .../4_0_0/parameters/careteam.parameters.js | 70 + .../4_0_0/parameters/chargeitem.parameters.js | 130 + .../chargeitemdefinition.parameters.js | 121 + .../4_0_0/parameters/claim.parameters.js | 132 + .../parameters/claimresponse.parameters.js | 88 + .../clinicalimpression.parameters.js | 104 + .../4_0_0/parameters/codesystem.parameters.js | 168 + .../parameters/communication.parameters.js | 118 + .../communicationrequest.parameters.js | 124 + .../compartmentdefinition.parameters.js | 122 + .../parameters/composition.parameters.js | 142 + .../4_0_0/parameters/conceptmap.parameters.js | 212 + .../4_0_0/parameters/condition.parameters.js | 162 + .../4_0_0/parameters/consent.parameters.js | 122 + .../4_0_0/parameters/contract.parameters.js | 82 + .../4_0_0/parameters/coverage.parameters.js | 88 + .../coverageeligibilityrequest.parameters.js | 60 + .../coverageeligibilityresponse.parameters.js | 74 + .../parameters/detectedissue.parameters.js | 55 + .../4_0_0/parameters/device.parameters.js | 97 + .../parameters/devicedefinition.parameters.js | 31 + .../parameters/devicemetric.parameters.js | 45 + .../parameters/devicerequest.parameters.js | 143 + .../deviceusestatement.parameters.js | 39 + .../parameters/diagnosticreport.parameters.js | 128 + .../parameters/documentmanifest.parameters.js | 106 + .../documentreference.parameters.js | 192 + .../parameters/domainresource.parameters.js | 16 + .../effectevidencesynthesis.parameters.js | 130 + .../4_0_0/parameters/encounter.parameters.js | 180 + .../4_0_0/parameters/endpoint.parameters.js | 55 + .../enrollmentrequest.parameters.js | 38 + .../enrollmentresponse.parameters.js | 31 + .../parameters/episodeofcare.parameters.js | 80 + .../parameters/eventdefinition.parameters.js | 173 + .../4_0_0/parameters/evidence.parameters.js | 168 + .../parameters/evidencevariable.parameters.js | 174 + .../parameters/examplescenario.parameters.js | 106 + .../explanationofbenefit.parameters.js | 131 + .../familymemberhistory.parameters.js | 79 + .../4_0_0/parameters/flag.parameters.js | 56 + .../4_0_0/parameters/goal.parameters.js | 71 + .../parameters/graphdefinition.parameters.js | 123 + .../4_0_0/parameters/group.parameters.js | 80 + .../parameters/guidanceresponse.parameters.js | 39 + .../healthcareservice.parameters.js | 96 + .../parameters/imagingstudy.parameters.js | 132 + .../parameters/immunization.parameters.js | 128 + .../immunizationevaluation.parameters.js | 60 + .../immunizationrecommendation.parameters.js | 68 + .../implementationguide.parameters.js | 152 + .../parameters/insuranceplan.parameters.js | 111 + .../4_0_0/parameters/invoice.parameters.js | 102 + .../4_0_0/parameters/library.parameters.js | 183 + .../4_0_0/parameters/linkage.parameters.js | 30 + .../4_0_0/parameters/list.parameters.js | 100 + .../4_0_0/parameters/location.parameters.js | 119 + .../4_0_0/parameters/measure.parameters.js | 168 + .../parameters/measurereport.parameters.js | 76 + .../4_0_0/parameters/media.parameters.js | 103 + .../4_0_0/parameters/medication.parameters.js | 75 + .../medicationadministration.parameters.js | 111 + .../medicationdispense.parameters.js | 124 + .../medicationknowledge.parameters.js | 102 + .../medicationrequest.parameters.js | 132 + .../medicationstatement.parameters.js | 95 + .../parameters/medicinalproduct.parameters.js | 31 + ...edicinalproductauthorization.parameters.js | 47 + ...cinalproductcontraindication.parameters.js | 16 + .../medicinalproductindication.parameters.js | 16 + .../medicinalproductinteraction.parameters.js | 16 + .../medicinalproductpackaged.parameters.js | 24 + ...dicinalproductpharmaceutical.parameters.js | 31 + ...inalproductundesirableeffect.parameters.js | 16 + .../messagedefinition.parameters.js | 161 + .../parameters/messageheader.parameters.js | 110 + .../molecularsequence.parameters.js | 109 + .../parameters/namingsystem.parameters.js | 155 + .../parameters/nutritionorder.parameters.js | 100 + .../parameters/observation.parameters.js | 295 ++ .../operationdefinition.parameters.js | 180 + .../parameters/organization.parameters.js | 105 + .../organizationaffiliation.parameters.js | 116 + .../4_0_0/parameters/patient.parameters.js | 190 + .../parameters/paymentnotice.parameters.js | 60 + .../paymentreconciliation.parameters.js | 67 + .../4_0_0/parameters/person.parameters.js | 159 + .../parameters/plandefinition.parameters.js | 185 + .../parameters/practitioner.parameters.js | 144 + .../parameters/practitionerrole.parameters.js | 112 + .../4_0_0/parameters/procedure.parameters.js | 130 + .../4_0_0/parameters/provenance.parameters.js | 81 + .../parameters/questionnaire.parameters.js | 149 + .../questionnaireresponse.parameters.js | 91 + .../parameters/relatedperson.parameters.js | 143 + .../parameters/requestgroup.parameters.js | 112 + .../researchdefinition.parameters.js | 175 + .../researchelementdefinition.parameters.js | 177 + .../parameters/researchstudy.parameters.js | 104 + .../parameters/researchsubject.parameters.js | 54 + .../4_0_0/parameters/resource.parameters.js | 69 + .../parameters/riskassessment.parameters.js | 85 + .../riskevidencesynthesis.parameters.js | 129 + .../4_0_0/parameters/schedule.parameters.js | 63 + .../parameters/searchparameter.parameters.js | 159 + .../parameters/servicerequest.parameters.js | 164 + .../4_0_0/parameters/slot.parameters.js | 70 + .../4_0_0/parameters/specimen.parameters.js | 96 + .../specimendefinition.parameters.js | 31 + .../structuredefinition.parameters.js | 210 + .../parameters/structuremap.parameters.js | 132 + .../parameters/subscription.parameters.js | 54 + .../4_0_0/parameters/substance.parameters.js | 67 + .../substancespecification.parameters.js | 16 + .../parameters/supplydelivery.parameters.js | 47 + .../parameters/supplyrequest.parameters.js | 62 + .../4_0_0/parameters/task.parameters.js | 145 + .../terminologycapabilities.parameters.js | 124 + .../4_0_0/parameters/testreport.parameters.js | 54 + .../4_0_0/parameters/testscript.parameters.js | 126 + .../4_0_0/parameters/valueset.parameters.js | 155 + .../verificationresult.parameters.js | 16 + .../visionprescription.parameters.js | 56 + .../4_0_0/profiles/account/mutation.js | 76 + src/resources/4_0_0/profiles/account/query.js | 60 + .../4_0_0/profiles/account/register.js | 48 + .../4_0_0/profiles/account/resolver.js | 89 + .../profiles/activitydefinition/mutation.js | 81 + .../profiles/activitydefinition/query.js | 65 + .../profiles/activitydefinition/register.js | 48 + .../profiles/activitydefinition/resolver.js | 89 + .../4_0_0/profiles/adverseevent/mutation.js | 81 + .../4_0_0/profiles/adverseevent/query.js | 65 + .../4_0_0/profiles/adverseevent/register.js | 48 + .../4_0_0/profiles/adverseevent/resolver.js | 89 + .../profiles/allergyintolerance/mutation.js | 81 + .../profiles/allergyintolerance/query.js | 65 + .../profiles/allergyintolerance/register.js | 48 + .../profiles/allergyintolerance/resolver.js | 89 + .../4_0_0/profiles/appointment/mutation.js | 81 + .../4_0_0/profiles/appointment/query.js | 60 + .../4_0_0/profiles/appointment/register.js | 48 + .../4_0_0/profiles/appointment/resolver.js | 89 + .../profiles/appointmentresponse/mutation.js | 81 + .../profiles/appointmentresponse/query.js | 65 + .../profiles/appointmentresponse/register.js | 48 + .../profiles/appointmentresponse/resolver.js | 89 + .../4_0_0/profiles/auditevent/mutation.js | 80 + .../4_0_0/profiles/auditevent/query.js | 60 + .../4_0_0/profiles/auditevent/register.js | 48 + .../4_0_0/profiles/auditevent/resolver.js | 89 + .../4_0_0/profiles/basic/mutation.js | 75 + src/resources/4_0_0/profiles/basic/query.js | 56 + .../4_0_0/profiles/basic/register.js | 44 + .../4_0_0/profiles/basic/resolver.js | 84 + .../4_0_0/profiles/bodystructure/mutation.js | 81 + .../4_0_0/profiles/bodystructure/query.js | 65 + .../4_0_0/profiles/bodystructure/register.js | 48 + .../4_0_0/profiles/bodystructure/resolver.js | 89 + .../4_0_0/profiles/bundle/mutation.js | 76 + src/resources/4_0_0/profiles/bundle/query.js | 55 + .../4_0_0/profiles/bundle/register.js | 48 + .../4_0_0/profiles/bundle/resolver.js | 84 + .../profiles/capabilitystatement/mutation.js | 81 + .../profiles/capabilitystatement/query.js | 65 + .../profiles/capabilitystatement/register.js | 48 + .../profiles/capabilitystatement/resolver.js | 89 + .../4_0_0/profiles/careplan/mutation.js | 80 + .../4_0_0/profiles/careplan/query.js | 60 + .../4_0_0/profiles/careplan/register.js | 48 + .../4_0_0/profiles/careplan/resolver.js | 89 + .../4_0_0/profiles/careteam/mutation.js | 80 + .../4_0_0/profiles/careteam/query.js | 60 + .../4_0_0/profiles/careteam/register.js | 48 + .../4_0_0/profiles/careteam/resolver.js | 89 + .../4_0_0/profiles/chargeitem/mutation.js | 80 + .../4_0_0/profiles/chargeitem/query.js | 60 + .../4_0_0/profiles/chargeitem/register.js | 48 + .../4_0_0/profiles/chargeitem/resolver.js | 89 + .../profiles/chargeitemdefinition/mutation.js | 81 + .../profiles/chargeitemdefinition/query.js | 65 + .../profiles/chargeitemdefinition/register.js | 48 + .../profiles/chargeitemdefinition/resolver.js | 89 + .../4_0_0/profiles/claim/mutation.js | 75 + src/resources/4_0_0/profiles/claim/query.js | 56 + .../4_0_0/profiles/claim/register.js | 44 + .../4_0_0/profiles/claim/resolver.js | 84 + .../4_0_0/profiles/claimresponse/mutation.js | 81 + .../4_0_0/profiles/claimresponse/query.js | 65 + .../4_0_0/profiles/claimresponse/register.js | 48 + .../4_0_0/profiles/claimresponse/resolver.js | 89 + .../profiles/clinicalimpression/mutation.js | 81 + .../profiles/clinicalimpression/query.js | 65 + .../profiles/clinicalimpression/register.js | 48 + .../profiles/clinicalimpression/resolver.js | 89 + .../4_0_0/profiles/codesystem/mutation.js | 80 + .../4_0_0/profiles/codesystem/query.js | 60 + .../4_0_0/profiles/codesystem/register.js | 48 + .../4_0_0/profiles/codesystem/resolver.js | 89 + .../4_0_0/profiles/communication/mutation.js | 81 + .../4_0_0/profiles/communication/query.js | 65 + .../4_0_0/profiles/communication/register.js | 48 + .../4_0_0/profiles/communication/resolver.js | 89 + .../profiles/communicationrequest/mutation.js | 81 + .../profiles/communicationrequest/query.js | 65 + .../profiles/communicationrequest/register.js | 48 + .../profiles/communicationrequest/resolver.js | 89 + .../compartmentdefinition/mutation.js | 81 + .../profiles/compartmentdefinition/query.js | 65 + .../compartmentdefinition/register.js | 48 + .../compartmentdefinition/resolver.js | 89 + .../4_0_0/profiles/composition/mutation.js | 81 + .../4_0_0/profiles/composition/query.js | 60 + .../4_0_0/profiles/composition/register.js | 48 + .../4_0_0/profiles/composition/resolver.js | 89 + .../4_0_0/profiles/conceptmap/mutation.js | 80 + .../4_0_0/profiles/conceptmap/query.js | 60 + .../4_0_0/profiles/conceptmap/register.js | 48 + .../4_0_0/profiles/conceptmap/resolver.js | 89 + .../4_0_0/profiles/condition/mutation.js | 80 + .../4_0_0/profiles/condition/query.js | 60 + .../4_0_0/profiles/condition/register.js | 48 + .../4_0_0/profiles/condition/resolver.js | 89 + .../4_0_0/profiles/consent/mutation.js | 76 + src/resources/4_0_0/profiles/consent/query.js | 60 + .../4_0_0/profiles/consent/register.js | 48 + .../4_0_0/profiles/consent/resolver.js | 89 + .../4_0_0/profiles/contract/mutation.js | 80 + .../4_0_0/profiles/contract/query.js | 60 + .../4_0_0/profiles/contract/register.js | 48 + .../4_0_0/profiles/contract/resolver.js | 89 + .../4_0_0/profiles/coverage/mutation.js | 80 + .../4_0_0/profiles/coverage/query.js | 60 + .../4_0_0/profiles/coverage/register.js | 48 + .../4_0_0/profiles/coverage/resolver.js | 89 + .../coverageeligibilityrequest/mutation.js | 81 + .../coverageeligibilityrequest/query.js | 65 + .../coverageeligibilityrequest/register.js | 48 + .../coverageeligibilityrequest/resolver.js | 89 + .../coverageeligibilityresponse/mutation.js | 81 + .../coverageeligibilityresponse/query.js | 65 + .../coverageeligibilityresponse/register.js | 48 + .../coverageeligibilityresponse/resolver.js | 89 + .../4_0_0/profiles/detectedissue/mutation.js | 81 + .../4_0_0/profiles/detectedissue/query.js | 65 + .../4_0_0/profiles/detectedissue/register.js | 48 + .../4_0_0/profiles/detectedissue/resolver.js | 89 + .../4_0_0/profiles/device/mutation.js | 76 + src/resources/4_0_0/profiles/device/query.js | 56 + .../4_0_0/profiles/device/register.js | 48 + .../4_0_0/profiles/device/resolver.js | 84 + .../profiles/devicedefinition/mutation.js | 81 + .../4_0_0/profiles/devicedefinition/query.js | 65 + .../profiles/devicedefinition/register.js | 48 + .../profiles/devicedefinition/resolver.js | 89 + .../4_0_0/profiles/devicemetric/mutation.js | 81 + .../4_0_0/profiles/devicemetric/query.js | 65 + .../4_0_0/profiles/devicemetric/register.js | 48 + .../4_0_0/profiles/devicemetric/resolver.js | 89 + .../4_0_0/profiles/devicerequest/mutation.js | 81 + .../4_0_0/profiles/devicerequest/query.js | 65 + .../4_0_0/profiles/devicerequest/register.js | 48 + .../4_0_0/profiles/devicerequest/resolver.js | 89 + .../profiles/deviceusestatement/mutation.js | 81 + .../profiles/deviceusestatement/query.js | 65 + .../profiles/deviceusestatement/register.js | 48 + .../profiles/deviceusestatement/resolver.js | 89 + .../profiles/diagnosticreport/mutation.js | 81 + .../4_0_0/profiles/diagnosticreport/query.js | 65 + .../profiles/diagnosticreport/register.js | 48 + .../profiles/diagnosticreport/resolver.js | 89 + .../profiles/documentmanifest/mutation.js | 81 + .../4_0_0/profiles/documentmanifest/query.js | 65 + .../profiles/documentmanifest/register.js | 48 + .../profiles/documentmanifest/resolver.js | 89 + .../profiles/documentreference/mutation.js | 81 + .../4_0_0/profiles/documentreference/query.js | 65 + .../profiles/documentreference/register.js | 48 + .../profiles/documentreference/resolver.js | 89 + .../effectevidencesynthesis/mutation.js | 81 + .../profiles/effectevidencesynthesis/query.js | 65 + .../effectevidencesynthesis/register.js | 48 + .../effectevidencesynthesis/resolver.js | 89 + .../4_0_0/profiles/encounter/mutation.js | 80 + .../4_0_0/profiles/encounter/query.js | 60 + .../4_0_0/profiles/encounter/register.js | 48 + .../4_0_0/profiles/encounter/resolver.js | 89 + .../4_0_0/profiles/endpoint/mutation.js | 80 + .../4_0_0/profiles/endpoint/query.js | 60 + .../4_0_0/profiles/endpoint/register.js | 48 + .../4_0_0/profiles/endpoint/resolver.js | 89 + .../profiles/enrollmentrequest/mutation.js | 81 + .../4_0_0/profiles/enrollmentrequest/query.js | 65 + .../profiles/enrollmentrequest/register.js | 48 + .../profiles/enrollmentrequest/resolver.js | 89 + .../profiles/enrollmentresponse/mutation.js | 81 + .../profiles/enrollmentresponse/query.js | 65 + .../profiles/enrollmentresponse/register.js | 48 + .../profiles/enrollmentresponse/resolver.js | 89 + .../4_0_0/profiles/episodeofcare/mutation.js | 81 + .../4_0_0/profiles/episodeofcare/query.js | 65 + .../4_0_0/profiles/episodeofcare/register.js | 48 + .../4_0_0/profiles/episodeofcare/resolver.js | 89 + .../profiles/eventdefinition/mutation.js | 81 + .../4_0_0/profiles/eventdefinition/query.js | 65 + .../profiles/eventdefinition/register.js | 48 + .../profiles/eventdefinition/resolver.js | 89 + .../4_0_0/profiles/evidence/mutation.js | 80 + .../4_0_0/profiles/evidence/query.js | 60 + .../4_0_0/profiles/evidence/register.js | 48 + .../4_0_0/profiles/evidence/resolver.js | 89 + .../profiles/evidencevariable/mutation.js | 81 + .../4_0_0/profiles/evidencevariable/query.js | 65 + .../profiles/evidencevariable/register.js | 48 + .../profiles/evidencevariable/resolver.js | 89 + .../profiles/examplescenario/mutation.js | 81 + .../4_0_0/profiles/examplescenario/query.js | 65 + .../profiles/examplescenario/register.js | 48 + .../profiles/examplescenario/resolver.js | 89 + .../profiles/explanationofbenefit/mutation.js | 81 + .../profiles/explanationofbenefit/query.js | 65 + .../profiles/explanationofbenefit/register.js | 48 + .../profiles/explanationofbenefit/resolver.js | 89 + .../profiles/familymemberhistory/mutation.js | 81 + .../profiles/familymemberhistory/query.js | 65 + .../profiles/familymemberhistory/register.js | 48 + .../profiles/familymemberhistory/resolver.js | 89 + src/resources/4_0_0/profiles/flag/mutation.js | 75 + src/resources/4_0_0/profiles/flag/query.js | 56 + src/resources/4_0_0/profiles/flag/register.js | 44 + src/resources/4_0_0/profiles/flag/resolver.js | 84 + src/resources/4_0_0/profiles/goal/mutation.js | 75 + src/resources/4_0_0/profiles/goal/query.js | 56 + src/resources/4_0_0/profiles/goal/register.js | 44 + src/resources/4_0_0/profiles/goal/resolver.js | 84 + .../profiles/graphdefinition/mutation.js | 81 + .../4_0_0/profiles/graphdefinition/query.js | 65 + .../profiles/graphdefinition/register.js | 48 + .../profiles/graphdefinition/resolver.js | 89 + .../4_0_0/profiles/group/mutation.js | 75 + src/resources/4_0_0/profiles/group/query.js | 56 + .../4_0_0/profiles/group/register.js | 44 + .../4_0_0/profiles/group/resolver.js | 84 + .../profiles/guidanceresponse/mutation.js | 81 + .../4_0_0/profiles/guidanceresponse/query.js | 65 + .../profiles/guidanceresponse/register.js | 48 + .../profiles/guidanceresponse/resolver.js | 89 + .../profiles/healthcareservice/mutation.js | 81 + .../4_0_0/profiles/healthcareservice/query.js | 65 + .../profiles/healthcareservice/register.js | 48 + .../profiles/healthcareservice/resolver.js | 89 + .../4_0_0/profiles/imagingstudy/mutation.js | 81 + .../4_0_0/profiles/imagingstudy/query.js | 65 + .../4_0_0/profiles/imagingstudy/register.js | 48 + .../4_0_0/profiles/imagingstudy/resolver.js | 89 + .../4_0_0/profiles/immunization/mutation.js | 81 + .../4_0_0/profiles/immunization/query.js | 65 + .../4_0_0/profiles/immunization/register.js | 48 + .../4_0_0/profiles/immunization/resolver.js | 89 + .../immunizationevaluation/mutation.js | 81 + .../profiles/immunizationevaluation/query.js | 65 + .../immunizationevaluation/register.js | 48 + .../immunizationevaluation/resolver.js | 89 + .../immunizationrecommendation/mutation.js | 81 + .../immunizationrecommendation/query.js | 65 + .../immunizationrecommendation/register.js | 48 + .../immunizationrecommendation/resolver.js | 89 + .../profiles/implementationguide/mutation.js | 81 + .../profiles/implementationguide/query.js | 65 + .../profiles/implementationguide/register.js | 48 + .../profiles/implementationguide/resolver.js | 89 + .../4_0_0/profiles/insuranceplan/mutation.js | 81 + .../4_0_0/profiles/insuranceplan/query.js | 65 + .../4_0_0/profiles/insuranceplan/register.js | 48 + .../4_0_0/profiles/insuranceplan/resolver.js | 89 + .../4_0_0/profiles/invoice/mutation.js | 76 + src/resources/4_0_0/profiles/invoice/query.js | 60 + .../4_0_0/profiles/invoice/register.js | 48 + .../4_0_0/profiles/invoice/resolver.js | 89 + .../4_0_0/profiles/library/mutation.js | 76 + src/resources/4_0_0/profiles/library/query.js | 60 + .../4_0_0/profiles/library/register.js | 48 + .../4_0_0/profiles/library/resolver.js | 89 + .../4_0_0/profiles/linkage/mutation.js | 76 + src/resources/4_0_0/profiles/linkage/query.js | 60 + .../4_0_0/profiles/linkage/register.js | 48 + .../4_0_0/profiles/linkage/resolver.js | 89 + src/resources/4_0_0/profiles/list/mutation.js | 75 + src/resources/4_0_0/profiles/list/query.js | 56 + src/resources/4_0_0/profiles/list/register.js | 44 + src/resources/4_0_0/profiles/list/resolver.js | 84 + .../4_0_0/profiles/location/mutation.js | 80 + .../4_0_0/profiles/location/query.js | 60 + .../4_0_0/profiles/location/register.js | 48 + .../4_0_0/profiles/location/resolver.js | 89 + .../4_0_0/profiles/measure/mutation.js | 76 + src/resources/4_0_0/profiles/measure/query.js | 60 + .../4_0_0/profiles/measure/register.js | 48 + .../4_0_0/profiles/measure/resolver.js | 89 + .../4_0_0/profiles/measurereport/mutation.js | 81 + .../4_0_0/profiles/measurereport/query.js | 65 + .../4_0_0/profiles/measurereport/register.js | 48 + .../4_0_0/profiles/measurereport/resolver.js | 89 + .../4_0_0/profiles/media/mutation.js | 75 + src/resources/4_0_0/profiles/media/query.js | 56 + .../4_0_0/profiles/media/register.js | 44 + .../4_0_0/profiles/media/resolver.js | 84 + .../4_0_0/profiles/medication/mutation.js | 80 + .../4_0_0/profiles/medication/query.js | 60 + .../4_0_0/profiles/medication/register.js | 48 + .../4_0_0/profiles/medication/resolver.js | 89 + .../medicationadministration/mutation.js | 81 + .../medicationadministration/query.js | 65 + .../medicationadministration/register.js | 48 + .../medicationadministration/resolver.js | 89 + .../profiles/medicationdispense/mutation.js | 81 + .../profiles/medicationdispense/query.js | 65 + .../profiles/medicationdispense/register.js | 48 + .../profiles/medicationdispense/resolver.js | 89 + .../profiles/medicationknowledge/mutation.js | 81 + .../profiles/medicationknowledge/query.js | 65 + .../profiles/medicationknowledge/register.js | 48 + .../profiles/medicationknowledge/resolver.js | 89 + .../profiles/medicationrequest/mutation.js | 81 + .../4_0_0/profiles/medicationrequest/query.js | 65 + .../profiles/medicationrequest/register.js | 48 + .../profiles/medicationrequest/resolver.js | 89 + .../profiles/medicationstatement/mutation.js | 81 + .../profiles/medicationstatement/query.js | 65 + .../profiles/medicationstatement/register.js | 48 + .../profiles/medicationstatement/resolver.js | 89 + .../profiles/medicinalproduct/mutation.js | 81 + .../4_0_0/profiles/medicinalproduct/query.js | 65 + .../profiles/medicinalproduct/register.js | 48 + .../profiles/medicinalproduct/resolver.js | 89 + .../medicinalproductauthorization/mutation.js | 81 + .../medicinalproductauthorization/query.js | 70 + .../medicinalproductauthorization/register.js | 48 + .../medicinalproductauthorization/resolver.js | 89 + .../mutation.js | 81 + .../medicinalproductcontraindication/query.js | 73 + .../register.js | 48 + .../resolver.js | 89 + .../medicinalproductindication/mutation.js | 81 + .../medicinalproductindication/query.js | 65 + .../medicinalproductindication/register.js | 48 + .../medicinalproductindication/resolver.js | 89 + .../medicinalproductinteraction/mutation.js | 81 + .../medicinalproductinteraction/query.js | 65 + .../medicinalproductinteraction/register.js | 48 + .../medicinalproductinteraction/resolver.js | 89 + .../medicinalproductpackaged/mutation.js | 81 + .../medicinalproductpackaged/query.js | 65 + .../medicinalproductpackaged/register.js | 48 + .../medicinalproductpackaged/resolver.js | 89 + .../mutation.js | 81 + .../medicinalproductpharmaceutical/query.js | 70 + .../register.js | 48 + .../resolver.js | 89 + .../mutation.js | 91 + .../query.js | 73 + .../register.js | 48 + .../resolver.js | 89 + .../profiles/messagedefinition/mutation.js | 81 + .../4_0_0/profiles/messagedefinition/query.js | 65 + .../profiles/messagedefinition/register.js | 48 + .../profiles/messagedefinition/resolver.js | 89 + .../4_0_0/profiles/messageheader/mutation.js | 81 + .../4_0_0/profiles/messageheader/query.js | 65 + .../4_0_0/profiles/messageheader/register.js | 48 + .../4_0_0/profiles/messageheader/resolver.js | 89 + .../profiles/molecularsequence/mutation.js | 81 + .../4_0_0/profiles/molecularsequence/query.js | 65 + .../profiles/molecularsequence/register.js | 48 + .../profiles/molecularsequence/resolver.js | 89 + .../4_0_0/profiles/namingsystem/mutation.js | 81 + .../4_0_0/profiles/namingsystem/query.js | 65 + .../4_0_0/profiles/namingsystem/register.js | 48 + .../4_0_0/profiles/namingsystem/resolver.js | 89 + .../4_0_0/profiles/nutritionorder/mutation.js | 81 + .../4_0_0/profiles/nutritionorder/query.js | 65 + .../4_0_0/profiles/nutritionorder/register.js | 48 + .../4_0_0/profiles/nutritionorder/resolver.js | 89 + .../4_0_0/profiles/observation/mutation.js | 81 + .../4_0_0/profiles/observation/query.js | 60 + .../4_0_0/profiles/observation/register.js | 48 + .../4_0_0/profiles/observation/resolver.js | 89 + .../profiles/operationdefinition/mutation.js | 81 + .../profiles/operationdefinition/query.js | 65 + .../profiles/operationdefinition/register.js | 48 + .../profiles/operationdefinition/resolver.js | 89 + .../4_0_0/profiles/organization/mutation.js | 81 + .../4_0_0/profiles/organization/query.js | 65 + .../4_0_0/profiles/organization/register.js | 48 + .../4_0_0/profiles/organization/resolver.js | 89 + .../organizationaffiliation/mutation.js | 81 + .../profiles/organizationaffiliation/query.js | 65 + .../organizationaffiliation/register.js | 48 + .../organizationaffiliation/resolver.js | 89 + .../4_0_0/profiles/patient/mutation.js | 76 + src/resources/4_0_0/profiles/patient/query.js | 60 + .../4_0_0/profiles/patient/register.js | 48 + .../4_0_0/profiles/patient/resolver.js | 89 + .../4_0_0/profiles/paymentnotice/mutation.js | 81 + .../4_0_0/profiles/paymentnotice/query.js | 65 + .../4_0_0/profiles/paymentnotice/register.js | 48 + .../4_0_0/profiles/paymentnotice/resolver.js | 89 + .../paymentreconciliation/mutation.js | 81 + .../profiles/paymentreconciliation/query.js | 65 + .../paymentreconciliation/register.js | 48 + .../paymentreconciliation/resolver.js | 89 + .../4_0_0/profiles/person/mutation.js | 76 + src/resources/4_0_0/profiles/person/query.js | 56 + .../4_0_0/profiles/person/register.js | 48 + .../4_0_0/profiles/person/resolver.js | 84 + .../4_0_0/profiles/plandefinition/mutation.js | 81 + .../4_0_0/profiles/plandefinition/query.js | 65 + .../4_0_0/profiles/plandefinition/register.js | 48 + .../4_0_0/profiles/plandefinition/resolver.js | 89 + .../4_0_0/profiles/practitioner/mutation.js | 81 + .../4_0_0/profiles/practitioner/query.js | 65 + .../4_0_0/profiles/practitioner/register.js | 48 + .../4_0_0/profiles/practitioner/resolver.js | 89 + .../profiles/practitionerrole/mutation.js | 81 + .../4_0_0/profiles/practitionerrole/query.js | 65 + .../profiles/practitionerrole/register.js | 48 + .../profiles/practitionerrole/resolver.js | 89 + .../4_0_0/profiles/procedure/mutation.js | 80 + .../4_0_0/profiles/procedure/query.js | 60 + .../4_0_0/profiles/procedure/register.js | 48 + .../4_0_0/profiles/procedure/resolver.js | 89 + .../4_0_0/profiles/provenance/mutation.js | 80 + .../4_0_0/profiles/provenance/query.js | 60 + .../4_0_0/profiles/provenance/register.js | 48 + .../4_0_0/profiles/provenance/resolver.js | 89 + .../4_0_0/profiles/questionnaire/mutation.js | 81 + .../4_0_0/profiles/questionnaire/query.js | 65 + .../4_0_0/profiles/questionnaire/register.js | 48 + .../4_0_0/profiles/questionnaire/resolver.js | 89 + .../questionnaireresponse/mutation.js | 81 + .../profiles/questionnaireresponse/query.js | 65 + .../questionnaireresponse/register.js | 48 + .../questionnaireresponse/resolver.js | 89 + .../4_0_0/profiles/relatedperson/mutation.js | 81 + .../4_0_0/profiles/relatedperson/query.js | 65 + .../4_0_0/profiles/relatedperson/register.js | 48 + .../4_0_0/profiles/relatedperson/resolver.js | 89 + .../4_0_0/profiles/requestgroup/mutation.js | 81 + .../4_0_0/profiles/requestgroup/query.js | 65 + .../4_0_0/profiles/requestgroup/register.js | 48 + .../4_0_0/profiles/requestgroup/resolver.js | 89 + .../profiles/researchdefinition/mutation.js | 81 + .../profiles/researchdefinition/query.js | 65 + .../profiles/researchdefinition/register.js | 48 + .../profiles/researchdefinition/resolver.js | 89 + .../researchelementdefinition/mutation.js | 81 + .../researchelementdefinition/query.js | 65 + .../researchelementdefinition/register.js | 48 + .../researchelementdefinition/resolver.js | 89 + .../4_0_0/profiles/researchstudy/mutation.js | 81 + .../4_0_0/profiles/researchstudy/query.js | 65 + .../4_0_0/profiles/researchstudy/register.js | 48 + .../4_0_0/profiles/researchstudy/resolver.js | 89 + .../profiles/researchsubject/mutation.js | 81 + .../4_0_0/profiles/researchsubject/query.js | 65 + .../profiles/researchsubject/register.js | 48 + .../profiles/researchsubject/resolver.js | 89 + .../4_0_0/profiles/riskassessment/mutation.js | 81 + .../4_0_0/profiles/riskassessment/query.js | 65 + .../4_0_0/profiles/riskassessment/register.js | 48 + .../4_0_0/profiles/riskassessment/resolver.js | 89 + .../riskevidencesynthesis/mutation.js | 81 + .../profiles/riskevidencesynthesis/query.js | 65 + .../riskevidencesynthesis/register.js | 48 + .../riskevidencesynthesis/resolver.js | 89 + .../4_0_0/profiles/schedule/mutation.js | 80 + .../4_0_0/profiles/schedule/query.js | 60 + .../4_0_0/profiles/schedule/register.js | 48 + .../4_0_0/profiles/schedule/resolver.js | 89 + .../profiles/searchparameter/mutation.js | 81 + .../4_0_0/profiles/searchparameter/query.js | 65 + .../profiles/searchparameter/register.js | 48 + .../profiles/searchparameter/resolver.js | 89 + .../4_0_0/profiles/servicerequest/mutation.js | 81 + .../4_0_0/profiles/servicerequest/query.js | 65 + .../4_0_0/profiles/servicerequest/register.js | 48 + .../4_0_0/profiles/servicerequest/resolver.js | 89 + src/resources/4_0_0/profiles/slot/mutation.js | 75 + src/resources/4_0_0/profiles/slot/query.js | 56 + src/resources/4_0_0/profiles/slot/register.js | 44 + src/resources/4_0_0/profiles/slot/resolver.js | 84 + .../4_0_0/profiles/specimen/mutation.js | 80 + .../4_0_0/profiles/specimen/query.js | 60 + .../4_0_0/profiles/specimen/register.js | 48 + .../4_0_0/profiles/specimen/resolver.js | 89 + .../profiles/specimendefinition/mutation.js | 81 + .../profiles/specimendefinition/query.js | 65 + .../profiles/specimendefinition/register.js | 48 + .../profiles/specimendefinition/resolver.js | 89 + .../profiles/structuredefinition/mutation.js | 81 + .../profiles/structuredefinition/query.js | 65 + .../profiles/structuredefinition/register.js | 48 + .../profiles/structuredefinition/resolver.js | 89 + .../4_0_0/profiles/structuremap/mutation.js | 81 + .../4_0_0/profiles/structuremap/query.js | 65 + .../4_0_0/profiles/structuremap/register.js | 48 + .../4_0_0/profiles/structuremap/resolver.js | 89 + .../4_0_0/profiles/subscription/mutation.js | 81 + .../4_0_0/profiles/subscription/query.js | 65 + .../4_0_0/profiles/subscription/register.js | 48 + .../4_0_0/profiles/subscription/resolver.js | 89 + .../4_0_0/profiles/substance/mutation.js | 80 + .../4_0_0/profiles/substance/query.js | 60 + .../4_0_0/profiles/substance/register.js | 48 + .../4_0_0/profiles/substance/resolver.js | 89 + .../substancespecification/mutation.js | 81 + .../profiles/substancespecification/query.js | 65 + .../substancespecification/register.js | 48 + .../substancespecification/resolver.js | 89 + .../4_0_0/profiles/supplydelivery/mutation.js | 81 + .../4_0_0/profiles/supplydelivery/query.js | 65 + .../4_0_0/profiles/supplydelivery/register.js | 48 + .../4_0_0/profiles/supplydelivery/resolver.js | 89 + .../4_0_0/profiles/supplyrequest/mutation.js | 81 + .../4_0_0/profiles/supplyrequest/query.js | 65 + .../4_0_0/profiles/supplyrequest/register.js | 48 + .../4_0_0/profiles/supplyrequest/resolver.js | 89 + src/resources/4_0_0/profiles/task/mutation.js | 75 + src/resources/4_0_0/profiles/task/query.js | 56 + src/resources/4_0_0/profiles/task/register.js | 44 + src/resources/4_0_0/profiles/task/resolver.js | 84 + .../terminologycapabilities/mutation.js | 81 + .../profiles/terminologycapabilities/query.js | 65 + .../terminologycapabilities/register.js | 48 + .../terminologycapabilities/resolver.js | 89 + .../4_0_0/profiles/testreport/mutation.js | 80 + .../4_0_0/profiles/testreport/query.js | 60 + .../4_0_0/profiles/testreport/register.js | 48 + .../4_0_0/profiles/testreport/resolver.js | 89 + .../4_0_0/profiles/testscript/mutation.js | 80 + .../4_0_0/profiles/testscript/query.js | 60 + .../4_0_0/profiles/testscript/register.js | 48 + .../4_0_0/profiles/testscript/resolver.js | 89 + .../4_0_0/profiles/valueset/mutation.js | 80 + .../4_0_0/profiles/valueset/query.js | 60 + .../4_0_0/profiles/valueset/register.js | 48 + .../4_0_0/profiles/valueset/resolver.js | 89 + .../profiles/verificationresult/mutation.js | 81 + .../profiles/verificationresult/query.js | 65 + .../profiles/verificationresult/register.js | 48 + .../profiles/verificationresult/resolver.js | 89 + .../profiles/visionprescription/mutation.js | 81 + .../profiles/visionprescription/query.js | 65 + .../profiles/visionprescription/register.js | 48 + .../profiles/visionprescription/resolver.js | 89 + .../4_0_0/scalars/base64binary.scalar.js | 24 + src/resources/4_0_0/scalars/boolean.scalar.js | 24 + .../4_0_0/scalars/canonical.scalar.js | 24 + src/resources/4_0_0/scalars/code.scalar.js | 24 + src/resources/4_0_0/scalars/date.scalar.js | 24 + .../4_0_0/scalars/datetime.scalar.js | 24 + src/resources/4_0_0/scalars/decimal.scalar.js | 24 + src/resources/4_0_0/scalars/id.scalar.js | 24 + src/resources/4_0_0/scalars/instant.scalar.js | 24 + src/resources/4_0_0/scalars/integer.scalar.js | 23 + .../4_0_0/scalars/markdown.scalar.js | 24 + src/resources/4_0_0/scalars/oid.scalar.js | 24 + .../4_0_0/scalars/positiveint.scalar.js | 24 + src/resources/4_0_0/scalars/string.scalar.js | 24 + src/resources/4_0_0/scalars/time.scalar.js | 24 + src/resources/4_0_0/scalars/token.scalar.js | 23 + .../4_0_0/scalars/unsignedint.scalar.js | 24 + src/resources/4_0_0/scalars/uri.scalar.js | 24 + src/resources/4_0_0/scalars/url.scalar.js | 24 + src/resources/4_0_0/scalars/uuid.scalar.js | 24 + src/resources/4_0_0/scalars/xhtml.scalar.js | 23 + src/resources/4_0_0/schemas/account.schema.js | 210 + .../4_0_0/schemas/accountcoverage.schema.js | 66 + .../4_0_0/schemas/accountguarantor.schema.js | 79 + .../schemas/activitydefinition.schema.js | 548 +++ .../activitydefinitiondynamicvalue.schema.js | 52 + .../activitydefinitionparticipant.schema.js | 51 + src/resources/4_0_0/schemas/address.schema.js | 119 + .../4_0_0/schemas/adverseevent.schema.js | 363 ++ .../adverseeventsuspectentity.schema.js | 87 + ...verseeventsuspectentitycausality.schema.js | 72 + src/resources/4_0_0/schemas/age.schema.js | 83 + .../schemas/allergyintolerance.schema.js | 286 ++ .../allergyintolerancereaction.schema.js | 91 + .../4_0_0/schemas/annotation.schema.js | 86 + .../4_0_0/schemas/appointment.schema.js | 301 ++ .../schemas/appointmentparticipant.schema.js | 106 + .../schemas/appointmentresponse.schema.js | 189 + .../4_0_0/schemas/attachment.schema.js | 107 + .../4_0_0/schemas/auditevent.schema.js | 154 + .../4_0_0/schemas/auditeventagent.schema.js | 153 + .../schemas/auditeventagentnetwork.schema.js | 53 + .../4_0_0/schemas/auditevententity.schema.js | 100 + .../schemas/auditevententitydetail.schema.js | 62 + .../4_0_0/schemas/auditeventsource.schema.js | 89 + .../4_0_0/schemas/backboneelement.schema.js | 33 + src/resources/4_0_0/schemas/basic.schema.js | 151 + src/resources/4_0_0/schemas/binary.schema.js | 97 + .../biologicallyderivedproduct.schema.js | 175 + ...ogicallyderivedproductcollection.schema.js | 91 + ...icallyderivedproductmanipulation.schema.js | 53 + ...ogicallyderivedproductprocessing.schema.js | 75 + ...iologicallyderivedproductstorage.schema.js | 66 + .../4_0_0/schemas/bodystructure.schema.js | 142 + src/resources/4_0_0/schemas/bundle.schema.js | 112 + .../4_0_0/schemas/bundleentry.schema.js | 68 + .../schemas/bundleentryrequest.schema.js | 100 + .../schemas/bundleentryresponse.schema.js | 85 + .../4_0_0/schemas/bundleentrysearch.schema.js | 58 + .../4_0_0/schemas/bundlelink.schema.js | 56 + .../schemas/capabilitystatement.schema.js | 309 ++ .../capabilitystatementdocument.schema.js | 69 + ...apabilitystatementimplementation.schema.js | 74 + .../capabilitystatementmessaging.schema.js | 67 + ...bilitystatementmessagingendpoint.schema.js | 53 + ...atementmessagingsupportedmessage.schema.js | 59 + .../schemas/capabilitystatementrest.schema.js | 88 + ...pabilitystatementrestinteraction.schema.js | 58 + .../capabilitystatementrestresource.schema.js | 194 + ...statementrestresourceinteraction.schema.js | 58 + ...tystatementrestresourceoperation.schema.js | 68 + ...statementrestresourcesearchparam.schema.js | 77 + .../capabilitystatementrestsecurity.schema.js | 60 + .../capabilitystatementsoftware.schema.js | 64 + .../4_0_0/schemas/careplan.schema.js | 418 ++ .../4_0_0/schemas/careplanactivity.schema.js | 117 + .../schemas/careplanactivitydetail.schema.js | 282 ++ .../4_0_0/schemas/careteam.schema.js | 202 + .../schemas/careteamparticipant.schema.js | 97 + .../4_0_0/schemas/catalogentry.schema.js | 217 ++ .../catalogentryrelatedentry.schema.js | 64 + .../4_0_0/schemas/chargeitem.schema.js | 446 +++ .../schemas/chargeitemdefinition.schema.js | 298 ++ ...hargeitemdefinitionapplicability.schema.js | 62 + ...hargeitemdefinitionpropertygroup.schema.js | 39 + ...itionpropertygrouppricecomponent.schema.js | 66 + .../schemas/chargeitemperformer.schema.js | 86 + src/resources/4_0_0/schemas/claim.schema.js | 343 ++ .../4_0_0/schemas/claimaccident.schema.js | 71 + .../4_0_0/schemas/claimcareteam.schema.js | 94 + .../4_0_0/schemas/claimdiagnosis.schema.js | 83 + .../4_0_0/schemas/claiminsurance.schema.js | 117 + .../4_0_0/schemas/claimitem.schema.js | 214 + .../4_0_0/schemas/claimitemdetail.schema.js | 117 + .../claimitemdetailsubdetail.schema.js | 112 + .../4_0_0/schemas/claimpayee.schema.js | 76 + .../4_0_0/schemas/claimprocedure.schema.js | 98 + .../4_0_0/schemas/claimrelated.schema.js | 59 + .../4_0_0/schemas/claimresponse.schema.js | 302 ++ .../schemas/claimresponseadditem.schema.js | 196 + .../claimresponseadditemdetail.schema.js | 90 + ...imresponseadditemdetailsubdetail.schema.js | 83 + .../schemas/claimresponseerror.schema.js | 73 + .../schemas/claimresponseinsurance.schema.js | 102 + .../4_0_0/schemas/claimresponseitem.schema.js | 70 + .../claimresponseitemadjudication.schema.js | 62 + .../schemas/claimresponseitemdetail.schema.js | 62 + ...claimresponseitemdetailsubdetail.schema.js | 56 + .../schemas/claimresponsepayment.schema.js | 70 + .../claimresponseprocessnote.schema.js | 70 + .../schemas/claimresponsetotal.schema.js | 46 + .../schemas/claimsupportinginfo.schema.js | 123 + .../schemas/clinicalimpression.schema.js | 306 ++ .../clinicalimpressionfinding.schema.js | 75 + .../clinicalimpressioninvestigation.schema.js | 85 + .../4_0_0/schemas/codeableconcept.schema.js | 42 + .../4_0_0/schemas/codesystem.schema.js | 314 ++ .../4_0_0/schemas/codesystemconcept.schema.js | 79 + .../codesystemconceptdesignation.schema.js | 58 + .../codesystemconceptproperty.schema.js | 102 + .../4_0_0/schemas/codesystemfilter.schema.js | 72 + .../schemas/codesystemproperty.schema.js | 79 + src/resources/4_0_0/schemas/coding.schema.js | 85 + .../4_0_0/schemas/communication.schema.js | 406 ++ .../schemas/communicationpayload.schema.js | 70 + .../schemas/communicationrequest.schema.js | 423 ++ .../communicationrequestpayload.schema.js | 71 + .../schemas/compartmentdefinition.schema.js | 210 + .../compartmentdefinitionresource.schema.js | 66 + .../4_0_0/schemas/composition.schema.js | 244 ++ .../schemas/compositionattester.schema.js | 87 + .../4_0_0/schemas/compositionevent.schema.js | 64 + .../schemas/compositionrelatesto.schema.js | 68 + .../schemas/compositionsection.schema.js | 149 + .../4_0_0/schemas/conceptmap.schema.js | 263 ++ .../4_0_0/schemas/conceptmapgroup.schema.js | 90 + .../schemas/conceptmapgroupelement.schema.js | 58 + .../conceptmapgroupelementtarget.schema.js | 85 + ...ptmapgroupelementtargetdependson.schema.js | 79 + .../schemas/conceptmapgroupunmapped.schema.js | 79 + .../4_0_0/schemas/condition.schema.js | 307 ++ .../4_0_0/schemas/conditionevidence.schema.js | 59 + .../4_0_0/schemas/conditionstage.schema.js | 74 + src/resources/4_0_0/schemas/consent.schema.js | 238 ++ .../4_0_0/schemas/consentpolicy.schema.js | 53 + .../4_0_0/schemas/consentprovision.schema.js | 86 + .../schemas/consentprovisionactor.schema.js | 90 + .../schemas/consentprovisiondata.schema.js | 66 + .../schemas/consentverification.schema.js | 77 + .../4_0_0/schemas/contactdetail.schema.js | 41 + .../4_0_0/schemas/contactpoint.schema.js | 72 + .../4_0_0/schemas/contract.schema.js | 442 +++ .../contractcontentdefinition.schema.js | 102 + .../4_0_0/schemas/contractfriendly.schema.js | 70 + .../4_0_0/schemas/contractlegal.schema.js | 67 + .../4_0_0/schemas/contractrule.schema.js | 60 + .../4_0_0/schemas/contractsigner.schema.js | 82 + .../4_0_0/schemas/contractterm.schema.js | 110 + .../schemas/contracttermaction.schema.js | 323 ++ .../contracttermactionsubject.schema.js | 87 + .../4_0_0/schemas/contracttermasset.schema.js | 128 + .../contracttermassetcontext.schema.js | 65 + .../contracttermassetvalueditem.schema.js | 205 + .../4_0_0/schemas/contracttermoffer.schema.js | 105 + .../schemas/contracttermofferanswer.schema.js | 157 + .../schemas/contracttermofferparty.schema.js | 85 + .../contracttermsecuritylabel.schema.js | 63 + .../4_0_0/schemas/contributor.schema.js | 57 + src/resources/4_0_0/schemas/count.schema.js | 83 + .../4_0_0/schemas/coverage.schema.js | 275 ++ .../4_0_0/schemas/coverageclass.schema.js | 60 + .../coveragecosttobeneficiary.schema.js | 57 + ...veragecosttobeneficiaryexception.schema.js | 45 + .../coverageeligibilityrequest.schema.js | 249 ++ ...erageeligibilityrequestinsurance.schema.js | 76 + .../coverageeligibilityrequestitem.schema.js | 135 + ...eeligibilityrequestitemdiagnosis.schema.js | 58 + ...eligibilityrequestsupportinginfo.schema.js | 78 + .../coverageeligibilityresponse.schema.js | 254 ++ ...coverageeligibilityresponseerror.schema.js | 42 + ...rageeligibilityresponseinsurance.schema.js | 77 + ...eligibilityresponseinsuranceitem.schema.js | 147 + ...lityresponseinsuranceitembenefit.schema.js | 92 + .../4_0_0/schemas/datarequirement.schema.js | 111 + .../datarequirementcodefilter.schema.js | 63 + .../datarequirementdatefilter.schema.js | 68 + .../schemas/datarequirementsort.schema.js | 51 + .../4_0_0/schemas/detectedissue.schema.js | 213 + .../schemas/detectedissueevidence.schema.js | 59 + .../schemas/detectedissuemitigation.schema.js | 73 + src/resources/4_0_0/schemas/device.schema.js | 295 ++ .../4_0_0/schemas/devicedefinition.schema.js | 244 ++ .../devicedefinitioncapability.schema.js | 45 + .../devicedefinitiondevicename.schema.js | 56 + .../devicedefinitionmaterial.schema.js | 58 + .../devicedefinitionproperty.schema.js | 50 + .../devicedefinitionspecialization.schema.js | 55 + ...icedefinitionudideviceidentifier.schema.js | 64 + .../4_0_0/schemas/devicedevicename.schema.js | 56 + .../4_0_0/schemas/devicemetric.schema.js | 169 + .../schemas/devicemetriccalibration.schema.js | 58 + .../4_0_0/schemas/deviceproperty.schema.js | 50 + .../4_0_0/schemas/devicerequest.schema.js | 441 +++ .../schemas/devicerequestparameter.schema.js | 62 + .../schemas/devicespecialization.schema.js | 51 + .../4_0_0/schemas/deviceudicarrier.schema.js | 93 + .../schemas/deviceusestatement.schema.js | 291 ++ .../4_0_0/schemas/deviceversion.schema.js | 53 + .../4_0_0/schemas/diagnosticreport.schema.js | 349 ++ .../schemas/diagnosticreportmedia.schema.js | 63 + .../4_0_0/schemas/distance.schema.js | 83 + .../4_0_0/schemas/documentmanifest.schema.js | 266 ++ .../schemas/documentmanifestrelated.schema.js | 57 + .../4_0_0/schemas/documentreference.schema.js | 267 ++ .../documentreferencecontent.schema.js | 47 + .../documentreferencecontext.schema.js | 112 + .../documentreferencerelatesto.schema.js | 64 + .../4_0_0/schemas/domainresource.schema.js | 84 + src/resources/4_0_0/schemas/dosage.schema.js | 119 + .../4_0_0/schemas/dosagedoseandrate.schema.js | 52 + .../4_0_0/schemas/duration.schema.js | 82 + .../schemas/effectevidencesynthesis.schema.js | 360 ++ ...effectevidencesynthesiscertainty.schema.js | 47 + ...iscertaintycertaintysubcomponent.schema.js | 45 + ...tevidencesynthesiseffectestimate.schema.js | 73 + ...seffectestimateprecisionestimate.schema.js | 66 + ...idencesynthesisresultsbyexposure.schema.js | 78 + ...ffectevidencesynthesissamplesize.schema.js | 63 + src/resources/4_0_0/schemas/element.schema.js | 28 + .../4_0_0/schemas/elementdefinition.schema.js | 1496 +++++++ .../schemas/elementdefinitionbase.schema.js | 63 + .../elementdefinitionbinding.schema.js | 64 + .../elementdefinitionconstraint.schema.js | 105 + .../elementdefinitionexample.schema.js | 400 ++ .../elementdefinitionmapping.schema.js | 72 + .../elementdefinitionslicing.schema.js | 69 + ...ntdefinitionslicingdiscriminator.schema.js | 53 + .../schemas/elementdefinitiontype.schema.js | 85 + .../4_0_0/schemas/encounter.schema.js | 304 ++ .../schemas/encounterclasshistory.schema.js | 45 + .../schemas/encounterdiagnosis.schema.js | 75 + .../encounterhospitalization.schema.js | 109 + .../4_0_0/schemas/encounterlocation.schema.js | 74 + .../schemas/encounterparticipant.schema.js | 70 + .../schemas/encounterstatushistory.schema.js | 52 + .../4_0_0/schemas/endpoint.schema.js | 174 + .../4_0_0/schemas/enrollmentrequest.schema.js | 171 + .../schemas/enrollmentresponse.schema.js | 175 + .../4_0_0/schemas/episodeofcare.schema.js | 220 ++ .../schemas/episodeofcarediagnosis.schema.js | 69 + .../episodeofcarestatushistory.schema.js | 53 + .../4_0_0/schemas/eventdefinition.schema.js | 320 ++ .../4_0_0/schemas/evidence.schema.js | 328 ++ .../4_0_0/schemas/evidencevariable.schema.js | 296 ++ .../evidencevariablecharacteristic.schema.js | 155 + .../4_0_0/schemas/examplescenario.schema.js | 218 ++ .../schemas/examplescenarioactor.schema.js | 70 + .../schemas/examplescenarioinstance.schema.js | 83 + ...cenarioinstancecontainedinstance.schema.js | 55 + .../examplescenarioinstanceversion.schema.js | 53 + .../schemas/examplescenarioprocess.schema.js | 73 + .../examplescenarioprocessstep.schema.js | 56 + ...lescenarioprocessstepalternative.schema.js | 57 + ...mplescenarioprocessstepoperation.schema.js | 106 + .../schemas/explanationofbenefit.schema.js | 462 +++ .../explanationofbenefitaccident.schema.js | 71 + .../explanationofbenefitadditem.schema.js | 199 + ...xplanationofbenefitadditemdetail.schema.js | 90 + ...nofbenefitadditemdetailsubdetail.schema.js | 83 + ...planationofbenefitbenefitbalance.schema.js | 90 + ...ofbenefitbenefitbalancefinancial.schema.js | 82 + .../explanationofbenefitcareteam.schema.js | 94 + .../explanationofbenefitdiagnosis.schema.js | 84 + .../explanationofbenefitinsurance.schema.js | 76 + .../explanationofbenefititem.schema.js | 233 ++ ...anationofbenefititemadjudication.schema.js | 62 + .../explanationofbenefititemdetail.schema.js | 130 + ...tionofbenefititemdetailsubdetail.schema.js | 124 + .../explanationofbenefitpayee.schema.js | 75 + .../explanationofbenefitpayment.schema.js | 65 + .../explanationofbenefitprocedure.schema.js | 99 + .../explanationofbenefitprocessnote.schema.js | 65 + .../explanationofbenefitrelated.schema.js | 59 + ...planationofbenefitsupportinginfo.schema.js | 124 + .../explanationofbenefittotal.schema.js | 46 + .../4_0_0/schemas/expression.schema.js | 82 + .../4_0_0/schemas/extension.schema.js | 401 ++ .../schemas/familymemberhistory.schema.js | 319 ++ .../familymemberhistorycondition.schema.js | 88 + src/resources/4_0_0/schemas/flag.schema.js | 204 + src/resources/4_0_0/schemas/goal.schema.js | 274 ++ .../4_0_0/schemas/goaltarget.schema.js | 109 + .../4_0_0/schemas/graphdefinition.schema.js | 215 ++ .../schemas/graphdefinitionlink.schema.js | 85 + .../graphdefinitionlinktarget.schema.js | 69 + ...hdefinitionlinktargetcompartment.schema.js | 80 + src/resources/4_0_0/schemas/group.schema.js | 185 + .../schemas/groupcharacteristic.schema.js | 88 + .../4_0_0/schemas/groupmember.schema.js | 96 + .../4_0_0/schemas/guidanceresponse.schema.js | 287 ++ .../4_0_0/schemas/healthcareservice.schema.js | 281 ++ .../healthcareserviceavailabletime.schema.js | 79 + .../healthcareserviceeligibility.schema.js | 44 + .../healthcareservicenotavailable.schema.js | 52 + .../4_0_0/schemas/humanname.schema.js | 90 + .../4_0_0/schemas/identifier.schema.js | 85 + .../4_0_0/schemas/imagingstudy.schema.js | 360 ++ .../schemas/imagingstudyseries.schema.js | 141 + .../imagingstudyseriesinstance.schema.js | 69 + .../imagingstudyseriesperformer.schema.js | 84 + .../4_0_0/schemas/immunization.schema.js | 317 ++ .../schemas/immunizationeducation.schema.js | 68 + .../schemas/immunizationevaluation.schema.js | 225 ++ .../schemas/immunizationperformer.schema.js | 69 + .../immunizationprotocolapplied.schema.js | 101 + .../schemas/immunizationreaction.schema.js | 68 + .../immunizationrecommendation.schema.js | 138 + ...tionrecommendationrecommendation.schema.js | 167 + ...ationrecommendationdatecriterion.schema.js | 51 + .../schemas/implementationguide.schema.js | 254 ++ .../implementationguidedefinition.schema.js | 70 + ...mentationguidedefinitiongrouping.schema.js | 55 + ...mplementationguidedefinitionpage.schema.js | 82 + ...entationguidedefinitionparameter.schema.js | 56 + ...mentationguidedefinitionresource.schema.js | 118 + ...mentationguidedefinitiontemplate.schema.js | 62 + .../implementationguidedependson.schema.js | 69 + .../implementationguideglobal.schema.js | 57 + .../implementationguidemanifest.schema.js | 83 + .../implementationguidemanifestpage.schema.js | 61 + ...lementationguidemanifestresource.schema.js | 86 + .../4_0_0/schemas/insuranceplan.schema.js | 222 ++ .../schemas/insuranceplancontact.schema.js | 49 + .../schemas/insuranceplancoverage.schema.js | 66 + .../insuranceplancoveragebenefit.schema.js | 58 + ...nsuranceplancoveragebenefitlimit.schema.js | 41 + .../4_0_0/schemas/insuranceplanplan.schema.js | 94 + .../insuranceplanplangeneralcost.schema.js | 59 + .../insuranceplanplanspecificcost.schema.js | 49 + ...ranceplanplanspecificcostbenefit.schema.js | 48 + ...eplanplanspecificcostbenefitcost.schema.js | 57 + src/resources/4_0_0/schemas/invoice.schema.js | 229 ++ .../4_0_0/schemas/invoicelineitem.schema.js | 76 + .../invoicelineitempricecomponent.schema.js | 66 + .../schemas/invoiceparticipant.schema.js | 82 + src/resources/4_0_0/schemas/library.schema.js | 331 ++ src/resources/4_0_0/schemas/linkage.schema.js | 127 + .../4_0_0/schemas/linkageitem.schema.js | 65 + src/resources/4_0_0/schemas/list.schema.js | 218 ++ .../4_0_0/schemas/listentry.schema.js | 78 + .../4_0_0/schemas/location.schema.js | 230 ++ .../locationhoursofoperation.schema.js | 73 + .../4_0_0/schemas/locationposition.schema.js | 68 + .../4_0_0/schemas/marketingstatus.schema.js | 69 + src/resources/4_0_0/schemas/measure.schema.js | 421 ++ .../4_0_0/schemas/measuregroup.schema.js | 54 + .../schemas/measuregrouppopulation.schema.js | 56 + .../schemas/measuregroupstratifier.schema.js | 59 + .../measuregroupstratifiercomponent.schema.js | 57 + .../4_0_0/schemas/measurereport.schema.js | 230 ++ .../schemas/measurereportgroup.schema.js | 56 + .../measurereportgrouppopulation.schema.js | 65 + .../measurereportgroupstratifier.schema.js | 44 + ...surereportgroupstratifierstratum.schema.js | 55 + ...tgroupstratifierstratumcomponent.schema.js | 45 + ...groupstratifierstratumpopulation.schema.js | 66 + .../schemas/measuresupplementaldata.schema.js | 60 + src/resources/4_0_0/schemas/media.schema.js | 355 ++ .../4_0_0/schemas/medication.schema.js | 134 + .../medicationadministration.schema.js | 341 ++ .../medicationadministrationdosage.schema.js | 72 + ...edicationadministrationperformer.schema.js | 78 + .../4_0_0/schemas/medicationbatch.schema.js | 51 + .../schemas/medicationdispense.schema.js | 376 ++ .../medicationdispenseperformer.schema.js | 82 + .../medicationdispensesubstitution.schema.js | 83 + .../schemas/medicationingredient.schema.js | 82 + .../schemas/medicationknowledge.schema.js | 250 ++ ...nowledgeadministrationguidelines.schema.js | 71 + ...geadministrationguidelinesdosage.schema.js | 46 + ...guidelinespatientcharacteristics.schema.js | 57 + .../schemas/medicationknowledgecost.schema.js | 56 + ...ationknowledgedrugcharacteristic.schema.js | 62 + .../medicationknowledgeingredient.schema.js | 77 + .../medicationknowledgekinetics.schema.js | 46 + ...nknowledgemedicineclassification.schema.js | 47 + ...cationknowledgemonitoringprogram.schema.js | 44 + .../medicationknowledgemonograph.schema.js | 61 + .../medicationknowledgepackaging.schema.js | 42 + .../medicationknowledgeregulatory.schema.js | 72 + ...onknowledgeregulatorymaxdispense.schema.js | 46 + ...ationknowledgeregulatoryschedule.schema.js | 41 + ...nknowledgeregulatorysubstitution.schema.js | 52 + ...wledgerelatedmedicationknowledge.schema.js | 63 + .../4_0_0/schemas/medicationrequest.schema.js | 558 +++ ...medicationrequestdispenserequest.schema.js | 87 + ...equestdispenserequestinitialfill.schema.js | 42 + .../medicationrequestsubstitution.schema.js | 58 + .../schemas/medicationstatement.schema.js | 355 ++ .../4_0_0/schemas/medicinalproduct.schema.js | 270 ++ .../medicinalproductauthorization.schema.js | 215 ++ ...ationjurisdictionalauthorization.schema.js | 52 + ...nalproductauthorizationprocedure.schema.js | 58 + ...medicinalproductcontraindication.schema.js | 152 + ...ductcontraindicationothertherapy.schema.js | 80 + .../medicinalproductindication.schema.js | 163 + ...nalproductindicationothertherapy.schema.js | 80 + .../medicinalproductingredient.schema.js | 129 + ...ductingredientspecifiedsubstance.schema.js | 57 + ...edientspecifiedsubstancestrength.schema.js | 77 + ...bstancestrengthreferencestrength.schema.js | 64 + ...icinalproductingredientsubstance.schema.js | 41 + .../medicinalproductinteraction.schema.js | 149 + ...nalproductinteractioninteractant.schema.js | 75 + .../medicinalproductmanufactured.schema.js | 142 + ...ctmanufacturingbusinessoperation.schema.js | 90 + .../schemas/medicinalproductname.schema.js | 57 + ...icinalproductnamecountrylanguage.schema.js | 49 + .../medicinalproductnamenamepart.schema.js | 50 + .../medicinalproductpackaged.schema.js | 166 + ...alproductpackagedbatchidentifier.schema.js | 47 + ...icinalproductpackagedpackageitem.schema.js | 120 + .../medicinalproductpharmaceutical.schema.js | 146 + ...uctpharmaceuticalcharacteristics.schema.js | 45 + ...rmaceuticalrouteofadministration.schema.js | 72 + ...uteofadministrationtargetspecies.schema.js | 48 + ...iontargetspecieswithdrawalperiod.schema.js | 55 + ...dicinalproductspecialdesignation.schema.js | 86 + ...edicinalproductundesirableeffect.schema.js | 124 + .../4_0_0/schemas/messagedefinition.schema.js | 298 ++ ...messagedefinitionallowedresponse.schema.js | 58 + .../schemas/messagedefinitionfocus.schema.js | 80 + .../4_0_0/schemas/messageheader.schema.js | 236 ++ .../messageheaderdestination.schema.js | 95 + .../schemas/messageheaderresponse.schema.js | 73 + .../schemas/messageheadersource.schema.js | 79 + src/resources/4_0_0/schemas/meta.schema.js | 82 + .../4_0_0/schemas/metadataresource.schema.js | 182 + .../4_0_0/schemas/molecularsequence.schema.js | 233 ++ .../molecularsequencequality.schema.js | 162 + .../molecularsequencequalityroc.schema.js | 108 + .../molecularsequencereferenceseq.schema.js | 123 + .../molecularsequencerepository.schema.js | 97 + ...olecularsequencestructurevariant.schema.js | 69 + ...larsequencestructurevariantinner.schema.js | 57 + ...larsequencestructurevariantouter.schema.js | 57 + .../molecularsequencevariant.schema.js | 103 + src/resources/4_0_0/schemas/money.schema.js | 50 + .../4_0_0/schemas/moneyquantity.schema.js | 12 + .../4_0_0/schemas/namingsystem.schema.js | 193 + .../schemas/namingsystemuniqueid.schema.js | 82 + .../4_0_0/schemas/narrative.schema.js | 55 + .../4_0_0/schemas/nutritionorder.schema.js | 246 ++ .../nutritionorderenteralformula.schema.js | 94 + ...rderenteralformulaadministration.schema.js | 52 + .../schemas/nutritionorderoraldiet.schema.js | 71 + .../nutritionorderoraldietnutrient.schema.js | 41 + .../nutritionorderoraldiettexture.schema.js | 42 + .../nutritionordersupplement.schema.js | 66 + .../4_0_0/schemas/observation.schema.js | 542 +++ .../schemas/observationcomponent.schema.js | 136 + .../schemas/observationdefinition.schema.js | 210 + ...ationdefinitionqualifiedinterval.schema.js | 86 + ...iondefinitionquantitativedetails.schema.js | 68 + .../observationreferencerange.schema.js | 67 + .../schemas/operationdefinition.schema.js | 318 ++ .../operationdefinitionoverload.schema.js | 48 + .../operationdefinitionparameter.schema.js | 124 + ...rationdefinitionparameterbinding.schema.js | 59 + ...efinitionparameterreferencedfrom.schema.js | 57 + .../4_0_0/schemas/operationoutcome.schema.js | 91 + .../schemas/operationoutcomeissue.schema.js | 91 + .../4_0_0/schemas/organization.schema.js | 164 + .../schemas/organizationaffiliation.schema.js | 217 ++ .../schemas/organizationcontact.schema.js | 49 + .../schemas/parameterdefinition.schema.js | 102 + .../4_0_0/schemas/parameters.schema.js | 67 + .../schemas/parametersparameter.schema.js | 341 ++ src/resources/4_0_0/schemas/patient.schema.js | 232 ++ .../schemas/patientcommunication.schema.js | 53 + .../4_0_0/schemas/patientcontact.schema.js | 86 + .../4_0_0/schemas/patientlink.schema.js | 70 + .../4_0_0/schemas/paymentnotice.schema.js | 233 ++ .../schemas/paymentreconciliation.schema.js | 217 ++ .../paymentreconciliationdetail.schema.js | 161 + ...paymentreconciliationprocessnote.schema.js | 51 + src/resources/4_0_0/schemas/period.schema.js | 47 + src/resources/4_0_0/schemas/person.schema.js | 151 + .../4_0_0/schemas/personlink.schema.js | 79 + .../4_0_0/schemas/plandefinition.schema.js | 339 ++ .../schemas/plandefinitionaction.schema.js | 286 ++ .../plandefinitionactioncondition.schema.js | 51 + ...plandefinitionactiondynamicvalue.schema.js | 47 + .../plandefinitionactionparticipant.schema.js | 51 + ...landefinitionactionrelatedaction.schema.js | 65 + .../schemas/plandefinitiongoal.schema.js | 69 + .../plandefinitiongoaltarget.schema.js | 57 + .../4_0_0/schemas/population.schema.js | 54 + .../4_0_0/schemas/practitioner.schema.js | 144 + .../practitionerqualification.schema.js | 65 + .../4_0_0/schemas/practitionerrole.schema.js | 221 ++ .../practitionerroleavailabletime.schema.js | 79 + .../practitionerrolenotavailable.schema.js | 52 + .../4_0_0/schemas/procedure.schema.js | 478 +++ .../schemas/procedurefocaldevice.schema.js | 60 + .../schemas/procedureperformer.schema.js | 95 + .../schemas/prodcharacteristic.schema.js | 101 + .../4_0_0/schemas/productshelflife.schema.js | 57 + .../4_0_0/schemas/provenance.schema.js | 173 + .../4_0_0/schemas/provenanceagent.schema.js | 124 + .../4_0_0/schemas/provenanceentity.schema.js | 64 + .../4_0_0/schemas/quantity.schema.js | 83 + .../4_0_0/schemas/questionnaire.schema.js | 274 ++ .../4_0_0/schemas/questionnaireitem.schema.js | 174 + .../questionnaireitemansweroption.schema.js | 115 + .../questionnaireitemenablewhen.schema.js | 161 + .../questionnaireiteminitial.schema.js | 136 + .../schemas/questionnaireresponse.schema.js | 266 ++ .../questionnaireresponseitem.schema.js | 74 + .../questionnaireresponseitemanswer.schema.js | 155 + src/resources/4_0_0/schemas/range.schema.js | 36 + src/resources/4_0_0/schemas/ratio.schema.js | 36 + .../4_0_0/schemas/reference.schema.js | 64 + .../4_0_0/schemas/relatedartifact.schema.js | 99 + .../4_0_0/schemas/relatedperson.schema.js | 164 + .../relatedpersoncommunication.schema.js | 53 + .../4_0_0/schemas/requestgroup.schema.js | 293 ++ .../schemas/requestgroupaction.schema.js | 240 ++ .../requestgroupactioncondition.schema.js | 51 + .../requestgroupactionrelatedaction.schema.js | 65 + .../schemas/researchdefinition.schema.js | 406 ++ .../researchelementdefinition.schema.js | 376 ++ ...helementdefinitioncharacteristic.schema.js | 173 + .../4_0_0/schemas/researchstudy.schema.js | 284 ++ .../4_0_0/schemas/researchstudyarm.schema.js | 60 + .../schemas/researchstudyobjective.schema.js | 46 + .../4_0_0/schemas/researchsubject.schema.js | 170 + .../4_0_0/schemas/resource.schema.js | 61 + .../4_0_0/schemas/resourcelist.schema.js | 606 +++ .../4_0_0/schemas/riskassessment.schema.js | 298 ++ .../riskassessmentprediction.schema.js | 92 + .../schemas/riskevidencesynthesis.schema.js | 329 ++ .../riskevidencesynthesiscertainty.schema.js | 47 + ...iscertaintycertaintysubcomponent.schema.js | 45 + ...iskevidencesynthesisriskestimate.schema.js | 87 + ...sisriskestimateprecisionestimate.schema.js | 66 + .../riskevidencesynthesissamplesize.schema.js | 63 + .../4_0_0/schemas/sampleddata.schema.js | 100 + .../4_0_0/schemas/schedule.schema.js | 175 + .../4_0_0/schemas/searchparameter.schema.js | 319 ++ .../searchparametercomponent.schema.js | 58 + .../4_0_0/schemas/servicerequest.schema.js | 551 +++ .../4_0_0/schemas/signature.schema.js | 156 + .../4_0_0/schemas/simplequantity.schema.js | 11 + src/resources/4_0_0/schemas/slot.schema.js | 174 + .../4_0_0/schemas/specimen.schema.js | 204 + .../schemas/specimencollection.schema.js | 102 + .../4_0_0/schemas/specimencontainer.schema.js | 85 + .../schemas/specimendefinition.schema.js | 116 + .../specimendefinitiontypetested.schema.js | 91 + ...mendefinitiontypetestedcontainer.schema.js | 87 + ...itiontypetestedcontaineradditive.schema.js | 61 + ...imendefinitiontypetestedhandling.schema.js | 57 + .../schemas/specimenprocessing.schema.js | 81 + .../schemas/structuredefinition.schema.js | 310 ++ .../structuredefinitioncontext.schema.js | 58 + .../structuredefinitiondifferential.schema.js | 43 + .../structuredefinitionmapping.schema.js | 77 + .../structuredefinitionsnapshot.schema.js | 43 + .../4_0_0/schemas/structuremap.schema.js | 238 ++ .../4_0_0/schemas/structuremapgroup.schema.js | 90 + .../schemas/structuremapgroupinput.schema.js | 71 + .../schemas/structuremapgrouprule.schema.js | 70 + .../structuremapgroupruledependent.schema.js | 54 + .../structuremapgrouprulesource.schema.js | 487 +++ .../structuremapgroupruletarget.schema.js | 98 + ...cturemapgroupruletargetparameter.schema.js | 81 + .../schemas/structuremapstructure.schema.js | 73 + .../4_0_0/schemas/subscription.schema.js | 142 + .../schemas/subscriptionchannel.schema.js | 77 + .../4_0_0/schemas/substance.schema.js | 124 + .../4_0_0/schemas/substanceamount.schema.js | 70 + .../substanceamountreferencerange.schema.js | 35 + .../schemas/substanceingredient.schema.js | 64 + .../4_0_0/schemas/substanceinstance.schema.js | 52 + .../schemas/substancenucleicacid.schema.js | 120 + .../substancenucleicacidsubunit.schema.js | 91 + ...bstancenucleicacidsubunitlinkage.schema.js | 65 + ...substancenucleicacidsubunitsugar.schema.js | 57 + .../4_0_0/schemas/substancepolymer.schema.js | 112 + .../substancepolymermonomerset.schema.js | 42 + ...olymermonomersetstartingmaterial.schema.js | 57 + .../schemas/substancepolymerrepeat.schema.js | 63 + ...substancepolymerrepeatrepeatunit.schema.js | 60 + ...repeatunitdegreeofpolymerisation.schema.js | 40 + ...peatunitstructuralrepresentation.schema.js | 48 + .../4_0_0/schemas/substanceprotein.schema.js | 116 + .../schemas/substanceproteinsubunit.schema.js | 100 + .../substancereferenceinformation.schema.js | 120 + ...ferenceinformationclassification.schema.js | 65 + ...ubstancereferenceinformationgene.schema.js | 60 + ...ereferenceinformationgeneelement.schema.js | 60 + ...stancereferenceinformationtarget.schema.js | 92 + .../schemas/substancesourcematerial.schema.js | 169 + ...ourcematerialfractiondescription.schema.js | 47 + .../substancesourcematerialorganism.schema.js | 74 + ...ancesourcematerialorganismauthor.schema.js | 47 + ...ancesourcematerialorganismhybrid.schema.js | 76 + ...ematerialorganismorganismgeneral.schema.js | 48 + ...ncesourcematerialpartdescription.schema.js | 42 + .../schemas/substancespecification.schema.js | 233 ++ .../substancespecificationcode.schema.js | 79 + .../substancespecificationmoiety.schema.js | 76 + .../substancespecificationname.schema.js | 97 + ...bstancespecificationnameofficial.schema.js | 49 + .../substancespecificationproperty.schema.js | 95 + ...bstancespecificationrelationship.schema.js | 123 + .../substancespecificationstructure.schema.js | 91 + ...ncespecificationstructureisotope.schema.js | 54 + ...nstructureisotopemolecularweight.schema.js | 46 + ...ificationstructurerepresentation.schema.js | 51 + .../4_0_0/schemas/supplydelivery.schema.js | 238 ++ .../supplydeliverysupplieditem.schema.js | 72 + .../4_0_0/schemas/supplyrequest.schema.js | 310 ++ .../schemas/supplyrequestparameter.schema.js | 62 + src/resources/4_0_0/schemas/task.schema.js | 441 +++ .../4_0_0/schemas/taskinput.schema.js | 332 ++ .../4_0_0/schemas/taskoutput.schema.js | 331 ++ .../4_0_0/schemas/taskrestriction.schema.js | 91 + .../schemas/terminologycapabilities.schema.js | 278 ++ .../terminologycapabilitiesclosure.schema.js | 45 + ...erminologycapabilitiescodesystem.schema.js | 63 + ...ogycapabilitiescodesystemversion.schema.js | 88 + ...abilitiescodesystemversionfilter.schema.js | 54 + ...terminologycapabilitiesexpansion.schema.js | 75 + ...gycapabilitiesexpansionparameter.schema.js | 54 + ...nologycapabilitiesimplementation.schema.js | 56 + .../terminologycapabilitiessoftware.schema.js | 55 + ...rminologycapabilitiestranslation.schema.js | 46 + ...minologycapabilitiesvalidatecode.schema.js | 46 + .../4_0_0/schemas/testreport.schema.js | 184 + .../schemas/testreportparticipant.schema.js | 63 + .../4_0_0/schemas/testreportsetup.schema.js | 43 + .../schemas/testreportsetupaction.schema.js | 41 + .../testreportsetupactionassert.schema.js | 62 + .../testreportsetupactionoperation.schema.js | 63 + .../schemas/testreportteardown.schema.js | 43 + .../testreportteardownaction.schema.js | 32 + .../4_0_0/schemas/testreporttest.schema.js | 63 + .../schemas/testreporttestaction.schema.js | 32 + .../4_0_0/schemas/testscript.schema.js | 271 ++ .../schemas/testscriptdestination.schema.js | 52 + .../4_0_0/schemas/testscriptfixture.schema.js | 74 + .../schemas/testscriptmetadata.schema.js | 49 + .../testscriptmetadatacapability.schema.js | 107 + .../schemas/testscriptmetadatalink.schema.js | 56 + .../4_0_0/schemas/testscriptorigin.schema.js | 52 + .../4_0_0/schemas/testscriptsetup.schema.js | 43 + .../schemas/testscriptsetupaction.schema.js | 41 + .../testscriptsetupactionassert.schema.js | 250 ++ .../testscriptsetupactionoperation.schema.js | 195 + ...etupactionoperationrequestheader.schema.js | 53 + .../schemas/testscriptteardown.schema.js | 43 + .../testscriptteardownaction.schema.js | 32 + .../4_0_0/schemas/testscripttest.schema.js | 63 + .../schemas/testscripttestaction.schema.js | 32 + .../schemas/testscriptvariable.schema.js | 116 + src/resources/4_0_0/schemas/timing.schema.js | 51 + .../4_0_0/schemas/timingrepeat.schema.js | 185 + .../4_0_0/schemas/triggerdefinition.schema.js | 98 + .../4_0_0/schemas/usagecontext.schema.js | 97 + .../4_0_0/schemas/valueset.schema.js | 237 ++ .../4_0_0/schemas/valuesetcompose.schema.js | 66 + .../schemas/valuesetcomposeinclude.schema.js | 77 + .../valuesetcomposeincludeconcept.schema.js | 65 + ...composeincludeconceptdesignation.schema.js | 58 + .../valuesetcomposeincludefilter.schema.js | 68 + .../4_0_0/schemas/valuesetexpansion.schema.js | 89 + .../valuesetexpansioncontains.schema.js | 97 + .../valuesetexpansionparameter.schema.js | 109 + .../schemas/verificationresult.schema.js | 187 + .../verificationresultattestation.schema.js | 129 + .../verificationresultprimarysource.schema.js | 94 + .../verificationresultvalidator.schema.js | 68 + .../schemas/visionprescription.schema.js | 179 + ...ionprescriptionlensspecification.schema.js | 144 + ...escriptionlensspecificationprism.schema.js | 57 + src/utils/__mocks__/profile.no.export.js | 4 + .../__mocks__/profile.no.schema.js} | 5 +- src/utils/router.utils.js | 5 +- src/utils/router.utils.test.js | 2 +- src/utils/schema.utils.test.js | 5 +- src/utils/scope.utils.js | 124 - src/utils/scope.utils.test.js | 195 - yarn.lock | 3300 +++++++++++----- 4806 files changed, 409469 insertions(+), 143661 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 src/environment.js delete mode 100644 src/resources/1_0_2/parameters/common.parameters.js create mode 100644 src/resources/1_0_2/parameters/resource.parameters.js rename src/resources/1_0_2/profiles/account/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/allergyintolerance/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/appointment/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/appointmentresponse/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/auditevent/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/basic/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/binary/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/bodysite/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/bundle/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/careplan/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/claim/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/claimresponse/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/clinicalimpression/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/communication/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/communicationrequest/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/composition/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/conceptmap/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/condition/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/conformance/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/contract/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/coverage/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/dataelement/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/detectedissue/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/device/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/devicecomponent/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/devicemetric/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/deviceuserequest/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/deviceusestatement/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/diagnosticorder/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/diagnosticreport/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/documentmanifest/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/documentreference/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/eligibilityrequest/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/eligibilityresponse/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/encounter/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/enrollmentrequest/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/enrollmentresponse/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/episodeofcare/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/explanationofbenefit/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/familymemberhistory/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/flag/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/goal/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/group/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/healthcareservice/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/imagingobjectselection/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/imagingstudy/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/immunization/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/immunizationrecommendation/{index.js => register.js} (90%) rename src/resources/1_0_2/profiles/implementationguide/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/list/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/location/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/media/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/medication/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/medicationadministration/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/medicationdispense/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/medicationorder/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/medicationstatement/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/messageheader/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/namingsystem/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/nutritionorder/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/observation/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/operationdefinition/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/order/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/orderresponse/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/organization/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/patient/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/paymentnotice/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/paymentreconciliation/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/person/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/practitioner/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/procedure/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/procedurerequest/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/processrequest/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/processresponse/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/provenance/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/questionnaire/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/questionnaireresponse/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/referralrequest/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/relatedperson/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/riskassessment/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/schedule/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/searchparameter/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/slot/{index.js => register.js} (93%) rename src/resources/1_0_2/profiles/specimen/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/structuredefinition/{index.js => register.js} (91%) rename src/resources/1_0_2/profiles/subscription/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/substance/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/supplydelivery/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/supplyrequest/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/testscript/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/valueset/{index.js => register.js} (92%) rename src/resources/1_0_2/profiles/visionprescription/{index.js => register.js} (91%) create mode 100644 src/resources/1_0_2/scalars/boolean.scalar.js delete mode 100644 src/resources/1_0_2/scalars/date.scalar.test.js create mode 100644 src/resources/1_0_2/scalars/decimal.scalar.js create mode 100644 src/resources/1_0_2/scalars/integer.scalar.js create mode 100644 src/resources/1_0_2/scalars/markdown.scalar.js delete mode 100644 src/resources/1_0_2/scalars/oid.scalar.test.js create mode 100644 src/resources/1_0_2/scalars/string.scalar.js delete mode 100644 src/resources/1_0_2/scalars/time.scalar.test.js delete mode 100644 src/resources/1_0_2/scalars/unsignedint.scalar.test.js delete mode 100644 src/resources/1_0_2/scalars/uuid.scalar.test.js create mode 100644 src/resources/3_0_1/inputs/metadataresource.input.js delete mode 100644 src/resources/3_0_1/parameters/common.parameters.js create mode 100644 src/resources/3_0_1/parameters/domainresource.parameters.js create mode 100644 src/resources/3_0_1/parameters/resource.parameters.js delete mode 100644 src/resources/3_0_1/profiles/__mocks__/undefined.export.js rename src/resources/3_0_1/profiles/account/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/activitydefinition/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/adverseevent/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/allergyintolerance/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/appointment/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/appointmentresponse/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/auditevent/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/basic/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/binary/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/bodysite/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/bundle/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/capabilitystatement/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/careplan/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/careteam/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/chargeitem/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/claim/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/claimresponse/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/clinicalimpression/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/codesystem/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/communication/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/communicationrequest/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/compartmentdefinition/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/composition/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/conceptmap/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/condition/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/consent/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/contract/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/coverage/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/dataelement/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/detectedissue/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/device/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/devicecomponent/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/devicemetric/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/devicerequest/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/deviceusestatement/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/diagnosticreport/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/documentmanifest/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/documentreference/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/eligibilityrequest/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/eligibilityresponse/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/encounter/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/endpoint/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/enrollmentrequest/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/enrollmentresponse/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/episodeofcare/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/expansionprofile/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/explanationofbenefit/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/familymemberhistory/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/flag/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/goal/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/graphdefinition/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/group/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/guidanceresponse/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/healthcareservice/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/imagingmanifest/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/imagingstudy/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/immunization/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/immunizationrecommendation/{index.js => register.js} (90%) rename src/resources/3_0_1/profiles/implementationguide/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/library/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/linkage/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/list/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/location/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/measure/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/measurereport/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/media/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/medication/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/medicationadministration/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/medicationdispense/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/medicationrequest/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/medicationstatement/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/messagedefinition/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/messageheader/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/namingsystem/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/nutritionorder/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/observation/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/operationdefinition/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/organization/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/patient/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/paymentnotice/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/paymentreconciliation/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/person/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/plandefinition/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/practitioner/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/practitionerrole/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/procedure/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/procedurerequest/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/processrequest/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/processresponse/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/provenance/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/questionnaire/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/questionnaireresponse/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/referralrequest/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/relatedperson/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/requestgroup/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/researchstudy/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/researchsubject/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/riskassessment/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/schedule/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/searchparameter/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/sequence/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/servicedefinition/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/slot/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/specimen/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/structuredefinition/{index.js => register.js} (91%) rename src/resources/3_0_1/profiles/structuremap/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/subscription/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/substance/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/supplydelivery/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/supplyrequest/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/task/{index.js => register.js} (93%) rename src/resources/3_0_1/profiles/testreport/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/testscript/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/valueset/{index.js => register.js} (92%) rename src/resources/3_0_1/profiles/visionprescription/{index.js => register.js} (91%) delete mode 100644 src/resources/3_0_1/scalars/base64.scalar.js create mode 100644 src/resources/3_0_1/scalars/boolean.scalar.js delete mode 100644 src/resources/3_0_1/scalars/date.scalar.test.js delete mode 100644 src/resources/3_0_1/scalars/datetime.scalar.test.js create mode 100644 src/resources/3_0_1/scalars/decimal.scalar.js create mode 100644 src/resources/3_0_1/scalars/integer.scalar.js create mode 100644 src/resources/3_0_1/scalars/markdown.scalar.js delete mode 100644 src/resources/3_0_1/scalars/oid.scalar.test.js delete mode 100644 src/resources/3_0_1/scalars/positiveint.scalar.test.js create mode 100644 src/resources/3_0_1/scalars/string.scalar.js delete mode 100644 src/resources/3_0_1/scalars/time.scalar.test.js delete mode 100644 src/resources/3_0_1/scalars/unsignedint.scalar.test.js delete mode 100644 src/resources/3_0_1/scalars/uuid.scalar.test.js create mode 100644 src/resources/3_0_1/schemas/metadataresource.schema.js create mode 100644 src/resources/4_0_0/inputs/account.input.js create mode 100644 src/resources/4_0_0/inputs/accountcoverage.input.js create mode 100644 src/resources/4_0_0/inputs/accountguarantor.input.js create mode 100644 src/resources/4_0_0/inputs/activitydefinition.input.js create mode 100644 src/resources/4_0_0/inputs/activitydefinitiondynamicvalue.input.js create mode 100644 src/resources/4_0_0/inputs/activitydefinitionparticipant.input.js create mode 100644 src/resources/4_0_0/inputs/address.input.js create mode 100644 src/resources/4_0_0/inputs/adverseevent.input.js create mode 100644 src/resources/4_0_0/inputs/adverseeventsuspectentity.input.js create mode 100644 src/resources/4_0_0/inputs/adverseeventsuspectentitycausality.input.js create mode 100644 src/resources/4_0_0/inputs/age.input.js create mode 100644 src/resources/4_0_0/inputs/allergyintolerance.input.js create mode 100644 src/resources/4_0_0/inputs/allergyintolerancereaction.input.js create mode 100644 src/resources/4_0_0/inputs/annotation.input.js create mode 100644 src/resources/4_0_0/inputs/appointment.input.js create mode 100644 src/resources/4_0_0/inputs/appointmentparticipant.input.js create mode 100644 src/resources/4_0_0/inputs/appointmentresponse.input.js create mode 100644 src/resources/4_0_0/inputs/attachment.input.js create mode 100644 src/resources/4_0_0/inputs/auditevent.input.js create mode 100644 src/resources/4_0_0/inputs/auditeventagent.input.js create mode 100644 src/resources/4_0_0/inputs/auditeventagentnetwork.input.js create mode 100644 src/resources/4_0_0/inputs/auditevententity.input.js create mode 100644 src/resources/4_0_0/inputs/auditevententitydetail.input.js create mode 100644 src/resources/4_0_0/inputs/auditeventsource.input.js create mode 100644 src/resources/4_0_0/inputs/backboneelement.input.js create mode 100644 src/resources/4_0_0/inputs/basic.input.js create mode 100644 src/resources/4_0_0/inputs/binary.input.js create mode 100644 src/resources/4_0_0/inputs/biologicallyderivedproduct.input.js create mode 100644 src/resources/4_0_0/inputs/biologicallyderivedproductcollection.input.js create mode 100644 src/resources/4_0_0/inputs/biologicallyderivedproductmanipulation.input.js create mode 100644 src/resources/4_0_0/inputs/biologicallyderivedproductprocessing.input.js create mode 100644 src/resources/4_0_0/inputs/biologicallyderivedproductstorage.input.js create mode 100644 src/resources/4_0_0/inputs/bodystructure.input.js create mode 100644 src/resources/4_0_0/inputs/bundle.input.js create mode 100644 src/resources/4_0_0/inputs/bundleentry.input.js create mode 100644 src/resources/4_0_0/inputs/bundleentryrequest.input.js create mode 100644 src/resources/4_0_0/inputs/bundleentryresponse.input.js create mode 100644 src/resources/4_0_0/inputs/bundleentrysearch.input.js create mode 100644 src/resources/4_0_0/inputs/bundlelink.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatement.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementdocument.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementimplementation.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementmessaging.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementmessagingendpoint.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementmessagingsupportedmessage.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementrest.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementrestinteraction.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementrestresource.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementrestresourceinteraction.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementrestresourceoperation.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementrestresourcesearchparam.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementrestsecurity.input.js create mode 100644 src/resources/4_0_0/inputs/capabilitystatementsoftware.input.js create mode 100644 src/resources/4_0_0/inputs/careplan.input.js create mode 100644 src/resources/4_0_0/inputs/careplanactivity.input.js create mode 100644 src/resources/4_0_0/inputs/careplanactivitydetail.input.js create mode 100644 src/resources/4_0_0/inputs/careteam.input.js create mode 100644 src/resources/4_0_0/inputs/careteamparticipant.input.js create mode 100644 src/resources/4_0_0/inputs/catalogentry.input.js create mode 100644 src/resources/4_0_0/inputs/catalogentryrelatedentry.input.js create mode 100644 src/resources/4_0_0/inputs/chargeitem.input.js create mode 100644 src/resources/4_0_0/inputs/chargeitemdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/chargeitemdefinitionapplicability.input.js create mode 100644 src/resources/4_0_0/inputs/chargeitemdefinitionpropertygroup.input.js create mode 100644 src/resources/4_0_0/inputs/chargeitemdefinitionpropertygrouppricecomponent.input.js create mode 100644 src/resources/4_0_0/inputs/chargeitemperformer.input.js create mode 100644 src/resources/4_0_0/inputs/claim.input.js create mode 100644 src/resources/4_0_0/inputs/claimaccident.input.js create mode 100644 src/resources/4_0_0/inputs/claimcareteam.input.js create mode 100644 src/resources/4_0_0/inputs/claimdiagnosis.input.js create mode 100644 src/resources/4_0_0/inputs/claiminsurance.input.js create mode 100644 src/resources/4_0_0/inputs/claimitem.input.js create mode 100644 src/resources/4_0_0/inputs/claimitemdetail.input.js create mode 100644 src/resources/4_0_0/inputs/claimitemdetailsubdetail.input.js create mode 100644 src/resources/4_0_0/inputs/claimpayee.input.js create mode 100644 src/resources/4_0_0/inputs/claimprocedure.input.js create mode 100644 src/resources/4_0_0/inputs/claimrelated.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponse.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseadditem.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseadditemdetail.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseadditemdetailsubdetail.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseerror.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseinsurance.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseitem.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseitemadjudication.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseitemdetail.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseitemdetailsubdetail.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponsepayment.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponseprocessnote.input.js create mode 100644 src/resources/4_0_0/inputs/claimresponsetotal.input.js create mode 100644 src/resources/4_0_0/inputs/claimsupportinginfo.input.js create mode 100644 src/resources/4_0_0/inputs/clinicalimpression.input.js create mode 100644 src/resources/4_0_0/inputs/clinicalimpressionfinding.input.js create mode 100644 src/resources/4_0_0/inputs/clinicalimpressioninvestigation.input.js create mode 100644 src/resources/4_0_0/inputs/codeableconcept.input.js create mode 100644 src/resources/4_0_0/inputs/codesystem.input.js create mode 100644 src/resources/4_0_0/inputs/codesystemconcept.input.js create mode 100644 src/resources/4_0_0/inputs/codesystemconceptdesignation.input.js create mode 100644 src/resources/4_0_0/inputs/codesystemconceptproperty.input.js create mode 100644 src/resources/4_0_0/inputs/codesystemfilter.input.js create mode 100644 src/resources/4_0_0/inputs/codesystemproperty.input.js create mode 100644 src/resources/4_0_0/inputs/coding.input.js create mode 100644 src/resources/4_0_0/inputs/communication.input.js create mode 100644 src/resources/4_0_0/inputs/communicationpayload.input.js create mode 100644 src/resources/4_0_0/inputs/communicationrequest.input.js create mode 100644 src/resources/4_0_0/inputs/communicationrequestpayload.input.js create mode 100644 src/resources/4_0_0/inputs/compartmentdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/compartmentdefinitionresource.input.js create mode 100644 src/resources/4_0_0/inputs/composition.input.js create mode 100644 src/resources/4_0_0/inputs/compositionattester.input.js create mode 100644 src/resources/4_0_0/inputs/compositionevent.input.js create mode 100644 src/resources/4_0_0/inputs/compositionrelatesto.input.js create mode 100644 src/resources/4_0_0/inputs/compositionsection.input.js create mode 100644 src/resources/4_0_0/inputs/conceptmap.input.js create mode 100644 src/resources/4_0_0/inputs/conceptmapgroup.input.js create mode 100644 src/resources/4_0_0/inputs/conceptmapgroupelement.input.js create mode 100644 src/resources/4_0_0/inputs/conceptmapgroupelementtarget.input.js create mode 100644 src/resources/4_0_0/inputs/conceptmapgroupelementtargetdependson.input.js create mode 100644 src/resources/4_0_0/inputs/conceptmapgroupunmapped.input.js create mode 100644 src/resources/4_0_0/inputs/condition.input.js create mode 100644 src/resources/4_0_0/inputs/conditionevidence.input.js create mode 100644 src/resources/4_0_0/inputs/conditionstage.input.js create mode 100644 src/resources/4_0_0/inputs/consent.input.js create mode 100644 src/resources/4_0_0/inputs/consentpolicy.input.js create mode 100644 src/resources/4_0_0/inputs/consentprovision.input.js create mode 100644 src/resources/4_0_0/inputs/consentprovisionactor.input.js create mode 100644 src/resources/4_0_0/inputs/consentprovisiondata.input.js create mode 100644 src/resources/4_0_0/inputs/consentverification.input.js create mode 100644 src/resources/4_0_0/inputs/contactdetail.input.js create mode 100644 src/resources/4_0_0/inputs/contactpoint.input.js create mode 100644 src/resources/4_0_0/inputs/contract.input.js create mode 100644 src/resources/4_0_0/inputs/contractcontentdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/contractfriendly.input.js create mode 100644 src/resources/4_0_0/inputs/contractlegal.input.js create mode 100644 src/resources/4_0_0/inputs/contractrule.input.js create mode 100644 src/resources/4_0_0/inputs/contractsigner.input.js create mode 100644 src/resources/4_0_0/inputs/contractterm.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermaction.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermactionsubject.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermasset.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermassetcontext.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermassetvalueditem.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermoffer.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermofferanswer.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermofferparty.input.js create mode 100644 src/resources/4_0_0/inputs/contracttermsecuritylabel.input.js create mode 100644 src/resources/4_0_0/inputs/contributor.input.js create mode 100644 src/resources/4_0_0/inputs/count.input.js create mode 100644 src/resources/4_0_0/inputs/coverage.input.js create mode 100644 src/resources/4_0_0/inputs/coverageclass.input.js create mode 100644 src/resources/4_0_0/inputs/coveragecosttobeneficiary.input.js create mode 100644 src/resources/4_0_0/inputs/coveragecosttobeneficiaryexception.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityrequest.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityrequestinsurance.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityrequestitem.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityrequestitemdiagnosis.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityrequestsupportinginfo.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityresponse.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityresponseerror.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityresponseinsurance.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityresponseinsuranceitem.input.js create mode 100644 src/resources/4_0_0/inputs/coverageeligibilityresponseinsuranceitembenefit.input.js create mode 100644 src/resources/4_0_0/inputs/datarequirement.input.js create mode 100644 src/resources/4_0_0/inputs/datarequirementcodefilter.input.js create mode 100644 src/resources/4_0_0/inputs/datarequirementdatefilter.input.js create mode 100644 src/resources/4_0_0/inputs/datarequirementsort.input.js create mode 100644 src/resources/4_0_0/inputs/detectedissue.input.js create mode 100644 src/resources/4_0_0/inputs/detectedissueevidence.input.js create mode 100644 src/resources/4_0_0/inputs/detectedissuemitigation.input.js create mode 100644 src/resources/4_0_0/inputs/device.input.js create mode 100644 src/resources/4_0_0/inputs/devicedefinition.input.js create mode 100644 src/resources/4_0_0/inputs/devicedefinitioncapability.input.js create mode 100644 src/resources/4_0_0/inputs/devicedefinitiondevicename.input.js create mode 100644 src/resources/4_0_0/inputs/devicedefinitionmaterial.input.js create mode 100644 src/resources/4_0_0/inputs/devicedefinitionproperty.input.js create mode 100644 src/resources/4_0_0/inputs/devicedefinitionspecialization.input.js create mode 100644 src/resources/4_0_0/inputs/devicedefinitionudideviceidentifier.input.js create mode 100644 src/resources/4_0_0/inputs/devicedevicename.input.js create mode 100644 src/resources/4_0_0/inputs/devicemetric.input.js create mode 100644 src/resources/4_0_0/inputs/devicemetriccalibration.input.js create mode 100644 src/resources/4_0_0/inputs/deviceproperty.input.js create mode 100644 src/resources/4_0_0/inputs/devicerequest.input.js create mode 100644 src/resources/4_0_0/inputs/devicerequestparameter.input.js create mode 100644 src/resources/4_0_0/inputs/devicespecialization.input.js create mode 100644 src/resources/4_0_0/inputs/deviceudicarrier.input.js create mode 100644 src/resources/4_0_0/inputs/deviceusestatement.input.js create mode 100644 src/resources/4_0_0/inputs/deviceversion.input.js create mode 100644 src/resources/4_0_0/inputs/diagnosticreport.input.js create mode 100644 src/resources/4_0_0/inputs/diagnosticreportmedia.input.js create mode 100644 src/resources/4_0_0/inputs/distance.input.js create mode 100644 src/resources/4_0_0/inputs/documentmanifest.input.js create mode 100644 src/resources/4_0_0/inputs/documentmanifestrelated.input.js create mode 100644 src/resources/4_0_0/inputs/documentreference.input.js create mode 100644 src/resources/4_0_0/inputs/documentreferencecontent.input.js create mode 100644 src/resources/4_0_0/inputs/documentreferencecontext.input.js create mode 100644 src/resources/4_0_0/inputs/documentreferencerelatesto.input.js create mode 100644 src/resources/4_0_0/inputs/domainresource.input.js create mode 100644 src/resources/4_0_0/inputs/dosage.input.js create mode 100644 src/resources/4_0_0/inputs/dosagedoseandrate.input.js create mode 100644 src/resources/4_0_0/inputs/duration.input.js create mode 100644 src/resources/4_0_0/inputs/effectevidencesynthesis.input.js create mode 100644 src/resources/4_0_0/inputs/effectevidencesynthesiscertainty.input.js create mode 100644 src/resources/4_0_0/inputs/effectevidencesynthesiscertaintycertaintysubcomponent.input.js create mode 100644 src/resources/4_0_0/inputs/effectevidencesynthesiseffectestimate.input.js create mode 100644 src/resources/4_0_0/inputs/effectevidencesynthesiseffectestimateprecisionestimate.input.js create mode 100644 src/resources/4_0_0/inputs/effectevidencesynthesisresultsbyexposure.input.js create mode 100644 src/resources/4_0_0/inputs/effectevidencesynthesissamplesize.input.js create mode 100644 src/resources/4_0_0/inputs/element.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinitionbase.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinitionbinding.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinitionconstraint.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinitionexample.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinitionmapping.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinitionslicing.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinitionslicingdiscriminator.input.js create mode 100644 src/resources/4_0_0/inputs/elementdefinitiontype.input.js create mode 100644 src/resources/4_0_0/inputs/encounter.input.js create mode 100644 src/resources/4_0_0/inputs/encounterclasshistory.input.js create mode 100644 src/resources/4_0_0/inputs/encounterdiagnosis.input.js create mode 100644 src/resources/4_0_0/inputs/encounterhospitalization.input.js create mode 100644 src/resources/4_0_0/inputs/encounterlocation.input.js create mode 100644 src/resources/4_0_0/inputs/encounterparticipant.input.js create mode 100644 src/resources/4_0_0/inputs/encounterstatushistory.input.js create mode 100644 src/resources/4_0_0/inputs/endpoint.input.js create mode 100644 src/resources/4_0_0/inputs/enrollmentrequest.input.js create mode 100644 src/resources/4_0_0/inputs/enrollmentresponse.input.js create mode 100644 src/resources/4_0_0/inputs/episodeofcare.input.js create mode 100644 src/resources/4_0_0/inputs/episodeofcarediagnosis.input.js create mode 100644 src/resources/4_0_0/inputs/episodeofcarestatushistory.input.js create mode 100644 src/resources/4_0_0/inputs/eventdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/evidence.input.js create mode 100644 src/resources/4_0_0/inputs/evidencevariable.input.js create mode 100644 src/resources/4_0_0/inputs/evidencevariablecharacteristic.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenario.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenarioactor.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenarioinstance.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenarioinstancecontainedinstance.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenarioinstanceversion.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenarioprocess.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenarioprocessstep.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenarioprocessstepalternative.input.js create mode 100644 src/resources/4_0_0/inputs/examplescenarioprocessstepoperation.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefit.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitaccident.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitadditem.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitadditemdetail.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitadditemdetailsubdetail.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitbenefitbalance.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitbenefitbalancefinancial.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitcareteam.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitdiagnosis.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitinsurance.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefititem.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefititemadjudication.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefititemdetail.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefititemdetailsubdetail.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitpayee.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitpayment.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitprocedure.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitprocessnote.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitrelated.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefitsupportinginfo.input.js create mode 100644 src/resources/4_0_0/inputs/explanationofbenefittotal.input.js create mode 100644 src/resources/4_0_0/inputs/expression.input.js create mode 100644 src/resources/4_0_0/inputs/extension.input.js create mode 100644 src/resources/4_0_0/inputs/familymemberhistory.input.js create mode 100644 src/resources/4_0_0/inputs/familymemberhistorycondition.input.js create mode 100644 src/resources/4_0_0/inputs/flag.input.js create mode 100644 src/resources/4_0_0/inputs/goal.input.js create mode 100644 src/resources/4_0_0/inputs/goaltarget.input.js create mode 100644 src/resources/4_0_0/inputs/graphdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/graphdefinitionlink.input.js create mode 100644 src/resources/4_0_0/inputs/graphdefinitionlinktarget.input.js create mode 100644 src/resources/4_0_0/inputs/graphdefinitionlinktargetcompartment.input.js create mode 100644 src/resources/4_0_0/inputs/group.input.js create mode 100644 src/resources/4_0_0/inputs/groupcharacteristic.input.js create mode 100644 src/resources/4_0_0/inputs/groupmember.input.js create mode 100644 src/resources/4_0_0/inputs/guidanceresponse.input.js create mode 100644 src/resources/4_0_0/inputs/healthcareservice.input.js create mode 100644 src/resources/4_0_0/inputs/healthcareserviceavailabletime.input.js create mode 100644 src/resources/4_0_0/inputs/healthcareserviceeligibility.input.js create mode 100644 src/resources/4_0_0/inputs/healthcareservicenotavailable.input.js create mode 100644 src/resources/4_0_0/inputs/humanname.input.js create mode 100644 src/resources/4_0_0/inputs/identifier.input.js create mode 100644 src/resources/4_0_0/inputs/imagingstudy.input.js create mode 100644 src/resources/4_0_0/inputs/imagingstudyseries.input.js create mode 100644 src/resources/4_0_0/inputs/imagingstudyseriesinstance.input.js create mode 100644 src/resources/4_0_0/inputs/imagingstudyseriesperformer.input.js create mode 100644 src/resources/4_0_0/inputs/immunization.input.js create mode 100644 src/resources/4_0_0/inputs/immunizationeducation.input.js create mode 100644 src/resources/4_0_0/inputs/immunizationevaluation.input.js create mode 100644 src/resources/4_0_0/inputs/immunizationperformer.input.js create mode 100644 src/resources/4_0_0/inputs/immunizationprotocolapplied.input.js create mode 100644 src/resources/4_0_0/inputs/immunizationreaction.input.js create mode 100644 src/resources/4_0_0/inputs/immunizationrecommendation.input.js create mode 100644 src/resources/4_0_0/inputs/immunizationrecommendationrecommendation.input.js create mode 100644 src/resources/4_0_0/inputs/immunizationrecommendationrecommendationdatecriterion.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguide.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidedefinition.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidedefinitiongrouping.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidedefinitionpage.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidedefinitionparameter.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidedefinitionresource.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidedefinitiontemplate.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidedependson.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguideglobal.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidemanifest.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidemanifestpage.input.js create mode 100644 src/resources/4_0_0/inputs/implementationguidemanifestresource.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplan.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplancontact.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplancoverage.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplancoveragebenefit.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplancoveragebenefitlimit.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplanplan.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplanplangeneralcost.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplanplanspecificcost.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplanplanspecificcostbenefit.input.js create mode 100644 src/resources/4_0_0/inputs/insuranceplanplanspecificcostbenefitcost.input.js create mode 100644 src/resources/4_0_0/inputs/invoice.input.js create mode 100644 src/resources/4_0_0/inputs/invoicelineitem.input.js create mode 100644 src/resources/4_0_0/inputs/invoicelineitempricecomponent.input.js create mode 100644 src/resources/4_0_0/inputs/invoiceparticipant.input.js create mode 100644 src/resources/4_0_0/inputs/library.input.js create mode 100644 src/resources/4_0_0/inputs/linkage.input.js create mode 100644 src/resources/4_0_0/inputs/linkageitem.input.js create mode 100644 src/resources/4_0_0/inputs/list.input.js create mode 100644 src/resources/4_0_0/inputs/listentry.input.js create mode 100644 src/resources/4_0_0/inputs/location.input.js create mode 100644 src/resources/4_0_0/inputs/locationhoursofoperation.input.js create mode 100644 src/resources/4_0_0/inputs/locationposition.input.js create mode 100644 src/resources/4_0_0/inputs/marketingstatus.input.js create mode 100644 src/resources/4_0_0/inputs/measure.input.js create mode 100644 src/resources/4_0_0/inputs/measuregroup.input.js create mode 100644 src/resources/4_0_0/inputs/measuregrouppopulation.input.js create mode 100644 src/resources/4_0_0/inputs/measuregroupstratifier.input.js create mode 100644 src/resources/4_0_0/inputs/measuregroupstratifiercomponent.input.js create mode 100644 src/resources/4_0_0/inputs/measurereport.input.js create mode 100644 src/resources/4_0_0/inputs/measurereportgroup.input.js create mode 100644 src/resources/4_0_0/inputs/measurereportgrouppopulation.input.js create mode 100644 src/resources/4_0_0/inputs/measurereportgroupstratifier.input.js create mode 100644 src/resources/4_0_0/inputs/measurereportgroupstratifierstratum.input.js create mode 100644 src/resources/4_0_0/inputs/measurereportgroupstratifierstratumcomponent.input.js create mode 100644 src/resources/4_0_0/inputs/measurereportgroupstratifierstratumpopulation.input.js create mode 100644 src/resources/4_0_0/inputs/measuresupplementaldata.input.js create mode 100644 src/resources/4_0_0/inputs/media.input.js create mode 100644 src/resources/4_0_0/inputs/medication.input.js create mode 100644 src/resources/4_0_0/inputs/medicationadministration.input.js create mode 100644 src/resources/4_0_0/inputs/medicationadministrationdosage.input.js create mode 100644 src/resources/4_0_0/inputs/medicationadministrationperformer.input.js create mode 100644 src/resources/4_0_0/inputs/medicationbatch.input.js create mode 100644 src/resources/4_0_0/inputs/medicationdispense.input.js create mode 100644 src/resources/4_0_0/inputs/medicationdispenseperformer.input.js create mode 100644 src/resources/4_0_0/inputs/medicationdispensesubstitution.input.js create mode 100644 src/resources/4_0_0/inputs/medicationingredient.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledge.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelines.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelinesdosage.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelinespatientcharacteristics.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgecost.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgedrugcharacteristic.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgeingredient.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgekinetics.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgemedicineclassification.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgemonitoringprogram.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgemonograph.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgepackaging.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgeregulatory.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgeregulatorymaxdispense.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgeregulatoryschedule.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgeregulatorysubstitution.input.js create mode 100644 src/resources/4_0_0/inputs/medicationknowledgerelatedmedicationknowledge.input.js create mode 100644 src/resources/4_0_0/inputs/medicationrequest.input.js create mode 100644 src/resources/4_0_0/inputs/medicationrequestdispenserequest.input.js create mode 100644 src/resources/4_0_0/inputs/medicationrequestdispenserequestinitialfill.input.js create mode 100644 src/resources/4_0_0/inputs/medicationrequestsubstitution.input.js create mode 100644 src/resources/4_0_0/inputs/medicationstatement.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproduct.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductauthorization.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductauthorizationjurisdictionalauthorization.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductauthorizationprocedure.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductcontraindication.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductcontraindicationothertherapy.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductindication.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductindicationothertherapy.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductingredient.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstance.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstancestrength.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstancestrengthreferencestrength.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductingredientsubstance.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductinteraction.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductinteractioninteractant.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductmanufactured.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductmanufacturingbusinessoperation.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductname.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductnamecountrylanguage.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductnamenamepart.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductpackaged.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductpackagedbatchidentifier.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductpackagedpackageitem.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductpharmaceutical.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductpharmaceuticalcharacteristics.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministration.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministrationtargetspecies.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductspecialdesignation.input.js create mode 100644 src/resources/4_0_0/inputs/medicinalproductundesirableeffect.input.js create mode 100644 src/resources/4_0_0/inputs/messagedefinition.input.js create mode 100644 src/resources/4_0_0/inputs/messagedefinitionallowedresponse.input.js create mode 100644 src/resources/4_0_0/inputs/messagedefinitionfocus.input.js create mode 100644 src/resources/4_0_0/inputs/messageheader.input.js create mode 100644 src/resources/4_0_0/inputs/messageheaderdestination.input.js create mode 100644 src/resources/4_0_0/inputs/messageheaderresponse.input.js create mode 100644 src/resources/4_0_0/inputs/messageheadersource.input.js create mode 100644 src/resources/4_0_0/inputs/meta.input.js create mode 100644 src/resources/4_0_0/inputs/metadataresource.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequence.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequencequality.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequencequalityroc.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequencereferenceseq.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequencerepository.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequencestructurevariant.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequencestructurevariantinner.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequencestructurevariantouter.input.js create mode 100644 src/resources/4_0_0/inputs/molecularsequencevariant.input.js create mode 100644 src/resources/4_0_0/inputs/money.input.js create mode 100644 src/resources/4_0_0/inputs/moneyquantity.input.js create mode 100644 src/resources/4_0_0/inputs/namingsystem.input.js create mode 100644 src/resources/4_0_0/inputs/namingsystemuniqueid.input.js create mode 100644 src/resources/4_0_0/inputs/narrative.input.js create mode 100644 src/resources/4_0_0/inputs/nutritionorder.input.js create mode 100644 src/resources/4_0_0/inputs/nutritionorderenteralformula.input.js create mode 100644 src/resources/4_0_0/inputs/nutritionorderenteralformulaadministration.input.js create mode 100644 src/resources/4_0_0/inputs/nutritionorderoraldiet.input.js create mode 100644 src/resources/4_0_0/inputs/nutritionorderoraldietnutrient.input.js create mode 100644 src/resources/4_0_0/inputs/nutritionorderoraldiettexture.input.js create mode 100644 src/resources/4_0_0/inputs/nutritionordersupplement.input.js create mode 100644 src/resources/4_0_0/inputs/observation.input.js create mode 100644 src/resources/4_0_0/inputs/observationcomponent.input.js create mode 100644 src/resources/4_0_0/inputs/observationdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/observationdefinitionqualifiedinterval.input.js create mode 100644 src/resources/4_0_0/inputs/observationdefinitionquantitativedetails.input.js create mode 100644 src/resources/4_0_0/inputs/observationreferencerange.input.js create mode 100644 src/resources/4_0_0/inputs/operationdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/operationdefinitionoverload.input.js create mode 100644 src/resources/4_0_0/inputs/operationdefinitionparameter.input.js create mode 100644 src/resources/4_0_0/inputs/operationdefinitionparameterbinding.input.js create mode 100644 src/resources/4_0_0/inputs/operationdefinitionparameterreferencedfrom.input.js create mode 100644 src/resources/4_0_0/inputs/operationoutcome.input.js create mode 100644 src/resources/4_0_0/inputs/operationoutcomeissue.input.js create mode 100644 src/resources/4_0_0/inputs/organization.input.js create mode 100644 src/resources/4_0_0/inputs/organizationaffiliation.input.js create mode 100644 src/resources/4_0_0/inputs/organizationcontact.input.js create mode 100644 src/resources/4_0_0/inputs/parameterdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/parameters.input.js create mode 100644 src/resources/4_0_0/inputs/parametersparameter.input.js create mode 100644 src/resources/4_0_0/inputs/patient.input.js create mode 100644 src/resources/4_0_0/inputs/patientcommunication.input.js create mode 100644 src/resources/4_0_0/inputs/patientcontact.input.js create mode 100644 src/resources/4_0_0/inputs/patientlink.input.js create mode 100644 src/resources/4_0_0/inputs/paymentnotice.input.js create mode 100644 src/resources/4_0_0/inputs/paymentreconciliation.input.js create mode 100644 src/resources/4_0_0/inputs/paymentreconciliationdetail.input.js create mode 100644 src/resources/4_0_0/inputs/paymentreconciliationprocessnote.input.js create mode 100644 src/resources/4_0_0/inputs/period.input.js create mode 100644 src/resources/4_0_0/inputs/person.input.js create mode 100644 src/resources/4_0_0/inputs/personlink.input.js create mode 100644 src/resources/4_0_0/inputs/plandefinition.input.js create mode 100644 src/resources/4_0_0/inputs/plandefinitionaction.input.js create mode 100644 src/resources/4_0_0/inputs/plandefinitionactioncondition.input.js create mode 100644 src/resources/4_0_0/inputs/plandefinitionactiondynamicvalue.input.js create mode 100644 src/resources/4_0_0/inputs/plandefinitionactionparticipant.input.js create mode 100644 src/resources/4_0_0/inputs/plandefinitionactionrelatedaction.input.js create mode 100644 src/resources/4_0_0/inputs/plandefinitiongoal.input.js create mode 100644 src/resources/4_0_0/inputs/plandefinitiongoaltarget.input.js create mode 100644 src/resources/4_0_0/inputs/population.input.js create mode 100644 src/resources/4_0_0/inputs/practitioner.input.js create mode 100644 src/resources/4_0_0/inputs/practitionerqualification.input.js create mode 100644 src/resources/4_0_0/inputs/practitionerrole.input.js create mode 100644 src/resources/4_0_0/inputs/practitionerroleavailabletime.input.js create mode 100644 src/resources/4_0_0/inputs/practitionerrolenotavailable.input.js create mode 100644 src/resources/4_0_0/inputs/procedure.input.js create mode 100644 src/resources/4_0_0/inputs/procedurefocaldevice.input.js create mode 100644 src/resources/4_0_0/inputs/procedureperformer.input.js create mode 100644 src/resources/4_0_0/inputs/prodcharacteristic.input.js create mode 100644 src/resources/4_0_0/inputs/productshelflife.input.js create mode 100644 src/resources/4_0_0/inputs/provenance.input.js create mode 100644 src/resources/4_0_0/inputs/provenanceagent.input.js create mode 100644 src/resources/4_0_0/inputs/provenanceentity.input.js create mode 100644 src/resources/4_0_0/inputs/quantity.input.js create mode 100644 src/resources/4_0_0/inputs/questionnaire.input.js create mode 100644 src/resources/4_0_0/inputs/questionnaireitem.input.js create mode 100644 src/resources/4_0_0/inputs/questionnaireitemansweroption.input.js create mode 100644 src/resources/4_0_0/inputs/questionnaireitemenablewhen.input.js create mode 100644 src/resources/4_0_0/inputs/questionnaireiteminitial.input.js create mode 100644 src/resources/4_0_0/inputs/questionnaireresponse.input.js create mode 100644 src/resources/4_0_0/inputs/questionnaireresponseitem.input.js create mode 100644 src/resources/4_0_0/inputs/questionnaireresponseitemanswer.input.js create mode 100644 src/resources/4_0_0/inputs/range.input.js create mode 100644 src/resources/4_0_0/inputs/ratio.input.js create mode 100644 src/resources/4_0_0/inputs/reference.input.js create mode 100644 src/resources/4_0_0/inputs/relatedartifact.input.js create mode 100644 src/resources/4_0_0/inputs/relatedperson.input.js create mode 100644 src/resources/4_0_0/inputs/relatedpersoncommunication.input.js create mode 100644 src/resources/4_0_0/inputs/requestgroup.input.js create mode 100644 src/resources/4_0_0/inputs/requestgroupaction.input.js create mode 100644 src/resources/4_0_0/inputs/requestgroupactioncondition.input.js create mode 100644 src/resources/4_0_0/inputs/requestgroupactionrelatedaction.input.js create mode 100644 src/resources/4_0_0/inputs/researchdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/researchelementdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/researchelementdefinitioncharacteristic.input.js create mode 100644 src/resources/4_0_0/inputs/researchstudy.input.js create mode 100644 src/resources/4_0_0/inputs/researchstudyarm.input.js create mode 100644 src/resources/4_0_0/inputs/researchstudyobjective.input.js create mode 100644 src/resources/4_0_0/inputs/researchsubject.input.js create mode 100644 src/resources/4_0_0/inputs/resource.input.js create mode 100644 src/resources/4_0_0/inputs/riskassessment.input.js create mode 100644 src/resources/4_0_0/inputs/riskassessmentprediction.input.js create mode 100644 src/resources/4_0_0/inputs/riskevidencesynthesis.input.js create mode 100644 src/resources/4_0_0/inputs/riskevidencesynthesiscertainty.input.js create mode 100644 src/resources/4_0_0/inputs/riskevidencesynthesiscertaintycertaintysubcomponent.input.js create mode 100644 src/resources/4_0_0/inputs/riskevidencesynthesisriskestimate.input.js create mode 100644 src/resources/4_0_0/inputs/riskevidencesynthesisriskestimateprecisionestimate.input.js create mode 100644 src/resources/4_0_0/inputs/riskevidencesynthesissamplesize.input.js create mode 100644 src/resources/4_0_0/inputs/sampleddata.input.js create mode 100644 src/resources/4_0_0/inputs/schedule.input.js create mode 100644 src/resources/4_0_0/inputs/searchparameter.input.js create mode 100644 src/resources/4_0_0/inputs/searchparametercomponent.input.js create mode 100644 src/resources/4_0_0/inputs/servicerequest.input.js create mode 100644 src/resources/4_0_0/inputs/signature.input.js create mode 100644 src/resources/4_0_0/inputs/simplequantity.input.js create mode 100644 src/resources/4_0_0/inputs/slot.input.js create mode 100644 src/resources/4_0_0/inputs/specimen.input.js create mode 100644 src/resources/4_0_0/inputs/specimencollection.input.js create mode 100644 src/resources/4_0_0/inputs/specimencontainer.input.js create mode 100644 src/resources/4_0_0/inputs/specimendefinition.input.js create mode 100644 src/resources/4_0_0/inputs/specimendefinitiontypetested.input.js create mode 100644 src/resources/4_0_0/inputs/specimendefinitiontypetestedcontainer.input.js create mode 100644 src/resources/4_0_0/inputs/specimendefinitiontypetestedcontaineradditive.input.js create mode 100644 src/resources/4_0_0/inputs/specimendefinitiontypetestedhandling.input.js create mode 100644 src/resources/4_0_0/inputs/specimenprocessing.input.js create mode 100644 src/resources/4_0_0/inputs/structuredefinition.input.js create mode 100644 src/resources/4_0_0/inputs/structuredefinitioncontext.input.js create mode 100644 src/resources/4_0_0/inputs/structuredefinitiondifferential.input.js create mode 100644 src/resources/4_0_0/inputs/structuredefinitionmapping.input.js create mode 100644 src/resources/4_0_0/inputs/structuredefinitionsnapshot.input.js create mode 100644 src/resources/4_0_0/inputs/structuremap.input.js create mode 100644 src/resources/4_0_0/inputs/structuremapgroup.input.js create mode 100644 src/resources/4_0_0/inputs/structuremapgroupinput.input.js create mode 100644 src/resources/4_0_0/inputs/structuremapgrouprule.input.js create mode 100644 src/resources/4_0_0/inputs/structuremapgroupruledependent.input.js create mode 100644 src/resources/4_0_0/inputs/structuremapgrouprulesource.input.js create mode 100644 src/resources/4_0_0/inputs/structuremapgroupruletarget.input.js create mode 100644 src/resources/4_0_0/inputs/structuremapgroupruletargetparameter.input.js create mode 100644 src/resources/4_0_0/inputs/structuremapstructure.input.js create mode 100644 src/resources/4_0_0/inputs/subscription.input.js create mode 100644 src/resources/4_0_0/inputs/subscriptionchannel.input.js create mode 100644 src/resources/4_0_0/inputs/substance.input.js create mode 100644 src/resources/4_0_0/inputs/substanceamount.input.js create mode 100644 src/resources/4_0_0/inputs/substanceamountreferencerange.input.js create mode 100644 src/resources/4_0_0/inputs/substanceingredient.input.js create mode 100644 src/resources/4_0_0/inputs/substanceinstance.input.js create mode 100644 src/resources/4_0_0/inputs/substancenucleicacid.input.js create mode 100644 src/resources/4_0_0/inputs/substancenucleicacidsubunit.input.js create mode 100644 src/resources/4_0_0/inputs/substancenucleicacidsubunitlinkage.input.js create mode 100644 src/resources/4_0_0/inputs/substancenucleicacidsubunitsugar.input.js create mode 100644 src/resources/4_0_0/inputs/substancepolymer.input.js create mode 100644 src/resources/4_0_0/inputs/substancepolymermonomerset.input.js create mode 100644 src/resources/4_0_0/inputs/substancepolymermonomersetstartingmaterial.input.js create mode 100644 src/resources/4_0_0/inputs/substancepolymerrepeat.input.js create mode 100644 src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunit.input.js create mode 100644 src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunitdegreeofpolymerisation.input.js create mode 100644 src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunitstructuralrepresentation.input.js create mode 100644 src/resources/4_0_0/inputs/substanceprotein.input.js create mode 100644 src/resources/4_0_0/inputs/substanceproteinsubunit.input.js create mode 100644 src/resources/4_0_0/inputs/substancereferenceinformation.input.js create mode 100644 src/resources/4_0_0/inputs/substancereferenceinformationclassification.input.js create mode 100644 src/resources/4_0_0/inputs/substancereferenceinformationgene.input.js create mode 100644 src/resources/4_0_0/inputs/substancereferenceinformationgeneelement.input.js create mode 100644 src/resources/4_0_0/inputs/substancereferenceinformationtarget.input.js create mode 100644 src/resources/4_0_0/inputs/substancesourcematerial.input.js create mode 100644 src/resources/4_0_0/inputs/substancesourcematerialfractiondescription.input.js create mode 100644 src/resources/4_0_0/inputs/substancesourcematerialorganism.input.js create mode 100644 src/resources/4_0_0/inputs/substancesourcematerialorganismauthor.input.js create mode 100644 src/resources/4_0_0/inputs/substancesourcematerialorganismhybrid.input.js create mode 100644 src/resources/4_0_0/inputs/substancesourcematerialorganismorganismgeneral.input.js create mode 100644 src/resources/4_0_0/inputs/substancesourcematerialpartdescription.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecification.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationcode.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationmoiety.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationname.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationnameofficial.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationproperty.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationrelationship.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationstructure.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationstructureisotope.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationstructureisotopemolecularweight.input.js create mode 100644 src/resources/4_0_0/inputs/substancespecificationstructurerepresentation.input.js create mode 100644 src/resources/4_0_0/inputs/supplydelivery.input.js create mode 100644 src/resources/4_0_0/inputs/supplydeliverysupplieditem.input.js create mode 100644 src/resources/4_0_0/inputs/supplyrequest.input.js create mode 100644 src/resources/4_0_0/inputs/supplyrequestparameter.input.js create mode 100644 src/resources/4_0_0/inputs/task.input.js create mode 100644 src/resources/4_0_0/inputs/taskinput.input.js create mode 100644 src/resources/4_0_0/inputs/taskoutput.input.js create mode 100644 src/resources/4_0_0/inputs/taskrestriction.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilities.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiesclosure.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiescodesystem.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiescodesystemversion.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiescodesystemversionfilter.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiesexpansion.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiesexpansionparameter.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiesimplementation.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiessoftware.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiestranslation.input.js create mode 100644 src/resources/4_0_0/inputs/terminologycapabilitiesvalidatecode.input.js create mode 100644 src/resources/4_0_0/inputs/testreport.input.js create mode 100644 src/resources/4_0_0/inputs/testreportparticipant.input.js create mode 100644 src/resources/4_0_0/inputs/testreportsetup.input.js create mode 100644 src/resources/4_0_0/inputs/testreportsetupaction.input.js create mode 100644 src/resources/4_0_0/inputs/testreportsetupactionassert.input.js create mode 100644 src/resources/4_0_0/inputs/testreportsetupactionoperation.input.js create mode 100644 src/resources/4_0_0/inputs/testreportteardown.input.js create mode 100644 src/resources/4_0_0/inputs/testreportteardownaction.input.js create mode 100644 src/resources/4_0_0/inputs/testreporttest.input.js create mode 100644 src/resources/4_0_0/inputs/testreporttestaction.input.js create mode 100644 src/resources/4_0_0/inputs/testscript.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptdestination.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptfixture.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptmetadata.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptmetadatacapability.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptmetadatalink.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptorigin.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptsetup.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptsetupaction.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptsetupactionassert.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptsetupactionoperation.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptsetupactionoperationrequestheader.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptteardown.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptteardownaction.input.js create mode 100644 src/resources/4_0_0/inputs/testscripttest.input.js create mode 100644 src/resources/4_0_0/inputs/testscripttestaction.input.js create mode 100644 src/resources/4_0_0/inputs/testscriptvariable.input.js create mode 100644 src/resources/4_0_0/inputs/timing.input.js create mode 100644 src/resources/4_0_0/inputs/timingrepeat.input.js create mode 100644 src/resources/4_0_0/inputs/triggerdefinition.input.js create mode 100644 src/resources/4_0_0/inputs/usagecontext.input.js create mode 100644 src/resources/4_0_0/inputs/valueset.input.js create mode 100644 src/resources/4_0_0/inputs/valuesetcompose.input.js create mode 100644 src/resources/4_0_0/inputs/valuesetcomposeinclude.input.js create mode 100644 src/resources/4_0_0/inputs/valuesetcomposeincludeconcept.input.js create mode 100644 src/resources/4_0_0/inputs/valuesetcomposeincludeconceptdesignation.input.js create mode 100644 src/resources/4_0_0/inputs/valuesetcomposeincludefilter.input.js create mode 100644 src/resources/4_0_0/inputs/valuesetexpansion.input.js create mode 100644 src/resources/4_0_0/inputs/valuesetexpansioncontains.input.js create mode 100644 src/resources/4_0_0/inputs/valuesetexpansionparameter.input.js create mode 100644 src/resources/4_0_0/inputs/verificationresult.input.js create mode 100644 src/resources/4_0_0/inputs/verificationresultattestation.input.js create mode 100644 src/resources/4_0_0/inputs/verificationresultprimarysource.input.js create mode 100644 src/resources/4_0_0/inputs/verificationresultvalidator.input.js create mode 100644 src/resources/4_0_0/inputs/visionprescription.input.js create mode 100644 src/resources/4_0_0/inputs/visionprescriptionlensspecification.input.js create mode 100644 src/resources/4_0_0/inputs/visionprescriptionlensspecificationprism.input.js create mode 100644 src/resources/4_0_0/parameters/account.parameters.js create mode 100644 src/resources/4_0_0/parameters/activitydefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/adverseevent.parameters.js create mode 100644 src/resources/4_0_0/parameters/allergyintolerance.parameters.js create mode 100644 src/resources/4_0_0/parameters/appointment.parameters.js create mode 100644 src/resources/4_0_0/parameters/appointmentresponse.parameters.js create mode 100644 src/resources/4_0_0/parameters/auditevent.parameters.js create mode 100644 src/resources/4_0_0/parameters/basic.parameters.js create mode 100644 src/resources/4_0_0/parameters/bodystructure.parameters.js create mode 100644 src/resources/4_0_0/parameters/bundle.parameters.js create mode 100644 src/resources/4_0_0/parameters/capabilitystatement.parameters.js create mode 100644 src/resources/4_0_0/parameters/careplan.parameters.js create mode 100644 src/resources/4_0_0/parameters/careteam.parameters.js create mode 100644 src/resources/4_0_0/parameters/chargeitem.parameters.js create mode 100644 src/resources/4_0_0/parameters/chargeitemdefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/claim.parameters.js create mode 100644 src/resources/4_0_0/parameters/claimresponse.parameters.js create mode 100644 src/resources/4_0_0/parameters/clinicalimpression.parameters.js create mode 100644 src/resources/4_0_0/parameters/codesystem.parameters.js create mode 100644 src/resources/4_0_0/parameters/communication.parameters.js create mode 100644 src/resources/4_0_0/parameters/communicationrequest.parameters.js create mode 100644 src/resources/4_0_0/parameters/compartmentdefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/composition.parameters.js create mode 100644 src/resources/4_0_0/parameters/conceptmap.parameters.js create mode 100644 src/resources/4_0_0/parameters/condition.parameters.js create mode 100644 src/resources/4_0_0/parameters/consent.parameters.js create mode 100644 src/resources/4_0_0/parameters/contract.parameters.js create mode 100644 src/resources/4_0_0/parameters/coverage.parameters.js create mode 100644 src/resources/4_0_0/parameters/coverageeligibilityrequest.parameters.js create mode 100644 src/resources/4_0_0/parameters/coverageeligibilityresponse.parameters.js create mode 100644 src/resources/4_0_0/parameters/detectedissue.parameters.js create mode 100644 src/resources/4_0_0/parameters/device.parameters.js create mode 100644 src/resources/4_0_0/parameters/devicedefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/devicemetric.parameters.js create mode 100644 src/resources/4_0_0/parameters/devicerequest.parameters.js create mode 100644 src/resources/4_0_0/parameters/deviceusestatement.parameters.js create mode 100644 src/resources/4_0_0/parameters/diagnosticreport.parameters.js create mode 100644 src/resources/4_0_0/parameters/documentmanifest.parameters.js create mode 100644 src/resources/4_0_0/parameters/documentreference.parameters.js create mode 100644 src/resources/4_0_0/parameters/domainresource.parameters.js create mode 100644 src/resources/4_0_0/parameters/effectevidencesynthesis.parameters.js create mode 100644 src/resources/4_0_0/parameters/encounter.parameters.js create mode 100644 src/resources/4_0_0/parameters/endpoint.parameters.js create mode 100644 src/resources/4_0_0/parameters/enrollmentrequest.parameters.js create mode 100644 src/resources/4_0_0/parameters/enrollmentresponse.parameters.js create mode 100644 src/resources/4_0_0/parameters/episodeofcare.parameters.js create mode 100644 src/resources/4_0_0/parameters/eventdefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/evidence.parameters.js create mode 100644 src/resources/4_0_0/parameters/evidencevariable.parameters.js create mode 100644 src/resources/4_0_0/parameters/examplescenario.parameters.js create mode 100644 src/resources/4_0_0/parameters/explanationofbenefit.parameters.js create mode 100644 src/resources/4_0_0/parameters/familymemberhistory.parameters.js create mode 100644 src/resources/4_0_0/parameters/flag.parameters.js create mode 100644 src/resources/4_0_0/parameters/goal.parameters.js create mode 100644 src/resources/4_0_0/parameters/graphdefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/group.parameters.js create mode 100644 src/resources/4_0_0/parameters/guidanceresponse.parameters.js create mode 100644 src/resources/4_0_0/parameters/healthcareservice.parameters.js create mode 100644 src/resources/4_0_0/parameters/imagingstudy.parameters.js create mode 100644 src/resources/4_0_0/parameters/immunization.parameters.js create mode 100644 src/resources/4_0_0/parameters/immunizationevaluation.parameters.js create mode 100644 src/resources/4_0_0/parameters/immunizationrecommendation.parameters.js create mode 100644 src/resources/4_0_0/parameters/implementationguide.parameters.js create mode 100644 src/resources/4_0_0/parameters/insuranceplan.parameters.js create mode 100644 src/resources/4_0_0/parameters/invoice.parameters.js create mode 100644 src/resources/4_0_0/parameters/library.parameters.js create mode 100644 src/resources/4_0_0/parameters/linkage.parameters.js create mode 100644 src/resources/4_0_0/parameters/list.parameters.js create mode 100644 src/resources/4_0_0/parameters/location.parameters.js create mode 100644 src/resources/4_0_0/parameters/measure.parameters.js create mode 100644 src/resources/4_0_0/parameters/measurereport.parameters.js create mode 100644 src/resources/4_0_0/parameters/media.parameters.js create mode 100644 src/resources/4_0_0/parameters/medication.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicationadministration.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicationdispense.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicationknowledge.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicationrequest.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicationstatement.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicinalproduct.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicinalproductauthorization.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicinalproductcontraindication.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicinalproductindication.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicinalproductinteraction.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicinalproductpackaged.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicinalproductpharmaceutical.parameters.js create mode 100644 src/resources/4_0_0/parameters/medicinalproductundesirableeffect.parameters.js create mode 100644 src/resources/4_0_0/parameters/messagedefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/messageheader.parameters.js create mode 100644 src/resources/4_0_0/parameters/molecularsequence.parameters.js create mode 100644 src/resources/4_0_0/parameters/namingsystem.parameters.js create mode 100644 src/resources/4_0_0/parameters/nutritionorder.parameters.js create mode 100644 src/resources/4_0_0/parameters/observation.parameters.js create mode 100644 src/resources/4_0_0/parameters/operationdefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/organization.parameters.js create mode 100644 src/resources/4_0_0/parameters/organizationaffiliation.parameters.js create mode 100644 src/resources/4_0_0/parameters/patient.parameters.js create mode 100644 src/resources/4_0_0/parameters/paymentnotice.parameters.js create mode 100644 src/resources/4_0_0/parameters/paymentreconciliation.parameters.js create mode 100644 src/resources/4_0_0/parameters/person.parameters.js create mode 100644 src/resources/4_0_0/parameters/plandefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/practitioner.parameters.js create mode 100644 src/resources/4_0_0/parameters/practitionerrole.parameters.js create mode 100644 src/resources/4_0_0/parameters/procedure.parameters.js create mode 100644 src/resources/4_0_0/parameters/provenance.parameters.js create mode 100644 src/resources/4_0_0/parameters/questionnaire.parameters.js create mode 100644 src/resources/4_0_0/parameters/questionnaireresponse.parameters.js create mode 100644 src/resources/4_0_0/parameters/relatedperson.parameters.js create mode 100644 src/resources/4_0_0/parameters/requestgroup.parameters.js create mode 100644 src/resources/4_0_0/parameters/researchdefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/researchelementdefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/researchstudy.parameters.js create mode 100644 src/resources/4_0_0/parameters/researchsubject.parameters.js create mode 100644 src/resources/4_0_0/parameters/resource.parameters.js create mode 100644 src/resources/4_0_0/parameters/riskassessment.parameters.js create mode 100644 src/resources/4_0_0/parameters/riskevidencesynthesis.parameters.js create mode 100644 src/resources/4_0_0/parameters/schedule.parameters.js create mode 100644 src/resources/4_0_0/parameters/searchparameter.parameters.js create mode 100644 src/resources/4_0_0/parameters/servicerequest.parameters.js create mode 100644 src/resources/4_0_0/parameters/slot.parameters.js create mode 100644 src/resources/4_0_0/parameters/specimen.parameters.js create mode 100644 src/resources/4_0_0/parameters/specimendefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/structuredefinition.parameters.js create mode 100644 src/resources/4_0_0/parameters/structuremap.parameters.js create mode 100644 src/resources/4_0_0/parameters/subscription.parameters.js create mode 100644 src/resources/4_0_0/parameters/substance.parameters.js create mode 100644 src/resources/4_0_0/parameters/substancespecification.parameters.js create mode 100644 src/resources/4_0_0/parameters/supplydelivery.parameters.js create mode 100644 src/resources/4_0_0/parameters/supplyrequest.parameters.js create mode 100644 src/resources/4_0_0/parameters/task.parameters.js create mode 100644 src/resources/4_0_0/parameters/terminologycapabilities.parameters.js create mode 100644 src/resources/4_0_0/parameters/testreport.parameters.js create mode 100644 src/resources/4_0_0/parameters/testscript.parameters.js create mode 100644 src/resources/4_0_0/parameters/valueset.parameters.js create mode 100644 src/resources/4_0_0/parameters/verificationresult.parameters.js create mode 100644 src/resources/4_0_0/parameters/visionprescription.parameters.js create mode 100644 src/resources/4_0_0/profiles/account/mutation.js create mode 100644 src/resources/4_0_0/profiles/account/query.js create mode 100644 src/resources/4_0_0/profiles/account/register.js create mode 100644 src/resources/4_0_0/profiles/account/resolver.js create mode 100644 src/resources/4_0_0/profiles/activitydefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/activitydefinition/query.js create mode 100644 src/resources/4_0_0/profiles/activitydefinition/register.js create mode 100644 src/resources/4_0_0/profiles/activitydefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/adverseevent/mutation.js create mode 100644 src/resources/4_0_0/profiles/adverseevent/query.js create mode 100644 src/resources/4_0_0/profiles/adverseevent/register.js create mode 100644 src/resources/4_0_0/profiles/adverseevent/resolver.js create mode 100644 src/resources/4_0_0/profiles/allergyintolerance/mutation.js create mode 100644 src/resources/4_0_0/profiles/allergyintolerance/query.js create mode 100644 src/resources/4_0_0/profiles/allergyintolerance/register.js create mode 100644 src/resources/4_0_0/profiles/allergyintolerance/resolver.js create mode 100644 src/resources/4_0_0/profiles/appointment/mutation.js create mode 100644 src/resources/4_0_0/profiles/appointment/query.js create mode 100644 src/resources/4_0_0/profiles/appointment/register.js create mode 100644 src/resources/4_0_0/profiles/appointment/resolver.js create mode 100644 src/resources/4_0_0/profiles/appointmentresponse/mutation.js create mode 100644 src/resources/4_0_0/profiles/appointmentresponse/query.js create mode 100644 src/resources/4_0_0/profiles/appointmentresponse/register.js create mode 100644 src/resources/4_0_0/profiles/appointmentresponse/resolver.js create mode 100644 src/resources/4_0_0/profiles/auditevent/mutation.js create mode 100644 src/resources/4_0_0/profiles/auditevent/query.js create mode 100644 src/resources/4_0_0/profiles/auditevent/register.js create mode 100644 src/resources/4_0_0/profiles/auditevent/resolver.js create mode 100644 src/resources/4_0_0/profiles/basic/mutation.js create mode 100644 src/resources/4_0_0/profiles/basic/query.js create mode 100644 src/resources/4_0_0/profiles/basic/register.js create mode 100644 src/resources/4_0_0/profiles/basic/resolver.js create mode 100644 src/resources/4_0_0/profiles/bodystructure/mutation.js create mode 100644 src/resources/4_0_0/profiles/bodystructure/query.js create mode 100644 src/resources/4_0_0/profiles/bodystructure/register.js create mode 100644 src/resources/4_0_0/profiles/bodystructure/resolver.js create mode 100644 src/resources/4_0_0/profiles/bundle/mutation.js create mode 100644 src/resources/4_0_0/profiles/bundle/query.js create mode 100644 src/resources/4_0_0/profiles/bundle/register.js create mode 100644 src/resources/4_0_0/profiles/bundle/resolver.js create mode 100644 src/resources/4_0_0/profiles/capabilitystatement/mutation.js create mode 100644 src/resources/4_0_0/profiles/capabilitystatement/query.js create mode 100644 src/resources/4_0_0/profiles/capabilitystatement/register.js create mode 100644 src/resources/4_0_0/profiles/capabilitystatement/resolver.js create mode 100644 src/resources/4_0_0/profiles/careplan/mutation.js create mode 100644 src/resources/4_0_0/profiles/careplan/query.js create mode 100644 src/resources/4_0_0/profiles/careplan/register.js create mode 100644 src/resources/4_0_0/profiles/careplan/resolver.js create mode 100644 src/resources/4_0_0/profiles/careteam/mutation.js create mode 100644 src/resources/4_0_0/profiles/careteam/query.js create mode 100644 src/resources/4_0_0/profiles/careteam/register.js create mode 100644 src/resources/4_0_0/profiles/careteam/resolver.js create mode 100644 src/resources/4_0_0/profiles/chargeitem/mutation.js create mode 100644 src/resources/4_0_0/profiles/chargeitem/query.js create mode 100644 src/resources/4_0_0/profiles/chargeitem/register.js create mode 100644 src/resources/4_0_0/profiles/chargeitem/resolver.js create mode 100644 src/resources/4_0_0/profiles/chargeitemdefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/chargeitemdefinition/query.js create mode 100644 src/resources/4_0_0/profiles/chargeitemdefinition/register.js create mode 100644 src/resources/4_0_0/profiles/chargeitemdefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/claim/mutation.js create mode 100644 src/resources/4_0_0/profiles/claim/query.js create mode 100644 src/resources/4_0_0/profiles/claim/register.js create mode 100644 src/resources/4_0_0/profiles/claim/resolver.js create mode 100644 src/resources/4_0_0/profiles/claimresponse/mutation.js create mode 100644 src/resources/4_0_0/profiles/claimresponse/query.js create mode 100644 src/resources/4_0_0/profiles/claimresponse/register.js create mode 100644 src/resources/4_0_0/profiles/claimresponse/resolver.js create mode 100644 src/resources/4_0_0/profiles/clinicalimpression/mutation.js create mode 100644 src/resources/4_0_0/profiles/clinicalimpression/query.js create mode 100644 src/resources/4_0_0/profiles/clinicalimpression/register.js create mode 100644 src/resources/4_0_0/profiles/clinicalimpression/resolver.js create mode 100644 src/resources/4_0_0/profiles/codesystem/mutation.js create mode 100644 src/resources/4_0_0/profiles/codesystem/query.js create mode 100644 src/resources/4_0_0/profiles/codesystem/register.js create mode 100644 src/resources/4_0_0/profiles/codesystem/resolver.js create mode 100644 src/resources/4_0_0/profiles/communication/mutation.js create mode 100644 src/resources/4_0_0/profiles/communication/query.js create mode 100644 src/resources/4_0_0/profiles/communication/register.js create mode 100644 src/resources/4_0_0/profiles/communication/resolver.js create mode 100644 src/resources/4_0_0/profiles/communicationrequest/mutation.js create mode 100644 src/resources/4_0_0/profiles/communicationrequest/query.js create mode 100644 src/resources/4_0_0/profiles/communicationrequest/register.js create mode 100644 src/resources/4_0_0/profiles/communicationrequest/resolver.js create mode 100644 src/resources/4_0_0/profiles/compartmentdefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/compartmentdefinition/query.js create mode 100644 src/resources/4_0_0/profiles/compartmentdefinition/register.js create mode 100644 src/resources/4_0_0/profiles/compartmentdefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/composition/mutation.js create mode 100644 src/resources/4_0_0/profiles/composition/query.js create mode 100644 src/resources/4_0_0/profiles/composition/register.js create mode 100644 src/resources/4_0_0/profiles/composition/resolver.js create mode 100644 src/resources/4_0_0/profiles/conceptmap/mutation.js create mode 100644 src/resources/4_0_0/profiles/conceptmap/query.js create mode 100644 src/resources/4_0_0/profiles/conceptmap/register.js create mode 100644 src/resources/4_0_0/profiles/conceptmap/resolver.js create mode 100644 src/resources/4_0_0/profiles/condition/mutation.js create mode 100644 src/resources/4_0_0/profiles/condition/query.js create mode 100644 src/resources/4_0_0/profiles/condition/register.js create mode 100644 src/resources/4_0_0/profiles/condition/resolver.js create mode 100644 src/resources/4_0_0/profiles/consent/mutation.js create mode 100644 src/resources/4_0_0/profiles/consent/query.js create mode 100644 src/resources/4_0_0/profiles/consent/register.js create mode 100644 src/resources/4_0_0/profiles/consent/resolver.js create mode 100644 src/resources/4_0_0/profiles/contract/mutation.js create mode 100644 src/resources/4_0_0/profiles/contract/query.js create mode 100644 src/resources/4_0_0/profiles/contract/register.js create mode 100644 src/resources/4_0_0/profiles/contract/resolver.js create mode 100644 src/resources/4_0_0/profiles/coverage/mutation.js create mode 100644 src/resources/4_0_0/profiles/coverage/query.js create mode 100644 src/resources/4_0_0/profiles/coverage/register.js create mode 100644 src/resources/4_0_0/profiles/coverage/resolver.js create mode 100644 src/resources/4_0_0/profiles/coverageeligibilityrequest/mutation.js create mode 100644 src/resources/4_0_0/profiles/coverageeligibilityrequest/query.js create mode 100644 src/resources/4_0_0/profiles/coverageeligibilityrequest/register.js create mode 100644 src/resources/4_0_0/profiles/coverageeligibilityrequest/resolver.js create mode 100644 src/resources/4_0_0/profiles/coverageeligibilityresponse/mutation.js create mode 100644 src/resources/4_0_0/profiles/coverageeligibilityresponse/query.js create mode 100644 src/resources/4_0_0/profiles/coverageeligibilityresponse/register.js create mode 100644 src/resources/4_0_0/profiles/coverageeligibilityresponse/resolver.js create mode 100644 src/resources/4_0_0/profiles/detectedissue/mutation.js create mode 100644 src/resources/4_0_0/profiles/detectedissue/query.js create mode 100644 src/resources/4_0_0/profiles/detectedissue/register.js create mode 100644 src/resources/4_0_0/profiles/detectedissue/resolver.js create mode 100644 src/resources/4_0_0/profiles/device/mutation.js create mode 100644 src/resources/4_0_0/profiles/device/query.js create mode 100644 src/resources/4_0_0/profiles/device/register.js create mode 100644 src/resources/4_0_0/profiles/device/resolver.js create mode 100644 src/resources/4_0_0/profiles/devicedefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/devicedefinition/query.js create mode 100644 src/resources/4_0_0/profiles/devicedefinition/register.js create mode 100644 src/resources/4_0_0/profiles/devicedefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/devicemetric/mutation.js create mode 100644 src/resources/4_0_0/profiles/devicemetric/query.js create mode 100644 src/resources/4_0_0/profiles/devicemetric/register.js create mode 100644 src/resources/4_0_0/profiles/devicemetric/resolver.js create mode 100644 src/resources/4_0_0/profiles/devicerequest/mutation.js create mode 100644 src/resources/4_0_0/profiles/devicerequest/query.js create mode 100644 src/resources/4_0_0/profiles/devicerequest/register.js create mode 100644 src/resources/4_0_0/profiles/devicerequest/resolver.js create mode 100644 src/resources/4_0_0/profiles/deviceusestatement/mutation.js create mode 100644 src/resources/4_0_0/profiles/deviceusestatement/query.js create mode 100644 src/resources/4_0_0/profiles/deviceusestatement/register.js create mode 100644 src/resources/4_0_0/profiles/deviceusestatement/resolver.js create mode 100644 src/resources/4_0_0/profiles/diagnosticreport/mutation.js create mode 100644 src/resources/4_0_0/profiles/diagnosticreport/query.js create mode 100644 src/resources/4_0_0/profiles/diagnosticreport/register.js create mode 100644 src/resources/4_0_0/profiles/diagnosticreport/resolver.js create mode 100644 src/resources/4_0_0/profiles/documentmanifest/mutation.js create mode 100644 src/resources/4_0_0/profiles/documentmanifest/query.js create mode 100644 src/resources/4_0_0/profiles/documentmanifest/register.js create mode 100644 src/resources/4_0_0/profiles/documentmanifest/resolver.js create mode 100644 src/resources/4_0_0/profiles/documentreference/mutation.js create mode 100644 src/resources/4_0_0/profiles/documentreference/query.js create mode 100644 src/resources/4_0_0/profiles/documentreference/register.js create mode 100644 src/resources/4_0_0/profiles/documentreference/resolver.js create mode 100644 src/resources/4_0_0/profiles/effectevidencesynthesis/mutation.js create mode 100644 src/resources/4_0_0/profiles/effectevidencesynthesis/query.js create mode 100644 src/resources/4_0_0/profiles/effectevidencesynthesis/register.js create mode 100644 src/resources/4_0_0/profiles/effectevidencesynthesis/resolver.js create mode 100644 src/resources/4_0_0/profiles/encounter/mutation.js create mode 100644 src/resources/4_0_0/profiles/encounter/query.js create mode 100644 src/resources/4_0_0/profiles/encounter/register.js create mode 100644 src/resources/4_0_0/profiles/encounter/resolver.js create mode 100644 src/resources/4_0_0/profiles/endpoint/mutation.js create mode 100644 src/resources/4_0_0/profiles/endpoint/query.js create mode 100644 src/resources/4_0_0/profiles/endpoint/register.js create mode 100644 src/resources/4_0_0/profiles/endpoint/resolver.js create mode 100644 src/resources/4_0_0/profiles/enrollmentrequest/mutation.js create mode 100644 src/resources/4_0_0/profiles/enrollmentrequest/query.js create mode 100644 src/resources/4_0_0/profiles/enrollmentrequest/register.js create mode 100644 src/resources/4_0_0/profiles/enrollmentrequest/resolver.js create mode 100644 src/resources/4_0_0/profiles/enrollmentresponse/mutation.js create mode 100644 src/resources/4_0_0/profiles/enrollmentresponse/query.js create mode 100644 src/resources/4_0_0/profiles/enrollmentresponse/register.js create mode 100644 src/resources/4_0_0/profiles/enrollmentresponse/resolver.js create mode 100644 src/resources/4_0_0/profiles/episodeofcare/mutation.js create mode 100644 src/resources/4_0_0/profiles/episodeofcare/query.js create mode 100644 src/resources/4_0_0/profiles/episodeofcare/register.js create mode 100644 src/resources/4_0_0/profiles/episodeofcare/resolver.js create mode 100644 src/resources/4_0_0/profiles/eventdefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/eventdefinition/query.js create mode 100644 src/resources/4_0_0/profiles/eventdefinition/register.js create mode 100644 src/resources/4_0_0/profiles/eventdefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/evidence/mutation.js create mode 100644 src/resources/4_0_0/profiles/evidence/query.js create mode 100644 src/resources/4_0_0/profiles/evidence/register.js create mode 100644 src/resources/4_0_0/profiles/evidence/resolver.js create mode 100644 src/resources/4_0_0/profiles/evidencevariable/mutation.js create mode 100644 src/resources/4_0_0/profiles/evidencevariable/query.js create mode 100644 src/resources/4_0_0/profiles/evidencevariable/register.js create mode 100644 src/resources/4_0_0/profiles/evidencevariable/resolver.js create mode 100644 src/resources/4_0_0/profiles/examplescenario/mutation.js create mode 100644 src/resources/4_0_0/profiles/examplescenario/query.js create mode 100644 src/resources/4_0_0/profiles/examplescenario/register.js create mode 100644 src/resources/4_0_0/profiles/examplescenario/resolver.js create mode 100644 src/resources/4_0_0/profiles/explanationofbenefit/mutation.js create mode 100644 src/resources/4_0_0/profiles/explanationofbenefit/query.js create mode 100644 src/resources/4_0_0/profiles/explanationofbenefit/register.js create mode 100644 src/resources/4_0_0/profiles/explanationofbenefit/resolver.js create mode 100644 src/resources/4_0_0/profiles/familymemberhistory/mutation.js create mode 100644 src/resources/4_0_0/profiles/familymemberhistory/query.js create mode 100644 src/resources/4_0_0/profiles/familymemberhistory/register.js create mode 100644 src/resources/4_0_0/profiles/familymemberhistory/resolver.js create mode 100644 src/resources/4_0_0/profiles/flag/mutation.js create mode 100644 src/resources/4_0_0/profiles/flag/query.js create mode 100644 src/resources/4_0_0/profiles/flag/register.js create mode 100644 src/resources/4_0_0/profiles/flag/resolver.js create mode 100644 src/resources/4_0_0/profiles/goal/mutation.js create mode 100644 src/resources/4_0_0/profiles/goal/query.js create mode 100644 src/resources/4_0_0/profiles/goal/register.js create mode 100644 src/resources/4_0_0/profiles/goal/resolver.js create mode 100644 src/resources/4_0_0/profiles/graphdefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/graphdefinition/query.js create mode 100644 src/resources/4_0_0/profiles/graphdefinition/register.js create mode 100644 src/resources/4_0_0/profiles/graphdefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/group/mutation.js create mode 100644 src/resources/4_0_0/profiles/group/query.js create mode 100644 src/resources/4_0_0/profiles/group/register.js create mode 100644 src/resources/4_0_0/profiles/group/resolver.js create mode 100644 src/resources/4_0_0/profiles/guidanceresponse/mutation.js create mode 100644 src/resources/4_0_0/profiles/guidanceresponse/query.js create mode 100644 src/resources/4_0_0/profiles/guidanceresponse/register.js create mode 100644 src/resources/4_0_0/profiles/guidanceresponse/resolver.js create mode 100644 src/resources/4_0_0/profiles/healthcareservice/mutation.js create mode 100644 src/resources/4_0_0/profiles/healthcareservice/query.js create mode 100644 src/resources/4_0_0/profiles/healthcareservice/register.js create mode 100644 src/resources/4_0_0/profiles/healthcareservice/resolver.js create mode 100644 src/resources/4_0_0/profiles/imagingstudy/mutation.js create mode 100644 src/resources/4_0_0/profiles/imagingstudy/query.js create mode 100644 src/resources/4_0_0/profiles/imagingstudy/register.js create mode 100644 src/resources/4_0_0/profiles/imagingstudy/resolver.js create mode 100644 src/resources/4_0_0/profiles/immunization/mutation.js create mode 100644 src/resources/4_0_0/profiles/immunization/query.js create mode 100644 src/resources/4_0_0/profiles/immunization/register.js create mode 100644 src/resources/4_0_0/profiles/immunization/resolver.js create mode 100644 src/resources/4_0_0/profiles/immunizationevaluation/mutation.js create mode 100644 src/resources/4_0_0/profiles/immunizationevaluation/query.js create mode 100644 src/resources/4_0_0/profiles/immunizationevaluation/register.js create mode 100644 src/resources/4_0_0/profiles/immunizationevaluation/resolver.js create mode 100644 src/resources/4_0_0/profiles/immunizationrecommendation/mutation.js create mode 100644 src/resources/4_0_0/profiles/immunizationrecommendation/query.js create mode 100644 src/resources/4_0_0/profiles/immunizationrecommendation/register.js create mode 100644 src/resources/4_0_0/profiles/immunizationrecommendation/resolver.js create mode 100644 src/resources/4_0_0/profiles/implementationguide/mutation.js create mode 100644 src/resources/4_0_0/profiles/implementationguide/query.js create mode 100644 src/resources/4_0_0/profiles/implementationguide/register.js create mode 100644 src/resources/4_0_0/profiles/implementationguide/resolver.js create mode 100644 src/resources/4_0_0/profiles/insuranceplan/mutation.js create mode 100644 src/resources/4_0_0/profiles/insuranceplan/query.js create mode 100644 src/resources/4_0_0/profiles/insuranceplan/register.js create mode 100644 src/resources/4_0_0/profiles/insuranceplan/resolver.js create mode 100644 src/resources/4_0_0/profiles/invoice/mutation.js create mode 100644 src/resources/4_0_0/profiles/invoice/query.js create mode 100644 src/resources/4_0_0/profiles/invoice/register.js create mode 100644 src/resources/4_0_0/profiles/invoice/resolver.js create mode 100644 src/resources/4_0_0/profiles/library/mutation.js create mode 100644 src/resources/4_0_0/profiles/library/query.js create mode 100644 src/resources/4_0_0/profiles/library/register.js create mode 100644 src/resources/4_0_0/profiles/library/resolver.js create mode 100644 src/resources/4_0_0/profiles/linkage/mutation.js create mode 100644 src/resources/4_0_0/profiles/linkage/query.js create mode 100644 src/resources/4_0_0/profiles/linkage/register.js create mode 100644 src/resources/4_0_0/profiles/linkage/resolver.js create mode 100644 src/resources/4_0_0/profiles/list/mutation.js create mode 100644 src/resources/4_0_0/profiles/list/query.js create mode 100644 src/resources/4_0_0/profiles/list/register.js create mode 100644 src/resources/4_0_0/profiles/list/resolver.js create mode 100644 src/resources/4_0_0/profiles/location/mutation.js create mode 100644 src/resources/4_0_0/profiles/location/query.js create mode 100644 src/resources/4_0_0/profiles/location/register.js create mode 100644 src/resources/4_0_0/profiles/location/resolver.js create mode 100644 src/resources/4_0_0/profiles/measure/mutation.js create mode 100644 src/resources/4_0_0/profiles/measure/query.js create mode 100644 src/resources/4_0_0/profiles/measure/register.js create mode 100644 src/resources/4_0_0/profiles/measure/resolver.js create mode 100644 src/resources/4_0_0/profiles/measurereport/mutation.js create mode 100644 src/resources/4_0_0/profiles/measurereport/query.js create mode 100644 src/resources/4_0_0/profiles/measurereport/register.js create mode 100644 src/resources/4_0_0/profiles/measurereport/resolver.js create mode 100644 src/resources/4_0_0/profiles/media/mutation.js create mode 100644 src/resources/4_0_0/profiles/media/query.js create mode 100644 src/resources/4_0_0/profiles/media/register.js create mode 100644 src/resources/4_0_0/profiles/media/resolver.js create mode 100644 src/resources/4_0_0/profiles/medication/mutation.js create mode 100644 src/resources/4_0_0/profiles/medication/query.js create mode 100644 src/resources/4_0_0/profiles/medication/register.js create mode 100644 src/resources/4_0_0/profiles/medication/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicationadministration/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicationadministration/query.js create mode 100644 src/resources/4_0_0/profiles/medicationadministration/register.js create mode 100644 src/resources/4_0_0/profiles/medicationadministration/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicationdispense/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicationdispense/query.js create mode 100644 src/resources/4_0_0/profiles/medicationdispense/register.js create mode 100644 src/resources/4_0_0/profiles/medicationdispense/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicationknowledge/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicationknowledge/query.js create mode 100644 src/resources/4_0_0/profiles/medicationknowledge/register.js create mode 100644 src/resources/4_0_0/profiles/medicationknowledge/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicationrequest/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicationrequest/query.js create mode 100644 src/resources/4_0_0/profiles/medicationrequest/register.js create mode 100644 src/resources/4_0_0/profiles/medicationrequest/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicationstatement/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicationstatement/query.js create mode 100644 src/resources/4_0_0/profiles/medicationstatement/register.js create mode 100644 src/resources/4_0_0/profiles/medicationstatement/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicinalproduct/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicinalproduct/query.js create mode 100644 src/resources/4_0_0/profiles/medicinalproduct/register.js create mode 100644 src/resources/4_0_0/profiles/medicinalproduct/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductauthorization/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductauthorization/query.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductauthorization/register.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductauthorization/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductcontraindication/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductcontraindication/query.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductcontraindication/register.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductcontraindication/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductindication/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductindication/query.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductindication/register.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductindication/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductinteraction/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductinteraction/query.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductinteraction/register.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductinteraction/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductpackaged/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductpackaged/query.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductpackaged/register.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductpackaged/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductpharmaceutical/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductpharmaceutical/query.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductpharmaceutical/register.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductpharmaceutical/resolver.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductundesirableeffect/mutation.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductundesirableeffect/query.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductundesirableeffect/register.js create mode 100644 src/resources/4_0_0/profiles/medicinalproductundesirableeffect/resolver.js create mode 100644 src/resources/4_0_0/profiles/messagedefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/messagedefinition/query.js create mode 100644 src/resources/4_0_0/profiles/messagedefinition/register.js create mode 100644 src/resources/4_0_0/profiles/messagedefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/messageheader/mutation.js create mode 100644 src/resources/4_0_0/profiles/messageheader/query.js create mode 100644 src/resources/4_0_0/profiles/messageheader/register.js create mode 100644 src/resources/4_0_0/profiles/messageheader/resolver.js create mode 100644 src/resources/4_0_0/profiles/molecularsequence/mutation.js create mode 100644 src/resources/4_0_0/profiles/molecularsequence/query.js create mode 100644 src/resources/4_0_0/profiles/molecularsequence/register.js create mode 100644 src/resources/4_0_0/profiles/molecularsequence/resolver.js create mode 100644 src/resources/4_0_0/profiles/namingsystem/mutation.js create mode 100644 src/resources/4_0_0/profiles/namingsystem/query.js create mode 100644 src/resources/4_0_0/profiles/namingsystem/register.js create mode 100644 src/resources/4_0_0/profiles/namingsystem/resolver.js create mode 100644 src/resources/4_0_0/profiles/nutritionorder/mutation.js create mode 100644 src/resources/4_0_0/profiles/nutritionorder/query.js create mode 100644 src/resources/4_0_0/profiles/nutritionorder/register.js create mode 100644 src/resources/4_0_0/profiles/nutritionorder/resolver.js create mode 100644 src/resources/4_0_0/profiles/observation/mutation.js create mode 100644 src/resources/4_0_0/profiles/observation/query.js create mode 100644 src/resources/4_0_0/profiles/observation/register.js create mode 100644 src/resources/4_0_0/profiles/observation/resolver.js create mode 100644 src/resources/4_0_0/profiles/operationdefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/operationdefinition/query.js create mode 100644 src/resources/4_0_0/profiles/operationdefinition/register.js create mode 100644 src/resources/4_0_0/profiles/operationdefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/organization/mutation.js create mode 100644 src/resources/4_0_0/profiles/organization/query.js create mode 100644 src/resources/4_0_0/profiles/organization/register.js create mode 100644 src/resources/4_0_0/profiles/organization/resolver.js create mode 100644 src/resources/4_0_0/profiles/organizationaffiliation/mutation.js create mode 100644 src/resources/4_0_0/profiles/organizationaffiliation/query.js create mode 100644 src/resources/4_0_0/profiles/organizationaffiliation/register.js create mode 100644 src/resources/4_0_0/profiles/organizationaffiliation/resolver.js create mode 100644 src/resources/4_0_0/profiles/patient/mutation.js create mode 100644 src/resources/4_0_0/profiles/patient/query.js create mode 100644 src/resources/4_0_0/profiles/patient/register.js create mode 100644 src/resources/4_0_0/profiles/patient/resolver.js create mode 100644 src/resources/4_0_0/profiles/paymentnotice/mutation.js create mode 100644 src/resources/4_0_0/profiles/paymentnotice/query.js create mode 100644 src/resources/4_0_0/profiles/paymentnotice/register.js create mode 100644 src/resources/4_0_0/profiles/paymentnotice/resolver.js create mode 100644 src/resources/4_0_0/profiles/paymentreconciliation/mutation.js create mode 100644 src/resources/4_0_0/profiles/paymentreconciliation/query.js create mode 100644 src/resources/4_0_0/profiles/paymentreconciliation/register.js create mode 100644 src/resources/4_0_0/profiles/paymentreconciliation/resolver.js create mode 100644 src/resources/4_0_0/profiles/person/mutation.js create mode 100644 src/resources/4_0_0/profiles/person/query.js create mode 100644 src/resources/4_0_0/profiles/person/register.js create mode 100644 src/resources/4_0_0/profiles/person/resolver.js create mode 100644 src/resources/4_0_0/profiles/plandefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/plandefinition/query.js create mode 100644 src/resources/4_0_0/profiles/plandefinition/register.js create mode 100644 src/resources/4_0_0/profiles/plandefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/practitioner/mutation.js create mode 100644 src/resources/4_0_0/profiles/practitioner/query.js create mode 100644 src/resources/4_0_0/profiles/practitioner/register.js create mode 100644 src/resources/4_0_0/profiles/practitioner/resolver.js create mode 100644 src/resources/4_0_0/profiles/practitionerrole/mutation.js create mode 100644 src/resources/4_0_0/profiles/practitionerrole/query.js create mode 100644 src/resources/4_0_0/profiles/practitionerrole/register.js create mode 100644 src/resources/4_0_0/profiles/practitionerrole/resolver.js create mode 100644 src/resources/4_0_0/profiles/procedure/mutation.js create mode 100644 src/resources/4_0_0/profiles/procedure/query.js create mode 100644 src/resources/4_0_0/profiles/procedure/register.js create mode 100644 src/resources/4_0_0/profiles/procedure/resolver.js create mode 100644 src/resources/4_0_0/profiles/provenance/mutation.js create mode 100644 src/resources/4_0_0/profiles/provenance/query.js create mode 100644 src/resources/4_0_0/profiles/provenance/register.js create mode 100644 src/resources/4_0_0/profiles/provenance/resolver.js create mode 100644 src/resources/4_0_0/profiles/questionnaire/mutation.js create mode 100644 src/resources/4_0_0/profiles/questionnaire/query.js create mode 100644 src/resources/4_0_0/profiles/questionnaire/register.js create mode 100644 src/resources/4_0_0/profiles/questionnaire/resolver.js create mode 100644 src/resources/4_0_0/profiles/questionnaireresponse/mutation.js create mode 100644 src/resources/4_0_0/profiles/questionnaireresponse/query.js create mode 100644 src/resources/4_0_0/profiles/questionnaireresponse/register.js create mode 100644 src/resources/4_0_0/profiles/questionnaireresponse/resolver.js create mode 100644 src/resources/4_0_0/profiles/relatedperson/mutation.js create mode 100644 src/resources/4_0_0/profiles/relatedperson/query.js create mode 100644 src/resources/4_0_0/profiles/relatedperson/register.js create mode 100644 src/resources/4_0_0/profiles/relatedperson/resolver.js create mode 100644 src/resources/4_0_0/profiles/requestgroup/mutation.js create mode 100644 src/resources/4_0_0/profiles/requestgroup/query.js create mode 100644 src/resources/4_0_0/profiles/requestgroup/register.js create mode 100644 src/resources/4_0_0/profiles/requestgroup/resolver.js create mode 100644 src/resources/4_0_0/profiles/researchdefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/researchdefinition/query.js create mode 100644 src/resources/4_0_0/profiles/researchdefinition/register.js create mode 100644 src/resources/4_0_0/profiles/researchdefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/researchelementdefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/researchelementdefinition/query.js create mode 100644 src/resources/4_0_0/profiles/researchelementdefinition/register.js create mode 100644 src/resources/4_0_0/profiles/researchelementdefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/researchstudy/mutation.js create mode 100644 src/resources/4_0_0/profiles/researchstudy/query.js create mode 100644 src/resources/4_0_0/profiles/researchstudy/register.js create mode 100644 src/resources/4_0_0/profiles/researchstudy/resolver.js create mode 100644 src/resources/4_0_0/profiles/researchsubject/mutation.js create mode 100644 src/resources/4_0_0/profiles/researchsubject/query.js create mode 100644 src/resources/4_0_0/profiles/researchsubject/register.js create mode 100644 src/resources/4_0_0/profiles/researchsubject/resolver.js create mode 100644 src/resources/4_0_0/profiles/riskassessment/mutation.js create mode 100644 src/resources/4_0_0/profiles/riskassessment/query.js create mode 100644 src/resources/4_0_0/profiles/riskassessment/register.js create mode 100644 src/resources/4_0_0/profiles/riskassessment/resolver.js create mode 100644 src/resources/4_0_0/profiles/riskevidencesynthesis/mutation.js create mode 100644 src/resources/4_0_0/profiles/riskevidencesynthesis/query.js create mode 100644 src/resources/4_0_0/profiles/riskevidencesynthesis/register.js create mode 100644 src/resources/4_0_0/profiles/riskevidencesynthesis/resolver.js create mode 100644 src/resources/4_0_0/profiles/schedule/mutation.js create mode 100644 src/resources/4_0_0/profiles/schedule/query.js create mode 100644 src/resources/4_0_0/profiles/schedule/register.js create mode 100644 src/resources/4_0_0/profiles/schedule/resolver.js create mode 100644 src/resources/4_0_0/profiles/searchparameter/mutation.js create mode 100644 src/resources/4_0_0/profiles/searchparameter/query.js create mode 100644 src/resources/4_0_0/profiles/searchparameter/register.js create mode 100644 src/resources/4_0_0/profiles/searchparameter/resolver.js create mode 100644 src/resources/4_0_0/profiles/servicerequest/mutation.js create mode 100644 src/resources/4_0_0/profiles/servicerequest/query.js create mode 100644 src/resources/4_0_0/profiles/servicerequest/register.js create mode 100644 src/resources/4_0_0/profiles/servicerequest/resolver.js create mode 100644 src/resources/4_0_0/profiles/slot/mutation.js create mode 100644 src/resources/4_0_0/profiles/slot/query.js create mode 100644 src/resources/4_0_0/profiles/slot/register.js create mode 100644 src/resources/4_0_0/profiles/slot/resolver.js create mode 100644 src/resources/4_0_0/profiles/specimen/mutation.js create mode 100644 src/resources/4_0_0/profiles/specimen/query.js create mode 100644 src/resources/4_0_0/profiles/specimen/register.js create mode 100644 src/resources/4_0_0/profiles/specimen/resolver.js create mode 100644 src/resources/4_0_0/profiles/specimendefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/specimendefinition/query.js create mode 100644 src/resources/4_0_0/profiles/specimendefinition/register.js create mode 100644 src/resources/4_0_0/profiles/specimendefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/structuredefinition/mutation.js create mode 100644 src/resources/4_0_0/profiles/structuredefinition/query.js create mode 100644 src/resources/4_0_0/profiles/structuredefinition/register.js create mode 100644 src/resources/4_0_0/profiles/structuredefinition/resolver.js create mode 100644 src/resources/4_0_0/profiles/structuremap/mutation.js create mode 100644 src/resources/4_0_0/profiles/structuremap/query.js create mode 100644 src/resources/4_0_0/profiles/structuremap/register.js create mode 100644 src/resources/4_0_0/profiles/structuremap/resolver.js create mode 100644 src/resources/4_0_0/profiles/subscription/mutation.js create mode 100644 src/resources/4_0_0/profiles/subscription/query.js create mode 100644 src/resources/4_0_0/profiles/subscription/register.js create mode 100644 src/resources/4_0_0/profiles/subscription/resolver.js create mode 100644 src/resources/4_0_0/profiles/substance/mutation.js create mode 100644 src/resources/4_0_0/profiles/substance/query.js create mode 100644 src/resources/4_0_0/profiles/substance/register.js create mode 100644 src/resources/4_0_0/profiles/substance/resolver.js create mode 100644 src/resources/4_0_0/profiles/substancespecification/mutation.js create mode 100644 src/resources/4_0_0/profiles/substancespecification/query.js create mode 100644 src/resources/4_0_0/profiles/substancespecification/register.js create mode 100644 src/resources/4_0_0/profiles/substancespecification/resolver.js create mode 100644 src/resources/4_0_0/profiles/supplydelivery/mutation.js create mode 100644 src/resources/4_0_0/profiles/supplydelivery/query.js create mode 100644 src/resources/4_0_0/profiles/supplydelivery/register.js create mode 100644 src/resources/4_0_0/profiles/supplydelivery/resolver.js create mode 100644 src/resources/4_0_0/profiles/supplyrequest/mutation.js create mode 100644 src/resources/4_0_0/profiles/supplyrequest/query.js create mode 100644 src/resources/4_0_0/profiles/supplyrequest/register.js create mode 100644 src/resources/4_0_0/profiles/supplyrequest/resolver.js create mode 100644 src/resources/4_0_0/profiles/task/mutation.js create mode 100644 src/resources/4_0_0/profiles/task/query.js create mode 100644 src/resources/4_0_0/profiles/task/register.js create mode 100644 src/resources/4_0_0/profiles/task/resolver.js create mode 100644 src/resources/4_0_0/profiles/terminologycapabilities/mutation.js create mode 100644 src/resources/4_0_0/profiles/terminologycapabilities/query.js create mode 100644 src/resources/4_0_0/profiles/terminologycapabilities/register.js create mode 100644 src/resources/4_0_0/profiles/terminologycapabilities/resolver.js create mode 100644 src/resources/4_0_0/profiles/testreport/mutation.js create mode 100644 src/resources/4_0_0/profiles/testreport/query.js create mode 100644 src/resources/4_0_0/profiles/testreport/register.js create mode 100644 src/resources/4_0_0/profiles/testreport/resolver.js create mode 100644 src/resources/4_0_0/profiles/testscript/mutation.js create mode 100644 src/resources/4_0_0/profiles/testscript/query.js create mode 100644 src/resources/4_0_0/profiles/testscript/register.js create mode 100644 src/resources/4_0_0/profiles/testscript/resolver.js create mode 100644 src/resources/4_0_0/profiles/valueset/mutation.js create mode 100644 src/resources/4_0_0/profiles/valueset/query.js create mode 100644 src/resources/4_0_0/profiles/valueset/register.js create mode 100644 src/resources/4_0_0/profiles/valueset/resolver.js create mode 100644 src/resources/4_0_0/profiles/verificationresult/mutation.js create mode 100644 src/resources/4_0_0/profiles/verificationresult/query.js create mode 100644 src/resources/4_0_0/profiles/verificationresult/register.js create mode 100644 src/resources/4_0_0/profiles/verificationresult/resolver.js create mode 100644 src/resources/4_0_0/profiles/visionprescription/mutation.js create mode 100644 src/resources/4_0_0/profiles/visionprescription/query.js create mode 100644 src/resources/4_0_0/profiles/visionprescription/register.js create mode 100644 src/resources/4_0_0/profiles/visionprescription/resolver.js create mode 100644 src/resources/4_0_0/scalars/base64binary.scalar.js create mode 100644 src/resources/4_0_0/scalars/boolean.scalar.js create mode 100644 src/resources/4_0_0/scalars/canonical.scalar.js create mode 100644 src/resources/4_0_0/scalars/code.scalar.js create mode 100644 src/resources/4_0_0/scalars/date.scalar.js create mode 100644 src/resources/4_0_0/scalars/datetime.scalar.js create mode 100644 src/resources/4_0_0/scalars/decimal.scalar.js create mode 100644 src/resources/4_0_0/scalars/id.scalar.js create mode 100644 src/resources/4_0_0/scalars/instant.scalar.js create mode 100644 src/resources/4_0_0/scalars/integer.scalar.js create mode 100644 src/resources/4_0_0/scalars/markdown.scalar.js create mode 100644 src/resources/4_0_0/scalars/oid.scalar.js create mode 100644 src/resources/4_0_0/scalars/positiveint.scalar.js create mode 100644 src/resources/4_0_0/scalars/string.scalar.js create mode 100644 src/resources/4_0_0/scalars/time.scalar.js create mode 100644 src/resources/4_0_0/scalars/token.scalar.js create mode 100644 src/resources/4_0_0/scalars/unsignedint.scalar.js create mode 100644 src/resources/4_0_0/scalars/uri.scalar.js create mode 100644 src/resources/4_0_0/scalars/url.scalar.js create mode 100644 src/resources/4_0_0/scalars/uuid.scalar.js create mode 100644 src/resources/4_0_0/scalars/xhtml.scalar.js create mode 100644 src/resources/4_0_0/schemas/account.schema.js create mode 100644 src/resources/4_0_0/schemas/accountcoverage.schema.js create mode 100644 src/resources/4_0_0/schemas/accountguarantor.schema.js create mode 100644 src/resources/4_0_0/schemas/activitydefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/activitydefinitiondynamicvalue.schema.js create mode 100644 src/resources/4_0_0/schemas/activitydefinitionparticipant.schema.js create mode 100644 src/resources/4_0_0/schemas/address.schema.js create mode 100644 src/resources/4_0_0/schemas/adverseevent.schema.js create mode 100644 src/resources/4_0_0/schemas/adverseeventsuspectentity.schema.js create mode 100644 src/resources/4_0_0/schemas/adverseeventsuspectentitycausality.schema.js create mode 100644 src/resources/4_0_0/schemas/age.schema.js create mode 100644 src/resources/4_0_0/schemas/allergyintolerance.schema.js create mode 100644 src/resources/4_0_0/schemas/allergyintolerancereaction.schema.js create mode 100644 src/resources/4_0_0/schemas/annotation.schema.js create mode 100644 src/resources/4_0_0/schemas/appointment.schema.js create mode 100644 src/resources/4_0_0/schemas/appointmentparticipant.schema.js create mode 100644 src/resources/4_0_0/schemas/appointmentresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/attachment.schema.js create mode 100644 src/resources/4_0_0/schemas/auditevent.schema.js create mode 100644 src/resources/4_0_0/schemas/auditeventagent.schema.js create mode 100644 src/resources/4_0_0/schemas/auditeventagentnetwork.schema.js create mode 100644 src/resources/4_0_0/schemas/auditevententity.schema.js create mode 100644 src/resources/4_0_0/schemas/auditevententitydetail.schema.js create mode 100644 src/resources/4_0_0/schemas/auditeventsource.schema.js create mode 100644 src/resources/4_0_0/schemas/backboneelement.schema.js create mode 100644 src/resources/4_0_0/schemas/basic.schema.js create mode 100644 src/resources/4_0_0/schemas/binary.schema.js create mode 100644 src/resources/4_0_0/schemas/biologicallyderivedproduct.schema.js create mode 100644 src/resources/4_0_0/schemas/biologicallyderivedproductcollection.schema.js create mode 100644 src/resources/4_0_0/schemas/biologicallyderivedproductmanipulation.schema.js create mode 100644 src/resources/4_0_0/schemas/biologicallyderivedproductprocessing.schema.js create mode 100644 src/resources/4_0_0/schemas/biologicallyderivedproductstorage.schema.js create mode 100644 src/resources/4_0_0/schemas/bodystructure.schema.js create mode 100644 src/resources/4_0_0/schemas/bundle.schema.js create mode 100644 src/resources/4_0_0/schemas/bundleentry.schema.js create mode 100644 src/resources/4_0_0/schemas/bundleentryrequest.schema.js create mode 100644 src/resources/4_0_0/schemas/bundleentryresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/bundleentrysearch.schema.js create mode 100644 src/resources/4_0_0/schemas/bundlelink.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatement.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementdocument.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementimplementation.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementmessaging.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementmessagingendpoint.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementmessagingsupportedmessage.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementrest.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementrestinteraction.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementrestresource.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementrestresourceinteraction.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementrestresourceoperation.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementrestresourcesearchparam.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementrestsecurity.schema.js create mode 100644 src/resources/4_0_0/schemas/capabilitystatementsoftware.schema.js create mode 100644 src/resources/4_0_0/schemas/careplan.schema.js create mode 100644 src/resources/4_0_0/schemas/careplanactivity.schema.js create mode 100644 src/resources/4_0_0/schemas/careplanactivitydetail.schema.js create mode 100644 src/resources/4_0_0/schemas/careteam.schema.js create mode 100644 src/resources/4_0_0/schemas/careteamparticipant.schema.js create mode 100644 src/resources/4_0_0/schemas/catalogentry.schema.js create mode 100644 src/resources/4_0_0/schemas/catalogentryrelatedentry.schema.js create mode 100644 src/resources/4_0_0/schemas/chargeitem.schema.js create mode 100644 src/resources/4_0_0/schemas/chargeitemdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/chargeitemdefinitionapplicability.schema.js create mode 100644 src/resources/4_0_0/schemas/chargeitemdefinitionpropertygroup.schema.js create mode 100644 src/resources/4_0_0/schemas/chargeitemdefinitionpropertygrouppricecomponent.schema.js create mode 100644 src/resources/4_0_0/schemas/chargeitemperformer.schema.js create mode 100644 src/resources/4_0_0/schemas/claim.schema.js create mode 100644 src/resources/4_0_0/schemas/claimaccident.schema.js create mode 100644 src/resources/4_0_0/schemas/claimcareteam.schema.js create mode 100644 src/resources/4_0_0/schemas/claimdiagnosis.schema.js create mode 100644 src/resources/4_0_0/schemas/claiminsurance.schema.js create mode 100644 src/resources/4_0_0/schemas/claimitem.schema.js create mode 100644 src/resources/4_0_0/schemas/claimitemdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/claimitemdetailsubdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/claimpayee.schema.js create mode 100644 src/resources/4_0_0/schemas/claimprocedure.schema.js create mode 100644 src/resources/4_0_0/schemas/claimrelated.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseadditem.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseadditemdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseadditemdetailsubdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseerror.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseinsurance.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseitem.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseitemadjudication.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseitemdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseitemdetailsubdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponsepayment.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponseprocessnote.schema.js create mode 100644 src/resources/4_0_0/schemas/claimresponsetotal.schema.js create mode 100644 src/resources/4_0_0/schemas/claimsupportinginfo.schema.js create mode 100644 src/resources/4_0_0/schemas/clinicalimpression.schema.js create mode 100644 src/resources/4_0_0/schemas/clinicalimpressionfinding.schema.js create mode 100644 src/resources/4_0_0/schemas/clinicalimpressioninvestigation.schema.js create mode 100644 src/resources/4_0_0/schemas/codeableconcept.schema.js create mode 100644 src/resources/4_0_0/schemas/codesystem.schema.js create mode 100644 src/resources/4_0_0/schemas/codesystemconcept.schema.js create mode 100644 src/resources/4_0_0/schemas/codesystemconceptdesignation.schema.js create mode 100644 src/resources/4_0_0/schemas/codesystemconceptproperty.schema.js create mode 100644 src/resources/4_0_0/schemas/codesystemfilter.schema.js create mode 100644 src/resources/4_0_0/schemas/codesystemproperty.schema.js create mode 100644 src/resources/4_0_0/schemas/coding.schema.js create mode 100644 src/resources/4_0_0/schemas/communication.schema.js create mode 100644 src/resources/4_0_0/schemas/communicationpayload.schema.js create mode 100644 src/resources/4_0_0/schemas/communicationrequest.schema.js create mode 100644 src/resources/4_0_0/schemas/communicationrequestpayload.schema.js create mode 100644 src/resources/4_0_0/schemas/compartmentdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/compartmentdefinitionresource.schema.js create mode 100644 src/resources/4_0_0/schemas/composition.schema.js create mode 100644 src/resources/4_0_0/schemas/compositionattester.schema.js create mode 100644 src/resources/4_0_0/schemas/compositionevent.schema.js create mode 100644 src/resources/4_0_0/schemas/compositionrelatesto.schema.js create mode 100644 src/resources/4_0_0/schemas/compositionsection.schema.js create mode 100644 src/resources/4_0_0/schemas/conceptmap.schema.js create mode 100644 src/resources/4_0_0/schemas/conceptmapgroup.schema.js create mode 100644 src/resources/4_0_0/schemas/conceptmapgroupelement.schema.js create mode 100644 src/resources/4_0_0/schemas/conceptmapgroupelementtarget.schema.js create mode 100644 src/resources/4_0_0/schemas/conceptmapgroupelementtargetdependson.schema.js create mode 100644 src/resources/4_0_0/schemas/conceptmapgroupunmapped.schema.js create mode 100644 src/resources/4_0_0/schemas/condition.schema.js create mode 100644 src/resources/4_0_0/schemas/conditionevidence.schema.js create mode 100644 src/resources/4_0_0/schemas/conditionstage.schema.js create mode 100644 src/resources/4_0_0/schemas/consent.schema.js create mode 100644 src/resources/4_0_0/schemas/consentpolicy.schema.js create mode 100644 src/resources/4_0_0/schemas/consentprovision.schema.js create mode 100644 src/resources/4_0_0/schemas/consentprovisionactor.schema.js create mode 100644 src/resources/4_0_0/schemas/consentprovisiondata.schema.js create mode 100644 src/resources/4_0_0/schemas/consentverification.schema.js create mode 100644 src/resources/4_0_0/schemas/contactdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/contactpoint.schema.js create mode 100644 src/resources/4_0_0/schemas/contract.schema.js create mode 100644 src/resources/4_0_0/schemas/contractcontentdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/contractfriendly.schema.js create mode 100644 src/resources/4_0_0/schemas/contractlegal.schema.js create mode 100644 src/resources/4_0_0/schemas/contractrule.schema.js create mode 100644 src/resources/4_0_0/schemas/contractsigner.schema.js create mode 100644 src/resources/4_0_0/schemas/contractterm.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermaction.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermactionsubject.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermasset.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermassetcontext.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermassetvalueditem.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermoffer.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermofferanswer.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermofferparty.schema.js create mode 100644 src/resources/4_0_0/schemas/contracttermsecuritylabel.schema.js create mode 100644 src/resources/4_0_0/schemas/contributor.schema.js create mode 100644 src/resources/4_0_0/schemas/count.schema.js create mode 100644 src/resources/4_0_0/schemas/coverage.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageclass.schema.js create mode 100644 src/resources/4_0_0/schemas/coveragecosttobeneficiary.schema.js create mode 100644 src/resources/4_0_0/schemas/coveragecosttobeneficiaryexception.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityrequest.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityrequestinsurance.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityrequestitem.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityrequestitemdiagnosis.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityrequestsupportinginfo.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityresponseerror.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityresponseinsurance.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityresponseinsuranceitem.schema.js create mode 100644 src/resources/4_0_0/schemas/coverageeligibilityresponseinsuranceitembenefit.schema.js create mode 100644 src/resources/4_0_0/schemas/datarequirement.schema.js create mode 100644 src/resources/4_0_0/schemas/datarequirementcodefilter.schema.js create mode 100644 src/resources/4_0_0/schemas/datarequirementdatefilter.schema.js create mode 100644 src/resources/4_0_0/schemas/datarequirementsort.schema.js create mode 100644 src/resources/4_0_0/schemas/detectedissue.schema.js create mode 100644 src/resources/4_0_0/schemas/detectedissueevidence.schema.js create mode 100644 src/resources/4_0_0/schemas/detectedissuemitigation.schema.js create mode 100644 src/resources/4_0_0/schemas/device.schema.js create mode 100644 src/resources/4_0_0/schemas/devicedefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/devicedefinitioncapability.schema.js create mode 100644 src/resources/4_0_0/schemas/devicedefinitiondevicename.schema.js create mode 100644 src/resources/4_0_0/schemas/devicedefinitionmaterial.schema.js create mode 100644 src/resources/4_0_0/schemas/devicedefinitionproperty.schema.js create mode 100644 src/resources/4_0_0/schemas/devicedefinitionspecialization.schema.js create mode 100644 src/resources/4_0_0/schemas/devicedefinitionudideviceidentifier.schema.js create mode 100644 src/resources/4_0_0/schemas/devicedevicename.schema.js create mode 100644 src/resources/4_0_0/schemas/devicemetric.schema.js create mode 100644 src/resources/4_0_0/schemas/devicemetriccalibration.schema.js create mode 100644 src/resources/4_0_0/schemas/deviceproperty.schema.js create mode 100644 src/resources/4_0_0/schemas/devicerequest.schema.js create mode 100644 src/resources/4_0_0/schemas/devicerequestparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/devicespecialization.schema.js create mode 100644 src/resources/4_0_0/schemas/deviceudicarrier.schema.js create mode 100644 src/resources/4_0_0/schemas/deviceusestatement.schema.js create mode 100644 src/resources/4_0_0/schemas/deviceversion.schema.js create mode 100644 src/resources/4_0_0/schemas/diagnosticreport.schema.js create mode 100644 src/resources/4_0_0/schemas/diagnosticreportmedia.schema.js create mode 100644 src/resources/4_0_0/schemas/distance.schema.js create mode 100644 src/resources/4_0_0/schemas/documentmanifest.schema.js create mode 100644 src/resources/4_0_0/schemas/documentmanifestrelated.schema.js create mode 100644 src/resources/4_0_0/schemas/documentreference.schema.js create mode 100644 src/resources/4_0_0/schemas/documentreferencecontent.schema.js create mode 100644 src/resources/4_0_0/schemas/documentreferencecontext.schema.js create mode 100644 src/resources/4_0_0/schemas/documentreferencerelatesto.schema.js create mode 100644 src/resources/4_0_0/schemas/domainresource.schema.js create mode 100644 src/resources/4_0_0/schemas/dosage.schema.js create mode 100644 src/resources/4_0_0/schemas/dosagedoseandrate.schema.js create mode 100644 src/resources/4_0_0/schemas/duration.schema.js create mode 100644 src/resources/4_0_0/schemas/effectevidencesynthesis.schema.js create mode 100644 src/resources/4_0_0/schemas/effectevidencesynthesiscertainty.schema.js create mode 100644 src/resources/4_0_0/schemas/effectevidencesynthesiscertaintycertaintysubcomponent.schema.js create mode 100644 src/resources/4_0_0/schemas/effectevidencesynthesiseffectestimate.schema.js create mode 100644 src/resources/4_0_0/schemas/effectevidencesynthesiseffectestimateprecisionestimate.schema.js create mode 100644 src/resources/4_0_0/schemas/effectevidencesynthesisresultsbyexposure.schema.js create mode 100644 src/resources/4_0_0/schemas/effectevidencesynthesissamplesize.schema.js create mode 100644 src/resources/4_0_0/schemas/element.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinitionbase.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinitionbinding.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinitionconstraint.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinitionexample.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinitionmapping.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinitionslicing.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinitionslicingdiscriminator.schema.js create mode 100644 src/resources/4_0_0/schemas/elementdefinitiontype.schema.js create mode 100644 src/resources/4_0_0/schemas/encounter.schema.js create mode 100644 src/resources/4_0_0/schemas/encounterclasshistory.schema.js create mode 100644 src/resources/4_0_0/schemas/encounterdiagnosis.schema.js create mode 100644 src/resources/4_0_0/schemas/encounterhospitalization.schema.js create mode 100644 src/resources/4_0_0/schemas/encounterlocation.schema.js create mode 100644 src/resources/4_0_0/schemas/encounterparticipant.schema.js create mode 100644 src/resources/4_0_0/schemas/encounterstatushistory.schema.js create mode 100644 src/resources/4_0_0/schemas/endpoint.schema.js create mode 100644 src/resources/4_0_0/schemas/enrollmentrequest.schema.js create mode 100644 src/resources/4_0_0/schemas/enrollmentresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/episodeofcare.schema.js create mode 100644 src/resources/4_0_0/schemas/episodeofcarediagnosis.schema.js create mode 100644 src/resources/4_0_0/schemas/episodeofcarestatushistory.schema.js create mode 100644 src/resources/4_0_0/schemas/eventdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/evidence.schema.js create mode 100644 src/resources/4_0_0/schemas/evidencevariable.schema.js create mode 100644 src/resources/4_0_0/schemas/evidencevariablecharacteristic.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenario.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenarioactor.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenarioinstance.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenarioinstancecontainedinstance.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenarioinstanceversion.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenarioprocess.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenarioprocessstep.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenarioprocessstepalternative.schema.js create mode 100644 src/resources/4_0_0/schemas/examplescenarioprocessstepoperation.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefit.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitaccident.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitadditem.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitadditemdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitadditemdetailsubdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitbenefitbalance.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitbenefitbalancefinancial.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitcareteam.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitdiagnosis.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitinsurance.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefititem.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefititemadjudication.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefititemdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefititemdetailsubdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitpayee.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitpayment.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitprocedure.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitprocessnote.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitrelated.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefitsupportinginfo.schema.js create mode 100644 src/resources/4_0_0/schemas/explanationofbenefittotal.schema.js create mode 100644 src/resources/4_0_0/schemas/expression.schema.js create mode 100644 src/resources/4_0_0/schemas/extension.schema.js create mode 100644 src/resources/4_0_0/schemas/familymemberhistory.schema.js create mode 100644 src/resources/4_0_0/schemas/familymemberhistorycondition.schema.js create mode 100644 src/resources/4_0_0/schemas/flag.schema.js create mode 100644 src/resources/4_0_0/schemas/goal.schema.js create mode 100644 src/resources/4_0_0/schemas/goaltarget.schema.js create mode 100644 src/resources/4_0_0/schemas/graphdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/graphdefinitionlink.schema.js create mode 100644 src/resources/4_0_0/schemas/graphdefinitionlinktarget.schema.js create mode 100644 src/resources/4_0_0/schemas/graphdefinitionlinktargetcompartment.schema.js create mode 100644 src/resources/4_0_0/schemas/group.schema.js create mode 100644 src/resources/4_0_0/schemas/groupcharacteristic.schema.js create mode 100644 src/resources/4_0_0/schemas/groupmember.schema.js create mode 100644 src/resources/4_0_0/schemas/guidanceresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/healthcareservice.schema.js create mode 100644 src/resources/4_0_0/schemas/healthcareserviceavailabletime.schema.js create mode 100644 src/resources/4_0_0/schemas/healthcareserviceeligibility.schema.js create mode 100644 src/resources/4_0_0/schemas/healthcareservicenotavailable.schema.js create mode 100644 src/resources/4_0_0/schemas/humanname.schema.js create mode 100644 src/resources/4_0_0/schemas/identifier.schema.js create mode 100644 src/resources/4_0_0/schemas/imagingstudy.schema.js create mode 100644 src/resources/4_0_0/schemas/imagingstudyseries.schema.js create mode 100644 src/resources/4_0_0/schemas/imagingstudyseriesinstance.schema.js create mode 100644 src/resources/4_0_0/schemas/imagingstudyseriesperformer.schema.js create mode 100644 src/resources/4_0_0/schemas/immunization.schema.js create mode 100644 src/resources/4_0_0/schemas/immunizationeducation.schema.js create mode 100644 src/resources/4_0_0/schemas/immunizationevaluation.schema.js create mode 100644 src/resources/4_0_0/schemas/immunizationperformer.schema.js create mode 100644 src/resources/4_0_0/schemas/immunizationprotocolapplied.schema.js create mode 100644 src/resources/4_0_0/schemas/immunizationreaction.schema.js create mode 100644 src/resources/4_0_0/schemas/immunizationrecommendation.schema.js create mode 100644 src/resources/4_0_0/schemas/immunizationrecommendationrecommendation.schema.js create mode 100644 src/resources/4_0_0/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguide.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidedefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidedefinitiongrouping.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidedefinitionpage.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidedefinitionparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidedefinitionresource.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidedefinitiontemplate.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidedependson.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguideglobal.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidemanifest.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidemanifestpage.schema.js create mode 100644 src/resources/4_0_0/schemas/implementationguidemanifestresource.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplan.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplancontact.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplancoverage.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplancoveragebenefit.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplancoveragebenefitlimit.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplanplan.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplanplangeneralcost.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplanplanspecificcost.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplanplanspecificcostbenefit.schema.js create mode 100644 src/resources/4_0_0/schemas/insuranceplanplanspecificcostbenefitcost.schema.js create mode 100644 src/resources/4_0_0/schemas/invoice.schema.js create mode 100644 src/resources/4_0_0/schemas/invoicelineitem.schema.js create mode 100644 src/resources/4_0_0/schemas/invoicelineitempricecomponent.schema.js create mode 100644 src/resources/4_0_0/schemas/invoiceparticipant.schema.js create mode 100644 src/resources/4_0_0/schemas/library.schema.js create mode 100644 src/resources/4_0_0/schemas/linkage.schema.js create mode 100644 src/resources/4_0_0/schemas/linkageitem.schema.js create mode 100644 src/resources/4_0_0/schemas/list.schema.js create mode 100644 src/resources/4_0_0/schemas/listentry.schema.js create mode 100644 src/resources/4_0_0/schemas/location.schema.js create mode 100644 src/resources/4_0_0/schemas/locationhoursofoperation.schema.js create mode 100644 src/resources/4_0_0/schemas/locationposition.schema.js create mode 100644 src/resources/4_0_0/schemas/marketingstatus.schema.js create mode 100644 src/resources/4_0_0/schemas/measure.schema.js create mode 100644 src/resources/4_0_0/schemas/measuregroup.schema.js create mode 100644 src/resources/4_0_0/schemas/measuregrouppopulation.schema.js create mode 100644 src/resources/4_0_0/schemas/measuregroupstratifier.schema.js create mode 100644 src/resources/4_0_0/schemas/measuregroupstratifiercomponent.schema.js create mode 100644 src/resources/4_0_0/schemas/measurereport.schema.js create mode 100644 src/resources/4_0_0/schemas/measurereportgroup.schema.js create mode 100644 src/resources/4_0_0/schemas/measurereportgrouppopulation.schema.js create mode 100644 src/resources/4_0_0/schemas/measurereportgroupstratifier.schema.js create mode 100644 src/resources/4_0_0/schemas/measurereportgroupstratifierstratum.schema.js create mode 100644 src/resources/4_0_0/schemas/measurereportgroupstratifierstratumcomponent.schema.js create mode 100644 src/resources/4_0_0/schemas/measurereportgroupstratifierstratumpopulation.schema.js create mode 100644 src/resources/4_0_0/schemas/measuresupplementaldata.schema.js create mode 100644 src/resources/4_0_0/schemas/media.schema.js create mode 100644 src/resources/4_0_0/schemas/medication.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationadministration.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationadministrationdosage.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationadministrationperformer.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationbatch.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationdispense.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationdispenseperformer.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationdispensesubstitution.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationingredient.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledge.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelines.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelinesdosage.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelinespatientcharacteristics.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgecost.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgedrugcharacteristic.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgeingredient.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgekinetics.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgemedicineclassification.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgemonitoringprogram.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgemonograph.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgepackaging.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgeregulatory.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgeregulatorymaxdispense.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgeregulatoryschedule.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgeregulatorysubstitution.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationknowledgerelatedmedicationknowledge.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationrequest.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationrequestdispenserequest.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationrequestdispenserequestinitialfill.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationrequestsubstitution.schema.js create mode 100644 src/resources/4_0_0/schemas/medicationstatement.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproduct.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductauthorization.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductauthorizationjurisdictionalauthorization.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductauthorizationprocedure.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductcontraindication.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductcontraindicationothertherapy.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductindication.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductindicationothertherapy.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductingredient.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstance.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstancestrength.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstancestrengthreferencestrength.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductingredientsubstance.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductinteraction.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductinteractioninteractant.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductmanufactured.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductmanufacturingbusinessoperation.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductname.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductnamecountrylanguage.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductnamenamepart.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductpackaged.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductpackagedbatchidentifier.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductpackagedpackageitem.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductpharmaceutical.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductpharmaceuticalcharacteristics.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministration.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministrationtargetspecies.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductspecialdesignation.schema.js create mode 100644 src/resources/4_0_0/schemas/medicinalproductundesirableeffect.schema.js create mode 100644 src/resources/4_0_0/schemas/messagedefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/messagedefinitionallowedresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/messagedefinitionfocus.schema.js create mode 100644 src/resources/4_0_0/schemas/messageheader.schema.js create mode 100644 src/resources/4_0_0/schemas/messageheaderdestination.schema.js create mode 100644 src/resources/4_0_0/schemas/messageheaderresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/messageheadersource.schema.js create mode 100644 src/resources/4_0_0/schemas/meta.schema.js create mode 100644 src/resources/4_0_0/schemas/metadataresource.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequence.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequencequality.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequencequalityroc.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequencereferenceseq.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequencerepository.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequencestructurevariant.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequencestructurevariantinner.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequencestructurevariantouter.schema.js create mode 100644 src/resources/4_0_0/schemas/molecularsequencevariant.schema.js create mode 100644 src/resources/4_0_0/schemas/money.schema.js create mode 100644 src/resources/4_0_0/schemas/moneyquantity.schema.js create mode 100644 src/resources/4_0_0/schemas/namingsystem.schema.js create mode 100644 src/resources/4_0_0/schemas/namingsystemuniqueid.schema.js create mode 100644 src/resources/4_0_0/schemas/narrative.schema.js create mode 100644 src/resources/4_0_0/schemas/nutritionorder.schema.js create mode 100644 src/resources/4_0_0/schemas/nutritionorderenteralformula.schema.js create mode 100644 src/resources/4_0_0/schemas/nutritionorderenteralformulaadministration.schema.js create mode 100644 src/resources/4_0_0/schemas/nutritionorderoraldiet.schema.js create mode 100644 src/resources/4_0_0/schemas/nutritionorderoraldietnutrient.schema.js create mode 100644 src/resources/4_0_0/schemas/nutritionorderoraldiettexture.schema.js create mode 100644 src/resources/4_0_0/schemas/nutritionordersupplement.schema.js create mode 100644 src/resources/4_0_0/schemas/observation.schema.js create mode 100644 src/resources/4_0_0/schemas/observationcomponent.schema.js create mode 100644 src/resources/4_0_0/schemas/observationdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/observationdefinitionqualifiedinterval.schema.js create mode 100644 src/resources/4_0_0/schemas/observationdefinitionquantitativedetails.schema.js create mode 100644 src/resources/4_0_0/schemas/observationreferencerange.schema.js create mode 100644 src/resources/4_0_0/schemas/operationdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/operationdefinitionoverload.schema.js create mode 100644 src/resources/4_0_0/schemas/operationdefinitionparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/operationdefinitionparameterbinding.schema.js create mode 100644 src/resources/4_0_0/schemas/operationdefinitionparameterreferencedfrom.schema.js create mode 100644 src/resources/4_0_0/schemas/operationoutcome.schema.js create mode 100644 src/resources/4_0_0/schemas/operationoutcomeissue.schema.js create mode 100644 src/resources/4_0_0/schemas/organization.schema.js create mode 100644 src/resources/4_0_0/schemas/organizationaffiliation.schema.js create mode 100644 src/resources/4_0_0/schemas/organizationcontact.schema.js create mode 100644 src/resources/4_0_0/schemas/parameterdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/parameters.schema.js create mode 100644 src/resources/4_0_0/schemas/parametersparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/patient.schema.js create mode 100644 src/resources/4_0_0/schemas/patientcommunication.schema.js create mode 100644 src/resources/4_0_0/schemas/patientcontact.schema.js create mode 100644 src/resources/4_0_0/schemas/patientlink.schema.js create mode 100644 src/resources/4_0_0/schemas/paymentnotice.schema.js create mode 100644 src/resources/4_0_0/schemas/paymentreconciliation.schema.js create mode 100644 src/resources/4_0_0/schemas/paymentreconciliationdetail.schema.js create mode 100644 src/resources/4_0_0/schemas/paymentreconciliationprocessnote.schema.js create mode 100644 src/resources/4_0_0/schemas/period.schema.js create mode 100644 src/resources/4_0_0/schemas/person.schema.js create mode 100644 src/resources/4_0_0/schemas/personlink.schema.js create mode 100644 src/resources/4_0_0/schemas/plandefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/plandefinitionaction.schema.js create mode 100644 src/resources/4_0_0/schemas/plandefinitionactioncondition.schema.js create mode 100644 src/resources/4_0_0/schemas/plandefinitionactiondynamicvalue.schema.js create mode 100644 src/resources/4_0_0/schemas/plandefinitionactionparticipant.schema.js create mode 100644 src/resources/4_0_0/schemas/plandefinitionactionrelatedaction.schema.js create mode 100644 src/resources/4_0_0/schemas/plandefinitiongoal.schema.js create mode 100644 src/resources/4_0_0/schemas/plandefinitiongoaltarget.schema.js create mode 100644 src/resources/4_0_0/schemas/population.schema.js create mode 100644 src/resources/4_0_0/schemas/practitioner.schema.js create mode 100644 src/resources/4_0_0/schemas/practitionerqualification.schema.js create mode 100644 src/resources/4_0_0/schemas/practitionerrole.schema.js create mode 100644 src/resources/4_0_0/schemas/practitionerroleavailabletime.schema.js create mode 100644 src/resources/4_0_0/schemas/practitionerrolenotavailable.schema.js create mode 100644 src/resources/4_0_0/schemas/procedure.schema.js create mode 100644 src/resources/4_0_0/schemas/procedurefocaldevice.schema.js create mode 100644 src/resources/4_0_0/schemas/procedureperformer.schema.js create mode 100644 src/resources/4_0_0/schemas/prodcharacteristic.schema.js create mode 100644 src/resources/4_0_0/schemas/productshelflife.schema.js create mode 100644 src/resources/4_0_0/schemas/provenance.schema.js create mode 100644 src/resources/4_0_0/schemas/provenanceagent.schema.js create mode 100644 src/resources/4_0_0/schemas/provenanceentity.schema.js create mode 100644 src/resources/4_0_0/schemas/quantity.schema.js create mode 100644 src/resources/4_0_0/schemas/questionnaire.schema.js create mode 100644 src/resources/4_0_0/schemas/questionnaireitem.schema.js create mode 100644 src/resources/4_0_0/schemas/questionnaireitemansweroption.schema.js create mode 100644 src/resources/4_0_0/schemas/questionnaireitemenablewhen.schema.js create mode 100644 src/resources/4_0_0/schemas/questionnaireiteminitial.schema.js create mode 100644 src/resources/4_0_0/schemas/questionnaireresponse.schema.js create mode 100644 src/resources/4_0_0/schemas/questionnaireresponseitem.schema.js create mode 100644 src/resources/4_0_0/schemas/questionnaireresponseitemanswer.schema.js create mode 100644 src/resources/4_0_0/schemas/range.schema.js create mode 100644 src/resources/4_0_0/schemas/ratio.schema.js create mode 100644 src/resources/4_0_0/schemas/reference.schema.js create mode 100644 src/resources/4_0_0/schemas/relatedartifact.schema.js create mode 100644 src/resources/4_0_0/schemas/relatedperson.schema.js create mode 100644 src/resources/4_0_0/schemas/relatedpersoncommunication.schema.js create mode 100644 src/resources/4_0_0/schemas/requestgroup.schema.js create mode 100644 src/resources/4_0_0/schemas/requestgroupaction.schema.js create mode 100644 src/resources/4_0_0/schemas/requestgroupactioncondition.schema.js create mode 100644 src/resources/4_0_0/schemas/requestgroupactionrelatedaction.schema.js create mode 100644 src/resources/4_0_0/schemas/researchdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/researchelementdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/researchelementdefinitioncharacteristic.schema.js create mode 100644 src/resources/4_0_0/schemas/researchstudy.schema.js create mode 100644 src/resources/4_0_0/schemas/researchstudyarm.schema.js create mode 100644 src/resources/4_0_0/schemas/researchstudyobjective.schema.js create mode 100644 src/resources/4_0_0/schemas/researchsubject.schema.js create mode 100644 src/resources/4_0_0/schemas/resource.schema.js create mode 100644 src/resources/4_0_0/schemas/resourcelist.schema.js create mode 100644 src/resources/4_0_0/schemas/riskassessment.schema.js create mode 100644 src/resources/4_0_0/schemas/riskassessmentprediction.schema.js create mode 100644 src/resources/4_0_0/schemas/riskevidencesynthesis.schema.js create mode 100644 src/resources/4_0_0/schemas/riskevidencesynthesiscertainty.schema.js create mode 100644 src/resources/4_0_0/schemas/riskevidencesynthesiscertaintycertaintysubcomponent.schema.js create mode 100644 src/resources/4_0_0/schemas/riskevidencesynthesisriskestimate.schema.js create mode 100644 src/resources/4_0_0/schemas/riskevidencesynthesisriskestimateprecisionestimate.schema.js create mode 100644 src/resources/4_0_0/schemas/riskevidencesynthesissamplesize.schema.js create mode 100644 src/resources/4_0_0/schemas/sampleddata.schema.js create mode 100644 src/resources/4_0_0/schemas/schedule.schema.js create mode 100644 src/resources/4_0_0/schemas/searchparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/searchparametercomponent.schema.js create mode 100644 src/resources/4_0_0/schemas/servicerequest.schema.js create mode 100644 src/resources/4_0_0/schemas/signature.schema.js create mode 100644 src/resources/4_0_0/schemas/simplequantity.schema.js create mode 100644 src/resources/4_0_0/schemas/slot.schema.js create mode 100644 src/resources/4_0_0/schemas/specimen.schema.js create mode 100644 src/resources/4_0_0/schemas/specimencollection.schema.js create mode 100644 src/resources/4_0_0/schemas/specimencontainer.schema.js create mode 100644 src/resources/4_0_0/schemas/specimendefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/specimendefinitiontypetested.schema.js create mode 100644 src/resources/4_0_0/schemas/specimendefinitiontypetestedcontainer.schema.js create mode 100644 src/resources/4_0_0/schemas/specimendefinitiontypetestedcontaineradditive.schema.js create mode 100644 src/resources/4_0_0/schemas/specimendefinitiontypetestedhandling.schema.js create mode 100644 src/resources/4_0_0/schemas/specimenprocessing.schema.js create mode 100644 src/resources/4_0_0/schemas/structuredefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/structuredefinitioncontext.schema.js create mode 100644 src/resources/4_0_0/schemas/structuredefinitiondifferential.schema.js create mode 100644 src/resources/4_0_0/schemas/structuredefinitionmapping.schema.js create mode 100644 src/resources/4_0_0/schemas/structuredefinitionsnapshot.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremap.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremapgroup.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremapgroupinput.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremapgrouprule.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremapgroupruledependent.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremapgrouprulesource.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremapgroupruletarget.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremapgroupruletargetparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/structuremapstructure.schema.js create mode 100644 src/resources/4_0_0/schemas/subscription.schema.js create mode 100644 src/resources/4_0_0/schemas/subscriptionchannel.schema.js create mode 100644 src/resources/4_0_0/schemas/substance.schema.js create mode 100644 src/resources/4_0_0/schemas/substanceamount.schema.js create mode 100644 src/resources/4_0_0/schemas/substanceamountreferencerange.schema.js create mode 100644 src/resources/4_0_0/schemas/substanceingredient.schema.js create mode 100644 src/resources/4_0_0/schemas/substanceinstance.schema.js create mode 100644 src/resources/4_0_0/schemas/substancenucleicacid.schema.js create mode 100644 src/resources/4_0_0/schemas/substancenucleicacidsubunit.schema.js create mode 100644 src/resources/4_0_0/schemas/substancenucleicacidsubunitlinkage.schema.js create mode 100644 src/resources/4_0_0/schemas/substancenucleicacidsubunitsugar.schema.js create mode 100644 src/resources/4_0_0/schemas/substancepolymer.schema.js create mode 100644 src/resources/4_0_0/schemas/substancepolymermonomerset.schema.js create mode 100644 src/resources/4_0_0/schemas/substancepolymermonomersetstartingmaterial.schema.js create mode 100644 src/resources/4_0_0/schemas/substancepolymerrepeat.schema.js create mode 100644 src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunit.schema.js create mode 100644 src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunitdegreeofpolymerisation.schema.js create mode 100644 src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunitstructuralrepresentation.schema.js create mode 100644 src/resources/4_0_0/schemas/substanceprotein.schema.js create mode 100644 src/resources/4_0_0/schemas/substanceproteinsubunit.schema.js create mode 100644 src/resources/4_0_0/schemas/substancereferenceinformation.schema.js create mode 100644 src/resources/4_0_0/schemas/substancereferenceinformationclassification.schema.js create mode 100644 src/resources/4_0_0/schemas/substancereferenceinformationgene.schema.js create mode 100644 src/resources/4_0_0/schemas/substancereferenceinformationgeneelement.schema.js create mode 100644 src/resources/4_0_0/schemas/substancereferenceinformationtarget.schema.js create mode 100644 src/resources/4_0_0/schemas/substancesourcematerial.schema.js create mode 100644 src/resources/4_0_0/schemas/substancesourcematerialfractiondescription.schema.js create mode 100644 src/resources/4_0_0/schemas/substancesourcematerialorganism.schema.js create mode 100644 src/resources/4_0_0/schemas/substancesourcematerialorganismauthor.schema.js create mode 100644 src/resources/4_0_0/schemas/substancesourcematerialorganismhybrid.schema.js create mode 100644 src/resources/4_0_0/schemas/substancesourcematerialorganismorganismgeneral.schema.js create mode 100644 src/resources/4_0_0/schemas/substancesourcematerialpartdescription.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecification.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationcode.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationmoiety.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationname.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationnameofficial.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationproperty.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationrelationship.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationstructure.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationstructureisotope.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationstructureisotopemolecularweight.schema.js create mode 100644 src/resources/4_0_0/schemas/substancespecificationstructurerepresentation.schema.js create mode 100644 src/resources/4_0_0/schemas/supplydelivery.schema.js create mode 100644 src/resources/4_0_0/schemas/supplydeliverysupplieditem.schema.js create mode 100644 src/resources/4_0_0/schemas/supplyrequest.schema.js create mode 100644 src/resources/4_0_0/schemas/supplyrequestparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/task.schema.js create mode 100644 src/resources/4_0_0/schemas/taskinput.schema.js create mode 100644 src/resources/4_0_0/schemas/taskoutput.schema.js create mode 100644 src/resources/4_0_0/schemas/taskrestriction.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilities.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiesclosure.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiescodesystem.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiescodesystemversion.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiescodesystemversionfilter.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiesexpansion.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiesexpansionparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiesimplementation.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiessoftware.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiestranslation.schema.js create mode 100644 src/resources/4_0_0/schemas/terminologycapabilitiesvalidatecode.schema.js create mode 100644 src/resources/4_0_0/schemas/testreport.schema.js create mode 100644 src/resources/4_0_0/schemas/testreportparticipant.schema.js create mode 100644 src/resources/4_0_0/schemas/testreportsetup.schema.js create mode 100644 src/resources/4_0_0/schemas/testreportsetupaction.schema.js create mode 100644 src/resources/4_0_0/schemas/testreportsetupactionassert.schema.js create mode 100644 src/resources/4_0_0/schemas/testreportsetupactionoperation.schema.js create mode 100644 src/resources/4_0_0/schemas/testreportteardown.schema.js create mode 100644 src/resources/4_0_0/schemas/testreportteardownaction.schema.js create mode 100644 src/resources/4_0_0/schemas/testreporttest.schema.js create mode 100644 src/resources/4_0_0/schemas/testreporttestaction.schema.js create mode 100644 src/resources/4_0_0/schemas/testscript.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptdestination.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptfixture.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptmetadata.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptmetadatacapability.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptmetadatalink.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptorigin.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptsetup.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptsetupaction.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptsetupactionassert.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptsetupactionoperation.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptsetupactionoperationrequestheader.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptteardown.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptteardownaction.schema.js create mode 100644 src/resources/4_0_0/schemas/testscripttest.schema.js create mode 100644 src/resources/4_0_0/schemas/testscripttestaction.schema.js create mode 100644 src/resources/4_0_0/schemas/testscriptvariable.schema.js create mode 100644 src/resources/4_0_0/schemas/timing.schema.js create mode 100644 src/resources/4_0_0/schemas/timingrepeat.schema.js create mode 100644 src/resources/4_0_0/schemas/triggerdefinition.schema.js create mode 100644 src/resources/4_0_0/schemas/usagecontext.schema.js create mode 100644 src/resources/4_0_0/schemas/valueset.schema.js create mode 100644 src/resources/4_0_0/schemas/valuesetcompose.schema.js create mode 100644 src/resources/4_0_0/schemas/valuesetcomposeinclude.schema.js create mode 100644 src/resources/4_0_0/schemas/valuesetcomposeincludeconcept.schema.js create mode 100644 src/resources/4_0_0/schemas/valuesetcomposeincludeconceptdesignation.schema.js create mode 100644 src/resources/4_0_0/schemas/valuesetcomposeincludefilter.schema.js create mode 100644 src/resources/4_0_0/schemas/valuesetexpansion.schema.js create mode 100644 src/resources/4_0_0/schemas/valuesetexpansioncontains.schema.js create mode 100644 src/resources/4_0_0/schemas/valuesetexpansionparameter.schema.js create mode 100644 src/resources/4_0_0/schemas/verificationresult.schema.js create mode 100644 src/resources/4_0_0/schemas/verificationresultattestation.schema.js create mode 100644 src/resources/4_0_0/schemas/verificationresultprimarysource.schema.js create mode 100644 src/resources/4_0_0/schemas/verificationresultvalidator.schema.js create mode 100644 src/resources/4_0_0/schemas/visionprescription.schema.js create mode 100644 src/resources/4_0_0/schemas/visionprescriptionlensspecification.schema.js create mode 100644 src/resources/4_0_0/schemas/visionprescriptionlensspecificationprism.schema.js create mode 100644 src/utils/__mocks__/profile.no.export.js rename src/{resources/3_0_1/profiles/__mocks__/no.schemas.export.js => utils/__mocks__/profile.no.schema.js} (61%) delete mode 100644 src/utils/scope.utils.js delete mode 100644 src/utils/scope.utils.test.js diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..1004f7c3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,23 @@ +# 1.0.0 (2019-01-09) + + +### Bug Fixes + +* fixed issues with filenames in newly generated code ([77e7a6b](https://github.com/Asymmetrik/graphql-fhir/commit/77e7a6b)) + + +### Features + +* Added support for automatic changleog generation ([2fe0f75](https://github.com/Asymmetrik/graphql-fhir/commit/2fe0f75)) +* Added support for R4 resources and environment setup ([686a764](https://github.com/Asymmetrik/graphql-fhir/commit/686a764)) + + +### BREAKING CHANGES + +* 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. + + + diff --git a/FAQ.md b/FAQ.md index 02becbd1..7378fa4c 100644 --- a/FAQ.md +++ b/FAQ.md @@ -224,9 +224,10 @@ We also allow for partial error handling, so you can reject things in one resolv ``` ## Resource configuration -By default, we support almost all the resources from STU3(3.0.1) and DSTU2(1.0.2). We allow you to turn on or off entire versions very easily. We also allow you to turn off individual profiles or even capabilities within a profile if you desire. +By default, we support almost all the resources from R4(4.0.0), STU3(3.0.1), and DSTU2(1.0.2). Since most teams will not need to support all the resources for all three versions, we make it very easy to disable resources or even entire versions. Furthermore, you can disable operations at the resource level incase you only want to support read or something similar. -To configure which version you want to support, add/remove a value to the `VERSION` constant in `src/config.js`. You just need to make sure you have a corresponding set of resources in `src/resources`. +### Version configuration +To configure which version you want to support, add/remove a value to the `VERSION` constant in `src/config.js`. You just need to make sure you have a corresponding set of resources in `src/resources`. So if you only want to support R4, just remove the `1_0_2` and `3_0_1` entries. In order to explain how to configure a specific profile, let's walk through an example of configuring the patient profile and completely disabling the observation profile for version 1.0.2. diff --git a/README.md b/README.md index b37cd1a1..56cf40a1 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ src - [ ] Support for more versions - [x] DSTU2 (1.0.2). - [x] STU3 (3.0.1). - - [ ] R4 + - [x] R4 - [ ] Work with community to continue to establish best practices for FHIR with GraphQL and implement them here. ## Contributing diff --git a/package.json b/package.json index 5b0ba5a8..e24e0830 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,18 @@ { "name": "graphql-fhir", - "version": "0.9.1", + "version": "1.0.0", "description": "A Javascript based GraphQL FHIR server", "main": "index.js", "author": "Robert-W >", "license": "MIT", "private": false, "scripts": { - "start": "node src/index", - "nodemon": "node src/scripts/nodemon", - "test": "node src/scripts/test --env=jsdom", + "start": "cross-env NODE_ENV=production node src/index", + "nodemon": "cross-env NODE_ENV=development node src/scripts/nodemon", + "test": "cross-env NODE_ENV=test node src/scripts/test", "prettier": "prettier \"src/**/*.js\" --write", - "lint": "eslint \"src/**/*.js\"" + "lint": "eslint \"src/**/*.js\"", + "changelog": "conventional-changelog -p angular -s -r 0 -i CHANGELOG.md" }, "prettier": { "trailingComma": "all", @@ -19,12 +20,14 @@ }, "dependencies": { "@asymmetrik/fhir-gql-schema-utils": "^1.0.1", + "@asymmetrik/sof-graphql-invariant": "^1.0.2", "body-parser": "^1.18.3", "compression": "^1.7.2", + "cross-env": "^5.2.0", "express": "^4.16.3", "express-graphql": "^0.6.12", "glob": "^7.1.2", - "graphql": "^0.13.2", + "graphql": "^14.0.2", "graphql-outfields": "^0.9.1", "helmet": "^3.12.1", "moment-timezone": "^0.5.21", @@ -38,6 +41,7 @@ "xss": "^1.0.3" }, "devDependencies": { + "conventional-changelog-cli": "^2.0.11", "coveralls": "^3.0.2", "eslint": "^5.1.0", "jest": "^23.2.0", @@ -51,10 +55,15 @@ "lcov", "json" ], + "setupFiles": [ + "/src/environment.js" + ], + "testEnvironment": "node", "testPathIgnorePatterns": [ "/src/scripts/" ], "coveragePathIgnorePatterns": [ + "/src/environment.js", "/src/resources/" ] } diff --git a/src/config.js b/src/config.js index 9eff5638..6fd80a60 100644 --- a/src/config.js +++ b/src/config.js @@ -7,6 +7,7 @@ const path = require('path'); const VERSION = { '1_0_2': '1_0_2', '3_0_1': '3_0_1', + '4_0_0': '4_0_0', }; /** @@ -57,7 +58,7 @@ const RESOURCE_CONFIG = { // base folder for all the resources relative to src resourceBase: 'resources', // Path is relative to version folder under resources - profilesRelativePath: 'profiles/**/index.js', + profilesRelativePath: 'profiles/**/register.js', }; module.exports = { diff --git a/src/environment.js b/src/environment.js new file mode 100644 index 00000000..b8d71744 --- /dev/null +++ b/src/environment.js @@ -0,0 +1,19 @@ +/** + * 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; +} + +if (process.env.NODE_ENV === 'test') { + process.env.SOF_AUTHENTICATION = false; + process.env.HAS_GRAPHIQL = false; +} diff --git a/src/index.js b/src/index.js index 47409554..494f6cb8 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,8 @@ -const { SERVER_CONFIG } = require('./config'); -const FHIRServer = require('./lib/server'); +const { SERVER_CONFIG } = require('./config.js'); +const FHIRServer = require('./lib/server.js'); + +// load environment settings +require('./environment.js'); // Start buliding our server let server = new FHIRServer(SERVER_CONFIG) diff --git a/src/resources/1_0_2/inputs/account.input.js b/src/resources/1_0_2/inputs/account.input.js index 4b072aa1..28394909 100644 --- a/src/resources/1_0_2/inputs/account.input.js +++ b/src/resources/1_0_2/inputs/account.input.js @@ -1,21 +1,13 @@ -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 @@ -23,83 +15,140 @@ let AccountResourceInputType = new GraphQLEnumType({ */ 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.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/address.input.js b/src/resources/1_0_2/inputs/address.input.js index a2384852..135f2986 100644 --- a/src/resources/1_0_2/inputs/address.input.js +++ b/src/resources/1_0_2/inputs/address.input.js @@ -1,12 +1,10 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -14,98 +12,112 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Address_Input', - description: 'Base StructureDefinition for Address Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/address-use - use: { - type: CodeScalar, - description: 'The purpose of this address.', - }, - _use: { - type: require('./element.input'), - description: 'The purpose of this address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/address-type - type: { - type: CodeScalar, - description: - 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', - }, - _type: { - type: require('./element.input'), - description: - 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', - }, - text: { - type: GraphQLString, - description: 'A full text representation of the address.', - }, - _text: { - type: require('./element.input'), - description: 'A full text representation of the address.', - }, - line: { - type: new GraphQLList(GraphQLString), - description: - 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', - }, - _line: { - type: require('./element.input'), - description: - 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', - }, - city: { - type: GraphQLString, - description: - 'The name of the city, town, village or other community or delivery center.', - }, - _city: { - type: require('./element.input'), - description: - 'The name of the city, town, village or other community or delivery center.', - }, - district: { - type: GraphQLString, - description: 'The name of the administrative area (county).', - }, - _district: { - type: require('./element.input'), - description: 'The name of the administrative area (county).', - }, - state: { - type: GraphQLString, - description: - 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', - }, - _state: { - type: require('./element.input'), - description: - 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', - }, - postalCode: { - type: GraphQLString, - description: - 'A postal code designating a region defined by the postal service.', - }, - _postalCode: { - type: require('./element.input'), - description: - 'A postal code designating a region defined by the postal service.', - }, - country: { - type: GraphQLString, - description: - 'Country - a nation as commonly understood or generally accepted.', - }, - _country: { - type: require('./element.input'), - description: - 'Country - a nation as commonly understood or generally accepted.', - }, - period: { - type: require('./period.input'), - description: 'Time period when address was/is in use.', - }, - }), + description: 'Base StructureDefinition for Address Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _use: { + type: require('./element.input.js'), + description: 'The purpose of this address.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/address-use + use: { + type: CodeScalar, + description: 'The purpose of this address.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/address-type + type: { + type: CodeScalar, + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + _text: { + type: require('./element.input.js'), + description: 'A full text representation of the address.', + }, + text: { + type: GraphQLString, + description: 'A full text representation of the address.', + }, + _line: { + type: require('./element.input.js'), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + line: { + type: new GraphQLList(GraphQLString), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + _city: { + type: require('./element.input.js'), + description: + 'The name of the city, town, village or other community or delivery center.', + }, + city: { + type: GraphQLString, + description: + 'The name of the city, town, village or other community or delivery center.', + }, + _district: { + type: require('./element.input.js'), + description: 'The name of the administrative area (county).', + }, + district: { + type: GraphQLString, + description: 'The name of the administrative area (county).', + }, + _state: { + type: require('./element.input.js'), + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', + }, + state: { + type: GraphQLString, + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', + }, + _postalCode: { + type: require('./element.input.js'), + description: + 'A postal code designating a region defined by the postal service.', + }, + postalCode: { + type: GraphQLString, + description: + 'A postal code designating a region defined by the postal service.', + }, + _country: { + type: require('./element.input.js'), + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + country: { + type: GraphQLString, + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period when address was/is in use.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/age.input.js b/src/resources/1_0_2/inputs/age.input.js index f9d77c95..c48defb1 100644 --- a/src/resources/1_0_2/inputs/age.input.js +++ b/src/resources/1_0_2/inputs/age.input.js @@ -1,14 +1,11 @@ const { GraphQLInputObjectType } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Age Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'Age_Input', - description: 'A duration (length of time) with a UCUM code.', - fields: () => extendSchema(require('./quantity.input')), + description: 'A duration (length of time) with a UCUM code', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/inputs/allergyintolerance.input.js b/src/resources/1_0_2/inputs/allergyintolerance.input.js index 807abbd1..ccb0cb86 100644 --- a/src/resources/1_0_2/inputs/allergyintolerance.input.js +++ b/src/resources/1_0_2/inputs/allergyintolerance.input.js @@ -1,22 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -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 AllergyIntoleranceResourceInputType = new GraphQLEnumType({ - name: 'AllergyIntoleranceResourceInputType', - values: { - AllergyIntolerance: { value: 'AllergyIntolerance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,117 +16,174 @@ let AllergyIntoleranceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'AllergyIntolerance_Input', - description: 'Base StructureDefinition for AllergyIntolerance Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AllergyIntoleranceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - onset: { - type: DateTimeScalar, - description: - 'Record of the date and/or time of the onset of the Allergy or Intolerance.', - }, - _onset: { - type: require('./element.input'), - description: - 'Record of the date and/or time of the onset of the Allergy or Intolerance.', - }, - recordedDate: { - type: DateTimeScalar, - description: 'Date when the sensitivity was recorded.', - }, - _recordedDate: { - type: require('./element.input'), - description: 'Date when the sensitivity was recorded.', - }, - recorder: { - type: require('./reference.input'), - description: - 'Individual who recorded the record and takes responsibility for its conten.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient who has the allergy or intolerance.', - }, - reporter: { - type: require('./reference.input'), - description: - 'The source of the information about the allergy that is recorded.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergyintolerance-substance-code - substance: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-status - status: { - type: CodeScalar, - description: - 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.', - }, - _status: { - type: require('./element.input'), - description: - 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality - criticality: { - type: CodeScalar, - description: - 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.', - }, - _criticality: { - type: require('./element.input'), - description: - 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-type - type: { - type: CodeScalar, - description: - 'Identification of the underlying physiological mechanism for the reaction risk.', - }, - _type: { - type: require('./element.input'), - description: - 'Identification of the underlying physiological mechanism for the reaction risk.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-category - category: { - type: CodeScalar, - description: 'Category of the identified Substance.', - }, - _category: { - type: require('./element.input'), - description: 'Category of the identified Substance.', - }, - lastOccurence: { - type: DateTimeScalar, - description: - 'Represents the date and/or time of the last known occurrence of a reaction event.', - }, - _lastOccurence: { - type: require('./element.input'), - description: - 'Represents the date and/or time of the last known occurrence of a reaction event.', - }, - note: { - type: require('./annotation.input'), - description: - 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', - }, - reaction: { - type: new GraphQLList(require('./allergyintolerancereaction.input')), - description: - 'Details about each adverse reaction event linked to exposure to the identified Substance.', - }, - }), + description: 'Base StructureDefinition for AllergyIntolerance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AllergyIntolerance_Enum_input', + values: { AllergyIntolerance: { value: 'AllergyIntolerance' } }, + }), + ), + 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: + 'This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _onset: { + type: require('./element.input.js'), + description: + 'Record of the date and/or time of the onset of the Allergy or Intolerance.', + }, + onset: { + type: DateTimeScalar, + description: + 'Record of the date and/or time of the onset of the Allergy or Intolerance.', + }, + _recordedDate: { + type: require('./element.input.js'), + description: 'Date when the sensitivity was recorded.', + }, + recordedDate: { + type: DateTimeScalar, + description: 'Date when the sensitivity was recorded.', + }, + recorder: { + type: GraphQLString, + description: + 'Individual who recorded the record and takes responsibility for its conten.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who has the allergy or intolerance.', + }, + reporter: { + type: GraphQLString, + description: + 'The source of the information about the allergy that is recorded.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergyintolerance-substance-code + substance: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-status + status: { + type: CodeScalar, + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.', + }, + _criticality: { + type: require('./element.input.js'), + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality + criticality: { + type: CodeScalar, + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-type + type: { + type: CodeScalar, + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + _category: { + type: require('./element.input.js'), + description: 'Category of the identified Substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-category + category: { + type: CodeScalar, + description: 'Category of the identified Substance.', + }, + _lastOccurence: { + type: require('./element.input.js'), + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + lastOccurence: { + type: DateTimeScalar, + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + note: { + type: require('./annotation.input.js'), + description: + 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', + }, + reaction: { + type: new GraphQLList(require('./allergyintolerancereaction.input.js')), + description: + 'Details about each adverse reaction event linked to exposure to the identified Substance.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/allergyintolerancereaction.input.js b/src/resources/1_0_2/inputs/allergyintolerancereaction.input.js index 756db012..94037aa0 100644 --- a/src/resources/1_0_2/inputs/allergyintolerancereaction.input.js +++ b/src/resources/1_0_2/inputs/allergyintolerancereaction.input.js @@ -1,91 +1,107 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary AllergyIntolerance.reaction Input Schema + * @summary AllergyIntolerancereaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AllergyIntoleranceReaction_Input', - description: - 'Details about each adverse reaction event linked to exposure to the identified Substance.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - substance: { - type: require('./codeableconcept.input'), - description: - 'Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-certainty - certainty: { - type: CodeScalar, - description: - 'Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.', - }, - _certainty: { - type: require('./element.input'), - description: - 'Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/manifestation-codes - manifestation: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.input')), - ), - description: - 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', - }, - description: { - type: GraphQLString, - description: - 'Text description about the reaction as a whole, including details of the manifestation if required.', - }, - _description: { - type: require('./element.input'), - description: - 'Text description about the reaction as a whole, including details of the manifestation if required.', - }, - onset: { - type: DateTimeScalar, - description: - 'Record of the date and/or time of the onset of the Reaction.', - }, - _onset: { - type: require('./element.input'), - description: - 'Record of the date and/or time of the onset of the Reaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-severity - severity: { - type: CodeScalar, - description: - 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', - }, - _severity: { - type: require('./element.input'), - description: - 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - exposureRoute: { - type: require('./codeableconcept.input'), - description: - 'Identification of the route by which the subject was exposed to the substance.', - }, - note: { - type: require('./annotation.input'), - description: - 'Additional text about the adverse reaction event not captured in other fields.', - }, - }), + name: 'AllergyIntolerancereaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + substance: { + type: require('./codeableconcept.input.js'), + description: + 'Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance.', + }, + _certainty: { + type: require('./element.input.js'), + description: + 'Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-certainty + certainty: { + type: CodeScalar, + description: + 'Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/manifestation-codes + manifestation: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.input.js')), + ), + description: + 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + description: { + type: GraphQLString, + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + _onset: { + type: require('./element.input.js'), + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + onset: { + type: DateTimeScalar, + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-severity + severity: { + type: CodeScalar, + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + exposureRoute: { + type: require('./codeableconcept.input.js'), + description: + 'Identification of the route by which the subject was exposed to the substance.', + }, + note: { + type: require('./annotation.input.js'), + description: + 'Additional text about the adverse reaction event not captured in other fields.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/annotation.input.js b/src/resources/1_0_2/inputs/annotation.input.js index bd7a64d4..e898325d 100644 --- a/src/resources/1_0_2/inputs/annotation.input.js +++ b/src/resources/1_0_2/inputs/annotation.input.js @@ -1,12 +1,11 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -14,36 +13,50 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Annotation_Input', - description: 'Base StructureDefinition for Annotation Type.', - fields: () => - extendSchema(require('./element.input'), { - authorReference: { - type: require('./reference.input'), - description: 'The individual responsible for making the annotation.', - }, - authorString: { - type: GraphQLString, - description: 'The individual responsible for making the annotation.', - }, - _authorString: { - type: require('./element.input'), - description: 'The individual responsible for making the annotation.', - }, - time: { - type: DateTimeScalar, - description: 'Indicates when this particular annotation was made.', - }, - _time: { - type: require('./element.input'), - description: 'Indicates when this particular annotation was made.', - }, - text: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text of the annotation.', - }, - _text: { - type: require('./element.input'), - description: 'The text of the annotation.', - }, - }), + description: 'Base StructureDefinition for Annotation Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + authorReference: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _authorString: { + type: require('./element.input.js'), + description: 'The individual responsible for making the annotation.', + }, + authorString: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _time: { + type: require('./element.input.js'), + description: 'Indicates when this particular annotation was made.', + }, + time: { + type: DateTimeScalar, + description: 'Indicates when this particular annotation was made.', + }, + _text: { + type: require('./element.input.js'), + description: 'The text of the annotation.', + }, + text: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text of the annotation.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/appointment.input.js b/src/resources/1_0_2/inputs/appointment.input.js index 30d97a8c..b3225be0 100644 --- a/src/resources/1_0_2/inputs/appointment.input.js +++ b/src/resources/1_0_2/inputs/appointment.input.js @@ -1,24 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.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 AppointmentResourceInputType = new GraphQLEnumType({ - name: 'AppointmentResourceInputType', - values: { - Appointment: { value: 'Appointment' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -26,105 +18,162 @@ let AppointmentResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Appointment_Input', - description: 'Base StructureDefinition for Appointment Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AppointmentResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', - }, - _status: { - type: require('./element.input'), - description: - 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - type: { - type: require('./codeableconcept.input'), - description: - 'The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason - reason: { - type: require('./codeableconcept.input'), - description: - 'The reason that this appointment is being scheduled. This is more clinical than administrative.', - }, - priority: { - type: UnsignedIntScalar, - description: - 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', - }, - _priority: { - type: require('./element.input'), - description: - 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', - }, - description: { - type: GraphQLString, - description: - 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', - }, - _description: { - type: require('./element.input'), - description: - 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', - }, - start: { - type: InstantScalar, - description: 'Date/Time that the appointment is to take place.', - }, - _start: { - type: require('./element.input'), - description: 'Date/Time that the appointment is to take place.', - }, - end: { - type: InstantScalar, - description: 'Date/Time that the appointment is to conclude.', - }, - _end: { - type: require('./element.input'), - description: 'Date/Time that the appointment is to conclude.', - }, - minutesDuration: { - type: PositiveIntScalar, - description: - 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', - }, - _minutesDuration: { - type: require('./element.input'), - description: - 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', - }, - slot: { - type: new GraphQLList(require('./reference.input')), - description: - 'The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the appointment.', - }, - _comment: { - type: require('./element.input'), - description: 'Additional comments about the appointment.', - }, - participant: { - type: new GraphQLList( - new GraphQLNonNull(require('./appointmentparticipant.input')), - ), - description: 'List of participants involved in the appointment.', - }, - }), + description: 'Base StructureDefinition for Appointment Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Appointment_Enum_input', + values: { Appointment: { value: 'Appointment' } }, + }), + ), + 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: + 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _status: { + type: require('./element.input.js'), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason + reason: { + type: require('./codeableconcept.input.js'), + description: + 'The reason that this appointment is being scheduled. This is more clinical than administrative.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + priority: { + type: UnsignedIntScalar, + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + _description: { + type: require('./element.input.js'), + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + description: { + type: GraphQLString, + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + _start: { + type: require('./element.input.js'), + description: 'Date/Time that the appointment is to take place.', + }, + start: { + type: InstantScalar, + description: 'Date/Time that the appointment is to take place.', + }, + _end: { + type: require('./element.input.js'), + description: 'Date/Time that the appointment is to conclude.', + }, + end: { + type: InstantScalar, + description: 'Date/Time that the appointment is to conclude.', + }, + _minutesDuration: { + type: require('./element.input.js'), + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', + }, + minutesDuration: { + type: PositiveIntScalar, + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', + }, + slot: { + type: new GraphQLList(GraphQLString), + description: + 'The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + participant: { + type: new GraphQLList( + new GraphQLNonNull(require('./appointmentparticipant.input.js')), + ), + description: 'List of participants involved in the appointment.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/appointmentparticipant.input.js b/src/resources/1_0_2/inputs/appointmentparticipant.input.js index 9a9c0c17..09f180d9 100644 --- a/src/resources/1_0_2/inputs/appointmentparticipant.input.js +++ b/src/resources/1_0_2/inputs/appointmentparticipant.input.js @@ -1,51 +1,69 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLList, + GraphQLString, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Appointment.participant Input Schema + * @summary Appointmentparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AppointmentParticipant_Input', - description: 'List of participants involved in the appointment.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Role of participant in the appointment.', - }, - actor: { - type: require('./reference.input'), - description: - 'A Person, Location/HealthcareService or Device that is participating in the appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participantrequired - required: { - type: CodeScalar, - description: - 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', - }, - _required: { - type: require('./element.input'), - description: - 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participationstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Participation status of the Patient.', - }, - _status: { - type: require('./element.input'), - description: 'Participation status of the Patient.', - }, - }), + name: 'Appointmentparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: GraphQLString, + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _required: { + type: require('./element.input.js'), + description: + 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participantrequired + required: { + type: CodeScalar, + description: + 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + _status: { + type: require('./element.input.js'), + description: 'Participation status of the Patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participationstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Participation status of the Patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/appointmentresponse.input.js b/src/resources/1_0_2/inputs/appointmentresponse.input.js index 25344486..025d0fa4 100644 --- a/src/resources/1_0_2/inputs/appointmentresponse.input.js +++ b/src/resources/1_0_2/inputs/appointmentresponse.input.js @@ -1,22 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -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 AppointmentResponseResourceInputType = new GraphQLEnumType({ - name: 'AppointmentResponseResourceInputType', - values: { - AppointmentResponse: { value: 'AppointmentResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,70 +16,127 @@ let AppointmentResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'AppointmentResponse_Input', - description: 'Base StructureDefinition for AppointmentResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AppointmentResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', - }, - appointment: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Appointment that this response is replying to.', - }, - start: { - type: InstantScalar, - description: - 'Date/Time that the appointment is to take place, or requested new start time.', - }, - _start: { - type: require('./element.input'), - description: - 'Date/Time that the appointment is to take place, or requested new start time.', - }, - end: { - type: InstantScalar, - description: - 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', - }, - _end: { - type: require('./element.input'), - description: - 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - participantType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Role of participant in the appointment.', - }, - actor: { - type: require('./reference.input'), - description: - 'A Person, Location/HealthcareService or Device that is participating in the appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participantstatus - participantStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', - }, - _participantStatus: { - type: require('./element.input'), - description: - 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the appointment.', - }, - _comment: { - type: require('./element.input'), - description: 'Additional comments about the appointment.', - }, - }), + description: 'Base StructureDefinition for AppointmentResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AppointmentResponse_Enum_input', + values: { AppointmentResponse: { value: 'AppointmentResponse' } }, + }), + ), + 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: + 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + appointment: { + type: new GraphQLNonNull(GraphQLString), + description: 'Appointment that this response is replying to.', + }, + _start: { + type: require('./element.input.js'), + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + start: { + type: InstantScalar, + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + _end: { + type: require('./element.input.js'), + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + end: { + type: InstantScalar, + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + participantType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: GraphQLString, + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _participantStatus: { + type: require('./element.input.js'), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participantstatus + participantStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/attachment.input.js b/src/resources/1_0_2/inputs/attachment.input.js index af3c6a62..62f2d34b 100644 --- a/src/resources/1_0_2/inputs/attachment.input.js +++ b/src/resources/1_0_2/inputs/attachment.input.js @@ -1,12 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -14,82 +16,94 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Attachment_Input', - description: 'Base StructureDefinition for Attachment Type.', - fields: () => - extendSchema(require('./element.input'), { - contentType: { - type: CodeScalar, - description: - 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', - }, - _contentType: { - type: require('./element.input'), - description: - 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', - }, - language: { - type: CodeScalar, - description: - 'The human language of the content. The value can be any valid value according to BCP 47.', - }, - _language: { - type: require('./element.input'), - description: - 'The human language of the content. The value can be any valid value according to BCP 47.', - }, - data: { - type: Base64BinaryScalar, - description: - 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', - }, - _data: { - type: require('./element.input'), - description: - 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', - }, - url: { - type: UriScalar, - description: 'An alternative location where the data can be accessed.', - }, - _url: { - type: require('./element.input'), - description: 'An alternative location where the data can be accessed.', - }, - size: { - type: UnsignedIntScalar, - description: - 'The number of bytes of data that make up this attachment.', - }, - _size: { - type: require('./element.input'), - description: - 'The number of bytes of data that make up this attachment.', - }, - hash: { - type: Base64BinaryScalar, - description: - 'The calculated hash of the data using SHA-1. Represented using base64.', - }, - _hash: { - type: require('./element.input'), - description: - 'The calculated hash of the data using SHA-1. Represented using base64.', - }, - title: { - type: GraphQLString, - description: 'A label or set of text to display in place of the data.', - }, - _title: { - type: require('./element.input'), - description: 'A label or set of text to display in place of the data.', - }, - creation: { - type: DateTimeScalar, - description: 'The date that the attachment was first created.', - }, - _creation: { - type: require('./element.input'), - description: 'The date that the attachment was first created.', - }, - }), + description: 'Base StructureDefinition for Attachment Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _contentType: { + type: require('./element.input.js'), + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + contentType: { + type: CodeScalar, + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + _language: { + type: require('./element.input.js'), + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + language: { + type: CodeScalar, + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + _data: { + type: require('./element.input.js'), + description: + 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', + }, + data: { + type: Base64BinaryScalar, + description: + 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', + }, + _url: { + type: require('./element.input.js'), + description: 'An alternative location where the data can be accessed.', + }, + url: { + type: UriScalar, + description: 'An alternative location where the data can be accessed.', + }, + _size: { + type: require('./element.input.js'), + description: 'The number of bytes of data that make up this attachment.', + }, + size: { + type: UnsignedIntScalar, + description: 'The number of bytes of data that make up this attachment.', + }, + _hash: { + type: require('./element.input.js'), + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + hash: { + type: Base64BinaryScalar, + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + _title: { + type: require('./element.input.js'), + description: 'A label or set of text to display in place of the data.', + }, + title: { + type: GraphQLString, + description: 'A label or set of text to display in place of the data.', + }, + _creation: { + type: require('./element.input.js'), + description: 'The date that the attachment was first created.', + }, + creation: { + type: DateTimeScalar, + description: 'The date that the attachment was first created.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/auditevent.input.js b/src/resources/1_0_2/inputs/auditevent.input.js index 766b8944..5eef1178 100644 --- a/src/resources/1_0_2/inputs/auditevent.input.js +++ b/src/resources/1_0_2/inputs/auditevent.input.js @@ -1,20 +1,13 @@ 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 AuditEventResourceInputType = new GraphQLEnumType({ - name: 'AuditEventResourceInputType', - values: { - AuditEvent: { value: 'AuditEvent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,32 +15,89 @@ let AuditEventResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'AuditEvent_Input', - description: 'Base StructureDefinition for AuditEvent Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AuditEventResourceInputType), - description: 'Type of this resource.', - }, - event: { - type: new GraphQLNonNull(require('./auditeventevent.input')), - description: - 'Identifies the name, action type, time, and disposition of the audited event.', - }, - participant: { - type: new GraphQLList( - new GraphQLNonNull(require('./auditeventparticipant.input')), - ), - description: 'A person, a hardware device or software process.', - }, - source: { - type: new GraphQLNonNull(require('./auditeventsource.input')), - description: 'Application systems and processes.', - }, - object: { - type: new GraphQLList(require('./auditeventobject.input')), - description: - 'Specific instances of data or objects that have been accessed.', - }, - }), + description: 'Base StructureDefinition for AuditEvent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AuditEvent_Enum_input', + values: { AuditEvent: { value: 'AuditEvent' } }, + }), + ), + 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.', + }, + event: { + type: new GraphQLNonNull(require('./auditeventevent.input.js')), + description: + 'Identifies the name, action type, time, and disposition of the audited event.', + }, + participant: { + type: new GraphQLList( + new GraphQLNonNull(require('./auditeventparticipant.input.js')), + ), + description: 'A person, a hardware device or software process.', + }, + source: { + type: new GraphQLNonNull(require('./auditeventsource.input.js')), + description: 'Application systems and processes.', + }, + object: { + type: new GraphQLList(require('./auditeventobject.input.js')), + description: + 'Specific instances of data or objects that have been accessed.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/auditeventevent.input.js b/src/resources/1_0_2/inputs/auditeventevent.input.js index cd1e8f86..8ff8fd12 100644 --- a/src/resources/1_0_2/inputs/auditeventevent.input.js +++ b/src/resources/1_0_2/inputs/auditeventevent.input.js @@ -1,77 +1,93 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary AuditEvent.event Input Schema + * @summary AuditEventevent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventEvent_Input', - description: - 'Identifies the name, action type, time, and disposition of the audited event.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-type - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-sub-type - subtype: { - type: new GraphQLList(require('./coding.input')), - description: 'Identifier for the category of event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-action - action: { - type: CodeScalar, - description: - 'Indicator for type of action performed during the event that generated the audit.', - }, - _action: { - type: require('./element.input'), - description: - 'Indicator for type of action performed during the event that generated the audit.', - }, - dateTime: { - type: new GraphQLNonNull(InstantScalar), - description: 'The time when the event occurred on the source.', - }, - _dateTime: { - type: require('./element.input'), - description: 'The time when the event occurred on the source.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-outcome - outcome: { - type: CodeScalar, - description: 'Indicates whether the event succeeded or failed.', - }, - _outcome: { - type: require('./element.input'), - description: 'Indicates whether the event succeeded or failed.', - }, - outcomeDesc: { - type: GraphQLString, - description: 'A free text description of the outcome of the event.', - }, - _outcomeDesc: { - type: require('./element.input'), - description: 'A free text description of the outcome of the event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purposeOfEvent: { - type: new GraphQLList(require('./coding.input')), - description: - 'The purposeOfUse (reason) that was used during the event being recorded.', - }, - }), + name: 'AuditEventevent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-type + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-sub-type + subtype: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Identifier for the category of event.', + }, + _action: { + type: require('./element.input.js'), + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-action + action: { + type: CodeScalar, + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + _dateTime: { + type: require('./element.input.js'), + description: 'The time when the event occurred on the source.', + }, + dateTime: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time when the event occurred on the source.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Indicates whether the event succeeded or failed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-outcome + outcome: { + type: CodeScalar, + description: 'Indicates whether the event succeeded or failed.', + }, + _outcomeDesc: { + type: require('./element.input.js'), + description: 'A free text description of the outcome of the event.', + }, + outcomeDesc: { + type: GraphQLString, + description: 'A free text description of the outcome of the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purposeOfEvent: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The purposeOfUse (reason) that was used during the event being recorded.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/auditeventobject.input.js b/src/resources/1_0_2/inputs/auditeventobject.input.js index 46e3fb81..dbfe79f5 100644 --- a/src/resources/1_0_2/inputs/auditeventobject.input.js +++ b/src/resources/1_0_2/inputs/auditeventobject.input.js @@ -1,84 +1,101 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLInputObjectType, GraphQLList, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary AuditEvent.object Input Schema + * @summary AuditEventobject Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventObject_Input', - description: 'Specific instances of data or objects that have been accessed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Identifies a specific instance of the participant object. The reference should always be version specific.', - }, - reference: { - type: require('./reference.input'), - description: - 'Identifies a specific instance of the participant object. The reference should always be version specific.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-type - type: { - type: require('./coding.input'), - description: - 'The type of the object that was involved in this audit event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-role - role: { - type: require('./coding.input'), - description: - 'Code representing the functional application role of Participant Object being audited.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-lifecycle - lifecycle: { - type: require('./coding.input'), - description: - 'Identifier for the data life-cycle stage for the participant object.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.input')), - description: 'Denotes security labels for the identified object.', - }, - name: { - type: GraphQLString, - description: - "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", - }, - _name: { - type: require('./element.input'), - description: - "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", - }, - description: { - type: GraphQLString, - description: 'Text that describes the object in more detail.', - }, - _description: { - type: require('./element.input'), - description: 'Text that describes the object in more detail.', - }, - query: { - type: Base64BinaryScalar, - description: 'The actual query for a query-type participant object.', - }, - _query: { - type: require('./element.input'), - description: 'The actual query for a query-type participant object.', - }, - detail: { - type: new GraphQLList(require('./auditeventobjectdetail.input')), - description: 'Additional Information about the Object.', - }, - }), + name: 'AuditEventobject_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'Identifies a specific instance of the participant object. The reference should always be version specific.', + }, + reference: { + type: GraphQLString, + description: + 'Identifies a specific instance of the participant object. The reference should always be version specific.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-type + type: { + type: require('./coding.input.js'), + description: + 'The type of the object that was involved in this audit event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-role + role: { + type: require('./coding.input.js'), + description: + 'Code representing the functional application role of Participant Object being audited.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-lifecycle + lifecycle: { + type: require('./coding.input.js'), + description: + 'Identifier for the data life-cycle stage for the participant object.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Denotes security labels for the identified object.', + }, + _name: { + type: require('./element.input.js'), + description: + "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", + }, + name: { + type: GraphQLString, + description: + "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", + }, + _description: { + type: require('./element.input.js'), + description: 'Text that describes the object in more detail.', + }, + description: { + type: GraphQLString, + description: 'Text that describes the object in more detail.', + }, + _query: { + type: require('./element.input.js'), + description: 'The actual query for a query-type participant object.', + }, + query: { + type: Base64BinaryScalar, + description: 'The actual query for a query-type participant object.', + }, + detail: { + type: new GraphQLList(require('./auditeventobjectdetail.input.js')), + description: 'Additional Information about the Object.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/auditeventobjectdetail.input.js b/src/resources/1_0_2/inputs/auditeventobjectdetail.input.js index 0788dfe4..003ebd6f 100644 --- a/src/resources/1_0_2/inputs/auditeventobjectdetail.input.js +++ b/src/resources/1_0_2/inputs/auditeventobjectdetail.input.js @@ -1,37 +1,55 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary AuditEvent.object.detail Input Schema + * @summary AuditEventobjectdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventObjectDetail_Input', - description: 'Additional Information about the Object.', - fields: () => - extendSchema(require('./backboneelement.input'), { - type: { - type: new GraphQLNonNull(GraphQLString), - description: 'Name of the property.', - }, - _type: { - type: require('./element.input'), - description: 'Name of the property.', - }, - value: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'Property value.', - }, - _value: { - type: require('./element.input'), - description: 'Property value.', - }, - }), + name: 'AuditEventobjectdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'Name of the property.', + }, + type: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name of the property.', + }, + _value: { + type: require('./element.input.js'), + description: 'Property value.', + }, + value: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'Property value.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/auditeventparticipant.input.js b/src/resources/1_0_2/inputs/auditeventparticipant.input.js index ce4d3ff3..0212659f 100644 --- a/src/resources/1_0_2/inputs/auditeventparticipant.input.js +++ b/src/resources/1_0_2/inputs/auditeventparticipant.input.js @@ -1,98 +1,115 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, GraphQLList, GraphQLString, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary AuditEvent.participant Input Schema + * @summary AuditEventparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventParticipant_Input', - description: 'A person, a hardware device or software process.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicm-402-roleid - role: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.', - }, - reference: { - type: require('./reference.input'), - description: - 'Direct reference to a resource that identifies the participant.', - }, - userId: { - type: require('./identifier.input'), - description: - 'Unique identifier for the user actively participating in the event.', - }, - altId: { - type: GraphQLString, - description: - 'Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', - }, - _altId: { - type: require('./element.input'), - description: - 'Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', - }, - name: { - type: GraphQLString, - description: 'Human-meaningful name for the user.', - }, - _name: { - type: require('./element.input'), - description: 'Human-meaningful name for the user.', - }, - requestor: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', - }, - _requestor: { - type: require('./element.input'), - description: - 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', - }, - location: { - type: require('./reference.input'), - description: 'Where the event occurred.', - }, - policy: { - type: new GraphQLList(UriScalar), - description: - 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', - }, - _policy: { - type: require('./element.input'), - description: - 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicm-405-mediatype - media: { - type: require('./coding.input'), - description: - 'Type of media involved. Used when the event is about exporting/importing onto media.', - }, - network: { - type: require('./auditeventparticipantnetwork.input'), - description: - 'Logical network location for application activity, if the activity has a network location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purposeOfUse: { - type: new GraphQLList(require('./coding.input')), - description: - 'The reason (purpose of use), specific to this participant, that was used during the event being recorded.', - }, - }), + name: 'AuditEventparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicm-402-roleid + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.', + }, + reference: { + type: GraphQLString, + description: + 'Direct reference to a resource that identifies the participant.', + }, + userId: { + type: require('./identifier.input.js'), + description: + 'Unique identifier for the user actively participating in the event.', + }, + _altId: { + type: require('./element.input.js'), + description: + 'Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + altId: { + type: GraphQLString, + description: + 'Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + _name: { + type: require('./element.input.js'), + description: 'Human-meaningful name for the user.', + }, + name: { + type: GraphQLString, + description: 'Human-meaningful name for the user.', + }, + _requestor: { + type: require('./element.input.js'), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + requestor: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + location: { + type: GraphQLString, + description: 'Where the event occurred.', + }, + _policy: { + type: require('./element.input.js'), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicm-405-mediatype + media: { + type: require('./coding.input.js'), + description: + 'Type of media involved. Used when the event is about exporting/importing onto media.', + }, + network: { + type: require('./auditeventparticipantnetwork.input.js'), + description: + 'Logical network location for application activity, if the activity has a network location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purposeOfUse: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The reason (purpose of use), specific to this participant, that was used during the event being recorded.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/auditeventparticipantnetwork.input.js b/src/resources/1_0_2/inputs/auditeventparticipantnetwork.input.js index 1bd505e4..367083c2 100644 --- a/src/resources/1_0_2/inputs/auditeventparticipantnetwork.input.js +++ b/src/resources/1_0_2/inputs/auditeventparticipantnetwork.input.js @@ -1,39 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary AuditEvent.participant.network Input Schema + * @summary AuditEventparticipantnetwork Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventParticipantNetwork_Input', - description: - 'Logical network location for application activity, if the activity has a network location.', - fields: () => - extendSchema(require('./backboneelement.input'), { - address: { - type: GraphQLString, - description: - 'An identifier for the network access point of the user device for the audit event.', - }, - _address: { - type: require('./element.input'), - description: - 'An identifier for the network access point of the user device for the audit event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/network-type - type: { - type: CodeScalar, - description: - 'An identifier for the type of network access point that originated the audit event.', - }, - _type: { - type: require('./element.input'), - description: - 'An identifier for the type of network access point that originated the audit event.', - }, - }), + name: 'AuditEventparticipantnetwork_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _address: { + type: require('./element.input.js'), + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + address: { + type: GraphQLString, + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + _type: { + type: require('./element.input.js'), + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/network-type + type: { + type: CodeScalar, + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/auditeventsource.input.js b/src/resources/1_0_2/inputs/auditeventsource.input.js index bb61f728..b400e594 100644 --- a/src/resources/1_0_2/inputs/auditeventsource.input.js +++ b/src/resources/1_0_2/inputs/auditeventsource.input.js @@ -1,41 +1,57 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLNonNull, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary AuditEvent.source Input Schema + * @summary AuditEventsource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventSource_Input', - description: 'Application systems and processes.', - fields: () => - extendSchema(require('./backboneelement.input'), { - site: { - type: GraphQLString, - description: - 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', - }, - _site: { - type: require('./element.input'), - description: - 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: 'Identifier of the source where the event was detected.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-source-type - type: { - type: new GraphQLList(require('./coding.input')), - description: - 'Code specifying the type of source where event originated.', - }, - }), + name: 'AuditEventsource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _site: { + type: require('./element.input.js'), + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + site: { + type: GraphQLString, + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + identifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: 'Identifier of the source where the event was detected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-source-type + type: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Code specifying the type of source where event originated.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/backboneelement.input.js b/src/resources/1_0_2/inputs/backboneelement.input.js index db4546e1..84561ea3 100644 --- a/src/resources/1_0_2/inputs/backboneelement.input.js +++ b/src/resources/1_0_2/inputs/backboneelement.input.js @@ -1,7 +1,5 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -9,13 +7,27 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'BackboneElement_Input', - description: 'Base StructureDefinition for BackboneElement Type.', - fields: () => - extendSchema(require('./element.input'), { - modifierExtension: { - type: new GraphQLList(require('./extension.input')), - description: - 'May be used to represent additional information that is not part of the basic definition of the element, 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.', - }, - }), + description: 'Base StructureDefinition for BackboneElement Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/basic.input.js b/src/resources/1_0_2/inputs/basic.input.js index d36a7332..b5ab7461 100644 --- a/src/resources/1_0_2/inputs/basic.input.js +++ b/src/resources/1_0_2/inputs/basic.input.js @@ -1,21 +1,14 @@ -const DateScalar = require('../scalars/date.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 BasicResourceInputType = new GraphQLEnumType({ - name: 'BasicResourceInputType', - values: { - Basic: { value: 'Basic' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -23,41 +16,98 @@ let BasicResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Basic_Input', - description: 'Base StructureDefinition for Basic Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(BasicResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/basic-resource-type - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Identifies the 'type' of resource - equivalent to the resource name for other resources.", - }, - subject: { - type: require('./reference.input'), - description: - "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", - }, - author: { - type: require('./reference.input'), - description: - 'Indicates who was responsible for creating the resource instance.', - }, - created: { - type: DateScalar, - description: 'Identifies when the resource was first created.', - }, - _created: { - type: require('./element.input'), - description: 'Identifies when the resource was first created.', - }, - }), + description: 'Base StructureDefinition for Basic Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Basic_Enum_input', + values: { Basic: { value: 'Basic' } }, + }), + ), + 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: + 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/basic-resource-type + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Identifies the 'type' of resource - equivalent to the resource name for other resources.", + }, + subject: { + type: GraphQLString, + description: + "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", + }, + author: { + type: GraphQLString, + description: + 'Indicates who was responsible for creating the resource instance.', + }, + _created: { + type: require('./element.input.js'), + description: 'Identifies when the resource was first created.', + }, + created: { + type: DateScalar, + description: 'Identifies when the resource was first created.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/binary.input.js b/src/resources/1_0_2/inputs/binary.input.js index 30138615..eb761b06 100644 --- a/src/resources/1_0_2/inputs/binary.input.js +++ b/src/resources/1_0_2/inputs/binary.input.js @@ -1,21 +1,12 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BinaryResourceInputType = new GraphQLEnumType({ - name: 'BinaryResourceInputType', - values: { - Binary: { value: 'Binary' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports @@ -23,30 +14,67 @@ let BinaryResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Binary_Input', - description: 'Base StructureDefinition for Binary Resource.', - fields: () => - extendSchema(require('./resource.input'), { - resourceType: { - type: new GraphQLNonNull(BinaryResourceInputType), - description: 'Type of this resource.', - }, - contentType: { - type: new GraphQLNonNull(CodeScalar), - description: - 'MimeType of the binary content represented as a standard MimeType (BCP 13).', - }, - _contentType: { - type: require('./element.input'), - description: - 'MimeType of the binary content represented as a standard MimeType (BCP 13).', - }, - content: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The actual content, base64 encoded.', - }, - _content: { - type: require('./element.input'), - description: 'The actual content, base64 encoded.', - }, - }), + description: 'Base StructureDefinition for Binary Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Binary_Enum_input', + values: { Binary: { value: 'Binary' } }, + }), + ), + 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.', + }, + _contentType: { + type: require('./element.input.js'), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + contentType: { + type: new GraphQLNonNull(CodeScalar), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + _content: { + type: require('./element.input.js'), + description: 'The actual content, base64 encoded.', + }, + content: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The actual content, base64 encoded.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/bodysite.input.js b/src/resources/1_0_2/inputs/bodysite.input.js index bd700dbb..1591bb31 100644 --- a/src/resources/1_0_2/inputs/bodysite.input.js +++ b/src/resources/1_0_2/inputs/bodysite.input.js @@ -1,20 +1,13 @@ 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 BodySiteResourceInputType = new GraphQLEnumType({ - name: 'BodySiteResourceInputType', - values: { - BodySite: { value: 'BodySite' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,44 +15,100 @@ let BodySiteResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'BodySite_Input', - description: 'Base StructureDefinition for BodySite Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(BodySiteResourceInputType), - description: 'Type of this resource.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The person to which the body site belongs.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier for this instance of the anatomical location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - code: { - type: require('./codeableconcept.input'), - description: - 'Named anatomical location - ideally coded where possible.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bodysite-relative-location - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane.', - }, - description: { - type: GraphQLString, - description: 'Description of anatomical location.', - }, - _description: { - type: require('./element.input'), - description: 'Description of anatomical location.', - }, - image: { - type: new GraphQLList(require('./attachment.input')), - description: 'Image or images used to identify a location.', - }, - }), + description: 'Base StructureDefinition for BodySite Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'BodySite_Enum_input', + values: { BodySite: { value: 'BodySite' } }, + }), + ), + 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.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person to which the body site belongs.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Identifier for this instance of the anatomical location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + code: { + type: require('./codeableconcept.input.js'), + description: 'Named anatomical location - ideally coded where possible.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bodysite-relative-location + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane.', + }, + _description: { + type: require('./element.input.js'), + description: 'Description of anatomical location.', + }, + description: { + type: GraphQLString, + description: 'Description of anatomical location.', + }, + image: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image or images used to identify a location.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/bundle.input.js b/src/resources/1_0_2/inputs/bundle.input.js index f2ab023e..2b9a6c19 100644 --- a/src/resources/1_0_2/inputs/bundle.input.js +++ b/src/resources/1_0_2/inputs/bundle.input.js @@ -1,22 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BundleResourceInputType = new GraphQLEnumType({ - name: 'BundleResourceInputType', - values: { - Bundle: { value: 'Bundle' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -24,46 +15,83 @@ let BundleResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Bundle_Input', - description: 'Base StructureDefinition for Bundle Resource.', - fields: () => - extendSchema(require('./resource.input'), { - resourceType: { - type: new GraphQLNonNull(BundleResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bundle-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the purpose of this bundle- how it was intended to be used.', - }, - _type: { - type: require('./element.input'), - description: - 'Indicates the purpose of this bundle- how it was intended to be used.', - }, - total: { - type: UnsignedIntScalar, - description: - 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', - }, - _total: { - type: require('./element.input'), - description: - 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', - }, - link: { - type: new GraphQLList(require('./bundlelink.input')), - description: 'A series of links that provide context to this bundle.', - }, - entry: { - type: new GraphQLList(require('./bundleentry.input')), - description: - 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', - }, - signature: { - type: require('./signature.input'), - description: 'Digital Signature - base64 encoded. XML DigSIg or a JWT.', - }, - }), + description: 'Base StructureDefinition for Bundle Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Bundle_Enum_input', + values: { Bundle: { value: 'Bundle' } }, + }), + ), + 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Indicates the purpose of this bundle- how it was intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bundle-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose of this bundle- how it was intended to be used.', + }, + _total: { + type: require('./element.input.js'), + description: + 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', + }, + total: { + type: UnsignedIntScalar, + description: + 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', + }, + link: { + type: new GraphQLList(require('./bundlelink.input.js')), + description: 'A series of links that provide context to this bundle.', + }, + entry: { + type: new GraphQLList(require('./bundleentry.input.js')), + description: + 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', + }, + signature: { + type: require('./signature.input.js'), + description: 'Digital Signature - base64 encoded. XML DigSIg or a JWT.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/bundleentry.input.js b/src/resources/1_0_2/inputs/bundleentry.input.js index d145dbdf..72567044 100644 --- a/src/resources/1_0_2/inputs/bundleentry.input.js +++ b/src/resources/1_0_2/inputs/bundleentry.input.js @@ -1,47 +1,67 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Bundle.entry Input Schema + * @summary Bundleentry Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleEntry_Input', - description: - 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', - fields: () => - extendSchema(require('./backboneelement.input'), { - fullUrl: { - type: UriScalar, - description: - 'The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.', - }, - _fullUrl: { - type: require('./element.input'), - description: - 'The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.', - }, - resource: { - type: GraphQLString, - description: 'The Resources for the entry.', - }, - search: { - type: require('./bundleentrysearch.input'), - description: - 'Information about the search process that lead to the creation of this entry.', - }, - request: { - type: require('./bundleentryrequest.input'), - description: - 'Additional information about how this entry should be processed as part of a transaction.', - }, - response: { - type: require('./bundleentryresponse.input'), - description: - 'Additional information about how this entry should be processed as part of a transaction.', - }, - }), + name: 'Bundleentry_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _fullUrl: { + type: require('./element.input.js'), + description: + 'The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.', + }, + fullUrl: { + type: UriScalar, + description: + 'The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.', + }, + resource: { + type: GraphQLString, + description: 'The Resources for the entry.', + }, + search: { + type: require('./bundleentrysearch.input.js'), + description: + 'Information about the search process that lead to the creation of this entry.', + }, + request: { + type: require('./bundleentryrequest.input.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction.', + }, + response: { + type: require('./bundleentryresponse.input.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/bundleentryrequest.input.js b/src/resources/1_0_2/inputs/bundleentryrequest.input.js index d17267f6..d81061c3 100644 --- a/src/resources/1_0_2/inputs/bundleentryrequest.input.js +++ b/src/resources/1_0_2/inputs/bundleentryrequest.input.js @@ -1,85 +1,102 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary Bundle.entry.request Input Schema + * @summary Bundleentryrequest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleEntryRequest_Input', - description: - 'Additional information about how this entry should be processed as part of a transaction.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/http-verb - method: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The HTTP verb for this entry in either a update history, or a transaction/ transaction response.', - }, - _method: { - type: require('./element.input'), - description: - 'The HTTP verb for this entry in either a update history, or a transaction/ transaction response.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'The URL for this entry, relative to the root (the address to which the request is posted).', - }, - _url: { - type: require('./element.input'), - description: - 'The URL for this entry, relative to the root (the address to which the request is posted).', - }, - ifNoneMatch: { - type: GraphQLString, - description: - "If the ETag values match, return a 304 Not modified status. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - _ifNoneMatch: { - type: require('./element.input'), - description: - "If the ETag values match, return a 304 Not modified status. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - ifModifiedSince: { - type: InstantScalar, - description: - "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - _ifModifiedSince: { - type: require('./element.input'), - description: - "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - ifMatch: { - type: GraphQLString, - description: - "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", - }, - _ifMatch: { - type: require('./element.input'), - description: - "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", - }, - ifNoneExist: { - type: GraphQLString, - description: - "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", - }, - _ifNoneExist: { - type: require('./element.input'), - description: - "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", - }, - }), + name: 'Bundleentryrequest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _method: { + type: require('./element.input.js'), + description: + 'The HTTP verb for this entry in either a update history, or a transaction/ transaction response.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/http-verb + method: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The HTTP verb for this entry in either a update history, or a transaction/ transaction response.', + }, + _url: { + type: require('./element.input.js'), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + _ifNoneMatch: { + type: require('./element.input.js'), + description: + "If the ETag values match, return a 304 Not modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifNoneMatch: { + type: GraphQLString, + description: + "If the ETag values match, return a 304 Not modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifModifiedSince: { + type: require('./element.input.js'), + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifModifiedSince: { + type: InstantScalar, + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifMatch: { + type: require('./element.input.js'), + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + ifMatch: { + type: GraphQLString, + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + _ifNoneExist: { + type: require('./element.input.js'), + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + ifNoneExist: { + type: GraphQLString, + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/bundleentryresponse.input.js b/src/resources/1_0_2/inputs/bundleentryresponse.input.js index 5e8652c6..21727486 100644 --- a/src/resources/1_0_2/inputs/bundleentryresponse.input.js +++ b/src/resources/1_0_2/inputs/bundleentryresponse.input.js @@ -1,61 +1,76 @@ -const UriScalar = require('../scalars/uri.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary Bundle.entry.response Input Schema + * @summary Bundleentryresponse Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleEntryResponse_Input', - description: - 'Additional information about how this entry should be processed as part of a transaction.', - fields: () => - extendSchema(require('./backboneelement.input'), { - status: { - type: new GraphQLNonNull(GraphQLString), - description: 'The status code returned by processing this entry.', - }, - _status: { - type: require('./element.input'), - description: 'The status code returned by processing this entry.', - }, - location: { - type: UriScalar, - description: - 'The location header created by processing this operation.', - }, - _location: { - type: require('./element.input'), - description: - 'The location header created by processing this operation.', - }, - etag: { - type: GraphQLString, - description: - 'The etag for the resource, it the operation for the entry produced a versioned resource.', - }, - _etag: { - type: require('./element.input'), - description: - 'The etag for the resource, it the operation for the entry produced a versioned resource.', - }, - lastModified: { - type: InstantScalar, - description: - 'The date/time that the resource was modified on the server.', - }, - _lastModified: { - type: require('./element.input'), - description: - 'The date/time that the resource was modified on the server.', - }, - }), + name: 'Bundleentryresponse_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status code returned by processing this entry.', + }, + status: { + type: new GraphQLNonNull(GraphQLString), + description: 'The status code returned by processing this entry.', + }, + _location: { + type: require('./element.input.js'), + description: 'The location header created by processing this operation.', + }, + location: { + type: UriScalar, + description: 'The location header created by processing this operation.', + }, + _etag: { + type: require('./element.input.js'), + description: + 'The etag for the resource, it the operation for the entry produced a versioned resource.', + }, + etag: { + type: GraphQLString, + description: + 'The etag for the resource, it the operation for the entry produced a versioned resource.', + }, + _lastModified: { + type: require('./element.input.js'), + description: + 'The date/time that the resource was modified on the server.', + }, + lastModified: { + type: InstantScalar, + description: + 'The date/time that the resource was modified on the server.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/bundleentrysearch.input.js b/src/resources/1_0_2/inputs/bundleentrysearch.input.js index 8691d4e8..97bb94cf 100644 --- a/src/resources/1_0_2/inputs/bundleentrysearch.input.js +++ b/src/resources/1_0_2/inputs/bundleentrysearch.input.js @@ -1,39 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLFloat } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Bundle.entry.search Input Schema + * @summary Bundleentrysearch Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleEntrySearch_Input', - description: - 'Information about the search process that lead to the creation of this entry.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-entry-mode - mode: { - type: CodeScalar, - description: - "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", - }, - _mode: { - type: require('./element.input'), - description: - "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", - }, - score: { - type: GraphQLFloat, - description: - "When searching, the server's search ranking score for the entry.", - }, - _score: { - type: require('./element.input'), - description: - "When searching, the server's search ranking score for the entry.", - }, - }), + name: 'Bundleentrysearch_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-entry-mode + mode: { + type: CodeScalar, + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", + }, + _score: { + type: require('./element.input.js'), + description: + "When searching, the server's search ranking score for the entry.", + }, + score: { + type: GraphQLFloat, + description: + "When searching, the server's search ranking score for the entry.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/bundlelink.input.js b/src/resources/1_0_2/inputs/bundlelink.input.js index e1358cf6..68f34d6b 100644 --- a/src/resources/1_0_2/inputs/bundlelink.input.js +++ b/src/resources/1_0_2/inputs/bundlelink.input.js @@ -1,39 +1,57 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Bundle.link Input Schema + * @summary Bundlelink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleLink_Input', - description: 'A series of links that provide context to this bundle.', - fields: () => - extendSchema(require('./backboneelement.input'), { - relation: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].', - }, - _relation: { - type: require('./element.input'), - description: - 'A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: 'The reference details for the link.', - }, - _url: { - type: require('./element.input'), - description: 'The reference details for the link.', - }, - }), + name: 'Bundlelink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _relation: { + type: require('./element.input.js'), + description: + 'A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].', + }, + relation: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].', + }, + _url: { + type: require('./element.input.js'), + description: 'The reference details for the link.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'The reference details for the link.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/careplan.input.js b/src/resources/1_0_2/inputs/careplan.input.js index 9869f7f2..c0b5666d 100644 --- a/src/resources/1_0_2/inputs/careplan.input.js +++ b/src/resources/1_0_2/inputs/careplan.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 CarePlanResourceInputType = new GraphQLEnumType({ - name: 'CarePlanResourceInputType', - values: { - CarePlan: { value: 'CarePlan' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,106 +16,163 @@ let CarePlanResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'CarePlan_Input', - description: 'Base StructureDefinition for CarePlan Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CarePlanResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - subject: { - type: require('./reference.input'), - description: - 'Identifies the patient or group whose intended care is described by the plan.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', - }, - _status: { - type: require('./element.input'), - description: - 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', - }, - context: { - type: require('./reference.input'), - description: - 'Identifies the context in which this particular CarePlan is defined.', - }, - period: { - type: require('./period.input'), - description: - 'Indicates when the plan did (or is intended to) come into effect and end.', - }, - author: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', - }, - modified: { - type: DateTimeScalar, - description: - 'Identifies the most recent date on which the plan has been revised.', - }, - _modified: { - type: require('./element.input'), - description: - 'Identifies the most recent date on which the plan has been revised.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", - }, - description: { - type: GraphQLString, - description: 'A description of the scope and nature of the plan.', - }, - _description: { - type: require('./element.input'), - description: 'A description of the scope and nature of the plan.', - }, - addresses: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', - }, - support: { - type: new GraphQLList(require('./reference.input')), - description: - "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", - }, - relatedPlan: { - type: new GraphQLList(require('./careplanrelatedplan.input')), - description: - 'Identifies CarePlans with some sort of formal relationship to the current plan.', - }, - participant: { - type: new GraphQLList(require('./careplanparticipant.input')), - description: - 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', - }, - goal: { - type: new GraphQLList(require('./reference.input')), - description: - 'Describes the intended objective(s) of carrying out the care plan.', - }, - activity: { - type: new GraphQLList(require('./careplanactivity.input')), - description: - 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', - }, - note: { - type: require('./annotation.input'), - description: 'General notes about the care plan not covered elsewhere.', - }, - }), + description: 'Base StructureDefinition for CarePlan Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CarePlan_Enum_input', + values: { CarePlan: { value: 'CarePlan' } }, + }), + ), + 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: + 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + subject: { + type: GraphQLString, + description: + 'Identifies the patient or group whose intended care is described by the plan.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + context: { + type: GraphQLString, + description: + 'Identifies the context in which this particular CarePlan is defined.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates when the plan did (or is intended to) come into effect and end.', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', + }, + _modified: { + type: require('./element.input.js'), + description: + 'Identifies the most recent date on which the plan has been revised.', + }, + modified: { + type: DateTimeScalar, + description: + 'Identifies the most recent date on which the plan has been revised.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", + }, + _description: { + type: require('./element.input.js'), + description: 'A description of the scope and nature of the plan.', + }, + description: { + type: GraphQLString, + description: 'A description of the scope and nature of the plan.', + }, + addresses: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + }, + support: { + type: new GraphQLList(GraphQLString), + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", + }, + relatedPlan: { + type: new GraphQLList(require('./careplanrelatedplan.input.js')), + description: + 'Identifies CarePlans with some sort of formal relationship to the current plan.', + }, + participant: { + type: new GraphQLList(require('./careplanparticipant.input.js')), + description: + 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', + }, + goal: { + type: new GraphQLList(GraphQLString), + description: + 'Describes the intended objective(s) of carrying out the care plan.', + }, + activity: { + type: new GraphQLList(require('./careplanactivity.input.js')), + description: + 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', + }, + note: { + type: require('./annotation.input.js'), + description: 'General notes about the care plan not covered elsewhere.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/careplanactivity.input.js b/src/resources/1_0_2/inputs/careplanactivity.input.js index a4980a42..2d408c34 100644 --- a/src/resources/1_0_2/inputs/careplanactivity.input.js +++ b/src/resources/1_0_2/inputs/careplanactivity.input.js @@ -1,37 +1,56 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary CarePlan.activity Input Schema + * @summary CarePlanactivity Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CarePlanActivity_Input', - description: - 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - actionResulting: { - type: new GraphQLList(require('./reference.input')), - description: - 'Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.', - }, - progress: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Notes about the adherence/status/progress of the activity.', - }, - reference: { - type: require('./reference.input'), - description: - 'The details of the proposed activity represented in a specific resource.', - }, - detail: { - type: require('./careplanactivitydetail.input'), - description: - "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", - }, - }), + name: 'CarePlanactivity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + actionResulting: { + type: new GraphQLList(GraphQLString), + description: + 'Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.', + }, + progress: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Notes about the adherence/status/progress of the activity.', + }, + reference: { + type: GraphQLString, + description: + 'The details of the proposed activity represented in a specific resource.', + }, + detail: { + type: require('./careplanactivitydetail.input.js'), + description: + "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/careplanactivitydetail.input.js b/src/resources/1_0_2/inputs/careplanactivitydetail.input.js index ab364110..45c73f93 100644 --- a/src/resources/1_0_2/inputs/careplanactivitydetail.input.js +++ b/src/resources/1_0_2/inputs/careplanactivitydetail.input.js @@ -1,141 +1,156 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLList, + GraphQLString, GraphQLNonNull, GraphQLBoolean, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CarePlan.activity.detail Input Schema + * @summary CarePlanactivitydetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CarePlanActivityDetail_Input', - description: - "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-category - category: { - type: require('./codeableconcept.input'), - description: - 'High-level categorization of the type of activity in a care plan.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity - code: { - type: require('./codeableconcept.input'), - description: - 'Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/activity-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Provides the rationale that drove the inclusion of this particular activity as part of the plan.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', - }, - goal: { - type: new GraphQLList(require('./reference.input')), - description: - 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-status - status: { - type: CodeScalar, - description: - 'Identifies what progress is being made for the specific activity.', - }, - _status: { - type: require('./element.input'), - description: - 'Identifies what progress is being made for the specific activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-status-reason - statusReason: { - type: require('./codeableconcept.input'), - description: - "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", - }, - prohibited: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan.', - }, - _prohibited: { - type: require('./element.input'), - description: - 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan.', - }, - scheduledTiming: { - type: require('./timing.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - scheduledPeriod: { - type: require('./period.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - scheduledString: { - type: GraphQLString, - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - _scheduledString: { - type: require('./element.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - location: { - type: require('./reference.input'), - description: - 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', - }, - performer: { - type: new GraphQLList(require('./reference.input')), - description: - "Identifies who's expected to be involved in the activity.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Identifies the food, drug or other product to be consumed or supplied in the activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productReference: { - type: require('./reference.input'), - description: - 'Identifies the food, drug or other product to be consumed or supplied in the activity.', - }, - dailyAmount: { - type: require('./quantity.input'), - description: - 'Identifies the quantity expected to be consumed in a given day.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', - }, - description: { - type: GraphQLString, - description: - 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', - }, - _description: { - type: require('./element.input'), - description: - 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', - }, - }), + name: 'CarePlanactivitydetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'High-level categorization of the type of activity in a care plan.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity + code: { + type: require('./codeableconcept.input.js'), + description: + 'Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/activity-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Provides the rationale that drove the inclusion of this particular activity as part of the plan.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', + }, + goal: { + type: new GraphQLList(GraphQLString), + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Identifies what progress is being made for the specific activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-status + status: { + type: CodeScalar, + description: + 'Identifies what progress is being made for the specific activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-status-reason + statusReason: { + type: require('./codeableconcept.input.js'), + description: + "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", + }, + _prohibited: { + type: require('./element.input.js'), + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan.', + }, + prohibited: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan.', + }, + scheduledTiming: { + type: require('./timing.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledPeriod: { + type: require('./period.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _scheduledString: { + type: require('./element.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledString: { + type: GraphQLString, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: GraphQLString, + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: "Identifies who's expected to be involved in the activity.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productReference: { + type: GraphQLString, + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + dailyAmount: { + type: require('./quantity.input.js'), + description: + 'Identifies the quantity expected to be consumed in a given day.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', + }, + _description: { + type: require('./element.input.js'), + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + description: { + type: GraphQLString, + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/careplanparticipant.input.js b/src/resources/1_0_2/inputs/careplanparticipant.input.js index 486f43d3..6dcb979c 100644 --- a/src/resources/1_0_2/inputs/careplanparticipant.input.js +++ b/src/resources/1_0_2/inputs/careplanparticipant.input.js @@ -1,28 +1,48 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary CarePlan.participant Input Schema + * @summary CarePlanparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CarePlanParticipant_Input', - description: - 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - role: { - type: require('./codeableconcept.input'), - description: - "Indicates specific responsibility of an individual within the care plan; e.g. 'Primary physician', 'Team coordinator', 'Caregiver', etc.", - }, - member: { - type: require('./reference.input'), - description: - 'The specific person or organization who is participating/expected to participate in the care plan.', - }, - }), + name: 'CarePlanparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + role: { + type: require('./codeableconcept.input.js'), + description: + "Indicates specific responsibility of an individual within the care plan; e.g. 'Primary physician', 'Team coordinator', 'Caregiver', etc.", + }, + member: { + type: GraphQLString, + description: + 'The specific person or organization who is participating/expected to participate in the care plan.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/careplanrelatedplan.input.js b/src/resources/1_0_2/inputs/careplanrelatedplan.input.js index 1ac79ea6..b5df168c 100644 --- a/src/resources/1_0_2/inputs/careplanrelatedplan.input.js +++ b/src/resources/1_0_2/inputs/careplanrelatedplan.input.js @@ -1,34 +1,55 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CarePlan.relatedPlan Input Schema + * @summary CarePlanrelatedPlan Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CarePlanRelatedPlan_Input', - description: - 'Identifies CarePlans with some sort of formal relationship to the current plan.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-relationship - code: { - type: CodeScalar, - description: - 'Identifies the type of relationship this plan has to the target plan.', - }, - _code: { - type: require('./element.input'), - description: - 'Identifies the type of relationship this plan has to the target plan.', - }, - plan: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the plan to which a relationship is asserted.', - }, - }), + name: 'CarePlanrelatedPlan_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Identifies the type of relationship this plan has to the target plan.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-relationship + code: { + type: CodeScalar, + description: + 'Identifies the type of relationship this plan has to the target plan.', + }, + plan: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the plan to which a relationship is asserted.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claim.input.js b/src/resources/1_0_2/inputs/claim.input.js index 1d4a2344..1a9b044c 100644 --- a/src/resources/1_0_2/inputs/claim.input.js +++ b/src/resources/1_0_2/inputs/claim.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.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 ClaimResourceInputType = new GraphQLEnumType({ - name: 'ClaimResourceInputType', - values: { - Claim: { value: 'Claim' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,180 +17,236 @@ let ClaimResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Claim_Input', - description: 'Base StructureDefinition for Claim Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ClaimResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-type-link - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The category of claim this is.', - }, - _type: { - type: require('./element.input'), - description: 'The category of claim this is.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the specification on which this instance relies.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The version of the specification from which the original instance was created.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - target: { - type: require('./reference.input'), - description: 'Insurer Identifier, typical BIN number (6 digit).', - }, - provider: { - type: require('./reference.input'), - description: - 'The provider which is responsible for the bill, claim pre-determination, pre-authorization.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the bill, claim pre-determination, pre-authorization.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-use-link - use: { - type: CodeScalar, - description: - 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', - }, - _use: { - type: require('./element.input'), - description: - 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-priority - priority: { - type: require('./coding.input'), - description: - 'Immediate (stat), best effort (normal), deferred (deferred).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve - fundsReserve: { - type: require('./coding.input'), - description: - "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", - }, - enterer: { - type: require('./reference.input'), - description: - 'Person who created the invoice/claim/pre-determination or pre-authorization.', - }, - facility: { - type: require('./reference.input'), - description: 'Facility where the services were provided.', - }, - prescription: { - type: require('./reference.input'), - description: - 'Prescription to support the dispensing of Pharmacy or Vision products.', - }, - originalPrescription: { - type: require('./reference.input'), - description: - 'Original prescription to support the dispensing of pharmacy services, medications or products.', - }, - payee: { - type: require('./claimpayee.input'), - description: 'The party to be reimbursed for the services.', - }, - referral: { - type: require('./reference.input'), - description: - 'The referral resource which lists the date, practitioner, reason and other supporting information.', - }, - diagnosis: { - type: new GraphQLList(require('./claimdiagnosis.input')), - description: - 'Ordered list of patient diagnosis for which care is sought.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-conditions - condition: { - type: new GraphQLList(require('./coding.input')), - description: 'List of patient conditions for which care is sought.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Patient Resource.', - }, - coverage: { - type: new GraphQLList(require('./claimcoverage.input')), - description: - 'Financial instrument by which payment information for health care.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-exception - exception: { - type: new GraphQLList(require('./coding.input')), - description: - 'Factors which may influence the applicability of coverage.', - }, - school: { - type: GraphQLString, - description: 'Name of school for over-aged dependents.', - }, - _school: { - type: require('./element.input'), - description: 'Name of school for over-aged dependents.', - }, - accident: { - type: DateScalar, - description: 'Date of an accident which these services are addressing.', - }, - _accident: { - type: require('./element.input'), - description: 'Date of an accident which these services are addressing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode - accidentType: { - type: require('./coding.input'), - description: 'Type of accident: work, auto, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/intervention - interventionException: { - type: new GraphQLList(require('./coding.input')), - description: - 'A list of intervention and exception codes which may influence the adjudication of the claim.', - }, - item: { - type: new GraphQLList(require('./claimitem.input')), - description: 'First tier of goods and services.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/additionalmaterials - additionalMaterials: { - type: new GraphQLList(require('./coding.input')), - description: - 'Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.', - }, - missingTeeth: { - type: new GraphQLList(require('./claimmissingteeth.input')), - description: - 'A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.', - }, - }), + description: 'Base StructureDefinition for Claim Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Claim_Enum_input', + values: { Claim: { value: 'Claim' } }, + }), + ), + 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The category of claim this is.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-type-link + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The category of claim this is.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the specification on which this instance relies.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The version of the specification from which the original instance was created.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + target: { + type: GraphQLString, + description: 'Insurer Identifier, typical BIN number (6 digit).', + }, + provider: { + type: GraphQLString, + description: + 'The provider which is responsible for the bill, claim pre-determination, pre-authorization.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the bill, claim pre-determination, pre-authorization.', + }, + _use: { + type: require('./element.input.js'), + description: + 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-use-link + use: { + type: CodeScalar, + description: + 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-priority + priority: { + type: require('./coding.input.js'), + description: + 'Immediate (stat), best effort (normal), deferred (deferred).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve + fundsReserve: { + type: require('./coding.input.js'), + description: + "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", + }, + enterer: { + type: GraphQLString, + description: + 'Person who created the invoice/claim/pre-determination or pre-authorization.', + }, + facility: { + type: GraphQLString, + description: 'Facility where the services were provided.', + }, + prescription: { + type: GraphQLString, + description: + 'Prescription to support the dispensing of Pharmacy or Vision products.', + }, + originalPrescription: { + type: GraphQLString, + description: + 'Original prescription to support the dispensing of pharmacy services, medications or products.', + }, + payee: { + type: require('./claimpayee.input.js'), + description: 'The party to be reimbursed for the services.', + }, + referral: { + type: GraphQLString, + description: + 'The referral resource which lists the date, practitioner, reason and other supporting information.', + }, + diagnosis: { + type: new GraphQLList(require('./claimdiagnosis.input.js')), + description: + 'Ordered list of patient diagnosis for which care is sought.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-conditions + condition: { + type: new GraphQLList(require('./coding.input.js')), + description: 'List of patient conditions for which care is sought.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'Patient Resource.', + }, + coverage: { + type: new GraphQLList(require('./claimcoverage.input.js')), + description: + 'Financial instrument by which payment information for health care.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-exception + exception: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Factors which may influence the applicability of coverage.', + }, + _school: { + type: require('./element.input.js'), + description: 'Name of school for over-aged dependents.', + }, + school: { + type: GraphQLString, + description: 'Name of school for over-aged dependents.', + }, + _accident: { + type: require('./element.input.js'), + description: 'Date of an accident which these services are addressing.', + }, + accident: { + type: DateScalar, + description: 'Date of an accident which these services are addressing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode + accidentType: { + type: require('./coding.input.js'), + description: 'Type of accident: work, auto, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/intervention + interventionException: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A list of intervention and exception codes which may influence the adjudication of the claim.', + }, + item: { + type: new GraphQLList(require('./claimitem.input.js')), + description: 'First tier of goods and services.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/additionalmaterials + additionalMaterials: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.', + }, + missingTeeth: { + type: new GraphQLList(require('./claimmissingteeth.input.js')), + description: + 'A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimcoverage.input.js b/src/resources/1_0_2/inputs/claimcoverage.input.js index 2d5c9a16..dfa1622e 100644 --- a/src/resources/1_0_2/inputs/claimcoverage.input.js +++ b/src/resources/1_0_2/inputs/claimcoverage.input.js @@ -1,82 +1,98 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.coverage Input Schema + * @summary Claimcoverage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimCoverage_Input', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line item.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line item.', - }, - focal: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - _focal: { - type: require('./element.input'), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.input'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relationship - relationship: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The relationship of the patient to the subscriber.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.input'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - claimResponse: { - type: require('./reference.input'), - description: 'The Coverages adjudication details.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - }), + name: 'Claimcoverage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line item.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line item.', + }, + _focal: { + type: require('./element.input.js'), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _businessArrangement: { + type: require('./element.input.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relationship + relationship: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The relationship of the patient to the subscriber.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + claimResponse: { + type: GraphQLString, + description: 'The Coverages adjudication details.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimdiagnosis.input.js b/src/resources/1_0_2/inputs/claimdiagnosis.input.js index 756d6e6f..ac4c0380 100644 --- a/src/resources/1_0_2/inputs/claimdiagnosis.input.js +++ b/src/resources/1_0_2/inputs/claimdiagnosis.input.js @@ -1,32 +1,53 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.diagnosis Input Schema + * @summary Claimdiagnosis Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimDiagnosis_Input', - description: 'Ordered list of patient diagnosis for which care is sought.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of diagnosis which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Sequence of diagnosis which serves to order and provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosis: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The diagnosis.', - }, - }), + name: 'Claimdiagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Sequence of diagnosis which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of diagnosis which serves to order and provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosis: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The diagnosis.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimitem.input.js b/src/resources/1_0_2/inputs/claimitem.input.js index 5de69953..fb3be603 100644 --- a/src/resources/1_0_2/inputs/claimitem.input.js +++ b/src/resources/1_0_2/inputs/claimitem.input.js @@ -1,132 +1,149 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.item Input Schema + * @summary Claimitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimItem_Input', - description: 'First tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The type of product or service.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - diagnosisLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Diagnosis applicable for this service or product line.', - }, - _diagnosisLinkId: { - type: require('./element.input'), - description: 'Diagnosis applicable for this service or product line.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.input')), - description: - "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", - }, - serviceDate: { - type: DateScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _serviceDate: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./quantity.input'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.input'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.input'), - description: - 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/udi - udi: { - type: require('./coding.input'), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/tooth - bodySite: { - type: require('./coding.input'), - description: - 'Physical service site on the patient (limb, tooth, etc.).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/surface - subSite: { - type: new GraphQLList(require('./coding.input')), - description: - 'A region or surface of the site, e.g. limb region or tooth surface(s).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./coding.input')), - description: - 'Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.', - }, - detail: { - type: new GraphQLList(require('./claimitemdetail.input')), - description: 'Second tier of goods and services.', - }, - prosthesis: { - type: require('./claimitemprosthesis.input'), - description: - 'The materials and placement date of prior fixed prosthesis.', - }, - }), + name: 'Claimitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The type of product or service.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + _diagnosisLinkId: { + type: require('./element.input.js'), + description: 'Diagnosis applicable for this service or product line.', + }, + diagnosisLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnosis applicable for this service or product line.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", + }, + _serviceDate: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + serviceDate: { + type: DateScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./quantity.input.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.input.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/udi + udi: { + type: require('./coding.input.js'), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/tooth + bodySite: { + type: require('./coding.input.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/surface + subSite: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A region or surface of the site, e.g. limb region or tooth surface(s).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.', + }, + detail: { + type: new GraphQLList(require('./claimitemdetail.input.js')), + description: 'Second tier of goods and services.', + }, + prosthesis: { + type: require('./claimitemprosthesis.input.js'), + description: + 'The materials and placement date of prior fixed prosthesis.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimitemdetail.input.js b/src/resources/1_0_2/inputs/claimitemdetail.input.js index 5729d25a..5490f7cb 100644 --- a/src/resources/1_0_2/inputs/claimitemdetail.input.js +++ b/src/resources/1_0_2/inputs/claimitemdetail.input.js @@ -1,85 +1,102 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.item.detail Input Schema + * @summary Claimitemdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimItemDetail_Input', - description: 'Second tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The type of product or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.input')), - description: - "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./quantity.input'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.input'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.input'), - description: - 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/udi - udi: { - type: require('./coding.input'), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - subDetail: { - type: new GraphQLList(require('./claimitemdetailsubdetail.input')), - description: 'Third tier of goods and services.', - }, - }), + name: 'Claimitemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The type of product or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./quantity.input.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.input.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/udi + udi: { + type: require('./coding.input.js'), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + subDetail: { + type: new GraphQLList(require('./claimitemdetailsubdetail.input.js')), + description: 'Third tier of goods and services.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimitemdetailsubdetail.input.js b/src/resources/1_0_2/inputs/claimitemdetailsubdetail.input.js index 08ba589e..cf78900b 100644 --- a/src/resources/1_0_2/inputs/claimitemdetailsubdetail.input.js +++ b/src/resources/1_0_2/inputs/claimitemdetailsubdetail.input.js @@ -1,78 +1,96 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.item.detail.subDetail Input Schema + * @summary ClaimitemdetailsubDetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimItemDetailSubDetail_Input', - description: 'Third tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The type of product or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The fee for an additional service or product or charge.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./quantity.input'), - description: 'The fee for an additional service or product or charge.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.input'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.input'), - description: - 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/udi - udi: { - type: require('./coding.input'), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - }), + name: 'ClaimitemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The type of product or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The fee for an additional service or product or charge.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./quantity.input.js'), + description: 'The fee for an additional service or product or charge.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.input.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/udi + udi: { + type: require('./coding.input.js'), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimitemprosthesis.input.js b/src/resources/1_0_2/inputs/claimitemprosthesis.input.js index 1e217b68..dd8ba799 100644 --- a/src/resources/1_0_2/inputs/claimitemprosthesis.input.js +++ b/src/resources/1_0_2/inputs/claimitemprosthesis.input.js @@ -1,41 +1,62 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType, GraphQLBoolean } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.item.prosthesis Input Schema + * @summary Claimitemprosthesis Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimItemProsthesis_Input', - description: 'The materials and placement date of prior fixed prosthesis.', - fields: () => - extendSchema(require('./backboneelement.input'), { - initial: { - type: GraphQLBoolean, - description: - 'Indicates whether this is the initial placement of a fixed prosthesis.', - }, - _initial: { - type: require('./element.input'), - description: - 'Indicates whether this is the initial placement of a fixed prosthesis.', - }, - priorDate: { - type: DateScalar, - description: 'Date of the initial placement.', - }, - _priorDate: { - type: require('./element.input'), - description: 'Date of the initial placement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/oral-prosthodontic-material - priorMaterial: { - type: require('./coding.input'), - description: - 'Material of the prior denture or bridge prosthesis. (Oral).', - }, - }), + name: 'Claimitemprosthesis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _initial: { + type: require('./element.input.js'), + description: + 'Indicates whether this is the initial placement of a fixed prosthesis.', + }, + initial: { + type: GraphQLBoolean, + description: + 'Indicates whether this is the initial placement of a fixed prosthesis.', + }, + _priorDate: { + type: require('./element.input.js'), + description: 'Date of the initial placement.', + }, + priorDate: { + type: DateScalar, + description: 'Date of the initial placement.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/oral-prosthodontic-material + priorMaterial: { + type: require('./coding.input.js'), + description: + 'Material of the prior denture or bridge prosthesis. (Oral).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimmissingteeth.input.js b/src/resources/1_0_2/inputs/claimmissingteeth.input.js index 937af5ab..f42cf4f2 100644 --- a/src/resources/1_0_2/inputs/claimmissingteeth.input.js +++ b/src/resources/1_0_2/inputs/claimmissingteeth.input.js @@ -1,38 +1,58 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.missingTeeth Input Schema + * @summary ClaimmissingTeeth Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimMissingTeeth_Input', - description: - 'A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/teeth - tooth: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The code identifying which tooth is missing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason - reason: { - type: require('./coding.input'), - description: 'Missing reason may be: E-extraction, O-other.', - }, - extractionDate: { - type: DateScalar, - description: - 'The date of the extraction either known from records or patient reported estimate.', - }, - _extractionDate: { - type: require('./element.input'), - description: - 'The date of the extraction either known from records or patient reported estimate.', - }, - }), + name: 'ClaimmissingTeeth_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/teeth + tooth: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The code identifying which tooth is missing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason + reason: { + type: require('./coding.input.js'), + description: 'Missing reason may be: E-extraction, O-other.', + }, + _extractionDate: { + type: require('./element.input.js'), + description: + 'The date of the extraction either known from records or patient reported estimate.', + }, + extractionDate: { + type: DateScalar, + description: + 'The date of the extraction either known from records or patient reported estimate.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimpayee.input.js b/src/resources/1_0_2/inputs/claimpayee.input.js index 475a65e6..2f68c661 100644 --- a/src/resources/1_0_2/inputs/claimpayee.input.js +++ b/src/resources/1_0_2/inputs/claimpayee.input.js @@ -1,36 +1,57 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Claim.payee Input Schema + * @summary Claimpayee Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimPayee_Input', - description: 'The party to be reimbursed for the services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - type: { - type: require('./coding.input'), - description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - provider: { - type: require('./reference.input'), - description: - 'The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).', - }, - person: { - type: require('./reference.input'), - description: - 'The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).', - }, - }), + name: 'Claimpayee_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + type: { + type: require('./coding.input.js'), + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + provider: { + type: GraphQLString, + description: + 'The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).', + }, + organization: { + type: GraphQLString, + description: + 'The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).', + }, + person: { + type: GraphQLString, + description: + 'The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponse.input.js b/src/resources/1_0_2/inputs/claimresponse.input.js index 732c425b..451ac14c 100644 --- a/src/resources/1_0_2/inputs/claimresponse.input.js +++ b/src/resources/1_0_2/inputs/claimresponse.input.js @@ -1,23 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.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 ClaimResponseResourceInputType = new GraphQLEnumType({ - name: 'ClaimResponseResourceInputType', - values: { - ClaimResponse: { value: 'ClaimResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,152 +17,209 @@ let ClaimResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ClaimResponse_Input', - description: 'Base StructureDefinition for ClaimResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ClaimResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource referrence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.input'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - payeeType: { - type: require('./coding.input'), - description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - item: { - type: new GraphQLList(require('./claimresponseitem.input')), - description: - 'The first tier service adjudications for submitted services.', - }, - addItem: { - type: new GraphQLList(require('./claimresponseadditem.input')), - description: - 'The first tier service adjudications for payor added services.', - }, - error: { - type: new GraphQLList(require('./claimresponseerror.input')), - description: 'Mutually exclusive with Services Provided (Item).', - }, - totalCost: { - type: require('./quantity.input'), - description: 'The total cost of the services reported.', - }, - unallocDeductable: { - type: require('./quantity.input'), - description: - 'The amount of deductible applied which was not allocated to any particular service line.', - }, - totalBenefit: { - type: require('./quantity.input'), - description: - 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).', - }, - paymentAdjustment: { - type: require('./quantity.input'), - description: - 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjustment-reason - paymentAdjustmentReason: { - type: require('./coding.input'), - description: 'Reason for the payment adjustment.', - }, - paymentDate: { - type: DateScalar, - description: 'Estimated payment data.', - }, - _paymentDate: { - type: require('./element.input'), - description: 'Estimated payment data.', - }, - paymentAmount: { - type: require('./quantity.input'), - description: 'Payable less any payment adjustment.', - }, - paymentRef: { - type: require('./identifier.input'), - description: 'Payment identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve - reserved: { - type: require('./coding.input'), - description: - 'Status of funds reservation (For provider, for Patient, None).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./coding.input'), - description: 'The form to be used for printing the content.', - }, - note: { - type: new GraphQLList(require('./claimresponsenote.input')), - description: 'Note text.', - }, - coverage: { - type: new GraphQLList(require('./claimresponsecoverage.input')), - description: - 'Financial instrument by which payment information for health care.', - }, - }), + description: 'Base StructureDefinition for ClaimResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClaimResponse_Enum_input', + values: { ClaimResponse: { value: 'ClaimResponse' } }, + }), + ), + 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: 'The Response business identifier.', + }, + request: { + type: GraphQLString, + description: 'Original request resource referrence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + payeeType: { + type: require('./coding.input.js'), + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + item: { + type: new GraphQLList(require('./claimresponseitem.input.js')), + description: + 'The first tier service adjudications for submitted services.', + }, + addItem: { + type: new GraphQLList(require('./claimresponseadditem.input.js')), + description: + 'The first tier service adjudications for payor added services.', + }, + error: { + type: new GraphQLList(require('./claimresponseerror.input.js')), + description: 'Mutually exclusive with Services Provided (Item).', + }, + totalCost: { + type: require('./quantity.input.js'), + description: 'The total cost of the services reported.', + }, + unallocDeductable: { + type: require('./quantity.input.js'), + description: + 'The amount of deductible applied which was not allocated to any particular service line.', + }, + totalBenefit: { + type: require('./quantity.input.js'), + description: + 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).', + }, + paymentAdjustment: { + type: require('./quantity.input.js'), + description: + 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjustment-reason + paymentAdjustmentReason: { + type: require('./coding.input.js'), + description: 'Reason for the payment adjustment.', + }, + _paymentDate: { + type: require('./element.input.js'), + description: 'Estimated payment data.', + }, + paymentDate: { + type: DateScalar, + description: 'Estimated payment data.', + }, + paymentAmount: { + type: require('./quantity.input.js'), + description: 'Payable less any payment adjustment.', + }, + paymentRef: { + type: require('./identifier.input.js'), + description: 'Payment identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve + reserved: { + type: require('./coding.input.js'), + description: + 'Status of funds reservation (For provider, for Patient, None).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./coding.input.js'), + description: 'The form to be used for printing the content.', + }, + note: { + type: new GraphQLList(require('./claimresponsenote.input.js')), + description: 'Note text.', + }, + coverage: { + type: new GraphQLList(require('./claimresponsecoverage.input.js')), + description: + 'Financial instrument by which payment information for health care.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseadditem.input.js b/src/resources/1_0_2/inputs/claimresponseadditem.input.js index 8c25b8a3..1f0f492a 100644 --- a/src/resources/1_0_2/inputs/claimresponseadditem.input.js +++ b/src/resources/1_0_2/inputs/claimresponseadditem.input.js @@ -1,61 +1,77 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem Input Schema + * @summary ClaimResponseaddItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseAddItem_Input', - description: 'The first tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'List of input service items which this service line is intended to replace.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: - 'List of input service items which this service line is intended to replace.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'A code to indicate the Professional Service or Product supplied.', - }, - fee: { - type: require('./quantity.input'), - description: - 'The fee charged for the professional service or product..', - }, - noteNumberLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumberLinkId: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseadditemadjudication.input'), - ), - description: 'The adjudications results.', - }, - detail: { - type: new GraphQLList(require('./claimresponseadditemdetail.input')), - description: - 'The second tier service adjudications for payor added services.', - }, - }), + name: 'ClaimResponseaddItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: + 'List of input service items which this service line is intended to replace.', + }, + sequenceLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'List of input service items which this service line is intended to replace.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A code to indicate the Professional Service or Product supplied.', + }, + fee: { + type: require('./quantity.input.js'), + description: 'The fee charged for the professional service or product..', + }, + _noteNumberLinkId: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumberLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseadditemadjudication.input.js'), + ), + description: 'The adjudications results.', + }, + detail: { + type: new GraphQLList(require('./claimresponseadditemdetail.input.js')), + description: + 'The second tier service adjudications for payor added services.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseadditemadjudication.input.js b/src/resources/1_0_2/inputs/claimresponseadditemadjudication.input.js index 34ee207f..8f304eec 100644 --- a/src/resources/1_0_2/inputs/claimresponseadditemadjudication.input.js +++ b/src/resources/1_0_2/inputs/claimresponseadditemadjudication.input.js @@ -1,40 +1,58 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem.adjudication Input Schema + * @summary ClaimResponseaddItemadjudication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseAddItemAdjudication_Input', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.input'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.input'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseaddItemadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseadditemdetail.input.js b/src/resources/1_0_2/inputs/claimresponseadditemdetail.input.js index efb031d2..0b1e53b0 100644 --- a/src/resources/1_0_2/inputs/claimresponseadditemdetail.input.js +++ b/src/resources/1_0_2/inputs/claimresponseadditemdetail.input.js @@ -1,38 +1,53 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem.detail Input Schema + * @summary ClaimResponseaddItemdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseAddItemDetail_Input', - description: - 'The second tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'A code to indicate the Professional Service or Product supplied.', - }, - fee: { - type: require('./quantity.input'), - description: - 'The fee charged for the professional service or product..', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseadditemdetailadjudication.input'), - ), - description: 'The adjudications results.', - }, - }), + name: 'ClaimResponseaddItemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A code to indicate the Professional Service or Product supplied.', + }, + fee: { + type: require('./quantity.input.js'), + description: 'The fee charged for the professional service or product..', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseadditemdetailadjudication.input.js'), + ), + description: 'The adjudications results.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseadditemdetailadjudication.input.js b/src/resources/1_0_2/inputs/claimresponseadditemdetailadjudication.input.js index 65ff6941..61925c6e 100644 --- a/src/resources/1_0_2/inputs/claimresponseadditemdetailadjudication.input.js +++ b/src/resources/1_0_2/inputs/claimresponseadditemdetailadjudication.input.js @@ -1,40 +1,58 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem.detail.adjudication Input Schema + * @summary ClaimResponseaddItemdetailadjudication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseAddItemDetailAdjudication_Input', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.input'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.input'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseaddItemdetailadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponsecoverage.input.js b/src/resources/1_0_2/inputs/claimresponsecoverage.input.js index 9729a8aa..e3f48009 100644 --- a/src/resources/1_0_2/inputs/claimresponsecoverage.input.js +++ b/src/resources/1_0_2/inputs/claimresponsecoverage.input.js @@ -1,82 +1,98 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.coverage Input Schema + * @summary ClaimResponsecoverage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseCoverage_Input', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line item.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line item.', - }, - focal: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - _focal: { - type: require('./element.input'), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.input'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relationship - relationship: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The relationship of the patient to the subscriber.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.input'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - claimResponse: { - type: require('./reference.input'), - description: 'The Coverages adjudication details.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - }), + name: 'ClaimResponsecoverage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line item.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line item.', + }, + _focal: { + type: require('./element.input.js'), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _businessArrangement: { + type: require('./element.input.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relationship + relationship: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The relationship of the patient to the subscriber.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + claimResponse: { + type: GraphQLString, + description: 'The Coverages adjudication details.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseerror.input.js b/src/resources/1_0_2/inputs/claimresponseerror.input.js index 239b7afb..29f1099d 100644 --- a/src/resources/1_0_2/inputs/claimresponseerror.input.js +++ b/src/resources/1_0_2/inputs/claimresponseerror.input.js @@ -1,53 +1,74 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.error Input Schema + * @summary ClaimResponseerror Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseError_Input', - description: 'Mutually exclusive with Services Provided (Item).', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: - 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', - }, - detailSequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - _detailSequenceLinkId: { - type: require('./element.input'), - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - subdetailSequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - _subdetailSequenceLinkId: { - type: require('./element.input'), - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'An error code,froma specified code system, which details why the claim could not be adjudicated.', - }, - }), + name: 'ClaimResponseerror_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', + }, + sequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', + }, + _detailSequenceLinkId: { + type: require('./element.input.js'), + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + detailSequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + _subdetailSequenceLinkId: { + type: require('./element.input.js'), + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + subdetailSequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'An error code,froma specified code system, which details why the claim could not be adjudicated.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseitem.input.js b/src/resources/1_0_2/inputs/claimresponseitem.input.js index 3770761c..0ece5690 100644 --- a/src/resources/1_0_2/inputs/claimresponseitem.input.js +++ b/src/resources/1_0_2/inputs/claimresponseitem.input.js @@ -1,46 +1,65 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item Input Schema + * @summary ClaimResponseitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItem_Input', - description: 'The first tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: 'A service line number.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - adjudication: { - type: new GraphQLList(require('./claimresponseitemadjudication.input')), - description: 'The adjudications results.', - }, - detail: { - type: new GraphQLList(require('./claimresponseitemdetail.input')), - description: - 'The second tier service adjudications for submitted services.', - }, - }), + name: 'ClaimResponseitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseitemadjudication.input.js'), + ), + description: 'The adjudications results.', + }, + detail: { + type: new GraphQLList(require('./claimresponseitemdetail.input.js')), + description: + 'The second tier service adjudications for submitted services.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseitemadjudication.input.js b/src/resources/1_0_2/inputs/claimresponseitemadjudication.input.js index 36747172..e42c01a1 100644 --- a/src/resources/1_0_2/inputs/claimresponseitemadjudication.input.js +++ b/src/resources/1_0_2/inputs/claimresponseitemadjudication.input.js @@ -1,40 +1,58 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.adjudication Input Schema + * @summary ClaimResponseitemadjudication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItemAdjudication_Input', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.input'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.input'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseitemadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseitemdetail.input.js b/src/resources/1_0_2/inputs/claimresponseitemdetail.input.js index 22d6a028..dc1a07df 100644 --- a/src/resources/1_0_2/inputs/claimresponseitemdetail.input.js +++ b/src/resources/1_0_2/inputs/claimresponseitemdetail.input.js @@ -1,42 +1,59 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail Input Schema + * @summary ClaimResponseitemdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItemDetail_Input', - description: 'The second tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: 'A service line number.', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseitemdetailadjudication.input'), - ), - description: 'The adjudications results.', - }, - subDetail: { - type: new GraphQLList( - require('./claimresponseitemdetailsubdetail.input'), - ), - description: - 'The third tier service adjudications for submitted services.', - }, - }), + name: 'ClaimResponseitemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseitemdetailadjudication.input.js'), + ), + description: 'The adjudications results.', + }, + subDetail: { + type: new GraphQLList( + require('./claimresponseitemdetailsubdetail.input.js'), + ), + description: + 'The third tier service adjudications for submitted services.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseitemdetailadjudication.input.js b/src/resources/1_0_2/inputs/claimresponseitemdetailadjudication.input.js index 9725244a..72d9ae62 100644 --- a/src/resources/1_0_2/inputs/claimresponseitemdetailadjudication.input.js +++ b/src/resources/1_0_2/inputs/claimresponseitemdetailadjudication.input.js @@ -1,40 +1,58 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail.adjudication Input Schema + * @summary ClaimResponseitemdetailadjudication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItemDetailAdjudication_Input', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.input'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.input'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseitemdetailadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseitemdetailsubdetail.input.js b/src/resources/1_0_2/inputs/claimresponseitemdetailsubdetail.input.js index da03d3a3..84471f8c 100644 --- a/src/resources/1_0_2/inputs/claimresponseitemdetailsubdetail.input.js +++ b/src/resources/1_0_2/inputs/claimresponseitemdetailsubdetail.input.js @@ -1,35 +1,52 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail.subDetail Input Schema + * @summary ClaimResponseitemdetailsubDetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItemDetailSubDetail_Input', - description: 'The third tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: 'A service line number.', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseitemdetailsubdetailadjudication.input'), - ), - description: 'The adjudications results.', - }, - }), + name: 'ClaimResponseitemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseitemdetailsubdetailadjudication.input.js'), + ), + description: 'The adjudications results.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponseitemdetailsubdetailadjudication.input.js b/src/resources/1_0_2/inputs/claimresponseitemdetailsubdetailadjudication.input.js index c20a18f2..269fa266 100644 --- a/src/resources/1_0_2/inputs/claimresponseitemdetailsubdetailadjudication.input.js +++ b/src/resources/1_0_2/inputs/claimresponseitemdetailsubdetailadjudication.input.js @@ -1,40 +1,58 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail.subDetail.adjudication Input Schema + * @summary ClaimResponseitemdetailsubDetailadjudication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItemDetailSubDetailAdjudication_Input', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.input'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.input'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseitemdetailsubDetailadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/claimresponsenote.input.js b/src/resources/1_0_2/inputs/claimresponsenote.input.js index b663ae61..e17a5379 100644 --- a/src/resources/1_0_2/inputs/claimresponsenote.input.js +++ b/src/resources/1_0_2/inputs/claimresponsenote.input.js @@ -1,40 +1,61 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.note Input Schema + * @summary ClaimResponsenote Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseNote_Input', - description: 'Note text.', - fields: () => - extendSchema(require('./backboneelement.input'), { - number: { - type: PositiveIntScalar, - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - _number: { - type: require('./element.input'), - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./coding.input'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.input'), - description: 'The note text.', - }, - }), + name: 'ClaimResponsenote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _number: { + type: require('./element.input.js'), + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + number: { + type: PositiveIntScalar, + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./coding.input.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.input.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/clinicalimpression.input.js b/src/resources/1_0_2/inputs/clinicalimpression.input.js index 4fb4ae81..73cdfc09 100644 --- a/src/resources/1_0_2/inputs/clinicalimpression.input.js +++ b/src/resources/1_0_2/inputs/clinicalimpression.input.js @@ -1,23 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.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 ClinicalImpressionResourceInputType = new GraphQLEnumType({ - name: 'ClinicalImpressionResourceInputType', - values: { - ClinicalImpression: { value: 'ClinicalImpression' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,126 +16,183 @@ let ClinicalImpressionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ClinicalImpression_Input', - description: 'Base StructureDefinition for ClinicalImpression Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ClinicalImpressionResourceInputType), - description: 'Type of this resource.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient being assessed.', - }, - assessor: { - type: require('./reference.input'), - description: 'The clinician performing the assessment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-impression-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Identifies the workflow status of the assessment.', - }, - _status: { - type: require('./element.input'), - description: 'Identifies the workflow status of the assessment.', - }, - date: { - type: DateTimeScalar, - description: - 'The point in time at which the assessment was concluded (not when it was recorded).', - }, - _date: { - type: require('./element.input'), - description: - 'The point in time at which the assessment was concluded (not when it was recorded).', - }, - description: { - type: GraphQLString, - description: - 'A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.', - }, - _description: { - type: require('./element.input'), - description: - 'A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.', - }, - previous: { - type: require('./reference.input'), - description: - "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", - }, - problem: { - type: new GraphQLList(require('./reference.input')), - description: - 'This a list of the general problems/conditions for a patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - triggerCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - triggerReference: { - type: require('./reference.input'), - description: - 'The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.', - }, - investigations: { - type: new GraphQLList( - require('./clinicalimpressioninvestigations.input'), - ), - description: - 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', - }, - protocol: { - type: UriScalar, - description: - 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', - }, - _protocol: { - type: require('./element.input'), - description: - 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', - }, - summary: { - type: GraphQLString, - description: 'A text summary of the investigations and the diagnosis.', - }, - _summary: { - type: require('./element.input'), - description: 'A text summary of the investigations and the diagnosis.', - }, - finding: { - type: new GraphQLList(require('./clinicalimpressionfinding.input')), - description: - 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - resolved: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Diagnoses/conditions resolved since the last assessment.', - }, - ruledOut: { - type: new GraphQLList(require('./clinicalimpressionruledout.input')), - description: 'Diagnosis considered not possible.', - }, - prognosis: { - type: GraphQLString, - description: 'Estimate of likely outcome.', - }, - _prognosis: { - type: require('./element.input'), - description: 'Estimate of likely outcome.', - }, - plan: { - type: new GraphQLList(require('./reference.input')), - description: 'Plan of action after assessment.', - }, - action: { - type: new GraphQLList(require('./reference.input')), - description: 'Actions taken during assessment.', - }, - }), + description: 'Base StructureDefinition for ClinicalImpression Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClinicalImpression_Enum_input', + values: { ClinicalImpression: { value: 'ClinicalImpression' } }, + }), + ), + 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.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient being assessed.', + }, + assessor: { + type: GraphQLString, + description: 'The clinician performing the assessment.', + }, + _status: { + type: require('./element.input.js'), + description: 'Identifies the workflow status of the assessment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-impression-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the workflow status of the assessment.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The point in time at which the assessment was concluded (not when it was recorded).', + }, + date: { + type: DateTimeScalar, + description: + 'The point in time at which the assessment was concluded (not when it was recorded).', + }, + _description: { + type: require('./element.input.js'), + description: + 'A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.', + }, + description: { + type: GraphQLString, + description: + 'A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.', + }, + previous: { + type: GraphQLString, + description: + "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", + }, + problem: { + type: new GraphQLList(GraphQLString), + description: + 'This a list of the general problems/conditions for a patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + triggerCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + triggerReference: { + type: GraphQLString, + description: + 'The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.', + }, + investigations: { + type: new GraphQLList( + require('./clinicalimpressioninvestigations.input.js'), + ), + description: + 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', + }, + _protocol: { + type: require('./element.input.js'), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + protocol: { + type: UriScalar, + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + _summary: { + type: require('./element.input.js'), + description: 'A text summary of the investigations and the diagnosis.', + }, + summary: { + type: GraphQLString, + description: 'A text summary of the investigations and the diagnosis.', + }, + finding: { + type: new GraphQLList(require('./clinicalimpressionfinding.input.js')), + description: + 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + resolved: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Diagnoses/conditions resolved since the last assessment.', + }, + ruledOut: { + type: new GraphQLList(require('./clinicalimpressionruledout.input.js')), + description: 'Diagnosis considered not possible.', + }, + _prognosis: { + type: require('./element.input.js'), + description: 'Estimate of likely outcome.', + }, + prognosis: { + type: GraphQLString, + description: 'Estimate of likely outcome.', + }, + plan: { + type: new GraphQLList(GraphQLString), + description: 'Plan of action after assessment.', + }, + action: { + type: new GraphQLList(GraphQLString), + description: 'Actions taken during assessment.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/clinicalimpressionfinding.input.js b/src/resources/1_0_2/inputs/clinicalimpressionfinding.input.js index 0d320e6a..81336be4 100644 --- a/src/resources/1_0_2/inputs/clinicalimpressionfinding.input.js +++ b/src/resources/1_0_2/inputs/clinicalimpressionfinding.input.js @@ -1,34 +1,51 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClinicalImpression.finding Input Schema + * @summary ClinicalImpressionfinding Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClinicalImpressionFinding_Input', - description: - 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - item: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Specific text of code for finding or diagnosis.', - }, - cause: { - type: GraphQLString, - description: 'Which investigations support finding or diagnosis.', - }, - _cause: { - type: require('./element.input'), - description: 'Which investigations support finding or diagnosis.', - }, - }), + name: 'ClinicalImpressionfinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + item: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Specific text of code for finding or diagnosis.', + }, + _cause: { + type: require('./element.input.js'), + description: 'Which investigations support finding or diagnosis.', + }, + cause: { + type: GraphQLString, + description: 'Which investigations support finding or diagnosis.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/clinicalimpressioninvestigations.input.js b/src/resources/1_0_2/inputs/clinicalimpressioninvestigations.input.js index 07c9cab8..9908279f 100644 --- a/src/resources/1_0_2/inputs/clinicalimpressioninvestigations.input.js +++ b/src/resources/1_0_2/inputs/clinicalimpressioninvestigations.input.js @@ -1,32 +1,48 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClinicalImpression.investigations Input Schema + * @summary ClinicalImpressioninvestigations Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClinicalImpressionInvestigations_Input', - description: - 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/investigation-sets - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", - }, - item: { - type: new GraphQLList(require('./reference.input')), - description: - 'A record of a specific investigation that was undertaken.', - }, - }), + name: 'ClinicalImpressioninvestigations_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/investigation-sets + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", + }, + item: { + type: new GraphQLList(GraphQLString), + description: 'A record of a specific investigation that was undertaken.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/clinicalimpressionruledout.input.js b/src/resources/1_0_2/inputs/clinicalimpressionruledout.input.js index f8c4e8a5..d6f05692 100644 --- a/src/resources/1_0_2/inputs/clinicalimpressionruledout.input.js +++ b/src/resources/1_0_2/inputs/clinicalimpressionruledout.input.js @@ -1,33 +1,51 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClinicalImpression.ruledOut Input Schema + * @summary ClinicalImpressionruledOut Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClinicalImpressionRuledOut_Input', - description: 'Diagnosis considered not possible.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - item: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Specific text of code for diagnosis.', - }, - reason: { - type: GraphQLString, - description: 'Grounds for elimination.', - }, - _reason: { - type: require('./element.input'), - description: 'Grounds for elimination.', - }, - }), + name: 'ClinicalImpressionruledOut_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + item: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Specific text of code for diagnosis.', + }, + _reason: { + type: require('./element.input.js'), + description: 'Grounds for elimination.', + }, + reason: { + type: GraphQLString, + description: 'Grounds for elimination.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/codeableconcept.input.js b/src/resources/1_0_2/inputs/codeableconcept.input.js index 652fb37e..4b52a1c4 100644 --- a/src/resources/1_0_2/inputs/codeableconcept.input.js +++ b/src/resources/1_0_2/inputs/codeableconcept.input.js @@ -1,11 +1,9 @@ const { - GraphQLInputObjectType, GraphQLList, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -13,22 +11,36 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'CodeableConcept_Input', - description: 'Base StructureDefinition for CodeableConcept Type.', - fields: () => - extendSchema(require('./element.input'), { - coding: { - type: new GraphQLList(require('./coding.input')), - description: 'A reference to a code defined by a terminology system.', - }, - text: { - type: GraphQLString, - description: - 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', - }, - _text: { - type: require('./element.input'), - description: - 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', - }, - }), + description: 'Base StructureDefinition for CodeableConcept Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + coding: { + type: new GraphQLList(require('./coding.input.js')), + description: 'A reference to a code defined by a terminology system.', + }, + _text: { + type: require('./element.input.js'), + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + text: { + type: GraphQLString, + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/coding.input.js b/src/resources/1_0_2/inputs/coding.input.js index fe6f1edd..4344be25 100644 --- a/src/resources/1_0_2/inputs/coding.input.js +++ b/src/resources/1_0_2/inputs/coding.input.js @@ -1,13 +1,12 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -15,58 +14,72 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Coding_Input', - description: 'Base StructureDefinition for Coding Type.', - fields: () => - extendSchema(require('./element.input'), { - system: { - type: UriScalar, - description: - 'The identification of the code system that defines the meaning of the symbol in the code.', - }, - _system: { - type: require('./element.input'), - description: - 'The identification of the code system that defines the meaning of the symbol in the code.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', - }, - code: { - type: CodeScalar, - description: - 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', - }, - _code: { - type: require('./element.input'), - description: - 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', - }, - display: { - type: GraphQLString, - description: - 'A representation of the meaning of the code in the system, following the rules of the system.', - }, - _display: { - type: require('./element.input'), - description: - 'A representation of the meaning of the code in the system, following the rules of the system.', - }, - userSelected: { - type: GraphQLBoolean, - description: - 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', - }, - _userSelected: { - type: require('./element.input'), - description: - 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', - }, - }), + description: 'Base StructureDefinition for Coding Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + system: { + type: UriScalar, + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + code: { + type: CodeScalar, + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + _display: { + type: require('./element.input.js'), + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + display: { + type: GraphQLString, + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + _userSelected: { + type: require('./element.input.js'), + description: + 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', + }, + userSelected: { + type: GraphQLBoolean, + description: + 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/communication.input.js b/src/resources/1_0_2/inputs/communication.input.js index 903c985b..a41baf43 100644 --- a/src/resources/1_0_2/inputs/communication.input.js +++ b/src/resources/1_0_2/inputs/communication.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 CommunicationResourceInputType = new GraphQLEnumType({ - name: 'CommunicationResourceInputType', - values: { - Communication: { value: 'Communication' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,87 +16,144 @@ let CommunicationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Communication_Input', - description: 'Base StructureDefinition for Communication Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CommunicationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - category: { - type: require('./codeableconcept.input'), - description: - 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', - }, - sender: { - type: require('./reference.input'), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', - }, - payload: { - type: new GraphQLList(require('./communicationpayload.input')), - description: - 'Text, attachment(s), or resource(s) that was communicated to the recipient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode - medium: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A channel that was used for this communication (e.g. email, fax).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-status - status: { - type: CodeScalar, - description: 'The status of the transmission.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the transmission.', - }, - encounter: { - type: require('./reference.input'), - description: 'The encounter within which the communication was sent.', - }, - sent: { - type: DateTimeScalar, - description: 'The time when this communication was sent.', - }, - _sent: { - type: require('./element.input'), - description: 'The time when this communication was sent.', - }, - received: { - type: DateTimeScalar, - description: - 'The time when this communication arrived at the destination.', - }, - _received: { - type: require('./element.input'), - description: - 'The time when this communication arrived at the destination.', - }, - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'The reason or justification for the communication.', - }, - subject: { - type: require('./reference.input'), - description: 'The patient who was the focus of this communication.', - }, - requestDetail: { - type: require('./reference.input'), - description: - 'The communication request that was responsible for producing this communication.', - }, - }), + description: 'Base StructureDefinition for Communication Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Communication_Enum_input', + values: { Communication: { value: 'Communication' } }, + }), + ), + 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: + 'Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', + }, + sender: { + type: GraphQLString, + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', + }, + payload: { + type: new GraphQLList(require('./communicationpayload.input.js')), + description: + 'Text, attachment(s), or resource(s) that was communicated to the recipient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode + medium: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the transmission.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-status + status: { + type: CodeScalar, + description: 'The status of the transmission.', + }, + encounter: { + type: GraphQLString, + description: 'The encounter within which the communication was sent.', + }, + _sent: { + type: require('./element.input.js'), + description: 'The time when this communication was sent.', + }, + sent: { + type: DateTimeScalar, + description: 'The time when this communication was sent.', + }, + _received: { + type: require('./element.input.js'), + description: + 'The time when this communication arrived at the destination.', + }, + received: { + type: DateTimeScalar, + description: + 'The time when this communication arrived at the destination.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason or justification for the communication.', + }, + subject: { + type: GraphQLString, + description: 'The patient who was the focus of this communication.', + }, + requestDetail: { + type: GraphQLString, + description: + 'The communication request that was responsible for producing this communication.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/communicationpayload.input.js b/src/resources/1_0_2/inputs/communicationpayload.input.js index dd3d4084..f4e228ae 100644 --- a/src/resources/1_0_2/inputs/communicationpayload.input.js +++ b/src/resources/1_0_2/inputs/communicationpayload.input.js @@ -1,41 +1,58 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Communication.payload Input Schema + * @summary Communicationpayload Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CommunicationPayload_Input', - description: - 'Text, attachment(s), or resource(s) that was communicated to the recipient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - contentString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - _contentString: { - type: require('./element.input'), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - }), + name: 'Communicationpayload_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _contentString: { + type: require('./element.input.js'), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/communicationrequest.input.js b/src/resources/1_0_2/inputs/communicationrequest.input.js index b1787262..780257ec 100644 --- a/src/resources/1_0_2/inputs/communicationrequest.input.js +++ b/src/resources/1_0_2/inputs/communicationrequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 CommunicationRequestResourceInputType = new GraphQLEnumType({ - name: 'CommunicationRequestResourceInputType', - values: { - CommunicationRequest: { value: 'CommunicationRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,98 +16,154 @@ let CommunicationRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'CommunicationRequest_Input', - description: 'Base StructureDefinition for CommunicationRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CommunicationRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.', - }, - category: { - type: require('./codeableconcept.input'), - description: - 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', - }, - sender: { - type: require('./reference.input'), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.', - }, - payload: { - type: new GraphQLList(require('./communicationrequestpayload.input')), - description: - 'Text, attachment(s), or resource(s) to be communicated to the recipient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode - medium: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A channel that was used for this communication (e.g. email, fax).', - }, - requester: { - type: require('./reference.input'), - description: - 'The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-request-status - status: { - type: CodeScalar, - description: 'The status of the proposal or order.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the proposal or order.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The encounter within which the communication request was created.', - }, - scheduledDateTime: { - type: DateTimeScalar, - description: 'The time when this communication is to occur.', - }, - _scheduledDateTime: { - type: require('./element.input'), - description: 'The time when this communication is to occur.', - }, - scheduledPeriod: { - type: require('./period.input'), - description: 'The time when this communication is to occur.', - }, - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The reason or justification for the communication request.', - }, - requestedOn: { - type: DateTimeScalar, - description: 'The time when the request was made.', - }, - _requestedOn: { - type: require('./element.input'), - description: 'The time when the request was made.', - }, - subject: { - type: require('./reference.input'), - description: - 'The patient who is the focus of this communication request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority - priority: { - type: require('./codeableconcept.input'), - description: - 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', - }, - }), + description: 'Base StructureDefinition for CommunicationRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CommunicationRequest_Enum_input', + values: { CommunicationRequest: { value: 'CommunicationRequest' } }, + }), + ), + 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: + 'A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', + }, + sender: { + type: GraphQLString, + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.', + }, + payload: { + type: new GraphQLList(require('./communicationrequestpayload.input.js')), + description: + 'Text, attachment(s), or resource(s) to be communicated to the recipient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode + medium: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + requester: { + type: GraphQLString, + description: + 'The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the proposal or order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-request-status + status: { + type: CodeScalar, + description: 'The status of the proposal or order.', + }, + encounter: { + type: GraphQLString, + description: + 'The encounter within which the communication request was created.', + }, + _scheduledDateTime: { + type: require('./element.input.js'), + description: 'The time when this communication is to occur.', + }, + scheduledDateTime: { + type: DateTimeScalar, + description: 'The time when this communication is to occur.', + }, + scheduledPeriod: { + type: require('./period.input.js'), + description: 'The time when this communication is to occur.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason or justification for the communication request.', + }, + _requestedOn: { + type: require('./element.input.js'), + description: 'The time when the request was made.', + }, + requestedOn: { + type: DateTimeScalar, + description: 'The time when the request was made.', + }, + subject: { + type: GraphQLString, + description: + 'The patient who is the focus of this communication request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority + priority: { + type: require('./codeableconcept.input.js'), + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/communicationrequestpayload.input.js b/src/resources/1_0_2/inputs/communicationrequestpayload.input.js index ee8e779c..6dec6d57 100644 --- a/src/resources/1_0_2/inputs/communicationrequestpayload.input.js +++ b/src/resources/1_0_2/inputs/communicationrequestpayload.input.js @@ -1,41 +1,58 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary CommunicationRequest.payload Input Schema + * @summary CommunicationRequestpayload Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CommunicationRequestPayload_Input', - description: - 'Text, attachment(s), or resource(s) to be communicated to the recipient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - contentString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - _contentString: { - type: require('./element.input'), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - }), + name: 'CommunicationRequestpayload_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _contentString: { + type: require('./element.input.js'), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/composition.input.js b/src/resources/1_0_2/inputs/composition.input.js index d4a736f3..13202245 100644 --- a/src/resources/1_0_2/inputs/composition.input.js +++ b/src/resources/1_0_2/inputs/composition.input.js @@ -1,22 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -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 CompositionResourceInputType = new GraphQLEnumType({ - name: 'CompositionResourceInputType', - values: { - Composition: { value: 'Composition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,103 +16,160 @@ let CompositionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Composition_Input', - description: 'Base StructureDefinition for Composition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CompositionResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The composition editing time, when the composition was last logically changed by the author.', - }, - _date: { - type: require('./element.input'), - description: - 'The composition editing time, when the composition was last logically changed by the author.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-typecodes - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-classcodes - class: { - type: require('./codeableconcept.input'), - description: - 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', - }, - title: { - type: new GraphQLNonNull(GraphQLString), - description: 'Official human-readable label for the composition.', - }, - _title: { - type: require('./element.input'), - description: 'Official human-readable label for the composition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', - }, - _status: { - type: require('./element.input'), - description: - 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-Confidentiality - confidentiality: { - type: CodeScalar, - description: - 'The code specifying the level of confidentiality of the Composition.', - }, - _confidentiality: { - type: require('./element.input'), - description: - 'The code specifying the level of confidentiality of the Composition.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', - }, - author: { - type: new GraphQLList(new GraphQLNonNull(require('./reference.input'))), - description: - 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', - }, - attester: { - type: new GraphQLList(require('./compositionattester.input')), - description: - 'A participant who has attested to the accuracy of the composition/document.', - }, - custodian: { - type: require('./reference.input'), - description: - 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', - }, - event: { - type: new GraphQLList(require('./compositionevent.input')), - description: - 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', - }, - encounter: { - type: require('./reference.input'), - description: - 'Describes the clinical encounter or type of care this documentation is associated with.', - }, - section: { - type: new GraphQLList(require('./compositionsection.input')), - description: 'The root of the sections that make up the composition.', - }, - }), + description: 'Base StructureDefinition for Composition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Composition_Enum_input', + values: { Composition: { value: 'Composition' } }, + }), + ), + 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: require('./identifier.input.js'), + description: + 'Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-typecodes + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-classcodes + class: { + type: require('./codeableconcept.input.js'), + description: + 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', + }, + _title: { + type: require('./element.input.js'), + description: 'Official human-readable label for the composition.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: 'Official human-readable label for the composition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + _confidentiality: { + type: require('./element.input.js'), + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-Confidentiality + confidentiality: { + type: CodeScalar, + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + }, + author: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + }, + attester: { + type: new GraphQLList(require('./compositionattester.input.js')), + description: + 'A participant who has attested to the accuracy of the composition/document.', + }, + custodian: { + type: GraphQLString, + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', + }, + event: { + type: new GraphQLList(require('./compositionevent.input.js')), + description: + 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', + }, + encounter: { + type: GraphQLString, + description: + 'Describes the clinical encounter or type of care this documentation is associated with.', + }, + section: { + type: new GraphQLList(require('./compositionsection.input.js')), + description: 'The root of the sections that make up the composition.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/compositionattester.input.js b/src/resources/1_0_2/inputs/compositionattester.input.js index f2a04a0c..d7b72934 100644 --- a/src/resources/1_0_2/inputs/compositionattester.input.js +++ b/src/resources/1_0_2/inputs/compositionattester.input.js @@ -1,44 +1,61 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Composition.attester Input Schema + * @summary Compositionattester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CompositionAttester_Input', - description: - 'A participant who has attested to the accuracy of the composition/document.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-attestation-mode - mode: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: 'The type of attestation the authenticator offers.', - }, - _mode: { - type: require('./element.input'), - description: 'The type of attestation the authenticator offers.', - }, - time: { - type: DateTimeScalar, - description: 'When composition was attested by the party.', - }, - _time: { - type: require('./element.input'), - description: 'When composition was attested by the party.', - }, - party: { - type: require('./reference.input'), - description: 'Who attested the composition in the specified way.', - }, - }), + name: 'Compositionattester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: 'The type of attestation the authenticator offers.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-attestation-mode + mode: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'The type of attestation the authenticator offers.', + }, + _time: { + type: require('./element.input.js'), + description: 'When composition was attested by the party.', + }, + time: { + type: DateTimeScalar, + description: 'When composition was attested by the party.', + }, + party: { + type: GraphQLString, + description: 'Who attested the composition in the specified way.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/compositionevent.input.js b/src/resources/1_0_2/inputs/compositionevent.input.js index c53cf68e..a478f51b 100644 --- a/src/resources/1_0_2/inputs/compositionevent.input.js +++ b/src/resources/1_0_2/inputs/compositionevent.input.js @@ -1,33 +1,53 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Composition.event Input Schema + * @summary Compositionevent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CompositionEvent_Input', - description: - 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode - code: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", - }, - period: { - type: require('./period.input'), - description: - 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', - }, - detail: { - type: new GraphQLList(require('./reference.input')), - description: - 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', - }, - }), + name: 'Compositionevent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', + }, + detail: { + type: new GraphQLList(GraphQLString), + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/compositionsection.input.js b/src/resources/1_0_2/inputs/compositionsection.input.js index e6136803..79a85881 100644 --- a/src/resources/1_0_2/inputs/compositionsection.input.js +++ b/src/resources/1_0_2/inputs/compositionsection.input.js @@ -1,70 +1,87 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Composition.section Input Schema + * @summary Compositionsection Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CompositionSection_Input', - description: 'The root of the sections that make up the composition.', - fields: () => - extendSchema(require('./backboneelement.input'), { - title: { - type: GraphQLString, - description: - 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', - }, - _title: { - type: require('./element.input'), - description: - 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-section-codes - code: { - type: require('./codeableconcept.input'), - description: - 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', - }, - text: { - type: require('./narrative.input'), - description: - "A human-readable narrative that contains the attested content of the section, 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.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-mode - mode: { - type: CodeScalar, - description: - 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - _mode: { - type: require('./element.input'), - description: - 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-order - orderedBy: { - type: require('./codeableconcept.input'), - description: - 'Specifies the order applied to the items in the section entries.', - }, - entry: { - type: new GraphQLList(require('./reference.input')), - description: - 'A reference to the actual resource from which the narrative in the section is derived.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason - emptyReason: { - type: require('./codeableconcept.input'), - description: - 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', - }, - }), + name: 'Compositionsection_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _title: { + type: require('./element.input.js'), + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + title: { + type: GraphQLString, + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-section-codes + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', + }, + text: { + type: require('./narrative.input.js'), + description: + "A human-readable narrative that contains the attested content of the section, 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.", + }, + _mode: { + type: require('./element.input.js'), + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-mode + mode: { + type: CodeScalar, + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-order + orderedBy: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies the order applied to the items in the section entries.', + }, + entry: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason + emptyReason: { + type: require('./codeableconcept.input.js'), + description: + 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conceptmap.input.js b/src/resources/1_0_2/inputs/conceptmap.input.js index 1b0d007d..4a61e652 100644 --- a/src/resources/1_0_2/inputs/conceptmap.input.js +++ b/src/resources/1_0_2/inputs/conceptmap.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConceptMapResourceInputType = new GraphQLEnumType({ - name: 'ConceptMapResourceInputType', - values: { - ConceptMap: { value: 'ConceptMap' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,162 +17,219 @@ let ConceptMapResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ConceptMap_Input', - description: 'Base StructureDefinition for ConceptMap Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ConceptMapResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - name: { - type: GraphQLString, - description: - 'A free text natural language name describing the concept map.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name describing the concept map.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the concept map.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the concept map.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the concept map.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the concept map.', - }, - contact: { - type: new GraphQLList(require('./conceptmapcontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.', - }, - _description: { - type: require('./element.input'), - description: - 'A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.', - }, - requirements: { - type: GraphQLString, - description: - 'Explains why this concept map is needed and why it has been constrained as it has.', - }, - _requirements: { - type: require('./element.input'), - description: - 'Explains why this concept map is needed and why it has been constrained as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the concept map and/or its contents.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the concept map and/or its contents.', - }, - sourceUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - _sourceUri: { - type: require('./element.input'), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - sourceReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - targetUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - _targetUri: { - type: require('./element.input'), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - targetReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - element: { - type: new GraphQLList(require('./conceptmapelement.input')), - description: - 'Mappings for an individual concept in the source to one or more concepts in the target.', - }, - }), + description: 'Base StructureDefinition for ConceptMap Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ConceptMap_Enum_input', + values: { ConceptMap: { value: 'ConceptMap' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name describing the concept map.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name describing the concept map.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the concept map.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the concept map.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the concept map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the concept map.', + }, + contact: { + type: new GraphQLList(require('./conceptmapcontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.', + }, + _requirements: { + type: require('./element.input.js'), + description: + 'Explains why this concept map is needed and why it has been constrained as it has.', + }, + requirements: { + type: GraphQLString, + description: + 'Explains why this concept map is needed and why it has been constrained as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the concept map and/or its contents.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the concept map and/or its contents.', + }, + _sourceUri: { + type: require('./element.input.js'), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + sourceUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + sourceReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + _targetUri: { + type: require('./element.input.js'), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + element: { + type: new GraphQLList(require('./conceptmapelement.input.js')), + description: + 'Mappings for an individual concept in the source to one or more concepts in the target.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conceptmapcontact.input.js b/src/resources/1_0_2/inputs/conceptmapcontact.input.js index ea2bcaab..cc06a476 100644 --- a/src/resources/1_0_2/inputs/conceptmapcontact.input.js +++ b/src/resources/1_0_2/inputs/conceptmapcontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ConceptMap.contact Input Schema + * @summary ConceptMapcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the concept map.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the concept map.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'ConceptMapcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the concept map.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the concept map.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conceptmapelement.input.js b/src/resources/1_0_2/inputs/conceptmapelement.input.js index 1c38dd0d..a25e03a5 100644 --- a/src/resources/1_0_2/inputs/conceptmapelement.input.js +++ b/src/resources/1_0_2/inputs/conceptmapelement.input.js @@ -1,44 +1,58 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ConceptMap.element Input Schema + * @summary ConceptMapelement Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapElement_Input', - description: - 'Mappings for an individual concept in the source to one or more concepts in the target.', - fields: () => - extendSchema(require('./backboneelement.input'), { - codeSystem: { - type: UriScalar, - description: - 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', - }, - _codeSystem: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', - }, - code: { - type: CodeScalar, - description: - 'Identity (code or path) or the element/item being mapped.', - }, - _code: { - type: require('./element.input'), - description: - 'Identity (code or path) or the element/item being mapped.', - }, - target: { - type: new GraphQLList(require('./conceptmapelementtarget.input')), - description: - 'A concept from the target value set that this concept maps to.', - }, - }), + name: 'ConceptMapelement_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _codeSystem: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', + }, + codeSystem: { + type: UriScalar, + description: + 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', + }, + _code: { + type: require('./element.input.js'), + description: 'Identity (code or path) or the element/item being mapped.', + }, + code: { + type: CodeScalar, + description: 'Identity (code or path) or the element/item being mapped.', + }, + target: { + type: new GraphQLList(require('./conceptmapelementtarget.input.js')), + description: + 'A concept from the target value set that this concept maps to.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conceptmapelementtarget.input.js b/src/resources/1_0_2/inputs/conceptmapelementtarget.input.js index 48f2aa23..78ce8d4f 100644 --- a/src/resources/1_0_2/inputs/conceptmapelementtarget.input.js +++ b/src/resources/1_0_2/inputs/conceptmapelementtarget.input.js @@ -1,71 +1,88 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ConceptMap.element.target Input Schema + * @summary ConceptMapelementtarget Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapElementTarget_Input', - description: 'A concept from the target value set that this concept maps to.', - fields: () => - extendSchema(require('./backboneelement.input'), { - codeSystem: { - type: UriScalar, - description: - 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', - }, - _codeSystem: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', - }, - code: { - type: CodeScalar, - description: - 'Identity (code or path) or the element/item that the map refers to.', - }, - _code: { - type: require('./element.input'), - description: - 'Identity (code or path) or the element/item that the map refers to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/concept-map-equivalence - equivalence: { - type: new GraphQLNonNull(CodeScalar), - description: - "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", - }, - _equivalence: { - type: require('./element.input'), - description: - "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", - }, - comments: { - type: GraphQLString, - description: - 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', - }, - _comments: { - type: require('./element.input'), - description: - 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', - }, - dependsOn: { - type: new GraphQLList( - require('./conceptmapelementtargetdependson.input'), - ), - description: - 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', - }, - }), + name: 'ConceptMapelementtarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _codeSystem: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', + }, + codeSystem: { + type: UriScalar, + description: + 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', + }, + _code: { + type: require('./element.input.js'), + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + code: { + type: CodeScalar, + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + _equivalence: { + type: require('./element.input.js'), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/concept-map-equivalence + equivalence: { + type: new GraphQLNonNull(CodeScalar), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + _comments: { + type: require('./element.input.js'), + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + comments: { + type: GraphQLString, + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + dependsOn: { + type: new GraphQLList( + require('./conceptmapelementtargetdependson.input.js'), + ), + description: + 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conceptmapelementtargetdependson.input.js b/src/resources/1_0_2/inputs/conceptmapelementtargetdependson.input.js index 9f4ee6a9..eeff44c4 100644 --- a/src/resources/1_0_2/inputs/conceptmapelementtargetdependson.input.js +++ b/src/resources/1_0_2/inputs/conceptmapelementtargetdependson.input.js @@ -1,52 +1,69 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ConceptMap.element.target.dependsOn Input Schema + * @summary ConceptMapelementtargetdependsOn Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapElementTargetDependsOn_Input', - description: - 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', - fields: () => - extendSchema(require('./backboneelement.input'), { - element: { - type: new GraphQLNonNull(UriScalar), - description: - 'A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.', - }, - _element: { - type: require('./element.input'), - description: - 'A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.', - }, - codeSystem: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', - }, - _codeSystem: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', - }, - code: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', - }, - _code: { - type: require('./element.input'), - description: - 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', - }, - }), + name: 'ConceptMapelementtargetdependsOn_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _element: { + type: require('./element.input.js'), + description: + 'A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.', + }, + element: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.', + }, + _codeSystem: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + codeSystem: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + _code: { + type: require('./element.input.js'), + description: + 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', + }, + code: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/condition.input.js b/src/resources/1_0_2/inputs/condition.input.js index 03ca74a8..23589f43 100644 --- a/src/resources/1_0_2/inputs/condition.input.js +++ b/src/resources/1_0_2/inputs/condition.input.js @@ -1,24 +1,16 @@ -const DateScalar = require('../scalars/date.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConditionResourceInputType = new GraphQLEnumType({ - name: 'ConditionResourceInputType', - values: { - Condition: { value: 'Condition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,180 +18,237 @@ let ConditionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Condition_Input', - description: 'Base StructureDefinition for Condition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ConditionResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Indicates the patient who the condition record is associated with.', - }, - encounter: { - type: require('./reference.input'), - description: 'Encounter during which the condition was first asserted.', - }, - asserter: { - type: require('./reference.input'), - description: 'Individual who is making the condition statement.', - }, - dateRecorded: { - type: DateScalar, - description: 'A date, when the Condition statement was documented.', - }, - _dateRecorded: { - type: require('./element.input'), - description: 'A date, when the Condition statement was documented.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Identification of the condition, problem or diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-category - category: { - type: require('./codeableconcept.input'), - description: 'A category assigned to the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-clinical - clinicalStatus: { - type: CodeScalar, - description: 'The clinical status of the condition.', - }, - _clinicalStatus: { - type: require('./element.input'), - description: 'The clinical status of the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-ver-status - verificationStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The verification status to support the clinical status of the condition.', - }, - _verificationStatus: { - type: require('./element.input'), - description: - 'The verification status to support the clinical status of the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-severity - severity: { - type: require('./codeableconcept.input'), - description: - 'A subjective assessment of the severity of the condition as evaluated by the clinician.', - }, - onsetDateTime: { - type: DateTimeScalar, - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - _onsetDateTime: { - type: require('./element.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetQuantity: { - type: require('./quantity.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetPeriod: { - type: require('./period.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetRange: { - type: require('./range.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetString: { - type: GraphQLString, - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - _onsetString: { - type: require('./element.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - abatementDateTime: { - type: DateTimeScalar, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementDateTime: { - type: require('./element.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementQuantity: { - type: require('./quantity.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementBoolean: { - type: GraphQLBoolean, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementBoolean: { - type: require('./element.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementPeriod: { - type: require('./period.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementRange: { - type: require('./range.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementString: { - type: GraphQLString, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementString: { - type: require('./element.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - stage: { - type: require('./conditionstage.input'), - description: - 'Clinical stage or grade of a condition. May include formal severity assessments.', - }, - evidence: { - type: new GraphQLList(require('./conditionevidence.input')), - description: - 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The anatomical location where this condition manifests itself.', - }, - notes: { - type: GraphQLString, - description: - 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', - }, - _notes: { - type: require('./element.input'), - description: - 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', - }, - }), + description: 'Base StructureDefinition for Condition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Condition_Enum_input', + values: { Condition: { value: 'Condition' } }, + }), + ), + 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: + 'This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Indicates the patient who the condition record is associated with.', + }, + encounter: { + type: GraphQLString, + description: 'Encounter during which the condition was first asserted.', + }, + asserter: { + type: GraphQLString, + description: 'Individual who is making the condition statement.', + }, + _dateRecorded: { + type: require('./element.input.js'), + description: 'A date, when the Condition statement was documented.', + }, + dateRecorded: { + type: DateScalar, + description: 'A date, when the Condition statement was documented.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Identification of the condition, problem or diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-category + category: { + type: require('./codeableconcept.input.js'), + description: 'A category assigned to the condition.', + }, + _clinicalStatus: { + type: require('./element.input.js'), + description: 'The clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-clinical + clinicalStatus: { + type: CodeScalar, + description: 'The clinical status of the condition.', + }, + _verificationStatus: { + type: require('./element.input.js'), + description: + 'The verification status to support the clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-ver-status + verificationStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The verification status to support the clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-severity + severity: { + type: require('./codeableconcept.input.js'), + description: + 'A subjective assessment of the severity of the condition as evaluated by the clinician.', + }, + _onsetDateTime: { + type: require('./element.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetQuantity: { + type: require('./quantity.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetPeriod: { + type: require('./period.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetRange: { + type: require('./range.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _onsetString: { + type: require('./element.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _abatementDateTime: { + type: require('./element.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementDateTime: { + type: DateTimeScalar, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementQuantity: { + type: require('./quantity.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementBoolean: { + type: require('./element.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementBoolean: { + type: GraphQLBoolean, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementPeriod: { + type: require('./period.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementRange: { + type: require('./range.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementString: { + type: require('./element.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementString: { + type: GraphQLString, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + stage: { + type: require('./conditionstage.input.js'), + description: + 'Clinical stage or grade of a condition. May include formal severity assessments.', + }, + evidence: { + type: new GraphQLList(require('./conditionevidence.input.js')), + description: + 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The anatomical location where this condition manifests itself.', + }, + _notes: { + type: require('./element.input.js'), + description: + 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', + }, + notes: { + type: GraphQLString, + description: + 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conditionevidence.input.js b/src/resources/1_0_2/inputs/conditionevidence.input.js index a7ddbaf1..02843d97 100644 --- a/src/resources/1_0_2/inputs/conditionevidence.input.js +++ b/src/resources/1_0_2/inputs/conditionevidence.input.js @@ -1,28 +1,48 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Condition.evidence Input Schema + * @summary Conditionevidence Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConditionEvidence_Input', - description: - 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/manifestation-or-symptom - code: { - type: require('./codeableconcept.input'), - description: - 'A manifestation or symptom that led to the recording of this condition.', - }, - detail: { - type: new GraphQLList(require('./reference.input')), - description: - 'Links to other relevant information, including pathology reports.', - }, - }), + name: 'Conditionevidence_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/manifestation-or-symptom + code: { + type: require('./codeableconcept.input.js'), + description: + 'A manifestation or symptom that led to the recording of this condition.', + }, + detail: { + type: new GraphQLList(GraphQLString), + description: + 'Links to other relevant information, including pathology reports.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conditionstage.input.js b/src/resources/1_0_2/inputs/conditionstage.input.js index ade8ceed..58d1374c 100644 --- a/src/resources/1_0_2/inputs/conditionstage.input.js +++ b/src/resources/1_0_2/inputs/conditionstage.input.js @@ -1,28 +1,48 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Condition.stage Input Schema + * @summary Conditionstage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConditionStage_Input', - description: - 'Clinical stage or grade of a condition. May include formal severity assessments.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-stage - summary: { - type: require('./codeableconcept.input'), - description: - "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", - }, - assessment: { - type: new GraphQLList(require('./reference.input')), - description: - 'Reference to a formal record of the evidence on which the staging assessment is based.', - }, - }), + name: 'Conditionstage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-stage + summary: { + type: require('./codeableconcept.input.js'), + description: + "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", + }, + assessment: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformance.input.js b/src/resources/1_0_2/inputs/conformance.input.js index 1ee7ac92..4affb39c 100644 --- a/src/resources/1_0_2/inputs/conformance.input.js +++ b/src/resources/1_0_2/inputs/conformance.input.js @@ -1,25 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConformanceResourceInputType = new GraphQLEnumType({ - name: 'ConformanceResourceInputType', - values: { - Conformance: { value: 'Conformance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,187 +17,244 @@ let ConformanceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Conformance_Input', - description: 'Base StructureDefinition for Conformance Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ConformanceResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - name: { - type: GraphQLString, - description: - 'A free text natural language name identifying the conformance statement.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name identifying the conformance statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: CodeScalar, - description: 'The status of this conformance statement.', - }, - _status: { - type: require('./element.input'), - description: 'The status of this conformance statement.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the conformance.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the conformance.', - }, - contact: { - type: new GraphQLList(require('./conformancecontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.', - }, - _description: { - type: require('./element.input'), - description: - 'A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.', - }, - requirements: { - type: GraphQLString, - description: - "Explains why this conformance statement is needed and why it's been constrained as it has.", - }, - _requirements: { - type: require('./element.input'), - description: - "Explains why this conformance statement is needed and why it's been constrained as it has.", - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-statement-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', - }, - _kind: { - type: require('./element.input'), - description: - 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', - }, - software: { - type: require('./conformancesoftware.input'), - description: - 'Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.', - }, - implementation: { - type: require('./conformanceimplementation.input'), - description: - 'Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.', - }, - fhirVersion: { - type: new GraphQLNonNull(IdScalar), - description: - 'The version of the FHIR specification on which this conformance statement is based.', - }, - _fhirVersion: { - type: require('./element.input'), - description: - 'The version of the FHIR specification on which this conformance statement is based.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/unknown-content-code - acceptUnknown: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', - }, - _acceptUnknown: { - type: require('./element.input'), - description: - 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', - }, - format: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: - 'A list of the formats supported by this implementation using their content types.', - }, - _format: { - type: require('./element.input'), - description: - 'A list of the formats supported by this implementation using their content types.', - }, - profile: { - type: new GraphQLList(require('./reference.input')), - description: - "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", - }, - rest: { - type: new GraphQLList(require('./conformancerest.input')), - description: - 'A definition of the restful capabilities of the solution, if any.', - }, - messaging: { - type: new GraphQLList(require('./conformancemessaging.input')), - description: - 'A description of the messaging capabilities of the solution.', - }, - document: { - type: new GraphQLList(require('./conformancedocument.input')), - description: 'A document definition.', - }, - }), + description: 'Base StructureDefinition for Conformance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Conformance_Enum_input', + values: { Conformance: { value: 'Conformance' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name identifying the conformance statement.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name identifying the conformance statement.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this conformance statement.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: CodeScalar, + description: 'The status of this conformance statement.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the conformance.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the conformance.', + }, + contact: { + type: new GraphQLList(require('./conformancecontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.', + }, + _requirements: { + type: require('./element.input.js'), + description: + "Explains why this conformance statement is needed and why it's been constrained as it has.", + }, + requirements: { + type: GraphQLString, + description: + "Explains why this conformance statement is needed and why it's been constrained as it has.", + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-statement-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + software: { + type: require('./conformancesoftware.input.js'), + description: + 'Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.', + }, + implementation: { + type: require('./conformanceimplementation.input.js'), + description: + 'Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version of the FHIR specification on which this conformance statement is based.', + }, + fhirVersion: { + type: new GraphQLNonNull(IdScalar), + description: + 'The version of the FHIR specification on which this conformance statement is based.', + }, + _acceptUnknown: { + type: require('./element.input.js'), + description: + 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/unknown-content-code + acceptUnknown: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', + }, + _format: { + type: require('./element.input.js'), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + format: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + profile: { + type: new GraphQLList(GraphQLString), + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", + }, + rest: { + type: new GraphQLList(require('./conformancerest.input.js')), + description: + 'A definition of the restful capabilities of the solution, if any.', + }, + messaging: { + type: new GraphQLList(require('./conformancemessaging.input.js')), + description: + 'A description of the messaging capabilities of the solution.', + }, + document: { + type: new GraphQLList(require('./conformancedocument.input.js')), + description: 'A document definition.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancecontact.input.js b/src/resources/1_0_2/inputs/conformancecontact.input.js index 06f296ac..4e1bfab9 100644 --- a/src/resources/1_0_2/inputs/conformancecontact.input.js +++ b/src/resources/1_0_2/inputs/conformancecontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Conformance.contact Input Schema + * @summary Conformancecontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the conformance.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the conformance.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'Conformancecontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the conformance.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the conformance.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancedocument.input.js b/src/resources/1_0_2/inputs/conformancedocument.input.js index 72f0cab7..31f49390 100644 --- a/src/resources/1_0_2/inputs/conformancedocument.input.js +++ b/src/resources/1_0_2/inputs/conformancedocument.input.js @@ -1,46 +1,64 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.document Input Schema + * @summary Conformancedocument Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceDocument_Input', - description: 'A document definition.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Mode of this document declaration - whether application is producer or consumer.', - }, - _mode: { - type: require('./element.input'), - description: - 'Mode of this document declaration - whether application is producer or consumer.', - }, - documentation: { - type: GraphQLString, - description: - 'A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.', - }, - _documentation: { - type: require('./element.input'), - description: - 'A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.', - }, - profile: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'A constraint on a resource used in the document.', - }, - }), + name: 'Conformancedocument_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'Mode of this document declaration - whether application is producer or consumer.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Mode of this document declaration - whether application is producer or consumer.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.', + }, + profile: { + type: new GraphQLNonNull(GraphQLString), + description: 'A constraint on a resource used in the document.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformanceimplementation.input.js b/src/resources/1_0_2/inputs/conformanceimplementation.input.js index 583ac334..aa7e4dbb 100644 --- a/src/resources/1_0_2/inputs/conformanceimplementation.input.js +++ b/src/resources/1_0_2/inputs/conformanceimplementation.input.js @@ -1,42 +1,59 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Conformance.implementation Input Schema + * @summary Conformanceimplementation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceImplementation_Input', - description: - 'Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.', - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Information about the specific installation that this conformance statement relates to.', - }, - _description: { - type: require('./element.input'), - description: - 'Information about the specific installation that this conformance statement relates to.', - }, - url: { - type: UriScalar, - description: - 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', - }, - }), + name: 'Conformanceimplementation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Information about the specific installation that this conformance statement relates to.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Information about the specific installation that this conformance statement relates to.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + url: { + type: UriScalar, + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancemessaging.input.js b/src/resources/1_0_2/inputs/conformancemessaging.input.js index 965a34b6..6a0f21dc 100644 --- a/src/resources/1_0_2/inputs/conformancemessaging.input.js +++ b/src/resources/1_0_2/inputs/conformancemessaging.input.js @@ -1,54 +1,71 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, GraphQLList, GraphQLString, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary Conformance.messaging Input Schema + * @summary Conformancemessaging Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceMessaging_Input', - description: 'A description of the messaging capabilities of the solution.', - fields: () => - extendSchema(require('./backboneelement.input'), { - endpoint: { - type: new GraphQLList(require('./conformancemessagingendpoint.input')), - description: - 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', - }, - reliableCache: { - type: UnsignedIntScalar, - description: - "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", - }, - _reliableCache: { - type: require('./element.input'), - description: - "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", - }, - documentation: { - type: GraphQLString, - description: - "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", - }, - _documentation: { - type: require('./element.input'), - description: - "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", - }, - event: { - type: new GraphQLList( - new GraphQLNonNull(require('./conformancemessagingevent.input')), - ), - description: - "A description of the solution's support for an event at this end-point.", - }, - }), + name: 'Conformancemessaging_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + endpoint: { + type: new GraphQLList(require('./conformancemessagingendpoint.input.js')), + description: + 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', + }, + _reliableCache: { + type: require('./element.input.js'), + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + reliableCache: { + type: UnsignedIntScalar, + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + _documentation: { + type: require('./element.input.js'), + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", + }, + documentation: { + type: GraphQLString, + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", + }, + event: { + type: new GraphQLList( + new GraphQLNonNull(require('./conformancemessagingevent.input.js')), + ), + description: + "A description of the solution's support for an event at this end-point.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancemessagingendpoint.input.js b/src/resources/1_0_2/inputs/conformancemessagingendpoint.input.js index aeac894d..4bb7aa7c 100644 --- a/src/resources/1_0_2/inputs/conformancemessagingendpoint.input.js +++ b/src/resources/1_0_2/inputs/conformancemessagingendpoint.input.js @@ -1,34 +1,54 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Conformance.messaging.endpoint Input Schema + * @summary Conformancemessagingendpoint Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceMessagingEndpoint_Input', - description: - 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-transport - protocol: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', - }, - address: { - type: new GraphQLNonNull(UriScalar), - description: - 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', - }, - _address: { - type: require('./element.input'), - description: - 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', - }, - }), + name: 'Conformancemessagingendpoint_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-transport + protocol: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', + }, + _address: { + type: require('./element.input.js'), + description: + 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + address: { + type: new GraphQLNonNull(UriScalar), + description: + 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancemessagingevent.input.js b/src/resources/1_0_2/inputs/conformancemessagingevent.input.js index 8cb6df00..01a5aa1f 100644 --- a/src/resources/1_0_2/inputs/conformancemessagingevent.input.js +++ b/src/resources/1_0_2/inputs/conformancemessagingevent.input.js @@ -1,76 +1,93 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.messaging.event Input Schema + * @summary Conformancemessagingevent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceMessagingEvent_Input', - description: - "A description of the solution's support for an event at this end-point.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'A coded identifier of a supported messaging event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category - category: { - type: CodeScalar, - description: 'The impact of the content of the message.', - }, - _category: { - type: require('./element.input'), - description: 'The impact of the content of the message.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-conformance-event-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The mode of this event declaration - whether application is sender or receiver.', - }, - _mode: { - type: require('./element.input'), - description: - 'The mode of this event declaration - whether application is sender or receiver.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - focus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A resource associated with the event. This is the resource that defines the event.', - }, - _focus: { - type: require('./element.input'), - description: - 'A resource associated with the event. This is the resource that defines the event.', - }, - request: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Information about the request for this event.', - }, - response: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Information about the response for this event.', - }, - documentation: { - type: GraphQLString, - description: - 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', - }, - _documentation: { - type: require('./element.input'), - description: - 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', - }, - }), + name: 'Conformancemessagingevent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'A coded identifier of a supported messaging event.', + }, + _category: { + type: require('./element.input.js'), + description: 'The impact of the content of the message.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category + category: { + type: CodeScalar, + description: 'The impact of the content of the message.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-conformance-event-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + _focus: { + type: require('./element.input.js'), + description: + 'A resource associated with the event. This is the resource that defines the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + focus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A resource associated with the event. This is the resource that defines the event.', + }, + request: { + type: new GraphQLNonNull(GraphQLString), + description: 'Information about the request for this event.', + }, + response: { + type: new GraphQLNonNull(GraphQLString), + description: 'Information about the response for this event.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancerest.input.js b/src/resources/1_0_2/inputs/conformancerest.input.js index 1fb3f995..b6a6b7c1 100644 --- a/src/resources/1_0_2/inputs/conformancerest.input.js +++ b/src/resources/1_0_2/inputs/conformancerest.input.js @@ -1,86 +1,102 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Conformance.rest Input Schema + * @summary Conformancerest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceRest_Input', - description: - 'A definition of the restful capabilities of the solution, if any.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/restful-conformance-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.', - }, - _mode: { - type: require('./element.input'), - description: - 'Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.', - }, - documentation: { - type: GraphQLString, - description: - "Information about the system's restful capabilities that apply across all applications, such as security.", - }, - _documentation: { - type: require('./element.input'), - description: - "Information about the system's restful capabilities that apply across all applications, such as security.", - }, - security: { - type: require('./conformancerestsecurity.input'), - description: - 'Information about security implementation from an interface perspective - what a client needs to know.', - }, - resource: { - type: new GraphQLList( - new GraphQLNonNull(require('./conformancerestresource.input')), - ), - description: - 'A specification of the restful capabilities of the solution for a specific resource type.', - }, - interaction: { - type: new GraphQLList(require('./conformancerestinteraction.input')), - description: - 'A specification of restful operations supported by the system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/transaction-mode - transactionMode: { - type: CodeScalar, - description: 'A code that indicates how transactions are supported.', - }, - _transactionMode: { - type: require('./element.input'), - description: 'A code that indicates how transactions are supported.', - }, - operation: { - type: new GraphQLList(require('./conformancerestoperation.input')), - description: - 'Definition of an operation or a named query and with its parameters and their meaning and type.', - }, - compartment: { - type: new GraphQLList(UriScalar), - description: - 'An absolute URI which is a reference to the definition of a compartment hosted by the system.', - }, - _compartment: { - type: require('./element.input'), - description: - 'An absolute URI which is a reference to the definition of a compartment hosted by the system.', - }, - }), + name: 'Conformancerest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/restful-conformance-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.', + }, + _documentation: { + type: require('./element.input.js'), + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + documentation: { + type: GraphQLString, + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + security: { + type: require('./conformancerestsecurity.input.js'), + description: + 'Information about security implementation from an interface perspective - what a client needs to know.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull(require('./conformancerestresource.input.js')), + ), + description: + 'A specification of the restful capabilities of the solution for a specific resource type.', + }, + interaction: { + type: new GraphQLList(require('./conformancerestinteraction.input.js')), + description: + 'A specification of restful operations supported by the system.', + }, + _transactionMode: { + type: require('./element.input.js'), + description: 'A code that indicates how transactions are supported.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/transaction-mode + transactionMode: { + type: CodeScalar, + description: 'A code that indicates how transactions are supported.', + }, + operation: { + type: new GraphQLList(require('./conformancerestoperation.input.js')), + description: + 'Definition of an operation or a named query and with its parameters and their meaning and type.', + }, + _compartment: { + type: require('./element.input.js'), + description: + 'An absolute URI which is a reference to the definition of a compartment hosted by the system.', + }, + compartment: { + type: new GraphQLList(UriScalar), + description: + 'An absolute URI which is a reference to the definition of a compartment hosted by the system.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancerestinteraction.input.js b/src/resources/1_0_2/inputs/conformancerestinteraction.input.js index 5c229645..707429ea 100644 --- a/src/resources/1_0_2/inputs/conformancerestinteraction.input.js +++ b/src/resources/1_0_2/inputs/conformancerestinteraction.input.js @@ -1,42 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.rest.interaction Input Schema + * @summary Conformancerestinteraction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceRestInteraction_Input', - description: 'A specification of restful operations supported by the system.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/system-restful-interaction - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A coded identifier of the operation, supported by the system.', - }, - _code: { - type: require('./element.input'), - description: - 'A coded identifier of the operation, supported by the system.', - }, - documentation: { - type: GraphQLString, - description: - 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', - }, - _documentation: { - type: require('./element.input'), - description: - 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', - }, - }), + name: 'Conformancerestinteraction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A coded identifier of the operation, supported by the system.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/system-restful-interaction + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A coded identifier of the operation, supported by the system.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancerestoperation.input.js b/src/resources/1_0_2/inputs/conformancerestoperation.input.js index 1391715b..7ef00ba6 100644 --- a/src/resources/1_0_2/inputs/conformancerestoperation.input.js +++ b/src/resources/1_0_2/inputs/conformancerestoperation.input.js @@ -1,35 +1,52 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Conformance.rest.operation Input Schema + * @summary Conformancerestoperation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceRestOperation_Input', - description: - 'Definition of an operation or a named query and with its parameters and their meaning and type.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of a query, which is used in the _query parameter when the query is called.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of a query, which is used in the _query parameter when the query is called.', - }, - definition: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Where the formal definition can be found.', - }, - }), + name: 'Conformancerestoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of a query, which is used in the _query parameter when the query is called.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of a query, which is used in the _query parameter when the query is called.', + }, + definition: { + type: new GraphQLNonNull(GraphQLString), + description: 'Where the formal definition can be found.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancerestresource.input.js b/src/resources/1_0_2/inputs/conformancerestresource.input.js index c54a48ea..0f09e5f1 100644 --- a/src/resources/1_0_2/inputs/conformancerestresource.input.js +++ b/src/resources/1_0_2/inputs/conformancerestresource.input.js @@ -1,134 +1,149 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, - GraphQLBoolean, + GraphQLNonNull, GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.rest.resource Input Schema + * @summary Conformancerestresource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceRestResource_Input', - description: - 'A specification of the restful capabilities of the solution for a specific resource type.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'A type of resource exposed via the restful interface.', - }, - _type: { - type: require('./element.input'), - description: 'A type of resource exposed via the restful interface.', - }, - profile: { - type: require('./reference.input'), - description: - "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", - }, - interaction: { - type: new GraphQLList( - new GraphQLNonNull( - require('./conformancerestresourceinteraction.input'), - ), - ), - description: - 'Identifies a restful operation supported by the solution.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/versioning-policy - versioning: { - type: CodeScalar, - description: - "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", - }, - _versioning: { - type: require('./element.input'), - description: - "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", - }, - readHistory: { - type: GraphQLBoolean, - description: - 'A flag for whether the server is able to return past versions as part of the vRead operation.', - }, - _readHistory: { - type: require('./element.input'), - description: - 'A flag for whether the server is able to return past versions as part of the vRead operation.', - }, - updateCreate: { - type: GraphQLBoolean, - description: - 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', - }, - _updateCreate: { - type: require('./element.input'), - description: - 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', - }, - conditionalCreate: { - type: GraphQLBoolean, - description: - 'A flag that indicates that the server supports conditional create.', - }, - _conditionalCreate: { - type: require('./element.input'), - description: - 'A flag that indicates that the server supports conditional create.', - }, - conditionalUpdate: { - type: GraphQLBoolean, - description: - 'A flag that indicates that the server supports conditional update.', - }, - _conditionalUpdate: { - type: require('./element.input'), - description: - 'A flag that indicates that the server supports conditional update.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conditional-delete-status - conditionalDelete: { - type: CodeScalar, - description: - 'A code that indicates how the server supports conditional delete.', - }, - _conditionalDelete: { - type: require('./element.input'), - description: - 'A code that indicates how the server supports conditional delete.', - }, - searchInclude: { - type: new GraphQLList(GraphQLString), - description: 'A list of _include values supported by the server.', - }, - _searchInclude: { - type: require('./element.input'), - description: 'A list of _include values supported by the server.', - }, - searchRevInclude: { - type: new GraphQLList(GraphQLString), - description: - 'A list of _revinclude (reverse include) values supported by the server.', - }, - _searchRevInclude: { - type: require('./element.input'), - description: - 'A list of _revinclude (reverse include) values supported by the server.', - }, - searchParam: { - type: new GraphQLList( - require('./conformancerestresourcesearchparam.input'), + name: 'Conformancerestresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'A type of resource exposed via the restful interface.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'A type of resource exposed via the restful interface.', + }, + profile: { + type: GraphQLString, + description: + "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", + }, + interaction: { + type: new GraphQLList( + new GraphQLNonNull( + require('./conformancerestresourceinteraction.input.js'), ), - description: - 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', - }, - }), + ), + description: 'Identifies a restful operation supported by the solution.', + }, + _versioning: { + type: require('./element.input.js'), + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/versioning-policy + versioning: { + type: CodeScalar, + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + _readHistory: { + type: require('./element.input.js'), + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + readHistory: { + type: GraphQLBoolean, + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + _updateCreate: { + type: require('./element.input.js'), + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + updateCreate: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + _conditionalCreate: { + type: require('./element.input.js'), + description: + 'A flag that indicates that the server supports conditional create.', + }, + conditionalCreate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional create.', + }, + _conditionalUpdate: { + type: require('./element.input.js'), + description: + 'A flag that indicates that the server supports conditional update.', + }, + conditionalUpdate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional update.', + }, + _conditionalDelete: { + type: require('./element.input.js'), + description: + 'A code that indicates how the server supports conditional delete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conditional-delete-status + conditionalDelete: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional delete.', + }, + _searchInclude: { + type: require('./element.input.js'), + description: 'A list of _include values supported by the server.', + }, + searchInclude: { + type: new GraphQLList(GraphQLString), + description: 'A list of _include values supported by the server.', + }, + _searchRevInclude: { + type: require('./element.input.js'), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchRevInclude: { + type: new GraphQLList(GraphQLString), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchParam: { + type: new GraphQLList( + require('./conformancerestresourcesearchparam.input.js'), + ), + description: + 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancerestresourceinteraction.input.js b/src/resources/1_0_2/inputs/conformancerestresourceinteraction.input.js index 93f170f5..bcc6f273 100644 --- a/src/resources/1_0_2/inputs/conformancerestresourceinteraction.input.js +++ b/src/resources/1_0_2/inputs/conformancerestresourceinteraction.input.js @@ -1,42 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.rest.resource.interaction Input Schema + * @summary Conformancerestresourceinteraction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceRestResourceInteraction_Input', - description: 'Identifies a restful operation supported by the solution.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/type-restful-interaction - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Coded identifier of the operation, supported by the system resource.', - }, - _code: { - type: require('./element.input'), - description: - 'Coded identifier of the operation, supported by the system resource.', - }, - documentation: { - type: GraphQLString, - description: - "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", - }, - _documentation: { - type: require('./element.input'), - description: - "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", - }, - }), + name: 'Conformancerestresourceinteraction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/type-restful-interaction + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + _documentation: { + type: require('./element.input.js'), + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + documentation: { + type: GraphQLString, + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancerestresourcesearchparam.input.js b/src/resources/1_0_2/inputs/conformancerestresourcesearchparam.input.js index 13469dc5..708c87c0 100644 --- a/src/resources/1_0_2/inputs/conformancerestresourcesearchparam.input.js +++ b/src/resources/1_0_2/inputs/conformancerestresourcesearchparam.input.js @@ -1,91 +1,107 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.rest.resource.searchParam Input Schema + * @summary ConformancerestresourcesearchParam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceRestResourceSearchParam_Input', - description: - 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name of the search parameter used in the interface.', - }, - _name: { - type: require('./element.input'), - description: 'The name of the search parameter used in the interface.', - }, - definition: { - type: UriScalar, - description: - 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).', - }, - _definition: { - type: require('./element.input'), - description: - 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - _type: { - type: require('./element.input'), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - documentation: { - type: GraphQLString, - description: - 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', - }, - _documentation: { - type: require('./element.input'), - description: - 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - target: { - type: new GraphQLList(CodeScalar), - description: 'Types of resource (if a resource is referenced).', - }, - _target: { - type: require('./element.input'), - description: 'Types of resource (if a resource is referenced).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-modifier-code - modifier: { - type: new GraphQLList(CodeScalar), - description: 'A modifier supported for the search parameter.', - }, - _modifier: { - type: require('./element.input'), - description: 'A modifier supported for the search parameter.', - }, - chain: { - type: new GraphQLList(GraphQLString), - description: - 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.', - }, - _chain: { - type: require('./element.input'), - description: - 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.', - }, - }), + name: 'ConformancerestresourcesearchParam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of the search parameter used in the interface.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the search parameter used in the interface.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).', + }, + definition: { + type: UriScalar, + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + documentation: { + type: GraphQLString, + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + _target: { + type: require('./element.input.js'), + description: 'Types of resource (if a resource is referenced).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + target: { + type: new GraphQLList(CodeScalar), + description: 'Types of resource (if a resource is referenced).', + }, + _modifier: { + type: require('./element.input.js'), + description: 'A modifier supported for the search parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-modifier-code + modifier: { + type: new GraphQLList(CodeScalar), + description: 'A modifier supported for the search parameter.', + }, + _chain: { + type: require('./element.input.js'), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.', + }, + chain: { + type: new GraphQLList(GraphQLString), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancerestsecurity.input.js b/src/resources/1_0_2/inputs/conformancerestsecurity.input.js index 22da6991..d8c5258f 100644 --- a/src/resources/1_0_2/inputs/conformancerestsecurity.input.js +++ b/src/resources/1_0_2/inputs/conformancerestsecurity.input.js @@ -1,52 +1,68 @@ const { - GraphQLInputObjectType, - GraphQLBoolean, GraphQLList, + GraphQLBoolean, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Conformance.rest.security Input Schema + * @summary Conformancerestsecurity Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceRestSecurity_Input', - description: - 'Information about security implementation from an interface perspective - what a client needs to know.', - fields: () => - extendSchema(require('./backboneelement.input'), { - cors: { - type: GraphQLBoolean, - description: - 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', - }, - _cors: { - type: require('./element.input'), - description: - 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/restful-security-service - service: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Types of security services are supported/required by the system.', - }, - description: { - type: GraphQLString, - description: 'General description of how security works.', - }, - _description: { - type: require('./element.input'), - description: 'General description of how security works.', - }, - certificate: { - type: new GraphQLList( - require('./conformancerestsecuritycertificate.input'), - ), - description: 'Certificates associated with security profiles.', - }, - }), + name: 'Conformancerestsecurity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _cors: { + type: require('./element.input.js'), + description: + 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', + }, + cors: { + type: GraphQLBoolean, + description: + 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/restful-security-service + service: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Types of security services are supported/required by the system.', + }, + _description: { + type: require('./element.input.js'), + description: 'General description of how security works.', + }, + description: { + type: GraphQLString, + description: 'General description of how security works.', + }, + certificate: { + type: new GraphQLList( + require('./conformancerestsecuritycertificate.input.js'), + ), + description: 'Certificates associated with security profiles.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancerestsecuritycertificate.input.js b/src/resources/1_0_2/inputs/conformancerestsecuritycertificate.input.js index 6c71a10e..2fcac93d 100644 --- a/src/resources/1_0_2/inputs/conformancerestsecuritycertificate.input.js +++ b/src/resources/1_0_2/inputs/conformancerestsecuritycertificate.input.js @@ -1,34 +1,51 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary Conformance.rest.security.certificate Input Schema + * @summary Conformancerestsecuritycertificate Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceRestSecurityCertificate_Input', - description: 'Certificates associated with security profiles.', - fields: () => - extendSchema(require('./backboneelement.input'), { - type: { - type: CodeScalar, - description: 'Mime type for certificate.', - }, - _type: { - type: require('./element.input'), - description: 'Mime type for certificate.', - }, - blob: { - type: Base64BinaryScalar, - description: 'Actual certificate.', - }, - _blob: { - type: require('./element.input'), - description: 'Actual certificate.', - }, - }), + name: 'Conformancerestsecuritycertificate_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'Mime type for certificate.', + }, + type: { + type: CodeScalar, + description: 'Mime type for certificate.', + }, + _blob: { + type: require('./element.input.js'), + description: 'Actual certificate.', + }, + blob: { + type: Base64BinaryScalar, + description: 'Actual certificate.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/conformancesoftware.input.js b/src/resources/1_0_2/inputs/conformancesoftware.input.js index f7150da7..6dc12158 100644 --- a/src/resources/1_0_2/inputs/conformancesoftware.input.js +++ b/src/resources/1_0_2/inputs/conformancesoftware.input.js @@ -1,48 +1,65 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Conformance.software Input Schema + * @summary Conformancesoftware Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConformanceSoftware_Input', - description: - 'Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Name software is known by.', - }, - _name: { - type: require('./element.input'), - description: 'Name software is known by.', - }, - version: { - type: GraphQLString, - description: - 'The version identifier for the software covered by this statement.', - }, - _version: { - type: require('./element.input'), - description: - 'The version identifier for the software covered by this statement.', - }, - releaseDate: { - type: DateTimeScalar, - description: 'Date this version of the software released.', - }, - _releaseDate: { - type: require('./element.input'), - description: 'Date this version of the software released.', - }, - }), + name: 'Conformancesoftware_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Name software is known by.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name software is known by.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version identifier for the software covered by this statement.', + }, + version: { + type: GraphQLString, + description: + 'The version identifier for the software covered by this statement.', + }, + _releaseDate: { + type: require('./element.input.js'), + description: 'Date this version of the software released.', + }, + releaseDate: { + type: DateTimeScalar, + description: 'Date this version of the software released.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contactpoint.input.js b/src/resources/1_0_2/inputs/contactpoint.input.js index 2daa7e01..0cf171ce 100644 --- a/src/resources/1_0_2/inputs/contactpoint.input.js +++ b/src/resources/1_0_2/inputs/contactpoint.input.js @@ -1,9 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -11,52 +13,66 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'ContactPoint_Input', - description: 'Base StructureDefinition for ContactPoint Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contact-point-system - system: { - type: CodeScalar, - description: - 'Telecommunications form for contact point - what communications system is required to make use of the contact.', - }, - _system: { - type: require('./element.input'), - description: - 'Telecommunications form for contact point - what communications system is required to make use of the contact.', - }, - value: { - type: GraphQLString, - description: - 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', - }, - _value: { - type: require('./element.input'), - description: - 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contact-point-use - use: { - type: CodeScalar, - description: 'Identifies the purpose for the contact point.', - }, - _use: { - type: require('./element.input'), - description: 'Identifies the purpose for the contact point.', - }, - rank: { - type: PositiveIntScalar, - description: - 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', - }, - _rank: { - type: require('./element.input'), - description: - 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', - }, - period: { - type: require('./period.input'), - description: 'Time period when the contact point was/is in use.', - }, - }), + description: 'Base StructureDefinition for ContactPoint Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contact-point-system + system: { + type: CodeScalar, + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + value: { + type: GraphQLString, + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + _use: { + type: require('./element.input.js'), + description: 'Identifies the purpose for the contact point.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contact-point-use + use: { + type: CodeScalar, + description: 'Identifies the purpose for the contact point.', + }, + _rank: { + type: require('./element.input.js'), + description: + 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', + }, + rank: { + type: PositiveIntScalar, + description: + 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period when the contact point was/is in use.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contract.input.js b/src/resources/1_0_2/inputs/contract.input.js index d5db78ec..feb43b8a 100644 --- a/src/resources/1_0_2/inputs/contract.input.js +++ b/src/resources/1_0_2/inputs/contract.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 ContractResourceInputType = new GraphQLEnumType({ - name: 'ContractResourceInputType', - values: { - Contract: { value: 'Contract' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,108 +16,165 @@ let ContractResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Contract_Input', - description: 'Base StructureDefinition for Contract Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ContractResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Unique identifier for this Contract.', - }, - issued: { - type: DateTimeScalar, - description: 'When this Contract was issued.', - }, - _issued: { - type: require('./element.input'), - description: 'When this Contract was issued.', - }, - applies: { - type: require('./period.input'), - description: - 'Relevant time or time-period when this Contract is applicable.', - }, - subject: { - type: new GraphQLList(require('./reference.input')), - description: - 'Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.', - }, - authority: { - type: new GraphQLList(require('./reference.input')), - description: - 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', - }, - domain: { - type: new GraphQLList(require('./reference.input')), - description: - 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-type - type: { - type: require('./codeableconcept.input'), - description: - 'Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-subtype - subType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-action - action: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Action stipulated by this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - actionReason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reason for action stipulated by this Contract.', - }, - actor: { - type: new GraphQLList(require('./contractactor.input')), - description: 'List of Contract actors.', - }, - valuedItem: { - type: new GraphQLList(require('./contractvalueditem.input')), - description: 'Contract Valued Item List.', - }, - signer: { - type: new GraphQLList(require('./contractsigner.input')), - description: 'Party signing this Contract.', - }, - term: { - type: new GraphQLList(require('./contractterm.input')), - description: - 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', - }, - bindingAttachment: { - type: require('./attachment.input'), - description: - "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", - }, - bindingReference: { - type: require('./reference.input'), - description: - "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", - }, - friendly: { - type: new GraphQLList(require('./contractfriendly.input')), - description: - "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", - }, - legal: { - type: new GraphQLList(require('./contractlegal.input')), - description: - 'List of Legal expressions or representations of this Contract.', - }, - rule: { - type: new GraphQLList(require('./contractrule.input')), - description: - 'List of Computable Policy Rule Language Representations of this Contract.', - }, - }), + description: 'Base StructureDefinition for Contract Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Contract_Enum_input', + values: { Contract: { value: 'Contract' } }, + }), + ), + 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: require('./identifier.input.js'), + description: 'Unique identifier for this Contract.', + }, + _issued: { + type: require('./element.input.js'), + description: 'When this Contract was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract was issued.', + }, + applies: { + type: require('./period.input.js'), + description: + 'Relevant time or time-period when this Contract is applicable.', + }, + subject: { + type: new GraphQLList(GraphQLString), + description: + 'Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.', + }, + authority: { + type: new GraphQLList(GraphQLString), + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + }, + domain: { + type: new GraphQLList(GraphQLString), + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-subtype + subType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-action + action: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Action stipulated by this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + actionReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason for action stipulated by this Contract.', + }, + actor: { + type: new GraphQLList(require('./contractactor.input.js')), + description: 'List of Contract actors.', + }, + valuedItem: { + type: new GraphQLList(require('./contractvalueditem.input.js')), + description: 'Contract Valued Item List.', + }, + signer: { + type: new GraphQLList(require('./contractsigner.input.js')), + description: 'Party signing this Contract.', + }, + term: { + type: new GraphQLList(require('./contractterm.input.js')), + description: + 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', + }, + bindingAttachment: { + type: require('./attachment.input.js'), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + bindingReference: { + type: GraphQLString, + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + friendly: { + type: new GraphQLList(require('./contractfriendly.input.js')), + description: + "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", + }, + legal: { + type: new GraphQLList(require('./contractlegal.input.js')), + description: + 'List of Legal expressions or representations of this Contract.', + }, + rule: { + type: new GraphQLList(require('./contractrule.input.js')), + description: + 'List of Computable Policy Rule Language Representations of this Contract.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contractactor.input.js b/src/resources/1_0_2/inputs/contractactor.input.js index e268e641..c4029a37 100644 --- a/src/resources/1_0_2/inputs/contractactor.input.js +++ b/src/resources/1_0_2/inputs/contractactor.input.js @@ -1,29 +1,47 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.actor Input Schema + * @summary Contractactor Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractActor_Input', - description: 'List of Contract actors.', - fields: () => - extendSchema(require('./backboneelement.input'), { - entity: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Who or what actors are assigned roles in this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole - role: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Role type of actors assigned roles in this Contract.', - }, - }), + name: 'Contractactor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + entity: { + type: new GraphQLNonNull(GraphQLString), + description: 'Who or what actors are assigned roles in this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role type of actors assigned roles in this Contract.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contractfriendly.input.js b/src/resources/1_0_2/inputs/contractfriendly.input.js index 535a67d0..9194ba06 100644 --- a/src/resources/1_0_2/inputs/contractfriendly.input.js +++ b/src/resources/1_0_2/inputs/contractfriendly.input.js @@ -1,27 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.friendly Input Schema + * @summary Contractfriendly Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractFriendly_Input', - description: - "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", - fields: () => - extendSchema(require('./backboneelement.input'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', - }, - }), + name: 'Contractfriendly_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contractlegal.input.js b/src/resources/1_0_2/inputs/contractlegal.input.js index 6985a094..09a11ff5 100644 --- a/src/resources/1_0_2/inputs/contractlegal.input.js +++ b/src/resources/1_0_2/inputs/contractlegal.input.js @@ -1,24 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.legal Input Schema + * @summary Contractlegal Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractLegal_Input', - description: 'List of Legal expressions or representations of this Contract.', - fields: () => - extendSchema(require('./backboneelement.input'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: 'Contract legal text in human renderable form.', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Contract legal text in human renderable form.', - }, - }), + name: 'Contractlegal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: 'Contract legal text in human renderable form.', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Contract legal text in human renderable form.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contractrule.input.js b/src/resources/1_0_2/inputs/contractrule.input.js index c3c63094..a5b02796 100644 --- a/src/resources/1_0_2/inputs/contractrule.input.js +++ b/src/resources/1_0_2/inputs/contractrule.input.js @@ -1,27 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.rule Input Schema + * @summary Contractrule Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractRule_Input', - description: - 'List of Computable Policy Rule Language Representations of this Contract.', - fields: () => - extendSchema(require('./backboneelement.input'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', - }, - }), + name: 'Contractrule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contractsigner.input.js b/src/resources/1_0_2/inputs/contractsigner.input.js index 79ef22b6..86f0e99b 100644 --- a/src/resources/1_0_2/inputs/contractsigner.input.js +++ b/src/resources/1_0_2/inputs/contractsigner.input.js @@ -1,39 +1,57 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.signer Input Schema + * @summary Contractsigner Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractSigner_Input', - description: 'Party signing this Contract.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-signer-type - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'Role of this Contract signer, e.g. notary, grantee.', - }, - party: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Party which is a signator to this Contract.', - }, - signature: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Legally binding Contract DSIG signature contents in Base64.', - }, - _signature: { - type: require('./element.input'), - description: - 'Legally binding Contract DSIG signature contents in Base64.', - }, - }), + name: 'Contractsigner_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-signer-type + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'Role of this Contract signer, e.g. notary, grantee.', + }, + party: { + type: new GraphQLNonNull(GraphQLString), + description: 'Party which is a signator to this Contract.', + }, + _signature: { + type: require('./element.input.js'), + description: + 'Legally binding Contract DSIG signature contents in Base64.', + }, + signature: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Legally binding Contract DSIG signature contents in Base64.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contractterm.input.js b/src/resources/1_0_2/inputs/contractterm.input.js index c726cf37..63e43815 100644 --- a/src/resources/1_0_2/inputs/contractterm.input.js +++ b/src/resources/1_0_2/inputs/contractterm.input.js @@ -1,83 +1,98 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, GraphQLList, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.term Input Schema + * @summary Contractterm Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractTerm_Input', - description: - 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Unique identifier for this particular Contract Provision.', - }, - issued: { - type: DateTimeScalar, - description: 'When this Contract Provision was issued.', - }, - _issued: { - type: require('./element.input'), - description: 'When this Contract Provision was issued.', - }, - applies: { - type: require('./period.input'), - description: - 'Relevant time or time-period when this Contract Provision is applicable.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-term-type - type: { - type: require('./codeableconcept.input'), - description: - 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-term-subtype - subType: { - type: require('./codeableconcept.input'), - description: - 'Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.', - }, - subject: { - type: require('./reference.input'), - description: 'Who or what this Contract Provision is about.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-action - action: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Action stipulated by this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - actionReason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Reason or purpose for the action stipulated by this Contract Provision.', - }, - actor: { - type: new GraphQLList(require('./contracttermactor.input')), - description: 'List of actors participating in this Contract Provision.', - }, - text: { - type: GraphQLString, - description: 'Human readable form of this Contract Provision.', - }, - _text: { - type: require('./element.input'), - description: 'Human readable form of this Contract Provision.', - }, - valuedItem: { - type: new GraphQLList(require('./contracttermvalueditem.input')), - description: 'Contract Provision Valued Item List.', - }, - }), + name: 'Contractterm_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: 'Unique identifier for this particular Contract Provision.', + }, + _issued: { + type: require('./element.input.js'), + description: 'When this Contract Provision was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract Provision was issued.', + }, + applies: { + type: require('./period.input.js'), + description: + 'Relevant time or time-period when this Contract Provision is applicable.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-term-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-term-subtype + subType: { + type: require('./codeableconcept.input.js'), + description: + 'Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.', + }, + subject: { + type: GraphQLString, + description: 'Who or what this Contract Provision is about.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-action + action: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Action stipulated by this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + actionReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Reason or purpose for the action stipulated by this Contract Provision.', + }, + actor: { + type: new GraphQLList(require('./contracttermactor.input.js')), + description: 'List of actors participating in this Contract Provision.', + }, + _text: { + type: require('./element.input.js'), + description: 'Human readable form of this Contract Provision.', + }, + text: { + type: GraphQLString, + description: 'Human readable form of this Contract Provision.', + }, + valuedItem: { + type: new GraphQLList(require('./contracttermvalueditem.input.js')), + description: 'Contract Provision Valued Item List.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contracttermactor.input.js b/src/resources/1_0_2/inputs/contracttermactor.input.js index 16e0b6a5..4ab1eddb 100644 --- a/src/resources/1_0_2/inputs/contracttermactor.input.js +++ b/src/resources/1_0_2/inputs/contracttermactor.input.js @@ -1,30 +1,48 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.term.actor Input Schema + * @summary Contracttermactor Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractTermActor_Input', - description: 'List of actors participating in this Contract Provision.', - fields: () => - extendSchema(require('./backboneelement.input'), { - entity: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The actor assigned a role in this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole - role: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Role played by the actor assigned this role in this Contract Provision.', - }, - }), + name: 'Contracttermactor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + entity: { + type: new GraphQLNonNull(GraphQLString), + description: 'The actor assigned a role in this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Role played by the actor assigned this role in this Contract Provision.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contracttermvalueditem.input.js b/src/resources/1_0_2/inputs/contracttermvalueditem.input.js index 1c5023ff..ae1e4341 100644 --- a/src/resources/1_0_2/inputs/contracttermvalueditem.input.js +++ b/src/resources/1_0_2/inputs/contracttermvalueditem.input.js @@ -1,75 +1,97 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLFloat } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.term.valuedItem Input Schema + * @summary ContracttermvaluedItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractTermValuedItem_Input', - description: 'Contract Provision Valued Item List.', - fields: () => - extendSchema(require('./backboneelement.input'), { - entityCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Specific type of Contract Provision Valued Item that may be priced.', - }, - entityReference: { - type: require('./reference.input'), - description: - 'Specific type of Contract Provision Valued Item that may be priced.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Identifies a Contract Provision Valued Item instance.', - }, - effectiveTime: { - type: DateTimeScalar, - description: - 'Indicates the time during which this Contract Term ValuedItem information is effective.', - }, - _effectiveTime: { - type: require('./element.input'), - description: - 'Indicates the time during which this Contract Term ValuedItem information is effective.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.', - }, - unitPrice: { - type: require('./quantity.input'), - description: 'A Contract Provision Valued Item unit valuation measure.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.input'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.input'), - description: - 'Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - }), + name: 'ContracttermvaluedItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + entityCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specific type of Contract Provision Valued Item that may be priced.', + }, + entityReference: { + type: GraphQLString, + description: + 'Specific type of Contract Provision Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Identifies a Contract Provision Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.input.js'), + description: + 'Indicates the time during which this Contract Term ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract Term ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.', + }, + unitPrice: { + type: require('./quantity.input.js'), + description: 'A Contract Provision Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.input.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.input.js'), + description: + 'Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/contractvalueditem.input.js b/src/resources/1_0_2/inputs/contractvalueditem.input.js index 5050ec71..57266ffb 100644 --- a/src/resources/1_0_2/inputs/contractvalueditem.input.js +++ b/src/resources/1_0_2/inputs/contractvalueditem.input.js @@ -1,75 +1,95 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLFloat } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.valuedItem Input Schema + * @summary ContractvaluedItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractValuedItem_Input', - description: 'Contract Valued Item List.', - fields: () => - extendSchema(require('./backboneelement.input'), { - entityCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Specific type of Contract Valued Item that may be priced.', - }, - entityReference: { - type: require('./reference.input'), - description: - 'Specific type of Contract Valued Item that may be priced.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Identifies a Contract Valued Item instance.', - }, - effectiveTime: { - type: DateTimeScalar, - description: - 'Indicates the time during which this Contract ValuedItem information is effective.', - }, - _effectiveTime: { - type: require('./element.input'), - description: - 'Indicates the time during which this Contract ValuedItem information is effective.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', - }, - unitPrice: { - type: require('./quantity.input'), - description: 'A Contract Valued Item unit valuation measure.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.input'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.input'), - description: - 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - }), + name: 'ContractvaluedItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + entityCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + entityReference: { + type: GraphQLString, + description: 'Specific type of Contract Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Identifies a Contract Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.input.js'), + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', + }, + unitPrice: { + type: require('./quantity.input.js'), + description: 'A Contract Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.input.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.input.js'), + description: + 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/count.input.js b/src/resources/1_0_2/inputs/count.input.js index cec4d166..26f1ed85 100644 --- a/src/resources/1_0_2/inputs/count.input.js +++ b/src/resources/1_0_2/inputs/count.input.js @@ -1,14 +1,11 @@ const { GraphQLInputObjectType } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Count Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'Count_Input', - description: 'A count of a discrete element (no unit).', - fields: () => extendSchema(require('./quantity.input')), + description: 'A count of a discrete element (no unit)', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/inputs/coverage.input.js b/src/resources/1_0_2/inputs/coverage.input.js index 6c7be452..0f11c02e 100644 --- a/src/resources/1_0_2/inputs/coverage.input.js +++ b/src/resources/1_0_2/inputs/coverage.input.js @@ -1,21 +1,14 @@ -const PositiveIntScalar = require('../scalars/positiveint.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 CoverageResourceInputType = new GraphQLEnumType({ - name: 'CoverageResourceInputType', - values: { - Coverage: { value: 'Coverage' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -23,102 +16,159 @@ let CoverageResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Coverage_Input', - description: 'Base StructureDefinition for Coverage Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CoverageResourceInputType), - description: 'Type of this resource.', - }, - issuer: { - type: require('./reference.input'), - description: 'The program or plan underwriter or payor.', - }, - bin: { - type: require('./identifier.input'), - description: - "Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.", - }, - period: { - type: require('./period.input'), - description: - "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCoverageTypeCode - type: { - type: require('./coding.input'), - description: - 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.', - }, - subscriberId: { - type: require('./identifier.input'), - description: 'The id issued to the subscriber.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID.', - }, - group: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', - }, - _group: { - type: require('./element.input'), - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', - }, - plan: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', - }, - _plan: { - type: require('./element.input'), - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', - }, - subPlan: { - type: GraphQLString, - description: - 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.', - }, - _subPlan: { - type: require('./element.input'), - description: - 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.', - }, - dependent: { - type: PositiveIntScalar, - description: 'A unique identifier for a dependent under the coverage.', - }, - _dependent: { - type: require('./element.input'), - description: 'A unique identifier for a dependent under the coverage.', - }, - sequence: { - type: PositiveIntScalar, - description: - 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', - }, - _sequence: { - type: require('./element.input'), - description: - 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', - }, - subscriber: { - type: require('./reference.input'), - description: - "The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.", - }, - network: { - type: require('./identifier.input'), - description: 'The identifier for a community of providers.', - }, - contract: { - type: new GraphQLList(require('./reference.input')), - description: 'The policy(s) which constitute this insurance coverage.', - }, - }), + description: 'Base StructureDefinition for Coverage Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Coverage_Enum_input', + values: { Coverage: { value: 'Coverage' } }, + }), + ), + 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.', + }, + issuer: { + type: GraphQLString, + description: 'The program or plan underwriter or payor.', + }, + bin: { + type: require('./identifier.input.js'), + description: + "Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.", + }, + period: { + type: require('./period.input.js'), + description: + "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCoverageTypeCode + type: { + type: require('./coding.input.js'), + description: + 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.', + }, + subscriberId: { + type: require('./identifier.input.js'), + description: 'The id issued to the subscriber.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID.', + }, + _group: { + type: require('./element.input.js'), + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', + }, + group: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', + }, + _plan: { + type: require('./element.input.js'), + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', + }, + plan: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', + }, + _subPlan: { + type: require('./element.input.js'), + description: + 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.', + }, + subPlan: { + type: GraphQLString, + description: + 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.', + }, + _dependent: { + type: require('./element.input.js'), + description: 'A unique identifier for a dependent under the coverage.', + }, + dependent: { + type: PositiveIntScalar, + description: 'A unique identifier for a dependent under the coverage.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', + }, + sequence: { + type: PositiveIntScalar, + description: + 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', + }, + subscriber: { + type: GraphQLString, + description: + "The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.", + }, + network: { + type: require('./identifier.input.js'), + description: 'The identifier for a community of providers.', + }, + contract: { + type: new GraphQLList(GraphQLString), + description: 'The policy(s) which constitute this insurance coverage.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/dataelement.input.js b/src/resources/1_0_2/inputs/dataelement.input.js index ad8c9d2d..5ab4045d 100644 --- a/src/resources/1_0_2/inputs/dataelement.input.js +++ b/src/resources/1_0_2/inputs/dataelement.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DataElementResourceInputType = new GraphQLEnumType({ - name: 'DataElementResourceInputType', - values: { - DataElement: { value: 'DataElement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,130 +17,187 @@ let DataElementResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DataElement_Input', - description: 'Base StructureDefinition for DataElement Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DataElementResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.', - }, - name: { - type: GraphQLString, - description: - 'The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.', - }, - _name: { - type: require('./element.input'), - description: - 'The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the data element.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the data element.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the data element.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the data element.', - }, - contact: { - type: new GraphQLList(require('./dataelementcontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dataelement-stringency - stringency: { - type: CodeScalar, - description: - 'Identifies how precise the data element is in its definition.', - }, - _stringency: { - type: require('./element.input'), - description: - 'Identifies how precise the data element is in its definition.', - }, - mapping: { - type: new GraphQLList(require('./dataelementmapping.input')), - description: - 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', - }, - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.input')), - ), - description: - 'Defines the structure, type, allowed values and other constraining characteristics of the data element.', - }, - }), + description: 'Base StructureDefinition for DataElement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DataElement_Enum_input', + values: { DataElement: { value: 'DataElement' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.', + }, + name: { + type: GraphQLString, + description: + 'The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the data element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the data element.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the data element.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the data element.', + }, + contact: { + type: new GraphQLList(require('./dataelementcontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.', + }, + _stringency: { + type: require('./element.input.js'), + description: + 'Identifies how precise the data element is in its definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dataelement-stringency + stringency: { + type: CodeScalar, + description: + 'Identifies how precise the data element is in its definition.', + }, + mapping: { + type: new GraphQLList(require('./dataelementmapping.input.js')), + description: + 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.input.js')), + ), + description: + 'Defines the structure, type, allowed values and other constraining characteristics of the data element.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/dataelementcontact.input.js b/src/resources/1_0_2/inputs/dataelementcontact.input.js index 41f27bbd..553f53da 100644 --- a/src/resources/1_0_2/inputs/dataelementcontact.input.js +++ b/src/resources/1_0_2/inputs/dataelementcontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DataElement.contact Input Schema + * @summary DataElementcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DataElementContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the data element.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the data element.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'DataElementcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the data element.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the data element.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/dataelementmapping.input.js b/src/resources/1_0_2/inputs/dataelementmapping.input.js index 181fa276..f3bf879b 100644 --- a/src/resources/1_0_2/inputs/dataelementmapping.input.js +++ b/src/resources/1_0_2/inputs/dataelementmapping.input.js @@ -1,61 +1,77 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary DataElement.mapping Input Schema + * @summary DataElementmapping Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DataElementMapping_Input', - description: - 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: - 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', - }, - _identity: { - type: require('./element.input'), - description: - 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', - }, - uri: { - type: UriScalar, - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - _uri: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - name: { - type: GraphQLString, - description: 'A name for the specification that is being mapped to.', - }, - _name: { - type: require('./element.input'), - description: 'A name for the specification that is being mapped to.', - }, - comments: { - type: GraphQLString, - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - _comments: { - type: require('./element.input'), - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - }), + name: 'DataElementmapping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _identity: { + type: require('./element.input.js'), + description: + 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comments: { + type: require('./element.input.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comments: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/detectedissue.input.js b/src/resources/1_0_2/inputs/detectedissue.input.js index a9e50bc9..0ddff20f 100644 --- a/src/resources/1_0_2/inputs/detectedissue.input.js +++ b/src/resources/1_0_2/inputs/detectedissue.input.js @@ -1,23 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.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 DetectedIssueResourceInputType = new GraphQLEnumType({ - name: 'DetectedIssueResourceInputType', - values: { - DetectedIssue: { value: 'DetectedIssue' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,81 +16,138 @@ let DetectedIssueResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DetectedIssue_Input', - description: 'Base StructureDefinition for DetectedIssue Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DetectedIssueResourceInputType), - description: 'Type of this resource.', - }, - patient: { - type: require('./reference.input'), - description: - 'Indicates the patient whose record the detected issue is associated with.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-category - category: { - type: require('./codeableconcept.input'), - description: 'Identifies the general type of issue identified.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-severity - severity: { - type: CodeScalar, - description: - 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', - }, - _severity: { - type: require('./element.input'), - description: - 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', - }, - implicated: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', - }, - detail: { - type: GraphQLString, - description: 'A textual explanation of the detected issue.', - }, - _detail: { - type: require('./element.input'), - description: 'A textual explanation of the detected issue.', - }, - date: { - type: DateTimeScalar, - description: - 'The date or date-time when the detected issue was initially identified.', - }, - _date: { - type: require('./element.input'), - description: - 'The date or date-time when the detected issue was initially identified.', - }, - author: { - type: require('./reference.input'), - description: - 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Business identifier associated with the detected issue record.', - }, - reference: { - type: UriScalar, - description: - 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', - }, - _reference: { - type: require('./element.input'), - description: - 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', - }, - mitigation: { - type: new GraphQLList(require('./detectedissuemitigation.input')), - description: - 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', - }, - }), + description: 'Base StructureDefinition for DetectedIssue Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DetectedIssue_Enum_input', + values: { DetectedIssue: { value: 'DetectedIssue' } }, + }), + ), + 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.', + }, + patient: { + type: GraphQLString, + description: + 'Indicates the patient whose record the detected issue is associated with.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-category + category: { + type: require('./codeableconcept.input.js'), + description: 'Identifies the general type of issue identified.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-severity + severity: { + type: CodeScalar, + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + implicated: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + }, + _detail: { + type: require('./element.input.js'), + description: 'A textual explanation of the detected issue.', + }, + detail: { + type: GraphQLString, + description: 'A textual explanation of the detected issue.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date or date-time when the detected issue was initially identified.', + }, + date: { + type: DateTimeScalar, + description: + 'The date or date-time when the detected issue was initially identified.', + }, + author: { + type: GraphQLString, + description: + 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Business identifier associated with the detected issue record.', + }, + _reference: { + type: require('./element.input.js'), + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + reference: { + type: UriScalar, + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + mitigation: { + type: new GraphQLList(require('./detectedissuemitigation.input.js')), + description: + 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/detectedissuemitigation.input.js b/src/resources/1_0_2/inputs/detectedissuemitigation.input.js index ea108eee..1467873e 100644 --- a/src/resources/1_0_2/inputs/detectedissuemitigation.input.js +++ b/src/resources/1_0_2/inputs/detectedissuemitigation.input.js @@ -1,37 +1,58 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary DetectedIssue.mitigation Input Schema + * @summary DetectedIssuemitigation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DetectedIssueMitigation_Input', - description: - 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action - action: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', - }, - date: { - type: DateTimeScalar, - description: 'Indicates when the mitigating action was documented.', - }, - _date: { - type: require('./element.input'), - description: 'Indicates when the mitigating action was documented.', - }, - author: { - type: require('./reference.input'), - description: - 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', - }, - }), + name: 'DetectedIssuemitigation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action + action: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', + }, + _date: { + type: require('./element.input.js'), + description: 'Indicates when the mitigating action was documented.', + }, + date: { + type: DateTimeScalar, + description: 'Indicates when the mitigating action was documented.', + }, + author: { + type: GraphQLString, + description: + 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/device.input.js b/src/resources/1_0_2/inputs/device.input.js index 0005f7da..6d5d81fd 100644 --- a/src/resources/1_0_2/inputs/device.input.js +++ b/src/resources/1_0_2/inputs/device.input.js @@ -1,23 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.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 DeviceResourceInputType = new GraphQLEnumType({ - name: 'DeviceResourceInputType', - values: { - Device: { value: 'Device' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,128 +16,185 @@ let DeviceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Device_Input', - description: 'Base StructureDefinition for Device Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.', - }, - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Code or identifier to identify a kind of device.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Descriptive information, usage information or implantation information that is not captured in an existing element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/devicestatus - status: { - type: CodeScalar, - description: 'Status of the Device availability.', - }, - _status: { - type: require('./element.input'), - description: 'Status of the Device availability.', - }, - manufacturer: { - type: GraphQLString, - description: 'A name of the manufacturer.', - }, - _manufacturer: { - type: require('./element.input'), - description: 'A name of the manufacturer.', - }, - model: { - type: GraphQLString, - description: - "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", - }, - _model: { - type: require('./element.input'), - description: - "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", - }, - version: { - type: GraphQLString, - description: - 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', - }, - manufactureDate: { - type: DateTimeScalar, - description: 'The date and time when the device was manufactured.', - }, - _manufactureDate: { - type: require('./element.input'), - description: 'The date and time when the device was manufactured.', - }, - expiry: { - type: DateTimeScalar, - description: - 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', - }, - _expiry: { - type: require('./element.input'), - description: - 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', - }, - udi: { - type: GraphQLString, - description: - 'United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.', - }, - _udi: { - type: require('./element.input'), - description: - 'United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.', - }, - lotNumber: { - type: GraphQLString, - description: 'Lot number assigned by the manufacturer.', - }, - _lotNumber: { - type: require('./element.input'), - description: 'Lot number assigned by the manufacturer.', - }, - owner: { - type: require('./reference.input'), - description: - 'An organization that is responsible for the provision and ongoing maintenance of the device.', - }, - location: { - type: require('./reference.input'), - description: 'The place where the device can be found.', - }, - patient: { - type: require('./reference.input'), - description: - 'Patient information, if the resource is affixed to a person.', - }, - contact: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for an organization or a particular human that is responsible for the device.', - }, - url: { - type: UriScalar, - description: - 'A network address on which the device may be contacted directly.', - }, - _url: { - type: require('./element.input'), - description: - 'A network address on which the device may be contacted directly.', - }, - }), + description: 'Base StructureDefinition for Device Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Device_Enum_input', + values: { Device: { value: 'Device' } }, + }), + ), + 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 instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Code or identifier to identify a kind of device.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Descriptive information, usage information or implantation information that is not captured in an existing element.', + }, + _status: { + type: require('./element.input.js'), + description: 'Status of the Device availability.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/devicestatus + status: { + type: CodeScalar, + description: 'Status of the Device availability.', + }, + _manufacturer: { + type: require('./element.input.js'), + description: 'A name of the manufacturer.', + }, + manufacturer: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + _model: { + type: require('./element.input.js'), + description: + "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", + }, + model: { + type: GraphQLString, + description: + "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', + }, + version: { + type: GraphQLString, + description: + 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', + }, + _manufactureDate: { + type: require('./element.input.js'), + description: 'The date and time when the device was manufactured.', + }, + manufactureDate: { + type: DateTimeScalar, + description: 'The date and time when the device was manufactured.', + }, + _expiry: { + type: require('./element.input.js'), + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + expiry: { + type: DateTimeScalar, + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + _udi: { + type: require('./element.input.js'), + description: + 'United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.', + }, + udi: { + type: GraphQLString, + description: + 'United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.', + }, + _lotNumber: { + type: require('./element.input.js'), + description: 'Lot number assigned by the manufacturer.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number assigned by the manufacturer.', + }, + owner: { + type: GraphQLString, + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + }, + location: { + type: GraphQLString, + description: 'The place where the device can be found.', + }, + patient: { + type: GraphQLString, + description: + 'Patient information, if the resource is affixed to a person.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for an organization or a particular human that is responsible for the device.', + }, + _url: { + type: require('./element.input.js'), + description: + 'A network address on which the device may be contacted directly.', + }, + url: { + type: UriScalar, + description: + 'A network address on which the device may be contacted directly.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/devicecomponent.input.js b/src/resources/1_0_2/inputs/devicecomponent.input.js index 24873ec2..cfb8fd73 100644 --- a/src/resources/1_0_2/inputs/devicecomponent.input.js +++ b/src/resources/1_0_2/inputs/devicecomponent.input.js @@ -1,22 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -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 DeviceComponentResourceInputType = new GraphQLEnumType({ - name: 'DeviceComponentResourceInputType', - values: { - DeviceComponent: { value: 'DeviceComponent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,75 +16,132 @@ let DeviceComponentResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DeviceComponent_Input', - description: 'Base StructureDefinition for DeviceComponent Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceComponentResourceInputType), - description: 'Type of this resource.', - }, - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Describes the specific component type as defined in the object-oriented or metric nomenclature partition.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: - 'Describes the local assigned unique identification by the software. For example: handle ID.', - }, - lastSystemChange: { - type: new GraphQLNonNull(InstantScalar), - description: - 'Describes the timestamp for the most recent system change which includes device configuration or setting change.', - }, - _lastSystemChange: { - type: require('./element.input'), - description: - 'Describes the timestamp for the most recent system change which includes device configuration or setting change.', - }, - source: { - type: require('./reference.input'), - description: - 'Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.', - }, - parent: { - type: require('./reference.input'), - description: - 'Describes the link to the parent resource. For example: Channel is linked to its VMD parent.', - }, - operationalStatus: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Indicates current operational status of the device. For example: On, Off, Standby, etc.', - }, - parameterGroup: { - type: require('./codeableconcept.input'), - description: - 'Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measurement-principle - measurementPrinciple: { - type: CodeScalar, - description: - 'Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', - }, - _measurementPrinciple: { - type: require('./element.input'), - description: - 'Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', - }, - productionSpecification: { - type: new GraphQLList( - require('./devicecomponentproductionspecification.input'), - ), - description: - 'Describes the production specification such as component revision, serial number, etc.', - }, - languageCode: { - type: require('./codeableconcept.input'), - description: - 'Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.', - }, - }), + description: 'Base StructureDefinition for DeviceComponent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceComponent_Enum_input', + values: { DeviceComponent: { value: 'DeviceComponent' } }, + }), + ), + 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.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Describes the specific component type as defined in the object-oriented or metric nomenclature partition.', + }, + identifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: + 'Describes the local assigned unique identification by the software. For example: handle ID.', + }, + _lastSystemChange: { + type: require('./element.input.js'), + description: + 'Describes the timestamp for the most recent system change which includes device configuration or setting change.', + }, + lastSystemChange: { + type: new GraphQLNonNull(InstantScalar), + description: + 'Describes the timestamp for the most recent system change which includes device configuration or setting change.', + }, + source: { + type: GraphQLString, + description: + 'Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.', + }, + parent: { + type: GraphQLString, + description: + 'Describes the link to the parent resource. For example: Channel is linked to its VMD parent.', + }, + operationalStatus: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates current operational status of the device. For example: On, Off, Standby, etc.', + }, + parameterGroup: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.', + }, + _measurementPrinciple: { + type: require('./element.input.js'), + description: + 'Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measurement-principle + measurementPrinciple: { + type: CodeScalar, + description: + 'Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', + }, + productionSpecification: { + type: new GraphQLList( + require('./devicecomponentproductionspecification.input.js'), + ), + description: + 'Describes the production specification such as component revision, serial number, etc.', + }, + languageCode: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/devicecomponentproductionspecification.input.js b/src/resources/1_0_2/inputs/devicecomponentproductionspecification.input.js index ca5c3fc9..2b179937 100644 --- a/src/resources/1_0_2/inputs/devicecomponentproductionspecification.input.js +++ b/src/resources/1_0_2/inputs/devicecomponentproductionspecification.input.js @@ -1,35 +1,55 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DeviceComponent.productionSpecification Input Schema + * @summary DeviceComponentproductionSpecification Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DeviceComponentProductionSpecification_Input', - description: - 'Describes the production specification such as component revision, serial number, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - specType: { - type: require('./codeableconcept.input'), - description: - 'Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.', - }, - componentId: { - type: require('./identifier.input'), - description: - 'Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.', - }, - productionSpec: { - type: GraphQLString, - description: 'Describes the printable string defining the component.', - }, - _productionSpec: { - type: require('./element.input'), - description: 'Describes the printable string defining the component.', - }, - }), + name: 'DeviceComponentproductionSpecification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + specType: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.', + }, + componentId: { + type: require('./identifier.input.js'), + description: + 'Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.', + }, + _productionSpec: { + type: require('./element.input.js'), + description: 'Describes the printable string defining the component.', + }, + productionSpec: { + type: GraphQLString, + description: 'Describes the printable string defining the component.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/devicemetric.input.js b/src/resources/1_0_2/inputs/devicemetric.input.js index 539b1bfd..03527fa8 100644 --- a/src/resources/1_0_2/inputs/devicemetric.input.js +++ b/src/resources/1_0_2/inputs/devicemetric.input.js @@ -1,21 +1,13 @@ -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 DeviceMetricResourceInputType = new GraphQLEnumType({ - name: 'DeviceMetricResourceInputType', - values: { - DeviceMetric: { value: 'DeviceMetric' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,80 +15,137 @@ let DeviceMetricResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DeviceMetric_Input', - description: 'Base StructureDefinition for DeviceMetric Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceMetricResourceInputType), - description: 'Type of this resource.', - }, - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: - 'Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.', - }, - unit: { - type: require('./codeableconcept.input'), - description: - 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', - }, - source: { - type: require('./reference.input'), - description: - 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.', - }, - parent: { - type: require('./reference.input'), - description: - 'Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-operational-status - operationalStatus: { - type: CodeScalar, - description: - 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', - }, - _operationalStatus: { - type: require('./element.input'), - description: - 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-color - color: { - type: CodeScalar, - description: - 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', - }, - _color: { - type: require('./element.input'), - description: - 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-category - category: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', - }, - _category: { - type: require('./element.input'), - description: - 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', - }, - measurementPeriod: { - type: require('./timing.input'), - description: - 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', - }, - calibration: { - type: new GraphQLList(require('./devicemetriccalibration.input')), - description: - 'Describes the calibrations that have been performed or that are required to be performed.', - }, - }), + description: 'Base StructureDefinition for DeviceMetric Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceMetric_Enum_input', + values: { DeviceMetric: { value: 'DeviceMetric' } }, + }), + ), + 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.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', + }, + identifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: + 'Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.', + }, + unit: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', + }, + source: { + type: GraphQLString, + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.', + }, + parent: { + type: GraphQLString, + description: + 'Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', + }, + _operationalStatus: { + type: require('./element.input.js'), + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-operational-status + operationalStatus: { + type: CodeScalar, + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + _color: { + type: require('./element.input.js'), + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-color + color: { + type: CodeScalar, + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + _category: { + type: require('./element.input.js'), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-category + category: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + measurementPeriod: { + type: require('./timing.input.js'), + description: + 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', + }, + calibration: { + type: new GraphQLList(require('./devicemetriccalibration.input.js')), + description: + 'Describes the calibrations that have been performed or that are required to be performed.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/devicemetriccalibration.input.js b/src/resources/1_0_2/inputs/devicemetriccalibration.input.js index 80a55ed8..eab71928 100644 --- a/src/resources/1_0_2/inputs/devicemetriccalibration.input.js +++ b/src/resources/1_0_2/inputs/devicemetriccalibration.input.js @@ -1,45 +1,61 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary DeviceMetric.calibration Input Schema + * @summary DeviceMetriccalibration Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DeviceMetricCalibration_Input', - description: - 'Describes the calibrations that have been performed or that are required to be performed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-type - type: { - type: CodeScalar, - description: 'Describes the type of the calibration method.', - }, - _type: { - type: require('./element.input'), - description: 'Describes the type of the calibration method.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-state - state: { - type: CodeScalar, - description: 'Describes the state of the calibration.', - }, - _state: { - type: require('./element.input'), - description: 'Describes the state of the calibration.', - }, - time: { - type: InstantScalar, - description: 'Describes the time last calibration has been performed.', - }, - _time: { - type: require('./element.input'), - description: 'Describes the time last calibration has been performed.', - }, - }), + name: 'DeviceMetriccalibration_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'Describes the type of the calibration method.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-type + type: { + type: CodeScalar, + description: 'Describes the type of the calibration method.', + }, + _state: { + type: require('./element.input.js'), + description: 'Describes the state of the calibration.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-state + state: { + type: CodeScalar, + description: 'Describes the state of the calibration.', + }, + _time: { + type: require('./element.input.js'), + description: 'Describes the time last calibration has been performed.', + }, + time: { + type: InstantScalar, + description: 'Describes the time last calibration has been performed.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/deviceuserequest.input.js b/src/resources/1_0_2/inputs/deviceuserequest.input.js index 1be9356a..10de800a 100644 --- a/src/resources/1_0_2/inputs/deviceuserequest.input.js +++ b/src/resources/1_0_2/inputs/deviceuserequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 DeviceUseRequestResourceInputType = new GraphQLEnumType({ - name: 'DeviceUseRequestResourceInputType', - values: { - DeviceUseRequest: { value: 'DeviceUseRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,115 +16,172 @@ let DeviceUseRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DeviceUseRequest_Input', - description: 'Base StructureDefinition for DeviceUseRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceUseRequestResourceInputType), - description: 'Type of this resource.', - }, - bodySiteCodeableConcept: { - type: require('./codeableconcept.input'), - description: - "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", - }, - bodySiteReference: { - type: require('./reference.input'), - description: - "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-use-request-status - status: { - type: CodeScalar, - description: 'The status of the request.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the request.', - }, - device: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The details of the device to be used.', - }, - encounter: { - type: require('./reference.input'), - description: - 'An encounter that provides additional context in which this request is made.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order by the orderer or by the receiver.', - }, - indication: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reason or justification for the use of this device.', - }, - notes: { - type: new GraphQLList(GraphQLString), - description: - 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - _notes: { - type: require('./element.input'), - description: - 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - prnReason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', - }, - orderedOn: { - type: DateTimeScalar, - description: 'The time when the request was made.', - }, - _orderedOn: { - type: require('./element.input'), - description: 'The time when the request was made.', - }, - recordedOn: { - type: DateTimeScalar, - description: 'The time at which the request was made/recorded.', - }, - _recordedOn: { - type: require('./element.input'), - description: 'The time at which the request was made/recorded.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient who will use the device.', - }, - timingTiming: { - type: require('./timing.input'), - description: - "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - timingPeriod: { - type: require('./period.input'), - description: - "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - timingDateTime: { - type: DateTimeScalar, - description: - "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - _timingDateTime: { - type: require('./element.input'), - description: - "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-use-request-priority - priority: { - type: CodeScalar, - description: - 'Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.', - }, - _priority: { - type: require('./element.input'), - description: - 'Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.', - }, - }), + description: 'Base StructureDefinition for DeviceUseRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceUseRequest_Enum_input', + values: { DeviceUseRequest: { value: 'DeviceUseRequest' } }, + }), + ), + 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.', + }, + bodySiteCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", + }, + bodySiteReference: { + type: GraphQLString, + description: + "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-use-request-status + status: { + type: CodeScalar, + description: 'The status of the request.', + }, + device: { + type: new GraphQLNonNull(GraphQLString), + description: 'The details of the device to be used.', + }, + encounter: { + type: GraphQLString, + description: + 'An encounter that provides additional context in which this request is made.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this order by the orderer or by the receiver.', + }, + indication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason or justification for the use of this device.', + }, + _notes: { + type: require('./element.input.js'), + description: + 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + notes: { + type: new GraphQLList(GraphQLString), + description: + 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + prnReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', + }, + _orderedOn: { + type: require('./element.input.js'), + description: 'The time when the request was made.', + }, + orderedOn: { + type: DateTimeScalar, + description: 'The time when the request was made.', + }, + _recordedOn: { + type: require('./element.input.js'), + description: 'The time at which the request was made/recorded.', + }, + recordedOn: { + type: DateTimeScalar, + description: 'The time at which the request was made/recorded.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who will use the device.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: + "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + timingPeriod: { + type: require('./period.input.js'), + description: + "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _timingDateTime: { + type: require('./element.input.js'), + description: + "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + timingDateTime: { + type: DateTimeScalar, + description: + "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _priority: { + type: require('./element.input.js'), + description: + 'Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-use-request-priority + priority: { + type: CodeScalar, + description: + 'Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/deviceusestatement.input.js b/src/resources/1_0_2/inputs/deviceusestatement.input.js index 0bba5040..db1e26e1 100644 --- a/src/resources/1_0_2/inputs/deviceusestatement.input.js +++ b/src/resources/1_0_2/inputs/deviceusestatement.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 DeviceUseStatementResourceInputType = new GraphQLEnumType({ - name: 'DeviceUseStatementResourceInputType', - values: { - DeviceUseStatement: { value: 'DeviceUseStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,77 +16,133 @@ let DeviceUseStatementResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DeviceUseStatement_Input', - description: 'Base StructureDefinition for DeviceUseStatement Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceUseStatementResourceInputType), - description: 'Type of this resource.', - }, - bodySiteCodeableConcept: { - type: require('./codeableconcept.input'), - description: - "Indicates the site on the subject's body where the device was used ( i.e. the target site).", - }, - bodySiteReference: { - type: require('./reference.input'), - description: - "Indicates the site on the subject's body where the device was used ( i.e. the target site).", - }, - whenUsed: { - type: require('./period.input'), - description: 'The time period over which the device was used.', - }, - device: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The details of the device used.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'An external identifier for this statement such as an IRI.', - }, - indication: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reason or justification for the use of the device.', - }, - notes: { - type: new GraphQLList(GraphQLString), - description: - 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - _notes: { - type: require('./element.input'), - description: - 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - recordedOn: { - type: DateTimeScalar, - description: 'The time at which the statement was made/recorded.', - }, - _recordedOn: { - type: require('./element.input'), - description: 'The time at which the statement was made/recorded.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient who used the device.', - }, - timingTiming: { - type: require('./timing.input'), - description: 'How often the device was used.', - }, - timingPeriod: { - type: require('./period.input'), - description: 'How often the device was used.', - }, - timingDateTime: { - type: DateTimeScalar, - description: 'How often the device was used.', - }, - _timingDateTime: { - type: require('./element.input'), - description: 'How often the device was used.', - }, - }), + description: 'Base StructureDefinition for DeviceUseStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceUseStatement_Enum_input', + values: { DeviceUseStatement: { value: 'DeviceUseStatement' } }, + }), + ), + 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.', + }, + bodySiteCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the site on the subject's body where the device was used ( i.e. the target site).", + }, + bodySiteReference: { + type: GraphQLString, + description: + "Indicates the site on the subject's body where the device was used ( i.e. the target site).", + }, + whenUsed: { + type: require('./period.input.js'), + description: 'The time period over which the device was used.', + }, + device: { + type: new GraphQLNonNull(GraphQLString), + description: 'The details of the device used.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'An external identifier for this statement such as an IRI.', + }, + indication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason or justification for the use of the device.', + }, + _notes: { + type: require('./element.input.js'), + description: + 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + notes: { + type: new GraphQLList(GraphQLString), + description: + 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + _recordedOn: { + type: require('./element.input.js'), + description: 'The time at which the statement was made/recorded.', + }, + recordedOn: { + type: DateTimeScalar, + description: 'The time at which the statement was made/recorded.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who used the device.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: 'How often the device was used.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: 'How often the device was used.', + }, + _timingDateTime: { + type: require('./element.input.js'), + description: 'How often the device was used.', + }, + timingDateTime: { + type: DateTimeScalar, + description: 'How often the device was used.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/diagnosticorder.input.js b/src/resources/1_0_2/inputs/diagnosticorder.input.js index 7e97713a..6ed4860d 100644 --- a/src/resources/1_0_2/inputs/diagnosticorder.input.js +++ b/src/resources/1_0_2/inputs/diagnosticorder.input.js @@ -1,21 +1,13 @@ -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 DiagnosticOrderResourceInputType = new GraphQLEnumType({ - name: 'DiagnosticOrderResourceInputType', - values: { - DiagnosticOrder: { value: 'DiagnosticOrder' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,81 +15,138 @@ let DiagnosticOrderResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DiagnosticOrder_Input', - description: 'Base StructureDefinition for DiagnosticOrder Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DiagnosticOrderResourceInputType), - description: 'Type of this resource.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', - }, - orderer: { - type: require('./reference.input'), - description: - 'The practitioner that holds legal responsibility for ordering the investigation.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', - }, - encounter: { - type: require('./reference.input'), - description: - 'An encounter that provides additional information about the healthcare context in which this request is made.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.', - }, - specimen: { - type: new GraphQLList(require('./reference.input')), - description: - 'One or more specimens that the diagnostic investigation is about.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status - status: { - type: CodeScalar, - description: 'The status of the order.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority - priority: { - type: CodeScalar, - description: 'The clinical priority associated with this order.', - }, - _priority: { - type: require('./element.input'), - description: 'The clinical priority associated with this order.', - }, - event: { - type: new GraphQLList(require('./diagnosticorderevent.input')), - description: - 'A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.', - }, - item: { - type: new GraphQLList(require('./diagnosticorderitem.input')), - description: - 'The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - "Any other notes associated with this patient, specimen or order (e.g. 'patient hates needles').", - }, - }), + description: 'Base StructureDefinition for DiagnosticOrder Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DiagnosticOrder_Enum_input', + values: { DiagnosticOrder: { value: 'DiagnosticOrder' } }, + }), + ), + 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.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + }, + orderer: { + type: GraphQLString, + description: + 'The practitioner that holds legal responsibility for ordering the investigation.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', + }, + encounter: { + type: GraphQLString, + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.', + }, + specimen: { + type: new GraphQLList(GraphQLString), + description: + 'One or more specimens that the diagnostic investigation is about.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status + status: { + type: CodeScalar, + description: 'The status of the order.', + }, + _priority: { + type: require('./element.input.js'), + description: 'The clinical priority associated with this order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority + priority: { + type: CodeScalar, + description: 'The clinical priority associated with this order.', + }, + event: { + type: new GraphQLList(require('./diagnosticorderevent.input.js')), + description: + 'A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.', + }, + item: { + type: new GraphQLList(require('./diagnosticorderitem.input.js')), + description: + 'The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + "Any other notes associated with this patient, specimen or order (e.g. 'patient hates needles').", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/diagnosticorderevent.input.js b/src/resources/1_0_2/inputs/diagnosticorderevent.input.js index 792cce5b..abeb01da 100644 --- a/src/resources/1_0_2/inputs/diagnosticorderevent.input.js +++ b/src/resources/1_0_2/inputs/diagnosticorderevent.input.js @@ -1,47 +1,68 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary DiagnosticOrder.event Input Schema + * @summary DiagnosticOrderevent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DiagnosticOrderEvent_Input', - description: - 'A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status for the event.', - }, - _status: { - type: require('./element.input'), - description: 'The status for the event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-event - description: { - type: require('./codeableconcept.input'), - description: - 'Additional information about the event that occurred - e.g. if the status remained unchanged.', - }, - dateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The date/time at which the event occurred.', - }, - _dateTime: { - type: require('./element.input'), - description: 'The date/time at which the event occurred.', - }, - actor: { - type: require('./reference.input'), - description: - 'The person responsible for performing or recording the action.', - }, - }), + name: 'DiagnosticOrderevent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status for the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status for the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-event + description: { + type: require('./codeableconcept.input.js'), + description: + 'Additional information about the event that occurred - e.g. if the status remained unchanged.', + }, + _dateTime: { + type: require('./element.input.js'), + description: 'The date/time at which the event occurred.', + }, + dateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date/time at which the event occurred.', + }, + actor: { + type: GraphQLString, + description: + 'The person responsible for performing or recording the action.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/diagnosticorderitem.input.js b/src/resources/1_0_2/inputs/diagnosticorderitem.input.js index f69d363e..3e1dbe3d 100644 --- a/src/resources/1_0_2/inputs/diagnosticorderitem.input.js +++ b/src/resources/1_0_2/inputs/diagnosticorderitem.input.js @@ -1,47 +1,64 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary DiagnosticOrder.item Input Schema + * @summary DiagnosticOrderitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DiagnosticOrderItem_Input', - description: - 'The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-requests - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.', - }, - specimen: { - type: new GraphQLList(require('./reference.input')), - description: 'If the item is related to a specific specimen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.input'), - description: - 'Anatomical location where the request test should be performed. This is the target site.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status - status: { - type: CodeScalar, - description: 'The status of this individual item within the order.', - }, - _status: { - type: require('./element.input'), - description: 'The status of this individual item within the order.', - }, - }), + name: 'DiagnosticOrderitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-requests + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.', + }, + specimen: { + type: new GraphQLList(GraphQLString), + description: 'If the item is related to a specific specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.input.js'), + description: + 'Anatomical location where the request test should be performed. This is the target site.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this individual item within the order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status + status: { + type: CodeScalar, + description: 'The status of this individual item within the order.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/diagnosticreport.input.js b/src/resources/1_0_2/inputs/diagnosticreport.input.js index 848d8f3a..14b5fdd4 100644 --- a/src/resources/1_0_2/inputs/diagnosticreport.input.js +++ b/src/resources/1_0_2/inputs/diagnosticreport.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.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 DiagnosticReportResourceInputType = new GraphQLEnumType({ - name: 'DiagnosticReportResourceInputType', - values: { - DiagnosticReport: { value: 'DiagnosticReport' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -25,121 +17,178 @@ let DiagnosticReportResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DiagnosticReport_Input', - description: 'Base StructureDefinition for DiagnosticReport Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DiagnosticReportResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-report-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the diagnostic report as a whole.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the diagnostic report as a whole.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-service-sections - category: { - type: require('./codeableconcept.input'), - description: - 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'A code or name that describes this diagnostic report.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The link to the health care event (encounter) when the order was made.', - }, - effectiveDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - _effectiveDateTime: { - type: require('./element.input'), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - effectivePeriod: { - type: new GraphQLNonNull(require('./period.input')), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - issued: { - type: new GraphQLNonNull(InstantScalar), - description: - 'The date and time that this version of the report was released from the source diagnostic service.', - }, - _issued: { - type: require('./element.input'), - description: - 'The date and time that this version of the report was released from the source diagnostic service.', - }, - performer: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The diagnostic service that is responsible for issuing the report.', - }, - request: { - type: new GraphQLList(require('./reference.input')), - description: 'Details concerning a test or procedure requested.', - }, - specimen: { - type: new GraphQLList(require('./reference.input')), - description: - 'Details about the specimens on which this diagnostic report is based.', - }, - result: { - type: new GraphQLList(require('./reference.input')), - description: - "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", - }, - imagingStudy: { - type: new GraphQLList(require('./reference.input')), - description: - 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', - }, - image: { - type: new GraphQLList(require('./diagnosticreportimage.input')), - description: - 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', - }, - conclusion: { - type: GraphQLString, - description: - 'Concise and clinically contextualized narrative interpretation of the diagnostic report.', - }, - _conclusion: { - type: require('./element.input'), - description: - 'Concise and clinically contextualized narrative interpretation of the diagnostic report.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - codedDiagnosis: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Codes for the conclusion.', - }, - presentedForm: { - type: new GraphQLList(require('./attachment.input')), - description: - 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', - }, - }), + description: 'Base StructureDefinition for DiagnosticReport Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DiagnosticReport_Enum_input', + values: { DiagnosticReport: { value: 'DiagnosticReport' } }, + }), + ), + 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: + 'The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the diagnostic report as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-report-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the diagnostic report as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-service-sections + category: { + type: require('./codeableconcept.input.js'), + description: + 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code or name that describes this diagnostic report.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', + }, + encounter: { + type: GraphQLString, + description: + 'The link to the health care event (encounter) when the order was made.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectiveDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectivePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + _issued: { + type: require('./element.input.js'), + description: + 'The date and time that this version of the report was released from the source diagnostic service.', + }, + issued: { + type: new GraphQLNonNull(InstantScalar), + description: + 'The date and time that this version of the report was released from the source diagnostic service.', + }, + performer: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The diagnostic service that is responsible for issuing the report.', + }, + request: { + type: new GraphQLList(GraphQLString), + description: 'Details concerning a test or procedure requested.', + }, + specimen: { + type: new GraphQLList(GraphQLString), + description: + 'Details about the specimens on which this diagnostic report is based.', + }, + result: { + type: new GraphQLList(GraphQLString), + description: + "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", + }, + imagingStudy: { + type: new GraphQLList(GraphQLString), + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + }, + image: { + type: new GraphQLList(require('./diagnosticreportimage.input.js')), + description: + 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', + }, + _conclusion: { + type: require('./element.input.js'), + description: + 'Concise and clinically contextualized narrative interpretation of the diagnostic report.', + }, + conclusion: { + type: GraphQLString, + description: + 'Concise and clinically contextualized narrative interpretation of the diagnostic report.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + codedDiagnosis: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Codes for the conclusion.', + }, + presentedForm: { + type: new GraphQLList(require('./attachment.input.js')), + description: + 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/diagnosticreportimage.input.js b/src/resources/1_0_2/inputs/diagnosticreportimage.input.js index 7ae10bcb..36fd2f18 100644 --- a/src/resources/1_0_2/inputs/diagnosticreportimage.input.js +++ b/src/resources/1_0_2/inputs/diagnosticreportimage.input.js @@ -1,35 +1,52 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DiagnosticReport.image Input Schema + * @summary DiagnosticReportimage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DiagnosticReportImage_Input', - description: - 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', - fields: () => - extendSchema(require('./backboneelement.input'), { - comment: { - type: GraphQLString, - description: - "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", - }, - _comment: { - type: require('./element.input'), - description: - "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", - }, - link: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Reference to the image source.', - }, - }), + name: 'DiagnosticReportimage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _comment: { + type: require('./element.input.js'), + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + comment: { + type: GraphQLString, + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + link: { + type: new GraphQLNonNull(GraphQLString), + description: 'Reference to the image source.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/distance.input.js b/src/resources/1_0_2/inputs/distance.input.js index 25a0b272..b71db058 100644 --- a/src/resources/1_0_2/inputs/distance.input.js +++ b/src/resources/1_0_2/inputs/distance.input.js @@ -1,14 +1,11 @@ const { GraphQLInputObjectType } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Distance Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'Distance_Input', - description: 'A measure of distance.', - fields: () => extendSchema(require('./quantity.input')), + description: 'A measure of distance', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/inputs/documentmanifest.input.js b/src/resources/1_0_2/inputs/documentmanifest.input.js index 11b75772..db5b880a 100644 --- a/src/resources/1_0_2/inputs/documentmanifest.input.js +++ b/src/resources/1_0_2/inputs/documentmanifest.input.js @@ -1,23 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -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 DocumentManifestResourceInputType = new GraphQLEnumType({ - name: 'DocumentManifestResourceInputType', - values: { - DocumentManifest: { value: 'DocumentManifest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,93 +16,150 @@ let DocumentManifestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DocumentManifest_Input', - description: 'Base StructureDefinition for DocumentManifest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DocumentManifestResourceInputType), - description: 'Type of this resource.', - }, - masterIdentifier: { - type: require('./identifier.input'), - description: - 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Other identifiers associated with the document manifest, including version independent identifiers.', - }, - subject: { - type: require('./reference.input'), - description: - 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'A patient, practitioner, or organization for which this set of documents is intended.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - type: { - type: require('./codeableconcept.input'), - description: - 'Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.', - }, - author: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies who is responsible for creating the manifest, and adding documents to it.', - }, - created: { - type: DateTimeScalar, - description: - 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', - }, - _created: { - type: require('./element.input'), - description: - 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', - }, - source: { - type: UriScalar, - description: - 'Identifies the source system, application, or software that produced the document manifest.', - }, - _source: { - type: require('./element.input'), - description: - 'Identifies the source system, application, or software that produced the document manifest.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of this document manifest.', - }, - _status: { - type: require('./element.input'), - description: 'The status of this document manifest.', - }, - description: { - type: GraphQLString, - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - _description: { - type: require('./element.input'), - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - content: { - type: new GraphQLList( - new GraphQLNonNull(require('./documentmanifestcontent.input')), - ), - description: 'The list of Documents included in the manifest.', - }, - related: { - type: new GraphQLList(require('./documentmanifestrelated.input')), - description: - 'Related identifiers or resources associated with the DocumentManifest.', - }, - }), + description: 'Base StructureDefinition for DocumentManifest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentManifest_Enum_input', + values: { DocumentManifest: { value: 'DocumentManifest' } }, + }), + ), + 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.', + }, + masterIdentifier: { + type: require('./identifier.input.js'), + description: + 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Other identifiers associated with the document manifest, including version independent identifiers.', + }, + subject: { + type: GraphQLString, + description: + 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + type: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies who is responsible for creating the manifest, and adding documents to it.', + }, + _created: { + type: require('./element.input.js'), + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + created: { + type: DateTimeScalar, + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + _source: { + type: require('./element.input.js'), + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + source: { + type: UriScalar, + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this document manifest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document manifest.', + }, + _description: { + type: require('./element.input.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentmanifestcontent.input.js')), + ), + description: 'The list of Documents included in the manifest.', + }, + related: { + type: new GraphQLList(require('./documentmanifestrelated.input.js')), + description: + 'Related identifiers or resources associated with the DocumentManifest.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/documentmanifestcontent.input.js b/src/resources/1_0_2/inputs/documentmanifestcontent.input.js index cdb92836..43ebd6ef 100644 --- a/src/resources/1_0_2/inputs/documentmanifestcontent.input.js +++ b/src/resources/1_0_2/inputs/documentmanifestcontent.input.js @@ -1,26 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentManifest.content Input Schema + * @summary DocumentManifestcontent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentManifestContent_Input', - description: 'The list of Documents included in the manifest.', - fields: () => - extendSchema(require('./backboneelement.input'), { - pAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', - }, - pReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', - }, - }), + name: 'DocumentManifestcontent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + pAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + }, + pReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/documentmanifestrelated.input.js b/src/resources/1_0_2/inputs/documentmanifestrelated.input.js index c66bcb93..165ae082 100644 --- a/src/resources/1_0_2/inputs/documentmanifestrelated.input.js +++ b/src/resources/1_0_2/inputs/documentmanifestrelated.input.js @@ -1,27 +1,47 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentManifest.related Input Schema + * @summary DocumentManifestrelated Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentManifestRelated_Input', - description: - 'Related identifiers or resources associated with the DocumentManifest.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', - }, - ref: { - type: require('./reference.input'), - description: - 'Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.', - }, - }), + name: 'DocumentManifestrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', + }, + ref: { + type: GraphQLString, + description: + 'Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/documentreference.input.js b/src/resources/1_0_2/inputs/documentreference.input.js index bd9b5427..5a048a6a 100644 --- a/src/resources/1_0_2/inputs/documentreference.input.js +++ b/src/resources/1_0_2/inputs/documentreference.input.js @@ -1,23 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -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 DocumentReferenceResourceInputType = new GraphQLEnumType({ - name: 'DocumentReferenceResourceInputType', - values: { - DocumentReference: { value: 'DocumentReference' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -25,116 +17,173 @@ let DocumentReferenceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DocumentReference_Input', - description: 'Base StructureDefinition for DocumentReference Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DocumentReferenceResourceInputType), - description: 'Type of this resource.', - }, - masterIdentifier: { - type: require('./identifier.input'), - description: - 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Other identifiers associated with the document, including version independent identifiers.', - }, - subject: { - type: require('./reference.input'), - description: - 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-classcodes - class: { - type: require('./codeableconcept.input'), - description: - 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', - }, - author: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies who is responsible for adding the information to the document.', - }, - custodian: { - type: require('./reference.input'), - description: - 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', - }, - authenticator: { - type: require('./reference.input'), - description: - 'Which person or organization authenticates that this document is valid.', - }, - created: { - type: DateTimeScalar, - description: 'When the document was created.', - }, - _created: { - type: require('./element.input'), - description: 'When the document was created.', - }, - indexed: { - type: new GraphQLNonNull(InstantScalar), - description: 'When the document reference was created.', - }, - _indexed: { - type: require('./element.input'), - description: 'When the document reference was created.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of this document reference.', - }, - _status: { - type: require('./element.input'), - description: 'The status of this document reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-status - docStatus: { - type: require('./codeableconcept.input'), - description: 'The status of the underlying document.', - }, - relatesTo: { - type: new GraphQLList(require('./documentreferencerelatesto.input')), - description: - 'Relationships that this document has with other document references that already exist.', - }, - description: { - type: GraphQLString, - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - _description: { - type: require('./element.input'), - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", - }, - content: { - type: new GraphQLList( - new GraphQLNonNull(require('./documentreferencecontent.input')), - ), - description: - 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', - }, - context: { - type: require('./documentreferencecontext.input'), - description: 'The clinical context in which the document was prepared.', - }, - }), + description: 'Base StructureDefinition for DocumentReference Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentReference_Enum_input', + values: { DocumentReference: { value: 'DocumentReference' } }, + }), + ), + 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.', + }, + masterIdentifier: { + type: require('./identifier.input.js'), + description: + 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Other identifiers associated with the document, including version independent identifiers.', + }, + subject: { + type: GraphQLString, + description: + 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-classcodes + class: { + type: require('./codeableconcept.input.js'), + description: + 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies who is responsible for adding the information to the document.', + }, + custodian: { + type: GraphQLString, + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', + }, + authenticator: { + type: GraphQLString, + description: + 'Which person or organization authenticates that this document is valid.', + }, + _created: { + type: require('./element.input.js'), + description: 'When the document was created.', + }, + created: { + type: DateTimeScalar, + description: 'When the document was created.', + }, + _indexed: { + type: require('./element.input.js'), + description: 'When the document reference was created.', + }, + indexed: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the document reference was created.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this document reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-status + docStatus: { + type: require('./codeableconcept.input.js'), + description: 'The status of the underlying document.', + }, + relatesTo: { + type: new GraphQLList(require('./documentreferencerelatesto.input.js')), + description: + 'Relationships that this document has with other document references that already exist.', + }, + _description: { + type: require('./element.input.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentreferencecontent.input.js')), + ), + description: + 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', + }, + context: { + type: require('./documentreferencecontext.input.js'), + description: 'The clinical context in which the document was prepared.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/documentreferencecontent.input.js b/src/resources/1_0_2/inputs/documentreferencecontent.input.js index 34d61c42..495e5287 100644 --- a/src/resources/1_0_2/inputs/documentreferencecontent.input.js +++ b/src/resources/1_0_2/inputs/documentreferencecontent.input.js @@ -1,32 +1,48 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentReference.content Input Schema + * @summary DocumentReferencecontent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentReferenceContent_Input', - description: - 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', - fields: () => - extendSchema(require('./backboneelement.input'), { - attachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The document or url of the document along with critical metadata to prove content has integrity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/formatcodes - format: { - type: new GraphQLList(require('./coding.input')), - description: - 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', - }, - }), + name: 'DocumentReferencecontent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + attachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The document or url of the document along with critical metadata to prove content has integrity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/formatcodes + format: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/documentreferencecontext.input.js b/src/resources/1_0_2/inputs/documentreferencecontext.input.js index 8ccf5415..9f5a8a7a 100644 --- a/src/resources/1_0_2/inputs/documentreferencecontext.input.js +++ b/src/resources/1_0_2/inputs/documentreferencecontext.input.js @@ -1,55 +1,76 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentReference.context Input Schema + * @summary DocumentReferencecontext Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentReferenceContext_Input', - description: 'The clinical context in which the document was prepared.', - fields: () => - extendSchema(require('./backboneelement.input'), { - encounter: { - type: require('./reference.input'), - description: - 'Describes the clinical encounter or type of care that the document content is associated with.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode - event: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", - }, - period: { - type: require('./period.input'), - description: - 'The time period over which the service that is described by the document was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-facilitycodes - facilityType: { - type: require('./codeableconcept.input'), - description: 'The kind of facility where the patient was seen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - practiceSetting: { - type: require('./codeableconcept.input'), - description: - 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', - }, - sourcePatientInfo: { - type: require('./reference.input'), - description: - 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', - }, - related: { - type: new GraphQLList( - require('./documentreferencecontextrelated.input'), - ), - description: - 'Related identifiers or resources associated with the DocumentReference.', - }, - }), + name: 'DocumentReferencecontext_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + encounter: { + type: GraphQLString, + description: + 'Describes the clinical encounter or type of care that the document content is associated with.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode + event: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.input.js'), + description: + 'The time period over which the service that is described by the document was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-facilitycodes + facilityType: { + type: require('./codeableconcept.input.js'), + description: 'The kind of facility where the patient was seen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + practiceSetting: { + type: require('./codeableconcept.input.js'), + description: + 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', + }, + sourcePatientInfo: { + type: GraphQLString, + description: + 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', + }, + related: { + type: new GraphQLList( + require('./documentreferencecontextrelated.input.js'), + ), + description: + 'Related identifiers or resources associated with the DocumentReference.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/documentreferencecontextrelated.input.js b/src/resources/1_0_2/inputs/documentreferencecontextrelated.input.js index 656337cd..c65b4904 100644 --- a/src/resources/1_0_2/inputs/documentreferencecontextrelated.input.js +++ b/src/resources/1_0_2/inputs/documentreferencecontextrelated.input.js @@ -1,27 +1,47 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentReference.context.related Input Schema + * @summary DocumentReferencecontextrelated Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentReferenceContextRelated_Input', - description: - 'Related identifiers or resources associated with the DocumentReference.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.', - }, - ref: { - type: require('./reference.input'), - description: - 'Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.', - }, - }), + name: 'DocumentReferencecontextrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.', + }, + ref: { + type: GraphQLString, + description: + 'Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/documentreferencerelatesto.input.js b/src/resources/1_0_2/inputs/documentreferencerelatesto.input.js index d826ecb7..4360f24d 100644 --- a/src/resources/1_0_2/inputs/documentreferencerelatesto.input.js +++ b/src/resources/1_0_2/inputs/documentreferencerelatesto.input.js @@ -1,33 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary DocumentReference.relatesTo Input Schema + * @summary DocumentReferencerelatesTo Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentReferenceRelatesTo_Input', - description: - 'Relationships that this document has with other document references that already exist.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of relationship that this document has with anther document.', - }, - _code: { - type: require('./element.input'), - description: - 'The type of relationship that this document has with anther document.', - }, - target: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The target document of this relationship.', - }, - }), + name: 'DocumentReferencerelatesTo_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The type of relationship that this document has with anther document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this document has with anther document.', + }, + target: { + type: new GraphQLNonNull(GraphQLString), + description: 'The target document of this relationship.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/domainresource.input.js b/src/resources/1_0_2/inputs/domainresource.input.js index 9e733bdc..51bfda25 100644 --- a/src/resources/1_0_2/inputs/domainresource.input.js +++ b/src/resources/1_0_2/inputs/domainresource.input.js @@ -1,20 +1,13 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, - GraphQLString, GraphQLNonNull, + GraphQLEnumType, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DomainResourceResourceInputType = new GraphQLEnumType({ - name: 'DomainResourceResourceInputType', - values: { - DomainResource: { value: 'DomainResource' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,32 +15,69 @@ let DomainResourceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DomainResource_Input', - description: 'Base StructureDefinition for DomainResource Resource.', - fields: () => - extendSchema(require('./resource.input'), { - resourceType: { - type: new GraphQLNonNull(DomainResourceResourceInputType), - description: 'Type of this resource.', - }, - text: { - type: require('./narrative.input'), - 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')), - 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')), - 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.', - }, - }), + description: 'Base StructureDefinition for DomainResource Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DomainResource_Enum_input', + values: { DomainResource: { value: 'DomainResource' } }, + }), + ), + 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.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/duration.input.js b/src/resources/1_0_2/inputs/duration.input.js index 78c790ae..0d03386d 100644 --- a/src/resources/1_0_2/inputs/duration.input.js +++ b/src/resources/1_0_2/inputs/duration.input.js @@ -1,14 +1,11 @@ const { GraphQLInputObjectType } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Duration Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'Duration_Input', - description: 'A length of time.', - fields: () => extendSchema(require('./quantity.input')), + description: 'A length of time', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/inputs/element.input.js b/src/resources/1_0_2/inputs/element.input.js index 2694f909..e7a4f7c2 100644 --- a/src/resources/1_0_2/inputs/element.input.js +++ b/src/resources/1_0_2/inputs/element.input.js @@ -1,8 +1,5 @@ -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -10,23 +7,22 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Element_Input', - description: 'Base StructureDefinition for Element Type.', - fields: () => - extendSchema({ - id: { - type: IdScalar, - description: - 'unique id for the element within a resource (for internal references).', - }, - _id: { - type: require('./element.input'), - description: - 'unique id for the element within a resource (for internal references).', - }, - extension: { - type: new GraphQLList(require('./extension.input')), - description: - 'May be used to represent additional information that is not part of the basic definition of the element. 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.', - }, - }), + description: 'Base StructureDefinition for Element Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/elementdefinition.input.js b/src/resources/1_0_2/inputs/elementdefinition.input.js index 11d89df7..a5081669 100644 --- a/src/resources/1_0_2/inputs/elementdefinition.input.js +++ b/src/resources/1_0_2/inputs/elementdefinition.input.js @@ -1,26 +1,23 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, GraphQLInt, GraphQLBoolean, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -28,1695 +25,1709 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'ElementDefinition_Input', - description: 'Base StructureDefinition for ElementDefinition Type.', - fields: () => - extendSchema(require('./element.input'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", - }, - _path: { - type: require('./element.input'), - description: - "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/property-representation - representation: { - type: new GraphQLList(CodeScalar), - description: - 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', - }, - _representation: { - type: require('./element.input'), - description: - 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', - }, - name: { - type: GraphQLString, - description: - 'The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.', - }, - label: { - type: GraphQLString, - description: - 'The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', - }, - _label: { - type: require('./element.input'), - description: - 'The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLList(require('./coding.input')), - description: - 'A code that provides the meaning for the element according to a particular terminology.', - }, - slicing: { - type: require('./elementdefinitionslicing.input'), - description: - 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', - }, - short: { - type: GraphQLString, - description: - 'A concise description of what this element means (e.g. for use in autogenerated summaries).', - }, - _short: { - type: require('./element.input'), - description: - 'A concise description of what this element means (e.g. for use in autogenerated summaries).', - }, - definition: { - type: GraphQLString, - description: - 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', - }, - _definition: { - type: require('./element.input'), - description: - 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', - }, - comments: { - type: GraphQLString, - description: - 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', - }, - _comments: { - type: require('./element.input'), - description: - 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', - }, - requirements: { - type: GraphQLString, - description: - 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', - }, - _requirements: { - type: require('./element.input'), - description: - 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', - }, - alias: { - type: new GraphQLList(GraphQLString), - description: - 'Identifies additional names by which this element might also be known.', - }, - _alias: { - type: require('./element.input'), - description: - 'Identifies additional names by which this element might also be known.', - }, - min: { - type: GraphQLInt, - description: - 'The minimum number of times this element SHALL appear in the instance.', - }, - _min: { - type: require('./element.input'), - description: - 'The minimum number of times this element SHALL appear in the instance.', - }, - max: { - type: GraphQLString, - description: - 'The maximum number of times this element is permitted to appear in the instance.', - }, - _max: { - type: require('./element.input'), - description: - 'The maximum number of times this element is permitted to appear in the instance.', - }, - base: { - type: require('./elementdefinitionbase.input'), - description: - 'Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.', - }, - type: { - type: new GraphQLList(require('./elementdefinitiontype.input')), - description: - 'The data type or resource that the value of this element is permitted to be.', - }, - nameReference: { - type: GraphQLString, - description: - 'Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.', - }, - _nameReference: { - type: require('./element.input'), - description: - 'Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.', - }, - defaultValueBoolean: { - type: GraphQLBoolean, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueBoolean: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueInteger: { - type: GraphQLInt, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueInteger: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDecimal: { - type: GraphQLFloat, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDecimal: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueBase64Binary: { - type: Base64BinaryScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueBase64Binary: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueInstant: { - type: InstantScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueInstant: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueString: { - type: GraphQLString, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueString: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueUri: { - type: UriScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueUri: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDate: { - type: DateScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDate: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDateTime: { - type: DateTimeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDateTime: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueTime: { - type: TimeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueTime: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCode: { - type: CodeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueCode: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueOid: { - type: OidScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueOid: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueId: { - type: IdScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueId: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueUnsignedInt: { - type: UnsignedIntScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueUnsignedInt: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValuePositiveInt: { - type: PositiveIntScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValuePositiveInt: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMarkdown: { - type: GraphQLString, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueMarkdown: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAnnotation: { - type: require('./annotation.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAttachment: { - type: require('./attachment.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueIdentifier: { - type: require('./identifier.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCoding: { - type: require('./coding.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueQuantity: { - type: require('./quantity.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueRange: { - type: require('./range.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValuePeriod: { - type: require('./period.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueRatio: { - type: require('./ratio.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueSampledData: { - type: require('./sampleddata.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueSignature: { - type: require('./signature.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueHumanName: { - type: require('./humanname.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAddress: { - type: require('./address.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueContactPoint: { - type: require('./contactpoint.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueTiming: { - type: require('./timing.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueReference: { - type: require('./reference.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMeta: { - type: require('./meta.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - meaningWhenMissing: { - type: GraphQLString, - description: - "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", - }, - _meaningWhenMissing: { - type: require('./element.input'), - description: - "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", - }, - fixedBoolean: { - type: GraphQLBoolean, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedBoolean: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedInteger: { - type: GraphQLInt, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedInteger: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDecimal: { - type: GraphQLFloat, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDecimal: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedBase64Binary: { - type: Base64BinaryScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedBase64Binary: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedInstant: { - type: InstantScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedInstant: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedString: { - type: GraphQLString, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedString: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedUri: { - type: UriScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedUri: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDate: { - type: DateScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDate: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDateTime: { - type: DateTimeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDateTime: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedTime: { - type: TimeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedTime: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCode: { - type: CodeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedCode: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedOid: { - type: OidScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedOid: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedId: { - type: IdScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedId: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedUnsignedInt: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedPositiveInt: { - type: PositiveIntScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedPositiveInt: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMarkdown: { - type: GraphQLString, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedMarkdown: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAnnotation: { - type: require('./annotation.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAttachment: { - type: require('./attachment.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedIdentifier: { - type: require('./identifier.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCoding: { - type: require('./coding.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedQuantity: { - type: require('./quantity.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedRange: { - type: require('./range.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedPeriod: { - type: require('./period.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedRatio: { - type: require('./ratio.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedSampledData: { - type: require('./sampleddata.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedSignature: { - type: require('./signature.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedHumanName: { - type: require('./humanname.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAddress: { - type: require('./address.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedContactPoint: { - type: require('./contactpoint.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedTiming: { - type: require('./timing.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedReference: { - type: require('./reference.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMeta: { - type: require('./meta.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - patternBoolean: { - type: GraphQLBoolean, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternBoolean: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternInteger: { - type: GraphQLInt, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternInteger: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDecimal: { - type: GraphQLFloat, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDecimal: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternBase64Binary: { - type: Base64BinaryScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternBase64Binary: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternInstant: { - type: InstantScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternInstant: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternString: { - type: GraphQLString, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternString: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternUri: { - type: UriScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternUri: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDate: { - type: DateScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDate: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDateTime: { - type: DateTimeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDateTime: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternTime: { - type: TimeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternTime: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCode: { - type: CodeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternCode: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternOid: { - type: OidScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternOid: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternId: { - type: IdScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternId: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternUnsignedInt: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternPositiveInt: { - type: PositiveIntScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternPositiveInt: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMarkdown: { - type: GraphQLString, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternMarkdown: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAnnotation: { - type: require('./annotation.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAttachment: { - type: require('./attachment.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternIdentifier: { - type: require('./identifier.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCoding: { - type: require('./coding.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternQuantity: { - type: require('./quantity.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternRange: { - type: require('./range.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternPeriod: { - type: require('./period.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternRatio: { - type: require('./ratio.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternSampledData: { - type: require('./sampleddata.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternSignature: { - type: require('./signature.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternHumanName: { - type: require('./humanname.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAddress: { - type: require('./address.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternContactPoint: { - type: require('./contactpoint.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternTiming: { - type: require('./timing.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternReference: { - type: require('./reference.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMeta: { - type: require('./meta.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - exampleBoolean: { - type: GraphQLBoolean, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleBoolean: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleInteger: { - type: GraphQLInt, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleInteger: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleDecimal: { - type: GraphQLFloat, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleDecimal: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleBase64Binary: { - type: Base64BinaryScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleBase64Binary: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleInstant: { - type: InstantScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleInstant: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleString: { - type: GraphQLString, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleString: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleUri: { - type: UriScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleUri: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleDate: { - type: DateScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleDate: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleDateTime: { - type: DateTimeScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleDateTime: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleTime: { - type: TimeScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleTime: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleCode: { - type: CodeScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleCode: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleOid: { - type: OidScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleOid: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleId: { - type: IdScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleId: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleUnsignedInt: { - type: UnsignedIntScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleUnsignedInt: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - examplePositiveInt: { - type: PositiveIntScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _examplePositiveInt: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleMarkdown: { - type: GraphQLString, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleMarkdown: { - type: require('./element.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleAnnotation: { - type: require('./annotation.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleAttachment: { - type: require('./attachment.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleIdentifier: { - type: require('./identifier.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleCoding: { - type: require('./coding.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleQuantity: { - type: require('./quantity.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleRange: { - type: require('./range.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - examplePeriod: { - type: require('./period.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleRatio: { - type: require('./ratio.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleSampledData: { - type: require('./sampleddata.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleSignature: { - type: require('./signature.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleHumanName: { - type: require('./humanname.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleAddress: { - type: require('./address.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleContactPoint: { - type: require('./contactpoint.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleTiming: { - type: require('./timing.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleReference: { - type: require('./reference.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleMeta: { - type: require('./meta.input'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - minValueBoolean: { - type: GraphQLBoolean, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueBoolean: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueInteger: { - type: GraphQLInt, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueInteger: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDecimal: { - type: GraphQLFloat, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDecimal: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueBase64Binary: { - type: Base64BinaryScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueBase64Binary: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueInstant: { - type: InstantScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueInstant: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueString: { - type: GraphQLString, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueString: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueUri: { - type: UriScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueUri: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDate: { - type: DateScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDate: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDateTime: { - type: DateTimeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDateTime: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueTime: { - type: TimeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueTime: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueCode: { - type: CodeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueCode: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueOid: { - type: OidScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueOid: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueId: { - type: IdScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueId: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueUnsignedInt: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValuePositiveInt: { - type: PositiveIntScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValuePositiveInt: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueMarkdown: { - type: GraphQLString, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueMarkdown: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueAnnotation: { - type: require('./annotation.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueAttachment: { - type: require('./attachment.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueIdentifier: { - type: require('./identifier.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueCoding: { - type: require('./coding.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueQuantity: { - type: require('./quantity.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueRange: { - type: require('./range.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValuePeriod: { - type: require('./period.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueRatio: { - type: require('./ratio.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueSampledData: { - type: require('./sampleddata.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueSignature: { - type: require('./signature.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueHumanName: { - type: require('./humanname.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueAddress: { - type: require('./address.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueContactPoint: { - type: require('./contactpoint.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueTiming: { - type: require('./timing.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueReference: { - type: require('./reference.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueMeta: { - type: require('./meta.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueBoolean: { - type: GraphQLBoolean, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueBoolean: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueInteger: { - type: GraphQLInt, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueInteger: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDecimal: { - type: GraphQLFloat, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDecimal: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueBase64Binary: { - type: Base64BinaryScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueBase64Binary: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueInstant: { - type: InstantScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueInstant: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueString: { - type: GraphQLString, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueString: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueUri: { - type: UriScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueUri: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDate: { - type: DateScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDate: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDateTime: { - type: DateTimeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDateTime: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueTime: { - type: TimeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueTime: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueCode: { - type: CodeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueCode: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueOid: { - type: OidScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueOid: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueId: { - type: IdScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueId: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueUnsignedInt: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValuePositiveInt: { - type: PositiveIntScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValuePositiveInt: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueMarkdown: { - type: GraphQLString, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueMarkdown: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueAnnotation: { - type: require('./annotation.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueAttachment: { - type: require('./attachment.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueIdentifier: { - type: require('./identifier.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueCoding: { - type: require('./coding.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueQuantity: { - type: require('./quantity.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueRange: { - type: require('./range.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValuePeriod: { - type: require('./period.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueRatio: { - type: require('./ratio.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueSampledData: { - type: require('./sampleddata.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueSignature: { - type: require('./signature.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueHumanName: { - type: require('./humanname.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueAddress: { - type: require('./address.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueContactPoint: { - type: require('./contactpoint.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueTiming: { - type: require('./timing.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueReference: { - type: require('./reference.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueMeta: { - type: require('./meta.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxLength: { - type: GraphQLInt, - description: - 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', - }, - _maxLength: { - type: require('./element.input'), - description: - 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', - }, - condition: { - type: new GraphQLList(IdScalar), - description: - 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', - }, - _condition: { - type: require('./element.input'), - description: - 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', - }, - constraint: { - type: new GraphQLList(require('./elementdefinitionconstraint.input')), - description: - 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', - }, - mustSupport: { - type: GraphQLBoolean, - description: - "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", - }, - _mustSupport: { - type: require('./element.input'), - description: - "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", - }, - isModifier: { - type: GraphQLBoolean, - description: - 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', - }, - _isModifier: { - type: require('./element.input'), - description: - 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', - }, - isSummary: { - type: GraphQLBoolean, - description: - 'Whether the element should be included if a client requests a search with the parameter _summary=true.', - }, - _isSummary: { - type: require('./element.input'), - description: - 'Whether the element should be included if a client requests a search with the parameter _summary=true.', - }, - binding: { - type: require('./elementdefinitionbinding.input'), - description: - 'Binds to a value set if this element is coded (code, Coding, CodeableConcept).', - }, - mapping: { - type: new GraphQLList(require('./elementdefinitionmapping.input')), - description: - 'Identifies a concept from an external specification that roughly corresponds to this element.', - }, - }), + description: 'Base StructureDefinition for ElementDefinition Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _path: { + type: require('./element.input.js'), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + _representation: { + type: require('./element.input.js'), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/property-representation + representation: { + type: new GraphQLList(CodeScalar), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.', + }, + name: { + type: GraphQLString, + description: + 'The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.', + }, + _label: { + type: require('./element.input.js'), + description: + 'The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + label: { + type: GraphQLString, + description: + 'The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A code that provides the meaning for the element according to a particular terminology.', + }, + slicing: { + type: require('./element.input.js'), + description: + 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', + }, + _short: { + type: require('./element.input.js'), + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + short: { + type: GraphQLString, + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + _definition: { + type: require('./element.input.js'), + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', + }, + definition: { + type: GraphQLString, + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', + }, + _comments: { + type: require('./element.input.js'), + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', + }, + comments: { + type: GraphQLString, + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', + }, + _requirements: { + type: require('./element.input.js'), + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + requirements: { + type: GraphQLString, + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'Identifies additional names by which this element might also be known.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies additional names by which this element might also be known.', + }, + _min: { + type: require('./element.input.js'), + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + min: { + type: GraphQLInt, + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + _max: { + type: require('./element.input.js'), + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + base: { + type: require('./element.input.js'), + description: + 'Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.', + }, + type: { + type: new GraphQLList(require('./element.input.js')), + description: + 'The data type or resource that the value of this element is permitted to be.', + }, + _nameReference: { + type: require('./element.input.js'), + description: + 'Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.', + }, + nameReference: { + type: GraphQLString, + description: + 'Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.', + }, + _defaultValueBoolean: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInteger: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInteger: { + type: GraphQLInt, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDecimal: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueBase64Binary: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInstant: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInstant: { + type: InstantScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueString: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueString: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUri: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUri: { + type: UriScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDate: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDate: { + type: DateScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDateTime: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueTime: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTime: { + type: TimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueCode: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCode: { + type: CodeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueOid: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueOid: { + type: OidScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueId: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueId: { + type: IdScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUnsignedInt: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValuePositiveInt: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueMarkdown: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAnnotation: { + type: require('./annotation.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAttachment: { + type: require('./attachment.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueIdentifier: { + type: require('./identifier.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCoding: { + type: require('./coding.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueQuantity: { + type: require('./quantity.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRange: { + type: require('./range.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePeriod: { + type: require('./period.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRatio: { + type: require('./ratio.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSampledData: { + type: require('./sampleddata.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSignature: { + type: require('./signature.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueHumanName: { + type: require('./humanname.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAddress: { + type: require('./address.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContactPoint: { + type: require('./contactpoint.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTiming: { + type: require('./timing.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueReference: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMeta: { + type: require('./meta.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _meaningWhenMissing: { + type: require('./element.input.js'), + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", + }, + meaningWhenMissing: { + type: GraphQLString, + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", + }, + _fixedBoolean: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInteger: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInteger: { + type: GraphQLInt, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDecimal: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedBase64Binary: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInstant: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInstant: { + type: InstantScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedString: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedString: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUri: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUri: { + type: UriScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDate: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDate: { + type: DateScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDateTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTime: { + type: TimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedCode: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCode: { + type: CodeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedOid: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedOid: { + type: OidScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedId: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedId: { + type: IdScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUnsignedInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedPositiveInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedMarkdown: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAnnotation: { + type: require('./annotation.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAttachment: { + type: require('./attachment.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedIdentifier: { + type: require('./identifier.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCoding: { + type: require('./coding.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedQuantity: { + type: require('./quantity.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRange: { + type: require('./range.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPeriod: { + type: require('./period.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRatio: { + type: require('./ratio.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSignature: { + type: require('./signature.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedHumanName: { + type: require('./humanname.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAddress: { + type: require('./address.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTiming: { + type: require('./timing.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedReference: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMeta: { + type: require('./meta.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _patternBoolean: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternInteger: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternInteger: { + type: GraphQLInt, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDecimal: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternBase64Binary: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternInstant: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternInstant: { + type: InstantScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternString: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternString: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternUri: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternUri: { + type: UriScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDate: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDate: { + type: DateScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDateTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternTime: { + type: TimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternCode: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCode: { + type: CodeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternOid: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternOid: { + type: OidScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternId: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternId: { + type: IdScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternUnsignedInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternPositiveInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternMarkdown: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAnnotation: { + type: require('./annotation.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAttachment: { + type: require('./attachment.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternIdentifier: { + type: require('./identifier.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCoding: { + type: require('./coding.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternQuantity: { + type: require('./quantity.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternRange: { + type: require('./range.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternPeriod: { + type: require('./period.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternRatio: { + type: require('./ratio.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternSignature: { + type: require('./signature.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternHumanName: { + type: require('./humanname.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAddress: { + type: require('./address.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternTiming: { + type: require('./timing.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternReference: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMeta: { + type: require('./meta.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _exampleBoolean: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleBoolean: { + type: GraphQLBoolean, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleInteger: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleInteger: { + type: GraphQLInt, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleDecimal: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleDecimal: { + type: GraphQLFloat, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleBase64Binary: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleBase64Binary: { + type: Base64BinaryScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleInstant: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleInstant: { + type: InstantScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleString: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleString: { + type: GraphQLString, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleUri: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleUri: { + type: UriScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleDate: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleDate: { + type: DateScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleDateTime: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleDateTime: { + type: DateTimeScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleTime: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleTime: { + type: TimeScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleCode: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleCode: { + type: CodeScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleOid: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleOid: { + type: OidScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleId: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleId: { + type: IdScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleUnsignedInt: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleUnsignedInt: { + type: UnsignedIntScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _examplePositiveInt: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + examplePositiveInt: { + type: PositiveIntScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleMarkdown: { + type: require('./element.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleMarkdown: { + type: GraphQLString, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleAnnotation: { + type: require('./annotation.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleAttachment: { + type: require('./attachment.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleIdentifier: { + type: require('./identifier.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleCoding: { + type: require('./coding.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleQuantity: { + type: require('./quantity.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleRange: { + type: require('./range.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + examplePeriod: { + type: require('./period.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleRatio: { + type: require('./ratio.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleSampledData: { + type: require('./sampleddata.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleSignature: { + type: require('./signature.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleHumanName: { + type: require('./humanname.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleAddress: { + type: require('./address.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleTiming: { + type: require('./timing.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleReference: { + type: GraphQLString, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleMeta: { + type: require('./meta.input.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _minValueBoolean: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueBoolean: { + type: GraphQLBoolean, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInteger: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInteger: { + type: GraphQLInt, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDecimal: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDecimal: { + type: GraphQLFloat, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueBase64Binary: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueBase64Binary: { + type: Base64BinaryScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInstant: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInstant: { + type: InstantScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueString: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueString: { + type: GraphQLString, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueUri: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueUri: { + type: UriScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDate: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDate: { + type: DateScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDateTime: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDateTime: { + type: DateTimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueTime: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueTime: { + type: TimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueCode: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueCode: { + type: CodeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueOid: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueOid: { + type: OidScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueId: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueId: { + type: IdScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueUnsignedInt: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValuePositiveInt: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueMarkdown: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueMarkdown: { + type: GraphQLString, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueAnnotation: { + type: require('./annotation.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueAttachment: { + type: require('./attachment.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueIdentifier: { + type: require('./identifier.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueCoding: { + type: require('./coding.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueQuantity: { + type: require('./quantity.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueRange: { + type: require('./range.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValuePeriod: { + type: require('./period.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueRatio: { + type: require('./ratio.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueSignature: { + type: require('./signature.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueHumanName: { + type: require('./humanname.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueAddress: { + type: require('./address.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueTiming: { + type: require('./timing.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueReference: { + type: GraphQLString, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueMeta: { + type: require('./meta.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueBoolean: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueBoolean: { + type: GraphQLBoolean, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInteger: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInteger: { + type: GraphQLInt, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDecimal: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDecimal: { + type: GraphQLFloat, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueBase64Binary: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueBase64Binary: { + type: Base64BinaryScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInstant: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInstant: { + type: InstantScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueString: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueString: { + type: GraphQLString, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueUri: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueUri: { + type: UriScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDate: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDate: { + type: DateScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDateTime: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDateTime: { + type: DateTimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueTime: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueTime: { + type: TimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueCode: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueCode: { + type: CodeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueOid: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueOid: { + type: OidScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueId: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueId: { + type: IdScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueUnsignedInt: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValuePositiveInt: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueMarkdown: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueMarkdown: { + type: GraphQLString, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueAnnotation: { + type: require('./annotation.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueAttachment: { + type: require('./attachment.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueIdentifier: { + type: require('./identifier.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueCoding: { + type: require('./coding.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueQuantity: { + type: require('./quantity.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueRange: { + type: require('./range.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValuePeriod: { + type: require('./period.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueRatio: { + type: require('./ratio.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueSignature: { + type: require('./signature.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueHumanName: { + type: require('./humanname.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueAddress: { + type: require('./address.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueTiming: { + type: require('./timing.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueReference: { + type: GraphQLString, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueMeta: { + type: require('./meta.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxLength: { + type: require('./element.input.js'), + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + maxLength: { + type: GraphQLInt, + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + _condition: { + type: require('./element.input.js'), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + condition: { + type: new GraphQLList(IdScalar), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + constraint: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', + }, + _mustSupport: { + type: require('./element.input.js'), + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", + }, + mustSupport: { + type: GraphQLBoolean, + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", + }, + _isModifier: { + type: require('./element.input.js'), + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + isModifier: { + type: GraphQLBoolean, + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + _isSummary: { + type: require('./element.input.js'), + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + isSummary: { + type: GraphQLBoolean, + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + binding: { + type: require('./element.input.js'), + description: + 'Binds to a value set if this element is coded (code, Coding, CodeableConcept).', + }, + mapping: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Identifies a concept from an external specification that roughly corresponds to this element.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/elementdefinitionbase.input.js b/src/resources/1_0_2/inputs/elementdefinitionbase.input.js index e113bbdd..b2281ac6 100644 --- a/src/resources/1_0_2/inputs/elementdefinitionbase.input.js +++ b/src/resources/1_0_2/inputs/elementdefinitionbase.input.js @@ -1,52 +1,64 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ElementDefinition.base Input Schema + * @summary ElementDefinitionbase Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionBase_Input', - description: - 'Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.', - fields: () => - extendSchema(require('./element.input'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.', - }, - _path: { - type: require('./element.input'), - description: - 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.', - }, - min: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Minimum cardinality of the base element identified by the path.', - }, - _min: { - type: require('./element.input'), - description: - 'Minimum cardinality of the base element identified by the path.', - }, - max: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Maximum cardinality of the base element identified by the path.', - }, - _max: { - type: require('./element.input'), - description: - 'Maximum cardinality of the base element identified by the path.', - }, - }), + name: 'ElementDefinitionbase_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.', + }, + _min: { + type: require('./element.input.js'), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + min: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + _max: { + type: require('./element.input.js'), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/elementdefinitionbinding.input.js b/src/resources/1_0_2/inputs/elementdefinitionbinding.input.js index 1b2c7a8d..258f1872 100644 --- a/src/resources/1_0_2/inputs/elementdefinitionbinding.input.js +++ b/src/resources/1_0_2/inputs/elementdefinitionbinding.input.js @@ -1,59 +1,71 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.binding Input Schema + * @summary ElementDefinitionbinding Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionBinding_Input', - description: - 'Binds to a value set if this element is coded (code, Coding, CodeableConcept).', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/binding-strength - strength: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - _strength: { - type: require('./element.input'), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - description: { - type: GraphQLString, - description: - 'Describes the intended use of this particular set of codes.', - }, - _description: { - type: require('./element.input'), - description: - 'Describes the intended use of this particular set of codes.', - }, - valueSetUri: { - type: UriScalar, - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - _valueSetUri: { - type: require('./element.input'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - valueSetReference: { - type: require('./reference.input'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - }), + name: 'ElementDefinitionbinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _strength: { + type: require('./element.input.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/binding-strength + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Describes the intended use of this particular set of codes.', + }, + description: { + type: GraphQLString, + description: + 'Describes the intended use of this particular set of codes.', + }, + _valueSetUri: { + type: require('./element.input.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetUri: { + type: UriScalar, + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetReference: { + type: GraphQLString, + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/elementdefinitionconstraint.input.js b/src/resources/1_0_2/inputs/elementdefinitionconstraint.input.js index 636ff496..14fe67df 100644 --- a/src/resources/1_0_2/inputs/elementdefinitionconstraint.input.js +++ b/src/resources/1_0_2/inputs/elementdefinitionconstraint.input.js @@ -1,74 +1,85 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.constraint Input Schema + * @summary ElementDefinitionconstraint Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionConstraint_Input', - description: - 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', - fields: () => - extendSchema(require('./element.input'), { - key: { - type: new GraphQLNonNull(IdScalar), - description: - 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', - }, - _key: { - type: require('./element.input'), - description: - 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', - }, - requirements: { - type: GraphQLString, - description: - 'Description of why this constraint is necessary or appropriate.', - }, - _requirements: { - type: require('./element.input'), - description: - 'Description of why this constraint is necessary or appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/constraint-severity - severity: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the impact constraint violation has on the conformance of the instance.', - }, - _severity: { - type: require('./element.input'), - description: - 'Identifies the impact constraint violation has on the conformance of the instance.', - }, - human: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', - }, - _human: { - type: require('./element.input'), - description: - 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', - }, - xpath: { - type: new GraphQLNonNull(GraphQLString), - description: - 'An XPath expression of constraint that can be executed to see if this constraint is met.', - }, - _xpath: { - type: require('./element.input'), - description: - 'An XPath expression of constraint that can be executed to see if this constraint is met.', - }, - }), + name: 'ElementDefinitionconstraint_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _key: { + type: require('./element.input.js'), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + key: { + type: new GraphQLNonNull(IdScalar), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + _requirements: { + type: require('./element.input.js'), + description: + 'Description of why this constraint is necessary or appropriate.', + }, + requirements: { + type: GraphQLString, + description: + 'Description of why this constraint is necessary or appropriate.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/constraint-severity + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + _human: { + type: require('./element.input.js'), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + human: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + _xpath: { + type: require('./element.input.js'), + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + xpath: { + type: new GraphQLNonNull(GraphQLString), + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/elementdefinitionmapping.input.js b/src/resources/1_0_2/inputs/elementdefinitionmapping.input.js index 97200b48..3ed27e0a 100644 --- a/src/resources/1_0_2/inputs/elementdefinitionmapping.input.js +++ b/src/resources/1_0_2/inputs/elementdefinitionmapping.input.js @@ -1,51 +1,62 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.mapping Input Schema + * @summary ElementDefinitionmapping Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionMapping_Input', - description: - 'Identifies a concept from an external specification that roughly corresponds to this element.', - fields: () => - extendSchema(require('./element.input'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: 'An internal reference to the definition of a mapping.', - }, - _identity: { - type: require('./element.input'), - description: 'An internal reference to the definition of a mapping.', - }, - language: { - type: CodeScalar, - description: - 'Identifies the computable language in which mapping.map is expressed.', - }, - _language: { - type: require('./element.input'), - description: - 'Identifies the computable language in which mapping.map is expressed.', - }, - map: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Expresses what part of the target specification corresponds to this element.', - }, - _map: { - type: require('./element.input'), - description: - 'Expresses what part of the target specification corresponds to this element.', - }, - }), + name: 'ElementDefinitionmapping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _identity: { + type: require('./element.input.js'), + description: 'An internal reference to the definition of a mapping.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: 'An internal reference to the definition of a mapping.', + }, + _language: { + type: require('./element.input.js'), + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + language: { + type: CodeScalar, + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + _map: { + type: require('./element.input.js'), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + map: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/elementdefinitionslicing.input.js b/src/resources/1_0_2/inputs/elementdefinitionslicing.input.js index 205d1804..1d8d0d04 100644 --- a/src/resources/1_0_2/inputs/elementdefinitionslicing.input.js +++ b/src/resources/1_0_2/inputs/elementdefinitionslicing.input.js @@ -1,65 +1,76 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLList, GraphQLString, GraphQLBoolean, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.slicing Input Schema + * @summary ElementDefinitionslicing Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionSlicing_Input', - description: - 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', - fields: () => - extendSchema(require('./element.input'), { - discriminator: { - type: new GraphQLList(GraphQLString), - description: - 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', - }, - _discriminator: { - type: require('./element.input'), - description: - 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', - }, - description: { - type: GraphQLString, - description: - 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', - }, - _description: { - type: require('./element.input'), - description: - 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', - }, - ordered: { - type: GraphQLBoolean, - description: - 'If the matching elements have to occur in the same order as defined in the profile.', - }, - _ordered: { - type: require('./element.input'), - description: - 'If the matching elements have to occur in the same order as defined in the profile.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-slicing-rules - rules: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', - }, - _rules: { - type: require('./element.input'), - description: - 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', - }, - }), + name: 'ElementDefinitionslicing_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _discriminator: { + type: require('./element.input.js'), + description: + 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', + }, + discriminator: { + type: new GraphQLList(GraphQLString), + description: + 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + description: { + type: GraphQLString, + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + _ordered: { + type: require('./element.input.js'), + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + ordered: { + type: GraphQLBoolean, + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + _rules: { + type: require('./element.input.js'), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-slicing-rules + rules: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/elementdefinitiontype.input.js b/src/resources/1_0_2/inputs/elementdefinitiontype.input.js index 0d0d9215..bc5a3c01 100644 --- a/src/resources/1_0_2/inputs/elementdefinitiontype.input.js +++ b/src/resources/1_0_2/inputs/elementdefinitiontype.input.js @@ -1,55 +1,66 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.type Input Schema + * @summary ElementDefinitiontype Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionType_Input', - description: - 'The data type or resource that the value of this element is permitted to be.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Name of Data type or Resource that is a(or the) type used for this element.', - }, - _code: { - type: require('./element.input'), - description: - 'Name of Data type or Resource that is a(or the) type used for this element.', - }, - profile: { - type: new GraphQLList(UriScalar), - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - _profile: { - type: require('./element.input'), - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-aggregation-mode - aggregation: { - type: new GraphQLList(CodeScalar), - description: - 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', - }, - _aggregation: { - type: require('./element.input'), - description: - 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', - }, - }), + name: 'ElementDefinitiontype_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Name of Data type or Resource that is a(or the) type used for this element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Name of Data type or Resource that is a(or the) type used for this element.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + profile: { + type: new GraphQLList(UriScalar), + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + _aggregation: { + type: require('./element.input.js'), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-aggregation-mode + aggregation: { + type: new GraphQLList(CodeScalar), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/eligibilityrequest.input.js b/src/resources/1_0_2/inputs/eligibilityrequest.input.js index 38080b41..4419dc6f 100644 --- a/src/resources/1_0_2/inputs/eligibilityrequest.input.js +++ b/src/resources/1_0_2/inputs/eligibilityrequest.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 EligibilityRequestResourceInputType = new GraphQLEnumType({ - name: 'EligibilityRequestResourceInputType', - values: { - EligibilityRequest: { value: 'EligibilityRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,50 +16,107 @@ let EligibilityRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EligibilityRequest_Input', - description: 'Base StructureDefinition for EligibilityRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EligibilityRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.input'), - description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - }), + description: 'Base StructureDefinition for EligibilityRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EligibilityRequest_Enum_input', + values: { EligibilityRequest: { value: 'EligibilityRequest' } }, + }), + ), + 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: 'The Response business identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/eligibilityresponse.input.js b/src/resources/1_0_2/inputs/eligibilityresponse.input.js index 0c7d2e9f..2cd9870c 100644 --- a/src/resources/1_0_2/inputs/eligibilityresponse.input.js +++ b/src/resources/1_0_2/inputs/eligibilityresponse.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 EligibilityResponseResourceInputType = new GraphQLEnumType({ - name: 'EligibilityResponseResourceInputType', - values: { - EligibilityResponse: { value: 'EligibilityResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,73 +16,130 @@ let EligibilityResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EligibilityResponse_Input', - description: 'Base StructureDefinition for EligibilityResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EligibilityResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.input'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - }), + description: 'Base StructureDefinition for EligibilityResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EligibilityResponse_Enum_input', + values: { EligibilityResponse: { value: 'EligibilityResponse' } }, + }), + ), + 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: 'The Response business identifier.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/encounter.input.js b/src/resources/1_0_2/inputs/encounter.input.js index ae6b1247..f5bd0062 100644 --- a/src/resources/1_0_2/inputs/encounter.input.js +++ b/src/resources/1_0_2/inputs/encounter.input.js @@ -1,21 +1,13 @@ -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 EncounterResourceInputType = new GraphQLEnumType({ - name: 'EncounterResourceInputType', - values: { - Encounter: { value: 'Encounter' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,114 +15,170 @@ let EncounterResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Encounter_Input', - description: 'Base StructureDefinition for Encounter Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EncounterResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier(s) by which this encounter is known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-state - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | arrived | in-progress | onleave | finished | cancelled.', - }, - _status: { - type: require('./element.input'), - description: - 'planned | arrived | in-progress | onleave | finished | cancelled.', - }, - statusHistory: { - type: new GraphQLList(require('./encounterstatushistory.input')), - description: - 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-class - class: { - type: CodeScalar, - description: 'inpatient | outpatient | ambulatory | emergency +.', - }, - _class: { - type: require('./element.input'), - description: 'inpatient | outpatient | ambulatory | emergency +.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-priority - priority: { - type: require('./codeableconcept.input'), - description: 'Indicates the urgency of the encounter.', - }, - patient: { - type: require('./reference.input'), - description: 'The patient present at the encounter.', - }, - episodeOfCare: { - type: new GraphQLList(require('./reference.input')), - description: - 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', - }, - incomingReferral: { - type: new GraphQLList(require('./reference.input')), - description: - 'The referral request this encounter satisfies (incoming referral).', - }, - participant: { - type: new GraphQLList(require('./encounterparticipant.input')), - description: - 'The list of people responsible for providing the service.', - }, - appointment: { - type: require('./reference.input'), - description: 'The appointment that scheduled this encounter.', - }, - period: { - type: require('./period.input'), - description: 'The start and end time of the encounter.', - }, - length: { - type: require('./quantity.input'), - description: - 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', - }, - indication: { - type: new GraphQLList(require('./reference.input')), - description: - 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', - }, - hospitalization: { - type: require('./encounterhospitalization.input'), - description: 'Details about the admission to a healthcare service.', - }, - location: { - type: new GraphQLList(require('./encounterlocation.input')), - description: - 'List of locations where the patient has been during this encounter.', - }, - serviceProvider: { - type: require('./reference.input'), - description: - "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", - }, - partOf: { - type: require('./reference.input'), - description: - 'Another Encounter of which this encounter is a part of (administratively or in time).', - }, - }), + description: 'Base StructureDefinition for Encounter Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Encounter_Enum_input', + values: { Encounter: { value: 'Encounter' } }, + }), + ), + 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: 'Identifier(s) by which this encounter is known.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | arrived | in-progress | onleave | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-state + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | in-progress | onleave | finished | cancelled.', + }, + statusHistory: { + type: new GraphQLList(require('./encounterstatushistory.input.js')), + description: + 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', + }, + _class: { + type: require('./element.input.js'), + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-class + class: { + type: CodeScalar, + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-priority + priority: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the urgency of the encounter.', + }, + patient: { + type: GraphQLString, + description: 'The patient present at the encounter.', + }, + episodeOfCare: { + type: new GraphQLList(GraphQLString), + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + }, + incomingReferral: { + type: new GraphQLList(GraphQLString), + description: + 'The referral request this encounter satisfies (incoming referral).', + }, + participant: { + type: new GraphQLList(require('./encounterparticipant.input.js')), + description: 'The list of people responsible for providing the service.', + }, + appointment: { + type: GraphQLString, + description: 'The appointment that scheduled this encounter.', + }, + period: { + type: require('./period.input.js'), + description: 'The start and end time of the encounter.', + }, + length: { + type: require('./quantity.input.js'), + description: + 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + }, + indication: { + type: new GraphQLList(GraphQLString), + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + hospitalization: { + type: require('./encounterhospitalization.input.js'), + description: 'Details about the admission to a healthcare service.', + }, + location: { + type: new GraphQLList(require('./encounterlocation.input.js')), + description: + 'List of locations where the patient has been during this encounter.', + }, + serviceProvider: { + type: GraphQLString, + description: + "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", + }, + partOf: { + type: GraphQLString, + description: + 'Another Encounter of which this encounter is a part of (administratively or in time).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/encounterhospitalization.input.js b/src/resources/1_0_2/inputs/encounterhospitalization.input.js index 903c0b44..263a31ae 100644 --- a/src/resources/1_0_2/inputs/encounterhospitalization.input.js +++ b/src/resources/1_0_2/inputs/encounterhospitalization.input.js @@ -1,70 +1,90 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Encounter.hospitalization Input Schema + * @summary Encounterhospitalization Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterHospitalization_Input', - description: 'Details about the admission to a healthcare service.', - fields: () => - extendSchema(require('./backboneelement.input'), { - preAdmissionIdentifier: { - type: require('./identifier.input'), - description: 'Pre-admission identifier.', - }, - origin: { - type: require('./reference.input'), - description: - 'The location from which the patient came before admission.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-admit-source - admitSource: { - type: require('./codeableconcept.input'), - description: - 'From where patient was admitted (physician referral, transfer).', - }, - admittingDiagnosis: { - type: new GraphQLList(require('./reference.input')), - description: - 'The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.', - }, - reAdmission: { - type: require('./codeableconcept.input'), - description: - 'Whether this hospitalization is a readmission and why if known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet - dietPreference: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Diet preferences reported by the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-courtesy - specialCourtesy: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Special courtesies (VIP, board member).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-arrangements - specialArrangement: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Wheelchair, translator, stretcher, etc.', - }, - destination: { - type: require('./reference.input'), - description: 'Location to which the patient is discharged.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition - dischargeDisposition: { - type: require('./codeableconcept.input'), - description: 'Category or kind of location after discharge.', - }, - dischargeDiagnosis: { - type: new GraphQLList(require('./reference.input')), - description: - 'The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.', - }, - }), + name: 'Encounterhospitalization_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + preAdmissionIdentifier: { + type: require('./identifier.input.js'), + description: 'Pre-admission identifier.', + }, + origin: { + type: GraphQLString, + description: 'The location from which the patient came before admission.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-admit-source + admitSource: { + type: require('./codeableconcept.input.js'), + description: + 'From where patient was admitted (physician referral, transfer).', + }, + admittingDiagnosis: { + type: new GraphQLList(GraphQLString), + description: + 'The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.', + }, + reAdmission: { + type: require('./codeableconcept.input.js'), + description: + 'Whether this hospitalization is a readmission and why if known.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet + dietPreference: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Diet preferences reported by the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-courtesy + specialCourtesy: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Special courtesies (VIP, board member).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-arrangements + specialArrangement: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Wheelchair, translator, stretcher, etc.', + }, + destination: { + type: GraphQLString, + description: 'Location to which the patient is discharged.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition + dischargeDisposition: { + type: require('./codeableconcept.input.js'), + description: 'Category or kind of location after discharge.', + }, + dischargeDiagnosis: { + type: new GraphQLList(GraphQLString), + description: + 'The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/encounterlocation.input.js b/src/resources/1_0_2/inputs/encounterlocation.input.js index 130d58e2..f1850bf9 100644 --- a/src/resources/1_0_2/inputs/encounterlocation.input.js +++ b/src/resources/1_0_2/inputs/encounterlocation.input.js @@ -1,38 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Encounter.location Input Schema + * @summary Encounterlocation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterLocation_Input', - description: - 'List of locations where the patient has been during this encounter.', - fields: () => - extendSchema(require('./backboneelement.input'), { - location: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The location where the encounter takes place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-location-status - status: { - type: CodeScalar, - description: - "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", - }, - _status: { - type: require('./element.input'), - description: - "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", - }, - period: { - type: require('./period.input'), - description: - 'Time period during which the patient was present at the location.', - }, - }), + name: 'Encounterlocation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + location: { + type: new GraphQLNonNull(GraphQLString), + description: 'The location where the encounter takes place.', + }, + _status: { + type: require('./element.input.js'), + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-location-status + status: { + type: CodeScalar, + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", + }, + period: { + type: require('./period.input.js'), + description: + 'Time period during which the patient was present at the location.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/encounterparticipant.input.js b/src/resources/1_0_2/inputs/encounterparticipant.input.js index 3cffb295..76a60026 100644 --- a/src/resources/1_0_2/inputs/encounterparticipant.input.js +++ b/src/resources/1_0_2/inputs/encounterparticipant.input.js @@ -1,31 +1,51 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Encounter.participant Input Schema + * @summary Encounterparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterParticipant_Input', - description: 'The list of people responsible for providing the service.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Role of participant in encounter.', - }, - period: { - type: require('./period.input'), - description: - 'The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period.', - }, - individual: { - type: require('./reference.input'), - description: - 'Persons involved in the encounter other than the patient.', - }, - }), + name: 'Encounterparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in encounter.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period.', + }, + individual: { + type: GraphQLString, + description: 'Persons involved in the encounter other than the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/encounterstatushistory.input.js b/src/resources/1_0_2/inputs/encounterstatushistory.input.js index cb8aa244..4e3fc262 100644 --- a/src/resources/1_0_2/inputs/encounterstatushistory.input.js +++ b/src/resources/1_0_2/inputs/encounterstatushistory.input.js @@ -1,33 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Encounter.statusHistory Input Schema + * @summary EncounterstatusHistory Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterStatusHistory_Input', - description: - 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-state - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | arrived | in-progress | onleave | finished | cancelled.', - }, - _status: { - type: require('./element.input'), - description: - 'planned | arrived | in-progress | onleave | finished | cancelled.', - }, - period: { - type: new GraphQLNonNull(require('./period.input')), - description: 'The time that the episode was in the specified status.', - }, - }), + name: 'EncounterstatusHistory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | arrived | in-progress | onleave | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-state + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | in-progress | onleave | finished | cancelled.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The time that the episode was in the specified status.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/enrollmentrequest.input.js b/src/resources/1_0_2/inputs/enrollmentrequest.input.js index bb729d54..ab80b619 100644 --- a/src/resources/1_0_2/inputs/enrollmentrequest.input.js +++ b/src/resources/1_0_2/inputs/enrollmentrequest.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 EnrollmentRequestResourceInputType = new GraphQLEnumType({ - name: 'EnrollmentRequestResourceInputType', - values: { - EnrollmentRequest: { value: 'EnrollmentRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,64 +16,121 @@ let EnrollmentRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EnrollmentRequest_Input', - description: 'Base StructureDefinition for EnrollmentRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EnrollmentRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.input'), - description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Patient Resource.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relationship - relationship: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The relationship of the patient to the subscriber.', - }, - }), + description: 'Base StructureDefinition for EnrollmentRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentRequest_Enum_input', + values: { EnrollmentRequest: { value: 'EnrollmentRequest' } }, + }), + ), + 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: 'The Response business identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'Patient Resource.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relationship + relationship: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The relationship of the patient to the subscriber.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/enrollmentresponse.input.js b/src/resources/1_0_2/inputs/enrollmentresponse.input.js index 249753a1..b62fd0f7 100644 --- a/src/resources/1_0_2/inputs/enrollmentresponse.input.js +++ b/src/resources/1_0_2/inputs/enrollmentresponse.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 EnrollmentResponseResourceInputType = new GraphQLEnumType({ - name: 'EnrollmentResponseResourceInputType', - values: { - EnrollmentResponse: { value: 'EnrollmentResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,73 +16,130 @@ let EnrollmentResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EnrollmentResponse_Input', - description: 'Base StructureDefinition for EnrollmentResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EnrollmentResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.input'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - }), + description: 'Base StructureDefinition for EnrollmentResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentResponse_Enum_input', + values: { EnrollmentResponse: { value: 'EnrollmentResponse' } }, + }), + ), + 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: 'The Response business identifier.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/episodeofcare.input.js b/src/resources/1_0_2/inputs/episodeofcare.input.js index 81a25202..2390dd17 100644 --- a/src/resources/1_0_2/inputs/episodeofcare.input.js +++ b/src/resources/1_0_2/inputs/episodeofcare.input.js @@ -1,21 +1,13 @@ -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 EpisodeOfCareResourceInputType = new GraphQLEnumType({ - name: 'EpisodeOfCareResourceInputType', - values: { - EpisodeOfCare: { value: 'EpisodeOfCare' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,71 +15,128 @@ let EpisodeOfCareResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EpisodeOfCare_Input', - description: 'Base StructureDefinition for EpisodeOfCare Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EpisodeOfCareResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier(s) by which this EpisodeOfCare is known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - _status: { - type: require('./element.input'), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - statusHistory: { - type: new GraphQLList(require('./episodeofcarestatushistory.input')), - description: - 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', - }, - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.', - }, - condition: { - type: new GraphQLList(require('./reference.input')), - description: - 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient that this EpisodeOfCare applies to.', - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'The organization that has assumed the specific responsibilities for the specified duration.', - }, - period: { - type: require('./period.input'), - description: - 'The interval during which the managing organization assumes the defined responsibility.', - }, - referralRequest: { - type: new GraphQLList(require('./reference.input')), - description: - 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', - }, - careManager: { - type: require('./reference.input'), - description: - 'The practitioner that is the care manager/care co-ordinator for this patient.', - }, - careTeam: { - type: new GraphQLList(require('./episodeofcarecareteam.input')), - description: - 'The list of practitioners that may be facilitating this episode of care for specific purposes.', - }, - }), + description: 'Base StructureDefinition for EpisodeOfCare Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EpisodeOfCare_Enum_input', + values: { EpisodeOfCare: { value: 'EpisodeOfCare' } }, + }), + ), + 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: 'Identifier(s) by which this EpisodeOfCare is known.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + statusHistory: { + type: new GraphQLList(require('./episodeofcarestatushistory.input.js')), + description: + 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.', + }, + condition: { + type: new GraphQLList(GraphQLString), + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient that this EpisodeOfCare applies to.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization that has assumed the specific responsibilities for the specified duration.', + }, + period: { + type: require('./period.input.js'), + description: + 'The interval during which the managing organization assumes the defined responsibility.', + }, + referralRequest: { + type: new GraphQLList(GraphQLString), + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + }, + careManager: { + type: GraphQLString, + description: + 'The practitioner that is the care manager/care co-ordinator for this patient.', + }, + careTeam: { + type: new GraphQLList(require('./episodeofcarecareteam.input.js')), + description: + 'The list of practitioners that may be facilitating this episode of care for specific purposes.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/episodeofcarecareteam.input.js b/src/resources/1_0_2/inputs/episodeofcarecareteam.input.js index 6231df1a..0ba5af0e 100644 --- a/src/resources/1_0_2/inputs/episodeofcarecareteam.input.js +++ b/src/resources/1_0_2/inputs/episodeofcarecareteam.input.js @@ -1,32 +1,52 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary EpisodeOfCare.careTeam Input Schema + * @summary EpisodeOfCarecareTeam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EpisodeOfCareCareTeam_Input', - description: - 'The list of practitioners that may be facilitating this episode of care for specific purposes.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - role: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The role this team member is taking within this episode of care.', - }, - period: { - type: require('./period.input'), - description: - 'The period of time this practitioner is performing some role within the episode of care.', - }, - member: { - type: require('./reference.input'), - description: 'The practitioner (or Organization) within the team.', - }, - }), + name: 'EpisodeOfCarecareTeam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The role this team member is taking within this episode of care.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time this practitioner is performing some role within the episode of care.', + }, + member: { + type: GraphQLString, + description: 'The practitioner (or Organization) within the team.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/episodeofcarestatushistory.input.js b/src/resources/1_0_2/inputs/episodeofcarestatushistory.input.js index 92728e6f..d14ea030 100644 --- a/src/resources/1_0_2/inputs/episodeofcarestatushistory.input.js +++ b/src/resources/1_0_2/inputs/episodeofcarestatushistory.input.js @@ -1,34 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary EpisodeOfCare.statusHistory Input Schema + * @summary EpisodeOfCarestatusHistory Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EpisodeOfCareStatusHistory_Input', - description: - 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - _status: { - type: require('./element.input'), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - period: { - type: new GraphQLNonNull(require('./period.input')), - description: - 'The period during this EpisodeOfCare that the specific status applied.', - }, - }), + name: 'EpisodeOfCarestatusHistory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + 'The period during this EpisodeOfCare that the specific status applied.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/explanationofbenefit.input.js b/src/resources/1_0_2/inputs/explanationofbenefit.input.js index 10f37cb5..99648a6e 100644 --- a/src/resources/1_0_2/inputs/explanationofbenefit.input.js +++ b/src/resources/1_0_2/inputs/explanationofbenefit.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ExplanationOfBenefitResourceInputType = new GraphQLEnumType({ - name: 'ExplanationOfBenefitResourceInputType', - values: { - ExplanationOfBenefit: { value: 'ExplanationOfBenefit' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,73 +16,130 @@ let ExplanationOfBenefitResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ExplanationOfBenefit_Input', - description: 'Base StructureDefinition for ExplanationOfBenefit Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ExplanationOfBenefitResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.input'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - }), + description: 'Base StructureDefinition for ExplanationOfBenefit Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExplanationOfBenefit_Enum_input', + values: { ExplanationOfBenefit: { value: 'ExplanationOfBenefit' } }, + }), + ), + 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: 'The Response business identifier.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/extension.input.js b/src/resources/1_0_2/inputs/extension.input.js index 2e020d09..3d1b4f99 100644 --- a/src/resources/1_0_2/inputs/extension.input.js +++ b/src/resources/1_0_2/inputs/extension.input.js @@ -1,25 +1,23 @@ -const UriScalar = require('../scalars/uri.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLInt, GraphQLFloat, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -27,263 +25,277 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Extension_Input', - description: 'Base StructureDefinition for Extension Type.', - fields: () => - extendSchema(require('./element.input'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'Source of the definition for the extension code - a logical name or a URL.', - }, - _url: { - type: require('./element.input'), - description: - 'Source of the definition for the extension code - a logical name or a URL.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueBoolean: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueInteger: { - type: GraphQLInt, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueInteger: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDecimal: { - type: GraphQLFloat, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDecimal: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueBase64Binary: { - type: Base64BinaryScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueBase64Binary: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueInstant: { - type: InstantScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueInstant: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueString: { - type: GraphQLString, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueString: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueUri: { - type: UriScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueUri: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDate: { - type: DateScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDate: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueTime: { - type: TimeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueTime: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCode: { - type: CodeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueCode: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueOid: { - type: OidScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueOid: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueId: { - type: IdScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueId: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueUnsignedInt: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valuePositiveInt: { - type: PositiveIntScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valuePositiveInt: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMarkdown: { - type: GraphQLString, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueMarkdown: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAnnotation: { - type: require('./annotation.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueIdentifier: { - type: require('./identifier.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCoding: { - type: require('./coding.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueRange: { - type: require('./range.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valuePeriod: { - type: require('./period.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueRatio: { - type: require('./ratio.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueSampledData: { - type: require('./sampleddata.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueSignature: { - type: require('./signature.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueHumanName: { - type: require('./humanname.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAddress: { - type: require('./address.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueContactPoint: { - type: require('./contactpoint.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueTiming: { - type: require('./timing.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueReference: { - type: require('./reference.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMeta: { - type: require('./meta.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - }), + description: 'Base StructureDefinition for Extension Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueInteger: { + type: GraphQLInt, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueInstant: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueInstant: { + type: InstantScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueString: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueUri: { + type: UriScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDate: { + type: DateScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueTime: { + type: TimeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueCode: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCode: { + type: CodeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueOid: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueOid: { + type: OidScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueId: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueId: { + type: IdScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMarkdown: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAnnotation: { + type: require('./annotation.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueIdentifier: { + type: require('./identifier.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCoding: { + type: require('./coding.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueSignature: { + type: require('./signature.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueHumanName: { + type: require('./humanname.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAddress: { + type: require('./address.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueTiming: { + type: require('./timing.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueReference: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMeta: { + type: require('./meta.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/familymemberhistory.input.js b/src/resources/1_0_2/inputs/familymemberhistory.input.js index 2c82bb92..7f5c61a8 100644 --- a/src/resources/1_0_2/inputs/familymemberhistory.input.js +++ b/src/resources/1_0_2/inputs/familymemberhistory.input.js @@ -1,24 +1,16 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let FamilyMemberHistoryResourceInputType = new GraphQLEnumType({ - name: 'FamilyMemberHistoryResourceInputType', - values: { - FamilyMemberHistory: { value: 'FamilyMemberHistory' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,159 +18,216 @@ let FamilyMemberHistoryResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'FamilyMemberHistory_Input', - description: 'Base StructureDefinition for FamilyMemberHistory Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(FamilyMemberHistoryResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The person who this history concerns.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and possibly time) when the family member history was taken.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and possibly time) when the family member history was taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/history-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code specifying a state of a Family Member History record.', - }, - _status: { - type: require('./element.input'), - description: - 'A code specifying a state of a Family Member History record.', - }, - name: { - type: GraphQLString, - description: - "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", - }, - _name: { - type: require('./element.input'), - description: - "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-FamilyMember - relationship: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The type of relationship this person has to the patient (father, mother, brother etc.).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', - }, - bornPeriod: { - type: require('./period.input'), - description: 'The actual or approximate date of birth of the relative.', - }, - bornDate: { - type: DateScalar, - description: 'The actual or approximate date of birth of the relative.', - }, - _bornDate: { - type: require('./element.input'), - description: 'The actual or approximate date of birth of the relative.', - }, - bornString: { - type: GraphQLString, - description: 'The actual or approximate date of birth of the relative.', - }, - _bornString: { - type: require('./element.input'), - description: 'The actual or approximate date of birth of the relative.', - }, - ageQuantity: { - type: require('./quantity.input'), - description: - 'The actual or approximate age of the relative at the time the family member history is recorded.', - }, - ageRange: { - type: require('./range.input'), - description: - 'The actual or approximate age of the relative at the time the family member history is recorded.', - }, - ageString: { - type: GraphQLString, - description: - 'The actual or approximate age of the relative at the time the family member history is recorded.', - }, - _ageString: { - type: require('./element.input'), - description: - 'The actual or approximate age of the relative at the time the family member history is recorded.', - }, - deceasedBoolean: { - type: GraphQLBoolean, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedBoolean: { - type: require('./element.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedQuantity: { - type: require('./quantity.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedRange: { - type: require('./range.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedDate: { - type: DateScalar, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedDate: { - type: require('./element.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedString: { - type: GraphQLString, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedString: { - type: require('./element.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - note: { - type: require('./annotation.input'), - description: - 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', - }, - condition: { - type: new GraphQLList(require('./familymemberhistorycondition.input')), - description: - 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', - }, - }), + description: 'Base StructureDefinition for FamilyMemberHistory Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'FamilyMemberHistory_Enum_input', + values: { FamilyMemberHistory: { value: 'FamilyMemberHistory' } }, + }), + ), + 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: + 'This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person who this history concerns.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and possibly time) when the family member history was taken.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and possibly time) when the family member history was taken.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying a state of a Family Member History record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/history-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying a state of a Family Member History record.', + }, + _name: { + type: require('./element.input.js'), + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + name: { + type: GraphQLString, + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-FamilyMember + relationship: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The type of relationship this person has to the patient (father, mother, brother etc.).', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', + }, + bornPeriod: { + type: require('./period.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + _bornDate: { + type: require('./element.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornDate: { + type: DateScalar, + description: 'The actual or approximate date of birth of the relative.', + }, + _bornString: { + type: require('./element.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornString: { + type: GraphQLString, + description: 'The actual or approximate date of birth of the relative.', + }, + ageQuantity: { + type: require('./quantity.input.js'), + description: + 'The actual or approximate age of the relative at the time the family member history is recorded.', + }, + ageRange: { + type: require('./range.input.js'), + description: + 'The actual or approximate age of the relative at the time the family member history is recorded.', + }, + _ageString: { + type: require('./element.input.js'), + description: + 'The actual or approximate age of the relative at the time the family member history is recorded.', + }, + ageString: { + type: GraphQLString, + description: + 'The actual or approximate age of the relative at the time the family member history is recorded.', + }, + _deceasedBoolean: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedQuantity: { + type: require('./quantity.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedRange: { + type: require('./range.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedDate: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedDate: { + type: DateScalar, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedString: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedString: { + type: GraphQLString, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + note: { + type: require('./annotation.input.js'), + description: + 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', + }, + condition: { + type: new GraphQLList(require('./familymemberhistorycondition.input.js')), + description: + 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/familymemberhistorycondition.input.js b/src/resources/1_0_2/inputs/familymemberhistorycondition.input.js index 6dfa3e08..9962a3a7 100644 --- a/src/resources/1_0_2/inputs/familymemberhistorycondition.input.js +++ b/src/resources/1_0_2/inputs/familymemberhistorycondition.input.js @@ -1,63 +1,80 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary FamilyMemberHistory.condition Input Schema + * @summary FamilyMemberHistorycondition Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'FamilyMemberHistoryCondition_Input', - description: - 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-outcome - outcome: { - type: require('./codeableconcept.input'), - description: - 'Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.', - }, - onsetQuantity: { - type: require('./quantity.input'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetRange: { - type: require('./range.input'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetPeriod: { - type: require('./period.input'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetString: { - type: GraphQLString, - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - _onsetString: { - type: require('./element.input'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - note: { - type: require('./annotation.input'), - description: - 'An area where general notes can be placed about this specific condition.', - }, - }), + name: 'FamilyMemberHistorycondition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.', + }, + onsetQuantity: { + type: require('./quantity.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetRange: { + type: require('./range.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetPeriod: { + type: require('./period.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + _onsetString: { + type: require('./element.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetString: { + type: GraphQLString, + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + note: { + type: require('./annotation.input.js'), + description: + 'An area where general notes can be placed about this specific condition.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/flag.input.js b/src/resources/1_0_2/inputs/flag.input.js index 11211456..cf388789 100644 --- a/src/resources/1_0_2/inputs/flag.input.js +++ b/src/resources/1_0_2/inputs/flag.input.js @@ -1,21 +1,13 @@ -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 FlagResourceInputType = new GraphQLEnumType({ - name: 'FlagResourceInputType', - values: { - Flag: { value: 'Flag' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,57 +15,113 @@ let FlagResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Flag_Input', - description: 'Base StructureDefinition for Flag Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(FlagResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier assigned to the flag for external use (outside the FHIR environment).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-category - category: { - type: require('./codeableconcept.input'), - description: - 'Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Supports basic workflow.', - }, - _status: { - type: require('./element.input'), - description: 'Supports basic workflow.', - }, - period: { - type: require('./period.input'), - description: - 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The patient, location, group , organization , or practitioner this is about record this flag is associated with.', - }, - encounter: { - type: require('./reference.input'), - description: 'This alert is only relevant during the encounter.', - }, - author: { - type: require('./reference.input'), - description: - 'The person, organization or device that created the flag.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The coded value or textual component of the flag to display to the user.', - }, - }), + description: 'Base StructureDefinition for Flag Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Flag_Enum_input', + values: { Flag: { value: 'Flag' } }, + }), + ), + 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: + 'Identifier assigned to the flag for external use (outside the FHIR environment).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', + }, + _status: { + type: require('./element.input.js'), + description: 'Supports basic workflow.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Supports basic workflow.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient, location, group , organization , or practitioner this is about record this flag is associated with.', + }, + encounter: { + type: GraphQLString, + description: 'This alert is only relevant during the encounter.', + }, + author: { + type: GraphQLString, + description: 'The person, organization or device that created the flag.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The coded value or textual component of the flag to display to the user.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/goal.input.js b/src/resources/1_0_2/inputs/goal.input.js index 66c945aa..21cb5d8f 100644 --- a/src/resources/1_0_2/inputs/goal.input.js +++ b/src/resources/1_0_2/inputs/goal.input.js @@ -1,22 +1,14 @@ -const DateScalar = require('../scalars/date.scalar'); -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 GoalResourceInputType = new GraphQLEnumType({ - name: 'GoalResourceInputType', - values: { - Goal: { value: 'Goal' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,120 +16,177 @@ let GoalResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Goal_Input', - description: 'Base StructureDefinition for Goal Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(GoalResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - subject: { - type: require('./reference.input'), - description: - 'Identifies the patient, group or organization for whom the goal is being established.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - startDate: { - type: DateScalar, - description: - 'The date or event after which the goal should begin being pursued.', - }, - _startDate: { - type: require('./element.input'), - description: - 'The date or event after which the goal should begin being pursued.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - startCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The date or event after which the goal should begin being pursued.', - }, - targetDate: { - type: DateScalar, - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - _targetDate: { - type: require('./element.input'), - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - targetQuantity: { - type: require('./quantity.input'), - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Indicates a category the goal falls within.', - }, - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Human-readable description of a specific desired objective of care.', - }, - _description: { - type: require('./element.input'), - description: - 'Human-readable description of a specific desired objective of care.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the goal has been reached and is still considered relevant.', - }, - _status: { - type: require('./element.input'), - description: - 'Indicates whether the goal has been reached and is still considered relevant.', - }, - statusDate: { - type: DateScalar, - description: - 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', - }, - _statusDate: { - type: require('./element.input'), - description: - 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-status-reason - statusReason: { - type: require('./codeableconcept.input'), - description: 'Captures the reason for the current status.', - }, - author: { - type: require('./reference.input'), - description: - 'Indicates whose goal this is - patient goal, practitioner goal, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-priority - priority: { - type: require('./codeableconcept.input'), - description: - 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', - }, - addresses: { - type: new GraphQLList(require('./reference.input')), - description: - 'The identified conditions and other health record elements that are intended to be addressed by the goal.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: 'Any comments related to the goal.', - }, - outcome: { - type: new GraphQLList(require('./goaloutcome.input')), - description: - 'Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.', - }, - }), + description: 'Base StructureDefinition for Goal Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Goal_Enum_input', + values: { Goal: { value: 'Goal' } }, + }), + ), + 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: + 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + subject: { + type: GraphQLString, + description: + 'Identifies the patient, group or organization for whom the goal is being established.', + }, + _startDate: { + type: require('./element.input.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + startDate: { + type: DateScalar, + description: + 'The date or event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + startCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + _targetDate: { + type: require('./element.input.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + targetDate: { + type: DateScalar, + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + targetQuantity: { + type: require('./quantity.input.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Indicates a category the goal falls within.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Human-readable description of a specific desired objective of care.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Human-readable description of a specific desired objective of care.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Indicates whether the goal has been reached and is still considered relevant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the goal has been reached and is still considered relevant.', + }, + _statusDate: { + type: require('./element.input.js'), + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + statusDate: { + type: DateScalar, + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-status-reason + statusReason: { + type: require('./codeableconcept.input.js'), + description: 'Captures the reason for the current status.', + }, + author: { + type: GraphQLString, + description: + 'Indicates whose goal this is - patient goal, practitioner goal, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-priority + priority: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', + }, + addresses: { + type: new GraphQLList(GraphQLString), + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Any comments related to the goal.', + }, + outcome: { + type: new GraphQLList(require('./goaloutcome.input.js')), + description: + 'Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/goaloutcome.input.js b/src/resources/1_0_2/inputs/goaloutcome.input.js index d9e574d4..24559ab9 100644 --- a/src/resources/1_0_2/inputs/goaloutcome.input.js +++ b/src/resources/1_0_2/inputs/goaloutcome.input.js @@ -1,25 +1,45 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Goal.outcome Input Schema + * @summary Goaloutcome Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GoalOutcome_Input', - description: - 'Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.', - fields: () => - extendSchema(require('./backboneelement.input'), { - resultCodeableConcept: { - type: require('./codeableconcept.input'), - description: "Details of what's changed (or not changed).", - }, - resultReference: { - type: require('./reference.input'), - description: "Details of what's changed (or not changed).", - }, - }), + name: 'Goaloutcome_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + resultCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: "Details of what's changed (or not changed).", + }, + resultReference: { + type: GraphQLString, + description: "Details of what's changed (or not changed).", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/group.input.js b/src/resources/1_0_2/inputs/group.input.js index a9c6a0f5..43b03895 100644 --- a/src/resources/1_0_2/inputs/group.input.js +++ b/src/resources/1_0_2/inputs/group.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GroupResourceInputType = new GraphQLEnumType({ - name: 'GroupResourceInputType', - values: { - Group: { value: 'Group' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -25,71 +17,128 @@ let GroupResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Group_Input', - description: 'Base StructureDefinition for Group Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(GroupResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'A unique business identifier for this group.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/group-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the broad classification of the kind of resources the group includes.', - }, - _type: { - type: require('./element.input'), - description: - 'Identifies the broad classification of the kind of resources the group includes.', - }, - actual: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', - }, - _actual: { - type: require('./element.input'), - description: - 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', - }, - code: { - type: require('./codeableconcept.input'), - description: - "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", - }, - name: { - type: GraphQLString, - description: - 'A label assigned to the group for human identification and communication.', - }, - _name: { - type: require('./element.input'), - description: - 'A label assigned to the group for human identification and communication.', - }, - quantity: { - type: UnsignedIntScalar, - description: - 'A count of the number of resource instances that are part of the group.', - }, - _quantity: { - type: require('./element.input'), - description: - 'A count of the number of resource instances that are part of the group.', - }, - characteristic: { - type: new GraphQLList(require('./groupcharacteristic.input')), - description: 'Identifies the traits shared by members of the group.', - }, - member: { - type: new GraphQLList(require('./groupmember.input')), - description: - 'Identifies the resource instances that are members of the group.', - }, - }), + description: 'Base StructureDefinition for Group Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Group_Enum_input', + values: { Group: { value: 'Group' } }, + }), + ), + 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: 'A unique business identifier for this group.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/group-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + _actual: { + type: require('./element.input.js'), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + actual: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", + }, + _name: { + type: require('./element.input.js'), + description: + 'A label assigned to the group for human identification and communication.', + }, + name: { + type: GraphQLString, + description: + 'A label assigned to the group for human identification and communication.', + }, + _quantity: { + type: require('./element.input.js'), + description: + 'A count of the number of resource instances that are part of the group.', + }, + quantity: { + type: UnsignedIntScalar, + description: + 'A count of the number of resource instances that are part of the group.', + }, + characteristic: { + type: new GraphQLList(require('./groupcharacteristic.input.js')), + description: 'Identifies the traits shared by members of the group.', + }, + member: { + type: new GraphQLList(require('./groupmember.input.js')), + description: + 'Identifies the resource instances that are members of the group.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/groupcharacteristic.input.js b/src/resources/1_0_2/inputs/groupcharacteristic.input.js index 23ad3322..8349baf3 100644 --- a/src/resources/1_0_2/inputs/groupcharacteristic.input.js +++ b/src/resources/1_0_2/inputs/groupcharacteristic.input.js @@ -1,64 +1,82 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Group.characteristic Input Schema + * @summary Groupcharacteristic Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GroupCharacteristic_Input', - description: 'Identifies the traits shared by members of the group.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'A code that identifies the kind of trait being asserted.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - _valueBoolean: { - type: require('./element.input'), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.input')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueRange: { - type: new GraphQLNonNull(require('./range.input')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - exclude: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates the characteristic is one that is NOT held by members of the group.', - }, - _exclude: { - type: require('./element.input'), - description: - 'If true, indicates the characteristic is one that is NOT held by members of the group.', - }, - period: { - type: require('./period.input'), - description: - 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', - }, - }), + name: 'Groupcharacteristic_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code that identifies the kind of trait being asserted.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _exclude: { + type: require('./element.input.js'), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + exclude: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/groupmember.input.js b/src/resources/1_0_2/inputs/groupmember.input.js index 3ff54164..5c49aeb2 100644 --- a/src/resources/1_0_2/inputs/groupmember.input.js +++ b/src/resources/1_0_2/inputs/groupmember.input.js @@ -1,40 +1,58 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Group.member Input Schema + * @summary Groupmember Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GroupMember_Input', - description: - 'Identifies the resource instances that are members of the group.', - fields: () => - extendSchema(require('./backboneelement.input'), { - entity: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', - }, - period: { - type: require('./period.input'), - description: 'The period that the member was in the group, if known.', - }, - inactive: { - type: GraphQLBoolean, - description: - 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', - }, - _inactive: { - type: require('./element.input'), - description: - 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', - }, - }), + name: 'Groupmember_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + entity: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', + }, + period: { + type: require('./period.input.js'), + description: 'The period that the member was in the group, if known.', + }, + _inactive: { + type: require('./element.input.js'), + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + inactive: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/healthcareservice.input.js b/src/resources/1_0_2/inputs/healthcareservice.input.js index f0dd91f4..4da577b8 100644 --- a/src/resources/1_0_2/inputs/healthcareservice.input.js +++ b/src/resources/1_0_2/inputs/healthcareservice.input.js @@ -1,21 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let HealthcareServiceResourceInputType = new GraphQLEnumType({ - name: 'HealthcareServiceResourceInputType', - values: { - HealthcareService: { value: 'HealthcareService' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,161 +16,217 @@ let HealthcareServiceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'HealthcareService_Input', - description: 'Base StructureDefinition for HealthcareService Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(HealthcareServiceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'External identifiers for this item.', - }, - providedBy: { - type: require('./reference.input'), - description: 'The organization that provides this healthcare service.', - }, - serviceCategory: { - type: require('./codeableconcept.input'), - description: - 'Identifies the broad category of service being performed or delivered.', - }, - serviceType: { - type: new GraphQLList(require('./healthcareserviceservicetype.input')), - description: - 'A specific type of service that may be delivered or performed.', - }, - location: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The location where this healthcare service may be provided.', - }, - serviceName: { - type: GraphQLString, - description: - 'Further description of the service as it would be presented to a consumer while searching.', - }, - _serviceName: { - type: require('./element.input'), - description: - 'Further description of the service as it would be presented to a consumer while searching.', - }, - comment: { - type: GraphQLString, - description: - 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', - }, - _comment: { - type: require('./element.input'), - description: - 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', - }, - extraDetails: { - type: GraphQLString, - description: - "Extra details about the service that can't be placed in the other fields.", - }, - _extraDetails: { - type: require('./element.input'), - description: - "Extra details about the service that can't be placed in the other fields.", - }, - photo: { - type: require('./attachment.input'), - description: - 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'List of contacts related to this specific healthcare service.', - }, - coverageArea: { - type: new GraphQLList(require('./reference.input')), - description: - 'The location(s) that this service is available to (not where the service is provided).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-provision-conditions - serviceProvisionCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The code(s) that detail the conditions under which the healthcare service is available/offered.', - }, - eligibility: { - type: require('./codeableconcept.input'), - description: - 'Does this service have specific eligibility requirements that need to be met in order to use the service?.', - }, - eligibilityNote: { - type: GraphQLString, - description: 'Describes the eligibility conditions for the service.', - }, - _eligibilityNote: { - type: require('./element.input'), - description: 'Describes the eligibility conditions for the service.', - }, - programName: { - type: new GraphQLList(GraphQLString), - description: - 'Program Names that can be used to categorize the service.', - }, - _programName: { - type: require('./element.input'), - description: - 'Program Names that can be used to categorize the service.', - }, - characteristic: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Collection of characteristics (attributes).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-referral-method - referralMethod: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', - }, - publicKey: { - type: GraphQLString, - description: - "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", - }, - _publicKey: { - type: require('./element.input'), - description: - "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", - }, - appointmentRequired: { - type: GraphQLBoolean, - description: - 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', - }, - _appointmentRequired: { - type: require('./element.input'), - description: - 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', - }, - availableTime: { - type: new GraphQLList( - require('./healthcareserviceavailabletime.input'), - ), - description: - 'A collection of times that the Service Site is available.', - }, - notAvailable: { - type: new GraphQLList(require('./healthcareservicenotavailable.input')), - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - }, - availabilityExceptions: { - type: GraphQLString, - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - _availabilityExceptions: { - type: require('./element.input'), - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - }), + description: 'Base StructureDefinition for HealthcareService Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'HealthcareService_Enum_input', + values: { HealthcareService: { value: 'HealthcareService' } }, + }), + ), + 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: 'External identifiers for this item.', + }, + providedBy: { + type: GraphQLString, + description: 'The organization that provides this healthcare service.', + }, + serviceCategory: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the broad category of service being performed or delivered.', + }, + serviceType: { + type: new GraphQLList(require('./healthcareserviceservicetype.input.js')), + description: + 'A specific type of service that may be delivered or performed.', + }, + location: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The location where this healthcare service may be provided.', + }, + _serviceName: { + type: require('./element.input.js'), + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + serviceName: { + type: GraphQLString, + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + comment: { + type: GraphQLString, + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + _extraDetails: { + type: require('./element.input.js'), + description: + "Extra details about the service that can't be placed in the other fields.", + }, + extraDetails: { + type: GraphQLString, + description: + "Extra details about the service that can't be placed in the other fields.", + }, + photo: { + type: require('./attachment.input.js'), + description: + 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'List of contacts related to this specific healthcare service.', + }, + coverageArea: { + type: new GraphQLList(GraphQLString), + description: + 'The location(s) that this service is available to (not where the service is provided).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-provision-conditions + serviceProvisionCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The code(s) that detail the conditions under which the healthcare service is available/offered.', + }, + eligibility: { + type: require('./codeableconcept.input.js'), + description: + 'Does this service have specific eligibility requirements that need to be met in order to use the service?', + }, + _eligibilityNote: { + type: require('./element.input.js'), + description: 'Describes the eligibility conditions for the service.', + }, + eligibilityNote: { + type: GraphQLString, + description: 'Describes the eligibility conditions for the service.', + }, + _programName: { + type: require('./element.input.js'), + description: 'Program Names that can be used to categorize the service.', + }, + programName: { + type: new GraphQLList(GraphQLString), + description: 'Program Names that can be used to categorize the service.', + }, + characteristic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Collection of characteristics (attributes).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-referral-method + referralMethod: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', + }, + _publicKey: { + type: require('./element.input.js'), + description: + "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", + }, + publicKey: { + type: GraphQLString, + description: + "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", + }, + _appointmentRequired: { + type: require('./element.input.js'), + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + appointmentRequired: { + type: GraphQLBoolean, + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + availableTime: { + type: new GraphQLList( + require('./healthcareserviceavailabletime.input.js'), + ), + description: 'A collection of times that the Service Site is available.', + }, + notAvailable: { + type: new GraphQLList( + require('./healthcareservicenotavailable.input.js'), + ), + description: + 'The HealthcareService is not available during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.input.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/healthcareserviceavailabletime.input.js b/src/resources/1_0_2/inputs/healthcareserviceavailabletime.input.js index 98cafd9f..75f7af4f 100644 --- a/src/resources/1_0_2/inputs/healthcareserviceavailabletime.input.js +++ b/src/resources/1_0_2/inputs/healthcareserviceavailabletime.input.js @@ -1,63 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLInputObjectType, GraphQLList, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary HealthcareService.availableTime Input Schema + * @summary HealthcareServiceavailableTime Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'HealthcareServiceAvailableTime_Input', - description: 'A collection of times that the Service Site is available.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/days-of-week - daysOfWeek: { - type: new GraphQLList(CodeScalar), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - _daysOfWeek: { - type: require('./element.input'), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - allDay: { - type: GraphQLBoolean, - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - _allDay: { - type: require('./element.input'), - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - availableStartTime: { - type: TimeScalar, - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableStartTime: { - type: require('./element.input'), - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - availableEndTime: { - type: TimeScalar, - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableEndTime: { - type: require('./element.input'), - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - }), + name: 'HealthcareServiceavailableTime_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _daysOfWeek: { + type: require('./element.input.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/days-of-week + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.input.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.input.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.input.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/healthcareservicenotavailable.input.js b/src/resources/1_0_2/inputs/healthcareservicenotavailable.input.js index 34588c08..01bca52e 100644 --- a/src/resources/1_0_2/inputs/healthcareservicenotavailable.input.js +++ b/src/resources/1_0_2/inputs/healthcareservicenotavailable.input.js @@ -1,36 +1,53 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary HealthcareService.notAvailable Input Schema + * @summary HealthcareServicenotAvailable Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'HealthcareServiceNotAvailable_Input', - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - _description: { - type: require('./element.input'), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - during: { - type: require('./period.input'), - description: - 'Service is not available (seasonally or for a public holiday) from this date.', - }, - }), + name: 'HealthcareServicenotAvailable_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.input.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/healthcareserviceservicetype.input.js b/src/resources/1_0_2/inputs/healthcareserviceservicetype.input.js index 934d98b7..473f7178 100644 --- a/src/resources/1_0_2/inputs/healthcareserviceservicetype.input.js +++ b/src/resources/1_0_2/inputs/healthcareserviceservicetype.input.js @@ -1,31 +1,47 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary HealthcareService.serviceType Input Schema + * @summary HealthcareServiceserviceType Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'HealthcareServiceServiceType_Input', - description: 'A specific type of service that may be delivered or performed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The specific type of service being delivered or performed.', - }, - specialty: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Collection of specialties handled by the service site. This is more of a medical term.', - }, - }), + name: 'HealthcareServiceserviceType_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The specific type of service being delivered or performed.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Collection of specialties handled by the service site. This is more of a medical term.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/humanname.input.js b/src/resources/1_0_2/inputs/humanname.input.js index e8c44c8b..386ebedf 100644 --- a/src/resources/1_0_2/inputs/humanname.input.js +++ b/src/resources/1_0_2/inputs/humanname.input.js @@ -1,12 +1,10 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -14,68 +12,82 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'HumanName_Input', - description: 'Base StructureDefinition for HumanName Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/name-use - use: { - type: CodeScalar, - description: 'Identifies the purpose for this name.', - }, - _use: { - type: require('./element.input'), - description: 'Identifies the purpose for this name.', - }, - text: { - type: GraphQLString, - description: 'A full text representation of the name.', - }, - _text: { - type: require('./element.input'), - description: 'A full text representation of the name.', - }, - family: { - type: new GraphQLList(GraphQLString), - description: - 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', - }, - _family: { - type: require('./element.input'), - description: - 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', - }, - given: { - type: new GraphQLList(GraphQLString), - description: 'Given name.', - }, - _given: { - type: require('./element.input'), - description: 'Given name.', - }, - prefix: { - type: new GraphQLList(GraphQLString), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', - }, - _prefix: { - type: require('./element.input'), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', - }, - suffix: { - type: new GraphQLList(GraphQLString), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', - }, - _suffix: { - type: require('./element.input'), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', - }, - period: { - type: require('./period.input'), - description: - 'Indicates the period of time when this name was valid for the named person.', - }, - }), + description: 'Base StructureDefinition for HumanName Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _use: { + type: require('./element.input.js'), + description: 'Identifies the purpose for this name.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/name-use + use: { + type: CodeScalar, + description: 'Identifies the purpose for this name.', + }, + _text: { + type: require('./element.input.js'), + description: 'A full text representation of the name.', + }, + text: { + type: GraphQLString, + description: 'A full text representation of the name.', + }, + _family: { + type: require('./element.input.js'), + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + family: { + type: new GraphQLList(GraphQLString), + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + _given: { + type: require('./element.input.js'), + description: 'Given name.', + }, + given: { + type: new GraphQLList(GraphQLString), + description: 'Given name.', + }, + _prefix: { + type: require('./element.input.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + prefix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + _suffix: { + type: require('./element.input.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + suffix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates the period of time when this name was valid for the named person.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/identifier.input.js b/src/resources/1_0_2/inputs/identifier.input.js index 2ce1f313..832afe3a 100644 --- a/src/resources/1_0_2/inputs/identifier.input.js +++ b/src/resources/1_0_2/inputs/identifier.input.js @@ -1,9 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -11,52 +13,65 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Identifier_Input', - description: 'Base StructureDefinition for Identifier Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-use - use: { - type: CodeScalar, - description: 'The purpose of this identifier.', - }, - _use: { - type: require('./element.input'), - description: 'The purpose of this identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-type - type: { - type: require('./codeableconcept.input'), - description: - 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', - }, - system: { - type: UriScalar, - description: - 'Establishes the namespace in which set of possible id values is unique.', - }, - _system: { - type: require('./element.input'), - description: - 'Establishes the namespace in which set of possible id values is unique.', - }, - value: { - type: GraphQLString, - description: - 'The portion of the identifier typically displayed to the user and which is unique within the context of the system.', - }, - _value: { - type: require('./element.input'), - description: - 'The portion of the identifier typically displayed to the user and which is unique within the context of the system.', - }, - period: { - type: require('./period.input'), - description: - 'Time period during which identifier is/was valid for use.', - }, - assigner: { - type: require('./reference.input'), - description: 'Organization that issued/manages the identifier.', - }, - }), + description: 'Base StructureDefinition for Identifier Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _use: { + type: require('./element.input.js'), + description: 'The purpose of this identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-use + use: { + type: CodeScalar, + description: 'The purpose of this identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Establishes the namespace in which set of possible id values is unique.', + }, + system: { + type: UriScalar, + description: + 'Establishes the namespace in which set of possible id values is unique.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The portion of the identifier typically displayed to the user and which is unique within the context of the system.', + }, + value: { + type: GraphQLString, + description: + 'The portion of the identifier typically displayed to the user and which is unique within the context of the system.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period during which identifier is/was valid for use.', + }, + assigner: { + type: GraphQLString, + description: 'Organization that issued/manages the identifier.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/imagingobjectselection.input.js b/src/resources/1_0_2/inputs/imagingobjectselection.input.js index 145415e4..118b4570 100644 --- a/src/resources/1_0_2/inputs/imagingobjectselection.input.js +++ b/src/resources/1_0_2/inputs/imagingobjectselection.input.js @@ -1,22 +1,15 @@ -const OidScalar = require('../scalars/oid.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ImagingObjectSelectionResourceInputType = new GraphQLEnumType({ - name: 'ImagingObjectSelectionResourceInputType', - values: { - ImagingObjectSelection: { value: 'ImagingObjectSelection' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,65 +17,124 @@ let ImagingObjectSelectionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ImagingObjectSelection_Input', - description: 'Base StructureDefinition for ImagingObjectSelection Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImagingObjectSelectionResourceInputType), - description: 'Type of this resource.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: - 'Instance UID of the DICOM KOS SOP Instances represented in this resource.', - }, - _uid: { - type: require('./element.input'), - description: - 'Instance UID of the DICOM KOS SOP Instances represented in this resource.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/kos-title - title: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The reason for, or significance of, the selection of objects referenced in the resource.', - }, - description: { - type: GraphQLString, - description: - 'Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.', - }, - _description: { - type: require('./element.input'), - description: - 'Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.', - }, - author: { - type: require('./reference.input'), - description: - 'Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.', - }, - authoringTime: { - type: DateTimeScalar, - description: - 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', - }, - _authoringTime: { - type: require('./element.input'), - description: - 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', - }, - study: { - type: new GraphQLList( - new GraphQLNonNull(require('./imagingobjectselectionstudy.input')), - ), - description: - 'Study identity and locating information of the DICOM SOP instances in the selection.', - }, - }), + description: 'Base StructureDefinition for ImagingObjectSelection Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingObjectSelection_Enum_input', + values: { + ImagingObjectSelection: { value: 'ImagingObjectSelection' }, + }, + }), + ), + 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.', + }, + _uid: { + type: require('./element.input.js'), + description: + 'Instance UID of the DICOM KOS SOP Instances represented in this resource.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: + 'Instance UID of the DICOM KOS SOP Instances represented in this resource.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/kos-title + title: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The reason for, or significance of, the selection of objects referenced in the resource.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.', + }, + description: { + type: GraphQLString, + description: + 'Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.', + }, + author: { + type: GraphQLString, + description: + 'Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.', + }, + _authoringTime: { + type: require('./element.input.js'), + description: + 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', + }, + authoringTime: { + type: DateTimeScalar, + description: + 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', + }, + study: { + type: new GraphQLList( + new GraphQLNonNull(require('./imagingobjectselectionstudy.input.js')), + ), + description: + 'Study identity and locating information of the DICOM SOP instances in the selection.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/imagingobjectselectionstudy.input.js b/src/resources/1_0_2/inputs/imagingobjectselectionstudy.input.js index 9a0c4420..52d26a63 100644 --- a/src/resources/1_0_2/inputs/imagingobjectselectionstudy.input.js +++ b/src/resources/1_0_2/inputs/imagingobjectselectionstudy.input.js @@ -1,56 +1,71 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImagingObjectSelection.study Input Schema + * @summary ImagingObjectSelectionstudy Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingObjectSelectionStudy_Input', - description: - 'Study identity and locating information of the DICOM SOP instances in the selection.', - fields: () => - extendSchema(require('./backboneelement.input'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: - 'Study instance UID of the SOP instances in the selection.', - }, - _uid: { - type: require('./element.input'), - description: - 'Study instance UID of the SOP instances in the selection.', - }, - url: { - type: UriScalar, - description: - 'WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.', - }, - _url: { - type: require('./element.input'), - description: - 'WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.', - }, - imagingStudy: { - type: require('./reference.input'), - description: 'Reference to the Imaging Study in FHIR form.', - }, - series: { - type: new GraphQLList( - new GraphQLNonNull( - require('./imagingobjectselectionstudyseries.input'), - ), + name: 'ImagingObjectSelectionstudy_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Study instance UID of the SOP instances in the selection.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Study instance UID of the SOP instances in the selection.', + }, + _url: { + type: require('./element.input.js'), + description: + 'WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.', + }, + url: { + type: UriScalar, + description: + 'WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.', + }, + imagingStudy: { + type: GraphQLString, + description: 'Reference to the Imaging Study in FHIR form.', + }, + series: { + type: new GraphQLList( + new GraphQLNonNull( + require('./imagingobjectselectionstudyseries.input.js'), ), - description: - 'Series identity and locating information of the DICOM SOP instances in the selection.', - }, - }), + ), + description: + 'Series identity and locating information of the DICOM SOP instances in the selection.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/imagingobjectselectionstudyseries.input.js b/src/resources/1_0_2/inputs/imagingobjectselectionstudyseries.input.js index 07e6d188..45b1bf4c 100644 --- a/src/resources/1_0_2/inputs/imagingobjectselectionstudyseries.input.js +++ b/src/resources/1_0_2/inputs/imagingobjectselectionstudyseries.input.js @@ -1,52 +1,66 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImagingObjectSelection.study.series Input Schema + * @summary ImagingObjectSelectionstudyseries Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingObjectSelectionStudySeries_Input', - description: - 'Series identity and locating information of the DICOM SOP instances in the selection.', - fields: () => - extendSchema(require('./backboneelement.input'), { - uid: { - type: OidScalar, - description: - 'Series instance UID of the SOP instances in the selection.', - }, - _uid: { - type: require('./element.input'), - description: - 'Series instance UID of the SOP instances in the selection.', - }, - url: { - type: UriScalar, - description: - 'WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.', - }, - _url: { - type: require('./element.input'), - description: - 'WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.', - }, - instance: { - type: new GraphQLList( - new GraphQLNonNull( - require('./imagingobjectselectionstudyseriesinstance.input'), - ), + name: 'ImagingObjectSelectionstudyseries_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Series instance UID of the SOP instances in the selection.', + }, + uid: { + type: OidScalar, + description: 'Series instance UID of the SOP instances in the selection.', + }, + _url: { + type: require('./element.input.js'), + description: + 'WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.', + }, + url: { + type: UriScalar, + description: + 'WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.', + }, + instance: { + type: new GraphQLList( + new GraphQLNonNull( + require('./imagingobjectselectionstudyseriesinstance.input.js'), ), - description: - 'Identity and locating information of the selected DICOM SOP instances.', - }, - }), + ), + description: + 'Identity and locating information of the selected DICOM SOP instances.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/imagingobjectselectionstudyseriesinstance.input.js b/src/resources/1_0_2/inputs/imagingobjectselectionstudyseriesinstance.input.js index 8b9fd993..1dc00037 100644 --- a/src/resources/1_0_2/inputs/imagingobjectselectionstudyseriesinstance.input.js +++ b/src/resources/1_0_2/inputs/imagingobjectselectionstudyseriesinstance.input.js @@ -1,54 +1,70 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImagingObjectSelection.study.series.instance Input Schema + * @summary ImagingObjectSelectionstudyseriesinstance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingObjectSelectionStudySeriesInstance_Input', - description: - 'Identity and locating information of the selected DICOM SOP instances.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sopClass: { - type: new GraphQLNonNull(OidScalar), - description: 'SOP class UID of the selected instance.', - }, - _sopClass: { - type: require('./element.input'), - description: 'SOP class UID of the selected instance.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'SOP Instance UID of the selected instance.', - }, - _uid: { - type: require('./element.input'), - description: 'SOP Instance UID of the selected instance.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: 'WADO-RS URL to retrieve the DICOM SOP Instance.', - }, - _url: { - type: require('./element.input'), - description: 'WADO-RS URL to retrieve the DICOM SOP Instance.', - }, - frames: { - type: new GraphQLList( - require('./imagingobjectselectionstudyseriesinstanceframes.input'), - ), - description: - 'Identity and location information of the frames in the selected instance.', - }, - }), + name: 'ImagingObjectSelectionstudyseriesinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sopClass: { + type: require('./element.input.js'), + description: 'SOP class UID of the selected instance.', + }, + sopClass: { + type: new GraphQLNonNull(OidScalar), + description: 'SOP class UID of the selected instance.', + }, + _uid: { + type: require('./element.input.js'), + description: 'SOP Instance UID of the selected instance.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'SOP Instance UID of the selected instance.', + }, + _url: { + type: require('./element.input.js'), + description: 'WADO-RS URL to retrieve the DICOM SOP Instance.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'WADO-RS URL to retrieve the DICOM SOP Instance.', + }, + frames: { + type: new GraphQLList( + require('./imagingobjectselectionstudyseriesinstanceframes.input.js'), + ), + description: + 'Identity and location information of the frames in the selected instance.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/imagingobjectselectionstudyseriesinstanceframes.input.js b/src/resources/1_0_2/inputs/imagingobjectselectionstudyseriesinstanceframes.input.js index b284e186..2361dc2b 100644 --- a/src/resources/1_0_2/inputs/imagingobjectselectionstudyseriesinstanceframes.input.js +++ b/src/resources/1_0_2/inputs/imagingobjectselectionstudyseriesinstanceframes.input.js @@ -1,39 +1,55 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImagingObjectSelection.study.series.instance.frames Input Schema + * @summary ImagingObjectSelectionstudyseriesinstanceframes Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingObjectSelectionStudySeriesInstanceFrames_Input', - description: - 'Identity and location information of the frames in the selected instance.', - fields: () => - extendSchema(require('./backboneelement.input'), { - frameNumbers: { - type: new GraphQLList(new GraphQLNonNull(UnsignedIntScalar)), - description: 'The frame numbers in the frame set.', - }, - _frameNumbers: { - type: require('./element.input'), - description: 'The frame numbers in the frame set.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: 'WADO-RS URL to retrieve the DICOM frames.', - }, - _url: { - type: require('./element.input'), - description: 'WADO-RS URL to retrieve the DICOM frames.', - }, - }), + name: 'ImagingObjectSelectionstudyseriesinstanceframes_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _frameNumbers: { + type: require('./element.input.js'), + description: 'The frame numbers in the frame set.', + }, + frameNumbers: { + type: new GraphQLList(new GraphQLNonNull(UnsignedIntScalar)), + description: 'The frame numbers in the frame set.', + }, + _url: { + type: require('./element.input.js'), + description: 'WADO-RS URL to retrieve the DICOM frames.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'WADO-RS URL to retrieve the DICOM frames.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/imagingstudy.input.js b/src/resources/1_0_2/inputs/imagingstudy.input.js index 631a52fa..fc657f6d 100644 --- a/src/resources/1_0_2/inputs/imagingstudy.input.js +++ b/src/resources/1_0_2/inputs/imagingstudy.input.js @@ -1,25 +1,16 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.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 ImagingStudyResourceInputType = new GraphQLEnumType({ - name: 'ImagingStudyResourceInputType', - values: { - ImagingStudy: { value: 'ImagingStudy' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -27,113 +18,170 @@ let ImagingStudyResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ImagingStudy_Input', - description: 'Base StructureDefinition for ImagingStudy Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImagingStudyResourceInputType), - description: 'Type of this resource.', - }, - started: { - type: DateTimeScalar, - description: 'Date and Time the study started.', - }, - _started: { - type: require('./element.input'), - description: 'Date and Time the study started.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient imaged in the study.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for the study.', - }, - _uid: { - type: require('./element.input'), - description: 'Formal identifier for the study.', - }, - accession: { - type: require('./identifier.input'), - description: - 'Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Other identifiers for the study.', - }, - order: { - type: new GraphQLList(require('./reference.input')), - description: - 'A list of the diagnostic orders that resulted in this imaging study being performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 - modalityList: { - type: new GraphQLList(require('./coding.input')), - description: - 'A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', - }, - referrer: { - type: require('./reference.input'), - description: 'The requesting/referring physician.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/instance-availability - availability: { - type: CodeScalar, - description: 'Availability of study (online, offline or nearline).', - }, - _availability: { - type: require('./element.input'), - description: 'Availability of study (online, offline or nearline).', - }, - url: { - type: UriScalar, - description: 'WADO-RS resource where Study is available.', - }, - _url: { - type: require('./element.input'), - description: 'WADO-RS resource where Study is available.', - }, - numberOfSeries: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'Number of Series in Study.', - }, - _numberOfSeries: { - type: require('./element.input'), - description: 'Number of Series in Study.', - }, - numberOfInstances: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'Number of SOP Instances in Study.', - }, - _numberOfInstances: { - type: require('./element.input'), - description: 'Number of SOP Instances in Study.', - }, - procedure: { - type: new GraphQLList(require('./reference.input')), - description: 'Type of procedure performed.', - }, - interpreter: { - type: require('./reference.input'), - description: - 'Who read the study and interpreted the images or other content.', - }, - description: { - type: GraphQLString, - description: - 'Institution-generated description or classification of the Study performed.', - }, - _description: { - type: require('./element.input'), - description: - 'Institution-generated description or classification of the Study performed.', - }, - series: { - type: new GraphQLList(require('./imagingstudyseries.input')), - description: - 'Each study has one or more series of images or other content.', - }, - }), + description: 'Base StructureDefinition for ImagingStudy Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingStudy_Enum_input', + values: { ImagingStudy: { value: 'ImagingStudy' } }, + }), + ), + 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.', + }, + _started: { + type: require('./element.input.js'), + description: 'Date and Time the study started.', + }, + started: { + type: DateTimeScalar, + description: 'Date and Time the study started.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient imaged in the study.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Formal identifier for the study.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for the study.', + }, + accession: { + type: require('./identifier.input.js'), + description: + 'Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Other identifiers for the study.', + }, + order: { + type: new GraphQLList(GraphQLString), + description: + 'A list of the diagnostic orders that resulted in this imaging study being performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 + modalityList: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', + }, + referrer: { + type: GraphQLString, + description: 'The requesting/referring physician.', + }, + _availability: { + type: require('./element.input.js'), + description: 'Availability of study (online, offline or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/instance-availability + availability: { + type: CodeScalar, + description: 'Availability of study (online, offline or nearline).', + }, + _url: { + type: require('./element.input.js'), + description: 'WADO-RS resource where Study is available.', + }, + url: { + type: UriScalar, + description: 'WADO-RS resource where Study is available.', + }, + _numberOfSeries: { + type: require('./element.input.js'), + description: 'Number of Series in Study.', + }, + numberOfSeries: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'Number of Series in Study.', + }, + _numberOfInstances: { + type: require('./element.input.js'), + description: 'Number of SOP Instances in Study.', + }, + numberOfInstances: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'Number of SOP Instances in Study.', + }, + procedure: { + type: new GraphQLList(GraphQLString), + description: 'Type of procedure performed.', + }, + interpreter: { + type: GraphQLString, + description: + 'Who read the study and interpreted the images or other content.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Institution-generated description or classification of the Study performed.', + }, + description: { + type: GraphQLString, + description: + 'Institution-generated description or classification of the Study performed.', + }, + series: { + type: new GraphQLList(require('./imagingstudyseries.input.js')), + description: + 'Each study has one or more series of images or other content.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/imagingstudyseries.input.js b/src/resources/1_0_2/inputs/imagingstudyseries.input.js index 2e08bb09..0a0f2dd8 100644 --- a/src/resources/1_0_2/inputs/imagingstudyseries.input.js +++ b/src/resources/1_0_2/inputs/imagingstudyseries.input.js @@ -1,107 +1,124 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ImagingStudy.series Input Schema + * @summary ImagingStudyseries Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingStudySeries_Input', - description: 'Each study has one or more series of images or other content.', - fields: () => - extendSchema(require('./backboneelement.input'), { - number: { - type: UnsignedIntScalar, - description: 'The Numeric identifier of this series in the study.', - }, - _number: { - type: require('./element.input'), - description: 'The Numeric identifier of this series in the study.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 - modality: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The modality of this series sequence.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for this series.', - }, - _uid: { - type: require('./element.input'), - description: 'Formal identifier for this series.', - }, - description: { - type: GraphQLString, - description: 'A description of the series.', - }, - _description: { - type: require('./element.input'), - description: 'A description of the series.', - }, - numberOfInstances: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'Number of SOP Instances in Series.', - }, - _numberOfInstances: { - type: require('./element.input'), - description: 'Number of SOP Instances in Series.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/instance-availability - availability: { - type: CodeScalar, - description: 'Availability of series (online, offline or nearline).', - }, - _availability: { - type: require('./element.input'), - description: 'Availability of series (online, offline or nearline).', - }, - url: { - type: UriScalar, - description: - 'URI/URL specifying the location of the referenced series using WADO-RS.', - }, - _url: { - type: require('./element.input'), - description: - 'URI/URL specifying the location of the referenced series using WADO-RS.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./coding.input'), - description: - 'Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bodysite-laterality - laterality: { - type: require('./coding.input'), - description: - 'Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.', - }, - started: { - type: DateTimeScalar, - description: 'The date and time the series was started.', - }, - _started: { - type: require('./element.input'), - description: 'The date and time the series was started.', - }, - instance: { - type: new GraphQLList(require('./imagingstudyseriesinstance.input')), - description: - 'A single SOP Instance within the series, e.g. an image, or presentation state.', - }, - }), + name: 'ImagingStudyseries_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _number: { + type: require('./element.input.js'), + description: 'The Numeric identifier of this series in the study.', + }, + number: { + type: UnsignedIntScalar, + description: 'The Numeric identifier of this series in the study.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 + modality: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The modality of this series sequence.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Formal identifier for this series.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for this series.', + }, + _description: { + type: require('./element.input.js'), + description: 'A description of the series.', + }, + description: { + type: GraphQLString, + description: 'A description of the series.', + }, + _numberOfInstances: { + type: require('./element.input.js'), + description: 'Number of SOP Instances in Series.', + }, + numberOfInstances: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'Number of SOP Instances in Series.', + }, + _availability: { + type: require('./element.input.js'), + description: 'Availability of series (online, offline or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/instance-availability + availability: { + type: CodeScalar, + description: 'Availability of series (online, offline or nearline).', + }, + _url: { + type: require('./element.input.js'), + description: + 'URI/URL specifying the location of the referenced series using WADO-RS.', + }, + url: { + type: UriScalar, + description: + 'URI/URL specifying the location of the referenced series using WADO-RS.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./coding.input.js'), + description: + 'Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bodysite-laterality + laterality: { + type: require('./coding.input.js'), + description: + 'Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.', + }, + _started: { + type: require('./element.input.js'), + description: 'The date and time the series was started.', + }, + started: { + type: DateTimeScalar, + description: 'The date and time the series was started.', + }, + instance: { + type: new GraphQLList(require('./imagingstudyseriesinstance.input.js')), + description: + 'A single SOP Instance within the series, e.g. an image, or presentation state.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/imagingstudyseriesinstance.input.js b/src/resources/1_0_2/inputs/imagingstudyseriesinstance.input.js index def3ea51..d17abe62 100644 --- a/src/resources/1_0_2/inputs/imagingstudyseriesinstance.input.js +++ b/src/resources/1_0_2/inputs/imagingstudyseriesinstance.input.js @@ -1,69 +1,85 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const OidScalar = require('../scalars/oid.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); /** * @name exports - * @summary ImagingStudy.series.instance Input Schema + * @summary ImagingStudyseriesinstance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingStudySeriesInstance_Input', - description: - 'A single SOP Instance within the series, e.g. an image, or presentation state.', - fields: () => - extendSchema(require('./backboneelement.input'), { - number: { - type: UnsignedIntScalar, - description: 'The number of instance in the series.', - }, - _number: { - type: require('./element.input'), - description: 'The number of instance in the series.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for this image or other content.', - }, - _uid: { - type: require('./element.input'), - description: 'Formal identifier for this image or other content.', - }, - sopClass: { - type: new GraphQLNonNull(OidScalar), - description: 'DICOM instance type.', - }, - _sopClass: { - type: require('./element.input'), - description: 'DICOM instance type.', - }, - type: { - type: GraphQLString, - description: 'A human-friendly SOP Class name.', - }, - _type: { - type: require('./element.input'), - description: 'A human-friendly SOP Class name.', - }, - title: { - type: GraphQLString, - description: 'The description of the instance.', - }, - _title: { - type: require('./element.input'), - description: 'The description of the instance.', - }, - content: { - type: new GraphQLList(require('./attachment.input')), - description: - 'Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.', - }, - }), + name: 'ImagingStudyseriesinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _number: { + type: require('./element.input.js'), + description: 'The number of instance in the series.', + }, + number: { + type: UnsignedIntScalar, + description: 'The number of instance in the series.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Formal identifier for this image or other content.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for this image or other content.', + }, + _sopClass: { + type: require('./element.input.js'), + description: 'DICOM instance type.', + }, + sopClass: { + type: new GraphQLNonNull(OidScalar), + description: 'DICOM instance type.', + }, + _type: { + type: require('./element.input.js'), + description: 'A human-friendly SOP Class name.', + }, + type: { + type: GraphQLString, + description: 'A human-friendly SOP Class name.', + }, + _title: { + type: require('./element.input.js'), + description: 'The description of the instance.', + }, + title: { + type: GraphQLString, + description: 'The description of the instance.', + }, + content: { + type: new GraphQLList(require('./attachment.input.js')), + description: + 'Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/immunization.input.js b/src/resources/1_0_2/inputs/immunization.input.js index 2b83a28d..56175603 100644 --- a/src/resources/1_0_2/inputs/immunization.input.js +++ b/src/resources/1_0_2/inputs/immunization.input.js @@ -1,24 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImmunizationResourceInputType = new GraphQLEnumType({ - name: 'ImmunizationResourceInputType', - values: { - Immunization: { value: 'Immunization' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,136 +18,192 @@ let ImmunizationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Immunization_Input', - description: 'Base StructureDefinition for Immunization Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImmunizationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A unique identifier assigned to this immunization record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current status of the vaccination event.', - }, - _status: { - type: require('./element.input'), - description: 'Indicates the current status of the vaccination event.', - }, - date: { - type: DateTimeScalar, - description: 'Date vaccine administered or was to be administered.', - }, - _date: { - type: require('./element.input'), - description: 'Date vaccine administered or was to be administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code - vaccineCode: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Vaccine that was administered or was to be administered.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The patient who either received or did not receive the immunization.', - }, - wasNotGiven: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'Indicates if the vaccination was or was not given.', - }, - _wasNotGiven: { - type: require('./element.input'), - description: 'Indicates if the vaccination was or was not given.', - }, - reported: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'True if this administration was reported rather than directly administered.', - }, - _reported: { - type: require('./element.input'), - description: - 'True if this administration was reported rather than directly administered.', - }, - performer: { - type: require('./reference.input'), - description: 'Clinician who administered the vaccine.', - }, - requester: { - type: require('./reference.input'), - description: 'Clinician who ordered the vaccination.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', - }, - manufacturer: { - type: require('./reference.input'), - description: 'Name of vaccine manufacturer.', - }, - location: { - type: require('./reference.input'), - description: - 'The service delivery location where the vaccine administration occurred.', - }, - lotNumber: { - type: GraphQLString, - description: 'Lot number of the vaccine product.', - }, - _lotNumber: { - type: require('./element.input'), - description: 'Lot number of the vaccine product.', - }, - expirationDate: { - type: DateScalar, - description: 'Date vaccine batch expires.', - }, - _expirationDate: { - type: require('./element.input'), - description: 'Date vaccine batch expires.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-site - site: { - type: require('./codeableconcept.input'), - description: 'Body site where vaccine was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-route - route: { - type: require('./codeableconcept.input'), - description: - 'The path by which the vaccine product is taken into the body.', - }, - doseQuantity: { - type: require('./quantity.input'), - description: 'The quantity of vaccine product that was administered.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Extra information about the immunization that is not conveyed by the other attributes.', - }, - explanation: { - type: require('./immunizationexplanation.input'), - description: 'Reasons why a vaccine was or was not administered.', - }, - reaction: { - type: new GraphQLList(require('./immunizationreaction.input')), - description: - 'Categorical data indicating that an adverse event is associated in time to an immunization.', - }, - vaccinationProtocol: { - type: new GraphQLList( - require('./immunizationvaccinationprotocol.input'), - ), - description: - 'Contains information about the protocol(s) under which the vaccine was administered.', - }, - }), + description: 'Base StructureDefinition for Immunization Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Immunization_Enum_input', + values: { Immunization: { value: 'Immunization' } }, + }), + ), + 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: 'A unique identifier assigned to this immunization record.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current status of the vaccination event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current status of the vaccination event.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date vaccine administered or was to be administered.', + }, + date: { + type: DateTimeScalar, + description: 'Date vaccine administered or was to be administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code + vaccineCode: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Vaccine that was administered or was to be administered.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient who either received or did not receive the immunization.', + }, + _wasNotGiven: { + type: require('./element.input.js'), + description: 'Indicates if the vaccination was or was not given.', + }, + wasNotGiven: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Indicates if the vaccination was or was not given.', + }, + _reported: { + type: require('./element.input.js'), + description: + 'True if this administration was reported rather than directly administered.', + }, + reported: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if this administration was reported rather than directly administered.', + }, + performer: { + type: GraphQLString, + description: 'Clinician who administered the vaccine.', + }, + requester: { + type: GraphQLString, + description: 'Clinician who ordered the vaccination.', + }, + encounter: { + type: GraphQLString, + description: + 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', + }, + manufacturer: { + type: GraphQLString, + description: 'Name of vaccine manufacturer.', + }, + location: { + type: GraphQLString, + description: + 'The service delivery location where the vaccine administration occurred.', + }, + _lotNumber: { + type: require('./element.input.js'), + description: 'Lot number of the vaccine product.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number of the vaccine product.', + }, + _expirationDate: { + type: require('./element.input.js'), + description: 'Date vaccine batch expires.', + }, + expirationDate: { + type: DateScalar, + description: 'Date vaccine batch expires.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-site + site: { + type: require('./codeableconcept.input.js'), + description: 'Body site where vaccine was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-route + route: { + type: require('./codeableconcept.input.js'), + description: + 'The path by which the vaccine product is taken into the body.', + }, + doseQuantity: { + type: require('./quantity.input.js'), + description: 'The quantity of vaccine product that was administered.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the immunization that is not conveyed by the other attributes.', + }, + explanation: { + type: require('./immunizationexplanation.input.js'), + description: 'Reasons why a vaccine was or was not administered.', + }, + reaction: { + type: new GraphQLList(require('./immunizationreaction.input.js')), + description: + 'Categorical data indicating that an adverse event is associated in time to an immunization.', + }, + vaccinationProtocol: { + type: new GraphQLList( + require('./immunizationvaccinationprotocol.input.js'), + ), + description: + 'Contains information about the protocol(s) under which the vaccine was administered.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/immunizationexplanation.input.js b/src/resources/1_0_2/inputs/immunizationexplanation.input.js index 8e08d8b4..3c2f05ae 100644 --- a/src/resources/1_0_2/inputs/immunizationexplanation.input.js +++ b/src/resources/1_0_2/inputs/immunizationexplanation.input.js @@ -1,26 +1,43 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Immunization.explanation Input Schema + * @summary Immunizationexplanation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationExplanation_Input', - description: 'Reasons why a vaccine was or was not administered.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-reason - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reasons why a vaccine was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/no-immunization-reason - reasonNotGiven: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reason why a vaccine was not administered.', - }, - }), + name: 'Immunizationexplanation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-reason + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reasons why a vaccine was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/no-immunization-reason + reasonNotGiven: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason why a vaccine was not administered.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/immunizationreaction.input.js b/src/resources/1_0_2/inputs/immunizationreaction.input.js index 63cde9ba..076cb0a2 100644 --- a/src/resources/1_0_2/inputs/immunizationreaction.input.js +++ b/src/resources/1_0_2/inputs/immunizationreaction.input.js @@ -1,38 +1,59 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLBoolean } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Immunization.reaction Input Schema + * @summary Immunizationreaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationReaction_Input', - description: - 'Categorical data indicating that an adverse event is associated in time to an immunization.', - fields: () => - extendSchema(require('./backboneelement.input'), { - date: { - type: DateTimeScalar, - description: 'Date of reaction to the immunization.', - }, - _date: { - type: require('./element.input'), - description: 'Date of reaction to the immunization.', - }, - detail: { - type: require('./reference.input'), - description: 'Details of the reaction.', - }, - reported: { - type: GraphQLBoolean, - description: 'Self-reported indicator.', - }, - _reported: { - type: require('./element.input'), - description: 'Self-reported indicator.', - }, - }), + name: 'Immunizationreaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date of reaction to the immunization.', + }, + date: { + type: DateTimeScalar, + description: 'Date of reaction to the immunization.', + }, + detail: { + type: GraphQLString, + description: 'Details of the reaction.', + }, + _reported: { + type: require('./element.input.js'), + description: 'Self-reported indicator.', + }, + reported: { + type: GraphQLBoolean, + description: 'Self-reported indicator.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/immunizationrecommendation.input.js b/src/resources/1_0_2/inputs/immunizationrecommendation.input.js index e7fde63e..be9bd888 100644 --- a/src/resources/1_0_2/inputs/immunizationrecommendation.input.js +++ b/src/resources/1_0_2/inputs/immunizationrecommendation.input.js @@ -1,20 +1,13 @@ 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 ImmunizationRecommendationResourceInputType = new GraphQLEnumType({ - name: 'ImmunizationRecommendationResourceInputType', - values: { - ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,29 +16,88 @@ let ImmunizationRecommendationResourceInputType = new GraphQLEnumType({ module.exports = new GraphQLInputObjectType({ name: 'ImmunizationRecommendation_Input', description: - 'Base StructureDefinition for ImmunizationRecommendation Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImmunizationRecommendationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A unique identifier assigned to this particular recommendation record.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient for whom the recommendations are for.', - }, - recommendation: { - type: new GraphQLList( - new GraphQLNonNull( - require('./immunizationrecommendationrecommendation.input'), - ), + 'Base StructureDefinition for ImmunizationRecommendation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImmunizationRecommendation_Enum_input', + values: { + ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, + }, + }), + ), + 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: + 'A unique identifier assigned to this particular recommendation record.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient for whom the recommendations are for.', + }, + recommendation: { + type: new GraphQLList( + new GraphQLNonNull( + require('./immunizationrecommendationrecommendation.input.js'), ), - description: 'Vaccine administration recommendations.', - }, - }), + ), + description: 'Vaccine administration recommendations.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/immunizationrecommendationrecommendation.input.js b/src/resources/1_0_2/inputs/immunizationrecommendationrecommendation.input.js index e4df3642..dcfc81d0 100644 --- a/src/resources/1_0_2/inputs/immunizationrecommendationrecommendation.input.js +++ b/src/resources/1_0_2/inputs/immunizationrecommendationrecommendation.input.js @@ -1,72 +1,90 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation Input Schema + * @summary ImmunizationRecommendationrecommendation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationRecommendationRecommendation_Input', - description: 'Vaccine administration recommendations.', - fields: () => - extendSchema(require('./backboneelement.input'), { - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The date the immunization recommendation was created.', - }, - _date: { - type: require('./element.input'), - description: 'The date the immunization recommendation was created.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code - vaccineCode: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Vaccine that pertains to the recommendation.', - }, - doseNumber: { - type: PositiveIntScalar, - description: - 'This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).', - }, - _doseNumber: { - type: require('./element.input'), - description: - 'This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-status - forecastStatus: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Vaccine administration status.', - }, - dateCriterion: { - type: new GraphQLList( - require('./immunizationrecommendationrecommendationdatecriterion.input'), - ), - description: - 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', - }, - protocol: { - type: require('./immunizationrecommendationrecommendationprotocol.input'), - description: - 'Contains information about the protocol under which the vaccine was administered.', - }, - supportingImmunization: { - type: new GraphQLList(require('./reference.input')), - description: - 'Immunization event history that supports the status and recommendation.', - }, - supportingPatientInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', - }, - }), + name: 'ImmunizationRecommendationrecommendation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date the immunization recommendation was created.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date the immunization recommendation was created.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code + vaccineCode: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Vaccine that pertains to the recommendation.', + }, + _doseNumber: { + type: require('./element.input.js'), + description: + 'This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).', + }, + doseNumber: { + type: PositiveIntScalar, + description: + 'This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-status + forecastStatus: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Vaccine administration status.', + }, + dateCriterion: { + type: new GraphQLList( + require('./immunizationrecommendationrecommendationdatecriterion.input.js'), + ), + description: + 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', + }, + protocol: { + type: require('./immunizationrecommendationrecommendationprotocol.input.js'), + description: + 'Contains information about the protocol under which the vaccine was administered.', + }, + supportingImmunization: { + type: new GraphQLList(GraphQLString), + description: + 'Immunization event history that supports the status and recommendation.', + }, + supportingPatientInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/immunizationrecommendationrecommendationdatecriterion.input.js b/src/resources/1_0_2/inputs/immunizationrecommendationrecommendationdatecriterion.input.js index fb5c1c87..9e61f9b4 100644 --- a/src/resources/1_0_2/inputs/immunizationrecommendationrecommendationdatecriterion.input.js +++ b/src/resources/1_0_2/inputs/immunizationrecommendationrecommendationdatecriterion.input.js @@ -1,34 +1,52 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation.dateCriterion Input Schema + * @summary ImmunizationRecommendationrecommendationdateCriterion Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationRecommendationRecommendationDateCriterion_Input', - description: - 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', - }, - value: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date whose meaning is specified by dateCriterion.code.', - }, - _value: { - type: require('./element.input'), - description: - 'The date whose meaning is specified by dateCriterion.code.', - }, - }), + name: 'ImmunizationRecommendationrecommendationdateCriterion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', + }, + _value: { + type: require('./element.input.js'), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + value: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/immunizationrecommendationrecommendationprotocol.input.js b/src/resources/1_0_2/inputs/immunizationrecommendationrecommendationprotocol.input.js index dcb78f77..c9877913 100644 --- a/src/resources/1_0_2/inputs/immunizationrecommendationrecommendationprotocol.input.js +++ b/src/resources/1_0_2/inputs/immunizationrecommendationrecommendationprotocol.input.js @@ -1,56 +1,73 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLInt, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation.protocol Input Schema + * @summary ImmunizationRecommendationrecommendationprotocol Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationRecommendationRecommendationProtocol_Input', - description: - 'Contains information about the protocol under which the vaccine was administered.', - fields: () => - extendSchema(require('./backboneelement.input'), { - doseSequence: { - type: GraphQLInt, - description: - 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', - }, - _doseSequence: { - type: require('./element.input'), - description: - 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', - }, - description: { - type: GraphQLString, - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - _description: { - type: require('./element.input'), - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - authority: { - type: require('./reference.input'), - description: - 'Indicates the authority who published the protocol. For example, ACIP.', - }, - series: { - type: GraphQLString, - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - _series: { - type: require('./element.input'), - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - }), + name: 'ImmunizationRecommendationrecommendationprotocol_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _doseSequence: { + type: require('./element.input.js'), + description: + 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', + }, + doseSequence: { + type: GraphQLInt, + description: + 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + authority: { + type: GraphQLString, + description: + 'Indicates the authority who published the protocol. For example, ACIP.', + }, + _series: { + type: require('./element.input.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/immunizationvaccinationprotocol.input.js b/src/resources/1_0_2/inputs/immunizationvaccinationprotocol.input.js index 8c0a192d..18182c4a 100644 --- a/src/resources/1_0_2/inputs/immunizationvaccinationprotocol.input.js +++ b/src/resources/1_0_2/inputs/immunizationvaccinationprotocol.input.js @@ -1,83 +1,99 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Immunization.vaccinationProtocol Input Schema + * @summary ImmunizationvaccinationProtocol Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationVaccinationProtocol_Input', - description: - 'Contains information about the protocol(s) under which the vaccine was administered.', - fields: () => - extendSchema(require('./backboneelement.input'), { - doseSequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'Nominal position in a series.', - }, - _doseSequence: { - type: require('./element.input'), - description: 'Nominal position in a series.', - }, - description: { - type: GraphQLString, - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - _description: { - type: require('./element.input'), - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - authority: { - type: require('./reference.input'), - description: - 'Indicates the authority who published the protocol. E.g. ACIP.', - }, - series: { - type: GraphQLString, - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - _series: { - type: require('./element.input'), - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - seriesDoses: { - type: PositiveIntScalar, - description: 'The recommended number of doses to achieve immunity.', - }, - _seriesDoses: { - type: require('./element.input'), - description: 'The recommended number of doses to achieve immunity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-target - targetDisease: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.input')), - ), - description: 'The targeted disease.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status - doseStatus: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Indicates if the immunization event should 'count' against the protocol.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status-reason - doseStatusReason: { - type: require('./codeableconcept.input'), - description: - 'Provides an explanation as to why an immunization event should or should not count against the protocol.', - }, - }), + name: 'ImmunizationvaccinationProtocol_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _doseSequence: { + type: require('./element.input.js'), + description: 'Nominal position in a series.', + }, + doseSequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'Nominal position in a series.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + authority: { + type: GraphQLString, + description: + 'Indicates the authority who published the protocol. E.g. ACIP.', + }, + _series: { + type: require('./element.input.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + _seriesDoses: { + type: require('./element.input.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDoses: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-target + targetDisease: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.input.js')), + ), + description: 'The targeted disease.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status + doseStatus: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Indicates if the immunization event should 'count' against the protocol.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status-reason + doseStatusReason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides an explanation as to why an immunization event should or should not count against the protocol.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/implementationguide.input.js b/src/resources/1_0_2/inputs/implementationguide.input.js index 39646baa..979f8014 100644 --- a/src/resources/1_0_2/inputs/implementationguide.input.js +++ b/src/resources/1_0_2/inputs/implementationguide.input.js @@ -1,25 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImplementationGuideResourceInputType = new GraphQLEnumType({ - name: 'ImplementationGuideResourceInputType', - values: { - ImplementationGuide: { value: 'ImplementationGuide' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,154 +17,213 @@ let ImplementationGuideResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ImplementationGuide_Input', - description: 'Base StructureDefinition for ImplementationGuide Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImplementationGuideResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the Implementation Guide.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name identifying the Implementation Guide.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the Implementation Guide.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the Implementation Guide.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the implementation guide.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the implementation guide.', - }, - contact: { - type: new GraphQLList(require('./implementationguidecontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the Implementation Guide and its use.', - }, - _description: { - type: require('./element.input'), - description: - 'A free text natural language description of the Implementation Guide and its use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - fhirVersion: { - type: IdScalar, - description: - 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', - }, - _fhirVersion: { - type: require('./element.input'), - description: - 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', - }, - dependency: { - type: new GraphQLList(require('./implementationguidedependency.input')), - description: - 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', - }, - package: { - type: new GraphQLList( - new GraphQLNonNull(require('./implementationguidepackage.input')), - ), - description: - 'A logical group of resources. Logical groups can be used when building pages.', - }, - global: { - type: new GraphQLList(require('./implementationguideglobal.input')), - description: - 'A set of profiles that all resources covered by this implementation guide must conform to.', - }, - binary: { - type: new GraphQLList(UriScalar), - description: - 'A binary file that is included in the implementation guide when it is published.', - }, - _binary: { - type: require('./element.input'), - description: - 'A binary file that is included in the implementation guide when it is published.', - }, - page: { - type: new GraphQLNonNull(require('./implementationguidepage.input')), - description: - 'A page / section in the implementation guide. The root page is the implementation guide home page.', - }, - }), + description: 'Base StructureDefinition for ImplementationGuide Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImplementationGuide_Enum_input', + values: { ImplementationGuide: { value: 'ImplementationGuide' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name identifying the Implementation Guide.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the Implementation Guide.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the Implementation Guide.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the Implementation Guide.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the implementation guide.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the implementation guide.', + }, + contact: { + type: new GraphQLList(require('./implementationguidecontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A free text natural language description of the Implementation Guide and its use.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the Implementation Guide and its use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', + }, + fhirVersion: { + type: IdScalar, + description: + 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', + }, + dependency: { + type: new GraphQLList( + require('./implementationguidedependency.input.js'), + ), + description: + 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', + }, + package: { + type: new GraphQLList( + new GraphQLNonNull(require('./implementationguidepackage.input.js')), + ), + description: + 'A logical group of resources. Logical groups can be used when building pages.', + }, + global: { + type: new GraphQLList(require('./implementationguideglobal.input.js')), + description: + 'A set of profiles that all resources covered by this implementation guide must conform to.', + }, + _binary: { + type: require('./element.input.js'), + description: + 'A binary file that is included in the implementation guide when it is published.', + }, + binary: { + type: new GraphQLList(UriScalar), + description: + 'A binary file that is included in the implementation guide when it is published.', + }, + page: { + type: new GraphQLNonNull(require('./implementationguidepage.input.js')), + description: + 'A page / section in the implementation guide. The root page is the implementation guide home page.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/implementationguidecontact.input.js b/src/resources/1_0_2/inputs/implementationguidecontact.input.js index b22f9d83..a012cf81 100644 --- a/src/resources/1_0_2/inputs/implementationguidecontact.input.js +++ b/src/resources/1_0_2/inputs/implementationguidecontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ImplementationGuide.contact Input Schema + * @summary ImplementationGuidecontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuideContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the implementation guide.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the implementation guide.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'ImplementationGuidecontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the implementation guide.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the implementation guide.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/implementationguidedependency.input.js b/src/resources/1_0_2/inputs/implementationguidedependency.input.js index a2834741..eb11db39 100644 --- a/src/resources/1_0_2/inputs/implementationguidedependency.input.js +++ b/src/resources/1_0_2/inputs/implementationguidedependency.input.js @@ -1,38 +1,58 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImplementationGuide.dependency Input Schema + * @summary ImplementationGuidedependency Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuideDependency_Input', - description: - 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-dependency-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the dependency is represented when the guide is published.', - }, - _type: { - type: require('./element.input'), - description: - 'How the dependency is represented when the guide is published.', - }, - uri: { - type: new GraphQLNonNull(UriScalar), - description: 'Where the dependency is located.', - }, - _uri: { - type: require('./element.input'), - description: 'Where the dependency is located.', - }, - }), + name: 'ImplementationGuidedependency_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'How the dependency is represented when the guide is published.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-dependency-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the dependency is represented when the guide is published.', + }, + _uri: { + type: require('./element.input.js'), + description: 'Where the dependency is located.', + }, + uri: { + type: new GraphQLNonNull(UriScalar), + description: 'Where the dependency is located.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/implementationguideglobal.input.js b/src/resources/1_0_2/inputs/implementationguideglobal.input.js index 8add6503..d7ff6320 100644 --- a/src/resources/1_0_2/inputs/implementationguideglobal.input.js +++ b/src/resources/1_0_2/inputs/implementationguideglobal.input.js @@ -1,32 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ImplementationGuide.global Input Schema + * @summary ImplementationGuideglobal Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuideGlobal_Input', - description: - 'A set of profiles that all resources covered by this implementation guide must conform to.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of resource that all instances must conform to.', - }, - _type: { - type: require('./element.input'), - description: 'The type of resource that all instances must conform to.', - }, - profile: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the profile that all instances must conform to.', - }, - }), + name: 'ImplementationGuideglobal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of resource that all instances must conform to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of resource that all instances must conform to.', + }, + profile: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the profile that all instances must conform to.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/implementationguidepackage.input.js b/src/resources/1_0_2/inputs/implementationguidepackage.input.js index d0c83477..68cce711 100644 --- a/src/resources/1_0_2/inputs/implementationguidepackage.input.js +++ b/src/resources/1_0_2/inputs/implementationguidepackage.input.js @@ -1,47 +1,63 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ImplementationGuide.package Input Schema + * @summary ImplementationGuidepackage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuidePackage_Input', - description: - 'A logical group of resources. Logical groups can be used when building pages.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name for the group, as used in page.package.', - }, - _name: { - type: require('./element.input'), - description: 'The name for the group, as used in page.package.', - }, - description: { - type: GraphQLString, - description: 'Human readable text describing the package.', - }, - _description: { - type: require('./element.input'), - description: 'Human readable text describing the package.', - }, - resource: { - type: new GraphQLList( - new GraphQLNonNull( - require('./implementationguidepackageresource.input'), - ), + name: 'ImplementationGuidepackage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name for the group, as used in page.package.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name for the group, as used in page.package.', + }, + _description: { + type: require('./element.input.js'), + description: 'Human readable text describing the package.', + }, + description: { + type: GraphQLString, + description: 'Human readable text describing the package.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull( + require('./implementationguidepackageresource.input.js'), ), - description: - 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', - }, - }), + ), + description: + 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/implementationguidepackageresource.input.js b/src/resources/1_0_2/inputs/implementationguidepackageresource.input.js index 10392aee..89bf6468 100644 --- a/src/resources/1_0_2/inputs/implementationguidepackageresource.input.js +++ b/src/resources/1_0_2/inputs/implementationguidepackageresource.input.js @@ -1,79 +1,96 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImplementationGuide.package.resource Input Schema + * @summary ImplementationGuidepackageresource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuidePackageResource_Input', - description: - 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-resource-purpose - purpose: { - type: new GraphQLNonNull(CodeScalar), - description: 'Why the resource is included in the guide.', - }, - _purpose: { - type: require('./element.input'), - description: 'Why the resource is included in the guide.', - }, - name: { - type: GraphQLString, - description: - 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', - }, - _name: { - type: require('./element.input'), - description: - 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', - }, - description: { - type: GraphQLString, - description: - 'A description of the reason that a resource has been included in the implementation guide.', - }, - _description: { - type: require('./element.input'), - description: - 'A description of the reason that a resource has been included in the implementation guide.', - }, - acronym: { - type: GraphQLString, - description: - 'A short code that may be used to identify the resource throughout the implementation guide.', - }, - _acronym: { - type: require('./element.input'), - description: - 'A short code that may be used to identify the resource throughout the implementation guide.', - }, - sourceUri: { - type: new GraphQLNonNull(UriScalar), - description: 'Where this resource is found.', - }, - _sourceUri: { - type: require('./element.input'), - description: 'Where this resource is found.', - }, - sourceReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Where this resource is found.', - }, - exampleFor: { - type: require('./reference.input'), - description: - 'Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.', - }, - }), + name: 'ImplementationGuidepackageresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _purpose: { + type: require('./element.input.js'), + description: 'Why the resource is included in the guide.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-resource-purpose + purpose: { + type: new GraphQLNonNull(CodeScalar), + description: 'Why the resource is included in the guide.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + name: { + type: GraphQLString, + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + _description: { + type: require('./element.input.js'), + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + description: { + type: GraphQLString, + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + _acronym: { + type: require('./element.input.js'), + description: + 'A short code that may be used to identify the resource throughout the implementation guide.', + }, + acronym: { + type: GraphQLString, + description: + 'A short code that may be used to identify the resource throughout the implementation guide.', + }, + _sourceUri: { + type: require('./element.input.js'), + description: 'Where this resource is found.', + }, + sourceUri: { + type: new GraphQLNonNull(UriScalar), + description: 'Where this resource is found.', + }, + sourceReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Where this resource is found.', + }, + exampleFor: { + type: GraphQLString, + description: + 'Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/implementationguidepage.input.js b/src/resources/1_0_2/inputs/implementationguidepage.input.js index b36ee8b5..7a6c3176 100644 --- a/src/resources/1_0_2/inputs/implementationguidepage.input.js +++ b/src/resources/1_0_2/inputs/implementationguidepage.input.js @@ -1,82 +1,98 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ImplementationGuide.page Input Schema + * @summary ImplementationGuidepage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuidePage_Input', - description: - 'A page / section in the implementation guide. The root page is the implementation guide home page.', - fields: () => - extendSchema(require('./backboneelement.input'), { - source: { - type: new GraphQLNonNull(UriScalar), - description: 'The source address for the page.', - }, - _source: { - type: require('./element.input'), - description: 'The source address for the page.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', - }, - _name: { - type: require('./element.input'), - description: - 'A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-page-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', - }, - _kind: { - type: require('./element.input'), - description: - 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLList(CodeScalar), - description: - 'For constructed pages, what kind of resources to include in the list.', - }, - _type: { - type: require('./element.input'), - description: - 'For constructed pages, what kind of resources to include in the list.', - }, - package: { - type: new GraphQLList(GraphQLString), - description: - 'For constructed pages, a list of packages to include in the page (or else empty for everything).', - }, - _package: { - type: require('./element.input'), - description: - 'For constructed pages, a list of packages to include in the page (or else empty for everything).', - }, - format: { - type: CodeScalar, - description: 'The format of the page.', - }, - _format: { - type: require('./element.input'), - description: 'The format of the page.', - }, - }), + name: 'ImplementationGuidepage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _source: { + type: require('./element.input.js'), + description: 'The source address for the page.', + }, + source: { + type: new GraphQLNonNull(UriScalar), + description: 'The source address for the page.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-page-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', + }, + _type: { + type: require('./element.input.js'), + description: + 'For constructed pages, what kind of resources to include in the list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLList(CodeScalar), + description: + 'For constructed pages, what kind of resources to include in the list.', + }, + _package: { + type: require('./element.input.js'), + description: + 'For constructed pages, a list of packages to include in the page (or else empty for everything).', + }, + package: { + type: new GraphQLList(GraphQLString), + description: + 'For constructed pages, a list of packages to include in the page (or else empty for everything).', + }, + _format: { + type: require('./element.input.js'), + description: 'The format of the page.', + }, + format: { + type: CodeScalar, + description: 'The format of the page.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/list.input.js b/src/resources/1_0_2/inputs/list.input.js index fa1c02b9..fc4405ac 100644 --- a/src/resources/1_0_2/inputs/list.input.js +++ b/src/resources/1_0_2/inputs/list.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ListResourceInputType = new GraphQLEnumType({ - name: 'ListResourceInputType', - values: { - List: { value: 'List' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,96 +16,153 @@ let ListResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'List_Input', - description: 'Base StructureDefinition for List Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ListResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier for the List assigned for business purposes outside the context of FHIR.', - }, - title: { - type: GraphQLString, - description: 'A label for the list assigned by the author.', - }, - _title: { - type: require('./element.input'), - description: 'A label for the list assigned by the author.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-example-codes - code: { - type: require('./codeableconcept.input'), - description: - 'This code defines the purpose of the list - why it was created.', - }, - subject: { - type: require('./reference.input'), - description: - 'The common subject (or patient) of the resources that are in the list, if there is one.', - }, - source: { - type: require('./reference.input'), - description: - 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The encounter that is the context in which this list was created.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current state of this list.', - }, - _status: { - type: require('./element.input'), - description: 'Indicates the current state of this list.', - }, - date: { - type: DateTimeScalar, - description: 'The date that the list was prepared.', - }, - _date: { - type: require('./element.input'), - description: 'The date that the list was prepared.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-order - orderedBy: { - type: require('./codeableconcept.input'), - description: 'What order applies to the items in the list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - _mode: { - type: require('./element.input'), - description: - 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - note: { - type: GraphQLString, - description: 'Comments that apply to the overall list.', - }, - _note: { - type: require('./element.input'), - description: 'Comments that apply to the overall list.', - }, - entry: { - type: new GraphQLList(require('./listentry.input')), - description: 'Entries in this list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason - emptyReason: { - type: require('./codeableconcept.input'), - description: 'If the list is empty, why the list is empty.', - }, - }), + description: 'Base StructureDefinition for List Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'List_Enum_input', + values: { List: { value: 'List' } }, + }), + ), + 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: + 'Identifier for the List assigned for business purposes outside the context of FHIR.', + }, + _title: { + type: require('./element.input.js'), + description: 'A label for the list assigned by the author.', + }, + title: { + type: GraphQLString, + description: 'A label for the list assigned by the author.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-example-codes + code: { + type: require('./codeableconcept.input.js'), + description: + 'This code defines the purpose of the list - why it was created.', + }, + subject: { + type: GraphQLString, + description: + 'The common subject (or patient) of the resources that are in the list, if there is one.', + }, + source: { + type: GraphQLString, + description: + 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', + }, + encounter: { + type: GraphQLString, + description: + 'The encounter that is the context in which this list was created.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current state of this list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this list.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date that the list was prepared.', + }, + date: { + type: DateTimeScalar, + description: 'The date that the list was prepared.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-order + orderedBy: { + type: require('./codeableconcept.input.js'), + description: 'What order applies to the items in the list.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + _note: { + type: require('./element.input.js'), + description: 'Comments that apply to the overall list.', + }, + note: { + type: GraphQLString, + description: 'Comments that apply to the overall list.', + }, + entry: { + type: new GraphQLList(require('./listentry.input.js')), + description: 'Entries in this list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason + emptyReason: { + type: require('./codeableconcept.input.js'), + description: 'If the list is empty, why the list is empty.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/listentry.input.js b/src/resources/1_0_2/inputs/listentry.input.js index 36b241ad..2609bccd 100644 --- a/src/resources/1_0_2/inputs/listentry.input.js +++ b/src/resources/1_0_2/inputs/listentry.input.js @@ -1,48 +1,67 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLBoolean, GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary List.entry Input Schema + * @summary Listentry Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ListEntry_Input', - description: 'Entries in this list.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-item-flag - flag: { - type: require('./codeableconcept.input'), - description: - 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', - }, - deleted: { - type: GraphQLBoolean, - description: 'True if this item is marked as deleted in the list.', - }, - _deleted: { - type: require('./element.input'), - description: 'True if this item is marked as deleted in the list.', - }, - date: { - type: DateTimeScalar, - description: 'When this item was added to the list.', - }, - _date: { - type: require('./element.input'), - description: 'When this item was added to the list.', - }, - item: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the actual resource from which data was derived.', - }, - }), + name: 'Listentry_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-item-flag + flag: { + type: require('./codeableconcept.input.js'), + description: + 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', + }, + _deleted: { + type: require('./element.input.js'), + description: 'True if this item is marked as deleted in the list.', + }, + deleted: { + type: GraphQLBoolean, + description: 'True if this item is marked as deleted in the list.', + }, + _date: { + type: require('./element.input.js'), + description: 'When this item was added to the list.', + }, + date: { + type: DateTimeScalar, + description: 'When this item was added to the list.', + }, + item: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the actual resource from which data was derived.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/location.input.js b/src/resources/1_0_2/inputs/location.input.js index 3f6dda33..3368cb7c 100644 --- a/src/resources/1_0_2/inputs/location.input.js +++ b/src/resources/1_0_2/inputs/location.input.js @@ -1,21 +1,13 @@ -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 LocationResourceInputType = new GraphQLEnumType({ - name: 'LocationResourceInputType', - values: { - Location: { value: 'Location' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,93 +15,149 @@ let LocationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Location_Input', - description: 'Base StructureDefinition for Location Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(LocationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Unique code or number identifying the location to its users.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-status - status: { - type: CodeScalar, - description: 'active | suspended | inactive.', - }, - _status: { - type: require('./element.input'), - description: 'active | suspended | inactive.', - }, - name: { - type: GraphQLString, - description: - 'Name of the location as used by humans. Does not need to be unique.', - }, - _name: { - type: require('./element.input'), - description: - 'Name of the location as used by humans. Does not need to be unique.', - }, - description: { - type: GraphQLString, - description: - 'Description of the Location, which helps in finding or referencing the place.', - }, - _description: { - type: require('./element.input'), - description: - 'Description of the Location, which helps in finding or referencing the place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-mode - mode: { - type: CodeScalar, - description: - 'Indicates whether a resource instance represents a specific location or a class of locations.', - }, - _mode: { - type: require('./element.input'), - description: - 'Indicates whether a resource instance represents a specific location or a class of locations.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType - type: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of function performed at the location.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', - }, - address: { - type: require('./address.input'), - description: 'Physical location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-physical-type - physicalType: { - type: require('./codeableconcept.input'), - description: - 'Physical form of the location, e.g. building, room, vehicle, road.', - }, - position: { - type: require('./locationposition.input'), - description: - 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'The organization responsible for the provisioning and upkeep of the location.', - }, - partOf: { - type: require('./reference.input'), - description: - 'Another Location which this Location is physically part of.', - }, - }), + description: 'Base StructureDefinition for Location Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Location_Enum_input', + values: { Location: { value: 'Location' } }, + }), + ), + 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 code or number identifying the location to its users.', + }, + _status: { + type: require('./element.input.js'), + description: 'active | suspended | inactive.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-status + status: { + type: CodeScalar, + description: 'active | suspended | inactive.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + name: { + type: GraphQLString, + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + description: { + type: GraphQLString, + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-mode + mode: { + type: CodeScalar, + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType + type: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the type of function performed at the location.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', + }, + address: { + type: require('./address.input.js'), + description: 'Physical location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-physical-type + physicalType: { + type: require('./codeableconcept.input.js'), + description: + 'Physical form of the location, e.g. building, room, vehicle, road.', + }, + position: { + type: require('./locationposition.input.js'), + description: + 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization responsible for the provisioning and upkeep of the location.', + }, + partOf: { + type: GraphQLString, + description: + 'Another Location which this Location is physically part of.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/locationposition.input.js b/src/resources/1_0_2/inputs/locationposition.input.js index ffc12ac0..29496b9c 100644 --- a/src/resources/1_0_2/inputs/locationposition.input.js +++ b/src/resources/1_0_2/inputs/locationposition.input.js @@ -1,51 +1,68 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Location.position Input Schema + * @summary Locationposition Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'LocationPosition_Input', - description: - 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', - fields: () => - extendSchema(require('./backboneelement.input'), { - longitude: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', - }, - _longitude: { - type: require('./element.input'), - description: - 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', - }, - latitude: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', - }, - _latitude: { - type: require('./element.input'), - description: - 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', - }, - altitude: { - type: GraphQLFloat, - description: - 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', - }, - _altitude: { - type: require('./element.input'), - description: - 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', - }, - }), + name: 'Locationposition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _longitude: { + type: require('./element.input.js'), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + longitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + _latitude: { + type: require('./element.input.js'), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + latitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + _altitude: { + type: require('./element.input.js'), + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + altitude: { + type: GraphQLFloat, + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/media.input.js b/src/resources/1_0_2/inputs/media.input.js index a5ba9943..a861c75e 100644 --- a/src/resources/1_0_2/inputs/media.input.js +++ b/src/resources/1_0_2/inputs/media.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.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 MediaResourceInputType = new GraphQLEnumType({ - name: 'MediaResourceInputType', - values: { - Media: { value: 'Media' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -25,99 +17,156 @@ let MediaResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Media_Input', - description: 'Base StructureDefinition for Media Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MediaResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/digital-media-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether the media is a photo (still image), an audio recording, or a video recording.', - }, - _type: { - type: require('./element.input'), - description: - 'Whether the media is a photo (still image), an audio recording, or a video recording.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/digital-media-subtype - subtype: { - type: require('./codeableconcept.input'), - description: - 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', - }, - subject: { - type: require('./reference.input'), - description: 'Who/What this Media is a record of.', - }, - operator: { - type: require('./reference.input'), - description: 'The person who administered the collection of the image.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/media-view - view: { - type: require('./codeableconcept.input'), - description: - 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', - }, - deviceName: { - type: GraphQLString, - description: - 'The name of the device / manufacturer of the device that was used to make the recording.', - }, - _deviceName: { - type: require('./element.input'), - description: - 'The name of the device / manufacturer of the device that was used to make the recording.', - }, - height: { - type: PositiveIntScalar, - description: 'Height of the image in pixels (photo/video).', - }, - _height: { - type: require('./element.input'), - description: 'Height of the image in pixels (photo/video).', - }, - width: { - type: PositiveIntScalar, - description: 'Width of the image in pixels (photo/video).', - }, - _width: { - type: require('./element.input'), - description: 'Width of the image in pixels (photo/video).', - }, - frames: { - type: PositiveIntScalar, - description: - 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', - }, - _frames: { - type: require('./element.input'), - description: - 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', - }, - duration: { - type: UnsignedIntScalar, - description: - 'The duration of the recording in seconds - for audio and video.', - }, - _duration: { - type: require('./element.input'), - description: - 'The duration of the recording in seconds - for audio and video.', - }, - content: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The actual content of the media - inline or by direct reference to the media source file.', - }, - }), + description: 'Base StructureDefinition for Media Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Media_Enum_input', + values: { Media: { value: 'Media' } }, + }), + ), + 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Whether the media is a photo (still image), an audio recording, or a video recording.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/digital-media-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the media is a photo (still image), an audio recording, or a video recording.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/digital-media-subtype + subtype: { + type: require('./codeableconcept.input.js'), + description: + 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', + }, + subject: { + type: GraphQLString, + description: 'Who/What this Media is a record of.', + }, + operator: { + type: GraphQLString, + description: 'The person who administered the collection of the image.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/media-view + view: { + type: require('./codeableconcept.input.js'), + description: + 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', + }, + _deviceName: { + type: require('./element.input.js'), + description: + 'The name of the device / manufacturer of the device that was used to make the recording.', + }, + deviceName: { + type: GraphQLString, + description: + 'The name of the device / manufacturer of the device that was used to make the recording.', + }, + _height: { + type: require('./element.input.js'), + description: 'Height of the image in pixels (photo/video).', + }, + height: { + type: PositiveIntScalar, + description: 'Height of the image in pixels (photo/video).', + }, + _width: { + type: require('./element.input.js'), + description: 'Width of the image in pixels (photo/video).', + }, + width: { + type: PositiveIntScalar, + description: 'Width of the image in pixels (photo/video).', + }, + _frames: { + type: require('./element.input.js'), + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + frames: { + type: PositiveIntScalar, + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + _duration: { + type: require('./element.input.js'), + description: + 'The duration of the recording in seconds - for audio and video.', + }, + duration: { + type: UnsignedIntScalar, + description: + 'The duration of the recording in seconds - for audio and video.', + }, + content: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The actual content of the media - inline or by direct reference to the media source file.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medication.input.js b/src/resources/1_0_2/inputs/medication.input.js index 99735ea0..3bf29a7e 100644 --- a/src/resources/1_0_2/inputs/medication.input.js +++ b/src/resources/1_0_2/inputs/medication.input.js @@ -1,20 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationResourceInputType = new GraphQLEnumType({ - name: 'MedicationResourceInputType', - values: { - Medication: { value: 'Medication' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,42 +16,97 @@ let MedicationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Medication_Input', - description: 'Base StructureDefinition for Medication Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - code: { - type: require('./codeableconcept.input'), - description: - 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', - }, - isBrand: { - type: GraphQLBoolean, - description: - 'Set to true if the item is attributable to a specific manufacturer.', - }, - _isBrand: { - type: require('./element.input'), - description: - 'Set to true if the item is attributable to a specific manufacturer.', - }, - manufacturer: { - type: require('./reference.input'), - description: 'Describes the details of the manufacturer.', - }, - product: { - type: require('./medicationproduct.input'), - description: - 'Information that only applies to products (not packages).', - }, - package: { - type: require('./medicationpackage.input'), - description: - 'Information that only applies to packages (not products).', - }, - }), + description: 'Base StructureDefinition for Medication Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Medication_Enum_input', + values: { Medication: { value: 'Medication' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', + }, + _isBrand: { + type: require('./element.input.js'), + description: + 'Set to true if the item is attributable to a specific manufacturer.', + }, + isBrand: { + type: GraphQLBoolean, + description: + 'Set to true if the item is attributable to a specific manufacturer.', + }, + manufacturer: { + type: GraphQLString, + description: 'Describes the details of the manufacturer.', + }, + product: { + type: require('./medicationproduct.input.js'), + description: 'Information that only applies to products (not packages).', + }, + package: { + type: require('./medicationpackage.input.js'), + description: 'Information that only applies to packages (not products).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationadministration.input.js b/src/resources/1_0_2/inputs/medicationadministration.input.js index 5b20c894..0415a3e0 100644 --- a/src/resources/1_0_2/inputs/medicationadministration.input.js +++ b/src/resources/1_0_2/inputs/medicationadministration.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationAdministrationResourceInputType = new GraphQLEnumType({ - name: 'MedicationAdministrationResourceInputType', - values: { - MedicationAdministration: { value: 'MedicationAdministration' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,114 +17,172 @@ let MedicationAdministrationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MedicationAdministration_Input', - description: - 'Base StructureDefinition for MedicationAdministration Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationAdministrationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', - }, - _status: { - type: require('./element.input'), - description: - 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The person or animal receiving the medication.', - }, - practitioner: { - type: require('./reference.input'), - description: - 'The individual who was responsible for giving the medication to the patient.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.', - }, - prescription: { - type: require('./reference.input'), - description: - 'The original request, instruction or authority to perform the administration.', - }, - wasNotGiven: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the medication was NOT administered.', - }, - _wasNotGiven: { - type: require('./element.input'), - description: - 'Set this to true if the record is saying that the medication was NOT administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes - reasonNotGiven: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A code indicating why the administration was not performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-given-codes - reasonGiven: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'A code indicating why the medication was given.', - }, - effectiveTimeDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - _effectiveTimeDateTime: { - type: require('./element.input'), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - effectiveTimePeriod: { - type: new GraphQLNonNull(require('./period.input')), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - device: { - type: new GraphQLList(require('./reference.input')), - description: - 'The device used in administering the medication to the patient. For example, a particular infusion pump.', - }, - note: { - type: GraphQLString, - description: - 'Extra information about the medication administration that is not conveyed by the other attributes.', - }, - _note: { - type: require('./element.input'), - description: - 'Extra information about the medication administration that is not conveyed by the other attributes.', - }, - dosage: { - type: require('./medicationadministrationdosage.input'), - description: - 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', - }, - }), + description: 'Base StructureDefinition for MedicationAdministration Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationAdministration_Enum_input', + values: { + MedicationAdministration: { value: 'MedicationAdministration' }, + }, + }), + ), + 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: + 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person or animal receiving the medication.', + }, + practitioner: { + type: GraphQLString, + description: + 'The individual who was responsible for giving the medication to the patient.', + }, + encounter: { + type: GraphQLString, + description: + 'The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.', + }, + prescription: { + type: GraphQLString, + description: + 'The original request, instruction or authority to perform the administration.', + }, + _wasNotGiven: { + type: require('./element.input.js'), + description: + 'Set this to true if the record is saying that the medication was NOT administered.', + }, + wasNotGiven: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the medication was NOT administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes + reasonNotGiven: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code indicating why the administration was not performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-given-codes + reasonGiven: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A code indicating why the medication was given.', + }, + _effectiveTimeDateTime: { + type: require('./element.input.js'), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectiveTimeDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectiveTimePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + device: { + type: new GraphQLList(GraphQLString), + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + }, + _note: { + type: require('./element.input.js'), + description: + 'Extra information about the medication administration that is not conveyed by the other attributes.', + }, + note: { + type: GraphQLString, + description: + 'Extra information about the medication administration that is not conveyed by the other attributes.', + }, + dosage: { + type: require('./medicationadministrationdosage.input.js'), + description: + 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationadministrationdosage.input.js b/src/resources/1_0_2/inputs/medicationadministrationdosage.input.js index b2351f92..013e637d 100644 --- a/src/resources/1_0_2/inputs/medicationadministrationdosage.input.js +++ b/src/resources/1_0_2/inputs/medicationadministrationdosage.input.js @@ -1,65 +1,85 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationAdministration.dosage Input Schema + * @summary MedicationAdministrationdosage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationAdministrationDosage_Input', - description: - 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - text: { - type: GraphQLString, - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', - }, - _text: { - type: require('./element.input'), - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteCodeableConcept: { - type: require('./codeableconcept.input'), - description: - "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteReference: { - type: require('./reference.input'), - description: - "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.input'), - description: - 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', - }, - method: { - type: require('./codeableconcept.input'), - description: - 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', - }, - rateRatio: { - type: require('./ratio.input'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - rateRange: { - type: require('./range.input'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - }), + name: 'MedicationAdministrationdosage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteReference: { + type: GraphQLString, + description: + "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.input.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + rateRange: { + type: require('./range.input.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationdispense.input.js b/src/resources/1_0_2/inputs/medicationdispense.input.js index a1e28afc..0bf8e33a 100644 --- a/src/resources/1_0_2/inputs/medicationdispense.input.js +++ b/src/resources/1_0_2/inputs/medicationdispense.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 MedicationDispenseResourceInputType = new GraphQLEnumType({ - name: 'MedicationDispenseResourceInputType', - values: { - MedicationDispense: { value: 'MedicationDispense' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,120 +16,173 @@ let MedicationDispenseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MedicationDispense_Input', - description: 'Base StructureDefinition for MedicationDispense Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationDispenseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-status - status: { - type: CodeScalar, - description: - 'A code specifying the state of the set of dispense events.', - }, - _status: { - type: require('./element.input'), - description: - 'A code specifying the state of the set of dispense events.', - }, - patient: { - type: require('./reference.input'), - description: - 'A link to a resource representing the person to whom the medication will be given.', - }, - dispenser: { - type: require('./reference.input'), - description: - 'The individual responsible for dispensing the medication.', - }, - authorizingPrescription: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates the medication order that is being dispensed against.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType - type: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The amount of medication that has been dispensed. Includes unit of measure.', - }, - daysSupply: { - type: require('./quantity.input'), - description: 'The amount of medication expressed as a timing amount.', - }, - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - whenPrepared: { - type: DateTimeScalar, - description: - 'The time when the dispensed product was packaged and reviewed.', - }, - _whenPrepared: { - type: require('./element.input'), - description: - 'The time when the dispensed product was packaged and reviewed.', - }, - whenHandedOver: { - type: DateTimeScalar, - description: - 'The time the dispensed product was provided to the patient or their representative.', - }, - _whenHandedOver: { - type: require('./element.input'), - description: - 'The time the dispensed product was provided to the patient or their representative.', - }, - destination: { - type: require('./reference.input'), - description: - 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', - }, - receiver: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', - }, - note: { - type: GraphQLString, - description: - 'Extra information about the dispense that could not be conveyed in the other attributes.', - }, - _note: { - type: require('./element.input'), - description: - 'Extra information about the dispense that could not be conveyed in the other attributes.', - }, - dosageInstruction: { - type: new GraphQLList( - require('./medicationdispensedosageinstruction.input'), - ), - description: - 'Indicates how the medication is to be used by the patient.', - }, - substitution: { - type: require('./medicationdispensesubstitution.input'), - description: - 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.', - }, - }), + description: 'Base StructureDefinition for MedicationDispense Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationDispense_Enum_input', + values: { MedicationDispense: { value: 'MedicationDispense' } }, + }), + ), + 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: require('./identifier.input.js'), + description: + 'Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code specifying the state of the set of dispense events.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-status + status: { + type: CodeScalar, + description: 'A code specifying the state of the set of dispense events.', + }, + patient: { + type: GraphQLString, + description: + 'A link to a resource representing the person to whom the medication will be given.', + }, + dispenser: { + type: GraphQLString, + description: 'The individual responsible for dispensing the medication.', + }, + authorizingPrescription: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the medication order that is being dispensed against.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType + type: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The amount of medication that has been dispensed. Includes unit of measure.', + }, + daysSupply: { + type: require('./quantity.input.js'), + description: 'The amount of medication expressed as a timing amount.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + _whenPrepared: { + type: require('./element.input.js'), + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + whenPrepared: { + type: DateTimeScalar, + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + _whenHandedOver: { + type: require('./element.input.js'), + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + whenHandedOver: { + type: DateTimeScalar, + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + destination: { + type: GraphQLString, + description: + 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + }, + _note: { + type: require('./element.input.js'), + description: + 'Extra information about the dispense that could not be conveyed in the other attributes.', + }, + note: { + type: GraphQLString, + description: + 'Extra information about the dispense that could not be conveyed in the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList( + require('./medicationdispensedosageinstruction.input.js'), + ), + description: 'Indicates how the medication is to be used by the patient.', + }, + substitution: { + type: require('./medicationdispensesubstitution.input.js'), + description: + 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationdispensedosageinstruction.input.js b/src/resources/1_0_2/inputs/medicationdispensedosageinstruction.input.js index ca291118..96ba3dae 100644 --- a/src/resources/1_0_2/inputs/medicationdispensedosageinstruction.input.js +++ b/src/resources/1_0_2/inputs/medicationdispensedosageinstruction.input.js @@ -1,103 +1,121 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationDispense.dosageInstruction Input Schema + * @summary MedicationDispensedosageInstruction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationDispenseDosageInstruction_Input', - description: 'Indicates how the medication is to be used by the patient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - text: { - type: GraphQLString, - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', - }, - _text: { - type: require('./element.input'), - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', - }, - additionalInstructions: { - type: require('./codeableconcept.input'), - description: - "Additional instructions such as 'Swallow with plenty of water' which may or may not be coded.", - }, - timing: { - type: require('./timing.input'), - description: - "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - asNeededBoolean: { - type: GraphQLBoolean, - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - _asNeededBoolean: { - type: require('./element.input'), - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - asNeededCodeableConcept: { - type: require('./codeableconcept.input'), - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'A coded specification of the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteReference: { - type: require('./reference.input'), - description: - 'A coded specification of the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.input'), - description: - 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.', - }, - method: { - type: require('./codeableconcept.input'), - description: - 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.', - }, - doseRange: { - type: require('./range.input'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - doseQuantity: { - type: require('./quantity.input'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - rateRatio: { - type: require('./ratio.input'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - rateRange: { - type: require('./range.input'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - maxDosePerPeriod: { - type: require('./ratio.input'), - description: - 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours.', - }, - }), + name: 'MedicationDispensedosageInstruction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', + }, + additionalInstructions: { + type: require('./codeableconcept.input.js'), + description: + "Additional instructions such as 'Swallow with plenty of water' which may or may not be coded.", + }, + timing: { + type: require('./timing.input.js'), + description: + "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _asNeededBoolean: { + type: require('./element.input.js'), + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A coded specification of the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteReference: { + type: GraphQLString, + description: + 'A coded specification of the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.input.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.', + }, + doseRange: { + type: require('./range.input.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + doseQuantity: { + type: require('./quantity.input.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + rateRange: { + type: require('./range.input.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + maxDosePerPeriod: { + type: require('./ratio.input.js'), + description: + 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationdispensesubstitution.input.js b/src/resources/1_0_2/inputs/medicationdispensesubstitution.input.js index cce727dc..845c5ef6 100644 --- a/src/resources/1_0_2/inputs/medicationdispensesubstitution.input.js +++ b/src/resources/1_0_2/inputs/medicationdispensesubstitution.input.js @@ -1,38 +1,55 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationDispense.substitution Input Schema + * @summary MedicationDispensesubstitution Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationDispenseSubstitution_Input', - description: - 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'A code signifying whether a different drug was dispensed from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.', - }, - responsibleParty: { - type: new GraphQLList(require('./reference.input')), - description: - 'The person or organization that has primary responsibility for the substitution.', - }, - }), + name: 'MedicationDispensesubstitution_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code signifying whether a different drug was dispensed from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.', + }, + responsibleParty: { + type: new GraphQLList(GraphQLString), + description: + 'The person or organization that has primary responsibility for the substitution.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationorder.input.js b/src/resources/1_0_2/inputs/medicationorder.input.js index ea90b865..97317977 100644 --- a/src/resources/1_0_2/inputs/medicationorder.input.js +++ b/src/resources/1_0_2/inputs/medicationorder.input.js @@ -1,22 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -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 MedicationOrderResourceInputType = new GraphQLEnumType({ - name: 'MedicationOrderResourceInputType', - values: { - MedicationOrder: { value: 'MedicationOrder' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,121 +16,177 @@ let MedicationOrderResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MedicationOrder_Input', - description: 'Base StructureDefinition for MedicationOrder Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationOrderResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.', - }, - dateWritten: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was written.', - }, - _dateWritten: { - type: require('./element.input'), - description: - 'The date (and perhaps time) when the prescription was written.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-order-status - status: { - type: CodeScalar, - description: - 'A code specifying the state of the order. Generally this will be active or completed state.', - }, - _status: { - type: require('./element.input'), - description: - 'A code specifying the state of the order. Generally this will be active or completed state.', - }, - dateEnded: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was stopped.', - }, - _dateEnded: { - type: require('./element.input'), - description: - 'The date (and perhaps time) when the prescription was stopped.', - }, - reasonEnded: { - type: require('./codeableconcept.input'), - description: 'The reason why the prescription was stopped, if it was.', - }, - patient: { - type: require('./reference.input'), - description: - 'A link to a resource representing the person to whom the medication will be given.', - }, - prescriber: { - type: require('./reference.input'), - description: - 'The healthcare professional responsible for authorizing the prescription.', - }, - encounter: { - type: require('./reference.input'), - description: - 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonReference: { - type: require('./reference.input'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - note: { - type: GraphQLString, - description: - 'Extra information about the prescription that could not be conveyed by the other attributes.', - }, - _note: { - type: require('./element.input'), - description: - 'Extra information about the prescription that could not be conveyed by the other attributes.', - }, - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - dosageInstruction: { - type: new GraphQLList( - require('./medicationorderdosageinstruction.input'), - ), - description: - 'Indicates how the medication is to be used by the patient.', - }, - dispenseRequest: { - type: require('./medicationorderdispenserequest.input'), - description: - 'Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', - }, - substitution: { - type: require('./medicationordersubstitution.input'), - description: - "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.", - }, - priorPrescription: { - type: require('./reference.input'), - description: - 'A link to a resource representing an earlier order or prescription that this order supersedes.', - }, - }), + description: 'Base StructureDefinition for MedicationOrder Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationOrder_Enum_input', + values: { MedicationOrder: { value: 'MedicationOrder' } }, + }), + ), + 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: + 'External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.', + }, + _dateWritten: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + dateWritten: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was written.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying the state of the order. Generally this will be active or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-order-status + status: { + type: CodeScalar, + description: + 'A code specifying the state of the order. Generally this will be active or completed state.', + }, + _dateEnded: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the prescription was stopped.', + }, + dateEnded: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was stopped.', + }, + reasonEnded: { + type: require('./codeableconcept.input.js'), + description: 'The reason why the prescription was stopped, if it was.', + }, + patient: { + type: GraphQLString, + description: + 'A link to a resource representing the person to whom the medication will be given.', + }, + prescriber: { + type: GraphQLString, + description: + 'The healthcare professional responsible for authorizing the prescription.', + }, + encounter: { + type: GraphQLString, + description: + 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonReference: { + type: GraphQLString, + description: + 'Can be the reason or the indication for writing the prescription.', + }, + _note: { + type: require('./element.input.js'), + description: + 'Extra information about the prescription that could not be conveyed by the other attributes.', + }, + note: { + type: GraphQLString, + description: + 'Extra information about the prescription that could not be conveyed by the other attributes.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + dosageInstruction: { + type: new GraphQLList( + require('./medicationorderdosageinstruction.input.js'), + ), + description: 'Indicates how the medication is to be used by the patient.', + }, + dispenseRequest: { + type: require('./medicationorderdispenserequest.input.js'), + description: + 'Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', + }, + substitution: { + type: require('./medicationordersubstitution.input.js'), + description: + "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.", + }, + priorPrescription: { + type: GraphQLString, + description: + 'A link to a resource representing an earlier order or prescription that this order supersedes.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationorderdispenserequest.input.js b/src/resources/1_0_2/inputs/medicationorderdispenserequest.input.js index 91dc4fcc..599a4abb 100644 --- a/src/resources/1_0_2/inputs/medicationorderdispenserequest.input.js +++ b/src/resources/1_0_2/inputs/medicationorderdispenserequest.input.js @@ -1,52 +1,72 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary MedicationOrder.dispenseRequest Input Schema + * @summary MedicationOrderdispenseRequest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationOrderDispenseRequest_Input', - description: - 'Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', - fields: () => - extendSchema(require('./backboneelement.input'), { - medicationCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: require('./reference.input'), - description: - 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - validityPeriod: { - type: require('./period.input'), - description: - 'This indicates the validity period of a prescription (stale dating the Prescription).', - }, - numberOfRepeatsAllowed: { - type: PositiveIntScalar, - description: - "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", - }, - _numberOfRepeatsAllowed: { - type: require('./element.input'), - description: - "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", - }, - quantity: { - type: require('./quantity.input'), - description: 'The amount that is to be dispensed for one fill.', - }, - expectedSupplyDuration: { - type: require('./quantity.input'), - description: - 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', - }, - }), + name: 'MedicationOrderdispenseRequest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + medicationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: GraphQLString, + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + validityPeriod: { + type: require('./period.input.js'), + description: + 'This indicates the validity period of a prescription (stale dating the Prescription).', + }, + _numberOfRepeatsAllowed: { + type: require('./element.input.js'), + description: + "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", + }, + numberOfRepeatsAllowed: { + type: PositiveIntScalar, + description: + "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount that is to be dispensed for one fill.', + }, + expectedSupplyDuration: { + type: require('./quantity.input.js'), + description: + 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationorderdosageinstruction.input.js b/src/resources/1_0_2/inputs/medicationorderdosageinstruction.input.js index 5d7e710c..aac3a3a2 100644 --- a/src/resources/1_0_2/inputs/medicationorderdosageinstruction.input.js +++ b/src/resources/1_0_2/inputs/medicationorderdosageinstruction.input.js @@ -1,103 +1,121 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationOrder.dosageInstruction Input Schema + * @summary MedicationOrderdosageInstruction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationOrderDosageInstruction_Input', - description: 'Indicates how the medication is to be used by the patient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - text: { - type: GraphQLString, - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.', - }, - _text: { - type: require('./element.input'), - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.', - }, - additionalInstructions: { - type: require('./codeableconcept.input'), - description: - "Additional instructions such as 'Swallow with plenty of water' which may or may not be coded.", - }, - timing: { - type: require('./timing.input'), - description: - "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - asNeededBoolean: { - type: GraphQLBoolean, - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - _asNeededBoolean: { - type: require('./element.input'), - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - asNeededCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'A coded specification of the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteReference: { - type: require('./reference.input'), - description: - 'A coded specification of the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.input'), - description: - "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.", - }, - method: { - type: require('./codeableconcept.input'), - description: - 'A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV.', - }, - doseRange: { - type: require('./range.input'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - doseQuantity: { - type: require('./quantity.input'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - rateRatio: { - type: require('./ratio.input'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - rateRange: { - type: require('./range.input'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - maxDosePerPeriod: { - type: require('./ratio.input'), - description: - 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.', - }, - }), + name: 'MedicationOrderdosageInstruction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.', + }, + additionalInstructions: { + type: require('./codeableconcept.input.js'), + description: + "Additional instructions such as 'Swallow with plenty of water' which may or may not be coded.", + }, + timing: { + type: require('./timing.input.js'), + description: + "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _asNeededBoolean: { + type: require('./element.input.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A coded specification of the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteReference: { + type: GraphQLString, + description: + 'A coded specification of the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.input.js'), + description: + "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.", + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV.', + }, + doseRange: { + type: require('./range.input.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + doseQuantity: { + type: require('./quantity.input.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + rateRange: { + type: require('./range.input.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + maxDosePerPeriod: { + type: require('./ratio.input.js'), + description: + 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationordersubstitution.input.js b/src/resources/1_0_2/inputs/medicationordersubstitution.input.js index 787feb91..de4675aa 100644 --- a/src/resources/1_0_2/inputs/medicationordersubstitution.input.js +++ b/src/resources/1_0_2/inputs/medicationordersubstitution.input.js @@ -1,29 +1,49 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationOrder.substitution Input Schema + * @summary MedicationOrdersubstitution Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationOrderSubstitution_Input', - description: - "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'A code signifying whether a different drug should be dispensed from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason - reason: { - type: require('./codeableconcept.input'), - description: - 'Indicates the reason for the substitution, or why substitution must or must not be performed.', - }, - }), + name: 'MedicationOrdersubstitution_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code signifying whether a different drug should be dispensed from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the reason for the substitution, or why substitution must or must not be performed.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationpackage.input.js b/src/resources/1_0_2/inputs/medicationpackage.input.js index 7f81e13b..8f145c64 100644 --- a/src/resources/1_0_2/inputs/medicationpackage.input.js +++ b/src/resources/1_0_2/inputs/medicationpackage.input.js @@ -1,26 +1,42 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Medication.package Input Schema + * @summary Medicationpackage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationPackage_Input', - description: 'Information that only applies to packages (not products).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-package-form-codes - container: { - type: require('./codeableconcept.input'), - description: 'The kind of container that this package comes as.', - }, - content: { - type: new GraphQLList(require('./medicationpackagecontent.input')), - description: - 'A set of components that go to make up the described item.', - }, - }), + name: 'Medicationpackage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-package-form-codes + container: { + type: require('./codeableconcept.input.js'), + description: 'The kind of container that this package comes as.', + }, + content: { + type: new GraphQLList(require('./medicationpackagecontent.input.js')), + description: 'A set of components that go to make up the described item.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationpackagecontent.input.js b/src/resources/1_0_2/inputs/medicationpackagecontent.input.js index 721ba714..8eca700e 100644 --- a/src/resources/1_0_2/inputs/medicationpackagecontent.input.js +++ b/src/resources/1_0_2/inputs/medicationpackagecontent.input.js @@ -1,24 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Medication.package.content Input Schema + * @summary Medicationpackagecontent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationPackageContent_Input', - description: 'A set of components that go to make up the described item.', - fields: () => - extendSchema(require('./backboneelement.input'), { - item: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Identifies one of the items in the package.', - }, - amount: { - type: require('./quantity.input'), - description: 'The amount of the product that is in the package.', - }, - }), + name: 'Medicationpackagecontent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + item: { + type: new GraphQLNonNull(GraphQLString), + description: 'Identifies one of the items in the package.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'The amount of the product that is in the package.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationproduct.input.js b/src/resources/1_0_2/inputs/medicationproduct.input.js index f51a2557..741ce6a6 100644 --- a/src/resources/1_0_2/inputs/medicationproduct.input.js +++ b/src/resources/1_0_2/inputs/medicationproduct.input.js @@ -1,32 +1,48 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Medication.product Input Schema + * @summary Medicationproduct Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationProduct_Input', - description: 'Information that only applies to products (not packages).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-form-codes - form: { - type: require('./codeableconcept.input'), - description: - 'Describes the form of the item. Powder; tablets; carton.', - }, - ingredient: { - type: new GraphQLList(require('./medicationproductingredient.input')), - description: - 'Identifies a particular constituent of interest in the product.', - }, - batch: { - type: new GraphQLList(require('./medicationproductbatch.input')), - description: - 'Information about a group of medication produced or packaged from one production run.', - }, - }), + name: 'Medicationproduct_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-form-codes + form: { + type: require('./codeableconcept.input.js'), + description: 'Describes the form of the item. Powder; tablets; carton.', + }, + ingredient: { + type: new GraphQLList(require('./medicationproductingredient.input.js')), + description: + 'Identifies a particular constituent of interest in the product.', + }, + batch: { + type: new GraphQLList(require('./medicationproductbatch.input.js')), + description: + 'Information about a group of medication produced or packaged from one production run.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationproductbatch.input.js b/src/resources/1_0_2/inputs/medicationproductbatch.input.js index b77eed95..188f6798 100644 --- a/src/resources/1_0_2/inputs/medicationproductbatch.input.js +++ b/src/resources/1_0_2/inputs/medicationproductbatch.input.js @@ -1,36 +1,56 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Medication.product.batch Input Schema + * @summary Medicationproductbatch Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationProductBatch_Input', - description: - 'Information about a group of medication produced or packaged from one production run.', - fields: () => - extendSchema(require('./backboneelement.input'), { - lotNumber: { - type: GraphQLString, - description: - 'The assigned lot number of a batch of the specified product.', - }, - _lotNumber: { - type: require('./element.input'), - description: - 'The assigned lot number of a batch of the specified product.', - }, - expirationDate: { - type: DateTimeScalar, - description: 'When this specific batch of product will expire.', - }, - _expirationDate: { - type: require('./element.input'), - description: 'When this specific batch of product will expire.', - }, - }), + name: 'Medicationproductbatch_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _lotNumber: { + type: require('./element.input.js'), + description: + 'The assigned lot number of a batch of the specified product.', + }, + lotNumber: { + type: GraphQLString, + description: + 'The assigned lot number of a batch of the specified product.', + }, + _expirationDate: { + type: require('./element.input.js'), + description: 'When this specific batch of product will expire.', + }, + expirationDate: { + type: DateTimeScalar, + description: 'When this specific batch of product will expire.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationproductingredient.input.js b/src/resources/1_0_2/inputs/medicationproductingredient.input.js index bd411b75..4d884b81 100644 --- a/src/resources/1_0_2/inputs/medicationproductingredient.input.js +++ b/src/resources/1_0_2/inputs/medicationproductingredient.input.js @@ -1,27 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Medication.product.ingredient Input Schema + * @summary Medicationproductingredient Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationProductIngredient_Input', - description: - 'Identifies a particular constituent of interest in the product.', - fields: () => - extendSchema(require('./backboneelement.input'), { - item: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The actual ingredient - either a substance (simple ingredient) or another medication.', - }, - amount: { - type: require('./ratio.input'), - description: - 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.', - }, - }), + name: 'Medicationproductingredient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + item: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + amount: { + type: require('./ratio.input.js'), + description: + 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationstatement.input.js b/src/resources/1_0_2/inputs/medicationstatement.input.js index 164d6cb6..4fd7c04c 100644 --- a/src/resources/1_0_2/inputs/medicationstatement.input.js +++ b/src/resources/1_0_2/inputs/medicationstatement.input.js @@ -1,23 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationStatementResourceInputType = new GraphQLEnumType({ - name: 'MedicationStatementResourceInputType', - values: { - MedicationStatement: { value: 'MedicationStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,116 +17,173 @@ let MedicationStatementResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MedicationStatement_Input', - description: 'Base StructureDefinition for MedicationStatement Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationStatementResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The person or animal who is/was taking the medication.', - }, - informationSource: { - type: require('./reference.input'), - description: - 'The person who provided the information about the taking of this medication.', - }, - dateAsserted: { - type: DateTimeScalar, - description: - 'The date when the medication statement was asserted by the information source.', - }, - _dateAsserted: { - type: require('./element.input'), - description: - 'The date when the medication statement was asserted by the information source.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", - }, - _status: { - type: require('./element.input'), - description: - "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", - }, - wasNotTaken: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the medication was NOT taken.', - }, - _wasNotTaken: { - type: require('./element.input'), - description: - 'Set this to true if the record is saying that the medication was NOT taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes - reasonNotTaken: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'A code indicating why the medication was not taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonForUseCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'A reason for why the medication is being/was taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonForUseReference: { - type: require('./reference.input'), - description: 'A reason for why the medication is being/was taken.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - _effectiveDateTime: { - type: require('./element.input'), - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - note: { - type: GraphQLString, - description: - 'Provides extra information about the medication statement that is not conveyed by the other attributes.', - }, - _note: { - type: require('./element.input'), - description: - 'Provides extra information about the medication statement that is not conveyed by the other attributes.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.', - }, - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - dosage: { - type: new GraphQLList(require('./medicationstatementdosage.input')), - description: 'Indicates how the medication is/was used by the patient.', - }, - }), + description: 'Base StructureDefinition for MedicationStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationStatement_Enum_input', + values: { MedicationStatement: { value: 'MedicationStatement' } }, + }), + ), + 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: + 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person or animal who is/was taking the medication.', + }, + informationSource: { + type: GraphQLString, + description: + 'The person who provided the information about the taking of this medication.', + }, + _dateAsserted: { + type: require('./element.input.js'), + description: + 'The date when the medication statement was asserted by the information source.', + }, + dateAsserted: { + type: DateTimeScalar, + description: + 'The date when the medication statement was asserted by the information source.', + }, + _status: { + type: require('./element.input.js'), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", + }, + _wasNotTaken: { + type: require('./element.input.js'), + description: + 'Set this to true if the record is saying that the medication was NOT taken.', + }, + wasNotTaken: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the medication was NOT taken.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes + reasonNotTaken: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A code indicating why the medication was not taken.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonForUseCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'A reason for why the medication is being/was taken.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonForUseReference: { + type: GraphQLString, + description: 'A reason for why the medication is being/was taken.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + _note: { + type: require('./element.input.js'), + description: + 'Provides extra information about the medication statement that is not conveyed by the other attributes.', + }, + note: { + type: GraphQLString, + description: + 'Provides extra information about the medication statement that is not conveyed by the other attributes.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + dosage: { + type: new GraphQLList(require('./medicationstatementdosage.input.js')), + description: 'Indicates how the medication is/was used by the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/medicationstatementdosage.input.js b/src/resources/1_0_2/inputs/medicationstatementdosage.input.js index 9ce8b6e2..7c7c11b1 100644 --- a/src/resources/1_0_2/inputs/medicationstatementdosage.input.js +++ b/src/resources/1_0_2/inputs/medicationstatementdosage.input.js @@ -1,98 +1,116 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationStatement.dosage Input Schema + * @summary MedicationStatementdosage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationStatementDosage_Input', - description: 'Indicates how the medication is/was used by the patient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - text: { - type: GraphQLString, - description: - "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", - }, - _text: { - type: require('./element.input'), - description: - "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", - }, - timing: { - type: require('./timing.input'), - description: - "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - asNeededBoolean: { - type: GraphQLBoolean, - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - _asNeededBoolean: { - type: require('./element.input'), - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - asNeededCodeableConcept: { - type: require('./codeableconcept.input'), - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'A coded specification of or a reference to the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteReference: { - type: require('./reference.input'), - description: - 'A coded specification of or a reference to the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.input'), - description: - 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.', - }, - method: { - type: require('./codeableconcept.input'), - description: - 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', - }, - quantityQuantity: { - type: require('./quantity.input'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - quantityRange: { - type: require('./range.input'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - rateRatio: { - type: require('./ratio.input'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - rateRange: { - type: require('./range.input'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - maxDosePerPeriod: { - type: require('./ratio.input'), - description: - 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.', - }, - }), + name: 'MedicationStatementdosage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _text: { + type: require('./element.input.js'), + description: + "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", + }, + text: { + type: GraphQLString, + description: + "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", + }, + timing: { + type: require('./timing.input.js'), + description: + "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _asNeededBoolean: { + type: require('./element.input.js'), + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A coded specification of or a reference to the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteReference: { + type: GraphQLString, + description: + 'A coded specification of or a reference to the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.input.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', + }, + quantityQuantity: { + type: require('./quantity.input.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + quantityRange: { + type: require('./range.input.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + rateRange: { + type: require('./range.input.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + maxDosePerPeriod: { + type: require('./ratio.input.js'), + description: + 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/messageheader.input.js b/src/resources/1_0_2/inputs/messageheader.input.js index a66dd8b0..2cf1e7a3 100644 --- a/src/resources/1_0_2/inputs/messageheader.input.js +++ b/src/resources/1_0_2/inputs/messageheader.input.js @@ -1,21 +1,14 @@ -const InstantScalar = require('../scalars/instant.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 MessageHeaderResourceInputType = new GraphQLEnumType({ - name: 'MessageHeaderResourceInputType', - values: { - MessageHeader: { value: 'MessageHeader' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,72 +16,128 @@ let MessageHeaderResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MessageHeader_Input', - description: 'Base StructureDefinition for MessageHeader Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MessageHeaderResourceInputType), - description: 'Type of this resource.', - }, - timestamp: { - type: new GraphQLNonNull(InstantScalar), - description: 'The time that the message was sent.', - }, - _timestamp: { - type: require('./element.input'), - description: 'The time that the message was sent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - event: { - type: new GraphQLNonNull(require('./coding.input')), - description: - "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-events'.", - }, - response: { - type: require('./messageheaderresponse.input'), - description: - 'Information about the message that this message is a response to. Only present if this message is a response.', - }, - source: { - type: new GraphQLNonNull(require('./messageheadersource.input')), - description: - 'The source application from which this message originated.', - }, - destination: { - type: new GraphQLList(require('./messageheaderdestination.input')), - description: - 'The destination application which the message is intended for.', - }, - enterer: { - type: require('./reference.input'), - description: - 'The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', - }, - author: { - type: require('./reference.input'), - description: - 'The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', - }, - receiver: { - type: require('./reference.input'), - description: - "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", - }, - responsible: { - type: require('./reference.input'), - description: - 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-reason-encounter - reason: { - type: require('./codeableconcept.input'), - description: - 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', - }, - data: { - type: new GraphQLList(require('./reference.input')), - description: - 'The actual data of the message - a reference to the root/focus class of the event.', - }, - }), + description: 'Base StructureDefinition for MessageHeader Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageHeader_Enum_input', + values: { MessageHeader: { value: 'MessageHeader' } }, + }), + ), + 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.', + }, + _timestamp: { + type: require('./element.input.js'), + description: 'The time that the message was sent.', + }, + timestamp: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time that the message was sent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + event: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-events'.", + }, + response: { + type: require('./messageheaderresponse.input.js'), + description: + 'Information about the message that this message is a response to. Only present if this message is a response.', + }, + source: { + type: new GraphQLNonNull(require('./messageheadersource.input.js')), + description: 'The source application from which this message originated.', + }, + destination: { + type: new GraphQLList(require('./messageheaderdestination.input.js')), + description: + 'The destination application which the message is intended for.', + }, + enterer: { + type: GraphQLString, + description: + 'The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', + }, + author: { + type: GraphQLString, + description: + 'The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', + }, + receiver: { + type: GraphQLString, + description: + "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", + }, + responsible: { + type: GraphQLString, + description: + 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-reason-encounter + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', + }, + data: { + type: new GraphQLList(GraphQLString), + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/messageheaderdestination.input.js b/src/resources/1_0_2/inputs/messageheaderdestination.input.js index 42855bb7..d8ac795c 100644 --- a/src/resources/1_0_2/inputs/messageheaderdestination.input.js +++ b/src/resources/1_0_2/inputs/messageheaderdestination.input.js @@ -1,42 +1,60 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary MessageHeader.destination Input Schema + * @summary MessageHeaderdestination Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MessageHeaderDestination_Input', - description: 'The destination application which the message is intended for.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: 'Human-readable name for the target system.', - }, - _name: { - type: require('./element.input'), - description: 'Human-readable name for the target system.', - }, - target: { - type: require('./reference.input'), - description: - 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', - }, - endpoint: { - type: new GraphQLNonNull(UriScalar), - description: 'Indicates where the message should be routed to.', - }, - _endpoint: { - type: require('./element.input'), - description: 'Indicates where the message should be routed to.', - }, - }), + name: 'MessageHeaderdestination_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Human-readable name for the target system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the target system.', + }, + target: { + type: GraphQLString, + description: + 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', + }, + _endpoint: { + type: require('./element.input.js'), + description: 'Indicates where the message should be routed to.', + }, + endpoint: { + type: new GraphQLNonNull(UriScalar), + description: 'Indicates where the message should be routed to.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/messageheaderresponse.input.js b/src/resources/1_0_2/inputs/messageheaderresponse.input.js index 9ac01372..4b6e3eb8 100644 --- a/src/resources/1_0_2/inputs/messageheaderresponse.input.js +++ b/src/resources/1_0_2/inputs/messageheaderresponse.input.js @@ -1,44 +1,62 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary MessageHeader.response Input Schema + * @summary MessageHeaderresponse Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MessageHeaderResponse_Input', - description: - 'Information about the message that this message is a response to. Only present if this message is a response.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLNonNull(IdScalar), - description: - 'The id of the message that this message is a response to.', - }, - _identifier: { - type: require('./element.input'), - description: - 'The id of the message that this message is a response to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/response-code - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', - }, - _code: { - type: require('./element.input'), - description: - 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', - }, - details: { - type: require('./reference.input'), - description: 'Full details of any issues found in the message.', - }, - }), + name: 'MessageHeaderresponse_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: require('./element.input.js'), + description: 'The id of the message that this message is a response to.', + }, + identifier: { + type: new GraphQLNonNull(IdScalar), + description: 'The id of the message that this message is a response to.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/response-code + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + details: { + type: GraphQLString, + description: 'Full details of any issues found in the message.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/messageheadersource.input.js b/src/resources/1_0_2/inputs/messageheadersource.input.js index 5f31bceb..c96dcdd2 100644 --- a/src/resources/1_0_2/inputs/messageheadersource.input.js +++ b/src/resources/1_0_2/inputs/messageheadersource.input.js @@ -1,64 +1,80 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary MessageHeader.source Input Schema + * @summary MessageHeadersource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MessageHeaderSource_Input', - description: 'The source application from which this message originated.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: 'Human-readable name for the source system.', - }, - _name: { - type: require('./element.input'), - description: 'Human-readable name for the source system.', - }, - software: { - type: GraphQLString, - description: - 'May include configuration or other information useful in debugging.', - }, - _software: { - type: require('./element.input'), - description: - 'May include configuration or other information useful in debugging.', - }, - version: { - type: GraphQLString, - description: - 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', - }, - _version: { - type: require('./element.input'), - description: - 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', - }, - contact: { - type: require('./contactpoint.input'), - description: - 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', - }, - endpoint: { - type: new GraphQLNonNull(UriScalar), - description: - 'Identifies the routing target to send acknowledgements to.', - }, - _endpoint: { - type: require('./element.input'), - description: - 'Identifies the routing target to send acknowledgements to.', - }, - }), + name: 'MessageHeadersource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Human-readable name for the source system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the source system.', + }, + _software: { + type: require('./element.input.js'), + description: + 'May include configuration or other information useful in debugging.', + }, + software: { + type: GraphQLString, + description: + 'May include configuration or other information useful in debugging.', + }, + _version: { + type: require('./element.input.js'), + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + version: { + type: GraphQLString, + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + contact: { + type: require('./contactpoint.input.js'), + description: + 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', + }, + _endpoint: { + type: require('./element.input.js'), + description: 'Identifies the routing target to send acknowledgements to.', + }, + endpoint: { + type: new GraphQLNonNull(UriScalar), + description: 'Identifies the routing target to send acknowledgements to.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/meta.input.js b/src/resources/1_0_2/inputs/meta.input.js index 86161432..639f942d 100644 --- a/src/resources/1_0_2/inputs/meta.input.js +++ b/src/resources/1_0_2/inputs/meta.input.js @@ -1,10 +1,7 @@ -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -12,49 +9,63 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Meta_Input', - description: 'Base StructureDefinition for Meta Type.', - fields: () => - extendSchema(require('./element.input'), { - versionId: { - type: IdScalar, - description: - 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', - }, - _versionId: { - type: require('./element.input'), - description: - 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', - }, - lastUpdated: { - type: InstantScalar, - description: - 'When the resource last changed - e.g. when the version changed.', - }, - _lastUpdated: { - type: require('./element.input'), - description: - 'When the resource last changed - e.g. when the version changed.', - }, - profile: { - type: new GraphQLList(UriScalar), - description: - 'A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].', - }, - _profile: { - type: require('./element.input'), - description: - 'A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - security: { - type: new GraphQLList(require('./coding.input')), - description: - 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', - }, - tag: { - type: new GraphQLList(require('./coding.input')), - description: - 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', - }, - }), + description: 'Base StructureDefinition for Meta Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _versionId: { + type: require('./element.input.js'), + description: + 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', + }, + versionId: { + type: IdScalar, + description: + 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', + }, + _lastUpdated: { + type: require('./element.input.js'), + description: + 'When the resource last changed - e.g. when the version changed.', + }, + lastUpdated: { + type: InstantScalar, + description: + 'When the resource last changed - e.g. when the version changed.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].', + }, + profile: { + type: new GraphQLList(UriScalar), + description: + 'A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + security: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', + }, + tag: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/money.input.js b/src/resources/1_0_2/inputs/money.input.js index 49e780a4..c32ab724 100644 --- a/src/resources/1_0_2/inputs/money.input.js +++ b/src/resources/1_0_2/inputs/money.input.js @@ -1,8 +1,5 @@ const { GraphQLInputObjectType } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Money Input Schema @@ -10,6 +7,6 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); module.exports = new GraphQLInputObjectType({ name: 'Money_Input', description: - 'An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision).', - fields: () => extendSchema(require('./quantity.input')), + 'An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision)', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/inputs/namingsystem.input.js b/src/resources/1_0_2/inputs/namingsystem.input.js index 2372a8b4..67e96759 100644 --- a/src/resources/1_0_2/inputs/namingsystem.input.js +++ b/src/resources/1_0_2/inputs/namingsystem.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 NamingSystemResourceInputType = new GraphQLEnumType({ - name: 'NamingSystemResourceInputType', - values: { - NamingSystem: { value: 'NamingSystem' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,123 +16,180 @@ let NamingSystemResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'NamingSystem_Input', - description: 'Base StructureDefinition for NamingSystem Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(NamingSystemResourceInputType), - description: 'Type of this resource.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The descriptive name of this particular identifier type or code system.', - }, - _name: { - type: require('./element.input'), - description: - 'The descriptive name of this particular identifier type or code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "Indicates whether the naming system is 'ready for use' or not.", - }, - _status: { - type: require('./element.input'), - description: - "Indicates whether the naming system is 'ready for use' or not.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-type - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the purpose for the naming system - what kinds of things does it make unique?.', - }, - _kind: { - type: require('./element.input'), - description: - 'Indicates the purpose for the naming system - what kinds of things does it make unique?.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the naming system.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the naming system.', - }, - contact: { - type: new GraphQLList(require('./namingsystemcontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - responsible: { - type: GraphQLString, - description: - 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', - }, - _responsible: { - type: require('./element.input'), - description: - 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-type - type: { - type: require('./codeableconcept.input'), - description: - 'Categorizes a naming system for easier search by grouping related naming systems.', - }, - description: { - type: GraphQLString, - description: - 'Details about what the namespace identifies including scope, granularity, version labeling, etc.', - }, - _description: { - type: require('./element.input'), - description: - 'Details about what the namespace identifies including scope, granularity, version labeling, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems.', - }, - usage: { - type: GraphQLString, - description: - 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', - }, - _usage: { - type: require('./element.input'), - description: - 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', - }, - uniqueId: { - type: new GraphQLList( - new GraphQLNonNull(require('./namingsystemuniqueid.input')), - ), - description: - 'Indicates how the system may be identified when referenced in electronic exchange.', - }, - replacedBy: { - type: require('./reference.input'), - description: - 'For naming systems that are retired, indicates the naming system that should be used in their place (if any).', - }, - }), + description: 'Base StructureDefinition for NamingSystem Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NamingSystem_Enum_input', + values: { NamingSystem: { value: 'NamingSystem' } }, + }), + ), + 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The descriptive name of this particular identifier type or code system.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The descriptive name of this particular identifier type or code system.', + }, + _status: { + type: require('./element.input.js'), + description: + "Indicates whether the naming system is 'ready for use' or not.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "Indicates whether the naming system is 'ready for use' or not.", + }, + _kind: { + type: require('./element.input.js'), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-type + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the naming system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the naming system.', + }, + contact: { + type: new GraphQLList(require('./namingsystemcontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _responsible: { + type: require('./element.input.js'), + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + responsible: { + type: GraphQLString, + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Categorizes a naming system for easier search by grouping related naming systems.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Details about what the namespace identifies including scope, granularity, version labeling, etc.', + }, + description: { + type: GraphQLString, + description: + 'Details about what the namespace identifies including scope, granularity, version labeling, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + usage: { + type: GraphQLString, + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + uniqueId: { + type: new GraphQLList( + new GraphQLNonNull(require('./namingsystemuniqueid.input.js')), + ), + description: + 'Indicates how the system may be identified when referenced in electronic exchange.', + }, + replacedBy: { + type: GraphQLString, + description: + 'For naming systems that are retired, indicates the naming system that should be used in their place (if any).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/namingsystemcontact.input.js b/src/resources/1_0_2/inputs/namingsystemcontact.input.js index deda1da8..8b28239d 100644 --- a/src/resources/1_0_2/inputs/namingsystemcontact.input.js +++ b/src/resources/1_0_2/inputs/namingsystemcontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NamingSystem.contact Input Schema + * @summary NamingSystemcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NamingSystemContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the naming system.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the naming system.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'NamingSystemcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the naming system.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the naming system.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/namingsystemuniqueid.input.js b/src/resources/1_0_2/inputs/namingsystemuniqueid.input.js index c62c7571..127fcbbf 100644 --- a/src/resources/1_0_2/inputs/namingsystemuniqueid.input.js +++ b/src/resources/1_0_2/inputs/namingsystemuniqueid.input.js @@ -1,59 +1,76 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary NamingSystem.uniqueId Input Schema + * @summary NamingSystemuniqueId Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NamingSystemUniqueId_Input', - description: - 'Indicates how the system may be identified when referenced in electronic exchange.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-identifier-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the unique identifier scheme used for this particular identifier.', - }, - _type: { - type: require('./element.input'), - description: - 'Identifies the unique identifier scheme used for this particular identifier.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The string that should be sent over the wire to identify the code system or identifier system.', - }, - _value: { - type: require('./element.input'), - description: - 'The string that should be sent over the wire to identify the code system or identifier system.', - }, - preferred: { - type: GraphQLBoolean, - description: - "Indicates whether this identifier is the 'preferred' identifier of this type.", - }, - _preferred: { - type: require('./element.input'), - description: - "Indicates whether this identifier is the 'preferred' identifier of this type.", - }, - period: { - type: require('./period.input'), - description: - 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', - }, - }), + name: 'NamingSystemuniqueId_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-identifier-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + _preferred: { + type: require('./element.input.js'), + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + preferred: { + type: GraphQLBoolean, + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + period: { + type: require('./period.input.js'), + description: + 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/narrative.input.js b/src/resources/1_0_2/inputs/narrative.input.js index 0f3757f6..66eed223 100644 --- a/src/resources/1_0_2/inputs/narrative.input.js +++ b/src/resources/1_0_2/inputs/narrative.input.js @@ -1,9 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const XhtmlScalar = require('../scalars/xhtml.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const XhtmlScalar = require('../scalars/xhtml.scalar.js'); /** * @name exports @@ -11,29 +13,43 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Narrative_Input', - description: 'Base StructureDefinition for Narrative Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/narrative-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", - }, - _status: { - type: require('./element.input'), - description: - "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", - }, - div: { - type: new GraphQLNonNull(XhtmlScalar), - description: - 'The actual narrative content, a stripped down version of XHTML.', - }, - _div: { - type: require('./element.input'), - description: - 'The actual narrative content, a stripped down version of XHTML.', - }, - }), + description: 'Base StructureDefinition for Narrative Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _status: { + type: require('./element.input.js'), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/narrative-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + _div: { + type: require('./element.input.js'), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + div: { + type: new GraphQLNonNull(XhtmlScalar), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/nutritionorder.input.js b/src/resources/1_0_2/inputs/nutritionorder.input.js index 844d4e85..d091821f 100644 --- a/src/resources/1_0_2/inputs/nutritionorder.input.js +++ b/src/resources/1_0_2/inputs/nutritionorder.input.js @@ -1,22 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -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 NutritionOrderResourceInputType = new GraphQLEnumType({ - name: 'NutritionOrderResourceInputType', - values: { - NutritionOrder: { value: 'NutritionOrder' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,82 +16,137 @@ let NutritionOrderResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'NutritionOrder_Input', - description: 'Base StructureDefinition for NutritionOrder Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(NutritionOrderResourceInputType), - description: 'Type of this resource.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', - }, - orderer: { - type: require('./reference.input'), - description: - 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order by the order sender or by the order receiver.', - }, - encounter: { - type: require('./reference.input'), - description: - 'An encounter that provides additional information about the healthcare context in which this request is made.', - }, - dateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date and time that this nutrition order was requested.', - }, - _dateTime: { - type: require('./element.input'), - description: - 'The date and time that this nutrition order was requested.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/nutrition-order-status - status: { - type: CodeScalar, - description: 'The workflow status of the nutrition order/request.', - }, - _status: { - type: require('./element.input'), - description: 'The workflow status of the nutrition order/request.', - }, - allergyIntolerance: { - type: new GraphQLList(require('./reference.input')), - description: - 'A link to a record of allergies or intolerances which should be included in the nutrition order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet - foodPreferenceModifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/food-type - excludeFoodModifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', - }, - oralDiet: { - type: require('./nutritionorderoraldiet.input'), - description: 'Diet given orally in contrast to enteral (tube) feeding.', - }, - supplement: { - type: new GraphQLList(require('./nutritionordersupplement.input')), - description: - "Oral nutritional products given in order to add further nutritional value to the patient's diet.", - }, - enteralFormula: { - type: require('./nutritionorderenteralformula.input'), - description: - 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', - }, - }), + description: 'Base StructureDefinition for NutritionOrder Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NutritionOrder_Enum_input', + values: { NutritionOrder: { value: 'NutritionOrder' } }, + }), + ), + 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.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + }, + orderer: { + type: GraphQLString, + description: + 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this order by the order sender or by the order receiver.', + }, + encounter: { + type: GraphQLString, + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + _dateTime: { + type: require('./element.input.js'), + description: 'The date and time that this nutrition order was requested.', + }, + dateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date and time that this nutrition order was requested.', + }, + _status: { + type: require('./element.input.js'), + description: 'The workflow status of the nutrition order/request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/nutrition-order-status + status: { + type: CodeScalar, + description: 'The workflow status of the nutrition order/request.', + }, + allergyIntolerance: { + type: new GraphQLList(GraphQLString), + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet + foodPreferenceModifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/food-type + excludeFoodModifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + oralDiet: { + type: require('./nutritionorderoraldiet.input.js'), + description: 'Diet given orally in contrast to enteral (tube) feeding.', + }, + supplement: { + type: new GraphQLList(require('./nutritionordersupplement.input.js')), + description: + "Oral nutritional products given in order to add further nutritional value to the patient's diet.", + }, + enteralFormula: { + type: require('./nutritionorderenteralformula.input.js'), + description: + 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/nutritionorderenteralformula.input.js b/src/resources/1_0_2/inputs/nutritionorderenteralformula.input.js index 1c7ba2b6..b25a0d46 100644 --- a/src/resources/1_0_2/inputs/nutritionorderenteralformula.input.js +++ b/src/resources/1_0_2/inputs/nutritionorderenteralformula.input.js @@ -1,86 +1,102 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.enteralFormula Input Schema + * @summary NutritionOrderenteralFormula Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderEnteralFormula_Input', - description: - 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/entformula-type - baseFormulaType: { - type: require('./codeableconcept.input'), - description: - 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', - }, - baseFormulaProductName: { - type: GraphQLString, - description: - "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", - }, - _baseFormulaProductName: { - type: require('./element.input'), - description: - "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/entformula-additive - additiveType: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', - }, - additiveProductName: { - type: GraphQLString, - description: - 'The product or brand name of the type of modular component to be added to the formula.', - }, - _additiveProductName: { - type: require('./element.input'), - description: - 'The product or brand name of the type of modular component to be added to the formula.', - }, - caloricDensity: { - type: require('./quantity.input'), - description: - 'The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/enteral-route - routeofAdministration: { - type: require('./codeableconcept.input'), - description: - "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", - }, - administration: { - type: new GraphQLList( - require('./nutritionorderenteralformulaadministration.input'), - ), - description: - 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', - }, - maxVolumeToDeliver: { - type: require('./quantity.input'), - description: - 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', - }, - administrationInstruction: { - type: GraphQLString, - description: - 'Free text formula administration, feeding instructions or additional instructions or information.', - }, - _administrationInstruction: { - type: require('./element.input'), - description: - 'Free text formula administration, feeding instructions or additional instructions or information.', - }, - }), + name: 'NutritionOrderenteralFormula_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/entformula-type + baseFormulaType: { + type: require('./codeableconcept.input.js'), + description: + 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', + }, + _baseFormulaProductName: { + type: require('./element.input.js'), + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + baseFormulaProductName: { + type: GraphQLString, + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/entformula-additive + additiveType: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', + }, + _additiveProductName: { + type: require('./element.input.js'), + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + additiveProductName: { + type: GraphQLString, + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + caloricDensity: { + type: require('./quantity.input.js'), + description: + 'The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/enteral-route + routeofAdministration: { + type: require('./codeableconcept.input.js'), + description: + "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", + }, + administration: { + type: new GraphQLList( + require('./nutritionorderenteralformulaadministration.input.js'), + ), + description: + 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', + }, + maxVolumeToDeliver: { + type: require('./quantity.input.js'), + description: + 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', + }, + _administrationInstruction: { + type: require('./element.input.js'), + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + administrationInstruction: { + type: GraphQLString, + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/nutritionorderenteralformulaadministration.input.js b/src/resources/1_0_2/inputs/nutritionorderenteralformulaadministration.input.js index 0d500a97..1b78e85b 100644 --- a/src/resources/1_0_2/inputs/nutritionorderenteralformulaadministration.input.js +++ b/src/resources/1_0_2/inputs/nutritionorderenteralformulaadministration.input.js @@ -1,37 +1,53 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.enteralFormula.administration Input Schema + * @summary NutritionOrderenteralFormulaadministration Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderEnteralFormulaAdministration_Input', - description: - 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', - fields: () => - extendSchema(require('./backboneelement.input'), { - schedule: { - type: require('./timing.input'), - description: - 'The time period and frequency at which the enteral formula should be delivered to the patient.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The volume of formula to provide to the patient per the specified administration schedule.', - }, - rateQuantity: { - type: require('./quantity.input'), - description: - 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', - }, - rateRatio: { - type: require('./ratio.input'), - description: - 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', - }, - }), + name: 'NutritionOrderenteralFormulaadministration_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + schedule: { + type: require('./timing.input.js'), + description: + 'The time period and frequency at which the enteral formula should be delivered to the patient.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The volume of formula to provide to the patient per the specified administration schedule.', + }, + rateQuantity: { + type: require('./quantity.input.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/nutritionorderoraldiet.input.js b/src/resources/1_0_2/inputs/nutritionorderoraldiet.input.js index 4fe3466f..9ade81be 100644 --- a/src/resources/1_0_2/inputs/nutritionorderoraldiet.input.js +++ b/src/resources/1_0_2/inputs/nutritionorderoraldiet.input.js @@ -1,59 +1,78 @@ const { - GraphQLInputObjectType, GraphQLList, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.oralDiet Input Schema + * @summary NutritionOrderoralDiet Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderOralDiet_Input', - description: 'Diet given orally in contrast to enteral (tube) feeding.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/diet-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', - }, - schedule: { - type: new GraphQLList(require('./timing.input')), - description: - 'The time period and frequency at which the diet should be given.', - }, - nutrient: { - type: new GraphQLList( - require('./nutritionorderoraldietnutrient.input'), - ), - description: - 'Class that defines the quantity and type of nutrient modifications required for the oral diet.', - }, - texture: { - type: new GraphQLList(require('./nutritionorderoraldiettexture.input')), - description: - 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consistency-type - fluidConsistencyType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', - }, - instruction: { - type: GraphQLString, - description: - 'Free text or additional instructions or information pertaining to the oral diet.', - }, - _instruction: { - type: require('./element.input'), - description: - 'Free text or additional instructions or information pertaining to the oral diet.', - }, - }), + name: 'NutritionOrderoralDiet_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diet-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', + }, + schedule: { + type: new GraphQLList(require('./timing.input.js')), + description: + 'The time period and frequency at which the diet should be given.', + }, + nutrient: { + type: new GraphQLList( + require('./nutritionorderoraldietnutrient.input.js'), + ), + description: + 'Class that defines the quantity and type of nutrient modifications required for the oral diet.', + }, + texture: { + type: new GraphQLList( + require('./nutritionorderoraldiettexture.input.js'), + ), + description: + 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consistency-type + fluidConsistencyType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', + }, + _instruction: { + type: require('./element.input.js'), + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/nutritionorderoraldietnutrient.input.js b/src/resources/1_0_2/inputs/nutritionorderoraldietnutrient.input.js index 690af83a..ca9d2a4c 100644 --- a/src/resources/1_0_2/inputs/nutritionorderoraldietnutrient.input.js +++ b/src/resources/1_0_2/inputs/nutritionorderoraldietnutrient.input.js @@ -1,28 +1,43 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.oralDiet.nutrient Input Schema + * @summary NutritionOrderoralDietnutrient Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderOralDietNutrient_Input', - description: - 'Class that defines the quantity and type of nutrient modifications required for the oral diet.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/nutrient-code - modifier: { - type: require('./codeableconcept.input'), - description: - 'The nutrient that is being modified such as carbohydrate or sodium.', - }, - amount: { - type: require('./quantity.input'), - description: - 'The quantity of the specified nutrient to include in diet.', - }, - }), + name: 'NutritionOrderoralDietnutrient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/nutrient-code + modifier: { + type: require('./codeableconcept.input.js'), + description: + 'The nutrient that is being modified such as carbohydrate or sodium.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'The quantity of the specified nutrient to include in diet.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/nutritionorderoraldiettexture.input.js b/src/resources/1_0_2/inputs/nutritionorderoraldiettexture.input.js index 3f17b2c5..3e7dda37 100644 --- a/src/resources/1_0_2/inputs/nutritionorderoraldiettexture.input.js +++ b/src/resources/1_0_2/inputs/nutritionorderoraldiettexture.input.js @@ -1,29 +1,45 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.oralDiet.texture Input Schema + * @summary NutritionOrderoralDiettexture Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderOralDietTexture_Input', - description: - 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/texture-code - modifier: { - type: require('./codeableconcept.input'), - description: - 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/modified-foodtype - foodType: { - type: require('./codeableconcept.input'), - description: - 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', - }, - }), + name: 'NutritionOrderoralDiettexture_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/texture-code + modifier: { + type: require('./codeableconcept.input.js'), + description: + 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/modified-foodtype + foodType: { + type: require('./codeableconcept.input.js'), + description: + 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/nutritionordersupplement.input.js b/src/resources/1_0_2/inputs/nutritionordersupplement.input.js index 732b508e..47f15152 100644 --- a/src/resources/1_0_2/inputs/nutritionordersupplement.input.js +++ b/src/resources/1_0_2/inputs/nutritionordersupplement.input.js @@ -1,56 +1,72 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.supplement Input Schema + * @summary NutritionOrdersupplement Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderSupplement_Input', - description: - "Oral nutritional products given in order to add further nutritional value to the patient's diet.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplement-type - type: { - type: require('./codeableconcept.input'), - description: - 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', - }, - productName: { - type: GraphQLString, - description: - "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", - }, - _productName: { - type: require('./element.input'), - description: - "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", - }, - schedule: { - type: new GraphQLList(require('./timing.input')), - description: - 'The time period and frequency at which the supplement(s) should be given.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The amount of the nutritional supplement to be given.', - }, - instruction: { - type: GraphQLString, - description: - 'Free text or additional instructions or information pertaining to the oral supplement.', - }, - _instruction: { - type: require('./element.input'), - description: - 'Free text or additional instructions or information pertaining to the oral supplement.', - }, - }), + name: 'NutritionOrdersupplement_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplement-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', + }, + _productName: { + type: require('./element.input.js'), + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + productName: { + type: GraphQLString, + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + schedule: { + type: new GraphQLList(require('./timing.input.js')), + description: + 'The time period and frequency at which the supplement(s) should be given.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount of the nutritional supplement to be given.', + }, + _instruction: { + type: require('./element.input.js'), + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/observation.input.js b/src/resources/1_0_2/inputs/observation.input.js index 25ffa868..58850a6c 100644 --- a/src/resources/1_0_2/inputs/observation.input.js +++ b/src/resources/1_0_2/inputs/observation.input.js @@ -1,24 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const TimeScalar = require('../scalars/time.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 ObservationResourceInputType = new GraphQLEnumType({ - name: 'ObservationResourceInputType', - values: { - Observation: { value: 'Observation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports @@ -26,199 +18,255 @@ let ObservationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Observation_Input', - description: 'Base StructureDefinition for Observation Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ObservationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'A unique identifier for the simple observation instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the result value.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the result value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-category - category: { - type: require('./codeableconcept.input'), - description: - 'A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Describes what was observed. Sometimes this is called the observation 'name'.", - }, - subject: { - type: require('./reference.input'), - description: - 'The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - _effectiveDateTime: { - type: require('./element.input'), - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - effectivePeriod: { - type: require('./period.input'), - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - issued: { - type: InstantScalar, - description: - 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', - }, - _issued: { - type: require('./element.input'), - description: - 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', - }, - performer: { - type: new GraphQLList(require('./reference.input')), - description: - "Who was responsible for asserting the observed value as 'true'.", - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueString: { - type: GraphQLString, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueString: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRange: { - type: require('./range.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRatio: { - type: require('./ratio.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueSampledData: { - type: require('./sampleddata.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueTime: { - type: TimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueTime: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valuePeriod: { - type: require('./period.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason - dataAbsentReason: { - type: require('./codeableconcept.input'), - description: - 'Provides a reason why the expected value in the element Observation.value[x] is missing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation - interpretation: { - type: require('./codeableconcept.input'), - description: - 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', - }, - comments: { - type: GraphQLString, - description: - 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', - }, - _comments: { - type: require('./element.input'), - description: - 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.input'), - description: - "Indicates the site on the subject's body where the observation was made (i.e. the target site).", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-methods - method: { - type: require('./codeableconcept.input'), - description: 'Indicates the mechanism used to perform the observation.', - }, - specimen: { - type: require('./reference.input'), - description: - 'The specimen that was used when this observation was made.', - }, - device: { - type: require('./reference.input'), - description: 'The device used to generate the observation data.', - }, - referenceRange: { - type: new GraphQLList(require('./observationreferencerange.input')), - description: - 'Guidance on how to interpret the value by comparison to a normal or recommended range.', - }, - related: { - type: new GraphQLList(require('./observationrelated.input')), - description: - 'A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.', - }, - component: { - type: new GraphQLList(require('./observationcomponent.input')), - description: - 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', - }, - }), + description: 'Base StructureDefinition for Observation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Observation_Enum_input', + values: { Observation: { value: 'Observation' } }, + }), + ), + 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: 'A unique identifier for the simple observation instance.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the result value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the result value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'name'.", + }, + subject: { + type: GraphQLString, + description: + 'The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.', + }, + encounter: { + type: GraphQLString, + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + _issued: { + type: require('./element.input.js'), + description: + 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: + "Who was responsible for asserting the observed value as 'true'.", + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason + dataAbsentReason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation + interpretation: { + type: require('./codeableconcept.input.js'), + description: + 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', + }, + _comments: { + type: require('./element.input.js'), + description: + 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', + }, + comments: { + type: GraphQLString, + description: + 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-methods + method: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the mechanism used to perform the observation.', + }, + specimen: { + type: GraphQLString, + description: 'The specimen that was used when this observation was made.', + }, + device: { + type: GraphQLString, + description: 'The device used to generate the observation data.', + }, + referenceRange: { + type: new GraphQLList(require('./observationreferencerange.input.js')), + description: + 'Guidance on how to interpret the value by comparison to a normal or recommended range.', + }, + related: { + type: new GraphQLList(require('./observationrelated.input.js')), + description: + 'A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.', + }, + component: { + type: new GraphQLList(require('./observationcomponent.input.js')), + description: + 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/observationcomponent.input.js b/src/resources/1_0_2/inputs/observationcomponent.input.js index ca83defa..6c02bf55 100644 --- a/src/resources/1_0_2/inputs/observationcomponent.input.js +++ b/src/resources/1_0_2/inputs/observationcomponent.input.js @@ -1,100 +1,117 @@ -const TimeScalar = require('../scalars/time.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Observation.component Input Schema + * @summary Observationcomponent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ObservationComponent_Input', - description: - 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Describes what was observed. Sometimes this is called the observation 'code'.", - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueString: { - type: GraphQLString, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueString: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRange: { - type: require('./range.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRatio: { - type: require('./ratio.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueSampledData: { - type: require('./sampleddata.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueTime: { - type: TimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueTime: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valuePeriod: { - type: require('./period.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason - dataAbsentReason: { - type: require('./codeableconcept.input'), - description: - 'Provides a reason why the expected value in the element Observation.value[x] is missing.', - }, - }), + name: 'Observationcomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'code'.", + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason + dataAbsentReason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/observationreferencerange.input.js b/src/resources/1_0_2/inputs/observationreferencerange.input.js index a2747225..dcf03c6c 100644 --- a/src/resources/1_0_2/inputs/observationreferencerange.input.js +++ b/src/resources/1_0_2/inputs/observationreferencerange.input.js @@ -1,47 +1,67 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Observation.referenceRange Input Schema + * @summary ObservationreferenceRange Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ObservationReferenceRange_Input', - description: - 'Guidance on how to interpret the value by comparison to a normal or recommended range.', - fields: () => - extendSchema(require('./backboneelement.input'), { - low: { - type: require('./quantity.input'), - description: - 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', - }, - high: { - type: require('./quantity.input'), - description: - 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referencerange-meaning - meaning: { - type: require('./codeableconcept.input'), - description: 'Code for the meaning of the reference range.', - }, - age: { - type: require('./range.input'), - description: - 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', - }, - text: { - type: GraphQLString, - description: - "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", - }, - _text: { - type: require('./element.input'), - description: - "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", - }, - }), + name: 'ObservationreferenceRange_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + low: { + type: require('./quantity.input.js'), + description: + 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', + }, + high: { + type: require('./quantity.input.js'), + description: + 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referencerange-meaning + meaning: { + type: require('./codeableconcept.input.js'), + description: 'Code for the meaning of the reference range.', + }, + age: { + type: require('./range.input.js'), + description: + 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', + }, + _text: { + type: require('./element.input.js'), + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + text: { + type: GraphQLString, + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/observationrelated.input.js b/src/resources/1_0_2/inputs/observationrelated.input.js index 40585935..4ff320ca 100644 --- a/src/resources/1_0_2/inputs/observationrelated.input.js +++ b/src/resources/1_0_2/inputs/observationrelated.input.js @@ -1,34 +1,55 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Observation.related Input Schema + * @summary Observationrelated Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ObservationRelated_Input', - description: - 'A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-relationshiptypes - type: { - type: CodeScalar, - description: - 'A code specifying the kind of relationship that exists with the target resource.', - }, - _type: { - type: require('./element.input'), - description: - 'A code specifying the kind of relationship that exists with the target resource.', - }, - target: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.', - }, - }), + name: 'Observationrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'A code specifying the kind of relationship that exists with the target resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-relationshiptypes + type: { + type: CodeScalar, + description: + 'A code specifying the kind of relationship that exists with the target resource.', + }, + target: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/operationdefinition.input.js b/src/resources/1_0_2/inputs/operationdefinition.input.js index be2e8ea8..912f3b51 100644 --- a/src/resources/1_0_2/inputs/operationdefinition.input.js +++ b/src/resources/1_0_2/inputs/operationdefinition.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OperationDefinitionResourceInputType = new GraphQLEnumType({ - name: 'OperationDefinitionResourceInputType', - values: { - OperationDefinition: { value: 'OperationDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,183 +17,240 @@ let OperationDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'OperationDefinition_Input', - description: 'Base StructureDefinition for OperationDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(OperationDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the operation.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name identifying the operation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the profile.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the profile.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether this is an operation or a named query.', - }, - _kind: { - type: require('./element.input'), - description: 'Whether this is an operation or a named query.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the operation definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the operation definition.', - }, - contact: { - type: new GraphQLList(require('./operationdefinitioncontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the profile and its use.', - }, - _description: { - type: require('./element.input'), - description: - 'A free text natural language description of the profile and its use.', - }, - requirements: { - type: GraphQLString, - description: - "Explains why this operation definition is needed and why it's been constrained as it has.", - }, - _requirements: { - type: require('./element.input'), - description: - "Explains why this operation definition is needed and why it's been constrained as it has.", - }, - idempotent: { - type: GraphQLBoolean, - description: - 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', - }, - _idempotent: { - type: require('./element.input'), - description: - 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', - }, - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name used to invoke the operation.', - }, - _code: { - type: require('./element.input'), - description: 'The name used to invoke the operation.', - }, - notes: { - type: GraphQLString, - description: - 'Additional information about how to use this operation or named query.', - }, - _notes: { - type: require('./element.input'), - description: - 'Additional information about how to use this operation or named query.', - }, - base: { - type: require('./reference.input'), - description: - 'Indicates that this operation definition is a constraining profile on the base.', - }, - system: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', - }, - _system: { - type: require('./element.input'), - description: - 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLList(CodeScalar), - description: - 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).', - }, - _type: { - type: require('./element.input'), - description: - 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).', - }, - instance: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', - }, - _instance: { - type: require('./element.input'), - description: - 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', - }, - parameter: { - type: new GraphQLList(require('./operationdefinitionparameter.input')), - description: 'The parameters for the operation/query.', - }, - }), + description: 'Base StructureDefinition for OperationDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationDefinition_Enum_input', + values: { OperationDefinition: { value: 'OperationDefinition' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name identifying the operation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the operation.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the profile.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the profile.', + }, + _kind: { + type: require('./element.input.js'), + description: 'Whether this is an operation or a named query.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an operation or a named query.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the operation definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the operation definition.', + }, + contact: { + type: new GraphQLList(require('./operationdefinitioncontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A free text natural language description of the profile and its use.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the profile and its use.', + }, + _requirements: { + type: require('./element.input.js'), + description: + "Explains why this operation definition is needed and why it's been constrained as it has.", + }, + requirements: { + type: GraphQLString, + description: + "Explains why this operation definition is needed and why it's been constrained as it has.", + }, + _idempotent: { + type: require('./element.input.js'), + description: + 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', + }, + idempotent: { + type: GraphQLBoolean, + description: + 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', + }, + _code: { + type: require('./element.input.js'), + description: 'The name used to invoke the operation.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name used to invoke the operation.', + }, + _notes: { + type: require('./element.input.js'), + description: + 'Additional information about how to use this operation or named query.', + }, + notes: { + type: GraphQLString, + description: + 'Additional information about how to use this operation or named query.', + }, + base: { + type: GraphQLString, + description: + 'Indicates that this operation definition is a constraining profile on the base.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + system: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + _type: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).', + }, + _instance: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + instance: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + parameter: { + type: new GraphQLList(require('./operationdefinitionparameter.input.js')), + description: 'The parameters for the operation/query.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/operationdefinitioncontact.input.js b/src/resources/1_0_2/inputs/operationdefinitioncontact.input.js index fa4ec16c..e71a7cef 100644 --- a/src/resources/1_0_2/inputs/operationdefinitioncontact.input.js +++ b/src/resources/1_0_2/inputs/operationdefinitioncontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary OperationDefinition.contact Input Schema + * @summary OperationDefinitioncontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OperationDefinitionContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the operation definition.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the operation definition.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'OperationDefinitioncontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the operation definition.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the operation definition.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/operationdefinitionparameter.input.js b/src/resources/1_0_2/inputs/operationdefinitionparameter.input.js index c4b93edb..422433d9 100644 --- a/src/resources/1_0_2/inputs/operationdefinitionparameter.input.js +++ b/src/resources/1_0_2/inputs/operationdefinitionparameter.input.js @@ -1,86 +1,104 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLInt, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary OperationDefinition.parameter Input Schema + * @summary OperationDefinitionparameter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OperationDefinitionParameter_Input', - description: 'The parameters for the operation/query.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name of used to identify the parameter.', - }, - _name: { - type: require('./element.input'), - description: 'The name of used to identify the parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use - use: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether this is an input or an output parameter.', - }, - _use: { - type: require('./element.input'), - description: 'Whether this is an input or an output parameter.', - }, - min: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - _min: { - type: require('./element.input'), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - max: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - _max: { - type: require('./element.input'), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - documentation: { - type: GraphQLString, - description: 'Describes the meaning or use of this parameter.', - }, - _documentation: { - type: require('./element.input'), - description: 'Describes the meaning or use of this parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-type - type: { - type: CodeScalar, - description: 'The type for this parameter.', - }, - _type: { - type: require('./element.input'), - description: 'The type for this parameter.', - }, - profile: { - type: require('./reference.input'), - description: - 'A profile the specifies the rules that this parameter must conform to.', - }, - binding: { - type: require('./operationdefinitionparameterbinding.input'), - description: - 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', - }, - }), + name: 'OperationDefinitionparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of used to identify the parameter.', + }, + name: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of used to identify the parameter.', + }, + _use: { + type: require('./element.input.js'), + description: 'Whether this is an input or an output parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an input or an output parameter.', + }, + _min: { + type: require('./element.input.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.input.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.input.js'), + description: 'Describes the meaning or use of this parameter.', + }, + documentation: { + type: GraphQLString, + description: 'Describes the meaning or use of this parameter.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type for this parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-type + type: { + type: CodeScalar, + description: 'The type for this parameter.', + }, + profile: { + type: GraphQLString, + description: + 'A profile the specifies the rules that this parameter must conform to.', + }, + binding: { + type: require('./operationdefinitionparameterbinding.input.js'), + description: + 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/operationdefinitionparameterbinding.input.js b/src/resources/1_0_2/inputs/operationdefinitionparameterbinding.input.js index fc83c70a..708c84d7 100644 --- a/src/resources/1_0_2/inputs/operationdefinitionparameterbinding.input.js +++ b/src/resources/1_0_2/inputs/operationdefinitionparameterbinding.input.js @@ -1,45 +1,66 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary OperationDefinition.parameter.binding Input Schema + * @summary OperationDefinitionparameterbinding Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OperationDefinitionParameterBinding_Input', - description: - 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/binding-strength - strength: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - _strength: { - type: require('./element.input'), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - valueSetUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - _valueSetUri: { - type: require('./element.input'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - valueSetReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - }), + name: 'OperationDefinitionparameterbinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _strength: { + type: require('./element.input.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/binding-strength + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _valueSetUri: { + type: require('./element.input.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/operationoutcome.input.js b/src/resources/1_0_2/inputs/operationoutcome.input.js index 21bc0525..0688c634 100644 --- a/src/resources/1_0_2/inputs/operationoutcome.input.js +++ b/src/resources/1_0_2/inputs/operationoutcome.input.js @@ -1,20 +1,13 @@ 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 OperationOutcomeResourceInputType = new GraphQLEnumType({ - name: 'OperationOutcomeResourceInputType', - values: { - OperationOutcome: { value: 'OperationOutcome' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,19 +15,76 @@ let OperationOutcomeResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'OperationOutcome_Input', - description: 'Base StructureDefinition for OperationOutcome Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(OperationOutcomeResourceInputType), - description: 'Type of this resource.', - }, - issue: { - type: new GraphQLList( - new GraphQLNonNull(require('./operationoutcomeissue.input')), - ), - description: - 'An error, warning or information message that results from a system action.', - }, - }), + description: 'Base StructureDefinition for OperationOutcome Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationOutcome_Enum_input', + values: { OperationOutcome: { value: 'OperationOutcome' } }, + }), + ), + 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.', + }, + issue: { + type: new GraphQLList( + new GraphQLNonNull(require('./operationoutcomeissue.input.js')), + ), + description: + 'An error, warning or information message that results from a system action.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/operationoutcomeissue.input.js b/src/resources/1_0_2/inputs/operationoutcomeissue.input.js index 51cc5dd4..f6032174 100644 --- a/src/resources/1_0_2/inputs/operationoutcomeissue.input.js +++ b/src/resources/1_0_2/inputs/operationoutcomeissue.input.js @@ -1,71 +1,87 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary OperationOutcome.issue Input Schema + * @summary OperationOutcomeissue Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OperationOutcomeIssue_Input', - description: - 'An error, warning or information message that results from a system action.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/issue-severity - severity: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the issue indicates a variation from successful processing.', - }, - _severity: { - type: require('./element.input'), - description: - 'Indicates whether the issue indicates a variation from successful processing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/issue-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', - }, - _code: { - type: require('./element.input'), - description: - 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-outcome - details: { - type: require('./codeableconcept.input'), - description: - 'Additional details about the error. This may be a text description of the error, or a system code that identifies the error.', - }, - diagnostics: { - type: GraphQLString, - description: - 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', - }, - _diagnostics: { - type: require('./element.input'), - description: - 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', - }, - location: { - type: new GraphQLList(GraphQLString), - description: - 'A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', - }, - _location: { - type: require('./element.input'), - description: - 'A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', - }, - }), + name: 'OperationOutcomeissue_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/issue-severity + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/issue-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-outcome + details: { + type: require('./codeableconcept.input.js'), + description: + 'Additional details about the error. This may be a text description of the error, or a system code that identifies the error.', + }, + _diagnostics: { + type: require('./element.input.js'), + description: + 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', + }, + diagnostics: { + type: GraphQLString, + description: + 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', + }, + _location: { + type: require('./element.input.js'), + description: + 'A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', + }, + location: { + type: new GraphQLList(GraphQLString), + description: + 'A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/order.input.js b/src/resources/1_0_2/inputs/order.input.js index 8a2c378c..542dd685 100644 --- a/src/resources/1_0_2/inputs/order.input.js +++ b/src/resources/1_0_2/inputs/order.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 OrderResourceInputType = new GraphQLEnumType({ - name: 'OrderResourceInputType', - values: { - Order: { value: 'Order' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,53 +16,110 @@ let OrderResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Order_Input', - description: 'Base StructureDefinition for Order Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(OrderResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order by the orderer or by the receiver.', - }, - date: { - type: DateTimeScalar, - description: 'When the order was made.', - }, - _date: { - type: require('./element.input'), - description: 'When the order was made.', - }, - subject: { - type: require('./reference.input'), - description: 'Patient this order is about.', - }, - source: { - type: require('./reference.input'), - description: 'Who initiated the order.', - }, - target: { - type: require('./reference.input'), - description: 'Who is intended to fulfill the order.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'Text - why the order was made.', - }, - reasonReference: { - type: require('./reference.input'), - description: 'Text - why the order was made.', - }, - when: { - type: require('./orderwhen.input'), - description: 'When order should be fulfilled.', - }, - detail: { - type: new GraphQLList(new GraphQLNonNull(require('./reference.input'))), - description: 'What action is being ordered.', - }, - }), + description: 'Base StructureDefinition for Order Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Order_Enum_input', + values: { Order: { value: 'Order' } }, + }), + ), + 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: + 'Identifiers assigned to this order by the orderer or by the receiver.', + }, + _date: { + type: require('./element.input.js'), + description: 'When the order was made.', + }, + date: { + type: DateTimeScalar, + description: 'When the order was made.', + }, + subject: { + type: GraphQLString, + description: 'Patient this order is about.', + }, + source: { + type: GraphQLString, + description: 'Who initiated the order.', + }, + target: { + type: GraphQLString, + description: 'Who is intended to fulfill the order.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Text - why the order was made.', + }, + reasonReference: { + type: GraphQLString, + description: 'Text - why the order was made.', + }, + when: { + type: require('./orderwhen.input.js'), + description: 'When order should be fulfilled.', + }, + detail: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: 'What action is being ordered.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/orderresponse.input.js b/src/resources/1_0_2/inputs/orderresponse.input.js index ebf1b723..a4b4a106 100644 --- a/src/resources/1_0_2/inputs/orderresponse.input.js +++ b/src/resources/1_0_2/inputs/orderresponse.input.js @@ -1,22 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -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 OrderResponseResourceInputType = new GraphQLEnumType({ - name: 'OrderResponseResourceInputType', - values: { - OrderResponse: { value: 'OrderResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,62 +16,119 @@ let OrderResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'OrderResponse_Input', - description: 'Base StructureDefinition for OrderResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(OrderResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems.', - }, - request: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'A reference to the order that this is in response to.', - }, - date: { - type: DateTimeScalar, - description: - 'The date and time at which this order response was made (created/posted).', - }, - _date: { - type: require('./element.input'), - description: - 'The date and time at which this order response was made (created/posted).', - }, - who: { - type: require('./reference.input'), - description: - 'The person, organization, or device credited with making the response.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/order-status - orderStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'What this response says about the status of the original order.', - }, - _orderStatus: { - type: require('./element.input'), - description: - 'What this response says about the status of the original order.', - }, - description: { - type: GraphQLString, - description: - 'Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.', - }, - _description: { - type: require('./element.input'), - description: - 'Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.', - }, - fulfillment: { - type: new GraphQLList(require('./reference.input')), - description: - 'Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.', - }, - }), + description: 'Base StructureDefinition for OrderResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OrderResponse_Enum_input', + values: { OrderResponse: { value: 'OrderResponse' } }, + }), + ), + 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: + 'Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems.', + }, + request: { + type: new GraphQLNonNull(GraphQLString), + description: 'A reference to the order that this is in response to.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date and time at which this order response was made (created/posted).', + }, + date: { + type: DateTimeScalar, + description: + 'The date and time at which this order response was made (created/posted).', + }, + who: { + type: GraphQLString, + description: + 'The person, organization, or device credited with making the response.', + }, + _orderStatus: { + type: require('./element.input.js'), + description: + 'What this response says about the status of the original order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/order-status + orderStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'What this response says about the status of the original order.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.', + }, + description: { + type: GraphQLString, + description: + 'Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.', + }, + fulfillment: { + type: new GraphQLList(GraphQLString), + description: + 'Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/orderwhen.input.js b/src/resources/1_0_2/inputs/orderwhen.input.js index 8ab0dda4..1a222bc9 100644 --- a/src/resources/1_0_2/inputs/orderwhen.input.js +++ b/src/resources/1_0_2/inputs/orderwhen.input.js @@ -1,25 +1,42 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Order.when Input Schema + * @summary Orderwhen Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OrderWhen_Input', - description: 'When order should be fulfilled.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: require('./codeableconcept.input'), - description: - 'Code specifies when request should be done. The code may simply be a priority code.', - }, - schedule: { - type: require('./timing.input'), - description: 'A formal schedule.', - }, - }), + name: 'Orderwhen_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'Code specifies when request should be done. The code may simply be a priority code.', + }, + schedule: { + type: require('./timing.input.js'), + description: 'A formal schedule.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/organization.input.js b/src/resources/1_0_2/inputs/organization.input.js index d6663915..59972594 100644 --- a/src/resources/1_0_2/inputs/organization.input.js +++ b/src/resources/1_0_2/inputs/organization.input.js @@ -1,21 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OrganizationResourceInputType = new GraphQLEnumType({ - name: 'OrganizationResourceInputType', - values: { - Organization: { value: 'Organization' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,57 +16,111 @@ let OrganizationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Organization_Input', - description: 'Base StructureDefinition for Organization Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(OrganizationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', - }, - active: { - type: GraphQLBoolean, - description: - "Whether the organization's record is still in active use.", - }, - _active: { - type: require('./element.input'), - description: - "Whether the organization's record is still in active use.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/organization-type - type: { - type: require('./codeableconcept.input'), - description: 'The kind of organization that this is.', - }, - name: { - type: GraphQLString, - description: 'A name associated with the organization.', - }, - _name: { - type: require('./element.input'), - description: 'A name associated with the organization.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: 'A contact detail for the organization.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: 'An address for the organization.', - }, - partOf: { - type: require('./reference.input'), - description: - 'The organization of which this organization forms a part.', - }, - contact: { - type: new GraphQLList(require('./organizationcontact.input')), - description: 'Contact for the organization for a certain purpose.', - }, - }), + description: 'Base StructureDefinition for Organization Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Organization_Enum_input', + values: { Organization: { value: 'Organization' } }, + }), + ), + 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: + 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether the organization's record is still in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether the organization's record is still in active use.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/organization-type + type: { + type: require('./codeableconcept.input.js'), + description: 'The kind of organization that this is.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name associated with the organization.', + }, + name: { + type: GraphQLString, + description: 'A name associated with the organization.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: 'A contact detail for the organization.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'An address for the organization.', + }, + partOf: { + type: GraphQLString, + description: 'The organization of which this organization forms a part.', + }, + contact: { + type: new GraphQLList(require('./organizationcontact.input.js')), + description: 'Contact for the organization for a certain purpose.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/organizationcontact.input.js b/src/resources/1_0_2/inputs/organizationcontact.input.js index fa2f03e1..227e3622 100644 --- a/src/resources/1_0_2/inputs/organizationcontact.input.js +++ b/src/resources/1_0_2/inputs/organizationcontact.input.js @@ -1,35 +1,51 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Organization.contact Input Schema + * @summary Organizationcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OrganizationContact_Input', - description: 'Contact for the organization for a certain purpose.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contactentity-type - purpose: { - type: require('./codeableconcept.input'), - description: - 'Indicates a purpose for which the contact can be reached.', - }, - name: { - type: require('./humanname.input'), - description: 'A name associated with the contact.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', - }, - address: { - type: require('./address.input'), - description: 'Visiting or postal addresses for the contact.', - }, - }), + name: 'Organizationcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contactentity-type + purpose: { + type: require('./codeableconcept.input.js'), + description: 'Indicates a purpose for which the contact can be reached.', + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', + }, + address: { + type: require('./address.input.js'), + description: 'Visiting or postal addresses for the contact.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/parameters.input.js b/src/resources/1_0_2/inputs/parameters.input.js index 79311667..62244e4e 100644 --- a/src/resources/1_0_2/inputs/parameters.input.js +++ b/src/resources/1_0_2/inputs/parameters.input.js @@ -1,20 +1,12 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ParametersResourceInputType = new GraphQLEnumType({ - name: 'ParametersResourceInputType', - values: { - Parameters: { value: 'Parameters' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,16 +14,53 @@ let ParametersResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Parameters_Input', - description: 'Base StructureDefinition for Parameters Resource.', - fields: () => - extendSchema(require('./resource.input'), { - resourceType: { - type: new GraphQLNonNull(ParametersResourceInputType), - description: 'Type of this resource.', - }, - parameter: { - type: new GraphQLList(require('./parametersparameter.input')), - description: 'A parameter passed to or received from the operation.', - }, - }), + description: 'Base StructureDefinition for Parameters Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Parameters_Enum_input', + values: { Parameters: { value: 'Parameters' } }, + }), + ), + 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.', + }, + parameter: { + type: new GraphQLList(require('./parametersparameter.input.js')), + description: 'A parameter passed to or received from the operation.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/parametersparameter.input.js b/src/resources/1_0_2/inputs/parametersparameter.input.js index cbf8bf79..bfb655c7 100644 --- a/src/resources/1_0_2/inputs/parametersparameter.input.js +++ b/src/resources/1_0_2/inputs/parametersparameter.input.js @@ -1,244 +1,261 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLString, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Parameters.parameter Input Schema + * @summary Parametersparameter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ParametersParameter_Input', - description: 'A parameter passed to or received from the operation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of the parameter (reference to the operation definition).', - }, - _name: { - type: require('./element.input'), - description: - 'The name of the parameter (reference to the operation definition).', - }, - valueBoolean: { - type: GraphQLBoolean, - description: 'If the parameter is a data type.', - }, - _valueBoolean: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueInteger: { - type: GraphQLInt, - description: 'If the parameter is a data type.', - }, - _valueInteger: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueDecimal: { - type: GraphQLFloat, - description: 'If the parameter is a data type.', - }, - _valueDecimal: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueBase64Binary: { - type: Base64BinaryScalar, - description: 'If the parameter is a data type.', - }, - _valueBase64Binary: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueInstant: { - type: InstantScalar, - description: 'If the parameter is a data type.', - }, - _valueInstant: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueString: { - type: GraphQLString, - description: 'If the parameter is a data type.', - }, - _valueString: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueUri: { - type: UriScalar, - description: 'If the parameter is a data type.', - }, - _valueUri: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueDate: { - type: DateScalar, - description: 'If the parameter is a data type.', - }, - _valueDate: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueDateTime: { - type: DateTimeScalar, - description: 'If the parameter is a data type.', - }, - _valueDateTime: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueTime: { - type: TimeScalar, - description: 'If the parameter is a data type.', - }, - _valueTime: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueCode: { - type: CodeScalar, - description: 'If the parameter is a data type.', - }, - _valueCode: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueOid: { - type: OidScalar, - description: 'If the parameter is a data type.', - }, - _valueOid: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueId: { - type: IdScalar, - description: 'If the parameter is a data type.', - }, - _valueId: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueUnsignedInt: { - type: UnsignedIntScalar, - description: 'If the parameter is a data type.', - }, - _valueUnsignedInt: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valuePositiveInt: { - type: PositiveIntScalar, - description: 'If the parameter is a data type.', - }, - _valuePositiveInt: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueMarkdown: { - type: GraphQLString, - description: 'If the parameter is a data type.', - }, - _valueMarkdown: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueAnnotation: { - type: require('./annotation.input'), - description: 'If the parameter is a data type.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: 'If the parameter is a data type.', - }, - valueIdentifier: { - type: require('./identifier.input'), - description: 'If the parameter is a data type.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'If the parameter is a data type.', - }, - valueCoding: { - type: require('./coding.input'), - description: 'If the parameter is a data type.', - }, - valueQuantity: { - type: require('./quantity.input'), - description: 'If the parameter is a data type.', - }, - valueRange: { - type: require('./range.input'), - description: 'If the parameter is a data type.', - }, - valuePeriod: { - type: require('./period.input'), - description: 'If the parameter is a data type.', - }, - valueRatio: { - type: require('./ratio.input'), - description: 'If the parameter is a data type.', - }, - valueSampledData: { - type: require('./sampleddata.input'), - description: 'If the parameter is a data type.', - }, - valueSignature: { - type: require('./signature.input'), - description: 'If the parameter is a data type.', - }, - valueHumanName: { - type: require('./humanname.input'), - description: 'If the parameter is a data type.', - }, - valueAddress: { - type: require('./address.input'), - description: 'If the parameter is a data type.', - }, - valueContactPoint: { - type: require('./contactpoint.input'), - description: 'If the parameter is a data type.', - }, - valueTiming: { - type: require('./timing.input'), - description: 'If the parameter is a data type.', - }, - valueReference: { - type: require('./reference.input'), - description: 'If the parameter is a data type.', - }, - valueMeta: { - type: require('./meta.input'), - description: 'If the parameter is a data type.', - }, - resource: { - type: GraphQLString, - description: 'If the parameter is a whole resource.', - }, - }), + name: 'Parametersparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the parameter (reference to the operation definition).', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the parameter (reference to the operation definition).', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'If the parameter is a data type.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueInteger: { + type: GraphQLInt, + description: 'If the parameter is a data type.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'If the parameter is a data type.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: 'If the parameter is a data type.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueInstant: { + type: InstantScalar, + description: 'If the parameter is a data type.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueString: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueUri: { + type: UriScalar, + description: 'If the parameter is a data type.', + }, + _valueDate: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDate: { + type: DateScalar, + description: 'If the parameter is a data type.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDateTime: { + type: DateTimeScalar, + description: 'If the parameter is a data type.', + }, + _valueTime: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueTime: { + type: TimeScalar, + description: 'If the parameter is a data type.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueCode: { + type: CodeScalar, + description: 'If the parameter is a data type.', + }, + _valueOid: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueOid: { + type: OidScalar, + description: 'If the parameter is a data type.', + }, + _valueId: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueId: { + type: IdScalar, + description: 'If the parameter is a data type.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: 'If the parameter is a data type.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: 'If the parameter is a data type.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueMarkdown: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + valueAnnotation: { + type: require('./annotation.input.js'), + description: 'If the parameter is a data type.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: 'If the parameter is a data type.', + }, + valueIdentifier: { + type: require('./identifier.input.js'), + description: 'If the parameter is a data type.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'If the parameter is a data type.', + }, + valueCoding: { + type: require('./coding.input.js'), + description: 'If the parameter is a data type.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: 'If the parameter is a data type.', + }, + valueRange: { + type: require('./range.input.js'), + description: 'If the parameter is a data type.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: 'If the parameter is a data type.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: 'If the parameter is a data type.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: 'If the parameter is a data type.', + }, + valueSignature: { + type: require('./signature.input.js'), + description: 'If the parameter is a data type.', + }, + valueHumanName: { + type: require('./humanname.input.js'), + description: 'If the parameter is a data type.', + }, + valueAddress: { + type: require('./address.input.js'), + description: 'If the parameter is a data type.', + }, + valueContactPoint: { + type: require('./contactpoint.input.js'), + description: 'If the parameter is a data type.', + }, + valueTiming: { + type: require('./timing.input.js'), + description: 'If the parameter is a data type.', + }, + valueReference: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + valueMeta: { + type: require('./meta.input.js'), + description: 'If the parameter is a data type.', + }, + resource: { + type: GraphQLString, + description: 'If the parameter is a whole resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/patient.input.js b/src/resources/1_0_2/inputs/patient.input.js index 31cf3337..32aa1212 100644 --- a/src/resources/1_0_2/inputs/patient.input.js +++ b/src/resources/1_0_2/inputs/patient.input.js @@ -1,25 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PatientResourceInputType = new GraphQLEnumType({ - name: 'PatientResourceInputType', - values: { - Patient: { value: 'Patient' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,130 +19,186 @@ let PatientResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Patient_Input', - description: 'Base StructureDefinition for Patient Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PatientResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'An identifier for this patient.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this patient record is in active use.', - }, - _active: { - type: require('./element.input'), - description: 'Whether this patient record is in active use.', - }, - name: { - type: new GraphQLList(require('./humanname.input')), - description: 'A name associated with the individual.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date of birth for the individual.', - }, - _birthDate: { - type: require('./element.input'), - description: 'The date of birth for the individual.', - }, - deceasedBoolean: { - type: GraphQLBoolean, - description: 'Indicates if the individual is deceased or not.', - }, - _deceasedBoolean: { - type: require('./element.input'), - description: 'Indicates if the individual is deceased or not.', - }, - deceasedDateTime: { - type: DateTimeScalar, - description: 'Indicates if the individual is deceased or not.', - }, - _deceasedDateTime: { - type: require('./element.input'), - description: 'Indicates if the individual is deceased or not.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: 'Addresses for the individual.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/marital-status - maritalStatus: { - type: require('./codeableconcept.input'), - description: - "This field contains a patient's most recent marital (civil) status.", - }, - multipleBirthBoolean: { - type: GraphQLBoolean, - description: - 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', - }, - _multipleBirthBoolean: { - type: require('./element.input'), - description: - 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', - }, - multipleBirthInteger: { - type: GraphQLInt, - description: - 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', - }, - _multipleBirthInteger: { - type: require('./element.input'), - description: - 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', - }, - photo: { - type: new GraphQLList(require('./attachment.input')), - description: 'Image of the patient.', - }, - contact: { - type: new GraphQLList(require('./patientcontact.input')), - description: - 'A contact party (e.g. guardian, partner, friend) for the patient.', - }, - animal: { - type: require('./patientanimal.input'), - description: 'This patient is known to be an animal.', - }, - communication: { - type: new GraphQLList(require('./patientcommunication.input')), - description: - 'Languages which may be used to communicate with the patient about his or her health.', - }, - careProvider: { - type: new GraphQLList(require('./reference.input')), - description: "Patient's nominated care provider.", - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'Organization that is the custodian of the patient record.', - }, - link: { - type: new GraphQLList(require('./patientlink.input')), - description: - 'Link to another patient resource that concerns the same actual patient.', - }, - }), + description: 'Base StructureDefinition for Patient Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Patient_Enum_input', + values: { Patient: { value: 'Patient' } }, + }), + ), + 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: 'An identifier for this patient.', + }, + _active: { + type: require('./element.input.js'), + description: 'Whether this patient record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this patient record is in active use.', + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'A name associated with the individual.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date of birth for the individual.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the individual.', + }, + _deceasedBoolean: { + type: require('./element.input.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: 'Indicates if the individual is deceased or not.', + }, + _deceasedDateTime: { + type: require('./element.input.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedDateTime: { + type: DateTimeScalar, + description: 'Indicates if the individual is deceased or not.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'Addresses for the individual.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/marital-status + maritalStatus: { + type: require('./codeableconcept.input.js'), + description: + "This field contains a patient's most recent marital (civil) status.", + }, + _multipleBirthBoolean: { + type: require('./element.input.js'), + description: + 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', + }, + multipleBirthBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', + }, + _multipleBirthInteger: { + type: require('./element.input.js'), + description: + 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', + }, + multipleBirthInteger: { + type: GraphQLInt, + description: + 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the patient.', + }, + contact: { + type: new GraphQLList(require('./patientcontact.input.js')), + description: + 'A contact party (e.g. guardian, partner, friend) for the patient.', + }, + animal: { + type: require('./patientanimal.input.js'), + description: 'This patient is known to be an animal.', + }, + communication: { + type: new GraphQLList(require('./patientcommunication.input.js')), + description: + 'Languages which may be used to communicate with the patient about his or her health.', + }, + careProvider: { + type: new GraphQLList(GraphQLString), + description: "Patient's nominated care provider.", + }, + managingOrganization: { + type: GraphQLString, + description: 'Organization that is the custodian of the patient record.', + }, + link: { + type: new GraphQLList(require('./patientlink.input.js')), + description: + 'Link to another patient resource that concerns the same actual patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/patientanimal.input.js b/src/resources/1_0_2/inputs/patientanimal.input.js index e4291251..1f238178 100644 --- a/src/resources/1_0_2/inputs/patientanimal.input.js +++ b/src/resources/1_0_2/inputs/patientanimal.input.js @@ -1,34 +1,55 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Patient.animal Input Schema + * @summary Patientanimal Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PatientAnimal_Input', - description: 'This patient is known to be an animal.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-species - species: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the high level taxonomic categorization of the kind of animal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-breeds - breed: { - type: require('./codeableconcept.input'), - description: - 'Identifies the detailed categorization of the kind of animal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-genderstatus - genderStatus: { - type: require('./codeableconcept.input'), - description: - "Indicates the current state of the animal's reproductive organs.", - }, - }), + name: 'Patientanimal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-species + species: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the high level taxonomic categorization of the kind of animal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-breeds + breed: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the detailed categorization of the kind of animal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-genderstatus + genderStatus: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the current state of the animal's reproductive organs.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/patientcommunication.input.js b/src/resources/1_0_2/inputs/patientcommunication.input.js index 77a42356..11cd2ce4 100644 --- a/src/resources/1_0_2/inputs/patientcommunication.input.js +++ b/src/resources/1_0_2/inputs/patientcommunication.input.js @@ -1,36 +1,53 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Patient.communication Input Schema + * @summary Patientcommunication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PatientCommunication_Input', - description: - 'Languages which may be used to communicate with the patient about his or her health.', - fields: () => - extendSchema(require('./backboneelement.input'), { - language: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", - }, - preferred: { - type: GraphQLBoolean, - description: - 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', - }, - _preferred: { - type: require('./element.input'), - description: - 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', - }, - }), + name: 'Patientcommunication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + language: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + _preferred: { + type: require('./element.input.js'), + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + preferred: { + type: GraphQLBoolean, + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/patientcontact.input.js b/src/resources/1_0_2/inputs/patientcontact.input.js index 71f23e04..7ef895d1 100644 --- a/src/resources/1_0_2/inputs/patientcontact.input.js +++ b/src/resources/1_0_2/inputs/patientcontact.input.js @@ -1,58 +1,78 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Patient.contact Input Schema + * @summary Patientcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PatientContact_Input', - description: - 'A contact party (e.g. guardian, partner, friend) for the patient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/patient-contact-relationship - relationship: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The nature of the relationship between the patient and the contact person.', - }, - name: { - type: require('./humanname.input'), - description: 'A name associated with the contact person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - address: { - type: require('./address.input'), - description: 'Address for the contact person.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', - }, - organization: { - type: require('./reference.input'), - description: - 'Organization on behalf of which the contact is acting or for which the contact is working.', - }, - period: { - type: require('./period.input'), - description: - 'The period during which this contact person or organization is valid to be contacted relating to this patient.', - }, - }), + name: 'Patientcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/patient-contact-relationship + relationship: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The nature of the relationship between the patient and the contact person.', + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the contact person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + address: { + type: require('./address.input.js'), + description: 'Address for the contact person.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + organization: { + type: GraphQLString, + description: + 'Organization on behalf of which the contact is acting or for which the contact is working.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period during which this contact person or organization is valid to be contacted relating to this patient.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/patientlink.input.js b/src/resources/1_0_2/inputs/patientlink.input.js index fe119f77..17735065 100644 --- a/src/resources/1_0_2/inputs/patientlink.input.js +++ b/src/resources/1_0_2/inputs/patientlink.input.js @@ -1,33 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Patient.link Input Schema + * @summary Patientlink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PatientLink_Input', - description: - 'Link to another patient resource that concerns the same actual patient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - other: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The other patient resource that the link refers to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/link-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of link between this patient resource and another patient resource.', - }, - _type: { - type: require('./element.input'), - description: - 'The type of link between this patient resource and another patient resource.', - }, - }), + name: 'Patientlink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + other: { + type: new GraphQLNonNull(GraphQLString), + description: 'The other patient resource that the link refers to.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of link between this patient resource and another patient resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/link-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of link between this patient resource and another patient resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/paymentnotice.input.js b/src/resources/1_0_2/inputs/paymentnotice.input.js index e286ed25..2bc89997 100644 --- a/src/resources/1_0_2/inputs/paymentnotice.input.js +++ b/src/resources/1_0_2/inputs/paymentnotice.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 PaymentNoticeResourceInputType = new GraphQLEnumType({ - name: 'PaymentNoticeResourceInputType', - values: { - PaymentNotice: { value: 'PaymentNotice' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,64 +16,121 @@ let PaymentNoticeResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'PaymentNotice_Input', - description: 'Base StructureDefinition for PaymentNotice Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PaymentNoticeResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.input'), - description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - request: { - type: require('./reference.input'), - description: 'Reference of resource to reverse.', - }, - response: { - type: require('./reference.input'), - description: 'Reference of response to resource to reverse.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-status - paymentStatus: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'The payment status, typically paid: payment sent, cleared: payment received.', - }, - }), + description: 'Base StructureDefinition for PaymentNotice Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentNotice_Enum_input', + values: { PaymentNotice: { value: 'PaymentNotice' } }, + }), + ), + 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: 'The Response business identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + request: { + type: GraphQLString, + description: 'Reference of resource to reverse.', + }, + response: { + type: GraphQLString, + description: 'Reference of response to resource to reverse.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-status + paymentStatus: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'The payment status, typically paid: payment sent, cleared: payment received.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/paymentreconciliation.input.js b/src/resources/1_0_2/inputs/paymentreconciliation.input.js index eef00ef8..a96af44d 100644 --- a/src/resources/1_0_2/inputs/paymentreconciliation.input.js +++ b/src/resources/1_0_2/inputs/paymentreconciliation.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 PaymentReconciliationResourceInputType = new GraphQLEnumType({ - name: 'PaymentReconciliationResourceInputType', - values: { - PaymentReconciliation: { value: 'PaymentReconciliation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,96 +16,153 @@ let PaymentReconciliationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'PaymentReconciliation_Input', - description: 'Base StructureDefinition for PaymentReconciliation Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PaymentReconciliationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.input'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - period: { - type: require('./period.input'), - description: - 'The period of time for which payments have been gathered into this bulk payment for settlement.', - }, - organization: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - detail: { - type: new GraphQLList(require('./paymentreconciliationdetail.input')), - description: - 'List of individual settlement amounts and the corresponding transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./coding.input'), - description: 'The form to be used for printing the content.', - }, - total: { - type: new GraphQLNonNull(require('./quantity.input')), - description: 'Total payment amount.', - }, - note: { - type: new GraphQLList(require('./paymentreconciliationnote.input')), - description: 'Suite of notes.', - }, - }), + description: 'Base StructureDefinition for PaymentReconciliation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentReconciliation_Enum_input', + values: { PaymentReconciliation: { value: 'PaymentReconciliation' } }, + }), + ), + 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: 'The Response business identifier.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time for which payments have been gathered into this bulk payment for settlement.', + }, + organization: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + detail: { + type: new GraphQLList(require('./paymentreconciliationdetail.input.js')), + description: + 'List of individual settlement amounts and the corresponding transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./coding.input.js'), + description: 'The form to be used for printing the content.', + }, + total: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'Total payment amount.', + }, + note: { + type: new GraphQLList(require('./paymentreconciliationnote.input.js')), + description: 'Suite of notes.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/paymentreconciliationdetail.input.js b/src/resources/1_0_2/inputs/paymentreconciliationdetail.input.js index 81a28aef..bc9c4431 100644 --- a/src/resources/1_0_2/inputs/paymentreconciliationdetail.input.js +++ b/src/resources/1_0_2/inputs/paymentreconciliationdetail.input.js @@ -1,53 +1,74 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary PaymentReconciliation.detail Input Schema + * @summary PaymentReconciliationdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PaymentReconciliationDetail_Input', - description: - 'List of individual settlement amounts and the corresponding transaction.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-type - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Code to indicate the nature of the payment, adjustment, funds advance, etc.', - }, - request: { - type: require('./reference.input'), - description: 'The claim or financial resource.', - }, - responce: { - type: require('./reference.input'), - description: 'The claim response resource.', - }, - submitter: { - type: require('./reference.input'), - description: - 'The Organization which submitted the invoice or financial transaction.', - }, - payee: { - type: require('./reference.input'), - description: 'The organization which is receiving the payment.', - }, - date: { - type: DateScalar, - description: 'The date of the invoice or financial resource.', - }, - _date: { - type: require('./element.input'), - description: 'The date of the invoice or financial resource.', - }, - amount: { - type: require('./quantity.input'), - description: 'Amount paid for this detail.', - }, - }), + name: 'PaymentReconciliationdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-type + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Code to indicate the nature of the payment, adjustment, funds advance, etc.', + }, + request: { + type: GraphQLString, + description: 'The claim or financial resource.', + }, + responce: { + type: GraphQLString, + description: 'The claim response resource.', + }, + submitter: { + type: GraphQLString, + description: + 'The Organization which submitted the invoice or financial transaction.', + }, + payee: { + type: GraphQLString, + description: 'The organization which is receiving the payment.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date of the invoice or financial resource.', + }, + date: { + type: DateScalar, + description: 'The date of the invoice or financial resource.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'Amount paid for this detail.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/paymentreconciliationnote.input.js b/src/resources/1_0_2/inputs/paymentreconciliationnote.input.js index 1905f54b..cccf5a56 100644 --- a/src/resources/1_0_2/inputs/paymentreconciliationnote.input.js +++ b/src/resources/1_0_2/inputs/paymentreconciliationnote.input.js @@ -1,29 +1,50 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary PaymentReconciliation.note Input Schema + * @summary PaymentReconciliationnote Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PaymentReconciliationNote_Input', - description: 'Suite of notes.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./coding.input'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.input'), - description: 'The note text.', - }, - }), + name: 'PaymentReconciliationnote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./coding.input.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.input.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/period.input.js b/src/resources/1_0_2/inputs/period.input.js index db7c74be..ab933300 100644 --- a/src/resources/1_0_2/inputs/period.input.js +++ b/src/resources/1_0_2/inputs/period.input.js @@ -1,8 +1,6 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -10,26 +8,40 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Period_Input', - description: 'Base StructureDefinition for Period Type.', - fields: () => - extendSchema(require('./element.input'), { - start: { - type: DateTimeScalar, - description: 'The start of the period. The boundary is inclusive.', - }, - _start: { - type: require('./element.input'), - description: 'The start of the period. The boundary is inclusive.', - }, - end: { - type: DateTimeScalar, - description: - 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', - }, - _end: { - type: require('./element.input'), - description: - 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', - }, - }), + description: 'Base StructureDefinition for Period Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _start: { + type: require('./element.input.js'), + description: 'The start of the period. The boundary is inclusive.', + }, + start: { + type: DateTimeScalar, + description: 'The start of the period. The boundary is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + end: { + type: DateTimeScalar, + description: + 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/person.input.js b/src/resources/1_0_2/inputs/person.input.js index 0a282c3f..43c7f9a4 100644 --- a/src/resources/1_0_2/inputs/person.input.js +++ b/src/resources/1_0_2/inputs/person.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PersonResourceInputType = new GraphQLEnumType({ - name: 'PersonResourceInputType', - values: { - Person: { value: 'Person' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,68 +17,125 @@ let PersonResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Person_Input', - description: 'Base StructureDefinition for Person Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PersonResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier for a person within a particular scope.', - }, - name: { - type: new GraphQLList(require('./humanname.input')), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: 'Administrative Gender.', - }, - _gender: { - type: require('./element.input'), - description: 'Administrative Gender.', - }, - birthDate: { - type: DateScalar, - description: 'The birth date for the person.', - }, - _birthDate: { - type: require('./element.input'), - description: 'The birth date for the person.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: 'One or more addresses for the person.', - }, - photo: { - type: require('./attachment.input'), - description: - 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'The organization that is the custodian of the person record.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this person's record is in active use.", - }, - _active: { - type: require('./element.input'), - description: "Whether this person's record is in active use.", - }, - link: { - type: new GraphQLList(require('./personlink.input')), - description: 'Link to a resource that concerns the same actual person.', - }, - }), + description: 'Base StructureDefinition for Person Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Person_Enum_input', + values: { Person: { value: 'Person' } }, + }), + ), + 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: 'Identifier for a person within a particular scope.', + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.input.js'), + description: 'Administrative Gender.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: 'Administrative Gender.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The birth date for the person.', + }, + birthDate: { + type: DateScalar, + description: 'The birth date for the person.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'One or more addresses for the person.', + }, + photo: { + type: require('./attachment.input.js'), + description: + 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization that is the custodian of the person record.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether this person's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this person's record is in active use.", + }, + link: { + type: new GraphQLList(require('./personlink.input.js')), + description: 'Link to a resource that concerns the same actual person.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/personlink.input.js b/src/resources/1_0_2/inputs/personlink.input.js index fea2cbf8..13eb5b2b 100644 --- a/src/resources/1_0_2/inputs/personlink.input.js +++ b/src/resources/1_0_2/inputs/personlink.input.js @@ -1,32 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Person.link Input Schema + * @summary Personlink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PersonLink_Input', - description: 'Link to a resource that concerns the same actual person.', - fields: () => - extendSchema(require('./backboneelement.input'), { - target: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The resource to which this actual person is associated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identity-assuranceLevel - assurance: { - type: CodeScalar, - description: - 'Level of assurance that this link is actually associated with the target resource.', - }, - _assurance: { - type: require('./element.input'), - description: - 'Level of assurance that this link is actually associated with the target resource.', - }, - }), + name: 'Personlink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + target: { + type: new GraphQLNonNull(GraphQLString), + description: 'The resource to which this actual person is associated.', + }, + _assurance: { + type: require('./element.input.js'), + description: + 'Level of assurance that this link is actually associated with the target resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identity-assuranceLevel + assurance: { + type: CodeScalar, + description: + 'Level of assurance that this link is actually associated with the target resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/practitioner.input.js b/src/resources/1_0_2/inputs/practitioner.input.js index 2a6af880..f996898e 100644 --- a/src/resources/1_0_2/inputs/practitioner.input.js +++ b/src/resources/1_0_2/inputs/practitioner.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PractitionerResourceInputType = new GraphQLEnumType({ - name: 'PractitionerResourceInputType', - values: { - Practitioner: { value: 'Practitioner' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,75 +17,132 @@ let PractitionerResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Practitioner_Input', - description: 'Base StructureDefinition for Practitioner Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PractitionerResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'An identifier that applies to this person in this role.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this practitioner's record is in active use.", - }, - _active: { - type: require('./element.input'), - description: "Whether this practitioner's record is in active use.", - }, - name: { - type: require('./humanname.input'), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail for the practitioner, e.g. a telephone number or an email address.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: - 'The postal address where the practitioner can be found or visited or to which mail can be delivered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date of birth for the practitioner.', - }, - _birthDate: { - type: require('./element.input'), - description: 'The date of birth for the practitioner.', - }, - photo: { - type: new GraphQLList(require('./attachment.input')), - description: 'Image of the person.', - }, - practitionerRole: { - type: new GraphQLList(require('./practitionerpractitionerrole.input')), - description: - 'The list of roles/organizations that the practitioner is associated with.', - }, - qualification: { - type: new GraphQLList(require('./practitionerqualification.input')), - description: 'Qualifications obtained by training and certification.', - }, - communication: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A language the practitioner is able to use in patient communication.', - }, - }), + description: 'Base StructureDefinition for Practitioner Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Practitioner_Enum_input', + values: { Practitioner: { value: 'Practitioner' } }, + }), + ), + 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: 'An identifier that applies to this person in this role.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether this practitioner's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this practitioner's record is in active use.", + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the practitioner, e.g. a telephone number or an email address.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: + 'The postal address where the practitioner can be found or visited or to which mail can be delivered.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date of birth for the practitioner.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the practitioner.', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the person.', + }, + practitionerRole: { + type: new GraphQLList(require('./practitionerpractitionerrole.input.js')), + description: + 'The list of roles/organizations that the practitioner is associated with.', + }, + qualification: { + type: new GraphQLList(require('./practitionerqualification.input.js')), + description: 'Qualifications obtained by training and certification.', + }, + communication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A language the practitioner is able to use in patient communication.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/practitionerpractitionerrole.input.js b/src/resources/1_0_2/inputs/practitionerpractitionerrole.input.js index 729ae2be..41a1496a 100644 --- a/src/resources/1_0_2/inputs/practitionerpractitionerrole.input.js +++ b/src/resources/1_0_2/inputs/practitionerpractitionerrole.input.js @@ -1,48 +1,67 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Practitioner.practitionerRole Input Schema + * @summary PractitionerpractitionerRole Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PractitionerPractitionerRole_Input', - description: - 'The list of roles/organizations that the practitioner is associated with.', - fields: () => - extendSchema(require('./backboneelement.input'), { - managingOrganization: { - type: require('./reference.input'), - description: - 'The organization where the Practitioner performs the roles associated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-role - role: { - type: require('./codeableconcept.input'), - description: - 'Roles which this practitioner is authorized to perform for the organization.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty - specialty: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Specific specialty of the practitioner.', - }, - period: { - type: require('./period.input'), - description: - 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', - }, - location: { - type: new GraphQLList(require('./reference.input')), - description: - 'The location(s) at which this practitioner provides care.', - }, - healthcareService: { - type: new GraphQLList(require('./reference.input')), - description: - "The list of healthcare services that this worker provides for this role's Organization/Location(s).", - }, - }), + name: 'PractitionerpractitionerRole_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization where the Practitioner performs the roles associated.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-role + role: { + type: require('./codeableconcept.input.js'), + description: + 'Roles which this practitioner is authorized to perform for the organization.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Specific specialty of the practitioner.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', + }, + location: { + type: new GraphQLList(GraphQLString), + description: 'The location(s) at which this practitioner provides care.', + }, + healthcareService: { + type: new GraphQLList(GraphQLString), + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/practitionerqualification.input.js b/src/resources/1_0_2/inputs/practitionerqualification.input.js index 05d2a8be..de47b414 100644 --- a/src/resources/1_0_2/inputs/practitionerqualification.input.js +++ b/src/resources/1_0_2/inputs/practitionerqualification.input.js @@ -1,39 +1,56 @@ const { - GraphQLInputObjectType, GraphQLList, GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Practitioner.qualification Input Schema + * @summary Practitionerqualification Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PractitionerQualification_Input', - description: 'Qualifications obtained by training and certification.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - "An identifier that applies to this person's qualification in this role.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/anzsco-occupations - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Coded representation of the qualification.', - }, - period: { - type: require('./period.input'), - description: 'Period during which the qualification is valid.', - }, - issuer: { - type: require('./reference.input'), - description: - 'Organization that regulates and issues the qualification.', - }, - }), + name: 'Practitionerqualification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: + "An identifier that applies to this person's qualification in this role.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/anzsco-occupations + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Coded representation of the qualification.', + }, + period: { + type: require('./period.input.js'), + description: 'Period during which the qualification is valid.', + }, + issuer: { + type: GraphQLString, + description: 'Organization that regulates and issues the qualification.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/procedure.input.js b/src/resources/1_0_2/inputs/procedure.input.js index bdc7a6d0..f9885cf8 100644 --- a/src/resources/1_0_2/inputs/procedure.input.js +++ b/src/resources/1_0_2/inputs/procedure.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcedureResourceInputType = new GraphQLEnumType({ - name: 'ProcedureResourceInputType', - values: { - Procedure: { value: 'Procedure' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,149 +17,206 @@ let ProcedureResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Procedure_Input', - description: 'Base StructureDefinition for Procedure Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProcedureResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The person, animal or group on which the procedure was performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', - }, - _status: { - type: require('./element.input'), - description: - 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-category - category: { - type: require('./codeableconcept.input'), - description: - "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", - }, - notPerformed: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the procedure was NOT performed.', - }, - _notPerformed: { - type: require('./element.input'), - description: - 'Set this to true if the record is saying that the procedure was NOT performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-not-performed-reason - reasonNotPerformed: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'A code indicating why the procedure was not performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonReference: { - type: require('./reference.input'), - description: - 'The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.', - }, - performer: { - type: new GraphQLList(require('./procedureperformer.input')), - description: "Limited to 'real' people rather than equipment.", - }, - performedDateTime: { - type: DateTimeScalar, - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - _performedDateTime: { - type: require('./element.input'), - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - performedPeriod: { - type: require('./period.input'), - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - encounter: { - type: require('./reference.input'), - description: 'The encounter during which the procedure was performed.', - }, - location: { - type: require('./reference.input'), - description: - 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-outcome - outcome: { - type: require('./codeableconcept.input'), - description: - 'The outcome of the procedure - did it resolve reasons for the procedure being performed?.', - }, - report: { - type: new GraphQLList(require('./reference.input')), - description: - 'This could be a histology result, pathology report, surgical report, etc..', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - complication: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-followup - followUp: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.', - }, - request: { - type: require('./reference.input'), - description: - 'A reference to a resource that contains details of the request for this procedure.', - }, - notes: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Any other notes about the procedure. E.g. the operative notes.', - }, - focalDevice: { - type: new GraphQLList(require('./procedurefocaldevice.input')), - description: - 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', - }, - used: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies medications, devices and any other substance used as part of the procedure.', - }, - }), + description: 'Base StructureDefinition for Procedure Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Procedure_Enum_input', + values: { Procedure: { value: 'Procedure' } }, + }), + ), + 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: + 'This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person, animal or group on which the procedure was performed.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-category + category: { + type: require('./codeableconcept.input.js'), + description: + "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", + }, + _notPerformed: { + type: require('./element.input.js'), + description: + 'Set this to true if the record is saying that the procedure was NOT performed.', + }, + notPerformed: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the procedure was NOT performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-not-performed-reason + reasonNotPerformed: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A code indicating why the procedure was not performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonReference: { + type: GraphQLString, + description: + 'The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.', + }, + performer: { + type: new GraphQLList(require('./procedureperformer.input.js')), + description: "Limited to 'real' people rather than equipment.", + }, + _performedDateTime: { + type: require('./element.input.js'), + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedDateTime: { + type: DateTimeScalar, + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedPeriod: { + type: require('./period.input.js'), + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + encounter: { + type: GraphQLString, + description: 'The encounter during which the procedure was performed.', + }, + location: { + type: GraphQLString, + description: + 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: + 'The outcome of the procedure - did it resolve reasons for the procedure being performed?', + }, + report: { + type: new GraphQLList(GraphQLString), + description: + 'This could be a histology result, pathology report, surgical report, etc..', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + complication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-followup + followUp: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.', + }, + request: { + type: GraphQLString, + description: + 'A reference to a resource that contains details of the request for this procedure.', + }, + notes: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Any other notes about the procedure. E.g. the operative notes.', + }, + focalDevice: { + type: new GraphQLList(require('./procedurefocaldevice.input.js')), + description: + 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', + }, + used: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/procedurefocaldevice.input.js b/src/resources/1_0_2/inputs/procedurefocaldevice.input.js index 0080fb78..81ea4a2e 100644 --- a/src/resources/1_0_2/inputs/procedurefocaldevice.input.js +++ b/src/resources/1_0_2/inputs/procedurefocaldevice.input.js @@ -1,28 +1,49 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Procedure.focalDevice Input Schema + * @summary ProcedurefocalDevice Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcedureFocalDevice_Input', - description: - 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-action - action: { - type: require('./codeableconcept.input'), - description: - 'The kind of change that happened to the device during the procedure.', - }, - manipulated: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device that was manipulated (changed) during the procedure.', - }, - }), + name: 'ProcedurefocalDevice_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-action + action: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of change that happened to the device during the procedure.', + }, + manipulated: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device that was manipulated (changed) during the procedure.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/procedureperformer.input.js b/src/resources/1_0_2/inputs/procedureperformer.input.js index 1bff3e63..7c41ddd0 100644 --- a/src/resources/1_0_2/inputs/procedureperformer.input.js +++ b/src/resources/1_0_2/inputs/procedureperformer.input.js @@ -1,25 +1,46 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Procedure.performer Input Schema + * @summary Procedureperformer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcedurePerformer_Input', - description: "Limited to 'real' people rather than equipment.", - fields: () => - extendSchema(require('./backboneelement.input'), { - actor: { - type: require('./reference.input'), - description: 'The practitioner who was involved in the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/performer-role - role: { - type: require('./codeableconcept.input'), - description: 'For example: surgeon, anaethetist, endoscopist.', - }, - }), + name: 'Procedureperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + actor: { + type: GraphQLString, + description: 'The practitioner who was involved in the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/performer-role + role: { + type: require('./codeableconcept.input.js'), + description: 'For example: surgeon, anaethetist, endoscopist.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/procedurerequest.input.js b/src/resources/1_0_2/inputs/procedurerequest.input.js index 131e0962..1583cfef 100644 --- a/src/resources/1_0_2/inputs/procedurerequest.input.js +++ b/src/resources/1_0_2/inputs/procedurerequest.input.js @@ -1,23 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcedureRequestResourceInputType = new GraphQLEnumType({ - name: 'ProcedureRequestResourceInputType', - values: { - ProcedureRequest: { value: 'ProcedureRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,126 +17,183 @@ let ProcedureRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ProcedureRequest_Input', - description: 'Base StructureDefinition for ProcedureRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProcedureRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order by the order or by the receiver.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The person, animal or group that should receive the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonReference: { - type: require('./reference.input'), - description: - 'The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.', - }, - scheduledDateTime: { - type: DateTimeScalar, - description: - "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - _scheduledDateTime: { - type: require('./element.input'), - description: - "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - scheduledPeriod: { - type: require('./period.input'), - description: - "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - scheduledTiming: { - type: require('./timing.input'), - description: - "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - encounter: { - type: require('./reference.input'), - description: - 'The encounter within which the procedure proposal or request was created.', - }, - performer: { - type: require('./reference.input'), - description: 'For example, the surgeon, anaethetist, endoscopist, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-request-status - status: { - type: CodeScalar, - description: 'The status of the order.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the order.', - }, - notes: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Any other notes associated with this proposal or order - e.g. provider instructions.', - }, - asNeededBoolean: { - type: GraphQLBoolean, - description: - 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', - }, - _asNeededBoolean: { - type: require('./element.input'), - description: - 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', - }, - asNeededCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', - }, - orderedOn: { - type: DateTimeScalar, - description: 'The time when the request was made.', - }, - _orderedOn: { - type: require('./element.input'), - description: 'The time when the request was made.', - }, - orderer: { - type: require('./reference.input'), - description: - 'The healthcare professional responsible for proposing or ordering the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-request-priority - priority: { - type: CodeScalar, - description: 'The clinical priority associated with this order.', - }, - _priority: { - type: require('./element.input'), - description: 'The clinical priority associated with this order.', - }, - }), + description: 'Base StructureDefinition for ProcedureRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcedureRequest_Enum_input', + values: { ProcedureRequest: { value: 'ProcedureRequest' } }, + }), + ), + 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: + 'Identifiers assigned to this order by the order or by the receiver.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person, animal or group that should receive the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonReference: { + type: GraphQLString, + description: + 'The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.', + }, + _scheduledDateTime: { + type: require('./element.input.js'), + description: + "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + scheduledDateTime: { + type: DateTimeScalar, + description: + "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + scheduledPeriod: { + type: require('./period.input.js'), + description: + "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + scheduledTiming: { + type: require('./timing.input.js'), + description: + "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + encounter: { + type: GraphQLString, + description: + 'The encounter within which the procedure proposal or request was created.', + }, + performer: { + type: GraphQLString, + description: 'For example, the surgeon, anaethetist, endoscopist, etc.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-request-status + status: { + type: CodeScalar, + description: 'The status of the order.', + }, + notes: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Any other notes associated with this proposal or order - e.g. provider instructions.', + }, + _asNeededBoolean: { + type: require('./element.input.js'), + description: + 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', + }, + _orderedOn: { + type: require('./element.input.js'), + description: 'The time when the request was made.', + }, + orderedOn: { + type: DateTimeScalar, + description: 'The time when the request was made.', + }, + orderer: { + type: GraphQLString, + description: + 'The healthcare professional responsible for proposing or ordering the procedure.', + }, + _priority: { + type: require('./element.input.js'), + description: 'The clinical priority associated with this order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-request-priority + priority: { + type: CodeScalar, + description: 'The clinical priority associated with this order.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/processrequest.input.js b/src/resources/1_0_2/inputs/processrequest.input.js index f42c31e1..9c9ebad1 100644 --- a/src/resources/1_0_2/inputs/processrequest.input.js +++ b/src/resources/1_0_2/inputs/processrequest.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcessRequestResourceInputType = new GraphQLEnumType({ - name: 'ProcessRequestResourceInputType', - values: { - ProcessRequest: { value: 'ProcessRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,113 +17,170 @@ let ProcessRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ProcessRequest_Input', - description: 'Base StructureDefinition for ProcessRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProcessRequestResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/actionlist - action: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', - }, - _action: { - type: require('./element.input'), - description: - 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The ProcessRequest business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.input'), - description: 'The organization which is the target of the request.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the action specified in thise request.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the action speccified in thise request.', - }, - request: { - type: require('./reference.input'), - description: - 'Reference of resource which is the target or subject of this action.', - }, - response: { - type: require('./reference.input'), - description: - 'Reference of a prior response to resource which is the target or subject of this action.', - }, - nullify: { - type: GraphQLBoolean, - description: 'If true remove all history excluding audit.', - }, - _nullify: { - type: require('./element.input'), - description: 'If true remove all history excluding audit.', - }, - reference: { - type: GraphQLString, - description: 'A reference to supply which authenticates the process.', - }, - _reference: { - type: require('./element.input'), - description: 'A reference to supply which authenticates the process.', - }, - item: { - type: new GraphQLList(require('./processrequestitem.input')), - description: - 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', - }, - include: { - type: new GraphQLList(GraphQLString), - description: 'Names of resource types to include.', - }, - _include: { - type: require('./element.input'), - description: 'Names of resource types to include.', - }, - exclude: { - type: new GraphQLList(GraphQLString), - description: 'Names of resource types to exclude.', - }, - _exclude: { - type: require('./element.input'), - description: 'Names of resource types to exclude.', - }, - period: { - type: require('./period.input'), - description: - 'A period of time during which the fulfilling resources would have been created.', - }, - }), + description: 'Base StructureDefinition for ProcessRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcessRequest_Enum_input', + values: { ProcessRequest: { value: 'ProcessRequest' } }, + }), + ), + 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.', + }, + _action: { + type: require('./element.input.js'), + description: + 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/actionlist + action: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'The ProcessRequest business identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: GraphQLString, + description: 'The organization which is the target of the request.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the action specified in thise request.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the action speccified in thise request.', + }, + request: { + type: GraphQLString, + description: + 'Reference of resource which is the target or subject of this action.', + }, + response: { + type: GraphQLString, + description: + 'Reference of a prior response to resource which is the target or subject of this action.', + }, + _nullify: { + type: require('./element.input.js'), + description: 'If true remove all history excluding audit.', + }, + nullify: { + type: GraphQLBoolean, + description: 'If true remove all history excluding audit.', + }, + _reference: { + type: require('./element.input.js'), + description: 'A reference to supply which authenticates the process.', + }, + reference: { + type: GraphQLString, + description: 'A reference to supply which authenticates the process.', + }, + item: { + type: new GraphQLList(require('./processrequestitem.input.js')), + description: + 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', + }, + _include: { + type: require('./element.input.js'), + description: 'Names of resource types to include.', + }, + include: { + type: new GraphQLList(GraphQLString), + description: 'Names of resource types to include.', + }, + _exclude: { + type: require('./element.input.js'), + description: 'Names of resource types to exclude.', + }, + exclude: { + type: new GraphQLList(GraphQLString), + description: 'Names of resource types to exclude.', + }, + period: { + type: require('./period.input.js'), + description: + 'A period of time during which the fulfilling resources would have been created.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/processrequestitem.input.js b/src/resources/1_0_2/inputs/processrequestitem.input.js index db67b8f0..5b802316 100644 --- a/src/resources/1_0_2/inputs/processrequestitem.input.js +++ b/src/resources/1_0_2/inputs/processrequestitem.input.js @@ -1,29 +1,46 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ProcessRequest.item Input Schema + * @summary ProcessRequestitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcessRequestItem_Input', - description: - 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLNonNull(GraphQLInt), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: 'A service line number.', - }, - }), + name: 'ProcessRequestitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(GraphQLInt), + description: 'A service line number.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/processresponse.input.js b/src/resources/1_0_2/inputs/processresponse.input.js index df040c2c..2333b700 100644 --- a/src/resources/1_0_2/inputs/processresponse.input.js +++ b/src/resources/1_0_2/inputs/processresponse.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 ProcessResponseResourceInputType = new GraphQLEnumType({ - name: 'ProcessResponseResourceInputType', - values: { - ProcessResponse: { value: 'ProcessResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,86 +16,143 @@ let ProcessResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ProcessResponse_Input', - description: 'Base StructureDefinition for ProcessResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProcessResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-outcome - outcome: { - type: require('./coding.input'), - description: 'Transaction status: error, complete, held.', - }, - disposition: { - type: GraphQLString, - description: - 'A description of the status of the adjudication or processing.', - }, - _disposition: { - type: require('./element.input'), - description: - 'A description of the status of the adjudication or processing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.input'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.input'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.input'), - description: 'The organization who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./coding.input'), - description: 'The form to be used for printing the content.', - }, - notes: { - type: new GraphQLList(require('./processresponsenotes.input')), - description: - 'Suite of processing note or additional requirements is the processing has been held.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - error: { - type: new GraphQLList(require('./coding.input')), - description: 'Processing errors.', - }, - }), + description: 'Base StructureDefinition for ProcessResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcessResponse_Enum_input', + values: { ProcessResponse: { value: 'ProcessResponse' } }, + }), + ), + 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: 'The Response business identifier.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-outcome + outcome: { + type: require('./coding.input.js'), + description: 'Transaction status: error, complete, held.', + }, + _disposition: { + type: require('./element.input.js'), + description: + 'A description of the status of the adjudication or processing.', + }, + disposition: { + type: GraphQLString, + description: + 'A description of the status of the adjudication or processing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.input.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.input.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The organization who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./coding.input.js'), + description: 'The form to be used for printing the content.', + }, + notes: { + type: new GraphQLList(require('./processresponsenotes.input.js')), + description: + 'Suite of processing note or additional requirements is the processing has been held.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + error: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Processing errors.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/processresponsenotes.input.js b/src/resources/1_0_2/inputs/processresponsenotes.input.js index 50ec176d..728a2970 100644 --- a/src/resources/1_0_2/inputs/processresponsenotes.input.js +++ b/src/resources/1_0_2/inputs/processresponsenotes.input.js @@ -1,30 +1,50 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ProcessResponse.notes Input Schema + * @summary ProcessResponsenotes Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcessResponseNotes_Input', - description: - 'Suite of processing note or additional requirements is the processing has been held.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./coding.input'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.input'), - description: 'The note text.', - }, - }), + name: 'ProcessResponsenotes_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./coding.input.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.input.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/provenance.input.js b/src/resources/1_0_2/inputs/provenance.input.js index 0eea8dae..2aba4a22 100644 --- a/src/resources/1_0_2/inputs/provenance.input.js +++ b/src/resources/1_0_2/inputs/provenance.input.js @@ -1,22 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.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 ProvenanceResourceInputType = new GraphQLEnumType({ - name: 'ProvenanceResourceInputType', - values: { - Provenance: { value: 'Provenance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,68 +16,125 @@ let ProvenanceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Provenance_Input', - description: 'Base StructureDefinition for Provenance Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProvenanceResourceInputType), - description: 'Type of this resource.', - }, - target: { - type: new GraphQLList(new GraphQLNonNull(require('./reference.input'))), - description: - 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', - }, - period: { - type: require('./period.input'), - description: 'The period during which the activity occurred.', - }, - recorded: { - type: new GraphQLNonNull(InstantScalar), - description: 'The instant of time at which the activity was recorded.', - }, - _recorded: { - type: require('./element.input'), - description: 'The instant of time at which the activity was recorded.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'The reason that the activity was taking place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ProvenanceEventCurrentState - activity: { - type: require('./codeableconcept.input'), - description: - 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', - }, - location: { - type: require('./reference.input'), - description: 'Where the activity occurred, if relevant.', - }, - policy: { - type: new GraphQLList(UriScalar), - description: - 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', - }, - _policy: { - type: require('./element.input'), - description: - 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', - }, - agent: { - type: new GraphQLList(require('./provenanceagent.input')), - description: - 'An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.', - }, - entity: { - type: new GraphQLList(require('./provenanceentity.input')), - description: 'An entity used in this activity.', - }, - signature: { - type: new GraphQLList(require('./signature.input')), - description: - 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', - }, - }), + description: 'Base StructureDefinition for Provenance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Provenance_Enum_input', + values: { Provenance: { value: 'Provenance' } }, + }), + ), + 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.', + }, + target: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + }, + period: { + type: require('./period.input.js'), + description: 'The period during which the activity occurred.', + }, + _recorded: { + type: require('./element.input.js'), + description: 'The instant of time at which the activity was recorded.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The instant of time at which the activity was recorded.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason that the activity was taking place.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ProvenanceEventCurrentState + activity: { + type: require('./codeableconcept.input.js'), + description: + 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', + }, + location: { + type: GraphQLString, + description: 'Where the activity occurred, if relevant.', + }, + _policy: { + type: require('./element.input.js'), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + agent: { + type: new GraphQLList(require('./provenanceagent.input.js')), + description: + 'An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.', + }, + entity: { + type: new GraphQLList(require('./provenanceentity.input.js')), + description: 'An entity used in this activity.', + }, + signature: { + type: new GraphQLList(require('./signature.input.js')), + description: + 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/provenanceagent.input.js b/src/resources/1_0_2/inputs/provenanceagent.input.js index 608dc6ab..6664ef8f 100644 --- a/src/resources/1_0_2/inputs/provenanceagent.input.js +++ b/src/resources/1_0_2/inputs/provenanceagent.input.js @@ -1,41 +1,58 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Provenance.agent Input Schema + * @summary Provenanceagent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProvenanceAgent_Input', - description: - 'An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/provenance-agent-role - role: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The function of the agent with respect to the activity.', - }, - actor: { - type: require('./reference.input'), - description: - 'The individual, device or organization that participated in the event.', - }, - userId: { - type: require('./identifier.input'), - description: - 'The identity of the agent as known by the authorization system.', - }, - relatedAgent: { - type: new GraphQLList(require('./provenanceagentrelatedagent.input')), - description: - "A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.", - }, - }), + name: 'Provenanceagent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provenance-agent-role + role: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The function of the agent with respect to the activity.', + }, + actor: { + type: GraphQLString, + description: + 'The individual, device or organization that participated in the event.', + }, + userId: { + type: require('./identifier.input.js'), + description: + 'The identity of the agent as known by the authorization system.', + }, + relatedAgent: { + type: new GraphQLList(require('./provenanceagentrelatedagent.input.js')), + description: + "A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/provenanceagentrelatedagent.input.js b/src/resources/1_0_2/inputs/provenanceagentrelatedagent.input.js index b66eda23..604ed044 100644 --- a/src/resources/1_0_2/inputs/provenanceagentrelatedagent.input.js +++ b/src/resources/1_0_2/inputs/provenanceagentrelatedagent.input.js @@ -1,33 +1,53 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Provenance.agent.relatedAgent Input Schema + * @summary ProvenanceagentrelatedAgent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProvenanceAgentRelatedAgent_Input', - description: - "A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-RoleLinkType - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The type of relationship between agents.', - }, - target: { - type: new GraphQLNonNull(UriScalar), - description: - 'An internal reference to another agent listed in this provenance by its identifier.', - }, - _target: { - type: require('./element.input'), - description: - 'An internal reference to another agent listed in this provenance by its identifier.', - }, - }), + name: 'ProvenanceagentrelatedAgent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-RoleLinkType + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The type of relationship between agents.', + }, + _target: { + type: require('./element.input.js'), + description: + 'An internal reference to another agent listed in this provenance by its identifier.', + }, + target: { + type: new GraphQLNonNull(UriScalar), + description: + 'An internal reference to another agent listed in this provenance by its identifier.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/provenanceentity.input.js b/src/resources/1_0_2/inputs/provenanceentity.input.js index a62c338c..27467b58 100644 --- a/src/resources/1_0_2/inputs/provenanceentity.input.js +++ b/src/resources/1_0_2/inputs/provenanceentity.input.js @@ -1,55 +1,73 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Provenance.entity Input Schema + * @summary Provenanceentity Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProvenanceEntity_Input', - description: 'An entity used in this activity.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/provenance-entity-role - role: { - type: new GraphQLNonNull(CodeScalar), - description: 'How the entity was used during the activity.', - }, - _role: { - type: require('./element.input'), - description: 'How the entity was used during the activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'The type of the entity. If the entity is a resource, then this is a resource type.', - }, - reference: { - type: new GraphQLNonNull(UriScalar), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - _reference: { - type: require('./element.input'), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - display: { - type: GraphQLString, - description: 'Human-readable description of the entity.', - }, - _display: { - type: require('./element.input'), - description: 'Human-readable description of the entity.', - }, - }), + name: 'Provenanceentity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _role: { + type: require('./element.input.js'), + description: 'How the entity was used during the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provenance-entity-role + role: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the entity was used during the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'The type of the entity. If the entity is a resource, then this is a resource type.', + }, + _reference: { + type: require('./element.input.js'), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + reference: { + type: new GraphQLNonNull(UriScalar), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + _display: { + type: require('./element.input.js'), + description: 'Human-readable description of the entity.', + }, + display: { + type: GraphQLString, + description: 'Human-readable description of the entity.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/quantity.input.js b/src/resources/1_0_2/inputs/quantity.input.js index b628dfc2..32221bd7 100644 --- a/src/resources/1_0_2/inputs/quantity.input.js +++ b/src/resources/1_0_2/inputs/quantity.input.js @@ -1,13 +1,12 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLFloat, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -15,57 +14,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Quantity_Input', - description: 'Base StructureDefinition for Quantity Type.', - fields: () => - extendSchema(require('./element.input'), { - value: { - type: GraphQLFloat, - description: - 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', - }, - _value: { - type: require('./element.input'), - description: - 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator - comparator: { - type: CodeScalar, - description: - "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", - }, - _comparator: { - type: require('./element.input'), - description: - "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", - }, - unit: { - type: GraphQLString, - description: 'A human-readable form of the unit.', - }, - _unit: { - type: require('./element.input'), - description: 'A human-readable form of the unit.', - }, - system: { - type: UriScalar, - description: - 'The identification of the system that provides the coded form of the unit.', - }, - _system: { - type: require('./element.input'), - description: - 'The identification of the system that provides the coded form of the unit.', - }, - code: { - type: CodeScalar, - description: - 'A computer processable form of the unit in some unit representation system.', - }, - _code: { - type: require('./element.input'), - description: - 'A computer processable form of the unit in some unit representation system.', - }, - }), + description: 'Base StructureDefinition for Quantity Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/questionnaire.input.js b/src/resources/1_0_2/inputs/questionnaire.input.js index 18dea2f9..4fdeb7d8 100644 --- a/src/resources/1_0_2/inputs/questionnaire.input.js +++ b/src/resources/1_0_2/inputs/questionnaire.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 QuestionnaireResourceInputType = new GraphQLEnumType({ - name: 'QuestionnaireResourceInputType', - values: { - Questionnaire: { value: 'Questionnaire' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,75 +16,132 @@ let QuestionnaireResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Questionnaire_Input', - description: 'Base StructureDefinition for Questionnaire Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(QuestionnaireResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - version: { - type: GraphQLString, - description: - 'The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.', - }, - _version: { - type: require('./element.input'), - description: - 'The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The lifecycle status of the questionnaire as a whole.', - }, - _status: { - type: require('./element.input'), - description: 'The lifecycle status of the questionnaire as a whole.', - }, - date: { - type: DateTimeScalar, - description: 'The date that this questionnaire was last changed.', - }, - _date: { - type: require('./element.input'), - description: 'The date that this questionnaire was last changed.', - }, - publisher: { - type: GraphQLString, - description: - 'Organization or person responsible for developing and maintaining the questionnaire.', - }, - _publisher: { - type: require('./element.input'), - description: - 'Organization or person responsible for developing and maintaining the questionnaire.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - subjectType: { - type: new GraphQLList(CodeScalar), - description: - 'Identifies the types of subjects that can be the subject of the questionnaire.', - }, - _subjectType: { - type: require('./element.input'), - description: - 'Identifies the types of subjects that can be the subject of the questionnaire.', - }, - group: { - type: new GraphQLNonNull(require('./questionnairegroup.input')), - description: - 'A collection of related questions (or further groupings of questions).', - }, - }), + description: 'Base StructureDefinition for Questionnaire Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Questionnaire_Enum_input', + values: { Questionnaire: { value: 'Questionnaire' } }, + }), + ), + 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: + 'This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.', + }, + version: { + type: GraphQLString, + description: + 'The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.', + }, + _status: { + type: require('./element.input.js'), + description: 'The lifecycle status of the questionnaire as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The lifecycle status of the questionnaire as a whole.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date that this questionnaire was last changed.', + }, + date: { + type: DateTimeScalar, + description: 'The date that this questionnaire was last changed.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'Organization or person responsible for developing and maintaining the questionnaire.', + }, + publisher: { + type: GraphQLString, + description: + 'Organization or person responsible for developing and maintaining the questionnaire.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _subjectType: { + type: require('./element.input.js'), + description: + 'Identifies the types of subjects that can be the subject of the questionnaire.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + subjectType: { + type: new GraphQLList(CodeScalar), + description: + 'Identifies the types of subjects that can be the subject of the questionnaire.', + }, + group: { + type: new GraphQLNonNull(require('./questionnairegroup.input.js')), + description: + 'A collection of related questions (or further groupings of questions).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/questionnairegroup.input.js b/src/resources/1_0_2/inputs/questionnairegroup.input.js index f2bdd5cc..0cc43bd3 100644 --- a/src/resources/1_0_2/inputs/questionnairegroup.input.js +++ b/src/resources/1_0_2/inputs/questionnairegroup.input.js @@ -1,83 +1,97 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Questionnaire.group Input Schema + * @summary Questionnairegroup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireGroup_Input', - description: - 'A collection of related questions (or further groupings of questions).', - fields: () => - extendSchema(require('./backboneelement.input'), { - linkId: { - type: GraphQLString, - description: - 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.input'), - description: - 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.', - }, - title: { - type: GraphQLString, - description: - 'The human-readable name for this section of the questionnaire.', - }, - _title: { - type: require('./element.input'), - description: - 'The human-readable name for this section of the questionnaire.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions - concept: { - type: new GraphQLList(require('./coding.input')), - description: - 'Identifies a how this group of questions is known in a particular terminology such as LOINC.', - }, - text: { - type: GraphQLString, - description: - 'Additional text for the group, used for display purposes.', - }, - _text: { - type: require('./element.input'), - description: - 'Additional text for the group, used for display purposes.', - }, - required: { - type: GraphQLBoolean, - description: - 'If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.', - }, - _required: { - type: require('./element.input'), - description: - 'If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.', - }, - repeats: { - type: GraphQLBoolean, - description: - 'Whether the group may occur multiple times in the instance, containing multiple sets of answers.', - }, - _repeats: { - type: require('./element.input'), - description: - 'Whether the group may occur multiple times in the instance, containing multiple sets of answers.', - }, - question: { - type: new GraphQLList(require('./questionnairegroupquestion.input')), - description: - 'Set of questions within this group. The order of questions within the group is relevant.', - }, - }), + name: 'Questionnairegroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.', + }, + linkId: { + type: GraphQLString, + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.', + }, + _title: { + type: require('./element.input.js'), + description: + 'The human-readable name for this section of the questionnaire.', + }, + title: { + type: GraphQLString, + description: + 'The human-readable name for this section of the questionnaire.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions + concept: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Identifies a how this group of questions is known in a particular terminology such as LOINC.', + }, + _text: { + type: require('./element.input.js'), + description: 'Additional text for the group, used for display purposes.', + }, + text: { + type: GraphQLString, + description: 'Additional text for the group, used for display purposes.', + }, + _required: { + type: require('./element.input.js'), + description: + 'If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.', + }, + required: { + type: GraphQLBoolean, + description: + 'If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.', + }, + _repeats: { + type: require('./element.input.js'), + description: + 'Whether the group may occur multiple times in the instance, containing multiple sets of answers.', + }, + repeats: { + type: GraphQLBoolean, + description: + 'Whether the group may occur multiple times in the instance, containing multiple sets of answers.', + }, + question: { + type: new GraphQLList(require('./questionnairegroupquestion.input.js')), + description: + 'Set of questions within this group. The order of questions within the group is relevant.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/questionnairegroupquestion.input.js b/src/resources/1_0_2/inputs/questionnairegroupquestion.input.js index 5204b351..add7bf1e 100644 --- a/src/resources/1_0_2/inputs/questionnairegroupquestion.input.js +++ b/src/resources/1_0_2/inputs/questionnairegroupquestion.input.js @@ -1,89 +1,105 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Questionnaire.group.question Input Schema + * @summary Questionnairegroupquestion Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireGroupQuestion_Input', - description: - 'Set of questions within this group. The order of questions within the group is relevant.', - fields: () => - extendSchema(require('./backboneelement.input'), { - linkId: { - type: GraphQLString, - description: - 'An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.', - }, - _linkId: { - type: require('./element.input'), - description: - 'An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions - concept: { - type: new GraphQLList(require('./coding.input')), - description: - 'Identifies a how this question is known in a particular terminology such as LOINC.', - }, - text: { - type: GraphQLString, - description: - 'The actual question as shown to the user to prompt them for an answer.', - }, - _text: { - type: require('./element.input'), - description: - 'The actual question as shown to the user to prompt them for an answer.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/answer-format - type: { - type: CodeScalar, - description: - 'The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.', - }, - _type: { - type: require('./element.input'), - description: - 'The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.', - }, - required: { - type: GraphQLBoolean, - description: - 'If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.', - }, - _required: { - type: require('./element.input'), - description: - 'If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.', - }, - repeats: { - type: GraphQLBoolean, - description: 'If true, the question may have more than one answer.', - }, - _repeats: { - type: require('./element.input'), - description: 'If true, the question may have more than one answer.', - }, - options: { - type: require('./reference.input'), - description: - 'Reference to a value set containing a list of codes representing permitted answers for the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - option: { - type: new GraphQLList(require('./coding.input')), - description: - "For a 'choice' question, identifies one of the permitted answers for the question.", - }, - }), + name: 'Questionnairegroupquestion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.', + }, + linkId: { + type: GraphQLString, + description: + 'An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions + concept: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Identifies a how this question is known in a particular terminology such as LOINC.', + }, + _text: { + type: require('./element.input.js'), + description: + 'The actual question as shown to the user to prompt them for an answer.', + }, + text: { + type: GraphQLString, + description: + 'The actual question as shown to the user to prompt them for an answer.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/answer-format + type: { + type: CodeScalar, + description: + 'The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.', + }, + _required: { + type: require('./element.input.js'), + description: + 'If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.', + }, + required: { + type: GraphQLBoolean, + description: + 'If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.', + }, + _repeats: { + type: require('./element.input.js'), + description: 'If true, the question may have more than one answer.', + }, + repeats: { + type: GraphQLBoolean, + description: 'If true, the question may have more than one answer.', + }, + options: { + type: GraphQLString, + description: + 'Reference to a value set containing a list of codes representing permitted answers for the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + option: { + type: new GraphQLList(require('./coding.input.js')), + description: + "For a 'choice' question, identifies one of the permitted answers for the question.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/questionnaireresponse.input.js b/src/resources/1_0_2/inputs/questionnaireresponse.input.js index f6c44923..41c0dce5 100644 --- a/src/resources/1_0_2/inputs/questionnaireresponse.input.js +++ b/src/resources/1_0_2/inputs/questionnaireresponse.input.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let QuestionnaireResponseResourceInputType = new GraphQLEnumType({ - name: 'QuestionnaireResponseResourceInputType', - values: { - QuestionnaireResponse: { value: 'QuestionnaireResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,67 +16,124 @@ let QuestionnaireResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'QuestionnaireResponse_Input', - description: 'Base StructureDefinition for QuestionnaireResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(QuestionnaireResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', - }, - questionnaire: { - type: require('./reference.input'), - description: - 'Indicates the Questionnaire resource that defines the form for which answers are being provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The lifecycle status of the questionnaire response as a whole.', - }, - _status: { - type: require('./element.input'), - description: - 'The lifecycle status of the questionnaire response as a whole.', - }, - subject: { - type: require('./reference.input'), - description: - 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', - }, - author: { - type: require('./reference.input'), - description: - 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', - }, - authored: { - type: DateTimeScalar, - description: - 'The date and/or time that this version of the questionnaire response was authored.', - }, - _authored: { - type: require('./element.input'), - description: - 'The date and/or time that this version of the questionnaire response was authored.', - }, - source: { - type: require('./reference.input'), - description: 'The person who answered the questions about the subject.', - }, - encounter: { - type: require('./reference.input'), - description: - 'Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.', - }, - group: { - type: require('./questionnaireresponsegroup.input'), - description: - 'A group of questions to a possibly similarly grouped set of questions in the questionnaire response.', - }, - }), + description: 'Base StructureDefinition for QuestionnaireResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'QuestionnaireResponse_Enum_input', + values: { QuestionnaireResponse: { value: 'QuestionnaireResponse' } }, + }), + ), + 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: require('./identifier.input.js'), + description: + 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', + }, + questionnaire: { + type: GraphQLString, + description: + 'Indicates the Questionnaire resource that defines the form for which answers are being provided.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The lifecycle status of the questionnaire response as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The lifecycle status of the questionnaire response as a whole.', + }, + subject: { + type: GraphQLString, + description: + 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', + }, + author: { + type: GraphQLString, + description: + 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', + }, + _authored: { + type: require('./element.input.js'), + description: + 'The date and/or time that this version of the questionnaire response was authored.', + }, + authored: { + type: DateTimeScalar, + description: + 'The date and/or time that this version of the questionnaire response was authored.', + }, + source: { + type: GraphQLString, + description: 'The person who answered the questions about the subject.', + }, + encounter: { + type: GraphQLString, + description: + 'Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.', + }, + group: { + type: require('./questionnaireresponsegroup.input.js'), + description: + 'A group of questions to a possibly similarly grouped set of questions in the questionnaire response.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/questionnaireresponsegroup.input.js b/src/resources/1_0_2/inputs/questionnaireresponsegroup.input.js index 574fbcf0..6e6e3e58 100644 --- a/src/resources/1_0_2/inputs/questionnaireresponsegroup.input.js +++ b/src/resources/1_0_2/inputs/questionnaireresponsegroup.input.js @@ -1,61 +1,75 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.group Input Schema + * @summary QuestionnaireResponsegroup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireResponseGroup_Input', - description: - 'A group of questions to a possibly similarly grouped set of questions in the questionnaire response.', - fields: () => - extendSchema(require('./backboneelement.input'), { - linkId: { - type: GraphQLString, - description: - 'Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.input'), - description: - 'Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.', - }, - title: { - type: GraphQLString, - description: 'Text that is displayed above the contents of the group.', - }, - _title: { - type: require('./element.input'), - description: 'Text that is displayed above the contents of the group.', - }, - text: { - type: GraphQLString, - description: - 'Additional text for the group, used for display purposes.', - }, - _text: { - type: require('./element.input'), - description: - 'Additional text for the group, used for display purposes.', - }, - subject: { - type: require('./reference.input'), - description: - "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", - }, - question: { - type: new GraphQLList( - require('./questionnaireresponsegroupquestion.input'), - ), - description: - 'Set of questions within this group. The order of questions within the group is relevant.', - }, - }), + name: 'QuestionnaireResponsegroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.', + }, + linkId: { + type: GraphQLString, + description: + 'Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.', + }, + _title: { + type: require('./element.input.js'), + description: 'Text that is displayed above the contents of the group.', + }, + title: { + type: GraphQLString, + description: 'Text that is displayed above the contents of the group.', + }, + _text: { + type: require('./element.input.js'), + description: 'Additional text for the group, used for display purposes.', + }, + text: { + type: GraphQLString, + description: 'Additional text for the group, used for display purposes.', + }, + subject: { + type: GraphQLString, + description: + "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", + }, + question: { + type: new GraphQLList( + require('./questionnaireresponsegroupquestion.input.js'), + ), + description: + 'Set of questions within this group. The order of questions within the group is relevant.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/questionnaireresponsegroupquestion.input.js b/src/resources/1_0_2/inputs/questionnaireresponsegroupquestion.input.js index 6b30294d..15c3232f 100644 --- a/src/resources/1_0_2/inputs/questionnaireresponsegroupquestion.input.js +++ b/src/resources/1_0_2/inputs/questionnaireresponsegroupquestion.input.js @@ -1,47 +1,63 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.group.question Input Schema + * @summary QuestionnaireResponsegroupquestion Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireResponseGroupQuestion_Input', - description: - 'Set of questions within this group. The order of questions within the group is relevant.', - fields: () => - extendSchema(require('./backboneelement.input'), { - linkId: { - type: GraphQLString, - description: - 'Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.input'), - description: - 'Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.', - }, - text: { - type: GraphQLString, - description: - 'The actual question as shown to the user to prompt them for an answer.', - }, - _text: { - type: require('./element.input'), - description: - 'The actual question as shown to the user to prompt them for an answer.', - }, - answer: { - type: new GraphQLList( - require('./questionnaireresponsegroupquestionanswer.input'), - ), - description: "The respondent's answer(s) to the question.", - }, - }), + name: 'QuestionnaireResponsegroupquestion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.', + }, + linkId: { + type: GraphQLString, + description: + 'Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.', + }, + _text: { + type: require('./element.input.js'), + description: + 'The actual question as shown to the user to prompt them for an answer.', + }, + text: { + type: GraphQLString, + description: + 'The actual question as shown to the user to prompt them for an answer.', + }, + answer: { + type: new GraphQLList( + require('./questionnaireresponsegroupquestionanswer.input.js'), + ), + description: "The respondent's answer(s) to the question.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/questionnaireresponsegroupquestionanswer.input.js b/src/resources/1_0_2/inputs/questionnaireresponsegroupquestionanswer.input.js index 04cd5a76..4c3ed60b 100644 --- a/src/resources/1_0_2/inputs/questionnaireresponsegroupquestionanswer.input.js +++ b/src/resources/1_0_2/inputs/questionnaireresponsegroupquestionanswer.input.js @@ -1,137 +1,155 @@ -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLBoolean, GraphQLFloat, GraphQLInt, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.group.question.answer Input Schema + * @summary QuestionnaireResponsegroupquestionanswer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireResponseGroupQuestionAnswer_Input', - description: "The respondent's answer(s) to the question.", - fields: () => - extendSchema(require('./backboneelement.input'), { - valueBoolean: { - type: GraphQLBoolean, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueBoolean: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueDecimal: { - type: GraphQLFloat, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDecimal: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueInteger: { - type: GraphQLInt, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueInteger: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueDate: { - type: DateScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDate: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueInstant: { - type: InstantScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueInstant: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueTime: { - type: TimeScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueTime: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueString: { - type: GraphQLString, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueString: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueUri: { - type: UriScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueUri: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueCoding: { - type: require('./coding.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueReference: { - type: require('./reference.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - }), + name: 'QuestionnaireResponsegroupquestionanswer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueInteger: { + type: GraphQLInt, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDate: { + type: DateScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueInstant: { + type: InstantScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueTime: { + type: TimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueString: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueUri: { + type: UriScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueCoding: { + type: require('./coding.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueReference: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/range.input.js b/src/resources/1_0_2/inputs/range.input.js index 5c15cf9c..4f878919 100644 --- a/src/resources/1_0_2/inputs/range.input.js +++ b/src/resources/1_0_2/inputs/range.input.js @@ -1,7 +1,5 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -9,16 +7,30 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Range_Input', - description: 'Base StructureDefinition for Range Type.', - fields: () => - extendSchema(require('./element.input'), { - low: { - type: require('./quantity.input'), - description: 'The low limit. The boundary is inclusive.', - }, - high: { - type: require('./quantity.input'), - description: 'The high limit. The boundary is inclusive.', - }, - }), + description: 'Base StructureDefinition for Range Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + low: { + type: require('./quantity.input.js'), + description: 'The low limit. The boundary is inclusive.', + }, + high: { + type: require('./quantity.input.js'), + description: 'The high limit. The boundary is inclusive.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/ratio.input.js b/src/resources/1_0_2/inputs/ratio.input.js index 2698a2c1..065190ea 100644 --- a/src/resources/1_0_2/inputs/ratio.input.js +++ b/src/resources/1_0_2/inputs/ratio.input.js @@ -1,7 +1,5 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -9,16 +7,30 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Ratio_Input', - description: 'Base StructureDefinition for Ratio Type.', - fields: () => - extendSchema(require('./element.input'), { - numerator: { - type: require('./quantity.input'), - description: 'The value of the numerator.', - }, - denominator: { - type: require('./quantity.input'), - description: 'The value of the denominator.', - }, - }), + description: 'Base StructureDefinition for Ratio Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + numerator: { + type: require('./quantity.input.js'), + description: 'The value of the numerator.', + }, + denominator: { + type: require('./quantity.input.js'), + description: 'The value of the denominator.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/reference.input.js b/src/resources/1_0_2/inputs/reference.input.js index a56608da..8d713458 100644 --- a/src/resources/1_0_2/inputs/reference.input.js +++ b/src/resources/1_0_2/inputs/reference.input.js @@ -1,7 +1,9 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -9,28 +11,42 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Reference_Input', - description: 'Base StructureDefinition for Reference Type.', - fields: () => - extendSchema(require('./element.input'), { - reference: { - type: GraphQLString, - description: - "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", - }, - _reference: { - type: require('./element.input'), - description: - "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", - }, - display: { - type: GraphQLString, - description: - 'Plain text narrative that identifies the resource in addition to the resource reference.', - }, - _display: { - type: require('./element.input'), - description: - 'Plain text narrative that identifies the resource in addition to the resource reference.', - }, - }), + description: 'Base StructureDefinition for Reference Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _reference: { + type: require('./element.input.js'), + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + reference: { + type: GraphQLString, + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + _display: { + type: require('./element.input.js'), + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + display: { + type: GraphQLString, + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/referralrequest.input.js b/src/resources/1_0_2/inputs/referralrequest.input.js index fff6c4a4..05bde5ca 100644 --- a/src/resources/1_0_2/inputs/referralrequest.input.js +++ b/src/resources/1_0_2/inputs/referralrequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ReferralRequestResourceInputType = new GraphQLEnumType({ - name: 'ReferralRequestResourceInputType', - values: { - ReferralRequest: { value: 'ReferralRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,116 +16,173 @@ let ReferralRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ReferralRequest_Input', - description: 'Base StructureDefinition for ReferralRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ReferralRequestResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referralstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The workflow status of the referral or transfer of care request.', - }, - _status: { - type: require('./element.input'), - description: - 'The workflow status of the referral or transfer of care request.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Business identifier that uniquely identifies the referral/care transfer request instance.', - }, - date: { - type: DateTimeScalar, - description: - 'Date/DateTime of creation for draft requests and date of activation for active requests.', - }, - _date: { - type: require('./element.input'), - description: - 'Date/DateTime of creation for draft requests and date of activation for active requests.', - }, - type: { - type: require('./codeableconcept.input'), - description: - 'An indication of the type of referral (or where applicable the type of transfer of care) request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty - specialty: { - type: require('./codeableconcept.input'), - description: - 'Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority - priority: { - type: require('./codeableconcept.input'), - description: - 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', - }, - patient: { - type: require('./reference.input'), - description: - 'The patient who is the subject of a referral or transfer of care request.', - }, - requester: { - type: require('./reference.input'), - description: - 'The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The encounter at which the request for referral or transfer of care is initiated.', - }, - dateSent: { - type: DateTimeScalar, - description: - 'Date/DateTime the request for referral or transfer of care is sent by the author.', - }, - _dateSent: { - type: require('./element.input'), - description: - 'Date/DateTime the request for referral or transfer of care is sent by the author.', - }, - reason: { - type: require('./codeableconcept.input'), - description: - 'Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.', - }, - description: { - type: GraphQLString, - description: - 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', - }, - _description: { - type: require('./element.input'), - description: - 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - serviceRequested: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', - }, - fulfillmentTime: { - type: require('./period.input'), - description: - 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', - }, - }), + description: 'Base StructureDefinition for ReferralRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ReferralRequest_Enum_input', + values: { ReferralRequest: { value: 'ReferralRequest' } }, + }), + ), + 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.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The workflow status of the referral or transfer of care request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referralstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The workflow status of the referral or transfer of care request.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifier that uniquely identifies the referral/care transfer request instance.', + }, + _date: { + type: require('./element.input.js'), + description: + 'Date/DateTime of creation for draft requests and date of activation for active requests.', + }, + date: { + type: DateTimeScalar, + description: + 'Date/DateTime of creation for draft requests and date of activation for active requests.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'An indication of the type of referral (or where applicable the type of transfer of care) request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty + specialty: { + type: require('./codeableconcept.input.js'), + description: + 'Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority + priority: { + type: require('./codeableconcept.input.js'), + description: + 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', + }, + patient: { + type: GraphQLString, + description: + 'The patient who is the subject of a referral or transfer of care request.', + }, + requester: { + type: GraphQLString, + description: + 'The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', + }, + encounter: { + type: GraphQLString, + description: + 'The encounter at which the request for referral or transfer of care is initiated.', + }, + _dateSent: { + type: require('./element.input.js'), + description: + 'Date/DateTime the request for referral or transfer of care is sent by the author.', + }, + dateSent: { + type: DateTimeScalar, + description: + 'Date/DateTime the request for referral or transfer of care is sent by the author.', + }, + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', + }, + description: { + type: GraphQLString, + description: + 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + serviceRequested: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', + }, + fulfillmentTime: { + type: require('./period.input.js'), + description: + 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/relatedperson.input.js b/src/resources/1_0_2/inputs/relatedperson.input.js index b3dd0cc5..07a83e52 100644 --- a/src/resources/1_0_2/inputs/relatedperson.input.js +++ b/src/resources/1_0_2/inputs/relatedperson.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.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 RelatedPersonResourceInputType = new GraphQLEnumType({ - name: 'RelatedPersonResourceInputType', - values: { - RelatedPerson: { value: 'RelatedPerson' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,68 +16,125 @@ let RelatedPersonResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'RelatedPerson_Input', - description: 'Base StructureDefinition for RelatedPerson Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(RelatedPersonResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier for a person within a particular scope.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient this person is related to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype - relationship: { - type: require('./codeableconcept.input'), - description: - 'The nature of the relationship between a patient and the related person.', - }, - name: { - type: require('./humanname.input'), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date on which the related person was born.', - }, - _birthDate: { - type: require('./element.input'), - description: 'The date on which the related person was born.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: - 'Address where the related person can be contacted or visited.', - }, - photo: { - type: new GraphQLList(require('./attachment.input')), - description: 'Image of the person.', - }, - period: { - type: require('./period.input'), - description: - 'The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.', - }, - }), + description: 'Base StructureDefinition for RelatedPerson Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RelatedPerson_Enum_input', + values: { RelatedPerson: { value: 'RelatedPerson' } }, + }), + ), + 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: 'Identifier for a person within a particular scope.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient this person is related to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype + relationship: { + type: require('./codeableconcept.input.js'), + description: + 'The nature of the relationship between a patient and the related person.', + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date on which the related person was born.', + }, + birthDate: { + type: DateScalar, + description: 'The date on which the related person was born.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: + 'Address where the related person can be contacted or visited.', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the person.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/resource.input.js b/src/resources/1_0_2/inputs/resource.input.js index 8a9df033..55a470ff 100644 --- a/src/resources/1_0_2/inputs/resource.input.js +++ b/src/resources/1_0_2/inputs/resource.input.js @@ -1,22 +1,11 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ResourceResourceInputType = new GraphQLEnumType({ - name: 'ResourceResourceInputType', - values: { - Resource: { value: 'Resource' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -24,45 +13,49 @@ let ResourceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Resource_Input', - description: 'Base StructureDefinition for Resource Resource.', - fields: () => - extendSchema({ - resourceType: { - type: new GraphQLNonNull(ResourceResourceInputType), - description: 'Type of this resource.', - }, - id: { - type: IdScalar, - description: - 'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.', - }, - _id: { - type: require('./element.input'), - 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'), - 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: 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.', - }, - _implicitRules: { - type: require('./element.input'), - 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: CodeScalar, - description: 'The base language in which the resource is written.', - }, - _language: { - type: require('./element.input'), - description: 'The base language in which the resource is written.', - }, - }), + description: 'Base StructureDefinition for Resource Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Resource_Enum_input', + values: { Resource: { value: 'Resource' } }, + }), + ), + 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.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/riskassessment.input.js b/src/resources/1_0_2/inputs/riskassessment.input.js index bf178c2c..2a51a5dc 100644 --- a/src/resources/1_0_2/inputs/riskassessment.input.js +++ b/src/resources/1_0_2/inputs/riskassessment.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 RiskAssessmentResourceInputType = new GraphQLEnumType({ - name: 'RiskAssessmentResourceInputType', - values: { - RiskAssessment: { value: 'RiskAssessment' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,68 +16,125 @@ let RiskAssessmentResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'RiskAssessment_Input', - description: 'Base StructureDefinition for RiskAssessment Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(RiskAssessmentResourceInputType), - description: 'Type of this resource.', - }, - subject: { - type: require('./reference.input'), - description: 'The patient or group the risk assessment applies to.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - condition: { - type: require('./reference.input'), - description: - 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', - }, - encounter: { - type: require('./reference.input'), - description: 'The encounter where the assessment was performed.', - }, - performer: { - type: require('./reference.input'), - description: - 'The provider or software application that performed the assessment.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Business identifier assigned to the risk assessment.', - }, - method: { - type: require('./codeableconcept.input'), - description: - 'The algorithm, process or mechanism used to evaluate the risk.', - }, - basis: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', - }, - prediction: { - type: new GraphQLList(require('./riskassessmentprediction.input')), - description: 'Describes the expected outcome for the subject.', - }, - mitigation: { - type: GraphQLString, - description: - 'A description of the steps that might be taken to reduce the identified risk(s).', - }, - _mitigation: { - type: require('./element.input'), - description: - 'A description of the steps that might be taken to reduce the identified risk(s).', - }, - }), + description: 'Base StructureDefinition for RiskAssessment Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RiskAssessment_Enum_input', + values: { RiskAssessment: { value: 'RiskAssessment' } }, + }), + ), + 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.', + }, + subject: { + type: GraphQLString, + description: 'The patient or group the risk assessment applies to.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + condition: { + type: GraphQLString, + description: + 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', + }, + encounter: { + type: GraphQLString, + description: 'The encounter where the assessment was performed.', + }, + performer: { + type: GraphQLString, + description: + 'The provider or software application that performed the assessment.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Business identifier assigned to the risk assessment.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'The algorithm, process or mechanism used to evaluate the risk.', + }, + basis: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', + }, + prediction: { + type: new GraphQLList(require('./riskassessmentprediction.input.js')), + description: 'Describes the expected outcome for the subject.', + }, + _mitigation: { + type: require('./element.input.js'), + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + mitigation: { + type: GraphQLString, + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/riskassessmentprediction.input.js b/src/resources/1_0_2/inputs/riskassessmentprediction.input.js index c4a66d97..bbf2ff19 100644 --- a/src/resources/1_0_2/inputs/riskassessmentprediction.input.js +++ b/src/resources/1_0_2/inputs/riskassessmentprediction.input.js @@ -1,75 +1,93 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary RiskAssessment.prediction Input Schema + * @summary RiskAssessmentprediction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'RiskAssessmentPrediction_Input', - description: 'Describes the expected outcome for the subject.', - fields: () => - extendSchema(require('./backboneelement.input'), { - outcome: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/risk-probability - probabilityDecimal: { - type: GraphQLFloat, - description: 'How likely is the outcome (in the specified timeframe).', - }, - _probabilityDecimal: { - type: require('./element.input'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/risk-probability - probabilityRange: { - type: require('./range.input'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/risk-probability - probabilityCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - relativeRisk: { - type: GraphQLFloat, - description: - 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', - }, - _relativeRisk: { - type: require('./element.input'), - description: - 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', - }, - whenPeriod: { - type: require('./period.input'), - description: - 'Indicates the period of time or age range of the subject to which the specified probability applies.', - }, - whenRange: { - type: require('./range.input'), - description: - 'Indicates the period of time or age range of the subject to which the specified probability applies.', - }, - rationale: { - type: GraphQLString, - description: - 'Additional information explaining the basis for the prediction.', - }, - _rationale: { - type: require('./element.input'), - description: - 'Additional information explaining the basis for the prediction.', - }, - }), + name: 'RiskAssessmentprediction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + outcome: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', + }, + _probabilityDecimal: { + type: require('./element.input.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/risk-probability + probabilityDecimal: { + type: GraphQLFloat, + description: 'How likely is the outcome (in the specified timeframe).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/risk-probability + probabilityRange: { + type: require('./range.input.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/risk-probability + probabilityCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + _relativeRisk: { + type: require('./element.input.js'), + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + relativeRisk: { + type: GraphQLFloat, + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + whenPeriod: { + type: require('./period.input.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + whenRange: { + type: require('./range.input.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + _rationale: { + type: require('./element.input.js'), + description: + 'Additional information explaining the basis for the prediction.', + }, + rationale: { + type: GraphQLString, + description: + 'Additional information explaining the basis for the prediction.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/sampleddata.input.js b/src/resources/1_0_2/inputs/sampleddata.input.js index 0d4096a3..c2bc7ebb 100644 --- a/src/resources/1_0_2/inputs/sampleddata.input.js +++ b/src/resources/1_0_2/inputs/sampleddata.input.js @@ -1,13 +1,12 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -15,73 +14,87 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'SampledData_Input', - description: 'Base StructureDefinition for SampledData Type.', - fields: () => - extendSchema(require('./element.input'), { - origin: { - type: new GraphQLNonNull(require('./quantity.input')), - description: - 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', - }, - period: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'The length of time between sampling times, measured in milliseconds.', - }, - _period: { - type: require('./element.input'), - description: - 'The length of time between sampling times, measured in milliseconds.', - }, - factor: { - type: GraphQLFloat, - description: - 'A correction factor that is applied to the sampled data points before they are added to the origin.', - }, - _factor: { - type: require('./element.input'), - description: - 'A correction factor that is applied to the sampled data points before they are added to the origin.', - }, - lowerLimit: { - type: GraphQLFloat, - description: - "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", - }, - _lowerLimit: { - type: require('./element.input'), - description: - "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", - }, - upperLimit: { - type: GraphQLFloat, - description: - "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", - }, - _upperLimit: { - type: require('./element.input'), - description: - "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", - }, - dimensions: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', - }, - _dimensions: { - type: require('./element.input'), - description: - 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', - }, - data: { - type: new GraphQLNonNull(GraphQLString), - description: - "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", - }, - _data: { - type: require('./element.input'), - description: - "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", - }, - }), + description: 'Base StructureDefinition for SampledData Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + origin: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', + }, + _period: { + type: require('./element.input.js'), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + period: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + factor: { + type: GraphQLFloat, + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + _lowerLimit: { + type: require('./element.input.js'), + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + lowerLimit: { + type: GraphQLFloat, + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + _upperLimit: { + type: require('./element.input.js'), + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + upperLimit: { + type: GraphQLFloat, + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + _dimensions: { + type: require('./element.input.js'), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + dimensions: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + _data: { + type: require('./element.input.js'), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + data: { + type: new GraphQLNonNull(GraphQLString), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/schedule.input.js b/src/resources/1_0_2/inputs/schedule.input.js index ad403a20..0c5aa92f 100644 --- a/src/resources/1_0_2/inputs/schedule.input.js +++ b/src/resources/1_0_2/inputs/schedule.input.js @@ -1,20 +1,13 @@ 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 ScheduleResourceInputType = new GraphQLEnumType({ - name: 'ScheduleResourceInputType', - values: { - Schedule: { value: 'Schedule' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,42 +15,99 @@ let ScheduleResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Schedule_Input', - description: 'Base StructureDefinition for Schedule Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ScheduleResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'External Ids for this item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The schedule type can be used for the categorization of healthcare services or other appointment types.', - }, - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.', - }, - planningHorizon: { - type: require('./period.input'), - description: - "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", - }, - comment: { - type: GraphQLString, - description: - 'Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.', - }, - _comment: { - type: require('./element.input'), - description: - 'Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.', - }, - }), + description: 'Base StructureDefinition for Schedule Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Schedule_Enum_input', + values: { Schedule: { value: 'Schedule' } }, + }), + ), + 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: 'External Ids for this item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The schedule type can be used for the categorization of healthcare services or other appointment types.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.', + }, + planningHorizon: { + type: require('./period.input.js'), + description: + "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/searchparameter.input.js b/src/resources/1_0_2/inputs/searchparameter.input.js index ebca4d98..e0026ab6 100644 --- a/src/resources/1_0_2/inputs/searchparameter.input.js +++ b/src/resources/1_0_2/inputs/searchparameter.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SearchParameterResourceInputType = new GraphQLEnumType({ - name: 'SearchParameterResourceInputType', - values: { - SearchParameter: { value: 'SearchParameter' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,156 +17,213 @@ let SearchParameterResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'SearchParameter_Input', - description: 'Base StructureDefinition for SearchParameter Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SearchParameterResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the search parameter.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name identifying the search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: CodeScalar, - description: 'The status of this search parameter definition.', - }, - _status: { - type: require('./element.input'), - description: 'The status of this search parameter definition.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the search parameter.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the search parameter.', - }, - contact: { - type: new GraphQLList(require('./searchparametercontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', - }, - requirements: { - type: GraphQLString, - description: - 'The Scope and Usage that this search parameter was created to meet.', - }, - _requirements: { - type: require('./element.input'), - description: - 'The Scope and Usage that this search parameter was created to meet.', - }, - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', - }, - _code: { - type: require('./element.input'), - description: - 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - base: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The base resource type that this search parameter refers to.', - }, - _base: { - type: require('./element.input'), - description: - 'The base resource type that this search parameter refers to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - _type: { - type: require('./element.input'), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - description: { - type: new GraphQLNonNull(GraphQLString), - description: 'A description of the search parameters and how it used.', - }, - _description: { - type: require('./element.input'), - description: 'A description of the search parameters and how it used.', - }, - xpath: { - type: GraphQLString, - description: - 'An XPath expression that returns a set of elements for the search parameter.', - }, - _xpath: { - type: require('./element.input'), - description: - 'An XPath expression that returns a set of elements for the search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-xpath-usage - xpathUsage: { - type: CodeScalar, - description: - 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', - }, - _xpathUsage: { - type: require('./element.input'), - description: - 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - target: { - type: new GraphQLList(CodeScalar), - description: 'Types of resource (if a resource is referenced).', - }, - _target: { - type: require('./element.input'), - description: 'Types of resource (if a resource is referenced).', - }, - }), + description: 'Base StructureDefinition for SearchParameter Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SearchParameter_Enum_input', + values: { SearchParameter: { value: 'SearchParameter' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name identifying the search parameter.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the search parameter.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this search parameter definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: CodeScalar, + description: 'The status of this search parameter definition.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the search parameter.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the search parameter.', + }, + contact: { + type: new GraphQLList(require('./searchparametercontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + _requirements: { + type: require('./element.input.js'), + description: + 'The Scope and Usage that this search parameter was created to meet.', + }, + requirements: { + type: GraphQLString, + description: + 'The Scope and Usage that this search parameter was created to meet.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + _base: { + type: require('./element.input.js'), + description: + 'The base resource type that this search parameter refers to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + base: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The base resource type that this search parameter refers to.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _description: { + type: require('./element.input.js'), + description: 'A description of the search parameters and how it used.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of the search parameters and how it used.', + }, + _xpath: { + type: require('./element.input.js'), + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + _xpathUsage: { + type: require('./element.input.js'), + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-xpath-usage + xpathUsage: { + type: CodeScalar, + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + _target: { + type: require('./element.input.js'), + description: 'Types of resource (if a resource is referenced).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + target: { + type: new GraphQLList(CodeScalar), + description: 'Types of resource (if a resource is referenced).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/searchparametercontact.input.js b/src/resources/1_0_2/inputs/searchparametercontact.input.js index 7a994e26..86a3b347 100644 --- a/src/resources/1_0_2/inputs/searchparametercontact.input.js +++ b/src/resources/1_0_2/inputs/searchparametercontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary SearchParameter.contact Input Schema + * @summary SearchParametercontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SearchParameterContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the search parameter.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the search parameter.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'SearchParametercontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the search parameter.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the search parameter.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/signature.input.js b/src/resources/1_0_2/inputs/signature.input.js index 01f7fa5a..0295e3de 100644 --- a/src/resources/1_0_2/inputs/signature.input.js +++ b/src/resources/1_0_2/inputs/signature.input.js @@ -1,15 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports @@ -17,55 +16,69 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Signature_Input', - description: 'Base StructureDefinition for Signature Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/signature-type - type: { - type: new GraphQLList(new GraphQLNonNull(require('./coding.input'))), - description: - 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', - }, - when: { - type: new GraphQLNonNull(InstantScalar), - description: 'When the digital signature was signed.', - }, - _when: { - type: require('./element.input'), - description: 'When the digital signature was signed.', - }, - whoUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', - }, - _whoUri: { - type: require('./element.input'), - description: - 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', - }, - whoReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', - }, - contentType: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.', - }, - _contentType: { - type: require('./element.input'), - description: - 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.', - }, - blob: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The base64 encoding of the Signature content.', - }, - _blob: { - type: require('./element.input'), - description: 'The base64 encoding of the Signature content.', - }, - }), + description: 'Base StructureDefinition for Signature Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/signature-type + type: { + type: new GraphQLList(new GraphQLNonNull(require('./coding.input.js'))), + description: + 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', + }, + _when: { + type: require('./element.input.js'), + description: 'When the digital signature was signed.', + }, + when: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the digital signature was signed.', + }, + _whoUri: { + type: require('./element.input.js'), + description: + 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', + }, + whoUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', + }, + whoReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', + }, + _contentType: { + type: require('./element.input.js'), + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.', + }, + contentType: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.', + }, + _blob: { + type: require('./element.input.js'), + description: 'The base64 encoding of the Signature content.', + }, + blob: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The base64 encoding of the Signature content.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/simplequantity.input.js b/src/resources/1_0_2/inputs/simplequantity.input.js index 48024b08..844250ef 100644 --- a/src/resources/1_0_2/inputs/simplequantity.input.js +++ b/src/resources/1_0_2/inputs/simplequantity.input.js @@ -1,14 +1,11 @@ const { GraphQLInputObjectType } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary SimpleQuantity Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'SimpleQuantity_Input', - description: 'A fixed quantity (no comparator).', - fields: () => extendSchema(require('./quantity.input')), + description: 'A fixed quantity (no comparator)', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/inputs/slot.input.js b/src/resources/1_0_2/inputs/slot.input.js index ddef95a5..8a40277f 100644 --- a/src/resources/1_0_2/inputs/slot.input.js +++ b/src/resources/1_0_2/inputs/slot.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SlotResourceInputType = new GraphQLEnumType({ - name: 'SlotResourceInputType', - values: { - Slot: { value: 'Slot' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -25,72 +17,129 @@ let SlotResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Slot_Input', - description: 'Base StructureDefinition for Slot Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SlotResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'External Ids for this item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - type: { - type: require('./codeableconcept.input'), - description: - 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', - }, - schedule: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The schedule resource that this slot defines an interval of status information.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/slotstatus - freeBusyType: { - type: new GraphQLNonNull(CodeScalar), - description: 'busy | free | busy-unavailable | busy-tentative.', - }, - _freeBusyType: { - type: require('./element.input'), - description: 'busy | free | busy-unavailable | busy-tentative.', - }, - start: { - type: new GraphQLNonNull(InstantScalar), - description: 'Date/Time that the slot is to begin.', - }, - _start: { - type: require('./element.input'), - description: 'Date/Time that the slot is to begin.', - }, - end: { - type: new GraphQLNonNull(InstantScalar), - description: 'Date/Time that the slot is to conclude.', - }, - _end: { - type: require('./element.input'), - description: 'Date/Time that the slot is to conclude.', - }, - overbooked: { - type: GraphQLBoolean, - description: - 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', - }, - _overbooked: { - type: require('./element.input'), - description: - 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', - }, - comment: { - type: GraphQLString, - description: - 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', - }, - _comment: { - type: require('./element.input'), - description: - 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', - }, - }), + description: 'Base StructureDefinition for Slot Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Slot_Enum_input', + values: { Slot: { value: 'Slot' } }, + }), + ), + 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: 'External Ids for this item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', + }, + schedule: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The schedule resource that this slot defines an interval of status information.', + }, + _freeBusyType: { + type: require('./element.input.js'), + description: 'busy | free | busy-unavailable | busy-tentative.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/slotstatus + freeBusyType: { + type: new GraphQLNonNull(CodeScalar), + description: 'busy | free | busy-unavailable | busy-tentative.', + }, + _start: { + type: require('./element.input.js'), + description: 'Date/Time that the slot is to begin.', + }, + start: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to begin.', + }, + _end: { + type: require('./element.input.js'), + description: 'Date/Time that the slot is to conclude.', + }, + end: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to conclude.', + }, + _overbooked: { + type: require('./element.input.js'), + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + overbooked: { + type: GraphQLBoolean, + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/specimen.input.js b/src/resources/1_0_2/inputs/specimen.input.js index 5bd1d2cf..d326f7ce 100644 --- a/src/resources/1_0_2/inputs/specimen.input.js +++ b/src/resources/1_0_2/inputs/specimen.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 SpecimenResourceInputType = new GraphQLEnumType({ - name: 'SpecimenResourceInputType', - values: { - Specimen: { value: 'Specimen' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,69 +16,124 @@ let SpecimenResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Specimen_Input', - description: 'Base StructureDefinition for Specimen Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SpecimenResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Id for specimen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-status - status: { - type: CodeScalar, - description: 'The availability of the specimen.', - }, - _status: { - type: require('./element.input'), - description: 'The availability of the specimen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0487 - type: { - type: require('./codeableconcept.input'), - description: 'The kind of material that forms the specimen.', - }, - parent: { - type: new GraphQLList(require('./reference.input')), - description: - 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', - }, - accessionIdentifier: { - type: require('./identifier.input'), - description: - 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', - }, - receivedTime: { - type: DateTimeScalar, - description: - 'Time when specimen was received for processing or testing.', - }, - _receivedTime: { - type: require('./element.input'), - description: - 'Time when specimen was received for processing or testing.', - }, - collection: { - type: require('./specimencollection.input'), - description: 'Details concerning the specimen collection.', - }, - treatment: { - type: new GraphQLList(require('./specimentreatment.input')), - description: - 'Details concerning treatment and processing steps for the specimen.', - }, - container: { - type: new GraphQLList(require('./specimencontainer.input')), - description: - 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', - }, - }), + description: 'Base StructureDefinition for Specimen Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Specimen_Enum_input', + values: { Specimen: { value: 'Specimen' } }, + }), + ), + 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: 'Id for specimen.', + }, + _status: { + type: require('./element.input.js'), + description: 'The availability of the specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-status + status: { + type: CodeScalar, + description: 'The availability of the specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0487 + type: { + type: require('./codeableconcept.input.js'), + description: 'The kind of material that forms the specimen.', + }, + parent: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', + }, + accessionIdentifier: { + type: require('./identifier.input.js'), + description: + 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', + }, + _receivedTime: { + type: require('./element.input.js'), + description: 'Time when specimen was received for processing or testing.', + }, + receivedTime: { + type: DateTimeScalar, + description: 'Time when specimen was received for processing or testing.', + }, + collection: { + type: require('./specimencollection.input.js'), + description: 'Details concerning the specimen collection.', + }, + treatment: { + type: new GraphQLList(require('./specimentreatment.input.js')), + description: + 'Details concerning treatment and processing steps for the specimen.', + }, + container: { + type: new GraphQLList(require('./specimencontainer.input.js')), + description: + 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/specimencollection.input.js b/src/resources/1_0_2/inputs/specimencollection.input.js index bddff17f..8c6dec75 100644 --- a/src/resources/1_0_2/inputs/specimencollection.input.js +++ b/src/resources/1_0_2/inputs/specimencollection.input.js @@ -1,67 +1,84 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, GraphQLList, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Specimen.collection Input Schema + * @summary Specimencollection Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SpecimenCollection_Input', - description: 'Details concerning the specimen collection.', - fields: () => - extendSchema(require('./backboneelement.input'), { - collector: { - type: require('./reference.input'), - description: 'Person who collected the specimen.', - }, - comment: { - type: new GraphQLList(GraphQLString), - description: - 'To communicate any details or issues encountered during the specimen collection procedure.', - }, - _comment: { - type: require('./element.input'), - description: - 'To communicate any details or issues encountered during the specimen collection procedure.', - }, - collectedDateTime: { - type: DateTimeScalar, - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - _collectedDateTime: { - type: require('./element.input'), - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - collectedPeriod: { - type: require('./period.input'), - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-collection-method - method: { - type: require('./codeableconcept.input'), - description: - 'A coded value specifying the technique that is used to perform the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.input'), - description: - 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', - }, - }), + name: 'Specimencollection_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + collector: { + type: GraphQLString, + description: 'Person who collected the specimen.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'To communicate any details or issues encountered during the specimen collection procedure.', + }, + comment: { + type: new GraphQLList(GraphQLString), + description: + 'To communicate any details or issues encountered during the specimen collection procedure.', + }, + _collectedDateTime: { + type: require('./element.input.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedDateTime: { + type: DateTimeScalar, + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedPeriod: { + type: require('./period.input.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-collection-method + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value specifying the technique that is used to perform the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.input.js'), + description: + 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/specimencontainer.input.js b/src/resources/1_0_2/inputs/specimencontainer.input.js index 1fa84663..3b95e9c4 100644 --- a/src/resources/1_0_2/inputs/specimencontainer.input.js +++ b/src/resources/1_0_2/inputs/specimencontainer.input.js @@ -1,62 +1,78 @@ const { - GraphQLInputObjectType, GraphQLList, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Specimen.container Input Schema + * @summary Specimencontainer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SpecimenContainer_Input', - description: - 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", - }, - description: { - type: GraphQLString, - description: 'Textual description of the container.', - }, - _description: { - type: require('./element.input'), - description: 'Textual description of the container.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-container-type - type: { - type: require('./codeableconcept.input'), - description: - 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', - }, - capacity: { - type: require('./quantity.input'), - description: - 'The capacity (volume or other measure) the container may contain.', - }, - specimenQuantity: { - type: require('./quantity.input'), - description: - 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 - additiveCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 - additiveReference: { - type: require('./reference.input'), - description: - 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', - }, - }), + name: 'Specimencontainer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: + "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", + }, + _description: { + type: require('./element.input.js'), + description: 'Textual description of the container.', + }, + description: { + type: GraphQLString, + description: 'Textual description of the container.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-container-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', + }, + capacity: { + type: require('./quantity.input.js'), + description: + 'The capacity (volume or other measure) the container may contain.', + }, + specimenQuantity: { + type: require('./quantity.input.js'), + description: + 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 + additiveCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 + additiveReference: { + type: GraphQLString, + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/specimentreatment.input.js b/src/resources/1_0_2/inputs/specimentreatment.input.js index 86d44ccc..eec5f5db 100644 --- a/src/resources/1_0_2/inputs/specimentreatment.input.js +++ b/src/resources/1_0_2/inputs/specimentreatment.input.js @@ -1,39 +1,55 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Specimen.treatment Input Schema + * @summary Specimentreatment Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SpecimenTreatment_Input', - description: - 'Details concerning treatment and processing steps for the specimen.', - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: GraphQLString, - description: 'Textual description of procedure.', - }, - _description: { - type: require('./element.input'), - description: 'Textual description of procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-treatment-procedure - procedure: { - type: require('./codeableconcept.input'), - description: - 'A coded value specifying the procedure used to process the specimen.', - }, - additive: { - type: new GraphQLList(require('./reference.input')), - description: 'Material used in the processing step.', - }, - }), + name: 'Specimentreatment_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: 'Textual description of procedure.', + }, + description: { + type: GraphQLString, + description: 'Textual description of procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-treatment-procedure + procedure: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value specifying the procedure used to process the specimen.', + }, + additive: { + type: new GraphQLList(GraphQLString), + description: 'Material used in the processing step.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/structuredefinition.input.js b/src/resources/1_0_2/inputs/structuredefinition.input.js index 71bd4505..170b25d3 100644 --- a/src/resources/1_0_2/inputs/structuredefinition.input.js +++ b/src/resources/1_0_2/inputs/structuredefinition.input.js @@ -1,25 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let StructureDefinitionResourceInputType = new GraphQLEnumType({ - name: 'StructureDefinitionResourceInputType', - values: { - StructureDefinition: { value: 'StructureDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,230 +17,287 @@ let StructureDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'StructureDefinition_Input', - description: 'Base StructureDefinition for StructureDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(StructureDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - "Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the StructureDefinition.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name identifying the StructureDefinition.', - }, - display: { - type: GraphQLString, - description: - 'Defined so that applications can use this name when displaying the value of the extension to the user.', - }, - _display: { - type: require('./element.input'), - description: - 'Defined so that applications can use this name when displaying the value of the extension to the user.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the StructureDefinition.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the StructureDefinition.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the structure definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the structure definition.', - }, - contact: { - type: new GraphQLList(require('./structuredefinitioncontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the StructureDefinition and its use.', - }, - _description: { - type: require('./element.input'), - description: - 'A free text natural language description of the StructureDefinition and its use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.', - }, - requirements: { - type: GraphQLString, - description: - "Explains why this structure definition is needed and why it's been constrained as it has.", - }, - _requirements: { - type: require('./element.input'), - description: - "Explains why this structure definition is needed and why it's been constrained as it has.", - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/profile-code - code: { - type: new GraphQLList(require('./coding.input')), - description: - 'A set of terms from external terminologies that may be used to assist with indexing and searching of templates.', - }, - fhirVersion: { - type: IdScalar, - description: - 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', - }, - _fhirVersion: { - type: require('./element.input'), - description: - 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', - }, - mapping: { - type: new GraphQLList(require('./structuredefinitionmapping.input')), - description: 'An external specification that the content is mapped to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/structure-definition-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Defines the kind of structure that this definition is describing.', - }, - _kind: { - type: require('./element.input'), - description: - 'Defines the kind of structure that this definition is describing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - constrainedType: { - type: CodeScalar, - description: - 'The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.', - }, - _constrainedType: { - type: require('./element.input'), - description: - 'The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.', - }, - abstract: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.', - }, - _abstract: { - type: require('./element.input'), - description: - 'Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/extension-context - contextType: { - type: CodeScalar, - description: - 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', - }, - _contextType: { - type: require('./element.input'), - description: - 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', - }, - context: { - type: new GraphQLList(GraphQLString), - description: - 'Identifies the types of resource or data type elements to which the extension can be applied.', - }, - _context: { - type: require('./element.input'), - description: - 'Identifies the types of resource or data type elements to which the extension can be applied.', - }, - base: { - type: UriScalar, - description: - 'An absolute URI that is the base structure from which this set of constraints is derived.', - }, - _base: { - type: require('./element.input'), - description: - 'An absolute URI that is the base structure from which this set of constraints is derived.', - }, - snapshot: { - type: require('./structuredefinitionsnapshot.input'), - description: - 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', - }, - differential: { - type: require('./structuredefinitiondifferential.input'), - description: - 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', - }, - }), + description: 'Base StructureDefinition for StructureDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureDefinition_Enum_input', + values: { StructureDefinition: { value: 'StructureDefinition' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + "Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name identifying the StructureDefinition.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the StructureDefinition.', + }, + _display: { + type: require('./element.input.js'), + description: + 'Defined so that applications can use this name when displaying the value of the extension to the user.', + }, + display: { + type: GraphQLString, + description: + 'Defined so that applications can use this name when displaying the value of the extension to the user.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the StructureDefinition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the StructureDefinition.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the structure definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the structure definition.', + }, + contact: { + type: new GraphQLList(require('./structuredefinitioncontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A free text natural language description of the StructureDefinition and its use.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the StructureDefinition and its use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.', + }, + _requirements: { + type: require('./element.input.js'), + description: + "Explains why this structure definition is needed and why it's been constrained as it has.", + }, + requirements: { + type: GraphQLString, + description: + "Explains why this structure definition is needed and why it's been constrained as it has.", + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/profile-code + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A set of terms from external terminologies that may be used to assist with indexing and searching of templates.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', + }, + fhirVersion: { + type: IdScalar, + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', + }, + mapping: { + type: new GraphQLList(require('./structuredefinitionmapping.input.js')), + description: 'An external specification that the content is mapped to.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'Defines the kind of structure that this definition is describing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/structure-definition-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines the kind of structure that this definition is describing.', + }, + _constrainedType: { + type: require('./element.input.js'), + description: + 'The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + constrainedType: { + type: CodeScalar, + description: + 'The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.', + }, + _abstract: { + type: require('./element.input.js'), + description: + 'Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.', + }, + abstract: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.', + }, + _contextType: { + type: require('./element.input.js'), + description: + 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/extension-context + contextType: { + type: CodeScalar, + description: + 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', + }, + _context: { + type: require('./element.input.js'), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + context: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + _base: { + type: require('./element.input.js'), + description: + 'An absolute URI that is the base structure from which this set of constraints is derived.', + }, + base: { + type: UriScalar, + description: + 'An absolute URI that is the base structure from which this set of constraints is derived.', + }, + snapshot: { + type: require('./structuredefinitionsnapshot.input.js'), + description: + 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', + }, + differential: { + type: require('./structuredefinitiondifferential.input.js'), + description: + 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/structuredefinitioncontact.input.js b/src/resources/1_0_2/inputs/structuredefinitioncontact.input.js index 621992f5..93a6457b 100644 --- a/src/resources/1_0_2/inputs/structuredefinitioncontact.input.js +++ b/src/resources/1_0_2/inputs/structuredefinitioncontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureDefinition.contact Input Schema + * @summary StructureDefinitioncontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureDefinitionContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the structure definition.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the structure definition.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'StructureDefinitioncontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the structure definition.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the structure definition.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/structuredefinitiondifferential.input.js b/src/resources/1_0_2/inputs/structuredefinitiondifferential.input.js index 306f2cf7..8c741c9f 100644 --- a/src/resources/1_0_2/inputs/structuredefinitiondifferential.input.js +++ b/src/resources/1_0_2/inputs/structuredefinitiondifferential.input.js @@ -1,28 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureDefinition.differential Input Schema + * @summary StructureDefinitiondifferential Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureDefinitionDifferential_Input', - description: - 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', - fields: () => - extendSchema(require('./backboneelement.input'), { - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.input')), - ), - description: - 'Captures constraints on each element within the resource.', - }, - }), + name: 'StructureDefinitiondifferential_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.input.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/structuredefinitionmapping.input.js b/src/resources/1_0_2/inputs/structuredefinitionmapping.input.js index d5b1b661..e2c78d25 100644 --- a/src/resources/1_0_2/inputs/structuredefinitionmapping.input.js +++ b/src/resources/1_0_2/inputs/structuredefinitionmapping.input.js @@ -1,60 +1,77 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary StructureDefinition.mapping Input Schema + * @summary StructureDefinitionmapping Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureDefinitionMapping_Input', - description: 'An external specification that the content is mapped to.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: - 'An Internal id that is used to identify this mapping set when specific mappings are made.', - }, - _identity: { - type: require('./element.input'), - description: - 'An Internal id that is used to identify this mapping set when specific mappings are made.', - }, - uri: { - type: UriScalar, - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - _uri: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - name: { - type: GraphQLString, - description: 'A name for the specification that is being mapped to.', - }, - _name: { - type: require('./element.input'), - description: 'A name for the specification that is being mapped to.', - }, - comments: { - type: GraphQLString, - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - _comments: { - type: require('./element.input'), - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - }), + name: 'StructureDefinitionmapping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _identity: { + type: require('./element.input.js'), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comments: { + type: require('./element.input.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comments: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/structuredefinitionsnapshot.input.js b/src/resources/1_0_2/inputs/structuredefinitionsnapshot.input.js index 111edb05..5bdc20d1 100644 --- a/src/resources/1_0_2/inputs/structuredefinitionsnapshot.input.js +++ b/src/resources/1_0_2/inputs/structuredefinitionsnapshot.input.js @@ -1,28 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureDefinition.snapshot Input Schema + * @summary StructureDefinitionsnapshot Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureDefinitionSnapshot_Input', - description: - 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', - fields: () => - extendSchema(require('./backboneelement.input'), { - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.input')), - ), - description: - 'Captures constraints on each element within the resource.', - }, - }), + name: 'StructureDefinitionsnapshot_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.input.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/subscription.input.js b/src/resources/1_0_2/inputs/subscription.input.js index 237df09b..15ce1ba1 100644 --- a/src/resources/1_0_2/inputs/subscription.input.js +++ b/src/resources/1_0_2/inputs/subscription.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.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 SubscriptionResourceInputType = new GraphQLEnumType({ - name: 'SubscriptionResourceInputType', - values: { - Subscription: { value: 'Subscription' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,75 +16,132 @@ let SubscriptionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Subscription_Input', - description: 'Base StructureDefinition for Subscription Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SubscriptionResourceInputType), - description: 'Type of this resource.', - }, - criteria: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The rules that the server should use to determine when to generate notifications for this subscription.', - }, - _criteria: { - type: require('./element.input'), - description: - 'The rules that the server should use to determine when to generate notifications for this subscription.', - }, - contact: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', - }, - reason: { - type: new GraphQLNonNull(GraphQLString), - description: 'A description of why this subscription is defined.', - }, - _reason: { - type: require('./element.input'), - description: 'A description of why this subscription is defined.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the subscription, which marks the server state for managing the subscription.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of the subscription, which marks the server state for managing the subscription.', - }, - error: { - type: GraphQLString, - description: - 'A record of the last error that occurred when the server processed a notification.', - }, - _error: { - type: require('./element.input'), - description: - 'A record of the last error that occurred when the server processed a notification.', - }, - channel: { - type: new GraphQLNonNull(require('./subscriptionchannel.input')), - description: - 'Details where to send notifications when resources are received that meet the criteria.', - }, - end: { - type: InstantScalar, - description: 'The time for the server to turn the subscription off.', - }, - _end: { - type: require('./element.input'), - description: 'The time for the server to turn the subscription off.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-tag - tag: { - type: new GraphQLList(require('./coding.input')), - description: - 'A tag to add to any resource that matches the criteria, after the subscription is processed.', - }, - }), + description: 'Base StructureDefinition for Subscription Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Subscription_Enum_input', + values: { Subscription: { value: 'Subscription' } }, + }), + ), + 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.', + }, + _criteria: { + type: require('./element.input.js'), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + criteria: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + _reason: { + type: require('./element.input.js'), + description: 'A description of why this subscription is defined.', + }, + reason: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of why this subscription is defined.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + _error: { + type: require('./element.input.js'), + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + error: { + type: GraphQLString, + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + channel: { + type: new GraphQLNonNull(require('./subscriptionchannel.input.js')), + description: + 'Details where to send notifications when resources are received that meet the criteria.', + }, + _end: { + type: require('./element.input.js'), + description: 'The time for the server to turn the subscription off.', + }, + end: { + type: InstantScalar, + description: 'The time for the server to turn the subscription off.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-tag + tag: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A tag to add to any resource that matches the criteria, after the subscription is processed.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/subscriptionchannel.input.js b/src/resources/1_0_2/inputs/subscriptionchannel.input.js index d8671e06..da8dc154 100644 --- a/src/resources/1_0_2/inputs/subscriptionchannel.input.js +++ b/src/resources/1_0_2/inputs/subscriptionchannel.input.js @@ -1,62 +1,79 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Subscription.channel Input Schema + * @summary Subscriptionchannel Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SubscriptionChannel_Input', - description: - 'Details where to send notifications when resources are received that meet the criteria.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-channel-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of channel to send notifications on.', - }, - _type: { - type: require('./element.input'), - description: 'The type of channel to send notifications on.', - }, - endpoint: { - type: UriScalar, - description: - 'The uri that describes the actual end-point to send messages to.', - }, - _endpoint: { - type: require('./element.input'), - description: - 'The uri that describes the actual end-point to send messages to.', - }, - payload: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.', - }, - _payload: { - type: require('./element.input'), - description: - 'The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.', - }, - header: { - type: GraphQLString, - description: - 'Additional headers / information to send as part of the notification.', - }, - _header: { - type: require('./element.input'), - description: - 'Additional headers / information to send as part of the notification.', - }, - }), + name: 'Subscriptionchannel_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of channel to send notifications on.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-channel-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of channel to send notifications on.', + }, + _endpoint: { + type: require('./element.input.js'), + description: + 'The uri that describes the actual end-point to send messages to.', + }, + endpoint: { + type: UriScalar, + description: + 'The uri that describes the actual end-point to send messages to.', + }, + _payload: { + type: require('./element.input.js'), + description: + 'The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.', + }, + payload: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.', + }, + _header: { + type: require('./element.input.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: GraphQLString, + description: + 'Additional headers / information to send as part of the notification.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/substance.input.js b/src/resources/1_0_2/inputs/substance.input.js index f8aef0ff..59d614db 100644 --- a/src/resources/1_0_2/inputs/substance.input.js +++ b/src/resources/1_0_2/inputs/substance.input.js @@ -1,20 +1,13 @@ 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 SubstanceResourceInputType = new GraphQLEnumType({ - name: 'SubstanceResourceInputType', - values: { - Substance: { value: 'Substance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,46 +15,103 @@ let SubstanceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Substance_Input', - description: 'Base StructureDefinition for Substance Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SubstanceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Unique identifier for the substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'A code (or set of codes) that identify this substance.', - }, - description: { - type: GraphQLString, - description: - 'A description of the substance - its appearance, handling requirements, and other usage notes.', - }, - _description: { - type: require('./element.input'), - description: - 'A description of the substance - its appearance, handling requirements, and other usage notes.', - }, - instance: { - type: new GraphQLList(require('./substanceinstance.input')), - description: - 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', - }, - ingredient: { - type: new GraphQLList(require('./substanceingredient.input')), - description: 'A substance can be composed of other substances.', - }, - }), + description: 'Base StructureDefinition for Substance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Substance_Enum_input', + values: { Substance: { value: 'Substance' } }, + }), + ), + 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 for the substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code (or set of codes) that identify this substance.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + description: { + type: GraphQLString, + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + instance: { + type: new GraphQLList(require('./substanceinstance.input.js')), + description: + 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', + }, + ingredient: { + type: new GraphQLList(require('./substanceingredient.input.js')), + description: 'A substance can be composed of other substances.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/substanceingredient.input.js b/src/resources/1_0_2/inputs/substanceingredient.input.js index 2dac0aec..83a61b4f 100644 --- a/src/resources/1_0_2/inputs/substanceingredient.input.js +++ b/src/resources/1_0_2/inputs/substanceingredient.input.js @@ -1,25 +1,47 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Substance.ingredient Input Schema + * @summary Substanceingredient Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SubstanceIngredient_Input', - description: 'A substance can be composed of other substances.', - fields: () => - extendSchema(require('./backboneelement.input'), { - quantity: { - type: require('./ratio.input'), - description: - 'The amount of the ingredient in the substance - a concentration ratio.', - }, - substance: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Another substance that is a component of this substance.', - }, - }), + name: 'Substanceingredient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + quantity: { + type: require('./ratio.input.js'), + description: + 'The amount of the ingredient in the substance - a concentration ratio.', + }, + substance: { + type: new GraphQLNonNull(GraphQLString), + description: 'Another substance that is a component of this substance.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/substanceinstance.input.js b/src/resources/1_0_2/inputs/substanceinstance.input.js index 4efecac1..501a7361 100644 --- a/src/resources/1_0_2/inputs/substanceinstance.input.js +++ b/src/resources/1_0_2/inputs/substanceinstance.input.js @@ -1,37 +1,53 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Substance.instance Input Schema + * @summary Substanceinstance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SubstanceInstance_Input', - description: - 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Identifier associated with the package/container (usually a label affixed directly).', - }, - expiry: { - type: DateTimeScalar, - description: - 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', - }, - _expiry: { - type: require('./element.input'), - description: - 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The amount of the substance.', - }, - }), + name: 'Substanceinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'Identifier associated with the package/container (usually a label affixed directly).', + }, + _expiry: { + type: require('./element.input.js'), + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + expiry: { + type: DateTimeScalar, + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount of the substance.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/supplydelivery.input.js b/src/resources/1_0_2/inputs/supplydelivery.input.js index c1f7362a..3923f7ef 100644 --- a/src/resources/1_0_2/inputs/supplydelivery.input.js +++ b/src/resources/1_0_2/inputs/supplydelivery.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 SupplyDeliveryResourceInputType = new GraphQLEnumType({ - name: 'SupplyDeliveryResourceInputType', - values: { - SupplyDelivery: { value: 'SupplyDelivery' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,75 +16,132 @@ let SupplyDeliveryResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'SupplyDelivery_Input', - description: 'Base StructureDefinition for SupplyDelivery Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SupplyDeliveryResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Identifier assigned by the dispensing facility when the item(s) is dispensed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-status - status: { - type: CodeScalar, - description: 'A code specifying the state of the dispense event.', - }, - _status: { - type: require('./element.input'), - description: 'A code specifying the state of the dispense event.', - }, - patient: { - type: require('./reference.input'), - description: - 'A link to a resource representing the person whom the delivered item is for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-type - type: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The amount of supply that has been dispensed. Includes unit of measure.', - }, - suppliedItem: { - type: require('./reference.input'), - description: - 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.', - }, - supplier: { - type: require('./reference.input'), - description: - 'The individual responsible for dispensing the medication, supplier or device.', - }, - whenPrepared: { - type: require('./period.input'), - description: 'The time the dispense event occurred.', - }, - time: { - type: DateTimeScalar, - description: - 'The time the dispensed item was sent or handed to the patient (or agent).', - }, - _time: { - type: require('./element.input'), - description: - 'The time the dispensed item was sent or handed to the patient (or agent).', - }, - destination: { - type: require('./reference.input'), - description: - 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', - }, - receiver: { - type: new GraphQLList(require('./reference.input')), - description: 'Identifies the person who picked up the Supply.', - }, - }), + description: 'Base StructureDefinition for SupplyDelivery Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyDelivery_Enum_input', + values: { SupplyDelivery: { value: 'SupplyDelivery' } }, + }), + ), + 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: require('./identifier.input.js'), + description: + 'Identifier assigned by the dispensing facility when the item(s) is dispensed.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code specifying the state of the dispense event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-status + status: { + type: CodeScalar, + description: 'A code specifying the state of the dispense event.', + }, + patient: { + type: GraphQLString, + description: + 'A link to a resource representing the person whom the delivered item is for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The amount of supply that has been dispensed. Includes unit of measure.', + }, + suppliedItem: { + type: GraphQLString, + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.', + }, + supplier: { + type: GraphQLString, + description: + 'The individual responsible for dispensing the medication, supplier or device.', + }, + whenPrepared: { + type: require('./period.input.js'), + description: 'The time the dispense event occurred.', + }, + _time: { + type: require('./element.input.js'), + description: + 'The time the dispensed item was sent or handed to the patient (or agent).', + }, + time: { + type: DateTimeScalar, + description: + 'The time the dispensed item was sent or handed to the patient (or agent).', + }, + destination: { + type: GraphQLString, + description: + 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList(GraphQLString), + description: 'Identifies the person who picked up the Supply.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/supplyrequest.input.js b/src/resources/1_0_2/inputs/supplyrequest.input.js index 9bf01169..06b66124 100644 --- a/src/resources/1_0_2/inputs/supplyrequest.input.js +++ b/src/resources/1_0_2/inputs/supplyrequest.input.js @@ -1,22 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -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 SupplyRequestResourceInputType = new GraphQLEnumType({ - name: 'SupplyRequestResourceInputType', - values: { - SupplyRequest: { value: 'SupplyRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,71 +16,128 @@ let SupplyRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'SupplyRequest_Input', - description: 'Base StructureDefinition for SupplyRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SupplyRequestResourceInputType), - description: 'Type of this resource.', - }, - patient: { - type: require('./reference.input'), - description: - 'A link to a resource representing the person whom the ordered item is for.', - }, - source: { - type: require('./reference.input'), - description: - 'The Practitioner , Organization or Patient who initiated this order for the supply.', - }, - date: { - type: DateTimeScalar, - description: 'When the request was made.', - }, - _date: { - type: require('./element.input'), - description: 'When the request was made.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Unique identifier for this supply request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-status - status: { - type: CodeScalar, - description: 'Status of the supply request.', - }, - _status: { - type: require('./element.input'), - description: 'Status of the supply request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-kind - kind: { - type: require('./codeableconcept.input'), - description: - 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', - }, - orderedItem: { - type: require('./reference.input'), - description: 'The item that is requested to be supplied.', - }, - supplier: { - type: new GraphQLList(require('./reference.input')), - description: 'Who is intended to fulfill the request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'Why the supply item was requested.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason - reasonReference: { - type: require('./reference.input'), - description: 'Why the supply item was requested.', - }, - when: { - type: require('./supplyrequestwhen.input'), - description: 'When the request should be fulfilled.', - }, - }), + description: 'Base StructureDefinition for SupplyRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyRequest_Enum_input', + values: { SupplyRequest: { value: 'SupplyRequest' } }, + }), + ), + 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.', + }, + patient: { + type: GraphQLString, + description: + 'A link to a resource representing the person whom the ordered item is for.', + }, + source: { + type: GraphQLString, + description: + 'The Practitioner , Organization or Patient who initiated this order for the supply.', + }, + _date: { + type: require('./element.input.js'), + description: 'When the request was made.', + }, + date: { + type: DateTimeScalar, + description: 'When the request was made.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Unique identifier for this supply request.', + }, + _status: { + type: require('./element.input.js'), + description: 'Status of the supply request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-status + status: { + type: CodeScalar, + description: 'Status of the supply request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-kind + kind: { + type: require('./codeableconcept.input.js'), + description: + 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', + }, + orderedItem: { + type: GraphQLString, + description: 'The item that is requested to be supplied.', + }, + supplier: { + type: new GraphQLList(GraphQLString), + description: 'Who is intended to fulfill the request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Why the supply item was requested.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason + reasonReference: { + type: GraphQLString, + description: 'Why the supply item was requested.', + }, + when: { + type: require('./supplyrequestwhen.input.js'), + description: 'When the request should be fulfilled.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/supplyrequestwhen.input.js b/src/resources/1_0_2/inputs/supplyrequestwhen.input.js index b43f0b80..d635af38 100644 --- a/src/resources/1_0_2/inputs/supplyrequestwhen.input.js +++ b/src/resources/1_0_2/inputs/supplyrequestwhen.input.js @@ -1,25 +1,42 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary SupplyRequest.when Input Schema + * @summary SupplyRequestwhen Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SupplyRequestWhen_Input', - description: 'When the request should be fulfilled.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-when - code: { - type: require('./codeableconcept.input'), - description: 'Code indicating when the request should be fulfilled.', - }, - schedule: { - type: require('./timing.input'), - description: 'Formal fulfillment schedule.', - }, - }), + name: 'SupplyRequestwhen_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-when + code: { + type: require('./codeableconcept.input.js'), + description: 'Code indicating when the request should be fulfilled.', + }, + schedule: { + type: require('./timing.input.js'), + description: 'Formal fulfillment schedule.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscript.input.js b/src/resources/1_0_2/inputs/testscript.input.js index 0eb5ede1..34571e1d 100644 --- a/src/resources/1_0_2/inputs/testscript.input.js +++ b/src/resources/1_0_2/inputs/testscript.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let TestScriptResourceInputType = new GraphQLEnumType({ - name: 'TestScriptResourceInputType', - values: { - TestScript: { value: 'TestScript' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,170 +17,227 @@ let TestScriptResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'TestScript_Input', - description: 'Base StructureDefinition for TestScript Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(TestScriptResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the TestScript.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name identifying the TestScript.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the TestScript.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the TestScript.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the Test Script.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the Test Script.', - }, - contact: { - type: new GraphQLList(require('./testscriptcontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.', - }, - _date: { - type: require('./element.input'), - description: - 'The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the TestScript and its use.', - }, - _description: { - type: require('./element.input'), - description: - 'A free text natural language description of the TestScript and its use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.', - }, - requirements: { - type: GraphQLString, - description: - "Explains why this Test Script is needed and why it's been constrained as it has.", - }, - _requirements: { - type: require('./element.input'), - description: - "Explains why this Test Script is needed and why it's been constrained as it has.", - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - metadata: { - type: require('./testscriptmetadata.input'), - description: - 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', - }, - multiserver: { - type: GraphQLBoolean, - description: - 'If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.', - }, - _multiserver: { - type: require('./element.input'), - description: - 'If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.', - }, - fixture: { - type: new GraphQLList(require('./testscriptfixture.input')), - description: - 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', - }, - profile: { - type: new GraphQLList(require('./reference.input')), - description: 'Reference to the profile to be used for validation.', - }, - variable: { - type: new GraphQLList(require('./testscriptvariable.input')), - description: - 'Variable is set based either on element value in response body or on header field value in the response headers.', - }, - setup: { - type: require('./testscriptsetup.input'), - description: - 'A series of required setup operations before tests are executed.', - }, - test: { - type: new GraphQLList(require('./testscripttest.input')), - description: 'A test in this script.', - }, - teardown: { - type: require('./testscriptteardown.input'), - description: - 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', - }, - }), + description: 'Base StructureDefinition for TestScript Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestScript_Enum_input', + values: { TestScript: { value: 'TestScript' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name identifying the TestScript.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the TestScript.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the TestScript.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the TestScript.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the Test Script.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the Test Script.', + }, + contact: { + type: new GraphQLList(require('./testscriptcontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A free text natural language description of the TestScript and its use.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the TestScript and its use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.', + }, + _requirements: { + type: require('./element.input.js'), + description: + "Explains why this Test Script is needed and why it's been constrained as it has.", + }, + requirements: { + type: GraphQLString, + description: + "Explains why this Test Script is needed and why it's been constrained as it has.", + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + metadata: { + type: require('./testscriptmetadata.input.js'), + description: + 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', + }, + _multiserver: { + type: require('./element.input.js'), + description: + 'If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.', + }, + multiserver: { + type: GraphQLBoolean, + description: + 'If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.', + }, + fixture: { + type: new GraphQLList(require('./testscriptfixture.input.js')), + description: + 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', + }, + profile: { + type: new GraphQLList(GraphQLString), + description: 'Reference to the profile to be used for validation.', + }, + variable: { + type: new GraphQLList(require('./testscriptvariable.input.js')), + description: + 'Variable is set based either on element value in response body or on header field value in the response headers.', + }, + setup: { + type: require('./testscriptsetup.input.js'), + description: + 'A series of required setup operations before tests are executed.', + }, + test: { + type: new GraphQLList(require('./testscripttest.input.js')), + description: 'A test in this script.', + }, + teardown: { + type: require('./testscriptteardown.input.js'), + description: + 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptcontact.input.js b/src/resources/1_0_2/inputs/testscriptcontact.input.js index d283ce6d..b181bde8 100644 --- a/src/resources/1_0_2/inputs/testscriptcontact.input.js +++ b/src/resources/1_0_2/inputs/testscriptcontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.contact Input Schema + * @summary TestScriptcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the Test Script.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the Test Script.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'TestScriptcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the Test Script.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the Test Script.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptfixture.input.js b/src/resources/1_0_2/inputs/testscriptfixture.input.js index 81fa7384..9fc0a459 100644 --- a/src/resources/1_0_2/inputs/testscriptfixture.input.js +++ b/src/resources/1_0_2/inputs/testscriptfixture.input.js @@ -1,42 +1,63 @@ -const { GraphQLInputObjectType, GraphQLBoolean } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLBoolean, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.fixture Input Schema + * @summary TestScriptfixture Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptFixture_Input', - description: - 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', - fields: () => - extendSchema(require('./backboneelement.input'), { - autocreate: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', - }, - _autocreate: { - type: require('./element.input'), - description: - 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', - }, - autodelete: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', - }, - _autodelete: { - type: require('./element.input'), - description: - 'Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', - }, - resource: { - type: require('./reference.input'), - description: - 'Reference to the resource (containing the contents of the resource needed for operations).', - }, - }), + name: 'TestScriptfixture_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _autocreate: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + autocreate: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + _autodelete: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + autodelete: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + resource: { + type: GraphQLString, + description: + 'Reference to the resource (containing the contents of the resource needed for operations).', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptmetadata.input.js b/src/resources/1_0_2/inputs/testscriptmetadata.input.js index 98149d45..b9e2e2c4 100644 --- a/src/resources/1_0_2/inputs/testscriptmetadata.input.js +++ b/src/resources/1_0_2/inputs/testscriptmetadata.input.js @@ -1,33 +1,49 @@ const { - GraphQLInputObjectType, GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.metadata Input Schema + * @summary TestScriptmetadata Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptMetadata_Input', - description: - 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', - fields: () => - extendSchema(require('./backboneelement.input'), { - link: { - type: new GraphQLList(require('./testscriptmetadatalink.input')), - description: - 'A link to the FHIR specification that this test is covering.', - }, - capability: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptmetadatacapability.input')), - ), - description: - 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', - }, - }), + name: 'TestScriptmetadata_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + link: { + type: new GraphQLList(require('./testscriptmetadatalink.input.js')), + description: + 'A link to the FHIR specification that this test is covering.', + }, + capability: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptmetadatacapability.input.js')), + ), + description: + 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptmetadatacapability.input.js b/src/resources/1_0_2/inputs/testscriptmetadatacapability.input.js index 7013b170..4045a203 100644 --- a/src/resources/1_0_2/inputs/testscriptmetadatacapability.input.js +++ b/src/resources/1_0_2/inputs/testscriptmetadatacapability.input.js @@ -1,78 +1,94 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLBoolean, GraphQLString, GraphQLInt, - GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestScript.metadata.capability Input Schema + * @summary TestScriptmetadatacapability Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptMetadataCapability_Input', - description: - 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', - fields: () => - extendSchema(require('./backboneelement.input'), { - required: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', - }, - _required: { - type: require('./element.input'), - description: - 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', - }, - validated: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', - }, - _validated: { - type: require('./element.input'), - description: - 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', - }, - description: { - type: GraphQLString, - description: - 'Description of the capabilities that this test script is requiring the server to support.', - }, - _description: { - type: require('./element.input'), - description: - 'Description of the capabilities that this test script is requiring the server to support.', - }, - destination: { - type: GraphQLInt, - description: 'Which server these requirements apply to.', - }, - _destination: { - type: require('./element.input'), - description: 'Which server these requirements apply to.', - }, - link: { - type: new GraphQLList(UriScalar), - description: - 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', - }, - _link: { - type: require('./element.input'), - description: - 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', - }, - conformance: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.', - }, - }), + name: 'TestScriptmetadatacapability_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _required: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + required: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + _validated: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + validated: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + description: { + type: GraphQLString, + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + _destination: { + type: require('./element.input.js'), + description: 'Which server these requirements apply to.', + }, + destination: { + type: GraphQLInt, + description: 'Which server these requirements apply to.', + }, + _link: { + type: require('./element.input.js'), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + link: { + type: new GraphQLList(UriScalar), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + conformance: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptmetadatalink.input.js b/src/resources/1_0_2/inputs/testscriptmetadatalink.input.js index 6e88d8a8..672902aa 100644 --- a/src/resources/1_0_2/inputs/testscriptmetadatalink.input.js +++ b/src/resources/1_0_2/inputs/testscriptmetadatalink.input.js @@ -1,39 +1,57 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestScript.metadata.link Input Schema + * @summary TestScriptmetadatalink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptMetadataLink_Input', - description: 'A link to the FHIR specification that this test is covering.', - fields: () => - extendSchema(require('./backboneelement.input'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'URL to a particular requirement or feature within the FHIR specification.', - }, - _url: { - type: require('./element.input'), - description: - 'URL to a particular requirement or feature within the FHIR specification.', - }, - description: { - type: GraphQLString, - description: 'Short description of the link.', - }, - _description: { - type: require('./element.input'), - description: 'Short description of the link.', - }, - }), + name: 'TestScriptmetadatalink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + _description: { + type: require('./element.input.js'), + description: 'Short description of the link.', + }, + description: { + type: GraphQLString, + description: 'Short description of the link.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptsetup.input.js b/src/resources/1_0_2/inputs/testscriptsetup.input.js index f3bacf9f..5f142688 100644 --- a/src/resources/1_0_2/inputs/testscriptsetup.input.js +++ b/src/resources/1_0_2/inputs/testscriptsetup.input.js @@ -1,28 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup Input Schema + * @summary TestScriptsetup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetup_Input', - description: - 'A series of required setup operations before tests are executed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptsetupaction.input')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestScriptsetup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptsetupaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptsetupaction.input.js b/src/resources/1_0_2/inputs/testscriptsetupaction.input.js index 71dc28c5..81d0afe5 100644 --- a/src/resources/1_0_2/inputs/testscriptsetupaction.input.js +++ b/src/resources/1_0_2/inputs/testscriptsetupaction.input.js @@ -1,25 +1,42 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action Input Schema + * @summary TestScriptsetupaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupAction_Input', - description: 'Action would contain either an operation or an assertion.', - fields: () => - extendSchema(require('./backboneelement.input'), { - operation: { - type: require('./testscriptsetupactionoperation.input'), - description: 'The operation to perform.', - }, - assert: { - type: require('./testscriptsetupactionassert.input'), - description: - 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', - }, - }), + name: 'TestScriptsetupaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + operation: { + type: require('./testscriptsetupactionoperation.input.js'), + description: 'The operation to perform.', + }, + assert: { + type: require('./testscriptsetupactionassert.input.js'), + description: + 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptsetupactionassert.input.js b/src/resources/1_0_2/inputs/testscriptsetupactionassert.input.js index 7bca18ce..5174ab5d 100644 --- a/src/resources/1_0_2/inputs/testscriptsetupactionassert.input.js +++ b/src/resources/1_0_2/inputs/testscriptsetupactionassert.input.js @@ -1,196 +1,212 @@ -const CodeScalar = require('../scalars/code.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert Input Schema + * @summary TestScriptsetupactionassert Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionAssert_Input', - description: - 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', - fields: () => - extendSchema(require('./backboneelement.input'), { - label: { - type: GraphQLString, - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - _label: { - type: require('./element.input'), - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.input'), - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-direction-codes - direction: { - type: CodeScalar, - description: 'The direction to use for the assertion.', - }, - _direction: { - type: require('./element.input'), - description: 'The direction to use for the assertion.', - }, - compareToSourceId: { - type: GraphQLString, - description: - "Id of fixture used to compare the 'sourceId/path' evaluations to.", - }, - _compareToSourceId: { - type: require('./element.input'), - description: - "Id of fixture used to compare the 'sourceId/path' evaluations to.", - }, - compareToSourcePath: { - type: GraphQLString, - description: - "XPath or JSONPath expression against fixture used to compare the 'sourceId/path' evaluations to.", - }, - _compareToSourcePath: { - type: require('./element.input'), - description: - "XPath or JSONPath expression against fixture used to compare the 'sourceId/path' evaluations to.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - contentType: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - _contentType: { - type: require('./element.input'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - headerField: { - type: GraphQLString, - description: "The HTTP header field name e.g. 'Location'.", - }, - _headerField: { - type: require('./element.input'), - description: "The HTTP header field name e.g. 'Location'.", - }, - minimumId: { - type: GraphQLString, - description: - 'The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.', - }, - _minimumId: { - type: require('./element.input'), - description: - 'The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.', - }, - navigationLinks: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution performs validation on the bundle navigation links.', - }, - _navigationLinks: { - type: require('./element.input'), - description: - 'Whether or not the test execution performs validation on the bundle navigation links.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-operator-codes - operator: { - type: CodeScalar, - description: 'The operator type.', - }, - _operator: { - type: require('./element.input'), - description: 'The operator type.', - }, - path: { - type: GraphQLString, - description: - 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', - }, - _path: { - type: require('./element.input'), - description: - 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - resource: { - type: CodeScalar, - description: - 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', - }, - _resource: { - type: require('./element.input'), - description: - 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-response-code-types - response: { - type: CodeScalar, - description: - 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', - }, - _response: { - type: require('./element.input'), - description: - 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', - }, - responseCode: { - type: GraphQLString, - description: 'The value of the HTTP response code to be tested.', - }, - _responseCode: { - type: require('./element.input'), - description: 'The value of the HTTP response code to be tested.', - }, - sourceId: { - type: IdScalar, - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', - }, - _sourceId: { - type: require('./element.input'), - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', - }, - validateProfileId: { - type: IdScalar, - description: 'The ID of the Profile to validate against.', - }, - _validateProfileId: { - type: require('./element.input'), - description: 'The ID of the Profile to validate against.', - }, - value: { - type: GraphQLString, - description: 'The value to compare to.', - }, - _value: { - type: require('./element.input'), - description: 'The value to compare to.', - }, - warningOnly: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will produce a warning only on error for this assert.', - }, - _warningOnly: { - type: require('./element.input'), - description: - 'Whether or not the test execution will produce a warning only on error for this assert.', - }, - }), + name: 'TestScriptsetupactionassert_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _label: { + type: require('./element.input.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _direction: { + type: require('./element.input.js'), + description: 'The direction to use for the assertion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-direction-codes + direction: { + type: CodeScalar, + description: 'The direction to use for the assertion.', + }, + _compareToSourceId: { + type: require('./element.input.js'), + description: + "Id of fixture used to compare the 'sourceId/path' evaluations to.", + }, + compareToSourceId: { + type: GraphQLString, + description: + "Id of fixture used to compare the 'sourceId/path' evaluations to.", + }, + _compareToSourcePath: { + type: require('./element.input.js'), + description: + "XPath or JSONPath expression against fixture used to compare the 'sourceId/path' evaluations to.", + }, + compareToSourcePath: { + type: GraphQLString, + description: + "XPath or JSONPath expression against fixture used to compare the 'sourceId/path' evaluations to.", + }, + _contentType: { + type: require('./element.input.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + contentType: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _headerField: { + type: require('./element.input.js'), + description: "The HTTP header field name e.g. 'Location'.", + }, + headerField: { + type: GraphQLString, + description: "The HTTP header field name e.g. 'Location'.", + }, + _minimumId: { + type: require('./element.input.js'), + description: + 'The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.', + }, + minimumId: { + type: GraphQLString, + description: + 'The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.', + }, + _navigationLinks: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + navigationLinks: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + _operator: { + type: require('./element.input.js'), + description: 'The operator type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-operator-codes + operator: { + type: CodeScalar, + description: 'The operator type.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + path: { + type: GraphQLString, + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + _resource: { + type: require('./element.input.js'), + description: + 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', + }, + _response: { + type: require('./element.input.js'), + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-response-code-types + response: { + type: CodeScalar, + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + _responseCode: { + type: require('./element.input.js'), + description: 'The value of the HTTP response code to be tested.', + }, + responseCode: { + type: GraphQLString, + description: 'The value of the HTTP response code to be tested.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + _validateProfileId: { + type: require('./element.input.js'), + description: 'The ID of the Profile to validate against.', + }, + validateProfileId: { + type: IdScalar, + description: 'The ID of the Profile to validate against.', + }, + _value: { + type: require('./element.input.js'), + description: 'The value to compare to.', + }, + value: { + type: GraphQLString, + description: 'The value to compare to.', + }, + _warningOnly: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + warningOnly: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptsetupactionoperation.input.js b/src/resources/1_0_2/inputs/testscriptsetupactionoperation.input.js index acebaa17..ea551836 100644 --- a/src/resources/1_0_2/inputs/testscriptsetupactionoperation.input.js +++ b/src/resources/1_0_2/inputs/testscriptsetupactionoperation.input.js @@ -1,152 +1,168 @@ -const CodeScalar = require('../scalars/code.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLInt, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.operation Input Schema + * @summary TestScriptsetupactionoperation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionOperation_Input', - description: 'The operation to perform.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/testscript-operation-codes - type: { - type: require('./coding.input'), - description: 'Server interaction or operation type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - resource: { - type: CodeScalar, - description: - 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', - }, - _resource: { - type: require('./element.input'), - description: - 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', - }, - label: { - type: GraphQLString, - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - _label: { - type: require('./element.input'), - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.input'), - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - accept: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", - }, - _accept: { - type: require('./element.input'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - contentType: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - _contentType: { - type: require('./element.input'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - destination: { - type: GraphQLInt, - description: 'Which server to perform the operation on.', - }, - _destination: { - type: require('./element.input'), - description: 'Which server to perform the operation on.', - }, - encodeRequestUrl: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', - }, - _encodeRequestUrl: { - type: require('./element.input'), - description: - 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', - }, - params: { - type: GraphQLString, - description: - 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', - }, - _params: { - type: require('./element.input'), - description: - 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', - }, - requestHeader: { - type: new GraphQLList( - require('./testscriptsetupactionoperationrequestheader.input'), - ), - description: 'Header elements would be used to set HTTP headers.', - }, - responseId: { - type: IdScalar, - description: 'The fixture id (maybe new) to map to the response.', - }, - _responseId: { - type: require('./element.input'), - description: 'The fixture id (maybe new) to map to the response.', - }, - sourceId: { - type: IdScalar, - description: - 'The id of the fixture used as the body of a PUT or POST request.', - }, - _sourceId: { - type: require('./element.input'), - description: - 'The id of the fixture used as the body of a PUT or POST request.', - }, - targetId: { - type: IdScalar, - description: - 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', - }, - _targetId: { - type: require('./element.input'), - description: - 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', - }, - url: { - type: GraphQLString, - description: 'Complete request URL.', - }, - _url: { - type: require('./element.input'), - description: 'Complete request URL.', - }, - }), + name: 'TestScriptsetupactionoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/testscript-operation-codes + type: { + type: require('./coding.input.js'), + description: 'Server interaction or operation type.', + }, + _resource: { + type: require('./element.input.js'), + description: + 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', + }, + _label: { + type: require('./element.input.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _accept: { + type: require('./element.input.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + accept: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", + }, + _contentType: { + type: require('./element.input.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + contentType: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _destination: { + type: require('./element.input.js'), + description: 'Which server to perform the operation on.', + }, + destination: { + type: GraphQLInt, + description: 'Which server to perform the operation on.', + }, + _encodeRequestUrl: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + encodeRequestUrl: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + _params: { + type: require('./element.input.js'), + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + params: { + type: GraphQLString, + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + requestHeader: { + type: new GraphQLList( + require('./testscriptsetupactionoperationrequestheader.input.js'), + ), + description: 'Header elements would be used to set HTTP headers.', + }, + _responseId: { + type: require('./element.input.js'), + description: 'The fixture id (maybe new) to map to the response.', + }, + responseId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the response.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + sourceId: { + type: IdScalar, + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + _targetId: { + type: require('./element.input.js'), + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + targetId: { + type: IdScalar, + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + _url: { + type: require('./element.input.js'), + description: 'Complete request URL.', + }, + url: { + type: GraphQLString, + description: 'Complete request URL.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptsetupactionoperationrequestheader.input.js b/src/resources/1_0_2/inputs/testscriptsetupactionoperationrequestheader.input.js index d7ac1ea3..852d22d1 100644 --- a/src/resources/1_0_2/inputs/testscriptsetupactionoperationrequestheader.input.js +++ b/src/resources/1_0_2/inputs/testscriptsetupactionoperationrequestheader.input.js @@ -1,36 +1,54 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.operation.requestHeader Input Schema + * @summary TestScriptsetupactionoperationrequestHeader Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionOperationRequestHeader_Input', - description: 'Header elements would be used to set HTTP headers.', - fields: () => - extendSchema(require('./backboneelement.input'), { - field: { - type: new GraphQLNonNull(GraphQLString), - description: "The HTTP header field e.g. 'Accept'.", - }, - _field: { - type: require('./element.input'), - description: "The HTTP header field e.g. 'Accept'.", - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: "The value of the header e.g. 'application/xml'.", - }, - _value: { - type: require('./element.input'), - description: "The value of the header e.g. 'application/xml'.", - }, - }), + name: 'TestScriptsetupactionoperationrequestHeader_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _field: { + type: require('./element.input.js'), + description: "The HTTP header field e.g. 'Accept'.", + }, + field: { + type: new GraphQLNonNull(GraphQLString), + description: "The HTTP header field e.g. 'Accept'.", + }, + _value: { + type: require('./element.input.js'), + description: "The value of the header e.g. 'application/xml'.", + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: "The value of the header e.g. 'application/xml'.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptteardown.input.js b/src/resources/1_0_2/inputs/testscriptteardown.input.js index 2cbc6e3e..3b934715 100644 --- a/src/resources/1_0_2/inputs/testscriptteardown.input.js +++ b/src/resources/1_0_2/inputs/testscriptteardown.input.js @@ -1,27 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.teardown Input Schema + * @summary TestScriptteardown Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptTeardown_Input', - description: - 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', - fields: () => - extendSchema(require('./backboneelement.input'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptteardownaction.input')), - ), - description: 'The teardown action will only contain an operation.', - }, - }), + name: 'TestScriptteardown_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptteardownaction.input.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptteardownaction.input.js b/src/resources/1_0_2/inputs/testscriptteardownaction.input.js index 2001ad64..57437e01 100644 --- a/src/resources/1_0_2/inputs/testscriptteardownaction.input.js +++ b/src/resources/1_0_2/inputs/testscriptteardownaction.input.js @@ -1,14 +1,33 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.teardown.action Input Schema + * @summary TestScriptteardownaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptTeardownAction_Input', - description: 'The teardown action will only contain an operation.', - fields: () => extendSchema(require('./backboneelement.input')), + name: 'TestScriptteardownaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscripttest.input.js b/src/resources/1_0_2/inputs/testscripttest.input.js index 99950f2e..3386be63 100644 --- a/src/resources/1_0_2/inputs/testscripttest.input.js +++ b/src/resources/1_0_2/inputs/testscripttest.input.js @@ -1,48 +1,64 @@ const { - GraphQLInputObjectType, + GraphQLList, GraphQLString, GraphQLNonNull, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.test Input Schema + * @summary TestScripttest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptTest_Input', - description: 'A test in this script.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.input'), - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscripttestaction.input')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestScripttest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscripttestaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscripttestaction.input.js b/src/resources/1_0_2/inputs/testscripttestaction.input.js index c39d3bf0..d186760e 100644 --- a/src/resources/1_0_2/inputs/testscripttestaction.input.js +++ b/src/resources/1_0_2/inputs/testscripttestaction.input.js @@ -1,14 +1,33 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.test.action Input Schema + * @summary TestScripttestaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptTestAction_Input', - description: 'Action would contain either an operation or an assertion.', - fields: () => extendSchema(require('./backboneelement.input')), + name: 'TestScripttestaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/testscriptvariable.input.js b/src/resources/1_0_2/inputs/testscriptvariable.input.js index 6352b3cd..6eeb739f 100644 --- a/src/resources/1_0_2/inputs/testscriptvariable.input.js +++ b/src/resources/1_0_2/inputs/testscriptvariable.input.js @@ -1,60 +1,76 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.variable Input Schema + * @summary TestScriptvariable Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptVariable_Input', - description: - 'Variable is set based either on element value in response body or on header field value in the response headers.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Descriptive name for this variable.', - }, - _name: { - type: require('./element.input'), - description: 'Descriptive name for this variable.', - }, - headerField: { - type: GraphQLString, - description: - 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', - }, - _headerField: { - type: require('./element.input'), - description: - 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', - }, - path: { - type: GraphQLString, - description: - 'XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.', - }, - _path: { - type: require('./element.input'), - description: - 'XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.', - }, - sourceId: { - type: IdScalar, - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', - }, - _sourceId: { - type: require('./element.input'), - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', - }, - }), + name: 'TestScriptvariable_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Descriptive name for this variable.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Descriptive name for this variable.', + }, + _headerField: { + type: require('./element.input.js'), + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + headerField: { + type: GraphQLString, + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + _path: { + type: require('./element.input.js'), + description: + 'XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.', + }, + path: { + type: GraphQLString, + description: + 'XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/timing.input.js b/src/resources/1_0_2/inputs/timing.input.js index 8ca68fea..b10dd386 100644 --- a/src/resources/1_0_2/inputs/timing.input.js +++ b/src/resources/1_0_2/inputs/timing.input.js @@ -1,8 +1,6 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -10,27 +8,40 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Timing_Input', - description: 'Base StructureDefinition for Timing Type.', - fields: () => - extendSchema(require('./element.input'), { - event: { - type: new GraphQLList(DateTimeScalar), - description: 'Identifies specific times when the event occurs.', - }, - _event: { - type: require('./element.input'), - description: 'Identifies specific times when the event occurs.', - }, - repeat: { - type: require('./timingrepeat.input'), - description: - 'A set of rules that describe when the event should occur.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/timing-abbreviation - code: { - type: require('./codeableconcept.input'), - description: - 'A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.', - }, - }), + description: 'Base StructureDefinition for Timing Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + _event: { + type: require('./element.input.js'), + description: 'Identifies specific times when the event occurs.', + }, + event: { + type: new GraphQLList(DateTimeScalar), + description: 'Identifies specific times when the event occurs.', + }, + repeat: { + type: require('./element.input.js'), + description: 'A set of rules that describe when the event should occur.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/timing-abbreviation + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/timingrepeat.input.js b/src/resources/1_0_2/inputs/timingrepeat.input.js index 46940ad5..f422ffe5 100644 --- a/src/resources/1_0_2/inputs/timingrepeat.input.js +++ b/src/resources/1_0_2/inputs/timingrepeat.input.js @@ -1,127 +1,144 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLInt, GraphQLFloat } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLInt, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Timing.repeat Input Schema + * @summary Timingrepeat Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TimingRepeat_Input', - description: 'A set of rules that describe when the event should occur.', - fields: () => - extendSchema(require('./element.input'), { - boundsQuantity: { - type: require('./quantity.input'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - boundsRange: { - type: require('./range.input'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - boundsPeriod: { - type: require('./period.input'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - count: { - type: GraphQLInt, - description: 'A total count of the desired number of repetitions.', - }, - _count: { - type: require('./element.input'), - description: 'A total count of the desired number of repetitions.', - }, - duration: { - type: GraphQLFloat, - description: 'How long this thing happens for when it happens.', - }, - _duration: { - type: require('./element.input'), - description: 'How long this thing happens for when it happens.', - }, - durationMax: { - type: GraphQLFloat, - description: - 'The upper limit of how long this thing happens for when it happens.', - }, - _durationMax: { - type: require('./element.input'), - description: - 'The upper limit of how long this thing happens for when it happens.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/units-of-time - durationUnits: { - type: CodeScalar, - description: 'The units of time for the duration, in UCUM units.', - }, - _durationUnits: { - type: require('./element.input'), - description: 'The units of time for the duration, in UCUM units.', - }, - frequency: { - type: GraphQLInt, - description: - 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', - }, - _frequency: { - type: require('./element.input'), - description: - 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', - }, - frequencyMax: { - type: GraphQLInt, - description: - 'If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.', - }, - _frequencyMax: { - type: require('./element.input'), - description: - 'If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.', - }, - period: { - type: GraphQLFloat, - description: - "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", - }, - _period: { - type: require('./element.input'), - description: - "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", - }, - periodMax: { - type: GraphQLFloat, - description: - "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", - }, - _periodMax: { - type: require('./element.input'), - description: - "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/units-of-time - periodUnits: { - type: CodeScalar, - description: 'The units of time for the period in UCUM units.', - }, - _periodUnits: { - type: require('./element.input'), - description: 'The units of time for the period in UCUM units.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-timing - when: { - type: CodeScalar, - description: - 'A real world event that the occurrence of the event should be tied to.', - }, - _when: { - type: require('./element.input'), - description: - 'A real world event that the occurrence of the event should be tied to.', - }, - }), + name: 'Timingrepeat_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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.', + }, + boundsQuantity: { + type: require('./quantity.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsRange: { + type: require('./range.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsPeriod: { + type: require('./period.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + _count: { + type: require('./element.input.js'), + description: 'A total count of the desired number of repetitions.', + }, + count: { + type: GraphQLInt, + description: 'A total count of the desired number of repetitions.', + }, + _duration: { + type: require('./element.input.js'), + description: 'How long this thing happens for when it happens.', + }, + duration: { + type: GraphQLFloat, + description: 'How long this thing happens for when it happens.', + }, + _durationMax: { + type: require('./element.input.js'), + description: + 'The upper limit of how long this thing happens for when it happens.', + }, + durationMax: { + type: GraphQLFloat, + description: + 'The upper limit of how long this thing happens for when it happens.', + }, + _durationUnits: { + type: require('./element.input.js'), + description: 'The units of time for the duration, in UCUM units.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/units-of-time + durationUnits: { + type: CodeScalar, + description: 'The units of time for the duration, in UCUM units.', + }, + _frequency: { + type: require('./element.input.js'), + description: + 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', + }, + frequency: { + type: GraphQLInt, + description: + 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', + }, + _frequencyMax: { + type: require('./element.input.js'), + description: + 'If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + frequencyMax: { + type: GraphQLInt, + description: + 'If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + _period: { + type: require('./element.input.js'), + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", + }, + period: { + type: GraphQLFloat, + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", + }, + _periodMax: { + type: require('./element.input.js'), + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + periodMax: { + type: GraphQLFloat, + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + _periodUnits: { + type: require('./element.input.js'), + description: 'The units of time for the period in UCUM units.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/units-of-time + periodUnits: { + type: CodeScalar, + description: 'The units of time for the period in UCUM units.', + }, + _when: { + type: require('./element.input.js'), + description: + 'A real world event that the occurrence of the event should be tied to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-timing + when: { + type: CodeScalar, + description: + 'A real world event that the occurrence of the event should be tied to.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valueset.input.js b/src/resources/1_0_2/inputs/valueset.input.js index 06b8bd3d..45c344dd 100644 --- a/src/resources/1_0_2/inputs/valueset.input.js +++ b/src/resources/1_0_2/inputs/valueset.input.js @@ -1,25 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ValueSetResourceInputType = new GraphQLEnumType({ - name: 'ValueSetResourceInputType', - values: { - ValueSet: { value: 'ValueSet' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -27,172 +18,229 @@ let ValueSetResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ValueSet_Input', - description: 'Base StructureDefinition for ValueSet Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ValueSetResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - _version: { - type: require('./element.input'), - description: - 'Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - name: { - type: GraphQLString, - description: - 'A free text natural language name describing the value set.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name describing the value set.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the value set.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the value set.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the value set.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the value set.', - }, - contact: { - type: new GraphQLList(require('./valuesetcontact.input')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", - }, - _date: { - type: require('./element.input'), - description: - "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", - }, - lockedDate: { - type: DateScalar, - description: - 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.', - }, - _lockedDate: { - type: require('./element.input'), - description: - 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.', - }, - immutable: { - type: GraphQLBoolean, - description: - "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", - }, - _immutable: { - type: require('./element.input'), - description: - "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", - }, - requirements: { - type: GraphQLString, - description: - 'Explains why this value set is needed and why it has been constrained as it has.', - }, - _requirements: { - type: require('./element.input'), - description: - 'Explains why this value set is needed and why it has been constrained as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', - }, - extensible: { - type: GraphQLBoolean, - description: - 'Whether this is intended to be used with an extensible binding or not.', - }, - _extensible: { - type: require('./element.input'), - description: - 'Whether this is intended to be used with an extensible binding or not.', - }, - codeSystem: { - type: require('./valuesetcodesystem.input'), - description: - 'A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.', - }, - compose: { - type: require('./valuesetcompose.input'), - description: - 'A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.', - }, - expansion: { - type: require('./valuesetexpansion.input'), - description: - "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", - }, - }), + description: 'Base StructureDefinition for ValueSet Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ValueSet_Enum_input', + values: { ValueSet: { value: 'ValueSet' } }, + }), + ), + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + version: { + type: GraphQLString, + description: + 'Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name describing the value set.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name describing the value set.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the value set.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the value set.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the value set.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the value set.', + }, + contact: { + type: new GraphQLList(require('./valuesetcontact.input.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.input.js'), + description: + "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", + }, + date: { + type: DateTimeScalar, + description: + "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", + }, + _lockedDate: { + type: require('./element.input.js'), + description: + 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.', + }, + lockedDate: { + type: DateScalar, + description: + 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.', + }, + _immutable: { + type: require('./element.input.js'), + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + immutable: { + type: GraphQLBoolean, + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + _requirements: { + type: require('./element.input.js'), + description: + 'Explains why this value set is needed and why it has been constrained as it has.', + }, + requirements: { + type: GraphQLString, + description: + 'Explains why this value set is needed and why it has been constrained as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + _extensible: { + type: require('./element.input.js'), + description: + 'Whether this is intended to be used with an extensible binding or not.', + }, + extensible: { + type: GraphQLBoolean, + description: + 'Whether this is intended to be used with an extensible binding or not.', + }, + codeSystem: { + type: require('./valuesetcodesystem.input.js'), + description: + 'A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.', + }, + compose: { + type: require('./valuesetcompose.input.js'), + description: + 'A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.', + }, + expansion: { + type: require('./valuesetexpansion.input.js'), + description: + "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetcodesystem.input.js b/src/resources/1_0_2/inputs/valuesetcodesystem.input.js index 663bec86..3b87d9fb 100644 --- a/src/resources/1_0_2/inputs/valuesetcodesystem.input.js +++ b/src/resources/1_0_2/inputs/valuesetcodesystem.input.js @@ -1,61 +1,77 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ValueSet.codeSystem Input Schema + * @summary ValueSetcodeSystem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetCodeSystem_Input', - description: - 'A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.', - fields: () => - extendSchema(require('./backboneelement.input'), { - system: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.', - }, - _system: { - type: require('./element.input'), - description: - 'An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.', - }, - version: { - type: GraphQLString, - description: - 'The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.', - }, - caseSensitive: { - type: GraphQLBoolean, - description: - 'If code comparison is case sensitive when codes within this system are compared to each other.', - }, - _caseSensitive: { - type: require('./element.input'), - description: - 'If code comparison is case sensitive when codes within this system are compared to each other.', - }, - concept: { - type: new GraphQLList( - new GraphQLNonNull(require('./valuesetcodesystemconcept.input')), - ), - description: - 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', - }, - }), + name: 'ValueSetcodeSystem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.', + }, + system: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.', + }, + version: { + type: GraphQLString, + description: + 'The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.', + }, + _caseSensitive: { + type: require('./element.input.js'), + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + caseSensitive: { + type: GraphQLBoolean, + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + concept: { + type: new GraphQLList( + new GraphQLNonNull(require('./valuesetcodesystemconcept.input.js')), + ), + description: + 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetcodesystemconcept.input.js b/src/resources/1_0_2/inputs/valuesetcodesystemconcept.input.js index ea6dbfe6..369fa6f8 100644 --- a/src/resources/1_0_2/inputs/valuesetcodesystemconcept.input.js +++ b/src/resources/1_0_2/inputs/valuesetcodesystemconcept.input.js @@ -1,69 +1,85 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.codeSystem.concept Input Schema + * @summary ValueSetcodeSystemconcept Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetCodeSystemConcept_Input', - description: - 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code - a text symbol - that uniquely identifies the concept within the code system.', - }, - _code: { - type: require('./element.input'), - description: - 'A code - a text symbol - that uniquely identifies the concept within the code system.', - }, - abstract: { - type: GraphQLBoolean, - description: 'If this code is not for use as a real concept.', - }, - _abstract: { - type: require('./element.input'), - description: 'If this code is not for use as a real concept.', - }, - display: { - type: GraphQLString, - description: - 'A human readable string that is the recommended default way to present this concept to a user.', - }, - _display: { - type: require('./element.input'), - description: - 'A human readable string that is the recommended default way to present this concept to a user.', - }, - definition: { - type: GraphQLString, - description: - 'The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', - }, - _definition: { - type: require('./element.input'), - description: - 'The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', - }, - designation: { - type: new GraphQLList( - require('./valuesetcodesystemconceptdesignation.input'), - ), - description: - 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', - }, - }), + name: 'ValueSetcodeSystemconcept_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + _abstract: { + type: require('./element.input.js'), + description: 'If this code is not for use as a real concept.', + }, + abstract: { + type: GraphQLBoolean, + description: 'If this code is not for use as a real concept.', + }, + _display: { + type: require('./element.input.js'), + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + display: { + type: GraphQLString, + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + definition: { + type: GraphQLString, + description: + 'The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + designation: { + type: new GraphQLList( + require('./valuesetcodesystemconceptdesignation.input.js'), + ), + description: + 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetcodesystemconceptdesignation.input.js b/src/resources/1_0_2/inputs/valuesetcodesystemconceptdesignation.input.js index ed97e240..947bc7b1 100644 --- a/src/resources/1_0_2/inputs/valuesetcodesystemconceptdesignation.input.js +++ b/src/resources/1_0_2/inputs/valuesetcodesystemconceptdesignation.input.js @@ -1,43 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.codeSystem.concept.designation Input Schema + * @summary ValueSetcodeSystemconceptdesignation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetCodeSystemConceptDesignation_Input', - description: - 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.input'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.input'), - description: 'A code that details how this designation would be used.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text value for this designation.', - }, - _value: { - type: require('./element.input'), - description: 'The text value for this designation.', - }, - }), + name: 'ValueSetcodeSystemconceptdesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _language: { + type: require('./element.input.js'), + description: 'The language this designation is defined for.', + }, + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.input.js'), + description: 'A code that details how this designation would be used.', + }, + _value: { + type: require('./element.input.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetcompose.input.js b/src/resources/1_0_2/inputs/valuesetcompose.input.js index 2100f7bd..f3a441f5 100644 --- a/src/resources/1_0_2/inputs/valuesetcompose.input.js +++ b/src/resources/1_0_2/inputs/valuesetcompose.input.js @@ -1,32 +1,48 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLInputObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ValueSet.compose Input Schema + * @summary ValueSetcompose Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetCompose_Input', - description: - 'A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.', - fields: () => - extendSchema(require('./backboneelement.input'), { - import: { - type: new GraphQLList(UriScalar), - description: - 'Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.', - }, - _import: { - type: require('./element.input'), - description: - 'Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.', - }, - include: { - type: new GraphQLList(require('./valuesetcomposeinclude.input')), - description: 'Include one or more codes from a code system.', - }, - }), + name: 'ValueSetcompose_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _import: { + type: require('./element.input.js'), + description: + 'Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.', + }, + import: { + type: new GraphQLList(UriScalar), + description: + 'Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.', + }, + include: { + type: new GraphQLList(require('./valuesetcomposeinclude.input.js')), + description: 'Include one or more codes from a code system.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetcomposeinclude.input.js b/src/resources/1_0_2/inputs/valuesetcomposeinclude.input.js index a61309ac..b7da45eb 100644 --- a/src/resources/1_0_2/inputs/valuesetcomposeinclude.input.js +++ b/src/resources/1_0_2/inputs/valuesetcomposeinclude.input.js @@ -1,51 +1,70 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include Input Schema + * @summary ValueSetcomposeinclude Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetComposeInclude_Input', - description: 'Include one or more codes from a code system.', - fields: () => - extendSchema(require('./backboneelement.input'), { - system: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI which is the code system from which the selected codes come from.', - }, - _system: { - type: require('./element.input'), - description: - 'An absolute URI which is the code system from which the selected codes come from.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system that the codes are selected from.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of the code system that the codes are selected from.', - }, - concept: { - type: new GraphQLList(require('./valuesetcomposeincludeconcept.input')), - description: 'Specifies a concept to be included or excluded.', - }, - filter: { - type: new GraphQLList(require('./valuesetcomposeincludefilter.input')), - description: - 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', - }, - }), + name: 'ValueSetcomposeinclude_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + system: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the code system that the codes are selected from.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system that the codes are selected from.', + }, + concept: { + type: new GraphQLList( + require('./valuesetcomposeincludeconcept.input.js'), + ), + description: 'Specifies a concept to be included or excluded.', + }, + filter: { + type: new GraphQLList(require('./valuesetcomposeincludefilter.input.js')), + description: + 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetcomposeincludeconcept.input.js b/src/resources/1_0_2/inputs/valuesetcomposeincludeconcept.input.js index 5cdddbb4..65385d24 100644 --- a/src/resources/1_0_2/inputs/valuesetcomposeincludeconcept.input.js +++ b/src/resources/1_0_2/inputs/valuesetcomposeincludeconcept.input.js @@ -1,41 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.concept Input Schema + * @summary ValueSetcomposeincludeconcept Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetComposeIncludeConcept_Input', - description: 'Specifies a concept to be included or excluded.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Specifies a code for the concept to be included or excluded.', - }, - _code: { - type: require('./element.input'), - description: - 'Specifies a code for the concept to be included or excluded.', - }, - display: { - type: GraphQLString, - description: - 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', - }, - _display: { - type: require('./element.input'), - description: - 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', - }, - }), + name: 'ValueSetcomposeincludeconcept_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + display: { + type: GraphQLString, + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetcomposeincludefilter.input.js b/src/resources/1_0_2/inputs/valuesetcomposeincludefilter.input.js index 247cf747..db58a13a 100644 --- a/src/resources/1_0_2/inputs/valuesetcomposeincludefilter.input.js +++ b/src/resources/1_0_2/inputs/valuesetcomposeincludefilter.input.js @@ -1,49 +1,69 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.filter Input Schema + * @summary ValueSetcomposeincludefilter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetComposeIncludeFilter_Input', - description: - 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', - fields: () => - extendSchema(require('./backboneelement.input'), { - property: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that identifies a property defined in the code system.', - }, - _property: { - type: require('./element.input'), - description: - 'A code that identifies a property defined in the code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/filter-operator - op: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of operation to perform as a part of the filter criteria.', - }, - _op: { - type: require('./element.input'), - description: - 'The kind of operation to perform as a part of the filter criteria.', - }, - value: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.', - }, - _value: { - type: require('./element.input'), - description: - 'The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.', - }, - }), + name: 'ValueSetcomposeincludefilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _property: { + type: require('./element.input.js'), + description: + 'A code that identifies a property defined in the code system.', + }, + property: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that identifies a property defined in the code system.', + }, + _op: { + type: require('./element.input.js'), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/filter-operator + op: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.', + }, + value: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetcontact.input.js b/src/resources/1_0_2/inputs/valuesetcontact.input.js index 3d44225b..9cbaed4a 100644 --- a/src/resources/1_0_2/inputs/valuesetcontact.input.js +++ b/src/resources/1_0_2/inputs/valuesetcontact.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLString, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ValueSet.contact Input Schema + * @summary ValueSetcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetContact_Input', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the value set.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of an individual to contact regarding the value set.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'ValueSetcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of an individual to contact regarding the value set.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the value set.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetexpansion.input.js b/src/resources/1_0_2/inputs/valuesetexpansion.input.js index b5f7b5e9..b5bad068 100644 --- a/src/resources/1_0_2/inputs/valuesetexpansion.input.js +++ b/src/resources/1_0_2/inputs/valuesetexpansion.input.js @@ -1,73 +1,89 @@ -const UriScalar = require('../scalars/uri.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ValueSet.expansion Input Schema + * @summary ValueSetexpansion Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetExpansion_Input', - description: - "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLNonNull(UriScalar), - description: - 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', - }, - _identifier: { - type: require('./element.input'), - description: - 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', - }, - timestamp: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The time at which the expansion was produced by the expanding system.', - }, - _timestamp: { - type: require('./element.input'), - description: - 'The time at which the expansion was produced by the expanding system.', - }, - total: { - type: GraphQLInt, - description: - 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', - }, - _total: { - type: require('./element.input'), - description: - 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', - }, - offset: { - type: GraphQLInt, - description: - 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', - }, - _offset: { - type: require('./element.input'), - description: - 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', - }, - parameter: { - type: new GraphQLList(require('./valuesetexpansionparameter.input')), - description: - 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', - }, - contains: { - type: new GraphQLList(require('./valuesetexpansioncontains.input')), - description: 'The codes that are contained in the value set expansion.', - }, - }), + name: 'ValueSetexpansion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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: require('./element.input.js'), + description: + 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', + }, + identifier: { + type: new GraphQLNonNull(UriScalar), + description: + 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', + }, + _timestamp: { + type: require('./element.input.js'), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + timestamp: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + _total: { + type: require('./element.input.js'), + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + total: { + type: GraphQLInt, + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + _offset: { + type: require('./element.input.js'), + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', + }, + offset: { + type: GraphQLInt, + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', + }, + parameter: { + type: new GraphQLList(require('./valuesetexpansionparameter.input.js')), + description: + 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', + }, + contains: { + type: new GraphQLList(require('./valuesetexpansioncontains.input.js')), + description: 'The codes that are contained in the value set expansion.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetexpansioncontains.input.js b/src/resources/1_0_2/inputs/valuesetexpansioncontains.input.js index 0adbc01b..45b72c9a 100644 --- a/src/resources/1_0_2/inputs/valuesetexpansioncontains.input.js +++ b/src/resources/1_0_2/inputs/valuesetexpansioncontains.input.js @@ -1,70 +1,88 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLBoolean, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.expansion.contains Input Schema + * @summary ValueSetexpansioncontains Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetExpansionContains_Input', - description: 'The codes that are contained in the value set expansion.', - fields: () => - extendSchema(require('./backboneelement.input'), { - system: { - type: UriScalar, - description: - 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', - }, - _system: { - type: require('./element.input'), - description: - 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', - }, - abstract: { - type: GraphQLBoolean, - description: - 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', - }, - _abstract: { - type: require('./element.input'), - description: - 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', - }, - version: { - type: GraphQLString, - description: - 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', - }, - code: { - type: CodeScalar, - description: - 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', - }, - _code: { - type: require('./element.input'), - description: - 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', - }, - display: { - type: GraphQLString, - description: 'The recommended display for this item in the expansion.', - }, - _display: { - type: require('./element.input'), - description: 'The recommended display for this item in the expansion.', - }, - }), + name: 'ValueSetexpansioncontains_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + _abstract: { + type: require('./element.input.js'), + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + abstract: { + type: GraphQLBoolean, + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', + }, + version: { + type: GraphQLString, + description: + 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + code: { + type: CodeScalar, + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + _display: { + type: require('./element.input.js'), + description: 'The recommended display for this item in the expansion.', + }, + display: { + type: GraphQLString, + description: 'The recommended display for this item in the expansion.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/valuesetexpansionparameter.input.js b/src/resources/1_0_2/inputs/valuesetexpansionparameter.input.js index 53a6d927..621cfa51 100644 --- a/src/resources/1_0_2/inputs/valuesetexpansionparameter.input.js +++ b/src/resources/1_0_2/inputs/valuesetexpansionparameter.input.js @@ -1,82 +1,99 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.expansion.parameter Input Schema + * @summary ValueSetexpansionparameter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetExpansionParameter_Input', - description: - 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name of the parameter.', - }, - _name: { - type: require('./element.input'), - description: 'The name of the parameter.', - }, - valueString: { - type: GraphQLString, - description: 'The value of the parameter.', - }, - _valueString: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: 'The value of the parameter.', - }, - _valueBoolean: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueInteger: { - type: GraphQLInt, - description: 'The value of the parameter.', - }, - _valueInteger: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueDecimal: { - type: GraphQLFloat, - description: 'The value of the parameter.', - }, - _valueDecimal: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueUri: { - type: UriScalar, - description: 'The value of the parameter.', - }, - _valueUri: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueCode: { - type: CodeScalar, - description: 'The value of the parameter.', - }, - _valueCode: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - }), + name: 'ValueSetexpansionparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of the parameter.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the parameter.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueString: { + type: GraphQLString, + description: 'The value of the parameter.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the parameter.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueInteger: { + type: GraphQLInt, + description: 'The value of the parameter.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'The value of the parameter.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueUri: { + type: UriScalar, + description: 'The value of the parameter.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueCode: { + type: CodeScalar, + description: 'The value of the parameter.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/visionprescription.input.js b/src/resources/1_0_2/inputs/visionprescription.input.js index 26ce8500..068c2d0c 100644 --- a/src/resources/1_0_2/inputs/visionprescription.input.js +++ b/src/resources/1_0_2/inputs/visionprescription.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 VisionPrescriptionResourceInputType = new GraphQLEnumType({ - name: 'VisionPrescriptionResourceInputType', - values: { - VisionPrescription: { value: 'VisionPrescription' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,57 +16,114 @@ let VisionPrescriptionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'VisionPrescription_Input', - description: 'Base StructureDefinition for VisionPrescription Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(VisionPrescriptionResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Business identifier which may be used by other parties to reference or identify the prescription.', - }, - dateWritten: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was written.', - }, - _dateWritten: { - type: require('./element.input'), - description: - 'The date (and perhaps time) when the prescription was written.', - }, - patient: { - type: require('./reference.input'), - description: - 'A link to a resource representing the person to whom the vision products will be supplied.', - }, - prescriber: { - type: require('./reference.input'), - description: - 'The healthcare professional responsible for authorizing the prescription.', - }, - encounter: { - type: require('./reference.input'), - description: - 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - reasonReference: { - type: require('./reference.input'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - dispense: { - type: new GraphQLList(require('./visionprescriptiondispense.input')), - description: - 'Deals with details of the dispense part of the supply specification.', - }, - }), + description: 'Base StructureDefinition for VisionPrescription Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'VisionPrescription_Enum_input', + values: { VisionPrescription: { value: 'VisionPrescription' } }, + }), + ), + 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: + 'Business identifier which may be used by other parties to reference or identify the prescription.', + }, + _dateWritten: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + dateWritten: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was written.', + }, + patient: { + type: GraphQLString, + description: + 'A link to a resource representing the person to whom the vision products will be supplied.', + }, + prescriber: { + type: GraphQLString, + description: + 'The healthcare professional responsible for authorizing the prescription.', + }, + encounter: { + type: GraphQLString, + description: + 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + reasonReference: { + type: GraphQLString, + description: + 'Can be the reason or the indication for writing the prescription.', + }, + dispense: { + type: new GraphQLList(require('./visionprescriptiondispense.input.js')), + description: + 'Deals with details of the dispense part of the supply specification.', + }, + }), }); diff --git a/src/resources/1_0_2/inputs/visionprescriptiondispense.input.js b/src/resources/1_0_2/inputs/visionprescriptiondispense.input.js index 46e16cea..51f2dda8 100644 --- a/src/resources/1_0_2/inputs/visionprescriptiondispense.input.js +++ b/src/resources/1_0_2/inputs/visionprescriptiondispense.input.js @@ -1,150 +1,165 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, GraphQLInt, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary VisionPrescription.dispense Input Schema + * @summary VisionPrescriptiondispense Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'VisionPrescriptionDispense_Input', - description: - 'Deals with details of the dispense part of the supply specification.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-product - product: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Identifies the type of vision correction product which is required for the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-eye-codes - eye: { - type: CodeScalar, - description: 'The eye for which the lens applies.', - }, - _eye: { - type: require('./element.input'), - description: 'The eye for which the lens applies.', - }, - sphere: { - type: GraphQLFloat, - description: 'Lens power measured in diopters (0.25 units).', - }, - _sphere: { - type: require('./element.input'), - description: 'Lens power measured in diopters (0.25 units).', - }, - cylinder: { - type: GraphQLFloat, - description: - 'Power adjustment for astigmatism measured in diopters (0.25 units).', - }, - _cylinder: { - type: require('./element.input'), - description: - 'Power adjustment for astigmatism measured in diopters (0.25 units).', - }, - axis: { - type: GraphQLInt, - description: 'Adjustment for astigmatism measured in integer degrees.', - }, - _axis: { - type: require('./element.input'), - description: 'Adjustment for astigmatism measured in integer degrees.', - }, - prism: { - type: GraphQLFloat, - description: - 'Amount of prism to compensate for eye alignment in fractional units.', - }, - _prism: { - type: require('./element.input'), - description: - 'Amount of prism to compensate for eye alignment in fractional units.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-base-codes - base: { - type: CodeScalar, - description: - 'The relative base, or reference lens edge, for the prism.', - }, - _base: { - type: require('./element.input'), - description: - 'The relative base, or reference lens edge, for the prism.', - }, - add: { - type: GraphQLFloat, - description: - 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', - }, - _add: { - type: require('./element.input'), - description: - 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', - }, - power: { - type: GraphQLFloat, - description: 'Contact lens power measured in diopters (0.25 units).', - }, - _power: { - type: require('./element.input'), - description: 'Contact lens power measured in diopters (0.25 units).', - }, - backCurve: { - type: GraphQLFloat, - description: 'Back curvature measured in millimeters.', - }, - _backCurve: { - type: require('./element.input'), - description: 'Back curvature measured in millimeters.', - }, - diameter: { - type: GraphQLFloat, - description: 'Contact lens diameter measured in millimeters.', - }, - _diameter: { - type: require('./element.input'), - description: 'Contact lens diameter measured in millimeters.', - }, - duration: { - type: require('./quantity.input'), - description: 'The recommended maximum wear period for the lens.', - }, - color: { - type: GraphQLString, - description: 'Special color or pattern.', - }, - _color: { - type: require('./element.input'), - description: 'Special color or pattern.', - }, - brand: { - type: GraphQLString, - description: 'Brand recommendations or restrictions.', - }, - _brand: { - type: require('./element.input'), - description: 'Brand recommendations or restrictions.', - }, - notes: { - type: GraphQLString, - description: - 'Notes for special requirements such as coatings and lens materials.', - }, - _notes: { - type: require('./element.input'), - description: - 'Notes for special requirements such as coatings and lens materials.', - }, - }), + name: 'VisionPrescriptiondispense_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-product + product: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Identifies the type of vision correction product which is required for the patient.', + }, + _eye: { + type: require('./element.input.js'), + description: 'The eye for which the lens applies.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-eye-codes + eye: { + type: CodeScalar, + description: 'The eye for which the lens applies.', + }, + _sphere: { + type: require('./element.input.js'), + description: 'Lens power measured in diopters (0.25 units).', + }, + sphere: { + type: GraphQLFloat, + description: 'Lens power measured in diopters (0.25 units).', + }, + _cylinder: { + type: require('./element.input.js'), + description: + 'Power adjustment for astigmatism measured in diopters (0.25 units).', + }, + cylinder: { + type: GraphQLFloat, + description: + 'Power adjustment for astigmatism measured in diopters (0.25 units).', + }, + _axis: { + type: require('./element.input.js'), + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + axis: { + type: GraphQLInt, + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + _prism: { + type: require('./element.input.js'), + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + prism: { + type: GraphQLFloat, + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + _base: { + type: require('./element.input.js'), + description: 'The relative base, or reference lens edge, for the prism.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-base-codes + base: { + type: CodeScalar, + description: 'The relative base, or reference lens edge, for the prism.', + }, + _add: { + type: require('./element.input.js'), + description: + 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', + }, + add: { + type: GraphQLFloat, + description: + 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', + }, + _power: { + type: require('./element.input.js'), + description: 'Contact lens power measured in diopters (0.25 units).', + }, + power: { + type: GraphQLFloat, + description: 'Contact lens power measured in diopters (0.25 units).', + }, + _backCurve: { + type: require('./element.input.js'), + description: 'Back curvature measured in millimeters.', + }, + backCurve: { + type: GraphQLFloat, + description: 'Back curvature measured in millimeters.', + }, + _diameter: { + type: require('./element.input.js'), + description: 'Contact lens diameter measured in millimeters.', + }, + diameter: { + type: GraphQLFloat, + description: 'Contact lens diameter measured in millimeters.', + }, + duration: { + type: require('./quantity.input.js'), + description: 'The recommended maximum wear period for the lens.', + }, + _color: { + type: require('./element.input.js'), + description: 'Special color or pattern.', + }, + color: { + type: GraphQLString, + description: 'Special color or pattern.', + }, + _brand: { + type: require('./element.input.js'), + description: 'Brand recommendations or restrictions.', + }, + brand: { + type: GraphQLString, + description: 'Brand recommendations or restrictions.', + }, + _notes: { + type: require('./element.input.js'), + description: + 'Notes for special requirements such as coatings and lens materials.', + }, + notes: { + type: GraphQLString, + description: + 'Notes for special requirements such as coatings and lens materials.', + }, + }), }); diff --git a/src/resources/1_0_2/parameters/account.parameters.js b/src/resources/1_0_2/parameters/account.parameters.js index 3eb2eb78..36f05d28 100644 --- a/src/resources/1_0_2/parameters/account.parameters.js +++ b/src/resources/1_0_2/parameters/account.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,49 +8,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the account query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Account-balance balance: { type: GraphQLString, - description: - 'How much is in account? (See http://hl7.org/fhir/SearchParameter/account-balance).', + fhirtype: 'quantity', + xpath: 'Account.balance', + description: 'How much is in account?', }, - patient: { - type: GraphQLString, - description: - 'What is account tied to? (See http://hl7.org/fhir/SearchParameter/account-patient).', - }, - status: { + // http://hl7.org/fhir/SearchParameter/Account-identifier + identifier: { type: TokenScalar, - description: - 'active | inactive (See http://hl7.org/fhir/SearchParameter/account-status).', - }, - subject: { - type: GraphQLString, - description: - 'What is account tied to? (See http://hl7.org/fhir/SearchParameter/account-subject).', + fhirtype: 'token', + xpath: 'Account.identifier', + description: 'Account number', }, + // http://hl7.org/fhir/SearchParameter/Account-name name: { type: GraphQLString, - description: - 'Human-readable label (See http://hl7.org/fhir/SearchParameter/account-name).', + fhirtype: 'string', + xpath: 'Account.name', + description: 'Human-readable label', }, + // http://hl7.org/fhir/SearchParameter/Account-owner owner: { type: GraphQLString, - description: - 'Who is responsible? (See http://hl7.org/fhir/SearchParameter/account-owner).', + fhirtype: 'reference', + xpath: 'Account.owner', + description: 'Who is responsible?', + }, + // http://hl7.org/fhir/SearchParameter/Account-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Account.subject', + description: 'What is account tied to?', }, + // http://hl7.org/fhir/SearchParameter/Account-period period: { type: DateScalar, - description: - 'Transaction window (See http://hl7.org/fhir/SearchParameter/account-period).', + fhirtype: 'date', + xpath: 'Account.coveragePeriod', + description: 'Transaction window', }, - type: { + // http://hl7.org/fhir/SearchParameter/Account-status + status: { type: TokenScalar, - description: - 'E.g. patient, expense, depreciation (See http://hl7.org/fhir/SearchParameter/account-type).', + fhirtype: 'token', + xpath: 'Account.status', + description: 'active | inactive', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Account-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Account.subject', + description: 'What is account tied to?', + }, + // http://hl7.org/fhir/SearchParameter/Account-type + type: { type: TokenScalar, - description: - 'Account number (See http://hl7.org/fhir/SearchParameter/account-identifier).', + fhirtype: 'token', + xpath: 'Account.type', + description: 'E.g. patient, expense, depreciation', }, }; diff --git a/src/resources/1_0_2/parameters/allergyintolerance.parameters.js b/src/resources/1_0_2/parameters/allergyintolerance.parameters.js index 7a2ca004..170371f3 100644 --- a/src/resources/1_0_2/parameters/allergyintolerance.parameters.js +++ b/src/resources/1_0_2/parameters/allergyintolerance.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,79 +8,111 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the allergyintolerance query */ module.exports = { - status: { - type: TokenScalar, - description: - 'active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error (See http://hl7.org/fhir/SearchParameter/allergyintolerance-status).', - }, - onset: { - type: DateScalar, - description: - 'Date(/time) when manifestations showed (See http://hl7.org/fhir/SearchParameter/allergyintolerance-onset).', - }, - last_date: { - type: DateScalar, - description: - 'Date(/time) of last known occurrence of a reaction (See http://hl7.org/fhir/SearchParameter/allergyintolerance-last-date).', - }, - severity: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-category + category: { type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.category', description: - 'mild | moderate | severe (of event as a whole) (See http://hl7.org/fhir/SearchParameter/allergyintolerance-severity).', + 'food | medication | environment | other - Category of Substance', }, - type: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-criticality + criticality: { type: TokenScalar, - description: - 'allergy | intolerance - Underlying mechanism (if known) (See http://hl7.org/fhir/SearchParameter/allergyintolerance-type).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.criticality', + description: 'CRITL | CRITH | CRITU', }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-date date: { type: DateScalar, - description: - 'When recorded (See http://hl7.org/fhir/SearchParameter/allergyintolerance-date).', + fhirtype: 'date', + xpath: 'AllergyIntolerance.recordedDate', + description: 'When recorded', }, - reporter: { - type: GraphQLString, - description: - 'Source of the information about the allergy (See http://hl7.org/fhir/SearchParameter/allergyintolerance-reporter).', - }, - substance: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-identifier + identifier: { type: TokenScalar, - description: - 'Substance, (or class) considered to be responsible for risk (See http://hl7.org/fhir/SearchParameter/allergyintolerance-substance).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.identifier', + description: 'External ids for this item', }, - criticality: { - type: TokenScalar, - description: - 'CRITL | CRITH | CRITU (See http://hl7.org/fhir/SearchParameter/allergyintolerance-criticality).', + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-last-date + last_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AllergyIntolerance.lastOccurence', + description: 'Date(/time) of last known occurrence of a reaction', }, - category: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-manifestation + manifestation: { type: TokenScalar, - description: - 'food | medication | environment | other - Category of Substance (See http://hl7.org/fhir/SearchParameter/allergyintolerance-category).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.manifestation', + description: 'Clinical symptoms/signs associated with the Event', }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-onset + onset: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AllergyIntolerance.reaction.onset', + description: 'Date(/time) when manifestations showed', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-patient patient: { type: GraphQLString, - description: - 'Who the sensitivity is for (See http://hl7.org/fhir/SearchParameter/allergyintolerance-patient).', + fhirtype: 'reference', + xpath: 'AllergyIntolerance.patient', + description: 'Who the sensitivity is for', }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-recorder recorder: { type: GraphQLString, - description: - 'Who recorded the sensitivity (See http://hl7.org/fhir/SearchParameter/allergyintolerance-recorder).', + fhirtype: 'reference', + xpath: 'AllergyIntolerance.recorder', + description: 'Who recorded the sensitivity', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-reporter + reporter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AllergyIntolerance.reporter', + description: 'Source of the information about the allergy', }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-route route: { type: TokenScalar, - description: - 'How the subject was exposed to the substance (See http://hl7.org/fhir/SearchParameter/allergyintolerance-route).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.exposureRoute', + description: 'How the subject was exposed to the substance', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-severity + severity: { type: TokenScalar, - description: - 'External ids for this item (See http://hl7.org/fhir/SearchParameter/allergyintolerance-identifier).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.severity', + description: 'mild | moderate | severe (of event as a whole)', }, - manifestation: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-status + status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.status', description: - 'Clinical symptoms/signs associated with the Event (See http://hl7.org/fhir/SearchParameter/allergyintolerance-manifestation).', + 'active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-substance + substance: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.substance', + description: 'Substance, (or class) considered to be responsible for risk', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.type', + description: 'allergy | intolerance - Underlying mechanism (if known)', }, }; diff --git a/src/resources/1_0_2/parameters/appointment.parameters.js b/src/resources/1_0_2/parameters/appointment.parameters.js index d7f09941..20537667 100644 --- a/src/resources/1_0_2/parameters/appointment.parameters.js +++ b/src/resources/1_0_2/parameters/appointment.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,44 +8,63 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the appointment query */ module.exports = { - patient: { + // http://hl7.org/fhir/SearchParameter/Appointment-actor + actor: { type: GraphQLString, - description: - 'One of the individuals of the appointment is this patient (See http://hl7.org/fhir/SearchParameter/appointment-patient).', + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', + description: 'Any one of the individuals participating in the appointment', }, - practitioner: { - type: GraphQLString, - description: - 'One of the individuals of the appointment is this practitioner (See http://hl7.org/fhir/SearchParameter/appointment-practitioner).', + // http://hl7.org/fhir/SearchParameter/Appointment-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Appointment.start', + description: 'Appointment date/time.', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.identifier', + description: 'An Identifier of the Appointment', }, + // http://hl7.org/fhir/SearchParameter/Appointment-location location: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', description: - 'This location is listed in the participants of the appointment (See http://hl7.org/fhir/SearchParameter/appointment-location).', - }, - status: { - type: TokenScalar, - description: - 'The overall status of the appointment (See http://hl7.org/fhir/SearchParameter/appointment-status).', + 'This location is listed in the participants of the appointment', }, + // http://hl7.org/fhir/SearchParameter/Appointment-part-status part_status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.participant.status', description: - 'The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests. (See http://hl7.org/fhir/SearchParameter/appointment-part-status).', + 'The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.', }, - actor: { + // http://hl7.org/fhir/SearchParameter/Appointment-patient + patient: { type: GraphQLString, - description: - 'Any one of the individuals participating in the appointment (See http://hl7.org/fhir/SearchParameter/appointment-actor).', + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', + description: 'One of the individuals of the appointment is this patient', }, - date: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/Appointment-practitioner + practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', description: - 'Appointment date/time. (See http://hl7.org/fhir/SearchParameter/appointment-date).', + 'One of the individuals of the appointment is this practitioner', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Appointment-status + status: { type: TokenScalar, - description: - 'An Identifier of the Appointment (See http://hl7.org/fhir/SearchParameter/appointment-identifier).', + fhirtype: 'token', + xpath: 'Appointment.status', + description: 'The overall status of the appointment', }, }; diff --git a/src/resources/1_0_2/parameters/appointmentresponse.parameters.js b/src/resources/1_0_2/parameters/appointmentresponse.parameters.js index 1df39508..1f48a738 100644 --- a/src/resources/1_0_2/parameters/appointmentresponse.parameters.js +++ b/src/resources/1_0_2/parameters/appointmentresponse.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,39 +7,54 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the appointmentresponse query */ module.exports = { - patient: { + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-actor + actor: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', description: - 'This Response is for this Patient (See http://hl7.org/fhir/SearchParameter/appointmentresponse-patient).', + 'The Person, Location/HealthcareService or Device that this appointment response replies for', }, - practitioner: { + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-appointment + appointment: { type: GraphQLString, - description: - 'This Response is for this Practitioner (See http://hl7.org/fhir/SearchParameter/appointmentresponse-practitioner).', + fhirtype: 'reference', + xpath: 'AppointmentResponse.appointment', + description: 'The appointment that the response is attached to', }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AppointmentResponse.identifier', + description: 'An Identifier in this appointment response', + }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-location location: { type: GraphQLString, - description: - 'This Response is for this Location (See http://hl7.org/fhir/SearchParameter/appointmentresponse-location).', + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Location', }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-part-status part_status: { type: TokenScalar, - description: - 'The participants acceptance status for this appointment (See http://hl7.org/fhir/SearchParameter/appointmentresponse-part-status).', + fhirtype: 'token', + xpath: 'AppointmentResponse.participantStatus', + description: 'The participants acceptance status for this appointment', }, - actor: { + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-patient + patient: { type: GraphQLString, - description: - 'The Person, Location/HealthcareService or Device that this appointment response replies for (See http://hl7.org/fhir/SearchParameter/appointmentresponse-actor).', - }, - identifier: { - type: TokenScalar, - description: - 'An Identifier in this appointment response (See http://hl7.org/fhir/SearchParameter/appointmentresponse-identifier).', + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Patient', }, - appointment: { + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-practitioner + practitioner: { type: GraphQLString, - description: - 'The appointment that the response is attached to (See http://hl7.org/fhir/SearchParameter/appointmentresponse-appointment).', + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Practitioner', }, }; diff --git a/src/resources/1_0_2/parameters/auditevent.parameters.js b/src/resources/1_0_2/parameters/auditevent.parameters.js index 367dd4c1..3769672b 100644 --- a/src/resources/1_0_2/parameters/auditevent.parameters.js +++ b/src/resources/1_0_2/parameters/auditevent.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,89 +9,123 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the auditevent query */ module.exports = { - site: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-action + action: { type: TokenScalar, - description: - 'Logical source location within the enterprise (See http://hl7.org/fhir/SearchParameter/auditevent-site).', + fhirtype: 'token', + xpath: 'AuditEvent.event.action', + description: 'Type of action performed during the event', }, - desc: { - type: GraphQLString, - description: - 'Instance-specific descriptor for Object (See http://hl7.org/fhir/SearchParameter/auditevent-desc).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-address + address: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.participant.network.address', + description: 'Identifier for the network access point of the user device', }, - type: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-altid + altid: { type: TokenScalar, - description: - 'Type/identifier of event (See http://hl7.org/fhir/SearchParameter/auditevent-type).', + fhirtype: 'token', + xpath: 'AuditEvent.participant.altId', + description: 'Alternative User id e.g. authentication', }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-date date: { type: DateScalar, - description: - 'Time when the event occurred on source (See http://hl7.org/fhir/SearchParameter/auditevent-date).', + fhirtype: 'date', + xpath: 'AuditEvent.event.dateTime', + description: 'Time when the event occurred on source', }, - reference: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-desc + desc: { type: GraphQLString, - description: - 'Specific instance of resource (e.g. versioned) (See http://hl7.org/fhir/SearchParameter/auditevent-reference).', + fhirtype: 'string', + xpath: 'AuditEvent.object.name', + description: 'Instance-specific descriptor for Object', }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-identity identity: { type: TokenScalar, - description: - 'Specific instance of object (e.g. versioned) (See http://hl7.org/fhir/SearchParameter/auditevent-identity).', + fhirtype: 'token', + xpath: 'AuditEvent.object.identifier', + description: 'Specific instance of object (e.g. versioned)', }, - patient: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-name + name: { type: GraphQLString, - description: - 'Direct reference to resource (See http://hl7.org/fhir/SearchParameter/auditevent-patient).', + fhirtype: 'string', + xpath: 'AuditEvent.participant.name', + description: 'Human-meaningful name for the user', }, - altid: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-object-type + object_type: { type: TokenScalar, - description: - 'Alternative User id e.g. authentication (See http://hl7.org/fhir/SearchParameter/auditevent-altid).', + fhirtype: 'token', + xpath: 'AuditEvent.object.type', + description: 'Type of object involved', }, - source: { - type: TokenScalar, - description: - 'The identity of source detecting the event (See http://hl7.org/fhir/SearchParameter/auditevent-source).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-participant + participant: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AuditEvent.participant.reference', + description: 'Direct reference to resource', }, - address: { - type: TokenScalar, - description: - 'Identifier for the network access point of the user device (See http://hl7.org/fhir/SearchParameter/auditevent-address).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AuditEvent.participant.reference', + description: 'Direct reference to resource', }, - subtype: { - type: TokenScalar, - description: - 'More specific type/id for the event (See http://hl7.org/fhir/SearchParameter/auditevent-subtype).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-policy + policy: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'AuditEvent.participant.policy', + description: 'Policy that authorized event', }, - name: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-reference + reference: { type: GraphQLString, - description: - 'Human-meaningful name for the user (See http://hl7.org/fhir/SearchParameter/auditevent-name).', + fhirtype: 'reference', + xpath: 'AuditEvent.object.reference', + description: 'Specific instance of resource (e.g. versioned)', }, - action: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-site + site: { type: TokenScalar, - description: - 'Type of action performed during the event (See http://hl7.org/fhir/SearchParameter/auditevent-action).', + fhirtype: 'token', + xpath: 'AuditEvent.source.site', + description: 'Logical source location within the enterprise', }, - participant: { - type: GraphQLString, - description: - 'Direct reference to resource (See http://hl7.org/fhir/SearchParameter/auditevent-participant).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-source + source: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.source.identifier', + description: 'The identity of source detecting the event', }, - policy: { - type: UriScalar, - description: - 'Policy that authorized event (See http://hl7.org/fhir/SearchParameter/auditevent-policy).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-subtype + subtype: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.event.subtype', + description: 'More specific type/id for the event', }, - object_type: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-type + type: { type: TokenScalar, - description: - 'Type of object involved (See http://hl7.org/fhir/SearchParameter/auditevent-object-type).', + fhirtype: 'token', + xpath: 'AuditEvent.event.type', + description: 'Type/identifier of event', }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-user user: { type: TokenScalar, - description: - 'Unique identifier for the user (See http://hl7.org/fhir/SearchParameter/auditevent-user).', + fhirtype: 'token', + xpath: 'AuditEvent.participant.userId', + description: 'Unique identifier for the user', }, }; diff --git a/src/resources/1_0_2/parameters/basic.parameters.js b/src/resources/1_0_2/parameters/basic.parameters.js index 636f5eaf..1fd7d63a 100644 --- a/src/resources/1_0_2/parameters/basic.parameters.js +++ b/src/resources/1_0_2/parameters/basic.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,34 +8,46 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the basic query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Basic-author author: { type: GraphQLString, - description: - 'Who created (See http://hl7.org/fhir/SearchParameter/basic-author).', + fhirtype: 'reference', + xpath: 'Basic.author', + description: 'Who created', }, - patient: { - type: GraphQLString, - description: - 'Identifies the focus of this resource (See http://hl7.org/fhir/SearchParameter/basic-patient).', + // http://hl7.org/fhir/SearchParameter/Basic-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Basic.code', + description: 'Kind of Resource', }, + // http://hl7.org/fhir/SearchParameter/Basic-created created: { type: DateScalar, - description: - 'When created (See http://hl7.org/fhir/SearchParameter/basic-created).', - }, - subject: { - type: GraphQLString, - description: - 'Identifies the focus of this resource (See http://hl7.org/fhir/SearchParameter/basic-subject).', - }, - code: { - type: TokenScalar, - description: - 'Kind of Resource (See http://hl7.org/fhir/SearchParameter/basic-code).', + fhirtype: 'date', + xpath: 'Basic.created', + description: 'When created', }, + // http://hl7.org/fhir/SearchParameter/Basic-identifier identifier: { type: TokenScalar, - description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/basic-identifier).', + fhirtype: 'token', + xpath: 'Basic.identifier', + description: 'Business identifier', + }, + // http://hl7.org/fhir/SearchParameter/Basic-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Basic.subject', + description: 'Identifies the focus of this resource', + }, + // http://hl7.org/fhir/SearchParameter/Basic-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Basic.subject', + description: 'Identifies the focus of this resource', }, }; diff --git a/src/resources/1_0_2/parameters/binary.parameters.js b/src/resources/1_0_2/parameters/binary.parameters.js index 3d95d5b0..bf27d128 100644 --- a/src/resources/1_0_2/parameters/binary.parameters.js +++ b/src/resources/1_0_2/parameters/binary.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the binary query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Binary-contenttype contenttype: { type: TokenScalar, - description: - 'MimeType of the binary content (See http://hl7.org/fhir/SearchParameter/binary-contenttype).', + fhirtype: 'token', + xpath: 'Binary.contentType', + description: 'MimeType of the binary content', }, }; diff --git a/src/resources/1_0_2/parameters/bodysite.parameters.js b/src/resources/1_0_2/parameters/bodysite.parameters.js index 0defc0f2..1475c1cf 100644 --- a/src/resources/1_0_2/parameters/bodysite.parameters.js +++ b/src/resources/1_0_2/parameters/bodysite.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,19 +7,25 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the bodysite query */ module.exports = { - patient: { - type: GraphQLString, - description: - 'Patient to whom bodysite belongs (See http://hl7.org/fhir/SearchParameter/bodysite-patient).', - }, + // http://hl7.org/fhir/SearchParameter/BodySite-code code: { type: TokenScalar, - description: - 'Named anatomical location (See http://hl7.org/fhir/SearchParameter/bodysite-code).', + fhirtype: 'token', + xpath: 'BodySite.code', + description: 'Named anatomical location', }, + // http://hl7.org/fhir/SearchParameter/BodySite-identifier identifier: { type: TokenScalar, - description: - 'Identifier for this instance of the anatomical location (See http://hl7.org/fhir/SearchParameter/bodysite-identifier).', + fhirtype: 'token', + xpath: 'BodySite.identifier', + description: 'Identifier for this instance of the anatomical location', + }, + // http://hl7.org/fhir/SearchParameter/BodySite-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'BodySite.patient', + description: 'Patient to whom bodysite belongs', }, }; diff --git a/src/resources/1_0_2/parameters/bundle.parameters.js b/src/resources/1_0_2/parameters/bundle.parameters.js index edb0fa8a..bfc0750e 100644 --- a/src/resources/1_0_2/parameters/bundle.parameters.js +++ b/src/resources/1_0_2/parameters/bundle.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,19 +7,28 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the bundle query */ module.exports = { - message: { + // http://hl7.org/fhir/SearchParameter/Bundle-composition + composition: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Bundle.entry.resource[0]', description: - "The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search its contents (See http://hl7.org/fhir/SearchParameter/bundle-message).", + "The first resource in the bundle, if the bundle type is 'document' - this is a composition, and this parameter provides access to searches its contents", }, - composition: { + // http://hl7.org/fhir/SearchParameter/Bundle-message + message: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Bundle.entry.resource[0]', description: - "The first resource in the bundle, if the bundle type is 'document' - this is a composition, and this parameter provides access to searches its contents (See http://hl7.org/fhir/SearchParameter/bundle-composition).", + "The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search its contents", }, + // http://hl7.org/fhir/SearchParameter/Bundle-type type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Bundle.type', description: - 'document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection (See http://hl7.org/fhir/SearchParameter/bundle-type).', + 'document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection', }, }; diff --git a/src/resources/1_0_2/parameters/careplan.parameters.js b/src/resources/1_0_2/parameters/careplan.parameters.js index 162c10cd..e4287a7a 100644 --- a/src/resources/1_0_2/parameters/careplan.parameters.js +++ b/src/resources/1_0_2/parameters/careplan.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,69 +8,98 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the careplan query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/CarePlan-activitycode activitycode: { type: TokenScalar, - description: - 'Detail type of activity (See http://hl7.org/fhir/SearchParameter/careplan-activitycode).', + fhirtype: 'token', + xpath: 'CarePlan.activity.detail.code', + description: 'Detail type of activity', }, - condition: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/CarePlan-activitydate + activitydate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CarePlan.activity.detail.scheduledTiming', description: - 'Health issues this plan addresses (See http://hl7.org/fhir/SearchParameter/careplan-condition).', + 'Specified date occurs within period specified by CarePlan.activity.timingSchedule', }, - subject: { + // http://hl7.org/fhir/SearchParameter/CarePlan-activityreference + activityreference: { type: GraphQLString, - description: - 'Who care plan is for (See http://hl7.org/fhir/SearchParameter/careplan-subject).', + fhirtype: 'reference', + xpath: 'CarePlan.activity.reference', + description: 'Activity details defined in specific resource', }, - activitydate: { - type: DateScalar, - description: - 'Specified date occurs within period specified by CarePlan.activity.timingSchedule (See http://hl7.org/fhir/SearchParameter/careplan-activitydate).', + // http://hl7.org/fhir/SearchParameter/CarePlan-condition + condition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.addresses', + description: 'Health issues this plan addresses', }, + // http://hl7.org/fhir/SearchParameter/CarePlan-date date: { type: DateScalar, - description: - 'Time period plan covers (See http://hl7.org/fhir/SearchParameter/careplan-date).', + fhirtype: 'date', + xpath: 'CarePlan.period', + description: 'Time period plan covers', }, + // http://hl7.org/fhir/SearchParameter/CarePlan-goal goal: { type: GraphQLString, - description: - 'Desired outcome of plan (See http://hl7.org/fhir/SearchParameter/careplan-goal).', + fhirtype: 'reference', + xpath: 'CarePlan.goal', + description: 'Desired outcome of plan', }, - related: { + // http://hl7.org/fhir/SearchParameter/CarePlan-participant + participant: { type: GraphQLString, - description: - 'A combination of the type of relationship and the related plan (See http://hl7.org/fhir/SearchParameter/careplan-related).', - }, - relatedcode: { - type: TokenScalar, - description: - 'includes | replaces | fulfills (See http://hl7.org/fhir/SearchParameter/careplan-relatedcode).', + fhirtype: 'reference', + xpath: 'CarePlan.participant.member', + description: 'Who is involved', }, + // http://hl7.org/fhir/SearchParameter/CarePlan-patient patient: { type: GraphQLString, - description: - 'Who care plan is for (See http://hl7.org/fhir/SearchParameter/careplan-patient).', - }, - participant: { - type: GraphQLString, - description: - 'Who is involved (See http://hl7.org/fhir/SearchParameter/careplan-participant).', + fhirtype: 'reference', + xpath: 'CarePlan.subject', + description: 'Who care plan is for', }, + // http://hl7.org/fhir/SearchParameter/CarePlan-performer performer: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.activity.detail.performer', description: - "Matches if the practitioner is listed as a performer in any of the 'simple' activities. (For performers of the detailed activities, chain through the activitydetail search parameter.) (See http://hl7.org/fhir/SearchParameter/careplan-performer).", + "Matches if the practitioner is listed as a performer in any of the 'simple' activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", }, - activityreference: { + // http://hl7.org/fhir/SearchParameter/CarePlan-related + related: { type: GraphQLString, + fhirtype: 'composite', + xpath: '', description: - 'Activity details defined in specific resource (See http://hl7.org/fhir/SearchParameter/careplan-activityreference).', + 'A combination of the type of relationship and the related plan', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-relatedcode + relatedcode: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.relatedPlan.code', + description: 'includes | replaces | fulfills', }, + // http://hl7.org/fhir/SearchParameter/CarePlan-relatedplan relatedplan: { type: GraphQLString, - description: - 'Plan relationship exists with (See http://hl7.org/fhir/SearchParameter/careplan-relatedplan).', + fhirtype: 'reference', + xpath: 'CarePlan.relatedPlan.plan', + description: 'Plan relationship exists with', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.subject', + description: 'Who care plan is for', }, }; diff --git a/src/resources/1_0_2/parameters/claim.parameters.js b/src/resources/1_0_2/parameters/claim.parameters.js index c2ee5e29..13b28900 100644 --- a/src/resources/1_0_2/parameters/claim.parameters.js +++ b/src/resources/1_0_2/parameters/claim.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,29 +7,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the claim query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Claim-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Claim.identifier', + description: 'The primary identifier of the financial resource', + }, + // http://hl7.org/fhir/SearchParameter/Claim-patient patient: { type: GraphQLString, - description: - 'Patient (See http://hl7.org/fhir/SearchParameter/claim-patient).', + fhirtype: 'reference', + xpath: 'Claim.patient', + description: 'Patient', }, + // http://hl7.org/fhir/SearchParameter/Claim-priority priority: { type: TokenScalar, - description: - 'Processing priority requested (See http://hl7.org/fhir/SearchParameter/claim-priority).', - }, - use: { - type: TokenScalar, - description: - 'The kind of financial resource (See http://hl7.org/fhir/SearchParameter/claim-use).', + fhirtype: 'token', + xpath: 'Claim.priority', + description: 'Processing priority requested', }, + // http://hl7.org/fhir/SearchParameter/Claim-provider provider: { type: GraphQLString, - description: - 'Provider responsible for the claim (See http://hl7.org/fhir/SearchParameter/claim-provider).', + fhirtype: 'reference', + xpath: 'Claim.provider', + description: 'Provider responsible for the claim', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Claim-use + use: { type: TokenScalar, - description: - 'The primary identifier of the financial resource (See http://hl7.org/fhir/SearchParameter/claim-identifier).', + fhirtype: 'token', + xpath: 'Claim.use', + description: 'The kind of financial resource', }, }; diff --git a/src/resources/1_0_2/parameters/claimresponse.parameters.js b/src/resources/1_0_2/parameters/claimresponse.parameters.js index cc3af725..db7560f4 100644 --- a/src/resources/1_0_2/parameters/claimresponse.parameters.js +++ b/src/resources/1_0_2/parameters/claimresponse.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the claimresponse query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ClaimResponse-identifier identifier: { type: TokenScalar, - description: - 'The identity of the insurer (See http://hl7.org/fhir/SearchParameter/claimresponse-identifier).', + fhirtype: 'token', + xpath: 'ClaimResponse.identifier', + description: 'The identity of the insurer', }, }; diff --git a/src/resources/1_0_2/parameters/clinicalimpression.parameters.js b/src/resources/1_0_2/parameters/clinicalimpression.parameters.js index 496ba4e7..88d1014b 100644 --- a/src/resources/1_0_2/parameters/clinicalimpression.parameters.js +++ b/src/resources/1_0_2/parameters/clinicalimpression.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,74 +8,102 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the clinicalimpression query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-action + action: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.action', + description: 'Actions taken during assessment', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-assessor assessor: { type: GraphQLString, - description: - 'The clinician performing the assessment (See http://hl7.org/fhir/SearchParameter/clinicalimpression-assessor).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.assessor', + description: 'The clinician performing the assessment', }, - trigger: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ClinicalImpression.date', + description: 'When the assessment occurred', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding + finding: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClinicalImpression.finding.item', + description: 'Specific text or code for finding', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-investigation + investigation: { type: GraphQLString, - description: - 'Request or event that necessitated this assessment (See http://hl7.org/fhir/SearchParameter/clinicalimpression-trigger).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.investigations.item', + description: 'Record of a specific investigation', }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-patient patient: { type: GraphQLString, - description: - 'The patient being assessed (See http://hl7.org/fhir/SearchParameter/clinicalimpression-patient).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.patient', + description: 'The patient being assessed', }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-plan plan: { type: GraphQLString, - description: - 'Plan of action after assessment (See http://hl7.org/fhir/SearchParameter/clinicalimpression-plan).', - }, - resolved: { - type: TokenScalar, - description: - 'Diagnoses/conditions resolved since previous assessment (See http://hl7.org/fhir/SearchParameter/clinicalimpression-resolved).', - }, - trigger_code: { - type: TokenScalar, - description: - 'Request or event that necessitated this assessment (See http://hl7.org/fhir/SearchParameter/clinicalimpression-trigger-code).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.plan', + description: 'Plan of action after assessment', }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-previous previous: { type: GraphQLString, - description: - 'Reference to last assessment (See http://hl7.org/fhir/SearchParameter/clinicalimpression-previous).', - }, - status: { - type: TokenScalar, - description: - 'in-progress | completed | entered-in-error (See http://hl7.org/fhir/SearchParameter/clinicalimpression-status).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.previous', + description: 'Reference to last assessment', }, - action: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-problem + problem: { type: GraphQLString, - description: - 'Actions taken during assessment (See http://hl7.org/fhir/SearchParameter/clinicalimpression-action).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.problem', + description: 'General assessment of patient state', }, - finding: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-resolved + resolved: { type: TokenScalar, - description: - 'Specific text or code for finding (See http://hl7.org/fhir/SearchParameter/clinicalimpression-finding).', + fhirtype: 'token', + xpath: 'ClinicalImpression.resolved', + description: 'Diagnoses/conditions resolved since previous assessment', }, - investigation: { - type: GraphQLString, - description: - 'Record of a specific investigation (See http://hl7.org/fhir/SearchParameter/clinicalimpression-investigation).', + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-ruledout + ruledout: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClinicalImpression.ruledOut.item', + description: 'Specific text of code for diagnosis', }, - problem: { - type: GraphQLString, - description: - 'General assessment of patient state (See http://hl7.org/fhir/SearchParameter/clinicalimpression-problem).', + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClinicalImpression.status', + description: 'in-progress | completed | entered-in-error', }, - date: { - type: DateScalar, - description: - 'When the assessment occurred (See http://hl7.org/fhir/SearchParameter/clinicalimpression-date).', + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-trigger + trigger: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.triggerReference', + description: 'Request or event that necessitated this assessment', }, - ruledout: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-trigger-code + trigger_code: { type: TokenScalar, - description: - 'Specific text of code for diagnosis (See http://hl7.org/fhir/SearchParameter/clinicalimpression-ruledout).', + fhirtype: 'token', + xpath: 'ClinicalImpression.triggerCodeableConcept', + description: 'Request or event that necessitated this assessment', }, }; diff --git a/src/resources/1_0_2/parameters/common.parameters.js b/src/resources/1_0_2/parameters/common.parameters.js deleted file mode 100644 index 7bc468d2..00000000 --- a/src/resources/1_0_2/parameters/common.parameters.js +++ /dev/null @@ -1,52 +0,0 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLString } = require('graphql'); - -/** - * @name exports - * @static - * @summary Arguments for the common query - */ -module.exports = { - _security: { - type: TokenScalar, - description: - 'Security Labels applied to this resource (See http://hl7.org/fhir/SearchParameter/resource-security).', - }, - _lastUpdated: { - type: DateScalar, - description: - 'When the resource version last changed (See http://hl7.org/fhir/SearchParameter/resource-lastUpdated).', - }, - _text: { - type: GraphQLString, - description: - 'Search on the narrative of the resource (See http://hl7.org/fhir/SearchParameter/resource-text).', - }, - _id: { - type: TokenScalar, - description: - 'Logical id of this artifact (See http://hl7.org/fhir/SearchParameter/resource-id).', - }, - _content: { - type: GraphQLString, - description: - 'Search on the entire content of the resource (See http://hl7.org/fhir/SearchParameter/resource-content).', - }, - _profile: { - type: UriScalar, - description: - 'Profiles this resource claims to conform to (See http://hl7.org/fhir/SearchParameter/resource-profile).', - }, - _query: { - type: TokenScalar, - description: - 'A custom search profile that describes a specific defined query operation (See http://hl7.org/fhir/SearchParameter/resource-query).', - }, - _tag: { - type: TokenScalar, - description: - 'Tags applied to this resource (See http://hl7.org/fhir/SearchParameter/resource-tag).', - }, -}; diff --git a/src/resources/1_0_2/parameters/communication.parameters.js b/src/resources/1_0_2/parameters/communication.parameters.js index 58b73839..5384c243 100644 --- a/src/resources/1_0_2/parameters/communication.parameters.js +++ b/src/resources/1_0_2/parameters/communication.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,64 +8,88 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the communication query */ module.exports = { - sender: { + // http://hl7.org/fhir/SearchParameter/Communication-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.category', + description: 'Message category', + }, + // http://hl7.org/fhir/SearchParameter/Communication-encounter + encounter: { type: GraphQLString, - description: - 'Message sender (See http://hl7.org/fhir/SearchParameter/communication-sender).', + fhirtype: 'reference', + xpath: 'Communication.encounter', + description: 'Encounter leading to message', }, - sent: { - type: DateScalar, - description: - 'When sent (See http://hl7.org/fhir/SearchParameter/communication-sent).', + // http://hl7.org/fhir/SearchParameter/Communication-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.identifier', + description: 'Unique identifier', }, - category: { + // http://hl7.org/fhir/SearchParameter/Communication-medium + medium: { type: TokenScalar, - description: - 'Message category (See http://hl7.org/fhir/SearchParameter/communication-category).', + fhirtype: 'token', + xpath: 'Communication.medium', + description: 'A channel of communication', }, + // http://hl7.org/fhir/SearchParameter/Communication-patient patient: { type: GraphQLString, - description: - 'Focus of message (See http://hl7.org/fhir/SearchParameter/communication-patient).', + fhirtype: 'reference', + xpath: 'Communication.subject', + description: 'Focus of message', }, - status: { - type: TokenScalar, - description: - 'in-progress | completed | suspended | rejected | failed (See http://hl7.org/fhir/SearchParameter/communication-status).', + // http://hl7.org/fhir/SearchParameter/Communication-received + received: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Communication.received', + description: 'When received', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Communication-recipient + recipient: { type: GraphQLString, - description: - 'Focus of message (See http://hl7.org/fhir/SearchParameter/communication-subject).', + fhirtype: 'reference', + xpath: 'Communication.recipient', + description: 'Message recipient', }, + // http://hl7.org/fhir/SearchParameter/Communication-request request: { type: GraphQLString, - description: - 'CommunicationRequest producing this message (See http://hl7.org/fhir/SearchParameter/communication-request).', - }, - received: { - type: DateScalar, - description: - 'When received (See http://hl7.org/fhir/SearchParameter/communication-received).', + fhirtype: 'reference', + xpath: 'Communication.requestDetail', + description: 'CommunicationRequest producing this message', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/Communication-sender + sender: { type: GraphQLString, - description: - 'Encounter leading to message (See http://hl7.org/fhir/SearchParameter/communication-encounter).', + fhirtype: 'reference', + xpath: 'Communication.sender', + description: 'Message sender', }, - identifier: { - type: TokenScalar, - description: - 'Unique identifier (See http://hl7.org/fhir/SearchParameter/communication-identifier).', + // http://hl7.org/fhir/SearchParameter/Communication-sent + sent: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Communication.sent', + description: 'When sent', }, - medium: { + // http://hl7.org/fhir/SearchParameter/Communication-status + status: { type: TokenScalar, - description: - 'A channel of communication (See http://hl7.org/fhir/SearchParameter/communication-medium).', + fhirtype: 'token', + xpath: 'Communication.status', + description: 'in-progress | completed | suspended | rejected | failed', }, - recipient: { + // http://hl7.org/fhir/SearchParameter/Communication-subject + subject: { type: GraphQLString, - description: - 'Message recipient (See http://hl7.org/fhir/SearchParameter/communication-recipient).', + fhirtype: 'reference', + xpath: 'Communication.subject', + description: 'Focus of message', }, }; diff --git a/src/resources/1_0_2/parameters/communicationrequest.parameters.js b/src/resources/1_0_2/parameters/communicationrequest.parameters.js index 1d65d909..066bfdad 100644 --- a/src/resources/1_0_2/parameters/communicationrequest.parameters.js +++ b/src/resources/1_0_2/parameters/communicationrequest.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,69 +8,96 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the communicationrequest query */ module.exports = { - sender: { - type: GraphQLString, - description: - 'Message sender (See http://hl7.org/fhir/SearchParameter/communicationrequest-sender).', - }, - requested: { - type: DateScalar, - description: - 'When ordered or proposed (See http://hl7.org/fhir/SearchParameter/communicationrequest-requested).', - }, - time: { - type: DateScalar, - description: - 'When scheduled (See http://hl7.org/fhir/SearchParameter/communicationrequest-time).', + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.category', + description: 'Message category', }, - requester: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-encounter + encounter: { type: GraphQLString, - description: - 'An individual who requested a communication (See http://hl7.org/fhir/SearchParameter/communicationrequest-requester).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.encounter', + description: 'Encounter leading to message', }, - category: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-identifier + identifier: { type: TokenScalar, - description: - 'Message category (See http://hl7.org/fhir/SearchParameter/communicationrequest-category).', + fhirtype: 'token', + xpath: 'CommunicationRequest.identifier', + description: 'Unique identifier', }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-medium + medium: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.medium', + description: 'A channel of communication', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-patient patient: { type: GraphQLString, - description: - 'Focus of message (See http://hl7.org/fhir/SearchParameter/communicationrequest-patient).', - }, - status: { - type: TokenScalar, - description: - 'proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed (See http://hl7.org/fhir/SearchParameter/communicationrequest-status).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.subject', + description: 'Focus of message', }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-priority priority: { type: TokenScalar, - description: - 'Message urgency (See http://hl7.org/fhir/SearchParameter/communicationrequest-priority).', + fhirtype: 'token', + xpath: 'CommunicationRequest.priority', + description: 'Message urgency', }, - subject: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-recipient + recipient: { type: GraphQLString, - description: - 'Focus of message (See http://hl7.org/fhir/SearchParameter/communicationrequest-subject).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.recipient', + description: 'Message recipient', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-requested + requested: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CommunicationRequest.requestedOn', + description: 'When ordered or proposed', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-requester + requester: { type: GraphQLString, - description: - 'Encounter leading to message (See http://hl7.org/fhir/SearchParameter/communicationrequest-encounter).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.requester', + description: 'An individual who requested a communication', }, - identifier: { - type: TokenScalar, - description: - 'Unique identifier (See http://hl7.org/fhir/SearchParameter/communicationrequest-identifier).', + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-sender + sender: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.sender', + description: 'Message sender', }, - medium: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-status + status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.status', description: - 'A channel of communication (See http://hl7.org/fhir/SearchParameter/communicationrequest-medium).', + 'proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed', }, - recipient: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-subject + subject: { type: GraphQLString, - description: - 'Message recipient (See http://hl7.org/fhir/SearchParameter/communicationrequest-recipient).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.subject', + description: 'Focus of message', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-time + time: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CommunicationRequest.scheduledDateTime', + description: 'When scheduled', }, }; diff --git a/src/resources/1_0_2/parameters/composition.parameters.js b/src/resources/1_0_2/parameters/composition.parameters.js index 56d98275..1e9a4a3f 100644 --- a/src/resources/1_0_2/parameters/composition.parameters.js +++ b/src/resources/1_0_2/parameters/composition.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,84 +8,116 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the composition query */ module.exports = { - status: { - type: TokenScalar, - description: - 'preliminary | final | amended | entered-in-error (See http://hl7.org/fhir/SearchParameter/composition-status).', + // http://hl7.org/fhir/SearchParameter/Composition-attester + attester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.attester.party', + description: 'Who attested the composition', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Composition-author + author: { type: GraphQLString, - description: - 'Who and/or what the composition is about (See http://hl7.org/fhir/SearchParameter/composition-subject).', + fhirtype: 'reference', + xpath: 'Composition.author', + description: 'Who and/or what authored the composition', }, + // http://hl7.org/fhir/SearchParameter/Composition-class class: { type: TokenScalar, - description: - 'Categorization of Composition (See http://hl7.org/fhir/SearchParameter/composition-class).', + fhirtype: 'token', + xpath: 'Composition.class', + description: 'Categorization of Composition', }, - encounter: { - type: GraphQLString, - description: - 'Context of the Composition (See http://hl7.org/fhir/SearchParameter/composition-encounter).', - }, - period: { - type: DateScalar, - description: - 'The period covered by the documentation (See http://hl7.org/fhir/SearchParameter/composition-period).', + // http://hl7.org/fhir/SearchParameter/Composition-confidentiality + confidentiality: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.confidentiality', + description: 'As defined by affinity domain', }, - type: { + // http://hl7.org/fhir/SearchParameter/Composition-context + context: { type: TokenScalar, - description: - 'Kind of composition (LOINC if possible) (See http://hl7.org/fhir/SearchParameter/composition-type).', + fhirtype: 'token', + xpath: 'Composition.event.code', + description: 'Code(s) that apply to the event being documented', }, + // http://hl7.org/fhir/SearchParameter/Composition-date date: { type: DateScalar, - description: - 'Composition editing time (See http://hl7.org/fhir/SearchParameter/composition-date).', - }, - section: { - type: TokenScalar, - description: - 'Classification of section (recommended) (See http://hl7.org/fhir/SearchParameter/composition-section).', + fhirtype: 'date', + xpath: 'Composition.date', + description: 'Composition editing time', }, - author: { + // http://hl7.org/fhir/SearchParameter/Composition-encounter + encounter: { type: GraphQLString, - description: - 'Who and/or what authored the composition (See http://hl7.org/fhir/SearchParameter/composition-author).', + fhirtype: 'reference', + xpath: 'Composition.encounter', + description: 'Context of the Composition', }, - title: { + // http://hl7.org/fhir/SearchParameter/Composition-entry + entry: { type: GraphQLString, - description: - 'Human Readable name/title (See http://hl7.org/fhir/SearchParameter/composition-title).', + fhirtype: 'reference', + xpath: 'Composition.section.entry', + description: 'A reference to data that supports this section', + }, + // http://hl7.org/fhir/SearchParameter/Composition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.identifier', + description: 'Logical identifier of composition (version-independent)', }, + // http://hl7.org/fhir/SearchParameter/Composition-patient patient: { type: GraphQLString, - description: - 'Who and/or what the composition is about (See http://hl7.org/fhir/SearchParameter/composition-patient).', + fhirtype: 'reference', + xpath: 'Composition.subject', + description: 'Who and/or what the composition is about', }, - confidentiality: { + // http://hl7.org/fhir/SearchParameter/Composition-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Composition.event.period', + description: 'The period covered by the documentation', + }, + // http://hl7.org/fhir/SearchParameter/Composition-section + section: { type: TokenScalar, - description: - 'As defined by affinity domain (See http://hl7.org/fhir/SearchParameter/composition-confidentiality).', + fhirtype: 'token', + xpath: 'Composition.section.code', + description: 'Classification of section (recommended)', }, - attester: { - type: GraphQLString, - description: - 'Who attested the composition (See http://hl7.org/fhir/SearchParameter/composition-attester).', + // http://hl7.org/fhir/SearchParameter/Composition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.status', + description: 'preliminary | final | amended | entered-in-error', }, - entry: { + // http://hl7.org/fhir/SearchParameter/Composition-subject + subject: { type: GraphQLString, - description: - 'A reference to data that supports this section (See http://hl7.org/fhir/SearchParameter/composition-entry).', + fhirtype: 'reference', + xpath: 'Composition.subject', + description: 'Who and/or what the composition is about', }, - context: { - type: TokenScalar, - description: - 'Code(s) that apply to the event being documented (See http://hl7.org/fhir/SearchParameter/composition-context).', + // http://hl7.org/fhir/SearchParameter/Composition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Composition.title', + description: 'Human Readable name/title', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Composition-type + type: { type: TokenScalar, - description: - 'Logical identifier of composition (version-independent) (See http://hl7.org/fhir/SearchParameter/composition-identifier).', + fhirtype: 'token', + xpath: 'Composition.type', + description: 'Kind of composition (LOINC if possible)', }, }; diff --git a/src/resources/1_0_2/parameters/conceptmap.parameters.js b/src/resources/1_0_2/parameters/conceptmap.parameters.js index 45132115..968077e1 100644 --- a/src/resources/1_0_2/parameters/conceptmap.parameters.js +++ b/src/resources/1_0_2/parameters/conceptmap.parameters.js @@ -1,7 +1,7 @@ -const UriScalar = require('../scalars/uri.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,94 +9,130 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the conceptmap query */ module.exports = { - dependson: { - type: UriScalar, - description: - 'Reference to element/field/ValueSet mapping depends on (See http://hl7.org/fhir/SearchParameter/conceptmap-dependson).', - }, - status: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-context + context: { type: TokenScalar, - description: - 'Status of the concept map (See http://hl7.org/fhir/SearchParameter/conceptmap-status).', + fhirtype: 'token', + xpath: 'ConceptMap.useContext', + description: 'A use context assigned to the concept map', }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-date date: { type: DateScalar, - description: - 'The concept map publication date (See http://hl7.org/fhir/SearchParameter/conceptmap-date).', + fhirtype: 'date', + xpath: 'ConceptMap.date', + description: 'The concept map publication date', }, - url: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-dependson + dependson: { type: UriScalar, - description: - 'The URL of the concept map (See http://hl7.org/fhir/SearchParameter/conceptmap-url).', + fhirtype: 'uri', + xpath: 'ConceptMap.element.target.dependsOn.element', + description: 'Reference to element/field/ValueSet mapping depends on', }, - targetsystem: { - type: UriScalar, - description: - 'System of the target (if necessary) (See http://hl7.org/fhir/SearchParameter/conceptmap-targetsystem).', + // http://hl7.org/fhir/SearchParameter/ConceptMap-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ConceptMap.description', + description: 'Text search in the description of the concept map', }, - version: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-identifier + identifier: { type: TokenScalar, - description: - 'The version identifier of the concept map (See http://hl7.org/fhir/SearchParameter/conceptmap-version).', + fhirtype: 'token', + xpath: 'ConceptMap.identifier', + description: 'Additional identifier for the concept map', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-name + name: { type: GraphQLString, - description: - 'Name of the publisher of the concept map (See http://hl7.org/fhir/SearchParameter/conceptmap-publisher).', + fhirtype: 'string', + xpath: 'ConceptMap.name', + description: 'Name of the concept map', }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-product product: { type: UriScalar, - description: - 'Reference to element/field/ValueSet mapping depends on (See http://hl7.org/fhir/SearchParameter/conceptmap-product).', + fhirtype: 'uri', + xpath: 'ConceptMap.element.target.product.element', + description: 'Reference to element/field/ValueSet mapping depends on', }, - sourcecode: { - type: TokenScalar, - description: - 'Identifies element being mapped (See http://hl7.org/fhir/SearchParameter/conceptmap-sourcecode).', - }, - sourceuri: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-publisher + publisher: { type: GraphQLString, - description: - 'Identifies the source of the concepts which are being mapped (See http://hl7.org/fhir/SearchParameter/conceptmap-sourceuri).', + fhirtype: 'string', + xpath: 'ConceptMap.publisher', + description: 'Name of the publisher of the concept map', }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-source source: { type: GraphQLString, - description: - 'Identifies the source of the concepts which are being mapped (See http://hl7.org/fhir/SearchParameter/conceptmap-source).', + fhirtype: 'reference', + xpath: 'ConceptMap.sourceReference', + description: 'Identifies the source of the concepts which are being mapped', }, - description: { - type: GraphQLString, - description: - 'Text search in the description of the concept map (See http://hl7.org/fhir/SearchParameter/conceptmap-description).', + // http://hl7.org/fhir/SearchParameter/ConceptMap-sourcecode + sourcecode: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.element.code', + description: 'Identifies element being mapped', }, - name: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-sourcesystem + sourcesystem: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.element.codeSystem', + description: 'Code System (if value set crosses code systems)', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-sourceuri + sourceuri: { type: GraphQLString, - description: - 'Name of the concept map (See http://hl7.org/fhir/SearchParameter/conceptmap-name).', + fhirtype: 'reference', + xpath: 'ConceptMap.sourceUri', + description: 'Identifies the source of the concepts which are being mapped', }, - context: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-status + status: { type: TokenScalar, - description: - 'A use context assigned to the concept map (See http://hl7.org/fhir/SearchParameter/conceptmap-context).', + fhirtype: 'token', + xpath: 'ConceptMap.status', + description: 'Status of the concept map', }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-target target: { type: GraphQLString, - description: - 'Provides context to the mappings (See http://hl7.org/fhir/SearchParameter/conceptmap-target).', + fhirtype: 'reference', + xpath: 'ConceptMap.targetUri', + description: 'Provides context to the mappings', }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-targetcode targetcode: { type: TokenScalar, - description: - 'Code that identifies the target element (See http://hl7.org/fhir/SearchParameter/conceptmap-targetcode).', + fhirtype: 'token', + xpath: 'ConceptMap.element.target.code', + description: 'Code that identifies the target element', }, - identifier: { - type: TokenScalar, - description: - 'Additional identifier for the concept map (See http://hl7.org/fhir/SearchParameter/conceptmap-identifier).', + // http://hl7.org/fhir/SearchParameter/ConceptMap-targetsystem + targetsystem: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.element.target.codeSystem', + description: 'System of the target (if necessary)', }, - sourcesystem: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-url + url: { type: UriScalar, - description: - 'Code System (if value set crosses code systems) (See http://hl7.org/fhir/SearchParameter/conceptmap-sourcesystem).', + fhirtype: 'uri', + xpath: 'ConceptMap.url', + description: 'The URL of the concept map', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.version', + description: 'The version identifier of the concept map', }, }; diff --git a/src/resources/1_0_2/parameters/condition.parameters.js b/src/resources/1_0_2/parameters/condition.parameters.js index 55ce4214..fdc89ec9 100644 --- a/src/resources/1_0_2/parameters/condition.parameters.js +++ b/src/resources/1_0_2/parameters/condition.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,74 +8,109 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the condition query */ module.exports = { - date_recorded: { - type: DateScalar, - description: - 'A date, when the Condition statement was documented (See http://hl7.org/fhir/SearchParameter/condition-date-recorded).', - }, + // http://hl7.org/fhir/SearchParameter/Condition-asserter asserter: { type: GraphQLString, - description: - 'Person who asserts this condition (See http://hl7.org/fhir/SearchParameter/condition-asserter).', - }, - onset: { - type: DateScalar, - description: - 'Date related onsets (dateTime and Period) (See http://hl7.org/fhir/SearchParameter/condition-onset).', - }, - evidence: { - type: TokenScalar, - description: - 'Manifestation/symptom (See http://hl7.org/fhir/SearchParameter/condition-evidence).', + fhirtype: 'reference', + xpath: 'Condition.asserter', + description: 'Person who asserts this condition', }, + // http://hl7.org/fhir/SearchParameter/Condition-body-site body_site: { type: TokenScalar, - description: - 'Anatomical location, if relevant (See http://hl7.org/fhir/SearchParameter/condition-body-site).', + fhirtype: 'token', + xpath: 'Condition.bodySite', + description: 'Anatomical location, if relevant', }, - onset_info: { - type: GraphQLString, - description: - 'Other onsets (boolean, age, range, string) (See http://hl7.org/fhir/SearchParameter/condition-onset-info).', + // http://hl7.org/fhir/SearchParameter/Condition-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.category', + description: 'The category of the condition', }, - severity: { + // http://hl7.org/fhir/SearchParameter/Condition-clinicalstatus + clinicalstatus: { type: TokenScalar, - description: - 'The severity of the condition (See http://hl7.org/fhir/SearchParameter/condition-severity).', + fhirtype: 'token', + xpath: 'Condition.clinicalStatus', + description: 'The clinical status of the condition', }, + // http://hl7.org/fhir/SearchParameter/Condition-code code: { type: TokenScalar, - description: - 'Code for the condition (See http://hl7.org/fhir/SearchParameter/condition-code).', + fhirtype: 'token', + xpath: 'Condition.code', + description: 'Code for the condition', + }, + // http://hl7.org/fhir/SearchParameter/Condition-date-recorded + date_recorded: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Condition.dateRecorded', + description: 'A date, when the Condition statement was documented', }, + // http://hl7.org/fhir/SearchParameter/Condition-encounter encounter: { type: GraphQLString, - description: - 'Encounter when condition first asserted (See http://hl7.org/fhir/SearchParameter/condition-encounter).', + fhirtype: 'reference', + xpath: 'Condition.encounter', + description: 'Encounter when condition first asserted', }, - stage: { + // http://hl7.org/fhir/SearchParameter/Condition-evidence + evidence: { type: TokenScalar, - description: - 'Simple summary (disease specific) (See http://hl7.org/fhir/SearchParameter/condition-stage).', + fhirtype: 'token', + xpath: 'Condition.evidence.code', + description: 'Manifestation/symptom', }, - category: { + // http://hl7.org/fhir/SearchParameter/Condition-identifier + identifier: { type: TokenScalar, - description: - 'The category of the condition (See http://hl7.org/fhir/SearchParameter/condition-category).', + fhirtype: 'token', + xpath: 'Condition.identifier', + description: 'A unique identifier of the condition record', }, + // http://hl7.org/fhir/SearchParameter/Condition-onset + onset: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Condition.onsetDateTime', + description: 'Date related onsets (dateTime and Period)', + }, + // http://hl7.org/fhir/SearchParameter/Condition-onset-info + onset_info: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Condition.onsetDateTime', + description: 'Other onsets (boolean, age, range, string)', + }, + // http://hl7.org/fhir/SearchParameter/Condition-patient patient: { type: GraphQLString, - description: - 'Who has the condition? (See http://hl7.org/fhir/SearchParameter/condition-patient).', + fhirtype: 'reference', + xpath: 'Condition.patient', + description: 'Who has the condition?', }, - clinicalstatus: { + // http://hl7.org/fhir/SearchParameter/Condition-severity + severity: { type: TokenScalar, - description: - 'The clinical status of the condition (See http://hl7.org/fhir/SearchParameter/condition-clinicalstatus).', + fhirtype: 'token', + xpath: 'Condition.severity', + description: 'The severity of the condition', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Condition-stage + stage: { type: TokenScalar, - description: - 'A unique identifier of the condition record (See http://hl7.org/fhir/SearchParameter/condition-identifier).', + fhirtype: 'token', + xpath: 'Condition.stage.summary', + description: 'Simple summary (disease specific)', + }, + // http://hl7.org/fhir/SearchParameter/condition-daf-Condition-age + age: { + type: GraphQLString, + fhirtype: 'number', + xpath: '', + description: 'Search based on Condition onsetAge', }, }; diff --git a/src/resources/1_0_2/parameters/conformance.parameters.js b/src/resources/1_0_2/parameters/conformance.parameters.js index 215ff4cc..b1e83ca6 100644 --- a/src/resources/1_0_2/parameters/conformance.parameters.js +++ b/src/resources/1_0_2/parameters/conformance.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,84 +9,118 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the conformance query */ module.exports = { - status: { - type: TokenScalar, - description: - 'The current status of the conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-status).', + // http://hl7.org/fhir/SearchParameter/Conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Conformance.date', + description: 'The conformance statement publication date', }, - resource: { + // http://hl7.org/fhir/SearchParameter/Conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Conformance.description', + description: 'Text search in the description of the conformance statement', + }, + // http://hl7.org/fhir/SearchParameter/Conformance-event + event: { type: TokenScalar, - description: - 'Name of a resource mentioned in a conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-resource).', + fhirtype: 'token', + xpath: 'Conformance.messaging.event.code', + description: 'Event code in a conformance statement', }, - security: { + // http://hl7.org/fhir/SearchParameter/Conformance-fhirversion + fhirversion: { type: TokenScalar, - description: - 'OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates (See http://hl7.org/fhir/SearchParameter/conformance-security).', + fhirtype: 'token', + xpath: 'Conformance.version', + description: 'The version of FHIR', }, + // http://hl7.org/fhir/SearchParameter/Conformance-format format: { type: TokenScalar, - description: - 'formats supported (xml | json | mime type) (See http://hl7.org/fhir/SearchParameter/conformance-format).', + fhirtype: 'token', + xpath: 'Conformance.format', + description: 'formats supported (xml | json | mime type)', }, - date: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/Conformance-mode + mode: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Conformance.rest.mode', description: - 'The conformance statement publication date (See http://hl7.org/fhir/SearchParameter/conformance-date).', + 'Mode - restful (server/client) or messaging (sender/receiver)', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-url).', + // http://hl7.org/fhir/SearchParameter/Conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Conformance.name', + description: 'Name of the conformance statement', }, - version: { - type: TokenScalar, - description: - 'The version identifier of the conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-version).', + // http://hl7.org/fhir/SearchParameter/Conformance-profile + profile: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Conformance.rest.resource.profile', + description: 'A profile id invoked in a conformance statement', }, + // http://hl7.org/fhir/SearchParameter/Conformance-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-publisher).', + fhirtype: 'string', + xpath: 'Conformance.publisher', + description: 'Name of the publisher of the conformance statement', }, - mode: { + // http://hl7.org/fhir/SearchParameter/Conformance-resource + resource: { type: TokenScalar, - description: - 'Mode - restful (server/client) or messaging (sender/receiver) (See http://hl7.org/fhir/SearchParameter/conformance-mode).', + fhirtype: 'token', + xpath: 'Conformance.rest.resource.type', + description: 'Name of a resource mentioned in a conformance statement', }, - software: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Conformance-security + security: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Conformance.rest.security.service', description: - 'Part of a the name of a software application (See http://hl7.org/fhir/SearchParameter/conformance-software).', + 'OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates', }, - description: { + // http://hl7.org/fhir/SearchParameter/Conformance-software + software: { type: GraphQLString, - description: - 'Text search in the description of the conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-description).', + fhirtype: 'string', + xpath: 'Conformance.software.name', + description: 'Part of a the name of a software application', }, - event: { + // http://hl7.org/fhir/SearchParameter/Conformance-status + status: { type: TokenScalar, - description: - 'Event code in a conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-event).', - }, - name: { - type: GraphQLString, - description: - 'Name of the conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-name).', + fhirtype: 'token', + xpath: 'Conformance.status', + description: 'The current status of the conformance statement', }, + // http://hl7.org/fhir/SearchParameter/Conformance-supported-profile supported_profile: { type: GraphQLString, - description: - 'Profiles for use cases supported (See http://hl7.org/fhir/SearchParameter/conformance-supported-profile).', + fhirtype: 'reference', + xpath: 'Conformance.profile', + description: 'Profiles for use cases supported', }, - fhirversion: { - type: TokenScalar, - description: - 'The version of FHIR (See http://hl7.org/fhir/SearchParameter/conformance-fhirversion).', + // http://hl7.org/fhir/SearchParameter/Conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Conformance.url', + description: 'The uri that identifies the conformance statement', }, - profile: { - type: GraphQLString, - description: - 'A profile id invoked in a conformance statement (See http://hl7.org/fhir/SearchParameter/conformance-profile).', + // http://hl7.org/fhir/SearchParameter/Conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Conformance.version', + description: 'The version identifier of the conformance statement', }, }; diff --git a/src/resources/1_0_2/parameters/contract.parameters.js b/src/resources/1_0_2/parameters/contract.parameters.js index e7d6d8d2..51f323f4 100644 --- a/src/resources/1_0_2/parameters/contract.parameters.js +++ b/src/resources/1_0_2/parameters/contract.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,29 +7,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the contract query */ module.exports = { - signer: { + // http://hl7.org/fhir/SearchParameter/Contract-actor + actor: { type: GraphQLString, - description: - 'Contract Signatory Party (See http://hl7.org/fhir/SearchParameter/contract-signer).', + fhirtype: 'reference', + xpath: 'Contract.actor.entity', + description: 'Contract Actor Type', + }, + // http://hl7.org/fhir/SearchParameter/Contract-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Contract.identifier', + description: 'The identity of the contract', }, + // http://hl7.org/fhir/SearchParameter/Contract-patient patient: { type: GraphQLString, - description: - 'The identity of the target of the contract (if a patient) (See http://hl7.org/fhir/SearchParameter/contract-patient).', + fhirtype: 'reference', + xpath: 'Contract.subject', + description: 'The identity of the target of the contract (if a patient)', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Contract-signer + signer: { type: GraphQLString, - description: - 'The identity of the target of the contract (See http://hl7.org/fhir/SearchParameter/contract-subject).', + fhirtype: 'reference', + xpath: 'Contract.signer.party', + description: 'Contract Signatory Party', }, - actor: { + // http://hl7.org/fhir/SearchParameter/Contract-subject + subject: { type: GraphQLString, - description: - 'Contract Actor Type (See http://hl7.org/fhir/SearchParameter/contract-actor).', - }, - identifier: { - type: TokenScalar, - description: - 'The identity of the contract (See http://hl7.org/fhir/SearchParameter/contract-identifier).', + fhirtype: 'reference', + xpath: 'Contract.subject', + description: 'The identity of the target of the contract', }, }; diff --git a/src/resources/1_0_2/parameters/coverage.parameters.js b/src/resources/1_0_2/parameters/coverage.parameters.js index 7dd7014c..36658508 100644 --- a/src/resources/1_0_2/parameters/coverage.parameters.js +++ b/src/resources/1_0_2/parameters/coverage.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,44 +7,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the coverage query */ module.exports = { - plan: { + // http://hl7.org/fhir/SearchParameter/Coverage-dependent + dependent: { type: TokenScalar, - description: - 'A plan or policy identifier (See http://hl7.org/fhir/SearchParameter/coverage-plan).', - }, - issuer: { - type: GraphQLString, - description: - 'The identity of the insurer (See http://hl7.org/fhir/SearchParameter/coverage-issuer).', + fhirtype: 'token', + xpath: 'Coverage.dependent', + description: 'Dependent number', }, - sequence: { + // http://hl7.org/fhir/SearchParameter/Coverage-group + group: { type: TokenScalar, - description: - 'Sequence number (See http://hl7.org/fhir/SearchParameter/coverage-sequence).', + fhirtype: 'token', + xpath: 'Coverage.group', + description: 'Group identifier', }, - dependent: { + // http://hl7.org/fhir/SearchParameter/Coverage-identifier + identifier: { type: TokenScalar, - description: - 'Dependent number (See http://hl7.org/fhir/SearchParameter/coverage-dependent).', + fhirtype: 'token', + xpath: 'Coverage.identifier', + description: 'The primary identifier of the insured', }, - group: { - type: TokenScalar, - description: - 'Group identifier (See http://hl7.org/fhir/SearchParameter/coverage-group).', + // http://hl7.org/fhir/SearchParameter/Coverage-issuer + issuer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Coverage.issuer', + description: 'The identity of the insurer', }, - type: { + // http://hl7.org/fhir/SearchParameter/Coverage-plan + plan: { type: TokenScalar, - description: - 'The kind of coverage (See http://hl7.org/fhir/SearchParameter/coverage-type).', + fhirtype: 'token', + xpath: 'Coverage.plan', + description: 'A plan or policy identifier', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Coverage-sequence + sequence: { type: TokenScalar, - description: - 'The primary identifier of the insured (See http://hl7.org/fhir/SearchParameter/coverage-identifier).', + fhirtype: 'token', + xpath: 'Coverage.sequence', + description: 'Sequence number', }, + // http://hl7.org/fhir/SearchParameter/Coverage-subplan subplan: { type: TokenScalar, - description: - 'Sub-plan identifier (See http://hl7.org/fhir/SearchParameter/coverage-subplan).', + fhirtype: 'token', + xpath: 'Coverage.subPlan', + description: 'Sub-plan identifier', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Coverage.type', + description: 'The kind of coverage', }, }; diff --git a/src/resources/1_0_2/parameters/dataelement.parameters.js b/src/resources/1_0_2/parameters/dataelement.parameters.js index cb8a6d0c..12079ff0 100644 --- a/src/resources/1_0_2/parameters/dataelement.parameters.js +++ b/src/resources/1_0_2/parameters/dataelement.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,59 +9,99 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the dataelement query */ module.exports = { - stringency: { + // http://hl7.org/fhir/SearchParameter/DataElement-code + code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DataElement.element.code', description: - 'The stringency of the data element definition (See http://hl7.org/fhir/SearchParameter/dataelement-stringency).', + 'A code for the data element (server may choose to do subsumption)', }, - status: { + // http://hl7.org/fhir/SearchParameter/DataElement-context + context: { type: TokenScalar, - description: - 'The current status of the data element (See http://hl7.org/fhir/SearchParameter/dataelement-status).', + fhirtype: 'token', + xpath: 'DataElement.useContext', + description: 'A use context assigned to the data element', }, + // http://hl7.org/fhir/SearchParameter/DataElement-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DataElement.date', + description: 'The data element publication date', + }, + // http://hl7.org/fhir/SearchParameter/DataElement-description description: { type: GraphQLString, + fhirtype: 'string', + xpath: 'DataElement.element.definition', description: - 'Text search in the description of the data element. This corresponds to the definition of the first DataElement.element. (See http://hl7.org/fhir/SearchParameter/dataelement-description).', + 'Text search in the description of the data element. This corresponds to the definition of the first DataElement.element.', }, + // http://hl7.org/fhir/SearchParameter/DataElement-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DataElement.identifier', + description: 'The identifier of the data element', + }, + // http://hl7.org/fhir/SearchParameter/DataElement-name name: { type: GraphQLString, - description: - 'Name of the data element (See http://hl7.org/fhir/SearchParameter/dataelement-name).', + fhirtype: 'string', + xpath: 'DataElement.name', + description: 'Name of the data element', }, - context: { - type: TokenScalar, - description: - 'A use context assigned to the data element (See http://hl7.org/fhir/SearchParameter/dataelement-context).', + // http://hl7.org/fhir/SearchParameter/DataElement-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'DataElement.publisher', + description: 'Name of the publisher of the data element', }, - code: { + // http://hl7.org/fhir/SearchParameter/DataElement-status + status: { type: TokenScalar, - description: - 'A code for the data element (server may choose to do subsumption) (See http://hl7.org/fhir/SearchParameter/dataelement-code).', - }, - date: { - type: DateScalar, - description: - 'The data element publication date (See http://hl7.org/fhir/SearchParameter/dataelement-date).', + fhirtype: 'token', + xpath: 'DataElement.status', + description: 'The current status of the data element', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/DataElement-stringency + stringency: { type: TokenScalar, - description: - 'The identifier of the data element (See http://hl7.org/fhir/SearchParameter/dataelement-identifier).', + fhirtype: 'token', + xpath: 'DataElement.stringency', + description: 'The stringency of the data element definition', }, + // http://hl7.org/fhir/SearchParameter/DataElement-url url: { type: UriScalar, - description: - 'The official URL for the data element (See http://hl7.org/fhir/SearchParameter/dataelement-url).', - }, - publisher: { - type: GraphQLString, - description: - 'Name of the publisher of the data element (See http://hl7.org/fhir/SearchParameter/dataelement-publisher).', + fhirtype: 'uri', + xpath: 'DataElement.url', + description: 'The official URL for the data element', }, + // http://hl7.org/fhir/SearchParameter/DataElement-version version: { type: GraphQLString, - description: - 'The version identifier of the data element (See http://hl7.org/fhir/SearchParameter/dataelement-version).', + fhirtype: 'string', + xpath: 'DataElement.version', + description: 'The version identifier of the data element', + }, + // http://hl7.org/fhir/SearchParameter/elementdefinition-11179-DataElement-objectClass + objectClass: { + type: TokenScalar, + fhirtype: 'token', + xpath: + "DataElement.element.mapping.extension[@url='http://hl7.org/fhir/StructureDefinition/11179-objectClass']", + description: 'Matches on the 11179-objectClass extension value', + }, + // http://hl7.org/fhir/SearchParameter/elementdefinition-11179-DataElement-objectClassProperty + objectClassProperty: { + type: TokenScalar, + fhirtype: 'token', + xpath: + "DataElement.element.mapping.extension[@url='http://hl7.org/fhir/StructureDefinition/11179-objectClassProperty']", + description: 'Matches on the 11179-objectClassProperty extension value', }, }; diff --git a/src/resources/1_0_2/parameters/detectedissue.parameters.js b/src/resources/1_0_2/parameters/detectedissue.parameters.js index ab0c16fb..ecc9f78c 100644 --- a/src/resources/1_0_2/parameters/detectedissue.parameters.js +++ b/src/resources/1_0_2/parameters/detectedissue.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,34 +8,46 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the detectedissue query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/DetectedIssue-author author: { type: GraphQLString, - description: - 'The provider or device that identified the issue (See http://hl7.org/fhir/SearchParameter/detectedissue-author).', + fhirtype: 'reference', + xpath: 'DetectedIssue.author', + description: 'The provider or device that identified the issue', }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-category category: { type: TokenScalar, - description: - 'Issue Category, e.g. drug-drug, duplicate therapy, etc. (See http://hl7.org/fhir/SearchParameter/detectedissue-category).', - }, - implicated: { - type: GraphQLString, - description: - 'Problem resource (See http://hl7.org/fhir/SearchParameter/detectedissue-implicated).', - }, - patient: { - type: GraphQLString, - description: - 'Associated patient (See http://hl7.org/fhir/SearchParameter/detectedissue-patient).', + fhirtype: 'token', + xpath: 'DetectedIssue.category', + description: 'Issue Category, e.g. drug-drug, duplicate therapy, etc.', }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-date date: { type: DateScalar, - description: - 'When identified (See http://hl7.org/fhir/SearchParameter/detectedissue-date).', + fhirtype: 'date', + xpath: 'DetectedIssue.date', + description: 'When identified', }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-identifier identifier: { type: TokenScalar, - description: - 'Unique id for the detected issue (See http://hl7.org/fhir/SearchParameter/detectedissue-identifier).', + fhirtype: 'token', + xpath: 'DetectedIssue.identifier', + description: 'Unique id for the detected issue', + }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-implicated + implicated: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DetectedIssue.implicated', + description: 'Problem resource', + }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DetectedIssue.patient', + description: 'Associated patient', }, }; diff --git a/src/resources/1_0_2/parameters/device.parameters.js b/src/resources/1_0_2/parameters/device.parameters.js index 12d98e42..312e55d3 100644 --- a/src/resources/1_0_2/parameters/device.parameters.js +++ b/src/resources/1_0_2/parameters/device.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,49 +8,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the device query */ module.exports = { - organization: { - type: GraphQLString, - description: - 'The organization responsible for the device (See http://hl7.org/fhir/SearchParameter/device-organization).', + // http://hl7.org/fhir/SearchParameter/Device-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Device.identifier', + description: 'Instance id from manufacturer, owner, and others', }, - model: { + // http://hl7.org/fhir/SearchParameter/Device-location + location: { type: GraphQLString, - description: - 'The model of the device (See http://hl7.org/fhir/SearchParameter/device-model).', + fhirtype: 'reference', + xpath: 'Device.location', + description: 'A location, where the resource is found', }, - patient: { + // http://hl7.org/fhir/SearchParameter/Device-manufacturer + manufacturer: { type: GraphQLString, - description: - 'Patient information, if the resource is affixed to a person (See http://hl7.org/fhir/SearchParameter/device-patient).', + fhirtype: 'string', + xpath: 'Device.manufacturer', + description: 'The manufacturer of the device', }, - location: { + // http://hl7.org/fhir/SearchParameter/Device-model + model: { type: GraphQLString, - description: - 'A location, where the resource is found (See http://hl7.org/fhir/SearchParameter/device-location).', + fhirtype: 'string', + xpath: 'Device.model', + description: 'The model of the device', }, - manufacturer: { + // http://hl7.org/fhir/SearchParameter/Device-organization + organization: { type: GraphQLString, - description: - 'The manufacturer of the device (See http://hl7.org/fhir/SearchParameter/device-manufacturer).', + fhirtype: 'reference', + xpath: 'Device.owner', + description: 'The organization responsible for the device', }, - udi: { + // http://hl7.org/fhir/SearchParameter/Device-patient + patient: { type: GraphQLString, - description: - 'FDA mandated Unique Device Identifier (See http://hl7.org/fhir/SearchParameter/device-udi).', + fhirtype: 'reference', + xpath: 'Device.patient', + description: 'Patient information, if the resource is affixed to a person', }, + // http://hl7.org/fhir/SearchParameter/Device-type type: { type: TokenScalar, - description: - 'The type of the device (See http://hl7.org/fhir/SearchParameter/device-type).', + fhirtype: 'token', + xpath: 'Device.type', + description: 'The type of the device', }, - identifier: { - type: TokenScalar, - description: - 'Instance id from manufacturer, owner, and others (See http://hl7.org/fhir/SearchParameter/device-identifier).', + // http://hl7.org/fhir/SearchParameter/Device-udi + udi: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Device.udi', + description: 'FDA mandated Unique Device Identifier', }, + // http://hl7.org/fhir/SearchParameter/Device-url url: { type: UriScalar, - description: - 'Network address to contact device (See http://hl7.org/fhir/SearchParameter/device-url).', + fhirtype: 'uri', + xpath: 'Device.url', + description: 'Network address to contact device', }, }; diff --git a/src/resources/1_0_2/parameters/devicecomponent.parameters.js b/src/resources/1_0_2/parameters/devicecomponent.parameters.js index 0922fbe5..2fd413a0 100644 --- a/src/resources/1_0_2/parameters/devicecomponent.parameters.js +++ b/src/resources/1_0_2/parameters/devicecomponent.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,19 +7,25 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the devicecomponent query */ module.exports = { - source: { + // http://hl7.org/fhir/SearchParameter/DeviceComponent-parent + parent: { type: GraphQLString, - description: - 'The device source (See http://hl7.org/fhir/SearchParameter/devicecomponent-source).', + fhirtype: 'reference', + xpath: 'DeviceComponent.parent', + description: 'The parent DeviceComponent resource', }, - parent: { + // http://hl7.org/fhir/SearchParameter/DeviceComponent-source + source: { type: GraphQLString, - description: - 'The parent DeviceComponent resource (See http://hl7.org/fhir/SearchParameter/devicecomponent-parent).', + fhirtype: 'reference', + xpath: 'DeviceComponent.source', + description: 'The device source', }, + // http://hl7.org/fhir/SearchParameter/DeviceComponent-type type: { type: TokenScalar, - description: - 'The device component type (See http://hl7.org/fhir/SearchParameter/devicecomponent-type).', + fhirtype: 'token', + xpath: 'DeviceComponent.type', + description: 'The device component type', }, }; diff --git a/src/resources/1_0_2/parameters/devicemetric.parameters.js b/src/resources/1_0_2/parameters/devicemetric.parameters.js index c6e510b0..c1037bfc 100644 --- a/src/resources/1_0_2/parameters/devicemetric.parameters.js +++ b/src/resources/1_0_2/parameters/devicemetric.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,29 +7,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the devicemetric query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/DeviceMetric-category category: { type: TokenScalar, - description: - 'The category of the metric (See http://hl7.org/fhir/SearchParameter/devicemetric-category).', + fhirtype: 'token', + xpath: 'DeviceMetric.category', + description: 'The category of the metric', }, - source: { - type: GraphQLString, - description: - 'The device resource (See http://hl7.org/fhir/SearchParameter/devicemetric-source).', + // http://hl7.org/fhir/SearchParameter/DeviceMetric-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceMetric.identifier', + description: 'The identifier of the metric', }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-parent parent: { type: GraphQLString, - description: - 'The parent DeviceMetric resource (See http://hl7.org/fhir/SearchParameter/devicemetric-parent).', + fhirtype: 'reference', + xpath: 'DeviceMetric.parent', + description: 'The parent DeviceMetric resource', }, - type: { - type: TokenScalar, - description: - 'The component type (See http://hl7.org/fhir/SearchParameter/devicemetric-type).', + // http://hl7.org/fhir/SearchParameter/DeviceMetric-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceMetric.source', + description: 'The device resource', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/DeviceMetric-type + type: { type: TokenScalar, - description: - 'The identifier of the metric (See http://hl7.org/fhir/SearchParameter/devicemetric-identifier).', + fhirtype: 'token', + xpath: 'DeviceMetric.type', + description: 'The component type', }, }; diff --git a/src/resources/1_0_2/parameters/deviceuserequest.parameters.js b/src/resources/1_0_2/parameters/deviceuserequest.parameters.js index a36caff2..e8f89a70 100644 --- a/src/resources/1_0_2/parameters/deviceuserequest.parameters.js +++ b/src/resources/1_0_2/parameters/deviceuserequest.parameters.js @@ -6,19 +6,25 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the deviceuserequest query */ module.exports = { - patient: { + // http://hl7.org/fhir/SearchParameter/DeviceUseRequest-device + device: { type: GraphQLString, - description: - 'Search by subject - a patient (See http://hl7.org/fhir/SearchParameter/deviceuserequest-patient).', + fhirtype: 'reference', + xpath: 'DeviceUseRequest.device', + description: 'Device requested', }, - subject: { + // http://hl7.org/fhir/SearchParameter/DeviceUseRequest-patient + patient: { type: GraphQLString, - description: - 'Search by subject (See http://hl7.org/fhir/SearchParameter/deviceuserequest-subject).', + fhirtype: 'reference', + xpath: 'DeviceUseRequest.subject', + description: 'Search by subject - a patient', }, - device: { + // http://hl7.org/fhir/SearchParameter/DeviceUseRequest-subject + subject: { type: GraphQLString, - description: - 'Device requested (See http://hl7.org/fhir/SearchParameter/deviceuserequest-device).', + fhirtype: 'reference', + xpath: 'DeviceUseRequest.subject', + description: 'Search by subject', }, }; diff --git a/src/resources/1_0_2/parameters/deviceusestatement.parameters.js b/src/resources/1_0_2/parameters/deviceusestatement.parameters.js index 90a0de44..20593ace 100644 --- a/src/resources/1_0_2/parameters/deviceusestatement.parameters.js +++ b/src/resources/1_0_2/parameters/deviceusestatement.parameters.js @@ -6,19 +6,25 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the deviceusestatement query */ module.exports = { - patient: { + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-device + device: { type: GraphQLString, - description: - 'Search by subject - a patient (See http://hl7.org/fhir/SearchParameter/deviceusestatement-patient).', + fhirtype: 'reference', + xpath: 'DeviceUseStatement.device', + description: 'Search by device', }, - subject: { + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-patient + patient: { type: GraphQLString, - description: - 'Search by subject (See http://hl7.org/fhir/SearchParameter/deviceusestatement-subject).', + fhirtype: 'reference', + xpath: 'DeviceUseStatement.subject', + description: 'Search by subject - a patient', }, - device: { + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-subject + subject: { type: GraphQLString, - description: - 'Search by device (See http://hl7.org/fhir/SearchParameter/deviceusestatement-device).', + fhirtype: 'reference', + xpath: 'DeviceUseStatement.subject', + description: 'Search by subject', }, }; diff --git a/src/resources/1_0_2/parameters/diagnosticorder.parameters.js b/src/resources/1_0_2/parameters/diagnosticorder.parameters.js index b2dc0470..edec7b06 100644 --- a/src/resources/1_0_2/parameters/diagnosticorder.parameters.js +++ b/src/resources/1_0_2/parameters/diagnosticorder.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,89 +8,127 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the diagnosticorder query */ module.exports = { - orderer: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-actor + actor: { type: GraphQLString, - description: - 'Who ordered the test (See http://hl7.org/fhir/SearchParameter/diagnosticorder-orderer).', + fhirtype: 'reference', + xpath: 'DiagnosticOrder.event.actor', + description: 'Who recorded or did this', }, - status: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-bodysite + bodysite: { type: TokenScalar, - description: - 'proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed (See http://hl7.org/fhir/SearchParameter/diagnosticorder-status).', + fhirtype: 'token', + xpath: 'DiagnosticOrder.item.bodySite', + description: 'Location of requested test (if applicable)', }, - subject: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticOrder.item.code', + description: 'Code to indicate the item (test or panel) being ordered', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-encounter + encounter: { type: GraphQLString, - description: - 'Who and/or what test is about (See http://hl7.org/fhir/SearchParameter/diagnosticorder-subject).', + fhirtype: 'reference', + xpath: 'DiagnosticOrder.encounter', + description: 'The encounter that this diagnostic order is associated with', }, - item_status: { - type: TokenScalar, - description: - 'proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed (See http://hl7.org/fhir/SearchParameter/diagnosticorder-item-status).', + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-event-date + event_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DiagnosticOrder.event.dateTime', + description: 'The date at which the event happened', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-event-status event_status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticOrder.event.status', description: - 'proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed (See http://hl7.org/fhir/SearchParameter/diagnosticorder-event-status).', + 'proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed', }, - actor: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-event-status-date + event_status_date: { type: GraphQLString, - description: - 'Who recorded or did this (See http://hl7.org/fhir/SearchParameter/diagnosticorder-actor).', + fhirtype: 'composite', + xpath: '', + description: 'A combination of past-status and date', }, - code: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-identifier + identifier: { type: TokenScalar, - description: - 'Code to indicate the item (test or panel) being ordered (See http://hl7.org/fhir/SearchParameter/diagnosticorder-code).', + fhirtype: 'token', + xpath: 'DiagnosticOrder.identifier', + description: 'Identifiers assigned to this order', }, - encounter: { - type: GraphQLString, - description: - 'The encounter that this diagnostic order is associated with (See http://hl7.org/fhir/SearchParameter/diagnosticorder-encounter).', + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-item-date + item_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DiagnosticOrder.item.event.dateTime', + description: 'The date at which the event happened', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-item-past-status item_past_status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticOrder.item.event.status', description: - 'proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed (See http://hl7.org/fhir/SearchParameter/diagnosticorder-item-past-status).', + 'proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed', }, - patient: { - type: GraphQLString, - description: - 'Who and/or what test is about (See http://hl7.org/fhir/SearchParameter/diagnosticorder-patient).', - }, - bodysite: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-item-status + item_status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticOrder.item.status', description: - 'Location of requested test (if applicable) (See http://hl7.org/fhir/SearchParameter/diagnosticorder-bodysite).', + 'proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed', }, - item_date: { - type: DateScalar, - description: - 'The date at which the event happened (See http://hl7.org/fhir/SearchParameter/diagnosticorder-item-date).', + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-item-status-date + item_status_date: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'A combination of item-past-status and item-date', }, - specimen: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-orderer + orderer: { type: GraphQLString, - description: - 'If the whole order relates to specific specimens (See http://hl7.org/fhir/SearchParameter/diagnosticorder-specimen).', + fhirtype: 'reference', + xpath: 'DiagnosticOrder.orderer', + description: 'Who ordered the test', }, - event_status_date: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-patient + patient: { type: GraphQLString, - description: - 'A combination of past-status and date (See http://hl7.org/fhir/SearchParameter/diagnosticorder-event-status-date).', + fhirtype: 'reference', + xpath: 'DiagnosticOrder.subject', + description: 'Who and/or what test is about', }, - event_date: { - type: DateScalar, - description: - 'The date at which the event happened (See http://hl7.org/fhir/SearchParameter/diagnosticorder-event-date).', + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-specimen + specimen: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticOrder.specimen', + description: 'If the whole order relates to specific specimens', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-status + status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticOrder.status', description: - 'Identifiers assigned to this order (See http://hl7.org/fhir/SearchParameter/diagnosticorder-identifier).', + 'proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed', }, - item_status_date: { + // http://hl7.org/fhir/SearchParameter/DiagnosticOrder-subject + subject: { type: GraphQLString, - description: - 'A combination of item-past-status and item-date (See http://hl7.org/fhir/SearchParameter/diagnosticorder-item-status-date).', + fhirtype: 'reference', + xpath: 'DiagnosticOrder.subject', + description: 'Who and/or what test is about', }, }; diff --git a/src/resources/1_0_2/parameters/diagnosticreport.parameters.js b/src/resources/1_0_2/parameters/diagnosticreport.parameters.js index f8b63c13..254eaef6 100644 --- a/src/resources/1_0_2/parameters/diagnosticreport.parameters.js +++ b/src/resources/1_0_2/parameters/diagnosticreport.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,79 +8,110 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the diagnosticreport query */ module.exports = { - result: { - type: GraphQLString, - description: - 'Link to an atomic result (observation resource) (See http://hl7.org/fhir/SearchParameter/diagnosticreport-result).', - }, - status: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-category + category: { type: TokenScalar, - description: - 'The status of the report (See http://hl7.org/fhir/SearchParameter/diagnosticreport-status).', + fhirtype: 'token', + xpath: 'DiagnosticReport.category', + description: 'Which diagnostic discipline/department created the report', }, - subject: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticReport.code', description: - 'The subject of the report (See http://hl7.org/fhir/SearchParameter/diagnosticreport-subject).', + 'The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result', }, - issued: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-date + date: { type: DateScalar, - description: - 'When the report was issued (See http://hl7.org/fhir/SearchParameter/diagnosticreport-issued).', + fhirtype: 'date', + xpath: 'DiagnosticReport.effectiveDateTime', + description: 'The clinically relevant time of the report', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-diagnosis diagnosis: { type: TokenScalar, - description: - 'A coded diagnosis on the report (See http://hl7.org/fhir/SearchParameter/diagnosticreport-diagnosis).', - }, - image: { - type: GraphQLString, - description: - 'A reference to the image source. (See http://hl7.org/fhir/SearchParameter/diagnosticreport-image).', + fhirtype: 'token', + xpath: 'DiagnosticReport.codedDiagnosis', + description: 'A coded diagnosis on the report', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-encounter encounter: { type: GraphQLString, - description: - 'The Encounter when the order was made (See http://hl7.org/fhir/SearchParameter/diagnosticreport-encounter).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.encounter', + description: 'The Encounter when the order was made', }, - code: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-identifier + identifier: { type: TokenScalar, - description: - 'The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result (See http://hl7.org/fhir/SearchParameter/diagnosticreport-code).', + fhirtype: 'token', + xpath: 'DiagnosticReport.identifier', + description: 'An identifier for the report', }, - date: { - type: DateScalar, - description: - 'The clinically relevant time of the report (See http://hl7.org/fhir/SearchParameter/diagnosticreport-date).', + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-image + image: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.image.link', + description: 'A reference to the image source.', }, - category: { - type: TokenScalar, - description: - 'Which diagnostic discipline/department created the report (See http://hl7.org/fhir/SearchParameter/diagnosticreport-category).', + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-issued + issued: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DiagnosticReport.issued', + description: 'When the report was issued', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-patient patient: { type: GraphQLString, - description: - 'The subject of the report if a patient (See http://hl7.org/fhir/SearchParameter/diagnosticreport-patient).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.subject', + description: 'The subject of the report if a patient', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.performer', + description: 'Who was the source of the report (organization)', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-request request: { type: GraphQLString, - description: - 'Reference to the test or procedure request. (See http://hl7.org/fhir/SearchParameter/diagnosticreport-request).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.request', + description: 'Reference to the test or procedure request.', }, - specimen: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-result + result: { type: GraphQLString, - description: - 'The specimen details (See http://hl7.org/fhir/SearchParameter/diagnosticreport-specimen).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.result', + description: 'Link to an atomic result (observation resource)', }, - performer: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-specimen + specimen: { type: GraphQLString, - description: - 'Who was the source of the report (organization) (See http://hl7.org/fhir/SearchParameter/diagnosticreport-performer).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.specimen', + description: 'The specimen details', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-status + status: { type: TokenScalar, - description: - 'An identifier for the report (See http://hl7.org/fhir/SearchParameter/diagnosticreport-identifier).', + fhirtype: 'token', + xpath: 'DiagnosticReport.status', + description: 'The status of the report', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.subject', + description: 'The subject of the report', }, }; diff --git a/src/resources/1_0_2/parameters/documentmanifest.parameters.js b/src/resources/1_0_2/parameters/documentmanifest.parameters.js index 5ac1179d..242a085a 100644 --- a/src/resources/1_0_2/parameters/documentmanifest.parameters.js +++ b/src/resources/1_0_2/parameters/documentmanifest.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,69 +9,95 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the documentmanifest query */ module.exports = { - related_ref: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-author + author: { type: GraphQLString, - description: - 'Related Resource (See http://hl7.org/fhir/SearchParameter/documentmanifest-related-ref).', - }, - related_id: { - type: TokenScalar, - description: - 'Identifiers of things that are related (See http://hl7.org/fhir/SearchParameter/documentmanifest-related-id).', + fhirtype: 'reference', + xpath: 'DocumentManifest.author', + description: 'Who and/or what authored the manifest', }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-content-ref content_ref: { type: GraphQLString, - description: - 'Contents of this set of documents (See http://hl7.org/fhir/SearchParameter/documentmanifest-content-ref).', + fhirtype: 'reference', + xpath: 'DocumentManifest.content.pReference', + description: 'Contents of this set of documents', }, - status: { - type: TokenScalar, - description: - 'current | superseded | entered-in-error (See http://hl7.org/fhir/SearchParameter/documentmanifest-status).', + // http://hl7.org/fhir/SearchParameter/DocumentManifest-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DocumentManifest.created', + description: 'When this document manifest created', }, - subject: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-description + description: { type: GraphQLString, - description: - 'The subject of the set of documents (See http://hl7.org/fhir/SearchParameter/documentmanifest-subject).', + fhirtype: 'string', + xpath: 'DocumentManifest.description', + description: 'Human-readable description (title)', }, - type: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-identifier + identifier: { type: TokenScalar, - description: - 'Kind of document set (See http://hl7.org/fhir/SearchParameter/documentmanifest-type).', + fhirtype: 'token', + xpath: 'DocumentManifest.masterIdentifier', + description: 'Unique Identifier for the set of documents', }, - recipient: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-patient + patient: { type: GraphQLString, - description: - 'Intended to get notified about this set of documents (See http://hl7.org/fhir/SearchParameter/documentmanifest-recipient).', + fhirtype: 'reference', + xpath: 'DocumentManifest.subject', + description: 'The subject of the set of documents', }, - author: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-recipient + recipient: { type: GraphQLString, - description: - 'Who and/or what authored the manifest (See http://hl7.org/fhir/SearchParameter/documentmanifest-author).', + fhirtype: 'reference', + xpath: 'DocumentManifest.recipient', + description: 'Intended to get notified about this set of documents', }, - patient: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-related-id + related_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentManifest.related.identifier', + description: 'Identifiers of things that are related', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-related-ref + related_ref: { type: GraphQLString, - description: - 'The subject of the set of documents (See http://hl7.org/fhir/SearchParameter/documentmanifest-patient).', + fhirtype: 'reference', + xpath: 'DocumentManifest.related.ref', + description: 'Related Resource', }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-source source: { type: UriScalar, - description: - 'The source system/application/software (See http://hl7.org/fhir/SearchParameter/documentmanifest-source).', + fhirtype: 'uri', + xpath: 'DocumentManifest.source', + description: 'The source system/application/software', }, - created: { - type: DateScalar, - description: - 'When this document manifest created (See http://hl7.org/fhir/SearchParameter/documentmanifest-created).', + // http://hl7.org/fhir/SearchParameter/DocumentManifest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentManifest.status', + description: 'current | superseded | entered-in-error', }, - description: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-subject + subject: { type: GraphQLString, - description: - 'Human-readable description (title) (See http://hl7.org/fhir/SearchParameter/documentmanifest-description).', + fhirtype: 'reference', + xpath: 'DocumentManifest.subject', + description: 'The subject of the set of documents', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-type + type: { type: TokenScalar, - description: - 'Unique Identifier for the set of documents (See http://hl7.org/fhir/SearchParameter/documentmanifest-identifier).', + fhirtype: 'token', + xpath: 'DocumentManifest.type', + description: 'Kind of document set', }, }; diff --git a/src/resources/1_0_2/parameters/documentreference.parameters.js b/src/resources/1_0_2/parameters/documentreference.parameters.js index 762c10b0..6d2e1eb5 100644 --- a/src/resources/1_0_2/parameters/documentreference.parameters.js +++ b/src/resources/1_0_2/parameters/documentreference.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,134 +9,187 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the documentreference query */ module.exports = { - related_ref: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-authenticator + authenticator: { type: GraphQLString, - description: - 'Related Resource (See http://hl7.org/fhir/SearchParameter/documentreference-related-ref).', + fhirtype: 'reference', + xpath: 'DocumentReference.authenticator', + description: 'Who/what authenticated the document', }, - related_id: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.author', + description: 'Who and/or what authored the document', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-class + class: { type: TokenScalar, - description: - 'Identifier of related objects or events (See http://hl7.org/fhir/SearchParameter/documentreference-related-id).', + fhirtype: 'token', + xpath: 'DocumentReference.class', + description: 'Categorization of document', }, - indexed: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-created + created: { type: DateScalar, - description: - 'When this document reference created (See http://hl7.org/fhir/SearchParameter/documentreference-indexed).', + fhirtype: 'date', + xpath: 'DocumentReference.created', + description: 'Document creation time', }, - location: { - type: UriScalar, - description: - 'Uri where the data can be found (See http://hl7.org/fhir/SearchParameter/documentreference-location).', - }, - relatesto: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-custodian + custodian: { type: GraphQLString, - description: - 'Target of the relationship (See http://hl7.org/fhir/SearchParameter/documentreference-relatesto).', + fhirtype: 'reference', + xpath: 'DocumentReference.custodian', + description: 'Organization which maintains the document', }, - subject: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-description + description: { type: GraphQLString, - description: - 'Who/what is the subject of the document (See http://hl7.org/fhir/SearchParameter/documentreference-subject).', + fhirtype: 'string', + xpath: 'DocumentReference.description', + description: 'Human-readable description (title)', }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-encounter encounter: { type: GraphQLString, - description: - 'Context of the document content (See http://hl7.org/fhir/SearchParameter/documentreference-encounter).', + fhirtype: 'reference', + xpath: 'DocumentReference.context.encounter', + description: 'Context of the document content', }, - type: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-event + event: { type: TokenScalar, - description: - 'Kind of document (LOINC if possible) (See http://hl7.org/fhir/SearchParameter/documentreference-type).', + fhirtype: 'token', + xpath: 'DocumentReference.context.event', + description: 'Main Clinical Acts Documented', }, - securitylabel: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-facility + facility: { type: TokenScalar, - description: - 'Document security-tags (See http://hl7.org/fhir/SearchParameter/documentreference-securitylabel).', + fhirtype: 'token', + xpath: 'DocumentReference.context.facilityType', + description: 'Kind of facility where patient was seen', }, - setting: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-format + format: { type: TokenScalar, - description: - 'Additional details about where the content was created (e.g. clinical specialty) (See http://hl7.org/fhir/SearchParameter/documentreference-setting).', + fhirtype: 'token', + xpath: 'DocumentReference.content.format', + description: 'Format/content rules for the document', }, - author: { - type: GraphQLString, - description: - 'Who and/or what authored the document (See http://hl7.org/fhir/SearchParameter/documentreference-author).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.masterIdentifier', + description: 'Master Version Specific Identifier', }, - custodian: { - type: GraphQLString, - description: - 'Organization which maintains the document (See http://hl7.org/fhir/SearchParameter/documentreference-custodian).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-indexed + indexed: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DocumentReference.indexed', + description: 'When this document reference created', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-language + language: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.content.attachment.language', + description: 'Human language of the content (BCP-47)', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-location + location: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'DocumentReference.content.attachment.url', + description: 'Uri where the data can be found', }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-patient patient: { type: GraphQLString, - description: - 'Who/what is the subject of the document (See http://hl7.org/fhir/SearchParameter/documentreference-patient).', + fhirtype: 'reference', + xpath: 'DocumentReference.subject', + description: 'Who/what is the subject of the document', }, - facility: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DocumentReference.context.period', + description: 'Time of service that is being documented', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-related-id + related_id: { type: TokenScalar, - description: - 'Kind of facility where patient was seen (See http://hl7.org/fhir/SearchParameter/documentreference-facility).', + fhirtype: 'token', + xpath: 'DocumentReference.context.related.identifier', + description: 'Identifier of related objects or events', }, - created: { - type: DateScalar, - description: - 'Document creation time (See http://hl7.org/fhir/SearchParameter/documentreference-created).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-related-ref + related_ref: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.context.related.ref', + description: 'Related Resource', }, - description: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-relatesto + relatesto: { type: GraphQLString, - description: - 'Human-readable description (title) (See http://hl7.org/fhir/SearchParameter/documentreference-description).', + fhirtype: 'reference', + xpath: 'DocumentReference.relatesTo.target', + description: 'Target of the relationship', }, - event: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-relation + relation: { type: TokenScalar, - description: - 'Main Clinical Acts Documented (See http://hl7.org/fhir/SearchParameter/documentreference-event).', + fhirtype: 'token', + xpath: 'DocumentReference.relatesTo.code', + description: 'replaces | transforms | signs | appends', }, - status: { - type: TokenScalar, - description: - 'current | superseded | entered-in-error (See http://hl7.org/fhir/SearchParameter/documentreference-status).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-relationship + relationship: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Combination of relation and relatesTo', }, - relation: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-securitylabel + securitylabel: { type: TokenScalar, - description: - 'replaces | transforms | signs | appends (See http://hl7.org/fhir/SearchParameter/documentreference-relation).', + fhirtype: 'token', + xpath: 'DocumentReference.securityLabel', + description: 'Document security-tags', }, - class: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-setting + setting: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.context.practiceSetting', description: - 'Categorization of document (See http://hl7.org/fhir/SearchParameter/documentreference-class).', + 'Additional details about where the content was created (e.g. clinical specialty)', }, - format: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-status + status: { type: TokenScalar, - description: - 'Format/content rules for the document (See http://hl7.org/fhir/SearchParameter/documentreference-format).', - }, - period: { - type: DateScalar, - description: - 'Time of service that is being documented (See http://hl7.org/fhir/SearchParameter/documentreference-period).', - }, - authenticator: { - type: GraphQLString, - description: - 'Who/what authenticated the document (See http://hl7.org/fhir/SearchParameter/documentreference-authenticator).', + fhirtype: 'token', + xpath: 'DocumentReference.status', + description: 'current | superseded | entered-in-error', }, - relationship: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-subject + subject: { type: GraphQLString, - description: - 'Combination of relation and relatesTo (See http://hl7.org/fhir/SearchParameter/documentreference-relationship).', - }, - language: { - type: TokenScalar, - description: - 'Human language of the content (BCP-47) (See http://hl7.org/fhir/SearchParameter/documentreference-language).', + fhirtype: 'reference', + xpath: 'DocumentReference.subject', + description: 'Who/what is the subject of the document', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-type + type: { type: TokenScalar, - description: - 'Master Version Specific Identifier (See http://hl7.org/fhir/SearchParameter/documentreference-identifier).', + fhirtype: 'token', + xpath: 'DocumentReference.type', + description: 'Kind of document (LOINC if possible)', }, }; diff --git a/src/resources/1_0_2/parameters/eligibilityrequest.parameters.js b/src/resources/1_0_2/parameters/eligibilityrequest.parameters.js index e09718fa..d4e9413e 100644 --- a/src/resources/1_0_2/parameters/eligibilityrequest.parameters.js +++ b/src/resources/1_0_2/parameters/eligibilityrequest.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the eligibilityrequest query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/EligibilityRequest-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the Eligibility (See http://hl7.org/fhir/SearchParameter/eligibilityrequest-identifier).', + fhirtype: 'token', + xpath: 'EligibilityRequest.identifier', + description: 'The business identifier of the Eligibility', }, }; diff --git a/src/resources/1_0_2/parameters/eligibilityresponse.parameters.js b/src/resources/1_0_2/parameters/eligibilityresponse.parameters.js index f6174fa1..8bd9712c 100644 --- a/src/resources/1_0_2/parameters/eligibilityresponse.parameters.js +++ b/src/resources/1_0_2/parameters/eligibilityresponse.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the eligibilityresponse query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the Explanation of Benefit (See http://hl7.org/fhir/SearchParameter/eligibilityresponse-identifier).', + fhirtype: 'token', + xpath: 'EligibilityResponse.identifier', + description: 'The business identifier of the Explanation of Benefit', }, }; diff --git a/src/resources/1_0_2/parameters/encounter.parameters.js b/src/resources/1_0_2/parameters/encounter.parameters.js index e5728548..cc2c66f3 100644 --- a/src/resources/1_0_2/parameters/encounter.parameters.js +++ b/src/resources/1_0_2/parameters/encounter.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,104 +8,147 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the encounter query */ module.exports = { - participant_type: { - type: TokenScalar, - description: - 'Role of participant in encounter (See http://hl7.org/fhir/SearchParameter/encounter-participant-type).', + // http://hl7.org/fhir/SearchParameter/Encounter-appointment + appointment: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.appointment', + description: 'The appointment that scheduled this encounter', }, - episodeofcare: { + // http://hl7.org/fhir/SearchParameter/Encounter-condition + condition: { type: GraphQLString, - description: - 'Episode(s) of care that this encounter should be recorded against (See http://hl7.org/fhir/SearchParameter/encounter-episodeofcare).', + fhirtype: 'reference', + xpath: 'Encounter.indication', + description: 'Reason the encounter takes place (resource)', }, - status: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Encounter-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Encounter.period', + description: 'A date within the period the Encounter lasted', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-episodeofcare + episodeofcare: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.episodeOfCare', description: - 'planned | arrived | in-progress | onleave | finished | cancelled (See http://hl7.org/fhir/SearchParameter/encounter-status).', + 'Episode(s) of care that this encounter should be recorded against', }, - reason: { + // http://hl7.org/fhir/SearchParameter/Encounter-identifier + identifier: { type: TokenScalar, - description: - 'Reason the encounter takes place (code) (See http://hl7.org/fhir/SearchParameter/encounter-reason).', + fhirtype: 'token', + xpath: 'Encounter.identifier', + description: 'Identifier(s) by which this encounter is known', }, - condition: { + // http://hl7.org/fhir/SearchParameter/Encounter-incomingreferral + incomingreferral: { type: GraphQLString, - description: - 'Reason the encounter takes place (resource) (See http://hl7.org/fhir/SearchParameter/encounter-condition).', + fhirtype: 'reference', + xpath: 'Encounter.incomingReferral', + description: 'The ReferralRequest that initiated this encounter', }, - location: { + // http://hl7.org/fhir/SearchParameter/Encounter-indication + indication: { type: GraphQLString, - description: - 'Location the encounter takes place (See http://hl7.org/fhir/SearchParameter/encounter-location).', + fhirtype: 'reference', + xpath: 'Encounter.indication', + description: 'Reason the encounter takes place (resource)', }, - indication: { + // http://hl7.org/fhir/SearchParameter/Encounter-length + length: { type: GraphQLString, - description: - 'Reason the encounter takes place (resource) (See http://hl7.org/fhir/SearchParameter/encounter-indication).', + fhirtype: 'number', + xpath: 'Encounter.length', + description: 'Length of encounter in days', }, - type: { - type: TokenScalar, - description: - 'Specific type of encounter (See http://hl7.org/fhir/SearchParameter/encounter-type).', + // http://hl7.org/fhir/SearchParameter/Encounter-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.location.location', + description: 'Location the encounter takes place', }, - date: { + // http://hl7.org/fhir/SearchParameter/Encounter-location-period + location_period: { type: DateScalar, + fhirtype: 'date', + xpath: 'Encounter.location.period', description: - 'A date within the period the Encounter lasted (See http://hl7.org/fhir/SearchParameter/encounter-date).', - }, - special_arrangement: { - type: TokenScalar, - description: - 'Wheelchair, translator, stretcher, etc. (See http://hl7.org/fhir/SearchParameter/encounter-special-arrangement).', + 'Time period during which the patient was present at the location', }, + // http://hl7.org/fhir/SearchParameter/Encounter-part-of part_of: { type: GraphQLString, - description: - 'Another Encounter this encounter is part of (See http://hl7.org/fhir/SearchParameter/encounter-part-of).', + fhirtype: 'reference', + xpath: 'Encounter.partOf', + description: 'Another Encounter this encounter is part of', }, - appointment: { + // http://hl7.org/fhir/SearchParameter/Encounter-participant + participant: { type: GraphQLString, - description: - 'The appointment that scheduled this encounter (See http://hl7.org/fhir/SearchParameter/encounter-appointment).', + fhirtype: 'reference', + xpath: 'Encounter.participant.individual', + description: 'Persons involved in the encounter other than the patient', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-participant-type + participant_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.participant.type', + description: 'Role of participant in encounter', }, + // http://hl7.org/fhir/SearchParameter/Encounter-patient patient: { type: GraphQLString, - description: - 'The patient present at the encounter (See http://hl7.org/fhir/SearchParameter/encounter-patient).', + fhirtype: 'reference', + xpath: 'Encounter.patient', + description: 'The patient present at the encounter', }, + // http://hl7.org/fhir/SearchParameter/Encounter-practitioner practitioner: { type: GraphQLString, - description: - 'Persons involved in the encounter other than the patient (See http://hl7.org/fhir/SearchParameter/encounter-practitioner).', + fhirtype: 'reference', + xpath: 'Encounter.participant.individual', + description: 'Persons involved in the encounter other than the patient', }, - length: { - type: GraphQLString, - description: - 'Length of encounter in days (See http://hl7.org/fhir/SearchParameter/encounter-length).', - }, - participant: { + // http://hl7.org/fhir/SearchParameter/Encounter-procedure + procedure: { type: GraphQLString, - description: - 'Persons involved in the encounter other than the patient (See http://hl7.org/fhir/SearchParameter/encounter-participant).', + fhirtype: 'reference', + xpath: 'Encounter.indication', + description: 'Reason the encounter takes place (resource)', }, - incomingreferral: { - type: GraphQLString, - description: - 'The ReferralRequest that initiated this encounter (See http://hl7.org/fhir/SearchParameter/encounter-incomingreferral).', + // http://hl7.org/fhir/SearchParameter/Encounter-reason + reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.reason', + description: 'Reason the encounter takes place (code)', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Encounter-special-arrangement + special_arrangement: { type: TokenScalar, - description: - 'Identifier(s) by which this encounter is known (See http://hl7.org/fhir/SearchParameter/encounter-identifier).', + fhirtype: 'token', + xpath: 'Encounter.hospitalization.specialArrangement', + description: 'Wheelchair, translator, stretcher, etc.', }, - procedure: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Encounter-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.status', description: - 'Reason the encounter takes place (resource) (See http://hl7.org/fhir/SearchParameter/encounter-procedure).', + 'planned | arrived | in-progress | onleave | finished | cancelled', }, - location_period: { - type: DateScalar, - description: - 'Time period during which the patient was present at the location (See http://hl7.org/fhir/SearchParameter/encounter-location-period).', + // http://hl7.org/fhir/SearchParameter/Encounter-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.type', + description: 'Specific type of encounter', }, }; diff --git a/src/resources/1_0_2/parameters/enrollmentrequest.parameters.js b/src/resources/1_0_2/parameters/enrollmentrequest.parameters.js index fabb6aea..d5f326a9 100644 --- a/src/resources/1_0_2/parameters/enrollmentrequest.parameters.js +++ b/src/resources/1_0_2/parameters/enrollmentrequest.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,19 +7,25 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the enrollmentrequest query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EnrollmentRequest.identifier', + description: 'The business identifier of the Enrollment', + }, + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-patient patient: { type: GraphQLString, - description: - 'The party to be enrolled (See http://hl7.org/fhir/SearchParameter/enrollmentrequest-patient).', + fhirtype: 'reference', + xpath: 'EnrollmentRequest.subject', + description: 'The party to be enrolled', }, + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-subject subject: { type: GraphQLString, - description: - 'The party to be enrolled (See http://hl7.org/fhir/SearchParameter/enrollmentrequest-subject).', - }, - identifier: { - type: TokenScalar, - description: - 'The business identifier of the Enrollment (See http://hl7.org/fhir/SearchParameter/enrollmentrequest-identifier).', + fhirtype: 'reference', + xpath: 'EnrollmentRequest.subject', + description: 'The party to be enrolled', }, }; diff --git a/src/resources/1_0_2/parameters/enrollmentresponse.parameters.js b/src/resources/1_0_2/parameters/enrollmentresponse.parameters.js index 71bca8b3..a118d7aa 100644 --- a/src/resources/1_0_2/parameters/enrollmentresponse.parameters.js +++ b/src/resources/1_0_2/parameters/enrollmentresponse.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the enrollmentresponse query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/EnrollmentResponse-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the Explanation of Benefit (See http://hl7.org/fhir/SearchParameter/enrollmentresponse-identifier).', + fhirtype: 'token', + xpath: 'EnrollmentResponse.identifier', + description: 'The business identifier of the Explanation of Benefit', }, }; diff --git a/src/resources/1_0_2/parameters/episodeofcare.parameters.js b/src/resources/1_0_2/parameters/episodeofcare.parameters.js index e8624ab7..ea5dc5fd 100644 --- a/src/resources/1_0_2/parameters/episodeofcare.parameters.js +++ b/src/resources/1_0_2/parameters/episodeofcare.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,54 +8,78 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the episodeofcare query */ module.exports = { - organization: { - type: GraphQLString, - description: - 'The organization that has assumed the specific responsibilities of this EpisodeOfCare (See http://hl7.org/fhir/SearchParameter/episodeofcare-organization).', - }, - patient: { + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-care-manager + care_manager: { type: GraphQLString, - description: - 'Patient for this episode of care (See http://hl7.org/fhir/SearchParameter/episodeofcare-patient).', + fhirtype: 'reference', + xpath: 'EpisodeOfCare.careManager', + description: 'Care manager/care co-ordinator for the patient', }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-condition condition: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.condition', + description: 'Conditions/problems/diagnoses this episode of care is for', + }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EpisodeOfCare.period', description: - 'Conditions/problems/diagnoses this episode of care is for (See http://hl7.org/fhir/SearchParameter/episodeofcare-condition).', + "The provided date search value falls within the episode of care's period", }, - status: { + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-identifier + identifier: { type: TokenScalar, - description: - 'The current status of the Episode of Care as provided (does not check the status history collection) (See http://hl7.org/fhir/SearchParameter/episodeofcare-status).', + fhirtype: 'token', + xpath: 'EpisodeOfCare.identifier', + description: 'Identifier(s) for the EpisodeOfCare', }, - care_manager: { + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-incomingreferral + incomingreferral: { type: GraphQLString, - description: - 'Care manager/care co-ordinator for the patient (See http://hl7.org/fhir/SearchParameter/episodeofcare-care-manager).', + fhirtype: 'reference', + xpath: 'EpisodeOfCare.referralRequest', + description: 'Incoming Referral Request', }, - type: { - type: TokenScalar, - description: - 'Type/class - e.g. specialist referral, disease management (See http://hl7.org/fhir/SearchParameter/episodeofcare-type).', - }, - date: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.managingOrganization', description: - "The provided date search value falls within the episode of care's period (See http://hl7.org/fhir/SearchParameter/episodeofcare-date).", + 'The organization that has assumed the specific responsibilities of this EpisodeOfCare', }, - incomingreferral: { + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-patient + patient: { type: GraphQLString, - description: - 'Incoming Referral Request (See http://hl7.org/fhir/SearchParameter/episodeofcare-incomingreferral).', + fhirtype: 'reference', + xpath: 'EpisodeOfCare.patient', + description: 'Patient for this episode of care', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-status + status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'EpisodeOfCare.status', description: - 'Identifier(s) for the EpisodeOfCare (See http://hl7.org/fhir/SearchParameter/episodeofcare-identifier).', + 'The current status of the Episode of Care as provided (does not check the status history collection)', }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-team-member team_member: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.careTeam.member', description: - 'A Practitioner or Organization allocated to the care team for this EpisodeOfCare (See http://hl7.org/fhir/SearchParameter/episodeofcare-team-member).', + 'A Practitioner or Organization allocated to the care team for this EpisodeOfCare', + }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EpisodeOfCare.type', + description: 'Type/class - e.g. specialist referral, disease management', }, }; diff --git a/src/resources/1_0_2/parameters/explanationofbenefit.parameters.js b/src/resources/1_0_2/parameters/explanationofbenefit.parameters.js index 9d8d928b..7dd7c68c 100644 --- a/src/resources/1_0_2/parameters/explanationofbenefit.parameters.js +++ b/src/resources/1_0_2/parameters/explanationofbenefit.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the explanationofbenefit query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the Explanation of Benefit (See http://hl7.org/fhir/SearchParameter/explanationofbenefit-identifier).', + fhirtype: 'token', + xpath: 'ExplanationOfBenefit.identifier', + description: 'The business identifier of the Explanation of Benefit', }, }; diff --git a/src/resources/1_0_2/parameters/familymemberhistory.parameters.js b/src/resources/1_0_2/parameters/familymemberhistory.parameters.js index 4da6f442..5e0af35a 100644 --- a/src/resources/1_0_2/parameters/familymemberhistory.parameters.js +++ b/src/resources/1_0_2/parameters/familymemberhistory.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,34 +8,62 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the familymemberhistory query */ module.exports = { - relationship: { + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-code + code: { type: TokenScalar, - description: - 'A search by a relationship type (See http://hl7.org/fhir/SearchParameter/familymemberhistory-relationship).', + fhirtype: 'token', + xpath: 'FamilyMemberHistory.condition.code', + description: 'A search by a condition code', }, - patient: { - type: GraphQLString, - description: - 'The identity of a subject to list family member history items for (See http://hl7.org/fhir/SearchParameter/familymemberhistory-patient).', + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'FamilyMemberHistory.date', + description: 'When history was captured/updated', }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-gender gender: { type: TokenScalar, - description: - 'A search by a gender code of a family member (See http://hl7.org/fhir/SearchParameter/familymemberhistory-gender).', + fhirtype: 'token', + xpath: 'FamilyMemberHistory.gender', + description: 'A search by a gender code of a family member', }, - code: { + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-identifier + identifier: { type: TokenScalar, - description: - 'A search by a condition code (See http://hl7.org/fhir/SearchParameter/familymemberhistory-code).', + fhirtype: 'token', + xpath: 'FamilyMemberHistory.identifier', + description: 'A search by a record identifier', }, - date: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'FamilyMemberHistory.patient', description: - 'When history was captured/updated (See http://hl7.org/fhir/SearchParameter/familymemberhistory-date).', + 'The identity of a subject to list family member history items for', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-relationship + relationship: { type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.relationship', + description: 'A search by a relationship type', + }, + // http://hl7.org/fhir/SearchParameter/familymemberhistory-daf-FamilyMemberHistory-condition + condition: { + type: TokenScalar, + fhirtype: 'token', + xpath: '', description: - 'A search by a record identifier (See http://hl7.org/fhir/SearchParameter/familymemberhistory-identifier).', + "Search for a history of a particular condition within a patient's family.", + }, + // http://hl7.org/fhir/SearchParameter/familymemberhistory-daf-FamilyMemberHistory-relationship + relationship: { + type: TokenScalar, + fhirtype: 'token', + xpath: '', + description: 'Search for family history of members based on relationship', }, }; diff --git a/src/resources/1_0_2/parameters/flag.parameters.js b/src/resources/1_0_2/parameters/flag.parameters.js index 89165ea2..0d9c9e4a 100644 --- a/src/resources/1_0_2/parameters/flag.parameters.js +++ b/src/resources/1_0_2/parameters/flag.parameters.js @@ -1,5 +1,5 @@ -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -7,29 +7,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the flag query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Flag-author author: { type: GraphQLString, - description: - 'Flag creator (See http://hl7.org/fhir/SearchParameter/flag-author).', + fhirtype: 'reference', + xpath: 'Flag.author', + description: 'Flag creator', }, - patient: { - type: GraphQLString, - description: - 'The identity of a subject to list flags for (See http://hl7.org/fhir/SearchParameter/flag-patient).', + // http://hl7.org/fhir/SearchParameter/Flag-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Flag.period', + description: 'Time period when flag is active', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Flag-encounter + encounter: { type: GraphQLString, - description: - 'The identity of a subject to list flags for (See http://hl7.org/fhir/SearchParameter/flag-subject).', + fhirtype: 'reference', + xpath: 'Flag.encounter', + description: 'Alert relevant during encounter', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/Flag-patient + patient: { type: GraphQLString, - description: - 'Alert relevant during encounter (See http://hl7.org/fhir/SearchParameter/flag-encounter).', + fhirtype: 'reference', + xpath: 'Flag.subject', + description: 'The identity of a subject to list flags for', }, - date: { - type: DateScalar, - description: - 'Time period when flag is active (See http://hl7.org/fhir/SearchParameter/flag-date).', + // http://hl7.org/fhir/SearchParameter/Flag-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Flag.subject', + description: 'The identity of a subject to list flags for', }, }; diff --git a/src/resources/1_0_2/parameters/goal.parameters.js b/src/resources/1_0_2/parameters/goal.parameters.js index a22f5a0e..b7b99d31 100644 --- a/src/resources/1_0_2/parameters/goal.parameters.js +++ b/src/resources/1_0_2/parameters/goal.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,34 +8,47 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the goal query */ module.exports = { - targetdate: { - type: DateScalar, - description: - 'Reach goal on or before (See http://hl7.org/fhir/SearchParameter/goal-targetdate).', - }, + // http://hl7.org/fhir/SearchParameter/Goal-category category: { type: TokenScalar, - description: - 'E.g. Treatment, dietary, behavioral, etc. (See http://hl7.org/fhir/SearchParameter/goal-category).', + fhirtype: 'token', + xpath: 'Goal.category', + description: 'E.g. Treatment, dietary, behavioral, etc.', + }, + // http://hl7.org/fhir/SearchParameter/Goal-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.identifier', + description: 'External Ids for this goal', }, + // http://hl7.org/fhir/SearchParameter/Goal-patient patient: { type: GraphQLString, - description: - 'Who this goal is intended for (See http://hl7.org/fhir/SearchParameter/goal-patient).', + fhirtype: 'reference', + xpath: 'Goal.subject', + description: 'Who this goal is intended for', }, + // http://hl7.org/fhir/SearchParameter/Goal-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.status', description: - 'proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled (See http://hl7.org/fhir/SearchParameter/goal-status).', + 'proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled', }, + // http://hl7.org/fhir/SearchParameter/Goal-subject subject: { type: GraphQLString, - description: - 'Who this goal is intended for (See http://hl7.org/fhir/SearchParameter/goal-subject).', + fhirtype: 'reference', + xpath: 'Goal.subject', + description: 'Who this goal is intended for', }, - identifier: { - type: TokenScalar, - description: - 'External Ids for this goal (See http://hl7.org/fhir/SearchParameter/goal-identifier).', + // http://hl7.org/fhir/SearchParameter/Goal-targetdate + targetdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Goal.targetDate', + description: 'Reach goal on or before', }, }; diff --git a/src/resources/1_0_2/parameters/group.parameters.js b/src/resources/1_0_2/parameters/group.parameters.js index d2ac50e6..13dd56cd 100644 --- a/src/resources/1_0_2/parameters/group.parameters.js +++ b/src/resources/1_0_2/parameters/group.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,49 +7,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the group query */ module.exports = { - member: { - type: GraphQLString, - description: - 'Reference to the group member (See http://hl7.org/fhir/SearchParameter/group-member).', + // http://hl7.org/fhir/SearchParameter/Group-actual + actual: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.actual', + description: 'Descriptive or actual', + }, + // http://hl7.org/fhir/SearchParameter/Group-characteristic + characteristic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.characteristic.code', + description: 'Kind of characteristic', }, + // http://hl7.org/fhir/SearchParameter/Group-characteristic-value characteristic_value: { type: GraphQLString, - description: - 'A composite of both characteristic and value (See http://hl7.org/fhir/SearchParameter/group-characteristic-value).', - }, - value: { - type: TokenScalar, - description: - 'Value held by characteristic (See http://hl7.org/fhir/SearchParameter/group-value).', + fhirtype: 'composite', + xpath: '', + description: 'A composite of both characteristic and value', }, - actual: { + // http://hl7.org/fhir/SearchParameter/Group-code + code: { type: TokenScalar, - description: - 'Descriptive or actual (See http://hl7.org/fhir/SearchParameter/group-actual).', + fhirtype: 'token', + xpath: 'Group.code', + description: 'The kind of resources contained', }, + // http://hl7.org/fhir/SearchParameter/Group-exclude exclude: { type: TokenScalar, - description: - 'Group includes or excludes (See http://hl7.org/fhir/SearchParameter/group-exclude).', + fhirtype: 'token', + xpath: 'Group.characteristic.exclude', + description: 'Group includes or excludes', }, - code: { + // http://hl7.org/fhir/SearchParameter/Group-identifier + identifier: { type: TokenScalar, - description: - 'The kind of resources contained (See http://hl7.org/fhir/SearchParameter/group-code).', + fhirtype: 'token', + xpath: 'Group.identifier', + description: 'Unique id', }, - characteristic: { - type: TokenScalar, - description: - 'Kind of characteristic (See http://hl7.org/fhir/SearchParameter/group-characteristic).', + // http://hl7.org/fhir/SearchParameter/Group-member + member: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Group.member.entity', + description: 'Reference to the group member', }, + // http://hl7.org/fhir/SearchParameter/Group-type type: { type: TokenScalar, - description: - 'The type of resources the group contains (See http://hl7.org/fhir/SearchParameter/group-type).', + fhirtype: 'token', + xpath: 'Group.type', + description: 'The type of resources the group contains', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Group-value + value: { type: TokenScalar, - description: - 'Unique id (See http://hl7.org/fhir/SearchParameter/group-identifier).', + fhirtype: 'token', + xpath: 'Group.characteristic.valueCodeableConcept', + description: 'Value held by characteristic', }, }; diff --git a/src/resources/1_0_2/parameters/healthcareservice.parameters.js b/src/resources/1_0_2/parameters/healthcareservice.parameters.js index e67115be..952b36c8 100644 --- a/src/resources/1_0_2/parameters/healthcareservice.parameters.js +++ b/src/resources/1_0_2/parameters/healthcareservice.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,44 +7,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the healthcareservice query */ module.exports = { - servicecategory: { + // http://hl7.org/fhir/SearchParameter/HealthcareService-characteristic + characteristic: { type: TokenScalar, - description: - 'Service Category of the Healthcare Service (See http://hl7.org/fhir/SearchParameter/healthcareservice-servicecategory).', + fhirtype: 'token', + xpath: 'HealthcareService.characteristic', + description: "One of the HealthcareService's characteristics", }, - organization: { - type: GraphQLString, - description: - 'The organization that provides this Healthcare Service (See http://hl7.org/fhir/SearchParameter/healthcareservice-organization).', - }, - servicetype: { + // http://hl7.org/fhir/SearchParameter/HealthcareService-identifier + identifier: { type: TokenScalar, - description: - 'The type of service provided by this healthcare service (See http://hl7.org/fhir/SearchParameter/healthcareservice-servicetype).', + fhirtype: 'token', + xpath: 'HealthcareService.identifier', + description: 'External identifiers for this item', }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-location location: { type: GraphQLString, - description: - 'The location of the Healthcare Service (See http://hl7.org/fhir/SearchParameter/healthcareservice-location).', + fhirtype: 'reference', + xpath: 'HealthcareService.location', + description: 'The location of the Healthcare Service', }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-name name: { type: GraphQLString, - description: - 'A portion of the Healthcare service name (See http://hl7.org/fhir/SearchParameter/healthcareservice-name).', + fhirtype: 'string', + xpath: 'HealthcareService.serviceName', + description: 'A portion of the Healthcare service name', }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'HealthcareService.providedBy', + description: 'The organization that provides this Healthcare Service', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-programname programname: { type: GraphQLString, - description: - 'One of the Program Names serviced by this HealthcareService (See http://hl7.org/fhir/SearchParameter/healthcareservice-programname).', + fhirtype: 'string', + xpath: 'HealthcareService.programName', + description: 'One of the Program Names serviced by this HealthcareService', }, - characteristic: { + // http://hl7.org/fhir/SearchParameter/HealthcareService-servicecategory + servicecategory: { type: TokenScalar, - description: - "One of the HealthcareService's characteristics (See http://hl7.org/fhir/SearchParameter/healthcareservice-characteristic).", + fhirtype: 'token', + xpath: 'HealthcareService.serviceCategory', + description: 'Service Category of the Healthcare Service', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/HealthcareService-servicetype + servicetype: { type: TokenScalar, - description: - 'External identifiers for this item (See http://hl7.org/fhir/SearchParameter/healthcareservice-identifier).', + fhirtype: 'token', + xpath: 'HealthcareService.serviceType.type', + description: 'The type of service provided by this healthcare service', }, }; diff --git a/src/resources/1_0_2/parameters/imagingobjectselection.parameters.js b/src/resources/1_0_2/parameters/imagingobjectselection.parameters.js index e2d0f2ed..54de48c5 100644 --- a/src/resources/1_0_2/parameters/imagingobjectselection.parameters.js +++ b/src/resources/1_0_2/parameters/imagingobjectselection.parameters.js @@ -1,7 +1,7 @@ -const UriScalar = require('../scalars/uri.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -9,34 +9,46 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the imagingobjectselection query */ module.exports = { - selected_study: { - type: UriScalar, - description: - 'Study selected in key DICOM object selection (See http://hl7.org/fhir/SearchParameter/imagingobjectselection-selected-study).', - }, + // http://hl7.org/fhir/SearchParameter/ImagingObjectSelection-author author: { type: GraphQLString, - description: - 'Author of key DICOM object selection (See http://hl7.org/fhir/SearchParameter/imagingobjectselection-author).', - }, - title: { - type: TokenScalar, - description: - 'Title of key DICOM object selection (See http://hl7.org/fhir/SearchParameter/imagingobjectselection-title).', - }, - patient: { - type: GraphQLString, - description: - 'Subject of key DICOM object selection (See http://hl7.org/fhir/SearchParameter/imagingobjectselection-patient).', + fhirtype: 'reference', + xpath: 'ImagingObjectSelection.author', + description: 'Author of key DICOM object selection', }, + // http://hl7.org/fhir/SearchParameter/ImagingObjectSelection-authoring-time authoring_time: { type: DateScalar, - description: - 'Time of key DICOM object selection authoring (See http://hl7.org/fhir/SearchParameter/imagingobjectselection-authoring-time).', + fhirtype: 'date', + xpath: 'ImagingObjectSelection.authoringTime', + description: 'Time of key DICOM object selection authoring', }, + // http://hl7.org/fhir/SearchParameter/ImagingObjectSelection-identifier identifier: { type: UriScalar, - description: - 'UID of key DICOM object selection (See http://hl7.org/fhir/SearchParameter/imagingobjectselection-identifier).', + fhirtype: 'uri', + xpath: 'ImagingObjectSelection.uid', + description: 'UID of key DICOM object selection', + }, + // http://hl7.org/fhir/SearchParameter/ImagingObjectSelection-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingObjectSelection.patient', + description: 'Subject of key DICOM object selection', + }, + // http://hl7.org/fhir/SearchParameter/ImagingObjectSelection-selected-study + selected_study: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ImagingObjectSelection.study.uid', + description: 'Study selected in key DICOM object selection', + }, + // http://hl7.org/fhir/SearchParameter/ImagingObjectSelection-title + title: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingObjectSelection.title', + description: 'Title of key DICOM object selection', }, }; diff --git a/src/resources/1_0_2/parameters/imagingstudy.parameters.js b/src/resources/1_0_2/parameters/imagingstudy.parameters.js index f3d1bf7c..d71f24ce 100644 --- a/src/resources/1_0_2/parameters/imagingstudy.parameters.js +++ b/src/resources/1_0_2/parameters/imagingstudy.parameters.js @@ -1,7 +1,7 @@ -const UriScalar = require('../scalars/uri.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -9,54 +9,74 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the imagingstudy query */ module.exports = { - uid: { - type: UriScalar, - description: - 'The instance unique identifier (See http://hl7.org/fhir/SearchParameter/imagingstudy-uid).', + // http://hl7.org/fhir/SearchParameter/ImagingStudy-accession + accession: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.accession', + description: 'The accession identifier for the study', }, - series: { + // http://hl7.org/fhir/SearchParameter/ImagingStudy-bodysite + bodysite: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.series.bodySite', + description: 'The body site studied', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-dicom-class + dicom_class: { type: UriScalar, - description: - 'The identifier of the series of images (See http://hl7.org/fhir/SearchParameter/imagingstudy-series).', + fhirtype: 'uri', + xpath: 'ImagingStudy.series.instance.sopClass', + description: 'The type of the instance', }, - patient: { - type: GraphQLString, - description: - 'Who the study is about (See http://hl7.org/fhir/SearchParameter/imagingstudy-patient).', + // http://hl7.org/fhir/SearchParameter/ImagingStudy-modality + modality: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.series.modality', + description: 'The modality of the series', }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-order order: { type: GraphQLString, - description: - 'The order for the image (See http://hl7.org/fhir/SearchParameter/imagingstudy-order).', - }, - bodysite: { - type: TokenScalar, - description: - 'The body site studied (See http://hl7.org/fhir/SearchParameter/imagingstudy-bodysite).', + fhirtype: 'reference', + xpath: 'ImagingStudy.order', + description: 'The order for the image', }, - accession: { - type: TokenScalar, - description: - 'The accession identifier for the study (See http://hl7.org/fhir/SearchParameter/imagingstudy-accession).', + // http://hl7.org/fhir/SearchParameter/ImagingStudy-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.patient', + description: 'Who the study is about', }, - study: { + // http://hl7.org/fhir/SearchParameter/ImagingStudy-series + series: { type: UriScalar, - description: - 'The study identifier for the image (See http://hl7.org/fhir/SearchParameter/imagingstudy-study).', - }, - modality: { - type: TokenScalar, - description: - 'The modality of the series (See http://hl7.org/fhir/SearchParameter/imagingstudy-modality).', + fhirtype: 'uri', + xpath: 'ImagingStudy.series.uid', + description: 'The identifier of the series of images', }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-started started: { type: DateScalar, - description: - 'When the study was started (See http://hl7.org/fhir/SearchParameter/imagingstudy-started).', + fhirtype: 'date', + xpath: 'ImagingStudy.started', + description: 'When the study was started', }, - dicom_class: { + // http://hl7.org/fhir/SearchParameter/ImagingStudy-study + study: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ImagingStudy.uid', + description: 'The study identifier for the image', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-uid + uid: { type: UriScalar, - description: - 'The type of the instance (See http://hl7.org/fhir/SearchParameter/imagingstudy-dicom-class).', + fhirtype: 'uri', + xpath: 'ImagingStudy.series.instance.uid', + description: 'The instance unique identifier', }, }; diff --git a/src/resources/1_0_2/parameters/immunization.parameters.js b/src/resources/1_0_2/parameters/immunization.parameters.js index a2b48bd9..0f4587f7 100644 --- a/src/resources/1_0_2/parameters/immunization.parameters.js +++ b/src/resources/1_0_2/parameters/immunization.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,84 +8,117 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the immunization query */ module.exports = { - reaction: { - type: GraphQLString, - description: - 'Additional information on reaction (See http://hl7.org/fhir/SearchParameter/immunization-reaction).', - }, - requester: { - type: GraphQLString, - description: - 'The practitioner who ordered the vaccination (See http://hl7.org/fhir/SearchParameter/immunization-requester).', + // http://hl7.org/fhir/SearchParameter/Immunization-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Immunization.date', + description: 'Vaccination (non)-Administration Date', }, + // http://hl7.org/fhir/SearchParameter/Immunization-dose-sequence dose_sequence: { type: GraphQLString, - description: - 'Dose number within series (See http://hl7.org/fhir/SearchParameter/immunization-dose-sequence).', + fhirtype: 'number', + xpath: 'Immunization.vaccinationProtocol.doseSequence', + description: 'Dose number within series', }, - status: { + // http://hl7.org/fhir/SearchParameter/Immunization-identifier + identifier: { type: TokenScalar, - description: - 'Immunization event status (See http://hl7.org/fhir/SearchParameter/immunization-status).', + fhirtype: 'token', + xpath: 'Immunization.identifier', + description: 'Business identifier', }, + // http://hl7.org/fhir/SearchParameter/Immunization-location location: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.location', description: - 'The service delivery location or facility in which the vaccine was / was to be administered (See http://hl7.org/fhir/SearchParameter/immunization-location).', + 'The service delivery location or facility in which the vaccine was / was to be administered', }, - reason: { - type: TokenScalar, - description: - 'Why immunization occurred (See http://hl7.org/fhir/SearchParameter/immunization-reason).', + // http://hl7.org/fhir/SearchParameter/Immunization-lot-number + lot_number: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Immunization.lotNumber', + description: 'Vaccine Lot Number', }, - reaction_date: { - type: DateScalar, - description: - 'When reaction started (See http://hl7.org/fhir/SearchParameter/immunization-reaction-date).', + // http://hl7.org/fhir/SearchParameter/Immunization-manufacturer + manufacturer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.manufacturer', + description: 'Vaccine Manufacturer', }, + // http://hl7.org/fhir/SearchParameter/Immunization-notgiven notgiven: { type: TokenScalar, - description: - 'Administrations which were not given (See http://hl7.org/fhir/SearchParameter/immunization-notgiven).', - }, - date: { - type: DateScalar, - description: - 'Vaccination (non)-Administration Date (See http://hl7.org/fhir/SearchParameter/immunization-date).', - }, - reason_not_given: { - type: TokenScalar, - description: - 'Explanation of reason vaccination was not administered (See http://hl7.org/fhir/SearchParameter/immunization-reason-not-given).', - }, - vaccine_code: { - type: TokenScalar, - description: - 'Vaccine Product Administered (See http://hl7.org/fhir/SearchParameter/immunization-vaccine-code).', + fhirtype: 'token', + xpath: 'Immunization.wasNotGiven', + description: 'Administrations which were not given', }, + // http://hl7.org/fhir/SearchParameter/Immunization-patient patient: { type: GraphQLString, - description: - 'The patient for the vaccination record (See http://hl7.org/fhir/SearchParameter/immunization-patient).', + fhirtype: 'reference', + xpath: 'Immunization.patient', + description: 'The patient for the vaccination record', }, - lot_number: { + // http://hl7.org/fhir/SearchParameter/Immunization-performer + performer: { type: GraphQLString, - description: - 'Vaccine Lot Number (See http://hl7.org/fhir/SearchParameter/immunization-lot-number).', + fhirtype: 'reference', + xpath: 'Immunization.performer', + description: 'The practitioner who administered the vaccination', }, - manufacturer: { + // http://hl7.org/fhir/SearchParameter/Immunization-reaction + reaction: { type: GraphQLString, - description: - 'Vaccine Manufacturer (See http://hl7.org/fhir/SearchParameter/immunization-manufacturer).', + fhirtype: 'reference', + xpath: 'Immunization.reaction.detail', + description: 'Additional information on reaction', }, - performer: { + // http://hl7.org/fhir/SearchParameter/Immunization-reaction-date + reaction_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Immunization.reaction.date', + description: 'When reaction started', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-reason + reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.explanation.reason', + description: 'Why immunization occurred', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-reason-not-given + reason_not_given: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.explanation.reasonNotGiven', + description: 'Explanation of reason vaccination was not administered', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-requester + requester: { type: GraphQLString, - description: - 'The practitioner who administered the vaccination (See http://hl7.org/fhir/SearchParameter/immunization-performer).', + fhirtype: 'reference', + xpath: 'Immunization.requester', + description: 'The practitioner who ordered the vaccination', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Immunization-status + status: { type: TokenScalar, - description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/immunization-identifier).', + fhirtype: 'token', + xpath: 'Immunization.status', + description: 'Immunization event status', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-vaccine-code + vaccine_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.vaccineCode', + description: 'Vaccine Product Administered', }, }; diff --git a/src/resources/1_0_2/parameters/immunizationrecommendation.parameters.js b/src/resources/1_0_2/parameters/immunizationrecommendation.parameters.js index 70297685..a965c332 100644 --- a/src/resources/1_0_2/parameters/immunizationrecommendation.parameters.js +++ b/src/resources/1_0_2/parameters/immunizationrecommendation.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,49 +8,68 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the immunizationrecommendation query */ module.exports = { - information: { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ImmunizationRecommendation.recommendation.date', + description: 'Date recommendation created', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-dose-number + dose_number: { type: GraphQLString, - description: - 'Patient observations supporting recommendation (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-information).', + fhirtype: 'number', + xpath: 'ImmunizationRecommendation.recommendation.doseNumber', + description: 'Recommended dose number', }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-dose-sequence dose_sequence: { type: GraphQLString, - description: - 'Dose number within sequence (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-dose-sequence).', + fhirtype: 'number', + xpath: 'ImmunizationRecommendation.recommendation.protocol.doseSequence', + description: 'Dose number within sequence', }, - patient: { - type: GraphQLString, - description: - 'Who this profile is for (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-patient).', + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.identifier', + description: 'Business identifier', }, - support: { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-information + information: { type: GraphQLString, - description: - 'Past immunizations supporting recommendation (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-support).', + fhirtype: 'reference', + xpath: + 'ImmunizationRecommendation.recommendation.supportingPatientInformation', + description: 'Patient observations supporting recommendation', }, - vaccine_type: { - type: TokenScalar, - description: - 'Vaccine recommendation applies to (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-vaccine-type).', + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImmunizationRecommendation.patient', + description: 'Who this profile is for', }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-status status: { type: TokenScalar, - description: - 'Vaccine administration status (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-status).', + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.recommendation.forecastStatus', + description: 'Vaccine administration status', }, - dose_number: { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-support + support: { type: GraphQLString, - description: - 'Recommended dose number (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-dose-number).', + fhirtype: 'reference', + xpath: 'ImmunizationRecommendation.recommendation.supportingImmunization', + description: 'Past immunizations supporting recommendation', }, - date: { - type: DateScalar, - description: - 'Date recommendation created (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-date).', - }, - identifier: { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-vaccine-type + vaccine_type: { type: TokenScalar, - description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/immunizationrecommendation-identifier).', + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.recommendation.vaccineCode', + description: 'Vaccine recommendation applies to', }, }; diff --git a/src/resources/1_0_2/parameters/implementationguide.parameters.js b/src/resources/1_0_2/parameters/implementationguide.parameters.js index b44301e2..26dc086c 100644 --- a/src/resources/1_0_2/parameters/implementationguide.parameters.js +++ b/src/resources/1_0_2/parameters/implementationguide.parameters.js @@ -1,7 +1,7 @@ -const UriScalar = require('../scalars/uri.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,54 +9,74 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the implementationguide query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.useContext', + description: 'A use context assigned to the structure', + }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ImplementationGuide.date', + description: 'The implementation guide publication date', + }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-dependency dependency: { type: UriScalar, - description: - 'Where to find dependency (See http://hl7.org/fhir/SearchParameter/implementationguide-dependency).', - }, - status: { - type: TokenScalar, - description: - 'The current status of the implementation guide (See http://hl7.org/fhir/SearchParameter/implementationguide-status).', + fhirtype: 'uri', + xpath: 'ImplementationGuide.dependency.uri', + description: 'Where to find dependency', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-description description: { type: GraphQLString, - description: - 'Text search in the description of the implementation guide (See http://hl7.org/fhir/SearchParameter/implementationguide-description).', + fhirtype: 'string', + xpath: 'ImplementationGuide.description', + description: 'Text search in the description of the implementation guide', + }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-experimental + experimental: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.experimental', + description: 'If for testing purposes, not real usage', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-name name: { type: GraphQLString, - description: - 'Name of the implementation guide (See http://hl7.org/fhir/SearchParameter/implementationguide-name).', + fhirtype: 'string', + xpath: 'ImplementationGuide.name', + description: 'Name of the implementation guide', }, - context: { - type: TokenScalar, - description: - 'A use context assigned to the structure (See http://hl7.org/fhir/SearchParameter/implementationguide-context).', + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ImplementationGuide.publisher', + description: 'Name of the publisher of the implementation guide', }, - experimental: { + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-status + status: { type: TokenScalar, - description: - 'If for testing purposes, not real usage (See http://hl7.org/fhir/SearchParameter/implementationguide-experimental).', - }, - date: { - type: DateScalar, - description: - 'The implementation guide publication date (See http://hl7.org/fhir/SearchParameter/implementationguide-date).', + fhirtype: 'token', + xpath: 'ImplementationGuide.status', + description: 'The current status of the implementation guide', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-url url: { type: UriScalar, - description: - 'Absolute URL used to reference this Implementation Guide (See http://hl7.org/fhir/SearchParameter/implementationguide-url).', - }, - publisher: { - type: GraphQLString, - description: - 'Name of the publisher of the implementation guide (See http://hl7.org/fhir/SearchParameter/implementationguide-publisher).', + fhirtype: 'uri', + xpath: 'ImplementationGuide.url', + description: 'Absolute URL used to reference this Implementation Guide', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-version version: { type: TokenScalar, - description: - 'The version identifier of the implementation guide (See http://hl7.org/fhir/SearchParameter/implementationguide-version).', + fhirtype: 'token', + xpath: 'ImplementationGuide.version', + description: 'The version identifier of the implementation guide', }, }; diff --git a/src/resources/1_0_2/parameters/list.parameters.js b/src/resources/1_0_2/parameters/list.parameters.js index a3a3660f..a3f48cc2 100644 --- a/src/resources/1_0_2/parameters/list.parameters.js +++ b/src/resources/1_0_2/parameters/list.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,59 +8,81 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the list query */ module.exports = { - title: { - type: GraphQLString, - description: - 'Descriptive name for the list (See http://hl7.org/fhir/SearchParameter/list-title).', - }, - patient: { - type: GraphQLString, - description: - 'If all resources have the same subject (See http://hl7.org/fhir/SearchParameter/list-patient).', + // http://hl7.org/fhir/SearchParameter/List-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'List.code', + description: 'What the purpose of this list is', }, - source: { - type: GraphQLString, - description: - 'Who and/or what defined the list contents (aka Author) (See http://hl7.org/fhir/SearchParameter/list-source).', + // http://hl7.org/fhir/SearchParameter/List-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'List.date', + description: 'When the list was prepared', }, - status: { + // http://hl7.org/fhir/SearchParameter/List-empty-reason + empty_reason: { type: TokenScalar, - description: - 'current | retired | entered-in-error (See http://hl7.org/fhir/SearchParameter/list-status).', + fhirtype: 'token', + xpath: 'List.emptyReason', + description: 'Why list is empty', }, - subject: { + // http://hl7.org/fhir/SearchParameter/List-encounter + encounter: { type: GraphQLString, - description: - 'If all resources have the same subject (See http://hl7.org/fhir/SearchParameter/list-subject).', + fhirtype: 'reference', + xpath: 'List.encounter', + description: 'Context in which list created', }, + // http://hl7.org/fhir/SearchParameter/List-item item: { type: GraphQLString, - description: - 'Actual entry (See http://hl7.org/fhir/SearchParameter/list-item).', + fhirtype: 'reference', + xpath: 'List.entry.item', + description: 'Actual entry', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/List-notes + notes: { type: GraphQLString, - description: - 'Context in which list created (See http://hl7.org/fhir/SearchParameter/list-encounter).', + fhirtype: 'string', + xpath: 'List.note', + description: 'Comments about the list', }, - code: { - type: TokenScalar, - description: - 'What the purpose of this list is (See http://hl7.org/fhir/SearchParameter/list-code).', - }, - notes: { + // http://hl7.org/fhir/SearchParameter/List-patient + patient: { type: GraphQLString, - description: - 'Comments about the list (See http://hl7.org/fhir/SearchParameter/list-notes).', + fhirtype: 'reference', + xpath: 'List.subject', + description: 'If all resources have the same subject', }, - date: { - type: DateScalar, - description: - 'When the list was prepared (See http://hl7.org/fhir/SearchParameter/list-date).', + // http://hl7.org/fhir/SearchParameter/List-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.source', + description: 'Who and/or what defined the list contents (aka Author)', }, - empty_reason: { + // http://hl7.org/fhir/SearchParameter/List-status + status: { type: TokenScalar, - description: - 'Why list is empty (See http://hl7.org/fhir/SearchParameter/list-empty-reason).', + fhirtype: 'token', + xpath: 'List.status', + description: 'current | retired | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/List-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.subject', + description: 'If all resources have the same subject', + }, + // http://hl7.org/fhir/SearchParameter/List-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'List.title', + description: 'Descriptive name for the list', }, }; diff --git a/src/resources/1_0_2/parameters/location.parameters.js b/src/resources/1_0_2/parameters/location.parameters.js index 74b9bd74..5dc84852 100644 --- a/src/resources/1_0_2/parameters/location.parameters.js +++ b/src/resources/1_0_2/parameters/location.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,74 +7,105 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the location query */ module.exports = { - organization: { - type: GraphQLString, - description: - 'Searches for locations that are managed by the provided organization (See http://hl7.org/fhir/SearchParameter/location-organization).', - }, - address_state: { + // http://hl7.org/fhir/SearchParameter/Location-address + address: { type: GraphQLString, - description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/location-address-state).', + fhirtype: 'string', + xpath: 'Location.address', + description: 'A (part of the) address of the location', }, + // http://hl7.org/fhir/SearchParameter/Location-address-city address_city: { type: GraphQLString, - description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/location-address-city).', - }, - near: { - type: TokenScalar, - description: - 'The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency) (See http://hl7.org/fhir/SearchParameter/location-near).', + fhirtype: 'string', + xpath: 'Location.address.city', + description: 'A city specified in an address', }, - partof: { + // http://hl7.org/fhir/SearchParameter/Location-address-country + address_country: { type: GraphQLString, - description: - 'The location of which this location is a part (See http://hl7.org/fhir/SearchParameter/location-partof).', + fhirtype: 'string', + xpath: 'Location.address.country', + description: 'A country specified in an address', }, - status: { - type: TokenScalar, - description: - 'Searches for locations with a specific kind of status (See http://hl7.org/fhir/SearchParameter/location-status).', + // http://hl7.org/fhir/SearchParameter/Location-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Location.address.postalCode', + description: 'A postal code specified in an address', }, - address: { + // http://hl7.org/fhir/SearchParameter/Location-address-state + address_state: { type: GraphQLString, - description: - 'A (part of the) address of the location (See http://hl7.org/fhir/SearchParameter/location-address).', + fhirtype: 'string', + xpath: 'Location.address.state', + description: 'A state specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Location-address-use address_use: { type: TokenScalar, - description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/location-address-use).', + fhirtype: 'token', + xpath: 'Location.address.use', + description: 'A use code specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Location-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.identifier', + description: 'Unique code or number identifying the location to its users', + }, + // http://hl7.org/fhir/SearchParameter/Location-name name: { type: GraphQLString, - description: - 'A (portion of the) name of the location (See http://hl7.org/fhir/SearchParameter/location-name).', + fhirtype: 'string', + xpath: 'Location.name', + description: 'A (portion of the) name of the location', }, - address_country: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Location-near + near: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.position', description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/location-address-country).', + 'The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)', }, + // http://hl7.org/fhir/SearchParameter/Location-near-distance near_distance: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.position', description: - 'A distance quantity to limit the near search to locations within a specific distance (See http://hl7.org/fhir/SearchParameter/location-near-distance).', + 'A distance quantity to limit the near search to locations within a specific distance', }, - type: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Location-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Location.managingOrganization', description: - 'A code for the type of location (See http://hl7.org/fhir/SearchParameter/location-type).', + 'Searches for locations that are managed by the provided organization', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Location-partof + partof: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Location.partOf', + description: 'The location of which this location is a part', + }, + // http://hl7.org/fhir/SearchParameter/Location-status + status: { type: TokenScalar, - description: - 'Unique code or number identifying the location to its users (See http://hl7.org/fhir/SearchParameter/location-identifier).', + fhirtype: 'token', + xpath: 'Location.status', + description: 'Searches for locations with a specific kind of status', }, - address_postalcode: { - type: GraphQLString, - description: - 'A postal code specified in an address (See http://hl7.org/fhir/SearchParameter/location-address-postalcode).', + // http://hl7.org/fhir/SearchParameter/Location-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.type', + description: 'A code for the type of location', }, }; diff --git a/src/resources/1_0_2/parameters/media.parameters.js b/src/resources/1_0_2/parameters/media.parameters.js index 8f5a64bd..e66d6723 100644 --- a/src/resources/1_0_2/parameters/media.parameters.js +++ b/src/resources/1_0_2/parameters/media.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the media query */ module.exports = { - patient: { - type: GraphQLString, - description: - 'Who/What this Media is a record of (See http://hl7.org/fhir/SearchParameter/media-patient).', - }, + // http://hl7.org/fhir/SearchParameter/Media-created created: { type: DateScalar, - description: - 'Date attachment was first created (See http://hl7.org/fhir/SearchParameter/media-created).', + fhirtype: 'date', + xpath: 'Media.content.creation', + description: 'Date attachment was first created', + }, + // http://hl7.org/fhir/SearchParameter/Media-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.identifier', + description: 'Identifier(s) for the image', + }, + // http://hl7.org/fhir/SearchParameter/Media-operator + operator: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.operator', + description: 'The person who generated the image', + }, + // http://hl7.org/fhir/SearchParameter/Media-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.subject', + description: 'Who/What this Media is a record of', }, + // http://hl7.org/fhir/SearchParameter/Media-subject subject: { type: GraphQLString, - description: - 'Who/What this Media is a record of (See http://hl7.org/fhir/SearchParameter/media-subject).', + fhirtype: 'reference', + xpath: 'Media.subject', + description: 'Who/What this Media is a record of', }, + // http://hl7.org/fhir/SearchParameter/Media-subtype subtype: { type: TokenScalar, - description: - 'The type of acquisition equipment/process (See http://hl7.org/fhir/SearchParameter/media-subtype).', - }, - view: { - type: TokenScalar, - description: - 'Imaging view, e.g. Lateral or Antero-posterior (See http://hl7.org/fhir/SearchParameter/media-view).', + fhirtype: 'token', + xpath: 'Media.subtype', + description: 'The type of acquisition equipment/process', }, + // http://hl7.org/fhir/SearchParameter/Media-type type: { type: TokenScalar, - description: - 'photo | video | audio (See http://hl7.org/fhir/SearchParameter/media-type).', + fhirtype: 'token', + xpath: 'Media.type', + description: 'photo | video | audio', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Media-view + view: { type: TokenScalar, - description: - 'Identifier(s) for the image (See http://hl7.org/fhir/SearchParameter/media-identifier).', - }, - operator: { - type: GraphQLString, - description: - 'The person who generated the image (See http://hl7.org/fhir/SearchParameter/media-operator).', + fhirtype: 'token', + xpath: 'Media.view', + description: 'Imaging view, e.g. Lateral or Antero-posterior', }, }; diff --git a/src/resources/1_0_2/parameters/medication.parameters.js b/src/resources/1_0_2/parameters/medication.parameters.js index de5c161f..4795e13d 100644 --- a/src/resources/1_0_2/parameters/medication.parameters.js +++ b/src/resources/1_0_2/parameters/medication.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,34 +7,46 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medication query */ module.exports = { - content: { - type: GraphQLString, - description: - 'A product in the package (See http://hl7.org/fhir/SearchParameter/medication-content).', - }, - form: { + // http://hl7.org/fhir/SearchParameter/Medication-code + code: { type: TokenScalar, - description: - 'powder | tablets | carton + (See http://hl7.org/fhir/SearchParameter/medication-form).', + fhirtype: 'token', + xpath: 'Medication.code', + description: 'Codes that identify this medication', }, + // http://hl7.org/fhir/SearchParameter/Medication-container container: { type: TokenScalar, - description: - 'E.g. box, vial, blister-pack (See http://hl7.org/fhir/SearchParameter/medication-container).', + fhirtype: 'token', + xpath: 'Medication.package.container', + description: 'E.g. box, vial, blister-pack', }, - manufacturer: { + // http://hl7.org/fhir/SearchParameter/Medication-content + content: { type: GraphQLString, - description: - 'Manufacturer of the item (See http://hl7.org/fhir/SearchParameter/medication-manufacturer).', + fhirtype: 'reference', + xpath: 'Medication.package.content.item', + description: 'A product in the package', }, + // http://hl7.org/fhir/SearchParameter/Medication-form + form: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.product.form', + description: 'powder | tablets | carton +', + }, + // http://hl7.org/fhir/SearchParameter/Medication-ingredient ingredient: { type: GraphQLString, - description: - 'The product contained (See http://hl7.org/fhir/SearchParameter/medication-ingredient).', + fhirtype: 'reference', + xpath: 'Medication.product.ingredient.item', + description: 'The product contained', }, - code: { - type: TokenScalar, - description: - 'Codes that identify this medication (See http://hl7.org/fhir/SearchParameter/medication-code).', + // http://hl7.org/fhir/SearchParameter/Medication-manufacturer + manufacturer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Medication.manufacturer', + description: 'Manufacturer of the item', }, }; diff --git a/src/resources/1_0_2/parameters/medicationadministration.parameters.js b/src/resources/1_0_2/parameters/medicationadministration.parameters.js index b9999f7d..8d450763 100644 --- a/src/resources/1_0_2/parameters/medicationadministration.parameters.js +++ b/src/resources/1_0_2/parameters/medicationadministration.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,59 +8,83 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medicationadministration query */ module.exports = { - medication: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.medicationCodeableConcept', + description: 'Return administrations of this medication code', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-device + device: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.device', description: - 'Return administrations of this medication resource (See http://hl7.org/fhir/SearchParameter/medicationadministration-medication).', + 'Return administrations with this administration device identity', }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-effectivetime effectivetime: { type: DateScalar, - description: - 'Date administration happened (or did not happen) (See http://hl7.org/fhir/SearchParameter/medicationadministration-effectivetime).', - }, - patient: { - type: GraphQLString, - description: - 'The identity of a patient to list administrations for (See http://hl7.org/fhir/SearchParameter/medicationadministration-patient).', + fhirtype: 'date', + xpath: 'MedicationAdministration.effectiveTimeDateTime', + description: 'Date administration happened (or did not happen)', }, - practitioner: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-encounter + encounter: { type: GraphQLString, - description: - 'Who administered substance (See http://hl7.org/fhir/SearchParameter/medicationadministration-practitioner).', + fhirtype: 'reference', + xpath: 'MedicationAdministration.encounter', + description: 'Return administrations that share this encounter', }, - status: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-identifier + identifier: { type: TokenScalar, - description: - 'MedicationAdministration event status (for example one of active/paused/completed/nullified) (See http://hl7.org/fhir/SearchParameter/medicationadministration-status).', + fhirtype: 'token', + xpath: 'MedicationAdministration.identifier', + description: 'Return administrations with this external identifier', }, - prescription: { - type: GraphQLString, - description: - 'The identity of a prescription to list administrations from (See http://hl7.org/fhir/SearchParameter/medicationadministration-prescription).', - }, - device: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-medication + medication: { type: GraphQLString, - description: - 'Return administrations with this administration device identity (See http://hl7.org/fhir/SearchParameter/medicationadministration-device).', + fhirtype: 'reference', + xpath: 'MedicationAdministration.medicationReference', + description: 'Return administrations of this medication resource', }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-notgiven notgiven: { type: TokenScalar, - description: - 'Administrations that were not made (See http://hl7.org/fhir/SearchParameter/medicationadministration-notgiven).', + fhirtype: 'token', + xpath: 'MedicationAdministration.wasNotGiven', + description: 'Administrations that were not made', }, - code: { - type: TokenScalar, - description: - 'Return administrations of this medication code (See http://hl7.org/fhir/SearchParameter/medicationadministration-code).', + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.patient', + description: 'The identity of a patient to list administrations for', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-practitioner + practitioner: { type: GraphQLString, - description: - 'Return administrations that share this encounter (See http://hl7.org/fhir/SearchParameter/medicationadministration-encounter).', + fhirtype: 'reference', + xpath: 'MedicationAdministration.practitioner', + description: 'Who administered substance', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-prescription + prescription: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.prescription', + description: 'The identity of a prescription to list administrations from', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-status + status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.status', description: - 'Return administrations with this external identifier (See http://hl7.org/fhir/SearchParameter/medicationadministration-identifier).', + 'MedicationAdministration event status (for example one of active/paused/completed/nullified)', }, }; diff --git a/src/resources/1_0_2/parameters/medicationdispense.parameters.js b/src/resources/1_0_2/parameters/medicationdispense.parameters.js index 7aec43a6..0b7044ed 100644 --- a/src/resources/1_0_2/parameters/medicationdispense.parameters.js +++ b/src/resources/1_0_2/parameters/medicationdispense.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,69 +8,97 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medicationdispense query */ module.exports = { - medication: { - type: GraphQLString, - description: - 'Return dispenses of this medicine resource (See http://hl7.org/fhir/SearchParameter/medicationdispense-medication).', + // http://hl7.org/fhir/SearchParameter/MedicationDispense-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationDispense.medicationCodeableConcept', + description: 'Return dispenses of this medicine code', }, - patient: { + // http://hl7.org/fhir/SearchParameter/MedicationDispense-destination + destination: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.destination', description: - 'The identity of a patient to list dispenses for (See http://hl7.org/fhir/SearchParameter/medicationdispense-patient).', + 'Return dispenses that should be sent to a specific destination', }, - receiver: { + // http://hl7.org/fhir/SearchParameter/MedicationDispense-dispenser + dispenser: { type: GraphQLString, - description: - 'Who collected the medication (See http://hl7.org/fhir/SearchParameter/medicationdispense-receiver).', + fhirtype: 'reference', + xpath: 'MedicationDispense.dispenser', + description: 'Return all dispenses performed by a specific individual', }, - status: { + // http://hl7.org/fhir/SearchParameter/MedicationDispense-identifier + identifier: { type: TokenScalar, - description: - 'Status of the dispense (See http://hl7.org/fhir/SearchParameter/medicationdispense-status).', + fhirtype: 'token', + xpath: 'MedicationDispense.identifier', + description: 'Return dispenses with this external identifier', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-medication + medication: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.medicationReference', + description: 'Return dispenses of this medicine resource', }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.patient', + description: 'The identity of a patient to list dispenses for', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-prescription prescription: { type: GraphQLString, - description: - 'The identity of a prescription to list dispenses from (See http://hl7.org/fhir/SearchParameter/medicationdispense-prescription).', + fhirtype: 'reference', + xpath: 'MedicationDispense.authorizingPrescription', + description: 'The identity of a prescription to list dispenses from', }, - responsibleparty: { + // http://hl7.org/fhir/SearchParameter/MedicationDispense-receiver + receiver: { type: GraphQLString, - description: - 'Return all dispenses with the specified responsible party (See http://hl7.org/fhir/SearchParameter/medicationdispense-responsibleparty).', + fhirtype: 'reference', + xpath: 'MedicationDispense.receiver', + description: 'Who collected the medication', }, - dispenser: { + // http://hl7.org/fhir/SearchParameter/MedicationDispense-responsibleparty + responsibleparty: { type: GraphQLString, - description: - 'Return all dispenses performed by a specific individual (See http://hl7.org/fhir/SearchParameter/medicationdispense-dispenser).', + fhirtype: 'reference', + xpath: 'MedicationDispense.substitution.responsibleParty', + description: 'Return all dispenses with the specified responsible party', }, - code: { + // http://hl7.org/fhir/SearchParameter/MedicationDispense-status + status: { type: TokenScalar, - description: - 'Return dispenses of this medicine code (See http://hl7.org/fhir/SearchParameter/medicationdispense-code).', + fhirtype: 'token', + xpath: 'MedicationDispense.status', + description: 'Status of the dispense', }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-type type: { type: TokenScalar, - description: - 'Return all dispenses of a specific type (See http://hl7.org/fhir/SearchParameter/medicationdispense-type).', - }, - identifier: { - type: TokenScalar, - description: - 'Return dispenses with this external identifier (See http://hl7.org/fhir/SearchParameter/medicationdispense-identifier).', - }, - whenprepared: { - type: DateScalar, - description: - 'Date when medication prepared (See http://hl7.org/fhir/SearchParameter/medicationdispense-whenprepared).', + fhirtype: 'token', + xpath: 'MedicationDispense.type', + description: 'Return all dispenses of a specific type', }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-whenhandedover whenhandedover: { type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationDispense.whenHandedOver', description: - 'Date when medication handed over to patient (outpatient setting), or supplied to ward or clinic (inpatient setting) (See http://hl7.org/fhir/SearchParameter/medicationdispense-whenhandedover).', + 'Date when medication handed over to patient (outpatient setting), or supplied to ward or clinic (inpatient setting)', }, - destination: { - type: GraphQLString, - description: - 'Return dispenses that should be sent to a specific destination (See http://hl7.org/fhir/SearchParameter/medicationdispense-destination).', + // http://hl7.org/fhir/SearchParameter/MedicationDispense-whenprepared + whenprepared: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationDispense.whenPrepared', + description: 'Date when medication prepared', }, }; diff --git a/src/resources/1_0_2/parameters/medicationorder.parameters.js b/src/resources/1_0_2/parameters/medicationorder.parameters.js index 4ff0c52a..fe6e7179 100644 --- a/src/resources/1_0_2/parameters/medicationorder.parameters.js +++ b/src/resources/1_0_2/parameters/medicationorder.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medicationorder query */ module.exports = { - medication: { - type: GraphQLString, - description: - 'Return administrations of this medication reference (See http://hl7.org/fhir/SearchParameter/medicationorder-medication).', + // http://hl7.org/fhir/SearchParameter/MedicationOrder-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationOrder.medicationCodeableConcept', + description: 'Return administrations of this medication code', }, + // http://hl7.org/fhir/SearchParameter/MedicationOrder-datewritten datewritten: { type: DateScalar, - description: - 'Return prescriptions written on this date (See http://hl7.org/fhir/SearchParameter/medicationorder-datewritten).', + fhirtype: 'date', + xpath: 'MedicationOrder.dateWritten', + description: 'Return prescriptions written on this date', }, - patient: { + // http://hl7.org/fhir/SearchParameter/MedicationOrder-encounter + encounter: { type: GraphQLString, - description: - 'The identity of a patient to list orders for (See http://hl7.org/fhir/SearchParameter/medicationorder-patient).', + fhirtype: 'reference', + xpath: 'MedicationOrder.encounter', + description: 'Return prescriptions with this encounter identifier', }, - status: { + // http://hl7.org/fhir/SearchParameter/MedicationOrder-identifier + identifier: { type: TokenScalar, - description: - 'Status of the prescription (See http://hl7.org/fhir/SearchParameter/medicationorder-status).', + fhirtype: 'token', + xpath: 'MedicationOrder.identifier', + description: 'Return prescriptions with this external identifier', }, - prescriber: { + // http://hl7.org/fhir/SearchParameter/MedicationOrder-medication + medication: { type: GraphQLString, - description: - 'Who ordered the medication(s) (See http://hl7.org/fhir/SearchParameter/medicationorder-prescriber).', + fhirtype: 'reference', + xpath: 'MedicationOrder.medicationReference', + description: 'Return administrations of this medication reference', }, - code: { - type: TokenScalar, - description: - 'Return administrations of this medication code (See http://hl7.org/fhir/SearchParameter/medicationorder-code).', + // http://hl7.org/fhir/SearchParameter/MedicationOrder-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationOrder.patient', + description: 'The identity of a patient to list orders for', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/MedicationOrder-prescriber + prescriber: { type: GraphQLString, - description: - 'Return prescriptions with this encounter identifier (See http://hl7.org/fhir/SearchParameter/medicationorder-encounter).', + fhirtype: 'reference', + xpath: 'MedicationOrder.prescriber', + description: 'Who ordered the medication(s)', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/MedicationOrder-status + status: { type: TokenScalar, - description: - 'Return prescriptions with this external identifier (See http://hl7.org/fhir/SearchParameter/medicationorder-identifier).', + fhirtype: 'token', + xpath: 'MedicationOrder.status', + description: 'Status of the prescription', }, }; diff --git a/src/resources/1_0_2/parameters/medicationstatement.parameters.js b/src/resources/1_0_2/parameters/medicationstatement.parameters.js index 5d0bd805..f65edf76 100644 --- a/src/resources/1_0_2/parameters/medicationstatement.parameters.js +++ b/src/resources/1_0_2/parameters/medicationstatement.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,39 +8,53 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medicationstatement query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicationStatement-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.medicationCodeableConcept', + description: 'Return administrations of this medication code', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-effectivedate + effectivedate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationStatement.effectiveDateTime', + description: 'Date when patient was taking (or not taking) the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.identifier', + description: 'Return statements with this external identifier', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-medication medication: { type: GraphQLString, - description: - 'Return administrations of this medication reference (See http://hl7.org/fhir/SearchParameter/medicationstatement-medication).', + fhirtype: 'reference', + xpath: 'MedicationStatement.medicationReference', + description: 'Return administrations of this medication reference', }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-patient patient: { type: GraphQLString, - description: - 'The identity of a patient to list statements for (See http://hl7.org/fhir/SearchParameter/medicationstatement-patient).', + fhirtype: 'reference', + xpath: 'MedicationStatement.patient', + description: 'The identity of a patient to list statements for', }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-source source: { type: GraphQLString, - description: - 'Who the information in the statement came from (See http://hl7.org/fhir/SearchParameter/medicationstatement-source).', + fhirtype: 'reference', + xpath: 'MedicationStatement.informationSource', + description: 'Who the information in the statement came from', }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-status status: { type: TokenScalar, - description: - 'Return statements that match the given status (See http://hl7.org/fhir/SearchParameter/medicationstatement-status).', - }, - code: { - type: TokenScalar, - description: - 'Return administrations of this medication code (See http://hl7.org/fhir/SearchParameter/medicationstatement-code).', - }, - identifier: { - type: TokenScalar, - description: - 'Return statements with this external identifier (See http://hl7.org/fhir/SearchParameter/medicationstatement-identifier).', - }, - effectivedate: { - type: DateScalar, - description: - 'Date when patient was taking (or not taking) the medication (See http://hl7.org/fhir/SearchParameter/medicationstatement-effectivedate).', + fhirtype: 'token', + xpath: 'MedicationStatement.status', + description: 'Return statements that match the given status', }, }; diff --git a/src/resources/1_0_2/parameters/messageheader.parameters.js b/src/resources/1_0_2/parameters/messageheader.parameters.js index af633d9c..63750171 100644 --- a/src/resources/1_0_2/parameters/messageheader.parameters.js +++ b/src/resources/1_0_2/parameters/messageheader.parameters.js @@ -1,7 +1,7 @@ -const UriScalar = require('../scalars/uri.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -9,74 +9,102 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the messageheader query */ module.exports = { - destination_uri: { - type: UriScalar, - description: - 'Actual destination address or id (See http://hl7.org/fhir/SearchParameter/messageheader-destination-uri).', - }, - receiver: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-author + author: { type: GraphQLString, - description: - "Intended 'real-world' recipient for the data (See http://hl7.org/fhir/SearchParameter/messageheader-receiver).", + fhirtype: 'reference', + xpath: 'MessageHeader.author', + description: 'The source of the decision', }, - responsible: { - type: GraphQLString, - description: - 'Final responsibility for event (See http://hl7.org/fhir/SearchParameter/messageheader-responsible).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageHeader.response.code', + description: 'ok | transient-error | fatal-error', }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-data data: { type: GraphQLString, - description: - 'The actual content of the message (See http://hl7.org/fhir/SearchParameter/messageheader-data).', + fhirtype: 'reference', + xpath: 'MessageHeader.data', + description: 'The actual content of the message', }, - code: { - type: TokenScalar, - description: - 'ok | transient-error | fatal-error (See http://hl7.org/fhir/SearchParameter/messageheader-code).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-destination + destination: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MessageHeader.destination.name', + description: 'Name of system', }, - response_id: { - type: TokenScalar, - description: - 'Id of original message (See http://hl7.org/fhir/SearchParameter/messageheader-response-id).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-destination-uri + destination_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'MessageHeader.destination.endpoint', + description: 'Actual destination address or id', }, - destination: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-enterer + enterer: { type: GraphQLString, - description: - 'Name of system (See http://hl7.org/fhir/SearchParameter/messageheader-destination).', + fhirtype: 'reference', + xpath: 'MessageHeader.enterer', + description: 'The source of the data entry', }, - timestamp: { - type: DateScalar, - description: - 'Time that the message was sent (See http://hl7.org/fhir/SearchParameter/messageheader-timestamp).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-event + event: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageHeader.event', + description: 'Code for the event this message represents', }, - author: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-receiver + receiver: { type: GraphQLString, - description: - 'The source of the decision (See http://hl7.org/fhir/SearchParameter/messageheader-author).', + fhirtype: 'reference', + xpath: 'MessageHeader.receiver', + description: "Intended 'real-world' recipient for the data", }, - source_uri: { - type: UriScalar, - description: - 'Actual message source address or id (See http://hl7.org/fhir/SearchParameter/messageheader-source-uri).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-response-id + response_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageHeader.response.identifier', + description: 'Id of original message', }, - source: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-responsible + responsible: { type: GraphQLString, - description: - 'Name of system (See http://hl7.org/fhir/SearchParameter/messageheader-source).', + fhirtype: 'reference', + xpath: 'MessageHeader.responsible', + description: 'Final responsibility for event', }, - enterer: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-source + source: { type: GraphQLString, - description: - 'The source of the data entry (See http://hl7.org/fhir/SearchParameter/messageheader-enterer).', + fhirtype: 'string', + xpath: 'MessageHeader.source.name', + description: 'Name of system', }, - event: { - type: TokenScalar, - description: - 'Code for the event this message represents (See http://hl7.org/fhir/SearchParameter/messageheader-event).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-source-uri + source_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'MessageHeader.source.endpoint', + description: 'Actual message source address or id', }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-target target: { type: GraphQLString, - description: - 'Particular delivery destination within the destination (See http://hl7.org/fhir/SearchParameter/messageheader-target).', + fhirtype: 'reference', + xpath: 'MessageHeader.destination.target', + description: 'Particular delivery destination within the destination', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-timestamp + timestamp: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MessageHeader.timestamp', + description: 'Time that the message was sent', }, }; diff --git a/src/resources/1_0_2/parameters/namingsystem.parameters.js b/src/resources/1_0_2/parameters/namingsystem.parameters.js index e60070bb..db4510d6 100644 --- a/src/resources/1_0_2/parameters/namingsystem.parameters.js +++ b/src/resources/1_0_2/parameters/namingsystem.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,74 +8,102 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the namingsystem query */ module.exports = { - responsible: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-contact + contact: { type: GraphQLString, - description: - 'Who maintains system namespace? (See http://hl7.org/fhir/SearchParameter/namingsystem-responsible).', - }, - status: { - type: TokenScalar, - description: - 'draft | active | retired (See http://hl7.org/fhir/SearchParameter/namingsystem-status).', + fhirtype: 'string', + xpath: 'NamingSystem.contact.name', + description: 'Name of a individual to contact', }, - type: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-context + context: { type: TokenScalar, - description: - 'e.g. driver, provider, patient, bank etc. (See http://hl7.org/fhir/SearchParameter/namingsystem-type).', + fhirtype: 'token', + xpath: 'NamingSystem.useContext', + description: 'Content intends to support these contexts', }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-date date: { type: DateScalar, - description: - 'Publication Date(/time) (See http://hl7.org/fhir/SearchParameter/namingsystem-date).', - }, - period: { - type: DateScalar, - description: - 'When is identifier valid? (See http://hl7.org/fhir/SearchParameter/namingsystem-period).', + fhirtype: 'date', + xpath: 'NamingSystem.date', + description: 'Publication Date(/time)', }, - contact: { - type: GraphQLString, - description: - 'Name of a individual to contact (See http://hl7.org/fhir/SearchParameter/namingsystem-contact).', + // http://hl7.org/fhir/SearchParameter/NamingSystem-id-type + id_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.uniqueId.type', + description: 'oid | uuid | uri | other', }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-kind kind: { type: TokenScalar, - description: - 'codesystem | identifier | root (See http://hl7.org/fhir/SearchParameter/namingsystem-kind).', + fhirtype: 'token', + xpath: 'NamingSystem.kind', + description: 'codesystem | identifier | root', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-name + name: { type: GraphQLString, - description: - 'Name of the publisher (Organization or individual) (See http://hl7.org/fhir/SearchParameter/namingsystem-publisher).', + fhirtype: 'string', + xpath: 'NamingSystem.name', + description: 'Human-readable label', }, - id_type: { - type: TokenScalar, - description: - 'oid | uuid | uri | other (See http://hl7.org/fhir/SearchParameter/namingsystem-id-type).', + // http://hl7.org/fhir/SearchParameter/NamingSystem-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'NamingSystem.uniqueId.period', + description: 'When is identifier valid?', }, - name: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-publisher + publisher: { type: GraphQLString, - description: - 'Human-readable label (See http://hl7.org/fhir/SearchParameter/namingsystem-name).', + fhirtype: 'string', + xpath: 'NamingSystem.publisher', + description: 'Name of the publisher (Organization or individual)', }, - context: { - type: TokenScalar, - description: - 'Content intends to support these contexts (See http://hl7.org/fhir/SearchParameter/namingsystem-context).', + // http://hl7.org/fhir/SearchParameter/NamingSystem-replaced-by + replaced_by: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'NamingSystem.replacedBy', + description: 'Use this instead', }, - value: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-responsible + responsible: { type: GraphQLString, - description: - 'The unique identifier (See http://hl7.org/fhir/SearchParameter/namingsystem-value).', + fhirtype: 'string', + xpath: 'NamingSystem.responsible', + description: 'Who maintains system namespace?', }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.status', + description: 'draft | active | retired', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-telecom telecom: { type: TokenScalar, - description: - 'Contact details for individual or publisher (See http://hl7.org/fhir/SearchParameter/namingsystem-telecom).', + fhirtype: 'token', + xpath: 'NamingSystem.contact.telecom', + description: 'Contact details for individual or publisher', }, - replaced_by: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.type', + description: 'e.g. driver, provider, patient, bank etc.', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-value + value: { type: GraphQLString, - description: - 'Use this instead (See http://hl7.org/fhir/SearchParameter/namingsystem-replaced-by).', + fhirtype: 'string', + xpath: 'NamingSystem.uniqueId.value', + description: 'The unique identifier', }, }; diff --git a/src/resources/1_0_2/parameters/nutritionorder.parameters.js b/src/resources/1_0_2/parameters/nutritionorder.parameters.js index 4acd2bb7..be3d2b77 100644 --- a/src/resources/1_0_2/parameters/nutritionorder.parameters.js +++ b/src/resources/1_0_2/parameters/nutritionorder.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,54 +8,76 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the nutritionorder query */ module.exports = { - patient: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-additive + additive: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.enteralFormula.additiveType', + description: 'Type of module component to add to the feeding', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-datetime + datetime: { + type: DateScalar, + fhirtype: 'date', + xpath: 'NutritionOrder.dateTime', + description: 'Return nutrition orders requested on this date', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-encounter + encounter: { type: GraphQLString, - description: - 'The identity of the person who requires the diet, formula or nutritional supplement (See http://hl7.org/fhir/SearchParameter/nutritionorder-patient).', + fhirtype: 'reference', + xpath: 'NutritionOrder.encounter', + description: 'Return nutrition orders with this encounter identifier', }, - status: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-formula + formula: { type: TokenScalar, - description: - 'Status of the nutrition order. (See http://hl7.org/fhir/SearchParameter/nutritionorder-status).', + fhirtype: 'token', + xpath: 'NutritionOrder.enteralFormula.baseFormulaType', + description: 'Type of enteral or infant formula', }, - supplement: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-identifier + identifier: { type: TokenScalar, - description: - 'Type of supplement product requested (See http://hl7.org/fhir/SearchParameter/nutritionorder-supplement).', + fhirtype: 'token', + xpath: 'NutritionOrder.identifier', + description: 'Return nutrition orders with this external identifier', }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-oraldiet oraldiet: { type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.oralDiet.type', description: - 'Type of diet that can be consumed orally (i.e., take via the mouth). (See http://hl7.org/fhir/SearchParameter/nutritionorder-oraldiet).', + 'Type of diet that can be consumed orally (i.e., take via the mouth).', }, - provider: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'NutritionOrder.patient', description: - 'The identify of the provider who placed the nutrition order (See http://hl7.org/fhir/SearchParameter/nutritionorder-provider).', + 'The identity of the person who requires the diet, formula or nutritional supplement', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-provider + provider: { type: GraphQLString, - description: - 'Return nutrition orders with this encounter identifier (See http://hl7.org/fhir/SearchParameter/nutritionorder-encounter).', + fhirtype: 'reference', + xpath: 'NutritionOrder.orderer', + description: 'The identify of the provider who placed the nutrition order', }, - datetime: { - type: DateScalar, - description: - 'Return nutrition orders requested on this date (See http://hl7.org/fhir/SearchParameter/nutritionorder-datetime).', - }, - additive: { - type: TokenScalar, - description: - 'Type of module component to add to the feeding (See http://hl7.org/fhir/SearchParameter/nutritionorder-additive).', - }, - identifier: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-status + status: { type: TokenScalar, - description: - 'Return nutrition orders with this external identifier (See http://hl7.org/fhir/SearchParameter/nutritionorder-identifier).', + fhirtype: 'token', + xpath: 'NutritionOrder.status', + description: 'Status of the nutrition order.', }, - formula: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-supplement + supplement: { type: TokenScalar, - description: - 'Type of enteral or infant formula (See http://hl7.org/fhir/SearchParameter/nutritionorder-formula).', + fhirtype: 'token', + xpath: 'NutritionOrder.supplement.type', + description: 'Type of supplement product requested', }, }; diff --git a/src/resources/1_0_2/parameters/observation.parameters.js b/src/resources/1_0_2/parameters/observation.parameters.js index 15ed498b..ddc9dfb0 100644 --- a/src/resources/1_0_2/parameters/observation.parameters.js +++ b/src/resources/1_0_2/parameters/observation.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,136 +8,184 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the observation query */ module.exports = { - subject: { - type: GraphQLString, - description: - 'The subject that the observation is about (See http://hl7.org/fhir/SearchParameter/observation-subject).', + // http://hl7.org/fhir/SearchParameter/Observation-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.category', + description: 'The classification of the type of observation', }, - encounter: { - type: GraphQLString, - description: - 'Healthcare event related to the observation (See http://hl7.org/fhir/SearchParameter/observation-encounter).', + // http://hl7.org/fhir/SearchParameter/Observation-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.code', + description: 'The code of the observation type', }, - date: { - type: DateScalar, - description: - 'Obtained date/time. If the obtained element is a period, a date that falls in the period (See http://hl7.org/fhir/SearchParameter/observation-date).', + // http://hl7.org/fhir/SearchParameter/Observation-component-code + component_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.component.code', + description: 'The component code of the observation type', }, - component_value_quantity: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Observation-component-data-absent-reason + component_data_absent_reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.component.dataAbsentReason', description: - 'The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data) (See http://hl7.org/fhir/SearchParameter/observation-component-value-quantity).', + 'The reason why the expected value in the element Observation.component.value[x] is missing.', }, - related: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Observation-component-value-concept + component_value_concept: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.component.valueCodeableConcept', description: - 'Related Observations - search on related-type and related-target together (See http://hl7.org/fhir/SearchParameter/observation-related).', + 'The value of the component observation, if the value is a CodeableConcept', }, - patient: { + // http://hl7.org/fhir/SearchParameter/Observation-component-value-quantity + component_value_quantity: { type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Observation.component.valueQuantity', description: - 'The subject that the observation is about (if patient) (See http://hl7.org/fhir/SearchParameter/observation-patient).', + 'The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)', }, - specimen: { + // http://hl7.org/fhir/SearchParameter/Observation-component-value-string + component_value_string: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Observation.component.valueString', description: - 'Specimen used for this observation (See http://hl7.org/fhir/SearchParameter/observation-specimen).', + 'The value of the component observation, if the value is a string, and also searches in CodeableConcept.text', }, - component_value_concept: { + // http://hl7.org/fhir/SearchParameter/Observation-data-absent-reason + data_absent_reason: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.dataAbsentReason', description: - 'The value of the component observation, if the value is a CodeableConcept (See http://hl7.org/fhir/SearchParameter/observation-component-value-concept).', + 'The reason why the expected value in the element Observation.value[x] is missing.', }, - // TODO: Original field name is invalid (component-code-value-[x]). You may need to manually update this name based on the original structure definition. - component_code_value_: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Observation-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Observation.effectiveDateTime', description: - 'Both component code and one of the component value parameters (See http://hl7.org/fhir/SearchParameter/observation-component-code-value).', + 'Obtained date/time. If the obtained element is a period, a date that falls in the period', }, - value_quantity: { + // http://hl7.org/fhir/SearchParameter/Observation-device + device: { type: GraphQLString, - description: - 'The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data) (See http://hl7.org/fhir/SearchParameter/observation-value-quantity).', - }, - value_date: { - type: DateScalar, - description: - 'The value of the observation, if the value is a date or period of time (See http://hl7.org/fhir/SearchParameter/observation-value-date).', + fhirtype: 'reference', + xpath: 'Observation.device', + description: 'The Device that generated the observation data.', }, - value_string: { + // http://hl7.org/fhir/SearchParameter/Observation-encounter + encounter: { type: GraphQLString, - description: - 'The value of the observation, if the value is a string, and also searches in CodeableConcept.text (See http://hl7.org/fhir/SearchParameter/observation-value-string).', + fhirtype: 'reference', + xpath: 'Observation.encounter', + description: 'Healthcare event related to the observation', }, - component_code: { + // http://hl7.org/fhir/SearchParameter/Observation-identifier + identifier: { type: TokenScalar, - description: - 'The component code of the observation type (See http://hl7.org/fhir/SearchParameter/observation-component-code).', + fhirtype: 'token', + xpath: 'Observation.identifier', + description: 'The unique id for a particular observation', }, - status: { - type: TokenScalar, - description: - 'The status of the observation (See http://hl7.org/fhir/SearchParameter/observation-status).', + // http://hl7.org/fhir/SearchParameter/Observation-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.subject', + description: 'The subject that the observation is about (if patient)', }, - value_concept: { - type: TokenScalar, - description: - 'The value of the observation, if the value is a CodeableConcept (See http://hl7.org/fhir/SearchParameter/observation-value-concept).', + // http://hl7.org/fhir/SearchParameter/Observation-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.performer', + description: 'Who performed the observation', }, - code: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Observation-related + related: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', description: - 'The code of the observation type (See http://hl7.org/fhir/SearchParameter/observation-code).', + 'Related Observations - search on related-type and related-target together', }, + // http://hl7.org/fhir/SearchParameter/Observation-related-target related_target: { type: GraphQLString, - description: - 'Resource that is related to this one (See http://hl7.org/fhir/SearchParameter/observation-related-target).', + fhirtype: 'reference', + xpath: 'Observation.related.target', + description: 'Resource that is related to this one', }, - data_absent_reason: { + // http://hl7.org/fhir/SearchParameter/Observation-related-type + related_type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.related.type', description: - 'The reason why the expected value in the element Observation.value[x] is missing. (See http://hl7.org/fhir/SearchParameter/observation-data-absent-reason).', + 'has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by', }, - category: { - type: TokenScalar, - description: - 'The classification of the type of observation (See http://hl7.org/fhir/SearchParameter/observation-category).', + // http://hl7.org/fhir/SearchParameter/Observation-specimen + specimen: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.specimen', + description: 'Specimen used for this observation', }, - component_data_absent_reason: { + // http://hl7.org/fhir/SearchParameter/Observation-status + status: { type: TokenScalar, - description: - 'The reason why the expected value in the element Observation.component.value[x] is missing. (See http://hl7.org/fhir/SearchParameter/observation-component-data-absent-reason).', + fhirtype: 'token', + xpath: 'Observation.status', + description: 'The status of the observation', }, - device: { + // http://hl7.org/fhir/SearchParameter/Observation-subject + subject: { type: GraphQLString, - description: - 'The Device that generated the observation data. (See http://hl7.org/fhir/SearchParameter/observation-device).', + fhirtype: 'reference', + xpath: 'Observation.subject', + description: 'The subject that the observation is about', }, - related_type: { + // http://hl7.org/fhir/SearchParameter/Observation-value-concept + value_concept: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.valueCodeableConcept', description: - 'has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by (See http://hl7.org/fhir/SearchParameter/observation-related-type).', + 'The value of the observation, if the value is a CodeableConcept', }, - performer: { - type: GraphQLString, - description: - 'Who performed the observation (See http://hl7.org/fhir/SearchParameter/observation-performer).', - }, - identifier: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Observation-value-date + value_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Observation.valueDateTime', description: - 'The unique id for a particular observation (See http://hl7.org/fhir/SearchParameter/observation-identifier).', + 'The value of the observation, if the value is a date or period of time', }, - // TODO: Original field name is invalid (code-value-[x]). You may need to manually update this name based on the original structure definition. - code_value_: { + // http://hl7.org/fhir/SearchParameter/Observation-value-quantity + value_quantity: { type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Observation.valueQuantity', description: - 'Both code and one of the value parameters (See http://hl7.org/fhir/SearchParameter/observation-code-value).', + 'The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)', }, - component_value_string: { + // http://hl7.org/fhir/SearchParameter/Observation-value-string + value_string: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Observation.valueString', description: - 'The value of the component observation, if the value is a string, and also searches in CodeableConcept.text (See http://hl7.org/fhir/SearchParameter/observation-component-value-string).', + 'The value of the observation, if the value is a string, and also searches in CodeableConcept.text', }, }; diff --git a/src/resources/1_0_2/parameters/operationdefinition.parameters.js b/src/resources/1_0_2/parameters/operationdefinition.parameters.js index 0f0a3fb8..030cc761 100644 --- a/src/resources/1_0_2/parameters/operationdefinition.parameters.js +++ b/src/resources/1_0_2/parameters/operationdefinition.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,69 +9,95 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the operationdefinition query */ module.exports = { - status: { - type: TokenScalar, - description: - 'draft | active | retired (See http://hl7.org/fhir/SearchParameter/operationdefinition-status).', + // http://hl7.org/fhir/SearchParameter/OperationDefinition-base + base: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OperationDefinition.base', + description: 'Marks this as a profile of the base', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-code code: { type: TokenScalar, - description: - 'Name used to invoke the operation (See http://hl7.org/fhir/SearchParameter/operationdefinition-code).', + fhirtype: 'token', + xpath: 'OperationDefinition.code', + description: 'Name used to invoke the operation', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-date date: { type: DateScalar, - description: - 'Date for this version of the operation definition (See http://hl7.org/fhir/SearchParameter/operationdefinition-date).', + fhirtype: 'date', + xpath: 'OperationDefinition.date', + description: 'Date for this version of the operation definition', }, - type: { + // http://hl7.org/fhir/SearchParameter/OperationDefinition-instance + instance: { type: TokenScalar, - description: - 'Invoke at resource level for these type (See http://hl7.org/fhir/SearchParameter/operationdefinition-type).', - }, - url: { - type: UriScalar, - description: - 'Logical URL to reference this operation definition (See http://hl7.org/fhir/SearchParameter/operationdefinition-url).', + fhirtype: 'token', + xpath: 'OperationDefinition.instance', + description: 'Invoke on an instance?', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-kind kind: { type: TokenScalar, - description: - 'operation | query (See http://hl7.org/fhir/SearchParameter/operationdefinition-kind).', + fhirtype: 'token', + xpath: 'OperationDefinition.kind', + description: 'operation | query', }, - version: { - type: TokenScalar, - description: - 'Logical id for this version of the operation definition (See http://hl7.org/fhir/SearchParameter/operationdefinition-version).', + // http://hl7.org/fhir/SearchParameter/OperationDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'OperationDefinition.name', + description: 'Informal name for this operation', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-profile + profile: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OperationDefinition.parameter.profile', + description: 'Profile on the type', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher (Organization or individual) (See http://hl7.org/fhir/SearchParameter/operationdefinition-publisher).', + fhirtype: 'string', + xpath: 'OperationDefinition.publisher', + description: 'Name of the publisher (Organization or individual)', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.status', + description: 'draft | active | retired', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-system system: { type: TokenScalar, - description: - 'Invoke at the system level? (See http://hl7.org/fhir/SearchParameter/operationdefinition-system).', + fhirtype: 'token', + xpath: 'OperationDefinition.system', + description: 'Invoke at the system level?', }, - name: { - type: GraphQLString, - description: - 'Informal name for this operation (See http://hl7.org/fhir/SearchParameter/operationdefinition-name).', + // http://hl7.org/fhir/SearchParameter/OperationDefinition-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.type', + description: 'Invoke at resource level for these type', }, - base: { - type: GraphQLString, - description: - 'Marks this as a profile of the base (See http://hl7.org/fhir/SearchParameter/operationdefinition-base).', + // http://hl7.org/fhir/SearchParameter/OperationDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'OperationDefinition.url', + description: 'Logical URL to reference this operation definition', }, - instance: { + // http://hl7.org/fhir/SearchParameter/OperationDefinition-version + version: { type: TokenScalar, - description: - 'Invoke on an instance? (See http://hl7.org/fhir/SearchParameter/operationdefinition-instance).', - }, - profile: { - type: GraphQLString, - description: - 'Profile on the type (See http://hl7.org/fhir/SearchParameter/operationdefinition-profile).', + fhirtype: 'token', + xpath: 'OperationDefinition.version', + description: 'Logical id for this version of the operation definition', }, }; diff --git a/src/resources/1_0_2/parameters/order.parameters.js b/src/resources/1_0_2/parameters/order.parameters.js index d9b2e8a0..bae2a5a3 100644 --- a/src/resources/1_0_2/parameters/order.parameters.js +++ b/src/resources/1_0_2/parameters/order.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,49 +8,68 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the order query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Order-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Order.date', + description: 'When the order was made', + }, + // http://hl7.org/fhir/SearchParameter/Order-detail detail: { type: GraphQLString, - description: - 'What action is being ordered (See http://hl7.org/fhir/SearchParameter/order-detail).', + fhirtype: 'reference', + xpath: 'Order.detail', + description: 'What action is being ordered', + }, + // http://hl7.org/fhir/SearchParameter/Order-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Order.identifier', + description: 'Instance id from source, target, and/or others', }, + // http://hl7.org/fhir/SearchParameter/Order-patient patient: { type: GraphQLString, - description: - 'Patient this order is about (See http://hl7.org/fhir/SearchParameter/order-patient).', + fhirtype: 'reference', + xpath: 'Order.subject', + description: 'Patient this order is about', }, + // http://hl7.org/fhir/SearchParameter/Order-source source: { type: GraphQLString, - description: - 'Who initiated the order (See http://hl7.org/fhir/SearchParameter/order-source).', + fhirtype: 'reference', + xpath: 'Order.source', + description: 'Who initiated the order', }, + // http://hl7.org/fhir/SearchParameter/Order-subject subject: { type: GraphQLString, - description: - 'Patient this order is about (See http://hl7.org/fhir/SearchParameter/order-subject).', - }, - when: { - type: DateScalar, - description: - 'A formal schedule (See http://hl7.org/fhir/SearchParameter/order-when).', + fhirtype: 'reference', + xpath: 'Order.subject', + description: 'Patient this order is about', }, + // http://hl7.org/fhir/SearchParameter/Order-target target: { type: GraphQLString, - description: - 'Who is intended to fulfill the order (See http://hl7.org/fhir/SearchParameter/order-target).', - }, - when_code: { - type: TokenScalar, - description: - 'Code specifies when request should be done. The code may simply be a priority code (See http://hl7.org/fhir/SearchParameter/order-whencode).', + fhirtype: 'reference', + xpath: 'Order.target', + description: 'Who is intended to fulfill the order', }, - date: { + // http://hl7.org/fhir/SearchParameter/Order-when + when: { type: DateScalar, - description: - 'When the order was made (See http://hl7.org/fhir/SearchParameter/order-date).', + fhirtype: 'date', + xpath: 'Order.when.schedule', + description: 'A formal schedule', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Order-whencode + when_code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Order.when.code', description: - 'Instance id from source, target, and/or others (See http://hl7.org/fhir/SearchParameter/order-identifier).', + 'Code specifies when request should be done. The code may simply be a priority code', }, }; diff --git a/src/resources/1_0_2/parameters/orderresponse.parameters.js b/src/resources/1_0_2/parameters/orderresponse.parameters.js index b1647dd1..105501bf 100644 --- a/src/resources/1_0_2/parameters/orderresponse.parameters.js +++ b/src/resources/1_0_2/parameters/orderresponse.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,34 +8,48 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the orderresponse query */ module.exports = { - fulfillment: { - type: GraphQLString, - description: - 'Details of the outcome of performing the order (See http://hl7.org/fhir/SearchParameter/orderresponse-fulfillment).', - }, - request: { - type: GraphQLString, - description: - 'The order that this is a response to (See http://hl7.org/fhir/SearchParameter/orderresponse-request).', - }, + // http://hl7.org/fhir/SearchParameter/OrderResponse-code code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'OrderResponse.orderStatus', description: - 'pending | review | rejected | error | accepted | cancelled | replaced | aborted | completed (See http://hl7.org/fhir/SearchParameter/orderresponse-code).', + 'pending | review | rejected | error | accepted | cancelled | replaced | aborted | completed', }, + // http://hl7.org/fhir/SearchParameter/OrderResponse-date date: { type: DateScalar, - description: - 'When the response was made (See http://hl7.org/fhir/SearchParameter/orderresponse-date).', + fhirtype: 'date', + xpath: 'OrderResponse.date', + description: 'When the response was made', + }, + // http://hl7.org/fhir/SearchParameter/OrderResponse-fulfillment + fulfillment: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OrderResponse.fulfillment', + description: 'Details of the outcome of performing the order', }, + // http://hl7.org/fhir/SearchParameter/OrderResponse-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'OrderResponse.identifier', description: - 'Identifiers assigned to this order by the orderer or by the receiver (See http://hl7.org/fhir/SearchParameter/orderresponse-identifier).', + 'Identifiers assigned to this order by the orderer or by the receiver', }, + // http://hl7.org/fhir/SearchParameter/OrderResponse-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OrderResponse.request', + description: 'The order that this is a response to', + }, + // http://hl7.org/fhir/SearchParameter/OrderResponse-who who: { type: GraphQLString, - description: - 'Who made the response (See http://hl7.org/fhir/SearchParameter/orderresponse-who).', + fhirtype: 'reference', + xpath: 'OrderResponse.who', + description: 'Who made the response', }, }; diff --git a/src/resources/1_0_2/parameters/organization.parameters.js b/src/resources/1_0_2/parameters/organization.parameters.js index 3659e674..7586b7a4 100644 --- a/src/resources/1_0_2/parameters/organization.parameters.js +++ b/src/resources/1_0_2/parameters/organization.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,64 +7,91 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the organization query */ module.exports = { - address_state: { + // http://hl7.org/fhir/SearchParameter/Organization-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.active', + description: "Whether the organization's record is active", + }, + // http://hl7.org/fhir/SearchParameter/Organization-address + address: { type: GraphQLString, - description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/organization-address-state).', + fhirtype: 'string', + xpath: 'Organization.address', + description: 'A (part of the) address of the Organization', }, + // http://hl7.org/fhir/SearchParameter/Organization-address-city address_city: { type: GraphQLString, - description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/organization-address-city).', + fhirtype: 'string', + xpath: 'Organization.address.city', + description: 'A city specified in an address', }, - phonetic: { + // http://hl7.org/fhir/SearchParameter/Organization-address-country + address_country: { type: GraphQLString, - description: - "A portion of the organization's name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/organization-phonetic).", + fhirtype: 'string', + xpath: 'Organization.address.country', + description: 'A country specified in an address', }, - partof: { + // http://hl7.org/fhir/SearchParameter/Organization-address-postalcode + address_postalcode: { type: GraphQLString, - description: - 'Search all organizations that are part of the given organization (See http://hl7.org/fhir/SearchParameter/organization-partof).', + fhirtype: 'string', + xpath: 'Organization.address.postalCode', + description: 'A postal code specified in an address', }, - address: { + // http://hl7.org/fhir/SearchParameter/Organization-address-state + address_state: { type: GraphQLString, - description: - 'A (part of the) address of the Organization (See http://hl7.org/fhir/SearchParameter/organization-address).', + fhirtype: 'string', + xpath: 'Organization.address.state', + description: 'A state specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Organization-address-use address_use: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.address.use', + description: 'A use code specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Organization-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.identifier', description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/organization-address-use).', + "Any identifier for the organization (not the accreditation issuer's identifier)", }, + // http://hl7.org/fhir/SearchParameter/Organization-name name: { type: GraphQLString, - description: - "A portion of the organization's name (See http://hl7.org/fhir/SearchParameter/organization-name).", + fhirtype: 'string', + xpath: 'Organization.name', + description: "A portion of the organization's name", }, - address_country: { + // http://hl7.org/fhir/SearchParameter/Organization-partof + partof: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Organization.partOf', description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/organization-address-country).', + 'Search all organizations that are part of the given organization', }, - active: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Organization-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.name', description: - "Whether the organization's record is active (See http://hl7.org/fhir/SearchParameter/organization-active).", + "A portion of the organization's name using some kind of phonetic matching algorithm", }, + // http://hl7.org/fhir/SearchParameter/Organization-type type: { type: TokenScalar, - description: - 'A code for the type of organization (See http://hl7.org/fhir/SearchParameter/organization-type).', - }, - identifier: { - type: TokenScalar, - description: - "Any identifier for the organization (not the accreditation issuer's identifier) (See http://hl7.org/fhir/SearchParameter/organization-identifier).", - }, - address_postalcode: { - type: GraphQLString, - description: - 'A postal code specified in an address (See http://hl7.org/fhir/SearchParameter/organization-address-postalcode).', + fhirtype: 'token', + xpath: 'Organization.type', + description: 'A code for the type of organization', }, }; diff --git a/src/resources/1_0_2/parameters/patient.parameters.js b/src/resources/1_0_2/parameters/patient.parameters.js index 21417995..4d0c1157 100644 --- a/src/resources/1_0_2/parameters/patient.parameters.js +++ b/src/resources/1_0_2/parameters/patient.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,129 +8,201 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the patient query */ module.exports = { - animal_breed: { - type: TokenScalar, - description: - 'The breed for animal patients (See http://hl7.org/fhir/SearchParameter/patient-animal-breed).', - }, - phone: { + // http://hl7.org/fhir/SearchParameter/Patient-active + active: { type: TokenScalar, - description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/patient-phone).', + fhirtype: 'token', + xpath: 'Patient.active', + description: 'Whether the patient record is active', }, - phonetic: { + // http://hl7.org/fhir/SearchParameter/Patient-address + address: { type: GraphQLString, - description: - 'A portion of either family or given name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/patient-phonetic).', + fhirtype: 'string', + xpath: 'Patient.address', + description: 'An address in any kind of address/part of the patient', }, - link: { + // http://hl7.org/fhir/SearchParameter/Patient-address-city + address_city: { type: GraphQLString, - description: - 'All patients linked to the given patient (See http://hl7.org/fhir/SearchParameter/patient-link).', + fhirtype: 'string', + xpath: 'Patient.address.city', + description: 'A city specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Patient-address-country address_country: { type: GraphQLString, - description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/patient-address-country).', + fhirtype: 'string', + xpath: 'Patient.address.country', + description: 'A country specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Patient-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.postalCode', + description: 'A postalCode specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Patient-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.state', + description: 'A state specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Patient-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.address.use', + description: 'A use code specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Patient-animal-breed + animal_breed: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.animal.breed', + description: 'The breed for animal patients', + }, + // http://hl7.org/fhir/SearchParameter/Patient-animal-species animal_species: { type: TokenScalar, - description: - 'The species for animal patients (See http://hl7.org/fhir/SearchParameter/patient-animal-species).', + fhirtype: 'token', + xpath: 'Patient.animal.species', + description: 'The species for animal patients', }, - deathdate: { + // http://hl7.org/fhir/SearchParameter/Patient-birthdate + birthdate: { type: DateScalar, - description: - 'The date of death has been provided and satisfies this search value (See http://hl7.org/fhir/SearchParameter/patient-deathdate).', + fhirtype: 'date', + xpath: 'Patient.birthDate', + description: "The patient's date of birth", }, - organization: { + // http://hl7.org/fhir/SearchParameter/Patient-careprovider + careprovider: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Patient.careProvider', description: - 'The organization at which this person is a patient (See http://hl7.org/fhir/SearchParameter/patient-organization).', + "Patient's nominated care provider, could be a care manager, not the organization that manages the record", }, - address_city: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Patient-deathdate + deathdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Patient.deceasedDateTime', description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/patient-address-city).', + 'The date of death has been provided and satisfies this search value', }, - address_state: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Patient-deceased + deceased: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.deceasedBoolean', description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/patient-address-state).', + 'This patient has been marked as deceased, or as a death date entered', }, - careprovider: { - type: GraphQLString, - description: - "Patient's nominated care provider, could be a care manager, not the organization that manages the record (See http://hl7.org/fhir/SearchParameter/patient-careprovider).", + // http://hl7.org/fhir/SearchParameter/Patient-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "Patient.telecom[system/@value='email']", + description: 'A value in an email contact', }, - given: { + // http://hl7.org/fhir/SearchParameter/Patient-family + family: { type: GraphQLString, - description: - 'A portion of the given name of the patient (See http://hl7.org/fhir/SearchParameter/patient-given).', + fhirtype: 'string', + xpath: 'Patient.name.family', + description: 'A portion of the family name of the patient', }, - email: { + // http://hl7.org/fhir/SearchParameter/Patient-gender + gender: { type: TokenScalar, - description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/patient-email).', + fhirtype: 'token', + xpath: 'Patient.gender', + description: 'Gender of the patient', }, - address: { + // http://hl7.org/fhir/SearchParameter/Patient-given + given: { type: GraphQLString, - description: - 'An address in any kind of address/part of the patient (See http://hl7.org/fhir/SearchParameter/patient-address).', + fhirtype: 'string', + xpath: 'Patient.name.given', + description: 'A portion of the given name of the patient', }, - address_use: { + // http://hl7.org/fhir/SearchParameter/Patient-identifier + identifier: { type: TokenScalar, - description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/patient-address-use).', + fhirtype: 'token', + xpath: 'Patient.identifier', + description: 'A patient identifier', }, - family: { + // http://hl7.org/fhir/SearchParameter/Patient-language + language: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.communication.language', + description: 'Language code (irrespective of use value)', + }, + // http://hl7.org/fhir/SearchParameter/Patient-link + link: { type: GraphQLString, - description: - 'A portion of the family name of the patient (See http://hl7.org/fhir/SearchParameter/patient-family).', + fhirtype: 'reference', + xpath: 'Patient.link.other', + description: 'All patients linked to the given patient', }, + // http://hl7.org/fhir/SearchParameter/Patient-name name: { type: GraphQLString, - description: - 'A portion of either family or given name of the patient (See http://hl7.org/fhir/SearchParameter/patient-name).', - }, - birthdate: { - type: DateScalar, - description: - "The patient's date of birth (See http://hl7.org/fhir/SearchParameter/patient-birthdate).", + fhirtype: 'string', + xpath: 'Patient.name', + description: 'A portion of either family or given name of the patient', }, - telecom: { - type: TokenScalar, - description: - 'The value in any kind of telecom details of the patient (See http://hl7.org/fhir/SearchParameter/patient-telecom).', + // http://hl7.org/fhir/SearchParameter/Patient-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Patient.managingOrganization', + description: 'The organization at which this person is a patient', }, - active: { + // http://hl7.org/fhir/SearchParameter/Patient-phone + phone: { type: TokenScalar, - description: - 'Whether the patient record is active (See http://hl7.org/fhir/SearchParameter/patient-active).', + fhirtype: 'token', + xpath: "Patient.telecom[system/@value='phone']", + description: 'A value in a phone contact', }, - gender: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Patient-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name', description: - 'Gender of the patient (See http://hl7.org/fhir/SearchParameter/patient-gender).', + 'A portion of either family or given name using some kind of phonetic matching algorithm', }, - deceased: { + // http://hl7.org/fhir/SearchParameter/Patient-telecom + telecom: { type: TokenScalar, - description: - 'This patient has been marked as deceased, or as a death date entered (See http://hl7.org/fhir/SearchParameter/patient-deceased).', + fhirtype: 'token', + xpath: 'Patient.telecom', + description: 'The value in any kind of telecom details of the patient', }, - language: { + // http://hl7.org/fhir/SearchParameter/us-core-Patient-race + race: { type: TokenScalar, + fhirtype: 'token', + xpath: + "Patient.extension[@url='http://hl7.org/fhir/StructureDefinition/us-core-race']", description: - 'Language code (irrespective of use value) (See http://hl7.org/fhir/SearchParameter/patient-language).', + 'Returns patients with a race extension matching the specified code.', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/us-core-Patient-ethnicity + ethnicity: { type: TokenScalar, + fhirtype: 'token', + xpath: + "Patient.extension[@url='http://hl7.org/fhir/StructureDefinition/us-core-ethnicity']", description: - 'A patient identifier (See http://hl7.org/fhir/SearchParameter/patient-identifier).', - }, - address_postalcode: { - type: GraphQLString, - description: - 'A postalCode specified in an address (See http://hl7.org/fhir/SearchParameter/patient-address-postalcode).', + 'Returns patients with an ethnicity extension matching the specified code.', }, }; diff --git a/src/resources/1_0_2/parameters/paymentnotice.parameters.js b/src/resources/1_0_2/parameters/paymentnotice.parameters.js index 95ed12d7..245f663d 100644 --- a/src/resources/1_0_2/parameters/paymentnotice.parameters.js +++ b/src/resources/1_0_2/parameters/paymentnotice.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the paymentnotice query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/PaymentNotice-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the Eligibility (See http://hl7.org/fhir/SearchParameter/paymentnotice-identifier).', + fhirtype: 'token', + xpath: 'PaymentNotice.identifier', + description: 'The business identifier of the Eligibility', }, }; diff --git a/src/resources/1_0_2/parameters/paymentreconciliation.parameters.js b/src/resources/1_0_2/parameters/paymentreconciliation.parameters.js index d54970e3..72bd56c7 100644 --- a/src/resources/1_0_2/parameters/paymentreconciliation.parameters.js +++ b/src/resources/1_0_2/parameters/paymentreconciliation.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the paymentreconciliation query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the Explanation of Benefit (See http://hl7.org/fhir/SearchParameter/paymentreconciliation-identifier).', + fhirtype: 'token', + xpath: 'PaymentReconciliation.identifier', + description: 'The business identifier of the Explanation of Benefit', }, }; diff --git a/src/resources/1_0_2/parameters/person.parameters.js b/src/resources/1_0_2/parameters/person.parameters.js index c604958d..8f905472 100644 --- a/src/resources/1_0_2/parameters/person.parameters.js +++ b/src/resources/1_0_2/parameters/person.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,99 +8,140 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the person query */ module.exports = { - phone: { - type: TokenScalar, - description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/person-phone).', - }, - phonetic: { + // http://hl7.org/fhir/SearchParameter/Person-address + address: { type: GraphQLString, - description: - 'A portion of name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/person-phonetic).', + fhirtype: 'string', + xpath: 'Person.address', + description: 'An address in any kind of address/part', }, - link: { + // http://hl7.org/fhir/SearchParameter/Person-address-city + address_city: { type: GraphQLString, - description: - 'Any link has this Patient, Person, RelatedPerson or Practitioner reference (See http://hl7.org/fhir/SearchParameter/person-link).', + fhirtype: 'string', + xpath: 'Person.address.city', + description: 'A city specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Person-address-country address_country: { type: GraphQLString, - description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/person-address-country).', - }, - relatedperson: { - type: GraphQLString, - description: - 'The Person links to this RelatedPerson (See http://hl7.org/fhir/SearchParameter/person-relatedperson).', - }, - organization: { - type: GraphQLString, - description: - 'The organization at which this person record is being managed (See http://hl7.org/fhir/SearchParameter/person-organization).', - }, - patient: { - type: GraphQLString, - description: - 'The Person links to this Patient (See http://hl7.org/fhir/SearchParameter/person-patient).', + fhirtype: 'string', + xpath: 'Person.address.country', + description: 'A country specified in an address', }, - address_city: { + // http://hl7.org/fhir/SearchParameter/Person-address-postalcode + address_postalcode: { type: GraphQLString, - description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/person-address-city).', + fhirtype: 'string', + xpath: 'Person.address.postalCode', + description: 'A postal code specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Person-address-state address_state: { type: GraphQLString, - description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/person-address-state).', + fhirtype: 'string', + xpath: 'Person.address.state', + description: 'A state specified in an address', }, - practitioner: { - type: GraphQLString, - description: - 'The Person links to this Practitioner (See http://hl7.org/fhir/SearchParameter/person-practitioner).', + // http://hl7.org/fhir/SearchParameter/Person-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.address.use', + description: 'A use code specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Person-birthdate + birthdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Person.birthDate', + description: "The person's date of birth", + }, + // http://hl7.org/fhir/SearchParameter/Person-email email: { type: TokenScalar, - description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/person-email).', + fhirtype: 'token', + xpath: "Person.telecom[system/@value='email']", + description: 'A value in an email contact', }, - address: { - type: GraphQLString, - description: - 'An address in any kind of address/part (See http://hl7.org/fhir/SearchParameter/person-address).', + // http://hl7.org/fhir/SearchParameter/Person-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.gender', + description: 'The gender of the person', }, - address_use: { + // http://hl7.org/fhir/SearchParameter/Person-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.identifier', + description: 'A person Identifier', + }, + // http://hl7.org/fhir/SearchParameter/Person-link + link: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/person-address-use).', + 'Any link has this Patient, Person, RelatedPerson or Practitioner reference', }, + // http://hl7.org/fhir/SearchParameter/Person-name name: { type: GraphQLString, - description: - 'A portion of name in any name part (See http://hl7.org/fhir/SearchParameter/person-name).', + fhirtype: 'string', + xpath: 'Person.name', + description: 'A portion of name in any name part', }, - birthdate: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/Person-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.managingOrganization', description: - "The person's date of birth (See http://hl7.org/fhir/SearchParameter/person-birthdate).", + 'The organization at which this person record is being managed', }, - telecom: { - type: TokenScalar, - description: - 'The value in any kind of contact (See http://hl7.org/fhir/SearchParameter/person-telecom).', + // http://hl7.org/fhir/SearchParameter/Person-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this Patient', }, - gender: { + // http://hl7.org/fhir/SearchParameter/Person-phone + phone: { type: TokenScalar, - description: - 'The gender of the person (See http://hl7.org/fhir/SearchParameter/person-gender).', + fhirtype: 'token', + xpath: "Person.telecom[system/@value='phone']", + description: 'A value in a phone contact', }, - identifier: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Person-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.name', description: - 'A person Identifier (See http://hl7.org/fhir/SearchParameter/person-identifier).', + 'A portion of name using some kind of phonetic matching algorithm', }, - address_postalcode: { + // http://hl7.org/fhir/SearchParameter/Person-practitioner + practitioner: { type: GraphQLString, - description: - 'A postal code specified in an address (See http://hl7.org/fhir/SearchParameter/person-address-postalcode).', + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this Practitioner', + }, + // http://hl7.org/fhir/SearchParameter/Person-relatedperson + relatedperson: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this RelatedPerson', + }, + // http://hl7.org/fhir/SearchParameter/Person-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.telecom', + description: 'The value in any kind of contact', }, }; diff --git a/src/resources/1_0_2/parameters/practitioner.parameters.js b/src/resources/1_0_2/parameters/practitioner.parameters.js index 1e43c65c..8c3f5f8a 100644 --- a/src/resources/1_0_2/parameters/practitioner.parameters.js +++ b/src/resources/1_0_2/parameters/practitioner.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,104 +7,149 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the practitioner query */ module.exports = { - phone: { - type: TokenScalar, - description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/practitioner-phone).', - }, - phonetic: { + // http://hl7.org/fhir/SearchParameter/Practitioner-address + address: { type: GraphQLString, - description: - 'A portion of either family or given name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/practitioner-phonetic).', + fhirtype: 'string', + xpath: 'Practitioner.address', + description: 'An address in any kind of address/part', }, - location: { + // http://hl7.org/fhir/SearchParameter/Practitioner-address-city + address_city: { type: GraphQLString, - description: - 'One of the locations at which this practitioner provides care (See http://hl7.org/fhir/SearchParameter/practitioner-location).', - }, - communication: { - type: TokenScalar, - description: - 'One of the languages that the practitioner can communicate with (See http://hl7.org/fhir/SearchParameter/practitioner-communication).', + fhirtype: 'string', + xpath: 'Practitioner.address.city', + description: 'A city specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Practitioner-address-country address_country: { type: GraphQLString, - description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/practitioner-address-country).', + fhirtype: 'string', + xpath: 'Practitioner.address.country', + description: 'A country specified in an address', }, - organization: { - type: GraphQLString, - description: - 'The identity of the organization the practitioner represents / acts on behalf of (See http://hl7.org/fhir/SearchParameter/practitioner-organization).', - }, - address_city: { + // http://hl7.org/fhir/SearchParameter/Practitioner-address-postalcode + address_postalcode: { type: GraphQLString, - description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/practitioner-address-city).', + fhirtype: 'string', + xpath: 'Practitioner.address.postalCode', + description: 'A postalCode specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Practitioner-address-state address_state: { type: GraphQLString, - description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/practitioner-address-state).', + fhirtype: 'string', + xpath: 'Practitioner.address.state', + description: 'A state specified in an address', }, - given: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Practitioner-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.address.use', + description: 'A use code specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-communication + communication: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.communication', description: - 'A portion of the given name (See http://hl7.org/fhir/SearchParameter/practitioner-given).', + 'One of the languages that the practitioner can communicate with', }, + // http://hl7.org/fhir/SearchParameter/Practitioner-email email: { type: TokenScalar, - description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/practitioner-email).', + fhirtype: 'token', + xpath: "Practitioner.telecom[system/@value='email']", + description: 'A value in an email contact', }, - address: { + // http://hl7.org/fhir/SearchParameter/Practitioner-family + family: { type: GraphQLString, - description: - 'An address in any kind of address/part (See http://hl7.org/fhir/SearchParameter/practitioner-address).', + fhirtype: 'string', + xpath: 'Practitioner.name.family', + description: 'A portion of the family name', }, - address_use: { + // http://hl7.org/fhir/SearchParameter/Practitioner-gender + gender: { type: TokenScalar, - description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/practitioner-address-use).', + fhirtype: 'token', + xpath: 'Practitioner.gender', + description: 'Gender of the practitioner', }, - family: { + // http://hl7.org/fhir/SearchParameter/Practitioner-given + given: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name.given', + description: 'A portion of the given name', + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.identifier', + description: "A practitioner's Identifier", + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-location + location: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Practitioner.practitionerRole.location', description: - 'A portion of the family name (See http://hl7.org/fhir/SearchParameter/practitioner-family).', + 'One of the locations at which this practitioner provides care', }, + // http://hl7.org/fhir/SearchParameter/Practitioner-name name: { type: GraphQLString, - description: - 'A portion of either family or given name (See http://hl7.org/fhir/SearchParameter/practitioner-name).', + fhirtype: 'string', + xpath: 'Practitioner.name', + description: 'A portion of either family or given name', }, - telecom: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Practitioner-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Practitioner.practitionerRole.managingOrganization', description: - 'The value in any kind of contact (See http://hl7.org/fhir/SearchParameter/practitioner-telecom).', + 'The identity of the organization the practitioner represents / acts on behalf of', }, - role: { + // http://hl7.org/fhir/SearchParameter/Practitioner-phone + phone: { type: TokenScalar, + fhirtype: 'token', + xpath: "Practitioner.telecom[system/@value='phone']", + description: 'A value in a phone contact', + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name', description: - 'The practitioner can perform this role at for the organization (See http://hl7.org/fhir/SearchParameter/practitioner-role).', + 'A portion of either family or given name using some kind of phonetic matching algorithm', }, - gender: { + // http://hl7.org/fhir/SearchParameter/Practitioner-role + role: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.practitionerRole.role', description: - 'Gender of the practitioner (See http://hl7.org/fhir/SearchParameter/practitioner-gender).', + 'The practitioner can perform this role at for the organization', }, + // http://hl7.org/fhir/SearchParameter/Practitioner-specialty specialty: { type: TokenScalar, - description: - 'The practitioner has this specialty at an organization (See http://hl7.org/fhir/SearchParameter/practitioner-specialty).', + fhirtype: 'token', + xpath: 'Practitioner.practitionerRole.specialty', + description: 'The practitioner has this specialty at an organization', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Practitioner-telecom + telecom: { type: TokenScalar, - description: - "A practitioner's Identifier (See http://hl7.org/fhir/SearchParameter/practitioner-identifier).", - }, - address_postalcode: { - type: GraphQLString, - description: - 'A postalCode specified in an address (See http://hl7.org/fhir/SearchParameter/practitioner-address-postalcode).', + fhirtype: 'token', + xpath: 'Practitioner.telecom', + description: 'The value in any kind of contact', }, }; diff --git a/src/resources/1_0_2/parameters/procedure.parameters.js b/src/resources/1_0_2/parameters/procedure.parameters.js index a124a3bb..bb0ce4d9 100644 --- a/src/resources/1_0_2/parameters/procedure.parameters.js +++ b/src/resources/1_0_2/parameters/procedure.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the procedure query */ module.exports = { - patient: { + // http://hl7.org/fhir/SearchParameter/Procedure-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.code', + description: 'A code to identify a procedure', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Procedure.performedDateTime', + description: 'Date/Period the procedure was performed', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-encounter + encounter: { type: GraphQLString, - description: - 'Search by subject - a patient (See http://hl7.org/fhir/SearchParameter/procedure-patient).', + fhirtype: 'reference', + xpath: 'Procedure.encounter', + description: 'The encounter associated with the procedure', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.identifier', + description: 'A unique identifier for a procedure', }, + // http://hl7.org/fhir/SearchParameter/Procedure-location location: { type: GraphQLString, - description: - 'Where the procedure happened (See http://hl7.org/fhir/SearchParameter/procedure-location).', + fhirtype: 'reference', + xpath: 'Procedure.location', + description: 'Where the procedure happened', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Procedure-patient + patient: { type: GraphQLString, - description: - 'Search by subject (See http://hl7.org/fhir/SearchParameter/procedure-subject).', + fhirtype: 'reference', + xpath: 'Procedure.subject', + description: 'Search by subject - a patient', }, + // http://hl7.org/fhir/SearchParameter/Procedure-performer performer: { type: GraphQLString, - description: - 'The reference to the practitioner (See http://hl7.org/fhir/SearchParameter/procedure-performer).', + fhirtype: 'reference', + xpath: 'Procedure.performer.actor', + description: 'The reference to the practitioner', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/Procedure-subject + subject: { type: GraphQLString, - description: - 'The encounter associated with the procedure (See http://hl7.org/fhir/SearchParameter/procedure-encounter).', - }, - code: { - type: TokenScalar, - description: - 'A code to identify a procedure (See http://hl7.org/fhir/SearchParameter/procedure-code).', - }, - date: { - type: DateScalar, - description: - 'Date/Period the procedure was performed (See http://hl7.org/fhir/SearchParameter/procedure-date).', - }, - identifier: { - type: TokenScalar, - description: - 'A unique identifier for a procedure (See http://hl7.org/fhir/SearchParameter/procedure-identifier).', + fhirtype: 'reference', + xpath: 'Procedure.subject', + description: 'Search by subject', }, }; diff --git a/src/resources/1_0_2/parameters/procedurerequest.parameters.js b/src/resources/1_0_2/parameters/procedurerequest.parameters.js index 6a0c4e13..7f84fb66 100644 --- a/src/resources/1_0_2/parameters/procedurerequest.parameters.js +++ b/src/resources/1_0_2/parameters/procedurerequest.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,34 +7,46 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the procedurerequest query */ module.exports = { - orderer: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-encounter + encounter: { type: GraphQLString, - description: - 'Who made request (See http://hl7.org/fhir/SearchParameter/procedurerequest-orderer).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.encounter', + description: 'Encounter request created during', }, - patient: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcedureRequest.identifier', + description: 'A unique identifier of the Procedure Request', + }, + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-orderer + orderer: { type: GraphQLString, - description: - 'Search by subject - a patient (See http://hl7.org/fhir/SearchParameter/procedurerequest-patient).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.orderer', + description: 'Who made request', }, - subject: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-patient + patient: { type: GraphQLString, - description: - 'Search by subject (See http://hl7.org/fhir/SearchParameter/procedurerequest-subject).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.subject', + description: 'Search by subject - a patient', }, + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-performer performer: { type: GraphQLString, - description: - 'Who should perform the procedure (See http://hl7.org/fhir/SearchParameter/procedurerequest-performer).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.performer', + description: 'Who should perform the procedure', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-subject + subject: { type: GraphQLString, - description: - 'Encounter request created during (See http://hl7.org/fhir/SearchParameter/procedurerequest-encounter).', - }, - identifier: { - type: TokenScalar, - description: - 'A unique identifier of the Procedure Request (See http://hl7.org/fhir/SearchParameter/procedurerequest-identifier).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.subject', + description: 'Search by subject', }, }; diff --git a/src/resources/1_0_2/parameters/processrequest.parameters.js b/src/resources/1_0_2/parameters/processrequest.parameters.js index cd4da08f..b66e8c77 100644 --- a/src/resources/1_0_2/parameters/processrequest.parameters.js +++ b/src/resources/1_0_2/parameters/processrequest.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,24 +7,32 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the processrequest query */ module.exports = { - organization: { - type: GraphQLString, - description: - 'The organization who generated this request (See http://hl7.org/fhir/SearchParameter/processrequest-organization).', - }, + // http://hl7.org/fhir/SearchParameter/ProcessRequest-action action: { type: TokenScalar, - description: - 'The action requested by this resource (See http://hl7.org/fhir/SearchParameter/processrequest-action).', - }, - provider: { - type: GraphQLString, - description: - 'The provider who regenerated this request (See http://hl7.org/fhir/SearchParameter/processrequest-provider).', + fhirtype: 'token', + xpath: 'ProcessRequest.action', + description: 'The action requested by this resource', }, + // http://hl7.org/fhir/SearchParameter/ProcessRequest-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the ProcessRequest (See http://hl7.org/fhir/SearchParameter/processrequest-identifier).', + fhirtype: 'token', + xpath: 'ProcessRequest.identifier', + description: 'The business identifier of the ProcessRequest', + }, + // http://hl7.org/fhir/SearchParameter/ProcessRequest-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ProcessRequest.organization', + description: 'The organization who generated this request', + }, + // http://hl7.org/fhir/SearchParameter/ProcessRequest-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ProcessRequest.provider', + description: 'The provider who regenerated this request', }, }; diff --git a/src/resources/1_0_2/parameters/processresponse.parameters.js b/src/resources/1_0_2/parameters/processresponse.parameters.js index 84a24642..0777847c 100644 --- a/src/resources/1_0_2/parameters/processresponse.parameters.js +++ b/src/resources/1_0_2/parameters/processresponse.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,29 +7,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the processresponse query */ module.exports = { - organization: { - type: GraphQLString, - description: - 'The organization who generated this resource (See http://hl7.org/fhir/SearchParameter/processresponse-organization).', + // http://hl7.org/fhir/SearchParameter/ProcessResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcessResponse.identifier', + description: 'The business identifier of the Explanation of Benefit', }, - requestprovider: { + // http://hl7.org/fhir/SearchParameter/ProcessResponse-organization + organization: { type: GraphQLString, - description: - 'The Provider who is responsible the request transaction (See http://hl7.org/fhir/SearchParameter/processresponse-requestprovider).', + fhirtype: 'reference', + xpath: 'ProcessResponse.organization', + description: 'The organization who generated this resource', }, + // http://hl7.org/fhir/SearchParameter/ProcessResponse-request request: { type: GraphQLString, - description: - 'The reference to the claim (See http://hl7.org/fhir/SearchParameter/processresponse-request).', + fhirtype: 'reference', + xpath: 'ProcessResponse.request', + description: 'The reference to the claim', }, + // http://hl7.org/fhir/SearchParameter/ProcessResponse-requestorganization requestorganization: { type: GraphQLString, - description: - 'The Organization who is responsible the request transaction (See http://hl7.org/fhir/SearchParameter/processresponse-requestorganization).', + fhirtype: 'reference', + xpath: 'ProcessResponse.requestOrganization', + description: 'The Organization who is responsible the request transaction', }, - identifier: { - type: TokenScalar, - description: - 'The business identifier of the Explanation of Benefit (See http://hl7.org/fhir/SearchParameter/processresponse-identifier).', + // http://hl7.org/fhir/SearchParameter/ProcessResponse-requestprovider + requestprovider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ProcessResponse.requestProvider', + description: 'The Provider who is responsible the request transaction', }, }; diff --git a/src/resources/1_0_2/parameters/provenance.parameters.js b/src/resources/1_0_2/parameters/provenance.parameters.js index 58729f1a..c6a9fd67 100644 --- a/src/resources/1_0_2/parameters/provenance.parameters.js +++ b/src/resources/1_0_2/parameters/provenance.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -9,54 +9,74 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the provenance query */ module.exports = { - sigtype: { - type: TokenScalar, - description: - 'Indication of the reason the entity signed the object(s) (See http://hl7.org/fhir/SearchParameter/provenance-sigtype).', - }, - patient: { - type: GraphQLString, - description: - 'Target Reference(s) (usually version specific) (See http://hl7.org/fhir/SearchParameter/provenance-patient).', - }, - location: { + // http://hl7.org/fhir/SearchParameter/Provenance-agent + agent: { type: GraphQLString, - description: - 'Where the activity occurred, if relevant (See http://hl7.org/fhir/SearchParameter/provenance-location).', + fhirtype: 'reference', + xpath: 'Provenance.agent.actor', + description: 'Individual, device or organization playing role', }, - start: { + // http://hl7.org/fhir/SearchParameter/Provenance-end + end: { type: DateScalar, - description: - 'Starting time with inclusive boundary (See http://hl7.org/fhir/SearchParameter/provenance-start).', + fhirtype: 'date', + xpath: 'Provenance.period.end', + description: 'End time with inclusive boundary, if not ongoing', }, + // http://hl7.org/fhir/SearchParameter/Provenance-entity entity: { type: UriScalar, - description: - 'Identity of entity (See http://hl7.org/fhir/SearchParameter/provenance-entity).', + fhirtype: 'uri', + xpath: 'Provenance.entity.reference', + description: 'Identity of entity', }, - userid: { + // http://hl7.org/fhir/SearchParameter/Provenance-entitytype + entitytype: { type: TokenScalar, - description: - 'Authorization-system identifier for the agent (See http://hl7.org/fhir/SearchParameter/provenance-userid).', + fhirtype: 'token', + xpath: 'Provenance.entity.type', + description: 'The type of resource in this entity', }, - target: { + // http://hl7.org/fhir/SearchParameter/Provenance-location + location: { type: GraphQLString, - description: - 'Target Reference(s) (usually version specific) (See http://hl7.org/fhir/SearchParameter/provenance-target).', + fhirtype: 'reference', + xpath: 'Provenance.location', + description: 'Where the activity occurred, if relevant', }, - agent: { + // http://hl7.org/fhir/SearchParameter/Provenance-patient + patient: { type: GraphQLString, - description: - 'Individual, device or organization playing role (See http://hl7.org/fhir/SearchParameter/provenance-agent).', + fhirtype: 'reference', + xpath: 'Provenance.target', + description: 'Target Reference(s) (usually version specific)', }, - entitytype: { + // http://hl7.org/fhir/SearchParameter/Provenance-sigtype + sigtype: { type: TokenScalar, - description: - 'The type of resource in this entity (See http://hl7.org/fhir/SearchParameter/provenance-entitytype).', + fhirtype: 'token', + xpath: 'Provenance.signature.type', + description: 'Indication of the reason the entity signed the object(s)', }, - end: { + // http://hl7.org/fhir/SearchParameter/Provenance-start + start: { type: DateScalar, - description: - 'End time with inclusive boundary, if not ongoing (See http://hl7.org/fhir/SearchParameter/provenance-end).', + fhirtype: 'date', + xpath: 'Provenance.period.start', + description: 'Starting time with inclusive boundary', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-target + target: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Provenance.target', + description: 'Target Reference(s) (usually version specific)', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-userid + userid: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Provenance.agent.userId', + description: 'Authorization-system identifier for the agent', }, }; diff --git a/src/resources/1_0_2/parameters/questionnaire.parameters.js b/src/resources/1_0_2/parameters/questionnaire.parameters.js index 19150495..101b11bb 100644 --- a/src/resources/1_0_2/parameters/questionnaire.parameters.js +++ b/src/resources/1_0_2/parameters/questionnaire.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,39 +8,55 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the questionnaire query */ module.exports = { - title: { - type: GraphQLString, - description: - 'All or part of the name of the questionnaire (title for the root group of the questionnaire) (See http://hl7.org/fhir/SearchParameter/questionnaire-title).', - }, - status: { - type: TokenScalar, - description: - 'The status of the questionnaire (See http://hl7.org/fhir/SearchParameter/questionnaire-status).', - }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-code code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.group.concept', description: - 'A code that corresponds to the questionnaire or one of its groups (See http://hl7.org/fhir/SearchParameter/questionnaire-code).', + 'A code that corresponds to the questionnaire or one of its groups', }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-date date: { type: DateScalar, - description: - 'When the questionnaire was last changed (See http://hl7.org/fhir/SearchParameter/questionnaire-date).', + fhirtype: 'date', + xpath: 'Questionnaire.date', + description: 'When the questionnaire was last changed', }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-identifier identifier: { type: TokenScalar, - description: - 'An identifier for the questionnaire (See http://hl7.org/fhir/SearchParameter/questionnaire-identifier).', + fhirtype: 'token', + xpath: 'Questionnaire.identifier', + description: 'An identifier for the questionnaire', }, - version: { + // http://hl7.org/fhir/SearchParameter/Questionnaire-publisher + publisher: { type: GraphQLString, - description: - 'The business version of the questionnaire (See http://hl7.org/fhir/SearchParameter/questionnaire-version).', + fhirtype: 'string', + xpath: 'Questionnaire.publisher', + description: 'The author of the questionnaire', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/Questionnaire-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.status', + description: 'The status of the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-title + title: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Questionnaire.group.title', description: - 'The author of the questionnaire (See http://hl7.org/fhir/SearchParameter/questionnaire-publisher).', + 'All or part of the name of the questionnaire (title for the root group of the questionnaire)', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-version + version: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Questionnaire.version', + description: 'The business version of the questionnaire', }, }; diff --git a/src/resources/1_0_2/parameters/questionnaireresponse.parameters.js b/src/resources/1_0_2/parameters/questionnaireresponse.parameters.js index 1a6483de..603d543e 100644 --- a/src/resources/1_0_2/parameters/questionnaireresponse.parameters.js +++ b/src/resources/1_0_2/parameters/questionnaireresponse.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the questionnaireresponse query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-author author: { type: GraphQLString, - description: - 'The author of the questionnaire (See http://hl7.org/fhir/SearchParameter/questionnaireresponse-author).', + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.author', + description: 'The author of the questionnaire', }, - questionnaire: { + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-authored + authored: { + type: DateScalar, + fhirtype: 'date', + xpath: 'QuestionnaireResponse.authored', + description: 'When the questionnaire was authored', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-encounter + encounter: { type: GraphQLString, - description: - 'The questionnaire the answers are provided for (See http://hl7.org/fhir/SearchParameter/questionnaireresponse-questionnaire).', + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.encounter', + description: 'Encounter during which questionnaire was authored', }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-patient patient: { type: GraphQLString, - description: - 'The patient that is the subject of the questionnaire (See http://hl7.org/fhir/SearchParameter/questionnaireresponse-patient).', + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.subject', + description: 'The patient that is the subject of the questionnaire', }, - authored: { - type: DateScalar, - description: - 'When the questionnaire was authored (See http://hl7.org/fhir/SearchParameter/questionnaireresponse-authored).', + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-questionnaire + questionnaire: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.questionnaire', + description: 'The questionnaire the answers are provided for', }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-source source: { type: GraphQLString, - description: - 'The person who answered the questions (See http://hl7.org/fhir/SearchParameter/questionnaireresponse-source).', + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.source', + description: 'The person who answered the questions', }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-status status: { type: TokenScalar, - description: - 'The status of the questionnaire response (See http://hl7.org/fhir/SearchParameter/questionnaireresponse-status).', + fhirtype: 'token', + xpath: 'QuestionnaireResponse.status', + description: 'The status of the questionnaire response', }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-subject subject: { type: GraphQLString, - description: - 'The subject of the questionnaire (See http://hl7.org/fhir/SearchParameter/questionnaireresponse-subject).', - }, - encounter: { - type: GraphQLString, - description: - 'Encounter during which questionnaire was authored (See http://hl7.org/fhir/SearchParameter/questionnaireresponse-encounter).', + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.subject', + description: 'The subject of the questionnaire', }, }; diff --git a/src/resources/1_0_2/parameters/referralrequest.parameters.js b/src/resources/1_0_2/parameters/referralrequest.parameters.js index 8ec87187..d3354a75 100644 --- a/src/resources/1_0_2/parameters/referralrequest.parameters.js +++ b/src/resources/1_0_2/parameters/referralrequest.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the referralrequest query */ module.exports = { - requester: { - type: GraphQLString, - description: - 'Requester of referral / transfer of care (See http://hl7.org/fhir/SearchParameter/referralrequest-requester).', + // http://hl7.org/fhir/SearchParameter/ReferralRequest-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ReferralRequest.date', + description: 'Creation or activation date', }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-patient patient: { type: GraphQLString, - description: - 'Who the referral is about (See http://hl7.org/fhir/SearchParameter/referralrequest-patient).', - }, - status: { - type: TokenScalar, - description: - 'The status of the referral (See http://hl7.org/fhir/SearchParameter/referralrequest-status).', + fhirtype: 'reference', + xpath: 'ReferralRequest.patient', + description: 'Who the referral is about', }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-priority priority: { type: TokenScalar, - description: - 'The priority assigned to the referral (See http://hl7.org/fhir/SearchParameter/referralrequest-priority).', + fhirtype: 'token', + xpath: 'ReferralRequest.priority', + description: 'The priority assigned to the referral', }, - type: { - type: TokenScalar, - description: - 'The type of the referral (See http://hl7.org/fhir/SearchParameter/referralrequest-type).', + // http://hl7.org/fhir/SearchParameter/ReferralRequest-recipient + recipient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ReferralRequest.recipient', + description: 'The person that the referral was sent to', }, - date: { - type: DateScalar, - description: - 'Creation or activation date (See http://hl7.org/fhir/SearchParameter/referralrequest-date).', + // http://hl7.org/fhir/SearchParameter/ReferralRequest-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ReferralRequest.requester', + description: 'Requester of referral / transfer of care', }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-specialty specialty: { type: TokenScalar, - description: - 'The specialty that the referral is for (See http://hl7.org/fhir/SearchParameter/referralrequest-specialty).', + fhirtype: 'token', + xpath: 'ReferralRequest.specialty', + description: 'The specialty that the referral is for', }, - recipient: { - type: GraphQLString, - description: - 'The person that the referral was sent to (See http://hl7.org/fhir/SearchParameter/referralrequest-recipient).', + // http://hl7.org/fhir/SearchParameter/ReferralRequest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ReferralRequest.status', + description: 'The status of the referral', + }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ReferralRequest.type', + description: 'The type of the referral', }, }; diff --git a/src/resources/1_0_2/parameters/relatedperson.parameters.js b/src/resources/1_0_2/parameters/relatedperson.parameters.js index b5a8bb3d..9e1b11e2 100644 --- a/src/resources/1_0_2/parameters/relatedperson.parameters.js +++ b/src/resources/1_0_2/parameters/relatedperson.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,79 +8,110 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the relatedperson query */ module.exports = { - phone: { - type: TokenScalar, - description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/relatedperson-phone).', - }, - phonetic: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-address + address: { type: GraphQLString, - description: - 'A portion of name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/relatedperson-phonetic).', + fhirtype: 'string', + xpath: 'RelatedPerson.address', + description: 'An address in any kind of address/part', }, - address_country: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-address-city + address_city: { type: GraphQLString, - description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/relatedperson-address-country).', + fhirtype: 'string', + xpath: 'RelatedPerson.address.city', + description: 'A city specified in an address', }, - patient: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-address-country + address_country: { type: GraphQLString, - description: - 'The patient this person is related to (See http://hl7.org/fhir/SearchParameter/relatedperson-patient).', + fhirtype: 'string', + xpath: 'RelatedPerson.address.country', + description: 'A country specified in an address', }, - address_city: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-address-postalcode + address_postalcode: { type: GraphQLString, - description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/relatedperson-address-city).', + fhirtype: 'string', + xpath: 'RelatedPerson.address.postalCode', + description: 'A postal code specified in an address', }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-address-state address_state: { type: GraphQLString, - description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/relatedperson-address-state).', - }, - email: { - type: TokenScalar, - description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/relatedperson-email).', - }, - address: { - type: GraphQLString, - description: - 'An address in any kind of address/part (See http://hl7.org/fhir/SearchParameter/relatedperson-address).', + fhirtype: 'string', + xpath: 'RelatedPerson.address.state', + description: 'A state specified in an address', }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-address-use address_use: { type: TokenScalar, - description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/relatedperson-address-use).', - }, - name: { - type: GraphQLString, - description: - 'A portion of name in any name part (See http://hl7.org/fhir/SearchParameter/relatedperson-name).', + fhirtype: 'token', + xpath: 'RelatedPerson.address.use', + description: 'A use code specified in an address', }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-birthdate birthdate: { type: DateScalar, - description: - "The Related Person's date of birth (See http://hl7.org/fhir/SearchParameter/relatedperson-birthdate).", + fhirtype: 'date', + xpath: 'RelatedPerson.birthDate', + description: "The Related Person's date of birth", }, - telecom: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-email + email: { type: TokenScalar, - description: - 'The value in any kind of contact (See http://hl7.org/fhir/SearchParameter/relatedperson-telecom).', + fhirtype: 'token', + xpath: "RelatedPerson.telecom[system/@value='email']", + description: 'A value in an email contact', }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-gender gender: { type: TokenScalar, - description: - 'Gender of the person (See http://hl7.org/fhir/SearchParameter/relatedperson-gender).', + fhirtype: 'token', + xpath: 'RelatedPerson.gender', + description: 'Gender of the person', }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-identifier identifier: { type: TokenScalar, - description: - 'A patient Identifier (See http://hl7.org/fhir/SearchParameter/relatedperson-identifier).', + fhirtype: 'token', + xpath: 'RelatedPerson.identifier', + description: 'A patient Identifier', }, - address_postalcode: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-name + name: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.name', + description: 'A portion of name in any name part', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RelatedPerson.patient', + description: 'The patient this person is related to', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-phone + phone: { + type: TokenScalar, + fhirtype: 'token', + xpath: "RelatedPerson.telecom[system/@value='phone']", + description: 'A value in a phone contact', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.name', description: - 'A postal code specified in an address (See http://hl7.org/fhir/SearchParameter/relatedperson-address-postalcode).', + 'A portion of name using some kind of phonetic matching algorithm', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.telecom', + description: 'The value in any kind of contact', }, }; diff --git a/src/resources/1_0_2/parameters/resource.parameters.js b/src/resources/1_0_2/parameters/resource.parameters.js new file mode 100644 index 00000000..15ed2024 --- /dev/null +++ b/src/resources/1_0_2/parameters/resource.parameters.js @@ -0,0 +1,69 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the resource query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Resource-content + _content: { + type: GraphQLString, + fhirtype: 'string', + xpath: '', + description: 'Search on the entire content of the resource', + }, + // http://hl7.org/fhir/SearchParameter/Resource-id + _id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.id', + description: 'Logical id of this artifact', + }, + // http://hl7.org/fhir/SearchParameter/Resource-lastUpdated + _lastUpdated: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Resource.meta.lastUpdated', + description: 'When the resource version last changed', + }, + // http://hl7.org/fhir/SearchParameter/Resource-profile + _profile: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Resource.meta.profile', + description: 'Profiles this resource claims to conform to', + }, + // http://hl7.org/fhir/SearchParameter/Resource-query + _query: { + type: TokenScalar, + fhirtype: 'token', + xpath: '', + description: + 'A custom search profile that describes a specific defined query operation', + }, + // http://hl7.org/fhir/SearchParameter/Resource-security + _security: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.meta.security', + description: 'Security Labels applied to this resource', + }, + // http://hl7.org/fhir/SearchParameter/Resource-tag + _tag: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.meta.tag', + description: 'Tags applied to this resource', + }, + // http://hl7.org/fhir/SearchParameter/Resource-text + _text: { + type: GraphQLString, + fhirtype: 'string', + xpath: '', + description: 'Search on the narrative of the resource', + }, +}; diff --git a/src/resources/1_0_2/parameters/riskassessment.parameters.js b/src/resources/1_0_2/parameters/riskassessment.parameters.js index d4353f95..1746926f 100644 --- a/src/resources/1_0_2/parameters/riskassessment.parameters.js +++ b/src/resources/1_0_2/parameters/riskassessment.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the riskassessment query */ module.exports = { - patient: { - type: GraphQLString, - description: - 'Who/what does assessment apply to? (See http://hl7.org/fhir/SearchParameter/riskassessment-patient).', - }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-condition condition: { type: GraphQLString, - description: - 'Condition assessed (See http://hl7.org/fhir/SearchParameter/riskassessment-condition).', + fhirtype: 'reference', + xpath: 'RiskAssessment.condition', + description: 'Condition assessed', }, - subject: { - type: GraphQLString, - description: - 'Who/what does assessment apply to? (See http://hl7.org/fhir/SearchParameter/riskassessment-subject).', + // http://hl7.org/fhir/SearchParameter/RiskAssessment-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'RiskAssessment.date', + description: 'When was assessment made?', }, - performer: { + // http://hl7.org/fhir/SearchParameter/RiskAssessment-encounter + encounter: { type: GraphQLString, - description: - 'Who did assessment? (See http://hl7.org/fhir/SearchParameter/riskassessment-performer).', + fhirtype: 'reference', + xpath: 'RiskAssessment.encounter', + description: 'Where was assessment performed?', + }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskAssessment.identifier', + description: 'Unique identifier for the assessment', }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-method method: { type: TokenScalar, - description: - 'Evaluation mechanism (See http://hl7.org/fhir/SearchParameter/riskassessment-method).', + fhirtype: 'token', + xpath: 'RiskAssessment.method', + description: 'Evaluation mechanism', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/RiskAssessment-patient + patient: { type: GraphQLString, - description: - 'Where was assessment performed? (See http://hl7.org/fhir/SearchParameter/riskassessment-encounter).', + fhirtype: 'reference', + xpath: 'RiskAssessment.subject', + description: 'Who/what does assessment apply to?', }, - date: { - type: DateScalar, - description: - 'When was assessment made? (See http://hl7.org/fhir/SearchParameter/riskassessment-date).', + // http://hl7.org/fhir/SearchParameter/RiskAssessment-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.performer', + description: 'Who did assessment?', }, - identifier: { - type: TokenScalar, - description: - 'Unique identifier for the assessment (See http://hl7.org/fhir/SearchParameter/riskassessment-identifier).', + // http://hl7.org/fhir/SearchParameter/RiskAssessment-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.subject', + description: 'Who/what does assessment apply to?', }, }; diff --git a/src/resources/1_0_2/parameters/schedule.parameters.js b/src/resources/1_0_2/parameters/schedule.parameters.js index d04e46ad..7c77991f 100644 --- a/src/resources/1_0_2/parameters/schedule.parameters.js +++ b/src/resources/1_0_2/parameters/schedule.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,24 +8,35 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the schedule query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Schedule-actor actor: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Schedule.actor', description: - 'The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for (See http://hl7.org/fhir/SearchParameter/schedule-actor).', + 'The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for', }, + // http://hl7.org/fhir/SearchParameter/Schedule-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'Schedule.planningHorizon', description: - 'Search for Schedule resources that have a period that contains this date specified (See http://hl7.org/fhir/SearchParameter/schedule-date).', + 'Search for Schedule resources that have a period that contains this date specified', }, - type: { + // http://hl7.org/fhir/SearchParameter/Schedule-identifier + identifier: { type: TokenScalar, - description: - 'The type of appointments that can be booked into associated slot(s) (See http://hl7.org/fhir/SearchParameter/schedule-type).', + fhirtype: 'token', + xpath: 'Schedule.identifier', + description: 'A Schedule Identifier', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Schedule-type + type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Schedule.type', description: - 'A Schedule Identifier (See http://hl7.org/fhir/SearchParameter/schedule-identifier).', + 'The type of appointments that can be booked into associated slot(s)', }, }; diff --git a/src/resources/1_0_2/parameters/searchparameter.parameters.js b/src/resources/1_0_2/parameters/searchparameter.parameters.js index a06579a7..183aeeb9 100644 --- a/src/resources/1_0_2/parameters/searchparameter.parameters.js +++ b/src/resources/1_0_2/parameters/searchparameter.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,39 +8,54 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the searchparameter query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/SearchParameter-base + base: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.base', + description: 'The resource type this search parameter applies to', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.code', + description: 'Code used in URL', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-description description: { type: GraphQLString, - description: - 'Documentation for search parameter (See http://hl7.org/fhir/SearchParameter/searchparameter-description).', + fhirtype: 'string', + xpath: 'SearchParameter.description', + description: 'Documentation for search parameter', }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-name name: { type: GraphQLString, - description: - 'Informal name for this search parameter (See http://hl7.org/fhir/SearchParameter/searchparameter-name).', + fhirtype: 'string', + xpath: 'SearchParameter.name', + description: 'Informal name for this search parameter', }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-target target: { type: TokenScalar, - description: - 'Types of resource (if a resource reference) (See http://hl7.org/fhir/SearchParameter/searchparameter-target).', - }, - base: { - type: TokenScalar, - description: - 'The resource type this search parameter applies to (See http://hl7.org/fhir/SearchParameter/searchparameter-base).', - }, - code: { - type: TokenScalar, - description: - 'Code used in URL (See http://hl7.org/fhir/SearchParameter/searchparameter-code).', + fhirtype: 'token', + xpath: 'SearchParameter.target', + description: 'Types of resource (if a resource reference)', }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-type type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.type', description: - 'number | date | string | token | reference | composite | quantity | uri (See http://hl7.org/fhir/SearchParameter/searchparameter-type).', + 'number | date | string | token | reference | composite | quantity | uri', }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-url url: { type: UriScalar, - description: - 'Absolute URL used to reference this search parameter (See http://hl7.org/fhir/SearchParameter/searchparameter-url).', + fhirtype: 'uri', + xpath: 'SearchParameter.url', + description: 'Absolute URL used to reference this search parameter', }, }; diff --git a/src/resources/1_0_2/parameters/slot.parameters.js b/src/resources/1_0_2/parameters/slot.parameters.js index 4ef2d727..b2281af7 100644 --- a/src/resources/1_0_2/parameters/slot.parameters.js +++ b/src/resources/1_0_2/parameters/slot.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,29 +8,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the slot query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Slot-fb-type fb_type: { type: TokenScalar, - description: - 'The free/busy status of the appointment (See http://hl7.org/fhir/SearchParameter/slot-fb-type).', + fhirtype: 'token', + xpath: 'Slot.freeBusyType', + description: 'The free/busy status of the appointment', }, + // http://hl7.org/fhir/SearchParameter/Slot-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Slot.identifier', + description: 'A Slot Identifier', + }, + // http://hl7.org/fhir/SearchParameter/Slot-schedule schedule: { type: GraphQLString, - description: - 'The Schedule Resource that we are seeking a slot within (See http://hl7.org/fhir/SearchParameter/slot-schedule).', - }, - start: { - type: DateScalar, - description: - 'Appointment date/time. (See http://hl7.org/fhir/SearchParameter/slot-start).', + fhirtype: 'reference', + xpath: 'Slot.schedule', + description: 'The Schedule Resource that we are seeking a slot within', }, + // http://hl7.org/fhir/SearchParameter/Slot-slot-type slot_type: { type: TokenScalar, - description: - 'The type of appointments that can be booked into the slot (See http://hl7.org/fhir/SearchParameter/slot-slot-type).', + fhirtype: 'token', + xpath: 'Slot.type', + description: 'The type of appointments that can be booked into the slot', }, - identifier: { - type: TokenScalar, - description: - 'A Slot Identifier (See http://hl7.org/fhir/SearchParameter/slot-identifier).', + // http://hl7.org/fhir/SearchParameter/Slot-start + start: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Slot.start', + description: 'Appointment date/time.', }, }; diff --git a/src/resources/1_0_2/parameters/specimen.parameters.js b/src/resources/1_0_2/parameters/specimen.parameters.js index d69a72e6..6311735c 100644 --- a/src/resources/1_0_2/parameters/specimen.parameters.js +++ b/src/resources/1_0_2/parameters/specimen.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,59 +8,82 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the specimen query */ module.exports = { - collector: { - type: GraphQLString, - description: - 'Who collected the specimen (See http://hl7.org/fhir/SearchParameter/specimen-collector).', - }, - container_id: { + // http://hl7.org/fhir/SearchParameter/Specimen-accession + accession: { type: TokenScalar, - description: - 'The unique identifier associated with the specimen container (See http://hl7.org/fhir/SearchParameter/specimen-container-id).', - }, - patient: { - type: GraphQLString, - description: - 'The patient the specimen comes from (See http://hl7.org/fhir/SearchParameter/specimen-patient).', + fhirtype: 'token', + xpath: 'Specimen.accessionIdentifier', + description: 'The accession number associated with the specimen', }, + // http://hl7.org/fhir/SearchParameter/Specimen-bodysite bodysite: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.collection.bodySite', description: - 'The code for the body site from where the specimen originated (See http://hl7.org/fhir/SearchParameter/specimen-bodysite).', - }, - container: { - type: TokenScalar, - description: - 'The kind of specimen container (See http://hl7.org/fhir/SearchParameter/specimen-container).', + 'The code for the body site from where the specimen originated', }, + // http://hl7.org/fhir/SearchParameter/Specimen-collected collected: { type: DateScalar, - description: - 'The date the specimen was collected (See http://hl7.org/fhir/SearchParameter/specimen-collected).', + fhirtype: 'date', + xpath: 'Specimen.collection.collectedDateTime', + description: 'The date the specimen was collected', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Specimen-collector + collector: { type: GraphQLString, - description: - 'The subject of the specimen (See http://hl7.org/fhir/SearchParameter/specimen-subject).', + fhirtype: 'reference', + xpath: 'Specimen.collection.collector', + description: 'Who collected the specimen', }, - accession: { + // http://hl7.org/fhir/SearchParameter/Specimen-container + container: { type: TokenScalar, - description: - 'The accession number associated with the specimen (See http://hl7.org/fhir/SearchParameter/specimen-accession).', + fhirtype: 'token', + xpath: 'Specimen.container.type', + description: 'The kind of specimen container', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-container-id + container_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.container.identifier', + description: 'The unique identifier associated with the specimen container', }, + // http://hl7.org/fhir/SearchParameter/Specimen-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.identifier', + description: 'The unique identifier associated with the specimen', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-parent parent: { type: GraphQLString, - description: - 'The parent of the specimen (See http://hl7.org/fhir/SearchParameter/specimen-parent).', + fhirtype: 'reference', + xpath: 'Specimen.parent', + description: 'The parent of the specimen', }, - type: { - type: TokenScalar, - description: - 'The specimen type (See http://hl7.org/fhir/SearchParameter/specimen-type).', + // http://hl7.org/fhir/SearchParameter/Specimen-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Specimen.subject', + description: 'The patient the specimen comes from', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Specimen-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Specimen.subject', + description: 'The subject of the specimen', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-type + type: { type: TokenScalar, - description: - 'The unique identifier associated with the specimen (See http://hl7.org/fhir/SearchParameter/specimen-identifier).', + fhirtype: 'token', + xpath: 'Specimen.type', + description: 'The specimen type', }, }; diff --git a/src/resources/1_0_2/parameters/structuredefinition.parameters.js b/src/resources/1_0_2/parameters/structuredefinition.parameters.js index 2e2a7bb3..196ab9d7 100644 --- a/src/resources/1_0_2/parameters/structuredefinition.parameters.js +++ b/src/resources/1_0_2/parameters/structuredefinition.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -9,109 +9,151 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the structuredefinition query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-abstract abstract: { type: TokenScalar, - description: - 'Whether the structure is abstract (See http://hl7.org/fhir/SearchParameter/structuredefinition-abstract).', + fhirtype: 'token', + xpath: 'StructureDefinition.abstract', + description: 'Whether the structure is abstract', }, - status: { - type: TokenScalar, - description: - 'The current status of the profile (See http://hl7.org/fhir/SearchParameter/structuredefinition-status).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-base + base: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'StructureDefinition.base', + description: 'Structure that this set of constraints applies to', }, - experimental: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-base-path + base_path: { type: TokenScalar, - description: - 'If for testing purposes, not real usage (See http://hl7.org/fhir/SearchParameter/structuredefinition-experimental).', + fhirtype: 'token', + xpath: 'StructureDefinition.snapshot.element.base.path', + description: 'Path that identifies the base element', }, - display: { - type: GraphQLString, - description: - 'Use this name when displaying the value (See http://hl7.org/fhir/SearchParameter/structuredefinition-display).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.code', + description: 'A code for the profile', }, - ext_context: { - type: GraphQLString, - description: - 'Where the extension can be used in instances (See http://hl7.org/fhir/SearchParameter/structuredefinition-ext-context).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.useContext', + description: 'A use context assigned to the structure', }, - code: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-context-type + context_type: { type: TokenScalar, - description: - 'A code for the profile (See http://hl7.org/fhir/SearchParameter/structuredefinition-code).', + fhirtype: 'token', + xpath: 'StructureDefinition.contextType', + description: 'resource | datatype | mapping | extension', }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-date date: { type: DateScalar, - description: - 'The profile publication date (See http://hl7.org/fhir/SearchParameter/structuredefinition-date).', + fhirtype: 'date', + xpath: 'StructureDefinition.date', + description: 'The profile publication date', }, - type: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.description', + description: 'Text search in the description of the profile', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-display + display: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.display', + description: 'Use this name when displaying the value', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-experimental + experimental: { type: TokenScalar, - description: - 'Any datatype or resource, including abstract ones (See http://hl7.org/fhir/SearchParameter/structuredefinition-type).', + fhirtype: 'token', + xpath: 'StructureDefinition.experimental', + description: 'If for testing purposes, not real usage', }, - url: { - type: UriScalar, - description: - 'Absolute URL used to reference this StructureDefinition (See http://hl7.org/fhir/SearchParameter/structuredefinition-url).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-ext-context + ext_context: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.context', + description: 'Where the extension can be used in instances', }, - kind: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-identifier + identifier: { type: TokenScalar, - description: - 'datatype | resource | logical (See http://hl7.org/fhir/SearchParameter/structuredefinition-kind).', + fhirtype: 'token', + xpath: 'StructureDefinition.identifier', + description: 'The identifier of the profile', }, - version: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-kind + kind: { type: TokenScalar, - description: - 'The version identifier of the profile (See http://hl7.org/fhir/SearchParameter/structuredefinition-version).', + fhirtype: 'token', + xpath: 'StructureDefinition.kind', + description: 'datatype | resource | logical', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-name + name: { type: GraphQLString, - description: - 'Name of the publisher of the profile (See http://hl7.org/fhir/SearchParameter/structuredefinition-publisher).', + fhirtype: 'string', + xpath: 'StructureDefinition.name', + description: 'Name of the profile', }, - base_path: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-path + path: { type: TokenScalar, - description: - 'Path that identifies the base element (See http://hl7.org/fhir/SearchParameter/structuredefinition-base-path).', + fhirtype: 'token', + xpath: 'StructureDefinition.snapshot.element.path', + description: 'A path that is constrained in the profile', }, - valueset: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-publisher + publisher: { type: GraphQLString, - description: - 'A vocabulary binding reference (See http://hl7.org/fhir/SearchParameter/structuredefinition-valueset).', + fhirtype: 'string', + xpath: 'StructureDefinition.publisher', + description: 'Name of the publisher of the profile', }, - context_type: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-status + status: { type: TokenScalar, - description: - 'resource | datatype | mapping | extension (See http://hl7.org/fhir/SearchParameter/structuredefinition-context-type).', + fhirtype: 'token', + xpath: 'StructureDefinition.status', + description: 'The current status of the profile', }, - description: { - type: GraphQLString, - description: - 'Text search in the description of the profile (See http://hl7.org/fhir/SearchParameter/structuredefinition-description).', - }, - name: { - type: GraphQLString, - description: - 'Name of the profile (See http://hl7.org/fhir/SearchParameter/structuredefinition-name).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.constrainedType', + description: 'Any datatype or resource, including abstract ones', }, - base: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-url + url: { type: UriScalar, - description: - 'Structure that this set of constraints applies to (See http://hl7.org/fhir/SearchParameter/structuredefinition-base).', - }, - context: { - type: TokenScalar, - description: - 'A use context assigned to the structure (See http://hl7.org/fhir/SearchParameter/structuredefinition-context).', + fhirtype: 'uri', + xpath: 'StructureDefinition.url', + description: 'Absolute URL used to reference this StructureDefinition', }, - path: { - type: TokenScalar, - description: - 'A path that is constrained in the profile (See http://hl7.org/fhir/SearchParameter/structuredefinition-path).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-valueset + valueset: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'StructureDefinition.snapshot.element.binding.valueSetUri', + description: 'A vocabulary binding reference', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-version + version: { type: TokenScalar, - description: - 'The identifier of the profile (See http://hl7.org/fhir/SearchParameter/structuredefinition-identifier).', + fhirtype: 'token', + xpath: 'StructureDefinition.version', + description: 'The version identifier of the profile', }, }; diff --git a/src/resources/1_0_2/parameters/subscription.parameters.js b/src/resources/1_0_2/parameters/subscription.parameters.js index 533cf4fd..d5568008 100644 --- a/src/resources/1_0_2/parameters/subscription.parameters.js +++ b/src/resources/1_0_2/parameters/subscription.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,39 +8,53 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the subscription query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Subscription-contact + contact: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Subscription.contact', + description: 'Contact details for source (e.g. troubleshooting)', + }, + // http://hl7.org/fhir/SearchParameter/Subscription-criteria criteria: { type: GraphQLString, - description: - 'Rule for server push criteria (See http://hl7.org/fhir/SearchParameter/subscription-criteria).', + fhirtype: 'string', + xpath: 'Subscription.criteria', + description: 'Rule for server push criteria', + }, + // http://hl7.org/fhir/SearchParameter/Subscription-payload + payload: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Subscription.channel.payload', + description: 'Mimetype to send, or blank for no payload', }, + // http://hl7.org/fhir/SearchParameter/Subscription-status status: { type: TokenScalar, - description: - 'requested | active | error | off (See http://hl7.org/fhir/SearchParameter/subscription-status).', + fhirtype: 'token', + xpath: 'Subscription.status', + description: 'requested | active | error | off', }, + // http://hl7.org/fhir/SearchParameter/Subscription-tag tag: { type: TokenScalar, - description: - 'A tag to add to matching resources (See http://hl7.org/fhir/SearchParameter/subscription-tag).', - }, - payload: { - type: GraphQLString, - description: - 'Mimetype to send, or blank for no payload (See http://hl7.org/fhir/SearchParameter/subscription-payload).', + fhirtype: 'token', + xpath: 'Subscription.tag', + description: 'A tag to add to matching resources', }, + // http://hl7.org/fhir/SearchParameter/Subscription-type type: { type: TokenScalar, - description: - 'rest-hook | websocket | email | sms | message (See http://hl7.org/fhir/SearchParameter/subscription-type).', - }, - contact: { - type: TokenScalar, - description: - 'Contact details for source (e.g. troubleshooting) (See http://hl7.org/fhir/SearchParameter/subscription-contact).', + fhirtype: 'token', + xpath: 'Subscription.channel.type', + description: 'rest-hook | websocket | email | sms | message', }, + // http://hl7.org/fhir/SearchParameter/Subscription-url url: { type: UriScalar, - description: - 'Where the channel points to (See http://hl7.org/fhir/SearchParameter/subscription-url).', + fhirtype: 'uri', + xpath: 'Subscription.channel.endpoint', + description: 'Where the channel points to', }, }; diff --git a/src/resources/1_0_2/parameters/substance.parameters.js b/src/resources/1_0_2/parameters/substance.parameters.js index 7d7ed752..5520ea8f 100644 --- a/src/resources/1_0_2/parameters/substance.parameters.js +++ b/src/resources/1_0_2/parameters/substance.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,39 +8,53 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the substance query */ module.exports = { - substance: { - type: GraphQLString, - description: - 'A component of the substance (See http://hl7.org/fhir/SearchParameter/substance-substance).', - }, - container_identifier: { - type: TokenScalar, - description: - 'Identifier of the package/container (See http://hl7.org/fhir/SearchParameter/substance-container-identifier).', - }, + // http://hl7.org/fhir/SearchParameter/Substance-category category: { type: TokenScalar, - description: - 'The category of the substance (See http://hl7.org/fhir/SearchParameter/substance-category).', - }, - quantity: { - type: GraphQLString, - description: - 'Amount of substance in the package (See http://hl7.org/fhir/SearchParameter/substance-quantity).', + fhirtype: 'token', + xpath: 'Substance.category', + description: 'The category of the substance', }, + // http://hl7.org/fhir/SearchParameter/Substance-code code: { type: TokenScalar, - description: - 'The code of the substance (See http://hl7.org/fhir/SearchParameter/substance-code).', + fhirtype: 'token', + xpath: 'Substance.code', + description: 'The code of the substance', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Substance-container-identifier + container_identifier: { type: TokenScalar, - description: - 'Unique identifier for the substance (See http://hl7.org/fhir/SearchParameter/substance-identifier).', + fhirtype: 'token', + xpath: 'Substance.instance.identifier', + description: 'Identifier of the package/container', }, + // http://hl7.org/fhir/SearchParameter/Substance-expiry expiry: { type: DateScalar, - description: - 'Expiry date of package or container of substance (See http://hl7.org/fhir/SearchParameter/substance-expiry).', + fhirtype: 'date', + xpath: 'Substance.instance.expiry', + description: 'Expiry date of package or container of substance', + }, + // http://hl7.org/fhir/SearchParameter/Substance-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Substance.identifier', + description: 'Unique identifier for the substance', + }, + // http://hl7.org/fhir/SearchParameter/Substance-quantity + quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Substance.instance.quantity', + description: 'Amount of substance in the package', + }, + // http://hl7.org/fhir/SearchParameter/Substance-substance + substance: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Substance.ingredient.substance', + description: 'A component of the substance', }, }; diff --git a/src/resources/1_0_2/parameters/supplydelivery.parameters.js b/src/resources/1_0_2/parameters/supplydelivery.parameters.js index c9981245..b0a42a9b 100644 --- a/src/resources/1_0_2/parameters/supplydelivery.parameters.js +++ b/src/resources/1_0_2/parameters/supplydelivery.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,29 +7,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the supplydelivery query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyDelivery.identifier', + description: 'External identifier', + }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-patient patient: { type: GraphQLString, - description: - 'Patient for whom the item is supplied (See http://hl7.org/fhir/SearchParameter/supplydelivery-patient).', + fhirtype: 'reference', + xpath: 'SupplyDelivery.patient', + description: 'Patient for whom the item is supplied', }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-receiver receiver: { type: GraphQLString, - description: - 'Who collected the Supply (See http://hl7.org/fhir/SearchParameter/supplydelivery-receiver).', + fhirtype: 'reference', + xpath: 'SupplyDelivery.receiver', + description: 'Who collected the Supply', }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-status status: { type: TokenScalar, - description: - 'in-progress | completed | abandoned (See http://hl7.org/fhir/SearchParameter/supplydelivery-status).', - }, - identifier: { - type: TokenScalar, - description: - 'External identifier (See http://hl7.org/fhir/SearchParameter/supplydelivery-identifier).', + fhirtype: 'token', + xpath: 'SupplyDelivery.status', + description: 'in-progress | completed | abandoned', }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-supplier supplier: { type: GraphQLString, - description: - 'Dispenser (See http://hl7.org/fhir/SearchParameter/supplydelivery-supplier).', + fhirtype: 'reference', + xpath: 'SupplyDelivery.supplier', + description: 'Dispenser', }, }; diff --git a/src/resources/1_0_2/parameters/supplyrequest.parameters.js b/src/resources/1_0_2/parameters/supplyrequest.parameters.js index 76901730..17a67fba 100644 --- a/src/resources/1_0_2/parameters/supplyrequest.parameters.js +++ b/src/resources/1_0_2/parameters/supplyrequest.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,39 +8,53 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the supplyrequest query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/SupplyRequest-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'SupplyRequest.date', + description: 'When the request was made', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyRequest.identifier', + description: 'Unique identifier', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-kind + kind: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyRequest.kind', + description: 'The kind of supply (central, non-stock, etc.)', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-patient patient: { type: GraphQLString, - description: - 'Patient for whom the item is supplied (See http://hl7.org/fhir/SearchParameter/supplyrequest-patient).', + fhirtype: 'reference', + xpath: 'SupplyRequest.patient', + description: 'Patient for whom the item is supplied', }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-source source: { type: GraphQLString, - description: - 'Who initiated this order (See http://hl7.org/fhir/SearchParameter/supplyrequest-source).', + fhirtype: 'reference', + xpath: 'SupplyRequest.source', + description: 'Who initiated this order', }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-status status: { type: TokenScalar, - description: - 'requested | completed | failed | cancelled (See http://hl7.org/fhir/SearchParameter/supplyrequest-status).', - }, - date: { - type: DateScalar, - description: - 'When the request was made (See http://hl7.org/fhir/SearchParameter/supplyrequest-date).', - }, - identifier: { - type: TokenScalar, - description: - 'Unique identifier (See http://hl7.org/fhir/SearchParameter/supplyrequest-identifier).', + fhirtype: 'token', + xpath: 'SupplyRequest.status', + description: 'requested | completed | failed | cancelled', }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-supplier supplier: { type: GraphQLString, - description: - 'Who is intended to fulfill the request (See http://hl7.org/fhir/SearchParameter/supplyrequest-supplier).', - }, - kind: { - type: TokenScalar, - description: - 'The kind of supply (central, non-stock, etc.) (See http://hl7.org/fhir/SearchParameter/supplyrequest-kind).', + fhirtype: 'reference', + xpath: 'SupplyRequest.supplier', + description: 'Who is intended to fulfill the request', }, }; diff --git a/src/resources/1_0_2/parameters/testscript.parameters.js b/src/resources/1_0_2/parameters/testscript.parameters.js index 55d9c043..5c506b31 100644 --- a/src/resources/1_0_2/parameters/testscript.parameters.js +++ b/src/resources/1_0_2/parameters/testscript.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,39 +8,53 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the testscript query */ module.exports = { - testscript_test_capability: { - type: GraphQLString, - description: - 'TestScript test required and validated capability (See http://hl7.org/fhir/SearchParameter/testscript-testscript-test-capability).', - }, - testscript_setup_capability: { - type: GraphQLString, - description: - 'TestScript setup required and validated capability (See http://hl7.org/fhir/SearchParameter/testscript-testscript-setup-capability).', - }, + // http://hl7.org/fhir/SearchParameter/TestScript-description description: { type: GraphQLString, - description: - 'Natural language description of the TestScript (See http://hl7.org/fhir/SearchParameter/testscript-description).', + fhirtype: 'string', + xpath: 'TestScript.description', + description: 'Natural language description of the TestScript', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestScript.identifier', + description: 'External identifier', }, + // http://hl7.org/fhir/SearchParameter/TestScript-name name: { type: GraphQLString, - description: - 'Informal name for this TestScript (See http://hl7.org/fhir/SearchParameter/testscript-name).', + fhirtype: 'string', + xpath: 'TestScript.name', + description: 'Informal name for this TestScript', }, + // http://hl7.org/fhir/SearchParameter/TestScript-testscript-capability testscript_capability: { type: GraphQLString, - description: - 'TestScript required and validated capability (See http://hl7.org/fhir/SearchParameter/testscript-testscript-capability).', + fhirtype: 'string', + xpath: 'TestScript.metadata.capability.description', + description: 'TestScript required and validated capability', }, - identifier: { - type: TokenScalar, - description: - 'External identifier (See http://hl7.org/fhir/SearchParameter/testscript-identifier).', + // http://hl7.org/fhir/SearchParameter/TestScript-testscript-setup-capability + testscript_setup_capability: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestScript.setup.metadata.capability.description', + description: 'TestScript setup required and validated capability', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-testscript-test-capability + testscript_test_capability: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestScript.test.metadata.capability.description', + description: 'TestScript test required and validated capability', }, + // http://hl7.org/fhir/SearchParameter/TestScript-url url: { type: UriScalar, - description: - 'Absolute URL used to reference this TestScript (See http://hl7.org/fhir/SearchParameter/testscript-url).', + fhirtype: 'uri', + xpath: 'TestScript.url', + description: 'Absolute URL used to reference this TestScript', }, }; diff --git a/src/resources/1_0_2/parameters/valueset.parameters.js b/src/resources/1_0_2/parameters/valueset.parameters.js index 3d1ec566..f4e08c72 100644 --- a/src/resources/1_0_2/parameters/valueset.parameters.js +++ b/src/resources/1_0_2/parameters/valueset.parameters.js @@ -1,7 +1,7 @@ -const UriScalar = require('../scalars/uri.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,69 +9,96 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the valueset query */ module.exports = { - system: { - type: UriScalar, - description: - 'The system for any codes defined by this value set (See http://hl7.org/fhir/SearchParameter/valueset-system).', - }, - expansion: { - type: UriScalar, - description: - 'Uniquely identifies this expansion (See http://hl7.org/fhir/SearchParameter/valueset-expansion).', + // http://hl7.org/fhir/SearchParameter/ValueSet-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ValueSet.codeSystem.concept.code', + description: 'A code defined in the value set', }, - status: { + // http://hl7.org/fhir/SearchParameter/ValueSet-context + context: { type: TokenScalar, - description: - 'The status of the value set (See http://hl7.org/fhir/SearchParameter/valueset-status).', + fhirtype: 'token', + xpath: 'ValueSet.useContext', + description: 'A use context assigned to the value set', }, + // http://hl7.org/fhir/SearchParameter/ValueSet-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ValueSet.date', + description: 'The value set publication date', + }, + // http://hl7.org/fhir/SearchParameter/ValueSet-description description: { type: GraphQLString, - description: - 'Text search in the description of the value set (See http://hl7.org/fhir/SearchParameter/valueset-description).', + fhirtype: 'string', + xpath: 'ValueSet.description', + description: 'Text search in the description of the value set', }, - name: { - type: GraphQLString, - description: - 'The name of the value set (See http://hl7.org/fhir/SearchParameter/valueset-name).', + // http://hl7.org/fhir/SearchParameter/ValueSet-expansion + expansion: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ValueSet.expansion.identifier', + description: 'Uniquely identifies this expansion', }, - context: { + // http://hl7.org/fhir/SearchParameter/ValueSet-identifier + identifier: { type: TokenScalar, - description: - 'A use context assigned to the value set (See http://hl7.org/fhir/SearchParameter/valueset-context).', + fhirtype: 'token', + xpath: 'ValueSet.identifier', + description: 'The identifier for the value set', }, - code: { - type: TokenScalar, - description: - 'A code defined in the value set (See http://hl7.org/fhir/SearchParameter/valueset-code).', + // http://hl7.org/fhir/SearchParameter/ValueSet-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ValueSet.name', + description: 'The name of the value set', }, - date: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/ValueSet-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ValueSet.publisher', + description: 'Name of the publisher of the value set', + }, + // http://hl7.org/fhir/SearchParameter/ValueSet-reference + reference: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ValueSet.compose.include.system', description: - 'The value set publication date (See http://hl7.org/fhir/SearchParameter/valueset-date).', + 'A code system included or excluded in the value set or an imported value set', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/ValueSet-status + status: { type: TokenScalar, - description: - 'The identifier for the value set (See http://hl7.org/fhir/SearchParameter/valueset-identifier).', + fhirtype: 'token', + xpath: 'ValueSet.status', + description: 'The status of the value set', }, - reference: { + // http://hl7.org/fhir/SearchParameter/ValueSet-system + system: { type: UriScalar, - description: - 'A code system included or excluded in the value set or an imported value set (See http://hl7.org/fhir/SearchParameter/valueset-reference).', + fhirtype: 'uri', + xpath: 'ValueSet.codeSystem.system', + description: 'The system for any codes defined by this value set', }, + // http://hl7.org/fhir/SearchParameter/ValueSet-url url: { type: UriScalar, - description: - 'The logical URL for the value set (See http://hl7.org/fhir/SearchParameter/valueset-url).', - }, - publisher: { - type: GraphQLString, - description: - 'Name of the publisher of the value set (See http://hl7.org/fhir/SearchParameter/valueset-publisher).', + fhirtype: 'uri', + xpath: 'ValueSet.url', + description: 'The logical URL for the value set', }, + // http://hl7.org/fhir/SearchParameter/ValueSet-version version: { type: TokenScalar, - description: - 'The version identifier of the value set (See http://hl7.org/fhir/SearchParameter/valueset-version).', + fhirtype: 'token', + xpath: 'ValueSet.version', + description: 'The version identifier of the value set', }, }; diff --git a/src/resources/1_0_2/parameters/visionprescription.parameters.js b/src/resources/1_0_2/parameters/visionprescription.parameters.js index 1fafa92e..3190ee46 100644 --- a/src/resources/1_0_2/parameters/visionprescription.parameters.js +++ b/src/resources/1_0_2/parameters/visionprescription.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,29 +8,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the visionprescription query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/VisionPrescription-datewritten datewritten: { type: DateScalar, - description: - 'Return prescriptions written on this date (See http://hl7.org/fhir/SearchParameter/visionprescription-datewritten).', - }, - patient: { - type: GraphQLString, - description: - 'The identity of a patient to list dispenses for (See http://hl7.org/fhir/SearchParameter/visionprescription-patient).', - }, - prescriber: { - type: GraphQLString, - description: - 'Who authorizes the vision product (See http://hl7.org/fhir/SearchParameter/visionprescription-prescriber).', + fhirtype: 'date', + xpath: 'VisionPrescription.dateWritten', + description: 'Return prescriptions written on this date', }, + // http://hl7.org/fhir/SearchParameter/VisionPrescription-encounter encounter: { type: GraphQLString, - description: - 'Return prescriptions with this encounter identifier (See http://hl7.org/fhir/SearchParameter/visionprescription-encounter).', + fhirtype: 'reference', + xpath: 'VisionPrescription.encounter', + description: 'Return prescriptions with this encounter identifier', }, + // http://hl7.org/fhir/SearchParameter/VisionPrescription-identifier identifier: { type: TokenScalar, - description: - 'Return prescriptions with this external identifier (See http://hl7.org/fhir/SearchParameter/visionprescription-identifier).', + fhirtype: 'token', + xpath: 'VisionPrescription.identifier', + description: 'Return prescriptions with this external identifier', + }, + // http://hl7.org/fhir/SearchParameter/VisionPrescription-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'VisionPrescription.patient', + description: 'The identity of a patient to list dispenses for', + }, + // http://hl7.org/fhir/SearchParameter/VisionPrescription-prescriber + prescriber: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'VisionPrescription.prescriber', + description: 'Who authorizes the vision product', }, }; diff --git a/src/resources/1_0_2/profiles/account/mutation.js b/src/resources/1_0_2/profiles/account/mutation.js index b5334b93..cee43075 100644 --- a/src/resources/1_0_2/profiles/account/mutation.js +++ b/src/resources/1_0_2/profiles/account/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AccountSchema = require('../../schemas/account.schema'); +const AccountSchema = require('../../schemas/account.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AccountInput = require('../../inputs/account.input'); +const AccountInput = require('../../inputs/account.input.js'); -// Resolvers -const { - accountCreateResolver, - accountUpdateResolver, - accountDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createAccount, updateAccount, removeAccount } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Account', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Account record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Account record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.AccountCreateMutation - * @summary AccountCreate Mutation. + * @summary AccountCreate mutation. */ module.exports.AccountCreateMutation = { - args: WriteArgs, - description: 'Create a Account', - resolve: scopeInvariant(scopeOptions, accountCreateResolver), + description: 'Create a Account record', + resolve: scopeInvariant(scopeOptions, createAccount), type: AccountSchema, + args: WriteArgs, }; /** * @name exports.AccountUpdateMutation - * @summary AccountUpdate Mutation. + * @summary AccountUpdate mutation. */ module.exports.AccountUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Accounts', - resolve: scopeInvariant(scopeOptions, accountUpdateResolver), + description: 'Update a Account record', + resolve: scopeInvariant(scopeOptions, updateAccount), type: AccountSchema, + args: WriteArgs, }; /** - * @name exports.AccountDeleteMutation - * @summary AccountDelete Mutation. + * @name exports.AccountRemoveMutation + * @summary AccountRemove mutation. */ -module.exports.AccountDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Account', - resolve: scopeInvariant(scopeOptions, accountDeleteResolver), +module.exports.AccountRemoveMutation = { + description: 'Remove a Account record', + resolve: scopeInvariant(scopeOptions, removeAccount), type: AccountSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/account/query.js b/src/resources/1_0_2/profiles/account/query.js index 99ffdc07..5cc49a92 100644 --- a/src/resources/1_0_2/profiles/account/query.js +++ b/src/resources/1_0_2/profiles/account/query.js @@ -1,55 +1,59 @@ // Schemas -const AccountSchema = require('../../schemas/account.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AccountSchema = require('../../schemas/account.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AccountArgs = require('../../parameters/account.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AccountArgs = require('../../parameters/account.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, AccountArgs); // Resolvers const { - accountResolver, - accountListResolver, - accountInstanceResolver, + getAccount, + getAccountList, + getAccountInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Account', action: 'read', - version: '1_0_2', }; /** * @name exports.AccountQuery - * @summary Account Query. + * @summary Account query. */ module.exports.AccountQuery = { - args: Object.assign({}, CommonArgs, AccountArgs), description: 'Query for a single Account', - resolve: scopeInvariant(scopeOptions, accountResolver), + resolve: scopeInvariant(scopeOptions, getAccount), type: AccountSchema, + args: args, }; /** * @name exports.AccountListQuery - * @summary AccountList Query. + * @summary Account query. */ module.exports.AccountListQuery = { - args: Object.assign({}, CommonArgs, AccountArgs), - description: 'Query for multiple Accounts', - resolve: scopeInvariant(scopeOptions, accountListResolver), + description: 'Query for a more than or just one Account', + resolve: scopeInvariant(scopeOptions, getAccountList), type: BundleSchema, + args: args, }; /** * @name exports.AccountInstanceQuery - * @summary AccountInstance Query. + * @summary Account query. */ module.exports.AccountInstanceQuery = { - description: 'Get information about a single Account', - resolve: scopeInvariant(scopeOptions, accountInstanceResolver), + description: 'Access information about a single Account', + resolve: scopeInvariant(scopeOptions, getAccountInstance), type: AccountSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/account/index.js b/src/resources/1_0_2/profiles/account/register.js similarity index 92% rename from src/resources/1_0_2/profiles/account/index.js rename to src/resources/1_0_2/profiles/account/register.js index a679d41c..84689951 100644 --- a/src/resources/1_0_2/profiles/account/index.js +++ b/src/resources/1_0_2/profiles/account/register.js @@ -1,15 +1,15 @@ +const { + AccountCreateMutation, + AccountUpdateMutation, + AccountRemoveMutation, +} = require('./mutation'); + const { AccountQuery, AccountListQuery, AccountInstanceQuery, } = require('./query'); -const { - AccountCreateMutation, - AccountUpdateMutation, - AccountDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AccountCreate: AccountCreateMutation, AccountUpdate: AccountUpdateMutation, - AccountDelete: AccountDeleteMutation, + AccountRemove: AccountRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Account', path: '/1_0_2/Account/:id', query: AccountInstanceQuery, diff --git a/src/resources/1_0_2/profiles/account/resolver.js b/src/resources/1_0_2/profiles/account/resolver.js index 76b5cb0c..ba0c56d2 100644 --- a/src/resources/1_0_2/profiles/account/resolver.js +++ b/src/resources/1_0_2/profiles/account/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.accountResolver + * @name exports.getAccount * @static - * @summary Account Resolver. + * @summary Account resolver. */ -module.exports.accountResolver = function accountResolver( +module.exports.getAccount = function getAccount( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountListResolver + * @name exports.getAccountList * @static - * @summary Account List Resolver. + * @summary Account list resolver. */ -module.exports.accountListResolver = function accountListResolver( +module.exports.getAccountList = function getAccountList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountInstanceResolver + * @name exports.getAccountInstance * @static - * @summary Account Instance Resolver. + * @summary Account instance resolver. */ -module.exports.accountInstanceResolver = function accountInstanceResolver( +module.exports.getAccountInstance = function getAccountInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountCreateResolver + * @name exports.createAccount * @static - * @summary Account Create Resolver. + * @summary Create Account resolver. */ -module.exports.accountCreateResolver = function accountCreateResolver( +module.exports.createAccount = function createAccount( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountUpdateResolver + * @name exports.updateAccount * @static - * @summary Account Update Resolver. + * @summary Update Account resolver. */ -module.exports.accountUpdateResolver = function accountUpdateResolver( +module.exports.updateAccount = function updateAccount( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountDeleteResolver + * @name exports.removeAccount * @static - * @summary Account Delete Resolver. + * @summary Remove Account resolver. */ -module.exports.accountDeleteResolver = function accountDeleteResolver( +module.exports.removeAccount = function removeAccount( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/allergyintolerance/mutation.js b/src/resources/1_0_2/profiles/allergyintolerance/mutation.js index 5fbc9803..5ea39a12 100644 --- a/src/resources/1_0_2/profiles/allergyintolerance/mutation.js +++ b/src/resources/1_0_2/profiles/allergyintolerance/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema'); +const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AllergyIntoleranceInput = require('../../inputs/allergyintolerance.input'); +const AllergyIntoleranceInput = require('../../inputs/allergyintolerance.input.js'); -// Resolvers -const { - allergyintoleranceCreateResolver, - allergyintoleranceUpdateResolver, - allergyintoleranceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAllergyIntolerance, + updateAllergyIntolerance, + removeAllergyIntolerance, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AllergyIntolerance', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a AllergyIntolerance record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a AllergyIntolerance record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.AllergyIntoleranceCreateMutation - * @summary AllergyIntoleranceCreate Mutation. + * @summary AllergyIntoleranceCreate mutation. */ module.exports.AllergyIntoleranceCreateMutation = { - args: WriteArgs, - description: 'Create a AllergyIntolerance', - resolve: scopeInvariant(scopeOptions, allergyintoleranceCreateResolver), + description: 'Create a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, createAllergyIntolerance), type: AllergyIntoleranceSchema, + args: WriteArgs, }; /** * @name exports.AllergyIntoleranceUpdateMutation - * @summary AllergyIntoleranceUpdate Mutation. + * @summary AllergyIntoleranceUpdate mutation. */ module.exports.AllergyIntoleranceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple AllergyIntolerances', - resolve: scopeInvariant(scopeOptions, allergyintoleranceUpdateResolver), + description: 'Update a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, updateAllergyIntolerance), type: AllergyIntoleranceSchema, + args: WriteArgs, }; /** - * @name exports.AllergyIntoleranceDeleteMutation - * @summary AllergyIntoleranceDelete Mutation. + * @name exports.AllergyIntoleranceRemoveMutation + * @summary AllergyIntoleranceRemove mutation. */ -module.exports.AllergyIntoleranceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single AllergyIntolerance', - resolve: scopeInvariant(scopeOptions, allergyintoleranceDeleteResolver), +module.exports.AllergyIntoleranceRemoveMutation = { + description: 'Remove a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, removeAllergyIntolerance), type: AllergyIntoleranceSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/allergyintolerance/query.js b/src/resources/1_0_2/profiles/allergyintolerance/query.js index 31d03340..a3507957 100644 --- a/src/resources/1_0_2/profiles/allergyintolerance/query.js +++ b/src/resources/1_0_2/profiles/allergyintolerance/query.js @@ -1,55 +1,59 @@ // Schemas -const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AllergyIntoleranceArgs = require('../../parameters/allergyintolerance.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AllergyIntoleranceArgs = require('../../parameters/allergyintolerance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, AllergyIntoleranceArgs); // Resolvers const { - allergyintoleranceResolver, - allergyintoleranceListResolver, - allergyintoleranceInstanceResolver, + getAllergyIntolerance, + getAllergyIntoleranceList, + getAllergyIntoleranceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AllergyIntolerance', action: 'read', - version: '1_0_2', }; /** * @name exports.AllergyIntoleranceQuery - * @summary AllergyIntolerance Query. + * @summary AllergyIntolerance query. */ module.exports.AllergyIntoleranceQuery = { - args: Object.assign({}, CommonArgs, AllergyIntoleranceArgs), description: 'Query for a single AllergyIntolerance', - resolve: scopeInvariant(scopeOptions, allergyintoleranceResolver), + resolve: scopeInvariant(scopeOptions, getAllergyIntolerance), type: AllergyIntoleranceSchema, + args: args, }; /** * @name exports.AllergyIntoleranceListQuery - * @summary AllergyIntoleranceList Query. + * @summary AllergyIntolerance query. */ module.exports.AllergyIntoleranceListQuery = { - args: Object.assign({}, CommonArgs, AllergyIntoleranceArgs), - description: 'Query for multiple AllergyIntolerances', - resolve: scopeInvariant(scopeOptions, allergyintoleranceListResolver), + description: 'Query for a more than or just one AllergyIntolerance', + resolve: scopeInvariant(scopeOptions, getAllergyIntoleranceList), type: BundleSchema, + args: args, }; /** * @name exports.AllergyIntoleranceInstanceQuery - * @summary AllergyIntoleranceInstance Query. + * @summary AllergyIntolerance query. */ module.exports.AllergyIntoleranceInstanceQuery = { - description: 'Get information about a single AllergyIntolerance', - resolve: scopeInvariant(scopeOptions, allergyintoleranceInstanceResolver), + description: 'Access information about a single AllergyIntolerance', + resolve: scopeInvariant(scopeOptions, getAllergyIntoleranceInstance), type: AllergyIntoleranceSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/allergyintolerance/index.js b/src/resources/1_0_2/profiles/allergyintolerance/register.js similarity index 91% rename from src/resources/1_0_2/profiles/allergyintolerance/index.js rename to src/resources/1_0_2/profiles/allergyintolerance/register.js index 00f53018..8f077db3 100644 --- a/src/resources/1_0_2/profiles/allergyintolerance/index.js +++ b/src/resources/1_0_2/profiles/allergyintolerance/register.js @@ -1,15 +1,15 @@ +const { + AllergyIntoleranceCreateMutation, + AllergyIntoleranceUpdateMutation, + AllergyIntoleranceRemoveMutation, +} = require('./mutation'); + const { AllergyIntoleranceQuery, AllergyIntoleranceListQuery, AllergyIntoleranceInstanceQuery, } = require('./query'); -const { - AllergyIntoleranceCreateMutation, - AllergyIntoleranceUpdateMutation, - AllergyIntoleranceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AllergyIntoleranceCreate: AllergyIntoleranceCreateMutation, AllergyIntoleranceUpdate: AllergyIntoleranceUpdateMutation, - AllergyIntoleranceDelete: AllergyIntoleranceDeleteMutation, + AllergyIntoleranceRemove: AllergyIntoleranceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'AllergyIntolerance', path: '/1_0_2/AllergyIntolerance/:id', query: AllergyIntoleranceInstanceQuery, diff --git a/src/resources/1_0_2/profiles/allergyintolerance/resolver.js b/src/resources/1_0_2/profiles/allergyintolerance/resolver.js index 6365ad4c..31499802 100644 --- a/src/resources/1_0_2/profiles/allergyintolerance/resolver.js +++ b/src/resources/1_0_2/profiles/allergyintolerance/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.allergyintoleranceResolver + * @name exports.getAllergyIntolerance * @static - * @summary AllergyIntolerance Resolver. + * @summary AllergyIntolerance resolver. */ -module.exports.allergyintoleranceResolver = function allergyintoleranceResolver( +module.exports.getAllergyIntolerance = function getAllergyIntolerance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceListResolver + * @name exports.getAllergyIntoleranceList * @static - * @summary AllergyIntolerance List Resolver. + * @summary AllergyIntolerance list resolver. */ -module.exports.allergyintoleranceListResolver = function allergyintoleranceListResolver( +module.exports.getAllergyIntoleranceList = function getAllergyIntoleranceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceInstanceResolver + * @name exports.getAllergyIntoleranceInstance * @static - * @summary AllergyIntolerance Instance Resolver. + * @summary AllergyIntolerance instance resolver. */ -module.exports.allergyintoleranceInstanceResolver = function allergyintoleranceInstanceResolver( +module.exports.getAllergyIntoleranceInstance = function getAllergyIntoleranceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceCreateResolver + * @name exports.createAllergyIntolerance * @static - * @summary AllergyIntolerance Create Resolver. + * @summary Create AllergyIntolerance resolver. */ -module.exports.allergyintoleranceCreateResolver = function allergyintoleranceCreateResolver( +module.exports.createAllergyIntolerance = function createAllergyIntolerance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceUpdateResolver + * @name exports.updateAllergyIntolerance * @static - * @summary AllergyIntolerance Update Resolver. + * @summary Update AllergyIntolerance resolver. */ -module.exports.allergyintoleranceUpdateResolver = function allergyintoleranceUpdateResolver( +module.exports.updateAllergyIntolerance = function updateAllergyIntolerance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceDeleteResolver + * @name exports.removeAllergyIntolerance * @static - * @summary AllergyIntolerance Delete Resolver. + * @summary Remove AllergyIntolerance resolver. */ -module.exports.allergyintoleranceDeleteResolver = function allergyintoleranceDeleteResolver( +module.exports.removeAllergyIntolerance = function removeAllergyIntolerance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/appointment/mutation.js b/src/resources/1_0_2/profiles/appointment/mutation.js index b549694a..0c00949c 100644 --- a/src/resources/1_0_2/profiles/appointment/mutation.js +++ b/src/resources/1_0_2/profiles/appointment/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AppointmentSchema = require('../../schemas/appointment.schema'); +const AppointmentSchema = require('../../schemas/appointment.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AppointmentInput = require('../../inputs/appointment.input'); +const AppointmentInput = require('../../inputs/appointment.input.js'); -// Resolvers -const { - appointmentCreateResolver, - appointmentUpdateResolver, - appointmentDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAppointment, + updateAppointment, + removeAppointment, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Appointment', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Appointment record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Appointment record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.AppointmentCreateMutation - * @summary AppointmentCreate Mutation. + * @summary AppointmentCreate mutation. */ module.exports.AppointmentCreateMutation = { - args: WriteArgs, - description: 'Create a Appointment', - resolve: scopeInvariant(scopeOptions, appointmentCreateResolver), + description: 'Create a Appointment record', + resolve: scopeInvariant(scopeOptions, createAppointment), type: AppointmentSchema, + args: WriteArgs, }; /** * @name exports.AppointmentUpdateMutation - * @summary AppointmentUpdate Mutation. + * @summary AppointmentUpdate mutation. */ module.exports.AppointmentUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Appointments', - resolve: scopeInvariant(scopeOptions, appointmentUpdateResolver), + description: 'Update a Appointment record', + resolve: scopeInvariant(scopeOptions, updateAppointment), type: AppointmentSchema, + args: WriteArgs, }; /** - * @name exports.AppointmentDeleteMutation - * @summary AppointmentDelete Mutation. + * @name exports.AppointmentRemoveMutation + * @summary AppointmentRemove mutation. */ -module.exports.AppointmentDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Appointment', - resolve: scopeInvariant(scopeOptions, appointmentDeleteResolver), +module.exports.AppointmentRemoveMutation = { + description: 'Remove a Appointment record', + resolve: scopeInvariant(scopeOptions, removeAppointment), type: AppointmentSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/appointment/query.js b/src/resources/1_0_2/profiles/appointment/query.js index 7d64fea3..afc44963 100644 --- a/src/resources/1_0_2/profiles/appointment/query.js +++ b/src/resources/1_0_2/profiles/appointment/query.js @@ -1,55 +1,59 @@ // Schemas -const AppointmentSchema = require('../../schemas/appointment.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AppointmentSchema = require('../../schemas/appointment.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AppointmentArgs = require('../../parameters/appointment.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AppointmentArgs = require('../../parameters/appointment.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, AppointmentArgs); // Resolvers const { - appointmentResolver, - appointmentListResolver, - appointmentInstanceResolver, + getAppointment, + getAppointmentList, + getAppointmentInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Appointment', action: 'read', - version: '1_0_2', }; /** * @name exports.AppointmentQuery - * @summary Appointment Query. + * @summary Appointment query. */ module.exports.AppointmentQuery = { - args: Object.assign({}, CommonArgs, AppointmentArgs), description: 'Query for a single Appointment', - resolve: scopeInvariant(scopeOptions, appointmentResolver), + resolve: scopeInvariant(scopeOptions, getAppointment), type: AppointmentSchema, + args: args, }; /** * @name exports.AppointmentListQuery - * @summary AppointmentList Query. + * @summary Appointment query. */ module.exports.AppointmentListQuery = { - args: Object.assign({}, CommonArgs, AppointmentArgs), - description: 'Query for multiple Appointments', - resolve: scopeInvariant(scopeOptions, appointmentListResolver), + description: 'Query for a more than or just one Appointment', + resolve: scopeInvariant(scopeOptions, getAppointmentList), type: BundleSchema, + args: args, }; /** * @name exports.AppointmentInstanceQuery - * @summary AppointmentInstance Query. + * @summary Appointment query. */ module.exports.AppointmentInstanceQuery = { - description: 'Get information about a single Appointment', - resolve: scopeInvariant(scopeOptions, appointmentInstanceResolver), + description: 'Access information about a single Appointment', + resolve: scopeInvariant(scopeOptions, getAppointmentInstance), type: AppointmentSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/appointment/index.js b/src/resources/1_0_2/profiles/appointment/register.js similarity index 92% rename from src/resources/1_0_2/profiles/appointment/index.js rename to src/resources/1_0_2/profiles/appointment/register.js index cd1ce879..f8eac7b6 100644 --- a/src/resources/1_0_2/profiles/appointment/index.js +++ b/src/resources/1_0_2/profiles/appointment/register.js @@ -1,15 +1,15 @@ +const { + AppointmentCreateMutation, + AppointmentUpdateMutation, + AppointmentRemoveMutation, +} = require('./mutation'); + const { AppointmentQuery, AppointmentListQuery, AppointmentInstanceQuery, } = require('./query'); -const { - AppointmentCreateMutation, - AppointmentUpdateMutation, - AppointmentDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AppointmentCreate: AppointmentCreateMutation, AppointmentUpdate: AppointmentUpdateMutation, - AppointmentDelete: AppointmentDeleteMutation, + AppointmentRemove: AppointmentRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Appointment', path: '/1_0_2/Appointment/:id', query: AppointmentInstanceQuery, diff --git a/src/resources/1_0_2/profiles/appointment/resolver.js b/src/resources/1_0_2/profiles/appointment/resolver.js index 1c36bb22..421196d5 100644 --- a/src/resources/1_0_2/profiles/appointment/resolver.js +++ b/src/resources/1_0_2/profiles/appointment/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.appointmentResolver + * @name exports.getAppointment * @static - * @summary Appointment Resolver. + * @summary Appointment resolver. */ -module.exports.appointmentResolver = function appointmentResolver( +module.exports.getAppointment = function getAppointment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentListResolver + * @name exports.getAppointmentList * @static - * @summary Appointment List Resolver. + * @summary Appointment list resolver. */ -module.exports.appointmentListResolver = function appointmentListResolver( +module.exports.getAppointmentList = function getAppointmentList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentInstanceResolver + * @name exports.getAppointmentInstance * @static - * @summary Appointment Instance Resolver. + * @summary Appointment instance resolver. */ -module.exports.appointmentInstanceResolver = function appointmentInstanceResolver( +module.exports.getAppointmentInstance = function getAppointmentInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentCreateResolver + * @name exports.createAppointment * @static - * @summary Appointment Create Resolver. + * @summary Create Appointment resolver. */ -module.exports.appointmentCreateResolver = function appointmentCreateResolver( +module.exports.createAppointment = function createAppointment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentUpdateResolver + * @name exports.updateAppointment * @static - * @summary Appointment Update Resolver. + * @summary Update Appointment resolver. */ -module.exports.appointmentUpdateResolver = function appointmentUpdateResolver( +module.exports.updateAppointment = function updateAppointment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentDeleteResolver + * @name exports.removeAppointment * @static - * @summary Appointment Delete Resolver. + * @summary Remove Appointment resolver. */ -module.exports.appointmentDeleteResolver = function appointmentDeleteResolver( +module.exports.removeAppointment = function removeAppointment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/appointmentresponse/mutation.js b/src/resources/1_0_2/profiles/appointmentresponse/mutation.js index dbb540da..4194d1d9 100644 --- a/src/resources/1_0_2/profiles/appointmentresponse/mutation.js +++ b/src/resources/1_0_2/profiles/appointmentresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema'); +const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AppointmentResponseInput = require('../../inputs/appointmentresponse.input'); +const AppointmentResponseInput = require('../../inputs/appointmentresponse.input.js'); -// Resolvers -const { - appointmentresponseCreateResolver, - appointmentresponseUpdateResolver, - appointmentresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAppointmentResponse, + updateAppointmentResponse, + removeAppointmentResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AppointmentResponse', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a AppointmentResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a AppointmentResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.AppointmentResponseCreateMutation - * @summary AppointmentResponseCreate Mutation. + * @summary AppointmentResponseCreate mutation. */ module.exports.AppointmentResponseCreateMutation = { - args: WriteArgs, - description: 'Create a AppointmentResponse', - resolve: scopeInvariant(scopeOptions, appointmentresponseCreateResolver), + description: 'Create a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, createAppointmentResponse), type: AppointmentResponseSchema, + args: WriteArgs, }; /** * @name exports.AppointmentResponseUpdateMutation - * @summary AppointmentResponseUpdate Mutation. + * @summary AppointmentResponseUpdate mutation. */ module.exports.AppointmentResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple AppointmentResponses', - resolve: scopeInvariant(scopeOptions, appointmentresponseUpdateResolver), + description: 'Update a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, updateAppointmentResponse), type: AppointmentResponseSchema, + args: WriteArgs, }; /** - * @name exports.AppointmentResponseDeleteMutation - * @summary AppointmentResponseDelete Mutation. + * @name exports.AppointmentResponseRemoveMutation + * @summary AppointmentResponseRemove mutation. */ -module.exports.AppointmentResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single AppointmentResponse', - resolve: scopeInvariant(scopeOptions, appointmentresponseDeleteResolver), +module.exports.AppointmentResponseRemoveMutation = { + description: 'Remove a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, removeAppointmentResponse), type: AppointmentResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/appointmentresponse/query.js b/src/resources/1_0_2/profiles/appointmentresponse/query.js index 6d3f4e34..4b068aa2 100644 --- a/src/resources/1_0_2/profiles/appointmentresponse/query.js +++ b/src/resources/1_0_2/profiles/appointmentresponse/query.js @@ -1,55 +1,59 @@ // Schemas -const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AppointmentResponseArgs = require('../../parameters/appointmentresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AppointmentResponseArgs = require('../../parameters/appointmentresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, AppointmentResponseArgs); // Resolvers const { - appointmentresponseResolver, - appointmentresponseListResolver, - appointmentresponseInstanceResolver, + getAppointmentResponse, + getAppointmentResponseList, + getAppointmentResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AppointmentResponse', action: 'read', - version: '1_0_2', }; /** * @name exports.AppointmentResponseQuery - * @summary AppointmentResponse Query. + * @summary AppointmentResponse query. */ module.exports.AppointmentResponseQuery = { - args: Object.assign({}, CommonArgs, AppointmentResponseArgs), description: 'Query for a single AppointmentResponse', - resolve: scopeInvariant(scopeOptions, appointmentresponseResolver), + resolve: scopeInvariant(scopeOptions, getAppointmentResponse), type: AppointmentResponseSchema, + args: args, }; /** * @name exports.AppointmentResponseListQuery - * @summary AppointmentResponseList Query. + * @summary AppointmentResponse query. */ module.exports.AppointmentResponseListQuery = { - args: Object.assign({}, CommonArgs, AppointmentResponseArgs), - description: 'Query for multiple AppointmentResponses', - resolve: scopeInvariant(scopeOptions, appointmentresponseListResolver), + description: 'Query for a more than or just one AppointmentResponse', + resolve: scopeInvariant(scopeOptions, getAppointmentResponseList), type: BundleSchema, + args: args, }; /** * @name exports.AppointmentResponseInstanceQuery - * @summary AppointmentResponseInstance Query. + * @summary AppointmentResponse query. */ module.exports.AppointmentResponseInstanceQuery = { - description: 'Get information about a single AppointmentResponse', - resolve: scopeInvariant(scopeOptions, appointmentresponseInstanceResolver), + description: 'Access information about a single AppointmentResponse', + resolve: scopeInvariant(scopeOptions, getAppointmentResponseInstance), type: AppointmentResponseSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/appointmentresponse/index.js b/src/resources/1_0_2/profiles/appointmentresponse/register.js similarity index 91% rename from src/resources/1_0_2/profiles/appointmentresponse/index.js rename to src/resources/1_0_2/profiles/appointmentresponse/register.js index 1bcc28a5..aa062c3a 100644 --- a/src/resources/1_0_2/profiles/appointmentresponse/index.js +++ b/src/resources/1_0_2/profiles/appointmentresponse/register.js @@ -1,15 +1,15 @@ +const { + AppointmentResponseCreateMutation, + AppointmentResponseUpdateMutation, + AppointmentResponseRemoveMutation, +} = require('./mutation'); + const { AppointmentResponseQuery, AppointmentResponseListQuery, AppointmentResponseInstanceQuery, } = require('./query'); -const { - AppointmentResponseCreateMutation, - AppointmentResponseUpdateMutation, - AppointmentResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AppointmentResponseCreate: AppointmentResponseCreateMutation, AppointmentResponseUpdate: AppointmentResponseUpdateMutation, - AppointmentResponseDelete: AppointmentResponseDeleteMutation, + AppointmentResponseRemove: AppointmentResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'AppointmentResponse', path: '/1_0_2/AppointmentResponse/:id', query: AppointmentResponseInstanceQuery, diff --git a/src/resources/1_0_2/profiles/appointmentresponse/resolver.js b/src/resources/1_0_2/profiles/appointmentresponse/resolver.js index bd4a5968..d8f3c115 100644 --- a/src/resources/1_0_2/profiles/appointmentresponse/resolver.js +++ b/src/resources/1_0_2/profiles/appointmentresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.appointmentresponseResolver + * @name exports.getAppointmentResponse * @static - * @summary AppointmentResponse Resolver. + * @summary AppointmentResponse resolver. */ -module.exports.appointmentresponseResolver = function appointmentresponseResolver( +module.exports.getAppointmentResponse = function getAppointmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseListResolver + * @name exports.getAppointmentResponseList * @static - * @summary AppointmentResponse List Resolver. + * @summary AppointmentResponse list resolver. */ -module.exports.appointmentresponseListResolver = function appointmentresponseListResolver( +module.exports.getAppointmentResponseList = function getAppointmentResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseInstanceResolver + * @name exports.getAppointmentResponseInstance * @static - * @summary AppointmentResponse Instance Resolver. + * @summary AppointmentResponse instance resolver. */ -module.exports.appointmentresponseInstanceResolver = function appointmentresponseInstanceResolver( +module.exports.getAppointmentResponseInstance = function getAppointmentResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseCreateResolver + * @name exports.createAppointmentResponse * @static - * @summary AppointmentResponse Create Resolver. + * @summary Create AppointmentResponse resolver. */ -module.exports.appointmentresponseCreateResolver = function appointmentresponseCreateResolver( +module.exports.createAppointmentResponse = function createAppointmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseUpdateResolver + * @name exports.updateAppointmentResponse * @static - * @summary AppointmentResponse Update Resolver. + * @summary Update AppointmentResponse resolver. */ -module.exports.appointmentresponseUpdateResolver = function appointmentresponseUpdateResolver( +module.exports.updateAppointmentResponse = function updateAppointmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseDeleteResolver + * @name exports.removeAppointmentResponse * @static - * @summary AppointmentResponse Delete Resolver. + * @summary Remove AppointmentResponse resolver. */ -module.exports.appointmentresponseDeleteResolver = function appointmentresponseDeleteResolver( +module.exports.removeAppointmentResponse = function removeAppointmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/auditevent/mutation.js b/src/resources/1_0_2/profiles/auditevent/mutation.js index 023435f6..5f7fb6bb 100644 --- a/src/resources/1_0_2/profiles/auditevent/mutation.js +++ b/src/resources/1_0_2/profiles/auditevent/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AuditEventSchema = require('../../schemas/auditevent.schema'); +const AuditEventSchema = require('../../schemas/auditevent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AuditEventInput = require('../../inputs/auditevent.input'); +const AuditEventInput = require('../../inputs/auditevent.input.js'); -// Resolvers -const { - auditeventCreateResolver, - auditeventUpdateResolver, - auditeventDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAuditEvent, + updateAuditEvent, + removeAuditEvent, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AuditEvent', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a AuditEvent record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a AuditEvent record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.AuditEventCreateMutation - * @summary AuditEventCreate Mutation. + * @summary AuditEventCreate mutation. */ module.exports.AuditEventCreateMutation = { - args: WriteArgs, - description: 'Create a AuditEvent', - resolve: scopeInvariant(scopeOptions, auditeventCreateResolver), + description: 'Create a AuditEvent record', + resolve: scopeInvariant(scopeOptions, createAuditEvent), type: AuditEventSchema, + args: WriteArgs, }; /** * @name exports.AuditEventUpdateMutation - * @summary AuditEventUpdate Mutation. + * @summary AuditEventUpdate mutation. */ module.exports.AuditEventUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple AuditEvents', - resolve: scopeInvariant(scopeOptions, auditeventUpdateResolver), + description: 'Update a AuditEvent record', + resolve: scopeInvariant(scopeOptions, updateAuditEvent), type: AuditEventSchema, + args: WriteArgs, }; /** - * @name exports.AuditEventDeleteMutation - * @summary AuditEventDelete Mutation. + * @name exports.AuditEventRemoveMutation + * @summary AuditEventRemove mutation. */ -module.exports.AuditEventDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single AuditEvent', - resolve: scopeInvariant(scopeOptions, auditeventDeleteResolver), +module.exports.AuditEventRemoveMutation = { + description: 'Remove a AuditEvent record', + resolve: scopeInvariant(scopeOptions, removeAuditEvent), type: AuditEventSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/auditevent/query.js b/src/resources/1_0_2/profiles/auditevent/query.js index 2a35a4b8..6ad3d5bf 100644 --- a/src/resources/1_0_2/profiles/auditevent/query.js +++ b/src/resources/1_0_2/profiles/auditevent/query.js @@ -1,55 +1,59 @@ // Schemas -const AuditEventSchema = require('../../schemas/auditevent.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AuditEventSchema = require('../../schemas/auditevent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AuditEventArgs = require('../../parameters/auditevent.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AuditEventArgs = require('../../parameters/auditevent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, AuditEventArgs); // Resolvers const { - auditeventResolver, - auditeventListResolver, - auditeventInstanceResolver, + getAuditEvent, + getAuditEventList, + getAuditEventInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AuditEvent', action: 'read', - version: '1_0_2', }; /** * @name exports.AuditEventQuery - * @summary AuditEvent Query. + * @summary AuditEvent query. */ module.exports.AuditEventQuery = { - args: Object.assign({}, CommonArgs, AuditEventArgs), description: 'Query for a single AuditEvent', - resolve: scopeInvariant(scopeOptions, auditeventResolver), + resolve: scopeInvariant(scopeOptions, getAuditEvent), type: AuditEventSchema, + args: args, }; /** * @name exports.AuditEventListQuery - * @summary AuditEventList Query. + * @summary AuditEvent query. */ module.exports.AuditEventListQuery = { - args: Object.assign({}, CommonArgs, AuditEventArgs), - description: 'Query for multiple AuditEvents', - resolve: scopeInvariant(scopeOptions, auditeventListResolver), + description: 'Query for a more than or just one AuditEvent', + resolve: scopeInvariant(scopeOptions, getAuditEventList), type: BundleSchema, + args: args, }; /** * @name exports.AuditEventInstanceQuery - * @summary AuditEventInstance Query. + * @summary AuditEvent query. */ module.exports.AuditEventInstanceQuery = { - description: 'Get information about a single AuditEvent', - resolve: scopeInvariant(scopeOptions, auditeventInstanceResolver), + description: 'Access information about a single AuditEvent', + resolve: scopeInvariant(scopeOptions, getAuditEventInstance), type: AuditEventSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/auditevent/index.js b/src/resources/1_0_2/profiles/auditevent/register.js similarity index 92% rename from src/resources/1_0_2/profiles/auditevent/index.js rename to src/resources/1_0_2/profiles/auditevent/register.js index cf619e5f..facb0f39 100644 --- a/src/resources/1_0_2/profiles/auditevent/index.js +++ b/src/resources/1_0_2/profiles/auditevent/register.js @@ -1,15 +1,15 @@ +const { + AuditEventCreateMutation, + AuditEventUpdateMutation, + AuditEventRemoveMutation, +} = require('./mutation'); + const { AuditEventQuery, AuditEventListQuery, AuditEventInstanceQuery, } = require('./query'); -const { - AuditEventCreateMutation, - AuditEventUpdateMutation, - AuditEventDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AuditEventCreate: AuditEventCreateMutation, AuditEventUpdate: AuditEventUpdateMutation, - AuditEventDelete: AuditEventDeleteMutation, + AuditEventRemove: AuditEventRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'AuditEvent', path: '/1_0_2/AuditEvent/:id', query: AuditEventInstanceQuery, diff --git a/src/resources/1_0_2/profiles/auditevent/resolver.js b/src/resources/1_0_2/profiles/auditevent/resolver.js index 14223de0..aa8a0228 100644 --- a/src/resources/1_0_2/profiles/auditevent/resolver.js +++ b/src/resources/1_0_2/profiles/auditevent/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.auditeventResolver + * @name exports.getAuditEvent * @static - * @summary AuditEvent Resolver. + * @summary AuditEvent resolver. */ -module.exports.auditeventResolver = function auditeventResolver( +module.exports.getAuditEvent = function getAuditEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventListResolver + * @name exports.getAuditEventList * @static - * @summary AuditEvent List Resolver. + * @summary AuditEvent list resolver. */ -module.exports.auditeventListResolver = function auditeventListResolver( +module.exports.getAuditEventList = function getAuditEventList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventInstanceResolver + * @name exports.getAuditEventInstance * @static - * @summary AuditEvent Instance Resolver. + * @summary AuditEvent instance resolver. */ -module.exports.auditeventInstanceResolver = function auditeventInstanceResolver( +module.exports.getAuditEventInstance = function getAuditEventInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventCreateResolver + * @name exports.createAuditEvent * @static - * @summary AuditEvent Create Resolver. + * @summary Create AuditEvent resolver. */ -module.exports.auditeventCreateResolver = function auditeventCreateResolver( +module.exports.createAuditEvent = function createAuditEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventUpdateResolver + * @name exports.updateAuditEvent * @static - * @summary AuditEvent Update Resolver. + * @summary Update AuditEvent resolver. */ -module.exports.auditeventUpdateResolver = function auditeventUpdateResolver( +module.exports.updateAuditEvent = function updateAuditEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventDeleteResolver + * @name exports.removeAuditEvent * @static - * @summary AuditEvent Delete Resolver. + * @summary Remove AuditEvent resolver. */ -module.exports.auditeventDeleteResolver = function auditeventDeleteResolver( +module.exports.removeAuditEvent = function removeAuditEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/basic/mutation.js b/src/resources/1_0_2/profiles/basic/mutation.js index bd8fe884..b2e687bc 100644 --- a/src/resources/1_0_2/profiles/basic/mutation.js +++ b/src/resources/1_0_2/profiles/basic/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const BasicSchema = require('../../schemas/basic.schema'); +const BasicSchema = require('../../schemas/basic.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const BasicInput = require('../../inputs/basic.input'); +const BasicInput = require('../../inputs/basic.input.js'); -// Resolvers -const { - basicCreateResolver, - basicUpdateResolver, - basicDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createBasic, updateBasic, removeBasic } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Basic', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Basic record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Basic record for deletion.', }, }; /** * @name exports.BasicCreateMutation - * @summary BasicCreate Mutation. + * @summary BasicCreate mutation. */ module.exports.BasicCreateMutation = { - args: WriteArgs, - description: 'Create a Basic', - resolve: scopeInvariant(scopeOptions, basicCreateResolver), + description: 'Create a Basic record', + resolve: scopeInvariant(scopeOptions, createBasic), type: BasicSchema, + args: WriteArgs, }; /** * @name exports.BasicUpdateMutation - * @summary BasicUpdate Mutation. + * @summary BasicUpdate mutation. */ module.exports.BasicUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Basics', - resolve: scopeInvariant(scopeOptions, basicUpdateResolver), + description: 'Update a Basic record', + resolve: scopeInvariant(scopeOptions, updateBasic), type: BasicSchema, + args: WriteArgs, }; /** - * @name exports.BasicDeleteMutation - * @summary BasicDelete Mutation. + * @name exports.BasicRemoveMutation + * @summary BasicRemove mutation. */ -module.exports.BasicDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Basic', - resolve: scopeInvariant(scopeOptions, basicDeleteResolver), +module.exports.BasicRemoveMutation = { + description: 'Remove a Basic record', + resolve: scopeInvariant(scopeOptions, removeBasic), type: BasicSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/basic/query.js b/src/resources/1_0_2/profiles/basic/query.js index 06438af8..db4397a3 100644 --- a/src/resources/1_0_2/profiles/basic/query.js +++ b/src/resources/1_0_2/profiles/basic/query.js @@ -1,55 +1,55 @@ // Schemas -const BasicSchema = require('../../schemas/basic.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BasicSchema = require('../../schemas/basic.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const BasicArgs = require('../../parameters/basic.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const BasicArgs = require('../../parameters/basic.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, BasicArgs); // Resolvers -const { - basicResolver, - basicListResolver, - basicInstanceResolver, -} = require('./resolver'); +const { getBasic, getBasicList, getBasicInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Basic', action: 'read', - version: '1_0_2', }; /** * @name exports.BasicQuery - * @summary Basic Query. + * @summary Basic query. */ module.exports.BasicQuery = { - args: Object.assign({}, CommonArgs, BasicArgs), description: 'Query for a single Basic', - resolve: scopeInvariant(scopeOptions, basicResolver), + resolve: scopeInvariant(scopeOptions, getBasic), type: BasicSchema, + args: args, }; /** * @name exports.BasicListQuery - * @summary BasicList Query. + * @summary Basic query. */ module.exports.BasicListQuery = { - args: Object.assign({}, CommonArgs, BasicArgs), - description: 'Query for multiple Basics', - resolve: scopeInvariant(scopeOptions, basicListResolver), + description: 'Query for a more than or just one Basic', + resolve: scopeInvariant(scopeOptions, getBasicList), type: BundleSchema, + args: args, }; /** * @name exports.BasicInstanceQuery - * @summary BasicInstance Query. + * @summary Basic query. */ module.exports.BasicInstanceQuery = { - description: 'Get information about a single Basic', - resolve: scopeInvariant(scopeOptions, basicInstanceResolver), + description: 'Access information about a single Basic', + resolve: scopeInvariant(scopeOptions, getBasicInstance), type: BasicSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/basic/index.js b/src/resources/1_0_2/profiles/basic/register.js similarity index 93% rename from src/resources/1_0_2/profiles/basic/index.js rename to src/resources/1_0_2/profiles/basic/register.js index 6042b809..d26654b7 100644 --- a/src/resources/1_0_2/profiles/basic/index.js +++ b/src/resources/1_0_2/profiles/basic/register.js @@ -1,11 +1,11 @@ -const { BasicQuery, BasicListQuery, BasicInstanceQuery } = require('./query'); - const { BasicCreateMutation, BasicUpdateMutation, - BasicDeleteMutation, + BasicRemoveMutation, } = require('./mutation'); +const { BasicQuery, BasicListQuery, BasicInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { BasicCreate: BasicCreateMutation, BasicUpdate: BasicUpdateMutation, - BasicDelete: BasicDeleteMutation, + BasicRemove: BasicRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Basic', path: '/1_0_2/Basic/:id', query: BasicInstanceQuery, diff --git a/src/resources/1_0_2/profiles/basic/resolver.js b/src/resources/1_0_2/profiles/basic/resolver.js index 99430d90..6b622b01 100644 --- a/src/resources/1_0_2/profiles/basic/resolver.js +++ b/src/resources/1_0_2/profiles/basic/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.basicResolver + * @name exports.getBasic * @static - * @summary Basic Resolver. + * @summary Basic resolver. */ -module.exports.basicResolver = function basicResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getBasic = function getBasic(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicListResolver + * @name exports.getBasicList * @static - * @summary Basic List Resolver. + * @summary Basic list resolver. */ -module.exports.basicListResolver = function basicListResolver( +module.exports.getBasicList = function getBasicList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicInstanceResolver + * @name exports.getBasicInstance * @static - * @summary Basic Instance Resolver. + * @summary Basic instance resolver. */ -module.exports.basicInstanceResolver = function basicInstanceResolver( +module.exports.getBasicInstance = function getBasicInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicCreateResolver + * @name exports.createBasic * @static - * @summary Basic Create Resolver. + * @summary Create Basic resolver. */ -module.exports.basicCreateResolver = function basicCreateResolver( +module.exports.createBasic = function createBasic( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicUpdateResolver + * @name exports.updateBasic * @static - * @summary Basic Update Resolver. + * @summary Update Basic resolver. */ -module.exports.basicUpdateResolver = function basicUpdateResolver( +module.exports.updateBasic = function updateBasic( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicDeleteResolver + * @name exports.removeBasic * @static - * @summary Basic Delete Resolver. + * @summary Remove Basic resolver. */ -module.exports.basicDeleteResolver = function basicDeleteResolver( +module.exports.removeBasic = function removeBasic( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/binary/mutation.js b/src/resources/1_0_2/profiles/binary/mutation.js index 857918db..e4e75b38 100644 --- a/src/resources/1_0_2/profiles/binary/mutation.js +++ b/src/resources/1_0_2/profiles/binary/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const BinarySchema = require('../../schemas/binary.schema'); +const BinarySchema = require('../../schemas/binary.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const BinaryInput = require('../../inputs/binary.input'); +const BinaryInput = require('../../inputs/binary.input.js'); -// Resolvers -const { - binaryCreateResolver, - binaryUpdateResolver, - binaryDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createBinary, updateBinary, removeBinary } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Binary', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Binary record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Binary record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.BinaryCreateMutation - * @summary BinaryCreate Mutation. + * @summary BinaryCreate mutation. */ module.exports.BinaryCreateMutation = { - args: WriteArgs, - description: 'Create a Binary', - resolve: scopeInvariant(scopeOptions, binaryCreateResolver), + description: 'Create a Binary record', + resolve: scopeInvariant(scopeOptions, createBinary), type: BinarySchema, + args: WriteArgs, }; /** * @name exports.BinaryUpdateMutation - * @summary BinaryUpdate Mutation. + * @summary BinaryUpdate mutation. */ module.exports.BinaryUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Binarys', - resolve: scopeInvariant(scopeOptions, binaryUpdateResolver), + description: 'Update a Binary record', + resolve: scopeInvariant(scopeOptions, updateBinary), type: BinarySchema, + args: WriteArgs, }; /** - * @name exports.BinaryDeleteMutation - * @summary BinaryDelete Mutation. + * @name exports.BinaryRemoveMutation + * @summary BinaryRemove mutation. */ -module.exports.BinaryDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Binary', - resolve: scopeInvariant(scopeOptions, binaryDeleteResolver), +module.exports.BinaryRemoveMutation = { + description: 'Remove a Binary record', + resolve: scopeInvariant(scopeOptions, removeBinary), type: BinarySchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/binary/query.js b/src/resources/1_0_2/profiles/binary/query.js index b91d0d0b..2ee65c22 100644 --- a/src/resources/1_0_2/profiles/binary/query.js +++ b/src/resources/1_0_2/profiles/binary/query.js @@ -1,55 +1,55 @@ // Schemas -const BinarySchema = require('../../schemas/binary.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BinarySchema = require('../../schemas/binary.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const BinaryArgs = require('../../parameters/binary.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const BinaryArgs = require('../../parameters/binary.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, BinaryArgs); // Resolvers -const { - binaryResolver, - binaryListResolver, - binaryInstanceResolver, -} = require('./resolver'); +const { getBinary, getBinaryList, getBinaryInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Binary', action: 'read', - version: '1_0_2', }; /** * @name exports.BinaryQuery - * @summary Binary Query. + * @summary Binary query. */ module.exports.BinaryQuery = { - args: Object.assign({}, CommonArgs, BinaryArgs), description: 'Query for a single Binary', - resolve: scopeInvariant(scopeOptions, binaryResolver), + resolve: scopeInvariant(scopeOptions, getBinary), type: BinarySchema, + args: args, }; /** * @name exports.BinaryListQuery - * @summary BinaryList Query. + * @summary Binary query. */ module.exports.BinaryListQuery = { - args: Object.assign({}, CommonArgs, BinaryArgs), - description: 'Query for multiple Binarys', - resolve: scopeInvariant(scopeOptions, binaryListResolver), + description: 'Query for a more than or just one Binary', + resolve: scopeInvariant(scopeOptions, getBinaryList), type: BundleSchema, + args: args, }; /** * @name exports.BinaryInstanceQuery - * @summary BinaryInstance Query. + * @summary Binary query. */ module.exports.BinaryInstanceQuery = { - description: 'Get information about a single Binary', - resolve: scopeInvariant(scopeOptions, binaryInstanceResolver), + description: 'Access information about a single Binary', + resolve: scopeInvariant(scopeOptions, getBinaryInstance), type: BinarySchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/binary/index.js b/src/resources/1_0_2/profiles/binary/register.js similarity index 93% rename from src/resources/1_0_2/profiles/binary/index.js rename to src/resources/1_0_2/profiles/binary/register.js index 3480a298..c100cc19 100644 --- a/src/resources/1_0_2/profiles/binary/index.js +++ b/src/resources/1_0_2/profiles/binary/register.js @@ -1,15 +1,15 @@ +const { + BinaryCreateMutation, + BinaryUpdateMutation, + BinaryRemoveMutation, +} = require('./mutation'); + const { BinaryQuery, BinaryListQuery, BinaryInstanceQuery, } = require('./query'); -const { - BinaryCreateMutation, - BinaryUpdateMutation, - BinaryDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { BinaryCreate: BinaryCreateMutation, BinaryUpdate: BinaryUpdateMutation, - BinaryDelete: BinaryDeleteMutation, + BinaryRemove: BinaryRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Binary', path: '/1_0_2/Binary/:id', query: BinaryInstanceQuery, diff --git a/src/resources/1_0_2/profiles/binary/resolver.js b/src/resources/1_0_2/profiles/binary/resolver.js index 7a6df632..a06b6760 100644 --- a/src/resources/1_0_2/profiles/binary/resolver.js +++ b/src/resources/1_0_2/profiles/binary/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.binaryResolver + * @name exports.getBinary * @static - * @summary Binary Resolver. + * @summary Binary resolver. */ -module.exports.binaryResolver = function binaryResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getBinary = function getBinary(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryListResolver + * @name exports.getBinaryList * @static - * @summary Binary List Resolver. + * @summary Binary list resolver. */ -module.exports.binaryListResolver = function binaryListResolver( +module.exports.getBinaryList = function getBinaryList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryInstanceResolver + * @name exports.getBinaryInstance * @static - * @summary Binary Instance Resolver. + * @summary Binary instance resolver. */ -module.exports.binaryInstanceResolver = function binaryInstanceResolver( +module.exports.getBinaryInstance = function getBinaryInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryCreateResolver + * @name exports.createBinary * @static - * @summary Binary Create Resolver. + * @summary Create Binary resolver. */ -module.exports.binaryCreateResolver = function binaryCreateResolver( +module.exports.createBinary = function createBinary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryUpdateResolver + * @name exports.updateBinary * @static - * @summary Binary Update Resolver. + * @summary Update Binary resolver. */ -module.exports.binaryUpdateResolver = function binaryUpdateResolver( +module.exports.updateBinary = function updateBinary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryDeleteResolver + * @name exports.removeBinary * @static - * @summary Binary Delete Resolver. + * @summary Remove Binary resolver. */ -module.exports.binaryDeleteResolver = function binaryDeleteResolver( +module.exports.removeBinary = function removeBinary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/bodysite/mutation.js b/src/resources/1_0_2/profiles/bodysite/mutation.js index 6897fca3..6c38f180 100644 --- a/src/resources/1_0_2/profiles/bodysite/mutation.js +++ b/src/resources/1_0_2/profiles/bodysite/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const BodySiteSchema = require('../../schemas/bodysite.schema'); +const BodySiteSchema = require('../../schemas/bodysite.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const BodySiteInput = require('../../inputs/bodysite.input'); +const BodySiteInput = require('../../inputs/bodysite.input.js'); -// Resolvers -const { - bodysiteCreateResolver, - bodysiteUpdateResolver, - bodysiteDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createBodySite, + updateBodySite, + removeBodySite, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'BodySite', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a BodySite record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a BodySite record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.BodySiteCreateMutation - * @summary BodySiteCreate Mutation. + * @summary BodySiteCreate mutation. */ module.exports.BodySiteCreateMutation = { - args: WriteArgs, - description: 'Create a BodySite', - resolve: scopeInvariant(scopeOptions, bodysiteCreateResolver), + description: 'Create a BodySite record', + resolve: scopeInvariant(scopeOptions, createBodySite), type: BodySiteSchema, + args: WriteArgs, }; /** * @name exports.BodySiteUpdateMutation - * @summary BodySiteUpdate Mutation. + * @summary BodySiteUpdate mutation. */ module.exports.BodySiteUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple BodySites', - resolve: scopeInvariant(scopeOptions, bodysiteUpdateResolver), + description: 'Update a BodySite record', + resolve: scopeInvariant(scopeOptions, updateBodySite), type: BodySiteSchema, + args: WriteArgs, }; /** - * @name exports.BodySiteDeleteMutation - * @summary BodySiteDelete Mutation. + * @name exports.BodySiteRemoveMutation + * @summary BodySiteRemove mutation. */ -module.exports.BodySiteDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single BodySite', - resolve: scopeInvariant(scopeOptions, bodysiteDeleteResolver), +module.exports.BodySiteRemoveMutation = { + description: 'Remove a BodySite record', + resolve: scopeInvariant(scopeOptions, removeBodySite), type: BodySiteSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/bodysite/query.js b/src/resources/1_0_2/profiles/bodysite/query.js index 696743ef..0df427e1 100644 --- a/src/resources/1_0_2/profiles/bodysite/query.js +++ b/src/resources/1_0_2/profiles/bodysite/query.js @@ -1,55 +1,59 @@ // Schemas -const BodySiteSchema = require('../../schemas/bodysite.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BodySiteSchema = require('../../schemas/bodysite.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const BodySiteArgs = require('../../parameters/bodysite.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const BodySiteArgs = require('../../parameters/bodysite.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, BodySiteArgs); // Resolvers const { - bodysiteResolver, - bodysiteListResolver, - bodysiteInstanceResolver, + getBodySite, + getBodySiteList, + getBodySiteInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'BodySite', action: 'read', - version: '1_0_2', }; /** * @name exports.BodySiteQuery - * @summary BodySite Query. + * @summary BodySite query. */ module.exports.BodySiteQuery = { - args: Object.assign({}, CommonArgs, BodySiteArgs), description: 'Query for a single BodySite', - resolve: scopeInvariant(scopeOptions, bodysiteResolver), + resolve: scopeInvariant(scopeOptions, getBodySite), type: BodySiteSchema, + args: args, }; /** * @name exports.BodySiteListQuery - * @summary BodySiteList Query. + * @summary BodySite query. */ module.exports.BodySiteListQuery = { - args: Object.assign({}, CommonArgs, BodySiteArgs), - description: 'Query for multiple BodySites', - resolve: scopeInvariant(scopeOptions, bodysiteListResolver), + description: 'Query for a more than or just one BodySite', + resolve: scopeInvariant(scopeOptions, getBodySiteList), type: BundleSchema, + args: args, }; /** * @name exports.BodySiteInstanceQuery - * @summary BodySiteInstance Query. + * @summary BodySite query. */ module.exports.BodySiteInstanceQuery = { - description: 'Get information about a single BodySite', - resolve: scopeInvariant(scopeOptions, bodysiteInstanceResolver), + description: 'Access information about a single BodySite', + resolve: scopeInvariant(scopeOptions, getBodySiteInstance), type: BodySiteSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/bodysite/index.js b/src/resources/1_0_2/profiles/bodysite/register.js similarity index 92% rename from src/resources/1_0_2/profiles/bodysite/index.js rename to src/resources/1_0_2/profiles/bodysite/register.js index db311a21..b5577af0 100644 --- a/src/resources/1_0_2/profiles/bodysite/index.js +++ b/src/resources/1_0_2/profiles/bodysite/register.js @@ -1,15 +1,15 @@ +const { + BodySiteCreateMutation, + BodySiteUpdateMutation, + BodySiteRemoveMutation, +} = require('./mutation'); + const { BodySiteQuery, BodySiteListQuery, BodySiteInstanceQuery, } = require('./query'); -const { - BodySiteCreateMutation, - BodySiteUpdateMutation, - BodySiteDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { BodySiteCreate: BodySiteCreateMutation, BodySiteUpdate: BodySiteUpdateMutation, - BodySiteDelete: BodySiteDeleteMutation, + BodySiteRemove: BodySiteRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'BodySite', path: '/1_0_2/BodySite/:id', query: BodySiteInstanceQuery, diff --git a/src/resources/1_0_2/profiles/bodysite/resolver.js b/src/resources/1_0_2/profiles/bodysite/resolver.js index 5d38a656..85ad0f6b 100644 --- a/src/resources/1_0_2/profiles/bodysite/resolver.js +++ b/src/resources/1_0_2/profiles/bodysite/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.bodysiteResolver + * @name exports.getBodySite * @static - * @summary BodySite Resolver. + * @summary BodySite resolver. */ -module.exports.bodysiteResolver = function bodysiteResolver( +module.exports.getBodySite = function getBodySite( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteListResolver + * @name exports.getBodySiteList * @static - * @summary BodySite List Resolver. + * @summary BodySite list resolver. */ -module.exports.bodysiteListResolver = function bodysiteListResolver( +module.exports.getBodySiteList = function getBodySiteList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteInstanceResolver + * @name exports.getBodySiteInstance * @static - * @summary BodySite Instance Resolver. + * @summary BodySite instance resolver. */ -module.exports.bodysiteInstanceResolver = function bodysiteInstanceResolver( +module.exports.getBodySiteInstance = function getBodySiteInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteCreateResolver + * @name exports.createBodySite * @static - * @summary BodySite Create Resolver. + * @summary Create BodySite resolver. */ -module.exports.bodysiteCreateResolver = function bodysiteCreateResolver( +module.exports.createBodySite = function createBodySite( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteUpdateResolver + * @name exports.updateBodySite * @static - * @summary BodySite Update Resolver. + * @summary Update BodySite resolver. */ -module.exports.bodysiteUpdateResolver = function bodysiteUpdateResolver( +module.exports.updateBodySite = function updateBodySite( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteDeleteResolver + * @name exports.removeBodySite * @static - * @summary BodySite Delete Resolver. + * @summary Remove BodySite resolver. */ -module.exports.bodysiteDeleteResolver = function bodysiteDeleteResolver( +module.exports.removeBodySite = function removeBodySite( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/bundle/mutation.js b/src/resources/1_0_2/profiles/bundle/mutation.js index 7bf4363b..c63b03c6 100644 --- a/src/resources/1_0_2/profiles/bundle/mutation.js +++ b/src/resources/1_0_2/profiles/bundle/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const BundleSchema = require('../../schemas/bundle.schema'); +const BundleSchema = require('../../schemas/bundle.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const BundleInput = require('../../inputs/bundle.input'); +const BundleInput = require('../../inputs/bundle.input.js'); -// Resolvers -const { - bundleCreateResolver, - bundleUpdateResolver, - bundleDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createBundle, updateBundle, removeBundle } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Bundle', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Bundle record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Bundle record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.BundleCreateMutation - * @summary BundleCreate Mutation. + * @summary BundleCreate mutation. */ module.exports.BundleCreateMutation = { - args: WriteArgs, - description: 'Create a Bundle', - resolve: scopeInvariant(scopeOptions, bundleCreateResolver), + description: 'Create a Bundle record', + resolve: scopeInvariant(scopeOptions, createBundle), type: BundleSchema, + args: WriteArgs, }; /** * @name exports.BundleUpdateMutation - * @summary BundleUpdate Mutation. + * @summary BundleUpdate mutation. */ module.exports.BundleUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Bundles', - resolve: scopeInvariant(scopeOptions, bundleUpdateResolver), + description: 'Update a Bundle record', + resolve: scopeInvariant(scopeOptions, updateBundle), type: BundleSchema, + args: WriteArgs, }; /** - * @name exports.BundleDeleteMutation - * @summary BundleDelete Mutation. + * @name exports.BundleRemoveMutation + * @summary BundleRemove mutation. */ -module.exports.BundleDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Bundle', - resolve: scopeInvariant(scopeOptions, bundleDeleteResolver), +module.exports.BundleRemoveMutation = { + description: 'Remove a Bundle record', + resolve: scopeInvariant(scopeOptions, removeBundle), type: BundleSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/bundle/query.js b/src/resources/1_0_2/profiles/bundle/query.js index 6874fa9e..506a5ccd 100644 --- a/src/resources/1_0_2/profiles/bundle/query.js +++ b/src/resources/1_0_2/profiles/bundle/query.js @@ -1,54 +1,54 @@ // Schemas -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const BundleArgs = require('../../parameters/bundle.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const BundleArgs = require('../../parameters/bundle.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, BundleArgs); // Resolvers -const { - bundleResolver, - bundleListResolver, - bundleInstanceResolver, -} = require('./resolver'); +const { getBundle, getBundleList, getBundleInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Bundle', action: 'read', - version: '1_0_2', }; /** * @name exports.BundleQuery - * @summary Bundle Query. + * @summary Bundle query. */ module.exports.BundleQuery = { - args: Object.assign({}, CommonArgs, BundleArgs), description: 'Query for a single Bundle', - resolve: scopeInvariant(scopeOptions, bundleResolver), + resolve: scopeInvariant(scopeOptions, getBundle), type: BundleSchema, + args: args, }; /** * @name exports.BundleListQuery - * @summary BundleList Query. + * @summary Bundle query. */ module.exports.BundleListQuery = { - args: Object.assign({}, CommonArgs, BundleArgs), - description: 'Query for multiple Bundles', - resolve: scopeInvariant(scopeOptions, bundleListResolver), + description: 'Query for a more than or just one Bundle', + resolve: scopeInvariant(scopeOptions, getBundleList), type: BundleSchema, + args: args, }; /** * @name exports.BundleInstanceQuery - * @summary BundleInstance Query. + * @summary Bundle query. */ module.exports.BundleInstanceQuery = { - description: 'Get information about a single Bundle', - resolve: scopeInvariant(scopeOptions, bundleInstanceResolver), + description: 'Access information about a single Bundle', + resolve: scopeInvariant(scopeOptions, getBundleInstance), type: BundleSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/bundle/index.js b/src/resources/1_0_2/profiles/bundle/register.js similarity index 93% rename from src/resources/1_0_2/profiles/bundle/index.js rename to src/resources/1_0_2/profiles/bundle/register.js index 974ceea8..9ebcd708 100644 --- a/src/resources/1_0_2/profiles/bundle/index.js +++ b/src/resources/1_0_2/profiles/bundle/register.js @@ -1,15 +1,15 @@ +const { + BundleCreateMutation, + BundleUpdateMutation, + BundleRemoveMutation, +} = require('./mutation'); + const { BundleQuery, BundleListQuery, BundleInstanceQuery, } = require('./query'); -const { - BundleCreateMutation, - BundleUpdateMutation, - BundleDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { BundleCreate: BundleCreateMutation, BundleUpdate: BundleUpdateMutation, - BundleDelete: BundleDeleteMutation, + BundleRemove: BundleRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Bundle', path: '/1_0_2/Bundle/:id', query: BundleInstanceQuery, diff --git a/src/resources/1_0_2/profiles/bundle/resolver.js b/src/resources/1_0_2/profiles/bundle/resolver.js index a7862fba..b2e60890 100644 --- a/src/resources/1_0_2/profiles/bundle/resolver.js +++ b/src/resources/1_0_2/profiles/bundle/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.bundleResolver + * @name exports.getBundle * @static - * @summary Bundle Resolver. + * @summary Bundle resolver. */ -module.exports.bundleResolver = function bundleResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getBundle = function getBundle(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleListResolver + * @name exports.getBundleList * @static - * @summary Bundle List Resolver. + * @summary Bundle list resolver. */ -module.exports.bundleListResolver = function bundleListResolver( +module.exports.getBundleList = function getBundleList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleInstanceResolver + * @name exports.getBundleInstance * @static - * @summary Bundle Instance Resolver. + * @summary Bundle instance resolver. */ -module.exports.bundleInstanceResolver = function bundleInstanceResolver( +module.exports.getBundleInstance = function getBundleInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleCreateResolver + * @name exports.createBundle * @static - * @summary Bundle Create Resolver. + * @summary Create Bundle resolver. */ -module.exports.bundleCreateResolver = function bundleCreateResolver( +module.exports.createBundle = function createBundle( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleUpdateResolver + * @name exports.updateBundle * @static - * @summary Bundle Update Resolver. + * @summary Update Bundle resolver. */ -module.exports.bundleUpdateResolver = function bundleUpdateResolver( +module.exports.updateBundle = function updateBundle( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleDeleteResolver + * @name exports.removeBundle * @static - * @summary Bundle Delete Resolver. + * @summary Remove Bundle resolver. */ -module.exports.bundleDeleteResolver = function bundleDeleteResolver( +module.exports.removeBundle = function removeBundle( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/careplan/mutation.js b/src/resources/1_0_2/profiles/careplan/mutation.js index 23bc7c3c..554c9949 100644 --- a/src/resources/1_0_2/profiles/careplan/mutation.js +++ b/src/resources/1_0_2/profiles/careplan/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CarePlanSchema = require('../../schemas/careplan.schema'); +const CarePlanSchema = require('../../schemas/careplan.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CarePlanInput = require('../../inputs/careplan.input'); +const CarePlanInput = require('../../inputs/careplan.input.js'); -// Resolvers -const { - careplanCreateResolver, - careplanUpdateResolver, - careplanDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCarePlan, + updateCarePlan, + removeCarePlan, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CarePlan', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a CarePlan record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a CarePlan record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.CarePlanCreateMutation - * @summary CarePlanCreate Mutation. + * @summary CarePlanCreate mutation. */ module.exports.CarePlanCreateMutation = { - args: WriteArgs, - description: 'Create a CarePlan', - resolve: scopeInvariant(scopeOptions, careplanCreateResolver), + description: 'Create a CarePlan record', + resolve: scopeInvariant(scopeOptions, createCarePlan), type: CarePlanSchema, + args: WriteArgs, }; /** * @name exports.CarePlanUpdateMutation - * @summary CarePlanUpdate Mutation. + * @summary CarePlanUpdate mutation. */ module.exports.CarePlanUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple CarePlans', - resolve: scopeInvariant(scopeOptions, careplanUpdateResolver), + description: 'Update a CarePlan record', + resolve: scopeInvariant(scopeOptions, updateCarePlan), type: CarePlanSchema, + args: WriteArgs, }; /** - * @name exports.CarePlanDeleteMutation - * @summary CarePlanDelete Mutation. + * @name exports.CarePlanRemoveMutation + * @summary CarePlanRemove mutation. */ -module.exports.CarePlanDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single CarePlan', - resolve: scopeInvariant(scopeOptions, careplanDeleteResolver), +module.exports.CarePlanRemoveMutation = { + description: 'Remove a CarePlan record', + resolve: scopeInvariant(scopeOptions, removeCarePlan), type: CarePlanSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/careplan/query.js b/src/resources/1_0_2/profiles/careplan/query.js index aef82e10..86a63a7a 100644 --- a/src/resources/1_0_2/profiles/careplan/query.js +++ b/src/resources/1_0_2/profiles/careplan/query.js @@ -1,55 +1,59 @@ // Schemas -const CarePlanSchema = require('../../schemas/careplan.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CarePlanSchema = require('../../schemas/careplan.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CarePlanArgs = require('../../parameters/careplan.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CarePlanArgs = require('../../parameters/careplan.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, CarePlanArgs); // Resolvers const { - careplanResolver, - careplanListResolver, - careplanInstanceResolver, + getCarePlan, + getCarePlanList, + getCarePlanInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CarePlan', action: 'read', - version: '1_0_2', }; /** * @name exports.CarePlanQuery - * @summary CarePlan Query. + * @summary CarePlan query. */ module.exports.CarePlanQuery = { - args: Object.assign({}, CommonArgs, CarePlanArgs), description: 'Query for a single CarePlan', - resolve: scopeInvariant(scopeOptions, careplanResolver), + resolve: scopeInvariant(scopeOptions, getCarePlan), type: CarePlanSchema, + args: args, }; /** * @name exports.CarePlanListQuery - * @summary CarePlanList Query. + * @summary CarePlan query. */ module.exports.CarePlanListQuery = { - args: Object.assign({}, CommonArgs, CarePlanArgs), - description: 'Query for multiple CarePlans', - resolve: scopeInvariant(scopeOptions, careplanListResolver), + description: 'Query for a more than or just one CarePlan', + resolve: scopeInvariant(scopeOptions, getCarePlanList), type: BundleSchema, + args: args, }; /** * @name exports.CarePlanInstanceQuery - * @summary CarePlanInstance Query. + * @summary CarePlan query. */ module.exports.CarePlanInstanceQuery = { - description: 'Get information about a single CarePlan', - resolve: scopeInvariant(scopeOptions, careplanInstanceResolver), + description: 'Access information about a single CarePlan', + resolve: scopeInvariant(scopeOptions, getCarePlanInstance), type: CarePlanSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/careplan/index.js b/src/resources/1_0_2/profiles/careplan/register.js similarity index 92% rename from src/resources/1_0_2/profiles/careplan/index.js rename to src/resources/1_0_2/profiles/careplan/register.js index fd297fba..d268b052 100644 --- a/src/resources/1_0_2/profiles/careplan/index.js +++ b/src/resources/1_0_2/profiles/careplan/register.js @@ -1,15 +1,15 @@ +const { + CarePlanCreateMutation, + CarePlanUpdateMutation, + CarePlanRemoveMutation, +} = require('./mutation'); + const { CarePlanQuery, CarePlanListQuery, CarePlanInstanceQuery, } = require('./query'); -const { - CarePlanCreateMutation, - CarePlanUpdateMutation, - CarePlanDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CarePlanCreate: CarePlanCreateMutation, CarePlanUpdate: CarePlanUpdateMutation, - CarePlanDelete: CarePlanDeleteMutation, + CarePlanRemove: CarePlanRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'CarePlan', path: '/1_0_2/CarePlan/:id', query: CarePlanInstanceQuery, diff --git a/src/resources/1_0_2/profiles/careplan/resolver.js b/src/resources/1_0_2/profiles/careplan/resolver.js index 48f09ef7..2fc8ecd0 100644 --- a/src/resources/1_0_2/profiles/careplan/resolver.js +++ b/src/resources/1_0_2/profiles/careplan/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.careplanResolver + * @name exports.getCarePlan * @static - * @summary CarePlan Resolver. + * @summary CarePlan resolver. */ -module.exports.careplanResolver = function careplanResolver( +module.exports.getCarePlan = function getCarePlan( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanListResolver + * @name exports.getCarePlanList * @static - * @summary CarePlan List Resolver. + * @summary CarePlan list resolver. */ -module.exports.careplanListResolver = function careplanListResolver( +module.exports.getCarePlanList = function getCarePlanList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanInstanceResolver + * @name exports.getCarePlanInstance * @static - * @summary CarePlan Instance Resolver. + * @summary CarePlan instance resolver. */ -module.exports.careplanInstanceResolver = function careplanInstanceResolver( +module.exports.getCarePlanInstance = function getCarePlanInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanCreateResolver + * @name exports.createCarePlan * @static - * @summary CarePlan Create Resolver. + * @summary Create CarePlan resolver. */ -module.exports.careplanCreateResolver = function careplanCreateResolver( +module.exports.createCarePlan = function createCarePlan( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanUpdateResolver + * @name exports.updateCarePlan * @static - * @summary CarePlan Update Resolver. + * @summary Update CarePlan resolver. */ -module.exports.careplanUpdateResolver = function careplanUpdateResolver( +module.exports.updateCarePlan = function updateCarePlan( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanDeleteResolver + * @name exports.removeCarePlan * @static - * @summary CarePlan Delete Resolver. + * @summary Remove CarePlan resolver. */ -module.exports.careplanDeleteResolver = function careplanDeleteResolver( +module.exports.removeCarePlan = function removeCarePlan( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/claim/mutation.js b/src/resources/1_0_2/profiles/claim/mutation.js index f417c844..e495ac5d 100644 --- a/src/resources/1_0_2/profiles/claim/mutation.js +++ b/src/resources/1_0_2/profiles/claim/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ClaimSchema = require('../../schemas/claim.schema'); +const ClaimSchema = require('../../schemas/claim.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ClaimInput = require('../../inputs/claim.input'); +const ClaimInput = require('../../inputs/claim.input.js'); -// Resolvers -const { - claimCreateResolver, - claimUpdateResolver, - claimDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createClaim, updateClaim, removeClaim } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Claim', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Claim record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Claim record for deletion.', }, }; /** * @name exports.ClaimCreateMutation - * @summary ClaimCreate Mutation. + * @summary ClaimCreate mutation. */ module.exports.ClaimCreateMutation = { - args: WriteArgs, - description: 'Create a Claim', - resolve: scopeInvariant(scopeOptions, claimCreateResolver), + description: 'Create a Claim record', + resolve: scopeInvariant(scopeOptions, createClaim), type: ClaimSchema, + args: WriteArgs, }; /** * @name exports.ClaimUpdateMutation - * @summary ClaimUpdate Mutation. + * @summary ClaimUpdate mutation. */ module.exports.ClaimUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Claims', - resolve: scopeInvariant(scopeOptions, claimUpdateResolver), + description: 'Update a Claim record', + resolve: scopeInvariant(scopeOptions, updateClaim), type: ClaimSchema, + args: WriteArgs, }; /** - * @name exports.ClaimDeleteMutation - * @summary ClaimDelete Mutation. + * @name exports.ClaimRemoveMutation + * @summary ClaimRemove mutation. */ -module.exports.ClaimDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Claim', - resolve: scopeInvariant(scopeOptions, claimDeleteResolver), +module.exports.ClaimRemoveMutation = { + description: 'Remove a Claim record', + resolve: scopeInvariant(scopeOptions, removeClaim), type: ClaimSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/claim/query.js b/src/resources/1_0_2/profiles/claim/query.js index 177ac568..e9bd8800 100644 --- a/src/resources/1_0_2/profiles/claim/query.js +++ b/src/resources/1_0_2/profiles/claim/query.js @@ -1,55 +1,55 @@ // Schemas -const ClaimSchema = require('../../schemas/claim.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClaimSchema = require('../../schemas/claim.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ClaimArgs = require('../../parameters/claim.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ClaimArgs = require('../../parameters/claim.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ClaimArgs); // Resolvers -const { - claimResolver, - claimListResolver, - claimInstanceResolver, -} = require('./resolver'); +const { getClaim, getClaimList, getClaimInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Claim', action: 'read', - version: '1_0_2', }; /** * @name exports.ClaimQuery - * @summary Claim Query. + * @summary Claim query. */ module.exports.ClaimQuery = { - args: Object.assign({}, CommonArgs, ClaimArgs), description: 'Query for a single Claim', - resolve: scopeInvariant(scopeOptions, claimResolver), + resolve: scopeInvariant(scopeOptions, getClaim), type: ClaimSchema, + args: args, }; /** * @name exports.ClaimListQuery - * @summary ClaimList Query. + * @summary Claim query. */ module.exports.ClaimListQuery = { - args: Object.assign({}, CommonArgs, ClaimArgs), - description: 'Query for multiple Claims', - resolve: scopeInvariant(scopeOptions, claimListResolver), + description: 'Query for a more than or just one Claim', + resolve: scopeInvariant(scopeOptions, getClaimList), type: BundleSchema, + args: args, }; /** * @name exports.ClaimInstanceQuery - * @summary ClaimInstance Query. + * @summary Claim query. */ module.exports.ClaimInstanceQuery = { - description: 'Get information about a single Claim', - resolve: scopeInvariant(scopeOptions, claimInstanceResolver), + description: 'Access information about a single Claim', + resolve: scopeInvariant(scopeOptions, getClaimInstance), type: ClaimSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/claim/index.js b/src/resources/1_0_2/profiles/claim/register.js similarity index 93% rename from src/resources/1_0_2/profiles/claim/index.js rename to src/resources/1_0_2/profiles/claim/register.js index 0583c74e..7afcdfea 100644 --- a/src/resources/1_0_2/profiles/claim/index.js +++ b/src/resources/1_0_2/profiles/claim/register.js @@ -1,11 +1,11 @@ -const { ClaimQuery, ClaimListQuery, ClaimInstanceQuery } = require('./query'); - const { ClaimCreateMutation, ClaimUpdateMutation, - ClaimDeleteMutation, + ClaimRemoveMutation, } = require('./mutation'); +const { ClaimQuery, ClaimListQuery, ClaimInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { ClaimCreate: ClaimCreateMutation, ClaimUpdate: ClaimUpdateMutation, - ClaimDelete: ClaimDeleteMutation, + ClaimRemove: ClaimRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Claim', path: '/1_0_2/Claim/:id', query: ClaimInstanceQuery, diff --git a/src/resources/1_0_2/profiles/claim/resolver.js b/src/resources/1_0_2/profiles/claim/resolver.js index c60d996e..77268987 100644 --- a/src/resources/1_0_2/profiles/claim/resolver.js +++ b/src/resources/1_0_2/profiles/claim/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.claimResolver + * @name exports.getClaim * @static - * @summary Claim Resolver. + * @summary Claim resolver. */ -module.exports.claimResolver = function claimResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getClaim = function getClaim(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimListResolver + * @name exports.getClaimList * @static - * @summary Claim List Resolver. + * @summary Claim list resolver. */ -module.exports.claimListResolver = function claimListResolver( +module.exports.getClaimList = function getClaimList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimInstanceResolver + * @name exports.getClaimInstance * @static - * @summary Claim Instance Resolver. + * @summary Claim instance resolver. */ -module.exports.claimInstanceResolver = function claimInstanceResolver( +module.exports.getClaimInstance = function getClaimInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimCreateResolver + * @name exports.createClaim * @static - * @summary Claim Create Resolver. + * @summary Create Claim resolver. */ -module.exports.claimCreateResolver = function claimCreateResolver( +module.exports.createClaim = function createClaim( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimUpdateResolver + * @name exports.updateClaim * @static - * @summary Claim Update Resolver. + * @summary Update Claim resolver. */ -module.exports.claimUpdateResolver = function claimUpdateResolver( +module.exports.updateClaim = function updateClaim( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimDeleteResolver + * @name exports.removeClaim * @static - * @summary Claim Delete Resolver. + * @summary Remove Claim resolver. */ -module.exports.claimDeleteResolver = function claimDeleteResolver( +module.exports.removeClaim = function removeClaim( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/claimresponse/mutation.js b/src/resources/1_0_2/profiles/claimresponse/mutation.js index f1d532a7..6edd9a7e 100644 --- a/src/resources/1_0_2/profiles/claimresponse/mutation.js +++ b/src/resources/1_0_2/profiles/claimresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ClaimResponseSchema = require('../../schemas/claimresponse.schema'); +const ClaimResponseSchema = require('../../schemas/claimresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ClaimResponseInput = require('../../inputs/claimresponse.input'); +const ClaimResponseInput = require('../../inputs/claimresponse.input.js'); -// Resolvers -const { - claimresponseCreateResolver, - claimresponseUpdateResolver, - claimresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createClaimResponse, + updateClaimResponse, + removeClaimResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ClaimResponse', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ClaimResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ClaimResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ClaimResponseCreateMutation - * @summary ClaimResponseCreate Mutation. + * @summary ClaimResponseCreate mutation. */ module.exports.ClaimResponseCreateMutation = { - args: WriteArgs, - description: 'Create a ClaimResponse', - resolve: scopeInvariant(scopeOptions, claimresponseCreateResolver), + description: 'Create a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, createClaimResponse), type: ClaimResponseSchema, + args: WriteArgs, }; /** * @name exports.ClaimResponseUpdateMutation - * @summary ClaimResponseUpdate Mutation. + * @summary ClaimResponseUpdate mutation. */ module.exports.ClaimResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ClaimResponses', - resolve: scopeInvariant(scopeOptions, claimresponseUpdateResolver), + description: 'Update a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, updateClaimResponse), type: ClaimResponseSchema, + args: WriteArgs, }; /** - * @name exports.ClaimResponseDeleteMutation - * @summary ClaimResponseDelete Mutation. + * @name exports.ClaimResponseRemoveMutation + * @summary ClaimResponseRemove mutation. */ -module.exports.ClaimResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ClaimResponse', - resolve: scopeInvariant(scopeOptions, claimresponseDeleteResolver), +module.exports.ClaimResponseRemoveMutation = { + description: 'Remove a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, removeClaimResponse), type: ClaimResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/claimresponse/query.js b/src/resources/1_0_2/profiles/claimresponse/query.js index dd613831..d6a45c42 100644 --- a/src/resources/1_0_2/profiles/claimresponse/query.js +++ b/src/resources/1_0_2/profiles/claimresponse/query.js @@ -1,55 +1,59 @@ // Schemas -const ClaimResponseSchema = require('../../schemas/claimresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClaimResponseSchema = require('../../schemas/claimresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ClaimResponseArgs = require('../../parameters/claimresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ClaimResponseArgs = require('../../parameters/claimresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ClaimResponseArgs); // Resolvers const { - claimresponseResolver, - claimresponseListResolver, - claimresponseInstanceResolver, + getClaimResponse, + getClaimResponseList, + getClaimResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ClaimResponse', action: 'read', - version: '1_0_2', }; /** * @name exports.ClaimResponseQuery - * @summary ClaimResponse Query. + * @summary ClaimResponse query. */ module.exports.ClaimResponseQuery = { - args: Object.assign({}, CommonArgs, ClaimResponseArgs), description: 'Query for a single ClaimResponse', - resolve: scopeInvariant(scopeOptions, claimresponseResolver), + resolve: scopeInvariant(scopeOptions, getClaimResponse), type: ClaimResponseSchema, + args: args, }; /** * @name exports.ClaimResponseListQuery - * @summary ClaimResponseList Query. + * @summary ClaimResponse query. */ module.exports.ClaimResponseListQuery = { - args: Object.assign({}, CommonArgs, ClaimResponseArgs), - description: 'Query for multiple ClaimResponses', - resolve: scopeInvariant(scopeOptions, claimresponseListResolver), + description: 'Query for a more than or just one ClaimResponse', + resolve: scopeInvariant(scopeOptions, getClaimResponseList), type: BundleSchema, + args: args, }; /** * @name exports.ClaimResponseInstanceQuery - * @summary ClaimResponseInstance Query. + * @summary ClaimResponse query. */ module.exports.ClaimResponseInstanceQuery = { - description: 'Get information about a single ClaimResponse', - resolve: scopeInvariant(scopeOptions, claimresponseInstanceResolver), + description: 'Access information about a single ClaimResponse', + resolve: scopeInvariant(scopeOptions, getClaimResponseInstance), type: ClaimResponseSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/claimresponse/index.js b/src/resources/1_0_2/profiles/claimresponse/register.js similarity index 92% rename from src/resources/1_0_2/profiles/claimresponse/index.js rename to src/resources/1_0_2/profiles/claimresponse/register.js index 68254e89..71d1c370 100644 --- a/src/resources/1_0_2/profiles/claimresponse/index.js +++ b/src/resources/1_0_2/profiles/claimresponse/register.js @@ -1,15 +1,15 @@ +const { + ClaimResponseCreateMutation, + ClaimResponseUpdateMutation, + ClaimResponseRemoveMutation, +} = require('./mutation'); + const { ClaimResponseQuery, ClaimResponseListQuery, ClaimResponseInstanceQuery, } = require('./query'); -const { - ClaimResponseCreateMutation, - ClaimResponseUpdateMutation, - ClaimResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ClaimResponseCreate: ClaimResponseCreateMutation, ClaimResponseUpdate: ClaimResponseUpdateMutation, - ClaimResponseDelete: ClaimResponseDeleteMutation, + ClaimResponseRemove: ClaimResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ClaimResponse', path: '/1_0_2/ClaimResponse/:id', query: ClaimResponseInstanceQuery, diff --git a/src/resources/1_0_2/profiles/claimresponse/resolver.js b/src/resources/1_0_2/profiles/claimresponse/resolver.js index 5dc823ae..36363bfd 100644 --- a/src/resources/1_0_2/profiles/claimresponse/resolver.js +++ b/src/resources/1_0_2/profiles/claimresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.claimresponseResolver + * @name exports.getClaimResponse * @static - * @summary ClaimResponse Resolver. + * @summary ClaimResponse resolver. */ -module.exports.claimresponseResolver = function claimresponseResolver( +module.exports.getClaimResponse = function getClaimResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseListResolver + * @name exports.getClaimResponseList * @static - * @summary ClaimResponse List Resolver. + * @summary ClaimResponse list resolver. */ -module.exports.claimresponseListResolver = function claimresponseListResolver( +module.exports.getClaimResponseList = function getClaimResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseInstanceResolver + * @name exports.getClaimResponseInstance * @static - * @summary ClaimResponse Instance Resolver. + * @summary ClaimResponse instance resolver. */ -module.exports.claimresponseInstanceResolver = function claimresponseInstanceResolver( +module.exports.getClaimResponseInstance = function getClaimResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseCreateResolver + * @name exports.createClaimResponse * @static - * @summary ClaimResponse Create Resolver. + * @summary Create ClaimResponse resolver. */ -module.exports.claimresponseCreateResolver = function claimresponseCreateResolver( +module.exports.createClaimResponse = function createClaimResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseUpdateResolver + * @name exports.updateClaimResponse * @static - * @summary ClaimResponse Update Resolver. + * @summary Update ClaimResponse resolver. */ -module.exports.claimresponseUpdateResolver = function claimresponseUpdateResolver( +module.exports.updateClaimResponse = function updateClaimResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseDeleteResolver + * @name exports.removeClaimResponse * @static - * @summary ClaimResponse Delete Resolver. + * @summary Remove ClaimResponse resolver. */ -module.exports.claimresponseDeleteResolver = function claimresponseDeleteResolver( +module.exports.removeClaimResponse = function removeClaimResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/clinicalimpression/mutation.js b/src/resources/1_0_2/profiles/clinicalimpression/mutation.js index 7fb61900..fab28e20 100644 --- a/src/resources/1_0_2/profiles/clinicalimpression/mutation.js +++ b/src/resources/1_0_2/profiles/clinicalimpression/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema'); +const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ClinicalImpressionInput = require('../../inputs/clinicalimpression.input'); +const ClinicalImpressionInput = require('../../inputs/clinicalimpression.input.js'); -// Resolvers -const { - clinicalimpressionCreateResolver, - clinicalimpressionUpdateResolver, - clinicalimpressionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createClinicalImpression, + updateClinicalImpression, + removeClinicalImpression, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ClinicalImpression', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ClinicalImpression record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ClinicalImpression record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ClinicalImpressionCreateMutation - * @summary ClinicalImpressionCreate Mutation. + * @summary ClinicalImpressionCreate mutation. */ module.exports.ClinicalImpressionCreateMutation = { - args: WriteArgs, - description: 'Create a ClinicalImpression', - resolve: scopeInvariant(scopeOptions, clinicalimpressionCreateResolver), + description: 'Create a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, createClinicalImpression), type: ClinicalImpressionSchema, + args: WriteArgs, }; /** * @name exports.ClinicalImpressionUpdateMutation - * @summary ClinicalImpressionUpdate Mutation. + * @summary ClinicalImpressionUpdate mutation. */ module.exports.ClinicalImpressionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ClinicalImpressions', - resolve: scopeInvariant(scopeOptions, clinicalimpressionUpdateResolver), + description: 'Update a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, updateClinicalImpression), type: ClinicalImpressionSchema, + args: WriteArgs, }; /** - * @name exports.ClinicalImpressionDeleteMutation - * @summary ClinicalImpressionDelete Mutation. + * @name exports.ClinicalImpressionRemoveMutation + * @summary ClinicalImpressionRemove mutation. */ -module.exports.ClinicalImpressionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ClinicalImpression', - resolve: scopeInvariant(scopeOptions, clinicalimpressionDeleteResolver), +module.exports.ClinicalImpressionRemoveMutation = { + description: 'Remove a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, removeClinicalImpression), type: ClinicalImpressionSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/clinicalimpression/query.js b/src/resources/1_0_2/profiles/clinicalimpression/query.js index 02686112..9a12bb2f 100644 --- a/src/resources/1_0_2/profiles/clinicalimpression/query.js +++ b/src/resources/1_0_2/profiles/clinicalimpression/query.js @@ -1,55 +1,59 @@ // Schemas -const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ClinicalImpressionArgs = require('../../parameters/clinicalimpression.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ClinicalImpressionArgs = require('../../parameters/clinicalimpression.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ClinicalImpressionArgs); // Resolvers const { - clinicalimpressionResolver, - clinicalimpressionListResolver, - clinicalimpressionInstanceResolver, + getClinicalImpression, + getClinicalImpressionList, + getClinicalImpressionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ClinicalImpression', action: 'read', - version: '1_0_2', }; /** * @name exports.ClinicalImpressionQuery - * @summary ClinicalImpression Query. + * @summary ClinicalImpression query. */ module.exports.ClinicalImpressionQuery = { - args: Object.assign({}, CommonArgs, ClinicalImpressionArgs), description: 'Query for a single ClinicalImpression', - resolve: scopeInvariant(scopeOptions, clinicalimpressionResolver), + resolve: scopeInvariant(scopeOptions, getClinicalImpression), type: ClinicalImpressionSchema, + args: args, }; /** * @name exports.ClinicalImpressionListQuery - * @summary ClinicalImpressionList Query. + * @summary ClinicalImpression query. */ module.exports.ClinicalImpressionListQuery = { - args: Object.assign({}, CommonArgs, ClinicalImpressionArgs), - description: 'Query for multiple ClinicalImpressions', - resolve: scopeInvariant(scopeOptions, clinicalimpressionListResolver), + description: 'Query for a more than or just one ClinicalImpression', + resolve: scopeInvariant(scopeOptions, getClinicalImpressionList), type: BundleSchema, + args: args, }; /** * @name exports.ClinicalImpressionInstanceQuery - * @summary ClinicalImpressionInstance Query. + * @summary ClinicalImpression query. */ module.exports.ClinicalImpressionInstanceQuery = { - description: 'Get information about a single ClinicalImpression', - resolve: scopeInvariant(scopeOptions, clinicalimpressionInstanceResolver), + description: 'Access information about a single ClinicalImpression', + resolve: scopeInvariant(scopeOptions, getClinicalImpressionInstance), type: ClinicalImpressionSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/clinicalimpression/index.js b/src/resources/1_0_2/profiles/clinicalimpression/register.js similarity index 91% rename from src/resources/1_0_2/profiles/clinicalimpression/index.js rename to src/resources/1_0_2/profiles/clinicalimpression/register.js index bcb94eb4..992a1eed 100644 --- a/src/resources/1_0_2/profiles/clinicalimpression/index.js +++ b/src/resources/1_0_2/profiles/clinicalimpression/register.js @@ -1,15 +1,15 @@ +const { + ClinicalImpressionCreateMutation, + ClinicalImpressionUpdateMutation, + ClinicalImpressionRemoveMutation, +} = require('./mutation'); + const { ClinicalImpressionQuery, ClinicalImpressionListQuery, ClinicalImpressionInstanceQuery, } = require('./query'); -const { - ClinicalImpressionCreateMutation, - ClinicalImpressionUpdateMutation, - ClinicalImpressionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ClinicalImpressionCreate: ClinicalImpressionCreateMutation, ClinicalImpressionUpdate: ClinicalImpressionUpdateMutation, - ClinicalImpressionDelete: ClinicalImpressionDeleteMutation, + ClinicalImpressionRemove: ClinicalImpressionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ClinicalImpression', path: '/1_0_2/ClinicalImpression/:id', query: ClinicalImpressionInstanceQuery, diff --git a/src/resources/1_0_2/profiles/clinicalimpression/resolver.js b/src/resources/1_0_2/profiles/clinicalimpression/resolver.js index 6c2ef307..b1d7766a 100644 --- a/src/resources/1_0_2/profiles/clinicalimpression/resolver.js +++ b/src/resources/1_0_2/profiles/clinicalimpression/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.clinicalimpressionResolver + * @name exports.getClinicalImpression * @static - * @summary ClinicalImpression Resolver. + * @summary ClinicalImpression resolver. */ -module.exports.clinicalimpressionResolver = function clinicalimpressionResolver( +module.exports.getClinicalImpression = function getClinicalImpression( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionListResolver + * @name exports.getClinicalImpressionList * @static - * @summary ClinicalImpression List Resolver. + * @summary ClinicalImpression list resolver. */ -module.exports.clinicalimpressionListResolver = function clinicalimpressionListResolver( +module.exports.getClinicalImpressionList = function getClinicalImpressionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionInstanceResolver + * @name exports.getClinicalImpressionInstance * @static - * @summary ClinicalImpression Instance Resolver. + * @summary ClinicalImpression instance resolver. */ -module.exports.clinicalimpressionInstanceResolver = function clinicalimpressionInstanceResolver( +module.exports.getClinicalImpressionInstance = function getClinicalImpressionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionCreateResolver + * @name exports.createClinicalImpression * @static - * @summary ClinicalImpression Create Resolver. + * @summary Create ClinicalImpression resolver. */ -module.exports.clinicalimpressionCreateResolver = function clinicalimpressionCreateResolver( +module.exports.createClinicalImpression = function createClinicalImpression( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionUpdateResolver + * @name exports.updateClinicalImpression * @static - * @summary ClinicalImpression Update Resolver. + * @summary Update ClinicalImpression resolver. */ -module.exports.clinicalimpressionUpdateResolver = function clinicalimpressionUpdateResolver( +module.exports.updateClinicalImpression = function updateClinicalImpression( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionDeleteResolver + * @name exports.removeClinicalImpression * @static - * @summary ClinicalImpression Delete Resolver. + * @summary Remove ClinicalImpression resolver. */ -module.exports.clinicalimpressionDeleteResolver = function clinicalimpressionDeleteResolver( +module.exports.removeClinicalImpression = function removeClinicalImpression( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/communication/mutation.js b/src/resources/1_0_2/profiles/communication/mutation.js index b1657762..79e1b5b2 100644 --- a/src/resources/1_0_2/profiles/communication/mutation.js +++ b/src/resources/1_0_2/profiles/communication/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CommunicationSchema = require('../../schemas/communication.schema'); +const CommunicationSchema = require('../../schemas/communication.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CommunicationInput = require('../../inputs/communication.input'); +const CommunicationInput = require('../../inputs/communication.input.js'); -// Resolvers -const { - communicationCreateResolver, - communicationUpdateResolver, - communicationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCommunication, + updateCommunication, + removeCommunication, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Communication', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Communication record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Communication record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.CommunicationCreateMutation - * @summary CommunicationCreate Mutation. + * @summary CommunicationCreate mutation. */ module.exports.CommunicationCreateMutation = { - args: WriteArgs, - description: 'Create a Communication', - resolve: scopeInvariant(scopeOptions, communicationCreateResolver), + description: 'Create a Communication record', + resolve: scopeInvariant(scopeOptions, createCommunication), type: CommunicationSchema, + args: WriteArgs, }; /** * @name exports.CommunicationUpdateMutation - * @summary CommunicationUpdate Mutation. + * @summary CommunicationUpdate mutation. */ module.exports.CommunicationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Communications', - resolve: scopeInvariant(scopeOptions, communicationUpdateResolver), + description: 'Update a Communication record', + resolve: scopeInvariant(scopeOptions, updateCommunication), type: CommunicationSchema, + args: WriteArgs, }; /** - * @name exports.CommunicationDeleteMutation - * @summary CommunicationDelete Mutation. + * @name exports.CommunicationRemoveMutation + * @summary CommunicationRemove mutation. */ -module.exports.CommunicationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Communication', - resolve: scopeInvariant(scopeOptions, communicationDeleteResolver), +module.exports.CommunicationRemoveMutation = { + description: 'Remove a Communication record', + resolve: scopeInvariant(scopeOptions, removeCommunication), type: CommunicationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/communication/query.js b/src/resources/1_0_2/profiles/communication/query.js index cb2776dc..cae36ad0 100644 --- a/src/resources/1_0_2/profiles/communication/query.js +++ b/src/resources/1_0_2/profiles/communication/query.js @@ -1,55 +1,59 @@ // Schemas -const CommunicationSchema = require('../../schemas/communication.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CommunicationSchema = require('../../schemas/communication.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CommunicationArgs = require('../../parameters/communication.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CommunicationArgs = require('../../parameters/communication.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, CommunicationArgs); // Resolvers const { - communicationResolver, - communicationListResolver, - communicationInstanceResolver, + getCommunication, + getCommunicationList, + getCommunicationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Communication', action: 'read', - version: '1_0_2', }; /** * @name exports.CommunicationQuery - * @summary Communication Query. + * @summary Communication query. */ module.exports.CommunicationQuery = { - args: Object.assign({}, CommonArgs, CommunicationArgs), description: 'Query for a single Communication', - resolve: scopeInvariant(scopeOptions, communicationResolver), + resolve: scopeInvariant(scopeOptions, getCommunication), type: CommunicationSchema, + args: args, }; /** * @name exports.CommunicationListQuery - * @summary CommunicationList Query. + * @summary Communication query. */ module.exports.CommunicationListQuery = { - args: Object.assign({}, CommonArgs, CommunicationArgs), - description: 'Query for multiple Communications', - resolve: scopeInvariant(scopeOptions, communicationListResolver), + description: 'Query for a more than or just one Communication', + resolve: scopeInvariant(scopeOptions, getCommunicationList), type: BundleSchema, + args: args, }; /** * @name exports.CommunicationInstanceQuery - * @summary CommunicationInstance Query. + * @summary Communication query. */ module.exports.CommunicationInstanceQuery = { - description: 'Get information about a single Communication', - resolve: scopeInvariant(scopeOptions, communicationInstanceResolver), + description: 'Access information about a single Communication', + resolve: scopeInvariant(scopeOptions, getCommunicationInstance), type: CommunicationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/communication/index.js b/src/resources/1_0_2/profiles/communication/register.js similarity index 92% rename from src/resources/1_0_2/profiles/communication/index.js rename to src/resources/1_0_2/profiles/communication/register.js index a89e7ec2..5eef2b7e 100644 --- a/src/resources/1_0_2/profiles/communication/index.js +++ b/src/resources/1_0_2/profiles/communication/register.js @@ -1,15 +1,15 @@ +const { + CommunicationCreateMutation, + CommunicationUpdateMutation, + CommunicationRemoveMutation, +} = require('./mutation'); + const { CommunicationQuery, CommunicationListQuery, CommunicationInstanceQuery, } = require('./query'); -const { - CommunicationCreateMutation, - CommunicationUpdateMutation, - CommunicationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CommunicationCreate: CommunicationCreateMutation, CommunicationUpdate: CommunicationUpdateMutation, - CommunicationDelete: CommunicationDeleteMutation, + CommunicationRemove: CommunicationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Communication', path: '/1_0_2/Communication/:id', query: CommunicationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/communication/resolver.js b/src/resources/1_0_2/profiles/communication/resolver.js index ac9822e3..6d7bc94b 100644 --- a/src/resources/1_0_2/profiles/communication/resolver.js +++ b/src/resources/1_0_2/profiles/communication/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.communicationResolver + * @name exports.getCommunication * @static - * @summary Communication Resolver. + * @summary Communication resolver. */ -module.exports.communicationResolver = function communicationResolver( +module.exports.getCommunication = function getCommunication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationListResolver + * @name exports.getCommunicationList * @static - * @summary Communication List Resolver. + * @summary Communication list resolver. */ -module.exports.communicationListResolver = function communicationListResolver( +module.exports.getCommunicationList = function getCommunicationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationInstanceResolver + * @name exports.getCommunicationInstance * @static - * @summary Communication Instance Resolver. + * @summary Communication instance resolver. */ -module.exports.communicationInstanceResolver = function communicationInstanceResolver( +module.exports.getCommunicationInstance = function getCommunicationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationCreateResolver + * @name exports.createCommunication * @static - * @summary Communication Create Resolver. + * @summary Create Communication resolver. */ -module.exports.communicationCreateResolver = function communicationCreateResolver( +module.exports.createCommunication = function createCommunication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationUpdateResolver + * @name exports.updateCommunication * @static - * @summary Communication Update Resolver. + * @summary Update Communication resolver. */ -module.exports.communicationUpdateResolver = function communicationUpdateResolver( +module.exports.updateCommunication = function updateCommunication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationDeleteResolver + * @name exports.removeCommunication * @static - * @summary Communication Delete Resolver. + * @summary Remove Communication resolver. */ -module.exports.communicationDeleteResolver = function communicationDeleteResolver( +module.exports.removeCommunication = function removeCommunication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/communicationrequest/mutation.js b/src/resources/1_0_2/profiles/communicationrequest/mutation.js index 16410341..bcc2cb3c 100644 --- a/src/resources/1_0_2/profiles/communicationrequest/mutation.js +++ b/src/resources/1_0_2/profiles/communicationrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema'); +const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CommunicationRequestInput = require('../../inputs/communicationrequest.input'); +const CommunicationRequestInput = require('../../inputs/communicationrequest.input.js'); -// Resolvers -const { - communicationrequestCreateResolver, - communicationrequestUpdateResolver, - communicationrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCommunicationRequest, + updateCommunicationRequest, + removeCommunicationRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CommunicationRequest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a CommunicationRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a CommunicationRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.CommunicationRequestCreateMutation - * @summary CommunicationRequestCreate Mutation. + * @summary CommunicationRequestCreate mutation. */ module.exports.CommunicationRequestCreateMutation = { - args: WriteArgs, - description: 'Create a CommunicationRequest', - resolve: scopeInvariant(scopeOptions, communicationrequestCreateResolver), + description: 'Create a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, createCommunicationRequest), type: CommunicationRequestSchema, + args: WriteArgs, }; /** * @name exports.CommunicationRequestUpdateMutation - * @summary CommunicationRequestUpdate Mutation. + * @summary CommunicationRequestUpdate mutation. */ module.exports.CommunicationRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple CommunicationRequests', - resolve: scopeInvariant(scopeOptions, communicationrequestUpdateResolver), + description: 'Update a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, updateCommunicationRequest), type: CommunicationRequestSchema, + args: WriteArgs, }; /** - * @name exports.CommunicationRequestDeleteMutation - * @summary CommunicationRequestDelete Mutation. + * @name exports.CommunicationRequestRemoveMutation + * @summary CommunicationRequestRemove mutation. */ -module.exports.CommunicationRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single CommunicationRequest', - resolve: scopeInvariant(scopeOptions, communicationrequestDeleteResolver), +module.exports.CommunicationRequestRemoveMutation = { + description: 'Remove a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, removeCommunicationRequest), type: CommunicationRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/communicationrequest/query.js b/src/resources/1_0_2/profiles/communicationrequest/query.js index db2d6a24..28b67eb1 100644 --- a/src/resources/1_0_2/profiles/communicationrequest/query.js +++ b/src/resources/1_0_2/profiles/communicationrequest/query.js @@ -1,55 +1,59 @@ // Schemas -const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CommunicationRequestArgs = require('../../parameters/communicationrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CommunicationRequestArgs = require('../../parameters/communicationrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, CommunicationRequestArgs); // Resolvers const { - communicationrequestResolver, - communicationrequestListResolver, - communicationrequestInstanceResolver, + getCommunicationRequest, + getCommunicationRequestList, + getCommunicationRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CommunicationRequest', action: 'read', - version: '1_0_2', }; /** * @name exports.CommunicationRequestQuery - * @summary CommunicationRequest Query. + * @summary CommunicationRequest query. */ module.exports.CommunicationRequestQuery = { - args: Object.assign({}, CommonArgs, CommunicationRequestArgs), description: 'Query for a single CommunicationRequest', - resolve: scopeInvariant(scopeOptions, communicationrequestResolver), + resolve: scopeInvariant(scopeOptions, getCommunicationRequest), type: CommunicationRequestSchema, + args: args, }; /** * @name exports.CommunicationRequestListQuery - * @summary CommunicationRequestList Query. + * @summary CommunicationRequest query. */ module.exports.CommunicationRequestListQuery = { - args: Object.assign({}, CommonArgs, CommunicationRequestArgs), - description: 'Query for multiple CommunicationRequests', - resolve: scopeInvariant(scopeOptions, communicationrequestListResolver), + description: 'Query for a more than or just one CommunicationRequest', + resolve: scopeInvariant(scopeOptions, getCommunicationRequestList), type: BundleSchema, + args: args, }; /** * @name exports.CommunicationRequestInstanceQuery - * @summary CommunicationRequestInstance Query. + * @summary CommunicationRequest query. */ module.exports.CommunicationRequestInstanceQuery = { - description: 'Get information about a single CommunicationRequest', - resolve: scopeInvariant(scopeOptions, communicationrequestInstanceResolver), + description: 'Access information about a single CommunicationRequest', + resolve: scopeInvariant(scopeOptions, getCommunicationRequestInstance), type: CommunicationRequestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/communicationrequest/index.js b/src/resources/1_0_2/profiles/communicationrequest/register.js similarity index 91% rename from src/resources/1_0_2/profiles/communicationrequest/index.js rename to src/resources/1_0_2/profiles/communicationrequest/register.js index f2c4af4c..a7af2718 100644 --- a/src/resources/1_0_2/profiles/communicationrequest/index.js +++ b/src/resources/1_0_2/profiles/communicationrequest/register.js @@ -1,15 +1,15 @@ +const { + CommunicationRequestCreateMutation, + CommunicationRequestUpdateMutation, + CommunicationRequestRemoveMutation, +} = require('./mutation'); + const { CommunicationRequestQuery, CommunicationRequestListQuery, CommunicationRequestInstanceQuery, } = require('./query'); -const { - CommunicationRequestCreateMutation, - CommunicationRequestUpdateMutation, - CommunicationRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CommunicationRequestCreate: CommunicationRequestCreateMutation, CommunicationRequestUpdate: CommunicationRequestUpdateMutation, - CommunicationRequestDelete: CommunicationRequestDeleteMutation, + CommunicationRequestRemove: CommunicationRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'CommunicationRequest', path: '/1_0_2/CommunicationRequest/:id', query: CommunicationRequestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/communicationrequest/resolver.js b/src/resources/1_0_2/profiles/communicationrequest/resolver.js index c3acdb45..1d68cd3c 100644 --- a/src/resources/1_0_2/profiles/communicationrequest/resolver.js +++ b/src/resources/1_0_2/profiles/communicationrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.communicationrequestResolver + * @name exports.getCommunicationRequest * @static - * @summary CommunicationRequest Resolver. + * @summary CommunicationRequest resolver. */ -module.exports.communicationrequestResolver = function communicationrequestResolver( +module.exports.getCommunicationRequest = function getCommunicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestListResolver + * @name exports.getCommunicationRequestList * @static - * @summary CommunicationRequest List Resolver. + * @summary CommunicationRequest list resolver. */ -module.exports.communicationrequestListResolver = function communicationrequestListResolver( +module.exports.getCommunicationRequestList = function getCommunicationRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestInstanceResolver + * @name exports.getCommunicationRequestInstance * @static - * @summary CommunicationRequest Instance Resolver. + * @summary CommunicationRequest instance resolver. */ -module.exports.communicationrequestInstanceResolver = function communicationrequestInstanceResolver( +module.exports.getCommunicationRequestInstance = function getCommunicationRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestCreateResolver + * @name exports.createCommunicationRequest * @static - * @summary CommunicationRequest Create Resolver. + * @summary Create CommunicationRequest resolver. */ -module.exports.communicationrequestCreateResolver = function communicationrequestCreateResolver( +module.exports.createCommunicationRequest = function createCommunicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestUpdateResolver + * @name exports.updateCommunicationRequest * @static - * @summary CommunicationRequest Update Resolver. + * @summary Update CommunicationRequest resolver. */ -module.exports.communicationrequestUpdateResolver = function communicationrequestUpdateResolver( +module.exports.updateCommunicationRequest = function updateCommunicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestDeleteResolver + * @name exports.removeCommunicationRequest * @static - * @summary CommunicationRequest Delete Resolver. + * @summary Remove CommunicationRequest resolver. */ -module.exports.communicationrequestDeleteResolver = function communicationrequestDeleteResolver( +module.exports.removeCommunicationRequest = function removeCommunicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/composition/mutation.js b/src/resources/1_0_2/profiles/composition/mutation.js index 9632e032..b43974c2 100644 --- a/src/resources/1_0_2/profiles/composition/mutation.js +++ b/src/resources/1_0_2/profiles/composition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CompositionSchema = require('../../schemas/composition.schema'); +const CompositionSchema = require('../../schemas/composition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CompositionInput = require('../../inputs/composition.input'); +const CompositionInput = require('../../inputs/composition.input.js'); -// Resolvers -const { - compositionCreateResolver, - compositionUpdateResolver, - compositionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createComposition, + updateComposition, + removeComposition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Composition', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Composition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Composition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.CompositionCreateMutation - * @summary CompositionCreate Mutation. + * @summary CompositionCreate mutation. */ module.exports.CompositionCreateMutation = { - args: WriteArgs, - description: 'Create a Composition', - resolve: scopeInvariant(scopeOptions, compositionCreateResolver), + description: 'Create a Composition record', + resolve: scopeInvariant(scopeOptions, createComposition), type: CompositionSchema, + args: WriteArgs, }; /** * @name exports.CompositionUpdateMutation - * @summary CompositionUpdate Mutation. + * @summary CompositionUpdate mutation. */ module.exports.CompositionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Compositions', - resolve: scopeInvariant(scopeOptions, compositionUpdateResolver), + description: 'Update a Composition record', + resolve: scopeInvariant(scopeOptions, updateComposition), type: CompositionSchema, + args: WriteArgs, }; /** - * @name exports.CompositionDeleteMutation - * @summary CompositionDelete Mutation. + * @name exports.CompositionRemoveMutation + * @summary CompositionRemove mutation. */ -module.exports.CompositionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Composition', - resolve: scopeInvariant(scopeOptions, compositionDeleteResolver), +module.exports.CompositionRemoveMutation = { + description: 'Remove a Composition record', + resolve: scopeInvariant(scopeOptions, removeComposition), type: CompositionSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/composition/query.js b/src/resources/1_0_2/profiles/composition/query.js index 9d7d81b5..99f3ddb4 100644 --- a/src/resources/1_0_2/profiles/composition/query.js +++ b/src/resources/1_0_2/profiles/composition/query.js @@ -1,55 +1,59 @@ // Schemas -const CompositionSchema = require('../../schemas/composition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CompositionSchema = require('../../schemas/composition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CompositionArgs = require('../../parameters/composition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CompositionArgs = require('../../parameters/composition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, CompositionArgs); // Resolvers const { - compositionResolver, - compositionListResolver, - compositionInstanceResolver, + getComposition, + getCompositionList, + getCompositionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Composition', action: 'read', - version: '1_0_2', }; /** * @name exports.CompositionQuery - * @summary Composition Query. + * @summary Composition query. */ module.exports.CompositionQuery = { - args: Object.assign({}, CommonArgs, CompositionArgs), description: 'Query for a single Composition', - resolve: scopeInvariant(scopeOptions, compositionResolver), + resolve: scopeInvariant(scopeOptions, getComposition), type: CompositionSchema, + args: args, }; /** * @name exports.CompositionListQuery - * @summary CompositionList Query. + * @summary Composition query. */ module.exports.CompositionListQuery = { - args: Object.assign({}, CommonArgs, CompositionArgs), - description: 'Query for multiple Compositions', - resolve: scopeInvariant(scopeOptions, compositionListResolver), + description: 'Query for a more than or just one Composition', + resolve: scopeInvariant(scopeOptions, getCompositionList), type: BundleSchema, + args: args, }; /** * @name exports.CompositionInstanceQuery - * @summary CompositionInstance Query. + * @summary Composition query. */ module.exports.CompositionInstanceQuery = { - description: 'Get information about a single Composition', - resolve: scopeInvariant(scopeOptions, compositionInstanceResolver), + description: 'Access information about a single Composition', + resolve: scopeInvariant(scopeOptions, getCompositionInstance), type: CompositionSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/composition/index.js b/src/resources/1_0_2/profiles/composition/register.js similarity index 92% rename from src/resources/1_0_2/profiles/composition/index.js rename to src/resources/1_0_2/profiles/composition/register.js index 7d800099..cb8406e6 100644 --- a/src/resources/1_0_2/profiles/composition/index.js +++ b/src/resources/1_0_2/profiles/composition/register.js @@ -1,15 +1,15 @@ +const { + CompositionCreateMutation, + CompositionUpdateMutation, + CompositionRemoveMutation, +} = require('./mutation'); + const { CompositionQuery, CompositionListQuery, CompositionInstanceQuery, } = require('./query'); -const { - CompositionCreateMutation, - CompositionUpdateMutation, - CompositionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CompositionCreate: CompositionCreateMutation, CompositionUpdate: CompositionUpdateMutation, - CompositionDelete: CompositionDeleteMutation, + CompositionRemove: CompositionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Composition', path: '/1_0_2/Composition/:id', query: CompositionInstanceQuery, diff --git a/src/resources/1_0_2/profiles/composition/resolver.js b/src/resources/1_0_2/profiles/composition/resolver.js index b0e1dcce..7b810f94 100644 --- a/src/resources/1_0_2/profiles/composition/resolver.js +++ b/src/resources/1_0_2/profiles/composition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.compositionResolver + * @name exports.getComposition * @static - * @summary Composition Resolver. + * @summary Composition resolver. */ -module.exports.compositionResolver = function compositionResolver( +module.exports.getComposition = function getComposition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionListResolver + * @name exports.getCompositionList * @static - * @summary Composition List Resolver. + * @summary Composition list resolver. */ -module.exports.compositionListResolver = function compositionListResolver( +module.exports.getCompositionList = function getCompositionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionInstanceResolver + * @name exports.getCompositionInstance * @static - * @summary Composition Instance Resolver. + * @summary Composition instance resolver. */ -module.exports.compositionInstanceResolver = function compositionInstanceResolver( +module.exports.getCompositionInstance = function getCompositionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionCreateResolver + * @name exports.createComposition * @static - * @summary Composition Create Resolver. + * @summary Create Composition resolver. */ -module.exports.compositionCreateResolver = function compositionCreateResolver( +module.exports.createComposition = function createComposition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionUpdateResolver + * @name exports.updateComposition * @static - * @summary Composition Update Resolver. + * @summary Update Composition resolver. */ -module.exports.compositionUpdateResolver = function compositionUpdateResolver( +module.exports.updateComposition = function updateComposition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionDeleteResolver + * @name exports.removeComposition * @static - * @summary Composition Delete Resolver. + * @summary Remove Composition resolver. */ -module.exports.compositionDeleteResolver = function compositionDeleteResolver( +module.exports.removeComposition = function removeComposition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/conceptmap/mutation.js b/src/resources/1_0_2/profiles/conceptmap/mutation.js index 8630776e..b2babe5e 100644 --- a/src/resources/1_0_2/profiles/conceptmap/mutation.js +++ b/src/resources/1_0_2/profiles/conceptmap/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ConceptMapSchema = require('../../schemas/conceptmap.schema'); +const ConceptMapSchema = require('../../schemas/conceptmap.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ConceptMapInput = require('../../inputs/conceptmap.input'); +const ConceptMapInput = require('../../inputs/conceptmap.input.js'); -// Resolvers -const { - conceptmapCreateResolver, - conceptmapUpdateResolver, - conceptmapDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createConceptMap, + updateConceptMap, + removeConceptMap, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ConceptMap', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ConceptMap record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ConceptMap record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ConceptMapCreateMutation - * @summary ConceptMapCreate Mutation. + * @summary ConceptMapCreate mutation. */ module.exports.ConceptMapCreateMutation = { - args: WriteArgs, - description: 'Create a ConceptMap', - resolve: scopeInvariant(scopeOptions, conceptmapCreateResolver), + description: 'Create a ConceptMap record', + resolve: scopeInvariant(scopeOptions, createConceptMap), type: ConceptMapSchema, + args: WriteArgs, }; /** * @name exports.ConceptMapUpdateMutation - * @summary ConceptMapUpdate Mutation. + * @summary ConceptMapUpdate mutation. */ module.exports.ConceptMapUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ConceptMaps', - resolve: scopeInvariant(scopeOptions, conceptmapUpdateResolver), + description: 'Update a ConceptMap record', + resolve: scopeInvariant(scopeOptions, updateConceptMap), type: ConceptMapSchema, + args: WriteArgs, }; /** - * @name exports.ConceptMapDeleteMutation - * @summary ConceptMapDelete Mutation. + * @name exports.ConceptMapRemoveMutation + * @summary ConceptMapRemove mutation. */ -module.exports.ConceptMapDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ConceptMap', - resolve: scopeInvariant(scopeOptions, conceptmapDeleteResolver), +module.exports.ConceptMapRemoveMutation = { + description: 'Remove a ConceptMap record', + resolve: scopeInvariant(scopeOptions, removeConceptMap), type: ConceptMapSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/conceptmap/query.js b/src/resources/1_0_2/profiles/conceptmap/query.js index 507ac871..75f7b373 100644 --- a/src/resources/1_0_2/profiles/conceptmap/query.js +++ b/src/resources/1_0_2/profiles/conceptmap/query.js @@ -1,55 +1,59 @@ // Schemas -const ConceptMapSchema = require('../../schemas/conceptmap.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConceptMapSchema = require('../../schemas/conceptmap.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ConceptMapArgs = require('../../parameters/conceptmap.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ConceptMapArgs = require('../../parameters/conceptmap.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ConceptMapArgs); // Resolvers const { - conceptmapResolver, - conceptmapListResolver, - conceptmapInstanceResolver, + getConceptMap, + getConceptMapList, + getConceptMapInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ConceptMap', action: 'read', - version: '1_0_2', }; /** * @name exports.ConceptMapQuery - * @summary ConceptMap Query. + * @summary ConceptMap query. */ module.exports.ConceptMapQuery = { - args: Object.assign({}, CommonArgs, ConceptMapArgs), description: 'Query for a single ConceptMap', - resolve: scopeInvariant(scopeOptions, conceptmapResolver), + resolve: scopeInvariant(scopeOptions, getConceptMap), type: ConceptMapSchema, + args: args, }; /** * @name exports.ConceptMapListQuery - * @summary ConceptMapList Query. + * @summary ConceptMap query. */ module.exports.ConceptMapListQuery = { - args: Object.assign({}, CommonArgs, ConceptMapArgs), - description: 'Query for multiple ConceptMaps', - resolve: scopeInvariant(scopeOptions, conceptmapListResolver), + description: 'Query for a more than or just one ConceptMap', + resolve: scopeInvariant(scopeOptions, getConceptMapList), type: BundleSchema, + args: args, }; /** * @name exports.ConceptMapInstanceQuery - * @summary ConceptMapInstance Query. + * @summary ConceptMap query. */ module.exports.ConceptMapInstanceQuery = { - description: 'Get information about a single ConceptMap', - resolve: scopeInvariant(scopeOptions, conceptmapInstanceResolver), + description: 'Access information about a single ConceptMap', + resolve: scopeInvariant(scopeOptions, getConceptMapInstance), type: ConceptMapSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/conceptmap/index.js b/src/resources/1_0_2/profiles/conceptmap/register.js similarity index 92% rename from src/resources/1_0_2/profiles/conceptmap/index.js rename to src/resources/1_0_2/profiles/conceptmap/register.js index dbedfda8..63a69506 100644 --- a/src/resources/1_0_2/profiles/conceptmap/index.js +++ b/src/resources/1_0_2/profiles/conceptmap/register.js @@ -1,15 +1,15 @@ +const { + ConceptMapCreateMutation, + ConceptMapUpdateMutation, + ConceptMapRemoveMutation, +} = require('./mutation'); + const { ConceptMapQuery, ConceptMapListQuery, ConceptMapInstanceQuery, } = require('./query'); -const { - ConceptMapCreateMutation, - ConceptMapUpdateMutation, - ConceptMapDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ConceptMapCreate: ConceptMapCreateMutation, ConceptMapUpdate: ConceptMapUpdateMutation, - ConceptMapDelete: ConceptMapDeleteMutation, + ConceptMapRemove: ConceptMapRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ConceptMap', path: '/1_0_2/ConceptMap/:id', query: ConceptMapInstanceQuery, diff --git a/src/resources/1_0_2/profiles/conceptmap/resolver.js b/src/resources/1_0_2/profiles/conceptmap/resolver.js index a09ae8f4..df5d3b51 100644 --- a/src/resources/1_0_2/profiles/conceptmap/resolver.js +++ b/src/resources/1_0_2/profiles/conceptmap/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.conceptmapResolver + * @name exports.getConceptMap * @static - * @summary ConceptMap Resolver. + * @summary ConceptMap resolver. */ -module.exports.conceptmapResolver = function conceptmapResolver( +module.exports.getConceptMap = function getConceptMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapListResolver + * @name exports.getConceptMapList * @static - * @summary ConceptMap List Resolver. + * @summary ConceptMap list resolver. */ -module.exports.conceptmapListResolver = function conceptmapListResolver( +module.exports.getConceptMapList = function getConceptMapList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapInstanceResolver + * @name exports.getConceptMapInstance * @static - * @summary ConceptMap Instance Resolver. + * @summary ConceptMap instance resolver. */ -module.exports.conceptmapInstanceResolver = function conceptmapInstanceResolver( +module.exports.getConceptMapInstance = function getConceptMapInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapCreateResolver + * @name exports.createConceptMap * @static - * @summary ConceptMap Create Resolver. + * @summary Create ConceptMap resolver. */ -module.exports.conceptmapCreateResolver = function conceptmapCreateResolver( +module.exports.createConceptMap = function createConceptMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapUpdateResolver + * @name exports.updateConceptMap * @static - * @summary ConceptMap Update Resolver. + * @summary Update ConceptMap resolver. */ -module.exports.conceptmapUpdateResolver = function conceptmapUpdateResolver( +module.exports.updateConceptMap = function updateConceptMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapDeleteResolver + * @name exports.removeConceptMap * @static - * @summary ConceptMap Delete Resolver. + * @summary Remove ConceptMap resolver. */ -module.exports.conceptmapDeleteResolver = function conceptmapDeleteResolver( +module.exports.removeConceptMap = function removeConceptMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/condition/mutation.js b/src/resources/1_0_2/profiles/condition/mutation.js index 6c4ef56d..6c5e53da 100644 --- a/src/resources/1_0_2/profiles/condition/mutation.js +++ b/src/resources/1_0_2/profiles/condition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ConditionSchema = require('../../schemas/condition.schema'); +const ConditionSchema = require('../../schemas/condition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ConditionInput = require('../../inputs/condition.input'); +const ConditionInput = require('../../inputs/condition.input.js'); -// Resolvers -const { - conditionCreateResolver, - conditionUpdateResolver, - conditionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCondition, + updateCondition, + removeCondition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Condition', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Condition record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Condition record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ConditionCreateMutation - * @summary ConditionCreate Mutation. + * @summary ConditionCreate mutation. */ module.exports.ConditionCreateMutation = { - args: WriteArgs, - description: 'Create a Condition', - resolve: scopeInvariant(scopeOptions, conditionCreateResolver), + description: 'Create a Condition record', + resolve: scopeInvariant(scopeOptions, createCondition), type: ConditionSchema, + args: WriteArgs, }; /** * @name exports.ConditionUpdateMutation - * @summary ConditionUpdate Mutation. + * @summary ConditionUpdate mutation. */ module.exports.ConditionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Conditions', - resolve: scopeInvariant(scopeOptions, conditionUpdateResolver), + description: 'Update a Condition record', + resolve: scopeInvariant(scopeOptions, updateCondition), type: ConditionSchema, + args: WriteArgs, }; /** - * @name exports.ConditionDeleteMutation - * @summary ConditionDelete Mutation. + * @name exports.ConditionRemoveMutation + * @summary ConditionRemove mutation. */ -module.exports.ConditionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Condition', - resolve: scopeInvariant(scopeOptions, conditionDeleteResolver), +module.exports.ConditionRemoveMutation = { + description: 'Remove a Condition record', + resolve: scopeInvariant(scopeOptions, removeCondition), type: ConditionSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/condition/query.js b/src/resources/1_0_2/profiles/condition/query.js index a3fb6a49..d0cdd5c9 100644 --- a/src/resources/1_0_2/profiles/condition/query.js +++ b/src/resources/1_0_2/profiles/condition/query.js @@ -1,55 +1,59 @@ // Schemas -const ConditionSchema = require('../../schemas/condition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConditionSchema = require('../../schemas/condition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ConditionArgs = require('../../parameters/condition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ConditionArgs = require('../../parameters/condition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ConditionArgs); // Resolvers const { - conditionResolver, - conditionListResolver, - conditionInstanceResolver, + getCondition, + getConditionList, + getConditionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Condition', action: 'read', - version: '1_0_2', }; /** * @name exports.ConditionQuery - * @summary Condition Query. + * @summary Condition query. */ module.exports.ConditionQuery = { - args: Object.assign({}, CommonArgs, ConditionArgs), description: 'Query for a single Condition', - resolve: scopeInvariant(scopeOptions, conditionResolver), + resolve: scopeInvariant(scopeOptions, getCondition), type: ConditionSchema, + args: args, }; /** * @name exports.ConditionListQuery - * @summary ConditionList Query. + * @summary Condition query. */ module.exports.ConditionListQuery = { - args: Object.assign({}, CommonArgs, ConditionArgs), - description: 'Query for multiple Conditions', - resolve: scopeInvariant(scopeOptions, conditionListResolver), + description: 'Query for a more than or just one Condition', + resolve: scopeInvariant(scopeOptions, getConditionList), type: BundleSchema, + args: args, }; /** * @name exports.ConditionInstanceQuery - * @summary ConditionInstance Query. + * @summary Condition query. */ module.exports.ConditionInstanceQuery = { - description: 'Get information about a single Condition', - resolve: scopeInvariant(scopeOptions, conditionInstanceResolver), + description: 'Access information about a single Condition', + resolve: scopeInvariant(scopeOptions, getConditionInstance), type: ConditionSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/condition/index.js b/src/resources/1_0_2/profiles/condition/register.js similarity index 92% rename from src/resources/1_0_2/profiles/condition/index.js rename to src/resources/1_0_2/profiles/condition/register.js index c904fa30..1297fe8f 100644 --- a/src/resources/1_0_2/profiles/condition/index.js +++ b/src/resources/1_0_2/profiles/condition/register.js @@ -1,15 +1,15 @@ +const { + ConditionCreateMutation, + ConditionUpdateMutation, + ConditionRemoveMutation, +} = require('./mutation'); + const { ConditionQuery, ConditionListQuery, ConditionInstanceQuery, } = require('./query'); -const { - ConditionCreateMutation, - ConditionUpdateMutation, - ConditionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ConditionCreate: ConditionCreateMutation, ConditionUpdate: ConditionUpdateMutation, - ConditionDelete: ConditionDeleteMutation, + ConditionRemove: ConditionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Condition', path: '/1_0_2/Condition/:id', query: ConditionInstanceQuery, diff --git a/src/resources/1_0_2/profiles/condition/resolver.js b/src/resources/1_0_2/profiles/condition/resolver.js index 0c169bc8..868361c3 100644 --- a/src/resources/1_0_2/profiles/condition/resolver.js +++ b/src/resources/1_0_2/profiles/condition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.conditionResolver + * @name exports.getCondition * @static - * @summary Condition Resolver. + * @summary Condition resolver. */ -module.exports.conditionResolver = function conditionResolver( +module.exports.getCondition = function getCondition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionListResolver + * @name exports.getConditionList * @static - * @summary Condition List Resolver. + * @summary Condition list resolver. */ -module.exports.conditionListResolver = function conditionListResolver( +module.exports.getConditionList = function getConditionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionInstanceResolver + * @name exports.getConditionInstance * @static - * @summary Condition Instance Resolver. + * @summary Condition instance resolver. */ -module.exports.conditionInstanceResolver = function conditionInstanceResolver( +module.exports.getConditionInstance = function getConditionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionCreateResolver + * @name exports.createCondition * @static - * @summary Condition Create Resolver. + * @summary Create Condition resolver. */ -module.exports.conditionCreateResolver = function conditionCreateResolver( +module.exports.createCondition = function createCondition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionUpdateResolver + * @name exports.updateCondition * @static - * @summary Condition Update Resolver. + * @summary Update Condition resolver. */ -module.exports.conditionUpdateResolver = function conditionUpdateResolver( +module.exports.updateCondition = function updateCondition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionDeleteResolver + * @name exports.removeCondition * @static - * @summary Condition Delete Resolver. + * @summary Remove Condition resolver. */ -module.exports.conditionDeleteResolver = function conditionDeleteResolver( +module.exports.removeCondition = function removeCondition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/conformance/mutation.js b/src/resources/1_0_2/profiles/conformance/mutation.js index 56cd850c..07ee3f50 100644 --- a/src/resources/1_0_2/profiles/conformance/mutation.js +++ b/src/resources/1_0_2/profiles/conformance/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ConformanceSchema = require('../../schemas/conformance.schema'); +const ConformanceSchema = require('../../schemas/conformance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ConformanceInput = require('../../inputs/conformance.input'); +const ConformanceInput = require('../../inputs/conformance.input.js'); -// Resolvers -const { - conformanceCreateResolver, - conformanceUpdateResolver, - conformanceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createConformance, + updateConformance, + removeConformance, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Conformance', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Conformance record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Conformance record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ConformanceCreateMutation - * @summary ConformanceCreate Mutation. + * @summary ConformanceCreate mutation. */ module.exports.ConformanceCreateMutation = { - args: WriteArgs, - description: 'Create a Conformance', - resolve: scopeInvariant(scopeOptions, conformanceCreateResolver), + description: 'Create a Conformance record', + resolve: scopeInvariant(scopeOptions, createConformance), type: ConformanceSchema, + args: WriteArgs, }; /** * @name exports.ConformanceUpdateMutation - * @summary ConformanceUpdate Mutation. + * @summary ConformanceUpdate mutation. */ module.exports.ConformanceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Conformances', - resolve: scopeInvariant(scopeOptions, conformanceUpdateResolver), + description: 'Update a Conformance record', + resolve: scopeInvariant(scopeOptions, updateConformance), type: ConformanceSchema, + args: WriteArgs, }; /** - * @name exports.ConformanceDeleteMutation - * @summary ConformanceDelete Mutation. + * @name exports.ConformanceRemoveMutation + * @summary ConformanceRemove mutation. */ -module.exports.ConformanceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Conformance', - resolve: scopeInvariant(scopeOptions, conformanceDeleteResolver), +module.exports.ConformanceRemoveMutation = { + description: 'Remove a Conformance record', + resolve: scopeInvariant(scopeOptions, removeConformance), type: ConformanceSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/conformance/query.js b/src/resources/1_0_2/profiles/conformance/query.js index 4aaad69d..28227712 100644 --- a/src/resources/1_0_2/profiles/conformance/query.js +++ b/src/resources/1_0_2/profiles/conformance/query.js @@ -1,55 +1,59 @@ // Schemas -const ConformanceSchema = require('../../schemas/conformance.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConformanceSchema = require('../../schemas/conformance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ConformanceArgs = require('../../parameters/conformance.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ConformanceArgs = require('../../parameters/conformance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ConformanceArgs); // Resolvers const { - conformanceResolver, - conformanceListResolver, - conformanceInstanceResolver, + getConformance, + getConformanceList, + getConformanceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Conformance', action: 'read', - version: '1_0_2', }; /** * @name exports.ConformanceQuery - * @summary Conformance Query. + * @summary Conformance query. */ module.exports.ConformanceQuery = { - args: Object.assign({}, CommonArgs, ConformanceArgs), description: 'Query for a single Conformance', - resolve: scopeInvariant(scopeOptions, conformanceResolver), + resolve: scopeInvariant(scopeOptions, getConformance), type: ConformanceSchema, + args: args, }; /** * @name exports.ConformanceListQuery - * @summary ConformanceList Query. + * @summary Conformance query. */ module.exports.ConformanceListQuery = { - args: Object.assign({}, CommonArgs, ConformanceArgs), - description: 'Query for multiple Conformances', - resolve: scopeInvariant(scopeOptions, conformanceListResolver), + description: 'Query for a more than or just one Conformance', + resolve: scopeInvariant(scopeOptions, getConformanceList), type: BundleSchema, + args: args, }; /** * @name exports.ConformanceInstanceQuery - * @summary ConformanceInstance Query. + * @summary Conformance query. */ module.exports.ConformanceInstanceQuery = { - description: 'Get information about a single Conformance', - resolve: scopeInvariant(scopeOptions, conformanceInstanceResolver), + description: 'Access information about a single Conformance', + resolve: scopeInvariant(scopeOptions, getConformanceInstance), type: ConformanceSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/conformance/index.js b/src/resources/1_0_2/profiles/conformance/register.js similarity index 92% rename from src/resources/1_0_2/profiles/conformance/index.js rename to src/resources/1_0_2/profiles/conformance/register.js index 79759549..987c4dbc 100644 --- a/src/resources/1_0_2/profiles/conformance/index.js +++ b/src/resources/1_0_2/profiles/conformance/register.js @@ -1,15 +1,15 @@ +const { + ConformanceCreateMutation, + ConformanceUpdateMutation, + ConformanceRemoveMutation, +} = require('./mutation'); + const { ConformanceQuery, ConformanceListQuery, ConformanceInstanceQuery, } = require('./query'); -const { - ConformanceCreateMutation, - ConformanceUpdateMutation, - ConformanceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ConformanceCreate: ConformanceCreateMutation, ConformanceUpdate: ConformanceUpdateMutation, - ConformanceDelete: ConformanceDeleteMutation, + ConformanceRemove: ConformanceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Conformance', path: '/1_0_2/Conformance/:id', query: ConformanceInstanceQuery, diff --git a/src/resources/1_0_2/profiles/conformance/resolver.js b/src/resources/1_0_2/profiles/conformance/resolver.js index 88cbf5ee..d9164d3a 100644 --- a/src/resources/1_0_2/profiles/conformance/resolver.js +++ b/src/resources/1_0_2/profiles/conformance/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.conformanceResolver + * @name exports.getConformance * @static - * @summary Conformance Resolver. + * @summary Conformance resolver. */ -module.exports.conformanceResolver = function conformanceResolver( +module.exports.getConformance = function getConformance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conformanceListResolver + * @name exports.getConformanceList * @static - * @summary Conformance List Resolver. + * @summary Conformance list resolver. */ -module.exports.conformanceListResolver = function conformanceListResolver( +module.exports.getConformanceList = function getConformanceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conformanceInstanceResolver + * @name exports.getConformanceInstance * @static - * @summary Conformance Instance Resolver. + * @summary Conformance instance resolver. */ -module.exports.conformanceInstanceResolver = function conformanceInstanceResolver( +module.exports.getConformanceInstance = function getConformanceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conformanceCreateResolver + * @name exports.createConformance * @static - * @summary Conformance Create Resolver. + * @summary Create Conformance resolver. */ -module.exports.conformanceCreateResolver = function conformanceCreateResolver( +module.exports.createConformance = function createConformance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conformanceUpdateResolver + * @name exports.updateConformance * @static - * @summary Conformance Update Resolver. + * @summary Update Conformance resolver. */ -module.exports.conformanceUpdateResolver = function conformanceUpdateResolver( +module.exports.updateConformance = function updateConformance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conformanceDeleteResolver + * @name exports.removeConformance * @static - * @summary Conformance Delete Resolver. + * @summary Remove Conformance resolver. */ -module.exports.conformanceDeleteResolver = function conformanceDeleteResolver( +module.exports.removeConformance = function removeConformance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/contract/mutation.js b/src/resources/1_0_2/profiles/contract/mutation.js index b62bcfa9..90e7e504 100644 --- a/src/resources/1_0_2/profiles/contract/mutation.js +++ b/src/resources/1_0_2/profiles/contract/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ContractSchema = require('../../schemas/contract.schema'); +const ContractSchema = require('../../schemas/contract.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ContractInput = require('../../inputs/contract.input'); +const ContractInput = require('../../inputs/contract.input.js'); -// Resolvers -const { - contractCreateResolver, - contractUpdateResolver, - contractDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createContract, + updateContract, + removeContract, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Contract', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Contract record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Contract record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ContractCreateMutation - * @summary ContractCreate Mutation. + * @summary ContractCreate mutation. */ module.exports.ContractCreateMutation = { - args: WriteArgs, - description: 'Create a Contract', - resolve: scopeInvariant(scopeOptions, contractCreateResolver), + description: 'Create a Contract record', + resolve: scopeInvariant(scopeOptions, createContract), type: ContractSchema, + args: WriteArgs, }; /** * @name exports.ContractUpdateMutation - * @summary ContractUpdate Mutation. + * @summary ContractUpdate mutation. */ module.exports.ContractUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Contracts', - resolve: scopeInvariant(scopeOptions, contractUpdateResolver), + description: 'Update a Contract record', + resolve: scopeInvariant(scopeOptions, updateContract), type: ContractSchema, + args: WriteArgs, }; /** - * @name exports.ContractDeleteMutation - * @summary ContractDelete Mutation. + * @name exports.ContractRemoveMutation + * @summary ContractRemove mutation. */ -module.exports.ContractDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Contract', - resolve: scopeInvariant(scopeOptions, contractDeleteResolver), +module.exports.ContractRemoveMutation = { + description: 'Remove a Contract record', + resolve: scopeInvariant(scopeOptions, removeContract), type: ContractSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/contract/query.js b/src/resources/1_0_2/profiles/contract/query.js index 181bcccf..1c122578 100644 --- a/src/resources/1_0_2/profiles/contract/query.js +++ b/src/resources/1_0_2/profiles/contract/query.js @@ -1,55 +1,59 @@ // Schemas -const ContractSchema = require('../../schemas/contract.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ContractSchema = require('../../schemas/contract.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ContractArgs = require('../../parameters/contract.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ContractArgs = require('../../parameters/contract.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ContractArgs); // Resolvers const { - contractResolver, - contractListResolver, - contractInstanceResolver, + getContract, + getContractList, + getContractInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Contract', action: 'read', - version: '1_0_2', }; /** * @name exports.ContractQuery - * @summary Contract Query. + * @summary Contract query. */ module.exports.ContractQuery = { - args: Object.assign({}, CommonArgs, ContractArgs), description: 'Query for a single Contract', - resolve: scopeInvariant(scopeOptions, contractResolver), + resolve: scopeInvariant(scopeOptions, getContract), type: ContractSchema, + args: args, }; /** * @name exports.ContractListQuery - * @summary ContractList Query. + * @summary Contract query. */ module.exports.ContractListQuery = { - args: Object.assign({}, CommonArgs, ContractArgs), - description: 'Query for multiple Contracts', - resolve: scopeInvariant(scopeOptions, contractListResolver), + description: 'Query for a more than or just one Contract', + resolve: scopeInvariant(scopeOptions, getContractList), type: BundleSchema, + args: args, }; /** * @name exports.ContractInstanceQuery - * @summary ContractInstance Query. + * @summary Contract query. */ module.exports.ContractInstanceQuery = { - description: 'Get information about a single Contract', - resolve: scopeInvariant(scopeOptions, contractInstanceResolver), + description: 'Access information about a single Contract', + resolve: scopeInvariant(scopeOptions, getContractInstance), type: ContractSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/contract/index.js b/src/resources/1_0_2/profiles/contract/register.js similarity index 92% rename from src/resources/1_0_2/profiles/contract/index.js rename to src/resources/1_0_2/profiles/contract/register.js index 3b601e87..2da820be 100644 --- a/src/resources/1_0_2/profiles/contract/index.js +++ b/src/resources/1_0_2/profiles/contract/register.js @@ -1,15 +1,15 @@ +const { + ContractCreateMutation, + ContractUpdateMutation, + ContractRemoveMutation, +} = require('./mutation'); + const { ContractQuery, ContractListQuery, ContractInstanceQuery, } = require('./query'); -const { - ContractCreateMutation, - ContractUpdateMutation, - ContractDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ContractCreate: ContractCreateMutation, ContractUpdate: ContractUpdateMutation, - ContractDelete: ContractDeleteMutation, + ContractRemove: ContractRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Contract', path: '/1_0_2/Contract/:id', query: ContractInstanceQuery, diff --git a/src/resources/1_0_2/profiles/contract/resolver.js b/src/resources/1_0_2/profiles/contract/resolver.js index 2093d7d0..8c286140 100644 --- a/src/resources/1_0_2/profiles/contract/resolver.js +++ b/src/resources/1_0_2/profiles/contract/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.contractResolver + * @name exports.getContract * @static - * @summary Contract Resolver. + * @summary Contract resolver. */ -module.exports.contractResolver = function contractResolver( +module.exports.getContract = function getContract( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractListResolver + * @name exports.getContractList * @static - * @summary Contract List Resolver. + * @summary Contract list resolver. */ -module.exports.contractListResolver = function contractListResolver( +module.exports.getContractList = function getContractList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractInstanceResolver + * @name exports.getContractInstance * @static - * @summary Contract Instance Resolver. + * @summary Contract instance resolver. */ -module.exports.contractInstanceResolver = function contractInstanceResolver( +module.exports.getContractInstance = function getContractInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractCreateResolver + * @name exports.createContract * @static - * @summary Contract Create Resolver. + * @summary Create Contract resolver. */ -module.exports.contractCreateResolver = function contractCreateResolver( +module.exports.createContract = function createContract( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractUpdateResolver + * @name exports.updateContract * @static - * @summary Contract Update Resolver. + * @summary Update Contract resolver. */ -module.exports.contractUpdateResolver = function contractUpdateResolver( +module.exports.updateContract = function updateContract( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractDeleteResolver + * @name exports.removeContract * @static - * @summary Contract Delete Resolver. + * @summary Remove Contract resolver. */ -module.exports.contractDeleteResolver = function contractDeleteResolver( +module.exports.removeContract = function removeContract( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/coverage/mutation.js b/src/resources/1_0_2/profiles/coverage/mutation.js index 600b9952..b303bb42 100644 --- a/src/resources/1_0_2/profiles/coverage/mutation.js +++ b/src/resources/1_0_2/profiles/coverage/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CoverageSchema = require('../../schemas/coverage.schema'); +const CoverageSchema = require('../../schemas/coverage.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CoverageInput = require('../../inputs/coverage.input'); +const CoverageInput = require('../../inputs/coverage.input.js'); -// Resolvers -const { - coverageCreateResolver, - coverageUpdateResolver, - coverageDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCoverage, + updateCoverage, + removeCoverage, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Coverage', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Coverage record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Coverage record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.CoverageCreateMutation - * @summary CoverageCreate Mutation. + * @summary CoverageCreate mutation. */ module.exports.CoverageCreateMutation = { - args: WriteArgs, - description: 'Create a Coverage', - resolve: scopeInvariant(scopeOptions, coverageCreateResolver), + description: 'Create a Coverage record', + resolve: scopeInvariant(scopeOptions, createCoverage), type: CoverageSchema, + args: WriteArgs, }; /** * @name exports.CoverageUpdateMutation - * @summary CoverageUpdate Mutation. + * @summary CoverageUpdate mutation. */ module.exports.CoverageUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Coverages', - resolve: scopeInvariant(scopeOptions, coverageUpdateResolver), + description: 'Update a Coverage record', + resolve: scopeInvariant(scopeOptions, updateCoverage), type: CoverageSchema, + args: WriteArgs, }; /** - * @name exports.CoverageDeleteMutation - * @summary CoverageDelete Mutation. + * @name exports.CoverageRemoveMutation + * @summary CoverageRemove mutation. */ -module.exports.CoverageDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Coverage', - resolve: scopeInvariant(scopeOptions, coverageDeleteResolver), +module.exports.CoverageRemoveMutation = { + description: 'Remove a Coverage record', + resolve: scopeInvariant(scopeOptions, removeCoverage), type: CoverageSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/coverage/query.js b/src/resources/1_0_2/profiles/coverage/query.js index 2b69bc90..7da5d9c7 100644 --- a/src/resources/1_0_2/profiles/coverage/query.js +++ b/src/resources/1_0_2/profiles/coverage/query.js @@ -1,55 +1,59 @@ // Schemas -const CoverageSchema = require('../../schemas/coverage.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CoverageSchema = require('../../schemas/coverage.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CoverageArgs = require('../../parameters/coverage.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CoverageArgs = require('../../parameters/coverage.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, CoverageArgs); // Resolvers const { - coverageResolver, - coverageListResolver, - coverageInstanceResolver, + getCoverage, + getCoverageList, + getCoverageInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Coverage', action: 'read', - version: '1_0_2', }; /** * @name exports.CoverageQuery - * @summary Coverage Query. + * @summary Coverage query. */ module.exports.CoverageQuery = { - args: Object.assign({}, CommonArgs, CoverageArgs), description: 'Query for a single Coverage', - resolve: scopeInvariant(scopeOptions, coverageResolver), + resolve: scopeInvariant(scopeOptions, getCoverage), type: CoverageSchema, + args: args, }; /** * @name exports.CoverageListQuery - * @summary CoverageList Query. + * @summary Coverage query. */ module.exports.CoverageListQuery = { - args: Object.assign({}, CommonArgs, CoverageArgs), - description: 'Query for multiple Coverages', - resolve: scopeInvariant(scopeOptions, coverageListResolver), + description: 'Query for a more than or just one Coverage', + resolve: scopeInvariant(scopeOptions, getCoverageList), type: BundleSchema, + args: args, }; /** * @name exports.CoverageInstanceQuery - * @summary CoverageInstance Query. + * @summary Coverage query. */ module.exports.CoverageInstanceQuery = { - description: 'Get information about a single Coverage', - resolve: scopeInvariant(scopeOptions, coverageInstanceResolver), + description: 'Access information about a single Coverage', + resolve: scopeInvariant(scopeOptions, getCoverageInstance), type: CoverageSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/coverage/index.js b/src/resources/1_0_2/profiles/coverage/register.js similarity index 92% rename from src/resources/1_0_2/profiles/coverage/index.js rename to src/resources/1_0_2/profiles/coverage/register.js index b8f80090..fbe054ba 100644 --- a/src/resources/1_0_2/profiles/coverage/index.js +++ b/src/resources/1_0_2/profiles/coverage/register.js @@ -1,15 +1,15 @@ +const { + CoverageCreateMutation, + CoverageUpdateMutation, + CoverageRemoveMutation, +} = require('./mutation'); + const { CoverageQuery, CoverageListQuery, CoverageInstanceQuery, } = require('./query'); -const { - CoverageCreateMutation, - CoverageUpdateMutation, - CoverageDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CoverageCreate: CoverageCreateMutation, CoverageUpdate: CoverageUpdateMutation, - CoverageDelete: CoverageDeleteMutation, + CoverageRemove: CoverageRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Coverage', path: '/1_0_2/Coverage/:id', query: CoverageInstanceQuery, diff --git a/src/resources/1_0_2/profiles/coverage/resolver.js b/src/resources/1_0_2/profiles/coverage/resolver.js index ff344f22..3370c457 100644 --- a/src/resources/1_0_2/profiles/coverage/resolver.js +++ b/src/resources/1_0_2/profiles/coverage/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.coverageResolver + * @name exports.getCoverage * @static - * @summary Coverage Resolver. + * @summary Coverage resolver. */ -module.exports.coverageResolver = function coverageResolver( +module.exports.getCoverage = function getCoverage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageListResolver + * @name exports.getCoverageList * @static - * @summary Coverage List Resolver. + * @summary Coverage list resolver. */ -module.exports.coverageListResolver = function coverageListResolver( +module.exports.getCoverageList = function getCoverageList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageInstanceResolver + * @name exports.getCoverageInstance * @static - * @summary Coverage Instance Resolver. + * @summary Coverage instance resolver. */ -module.exports.coverageInstanceResolver = function coverageInstanceResolver( +module.exports.getCoverageInstance = function getCoverageInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageCreateResolver + * @name exports.createCoverage * @static - * @summary Coverage Create Resolver. + * @summary Create Coverage resolver. */ -module.exports.coverageCreateResolver = function coverageCreateResolver( +module.exports.createCoverage = function createCoverage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageUpdateResolver + * @name exports.updateCoverage * @static - * @summary Coverage Update Resolver. + * @summary Update Coverage resolver. */ -module.exports.coverageUpdateResolver = function coverageUpdateResolver( +module.exports.updateCoverage = function updateCoverage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageDeleteResolver + * @name exports.removeCoverage * @static - * @summary Coverage Delete Resolver. + * @summary Remove Coverage resolver. */ -module.exports.coverageDeleteResolver = function coverageDeleteResolver( +module.exports.removeCoverage = function removeCoverage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/dataelement/mutation.js b/src/resources/1_0_2/profiles/dataelement/mutation.js index bb7ebce1..92ee301e 100644 --- a/src/resources/1_0_2/profiles/dataelement/mutation.js +++ b/src/resources/1_0_2/profiles/dataelement/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DataElementSchema = require('../../schemas/dataelement.schema'); +const DataElementSchema = require('../../schemas/dataelement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DataElementInput = require('../../inputs/dataelement.input'); +const DataElementInput = require('../../inputs/dataelement.input.js'); -// Resolvers -const { - dataelementCreateResolver, - dataelementUpdateResolver, - dataelementDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDataElement, + updateDataElement, + removeDataElement, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DataElement', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DataElement record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DataElement record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DataElementCreateMutation - * @summary DataElementCreate Mutation. + * @summary DataElementCreate mutation. */ module.exports.DataElementCreateMutation = { - args: WriteArgs, - description: 'Create a DataElement', - resolve: scopeInvariant(scopeOptions, dataelementCreateResolver), + description: 'Create a DataElement record', + resolve: scopeInvariant(scopeOptions, createDataElement), type: DataElementSchema, + args: WriteArgs, }; /** * @name exports.DataElementUpdateMutation - * @summary DataElementUpdate Mutation. + * @summary DataElementUpdate mutation. */ module.exports.DataElementUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DataElements', - resolve: scopeInvariant(scopeOptions, dataelementUpdateResolver), + description: 'Update a DataElement record', + resolve: scopeInvariant(scopeOptions, updateDataElement), type: DataElementSchema, + args: WriteArgs, }; /** - * @name exports.DataElementDeleteMutation - * @summary DataElementDelete Mutation. + * @name exports.DataElementRemoveMutation + * @summary DataElementRemove mutation. */ -module.exports.DataElementDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DataElement', - resolve: scopeInvariant(scopeOptions, dataelementDeleteResolver), +module.exports.DataElementRemoveMutation = { + description: 'Remove a DataElement record', + resolve: scopeInvariant(scopeOptions, removeDataElement), type: DataElementSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/dataelement/query.js b/src/resources/1_0_2/profiles/dataelement/query.js index 28702f2d..0825bfaa 100644 --- a/src/resources/1_0_2/profiles/dataelement/query.js +++ b/src/resources/1_0_2/profiles/dataelement/query.js @@ -1,55 +1,59 @@ // Schemas -const DataElementSchema = require('../../schemas/dataelement.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DataElementSchema = require('../../schemas/dataelement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DataElementArgs = require('../../parameters/dataelement.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DataElementArgs = require('../../parameters/dataelement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DataElementArgs); // Resolvers const { - dataelementResolver, - dataelementListResolver, - dataelementInstanceResolver, + getDataElement, + getDataElementList, + getDataElementInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DataElement', action: 'read', - version: '1_0_2', }; /** * @name exports.DataElementQuery - * @summary DataElement Query. + * @summary DataElement query. */ module.exports.DataElementQuery = { - args: Object.assign({}, CommonArgs, DataElementArgs), description: 'Query for a single DataElement', - resolve: scopeInvariant(scopeOptions, dataelementResolver), + resolve: scopeInvariant(scopeOptions, getDataElement), type: DataElementSchema, + args: args, }; /** * @name exports.DataElementListQuery - * @summary DataElementList Query. + * @summary DataElement query. */ module.exports.DataElementListQuery = { - args: Object.assign({}, CommonArgs, DataElementArgs), - description: 'Query for multiple DataElements', - resolve: scopeInvariant(scopeOptions, dataelementListResolver), + description: 'Query for a more than or just one DataElement', + resolve: scopeInvariant(scopeOptions, getDataElementList), type: BundleSchema, + args: args, }; /** * @name exports.DataElementInstanceQuery - * @summary DataElementInstance Query. + * @summary DataElement query. */ module.exports.DataElementInstanceQuery = { - description: 'Get information about a single DataElement', - resolve: scopeInvariant(scopeOptions, dataelementInstanceResolver), + description: 'Access information about a single DataElement', + resolve: scopeInvariant(scopeOptions, getDataElementInstance), type: DataElementSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/dataelement/index.js b/src/resources/1_0_2/profiles/dataelement/register.js similarity index 92% rename from src/resources/1_0_2/profiles/dataelement/index.js rename to src/resources/1_0_2/profiles/dataelement/register.js index d00a6f60..80eda662 100644 --- a/src/resources/1_0_2/profiles/dataelement/index.js +++ b/src/resources/1_0_2/profiles/dataelement/register.js @@ -1,15 +1,15 @@ +const { + DataElementCreateMutation, + DataElementUpdateMutation, + DataElementRemoveMutation, +} = require('./mutation'); + const { DataElementQuery, DataElementListQuery, DataElementInstanceQuery, } = require('./query'); -const { - DataElementCreateMutation, - DataElementUpdateMutation, - DataElementDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DataElementCreate: DataElementCreateMutation, DataElementUpdate: DataElementUpdateMutation, - DataElementDelete: DataElementDeleteMutation, + DataElementRemove: DataElementRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DataElement', path: '/1_0_2/DataElement/:id', query: DataElementInstanceQuery, diff --git a/src/resources/1_0_2/profiles/dataelement/resolver.js b/src/resources/1_0_2/profiles/dataelement/resolver.js index 7812b473..a5af0283 100644 --- a/src/resources/1_0_2/profiles/dataelement/resolver.js +++ b/src/resources/1_0_2/profiles/dataelement/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.dataelementResolver + * @name exports.getDataElement * @static - * @summary DataElement Resolver. + * @summary DataElement resolver. */ -module.exports.dataelementResolver = function dataelementResolver( +module.exports.getDataElement = function getDataElement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementListResolver + * @name exports.getDataElementList * @static - * @summary DataElement List Resolver. + * @summary DataElement list resolver. */ -module.exports.dataelementListResolver = function dataelementListResolver( +module.exports.getDataElementList = function getDataElementList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementInstanceResolver + * @name exports.getDataElementInstance * @static - * @summary DataElement Instance Resolver. + * @summary DataElement instance resolver. */ -module.exports.dataelementInstanceResolver = function dataelementInstanceResolver( +module.exports.getDataElementInstance = function getDataElementInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementCreateResolver + * @name exports.createDataElement * @static - * @summary DataElement Create Resolver. + * @summary Create DataElement resolver. */ -module.exports.dataelementCreateResolver = function dataelementCreateResolver( +module.exports.createDataElement = function createDataElement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementUpdateResolver + * @name exports.updateDataElement * @static - * @summary DataElement Update Resolver. + * @summary Update DataElement resolver. */ -module.exports.dataelementUpdateResolver = function dataelementUpdateResolver( +module.exports.updateDataElement = function updateDataElement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementDeleteResolver + * @name exports.removeDataElement * @static - * @summary DataElement Delete Resolver. + * @summary Remove DataElement resolver. */ -module.exports.dataelementDeleteResolver = function dataelementDeleteResolver( +module.exports.removeDataElement = function removeDataElement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/detectedissue/mutation.js b/src/resources/1_0_2/profiles/detectedissue/mutation.js index bd46b3d1..e08b8bc2 100644 --- a/src/resources/1_0_2/profiles/detectedissue/mutation.js +++ b/src/resources/1_0_2/profiles/detectedissue/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DetectedIssueSchema = require('../../schemas/detectedissue.schema'); +const DetectedIssueSchema = require('../../schemas/detectedissue.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DetectedIssueInput = require('../../inputs/detectedissue.input'); +const DetectedIssueInput = require('../../inputs/detectedissue.input.js'); -// Resolvers -const { - detectedissueCreateResolver, - detectedissueUpdateResolver, - detectedissueDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDetectedIssue, + updateDetectedIssue, + removeDetectedIssue, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DetectedIssue', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DetectedIssue record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DetectedIssue record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DetectedIssueCreateMutation - * @summary DetectedIssueCreate Mutation. + * @summary DetectedIssueCreate mutation. */ module.exports.DetectedIssueCreateMutation = { - args: WriteArgs, - description: 'Create a DetectedIssue', - resolve: scopeInvariant(scopeOptions, detectedissueCreateResolver), + description: 'Create a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, createDetectedIssue), type: DetectedIssueSchema, + args: WriteArgs, }; /** * @name exports.DetectedIssueUpdateMutation - * @summary DetectedIssueUpdate Mutation. + * @summary DetectedIssueUpdate mutation. */ module.exports.DetectedIssueUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DetectedIssues', - resolve: scopeInvariant(scopeOptions, detectedissueUpdateResolver), + description: 'Update a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, updateDetectedIssue), type: DetectedIssueSchema, + args: WriteArgs, }; /** - * @name exports.DetectedIssueDeleteMutation - * @summary DetectedIssueDelete Mutation. + * @name exports.DetectedIssueRemoveMutation + * @summary DetectedIssueRemove mutation. */ -module.exports.DetectedIssueDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DetectedIssue', - resolve: scopeInvariant(scopeOptions, detectedissueDeleteResolver), +module.exports.DetectedIssueRemoveMutation = { + description: 'Remove a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, removeDetectedIssue), type: DetectedIssueSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/detectedissue/query.js b/src/resources/1_0_2/profiles/detectedissue/query.js index 21da9b84..066cc9b3 100644 --- a/src/resources/1_0_2/profiles/detectedissue/query.js +++ b/src/resources/1_0_2/profiles/detectedissue/query.js @@ -1,55 +1,59 @@ // Schemas -const DetectedIssueSchema = require('../../schemas/detectedissue.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DetectedIssueSchema = require('../../schemas/detectedissue.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DetectedIssueArgs = require('../../parameters/detectedissue.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DetectedIssueArgs = require('../../parameters/detectedissue.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DetectedIssueArgs); // Resolvers const { - detectedissueResolver, - detectedissueListResolver, - detectedissueInstanceResolver, + getDetectedIssue, + getDetectedIssueList, + getDetectedIssueInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DetectedIssue', action: 'read', - version: '1_0_2', }; /** * @name exports.DetectedIssueQuery - * @summary DetectedIssue Query. + * @summary DetectedIssue query. */ module.exports.DetectedIssueQuery = { - args: Object.assign({}, CommonArgs, DetectedIssueArgs), description: 'Query for a single DetectedIssue', - resolve: scopeInvariant(scopeOptions, detectedissueResolver), + resolve: scopeInvariant(scopeOptions, getDetectedIssue), type: DetectedIssueSchema, + args: args, }; /** * @name exports.DetectedIssueListQuery - * @summary DetectedIssueList Query. + * @summary DetectedIssue query. */ module.exports.DetectedIssueListQuery = { - args: Object.assign({}, CommonArgs, DetectedIssueArgs), - description: 'Query for multiple DetectedIssues', - resolve: scopeInvariant(scopeOptions, detectedissueListResolver), + description: 'Query for a more than or just one DetectedIssue', + resolve: scopeInvariant(scopeOptions, getDetectedIssueList), type: BundleSchema, + args: args, }; /** * @name exports.DetectedIssueInstanceQuery - * @summary DetectedIssueInstance Query. + * @summary DetectedIssue query. */ module.exports.DetectedIssueInstanceQuery = { - description: 'Get information about a single DetectedIssue', - resolve: scopeInvariant(scopeOptions, detectedissueInstanceResolver), + description: 'Access information about a single DetectedIssue', + resolve: scopeInvariant(scopeOptions, getDetectedIssueInstance), type: DetectedIssueSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/detectedissue/index.js b/src/resources/1_0_2/profiles/detectedissue/register.js similarity index 92% rename from src/resources/1_0_2/profiles/detectedissue/index.js rename to src/resources/1_0_2/profiles/detectedissue/register.js index 57823bd9..793af3a4 100644 --- a/src/resources/1_0_2/profiles/detectedissue/index.js +++ b/src/resources/1_0_2/profiles/detectedissue/register.js @@ -1,15 +1,15 @@ +const { + DetectedIssueCreateMutation, + DetectedIssueUpdateMutation, + DetectedIssueRemoveMutation, +} = require('./mutation'); + const { DetectedIssueQuery, DetectedIssueListQuery, DetectedIssueInstanceQuery, } = require('./query'); -const { - DetectedIssueCreateMutation, - DetectedIssueUpdateMutation, - DetectedIssueDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DetectedIssueCreate: DetectedIssueCreateMutation, DetectedIssueUpdate: DetectedIssueUpdateMutation, - DetectedIssueDelete: DetectedIssueDeleteMutation, + DetectedIssueRemove: DetectedIssueRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DetectedIssue', path: '/1_0_2/DetectedIssue/:id', query: DetectedIssueInstanceQuery, diff --git a/src/resources/1_0_2/profiles/detectedissue/resolver.js b/src/resources/1_0_2/profiles/detectedissue/resolver.js index 0e0487c6..2f049205 100644 --- a/src/resources/1_0_2/profiles/detectedissue/resolver.js +++ b/src/resources/1_0_2/profiles/detectedissue/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.detectedissueResolver + * @name exports.getDetectedIssue * @static - * @summary DetectedIssue Resolver. + * @summary DetectedIssue resolver. */ -module.exports.detectedissueResolver = function detectedissueResolver( +module.exports.getDetectedIssue = function getDetectedIssue( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueListResolver + * @name exports.getDetectedIssueList * @static - * @summary DetectedIssue List Resolver. + * @summary DetectedIssue list resolver. */ -module.exports.detectedissueListResolver = function detectedissueListResolver( +module.exports.getDetectedIssueList = function getDetectedIssueList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueInstanceResolver + * @name exports.getDetectedIssueInstance * @static - * @summary DetectedIssue Instance Resolver. + * @summary DetectedIssue instance resolver. */ -module.exports.detectedissueInstanceResolver = function detectedissueInstanceResolver( +module.exports.getDetectedIssueInstance = function getDetectedIssueInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueCreateResolver + * @name exports.createDetectedIssue * @static - * @summary DetectedIssue Create Resolver. + * @summary Create DetectedIssue resolver. */ -module.exports.detectedissueCreateResolver = function detectedissueCreateResolver( +module.exports.createDetectedIssue = function createDetectedIssue( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueUpdateResolver + * @name exports.updateDetectedIssue * @static - * @summary DetectedIssue Update Resolver. + * @summary Update DetectedIssue resolver. */ -module.exports.detectedissueUpdateResolver = function detectedissueUpdateResolver( +module.exports.updateDetectedIssue = function updateDetectedIssue( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueDeleteResolver + * @name exports.removeDetectedIssue * @static - * @summary DetectedIssue Delete Resolver. + * @summary Remove DetectedIssue resolver. */ -module.exports.detectedissueDeleteResolver = function detectedissueDeleteResolver( +module.exports.removeDetectedIssue = function removeDetectedIssue( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/device/mutation.js b/src/resources/1_0_2/profiles/device/mutation.js index 27ad1e0c..28e8c671 100644 --- a/src/resources/1_0_2/profiles/device/mutation.js +++ b/src/resources/1_0_2/profiles/device/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceSchema = require('../../schemas/device.schema'); +const DeviceSchema = require('../../schemas/device.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceInput = require('../../inputs/device.input'); +const DeviceInput = require('../../inputs/device.input.js'); -// Resolvers -const { - deviceCreateResolver, - deviceUpdateResolver, - deviceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createDevice, updateDevice, removeDevice } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Device', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Device record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Device record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.DeviceCreateMutation - * @summary DeviceCreate Mutation. + * @summary DeviceCreate mutation. */ module.exports.DeviceCreateMutation = { - args: WriteArgs, - description: 'Create a Device', - resolve: scopeInvariant(scopeOptions, deviceCreateResolver), + description: 'Create a Device record', + resolve: scopeInvariant(scopeOptions, createDevice), type: DeviceSchema, + args: WriteArgs, }; /** * @name exports.DeviceUpdateMutation - * @summary DeviceUpdate Mutation. + * @summary DeviceUpdate mutation. */ module.exports.DeviceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Devices', - resolve: scopeInvariant(scopeOptions, deviceUpdateResolver), + description: 'Update a Device record', + resolve: scopeInvariant(scopeOptions, updateDevice), type: DeviceSchema, + args: WriteArgs, }; /** - * @name exports.DeviceDeleteMutation - * @summary DeviceDelete Mutation. + * @name exports.DeviceRemoveMutation + * @summary DeviceRemove mutation. */ -module.exports.DeviceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Device', - resolve: scopeInvariant(scopeOptions, deviceDeleteResolver), +module.exports.DeviceRemoveMutation = { + description: 'Remove a Device record', + resolve: scopeInvariant(scopeOptions, removeDevice), type: DeviceSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/device/query.js b/src/resources/1_0_2/profiles/device/query.js index a0c636de..2efdb11a 100644 --- a/src/resources/1_0_2/profiles/device/query.js +++ b/src/resources/1_0_2/profiles/device/query.js @@ -1,55 +1,55 @@ // Schemas -const DeviceSchema = require('../../schemas/device.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceSchema = require('../../schemas/device.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceArgs = require('../../parameters/device.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceArgs = require('../../parameters/device.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DeviceArgs); // Resolvers -const { - deviceResolver, - deviceListResolver, - deviceInstanceResolver, -} = require('./resolver'); +const { getDevice, getDeviceList, getDeviceInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Device', action: 'read', - version: '1_0_2', }; /** * @name exports.DeviceQuery - * @summary Device Query. + * @summary Device query. */ module.exports.DeviceQuery = { - args: Object.assign({}, CommonArgs, DeviceArgs), description: 'Query for a single Device', - resolve: scopeInvariant(scopeOptions, deviceResolver), + resolve: scopeInvariant(scopeOptions, getDevice), type: DeviceSchema, + args: args, }; /** * @name exports.DeviceListQuery - * @summary DeviceList Query. + * @summary Device query. */ module.exports.DeviceListQuery = { - args: Object.assign({}, CommonArgs, DeviceArgs), - description: 'Query for multiple Devices', - resolve: scopeInvariant(scopeOptions, deviceListResolver), + description: 'Query for a more than or just one Device', + resolve: scopeInvariant(scopeOptions, getDeviceList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceInstanceQuery - * @summary DeviceInstance Query. + * @summary Device query. */ module.exports.DeviceInstanceQuery = { - description: 'Get information about a single Device', - resolve: scopeInvariant(scopeOptions, deviceInstanceResolver), + description: 'Access information about a single Device', + resolve: scopeInvariant(scopeOptions, getDeviceInstance), type: DeviceSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/device/index.js b/src/resources/1_0_2/profiles/device/register.js similarity index 93% rename from src/resources/1_0_2/profiles/device/index.js rename to src/resources/1_0_2/profiles/device/register.js index 68fde4d6..51603f6e 100644 --- a/src/resources/1_0_2/profiles/device/index.js +++ b/src/resources/1_0_2/profiles/device/register.js @@ -1,15 +1,15 @@ +const { + DeviceCreateMutation, + DeviceUpdateMutation, + DeviceRemoveMutation, +} = require('./mutation'); + const { DeviceQuery, DeviceListQuery, DeviceInstanceQuery, } = require('./query'); -const { - DeviceCreateMutation, - DeviceUpdateMutation, - DeviceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceCreate: DeviceCreateMutation, DeviceUpdate: DeviceUpdateMutation, - DeviceDelete: DeviceDeleteMutation, + DeviceRemove: DeviceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Device', path: '/1_0_2/Device/:id', query: DeviceInstanceQuery, diff --git a/src/resources/1_0_2/profiles/device/resolver.js b/src/resources/1_0_2/profiles/device/resolver.js index 885b0fd6..61c357a8 100644 --- a/src/resources/1_0_2/profiles/device/resolver.js +++ b/src/resources/1_0_2/profiles/device/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.deviceResolver + * @name exports.getDevice * @static - * @summary Device Resolver. + * @summary Device resolver. */ -module.exports.deviceResolver = function deviceResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getDevice = function getDevice(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceListResolver + * @name exports.getDeviceList * @static - * @summary Device List Resolver. + * @summary Device list resolver. */ -module.exports.deviceListResolver = function deviceListResolver( +module.exports.getDeviceList = function getDeviceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceInstanceResolver + * @name exports.getDeviceInstance * @static - * @summary Device Instance Resolver. + * @summary Device instance resolver. */ -module.exports.deviceInstanceResolver = function deviceInstanceResolver( +module.exports.getDeviceInstance = function getDeviceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceCreateResolver + * @name exports.createDevice * @static - * @summary Device Create Resolver. + * @summary Create Device resolver. */ -module.exports.deviceCreateResolver = function deviceCreateResolver( +module.exports.createDevice = function createDevice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceUpdateResolver + * @name exports.updateDevice * @static - * @summary Device Update Resolver. + * @summary Update Device resolver. */ -module.exports.deviceUpdateResolver = function deviceUpdateResolver( +module.exports.updateDevice = function updateDevice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceDeleteResolver + * @name exports.removeDevice * @static - * @summary Device Delete Resolver. + * @summary Remove Device resolver. */ -module.exports.deviceDeleteResolver = function deviceDeleteResolver( +module.exports.removeDevice = function removeDevice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/devicecomponent/mutation.js b/src/resources/1_0_2/profiles/devicecomponent/mutation.js index d42b81c9..1e5b2fdb 100644 --- a/src/resources/1_0_2/profiles/devicecomponent/mutation.js +++ b/src/resources/1_0_2/profiles/devicecomponent/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceComponentSchema = require('../../schemas/devicecomponent.schema'); +const DeviceComponentSchema = require('../../schemas/devicecomponent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceComponentInput = require('../../inputs/devicecomponent.input'); +const DeviceComponentInput = require('../../inputs/devicecomponent.input.js'); -// Resolvers -const { - devicecomponentCreateResolver, - devicecomponentUpdateResolver, - devicecomponentDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDeviceComponent, + updateDeviceComponent, + removeDeviceComponent, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceComponent', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DeviceComponent record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DeviceComponent record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DeviceComponentCreateMutation - * @summary DeviceComponentCreate Mutation. + * @summary DeviceComponentCreate mutation. */ module.exports.DeviceComponentCreateMutation = { - args: WriteArgs, - description: 'Create a DeviceComponent', - resolve: scopeInvariant(scopeOptions, devicecomponentCreateResolver), + description: 'Create a DeviceComponent record', + resolve: scopeInvariant(scopeOptions, createDeviceComponent), type: DeviceComponentSchema, + args: WriteArgs, }; /** * @name exports.DeviceComponentUpdateMutation - * @summary DeviceComponentUpdate Mutation. + * @summary DeviceComponentUpdate mutation. */ module.exports.DeviceComponentUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DeviceComponents', - resolve: scopeInvariant(scopeOptions, devicecomponentUpdateResolver), + description: 'Update a DeviceComponent record', + resolve: scopeInvariant(scopeOptions, updateDeviceComponent), type: DeviceComponentSchema, + args: WriteArgs, }; /** - * @name exports.DeviceComponentDeleteMutation - * @summary DeviceComponentDelete Mutation. + * @name exports.DeviceComponentRemoveMutation + * @summary DeviceComponentRemove mutation. */ -module.exports.DeviceComponentDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DeviceComponent', - resolve: scopeInvariant(scopeOptions, devicecomponentDeleteResolver), +module.exports.DeviceComponentRemoveMutation = { + description: 'Remove a DeviceComponent record', + resolve: scopeInvariant(scopeOptions, removeDeviceComponent), type: DeviceComponentSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/devicecomponent/query.js b/src/resources/1_0_2/profiles/devicecomponent/query.js index 56093a21..bc674c2f 100644 --- a/src/resources/1_0_2/profiles/devicecomponent/query.js +++ b/src/resources/1_0_2/profiles/devicecomponent/query.js @@ -1,55 +1,59 @@ // Schemas -const DeviceComponentSchema = require('../../schemas/devicecomponent.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceComponentSchema = require('../../schemas/devicecomponent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceComponentArgs = require('../../parameters/devicecomponent.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceComponentArgs = require('../../parameters/devicecomponent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DeviceComponentArgs); // Resolvers const { - devicecomponentResolver, - devicecomponentListResolver, - devicecomponentInstanceResolver, + getDeviceComponent, + getDeviceComponentList, + getDeviceComponentInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceComponent', action: 'read', - version: '1_0_2', }; /** * @name exports.DeviceComponentQuery - * @summary DeviceComponent Query. + * @summary DeviceComponent query. */ module.exports.DeviceComponentQuery = { - args: Object.assign({}, CommonArgs, DeviceComponentArgs), description: 'Query for a single DeviceComponent', - resolve: scopeInvariant(scopeOptions, devicecomponentResolver), + resolve: scopeInvariant(scopeOptions, getDeviceComponent), type: DeviceComponentSchema, + args: args, }; /** * @name exports.DeviceComponentListQuery - * @summary DeviceComponentList Query. + * @summary DeviceComponent query. */ module.exports.DeviceComponentListQuery = { - args: Object.assign({}, CommonArgs, DeviceComponentArgs), - description: 'Query for multiple DeviceComponents', - resolve: scopeInvariant(scopeOptions, devicecomponentListResolver), + description: 'Query for a more than or just one DeviceComponent', + resolve: scopeInvariant(scopeOptions, getDeviceComponentList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceComponentInstanceQuery - * @summary DeviceComponentInstance Query. + * @summary DeviceComponent query. */ module.exports.DeviceComponentInstanceQuery = { - description: 'Get information about a single DeviceComponent', - resolve: scopeInvariant(scopeOptions, devicecomponentInstanceResolver), + description: 'Access information about a single DeviceComponent', + resolve: scopeInvariant(scopeOptions, getDeviceComponentInstance), type: DeviceComponentSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/devicecomponent/index.js b/src/resources/1_0_2/profiles/devicecomponent/register.js similarity index 91% rename from src/resources/1_0_2/profiles/devicecomponent/index.js rename to src/resources/1_0_2/profiles/devicecomponent/register.js index 792065be..64b3ef16 100644 --- a/src/resources/1_0_2/profiles/devicecomponent/index.js +++ b/src/resources/1_0_2/profiles/devicecomponent/register.js @@ -1,15 +1,15 @@ +const { + DeviceComponentCreateMutation, + DeviceComponentUpdateMutation, + DeviceComponentRemoveMutation, +} = require('./mutation'); + const { DeviceComponentQuery, DeviceComponentListQuery, DeviceComponentInstanceQuery, } = require('./query'); -const { - DeviceComponentCreateMutation, - DeviceComponentUpdateMutation, - DeviceComponentDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceComponentCreate: DeviceComponentCreateMutation, DeviceComponentUpdate: DeviceComponentUpdateMutation, - DeviceComponentDelete: DeviceComponentDeleteMutation, + DeviceComponentRemove: DeviceComponentRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DeviceComponent', path: '/1_0_2/DeviceComponent/:id', query: DeviceComponentInstanceQuery, diff --git a/src/resources/1_0_2/profiles/devicecomponent/resolver.js b/src/resources/1_0_2/profiles/devicecomponent/resolver.js index 1fc2ac64..9476a417 100644 --- a/src/resources/1_0_2/profiles/devicecomponent/resolver.js +++ b/src/resources/1_0_2/profiles/devicecomponent/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.devicecomponentResolver + * @name exports.getDeviceComponent * @static - * @summary DeviceComponent Resolver. + * @summary DeviceComponent resolver. */ -module.exports.devicecomponentResolver = function devicecomponentResolver( +module.exports.getDeviceComponent = function getDeviceComponent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentListResolver + * @name exports.getDeviceComponentList * @static - * @summary DeviceComponent List Resolver. + * @summary DeviceComponent list resolver. */ -module.exports.devicecomponentListResolver = function devicecomponentListResolver( +module.exports.getDeviceComponentList = function getDeviceComponentList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentInstanceResolver + * @name exports.getDeviceComponentInstance * @static - * @summary DeviceComponent Instance Resolver. + * @summary DeviceComponent instance resolver. */ -module.exports.devicecomponentInstanceResolver = function devicecomponentInstanceResolver( +module.exports.getDeviceComponentInstance = function getDeviceComponentInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentCreateResolver + * @name exports.createDeviceComponent * @static - * @summary DeviceComponent Create Resolver. + * @summary Create DeviceComponent resolver. */ -module.exports.devicecomponentCreateResolver = function devicecomponentCreateResolver( +module.exports.createDeviceComponent = function createDeviceComponent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentUpdateResolver + * @name exports.updateDeviceComponent * @static - * @summary DeviceComponent Update Resolver. + * @summary Update DeviceComponent resolver. */ -module.exports.devicecomponentUpdateResolver = function devicecomponentUpdateResolver( +module.exports.updateDeviceComponent = function updateDeviceComponent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentDeleteResolver + * @name exports.removeDeviceComponent * @static - * @summary DeviceComponent Delete Resolver. + * @summary Remove DeviceComponent resolver. */ -module.exports.devicecomponentDeleteResolver = function devicecomponentDeleteResolver( +module.exports.removeDeviceComponent = function removeDeviceComponent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/devicemetric/mutation.js b/src/resources/1_0_2/profiles/devicemetric/mutation.js index e8d8ff67..223633e9 100644 --- a/src/resources/1_0_2/profiles/devicemetric/mutation.js +++ b/src/resources/1_0_2/profiles/devicemetric/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceMetricSchema = require('../../schemas/devicemetric.schema'); +const DeviceMetricSchema = require('../../schemas/devicemetric.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceMetricInput = require('../../inputs/devicemetric.input'); +const DeviceMetricInput = require('../../inputs/devicemetric.input.js'); -// Resolvers -const { - devicemetricCreateResolver, - devicemetricUpdateResolver, - devicemetricDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDeviceMetric, + updateDeviceMetric, + removeDeviceMetric, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceMetric', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DeviceMetric record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DeviceMetric record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DeviceMetricCreateMutation - * @summary DeviceMetricCreate Mutation. + * @summary DeviceMetricCreate mutation. */ module.exports.DeviceMetricCreateMutation = { - args: WriteArgs, - description: 'Create a DeviceMetric', - resolve: scopeInvariant(scopeOptions, devicemetricCreateResolver), + description: 'Create a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, createDeviceMetric), type: DeviceMetricSchema, + args: WriteArgs, }; /** * @name exports.DeviceMetricUpdateMutation - * @summary DeviceMetricUpdate Mutation. + * @summary DeviceMetricUpdate mutation. */ module.exports.DeviceMetricUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DeviceMetrics', - resolve: scopeInvariant(scopeOptions, devicemetricUpdateResolver), + description: 'Update a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, updateDeviceMetric), type: DeviceMetricSchema, + args: WriteArgs, }; /** - * @name exports.DeviceMetricDeleteMutation - * @summary DeviceMetricDelete Mutation. + * @name exports.DeviceMetricRemoveMutation + * @summary DeviceMetricRemove mutation. */ -module.exports.DeviceMetricDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DeviceMetric', - resolve: scopeInvariant(scopeOptions, devicemetricDeleteResolver), +module.exports.DeviceMetricRemoveMutation = { + description: 'Remove a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, removeDeviceMetric), type: DeviceMetricSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/devicemetric/query.js b/src/resources/1_0_2/profiles/devicemetric/query.js index a069bb4b..45a0e7f1 100644 --- a/src/resources/1_0_2/profiles/devicemetric/query.js +++ b/src/resources/1_0_2/profiles/devicemetric/query.js @@ -1,55 +1,59 @@ // Schemas -const DeviceMetricSchema = require('../../schemas/devicemetric.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceMetricSchema = require('../../schemas/devicemetric.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceMetricArgs = require('../../parameters/devicemetric.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceMetricArgs = require('../../parameters/devicemetric.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DeviceMetricArgs); // Resolvers const { - devicemetricResolver, - devicemetricListResolver, - devicemetricInstanceResolver, + getDeviceMetric, + getDeviceMetricList, + getDeviceMetricInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceMetric', action: 'read', - version: '1_0_2', }; /** * @name exports.DeviceMetricQuery - * @summary DeviceMetric Query. + * @summary DeviceMetric query. */ module.exports.DeviceMetricQuery = { - args: Object.assign({}, CommonArgs, DeviceMetricArgs), description: 'Query for a single DeviceMetric', - resolve: scopeInvariant(scopeOptions, devicemetricResolver), + resolve: scopeInvariant(scopeOptions, getDeviceMetric), type: DeviceMetricSchema, + args: args, }; /** * @name exports.DeviceMetricListQuery - * @summary DeviceMetricList Query. + * @summary DeviceMetric query. */ module.exports.DeviceMetricListQuery = { - args: Object.assign({}, CommonArgs, DeviceMetricArgs), - description: 'Query for multiple DeviceMetrics', - resolve: scopeInvariant(scopeOptions, devicemetricListResolver), + description: 'Query for a more than or just one DeviceMetric', + resolve: scopeInvariant(scopeOptions, getDeviceMetricList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceMetricInstanceQuery - * @summary DeviceMetricInstance Query. + * @summary DeviceMetric query. */ module.exports.DeviceMetricInstanceQuery = { - description: 'Get information about a single DeviceMetric', - resolve: scopeInvariant(scopeOptions, devicemetricInstanceResolver), + description: 'Access information about a single DeviceMetric', + resolve: scopeInvariant(scopeOptions, getDeviceMetricInstance), type: DeviceMetricSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/devicemetric/index.js b/src/resources/1_0_2/profiles/devicemetric/register.js similarity index 92% rename from src/resources/1_0_2/profiles/devicemetric/index.js rename to src/resources/1_0_2/profiles/devicemetric/register.js index 59919e7d..f94c584e 100644 --- a/src/resources/1_0_2/profiles/devicemetric/index.js +++ b/src/resources/1_0_2/profiles/devicemetric/register.js @@ -1,15 +1,15 @@ +const { + DeviceMetricCreateMutation, + DeviceMetricUpdateMutation, + DeviceMetricRemoveMutation, +} = require('./mutation'); + const { DeviceMetricQuery, DeviceMetricListQuery, DeviceMetricInstanceQuery, } = require('./query'); -const { - DeviceMetricCreateMutation, - DeviceMetricUpdateMutation, - DeviceMetricDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceMetricCreate: DeviceMetricCreateMutation, DeviceMetricUpdate: DeviceMetricUpdateMutation, - DeviceMetricDelete: DeviceMetricDeleteMutation, + DeviceMetricRemove: DeviceMetricRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DeviceMetric', path: '/1_0_2/DeviceMetric/:id', query: DeviceMetricInstanceQuery, diff --git a/src/resources/1_0_2/profiles/devicemetric/resolver.js b/src/resources/1_0_2/profiles/devicemetric/resolver.js index 657c3f0b..5e97735b 100644 --- a/src/resources/1_0_2/profiles/devicemetric/resolver.js +++ b/src/resources/1_0_2/profiles/devicemetric/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.devicemetricResolver + * @name exports.getDeviceMetric * @static - * @summary DeviceMetric Resolver. + * @summary DeviceMetric resolver. */ -module.exports.devicemetricResolver = function devicemetricResolver( +module.exports.getDeviceMetric = function getDeviceMetric( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricListResolver + * @name exports.getDeviceMetricList * @static - * @summary DeviceMetric List Resolver. + * @summary DeviceMetric list resolver. */ -module.exports.devicemetricListResolver = function devicemetricListResolver( +module.exports.getDeviceMetricList = function getDeviceMetricList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricInstanceResolver + * @name exports.getDeviceMetricInstance * @static - * @summary DeviceMetric Instance Resolver. + * @summary DeviceMetric instance resolver. */ -module.exports.devicemetricInstanceResolver = function devicemetricInstanceResolver( +module.exports.getDeviceMetricInstance = function getDeviceMetricInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricCreateResolver + * @name exports.createDeviceMetric * @static - * @summary DeviceMetric Create Resolver. + * @summary Create DeviceMetric resolver. */ -module.exports.devicemetricCreateResolver = function devicemetricCreateResolver( +module.exports.createDeviceMetric = function createDeviceMetric( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricUpdateResolver + * @name exports.updateDeviceMetric * @static - * @summary DeviceMetric Update Resolver. + * @summary Update DeviceMetric resolver. */ -module.exports.devicemetricUpdateResolver = function devicemetricUpdateResolver( +module.exports.updateDeviceMetric = function updateDeviceMetric( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricDeleteResolver + * @name exports.removeDeviceMetric * @static - * @summary DeviceMetric Delete Resolver. + * @summary Remove DeviceMetric resolver. */ -module.exports.devicemetricDeleteResolver = function devicemetricDeleteResolver( +module.exports.removeDeviceMetric = function removeDeviceMetric( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/deviceuserequest/mutation.js b/src/resources/1_0_2/profiles/deviceuserequest/mutation.js index 84923d5e..46bc6853 100644 --- a/src/resources/1_0_2/profiles/deviceuserequest/mutation.js +++ b/src/resources/1_0_2/profiles/deviceuserequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceUseRequestSchema = require('../../schemas/deviceuserequest.schema'); +const DeviceUseRequestSchema = require('../../schemas/deviceuserequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceUseRequestInput = require('../../inputs/deviceuserequest.input'); +const DeviceUseRequestInput = require('../../inputs/deviceuserequest.input.js'); -// Resolvers -const { - deviceuserequestCreateResolver, - deviceuserequestUpdateResolver, - deviceuserequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDeviceUseRequest, + updateDeviceUseRequest, + removeDeviceUseRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceUseRequest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DeviceUseRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DeviceUseRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DeviceUseRequestCreateMutation - * @summary DeviceUseRequestCreate Mutation. + * @summary DeviceUseRequestCreate mutation. */ module.exports.DeviceUseRequestCreateMutation = { - args: WriteArgs, - description: 'Create a DeviceUseRequest', - resolve: scopeInvariant(scopeOptions, deviceuserequestCreateResolver), + description: 'Create a DeviceUseRequest record', + resolve: scopeInvariant(scopeOptions, createDeviceUseRequest), type: DeviceUseRequestSchema, + args: WriteArgs, }; /** * @name exports.DeviceUseRequestUpdateMutation - * @summary DeviceUseRequestUpdate Mutation. + * @summary DeviceUseRequestUpdate mutation. */ module.exports.DeviceUseRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DeviceUseRequests', - resolve: scopeInvariant(scopeOptions, deviceuserequestUpdateResolver), + description: 'Update a DeviceUseRequest record', + resolve: scopeInvariant(scopeOptions, updateDeviceUseRequest), type: DeviceUseRequestSchema, + args: WriteArgs, }; /** - * @name exports.DeviceUseRequestDeleteMutation - * @summary DeviceUseRequestDelete Mutation. + * @name exports.DeviceUseRequestRemoveMutation + * @summary DeviceUseRequestRemove mutation. */ -module.exports.DeviceUseRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DeviceUseRequest', - resolve: scopeInvariant(scopeOptions, deviceuserequestDeleteResolver), +module.exports.DeviceUseRequestRemoveMutation = { + description: 'Remove a DeviceUseRequest record', + resolve: scopeInvariant(scopeOptions, removeDeviceUseRequest), type: DeviceUseRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/deviceuserequest/query.js b/src/resources/1_0_2/profiles/deviceuserequest/query.js index 87957f86..88bdc787 100644 --- a/src/resources/1_0_2/profiles/deviceuserequest/query.js +++ b/src/resources/1_0_2/profiles/deviceuserequest/query.js @@ -1,55 +1,59 @@ // Schemas -const DeviceUseRequestSchema = require('../../schemas/deviceuserequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceUseRequestSchema = require('../../schemas/deviceuserequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceUseRequestArgs = require('../../parameters/deviceuserequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceUseRequestArgs = require('../../parameters/deviceuserequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DeviceUseRequestArgs); // Resolvers const { - deviceuserequestResolver, - deviceuserequestListResolver, - deviceuserequestInstanceResolver, + getDeviceUseRequest, + getDeviceUseRequestList, + getDeviceUseRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceUseRequest', action: 'read', - version: '1_0_2', }; /** * @name exports.DeviceUseRequestQuery - * @summary DeviceUseRequest Query. + * @summary DeviceUseRequest query. */ module.exports.DeviceUseRequestQuery = { - args: Object.assign({}, CommonArgs, DeviceUseRequestArgs), description: 'Query for a single DeviceUseRequest', - resolve: scopeInvariant(scopeOptions, deviceuserequestResolver), + resolve: scopeInvariant(scopeOptions, getDeviceUseRequest), type: DeviceUseRequestSchema, + args: args, }; /** * @name exports.DeviceUseRequestListQuery - * @summary DeviceUseRequestList Query. + * @summary DeviceUseRequest query. */ module.exports.DeviceUseRequestListQuery = { - args: Object.assign({}, CommonArgs, DeviceUseRequestArgs), - description: 'Query for multiple DeviceUseRequests', - resolve: scopeInvariant(scopeOptions, deviceuserequestListResolver), + description: 'Query for a more than or just one DeviceUseRequest', + resolve: scopeInvariant(scopeOptions, getDeviceUseRequestList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceUseRequestInstanceQuery - * @summary DeviceUseRequestInstance Query. + * @summary DeviceUseRequest query. */ module.exports.DeviceUseRequestInstanceQuery = { - description: 'Get information about a single DeviceUseRequest', - resolve: scopeInvariant(scopeOptions, deviceuserequestInstanceResolver), + description: 'Access information about a single DeviceUseRequest', + resolve: scopeInvariant(scopeOptions, getDeviceUseRequestInstance), type: DeviceUseRequestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/deviceuserequest/index.js b/src/resources/1_0_2/profiles/deviceuserequest/register.js similarity index 91% rename from src/resources/1_0_2/profiles/deviceuserequest/index.js rename to src/resources/1_0_2/profiles/deviceuserequest/register.js index 49afd512..3abef95b 100644 --- a/src/resources/1_0_2/profiles/deviceuserequest/index.js +++ b/src/resources/1_0_2/profiles/deviceuserequest/register.js @@ -1,15 +1,15 @@ +const { + DeviceUseRequestCreateMutation, + DeviceUseRequestUpdateMutation, + DeviceUseRequestRemoveMutation, +} = require('./mutation'); + const { DeviceUseRequestQuery, DeviceUseRequestListQuery, DeviceUseRequestInstanceQuery, } = require('./query'); -const { - DeviceUseRequestCreateMutation, - DeviceUseRequestUpdateMutation, - DeviceUseRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceUseRequestCreate: DeviceUseRequestCreateMutation, DeviceUseRequestUpdate: DeviceUseRequestUpdateMutation, - DeviceUseRequestDelete: DeviceUseRequestDeleteMutation, + DeviceUseRequestRemove: DeviceUseRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DeviceUseRequest', path: '/1_0_2/DeviceUseRequest/:id', query: DeviceUseRequestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/deviceuserequest/resolver.js b/src/resources/1_0_2/profiles/deviceuserequest/resolver.js index 49aa1f4a..b885725e 100644 --- a/src/resources/1_0_2/profiles/deviceuserequest/resolver.js +++ b/src/resources/1_0_2/profiles/deviceuserequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.deviceuserequestResolver + * @name exports.getDeviceUseRequest * @static - * @summary DeviceUseRequest Resolver. + * @summary DeviceUseRequest resolver. */ -module.exports.deviceuserequestResolver = function deviceuserequestResolver( +module.exports.getDeviceUseRequest = function getDeviceUseRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceuserequestListResolver + * @name exports.getDeviceUseRequestList * @static - * @summary DeviceUseRequest List Resolver. + * @summary DeviceUseRequest list resolver. */ -module.exports.deviceuserequestListResolver = function deviceuserequestListResolver( +module.exports.getDeviceUseRequestList = function getDeviceUseRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceuserequestInstanceResolver + * @name exports.getDeviceUseRequestInstance * @static - * @summary DeviceUseRequest Instance Resolver. + * @summary DeviceUseRequest instance resolver. */ -module.exports.deviceuserequestInstanceResolver = function deviceuserequestInstanceResolver( +module.exports.getDeviceUseRequestInstance = function getDeviceUseRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceuserequestCreateResolver + * @name exports.createDeviceUseRequest * @static - * @summary DeviceUseRequest Create Resolver. + * @summary Create DeviceUseRequest resolver. */ -module.exports.deviceuserequestCreateResolver = function deviceuserequestCreateResolver( +module.exports.createDeviceUseRequest = function createDeviceUseRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceuserequestUpdateResolver + * @name exports.updateDeviceUseRequest * @static - * @summary DeviceUseRequest Update Resolver. + * @summary Update DeviceUseRequest resolver. */ -module.exports.deviceuserequestUpdateResolver = function deviceuserequestUpdateResolver( +module.exports.updateDeviceUseRequest = function updateDeviceUseRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceuserequestDeleteResolver + * @name exports.removeDeviceUseRequest * @static - * @summary DeviceUseRequest Delete Resolver. + * @summary Remove DeviceUseRequest resolver. */ -module.exports.deviceuserequestDeleteResolver = function deviceuserequestDeleteResolver( +module.exports.removeDeviceUseRequest = function removeDeviceUseRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/deviceusestatement/mutation.js b/src/resources/1_0_2/profiles/deviceusestatement/mutation.js index 37987e3f..f388e8f1 100644 --- a/src/resources/1_0_2/profiles/deviceusestatement/mutation.js +++ b/src/resources/1_0_2/profiles/deviceusestatement/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema'); +const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceUseStatementInput = require('../../inputs/deviceusestatement.input'); +const DeviceUseStatementInput = require('../../inputs/deviceusestatement.input.js'); -// Resolvers -const { - deviceusestatementCreateResolver, - deviceusestatementUpdateResolver, - deviceusestatementDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDeviceUseStatement, + updateDeviceUseStatement, + removeDeviceUseStatement, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceUseStatement', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DeviceUseStatement record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DeviceUseStatement record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DeviceUseStatementCreateMutation - * @summary DeviceUseStatementCreate Mutation. + * @summary DeviceUseStatementCreate mutation. */ module.exports.DeviceUseStatementCreateMutation = { - args: WriteArgs, - description: 'Create a DeviceUseStatement', - resolve: scopeInvariant(scopeOptions, deviceusestatementCreateResolver), + description: 'Create a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, createDeviceUseStatement), type: DeviceUseStatementSchema, + args: WriteArgs, }; /** * @name exports.DeviceUseStatementUpdateMutation - * @summary DeviceUseStatementUpdate Mutation. + * @summary DeviceUseStatementUpdate mutation. */ module.exports.DeviceUseStatementUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DeviceUseStatements', - resolve: scopeInvariant(scopeOptions, deviceusestatementUpdateResolver), + description: 'Update a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, updateDeviceUseStatement), type: DeviceUseStatementSchema, + args: WriteArgs, }; /** - * @name exports.DeviceUseStatementDeleteMutation - * @summary DeviceUseStatementDelete Mutation. + * @name exports.DeviceUseStatementRemoveMutation + * @summary DeviceUseStatementRemove mutation. */ -module.exports.DeviceUseStatementDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DeviceUseStatement', - resolve: scopeInvariant(scopeOptions, deviceusestatementDeleteResolver), +module.exports.DeviceUseStatementRemoveMutation = { + description: 'Remove a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, removeDeviceUseStatement), type: DeviceUseStatementSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/deviceusestatement/query.js b/src/resources/1_0_2/profiles/deviceusestatement/query.js index a9f7e4ea..736e3e1a 100644 --- a/src/resources/1_0_2/profiles/deviceusestatement/query.js +++ b/src/resources/1_0_2/profiles/deviceusestatement/query.js @@ -1,55 +1,59 @@ // Schemas -const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceUseStatementArgs = require('../../parameters/deviceusestatement.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceUseStatementArgs = require('../../parameters/deviceusestatement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DeviceUseStatementArgs); // Resolvers const { - deviceusestatementResolver, - deviceusestatementListResolver, - deviceusestatementInstanceResolver, + getDeviceUseStatement, + getDeviceUseStatementList, + getDeviceUseStatementInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceUseStatement', action: 'read', - version: '1_0_2', }; /** * @name exports.DeviceUseStatementQuery - * @summary DeviceUseStatement Query. + * @summary DeviceUseStatement query. */ module.exports.DeviceUseStatementQuery = { - args: Object.assign({}, CommonArgs, DeviceUseStatementArgs), description: 'Query for a single DeviceUseStatement', - resolve: scopeInvariant(scopeOptions, deviceusestatementResolver), + resolve: scopeInvariant(scopeOptions, getDeviceUseStatement), type: DeviceUseStatementSchema, + args: args, }; /** * @name exports.DeviceUseStatementListQuery - * @summary DeviceUseStatementList Query. + * @summary DeviceUseStatement query. */ module.exports.DeviceUseStatementListQuery = { - args: Object.assign({}, CommonArgs, DeviceUseStatementArgs), - description: 'Query for multiple DeviceUseStatements', - resolve: scopeInvariant(scopeOptions, deviceusestatementListResolver), + description: 'Query for a more than or just one DeviceUseStatement', + resolve: scopeInvariant(scopeOptions, getDeviceUseStatementList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceUseStatementInstanceQuery - * @summary DeviceUseStatementInstance Query. + * @summary DeviceUseStatement query. */ module.exports.DeviceUseStatementInstanceQuery = { - description: 'Get information about a single DeviceUseStatement', - resolve: scopeInvariant(scopeOptions, deviceusestatementInstanceResolver), + description: 'Access information about a single DeviceUseStatement', + resolve: scopeInvariant(scopeOptions, getDeviceUseStatementInstance), type: DeviceUseStatementSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/deviceusestatement/index.js b/src/resources/1_0_2/profiles/deviceusestatement/register.js similarity index 91% rename from src/resources/1_0_2/profiles/deviceusestatement/index.js rename to src/resources/1_0_2/profiles/deviceusestatement/register.js index a9ecf077..ad720d5d 100644 --- a/src/resources/1_0_2/profiles/deviceusestatement/index.js +++ b/src/resources/1_0_2/profiles/deviceusestatement/register.js @@ -1,15 +1,15 @@ +const { + DeviceUseStatementCreateMutation, + DeviceUseStatementUpdateMutation, + DeviceUseStatementRemoveMutation, +} = require('./mutation'); + const { DeviceUseStatementQuery, DeviceUseStatementListQuery, DeviceUseStatementInstanceQuery, } = require('./query'); -const { - DeviceUseStatementCreateMutation, - DeviceUseStatementUpdateMutation, - DeviceUseStatementDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceUseStatementCreate: DeviceUseStatementCreateMutation, DeviceUseStatementUpdate: DeviceUseStatementUpdateMutation, - DeviceUseStatementDelete: DeviceUseStatementDeleteMutation, + DeviceUseStatementRemove: DeviceUseStatementRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DeviceUseStatement', path: '/1_0_2/DeviceUseStatement/:id', query: DeviceUseStatementInstanceQuery, diff --git a/src/resources/1_0_2/profiles/deviceusestatement/resolver.js b/src/resources/1_0_2/profiles/deviceusestatement/resolver.js index 5abebed7..d584494d 100644 --- a/src/resources/1_0_2/profiles/deviceusestatement/resolver.js +++ b/src/resources/1_0_2/profiles/deviceusestatement/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.deviceusestatementResolver + * @name exports.getDeviceUseStatement * @static - * @summary DeviceUseStatement Resolver. + * @summary DeviceUseStatement resolver. */ -module.exports.deviceusestatementResolver = function deviceusestatementResolver( +module.exports.getDeviceUseStatement = function getDeviceUseStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementListResolver + * @name exports.getDeviceUseStatementList * @static - * @summary DeviceUseStatement List Resolver. + * @summary DeviceUseStatement list resolver. */ -module.exports.deviceusestatementListResolver = function deviceusestatementListResolver( +module.exports.getDeviceUseStatementList = function getDeviceUseStatementList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementInstanceResolver + * @name exports.getDeviceUseStatementInstance * @static - * @summary DeviceUseStatement Instance Resolver. + * @summary DeviceUseStatement instance resolver. */ -module.exports.deviceusestatementInstanceResolver = function deviceusestatementInstanceResolver( +module.exports.getDeviceUseStatementInstance = function getDeviceUseStatementInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementCreateResolver + * @name exports.createDeviceUseStatement * @static - * @summary DeviceUseStatement Create Resolver. + * @summary Create DeviceUseStatement resolver. */ -module.exports.deviceusestatementCreateResolver = function deviceusestatementCreateResolver( +module.exports.createDeviceUseStatement = function createDeviceUseStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementUpdateResolver + * @name exports.updateDeviceUseStatement * @static - * @summary DeviceUseStatement Update Resolver. + * @summary Update DeviceUseStatement resolver. */ -module.exports.deviceusestatementUpdateResolver = function deviceusestatementUpdateResolver( +module.exports.updateDeviceUseStatement = function updateDeviceUseStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementDeleteResolver + * @name exports.removeDeviceUseStatement * @static - * @summary DeviceUseStatement Delete Resolver. + * @summary Remove DeviceUseStatement resolver. */ -module.exports.deviceusestatementDeleteResolver = function deviceusestatementDeleteResolver( +module.exports.removeDeviceUseStatement = function removeDeviceUseStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/diagnosticorder/mutation.js b/src/resources/1_0_2/profiles/diagnosticorder/mutation.js index 21fbc2a8..b964d8ce 100644 --- a/src/resources/1_0_2/profiles/diagnosticorder/mutation.js +++ b/src/resources/1_0_2/profiles/diagnosticorder/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DiagnosticOrderSchema = require('../../schemas/diagnosticorder.schema'); +const DiagnosticOrderSchema = require('../../schemas/diagnosticorder.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DiagnosticOrderInput = require('../../inputs/diagnosticorder.input'); +const DiagnosticOrderInput = require('../../inputs/diagnosticorder.input.js'); -// Resolvers -const { - diagnosticorderCreateResolver, - diagnosticorderUpdateResolver, - diagnosticorderDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDiagnosticOrder, + updateDiagnosticOrder, + removeDiagnosticOrder, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DiagnosticOrder', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DiagnosticOrder record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DiagnosticOrder record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DiagnosticOrderCreateMutation - * @summary DiagnosticOrderCreate Mutation. + * @summary DiagnosticOrderCreate mutation. */ module.exports.DiagnosticOrderCreateMutation = { - args: WriteArgs, - description: 'Create a DiagnosticOrder', - resolve: scopeInvariant(scopeOptions, diagnosticorderCreateResolver), + description: 'Create a DiagnosticOrder record', + resolve: scopeInvariant(scopeOptions, createDiagnosticOrder), type: DiagnosticOrderSchema, + args: WriteArgs, }; /** * @name exports.DiagnosticOrderUpdateMutation - * @summary DiagnosticOrderUpdate Mutation. + * @summary DiagnosticOrderUpdate mutation. */ module.exports.DiagnosticOrderUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DiagnosticOrders', - resolve: scopeInvariant(scopeOptions, diagnosticorderUpdateResolver), + description: 'Update a DiagnosticOrder record', + resolve: scopeInvariant(scopeOptions, updateDiagnosticOrder), type: DiagnosticOrderSchema, + args: WriteArgs, }; /** - * @name exports.DiagnosticOrderDeleteMutation - * @summary DiagnosticOrderDelete Mutation. + * @name exports.DiagnosticOrderRemoveMutation + * @summary DiagnosticOrderRemove mutation. */ -module.exports.DiagnosticOrderDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DiagnosticOrder', - resolve: scopeInvariant(scopeOptions, diagnosticorderDeleteResolver), +module.exports.DiagnosticOrderRemoveMutation = { + description: 'Remove a DiagnosticOrder record', + resolve: scopeInvariant(scopeOptions, removeDiagnosticOrder), type: DiagnosticOrderSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/diagnosticorder/query.js b/src/resources/1_0_2/profiles/diagnosticorder/query.js index 05f1d1e7..97636d24 100644 --- a/src/resources/1_0_2/profiles/diagnosticorder/query.js +++ b/src/resources/1_0_2/profiles/diagnosticorder/query.js @@ -1,55 +1,59 @@ // Schemas -const DiagnosticOrderSchema = require('../../schemas/diagnosticorder.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DiagnosticOrderSchema = require('../../schemas/diagnosticorder.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DiagnosticOrderArgs = require('../../parameters/diagnosticorder.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DiagnosticOrderArgs = require('../../parameters/diagnosticorder.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DiagnosticOrderArgs); // Resolvers const { - diagnosticorderResolver, - diagnosticorderListResolver, - diagnosticorderInstanceResolver, + getDiagnosticOrder, + getDiagnosticOrderList, + getDiagnosticOrderInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DiagnosticOrder', action: 'read', - version: '1_0_2', }; /** * @name exports.DiagnosticOrderQuery - * @summary DiagnosticOrder Query. + * @summary DiagnosticOrder query. */ module.exports.DiagnosticOrderQuery = { - args: Object.assign({}, CommonArgs, DiagnosticOrderArgs), description: 'Query for a single DiagnosticOrder', - resolve: scopeInvariant(scopeOptions, diagnosticorderResolver), + resolve: scopeInvariant(scopeOptions, getDiagnosticOrder), type: DiagnosticOrderSchema, + args: args, }; /** * @name exports.DiagnosticOrderListQuery - * @summary DiagnosticOrderList Query. + * @summary DiagnosticOrder query. */ module.exports.DiagnosticOrderListQuery = { - args: Object.assign({}, CommonArgs, DiagnosticOrderArgs), - description: 'Query for multiple DiagnosticOrders', - resolve: scopeInvariant(scopeOptions, diagnosticorderListResolver), + description: 'Query for a more than or just one DiagnosticOrder', + resolve: scopeInvariant(scopeOptions, getDiagnosticOrderList), type: BundleSchema, + args: args, }; /** * @name exports.DiagnosticOrderInstanceQuery - * @summary DiagnosticOrderInstance Query. + * @summary DiagnosticOrder query. */ module.exports.DiagnosticOrderInstanceQuery = { - description: 'Get information about a single DiagnosticOrder', - resolve: scopeInvariant(scopeOptions, diagnosticorderInstanceResolver), + description: 'Access information about a single DiagnosticOrder', + resolve: scopeInvariant(scopeOptions, getDiagnosticOrderInstance), type: DiagnosticOrderSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/diagnosticorder/index.js b/src/resources/1_0_2/profiles/diagnosticorder/register.js similarity index 91% rename from src/resources/1_0_2/profiles/diagnosticorder/index.js rename to src/resources/1_0_2/profiles/diagnosticorder/register.js index d50d32d1..a1271600 100644 --- a/src/resources/1_0_2/profiles/diagnosticorder/index.js +++ b/src/resources/1_0_2/profiles/diagnosticorder/register.js @@ -1,15 +1,15 @@ +const { + DiagnosticOrderCreateMutation, + DiagnosticOrderUpdateMutation, + DiagnosticOrderRemoveMutation, +} = require('./mutation'); + const { DiagnosticOrderQuery, DiagnosticOrderListQuery, DiagnosticOrderInstanceQuery, } = require('./query'); -const { - DiagnosticOrderCreateMutation, - DiagnosticOrderUpdateMutation, - DiagnosticOrderDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DiagnosticOrderCreate: DiagnosticOrderCreateMutation, DiagnosticOrderUpdate: DiagnosticOrderUpdateMutation, - DiagnosticOrderDelete: DiagnosticOrderDeleteMutation, + DiagnosticOrderRemove: DiagnosticOrderRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DiagnosticOrder', path: '/1_0_2/DiagnosticOrder/:id', query: DiagnosticOrderInstanceQuery, diff --git a/src/resources/1_0_2/profiles/diagnosticorder/resolver.js b/src/resources/1_0_2/profiles/diagnosticorder/resolver.js index 6dc8410f..216fddc8 100644 --- a/src/resources/1_0_2/profiles/diagnosticorder/resolver.js +++ b/src/resources/1_0_2/profiles/diagnosticorder/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.diagnosticorderResolver + * @name exports.getDiagnosticOrder * @static - * @summary DiagnosticOrder Resolver. + * @summary DiagnosticOrder resolver. */ -module.exports.diagnosticorderResolver = function diagnosticorderResolver( +module.exports.getDiagnosticOrder = function getDiagnosticOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticorderListResolver + * @name exports.getDiagnosticOrderList * @static - * @summary DiagnosticOrder List Resolver. + * @summary DiagnosticOrder list resolver. */ -module.exports.diagnosticorderListResolver = function diagnosticorderListResolver( +module.exports.getDiagnosticOrderList = function getDiagnosticOrderList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticorderInstanceResolver + * @name exports.getDiagnosticOrderInstance * @static - * @summary DiagnosticOrder Instance Resolver. + * @summary DiagnosticOrder instance resolver. */ -module.exports.diagnosticorderInstanceResolver = function diagnosticorderInstanceResolver( +module.exports.getDiagnosticOrderInstance = function getDiagnosticOrderInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticorderCreateResolver + * @name exports.createDiagnosticOrder * @static - * @summary DiagnosticOrder Create Resolver. + * @summary Create DiagnosticOrder resolver. */ -module.exports.diagnosticorderCreateResolver = function diagnosticorderCreateResolver( +module.exports.createDiagnosticOrder = function createDiagnosticOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticorderUpdateResolver + * @name exports.updateDiagnosticOrder * @static - * @summary DiagnosticOrder Update Resolver. + * @summary Update DiagnosticOrder resolver. */ -module.exports.diagnosticorderUpdateResolver = function diagnosticorderUpdateResolver( +module.exports.updateDiagnosticOrder = function updateDiagnosticOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticorderDeleteResolver + * @name exports.removeDiagnosticOrder * @static - * @summary DiagnosticOrder Delete Resolver. + * @summary Remove DiagnosticOrder resolver. */ -module.exports.diagnosticorderDeleteResolver = function diagnosticorderDeleteResolver( +module.exports.removeDiagnosticOrder = function removeDiagnosticOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/diagnosticreport/mutation.js b/src/resources/1_0_2/profiles/diagnosticreport/mutation.js index 367a124f..5b4c3813 100644 --- a/src/resources/1_0_2/profiles/diagnosticreport/mutation.js +++ b/src/resources/1_0_2/profiles/diagnosticreport/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema'); +const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DiagnosticReportInput = require('../../inputs/diagnosticreport.input'); +const DiagnosticReportInput = require('../../inputs/diagnosticreport.input.js'); -// Resolvers -const { - diagnosticreportCreateResolver, - diagnosticreportUpdateResolver, - diagnosticreportDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDiagnosticReport, + updateDiagnosticReport, + removeDiagnosticReport, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DiagnosticReport', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DiagnosticReport record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DiagnosticReport record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DiagnosticReportCreateMutation - * @summary DiagnosticReportCreate Mutation. + * @summary DiagnosticReportCreate mutation. */ module.exports.DiagnosticReportCreateMutation = { - args: WriteArgs, - description: 'Create a DiagnosticReport', - resolve: scopeInvariant(scopeOptions, diagnosticreportCreateResolver), + description: 'Create a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, createDiagnosticReport), type: DiagnosticReportSchema, + args: WriteArgs, }; /** * @name exports.DiagnosticReportUpdateMutation - * @summary DiagnosticReportUpdate Mutation. + * @summary DiagnosticReportUpdate mutation. */ module.exports.DiagnosticReportUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DiagnosticReports', - resolve: scopeInvariant(scopeOptions, diagnosticreportUpdateResolver), + description: 'Update a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, updateDiagnosticReport), type: DiagnosticReportSchema, + args: WriteArgs, }; /** - * @name exports.DiagnosticReportDeleteMutation - * @summary DiagnosticReportDelete Mutation. + * @name exports.DiagnosticReportRemoveMutation + * @summary DiagnosticReportRemove mutation. */ -module.exports.DiagnosticReportDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DiagnosticReport', - resolve: scopeInvariant(scopeOptions, diagnosticreportDeleteResolver), +module.exports.DiagnosticReportRemoveMutation = { + description: 'Remove a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, removeDiagnosticReport), type: DiagnosticReportSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/diagnosticreport/query.js b/src/resources/1_0_2/profiles/diagnosticreport/query.js index be5a09eb..2107a855 100644 --- a/src/resources/1_0_2/profiles/diagnosticreport/query.js +++ b/src/resources/1_0_2/profiles/diagnosticreport/query.js @@ -1,55 +1,59 @@ // Schemas -const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DiagnosticReportArgs = require('../../parameters/diagnosticreport.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DiagnosticReportArgs = require('../../parameters/diagnosticreport.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DiagnosticReportArgs); // Resolvers const { - diagnosticreportResolver, - diagnosticreportListResolver, - diagnosticreportInstanceResolver, + getDiagnosticReport, + getDiagnosticReportList, + getDiagnosticReportInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DiagnosticReport', action: 'read', - version: '1_0_2', }; /** * @name exports.DiagnosticReportQuery - * @summary DiagnosticReport Query. + * @summary DiagnosticReport query. */ module.exports.DiagnosticReportQuery = { - args: Object.assign({}, CommonArgs, DiagnosticReportArgs), description: 'Query for a single DiagnosticReport', - resolve: scopeInvariant(scopeOptions, diagnosticreportResolver), + resolve: scopeInvariant(scopeOptions, getDiagnosticReport), type: DiagnosticReportSchema, + args: args, }; /** * @name exports.DiagnosticReportListQuery - * @summary DiagnosticReportList Query. + * @summary DiagnosticReport query. */ module.exports.DiagnosticReportListQuery = { - args: Object.assign({}, CommonArgs, DiagnosticReportArgs), - description: 'Query for multiple DiagnosticReports', - resolve: scopeInvariant(scopeOptions, diagnosticreportListResolver), + description: 'Query for a more than or just one DiagnosticReport', + resolve: scopeInvariant(scopeOptions, getDiagnosticReportList), type: BundleSchema, + args: args, }; /** * @name exports.DiagnosticReportInstanceQuery - * @summary DiagnosticReportInstance Query. + * @summary DiagnosticReport query. */ module.exports.DiagnosticReportInstanceQuery = { - description: 'Get information about a single DiagnosticReport', - resolve: scopeInvariant(scopeOptions, diagnosticreportInstanceResolver), + description: 'Access information about a single DiagnosticReport', + resolve: scopeInvariant(scopeOptions, getDiagnosticReportInstance), type: DiagnosticReportSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/diagnosticreport/index.js b/src/resources/1_0_2/profiles/diagnosticreport/register.js similarity index 91% rename from src/resources/1_0_2/profiles/diagnosticreport/index.js rename to src/resources/1_0_2/profiles/diagnosticreport/register.js index 3abb5829..d0f71ef4 100644 --- a/src/resources/1_0_2/profiles/diagnosticreport/index.js +++ b/src/resources/1_0_2/profiles/diagnosticreport/register.js @@ -1,15 +1,15 @@ +const { + DiagnosticReportCreateMutation, + DiagnosticReportUpdateMutation, + DiagnosticReportRemoveMutation, +} = require('./mutation'); + const { DiagnosticReportQuery, DiagnosticReportListQuery, DiagnosticReportInstanceQuery, } = require('./query'); -const { - DiagnosticReportCreateMutation, - DiagnosticReportUpdateMutation, - DiagnosticReportDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DiagnosticReportCreate: DiagnosticReportCreateMutation, DiagnosticReportUpdate: DiagnosticReportUpdateMutation, - DiagnosticReportDelete: DiagnosticReportDeleteMutation, + DiagnosticReportRemove: DiagnosticReportRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DiagnosticReport', path: '/1_0_2/DiagnosticReport/:id', query: DiagnosticReportInstanceQuery, diff --git a/src/resources/1_0_2/profiles/diagnosticreport/resolver.js b/src/resources/1_0_2/profiles/diagnosticreport/resolver.js index 46ca320c..f6f41b5f 100644 --- a/src/resources/1_0_2/profiles/diagnosticreport/resolver.js +++ b/src/resources/1_0_2/profiles/diagnosticreport/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.diagnosticreportResolver + * @name exports.getDiagnosticReport * @static - * @summary DiagnosticReport Resolver. + * @summary DiagnosticReport resolver. */ -module.exports.diagnosticreportResolver = function diagnosticreportResolver( +module.exports.getDiagnosticReport = function getDiagnosticReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportListResolver + * @name exports.getDiagnosticReportList * @static - * @summary DiagnosticReport List Resolver. + * @summary DiagnosticReport list resolver. */ -module.exports.diagnosticreportListResolver = function diagnosticreportListResolver( +module.exports.getDiagnosticReportList = function getDiagnosticReportList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportInstanceResolver + * @name exports.getDiagnosticReportInstance * @static - * @summary DiagnosticReport Instance Resolver. + * @summary DiagnosticReport instance resolver. */ -module.exports.diagnosticreportInstanceResolver = function diagnosticreportInstanceResolver( +module.exports.getDiagnosticReportInstance = function getDiagnosticReportInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportCreateResolver + * @name exports.createDiagnosticReport * @static - * @summary DiagnosticReport Create Resolver. + * @summary Create DiagnosticReport resolver. */ -module.exports.diagnosticreportCreateResolver = function diagnosticreportCreateResolver( +module.exports.createDiagnosticReport = function createDiagnosticReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportUpdateResolver + * @name exports.updateDiagnosticReport * @static - * @summary DiagnosticReport Update Resolver. + * @summary Update DiagnosticReport resolver. */ -module.exports.diagnosticreportUpdateResolver = function diagnosticreportUpdateResolver( +module.exports.updateDiagnosticReport = function updateDiagnosticReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportDeleteResolver + * @name exports.removeDiagnosticReport * @static - * @summary DiagnosticReport Delete Resolver. + * @summary Remove DiagnosticReport resolver. */ -module.exports.diagnosticreportDeleteResolver = function diagnosticreportDeleteResolver( +module.exports.removeDiagnosticReport = function removeDiagnosticReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/documentmanifest/mutation.js b/src/resources/1_0_2/profiles/documentmanifest/mutation.js index 72a240cd..8f83476c 100644 --- a/src/resources/1_0_2/profiles/documentmanifest/mutation.js +++ b/src/resources/1_0_2/profiles/documentmanifest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DocumentManifestSchema = require('../../schemas/documentmanifest.schema'); +const DocumentManifestSchema = require('../../schemas/documentmanifest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DocumentManifestInput = require('../../inputs/documentmanifest.input'); +const DocumentManifestInput = require('../../inputs/documentmanifest.input.js'); -// Resolvers -const { - documentmanifestCreateResolver, - documentmanifestUpdateResolver, - documentmanifestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDocumentManifest, + updateDocumentManifest, + removeDocumentManifest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DocumentManifest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DocumentManifest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DocumentManifest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DocumentManifestCreateMutation - * @summary DocumentManifestCreate Mutation. + * @summary DocumentManifestCreate mutation. */ module.exports.DocumentManifestCreateMutation = { - args: WriteArgs, - description: 'Create a DocumentManifest', - resolve: scopeInvariant(scopeOptions, documentmanifestCreateResolver), + description: 'Create a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, createDocumentManifest), type: DocumentManifestSchema, + args: WriteArgs, }; /** * @name exports.DocumentManifestUpdateMutation - * @summary DocumentManifestUpdate Mutation. + * @summary DocumentManifestUpdate mutation. */ module.exports.DocumentManifestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DocumentManifests', - resolve: scopeInvariant(scopeOptions, documentmanifestUpdateResolver), + description: 'Update a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, updateDocumentManifest), type: DocumentManifestSchema, + args: WriteArgs, }; /** - * @name exports.DocumentManifestDeleteMutation - * @summary DocumentManifestDelete Mutation. + * @name exports.DocumentManifestRemoveMutation + * @summary DocumentManifestRemove mutation. */ -module.exports.DocumentManifestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DocumentManifest', - resolve: scopeInvariant(scopeOptions, documentmanifestDeleteResolver), +module.exports.DocumentManifestRemoveMutation = { + description: 'Remove a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, removeDocumentManifest), type: DocumentManifestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/documentmanifest/query.js b/src/resources/1_0_2/profiles/documentmanifest/query.js index ef92203f..ccb984d0 100644 --- a/src/resources/1_0_2/profiles/documentmanifest/query.js +++ b/src/resources/1_0_2/profiles/documentmanifest/query.js @@ -1,55 +1,59 @@ // Schemas -const DocumentManifestSchema = require('../../schemas/documentmanifest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DocumentManifestSchema = require('../../schemas/documentmanifest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DocumentManifestArgs = require('../../parameters/documentmanifest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DocumentManifestArgs = require('../../parameters/documentmanifest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DocumentManifestArgs); // Resolvers const { - documentmanifestResolver, - documentmanifestListResolver, - documentmanifestInstanceResolver, + getDocumentManifest, + getDocumentManifestList, + getDocumentManifestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DocumentManifest', action: 'read', - version: '1_0_2', }; /** * @name exports.DocumentManifestQuery - * @summary DocumentManifest Query. + * @summary DocumentManifest query. */ module.exports.DocumentManifestQuery = { - args: Object.assign({}, CommonArgs, DocumentManifestArgs), description: 'Query for a single DocumentManifest', - resolve: scopeInvariant(scopeOptions, documentmanifestResolver), + resolve: scopeInvariant(scopeOptions, getDocumentManifest), type: DocumentManifestSchema, + args: args, }; /** * @name exports.DocumentManifestListQuery - * @summary DocumentManifestList Query. + * @summary DocumentManifest query. */ module.exports.DocumentManifestListQuery = { - args: Object.assign({}, CommonArgs, DocumentManifestArgs), - description: 'Query for multiple DocumentManifests', - resolve: scopeInvariant(scopeOptions, documentmanifestListResolver), + description: 'Query for a more than or just one DocumentManifest', + resolve: scopeInvariant(scopeOptions, getDocumentManifestList), type: BundleSchema, + args: args, }; /** * @name exports.DocumentManifestInstanceQuery - * @summary DocumentManifestInstance Query. + * @summary DocumentManifest query. */ module.exports.DocumentManifestInstanceQuery = { - description: 'Get information about a single DocumentManifest', - resolve: scopeInvariant(scopeOptions, documentmanifestInstanceResolver), + description: 'Access information about a single DocumentManifest', + resolve: scopeInvariant(scopeOptions, getDocumentManifestInstance), type: DocumentManifestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/documentmanifest/index.js b/src/resources/1_0_2/profiles/documentmanifest/register.js similarity index 91% rename from src/resources/1_0_2/profiles/documentmanifest/index.js rename to src/resources/1_0_2/profiles/documentmanifest/register.js index 40230d3f..c5ed13b1 100644 --- a/src/resources/1_0_2/profiles/documentmanifest/index.js +++ b/src/resources/1_0_2/profiles/documentmanifest/register.js @@ -1,15 +1,15 @@ +const { + DocumentManifestCreateMutation, + DocumentManifestUpdateMutation, + DocumentManifestRemoveMutation, +} = require('./mutation'); + const { DocumentManifestQuery, DocumentManifestListQuery, DocumentManifestInstanceQuery, } = require('./query'); -const { - DocumentManifestCreateMutation, - DocumentManifestUpdateMutation, - DocumentManifestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DocumentManifestCreate: DocumentManifestCreateMutation, DocumentManifestUpdate: DocumentManifestUpdateMutation, - DocumentManifestDelete: DocumentManifestDeleteMutation, + DocumentManifestRemove: DocumentManifestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DocumentManifest', path: '/1_0_2/DocumentManifest/:id', query: DocumentManifestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/documentmanifest/resolver.js b/src/resources/1_0_2/profiles/documentmanifest/resolver.js index b1daeba4..ef4bbe3a 100644 --- a/src/resources/1_0_2/profiles/documentmanifest/resolver.js +++ b/src/resources/1_0_2/profiles/documentmanifest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.documentmanifestResolver + * @name exports.getDocumentManifest * @static - * @summary DocumentManifest Resolver. + * @summary DocumentManifest resolver. */ -module.exports.documentmanifestResolver = function documentmanifestResolver( +module.exports.getDocumentManifest = function getDocumentManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestListResolver + * @name exports.getDocumentManifestList * @static - * @summary DocumentManifest List Resolver. + * @summary DocumentManifest list resolver. */ -module.exports.documentmanifestListResolver = function documentmanifestListResolver( +module.exports.getDocumentManifestList = function getDocumentManifestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestInstanceResolver + * @name exports.getDocumentManifestInstance * @static - * @summary DocumentManifest Instance Resolver. + * @summary DocumentManifest instance resolver. */ -module.exports.documentmanifestInstanceResolver = function documentmanifestInstanceResolver( +module.exports.getDocumentManifestInstance = function getDocumentManifestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestCreateResolver + * @name exports.createDocumentManifest * @static - * @summary DocumentManifest Create Resolver. + * @summary Create DocumentManifest resolver. */ -module.exports.documentmanifestCreateResolver = function documentmanifestCreateResolver( +module.exports.createDocumentManifest = function createDocumentManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestUpdateResolver + * @name exports.updateDocumentManifest * @static - * @summary DocumentManifest Update Resolver. + * @summary Update DocumentManifest resolver. */ -module.exports.documentmanifestUpdateResolver = function documentmanifestUpdateResolver( +module.exports.updateDocumentManifest = function updateDocumentManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestDeleteResolver + * @name exports.removeDocumentManifest * @static - * @summary DocumentManifest Delete Resolver. + * @summary Remove DocumentManifest resolver. */ -module.exports.documentmanifestDeleteResolver = function documentmanifestDeleteResolver( +module.exports.removeDocumentManifest = function removeDocumentManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/documentreference/mutation.js b/src/resources/1_0_2/profiles/documentreference/mutation.js index f4ae4177..74a756b7 100644 --- a/src/resources/1_0_2/profiles/documentreference/mutation.js +++ b/src/resources/1_0_2/profiles/documentreference/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DocumentReferenceSchema = require('../../schemas/documentreference.schema'); +const DocumentReferenceSchema = require('../../schemas/documentreference.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DocumentReferenceInput = require('../../inputs/documentreference.input'); +const DocumentReferenceInput = require('../../inputs/documentreference.input.js'); -// Resolvers -const { - documentreferenceCreateResolver, - documentreferenceUpdateResolver, - documentreferenceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDocumentReference, + updateDocumentReference, + removeDocumentReference, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DocumentReference', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DocumentReference record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DocumentReference record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DocumentReferenceCreateMutation - * @summary DocumentReferenceCreate Mutation. + * @summary DocumentReferenceCreate mutation. */ module.exports.DocumentReferenceCreateMutation = { - args: WriteArgs, - description: 'Create a DocumentReference', - resolve: scopeInvariant(scopeOptions, documentreferenceCreateResolver), + description: 'Create a DocumentReference record', + resolve: scopeInvariant(scopeOptions, createDocumentReference), type: DocumentReferenceSchema, + args: WriteArgs, }; /** * @name exports.DocumentReferenceUpdateMutation - * @summary DocumentReferenceUpdate Mutation. + * @summary DocumentReferenceUpdate mutation. */ module.exports.DocumentReferenceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DocumentReferences', - resolve: scopeInvariant(scopeOptions, documentreferenceUpdateResolver), + description: 'Update a DocumentReference record', + resolve: scopeInvariant(scopeOptions, updateDocumentReference), type: DocumentReferenceSchema, + args: WriteArgs, }; /** - * @name exports.DocumentReferenceDeleteMutation - * @summary DocumentReferenceDelete Mutation. + * @name exports.DocumentReferenceRemoveMutation + * @summary DocumentReferenceRemove mutation. */ -module.exports.DocumentReferenceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DocumentReference', - resolve: scopeInvariant(scopeOptions, documentreferenceDeleteResolver), +module.exports.DocumentReferenceRemoveMutation = { + description: 'Remove a DocumentReference record', + resolve: scopeInvariant(scopeOptions, removeDocumentReference), type: DocumentReferenceSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/documentreference/query.js b/src/resources/1_0_2/profiles/documentreference/query.js index e098794e..4edd46c6 100644 --- a/src/resources/1_0_2/profiles/documentreference/query.js +++ b/src/resources/1_0_2/profiles/documentreference/query.js @@ -1,55 +1,59 @@ // Schemas -const DocumentReferenceSchema = require('../../schemas/documentreference.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DocumentReferenceSchema = require('../../schemas/documentreference.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DocumentReferenceArgs = require('../../parameters/documentreference.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DocumentReferenceArgs = require('../../parameters/documentreference.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, DocumentReferenceArgs); // Resolvers const { - documentreferenceResolver, - documentreferenceListResolver, - documentreferenceInstanceResolver, + getDocumentReference, + getDocumentReferenceList, + getDocumentReferenceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DocumentReference', action: 'read', - version: '1_0_2', }; /** * @name exports.DocumentReferenceQuery - * @summary DocumentReference Query. + * @summary DocumentReference query. */ module.exports.DocumentReferenceQuery = { - args: Object.assign({}, CommonArgs, DocumentReferenceArgs), description: 'Query for a single DocumentReference', - resolve: scopeInvariant(scopeOptions, documentreferenceResolver), + resolve: scopeInvariant(scopeOptions, getDocumentReference), type: DocumentReferenceSchema, + args: args, }; /** * @name exports.DocumentReferenceListQuery - * @summary DocumentReferenceList Query. + * @summary DocumentReference query. */ module.exports.DocumentReferenceListQuery = { - args: Object.assign({}, CommonArgs, DocumentReferenceArgs), - description: 'Query for multiple DocumentReferences', - resolve: scopeInvariant(scopeOptions, documentreferenceListResolver), + description: 'Query for a more than or just one DocumentReference', + resolve: scopeInvariant(scopeOptions, getDocumentReferenceList), type: BundleSchema, + args: args, }; /** * @name exports.DocumentReferenceInstanceQuery - * @summary DocumentReferenceInstance Query. + * @summary DocumentReference query. */ module.exports.DocumentReferenceInstanceQuery = { - description: 'Get information about a single DocumentReference', - resolve: scopeInvariant(scopeOptions, documentreferenceInstanceResolver), + description: 'Access information about a single DocumentReference', + resolve: scopeInvariant(scopeOptions, getDocumentReferenceInstance), type: DocumentReferenceSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/documentreference/index.js b/src/resources/1_0_2/profiles/documentreference/register.js similarity index 91% rename from src/resources/1_0_2/profiles/documentreference/index.js rename to src/resources/1_0_2/profiles/documentreference/register.js index 61896701..c3b6826b 100644 --- a/src/resources/1_0_2/profiles/documentreference/index.js +++ b/src/resources/1_0_2/profiles/documentreference/register.js @@ -1,15 +1,15 @@ +const { + DocumentReferenceCreateMutation, + DocumentReferenceUpdateMutation, + DocumentReferenceRemoveMutation, +} = require('./mutation'); + const { DocumentReferenceQuery, DocumentReferenceListQuery, DocumentReferenceInstanceQuery, } = require('./query'); -const { - DocumentReferenceCreateMutation, - DocumentReferenceUpdateMutation, - DocumentReferenceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DocumentReferenceCreate: DocumentReferenceCreateMutation, DocumentReferenceUpdate: DocumentReferenceUpdateMutation, - DocumentReferenceDelete: DocumentReferenceDeleteMutation, + DocumentReferenceRemove: DocumentReferenceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DocumentReference', path: '/1_0_2/DocumentReference/:id', query: DocumentReferenceInstanceQuery, diff --git a/src/resources/1_0_2/profiles/documentreference/resolver.js b/src/resources/1_0_2/profiles/documentreference/resolver.js index 63bf038d..8e091616 100644 --- a/src/resources/1_0_2/profiles/documentreference/resolver.js +++ b/src/resources/1_0_2/profiles/documentreference/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.documentreferenceResolver + * @name exports.getDocumentReference * @static - * @summary DocumentReference Resolver. + * @summary DocumentReference resolver. */ -module.exports.documentreferenceResolver = function documentreferenceResolver( +module.exports.getDocumentReference = function getDocumentReference( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceListResolver + * @name exports.getDocumentReferenceList * @static - * @summary DocumentReference List Resolver. + * @summary DocumentReference list resolver. */ -module.exports.documentreferenceListResolver = function documentreferenceListResolver( +module.exports.getDocumentReferenceList = function getDocumentReferenceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceInstanceResolver + * @name exports.getDocumentReferenceInstance * @static - * @summary DocumentReference Instance Resolver. + * @summary DocumentReference instance resolver. */ -module.exports.documentreferenceInstanceResolver = function documentreferenceInstanceResolver( +module.exports.getDocumentReferenceInstance = function getDocumentReferenceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceCreateResolver + * @name exports.createDocumentReference * @static - * @summary DocumentReference Create Resolver. + * @summary Create DocumentReference resolver. */ -module.exports.documentreferenceCreateResolver = function documentreferenceCreateResolver( +module.exports.createDocumentReference = function createDocumentReference( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceUpdateResolver + * @name exports.updateDocumentReference * @static - * @summary DocumentReference Update Resolver. + * @summary Update DocumentReference resolver. */ -module.exports.documentreferenceUpdateResolver = function documentreferenceUpdateResolver( +module.exports.updateDocumentReference = function updateDocumentReference( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceDeleteResolver + * @name exports.removeDocumentReference * @static - * @summary DocumentReference Delete Resolver. + * @summary Remove DocumentReference resolver. */ -module.exports.documentreferenceDeleteResolver = function documentreferenceDeleteResolver( +module.exports.removeDocumentReference = function removeDocumentReference( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/eligibilityrequest/mutation.js b/src/resources/1_0_2/profiles/eligibilityrequest/mutation.js index 64fbeee6..a9453a56 100644 --- a/src/resources/1_0_2/profiles/eligibilityrequest/mutation.js +++ b/src/resources/1_0_2/profiles/eligibilityrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EligibilityRequestSchema = require('../../schemas/eligibilityrequest.schema'); +const EligibilityRequestSchema = require('../../schemas/eligibilityrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EligibilityRequestInput = require('../../inputs/eligibilityrequest.input'); +const EligibilityRequestInput = require('../../inputs/eligibilityrequest.input.js'); -// Resolvers -const { - eligibilityrequestCreateResolver, - eligibilityrequestUpdateResolver, - eligibilityrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEligibilityRequest, + updateEligibilityRequest, + removeEligibilityRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EligibilityRequest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EligibilityRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EligibilityRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EligibilityRequestCreateMutation - * @summary EligibilityRequestCreate Mutation. + * @summary EligibilityRequestCreate mutation. */ module.exports.EligibilityRequestCreateMutation = { - args: WriteArgs, - description: 'Create a EligibilityRequest', - resolve: scopeInvariant(scopeOptions, eligibilityrequestCreateResolver), + description: 'Create a EligibilityRequest record', + resolve: scopeInvariant(scopeOptions, createEligibilityRequest), type: EligibilityRequestSchema, + args: WriteArgs, }; /** * @name exports.EligibilityRequestUpdateMutation - * @summary EligibilityRequestUpdate Mutation. + * @summary EligibilityRequestUpdate mutation. */ module.exports.EligibilityRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EligibilityRequests', - resolve: scopeInvariant(scopeOptions, eligibilityrequestUpdateResolver), + description: 'Update a EligibilityRequest record', + resolve: scopeInvariant(scopeOptions, updateEligibilityRequest), type: EligibilityRequestSchema, + args: WriteArgs, }; /** - * @name exports.EligibilityRequestDeleteMutation - * @summary EligibilityRequestDelete Mutation. + * @name exports.EligibilityRequestRemoveMutation + * @summary EligibilityRequestRemove mutation. */ -module.exports.EligibilityRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EligibilityRequest', - resolve: scopeInvariant(scopeOptions, eligibilityrequestDeleteResolver), +module.exports.EligibilityRequestRemoveMutation = { + description: 'Remove a EligibilityRequest record', + resolve: scopeInvariant(scopeOptions, removeEligibilityRequest), type: EligibilityRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/eligibilityrequest/query.js b/src/resources/1_0_2/profiles/eligibilityrequest/query.js index 689e4a6d..c0668526 100644 --- a/src/resources/1_0_2/profiles/eligibilityrequest/query.js +++ b/src/resources/1_0_2/profiles/eligibilityrequest/query.js @@ -1,55 +1,59 @@ // Schemas -const EligibilityRequestSchema = require('../../schemas/eligibilityrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EligibilityRequestSchema = require('../../schemas/eligibilityrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EligibilityRequestArgs = require('../../parameters/eligibilityrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EligibilityRequestArgs = require('../../parameters/eligibilityrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, EligibilityRequestArgs); // Resolvers const { - eligibilityrequestResolver, - eligibilityrequestListResolver, - eligibilityrequestInstanceResolver, + getEligibilityRequest, + getEligibilityRequestList, + getEligibilityRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EligibilityRequest', action: 'read', - version: '1_0_2', }; /** * @name exports.EligibilityRequestQuery - * @summary EligibilityRequest Query. + * @summary EligibilityRequest query. */ module.exports.EligibilityRequestQuery = { - args: Object.assign({}, CommonArgs, EligibilityRequestArgs), description: 'Query for a single EligibilityRequest', - resolve: scopeInvariant(scopeOptions, eligibilityrequestResolver), + resolve: scopeInvariant(scopeOptions, getEligibilityRequest), type: EligibilityRequestSchema, + args: args, }; /** * @name exports.EligibilityRequestListQuery - * @summary EligibilityRequestList Query. + * @summary EligibilityRequest query. */ module.exports.EligibilityRequestListQuery = { - args: Object.assign({}, CommonArgs, EligibilityRequestArgs), - description: 'Query for multiple EligibilityRequests', - resolve: scopeInvariant(scopeOptions, eligibilityrequestListResolver), + description: 'Query for a more than or just one EligibilityRequest', + resolve: scopeInvariant(scopeOptions, getEligibilityRequestList), type: BundleSchema, + args: args, }; /** * @name exports.EligibilityRequestInstanceQuery - * @summary EligibilityRequestInstance Query. + * @summary EligibilityRequest query. */ module.exports.EligibilityRequestInstanceQuery = { - description: 'Get information about a single EligibilityRequest', - resolve: scopeInvariant(scopeOptions, eligibilityrequestInstanceResolver), + description: 'Access information about a single EligibilityRequest', + resolve: scopeInvariant(scopeOptions, getEligibilityRequestInstance), type: EligibilityRequestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/eligibilityrequest/index.js b/src/resources/1_0_2/profiles/eligibilityrequest/register.js similarity index 91% rename from src/resources/1_0_2/profiles/eligibilityrequest/index.js rename to src/resources/1_0_2/profiles/eligibilityrequest/register.js index 70b45d07..2bec3ee6 100644 --- a/src/resources/1_0_2/profiles/eligibilityrequest/index.js +++ b/src/resources/1_0_2/profiles/eligibilityrequest/register.js @@ -1,15 +1,15 @@ +const { + EligibilityRequestCreateMutation, + EligibilityRequestUpdateMutation, + EligibilityRequestRemoveMutation, +} = require('./mutation'); + const { EligibilityRequestQuery, EligibilityRequestListQuery, EligibilityRequestInstanceQuery, } = require('./query'); -const { - EligibilityRequestCreateMutation, - EligibilityRequestUpdateMutation, - EligibilityRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EligibilityRequestCreate: EligibilityRequestCreateMutation, EligibilityRequestUpdate: EligibilityRequestUpdateMutation, - EligibilityRequestDelete: EligibilityRequestDeleteMutation, + EligibilityRequestRemove: EligibilityRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EligibilityRequest', path: '/1_0_2/EligibilityRequest/:id', query: EligibilityRequestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/eligibilityrequest/resolver.js b/src/resources/1_0_2/profiles/eligibilityrequest/resolver.js index 4c9bba41..9d3f42bb 100644 --- a/src/resources/1_0_2/profiles/eligibilityrequest/resolver.js +++ b/src/resources/1_0_2/profiles/eligibilityrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.eligibilityrequestResolver + * @name exports.getEligibilityRequest * @static - * @summary EligibilityRequest Resolver. + * @summary EligibilityRequest resolver. */ -module.exports.eligibilityrequestResolver = function eligibilityrequestResolver( +module.exports.getEligibilityRequest = function getEligibilityRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestListResolver + * @name exports.getEligibilityRequestList * @static - * @summary EligibilityRequest List Resolver. + * @summary EligibilityRequest list resolver. */ -module.exports.eligibilityrequestListResolver = function eligibilityrequestListResolver( +module.exports.getEligibilityRequestList = function getEligibilityRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestInstanceResolver + * @name exports.getEligibilityRequestInstance * @static - * @summary EligibilityRequest Instance Resolver. + * @summary EligibilityRequest instance resolver. */ -module.exports.eligibilityrequestInstanceResolver = function eligibilityrequestInstanceResolver( +module.exports.getEligibilityRequestInstance = function getEligibilityRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestCreateResolver + * @name exports.createEligibilityRequest * @static - * @summary EligibilityRequest Create Resolver. + * @summary Create EligibilityRequest resolver. */ -module.exports.eligibilityrequestCreateResolver = function eligibilityrequestCreateResolver( +module.exports.createEligibilityRequest = function createEligibilityRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestUpdateResolver + * @name exports.updateEligibilityRequest * @static - * @summary EligibilityRequest Update Resolver. + * @summary Update EligibilityRequest resolver. */ -module.exports.eligibilityrequestUpdateResolver = function eligibilityrequestUpdateResolver( +module.exports.updateEligibilityRequest = function updateEligibilityRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestDeleteResolver + * @name exports.removeEligibilityRequest * @static - * @summary EligibilityRequest Delete Resolver. + * @summary Remove EligibilityRequest resolver. */ -module.exports.eligibilityrequestDeleteResolver = function eligibilityrequestDeleteResolver( +module.exports.removeEligibilityRequest = function removeEligibilityRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/eligibilityresponse/mutation.js b/src/resources/1_0_2/profiles/eligibilityresponse/mutation.js index 9d918978..307a22a5 100644 --- a/src/resources/1_0_2/profiles/eligibilityresponse/mutation.js +++ b/src/resources/1_0_2/profiles/eligibilityresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EligibilityResponseSchema = require('../../schemas/eligibilityresponse.schema'); +const EligibilityResponseSchema = require('../../schemas/eligibilityresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EligibilityResponseInput = require('../../inputs/eligibilityresponse.input'); +const EligibilityResponseInput = require('../../inputs/eligibilityresponse.input.js'); -// Resolvers -const { - eligibilityresponseCreateResolver, - eligibilityresponseUpdateResolver, - eligibilityresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEligibilityResponse, + updateEligibilityResponse, + removeEligibilityResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EligibilityResponse', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EligibilityResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EligibilityResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EligibilityResponseCreateMutation - * @summary EligibilityResponseCreate Mutation. + * @summary EligibilityResponseCreate mutation. */ module.exports.EligibilityResponseCreateMutation = { - args: WriteArgs, - description: 'Create a EligibilityResponse', - resolve: scopeInvariant(scopeOptions, eligibilityresponseCreateResolver), + description: 'Create a EligibilityResponse record', + resolve: scopeInvariant(scopeOptions, createEligibilityResponse), type: EligibilityResponseSchema, + args: WriteArgs, }; /** * @name exports.EligibilityResponseUpdateMutation - * @summary EligibilityResponseUpdate Mutation. + * @summary EligibilityResponseUpdate mutation. */ module.exports.EligibilityResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EligibilityResponses', - resolve: scopeInvariant(scopeOptions, eligibilityresponseUpdateResolver), + description: 'Update a EligibilityResponse record', + resolve: scopeInvariant(scopeOptions, updateEligibilityResponse), type: EligibilityResponseSchema, + args: WriteArgs, }; /** - * @name exports.EligibilityResponseDeleteMutation - * @summary EligibilityResponseDelete Mutation. + * @name exports.EligibilityResponseRemoveMutation + * @summary EligibilityResponseRemove mutation. */ -module.exports.EligibilityResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EligibilityResponse', - resolve: scopeInvariant(scopeOptions, eligibilityresponseDeleteResolver), +module.exports.EligibilityResponseRemoveMutation = { + description: 'Remove a EligibilityResponse record', + resolve: scopeInvariant(scopeOptions, removeEligibilityResponse), type: EligibilityResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/eligibilityresponse/query.js b/src/resources/1_0_2/profiles/eligibilityresponse/query.js index 28e46f48..47b85683 100644 --- a/src/resources/1_0_2/profiles/eligibilityresponse/query.js +++ b/src/resources/1_0_2/profiles/eligibilityresponse/query.js @@ -1,55 +1,59 @@ // Schemas -const EligibilityResponseSchema = require('../../schemas/eligibilityresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EligibilityResponseSchema = require('../../schemas/eligibilityresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EligibilityResponseArgs = require('../../parameters/eligibilityresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EligibilityResponseArgs = require('../../parameters/eligibilityresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, EligibilityResponseArgs); // Resolvers const { - eligibilityresponseResolver, - eligibilityresponseListResolver, - eligibilityresponseInstanceResolver, + getEligibilityResponse, + getEligibilityResponseList, + getEligibilityResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EligibilityResponse', action: 'read', - version: '1_0_2', }; /** * @name exports.EligibilityResponseQuery - * @summary EligibilityResponse Query. + * @summary EligibilityResponse query. */ module.exports.EligibilityResponseQuery = { - args: Object.assign({}, CommonArgs, EligibilityResponseArgs), description: 'Query for a single EligibilityResponse', - resolve: scopeInvariant(scopeOptions, eligibilityresponseResolver), + resolve: scopeInvariant(scopeOptions, getEligibilityResponse), type: EligibilityResponseSchema, + args: args, }; /** * @name exports.EligibilityResponseListQuery - * @summary EligibilityResponseList Query. + * @summary EligibilityResponse query. */ module.exports.EligibilityResponseListQuery = { - args: Object.assign({}, CommonArgs, EligibilityResponseArgs), - description: 'Query for multiple EligibilityResponses', - resolve: scopeInvariant(scopeOptions, eligibilityresponseListResolver), + description: 'Query for a more than or just one EligibilityResponse', + resolve: scopeInvariant(scopeOptions, getEligibilityResponseList), type: BundleSchema, + args: args, }; /** * @name exports.EligibilityResponseInstanceQuery - * @summary EligibilityResponseInstance Query. + * @summary EligibilityResponse query. */ module.exports.EligibilityResponseInstanceQuery = { - description: 'Get information about a single EligibilityResponse', - resolve: scopeInvariant(scopeOptions, eligibilityresponseInstanceResolver), + description: 'Access information about a single EligibilityResponse', + resolve: scopeInvariant(scopeOptions, getEligibilityResponseInstance), type: EligibilityResponseSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/eligibilityresponse/index.js b/src/resources/1_0_2/profiles/eligibilityresponse/register.js similarity index 91% rename from src/resources/1_0_2/profiles/eligibilityresponse/index.js rename to src/resources/1_0_2/profiles/eligibilityresponse/register.js index 15670165..8a28b9fe 100644 --- a/src/resources/1_0_2/profiles/eligibilityresponse/index.js +++ b/src/resources/1_0_2/profiles/eligibilityresponse/register.js @@ -1,15 +1,15 @@ +const { + EligibilityResponseCreateMutation, + EligibilityResponseUpdateMutation, + EligibilityResponseRemoveMutation, +} = require('./mutation'); + const { EligibilityResponseQuery, EligibilityResponseListQuery, EligibilityResponseInstanceQuery, } = require('./query'); -const { - EligibilityResponseCreateMutation, - EligibilityResponseUpdateMutation, - EligibilityResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EligibilityResponseCreate: EligibilityResponseCreateMutation, EligibilityResponseUpdate: EligibilityResponseUpdateMutation, - EligibilityResponseDelete: EligibilityResponseDeleteMutation, + EligibilityResponseRemove: EligibilityResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EligibilityResponse', path: '/1_0_2/EligibilityResponse/:id', query: EligibilityResponseInstanceQuery, diff --git a/src/resources/1_0_2/profiles/eligibilityresponse/resolver.js b/src/resources/1_0_2/profiles/eligibilityresponse/resolver.js index 745287a2..449f4d67 100644 --- a/src/resources/1_0_2/profiles/eligibilityresponse/resolver.js +++ b/src/resources/1_0_2/profiles/eligibilityresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.eligibilityresponseResolver + * @name exports.getEligibilityResponse * @static - * @summary EligibilityResponse Resolver. + * @summary EligibilityResponse resolver. */ -module.exports.eligibilityresponseResolver = function eligibilityresponseResolver( +module.exports.getEligibilityResponse = function getEligibilityResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseListResolver + * @name exports.getEligibilityResponseList * @static - * @summary EligibilityResponse List Resolver. + * @summary EligibilityResponse list resolver. */ -module.exports.eligibilityresponseListResolver = function eligibilityresponseListResolver( +module.exports.getEligibilityResponseList = function getEligibilityResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseInstanceResolver + * @name exports.getEligibilityResponseInstance * @static - * @summary EligibilityResponse Instance Resolver. + * @summary EligibilityResponse instance resolver. */ -module.exports.eligibilityresponseInstanceResolver = function eligibilityresponseInstanceResolver( +module.exports.getEligibilityResponseInstance = function getEligibilityResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseCreateResolver + * @name exports.createEligibilityResponse * @static - * @summary EligibilityResponse Create Resolver. + * @summary Create EligibilityResponse resolver. */ -module.exports.eligibilityresponseCreateResolver = function eligibilityresponseCreateResolver( +module.exports.createEligibilityResponse = function createEligibilityResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseUpdateResolver + * @name exports.updateEligibilityResponse * @static - * @summary EligibilityResponse Update Resolver. + * @summary Update EligibilityResponse resolver. */ -module.exports.eligibilityresponseUpdateResolver = function eligibilityresponseUpdateResolver( +module.exports.updateEligibilityResponse = function updateEligibilityResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseDeleteResolver + * @name exports.removeEligibilityResponse * @static - * @summary EligibilityResponse Delete Resolver. + * @summary Remove EligibilityResponse resolver. */ -module.exports.eligibilityresponseDeleteResolver = function eligibilityresponseDeleteResolver( +module.exports.removeEligibilityResponse = function removeEligibilityResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/encounter/mutation.js b/src/resources/1_0_2/profiles/encounter/mutation.js index 64262819..d6382a40 100644 --- a/src/resources/1_0_2/profiles/encounter/mutation.js +++ b/src/resources/1_0_2/profiles/encounter/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EncounterSchema = require('../../schemas/encounter.schema'); +const EncounterSchema = require('../../schemas/encounter.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EncounterInput = require('../../inputs/encounter.input'); +const EncounterInput = require('../../inputs/encounter.input.js'); -// Resolvers -const { - encounterCreateResolver, - encounterUpdateResolver, - encounterDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEncounter, + updateEncounter, + removeEncounter, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Encounter', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Encounter record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Encounter record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.EncounterCreateMutation - * @summary EncounterCreate Mutation. + * @summary EncounterCreate mutation. */ module.exports.EncounterCreateMutation = { - args: WriteArgs, - description: 'Create a Encounter', - resolve: scopeInvariant(scopeOptions, encounterCreateResolver), + description: 'Create a Encounter record', + resolve: scopeInvariant(scopeOptions, createEncounter), type: EncounterSchema, + args: WriteArgs, }; /** * @name exports.EncounterUpdateMutation - * @summary EncounterUpdate Mutation. + * @summary EncounterUpdate mutation. */ module.exports.EncounterUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Encounters', - resolve: scopeInvariant(scopeOptions, encounterUpdateResolver), + description: 'Update a Encounter record', + resolve: scopeInvariant(scopeOptions, updateEncounter), type: EncounterSchema, + args: WriteArgs, }; /** - * @name exports.EncounterDeleteMutation - * @summary EncounterDelete Mutation. + * @name exports.EncounterRemoveMutation + * @summary EncounterRemove mutation. */ -module.exports.EncounterDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Encounter', - resolve: scopeInvariant(scopeOptions, encounterDeleteResolver), +module.exports.EncounterRemoveMutation = { + description: 'Remove a Encounter record', + resolve: scopeInvariant(scopeOptions, removeEncounter), type: EncounterSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/encounter/query.js b/src/resources/1_0_2/profiles/encounter/query.js index 57bb5431..410bb30e 100644 --- a/src/resources/1_0_2/profiles/encounter/query.js +++ b/src/resources/1_0_2/profiles/encounter/query.js @@ -1,55 +1,59 @@ // Schemas -const EncounterSchema = require('../../schemas/encounter.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EncounterSchema = require('../../schemas/encounter.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EncounterArgs = require('../../parameters/encounter.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EncounterArgs = require('../../parameters/encounter.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, EncounterArgs); // Resolvers const { - encounterResolver, - encounterListResolver, - encounterInstanceResolver, + getEncounter, + getEncounterList, + getEncounterInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Encounter', action: 'read', - version: '1_0_2', }; /** * @name exports.EncounterQuery - * @summary Encounter Query. + * @summary Encounter query. */ module.exports.EncounterQuery = { - args: Object.assign({}, CommonArgs, EncounterArgs), description: 'Query for a single Encounter', - resolve: scopeInvariant(scopeOptions, encounterResolver), + resolve: scopeInvariant(scopeOptions, getEncounter), type: EncounterSchema, + args: args, }; /** * @name exports.EncounterListQuery - * @summary EncounterList Query. + * @summary Encounter query. */ module.exports.EncounterListQuery = { - args: Object.assign({}, CommonArgs, EncounterArgs), - description: 'Query for multiple Encounters', - resolve: scopeInvariant(scopeOptions, encounterListResolver), + description: 'Query for a more than or just one Encounter', + resolve: scopeInvariant(scopeOptions, getEncounterList), type: BundleSchema, + args: args, }; /** * @name exports.EncounterInstanceQuery - * @summary EncounterInstance Query. + * @summary Encounter query. */ module.exports.EncounterInstanceQuery = { - description: 'Get information about a single Encounter', - resolve: scopeInvariant(scopeOptions, encounterInstanceResolver), + description: 'Access information about a single Encounter', + resolve: scopeInvariant(scopeOptions, getEncounterInstance), type: EncounterSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/encounter/index.js b/src/resources/1_0_2/profiles/encounter/register.js similarity index 92% rename from src/resources/1_0_2/profiles/encounter/index.js rename to src/resources/1_0_2/profiles/encounter/register.js index 978f5e77..74f8902b 100644 --- a/src/resources/1_0_2/profiles/encounter/index.js +++ b/src/resources/1_0_2/profiles/encounter/register.js @@ -1,15 +1,15 @@ +const { + EncounterCreateMutation, + EncounterUpdateMutation, + EncounterRemoveMutation, +} = require('./mutation'); + const { EncounterQuery, EncounterListQuery, EncounterInstanceQuery, } = require('./query'); -const { - EncounterCreateMutation, - EncounterUpdateMutation, - EncounterDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EncounterCreate: EncounterCreateMutation, EncounterUpdate: EncounterUpdateMutation, - EncounterDelete: EncounterDeleteMutation, + EncounterRemove: EncounterRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Encounter', path: '/1_0_2/Encounter/:id', query: EncounterInstanceQuery, diff --git a/src/resources/1_0_2/profiles/encounter/resolver.js b/src/resources/1_0_2/profiles/encounter/resolver.js index 0c03a3b1..e4c048d5 100644 --- a/src/resources/1_0_2/profiles/encounter/resolver.js +++ b/src/resources/1_0_2/profiles/encounter/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.encounterResolver + * @name exports.getEncounter * @static - * @summary Encounter Resolver. + * @summary Encounter resolver. */ -module.exports.encounterResolver = function encounterResolver( +module.exports.getEncounter = function getEncounter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterListResolver + * @name exports.getEncounterList * @static - * @summary Encounter List Resolver. + * @summary Encounter list resolver. */ -module.exports.encounterListResolver = function encounterListResolver( +module.exports.getEncounterList = function getEncounterList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterInstanceResolver + * @name exports.getEncounterInstance * @static - * @summary Encounter Instance Resolver. + * @summary Encounter instance resolver. */ -module.exports.encounterInstanceResolver = function encounterInstanceResolver( +module.exports.getEncounterInstance = function getEncounterInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterCreateResolver + * @name exports.createEncounter * @static - * @summary Encounter Create Resolver. + * @summary Create Encounter resolver. */ -module.exports.encounterCreateResolver = function encounterCreateResolver( +module.exports.createEncounter = function createEncounter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterUpdateResolver + * @name exports.updateEncounter * @static - * @summary Encounter Update Resolver. + * @summary Update Encounter resolver. */ -module.exports.encounterUpdateResolver = function encounterUpdateResolver( +module.exports.updateEncounter = function updateEncounter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterDeleteResolver + * @name exports.removeEncounter * @static - * @summary Encounter Delete Resolver. + * @summary Remove Encounter resolver. */ -module.exports.encounterDeleteResolver = function encounterDeleteResolver( +module.exports.removeEncounter = function removeEncounter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/enrollmentrequest/mutation.js b/src/resources/1_0_2/profiles/enrollmentrequest/mutation.js index 0b203179..78673a4a 100644 --- a/src/resources/1_0_2/profiles/enrollmentrequest/mutation.js +++ b/src/resources/1_0_2/profiles/enrollmentrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema'); +const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EnrollmentRequestInput = require('../../inputs/enrollmentrequest.input'); +const EnrollmentRequestInput = require('../../inputs/enrollmentrequest.input.js'); -// Resolvers -const { - enrollmentrequestCreateResolver, - enrollmentrequestUpdateResolver, - enrollmentrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEnrollmentRequest, + updateEnrollmentRequest, + removeEnrollmentRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EnrollmentRequest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EnrollmentRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EnrollmentRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EnrollmentRequestCreateMutation - * @summary EnrollmentRequestCreate Mutation. + * @summary EnrollmentRequestCreate mutation. */ module.exports.EnrollmentRequestCreateMutation = { - args: WriteArgs, - description: 'Create a EnrollmentRequest', - resolve: scopeInvariant(scopeOptions, enrollmentrequestCreateResolver), + description: 'Create a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, createEnrollmentRequest), type: EnrollmentRequestSchema, + args: WriteArgs, }; /** * @name exports.EnrollmentRequestUpdateMutation - * @summary EnrollmentRequestUpdate Mutation. + * @summary EnrollmentRequestUpdate mutation. */ module.exports.EnrollmentRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EnrollmentRequests', - resolve: scopeInvariant(scopeOptions, enrollmentrequestUpdateResolver), + description: 'Update a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, updateEnrollmentRequest), type: EnrollmentRequestSchema, + args: WriteArgs, }; /** - * @name exports.EnrollmentRequestDeleteMutation - * @summary EnrollmentRequestDelete Mutation. + * @name exports.EnrollmentRequestRemoveMutation + * @summary EnrollmentRequestRemove mutation. */ -module.exports.EnrollmentRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EnrollmentRequest', - resolve: scopeInvariant(scopeOptions, enrollmentrequestDeleteResolver), +module.exports.EnrollmentRequestRemoveMutation = { + description: 'Remove a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, removeEnrollmentRequest), type: EnrollmentRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/enrollmentrequest/query.js b/src/resources/1_0_2/profiles/enrollmentrequest/query.js index edc9e709..52252129 100644 --- a/src/resources/1_0_2/profiles/enrollmentrequest/query.js +++ b/src/resources/1_0_2/profiles/enrollmentrequest/query.js @@ -1,55 +1,59 @@ // Schemas -const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EnrollmentRequestArgs = require('../../parameters/enrollmentrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EnrollmentRequestArgs = require('../../parameters/enrollmentrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, EnrollmentRequestArgs); // Resolvers const { - enrollmentrequestResolver, - enrollmentrequestListResolver, - enrollmentrequestInstanceResolver, + getEnrollmentRequest, + getEnrollmentRequestList, + getEnrollmentRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EnrollmentRequest', action: 'read', - version: '1_0_2', }; /** * @name exports.EnrollmentRequestQuery - * @summary EnrollmentRequest Query. + * @summary EnrollmentRequest query. */ module.exports.EnrollmentRequestQuery = { - args: Object.assign({}, CommonArgs, EnrollmentRequestArgs), description: 'Query for a single EnrollmentRequest', - resolve: scopeInvariant(scopeOptions, enrollmentrequestResolver), + resolve: scopeInvariant(scopeOptions, getEnrollmentRequest), type: EnrollmentRequestSchema, + args: args, }; /** * @name exports.EnrollmentRequestListQuery - * @summary EnrollmentRequestList Query. + * @summary EnrollmentRequest query. */ module.exports.EnrollmentRequestListQuery = { - args: Object.assign({}, CommonArgs, EnrollmentRequestArgs), - description: 'Query for multiple EnrollmentRequests', - resolve: scopeInvariant(scopeOptions, enrollmentrequestListResolver), + description: 'Query for a more than or just one EnrollmentRequest', + resolve: scopeInvariant(scopeOptions, getEnrollmentRequestList), type: BundleSchema, + args: args, }; /** * @name exports.EnrollmentRequestInstanceQuery - * @summary EnrollmentRequestInstance Query. + * @summary EnrollmentRequest query. */ module.exports.EnrollmentRequestInstanceQuery = { - description: 'Get information about a single EnrollmentRequest', - resolve: scopeInvariant(scopeOptions, enrollmentrequestInstanceResolver), + description: 'Access information about a single EnrollmentRequest', + resolve: scopeInvariant(scopeOptions, getEnrollmentRequestInstance), type: EnrollmentRequestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/enrollmentrequest/index.js b/src/resources/1_0_2/profiles/enrollmentrequest/register.js similarity index 91% rename from src/resources/1_0_2/profiles/enrollmentrequest/index.js rename to src/resources/1_0_2/profiles/enrollmentrequest/register.js index ef8654c4..b0537ae7 100644 --- a/src/resources/1_0_2/profiles/enrollmentrequest/index.js +++ b/src/resources/1_0_2/profiles/enrollmentrequest/register.js @@ -1,15 +1,15 @@ +const { + EnrollmentRequestCreateMutation, + EnrollmentRequestUpdateMutation, + EnrollmentRequestRemoveMutation, +} = require('./mutation'); + const { EnrollmentRequestQuery, EnrollmentRequestListQuery, EnrollmentRequestInstanceQuery, } = require('./query'); -const { - EnrollmentRequestCreateMutation, - EnrollmentRequestUpdateMutation, - EnrollmentRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EnrollmentRequestCreate: EnrollmentRequestCreateMutation, EnrollmentRequestUpdate: EnrollmentRequestUpdateMutation, - EnrollmentRequestDelete: EnrollmentRequestDeleteMutation, + EnrollmentRequestRemove: EnrollmentRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EnrollmentRequest', path: '/1_0_2/EnrollmentRequest/:id', query: EnrollmentRequestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/enrollmentrequest/resolver.js b/src/resources/1_0_2/profiles/enrollmentrequest/resolver.js index 2f6991e8..f9a1f9a2 100644 --- a/src/resources/1_0_2/profiles/enrollmentrequest/resolver.js +++ b/src/resources/1_0_2/profiles/enrollmentrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.enrollmentrequestResolver + * @name exports.getEnrollmentRequest * @static - * @summary EnrollmentRequest Resolver. + * @summary EnrollmentRequest resolver. */ -module.exports.enrollmentrequestResolver = function enrollmentrequestResolver( +module.exports.getEnrollmentRequest = function getEnrollmentRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestListResolver + * @name exports.getEnrollmentRequestList * @static - * @summary EnrollmentRequest List Resolver. + * @summary EnrollmentRequest list resolver. */ -module.exports.enrollmentrequestListResolver = function enrollmentrequestListResolver( +module.exports.getEnrollmentRequestList = function getEnrollmentRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestInstanceResolver + * @name exports.getEnrollmentRequestInstance * @static - * @summary EnrollmentRequest Instance Resolver. + * @summary EnrollmentRequest instance resolver. */ -module.exports.enrollmentrequestInstanceResolver = function enrollmentrequestInstanceResolver( +module.exports.getEnrollmentRequestInstance = function getEnrollmentRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestCreateResolver + * @name exports.createEnrollmentRequest * @static - * @summary EnrollmentRequest Create Resolver. + * @summary Create EnrollmentRequest resolver. */ -module.exports.enrollmentrequestCreateResolver = function enrollmentrequestCreateResolver( +module.exports.createEnrollmentRequest = function createEnrollmentRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestUpdateResolver + * @name exports.updateEnrollmentRequest * @static - * @summary EnrollmentRequest Update Resolver. + * @summary Update EnrollmentRequest resolver. */ -module.exports.enrollmentrequestUpdateResolver = function enrollmentrequestUpdateResolver( +module.exports.updateEnrollmentRequest = function updateEnrollmentRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestDeleteResolver + * @name exports.removeEnrollmentRequest * @static - * @summary EnrollmentRequest Delete Resolver. + * @summary Remove EnrollmentRequest resolver. */ -module.exports.enrollmentrequestDeleteResolver = function enrollmentrequestDeleteResolver( +module.exports.removeEnrollmentRequest = function removeEnrollmentRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/enrollmentresponse/mutation.js b/src/resources/1_0_2/profiles/enrollmentresponse/mutation.js index 781b5602..0c1cd18b 100644 --- a/src/resources/1_0_2/profiles/enrollmentresponse/mutation.js +++ b/src/resources/1_0_2/profiles/enrollmentresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema'); +const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EnrollmentResponseInput = require('../../inputs/enrollmentresponse.input'); +const EnrollmentResponseInput = require('../../inputs/enrollmentresponse.input.js'); -// Resolvers -const { - enrollmentresponseCreateResolver, - enrollmentresponseUpdateResolver, - enrollmentresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEnrollmentResponse, + updateEnrollmentResponse, + removeEnrollmentResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EnrollmentResponse', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EnrollmentResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EnrollmentResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EnrollmentResponseCreateMutation - * @summary EnrollmentResponseCreate Mutation. + * @summary EnrollmentResponseCreate mutation. */ module.exports.EnrollmentResponseCreateMutation = { - args: WriteArgs, - description: 'Create a EnrollmentResponse', - resolve: scopeInvariant(scopeOptions, enrollmentresponseCreateResolver), + description: 'Create a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, createEnrollmentResponse), type: EnrollmentResponseSchema, + args: WriteArgs, }; /** * @name exports.EnrollmentResponseUpdateMutation - * @summary EnrollmentResponseUpdate Mutation. + * @summary EnrollmentResponseUpdate mutation. */ module.exports.EnrollmentResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EnrollmentResponses', - resolve: scopeInvariant(scopeOptions, enrollmentresponseUpdateResolver), + description: 'Update a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, updateEnrollmentResponse), type: EnrollmentResponseSchema, + args: WriteArgs, }; /** - * @name exports.EnrollmentResponseDeleteMutation - * @summary EnrollmentResponseDelete Mutation. + * @name exports.EnrollmentResponseRemoveMutation + * @summary EnrollmentResponseRemove mutation. */ -module.exports.EnrollmentResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EnrollmentResponse', - resolve: scopeInvariant(scopeOptions, enrollmentresponseDeleteResolver), +module.exports.EnrollmentResponseRemoveMutation = { + description: 'Remove a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, removeEnrollmentResponse), type: EnrollmentResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/enrollmentresponse/query.js b/src/resources/1_0_2/profiles/enrollmentresponse/query.js index 0f86e4c6..4ab0b494 100644 --- a/src/resources/1_0_2/profiles/enrollmentresponse/query.js +++ b/src/resources/1_0_2/profiles/enrollmentresponse/query.js @@ -1,55 +1,59 @@ // Schemas -const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EnrollmentResponseArgs = require('../../parameters/enrollmentresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EnrollmentResponseArgs = require('../../parameters/enrollmentresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, EnrollmentResponseArgs); // Resolvers const { - enrollmentresponseResolver, - enrollmentresponseListResolver, - enrollmentresponseInstanceResolver, + getEnrollmentResponse, + getEnrollmentResponseList, + getEnrollmentResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EnrollmentResponse', action: 'read', - version: '1_0_2', }; /** * @name exports.EnrollmentResponseQuery - * @summary EnrollmentResponse Query. + * @summary EnrollmentResponse query. */ module.exports.EnrollmentResponseQuery = { - args: Object.assign({}, CommonArgs, EnrollmentResponseArgs), description: 'Query for a single EnrollmentResponse', - resolve: scopeInvariant(scopeOptions, enrollmentresponseResolver), + resolve: scopeInvariant(scopeOptions, getEnrollmentResponse), type: EnrollmentResponseSchema, + args: args, }; /** * @name exports.EnrollmentResponseListQuery - * @summary EnrollmentResponseList Query. + * @summary EnrollmentResponse query. */ module.exports.EnrollmentResponseListQuery = { - args: Object.assign({}, CommonArgs, EnrollmentResponseArgs), - description: 'Query for multiple EnrollmentResponses', - resolve: scopeInvariant(scopeOptions, enrollmentresponseListResolver), + description: 'Query for a more than or just one EnrollmentResponse', + resolve: scopeInvariant(scopeOptions, getEnrollmentResponseList), type: BundleSchema, + args: args, }; /** * @name exports.EnrollmentResponseInstanceQuery - * @summary EnrollmentResponseInstance Query. + * @summary EnrollmentResponse query. */ module.exports.EnrollmentResponseInstanceQuery = { - description: 'Get information about a single EnrollmentResponse', - resolve: scopeInvariant(scopeOptions, enrollmentresponseInstanceResolver), + description: 'Access information about a single EnrollmentResponse', + resolve: scopeInvariant(scopeOptions, getEnrollmentResponseInstance), type: EnrollmentResponseSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/enrollmentresponse/index.js b/src/resources/1_0_2/profiles/enrollmentresponse/register.js similarity index 91% rename from src/resources/1_0_2/profiles/enrollmentresponse/index.js rename to src/resources/1_0_2/profiles/enrollmentresponse/register.js index 52b9ec2a..5245df58 100644 --- a/src/resources/1_0_2/profiles/enrollmentresponse/index.js +++ b/src/resources/1_0_2/profiles/enrollmentresponse/register.js @@ -1,15 +1,15 @@ +const { + EnrollmentResponseCreateMutation, + EnrollmentResponseUpdateMutation, + EnrollmentResponseRemoveMutation, +} = require('./mutation'); + const { EnrollmentResponseQuery, EnrollmentResponseListQuery, EnrollmentResponseInstanceQuery, } = require('./query'); -const { - EnrollmentResponseCreateMutation, - EnrollmentResponseUpdateMutation, - EnrollmentResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EnrollmentResponseCreate: EnrollmentResponseCreateMutation, EnrollmentResponseUpdate: EnrollmentResponseUpdateMutation, - EnrollmentResponseDelete: EnrollmentResponseDeleteMutation, + EnrollmentResponseRemove: EnrollmentResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EnrollmentResponse', path: '/1_0_2/EnrollmentResponse/:id', query: EnrollmentResponseInstanceQuery, diff --git a/src/resources/1_0_2/profiles/enrollmentresponse/resolver.js b/src/resources/1_0_2/profiles/enrollmentresponse/resolver.js index ce12fb71..1db2e2dd 100644 --- a/src/resources/1_0_2/profiles/enrollmentresponse/resolver.js +++ b/src/resources/1_0_2/profiles/enrollmentresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.enrollmentresponseResolver + * @name exports.getEnrollmentResponse * @static - * @summary EnrollmentResponse Resolver. + * @summary EnrollmentResponse resolver. */ -module.exports.enrollmentresponseResolver = function enrollmentresponseResolver( +module.exports.getEnrollmentResponse = function getEnrollmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseListResolver + * @name exports.getEnrollmentResponseList * @static - * @summary EnrollmentResponse List Resolver. + * @summary EnrollmentResponse list resolver. */ -module.exports.enrollmentresponseListResolver = function enrollmentresponseListResolver( +module.exports.getEnrollmentResponseList = function getEnrollmentResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseInstanceResolver + * @name exports.getEnrollmentResponseInstance * @static - * @summary EnrollmentResponse Instance Resolver. + * @summary EnrollmentResponse instance resolver. */ -module.exports.enrollmentresponseInstanceResolver = function enrollmentresponseInstanceResolver( +module.exports.getEnrollmentResponseInstance = function getEnrollmentResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseCreateResolver + * @name exports.createEnrollmentResponse * @static - * @summary EnrollmentResponse Create Resolver. + * @summary Create EnrollmentResponse resolver. */ -module.exports.enrollmentresponseCreateResolver = function enrollmentresponseCreateResolver( +module.exports.createEnrollmentResponse = function createEnrollmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseUpdateResolver + * @name exports.updateEnrollmentResponse * @static - * @summary EnrollmentResponse Update Resolver. + * @summary Update EnrollmentResponse resolver. */ -module.exports.enrollmentresponseUpdateResolver = function enrollmentresponseUpdateResolver( +module.exports.updateEnrollmentResponse = function updateEnrollmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseDeleteResolver + * @name exports.removeEnrollmentResponse * @static - * @summary EnrollmentResponse Delete Resolver. + * @summary Remove EnrollmentResponse resolver. */ -module.exports.enrollmentresponseDeleteResolver = function enrollmentresponseDeleteResolver( +module.exports.removeEnrollmentResponse = function removeEnrollmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/episodeofcare/mutation.js b/src/resources/1_0_2/profiles/episodeofcare/mutation.js index 941bde4e..82491f33 100644 --- a/src/resources/1_0_2/profiles/episodeofcare/mutation.js +++ b/src/resources/1_0_2/profiles/episodeofcare/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema'); +const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EpisodeOfCareInput = require('../../inputs/episodeofcare.input'); +const EpisodeOfCareInput = require('../../inputs/episodeofcare.input.js'); -// Resolvers -const { - episodeofcareCreateResolver, - episodeofcareUpdateResolver, - episodeofcareDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEpisodeOfCare, + updateEpisodeOfCare, + removeEpisodeOfCare, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EpisodeOfCare', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EpisodeOfCare record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EpisodeOfCare record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EpisodeOfCareCreateMutation - * @summary EpisodeOfCareCreate Mutation. + * @summary EpisodeOfCareCreate mutation. */ module.exports.EpisodeOfCareCreateMutation = { - args: WriteArgs, - description: 'Create a EpisodeOfCare', - resolve: scopeInvariant(scopeOptions, episodeofcareCreateResolver), + description: 'Create a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, createEpisodeOfCare), type: EpisodeOfCareSchema, + args: WriteArgs, }; /** * @name exports.EpisodeOfCareUpdateMutation - * @summary EpisodeOfCareUpdate Mutation. + * @summary EpisodeOfCareUpdate mutation. */ module.exports.EpisodeOfCareUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EpisodeOfCares', - resolve: scopeInvariant(scopeOptions, episodeofcareUpdateResolver), + description: 'Update a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, updateEpisodeOfCare), type: EpisodeOfCareSchema, + args: WriteArgs, }; /** - * @name exports.EpisodeOfCareDeleteMutation - * @summary EpisodeOfCareDelete Mutation. + * @name exports.EpisodeOfCareRemoveMutation + * @summary EpisodeOfCareRemove mutation. */ -module.exports.EpisodeOfCareDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EpisodeOfCare', - resolve: scopeInvariant(scopeOptions, episodeofcareDeleteResolver), +module.exports.EpisodeOfCareRemoveMutation = { + description: 'Remove a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, removeEpisodeOfCare), type: EpisodeOfCareSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/episodeofcare/query.js b/src/resources/1_0_2/profiles/episodeofcare/query.js index 8eb0cb71..7b45b30f 100644 --- a/src/resources/1_0_2/profiles/episodeofcare/query.js +++ b/src/resources/1_0_2/profiles/episodeofcare/query.js @@ -1,55 +1,59 @@ // Schemas -const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EpisodeOfCareArgs = require('../../parameters/episodeofcare.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EpisodeOfCareArgs = require('../../parameters/episodeofcare.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, EpisodeOfCareArgs); // Resolvers const { - episodeofcareResolver, - episodeofcareListResolver, - episodeofcareInstanceResolver, + getEpisodeOfCare, + getEpisodeOfCareList, + getEpisodeOfCareInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EpisodeOfCare', action: 'read', - version: '1_0_2', }; /** * @name exports.EpisodeOfCareQuery - * @summary EpisodeOfCare Query. + * @summary EpisodeOfCare query. */ module.exports.EpisodeOfCareQuery = { - args: Object.assign({}, CommonArgs, EpisodeOfCareArgs), description: 'Query for a single EpisodeOfCare', - resolve: scopeInvariant(scopeOptions, episodeofcareResolver), + resolve: scopeInvariant(scopeOptions, getEpisodeOfCare), type: EpisodeOfCareSchema, + args: args, }; /** * @name exports.EpisodeOfCareListQuery - * @summary EpisodeOfCareList Query. + * @summary EpisodeOfCare query. */ module.exports.EpisodeOfCareListQuery = { - args: Object.assign({}, CommonArgs, EpisodeOfCareArgs), - description: 'Query for multiple EpisodeOfCares', - resolve: scopeInvariant(scopeOptions, episodeofcareListResolver), + description: 'Query for a more than or just one EpisodeOfCare', + resolve: scopeInvariant(scopeOptions, getEpisodeOfCareList), type: BundleSchema, + args: args, }; /** * @name exports.EpisodeOfCareInstanceQuery - * @summary EpisodeOfCareInstance Query. + * @summary EpisodeOfCare query. */ module.exports.EpisodeOfCareInstanceQuery = { - description: 'Get information about a single EpisodeOfCare', - resolve: scopeInvariant(scopeOptions, episodeofcareInstanceResolver), + description: 'Access information about a single EpisodeOfCare', + resolve: scopeInvariant(scopeOptions, getEpisodeOfCareInstance), type: EpisodeOfCareSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/episodeofcare/index.js b/src/resources/1_0_2/profiles/episodeofcare/register.js similarity index 92% rename from src/resources/1_0_2/profiles/episodeofcare/index.js rename to src/resources/1_0_2/profiles/episodeofcare/register.js index 903f523d..c872f5a9 100644 --- a/src/resources/1_0_2/profiles/episodeofcare/index.js +++ b/src/resources/1_0_2/profiles/episodeofcare/register.js @@ -1,15 +1,15 @@ +const { + EpisodeOfCareCreateMutation, + EpisodeOfCareUpdateMutation, + EpisodeOfCareRemoveMutation, +} = require('./mutation'); + const { EpisodeOfCareQuery, EpisodeOfCareListQuery, EpisodeOfCareInstanceQuery, } = require('./query'); -const { - EpisodeOfCareCreateMutation, - EpisodeOfCareUpdateMutation, - EpisodeOfCareDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EpisodeOfCareCreate: EpisodeOfCareCreateMutation, EpisodeOfCareUpdate: EpisodeOfCareUpdateMutation, - EpisodeOfCareDelete: EpisodeOfCareDeleteMutation, + EpisodeOfCareRemove: EpisodeOfCareRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EpisodeOfCare', path: '/1_0_2/EpisodeOfCare/:id', query: EpisodeOfCareInstanceQuery, diff --git a/src/resources/1_0_2/profiles/episodeofcare/resolver.js b/src/resources/1_0_2/profiles/episodeofcare/resolver.js index 5d4723e1..673af555 100644 --- a/src/resources/1_0_2/profiles/episodeofcare/resolver.js +++ b/src/resources/1_0_2/profiles/episodeofcare/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.episodeofcareResolver + * @name exports.getEpisodeOfCare * @static - * @summary EpisodeOfCare Resolver. + * @summary EpisodeOfCare resolver. */ -module.exports.episodeofcareResolver = function episodeofcareResolver( +module.exports.getEpisodeOfCare = function getEpisodeOfCare( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareListResolver + * @name exports.getEpisodeOfCareList * @static - * @summary EpisodeOfCare List Resolver. + * @summary EpisodeOfCare list resolver. */ -module.exports.episodeofcareListResolver = function episodeofcareListResolver( +module.exports.getEpisodeOfCareList = function getEpisodeOfCareList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareInstanceResolver + * @name exports.getEpisodeOfCareInstance * @static - * @summary EpisodeOfCare Instance Resolver. + * @summary EpisodeOfCare instance resolver. */ -module.exports.episodeofcareInstanceResolver = function episodeofcareInstanceResolver( +module.exports.getEpisodeOfCareInstance = function getEpisodeOfCareInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareCreateResolver + * @name exports.createEpisodeOfCare * @static - * @summary EpisodeOfCare Create Resolver. + * @summary Create EpisodeOfCare resolver. */ -module.exports.episodeofcareCreateResolver = function episodeofcareCreateResolver( +module.exports.createEpisodeOfCare = function createEpisodeOfCare( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareUpdateResolver + * @name exports.updateEpisodeOfCare * @static - * @summary EpisodeOfCare Update Resolver. + * @summary Update EpisodeOfCare resolver. */ -module.exports.episodeofcareUpdateResolver = function episodeofcareUpdateResolver( +module.exports.updateEpisodeOfCare = function updateEpisodeOfCare( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareDeleteResolver + * @name exports.removeEpisodeOfCare * @static - * @summary EpisodeOfCare Delete Resolver. + * @summary Remove EpisodeOfCare resolver. */ -module.exports.episodeofcareDeleteResolver = function episodeofcareDeleteResolver( +module.exports.removeEpisodeOfCare = function removeEpisodeOfCare( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/explanationofbenefit/mutation.js b/src/resources/1_0_2/profiles/explanationofbenefit/mutation.js index 05f607e9..6111985e 100644 --- a/src/resources/1_0_2/profiles/explanationofbenefit/mutation.js +++ b/src/resources/1_0_2/profiles/explanationofbenefit/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema'); +const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ExplanationOfBenefitInput = require('../../inputs/explanationofbenefit.input'); +const ExplanationOfBenefitInput = require('../../inputs/explanationofbenefit.input.js'); -// Resolvers -const { - explanationofbenefitCreateResolver, - explanationofbenefitUpdateResolver, - explanationofbenefitDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createExplanationOfBenefit, + updateExplanationOfBenefit, + removeExplanationOfBenefit, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ExplanationOfBenefit', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ExplanationOfBenefit record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ExplanationOfBenefit record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ExplanationOfBenefitCreateMutation - * @summary ExplanationOfBenefitCreate Mutation. + * @summary ExplanationOfBenefitCreate mutation. */ module.exports.ExplanationOfBenefitCreateMutation = { - args: WriteArgs, - description: 'Create a ExplanationOfBenefit', - resolve: scopeInvariant(scopeOptions, explanationofbenefitCreateResolver), + description: 'Create a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, createExplanationOfBenefit), type: ExplanationOfBenefitSchema, + args: WriteArgs, }; /** * @name exports.ExplanationOfBenefitUpdateMutation - * @summary ExplanationOfBenefitUpdate Mutation. + * @summary ExplanationOfBenefitUpdate mutation. */ module.exports.ExplanationOfBenefitUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ExplanationOfBenefits', - resolve: scopeInvariant(scopeOptions, explanationofbenefitUpdateResolver), + description: 'Update a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, updateExplanationOfBenefit), type: ExplanationOfBenefitSchema, + args: WriteArgs, }; /** - * @name exports.ExplanationOfBenefitDeleteMutation - * @summary ExplanationOfBenefitDelete Mutation. + * @name exports.ExplanationOfBenefitRemoveMutation + * @summary ExplanationOfBenefitRemove mutation. */ -module.exports.ExplanationOfBenefitDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ExplanationOfBenefit', - resolve: scopeInvariant(scopeOptions, explanationofbenefitDeleteResolver), +module.exports.ExplanationOfBenefitRemoveMutation = { + description: 'Remove a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, removeExplanationOfBenefit), type: ExplanationOfBenefitSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/explanationofbenefit/query.js b/src/resources/1_0_2/profiles/explanationofbenefit/query.js index 42cfe11c..b0d8b69d 100644 --- a/src/resources/1_0_2/profiles/explanationofbenefit/query.js +++ b/src/resources/1_0_2/profiles/explanationofbenefit/query.js @@ -1,55 +1,59 @@ // Schemas -const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ExplanationOfBenefitArgs = require('../../parameters/explanationofbenefit.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ExplanationOfBenefitArgs = require('../../parameters/explanationofbenefit.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ExplanationOfBenefitArgs); // Resolvers const { - explanationofbenefitResolver, - explanationofbenefitListResolver, - explanationofbenefitInstanceResolver, + getExplanationOfBenefit, + getExplanationOfBenefitList, + getExplanationOfBenefitInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ExplanationOfBenefit', action: 'read', - version: '1_0_2', }; /** * @name exports.ExplanationOfBenefitQuery - * @summary ExplanationOfBenefit Query. + * @summary ExplanationOfBenefit query. */ module.exports.ExplanationOfBenefitQuery = { - args: Object.assign({}, CommonArgs, ExplanationOfBenefitArgs), description: 'Query for a single ExplanationOfBenefit', - resolve: scopeInvariant(scopeOptions, explanationofbenefitResolver), + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefit), type: ExplanationOfBenefitSchema, + args: args, }; /** * @name exports.ExplanationOfBenefitListQuery - * @summary ExplanationOfBenefitList Query. + * @summary ExplanationOfBenefit query. */ module.exports.ExplanationOfBenefitListQuery = { - args: Object.assign({}, CommonArgs, ExplanationOfBenefitArgs), - description: 'Query for multiple ExplanationOfBenefits', - resolve: scopeInvariant(scopeOptions, explanationofbenefitListResolver), + description: 'Query for a more than or just one ExplanationOfBenefit', + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefitList), type: BundleSchema, + args: args, }; /** * @name exports.ExplanationOfBenefitInstanceQuery - * @summary ExplanationOfBenefitInstance Query. + * @summary ExplanationOfBenefit query. */ module.exports.ExplanationOfBenefitInstanceQuery = { - description: 'Get information about a single ExplanationOfBenefit', - resolve: scopeInvariant(scopeOptions, explanationofbenefitInstanceResolver), + description: 'Access information about a single ExplanationOfBenefit', + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefitInstance), type: ExplanationOfBenefitSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/explanationofbenefit/index.js b/src/resources/1_0_2/profiles/explanationofbenefit/register.js similarity index 91% rename from src/resources/1_0_2/profiles/explanationofbenefit/index.js rename to src/resources/1_0_2/profiles/explanationofbenefit/register.js index cbdc3146..2fbac28f 100644 --- a/src/resources/1_0_2/profiles/explanationofbenefit/index.js +++ b/src/resources/1_0_2/profiles/explanationofbenefit/register.js @@ -1,15 +1,15 @@ +const { + ExplanationOfBenefitCreateMutation, + ExplanationOfBenefitUpdateMutation, + ExplanationOfBenefitRemoveMutation, +} = require('./mutation'); + const { ExplanationOfBenefitQuery, ExplanationOfBenefitListQuery, ExplanationOfBenefitInstanceQuery, } = require('./query'); -const { - ExplanationOfBenefitCreateMutation, - ExplanationOfBenefitUpdateMutation, - ExplanationOfBenefitDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ExplanationOfBenefitCreate: ExplanationOfBenefitCreateMutation, ExplanationOfBenefitUpdate: ExplanationOfBenefitUpdateMutation, - ExplanationOfBenefitDelete: ExplanationOfBenefitDeleteMutation, + ExplanationOfBenefitRemove: ExplanationOfBenefitRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ExplanationOfBenefit', path: '/1_0_2/ExplanationOfBenefit/:id', query: ExplanationOfBenefitInstanceQuery, diff --git a/src/resources/1_0_2/profiles/explanationofbenefit/resolver.js b/src/resources/1_0_2/profiles/explanationofbenefit/resolver.js index f39500f7..5f049eb4 100644 --- a/src/resources/1_0_2/profiles/explanationofbenefit/resolver.js +++ b/src/resources/1_0_2/profiles/explanationofbenefit/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.explanationofbenefitResolver + * @name exports.getExplanationOfBenefit * @static - * @summary ExplanationOfBenefit Resolver. + * @summary ExplanationOfBenefit resolver. */ -module.exports.explanationofbenefitResolver = function explanationofbenefitResolver( +module.exports.getExplanationOfBenefit = function getExplanationOfBenefit( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitListResolver + * @name exports.getExplanationOfBenefitList * @static - * @summary ExplanationOfBenefit List Resolver. + * @summary ExplanationOfBenefit list resolver. */ -module.exports.explanationofbenefitListResolver = function explanationofbenefitListResolver( +module.exports.getExplanationOfBenefitList = function getExplanationOfBenefitList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitInstanceResolver + * @name exports.getExplanationOfBenefitInstance * @static - * @summary ExplanationOfBenefit Instance Resolver. + * @summary ExplanationOfBenefit instance resolver. */ -module.exports.explanationofbenefitInstanceResolver = function explanationofbenefitInstanceResolver( +module.exports.getExplanationOfBenefitInstance = function getExplanationOfBenefitInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitCreateResolver + * @name exports.createExplanationOfBenefit * @static - * @summary ExplanationOfBenefit Create Resolver. + * @summary Create ExplanationOfBenefit resolver. */ -module.exports.explanationofbenefitCreateResolver = function explanationofbenefitCreateResolver( +module.exports.createExplanationOfBenefit = function createExplanationOfBenefit( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitUpdateResolver + * @name exports.updateExplanationOfBenefit * @static - * @summary ExplanationOfBenefit Update Resolver. + * @summary Update ExplanationOfBenefit resolver. */ -module.exports.explanationofbenefitUpdateResolver = function explanationofbenefitUpdateResolver( +module.exports.updateExplanationOfBenefit = function updateExplanationOfBenefit( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitDeleteResolver + * @name exports.removeExplanationOfBenefit * @static - * @summary ExplanationOfBenefit Delete Resolver. + * @summary Remove ExplanationOfBenefit resolver. */ -module.exports.explanationofbenefitDeleteResolver = function explanationofbenefitDeleteResolver( +module.exports.removeExplanationOfBenefit = function removeExplanationOfBenefit( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/familymemberhistory/mutation.js b/src/resources/1_0_2/profiles/familymemberhistory/mutation.js index 9e685f2a..b6028350 100644 --- a/src/resources/1_0_2/profiles/familymemberhistory/mutation.js +++ b/src/resources/1_0_2/profiles/familymemberhistory/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema'); +const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const FamilyMemberHistoryInput = require('../../inputs/familymemberhistory.input'); +const FamilyMemberHistoryInput = require('../../inputs/familymemberhistory.input.js'); -// Resolvers -const { - familymemberhistoryCreateResolver, - familymemberhistoryUpdateResolver, - familymemberhistoryDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createFamilyMemberHistory, + updateFamilyMemberHistory, + removeFamilyMemberHistory, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'FamilyMemberHistory', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a FamilyMemberHistory record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a FamilyMemberHistory record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.FamilyMemberHistoryCreateMutation - * @summary FamilyMemberHistoryCreate Mutation. + * @summary FamilyMemberHistoryCreate mutation. */ module.exports.FamilyMemberHistoryCreateMutation = { - args: WriteArgs, - description: 'Create a FamilyMemberHistory', - resolve: scopeInvariant(scopeOptions, familymemberhistoryCreateResolver), + description: 'Create a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, createFamilyMemberHistory), type: FamilyMemberHistorySchema, + args: WriteArgs, }; /** * @name exports.FamilyMemberHistoryUpdateMutation - * @summary FamilyMemberHistoryUpdate Mutation. + * @summary FamilyMemberHistoryUpdate mutation. */ module.exports.FamilyMemberHistoryUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple FamilyMemberHistorys', - resolve: scopeInvariant(scopeOptions, familymemberhistoryUpdateResolver), + description: 'Update a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, updateFamilyMemberHistory), type: FamilyMemberHistorySchema, + args: WriteArgs, }; /** - * @name exports.FamilyMemberHistoryDeleteMutation - * @summary FamilyMemberHistoryDelete Mutation. + * @name exports.FamilyMemberHistoryRemoveMutation + * @summary FamilyMemberHistoryRemove mutation. */ -module.exports.FamilyMemberHistoryDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single FamilyMemberHistory', - resolve: scopeInvariant(scopeOptions, familymemberhistoryDeleteResolver), +module.exports.FamilyMemberHistoryRemoveMutation = { + description: 'Remove a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, removeFamilyMemberHistory), type: FamilyMemberHistorySchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/familymemberhistory/query.js b/src/resources/1_0_2/profiles/familymemberhistory/query.js index ff3940ba..2e7f478f 100644 --- a/src/resources/1_0_2/profiles/familymemberhistory/query.js +++ b/src/resources/1_0_2/profiles/familymemberhistory/query.js @@ -1,55 +1,59 @@ // Schemas -const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const FamilyMemberHistoryArgs = require('../../parameters/familymemberhistory.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const FamilyMemberHistoryArgs = require('../../parameters/familymemberhistory.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, FamilyMemberHistoryArgs); // Resolvers const { - familymemberhistoryResolver, - familymemberhistoryListResolver, - familymemberhistoryInstanceResolver, + getFamilyMemberHistory, + getFamilyMemberHistoryList, + getFamilyMemberHistoryInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'FamilyMemberHistory', action: 'read', - version: '1_0_2', }; /** * @name exports.FamilyMemberHistoryQuery - * @summary FamilyMemberHistory Query. + * @summary FamilyMemberHistory query. */ module.exports.FamilyMemberHistoryQuery = { - args: Object.assign({}, CommonArgs, FamilyMemberHistoryArgs), description: 'Query for a single FamilyMemberHistory', - resolve: scopeInvariant(scopeOptions, familymemberhistoryResolver), + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistory), type: FamilyMemberHistorySchema, + args: args, }; /** * @name exports.FamilyMemberHistoryListQuery - * @summary FamilyMemberHistoryList Query. + * @summary FamilyMemberHistory query. */ module.exports.FamilyMemberHistoryListQuery = { - args: Object.assign({}, CommonArgs, FamilyMemberHistoryArgs), - description: 'Query for multiple FamilyMemberHistorys', - resolve: scopeInvariant(scopeOptions, familymemberhistoryListResolver), + description: 'Query for a more than or just one FamilyMemberHistory', + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistoryList), type: BundleSchema, + args: args, }; /** * @name exports.FamilyMemberHistoryInstanceQuery - * @summary FamilyMemberHistoryInstance Query. + * @summary FamilyMemberHistory query. */ module.exports.FamilyMemberHistoryInstanceQuery = { - description: 'Get information about a single FamilyMemberHistory', - resolve: scopeInvariant(scopeOptions, familymemberhistoryInstanceResolver), + description: 'Access information about a single FamilyMemberHistory', + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistoryInstance), type: FamilyMemberHistorySchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/familymemberhistory/index.js b/src/resources/1_0_2/profiles/familymemberhistory/register.js similarity index 91% rename from src/resources/1_0_2/profiles/familymemberhistory/index.js rename to src/resources/1_0_2/profiles/familymemberhistory/register.js index 67fc9b9d..3befc02f 100644 --- a/src/resources/1_0_2/profiles/familymemberhistory/index.js +++ b/src/resources/1_0_2/profiles/familymemberhistory/register.js @@ -1,15 +1,15 @@ +const { + FamilyMemberHistoryCreateMutation, + FamilyMemberHistoryUpdateMutation, + FamilyMemberHistoryRemoveMutation, +} = require('./mutation'); + const { FamilyMemberHistoryQuery, FamilyMemberHistoryListQuery, FamilyMemberHistoryInstanceQuery, } = require('./query'); -const { - FamilyMemberHistoryCreateMutation, - FamilyMemberHistoryUpdateMutation, - FamilyMemberHistoryDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { FamilyMemberHistoryCreate: FamilyMemberHistoryCreateMutation, FamilyMemberHistoryUpdate: FamilyMemberHistoryUpdateMutation, - FamilyMemberHistoryDelete: FamilyMemberHistoryDeleteMutation, + FamilyMemberHistoryRemove: FamilyMemberHistoryRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'FamilyMemberHistory', path: '/1_0_2/FamilyMemberHistory/:id', query: FamilyMemberHistoryInstanceQuery, diff --git a/src/resources/1_0_2/profiles/familymemberhistory/resolver.js b/src/resources/1_0_2/profiles/familymemberhistory/resolver.js index 6ea6b1c6..d042eb2f 100644 --- a/src/resources/1_0_2/profiles/familymemberhistory/resolver.js +++ b/src/resources/1_0_2/profiles/familymemberhistory/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.familymemberhistoryResolver + * @name exports.getFamilyMemberHistory * @static - * @summary FamilyMemberHistory Resolver. + * @summary FamilyMemberHistory resolver. */ -module.exports.familymemberhistoryResolver = function familymemberhistoryResolver( +module.exports.getFamilyMemberHistory = function getFamilyMemberHistory( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryListResolver + * @name exports.getFamilyMemberHistoryList * @static - * @summary FamilyMemberHistory List Resolver. + * @summary FamilyMemberHistory list resolver. */ -module.exports.familymemberhistoryListResolver = function familymemberhistoryListResolver( +module.exports.getFamilyMemberHistoryList = function getFamilyMemberHistoryList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryInstanceResolver + * @name exports.getFamilyMemberHistoryInstance * @static - * @summary FamilyMemberHistory Instance Resolver. + * @summary FamilyMemberHistory instance resolver. */ -module.exports.familymemberhistoryInstanceResolver = function familymemberhistoryInstanceResolver( +module.exports.getFamilyMemberHistoryInstance = function getFamilyMemberHistoryInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryCreateResolver + * @name exports.createFamilyMemberHistory * @static - * @summary FamilyMemberHistory Create Resolver. + * @summary Create FamilyMemberHistory resolver. */ -module.exports.familymemberhistoryCreateResolver = function familymemberhistoryCreateResolver( +module.exports.createFamilyMemberHistory = function createFamilyMemberHistory( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryUpdateResolver + * @name exports.updateFamilyMemberHistory * @static - * @summary FamilyMemberHistory Update Resolver. + * @summary Update FamilyMemberHistory resolver. */ -module.exports.familymemberhistoryUpdateResolver = function familymemberhistoryUpdateResolver( +module.exports.updateFamilyMemberHistory = function updateFamilyMemberHistory( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryDeleteResolver + * @name exports.removeFamilyMemberHistory * @static - * @summary FamilyMemberHistory Delete Resolver. + * @summary Remove FamilyMemberHistory resolver. */ -module.exports.familymemberhistoryDeleteResolver = function familymemberhistoryDeleteResolver( +module.exports.removeFamilyMemberHistory = function removeFamilyMemberHistory( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/flag/mutation.js b/src/resources/1_0_2/profiles/flag/mutation.js index ebb63fb3..5fde8e5a 100644 --- a/src/resources/1_0_2/profiles/flag/mutation.js +++ b/src/resources/1_0_2/profiles/flag/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const FlagSchema = require('../../schemas/flag.schema'); +const FlagSchema = require('../../schemas/flag.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const FlagInput = require('../../inputs/flag.input'); +const FlagInput = require('../../inputs/flag.input.js'); -// Resolvers -const { - flagCreateResolver, - flagUpdateResolver, - flagDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createFlag, updateFlag, removeFlag } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Flag', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Flag record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Flag record for deletion.', }, }; /** * @name exports.FlagCreateMutation - * @summary FlagCreate Mutation. + * @summary FlagCreate mutation. */ module.exports.FlagCreateMutation = { - args: WriteArgs, - description: 'Create a Flag', - resolve: scopeInvariant(scopeOptions, flagCreateResolver), + description: 'Create a Flag record', + resolve: scopeInvariant(scopeOptions, createFlag), type: FlagSchema, + args: WriteArgs, }; /** * @name exports.FlagUpdateMutation - * @summary FlagUpdate Mutation. + * @summary FlagUpdate mutation. */ module.exports.FlagUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Flags', - resolve: scopeInvariant(scopeOptions, flagUpdateResolver), + description: 'Update a Flag record', + resolve: scopeInvariant(scopeOptions, updateFlag), type: FlagSchema, + args: WriteArgs, }; /** - * @name exports.FlagDeleteMutation - * @summary FlagDelete Mutation. + * @name exports.FlagRemoveMutation + * @summary FlagRemove mutation. */ -module.exports.FlagDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Flag', - resolve: scopeInvariant(scopeOptions, flagDeleteResolver), +module.exports.FlagRemoveMutation = { + description: 'Remove a Flag record', + resolve: scopeInvariant(scopeOptions, removeFlag), type: FlagSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/flag/query.js b/src/resources/1_0_2/profiles/flag/query.js index 116f2eae..a548fe9f 100644 --- a/src/resources/1_0_2/profiles/flag/query.js +++ b/src/resources/1_0_2/profiles/flag/query.js @@ -1,55 +1,55 @@ // Schemas -const FlagSchema = require('../../schemas/flag.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const FlagSchema = require('../../schemas/flag.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const FlagArgs = require('../../parameters/flag.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const FlagArgs = require('../../parameters/flag.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, FlagArgs); // Resolvers -const { - flagResolver, - flagListResolver, - flagInstanceResolver, -} = require('./resolver'); +const { getFlag, getFlagList, getFlagInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Flag', action: 'read', - version: '1_0_2', }; /** * @name exports.FlagQuery - * @summary Flag Query. + * @summary Flag query. */ module.exports.FlagQuery = { - args: Object.assign({}, CommonArgs, FlagArgs), description: 'Query for a single Flag', - resolve: scopeInvariant(scopeOptions, flagResolver), + resolve: scopeInvariant(scopeOptions, getFlag), type: FlagSchema, + args: args, }; /** * @name exports.FlagListQuery - * @summary FlagList Query. + * @summary Flag query. */ module.exports.FlagListQuery = { - args: Object.assign({}, CommonArgs, FlagArgs), - description: 'Query for multiple Flags', - resolve: scopeInvariant(scopeOptions, flagListResolver), + description: 'Query for a more than or just one Flag', + resolve: scopeInvariant(scopeOptions, getFlagList), type: BundleSchema, + args: args, }; /** * @name exports.FlagInstanceQuery - * @summary FlagInstance Query. + * @summary Flag query. */ module.exports.FlagInstanceQuery = { - description: 'Get information about a single Flag', - resolve: scopeInvariant(scopeOptions, flagInstanceResolver), + description: 'Access information about a single Flag', + resolve: scopeInvariant(scopeOptions, getFlagInstance), type: FlagSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/flag/index.js b/src/resources/1_0_2/profiles/flag/register.js similarity index 93% rename from src/resources/1_0_2/profiles/flag/index.js rename to src/resources/1_0_2/profiles/flag/register.js index 7da31555..1b4d0a61 100644 --- a/src/resources/1_0_2/profiles/flag/index.js +++ b/src/resources/1_0_2/profiles/flag/register.js @@ -1,11 +1,11 @@ -const { FlagQuery, FlagListQuery, FlagInstanceQuery } = require('./query'); - const { FlagCreateMutation, FlagUpdateMutation, - FlagDeleteMutation, + FlagRemoveMutation, } = require('./mutation'); +const { FlagQuery, FlagListQuery, FlagInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { FlagCreate: FlagCreateMutation, FlagUpdate: FlagUpdateMutation, - FlagDelete: FlagDeleteMutation, + FlagRemove: FlagRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Flag', path: '/1_0_2/Flag/:id', query: FlagInstanceQuery, diff --git a/src/resources/1_0_2/profiles/flag/resolver.js b/src/resources/1_0_2/profiles/flag/resolver.js index ae6ed812..a6301664 100644 --- a/src/resources/1_0_2/profiles/flag/resolver.js +++ b/src/resources/1_0_2/profiles/flag/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.flagResolver + * @name exports.getFlag * @static - * @summary Flag Resolver. + * @summary Flag resolver. */ -module.exports.flagResolver = function flagResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getFlag = function getFlag(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagListResolver + * @name exports.getFlagList * @static - * @summary Flag List Resolver. + * @summary Flag list resolver. */ -module.exports.flagListResolver = function flagListResolver( +module.exports.getFlagList = function getFlagList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagInstanceResolver + * @name exports.getFlagInstance * @static - * @summary Flag Instance Resolver. + * @summary Flag instance resolver. */ -module.exports.flagInstanceResolver = function flagInstanceResolver( +module.exports.getFlagInstance = function getFlagInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagCreateResolver + * @name exports.createFlag * @static - * @summary Flag Create Resolver. + * @summary Create Flag resolver. */ -module.exports.flagCreateResolver = function flagCreateResolver( +module.exports.createFlag = function createFlag( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagUpdateResolver + * @name exports.updateFlag * @static - * @summary Flag Update Resolver. + * @summary Update Flag resolver. */ -module.exports.flagUpdateResolver = function flagUpdateResolver( +module.exports.updateFlag = function updateFlag( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagDeleteResolver + * @name exports.removeFlag * @static - * @summary Flag Delete Resolver. + * @summary Remove Flag resolver. */ -module.exports.flagDeleteResolver = function flagDeleteResolver( +module.exports.removeFlag = function removeFlag( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/goal/mutation.js b/src/resources/1_0_2/profiles/goal/mutation.js index 2923193a..21b3746c 100644 --- a/src/resources/1_0_2/profiles/goal/mutation.js +++ b/src/resources/1_0_2/profiles/goal/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const GoalSchema = require('../../schemas/goal.schema'); +const GoalSchema = require('../../schemas/goal.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const GoalInput = require('../../inputs/goal.input'); +const GoalInput = require('../../inputs/goal.input.js'); -// Resolvers -const { - goalCreateResolver, - goalUpdateResolver, - goalDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createGoal, updateGoal, removeGoal } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Goal', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Goal record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Goal record for deletion.', }, }; /** * @name exports.GoalCreateMutation - * @summary GoalCreate Mutation. + * @summary GoalCreate mutation. */ module.exports.GoalCreateMutation = { - args: WriteArgs, - description: 'Create a Goal', - resolve: scopeInvariant(scopeOptions, goalCreateResolver), + description: 'Create a Goal record', + resolve: scopeInvariant(scopeOptions, createGoal), type: GoalSchema, + args: WriteArgs, }; /** * @name exports.GoalUpdateMutation - * @summary GoalUpdate Mutation. + * @summary GoalUpdate mutation. */ module.exports.GoalUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Goals', - resolve: scopeInvariant(scopeOptions, goalUpdateResolver), + description: 'Update a Goal record', + resolve: scopeInvariant(scopeOptions, updateGoal), type: GoalSchema, + args: WriteArgs, }; /** - * @name exports.GoalDeleteMutation - * @summary GoalDelete Mutation. + * @name exports.GoalRemoveMutation + * @summary GoalRemove mutation. */ -module.exports.GoalDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Goal', - resolve: scopeInvariant(scopeOptions, goalDeleteResolver), +module.exports.GoalRemoveMutation = { + description: 'Remove a Goal record', + resolve: scopeInvariant(scopeOptions, removeGoal), type: GoalSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/goal/query.js b/src/resources/1_0_2/profiles/goal/query.js index 41450ffc..f8e7a9d7 100644 --- a/src/resources/1_0_2/profiles/goal/query.js +++ b/src/resources/1_0_2/profiles/goal/query.js @@ -1,55 +1,55 @@ // Schemas -const GoalSchema = require('../../schemas/goal.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GoalSchema = require('../../schemas/goal.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const GoalArgs = require('../../parameters/goal.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const GoalArgs = require('../../parameters/goal.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, GoalArgs); // Resolvers -const { - goalResolver, - goalListResolver, - goalInstanceResolver, -} = require('./resolver'); +const { getGoal, getGoalList, getGoalInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Goal', action: 'read', - version: '1_0_2', }; /** * @name exports.GoalQuery - * @summary Goal Query. + * @summary Goal query. */ module.exports.GoalQuery = { - args: Object.assign({}, CommonArgs, GoalArgs), description: 'Query for a single Goal', - resolve: scopeInvariant(scopeOptions, goalResolver), + resolve: scopeInvariant(scopeOptions, getGoal), type: GoalSchema, + args: args, }; /** * @name exports.GoalListQuery - * @summary GoalList Query. + * @summary Goal query. */ module.exports.GoalListQuery = { - args: Object.assign({}, CommonArgs, GoalArgs), - description: 'Query for multiple Goals', - resolve: scopeInvariant(scopeOptions, goalListResolver), + description: 'Query for a more than or just one Goal', + resolve: scopeInvariant(scopeOptions, getGoalList), type: BundleSchema, + args: args, }; /** * @name exports.GoalInstanceQuery - * @summary GoalInstance Query. + * @summary Goal query. */ module.exports.GoalInstanceQuery = { - description: 'Get information about a single Goal', - resolve: scopeInvariant(scopeOptions, goalInstanceResolver), + description: 'Access information about a single Goal', + resolve: scopeInvariant(scopeOptions, getGoalInstance), type: GoalSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/goal/index.js b/src/resources/1_0_2/profiles/goal/register.js similarity index 93% rename from src/resources/1_0_2/profiles/goal/index.js rename to src/resources/1_0_2/profiles/goal/register.js index f47c7094..31abcba1 100644 --- a/src/resources/1_0_2/profiles/goal/index.js +++ b/src/resources/1_0_2/profiles/goal/register.js @@ -1,11 +1,11 @@ -const { GoalQuery, GoalListQuery, GoalInstanceQuery } = require('./query'); - const { GoalCreateMutation, GoalUpdateMutation, - GoalDeleteMutation, + GoalRemoveMutation, } = require('./mutation'); +const { GoalQuery, GoalListQuery, GoalInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { GoalCreate: GoalCreateMutation, GoalUpdate: GoalUpdateMutation, - GoalDelete: GoalDeleteMutation, + GoalRemove: GoalRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Goal', path: '/1_0_2/Goal/:id', query: GoalInstanceQuery, diff --git a/src/resources/1_0_2/profiles/goal/resolver.js b/src/resources/1_0_2/profiles/goal/resolver.js index 189872a9..0cfa479d 100644 --- a/src/resources/1_0_2/profiles/goal/resolver.js +++ b/src/resources/1_0_2/profiles/goal/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.goalResolver + * @name exports.getGoal * @static - * @summary Goal Resolver. + * @summary Goal resolver. */ -module.exports.goalResolver = function goalResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getGoal = function getGoal(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalListResolver + * @name exports.getGoalList * @static - * @summary Goal List Resolver. + * @summary Goal list resolver. */ -module.exports.goalListResolver = function goalListResolver( +module.exports.getGoalList = function getGoalList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalInstanceResolver + * @name exports.getGoalInstance * @static - * @summary Goal Instance Resolver. + * @summary Goal instance resolver. */ -module.exports.goalInstanceResolver = function goalInstanceResolver( +module.exports.getGoalInstance = function getGoalInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalCreateResolver + * @name exports.createGoal * @static - * @summary Goal Create Resolver. + * @summary Create Goal resolver. */ -module.exports.goalCreateResolver = function goalCreateResolver( +module.exports.createGoal = function createGoal( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalUpdateResolver + * @name exports.updateGoal * @static - * @summary Goal Update Resolver. + * @summary Update Goal resolver. */ -module.exports.goalUpdateResolver = function goalUpdateResolver( +module.exports.updateGoal = function updateGoal( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalDeleteResolver + * @name exports.removeGoal * @static - * @summary Goal Delete Resolver. + * @summary Remove Goal resolver. */ -module.exports.goalDeleteResolver = function goalDeleteResolver( +module.exports.removeGoal = function removeGoal( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/group/mutation.js b/src/resources/1_0_2/profiles/group/mutation.js index 12692cf3..4d2a7ca2 100644 --- a/src/resources/1_0_2/profiles/group/mutation.js +++ b/src/resources/1_0_2/profiles/group/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const GroupSchema = require('../../schemas/group.schema'); +const GroupSchema = require('../../schemas/group.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const GroupInput = require('../../inputs/group.input'); +const GroupInput = require('../../inputs/group.input.js'); -// Resolvers -const { - groupCreateResolver, - groupUpdateResolver, - groupDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createGroup, updateGroup, removeGroup } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Group', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Group record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Group record for deletion.', }, }; /** * @name exports.GroupCreateMutation - * @summary GroupCreate Mutation. + * @summary GroupCreate mutation. */ module.exports.GroupCreateMutation = { - args: WriteArgs, - description: 'Create a Group', - resolve: scopeInvariant(scopeOptions, groupCreateResolver), + description: 'Create a Group record', + resolve: scopeInvariant(scopeOptions, createGroup), type: GroupSchema, + args: WriteArgs, }; /** * @name exports.GroupUpdateMutation - * @summary GroupUpdate Mutation. + * @summary GroupUpdate mutation. */ module.exports.GroupUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Groups', - resolve: scopeInvariant(scopeOptions, groupUpdateResolver), + description: 'Update a Group record', + resolve: scopeInvariant(scopeOptions, updateGroup), type: GroupSchema, + args: WriteArgs, }; /** - * @name exports.GroupDeleteMutation - * @summary GroupDelete Mutation. + * @name exports.GroupRemoveMutation + * @summary GroupRemove mutation. */ -module.exports.GroupDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Group', - resolve: scopeInvariant(scopeOptions, groupDeleteResolver), +module.exports.GroupRemoveMutation = { + description: 'Remove a Group record', + resolve: scopeInvariant(scopeOptions, removeGroup), type: GroupSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/group/query.js b/src/resources/1_0_2/profiles/group/query.js index fb9c7604..b8a6fa45 100644 --- a/src/resources/1_0_2/profiles/group/query.js +++ b/src/resources/1_0_2/profiles/group/query.js @@ -1,55 +1,55 @@ // Schemas -const GroupSchema = require('../../schemas/group.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GroupSchema = require('../../schemas/group.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const GroupArgs = require('../../parameters/group.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const GroupArgs = require('../../parameters/group.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, GroupArgs); // Resolvers -const { - groupResolver, - groupListResolver, - groupInstanceResolver, -} = require('./resolver'); +const { getGroup, getGroupList, getGroupInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Group', action: 'read', - version: '1_0_2', }; /** * @name exports.GroupQuery - * @summary Group Query. + * @summary Group query. */ module.exports.GroupQuery = { - args: Object.assign({}, CommonArgs, GroupArgs), description: 'Query for a single Group', - resolve: scopeInvariant(scopeOptions, groupResolver), + resolve: scopeInvariant(scopeOptions, getGroup), type: GroupSchema, + args: args, }; /** * @name exports.GroupListQuery - * @summary GroupList Query. + * @summary Group query. */ module.exports.GroupListQuery = { - args: Object.assign({}, CommonArgs, GroupArgs), - description: 'Query for multiple Groups', - resolve: scopeInvariant(scopeOptions, groupListResolver), + description: 'Query for a more than or just one Group', + resolve: scopeInvariant(scopeOptions, getGroupList), type: BundleSchema, + args: args, }; /** * @name exports.GroupInstanceQuery - * @summary GroupInstance Query. + * @summary Group query. */ module.exports.GroupInstanceQuery = { - description: 'Get information about a single Group', - resolve: scopeInvariant(scopeOptions, groupInstanceResolver), + description: 'Access information about a single Group', + resolve: scopeInvariant(scopeOptions, getGroupInstance), type: GroupSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/group/index.js b/src/resources/1_0_2/profiles/group/register.js similarity index 93% rename from src/resources/1_0_2/profiles/group/index.js rename to src/resources/1_0_2/profiles/group/register.js index 51c95c52..d3f68985 100644 --- a/src/resources/1_0_2/profiles/group/index.js +++ b/src/resources/1_0_2/profiles/group/register.js @@ -1,11 +1,11 @@ -const { GroupQuery, GroupListQuery, GroupInstanceQuery } = require('./query'); - const { GroupCreateMutation, GroupUpdateMutation, - GroupDeleteMutation, + GroupRemoveMutation, } = require('./mutation'); +const { GroupQuery, GroupListQuery, GroupInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { GroupCreate: GroupCreateMutation, GroupUpdate: GroupUpdateMutation, - GroupDelete: GroupDeleteMutation, + GroupRemove: GroupRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Group', path: '/1_0_2/Group/:id', query: GroupInstanceQuery, diff --git a/src/resources/1_0_2/profiles/group/resolver.js b/src/resources/1_0_2/profiles/group/resolver.js index 9e490a7c..71d604dd 100644 --- a/src/resources/1_0_2/profiles/group/resolver.js +++ b/src/resources/1_0_2/profiles/group/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.groupResolver + * @name exports.getGroup * @static - * @summary Group Resolver. + * @summary Group resolver. */ -module.exports.groupResolver = function groupResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getGroup = function getGroup(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupListResolver + * @name exports.getGroupList * @static - * @summary Group List Resolver. + * @summary Group list resolver. */ -module.exports.groupListResolver = function groupListResolver( +module.exports.getGroupList = function getGroupList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupInstanceResolver + * @name exports.getGroupInstance * @static - * @summary Group Instance Resolver. + * @summary Group instance resolver. */ -module.exports.groupInstanceResolver = function groupInstanceResolver( +module.exports.getGroupInstance = function getGroupInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupCreateResolver + * @name exports.createGroup * @static - * @summary Group Create Resolver. + * @summary Create Group resolver. */ -module.exports.groupCreateResolver = function groupCreateResolver( +module.exports.createGroup = function createGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupUpdateResolver + * @name exports.updateGroup * @static - * @summary Group Update Resolver. + * @summary Update Group resolver. */ -module.exports.groupUpdateResolver = function groupUpdateResolver( +module.exports.updateGroup = function updateGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupDeleteResolver + * @name exports.removeGroup * @static - * @summary Group Delete Resolver. + * @summary Remove Group resolver. */ -module.exports.groupDeleteResolver = function groupDeleteResolver( +module.exports.removeGroup = function removeGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/healthcareservice/mutation.js b/src/resources/1_0_2/profiles/healthcareservice/mutation.js index 68b9fac3..b8696c2c 100644 --- a/src/resources/1_0_2/profiles/healthcareservice/mutation.js +++ b/src/resources/1_0_2/profiles/healthcareservice/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema'); +const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const HealthcareServiceInput = require('../../inputs/healthcareservice.input'); +const HealthcareServiceInput = require('../../inputs/healthcareservice.input.js'); -// Resolvers -const { - healthcareserviceCreateResolver, - healthcareserviceUpdateResolver, - healthcareserviceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createHealthcareService, + updateHealthcareService, + removeHealthcareService, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'HealthcareService', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a HealthcareService record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a HealthcareService record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.HealthcareServiceCreateMutation - * @summary HealthcareServiceCreate Mutation. + * @summary HealthcareServiceCreate mutation. */ module.exports.HealthcareServiceCreateMutation = { - args: WriteArgs, - description: 'Create a HealthcareService', - resolve: scopeInvariant(scopeOptions, healthcareserviceCreateResolver), + description: 'Create a HealthcareService record', + resolve: scopeInvariant(scopeOptions, createHealthcareService), type: HealthcareServiceSchema, + args: WriteArgs, }; /** * @name exports.HealthcareServiceUpdateMutation - * @summary HealthcareServiceUpdate Mutation. + * @summary HealthcareServiceUpdate mutation. */ module.exports.HealthcareServiceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple HealthcareServices', - resolve: scopeInvariant(scopeOptions, healthcareserviceUpdateResolver), + description: 'Update a HealthcareService record', + resolve: scopeInvariant(scopeOptions, updateHealthcareService), type: HealthcareServiceSchema, + args: WriteArgs, }; /** - * @name exports.HealthcareServiceDeleteMutation - * @summary HealthcareServiceDelete Mutation. + * @name exports.HealthcareServiceRemoveMutation + * @summary HealthcareServiceRemove mutation. */ -module.exports.HealthcareServiceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single HealthcareService', - resolve: scopeInvariant(scopeOptions, healthcareserviceDeleteResolver), +module.exports.HealthcareServiceRemoveMutation = { + description: 'Remove a HealthcareService record', + resolve: scopeInvariant(scopeOptions, removeHealthcareService), type: HealthcareServiceSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/healthcareservice/query.js b/src/resources/1_0_2/profiles/healthcareservice/query.js index 839bca5e..bc08b5d1 100644 --- a/src/resources/1_0_2/profiles/healthcareservice/query.js +++ b/src/resources/1_0_2/profiles/healthcareservice/query.js @@ -1,55 +1,59 @@ // Schemas -const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const HealthcareServiceArgs = require('../../parameters/healthcareservice.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const HealthcareServiceArgs = require('../../parameters/healthcareservice.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, HealthcareServiceArgs); // Resolvers const { - healthcareserviceResolver, - healthcareserviceListResolver, - healthcareserviceInstanceResolver, + getHealthcareService, + getHealthcareServiceList, + getHealthcareServiceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'HealthcareService', action: 'read', - version: '1_0_2', }; /** * @name exports.HealthcareServiceQuery - * @summary HealthcareService Query. + * @summary HealthcareService query. */ module.exports.HealthcareServiceQuery = { - args: Object.assign({}, CommonArgs, HealthcareServiceArgs), description: 'Query for a single HealthcareService', - resolve: scopeInvariant(scopeOptions, healthcareserviceResolver), + resolve: scopeInvariant(scopeOptions, getHealthcareService), type: HealthcareServiceSchema, + args: args, }; /** * @name exports.HealthcareServiceListQuery - * @summary HealthcareServiceList Query. + * @summary HealthcareService query. */ module.exports.HealthcareServiceListQuery = { - args: Object.assign({}, CommonArgs, HealthcareServiceArgs), - description: 'Query for multiple HealthcareServices', - resolve: scopeInvariant(scopeOptions, healthcareserviceListResolver), + description: 'Query for a more than or just one HealthcareService', + resolve: scopeInvariant(scopeOptions, getHealthcareServiceList), type: BundleSchema, + args: args, }; /** * @name exports.HealthcareServiceInstanceQuery - * @summary HealthcareServiceInstance Query. + * @summary HealthcareService query. */ module.exports.HealthcareServiceInstanceQuery = { - description: 'Get information about a single HealthcareService', - resolve: scopeInvariant(scopeOptions, healthcareserviceInstanceResolver), + description: 'Access information about a single HealthcareService', + resolve: scopeInvariant(scopeOptions, getHealthcareServiceInstance), type: HealthcareServiceSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/healthcareservice/index.js b/src/resources/1_0_2/profiles/healthcareservice/register.js similarity index 91% rename from src/resources/1_0_2/profiles/healthcareservice/index.js rename to src/resources/1_0_2/profiles/healthcareservice/register.js index 62d69bcc..e11a1282 100644 --- a/src/resources/1_0_2/profiles/healthcareservice/index.js +++ b/src/resources/1_0_2/profiles/healthcareservice/register.js @@ -1,15 +1,15 @@ +const { + HealthcareServiceCreateMutation, + HealthcareServiceUpdateMutation, + HealthcareServiceRemoveMutation, +} = require('./mutation'); + const { HealthcareServiceQuery, HealthcareServiceListQuery, HealthcareServiceInstanceQuery, } = require('./query'); -const { - HealthcareServiceCreateMutation, - HealthcareServiceUpdateMutation, - HealthcareServiceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { HealthcareServiceCreate: HealthcareServiceCreateMutation, HealthcareServiceUpdate: HealthcareServiceUpdateMutation, - HealthcareServiceDelete: HealthcareServiceDeleteMutation, + HealthcareServiceRemove: HealthcareServiceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'HealthcareService', path: '/1_0_2/HealthcareService/:id', query: HealthcareServiceInstanceQuery, diff --git a/src/resources/1_0_2/profiles/healthcareservice/resolver.js b/src/resources/1_0_2/profiles/healthcareservice/resolver.js index d52a46e0..29c4204d 100644 --- a/src/resources/1_0_2/profiles/healthcareservice/resolver.js +++ b/src/resources/1_0_2/profiles/healthcareservice/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.healthcareserviceResolver + * @name exports.getHealthcareService * @static - * @summary HealthcareService Resolver. + * @summary HealthcareService resolver. */ -module.exports.healthcareserviceResolver = function healthcareserviceResolver( +module.exports.getHealthcareService = function getHealthcareService( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceListResolver + * @name exports.getHealthcareServiceList * @static - * @summary HealthcareService List Resolver. + * @summary HealthcareService list resolver. */ -module.exports.healthcareserviceListResolver = function healthcareserviceListResolver( +module.exports.getHealthcareServiceList = function getHealthcareServiceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceInstanceResolver + * @name exports.getHealthcareServiceInstance * @static - * @summary HealthcareService Instance Resolver. + * @summary HealthcareService instance resolver. */ -module.exports.healthcareserviceInstanceResolver = function healthcareserviceInstanceResolver( +module.exports.getHealthcareServiceInstance = function getHealthcareServiceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceCreateResolver + * @name exports.createHealthcareService * @static - * @summary HealthcareService Create Resolver. + * @summary Create HealthcareService resolver. */ -module.exports.healthcareserviceCreateResolver = function healthcareserviceCreateResolver( +module.exports.createHealthcareService = function createHealthcareService( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceUpdateResolver + * @name exports.updateHealthcareService * @static - * @summary HealthcareService Update Resolver. + * @summary Update HealthcareService resolver. */ -module.exports.healthcareserviceUpdateResolver = function healthcareserviceUpdateResolver( +module.exports.updateHealthcareService = function updateHealthcareService( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceDeleteResolver + * @name exports.removeHealthcareService * @static - * @summary HealthcareService Delete Resolver. + * @summary Remove HealthcareService resolver. */ -module.exports.healthcareserviceDeleteResolver = function healthcareserviceDeleteResolver( +module.exports.removeHealthcareService = function removeHealthcareService( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/imagingobjectselection/mutation.js b/src/resources/1_0_2/profiles/imagingobjectselection/mutation.js index bb00a5b2..c1f2ed9a 100644 --- a/src/resources/1_0_2/profiles/imagingobjectselection/mutation.js +++ b/src/resources/1_0_2/profiles/imagingobjectselection/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImagingObjectSelectionSchema = require('../../schemas/imagingobjectselection.schema'); +const ImagingObjectSelectionSchema = require('../../schemas/imagingobjectselection.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImagingObjectSelectionInput = require('../../inputs/imagingobjectselection.input'); +const ImagingObjectSelectionInput = require('../../inputs/imagingobjectselection.input.js'); -// Resolvers -const { - imagingobjectselectionCreateResolver, - imagingobjectselectionUpdateResolver, - imagingobjectselectionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImagingObjectSelection, + updateImagingObjectSelection, + removeImagingObjectSelection, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImagingObjectSelection', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ImagingObjectSelection record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ImagingObjectSelection record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ImagingObjectSelectionCreateMutation - * @summary ImagingObjectSelectionCreate Mutation. + * @summary ImagingObjectSelectionCreate mutation. */ module.exports.ImagingObjectSelectionCreateMutation = { - args: WriteArgs, - description: 'Create a ImagingObjectSelection', - resolve: scopeInvariant(scopeOptions, imagingobjectselectionCreateResolver), + description: 'Create a ImagingObjectSelection record', + resolve: scopeInvariant(scopeOptions, createImagingObjectSelection), type: ImagingObjectSelectionSchema, + args: WriteArgs, }; /** * @name exports.ImagingObjectSelectionUpdateMutation - * @summary ImagingObjectSelectionUpdate Mutation. + * @summary ImagingObjectSelectionUpdate mutation. */ module.exports.ImagingObjectSelectionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ImagingObjectSelections', - resolve: scopeInvariant(scopeOptions, imagingobjectselectionUpdateResolver), + description: 'Update a ImagingObjectSelection record', + resolve: scopeInvariant(scopeOptions, updateImagingObjectSelection), type: ImagingObjectSelectionSchema, + args: WriteArgs, }; /** - * @name exports.ImagingObjectSelectionDeleteMutation - * @summary ImagingObjectSelectionDelete Mutation. + * @name exports.ImagingObjectSelectionRemoveMutation + * @summary ImagingObjectSelectionRemove mutation. */ -module.exports.ImagingObjectSelectionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ImagingObjectSelection', - resolve: scopeInvariant(scopeOptions, imagingobjectselectionDeleteResolver), +module.exports.ImagingObjectSelectionRemoveMutation = { + description: 'Remove a ImagingObjectSelection record', + resolve: scopeInvariant(scopeOptions, removeImagingObjectSelection), type: ImagingObjectSelectionSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/imagingobjectselection/query.js b/src/resources/1_0_2/profiles/imagingobjectselection/query.js index 60b80e39..14b71775 100644 --- a/src/resources/1_0_2/profiles/imagingobjectselection/query.js +++ b/src/resources/1_0_2/profiles/imagingobjectselection/query.js @@ -1,55 +1,59 @@ // Schemas -const ImagingObjectSelectionSchema = require('../../schemas/imagingobjectselection.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImagingObjectSelectionSchema = require('../../schemas/imagingobjectselection.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImagingObjectSelectionArgs = require('../../parameters/imagingobjectselection.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImagingObjectSelectionArgs = require('../../parameters/imagingobjectselection.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ImagingObjectSelectionArgs); // Resolvers const { - imagingobjectselectionResolver, - imagingobjectselectionListResolver, - imagingobjectselectionInstanceResolver, + getImagingObjectSelection, + getImagingObjectSelectionList, + getImagingObjectSelectionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImagingObjectSelection', action: 'read', - version: '1_0_2', }; /** * @name exports.ImagingObjectSelectionQuery - * @summary ImagingObjectSelection Query. + * @summary ImagingObjectSelection query. */ module.exports.ImagingObjectSelectionQuery = { - args: Object.assign({}, CommonArgs, ImagingObjectSelectionArgs), description: 'Query for a single ImagingObjectSelection', - resolve: scopeInvariant(scopeOptions, imagingobjectselectionResolver), + resolve: scopeInvariant(scopeOptions, getImagingObjectSelection), type: ImagingObjectSelectionSchema, + args: args, }; /** * @name exports.ImagingObjectSelectionListQuery - * @summary ImagingObjectSelectionList Query. + * @summary ImagingObjectSelection query. */ module.exports.ImagingObjectSelectionListQuery = { - args: Object.assign({}, CommonArgs, ImagingObjectSelectionArgs), - description: 'Query for multiple ImagingObjectSelections', - resolve: scopeInvariant(scopeOptions, imagingobjectselectionListResolver), + description: 'Query for a more than or just one ImagingObjectSelection', + resolve: scopeInvariant(scopeOptions, getImagingObjectSelectionList), type: BundleSchema, + args: args, }; /** * @name exports.ImagingObjectSelectionInstanceQuery - * @summary ImagingObjectSelectionInstance Query. + * @summary ImagingObjectSelection query. */ module.exports.ImagingObjectSelectionInstanceQuery = { - description: 'Get information about a single ImagingObjectSelection', - resolve: scopeInvariant(scopeOptions, imagingobjectselectionInstanceResolver), + description: 'Access information about a single ImagingObjectSelection', + resolve: scopeInvariant(scopeOptions, getImagingObjectSelectionInstance), type: ImagingObjectSelectionSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/imagingobjectselection/index.js b/src/resources/1_0_2/profiles/imagingobjectselection/register.js similarity index 91% rename from src/resources/1_0_2/profiles/imagingobjectselection/index.js rename to src/resources/1_0_2/profiles/imagingobjectselection/register.js index 6743ce62..8800384f 100644 --- a/src/resources/1_0_2/profiles/imagingobjectselection/index.js +++ b/src/resources/1_0_2/profiles/imagingobjectselection/register.js @@ -1,15 +1,15 @@ +const { + ImagingObjectSelectionCreateMutation, + ImagingObjectSelectionUpdateMutation, + ImagingObjectSelectionRemoveMutation, +} = require('./mutation'); + const { ImagingObjectSelectionQuery, ImagingObjectSelectionListQuery, ImagingObjectSelectionInstanceQuery, } = require('./query'); -const { - ImagingObjectSelectionCreateMutation, - ImagingObjectSelectionUpdateMutation, - ImagingObjectSelectionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImagingObjectSelectionCreate: ImagingObjectSelectionCreateMutation, ImagingObjectSelectionUpdate: ImagingObjectSelectionUpdateMutation, - ImagingObjectSelectionDelete: ImagingObjectSelectionDeleteMutation, + ImagingObjectSelectionRemove: ImagingObjectSelectionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ImagingObjectSelection', path: '/1_0_2/ImagingObjectSelection/:id', query: ImagingObjectSelectionInstanceQuery, diff --git a/src/resources/1_0_2/profiles/imagingobjectselection/resolver.js b/src/resources/1_0_2/profiles/imagingobjectselection/resolver.js index 8858de08..2ff514c8 100644 --- a/src/resources/1_0_2/profiles/imagingobjectselection/resolver.js +++ b/src/resources/1_0_2/profiles/imagingobjectselection/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.imagingobjectselectionResolver + * @name exports.getImagingObjectSelection * @static - * @summary ImagingObjectSelection Resolver. + * @summary ImagingObjectSelection resolver. */ -module.exports.imagingobjectselectionResolver = function imagingobjectselectionResolver( +module.exports.getImagingObjectSelection = function getImagingObjectSelection( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingobjectselectionListResolver + * @name exports.getImagingObjectSelectionList * @static - * @summary ImagingObjectSelection List Resolver. + * @summary ImagingObjectSelection list resolver. */ -module.exports.imagingobjectselectionListResolver = function imagingobjectselectionListResolver( +module.exports.getImagingObjectSelectionList = function getImagingObjectSelectionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingobjectselectionInstanceResolver + * @name exports.getImagingObjectSelectionInstance * @static - * @summary ImagingObjectSelection Instance Resolver. + * @summary ImagingObjectSelection instance resolver. */ -module.exports.imagingobjectselectionInstanceResolver = function imagingobjectselectionInstanceResolver( +module.exports.getImagingObjectSelectionInstance = function getImagingObjectSelectionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingobjectselectionCreateResolver + * @name exports.createImagingObjectSelection * @static - * @summary ImagingObjectSelection Create Resolver. + * @summary Create ImagingObjectSelection resolver. */ -module.exports.imagingobjectselectionCreateResolver = function imagingobjectselectionCreateResolver( +module.exports.createImagingObjectSelection = function createImagingObjectSelection( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingobjectselectionUpdateResolver + * @name exports.updateImagingObjectSelection * @static - * @summary ImagingObjectSelection Update Resolver. + * @summary Update ImagingObjectSelection resolver. */ -module.exports.imagingobjectselectionUpdateResolver = function imagingobjectselectionUpdateResolver( +module.exports.updateImagingObjectSelection = function updateImagingObjectSelection( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingobjectselectionDeleteResolver + * @name exports.removeImagingObjectSelection * @static - * @summary ImagingObjectSelection Delete Resolver. + * @summary Remove ImagingObjectSelection resolver. */ -module.exports.imagingobjectselectionDeleteResolver = function imagingobjectselectionDeleteResolver( +module.exports.removeImagingObjectSelection = function removeImagingObjectSelection( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/imagingstudy/mutation.js b/src/resources/1_0_2/profiles/imagingstudy/mutation.js index c65d9e01..45377c8c 100644 --- a/src/resources/1_0_2/profiles/imagingstudy/mutation.js +++ b/src/resources/1_0_2/profiles/imagingstudy/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImagingStudySchema = require('../../schemas/imagingstudy.schema'); +const ImagingStudySchema = require('../../schemas/imagingstudy.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImagingStudyInput = require('../../inputs/imagingstudy.input'); +const ImagingStudyInput = require('../../inputs/imagingstudy.input.js'); -// Resolvers -const { - imagingstudyCreateResolver, - imagingstudyUpdateResolver, - imagingstudyDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImagingStudy, + updateImagingStudy, + removeImagingStudy, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImagingStudy', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ImagingStudy record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ImagingStudy record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ImagingStudyCreateMutation - * @summary ImagingStudyCreate Mutation. + * @summary ImagingStudyCreate mutation. */ module.exports.ImagingStudyCreateMutation = { - args: WriteArgs, - description: 'Create a ImagingStudy', - resolve: scopeInvariant(scopeOptions, imagingstudyCreateResolver), + description: 'Create a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, createImagingStudy), type: ImagingStudySchema, + args: WriteArgs, }; /** * @name exports.ImagingStudyUpdateMutation - * @summary ImagingStudyUpdate Mutation. + * @summary ImagingStudyUpdate mutation. */ module.exports.ImagingStudyUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ImagingStudys', - resolve: scopeInvariant(scopeOptions, imagingstudyUpdateResolver), + description: 'Update a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, updateImagingStudy), type: ImagingStudySchema, + args: WriteArgs, }; /** - * @name exports.ImagingStudyDeleteMutation - * @summary ImagingStudyDelete Mutation. + * @name exports.ImagingStudyRemoveMutation + * @summary ImagingStudyRemove mutation. */ -module.exports.ImagingStudyDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ImagingStudy', - resolve: scopeInvariant(scopeOptions, imagingstudyDeleteResolver), +module.exports.ImagingStudyRemoveMutation = { + description: 'Remove a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, removeImagingStudy), type: ImagingStudySchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/imagingstudy/query.js b/src/resources/1_0_2/profiles/imagingstudy/query.js index 1c2c22e4..ff1ad7c5 100644 --- a/src/resources/1_0_2/profiles/imagingstudy/query.js +++ b/src/resources/1_0_2/profiles/imagingstudy/query.js @@ -1,55 +1,59 @@ // Schemas -const ImagingStudySchema = require('../../schemas/imagingstudy.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImagingStudySchema = require('../../schemas/imagingstudy.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImagingStudyArgs = require('../../parameters/imagingstudy.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImagingStudyArgs = require('../../parameters/imagingstudy.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ImagingStudyArgs); // Resolvers const { - imagingstudyResolver, - imagingstudyListResolver, - imagingstudyInstanceResolver, + getImagingStudy, + getImagingStudyList, + getImagingStudyInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImagingStudy', action: 'read', - version: '1_0_2', }; /** * @name exports.ImagingStudyQuery - * @summary ImagingStudy Query. + * @summary ImagingStudy query. */ module.exports.ImagingStudyQuery = { - args: Object.assign({}, CommonArgs, ImagingStudyArgs), description: 'Query for a single ImagingStudy', - resolve: scopeInvariant(scopeOptions, imagingstudyResolver), + resolve: scopeInvariant(scopeOptions, getImagingStudy), type: ImagingStudySchema, + args: args, }; /** * @name exports.ImagingStudyListQuery - * @summary ImagingStudyList Query. + * @summary ImagingStudy query. */ module.exports.ImagingStudyListQuery = { - args: Object.assign({}, CommonArgs, ImagingStudyArgs), - description: 'Query for multiple ImagingStudys', - resolve: scopeInvariant(scopeOptions, imagingstudyListResolver), + description: 'Query for a more than or just one ImagingStudy', + resolve: scopeInvariant(scopeOptions, getImagingStudyList), type: BundleSchema, + args: args, }; /** * @name exports.ImagingStudyInstanceQuery - * @summary ImagingStudyInstance Query. + * @summary ImagingStudy query. */ module.exports.ImagingStudyInstanceQuery = { - description: 'Get information about a single ImagingStudy', - resolve: scopeInvariant(scopeOptions, imagingstudyInstanceResolver), + description: 'Access information about a single ImagingStudy', + resolve: scopeInvariant(scopeOptions, getImagingStudyInstance), type: ImagingStudySchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/imagingstudy/index.js b/src/resources/1_0_2/profiles/imagingstudy/register.js similarity index 92% rename from src/resources/1_0_2/profiles/imagingstudy/index.js rename to src/resources/1_0_2/profiles/imagingstudy/register.js index a3d145b0..fbe198f7 100644 --- a/src/resources/1_0_2/profiles/imagingstudy/index.js +++ b/src/resources/1_0_2/profiles/imagingstudy/register.js @@ -1,15 +1,15 @@ +const { + ImagingStudyCreateMutation, + ImagingStudyUpdateMutation, + ImagingStudyRemoveMutation, +} = require('./mutation'); + const { ImagingStudyQuery, ImagingStudyListQuery, ImagingStudyInstanceQuery, } = require('./query'); -const { - ImagingStudyCreateMutation, - ImagingStudyUpdateMutation, - ImagingStudyDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImagingStudyCreate: ImagingStudyCreateMutation, ImagingStudyUpdate: ImagingStudyUpdateMutation, - ImagingStudyDelete: ImagingStudyDeleteMutation, + ImagingStudyRemove: ImagingStudyRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ImagingStudy', path: '/1_0_2/ImagingStudy/:id', query: ImagingStudyInstanceQuery, diff --git a/src/resources/1_0_2/profiles/imagingstudy/resolver.js b/src/resources/1_0_2/profiles/imagingstudy/resolver.js index 1de13e9a..41e899e7 100644 --- a/src/resources/1_0_2/profiles/imagingstudy/resolver.js +++ b/src/resources/1_0_2/profiles/imagingstudy/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.imagingstudyResolver + * @name exports.getImagingStudy * @static - * @summary ImagingStudy Resolver. + * @summary ImagingStudy resolver. */ -module.exports.imagingstudyResolver = function imagingstudyResolver( +module.exports.getImagingStudy = function getImagingStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyListResolver + * @name exports.getImagingStudyList * @static - * @summary ImagingStudy List Resolver. + * @summary ImagingStudy list resolver. */ -module.exports.imagingstudyListResolver = function imagingstudyListResolver( +module.exports.getImagingStudyList = function getImagingStudyList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyInstanceResolver + * @name exports.getImagingStudyInstance * @static - * @summary ImagingStudy Instance Resolver. + * @summary ImagingStudy instance resolver. */ -module.exports.imagingstudyInstanceResolver = function imagingstudyInstanceResolver( +module.exports.getImagingStudyInstance = function getImagingStudyInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyCreateResolver + * @name exports.createImagingStudy * @static - * @summary ImagingStudy Create Resolver. + * @summary Create ImagingStudy resolver. */ -module.exports.imagingstudyCreateResolver = function imagingstudyCreateResolver( +module.exports.createImagingStudy = function createImagingStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyUpdateResolver + * @name exports.updateImagingStudy * @static - * @summary ImagingStudy Update Resolver. + * @summary Update ImagingStudy resolver. */ -module.exports.imagingstudyUpdateResolver = function imagingstudyUpdateResolver( +module.exports.updateImagingStudy = function updateImagingStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyDeleteResolver + * @name exports.removeImagingStudy * @static - * @summary ImagingStudy Delete Resolver. + * @summary Remove ImagingStudy resolver. */ -module.exports.imagingstudyDeleteResolver = function imagingstudyDeleteResolver( +module.exports.removeImagingStudy = function removeImagingStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/immunization/mutation.js b/src/resources/1_0_2/profiles/immunization/mutation.js index e342b8d0..82c6ddbd 100644 --- a/src/resources/1_0_2/profiles/immunization/mutation.js +++ b/src/resources/1_0_2/profiles/immunization/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImmunizationSchema = require('../../schemas/immunization.schema'); +const ImmunizationSchema = require('../../schemas/immunization.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImmunizationInput = require('../../inputs/immunization.input'); +const ImmunizationInput = require('../../inputs/immunization.input.js'); -// Resolvers -const { - immunizationCreateResolver, - immunizationUpdateResolver, - immunizationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImmunization, + updateImmunization, + removeImmunization, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Immunization', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Immunization record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Immunization record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ImmunizationCreateMutation - * @summary ImmunizationCreate Mutation. + * @summary ImmunizationCreate mutation. */ module.exports.ImmunizationCreateMutation = { - args: WriteArgs, - description: 'Create a Immunization', - resolve: scopeInvariant(scopeOptions, immunizationCreateResolver), + description: 'Create a Immunization record', + resolve: scopeInvariant(scopeOptions, createImmunization), type: ImmunizationSchema, + args: WriteArgs, }; /** * @name exports.ImmunizationUpdateMutation - * @summary ImmunizationUpdate Mutation. + * @summary ImmunizationUpdate mutation. */ module.exports.ImmunizationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Immunizations', - resolve: scopeInvariant(scopeOptions, immunizationUpdateResolver), + description: 'Update a Immunization record', + resolve: scopeInvariant(scopeOptions, updateImmunization), type: ImmunizationSchema, + args: WriteArgs, }; /** - * @name exports.ImmunizationDeleteMutation - * @summary ImmunizationDelete Mutation. + * @name exports.ImmunizationRemoveMutation + * @summary ImmunizationRemove mutation. */ -module.exports.ImmunizationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Immunization', - resolve: scopeInvariant(scopeOptions, immunizationDeleteResolver), +module.exports.ImmunizationRemoveMutation = { + description: 'Remove a Immunization record', + resolve: scopeInvariant(scopeOptions, removeImmunization), type: ImmunizationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/immunization/query.js b/src/resources/1_0_2/profiles/immunization/query.js index 44a2e545..bdf59029 100644 --- a/src/resources/1_0_2/profiles/immunization/query.js +++ b/src/resources/1_0_2/profiles/immunization/query.js @@ -1,55 +1,59 @@ // Schemas -const ImmunizationSchema = require('../../schemas/immunization.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImmunizationSchema = require('../../schemas/immunization.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImmunizationArgs = require('../../parameters/immunization.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImmunizationArgs = require('../../parameters/immunization.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ImmunizationArgs); // Resolvers const { - immunizationResolver, - immunizationListResolver, - immunizationInstanceResolver, + getImmunization, + getImmunizationList, + getImmunizationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Immunization', action: 'read', - version: '1_0_2', }; /** * @name exports.ImmunizationQuery - * @summary Immunization Query. + * @summary Immunization query. */ module.exports.ImmunizationQuery = { - args: Object.assign({}, CommonArgs, ImmunizationArgs), description: 'Query for a single Immunization', - resolve: scopeInvariant(scopeOptions, immunizationResolver), + resolve: scopeInvariant(scopeOptions, getImmunization), type: ImmunizationSchema, + args: args, }; /** * @name exports.ImmunizationListQuery - * @summary ImmunizationList Query. + * @summary Immunization query. */ module.exports.ImmunizationListQuery = { - args: Object.assign({}, CommonArgs, ImmunizationArgs), - description: 'Query for multiple Immunizations', - resolve: scopeInvariant(scopeOptions, immunizationListResolver), + description: 'Query for a more than or just one Immunization', + resolve: scopeInvariant(scopeOptions, getImmunizationList), type: BundleSchema, + args: args, }; /** * @name exports.ImmunizationInstanceQuery - * @summary ImmunizationInstance Query. + * @summary Immunization query. */ module.exports.ImmunizationInstanceQuery = { - description: 'Get information about a single Immunization', - resolve: scopeInvariant(scopeOptions, immunizationInstanceResolver), + description: 'Access information about a single Immunization', + resolve: scopeInvariant(scopeOptions, getImmunizationInstance), type: ImmunizationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/immunization/index.js b/src/resources/1_0_2/profiles/immunization/register.js similarity index 92% rename from src/resources/1_0_2/profiles/immunization/index.js rename to src/resources/1_0_2/profiles/immunization/register.js index f34719cb..dd16ecc6 100644 --- a/src/resources/1_0_2/profiles/immunization/index.js +++ b/src/resources/1_0_2/profiles/immunization/register.js @@ -1,15 +1,15 @@ +const { + ImmunizationCreateMutation, + ImmunizationUpdateMutation, + ImmunizationRemoveMutation, +} = require('./mutation'); + const { ImmunizationQuery, ImmunizationListQuery, ImmunizationInstanceQuery, } = require('./query'); -const { - ImmunizationCreateMutation, - ImmunizationUpdateMutation, - ImmunizationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImmunizationCreate: ImmunizationCreateMutation, ImmunizationUpdate: ImmunizationUpdateMutation, - ImmunizationDelete: ImmunizationDeleteMutation, + ImmunizationRemove: ImmunizationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Immunization', path: '/1_0_2/Immunization/:id', query: ImmunizationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/immunization/resolver.js b/src/resources/1_0_2/profiles/immunization/resolver.js index 252403bf..bb7be79f 100644 --- a/src/resources/1_0_2/profiles/immunization/resolver.js +++ b/src/resources/1_0_2/profiles/immunization/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.immunizationResolver + * @name exports.getImmunization * @static - * @summary Immunization Resolver. + * @summary Immunization resolver. */ -module.exports.immunizationResolver = function immunizationResolver( +module.exports.getImmunization = function getImmunization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationListResolver + * @name exports.getImmunizationList * @static - * @summary Immunization List Resolver. + * @summary Immunization list resolver. */ -module.exports.immunizationListResolver = function immunizationListResolver( +module.exports.getImmunizationList = function getImmunizationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationInstanceResolver + * @name exports.getImmunizationInstance * @static - * @summary Immunization Instance Resolver. + * @summary Immunization instance resolver. */ -module.exports.immunizationInstanceResolver = function immunizationInstanceResolver( +module.exports.getImmunizationInstance = function getImmunizationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationCreateResolver + * @name exports.createImmunization * @static - * @summary Immunization Create Resolver. + * @summary Create Immunization resolver. */ -module.exports.immunizationCreateResolver = function immunizationCreateResolver( +module.exports.createImmunization = function createImmunization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationUpdateResolver + * @name exports.updateImmunization * @static - * @summary Immunization Update Resolver. + * @summary Update Immunization resolver. */ -module.exports.immunizationUpdateResolver = function immunizationUpdateResolver( +module.exports.updateImmunization = function updateImmunization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationDeleteResolver + * @name exports.removeImmunization * @static - * @summary Immunization Delete Resolver. + * @summary Remove Immunization resolver. */ -module.exports.immunizationDeleteResolver = function immunizationDeleteResolver( +module.exports.removeImmunization = function removeImmunization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/immunizationrecommendation/mutation.js b/src/resources/1_0_2/profiles/immunizationrecommendation/mutation.js index 2de23cd5..83c4dca3 100644 --- a/src/resources/1_0_2/profiles/immunizationrecommendation/mutation.js +++ b/src/resources/1_0_2/profiles/immunizationrecommendation/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema'); +const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImmunizationRecommendationInput = require('../../inputs/immunizationrecommendation.input'); +const ImmunizationRecommendationInput = require('../../inputs/immunizationrecommendation.input.js'); -// Resolvers -const { - immunizationrecommendationCreateResolver, - immunizationrecommendationUpdateResolver, - immunizationrecommendationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImmunizationRecommendation, + updateImmunizationRecommendation, + removeImmunizationRecommendation, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImmunizationRecommendation', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ImmunizationRecommendation record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ImmunizationRecommendation record for deletion.', }, @@ -48,42 +49,33 @@ let DeleteArgs = { /** * @name exports.ImmunizationRecommendationCreateMutation - * @summary ImmunizationRecommendationCreate Mutation. + * @summary ImmunizationRecommendationCreate mutation. */ module.exports.ImmunizationRecommendationCreateMutation = { - args: WriteArgs, - description: 'Create a ImmunizationRecommendation', - resolve: scopeInvariant( - scopeOptions, - immunizationrecommendationCreateResolver, - ), + description: 'Create a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, createImmunizationRecommendation), type: ImmunizationRecommendationSchema, + args: WriteArgs, }; /** * @name exports.ImmunizationRecommendationUpdateMutation - * @summary ImmunizationRecommendationUpdate Mutation. + * @summary ImmunizationRecommendationUpdate mutation. */ module.exports.ImmunizationRecommendationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ImmunizationRecommendations', - resolve: scopeInvariant( - scopeOptions, - immunizationrecommendationUpdateResolver, - ), + description: 'Update a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, updateImmunizationRecommendation), type: ImmunizationRecommendationSchema, + args: WriteArgs, }; /** - * @name exports.ImmunizationRecommendationDeleteMutation - * @summary ImmunizationRecommendationDelete Mutation. + * @name exports.ImmunizationRecommendationRemoveMutation + * @summary ImmunizationRecommendationRemove mutation. */ -module.exports.ImmunizationRecommendationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ImmunizationRecommendation', - resolve: scopeInvariant( - scopeOptions, - immunizationrecommendationDeleteResolver, - ), +module.exports.ImmunizationRecommendationRemoveMutation = { + description: 'Remove a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, removeImmunizationRecommendation), type: ImmunizationRecommendationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/immunizationrecommendation/query.js b/src/resources/1_0_2/profiles/immunizationrecommendation/query.js index 6b577881..20b17ad0 100644 --- a/src/resources/1_0_2/profiles/immunizationrecommendation/query.js +++ b/src/resources/1_0_2/profiles/immunizationrecommendation/query.js @@ -1,58 +1,59 @@ // Schemas -const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImmunizationRecommendationArgs = require('../../parameters/immunizationrecommendation.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImmunizationRecommendationArgs = require('../../parameters/immunizationrecommendation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ImmunizationRecommendationArgs); // Resolvers const { - immunizationrecommendationResolver, - immunizationrecommendationListResolver, - immunizationrecommendationInstanceResolver, + getImmunizationRecommendation, + getImmunizationRecommendationList, + getImmunizationRecommendationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImmunizationRecommendation', action: 'read', - version: '1_0_2', }; /** * @name exports.ImmunizationRecommendationQuery - * @summary ImmunizationRecommendation Query. + * @summary ImmunizationRecommendation query. */ module.exports.ImmunizationRecommendationQuery = { - args: Object.assign({}, CommonArgs, ImmunizationRecommendationArgs), description: 'Query for a single ImmunizationRecommendation', - resolve: scopeInvariant(scopeOptions, immunizationrecommendationResolver), + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendation), type: ImmunizationRecommendationSchema, + args: args, }; /** * @name exports.ImmunizationRecommendationListQuery - * @summary ImmunizationRecommendationList Query. + * @summary ImmunizationRecommendation query. */ module.exports.ImmunizationRecommendationListQuery = { - args: Object.assign({}, CommonArgs, ImmunizationRecommendationArgs), - description: 'Query for multiple ImmunizationRecommendations', - resolve: scopeInvariant(scopeOptions, immunizationrecommendationListResolver), + description: 'Query for a more than or just one ImmunizationRecommendation', + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendationList), type: BundleSchema, + args: args, }; /** * @name exports.ImmunizationRecommendationInstanceQuery - * @summary ImmunizationRecommendationInstance Query. + * @summary ImmunizationRecommendation query. */ module.exports.ImmunizationRecommendationInstanceQuery = { - description: 'Get information about a single ImmunizationRecommendation', - resolve: scopeInvariant( - scopeOptions, - immunizationrecommendationInstanceResolver, - ), + description: 'Access information about a single ImmunizationRecommendation', + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendationInstance), type: ImmunizationRecommendationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/immunizationrecommendation/index.js b/src/resources/1_0_2/profiles/immunizationrecommendation/register.js similarity index 90% rename from src/resources/1_0_2/profiles/immunizationrecommendation/index.js rename to src/resources/1_0_2/profiles/immunizationrecommendation/register.js index abafbfa8..3c532f66 100644 --- a/src/resources/1_0_2/profiles/immunizationrecommendation/index.js +++ b/src/resources/1_0_2/profiles/immunizationrecommendation/register.js @@ -1,15 +1,15 @@ +const { + ImmunizationRecommendationCreateMutation, + ImmunizationRecommendationUpdateMutation, + ImmunizationRecommendationRemoveMutation, +} = require('./mutation'); + const { ImmunizationRecommendationQuery, ImmunizationRecommendationListQuery, ImmunizationRecommendationInstanceQuery, } = require('./query'); -const { - ImmunizationRecommendationCreateMutation, - ImmunizationRecommendationUpdateMutation, - ImmunizationRecommendationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImmunizationRecommendationCreate: ImmunizationRecommendationCreateMutation, ImmunizationRecommendationUpdate: ImmunizationRecommendationUpdateMutation, - ImmunizationRecommendationDelete: ImmunizationRecommendationDeleteMutation, + ImmunizationRecommendationRemove: ImmunizationRecommendationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ImmunizationRecommendation', path: '/1_0_2/ImmunizationRecommendation/:id', query: ImmunizationRecommendationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/immunizationrecommendation/resolver.js b/src/resources/1_0_2/profiles/immunizationrecommendation/resolver.js index 3e7246a4..3ad925a4 100644 --- a/src/resources/1_0_2/profiles/immunizationrecommendation/resolver.js +++ b/src/resources/1_0_2/profiles/immunizationrecommendation/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.immunizationrecommendationResolver + * @name exports.getImmunizationRecommendation * @static - * @summary ImmunizationRecommendation Resolver. + * @summary ImmunizationRecommendation resolver. */ -module.exports.immunizationrecommendationResolver = function immunizationrecommendationResolver( +module.exports.getImmunizationRecommendation = function getImmunizationRecommendation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationListResolver + * @name exports.getImmunizationRecommendationList * @static - * @summary ImmunizationRecommendation List Resolver. + * @summary ImmunizationRecommendation list resolver. */ -module.exports.immunizationrecommendationListResolver = function immunizationrecommendationListResolver( +module.exports.getImmunizationRecommendationList = function getImmunizationRecommendationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationInstanceResolver + * @name exports.getImmunizationRecommendationInstance * @static - * @summary ImmunizationRecommendation Instance Resolver. + * @summary ImmunizationRecommendation instance resolver. */ -module.exports.immunizationrecommendationInstanceResolver = function immunizationrecommendationInstanceResolver( +module.exports.getImmunizationRecommendationInstance = function getImmunizationRecommendationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationCreateResolver + * @name exports.createImmunizationRecommendation * @static - * @summary ImmunizationRecommendation Create Resolver. + * @summary Create ImmunizationRecommendation resolver. */ -module.exports.immunizationrecommendationCreateResolver = function immunizationrecommendationCreateResolver( +module.exports.createImmunizationRecommendation = function createImmunizationRecommendation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationUpdateResolver + * @name exports.updateImmunizationRecommendation * @static - * @summary ImmunizationRecommendation Update Resolver. + * @summary Update ImmunizationRecommendation resolver. */ -module.exports.immunizationrecommendationUpdateResolver = function immunizationrecommendationUpdateResolver( +module.exports.updateImmunizationRecommendation = function updateImmunizationRecommendation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationDeleteResolver + * @name exports.removeImmunizationRecommendation * @static - * @summary ImmunizationRecommendation Delete Resolver. + * @summary Remove ImmunizationRecommendation resolver. */ -module.exports.immunizationrecommendationDeleteResolver = function immunizationrecommendationDeleteResolver( +module.exports.removeImmunizationRecommendation = function removeImmunizationRecommendation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/implementationguide/mutation.js b/src/resources/1_0_2/profiles/implementationguide/mutation.js index f4e20cf2..8285d3d3 100644 --- a/src/resources/1_0_2/profiles/implementationguide/mutation.js +++ b/src/resources/1_0_2/profiles/implementationguide/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImplementationGuideSchema = require('../../schemas/implementationguide.schema'); +const ImplementationGuideSchema = require('../../schemas/implementationguide.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImplementationGuideInput = require('../../inputs/implementationguide.input'); +const ImplementationGuideInput = require('../../inputs/implementationguide.input.js'); -// Resolvers -const { - implementationguideCreateResolver, - implementationguideUpdateResolver, - implementationguideDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImplementationGuide, + updateImplementationGuide, + removeImplementationGuide, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImplementationGuide', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ImplementationGuide record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ImplementationGuide record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ImplementationGuideCreateMutation - * @summary ImplementationGuideCreate Mutation. + * @summary ImplementationGuideCreate mutation. */ module.exports.ImplementationGuideCreateMutation = { - args: WriteArgs, - description: 'Create a ImplementationGuide', - resolve: scopeInvariant(scopeOptions, implementationguideCreateResolver), + description: 'Create a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, createImplementationGuide), type: ImplementationGuideSchema, + args: WriteArgs, }; /** * @name exports.ImplementationGuideUpdateMutation - * @summary ImplementationGuideUpdate Mutation. + * @summary ImplementationGuideUpdate mutation. */ module.exports.ImplementationGuideUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ImplementationGuides', - resolve: scopeInvariant(scopeOptions, implementationguideUpdateResolver), + description: 'Update a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, updateImplementationGuide), type: ImplementationGuideSchema, + args: WriteArgs, }; /** - * @name exports.ImplementationGuideDeleteMutation - * @summary ImplementationGuideDelete Mutation. + * @name exports.ImplementationGuideRemoveMutation + * @summary ImplementationGuideRemove mutation. */ -module.exports.ImplementationGuideDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ImplementationGuide', - resolve: scopeInvariant(scopeOptions, implementationguideDeleteResolver), +module.exports.ImplementationGuideRemoveMutation = { + description: 'Remove a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, removeImplementationGuide), type: ImplementationGuideSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/implementationguide/query.js b/src/resources/1_0_2/profiles/implementationguide/query.js index 258f9564..c2aaf818 100644 --- a/src/resources/1_0_2/profiles/implementationguide/query.js +++ b/src/resources/1_0_2/profiles/implementationguide/query.js @@ -1,55 +1,59 @@ // Schemas -const ImplementationGuideSchema = require('../../schemas/implementationguide.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImplementationGuideSchema = require('../../schemas/implementationguide.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImplementationGuideArgs = require('../../parameters/implementationguide.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImplementationGuideArgs = require('../../parameters/implementationguide.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ImplementationGuideArgs); // Resolvers const { - implementationguideResolver, - implementationguideListResolver, - implementationguideInstanceResolver, + getImplementationGuide, + getImplementationGuideList, + getImplementationGuideInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImplementationGuide', action: 'read', - version: '1_0_2', }; /** * @name exports.ImplementationGuideQuery - * @summary ImplementationGuide Query. + * @summary ImplementationGuide query. */ module.exports.ImplementationGuideQuery = { - args: Object.assign({}, CommonArgs, ImplementationGuideArgs), description: 'Query for a single ImplementationGuide', - resolve: scopeInvariant(scopeOptions, implementationguideResolver), + resolve: scopeInvariant(scopeOptions, getImplementationGuide), type: ImplementationGuideSchema, + args: args, }; /** * @name exports.ImplementationGuideListQuery - * @summary ImplementationGuideList Query. + * @summary ImplementationGuide query. */ module.exports.ImplementationGuideListQuery = { - args: Object.assign({}, CommonArgs, ImplementationGuideArgs), - description: 'Query for multiple ImplementationGuides', - resolve: scopeInvariant(scopeOptions, implementationguideListResolver), + description: 'Query for a more than or just one ImplementationGuide', + resolve: scopeInvariant(scopeOptions, getImplementationGuideList), type: BundleSchema, + args: args, }; /** * @name exports.ImplementationGuideInstanceQuery - * @summary ImplementationGuideInstance Query. + * @summary ImplementationGuide query. */ module.exports.ImplementationGuideInstanceQuery = { - description: 'Get information about a single ImplementationGuide', - resolve: scopeInvariant(scopeOptions, implementationguideInstanceResolver), + description: 'Access information about a single ImplementationGuide', + resolve: scopeInvariant(scopeOptions, getImplementationGuideInstance), type: ImplementationGuideSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/implementationguide/index.js b/src/resources/1_0_2/profiles/implementationguide/register.js similarity index 91% rename from src/resources/1_0_2/profiles/implementationguide/index.js rename to src/resources/1_0_2/profiles/implementationguide/register.js index 6c44ad58..25ca66bc 100644 --- a/src/resources/1_0_2/profiles/implementationguide/index.js +++ b/src/resources/1_0_2/profiles/implementationguide/register.js @@ -1,15 +1,15 @@ +const { + ImplementationGuideCreateMutation, + ImplementationGuideUpdateMutation, + ImplementationGuideRemoveMutation, +} = require('./mutation'); + const { ImplementationGuideQuery, ImplementationGuideListQuery, ImplementationGuideInstanceQuery, } = require('./query'); -const { - ImplementationGuideCreateMutation, - ImplementationGuideUpdateMutation, - ImplementationGuideDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImplementationGuideCreate: ImplementationGuideCreateMutation, ImplementationGuideUpdate: ImplementationGuideUpdateMutation, - ImplementationGuideDelete: ImplementationGuideDeleteMutation, + ImplementationGuideRemove: ImplementationGuideRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ImplementationGuide', path: '/1_0_2/ImplementationGuide/:id', query: ImplementationGuideInstanceQuery, diff --git a/src/resources/1_0_2/profiles/implementationguide/resolver.js b/src/resources/1_0_2/profiles/implementationguide/resolver.js index 1bb32b2f..cec84931 100644 --- a/src/resources/1_0_2/profiles/implementationguide/resolver.js +++ b/src/resources/1_0_2/profiles/implementationguide/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.implementationguideResolver + * @name exports.getImplementationGuide * @static - * @summary ImplementationGuide Resolver. + * @summary ImplementationGuide resolver. */ -module.exports.implementationguideResolver = function implementationguideResolver( +module.exports.getImplementationGuide = function getImplementationGuide( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideListResolver + * @name exports.getImplementationGuideList * @static - * @summary ImplementationGuide List Resolver. + * @summary ImplementationGuide list resolver. */ -module.exports.implementationguideListResolver = function implementationguideListResolver( +module.exports.getImplementationGuideList = function getImplementationGuideList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideInstanceResolver + * @name exports.getImplementationGuideInstance * @static - * @summary ImplementationGuide Instance Resolver. + * @summary ImplementationGuide instance resolver. */ -module.exports.implementationguideInstanceResolver = function implementationguideInstanceResolver( +module.exports.getImplementationGuideInstance = function getImplementationGuideInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideCreateResolver + * @name exports.createImplementationGuide * @static - * @summary ImplementationGuide Create Resolver. + * @summary Create ImplementationGuide resolver. */ -module.exports.implementationguideCreateResolver = function implementationguideCreateResolver( +module.exports.createImplementationGuide = function createImplementationGuide( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideUpdateResolver + * @name exports.updateImplementationGuide * @static - * @summary ImplementationGuide Update Resolver. + * @summary Update ImplementationGuide resolver. */ -module.exports.implementationguideUpdateResolver = function implementationguideUpdateResolver( +module.exports.updateImplementationGuide = function updateImplementationGuide( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideDeleteResolver + * @name exports.removeImplementationGuide * @static - * @summary ImplementationGuide Delete Resolver. + * @summary Remove ImplementationGuide resolver. */ -module.exports.implementationguideDeleteResolver = function implementationguideDeleteResolver( +module.exports.removeImplementationGuide = function removeImplementationGuide( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/list/mutation.js b/src/resources/1_0_2/profiles/list/mutation.js index fd5d5721..e23ef148 100644 --- a/src/resources/1_0_2/profiles/list/mutation.js +++ b/src/resources/1_0_2/profiles/list/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ListSchema = require('../../schemas/list.schema'); +const ListSchema = require('../../schemas/list.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ListInput = require('../../inputs/list.input'); +const ListInput = require('../../inputs/list.input.js'); -// Resolvers -const { - listCreateResolver, - listUpdateResolver, - listDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createList, updateList, removeList } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'List', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a List record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a List record for deletion.', }, }; /** * @name exports.ListCreateMutation - * @summary ListCreate Mutation. + * @summary ListCreate mutation. */ module.exports.ListCreateMutation = { - args: WriteArgs, - description: 'Create a List', - resolve: scopeInvariant(scopeOptions, listCreateResolver), + description: 'Create a List record', + resolve: scopeInvariant(scopeOptions, createList), type: ListSchema, + args: WriteArgs, }; /** * @name exports.ListUpdateMutation - * @summary ListUpdate Mutation. + * @summary ListUpdate mutation. */ module.exports.ListUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Lists', - resolve: scopeInvariant(scopeOptions, listUpdateResolver), + description: 'Update a List record', + resolve: scopeInvariant(scopeOptions, updateList), type: ListSchema, + args: WriteArgs, }; /** - * @name exports.ListDeleteMutation - * @summary ListDelete Mutation. + * @name exports.ListRemoveMutation + * @summary ListRemove mutation. */ -module.exports.ListDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single List', - resolve: scopeInvariant(scopeOptions, listDeleteResolver), +module.exports.ListRemoveMutation = { + description: 'Remove a List record', + resolve: scopeInvariant(scopeOptions, removeList), type: ListSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/list/query.js b/src/resources/1_0_2/profiles/list/query.js index 5b9457b5..84f6ce85 100644 --- a/src/resources/1_0_2/profiles/list/query.js +++ b/src/resources/1_0_2/profiles/list/query.js @@ -1,55 +1,55 @@ // Schemas -const ListSchema = require('../../schemas/list.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ListSchema = require('../../schemas/list.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ListArgs = require('../../parameters/list.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ListArgs = require('../../parameters/list.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ListArgs); // Resolvers -const { - listResolver, - listListResolver, - listInstanceResolver, -} = require('./resolver'); +const { getList, getListList, getListInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'List', action: 'read', - version: '1_0_2', }; /** * @name exports.ListQuery - * @summary List Query. + * @summary List query. */ module.exports.ListQuery = { - args: Object.assign({}, CommonArgs, ListArgs), description: 'Query for a single List', - resolve: scopeInvariant(scopeOptions, listResolver), + resolve: scopeInvariant(scopeOptions, getList), type: ListSchema, + args: args, }; /** * @name exports.ListListQuery - * @summary ListList Query. + * @summary List query. */ module.exports.ListListQuery = { - args: Object.assign({}, CommonArgs, ListArgs), - description: 'Query for multiple Lists', - resolve: scopeInvariant(scopeOptions, listListResolver), + description: 'Query for a more than or just one List', + resolve: scopeInvariant(scopeOptions, getListList), type: BundleSchema, + args: args, }; /** * @name exports.ListInstanceQuery - * @summary ListInstance Query. + * @summary List query. */ module.exports.ListInstanceQuery = { - description: 'Get information about a single List', - resolve: scopeInvariant(scopeOptions, listInstanceResolver), + description: 'Access information about a single List', + resolve: scopeInvariant(scopeOptions, getListInstance), type: ListSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/list/index.js b/src/resources/1_0_2/profiles/list/register.js similarity index 93% rename from src/resources/1_0_2/profiles/list/index.js rename to src/resources/1_0_2/profiles/list/register.js index 178093db..2c80673e 100644 --- a/src/resources/1_0_2/profiles/list/index.js +++ b/src/resources/1_0_2/profiles/list/register.js @@ -1,11 +1,11 @@ -const { ListQuery, ListListQuery, ListInstanceQuery } = require('./query'); - const { ListCreateMutation, ListUpdateMutation, - ListDeleteMutation, + ListRemoveMutation, } = require('./mutation'); +const { ListQuery, ListListQuery, ListInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { ListCreate: ListCreateMutation, ListUpdate: ListUpdateMutation, - ListDelete: ListDeleteMutation, + ListRemove: ListRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'List', path: '/1_0_2/List/:id', query: ListInstanceQuery, diff --git a/src/resources/1_0_2/profiles/list/resolver.js b/src/resources/1_0_2/profiles/list/resolver.js index 60be80f5..5cc5c290 100644 --- a/src/resources/1_0_2/profiles/list/resolver.js +++ b/src/resources/1_0_2/profiles/list/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.listResolver + * @name exports.getList * @static - * @summary List Resolver. + * @summary List resolver. */ -module.exports.listResolver = function listResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getList = function getList(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listListResolver + * @name exports.getListList * @static - * @summary List List Resolver. + * @summary List list resolver. */ -module.exports.listListResolver = function listListResolver( +module.exports.getListList = function getListList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listInstanceResolver + * @name exports.getListInstance * @static - * @summary List Instance Resolver. + * @summary List instance resolver. */ -module.exports.listInstanceResolver = function listInstanceResolver( +module.exports.getListInstance = function getListInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listCreateResolver + * @name exports.createList * @static - * @summary List Create Resolver. + * @summary Create List resolver. */ -module.exports.listCreateResolver = function listCreateResolver( +module.exports.createList = function createList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listUpdateResolver + * @name exports.updateList * @static - * @summary List Update Resolver. + * @summary Update List resolver. */ -module.exports.listUpdateResolver = function listUpdateResolver( +module.exports.updateList = function updateList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listDeleteResolver + * @name exports.removeList * @static - * @summary List Delete Resolver. + * @summary Remove List resolver. */ -module.exports.listDeleteResolver = function listDeleteResolver( +module.exports.removeList = function removeList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/location/mutation.js b/src/resources/1_0_2/profiles/location/mutation.js index 4720f9a6..7e495221 100644 --- a/src/resources/1_0_2/profiles/location/mutation.js +++ b/src/resources/1_0_2/profiles/location/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const LocationSchema = require('../../schemas/location.schema'); +const LocationSchema = require('../../schemas/location.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const LocationInput = require('../../inputs/location.input'); +const LocationInput = require('../../inputs/location.input.js'); -// Resolvers -const { - locationCreateResolver, - locationUpdateResolver, - locationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createLocation, + updateLocation, + removeLocation, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Location', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Location record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Location record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.LocationCreateMutation - * @summary LocationCreate Mutation. + * @summary LocationCreate mutation. */ module.exports.LocationCreateMutation = { - args: WriteArgs, - description: 'Create a Location', - resolve: scopeInvariant(scopeOptions, locationCreateResolver), + description: 'Create a Location record', + resolve: scopeInvariant(scopeOptions, createLocation), type: LocationSchema, + args: WriteArgs, }; /** * @name exports.LocationUpdateMutation - * @summary LocationUpdate Mutation. + * @summary LocationUpdate mutation. */ module.exports.LocationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Locations', - resolve: scopeInvariant(scopeOptions, locationUpdateResolver), + description: 'Update a Location record', + resolve: scopeInvariant(scopeOptions, updateLocation), type: LocationSchema, + args: WriteArgs, }; /** - * @name exports.LocationDeleteMutation - * @summary LocationDelete Mutation. + * @name exports.LocationRemoveMutation + * @summary LocationRemove mutation. */ -module.exports.LocationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Location', - resolve: scopeInvariant(scopeOptions, locationDeleteResolver), +module.exports.LocationRemoveMutation = { + description: 'Remove a Location record', + resolve: scopeInvariant(scopeOptions, removeLocation), type: LocationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/location/query.js b/src/resources/1_0_2/profiles/location/query.js index 2029e813..0896c4d0 100644 --- a/src/resources/1_0_2/profiles/location/query.js +++ b/src/resources/1_0_2/profiles/location/query.js @@ -1,55 +1,59 @@ // Schemas -const LocationSchema = require('../../schemas/location.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const LocationSchema = require('../../schemas/location.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const LocationArgs = require('../../parameters/location.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const LocationArgs = require('../../parameters/location.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, LocationArgs); // Resolvers const { - locationResolver, - locationListResolver, - locationInstanceResolver, + getLocation, + getLocationList, + getLocationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Location', action: 'read', - version: '1_0_2', }; /** * @name exports.LocationQuery - * @summary Location Query. + * @summary Location query. */ module.exports.LocationQuery = { - args: Object.assign({}, CommonArgs, LocationArgs), description: 'Query for a single Location', - resolve: scopeInvariant(scopeOptions, locationResolver), + resolve: scopeInvariant(scopeOptions, getLocation), type: LocationSchema, + args: args, }; /** * @name exports.LocationListQuery - * @summary LocationList Query. + * @summary Location query. */ module.exports.LocationListQuery = { - args: Object.assign({}, CommonArgs, LocationArgs), - description: 'Query for multiple Locations', - resolve: scopeInvariant(scopeOptions, locationListResolver), + description: 'Query for a more than or just one Location', + resolve: scopeInvariant(scopeOptions, getLocationList), type: BundleSchema, + args: args, }; /** * @name exports.LocationInstanceQuery - * @summary LocationInstance Query. + * @summary Location query. */ module.exports.LocationInstanceQuery = { - description: 'Get information about a single Location', - resolve: scopeInvariant(scopeOptions, locationInstanceResolver), + description: 'Access information about a single Location', + resolve: scopeInvariant(scopeOptions, getLocationInstance), type: LocationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/location/index.js b/src/resources/1_0_2/profiles/location/register.js similarity index 92% rename from src/resources/1_0_2/profiles/location/index.js rename to src/resources/1_0_2/profiles/location/register.js index 66765f59..c7e8c010 100644 --- a/src/resources/1_0_2/profiles/location/index.js +++ b/src/resources/1_0_2/profiles/location/register.js @@ -1,15 +1,15 @@ +const { + LocationCreateMutation, + LocationUpdateMutation, + LocationRemoveMutation, +} = require('./mutation'); + const { LocationQuery, LocationListQuery, LocationInstanceQuery, } = require('./query'); -const { - LocationCreateMutation, - LocationUpdateMutation, - LocationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { LocationCreate: LocationCreateMutation, LocationUpdate: LocationUpdateMutation, - LocationDelete: LocationDeleteMutation, + LocationRemove: LocationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Location', path: '/1_0_2/Location/:id', query: LocationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/location/resolver.js b/src/resources/1_0_2/profiles/location/resolver.js index 6eca1bcd..3a4b4712 100644 --- a/src/resources/1_0_2/profiles/location/resolver.js +++ b/src/resources/1_0_2/profiles/location/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.locationResolver + * @name exports.getLocation * @static - * @summary Location Resolver. + * @summary Location resolver. */ -module.exports.locationResolver = function locationResolver( +module.exports.getLocation = function getLocation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationListResolver + * @name exports.getLocationList * @static - * @summary Location List Resolver. + * @summary Location list resolver. */ -module.exports.locationListResolver = function locationListResolver( +module.exports.getLocationList = function getLocationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationInstanceResolver + * @name exports.getLocationInstance * @static - * @summary Location Instance Resolver. + * @summary Location instance resolver. */ -module.exports.locationInstanceResolver = function locationInstanceResolver( +module.exports.getLocationInstance = function getLocationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationCreateResolver + * @name exports.createLocation * @static - * @summary Location Create Resolver. + * @summary Create Location resolver. */ -module.exports.locationCreateResolver = function locationCreateResolver( +module.exports.createLocation = function createLocation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationUpdateResolver + * @name exports.updateLocation * @static - * @summary Location Update Resolver. + * @summary Update Location resolver. */ -module.exports.locationUpdateResolver = function locationUpdateResolver( +module.exports.updateLocation = function updateLocation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationDeleteResolver + * @name exports.removeLocation * @static - * @summary Location Delete Resolver. + * @summary Remove Location resolver. */ -module.exports.locationDeleteResolver = function locationDeleteResolver( +module.exports.removeLocation = function removeLocation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/media/mutation.js b/src/resources/1_0_2/profiles/media/mutation.js index 43eda8e1..7bf70ac2 100644 --- a/src/resources/1_0_2/profiles/media/mutation.js +++ b/src/resources/1_0_2/profiles/media/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MediaSchema = require('../../schemas/media.schema'); +const MediaSchema = require('../../schemas/media.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MediaInput = require('../../inputs/media.input'); +const MediaInput = require('../../inputs/media.input.js'); -// Resolvers -const { - mediaCreateResolver, - mediaUpdateResolver, - mediaDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createMedia, updateMedia, removeMedia } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Media', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Media record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Media record for deletion.', }, }; /** * @name exports.MediaCreateMutation - * @summary MediaCreate Mutation. + * @summary MediaCreate mutation. */ module.exports.MediaCreateMutation = { - args: WriteArgs, - description: 'Create a Media', - resolve: scopeInvariant(scopeOptions, mediaCreateResolver), + description: 'Create a Media record', + resolve: scopeInvariant(scopeOptions, createMedia), type: MediaSchema, + args: WriteArgs, }; /** * @name exports.MediaUpdateMutation - * @summary MediaUpdate Mutation. + * @summary MediaUpdate mutation. */ module.exports.MediaUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Medias', - resolve: scopeInvariant(scopeOptions, mediaUpdateResolver), + description: 'Update a Media record', + resolve: scopeInvariant(scopeOptions, updateMedia), type: MediaSchema, + args: WriteArgs, }; /** - * @name exports.MediaDeleteMutation - * @summary MediaDelete Mutation. + * @name exports.MediaRemoveMutation + * @summary MediaRemove mutation. */ -module.exports.MediaDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Media', - resolve: scopeInvariant(scopeOptions, mediaDeleteResolver), +module.exports.MediaRemoveMutation = { + description: 'Remove a Media record', + resolve: scopeInvariant(scopeOptions, removeMedia), type: MediaSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/media/query.js b/src/resources/1_0_2/profiles/media/query.js index ff43d7bf..b686fc80 100644 --- a/src/resources/1_0_2/profiles/media/query.js +++ b/src/resources/1_0_2/profiles/media/query.js @@ -1,55 +1,55 @@ // Schemas -const MediaSchema = require('../../schemas/media.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MediaSchema = require('../../schemas/media.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MediaArgs = require('../../parameters/media.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MediaArgs = require('../../parameters/media.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, MediaArgs); // Resolvers -const { - mediaResolver, - mediaListResolver, - mediaInstanceResolver, -} = require('./resolver'); +const { getMedia, getMediaList, getMediaInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Media', action: 'read', - version: '1_0_2', }; /** * @name exports.MediaQuery - * @summary Media Query. + * @summary Media query. */ module.exports.MediaQuery = { - args: Object.assign({}, CommonArgs, MediaArgs), description: 'Query for a single Media', - resolve: scopeInvariant(scopeOptions, mediaResolver), + resolve: scopeInvariant(scopeOptions, getMedia), type: MediaSchema, + args: args, }; /** * @name exports.MediaListQuery - * @summary MediaList Query. + * @summary Media query. */ module.exports.MediaListQuery = { - args: Object.assign({}, CommonArgs, MediaArgs), - description: 'Query for multiple Medias', - resolve: scopeInvariant(scopeOptions, mediaListResolver), + description: 'Query for a more than or just one Media', + resolve: scopeInvariant(scopeOptions, getMediaList), type: BundleSchema, + args: args, }; /** * @name exports.MediaInstanceQuery - * @summary MediaInstance Query. + * @summary Media query. */ module.exports.MediaInstanceQuery = { - description: 'Get information about a single Media', - resolve: scopeInvariant(scopeOptions, mediaInstanceResolver), + description: 'Access information about a single Media', + resolve: scopeInvariant(scopeOptions, getMediaInstance), type: MediaSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/media/index.js b/src/resources/1_0_2/profiles/media/register.js similarity index 93% rename from src/resources/1_0_2/profiles/media/index.js rename to src/resources/1_0_2/profiles/media/register.js index 0c498ffb..e62083c7 100644 --- a/src/resources/1_0_2/profiles/media/index.js +++ b/src/resources/1_0_2/profiles/media/register.js @@ -1,11 +1,11 @@ -const { MediaQuery, MediaListQuery, MediaInstanceQuery } = require('./query'); - const { MediaCreateMutation, MediaUpdateMutation, - MediaDeleteMutation, + MediaRemoveMutation, } = require('./mutation'); +const { MediaQuery, MediaListQuery, MediaInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { MediaCreate: MediaCreateMutation, MediaUpdate: MediaUpdateMutation, - MediaDelete: MediaDeleteMutation, + MediaRemove: MediaRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Media', path: '/1_0_2/Media/:id', query: MediaInstanceQuery, diff --git a/src/resources/1_0_2/profiles/media/resolver.js b/src/resources/1_0_2/profiles/media/resolver.js index dde937c3..992e07ff 100644 --- a/src/resources/1_0_2/profiles/media/resolver.js +++ b/src/resources/1_0_2/profiles/media/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.mediaResolver + * @name exports.getMedia * @static - * @summary Media Resolver. + * @summary Media resolver. */ -module.exports.mediaResolver = function mediaResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getMedia = function getMedia(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaListResolver + * @name exports.getMediaList * @static - * @summary Media List Resolver. + * @summary Media list resolver. */ -module.exports.mediaListResolver = function mediaListResolver( +module.exports.getMediaList = function getMediaList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaInstanceResolver + * @name exports.getMediaInstance * @static - * @summary Media Instance Resolver. + * @summary Media instance resolver. */ -module.exports.mediaInstanceResolver = function mediaInstanceResolver( +module.exports.getMediaInstance = function getMediaInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaCreateResolver + * @name exports.createMedia * @static - * @summary Media Create Resolver. + * @summary Create Media resolver. */ -module.exports.mediaCreateResolver = function mediaCreateResolver( +module.exports.createMedia = function createMedia( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaUpdateResolver + * @name exports.updateMedia * @static - * @summary Media Update Resolver. + * @summary Update Media resolver. */ -module.exports.mediaUpdateResolver = function mediaUpdateResolver( +module.exports.updateMedia = function updateMedia( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaDeleteResolver + * @name exports.removeMedia * @static - * @summary Media Delete Resolver. + * @summary Remove Media resolver. */ -module.exports.mediaDeleteResolver = function mediaDeleteResolver( +module.exports.removeMedia = function removeMedia( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/medication/mutation.js b/src/resources/1_0_2/profiles/medication/mutation.js index 6d582148..fba0a527 100644 --- a/src/resources/1_0_2/profiles/medication/mutation.js +++ b/src/resources/1_0_2/profiles/medication/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationSchema = require('../../schemas/medication.schema'); +const MedicationSchema = require('../../schemas/medication.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationInput = require('../../inputs/medication.input'); +const MedicationInput = require('../../inputs/medication.input.js'); -// Resolvers -const { - medicationCreateResolver, - medicationUpdateResolver, - medicationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedication, + updateMedication, + removeMedication, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Medication', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Medication record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Medication record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.MedicationCreateMutation - * @summary MedicationCreate Mutation. + * @summary MedicationCreate mutation. */ module.exports.MedicationCreateMutation = { - args: WriteArgs, - description: 'Create a Medication', - resolve: scopeInvariant(scopeOptions, medicationCreateResolver), + description: 'Create a Medication record', + resolve: scopeInvariant(scopeOptions, createMedication), type: MedicationSchema, + args: WriteArgs, }; /** * @name exports.MedicationUpdateMutation - * @summary MedicationUpdate Mutation. + * @summary MedicationUpdate mutation. */ module.exports.MedicationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Medications', - resolve: scopeInvariant(scopeOptions, medicationUpdateResolver), + description: 'Update a Medication record', + resolve: scopeInvariant(scopeOptions, updateMedication), type: MedicationSchema, + args: WriteArgs, }; /** - * @name exports.MedicationDeleteMutation - * @summary MedicationDelete Mutation. + * @name exports.MedicationRemoveMutation + * @summary MedicationRemove mutation. */ -module.exports.MedicationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Medication', - resolve: scopeInvariant(scopeOptions, medicationDeleteResolver), +module.exports.MedicationRemoveMutation = { + description: 'Remove a Medication record', + resolve: scopeInvariant(scopeOptions, removeMedication), type: MedicationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/medication/query.js b/src/resources/1_0_2/profiles/medication/query.js index 146740fc..1a1f81df 100644 --- a/src/resources/1_0_2/profiles/medication/query.js +++ b/src/resources/1_0_2/profiles/medication/query.js @@ -1,55 +1,59 @@ // Schemas -const MedicationSchema = require('../../schemas/medication.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationSchema = require('../../schemas/medication.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationArgs = require('../../parameters/medication.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationArgs = require('../../parameters/medication.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, MedicationArgs); // Resolvers const { - medicationResolver, - medicationListResolver, - medicationInstanceResolver, + getMedication, + getMedicationList, + getMedicationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Medication', action: 'read', - version: '1_0_2', }; /** * @name exports.MedicationQuery - * @summary Medication Query. + * @summary Medication query. */ module.exports.MedicationQuery = { - args: Object.assign({}, CommonArgs, MedicationArgs), description: 'Query for a single Medication', - resolve: scopeInvariant(scopeOptions, medicationResolver), + resolve: scopeInvariant(scopeOptions, getMedication), type: MedicationSchema, + args: args, }; /** * @name exports.MedicationListQuery - * @summary MedicationList Query. + * @summary Medication query. */ module.exports.MedicationListQuery = { - args: Object.assign({}, CommonArgs, MedicationArgs), - description: 'Query for multiple Medications', - resolve: scopeInvariant(scopeOptions, medicationListResolver), + description: 'Query for a more than or just one Medication', + resolve: scopeInvariant(scopeOptions, getMedicationList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationInstanceQuery - * @summary MedicationInstance Query. + * @summary Medication query. */ module.exports.MedicationInstanceQuery = { - description: 'Get information about a single Medication', - resolve: scopeInvariant(scopeOptions, medicationInstanceResolver), + description: 'Access information about a single Medication', + resolve: scopeInvariant(scopeOptions, getMedicationInstance), type: MedicationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/medication/index.js b/src/resources/1_0_2/profiles/medication/register.js similarity index 92% rename from src/resources/1_0_2/profiles/medication/index.js rename to src/resources/1_0_2/profiles/medication/register.js index e87cdcbc..5c08c834 100644 --- a/src/resources/1_0_2/profiles/medication/index.js +++ b/src/resources/1_0_2/profiles/medication/register.js @@ -1,15 +1,15 @@ +const { + MedicationCreateMutation, + MedicationUpdateMutation, + MedicationRemoveMutation, +} = require('./mutation'); + const { MedicationQuery, MedicationListQuery, MedicationInstanceQuery, } = require('./query'); -const { - MedicationCreateMutation, - MedicationUpdateMutation, - MedicationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationCreate: MedicationCreateMutation, MedicationUpdate: MedicationUpdateMutation, - MedicationDelete: MedicationDeleteMutation, + MedicationRemove: MedicationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Medication', path: '/1_0_2/Medication/:id', query: MedicationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/medication/resolver.js b/src/resources/1_0_2/profiles/medication/resolver.js index 2eafb7d7..1fd3cb4a 100644 --- a/src/resources/1_0_2/profiles/medication/resolver.js +++ b/src/resources/1_0_2/profiles/medication/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationResolver + * @name exports.getMedication * @static - * @summary Medication Resolver. + * @summary Medication resolver. */ -module.exports.medicationResolver = function medicationResolver( +module.exports.getMedication = function getMedication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationListResolver + * @name exports.getMedicationList * @static - * @summary Medication List Resolver. + * @summary Medication list resolver. */ -module.exports.medicationListResolver = function medicationListResolver( +module.exports.getMedicationList = function getMedicationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationInstanceResolver + * @name exports.getMedicationInstance * @static - * @summary Medication Instance Resolver. + * @summary Medication instance resolver. */ -module.exports.medicationInstanceResolver = function medicationInstanceResolver( +module.exports.getMedicationInstance = function getMedicationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationCreateResolver + * @name exports.createMedication * @static - * @summary Medication Create Resolver. + * @summary Create Medication resolver. */ -module.exports.medicationCreateResolver = function medicationCreateResolver( +module.exports.createMedication = function createMedication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationUpdateResolver + * @name exports.updateMedication * @static - * @summary Medication Update Resolver. + * @summary Update Medication resolver. */ -module.exports.medicationUpdateResolver = function medicationUpdateResolver( +module.exports.updateMedication = function updateMedication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationDeleteResolver + * @name exports.removeMedication * @static - * @summary Medication Delete Resolver. + * @summary Remove Medication resolver. */ -module.exports.medicationDeleteResolver = function medicationDeleteResolver( +module.exports.removeMedication = function removeMedication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/medicationadministration/mutation.js b/src/resources/1_0_2/profiles/medicationadministration/mutation.js index dae36800..23cefb92 100644 --- a/src/resources/1_0_2/profiles/medicationadministration/mutation.js +++ b/src/resources/1_0_2/profiles/medicationadministration/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema'); +const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationAdministrationInput = require('../../inputs/medicationadministration.input'); +const MedicationAdministrationInput = require('../../inputs/medicationadministration.input.js'); -// Resolvers -const { - medicationadministrationCreateResolver, - medicationadministrationUpdateResolver, - medicationadministrationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedicationAdministration, + updateMedicationAdministration, + removeMedicationAdministration, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationAdministration', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MedicationAdministration record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MedicationAdministration record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MedicationAdministrationCreateMutation - * @summary MedicationAdministrationCreate Mutation. + * @summary MedicationAdministrationCreate mutation. */ module.exports.MedicationAdministrationCreateMutation = { - args: WriteArgs, - description: 'Create a MedicationAdministration', - resolve: scopeInvariant(scopeOptions, medicationadministrationCreateResolver), + description: 'Create a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, createMedicationAdministration), type: MedicationAdministrationSchema, + args: WriteArgs, }; /** * @name exports.MedicationAdministrationUpdateMutation - * @summary MedicationAdministrationUpdate Mutation. + * @summary MedicationAdministrationUpdate mutation. */ module.exports.MedicationAdministrationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MedicationAdministrations', - resolve: scopeInvariant(scopeOptions, medicationadministrationUpdateResolver), + description: 'Update a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, updateMedicationAdministration), type: MedicationAdministrationSchema, + args: WriteArgs, }; /** - * @name exports.MedicationAdministrationDeleteMutation - * @summary MedicationAdministrationDelete Mutation. + * @name exports.MedicationAdministrationRemoveMutation + * @summary MedicationAdministrationRemove mutation. */ -module.exports.MedicationAdministrationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MedicationAdministration', - resolve: scopeInvariant(scopeOptions, medicationadministrationDeleteResolver), +module.exports.MedicationAdministrationRemoveMutation = { + description: 'Remove a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, removeMedicationAdministration), type: MedicationAdministrationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/medicationadministration/query.js b/src/resources/1_0_2/profiles/medicationadministration/query.js index 4cad58e3..941f1a53 100644 --- a/src/resources/1_0_2/profiles/medicationadministration/query.js +++ b/src/resources/1_0_2/profiles/medicationadministration/query.js @@ -1,58 +1,59 @@ // Schemas -const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationAdministrationArgs = require('../../parameters/medicationadministration.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationAdministrationArgs = require('../../parameters/medicationadministration.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, MedicationAdministrationArgs); // Resolvers const { - medicationadministrationResolver, - medicationadministrationListResolver, - medicationadministrationInstanceResolver, + getMedicationAdministration, + getMedicationAdministrationList, + getMedicationAdministrationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationAdministration', action: 'read', - version: '1_0_2', }; /** * @name exports.MedicationAdministrationQuery - * @summary MedicationAdministration Query. + * @summary MedicationAdministration query. */ module.exports.MedicationAdministrationQuery = { - args: Object.assign({}, CommonArgs, MedicationAdministrationArgs), description: 'Query for a single MedicationAdministration', - resolve: scopeInvariant(scopeOptions, medicationadministrationResolver), + resolve: scopeInvariant(scopeOptions, getMedicationAdministration), type: MedicationAdministrationSchema, + args: args, }; /** * @name exports.MedicationAdministrationListQuery - * @summary MedicationAdministrationList Query. + * @summary MedicationAdministration query. */ module.exports.MedicationAdministrationListQuery = { - args: Object.assign({}, CommonArgs, MedicationAdministrationArgs), - description: 'Query for multiple MedicationAdministrations', - resolve: scopeInvariant(scopeOptions, medicationadministrationListResolver), + description: 'Query for a more than or just one MedicationAdministration', + resolve: scopeInvariant(scopeOptions, getMedicationAdministrationList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationAdministrationInstanceQuery - * @summary MedicationAdministrationInstance Query. + * @summary MedicationAdministration query. */ module.exports.MedicationAdministrationInstanceQuery = { - description: 'Get information about a single MedicationAdministration', - resolve: scopeInvariant( - scopeOptions, - medicationadministrationInstanceResolver, - ), + description: 'Access information about a single MedicationAdministration', + resolve: scopeInvariant(scopeOptions, getMedicationAdministrationInstance), type: MedicationAdministrationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/medicationadministration/index.js b/src/resources/1_0_2/profiles/medicationadministration/register.js similarity index 91% rename from src/resources/1_0_2/profiles/medicationadministration/index.js rename to src/resources/1_0_2/profiles/medicationadministration/register.js index f7f0076e..be9026e3 100644 --- a/src/resources/1_0_2/profiles/medicationadministration/index.js +++ b/src/resources/1_0_2/profiles/medicationadministration/register.js @@ -1,15 +1,15 @@ +const { + MedicationAdministrationCreateMutation, + MedicationAdministrationUpdateMutation, + MedicationAdministrationRemoveMutation, +} = require('./mutation'); + const { MedicationAdministrationQuery, MedicationAdministrationListQuery, MedicationAdministrationInstanceQuery, } = require('./query'); -const { - MedicationAdministrationCreateMutation, - MedicationAdministrationUpdateMutation, - MedicationAdministrationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationAdministrationCreate: MedicationAdministrationCreateMutation, MedicationAdministrationUpdate: MedicationAdministrationUpdateMutation, - MedicationAdministrationDelete: MedicationAdministrationDeleteMutation, + MedicationAdministrationRemove: MedicationAdministrationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MedicationAdministration', path: '/1_0_2/MedicationAdministration/:id', query: MedicationAdministrationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/medicationadministration/resolver.js b/src/resources/1_0_2/profiles/medicationadministration/resolver.js index 579518c6..db9d52cb 100644 --- a/src/resources/1_0_2/profiles/medicationadministration/resolver.js +++ b/src/resources/1_0_2/profiles/medicationadministration/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationadministrationResolver + * @name exports.getMedicationAdministration * @static - * @summary MedicationAdministration Resolver. + * @summary MedicationAdministration resolver. */ -module.exports.medicationadministrationResolver = function medicationadministrationResolver( +module.exports.getMedicationAdministration = function getMedicationAdministration( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationListResolver + * @name exports.getMedicationAdministrationList * @static - * @summary MedicationAdministration List Resolver. + * @summary MedicationAdministration list resolver. */ -module.exports.medicationadministrationListResolver = function medicationadministrationListResolver( +module.exports.getMedicationAdministrationList = function getMedicationAdministrationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationInstanceResolver + * @name exports.getMedicationAdministrationInstance * @static - * @summary MedicationAdministration Instance Resolver. + * @summary MedicationAdministration instance resolver. */ -module.exports.medicationadministrationInstanceResolver = function medicationadministrationInstanceResolver( +module.exports.getMedicationAdministrationInstance = function getMedicationAdministrationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationCreateResolver + * @name exports.createMedicationAdministration * @static - * @summary MedicationAdministration Create Resolver. + * @summary Create MedicationAdministration resolver. */ -module.exports.medicationadministrationCreateResolver = function medicationadministrationCreateResolver( +module.exports.createMedicationAdministration = function createMedicationAdministration( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationUpdateResolver + * @name exports.updateMedicationAdministration * @static - * @summary MedicationAdministration Update Resolver. + * @summary Update MedicationAdministration resolver. */ -module.exports.medicationadministrationUpdateResolver = function medicationadministrationUpdateResolver( +module.exports.updateMedicationAdministration = function updateMedicationAdministration( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationDeleteResolver + * @name exports.removeMedicationAdministration * @static - * @summary MedicationAdministration Delete Resolver. + * @summary Remove MedicationAdministration resolver. */ -module.exports.medicationadministrationDeleteResolver = function medicationadministrationDeleteResolver( +module.exports.removeMedicationAdministration = function removeMedicationAdministration( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/medicationdispense/mutation.js b/src/resources/1_0_2/profiles/medicationdispense/mutation.js index 4b67d894..4d5d21ba 100644 --- a/src/resources/1_0_2/profiles/medicationdispense/mutation.js +++ b/src/resources/1_0_2/profiles/medicationdispense/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema'); +const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationDispenseInput = require('../../inputs/medicationdispense.input'); +const MedicationDispenseInput = require('../../inputs/medicationdispense.input.js'); -// Resolvers -const { - medicationdispenseCreateResolver, - medicationdispenseUpdateResolver, - medicationdispenseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedicationDispense, + updateMedicationDispense, + removeMedicationDispense, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationDispense', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MedicationDispense record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MedicationDispense record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MedicationDispenseCreateMutation - * @summary MedicationDispenseCreate Mutation. + * @summary MedicationDispenseCreate mutation. */ module.exports.MedicationDispenseCreateMutation = { - args: WriteArgs, - description: 'Create a MedicationDispense', - resolve: scopeInvariant(scopeOptions, medicationdispenseCreateResolver), + description: 'Create a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, createMedicationDispense), type: MedicationDispenseSchema, + args: WriteArgs, }; /** * @name exports.MedicationDispenseUpdateMutation - * @summary MedicationDispenseUpdate Mutation. + * @summary MedicationDispenseUpdate mutation. */ module.exports.MedicationDispenseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MedicationDispenses', - resolve: scopeInvariant(scopeOptions, medicationdispenseUpdateResolver), + description: 'Update a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, updateMedicationDispense), type: MedicationDispenseSchema, + args: WriteArgs, }; /** - * @name exports.MedicationDispenseDeleteMutation - * @summary MedicationDispenseDelete Mutation. + * @name exports.MedicationDispenseRemoveMutation + * @summary MedicationDispenseRemove mutation. */ -module.exports.MedicationDispenseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MedicationDispense', - resolve: scopeInvariant(scopeOptions, medicationdispenseDeleteResolver), +module.exports.MedicationDispenseRemoveMutation = { + description: 'Remove a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, removeMedicationDispense), type: MedicationDispenseSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/medicationdispense/query.js b/src/resources/1_0_2/profiles/medicationdispense/query.js index 6dac7423..a9174e82 100644 --- a/src/resources/1_0_2/profiles/medicationdispense/query.js +++ b/src/resources/1_0_2/profiles/medicationdispense/query.js @@ -1,55 +1,59 @@ // Schemas -const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationDispenseArgs = require('../../parameters/medicationdispense.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationDispenseArgs = require('../../parameters/medicationdispense.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, MedicationDispenseArgs); // Resolvers const { - medicationdispenseResolver, - medicationdispenseListResolver, - medicationdispenseInstanceResolver, + getMedicationDispense, + getMedicationDispenseList, + getMedicationDispenseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationDispense', action: 'read', - version: '1_0_2', }; /** * @name exports.MedicationDispenseQuery - * @summary MedicationDispense Query. + * @summary MedicationDispense query. */ module.exports.MedicationDispenseQuery = { - args: Object.assign({}, CommonArgs, MedicationDispenseArgs), description: 'Query for a single MedicationDispense', - resolve: scopeInvariant(scopeOptions, medicationdispenseResolver), + resolve: scopeInvariant(scopeOptions, getMedicationDispense), type: MedicationDispenseSchema, + args: args, }; /** * @name exports.MedicationDispenseListQuery - * @summary MedicationDispenseList Query. + * @summary MedicationDispense query. */ module.exports.MedicationDispenseListQuery = { - args: Object.assign({}, CommonArgs, MedicationDispenseArgs), - description: 'Query for multiple MedicationDispenses', - resolve: scopeInvariant(scopeOptions, medicationdispenseListResolver), + description: 'Query for a more than or just one MedicationDispense', + resolve: scopeInvariant(scopeOptions, getMedicationDispenseList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationDispenseInstanceQuery - * @summary MedicationDispenseInstance Query. + * @summary MedicationDispense query. */ module.exports.MedicationDispenseInstanceQuery = { - description: 'Get information about a single MedicationDispense', - resolve: scopeInvariant(scopeOptions, medicationdispenseInstanceResolver), + description: 'Access information about a single MedicationDispense', + resolve: scopeInvariant(scopeOptions, getMedicationDispenseInstance), type: MedicationDispenseSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/medicationdispense/index.js b/src/resources/1_0_2/profiles/medicationdispense/register.js similarity index 91% rename from src/resources/1_0_2/profiles/medicationdispense/index.js rename to src/resources/1_0_2/profiles/medicationdispense/register.js index ba8b4928..c5b59e9a 100644 --- a/src/resources/1_0_2/profiles/medicationdispense/index.js +++ b/src/resources/1_0_2/profiles/medicationdispense/register.js @@ -1,15 +1,15 @@ +const { + MedicationDispenseCreateMutation, + MedicationDispenseUpdateMutation, + MedicationDispenseRemoveMutation, +} = require('./mutation'); + const { MedicationDispenseQuery, MedicationDispenseListQuery, MedicationDispenseInstanceQuery, } = require('./query'); -const { - MedicationDispenseCreateMutation, - MedicationDispenseUpdateMutation, - MedicationDispenseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationDispenseCreate: MedicationDispenseCreateMutation, MedicationDispenseUpdate: MedicationDispenseUpdateMutation, - MedicationDispenseDelete: MedicationDispenseDeleteMutation, + MedicationDispenseRemove: MedicationDispenseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MedicationDispense', path: '/1_0_2/MedicationDispense/:id', query: MedicationDispenseInstanceQuery, diff --git a/src/resources/1_0_2/profiles/medicationdispense/resolver.js b/src/resources/1_0_2/profiles/medicationdispense/resolver.js index c613ef01..8e02c449 100644 --- a/src/resources/1_0_2/profiles/medicationdispense/resolver.js +++ b/src/resources/1_0_2/profiles/medicationdispense/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationdispenseResolver + * @name exports.getMedicationDispense * @static - * @summary MedicationDispense Resolver. + * @summary MedicationDispense resolver. */ -module.exports.medicationdispenseResolver = function medicationdispenseResolver( +module.exports.getMedicationDispense = function getMedicationDispense( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseListResolver + * @name exports.getMedicationDispenseList * @static - * @summary MedicationDispense List Resolver. + * @summary MedicationDispense list resolver. */ -module.exports.medicationdispenseListResolver = function medicationdispenseListResolver( +module.exports.getMedicationDispenseList = function getMedicationDispenseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseInstanceResolver + * @name exports.getMedicationDispenseInstance * @static - * @summary MedicationDispense Instance Resolver. + * @summary MedicationDispense instance resolver. */ -module.exports.medicationdispenseInstanceResolver = function medicationdispenseInstanceResolver( +module.exports.getMedicationDispenseInstance = function getMedicationDispenseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseCreateResolver + * @name exports.createMedicationDispense * @static - * @summary MedicationDispense Create Resolver. + * @summary Create MedicationDispense resolver. */ -module.exports.medicationdispenseCreateResolver = function medicationdispenseCreateResolver( +module.exports.createMedicationDispense = function createMedicationDispense( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseUpdateResolver + * @name exports.updateMedicationDispense * @static - * @summary MedicationDispense Update Resolver. + * @summary Update MedicationDispense resolver. */ -module.exports.medicationdispenseUpdateResolver = function medicationdispenseUpdateResolver( +module.exports.updateMedicationDispense = function updateMedicationDispense( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseDeleteResolver + * @name exports.removeMedicationDispense * @static - * @summary MedicationDispense Delete Resolver. + * @summary Remove MedicationDispense resolver. */ -module.exports.medicationdispenseDeleteResolver = function medicationdispenseDeleteResolver( +module.exports.removeMedicationDispense = function removeMedicationDispense( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/medicationorder/mutation.js b/src/resources/1_0_2/profiles/medicationorder/mutation.js index 02498855..5489bf72 100644 --- a/src/resources/1_0_2/profiles/medicationorder/mutation.js +++ b/src/resources/1_0_2/profiles/medicationorder/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationOrderSchema = require('../../schemas/medicationorder.schema'); +const MedicationOrderSchema = require('../../schemas/medicationorder.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationOrderInput = require('../../inputs/medicationorder.input'); +const MedicationOrderInput = require('../../inputs/medicationorder.input.js'); -// Resolvers -const { - medicationorderCreateResolver, - medicationorderUpdateResolver, - medicationorderDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedicationOrder, + updateMedicationOrder, + removeMedicationOrder, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationOrder', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MedicationOrder record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MedicationOrder record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MedicationOrderCreateMutation - * @summary MedicationOrderCreate Mutation. + * @summary MedicationOrderCreate mutation. */ module.exports.MedicationOrderCreateMutation = { - args: WriteArgs, - description: 'Create a MedicationOrder', - resolve: scopeInvariant(scopeOptions, medicationorderCreateResolver), + description: 'Create a MedicationOrder record', + resolve: scopeInvariant(scopeOptions, createMedicationOrder), type: MedicationOrderSchema, + args: WriteArgs, }; /** * @name exports.MedicationOrderUpdateMutation - * @summary MedicationOrderUpdate Mutation. + * @summary MedicationOrderUpdate mutation. */ module.exports.MedicationOrderUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MedicationOrders', - resolve: scopeInvariant(scopeOptions, medicationorderUpdateResolver), + description: 'Update a MedicationOrder record', + resolve: scopeInvariant(scopeOptions, updateMedicationOrder), type: MedicationOrderSchema, + args: WriteArgs, }; /** - * @name exports.MedicationOrderDeleteMutation - * @summary MedicationOrderDelete Mutation. + * @name exports.MedicationOrderRemoveMutation + * @summary MedicationOrderRemove mutation. */ -module.exports.MedicationOrderDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MedicationOrder', - resolve: scopeInvariant(scopeOptions, medicationorderDeleteResolver), +module.exports.MedicationOrderRemoveMutation = { + description: 'Remove a MedicationOrder record', + resolve: scopeInvariant(scopeOptions, removeMedicationOrder), type: MedicationOrderSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/medicationorder/query.js b/src/resources/1_0_2/profiles/medicationorder/query.js index 34e2ca56..9fb6f0b7 100644 --- a/src/resources/1_0_2/profiles/medicationorder/query.js +++ b/src/resources/1_0_2/profiles/medicationorder/query.js @@ -1,55 +1,59 @@ // Schemas -const MedicationOrderSchema = require('../../schemas/medicationorder.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationOrderSchema = require('../../schemas/medicationorder.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationOrderArgs = require('../../parameters/medicationorder.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationOrderArgs = require('../../parameters/medicationorder.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, MedicationOrderArgs); // Resolvers const { - medicationorderResolver, - medicationorderListResolver, - medicationorderInstanceResolver, + getMedicationOrder, + getMedicationOrderList, + getMedicationOrderInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationOrder', action: 'read', - version: '1_0_2', }; /** * @name exports.MedicationOrderQuery - * @summary MedicationOrder Query. + * @summary MedicationOrder query. */ module.exports.MedicationOrderQuery = { - args: Object.assign({}, CommonArgs, MedicationOrderArgs), description: 'Query for a single MedicationOrder', - resolve: scopeInvariant(scopeOptions, medicationorderResolver), + resolve: scopeInvariant(scopeOptions, getMedicationOrder), type: MedicationOrderSchema, + args: args, }; /** * @name exports.MedicationOrderListQuery - * @summary MedicationOrderList Query. + * @summary MedicationOrder query. */ module.exports.MedicationOrderListQuery = { - args: Object.assign({}, CommonArgs, MedicationOrderArgs), - description: 'Query for multiple MedicationOrders', - resolve: scopeInvariant(scopeOptions, medicationorderListResolver), + description: 'Query for a more than or just one MedicationOrder', + resolve: scopeInvariant(scopeOptions, getMedicationOrderList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationOrderInstanceQuery - * @summary MedicationOrderInstance Query. + * @summary MedicationOrder query. */ module.exports.MedicationOrderInstanceQuery = { - description: 'Get information about a single MedicationOrder', - resolve: scopeInvariant(scopeOptions, medicationorderInstanceResolver), + description: 'Access information about a single MedicationOrder', + resolve: scopeInvariant(scopeOptions, getMedicationOrderInstance), type: MedicationOrderSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/medicationorder/index.js b/src/resources/1_0_2/profiles/medicationorder/register.js similarity index 91% rename from src/resources/1_0_2/profiles/medicationorder/index.js rename to src/resources/1_0_2/profiles/medicationorder/register.js index 45552e79..fa885a9b 100644 --- a/src/resources/1_0_2/profiles/medicationorder/index.js +++ b/src/resources/1_0_2/profiles/medicationorder/register.js @@ -1,15 +1,15 @@ +const { + MedicationOrderCreateMutation, + MedicationOrderUpdateMutation, + MedicationOrderRemoveMutation, +} = require('./mutation'); + const { MedicationOrderQuery, MedicationOrderListQuery, MedicationOrderInstanceQuery, } = require('./query'); -const { - MedicationOrderCreateMutation, - MedicationOrderUpdateMutation, - MedicationOrderDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationOrderCreate: MedicationOrderCreateMutation, MedicationOrderUpdate: MedicationOrderUpdateMutation, - MedicationOrderDelete: MedicationOrderDeleteMutation, + MedicationOrderRemove: MedicationOrderRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MedicationOrder', path: '/1_0_2/MedicationOrder/:id', query: MedicationOrderInstanceQuery, diff --git a/src/resources/1_0_2/profiles/medicationorder/resolver.js b/src/resources/1_0_2/profiles/medicationorder/resolver.js index b6ef0b83..9f53625c 100644 --- a/src/resources/1_0_2/profiles/medicationorder/resolver.js +++ b/src/resources/1_0_2/profiles/medicationorder/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationorderResolver + * @name exports.getMedicationOrder * @static - * @summary MedicationOrder Resolver. + * @summary MedicationOrder resolver. */ -module.exports.medicationorderResolver = function medicationorderResolver( +module.exports.getMedicationOrder = function getMedicationOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationorderListResolver + * @name exports.getMedicationOrderList * @static - * @summary MedicationOrder List Resolver. + * @summary MedicationOrder list resolver. */ -module.exports.medicationorderListResolver = function medicationorderListResolver( +module.exports.getMedicationOrderList = function getMedicationOrderList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationorderInstanceResolver + * @name exports.getMedicationOrderInstance * @static - * @summary MedicationOrder Instance Resolver. + * @summary MedicationOrder instance resolver. */ -module.exports.medicationorderInstanceResolver = function medicationorderInstanceResolver( +module.exports.getMedicationOrderInstance = function getMedicationOrderInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationorderCreateResolver + * @name exports.createMedicationOrder * @static - * @summary MedicationOrder Create Resolver. + * @summary Create MedicationOrder resolver. */ -module.exports.medicationorderCreateResolver = function medicationorderCreateResolver( +module.exports.createMedicationOrder = function createMedicationOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationorderUpdateResolver + * @name exports.updateMedicationOrder * @static - * @summary MedicationOrder Update Resolver. + * @summary Update MedicationOrder resolver. */ -module.exports.medicationorderUpdateResolver = function medicationorderUpdateResolver( +module.exports.updateMedicationOrder = function updateMedicationOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationorderDeleteResolver + * @name exports.removeMedicationOrder * @static - * @summary MedicationOrder Delete Resolver. + * @summary Remove MedicationOrder resolver. */ -module.exports.medicationorderDeleteResolver = function medicationorderDeleteResolver( +module.exports.removeMedicationOrder = function removeMedicationOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/medicationstatement/mutation.js b/src/resources/1_0_2/profiles/medicationstatement/mutation.js index 99643215..39d1e62a 100644 --- a/src/resources/1_0_2/profiles/medicationstatement/mutation.js +++ b/src/resources/1_0_2/profiles/medicationstatement/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationStatementSchema = require('../../schemas/medicationstatement.schema'); +const MedicationStatementSchema = require('../../schemas/medicationstatement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationStatementInput = require('../../inputs/medicationstatement.input'); +const MedicationStatementInput = require('../../inputs/medicationstatement.input.js'); -// Resolvers -const { - medicationstatementCreateResolver, - medicationstatementUpdateResolver, - medicationstatementDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedicationStatement, + updateMedicationStatement, + removeMedicationStatement, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationStatement', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MedicationStatement record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MedicationStatement record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MedicationStatementCreateMutation - * @summary MedicationStatementCreate Mutation. + * @summary MedicationStatementCreate mutation. */ module.exports.MedicationStatementCreateMutation = { - args: WriteArgs, - description: 'Create a MedicationStatement', - resolve: scopeInvariant(scopeOptions, medicationstatementCreateResolver), + description: 'Create a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, createMedicationStatement), type: MedicationStatementSchema, + args: WriteArgs, }; /** * @name exports.MedicationStatementUpdateMutation - * @summary MedicationStatementUpdate Mutation. + * @summary MedicationStatementUpdate mutation. */ module.exports.MedicationStatementUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MedicationStatements', - resolve: scopeInvariant(scopeOptions, medicationstatementUpdateResolver), + description: 'Update a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, updateMedicationStatement), type: MedicationStatementSchema, + args: WriteArgs, }; /** - * @name exports.MedicationStatementDeleteMutation - * @summary MedicationStatementDelete Mutation. + * @name exports.MedicationStatementRemoveMutation + * @summary MedicationStatementRemove mutation. */ -module.exports.MedicationStatementDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MedicationStatement', - resolve: scopeInvariant(scopeOptions, medicationstatementDeleteResolver), +module.exports.MedicationStatementRemoveMutation = { + description: 'Remove a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, removeMedicationStatement), type: MedicationStatementSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/medicationstatement/query.js b/src/resources/1_0_2/profiles/medicationstatement/query.js index 8365b439..17c4cbbd 100644 --- a/src/resources/1_0_2/profiles/medicationstatement/query.js +++ b/src/resources/1_0_2/profiles/medicationstatement/query.js @@ -1,55 +1,59 @@ // Schemas -const MedicationStatementSchema = require('../../schemas/medicationstatement.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationStatementSchema = require('../../schemas/medicationstatement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationStatementArgs = require('../../parameters/medicationstatement.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationStatementArgs = require('../../parameters/medicationstatement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, MedicationStatementArgs); // Resolvers const { - medicationstatementResolver, - medicationstatementListResolver, - medicationstatementInstanceResolver, + getMedicationStatement, + getMedicationStatementList, + getMedicationStatementInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationStatement', action: 'read', - version: '1_0_2', }; /** * @name exports.MedicationStatementQuery - * @summary MedicationStatement Query. + * @summary MedicationStatement query. */ module.exports.MedicationStatementQuery = { - args: Object.assign({}, CommonArgs, MedicationStatementArgs), description: 'Query for a single MedicationStatement', - resolve: scopeInvariant(scopeOptions, medicationstatementResolver), + resolve: scopeInvariant(scopeOptions, getMedicationStatement), type: MedicationStatementSchema, + args: args, }; /** * @name exports.MedicationStatementListQuery - * @summary MedicationStatementList Query. + * @summary MedicationStatement query. */ module.exports.MedicationStatementListQuery = { - args: Object.assign({}, CommonArgs, MedicationStatementArgs), - description: 'Query for multiple MedicationStatements', - resolve: scopeInvariant(scopeOptions, medicationstatementListResolver), + description: 'Query for a more than or just one MedicationStatement', + resolve: scopeInvariant(scopeOptions, getMedicationStatementList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationStatementInstanceQuery - * @summary MedicationStatementInstance Query. + * @summary MedicationStatement query. */ module.exports.MedicationStatementInstanceQuery = { - description: 'Get information about a single MedicationStatement', - resolve: scopeInvariant(scopeOptions, medicationstatementInstanceResolver), + description: 'Access information about a single MedicationStatement', + resolve: scopeInvariant(scopeOptions, getMedicationStatementInstance), type: MedicationStatementSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/medicationstatement/index.js b/src/resources/1_0_2/profiles/medicationstatement/register.js similarity index 91% rename from src/resources/1_0_2/profiles/medicationstatement/index.js rename to src/resources/1_0_2/profiles/medicationstatement/register.js index b9b7d55e..d352aa6a 100644 --- a/src/resources/1_0_2/profiles/medicationstatement/index.js +++ b/src/resources/1_0_2/profiles/medicationstatement/register.js @@ -1,15 +1,15 @@ +const { + MedicationStatementCreateMutation, + MedicationStatementUpdateMutation, + MedicationStatementRemoveMutation, +} = require('./mutation'); + const { MedicationStatementQuery, MedicationStatementListQuery, MedicationStatementInstanceQuery, } = require('./query'); -const { - MedicationStatementCreateMutation, - MedicationStatementUpdateMutation, - MedicationStatementDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationStatementCreate: MedicationStatementCreateMutation, MedicationStatementUpdate: MedicationStatementUpdateMutation, - MedicationStatementDelete: MedicationStatementDeleteMutation, + MedicationStatementRemove: MedicationStatementRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MedicationStatement', path: '/1_0_2/MedicationStatement/:id', query: MedicationStatementInstanceQuery, diff --git a/src/resources/1_0_2/profiles/medicationstatement/resolver.js b/src/resources/1_0_2/profiles/medicationstatement/resolver.js index a9292885..bbabc326 100644 --- a/src/resources/1_0_2/profiles/medicationstatement/resolver.js +++ b/src/resources/1_0_2/profiles/medicationstatement/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationstatementResolver + * @name exports.getMedicationStatement * @static - * @summary MedicationStatement Resolver. + * @summary MedicationStatement resolver. */ -module.exports.medicationstatementResolver = function medicationstatementResolver( +module.exports.getMedicationStatement = function getMedicationStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementListResolver + * @name exports.getMedicationStatementList * @static - * @summary MedicationStatement List Resolver. + * @summary MedicationStatement list resolver. */ -module.exports.medicationstatementListResolver = function medicationstatementListResolver( +module.exports.getMedicationStatementList = function getMedicationStatementList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementInstanceResolver + * @name exports.getMedicationStatementInstance * @static - * @summary MedicationStatement Instance Resolver. + * @summary MedicationStatement instance resolver. */ -module.exports.medicationstatementInstanceResolver = function medicationstatementInstanceResolver( +module.exports.getMedicationStatementInstance = function getMedicationStatementInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementCreateResolver + * @name exports.createMedicationStatement * @static - * @summary MedicationStatement Create Resolver. + * @summary Create MedicationStatement resolver. */ -module.exports.medicationstatementCreateResolver = function medicationstatementCreateResolver( +module.exports.createMedicationStatement = function createMedicationStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementUpdateResolver + * @name exports.updateMedicationStatement * @static - * @summary MedicationStatement Update Resolver. + * @summary Update MedicationStatement resolver. */ -module.exports.medicationstatementUpdateResolver = function medicationstatementUpdateResolver( +module.exports.updateMedicationStatement = function updateMedicationStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementDeleteResolver + * @name exports.removeMedicationStatement * @static - * @summary MedicationStatement Delete Resolver. + * @summary Remove MedicationStatement resolver. */ -module.exports.medicationstatementDeleteResolver = function medicationstatementDeleteResolver( +module.exports.removeMedicationStatement = function removeMedicationStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/messageheader/mutation.js b/src/resources/1_0_2/profiles/messageheader/mutation.js index 386c5467..1b2f5ea8 100644 --- a/src/resources/1_0_2/profiles/messageheader/mutation.js +++ b/src/resources/1_0_2/profiles/messageheader/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MessageHeaderSchema = require('../../schemas/messageheader.schema'); +const MessageHeaderSchema = require('../../schemas/messageheader.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MessageHeaderInput = require('../../inputs/messageheader.input'); +const MessageHeaderInput = require('../../inputs/messageheader.input.js'); -// Resolvers -const { - messageheaderCreateResolver, - messageheaderUpdateResolver, - messageheaderDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMessageHeader, + updateMessageHeader, + removeMessageHeader, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MessageHeader', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MessageHeader record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MessageHeader record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MessageHeaderCreateMutation - * @summary MessageHeaderCreate Mutation. + * @summary MessageHeaderCreate mutation. */ module.exports.MessageHeaderCreateMutation = { - args: WriteArgs, - description: 'Create a MessageHeader', - resolve: scopeInvariant(scopeOptions, messageheaderCreateResolver), + description: 'Create a MessageHeader record', + resolve: scopeInvariant(scopeOptions, createMessageHeader), type: MessageHeaderSchema, + args: WriteArgs, }; /** * @name exports.MessageHeaderUpdateMutation - * @summary MessageHeaderUpdate Mutation. + * @summary MessageHeaderUpdate mutation. */ module.exports.MessageHeaderUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MessageHeaders', - resolve: scopeInvariant(scopeOptions, messageheaderUpdateResolver), + description: 'Update a MessageHeader record', + resolve: scopeInvariant(scopeOptions, updateMessageHeader), type: MessageHeaderSchema, + args: WriteArgs, }; /** - * @name exports.MessageHeaderDeleteMutation - * @summary MessageHeaderDelete Mutation. + * @name exports.MessageHeaderRemoveMutation + * @summary MessageHeaderRemove mutation. */ -module.exports.MessageHeaderDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MessageHeader', - resolve: scopeInvariant(scopeOptions, messageheaderDeleteResolver), +module.exports.MessageHeaderRemoveMutation = { + description: 'Remove a MessageHeader record', + resolve: scopeInvariant(scopeOptions, removeMessageHeader), type: MessageHeaderSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/messageheader/query.js b/src/resources/1_0_2/profiles/messageheader/query.js index 8c38cb8b..3f18a42d 100644 --- a/src/resources/1_0_2/profiles/messageheader/query.js +++ b/src/resources/1_0_2/profiles/messageheader/query.js @@ -1,55 +1,59 @@ // Schemas -const MessageHeaderSchema = require('../../schemas/messageheader.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MessageHeaderSchema = require('../../schemas/messageheader.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MessageHeaderArgs = require('../../parameters/messageheader.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MessageHeaderArgs = require('../../parameters/messageheader.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, MessageHeaderArgs); // Resolvers const { - messageheaderResolver, - messageheaderListResolver, - messageheaderInstanceResolver, + getMessageHeader, + getMessageHeaderList, + getMessageHeaderInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MessageHeader', action: 'read', - version: '1_0_2', }; /** * @name exports.MessageHeaderQuery - * @summary MessageHeader Query. + * @summary MessageHeader query. */ module.exports.MessageHeaderQuery = { - args: Object.assign({}, CommonArgs, MessageHeaderArgs), description: 'Query for a single MessageHeader', - resolve: scopeInvariant(scopeOptions, messageheaderResolver), + resolve: scopeInvariant(scopeOptions, getMessageHeader), type: MessageHeaderSchema, + args: args, }; /** * @name exports.MessageHeaderListQuery - * @summary MessageHeaderList Query. + * @summary MessageHeader query. */ module.exports.MessageHeaderListQuery = { - args: Object.assign({}, CommonArgs, MessageHeaderArgs), - description: 'Query for multiple MessageHeaders', - resolve: scopeInvariant(scopeOptions, messageheaderListResolver), + description: 'Query for a more than or just one MessageHeader', + resolve: scopeInvariant(scopeOptions, getMessageHeaderList), type: BundleSchema, + args: args, }; /** * @name exports.MessageHeaderInstanceQuery - * @summary MessageHeaderInstance Query. + * @summary MessageHeader query. */ module.exports.MessageHeaderInstanceQuery = { - description: 'Get information about a single MessageHeader', - resolve: scopeInvariant(scopeOptions, messageheaderInstanceResolver), + description: 'Access information about a single MessageHeader', + resolve: scopeInvariant(scopeOptions, getMessageHeaderInstance), type: MessageHeaderSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/messageheader/index.js b/src/resources/1_0_2/profiles/messageheader/register.js similarity index 92% rename from src/resources/1_0_2/profiles/messageheader/index.js rename to src/resources/1_0_2/profiles/messageheader/register.js index 7b20961e..44b9561b 100644 --- a/src/resources/1_0_2/profiles/messageheader/index.js +++ b/src/resources/1_0_2/profiles/messageheader/register.js @@ -1,15 +1,15 @@ +const { + MessageHeaderCreateMutation, + MessageHeaderUpdateMutation, + MessageHeaderRemoveMutation, +} = require('./mutation'); + const { MessageHeaderQuery, MessageHeaderListQuery, MessageHeaderInstanceQuery, } = require('./query'); -const { - MessageHeaderCreateMutation, - MessageHeaderUpdateMutation, - MessageHeaderDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MessageHeaderCreate: MessageHeaderCreateMutation, MessageHeaderUpdate: MessageHeaderUpdateMutation, - MessageHeaderDelete: MessageHeaderDeleteMutation, + MessageHeaderRemove: MessageHeaderRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MessageHeader', path: '/1_0_2/MessageHeader/:id', query: MessageHeaderInstanceQuery, diff --git a/src/resources/1_0_2/profiles/messageheader/resolver.js b/src/resources/1_0_2/profiles/messageheader/resolver.js index fb85f2fa..4ccd0679 100644 --- a/src/resources/1_0_2/profiles/messageheader/resolver.js +++ b/src/resources/1_0_2/profiles/messageheader/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.messageheaderResolver + * @name exports.getMessageHeader * @static - * @summary MessageHeader Resolver. + * @summary MessageHeader resolver. */ -module.exports.messageheaderResolver = function messageheaderResolver( +module.exports.getMessageHeader = function getMessageHeader( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderListResolver + * @name exports.getMessageHeaderList * @static - * @summary MessageHeader List Resolver. + * @summary MessageHeader list resolver. */ -module.exports.messageheaderListResolver = function messageheaderListResolver( +module.exports.getMessageHeaderList = function getMessageHeaderList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderInstanceResolver + * @name exports.getMessageHeaderInstance * @static - * @summary MessageHeader Instance Resolver. + * @summary MessageHeader instance resolver. */ -module.exports.messageheaderInstanceResolver = function messageheaderInstanceResolver( +module.exports.getMessageHeaderInstance = function getMessageHeaderInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderCreateResolver + * @name exports.createMessageHeader * @static - * @summary MessageHeader Create Resolver. + * @summary Create MessageHeader resolver. */ -module.exports.messageheaderCreateResolver = function messageheaderCreateResolver( +module.exports.createMessageHeader = function createMessageHeader( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderUpdateResolver + * @name exports.updateMessageHeader * @static - * @summary MessageHeader Update Resolver. + * @summary Update MessageHeader resolver. */ -module.exports.messageheaderUpdateResolver = function messageheaderUpdateResolver( +module.exports.updateMessageHeader = function updateMessageHeader( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderDeleteResolver + * @name exports.removeMessageHeader * @static - * @summary MessageHeader Delete Resolver. + * @summary Remove MessageHeader resolver. */ -module.exports.messageheaderDeleteResolver = function messageheaderDeleteResolver( +module.exports.removeMessageHeader = function removeMessageHeader( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/namingsystem/mutation.js b/src/resources/1_0_2/profiles/namingsystem/mutation.js index b565decd..c20ef1ad 100644 --- a/src/resources/1_0_2/profiles/namingsystem/mutation.js +++ b/src/resources/1_0_2/profiles/namingsystem/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const NamingSystemSchema = require('../../schemas/namingsystem.schema'); +const NamingSystemSchema = require('../../schemas/namingsystem.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const NamingSystemInput = require('../../inputs/namingsystem.input'); +const NamingSystemInput = require('../../inputs/namingsystem.input.js'); -// Resolvers -const { - namingsystemCreateResolver, - namingsystemUpdateResolver, - namingsystemDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createNamingSystem, + updateNamingSystem, + removeNamingSystem, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'NamingSystem', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a NamingSystem record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a NamingSystem record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.NamingSystemCreateMutation - * @summary NamingSystemCreate Mutation. + * @summary NamingSystemCreate mutation. */ module.exports.NamingSystemCreateMutation = { - args: WriteArgs, - description: 'Create a NamingSystem', - resolve: scopeInvariant(scopeOptions, namingsystemCreateResolver), + description: 'Create a NamingSystem record', + resolve: scopeInvariant(scopeOptions, createNamingSystem), type: NamingSystemSchema, + args: WriteArgs, }; /** * @name exports.NamingSystemUpdateMutation - * @summary NamingSystemUpdate Mutation. + * @summary NamingSystemUpdate mutation. */ module.exports.NamingSystemUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple NamingSystems', - resolve: scopeInvariant(scopeOptions, namingsystemUpdateResolver), + description: 'Update a NamingSystem record', + resolve: scopeInvariant(scopeOptions, updateNamingSystem), type: NamingSystemSchema, + args: WriteArgs, }; /** - * @name exports.NamingSystemDeleteMutation - * @summary NamingSystemDelete Mutation. + * @name exports.NamingSystemRemoveMutation + * @summary NamingSystemRemove mutation. */ -module.exports.NamingSystemDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single NamingSystem', - resolve: scopeInvariant(scopeOptions, namingsystemDeleteResolver), +module.exports.NamingSystemRemoveMutation = { + description: 'Remove a NamingSystem record', + resolve: scopeInvariant(scopeOptions, removeNamingSystem), type: NamingSystemSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/namingsystem/query.js b/src/resources/1_0_2/profiles/namingsystem/query.js index 09ec7672..424ba63c 100644 --- a/src/resources/1_0_2/profiles/namingsystem/query.js +++ b/src/resources/1_0_2/profiles/namingsystem/query.js @@ -1,55 +1,59 @@ // Schemas -const NamingSystemSchema = require('../../schemas/namingsystem.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const NamingSystemSchema = require('../../schemas/namingsystem.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const NamingSystemArgs = require('../../parameters/namingsystem.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const NamingSystemArgs = require('../../parameters/namingsystem.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, NamingSystemArgs); // Resolvers const { - namingsystemResolver, - namingsystemListResolver, - namingsystemInstanceResolver, + getNamingSystem, + getNamingSystemList, + getNamingSystemInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'NamingSystem', action: 'read', - version: '1_0_2', }; /** * @name exports.NamingSystemQuery - * @summary NamingSystem Query. + * @summary NamingSystem query. */ module.exports.NamingSystemQuery = { - args: Object.assign({}, CommonArgs, NamingSystemArgs), description: 'Query for a single NamingSystem', - resolve: scopeInvariant(scopeOptions, namingsystemResolver), + resolve: scopeInvariant(scopeOptions, getNamingSystem), type: NamingSystemSchema, + args: args, }; /** * @name exports.NamingSystemListQuery - * @summary NamingSystemList Query. + * @summary NamingSystem query. */ module.exports.NamingSystemListQuery = { - args: Object.assign({}, CommonArgs, NamingSystemArgs), - description: 'Query for multiple NamingSystems', - resolve: scopeInvariant(scopeOptions, namingsystemListResolver), + description: 'Query for a more than or just one NamingSystem', + resolve: scopeInvariant(scopeOptions, getNamingSystemList), type: BundleSchema, + args: args, }; /** * @name exports.NamingSystemInstanceQuery - * @summary NamingSystemInstance Query. + * @summary NamingSystem query. */ module.exports.NamingSystemInstanceQuery = { - description: 'Get information about a single NamingSystem', - resolve: scopeInvariant(scopeOptions, namingsystemInstanceResolver), + description: 'Access information about a single NamingSystem', + resolve: scopeInvariant(scopeOptions, getNamingSystemInstance), type: NamingSystemSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/namingsystem/index.js b/src/resources/1_0_2/profiles/namingsystem/register.js similarity index 92% rename from src/resources/1_0_2/profiles/namingsystem/index.js rename to src/resources/1_0_2/profiles/namingsystem/register.js index ab5faf1f..281e3441 100644 --- a/src/resources/1_0_2/profiles/namingsystem/index.js +++ b/src/resources/1_0_2/profiles/namingsystem/register.js @@ -1,15 +1,15 @@ +const { + NamingSystemCreateMutation, + NamingSystemUpdateMutation, + NamingSystemRemoveMutation, +} = require('./mutation'); + const { NamingSystemQuery, NamingSystemListQuery, NamingSystemInstanceQuery, } = require('./query'); -const { - NamingSystemCreateMutation, - NamingSystemUpdateMutation, - NamingSystemDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { NamingSystemCreate: NamingSystemCreateMutation, NamingSystemUpdate: NamingSystemUpdateMutation, - NamingSystemDelete: NamingSystemDeleteMutation, + NamingSystemRemove: NamingSystemRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'NamingSystem', path: '/1_0_2/NamingSystem/:id', query: NamingSystemInstanceQuery, diff --git a/src/resources/1_0_2/profiles/namingsystem/resolver.js b/src/resources/1_0_2/profiles/namingsystem/resolver.js index 7417c7dd..de591f31 100644 --- a/src/resources/1_0_2/profiles/namingsystem/resolver.js +++ b/src/resources/1_0_2/profiles/namingsystem/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.namingsystemResolver + * @name exports.getNamingSystem * @static - * @summary NamingSystem Resolver. + * @summary NamingSystem resolver. */ -module.exports.namingsystemResolver = function namingsystemResolver( +module.exports.getNamingSystem = function getNamingSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemListResolver + * @name exports.getNamingSystemList * @static - * @summary NamingSystem List Resolver. + * @summary NamingSystem list resolver. */ -module.exports.namingsystemListResolver = function namingsystemListResolver( +module.exports.getNamingSystemList = function getNamingSystemList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemInstanceResolver + * @name exports.getNamingSystemInstance * @static - * @summary NamingSystem Instance Resolver. + * @summary NamingSystem instance resolver. */ -module.exports.namingsystemInstanceResolver = function namingsystemInstanceResolver( +module.exports.getNamingSystemInstance = function getNamingSystemInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemCreateResolver + * @name exports.createNamingSystem * @static - * @summary NamingSystem Create Resolver. + * @summary Create NamingSystem resolver. */ -module.exports.namingsystemCreateResolver = function namingsystemCreateResolver( +module.exports.createNamingSystem = function createNamingSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemUpdateResolver + * @name exports.updateNamingSystem * @static - * @summary NamingSystem Update Resolver. + * @summary Update NamingSystem resolver. */ -module.exports.namingsystemUpdateResolver = function namingsystemUpdateResolver( +module.exports.updateNamingSystem = function updateNamingSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemDeleteResolver + * @name exports.removeNamingSystem * @static - * @summary NamingSystem Delete Resolver. + * @summary Remove NamingSystem resolver. */ -module.exports.namingsystemDeleteResolver = function namingsystemDeleteResolver( +module.exports.removeNamingSystem = function removeNamingSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/nutritionorder/mutation.js b/src/resources/1_0_2/profiles/nutritionorder/mutation.js index 54fbfb64..bb3dae4b 100644 --- a/src/resources/1_0_2/profiles/nutritionorder/mutation.js +++ b/src/resources/1_0_2/profiles/nutritionorder/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const NutritionOrderSchema = require('../../schemas/nutritionorder.schema'); +const NutritionOrderSchema = require('../../schemas/nutritionorder.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const NutritionOrderInput = require('../../inputs/nutritionorder.input'); +const NutritionOrderInput = require('../../inputs/nutritionorder.input.js'); -// Resolvers -const { - nutritionorderCreateResolver, - nutritionorderUpdateResolver, - nutritionorderDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createNutritionOrder, + updateNutritionOrder, + removeNutritionOrder, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'NutritionOrder', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a NutritionOrder record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a NutritionOrder record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.NutritionOrderCreateMutation - * @summary NutritionOrderCreate Mutation. + * @summary NutritionOrderCreate mutation. */ module.exports.NutritionOrderCreateMutation = { - args: WriteArgs, - description: 'Create a NutritionOrder', - resolve: scopeInvariant(scopeOptions, nutritionorderCreateResolver), + description: 'Create a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, createNutritionOrder), type: NutritionOrderSchema, + args: WriteArgs, }; /** * @name exports.NutritionOrderUpdateMutation - * @summary NutritionOrderUpdate Mutation. + * @summary NutritionOrderUpdate mutation. */ module.exports.NutritionOrderUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple NutritionOrders', - resolve: scopeInvariant(scopeOptions, nutritionorderUpdateResolver), + description: 'Update a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, updateNutritionOrder), type: NutritionOrderSchema, + args: WriteArgs, }; /** - * @name exports.NutritionOrderDeleteMutation - * @summary NutritionOrderDelete Mutation. + * @name exports.NutritionOrderRemoveMutation + * @summary NutritionOrderRemove mutation. */ -module.exports.NutritionOrderDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single NutritionOrder', - resolve: scopeInvariant(scopeOptions, nutritionorderDeleteResolver), +module.exports.NutritionOrderRemoveMutation = { + description: 'Remove a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, removeNutritionOrder), type: NutritionOrderSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/nutritionorder/query.js b/src/resources/1_0_2/profiles/nutritionorder/query.js index fb554859..e0491ac2 100644 --- a/src/resources/1_0_2/profiles/nutritionorder/query.js +++ b/src/resources/1_0_2/profiles/nutritionorder/query.js @@ -1,55 +1,59 @@ // Schemas -const NutritionOrderSchema = require('../../schemas/nutritionorder.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const NutritionOrderSchema = require('../../schemas/nutritionorder.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const NutritionOrderArgs = require('../../parameters/nutritionorder.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const NutritionOrderArgs = require('../../parameters/nutritionorder.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, NutritionOrderArgs); // Resolvers const { - nutritionorderResolver, - nutritionorderListResolver, - nutritionorderInstanceResolver, + getNutritionOrder, + getNutritionOrderList, + getNutritionOrderInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'NutritionOrder', action: 'read', - version: '1_0_2', }; /** * @name exports.NutritionOrderQuery - * @summary NutritionOrder Query. + * @summary NutritionOrder query. */ module.exports.NutritionOrderQuery = { - args: Object.assign({}, CommonArgs, NutritionOrderArgs), description: 'Query for a single NutritionOrder', - resolve: scopeInvariant(scopeOptions, nutritionorderResolver), + resolve: scopeInvariant(scopeOptions, getNutritionOrder), type: NutritionOrderSchema, + args: args, }; /** * @name exports.NutritionOrderListQuery - * @summary NutritionOrderList Query. + * @summary NutritionOrder query. */ module.exports.NutritionOrderListQuery = { - args: Object.assign({}, CommonArgs, NutritionOrderArgs), - description: 'Query for multiple NutritionOrders', - resolve: scopeInvariant(scopeOptions, nutritionorderListResolver), + description: 'Query for a more than or just one NutritionOrder', + resolve: scopeInvariant(scopeOptions, getNutritionOrderList), type: BundleSchema, + args: args, }; /** * @name exports.NutritionOrderInstanceQuery - * @summary NutritionOrderInstance Query. + * @summary NutritionOrder query. */ module.exports.NutritionOrderInstanceQuery = { - description: 'Get information about a single NutritionOrder', - resolve: scopeInvariant(scopeOptions, nutritionorderInstanceResolver), + description: 'Access information about a single NutritionOrder', + resolve: scopeInvariant(scopeOptions, getNutritionOrderInstance), type: NutritionOrderSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/nutritionorder/index.js b/src/resources/1_0_2/profiles/nutritionorder/register.js similarity index 92% rename from src/resources/1_0_2/profiles/nutritionorder/index.js rename to src/resources/1_0_2/profiles/nutritionorder/register.js index 49b19206..6d98d183 100644 --- a/src/resources/1_0_2/profiles/nutritionorder/index.js +++ b/src/resources/1_0_2/profiles/nutritionorder/register.js @@ -1,15 +1,15 @@ +const { + NutritionOrderCreateMutation, + NutritionOrderUpdateMutation, + NutritionOrderRemoveMutation, +} = require('./mutation'); + const { NutritionOrderQuery, NutritionOrderListQuery, NutritionOrderInstanceQuery, } = require('./query'); -const { - NutritionOrderCreateMutation, - NutritionOrderUpdateMutation, - NutritionOrderDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { NutritionOrderCreate: NutritionOrderCreateMutation, NutritionOrderUpdate: NutritionOrderUpdateMutation, - NutritionOrderDelete: NutritionOrderDeleteMutation, + NutritionOrderRemove: NutritionOrderRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'NutritionOrder', path: '/1_0_2/NutritionOrder/:id', query: NutritionOrderInstanceQuery, diff --git a/src/resources/1_0_2/profiles/nutritionorder/resolver.js b/src/resources/1_0_2/profiles/nutritionorder/resolver.js index 5f643b8b..e6674684 100644 --- a/src/resources/1_0_2/profiles/nutritionorder/resolver.js +++ b/src/resources/1_0_2/profiles/nutritionorder/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.nutritionorderResolver + * @name exports.getNutritionOrder * @static - * @summary NutritionOrder Resolver. + * @summary NutritionOrder resolver. */ -module.exports.nutritionorderResolver = function nutritionorderResolver( +module.exports.getNutritionOrder = function getNutritionOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderListResolver + * @name exports.getNutritionOrderList * @static - * @summary NutritionOrder List Resolver. + * @summary NutritionOrder list resolver. */ -module.exports.nutritionorderListResolver = function nutritionorderListResolver( +module.exports.getNutritionOrderList = function getNutritionOrderList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderInstanceResolver + * @name exports.getNutritionOrderInstance * @static - * @summary NutritionOrder Instance Resolver. + * @summary NutritionOrder instance resolver. */ -module.exports.nutritionorderInstanceResolver = function nutritionorderInstanceResolver( +module.exports.getNutritionOrderInstance = function getNutritionOrderInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderCreateResolver + * @name exports.createNutritionOrder * @static - * @summary NutritionOrder Create Resolver. + * @summary Create NutritionOrder resolver. */ -module.exports.nutritionorderCreateResolver = function nutritionorderCreateResolver( +module.exports.createNutritionOrder = function createNutritionOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderUpdateResolver + * @name exports.updateNutritionOrder * @static - * @summary NutritionOrder Update Resolver. + * @summary Update NutritionOrder resolver. */ -module.exports.nutritionorderUpdateResolver = function nutritionorderUpdateResolver( +module.exports.updateNutritionOrder = function updateNutritionOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderDeleteResolver + * @name exports.removeNutritionOrder * @static - * @summary NutritionOrder Delete Resolver. + * @summary Remove NutritionOrder resolver. */ -module.exports.nutritionorderDeleteResolver = function nutritionorderDeleteResolver( +module.exports.removeNutritionOrder = function removeNutritionOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/observation/mutation.js b/src/resources/1_0_2/profiles/observation/mutation.js index d81f9fb0..9fd5d068 100644 --- a/src/resources/1_0_2/profiles/observation/mutation.js +++ b/src/resources/1_0_2/profiles/observation/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ObservationSchema = require('../../schemas/observation.schema'); +const ObservationSchema = require('../../schemas/observation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ObservationInput = require('../../inputs/observation.input'); +const ObservationInput = require('../../inputs/observation.input.js'); -// Resolvers -const { - observationCreateResolver, - observationUpdateResolver, - observationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createObservation, + updateObservation, + removeObservation, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Observation', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Observation record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Observation record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ObservationCreateMutation - * @summary ObservationCreate Mutation. + * @summary ObservationCreate mutation. */ module.exports.ObservationCreateMutation = { - args: WriteArgs, - description: 'Create a Observation', - resolve: scopeInvariant(scopeOptions, observationCreateResolver), + description: 'Create a Observation record', + resolve: scopeInvariant(scopeOptions, createObservation), type: ObservationSchema, + args: WriteArgs, }; /** * @name exports.ObservationUpdateMutation - * @summary ObservationUpdate Mutation. + * @summary ObservationUpdate mutation. */ module.exports.ObservationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Observations', - resolve: scopeInvariant(scopeOptions, observationUpdateResolver), + description: 'Update a Observation record', + resolve: scopeInvariant(scopeOptions, updateObservation), type: ObservationSchema, + args: WriteArgs, }; /** - * @name exports.ObservationDeleteMutation - * @summary ObservationDelete Mutation. + * @name exports.ObservationRemoveMutation + * @summary ObservationRemove mutation. */ -module.exports.ObservationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Observation', - resolve: scopeInvariant(scopeOptions, observationDeleteResolver), +module.exports.ObservationRemoveMutation = { + description: 'Remove a Observation record', + resolve: scopeInvariant(scopeOptions, removeObservation), type: ObservationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/observation/query.js b/src/resources/1_0_2/profiles/observation/query.js index 170473e4..7a9ef256 100644 --- a/src/resources/1_0_2/profiles/observation/query.js +++ b/src/resources/1_0_2/profiles/observation/query.js @@ -1,55 +1,59 @@ // Schemas -const ObservationSchema = require('../../schemas/observation.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ObservationSchema = require('../../schemas/observation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ObservationArgs = require('../../parameters/observation.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ObservationArgs = require('../../parameters/observation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ObservationArgs); // Resolvers const { - observationResolver, - observationListResolver, - observationInstanceResolver, + getObservation, + getObservationList, + getObservationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Observation', action: 'read', - version: '1_0_2', }; /** * @name exports.ObservationQuery - * @summary Observation Query. + * @summary Observation query. */ module.exports.ObservationQuery = { - args: Object.assign({}, CommonArgs, ObservationArgs), description: 'Query for a single Observation', - resolve: scopeInvariant(scopeOptions, observationResolver), + resolve: scopeInvariant(scopeOptions, getObservation), type: ObservationSchema, + args: args, }; /** * @name exports.ObservationListQuery - * @summary ObservationList Query. + * @summary Observation query. */ module.exports.ObservationListQuery = { - args: Object.assign({}, CommonArgs, ObservationArgs), - description: 'Query for multiple Observations', - resolve: scopeInvariant(scopeOptions, observationListResolver), + description: 'Query for a more than or just one Observation', + resolve: scopeInvariant(scopeOptions, getObservationList), type: BundleSchema, + args: args, }; /** * @name exports.ObservationInstanceQuery - * @summary ObservationInstance Query. + * @summary Observation query. */ module.exports.ObservationInstanceQuery = { - description: 'Get information about a single Observation', - resolve: scopeInvariant(scopeOptions, observationInstanceResolver), + description: 'Access information about a single Observation', + resolve: scopeInvariant(scopeOptions, getObservationInstance), type: ObservationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/observation/index.js b/src/resources/1_0_2/profiles/observation/register.js similarity index 92% rename from src/resources/1_0_2/profiles/observation/index.js rename to src/resources/1_0_2/profiles/observation/register.js index 6b002f34..ad00f4d4 100644 --- a/src/resources/1_0_2/profiles/observation/index.js +++ b/src/resources/1_0_2/profiles/observation/register.js @@ -1,15 +1,15 @@ +const { + ObservationCreateMutation, + ObservationUpdateMutation, + ObservationRemoveMutation, +} = require('./mutation'); + const { ObservationQuery, ObservationListQuery, ObservationInstanceQuery, } = require('./query'); -const { - ObservationCreateMutation, - ObservationUpdateMutation, - ObservationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ObservationCreate: ObservationCreateMutation, ObservationUpdate: ObservationUpdateMutation, - ObservationDelete: ObservationDeleteMutation, + ObservationRemove: ObservationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Observation', path: '/1_0_2/Observation/:id', query: ObservationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/observation/resolver.js b/src/resources/1_0_2/profiles/observation/resolver.js index 8756b1e1..da09be65 100644 --- a/src/resources/1_0_2/profiles/observation/resolver.js +++ b/src/resources/1_0_2/profiles/observation/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.observationResolver + * @name exports.getObservation * @static - * @summary Observation Resolver. + * @summary Observation resolver. */ -module.exports.observationResolver = function observationResolver( +module.exports.getObservation = function getObservation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationListResolver + * @name exports.getObservationList * @static - * @summary Observation List Resolver. + * @summary Observation list resolver. */ -module.exports.observationListResolver = function observationListResolver( +module.exports.getObservationList = function getObservationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationInstanceResolver + * @name exports.getObservationInstance * @static - * @summary Observation Instance Resolver. + * @summary Observation instance resolver. */ -module.exports.observationInstanceResolver = function observationInstanceResolver( +module.exports.getObservationInstance = function getObservationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationCreateResolver + * @name exports.createObservation * @static - * @summary Observation Create Resolver. + * @summary Create Observation resolver. */ -module.exports.observationCreateResolver = function observationCreateResolver( +module.exports.createObservation = function createObservation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationUpdateResolver + * @name exports.updateObservation * @static - * @summary Observation Update Resolver. + * @summary Update Observation resolver. */ -module.exports.observationUpdateResolver = function observationUpdateResolver( +module.exports.updateObservation = function updateObservation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationDeleteResolver + * @name exports.removeObservation * @static - * @summary Observation Delete Resolver. + * @summary Remove Observation resolver. */ -module.exports.observationDeleteResolver = function observationDeleteResolver( +module.exports.removeObservation = function removeObservation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/operationdefinition/mutation.js b/src/resources/1_0_2/profiles/operationdefinition/mutation.js index 82f0d212..3e607b6b 100644 --- a/src/resources/1_0_2/profiles/operationdefinition/mutation.js +++ b/src/resources/1_0_2/profiles/operationdefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema'); +const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const OperationDefinitionInput = require('../../inputs/operationdefinition.input'); +const OperationDefinitionInput = require('../../inputs/operationdefinition.input.js'); -// Resolvers -const { - operationdefinitionCreateResolver, - operationdefinitionUpdateResolver, - operationdefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createOperationDefinition, + updateOperationDefinition, + removeOperationDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'OperationDefinition', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a OperationDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a OperationDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.OperationDefinitionCreateMutation - * @summary OperationDefinitionCreate Mutation. + * @summary OperationDefinitionCreate mutation. */ module.exports.OperationDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a OperationDefinition', - resolve: scopeInvariant(scopeOptions, operationdefinitionCreateResolver), + description: 'Create a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, createOperationDefinition), type: OperationDefinitionSchema, + args: WriteArgs, }; /** * @name exports.OperationDefinitionUpdateMutation - * @summary OperationDefinitionUpdate Mutation. + * @summary OperationDefinitionUpdate mutation. */ module.exports.OperationDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple OperationDefinitions', - resolve: scopeInvariant(scopeOptions, operationdefinitionUpdateResolver), + description: 'Update a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, updateOperationDefinition), type: OperationDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.OperationDefinitionDeleteMutation - * @summary OperationDefinitionDelete Mutation. + * @name exports.OperationDefinitionRemoveMutation + * @summary OperationDefinitionRemove mutation. */ -module.exports.OperationDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single OperationDefinition', - resolve: scopeInvariant(scopeOptions, operationdefinitionDeleteResolver), +module.exports.OperationDefinitionRemoveMutation = { + description: 'Remove a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, removeOperationDefinition), type: OperationDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/operationdefinition/query.js b/src/resources/1_0_2/profiles/operationdefinition/query.js index 4b351240..25662442 100644 --- a/src/resources/1_0_2/profiles/operationdefinition/query.js +++ b/src/resources/1_0_2/profiles/operationdefinition/query.js @@ -1,55 +1,59 @@ // Schemas -const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const OperationDefinitionArgs = require('../../parameters/operationdefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const OperationDefinitionArgs = require('../../parameters/operationdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, OperationDefinitionArgs); // Resolvers const { - operationdefinitionResolver, - operationdefinitionListResolver, - operationdefinitionInstanceResolver, + getOperationDefinition, + getOperationDefinitionList, + getOperationDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'OperationDefinition', action: 'read', - version: '1_0_2', }; /** * @name exports.OperationDefinitionQuery - * @summary OperationDefinition Query. + * @summary OperationDefinition query. */ module.exports.OperationDefinitionQuery = { - args: Object.assign({}, CommonArgs, OperationDefinitionArgs), description: 'Query for a single OperationDefinition', - resolve: scopeInvariant(scopeOptions, operationdefinitionResolver), + resolve: scopeInvariant(scopeOptions, getOperationDefinition), type: OperationDefinitionSchema, + args: args, }; /** * @name exports.OperationDefinitionListQuery - * @summary OperationDefinitionList Query. + * @summary OperationDefinition query. */ module.exports.OperationDefinitionListQuery = { - args: Object.assign({}, CommonArgs, OperationDefinitionArgs), - description: 'Query for multiple OperationDefinitions', - resolve: scopeInvariant(scopeOptions, operationdefinitionListResolver), + description: 'Query for a more than or just one OperationDefinition', + resolve: scopeInvariant(scopeOptions, getOperationDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.OperationDefinitionInstanceQuery - * @summary OperationDefinitionInstance Query. + * @summary OperationDefinition query. */ module.exports.OperationDefinitionInstanceQuery = { - description: 'Get information about a single OperationDefinition', - resolve: scopeInvariant(scopeOptions, operationdefinitionInstanceResolver), + description: 'Access information about a single OperationDefinition', + resolve: scopeInvariant(scopeOptions, getOperationDefinitionInstance), type: OperationDefinitionSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/operationdefinition/index.js b/src/resources/1_0_2/profiles/operationdefinition/register.js similarity index 91% rename from src/resources/1_0_2/profiles/operationdefinition/index.js rename to src/resources/1_0_2/profiles/operationdefinition/register.js index ebcded14..23e052d4 100644 --- a/src/resources/1_0_2/profiles/operationdefinition/index.js +++ b/src/resources/1_0_2/profiles/operationdefinition/register.js @@ -1,15 +1,15 @@ +const { + OperationDefinitionCreateMutation, + OperationDefinitionUpdateMutation, + OperationDefinitionRemoveMutation, +} = require('./mutation'); + const { OperationDefinitionQuery, OperationDefinitionListQuery, OperationDefinitionInstanceQuery, } = require('./query'); -const { - OperationDefinitionCreateMutation, - OperationDefinitionUpdateMutation, - OperationDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { OperationDefinitionCreate: OperationDefinitionCreateMutation, OperationDefinitionUpdate: OperationDefinitionUpdateMutation, - OperationDefinitionDelete: OperationDefinitionDeleteMutation, + OperationDefinitionRemove: OperationDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'OperationDefinition', path: '/1_0_2/OperationDefinition/:id', query: OperationDefinitionInstanceQuery, diff --git a/src/resources/1_0_2/profiles/operationdefinition/resolver.js b/src/resources/1_0_2/profiles/operationdefinition/resolver.js index 6f7949e7..3760e636 100644 --- a/src/resources/1_0_2/profiles/operationdefinition/resolver.js +++ b/src/resources/1_0_2/profiles/operationdefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.operationdefinitionResolver + * @name exports.getOperationDefinition * @static - * @summary OperationDefinition Resolver. + * @summary OperationDefinition resolver. */ -module.exports.operationdefinitionResolver = function operationdefinitionResolver( +module.exports.getOperationDefinition = function getOperationDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionListResolver + * @name exports.getOperationDefinitionList * @static - * @summary OperationDefinition List Resolver. + * @summary OperationDefinition list resolver. */ -module.exports.operationdefinitionListResolver = function operationdefinitionListResolver( +module.exports.getOperationDefinitionList = function getOperationDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionInstanceResolver + * @name exports.getOperationDefinitionInstance * @static - * @summary OperationDefinition Instance Resolver. + * @summary OperationDefinition instance resolver. */ -module.exports.operationdefinitionInstanceResolver = function operationdefinitionInstanceResolver( +module.exports.getOperationDefinitionInstance = function getOperationDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionCreateResolver + * @name exports.createOperationDefinition * @static - * @summary OperationDefinition Create Resolver. + * @summary Create OperationDefinition resolver. */ -module.exports.operationdefinitionCreateResolver = function operationdefinitionCreateResolver( +module.exports.createOperationDefinition = function createOperationDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionUpdateResolver + * @name exports.updateOperationDefinition * @static - * @summary OperationDefinition Update Resolver. + * @summary Update OperationDefinition resolver. */ -module.exports.operationdefinitionUpdateResolver = function operationdefinitionUpdateResolver( +module.exports.updateOperationDefinition = function updateOperationDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionDeleteResolver + * @name exports.removeOperationDefinition * @static - * @summary OperationDefinition Delete Resolver. + * @summary Remove OperationDefinition resolver. */ -module.exports.operationdefinitionDeleteResolver = function operationdefinitionDeleteResolver( +module.exports.removeOperationDefinition = function removeOperationDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/order/mutation.js b/src/resources/1_0_2/profiles/order/mutation.js index 4cef6df3..d8012346 100644 --- a/src/resources/1_0_2/profiles/order/mutation.js +++ b/src/resources/1_0_2/profiles/order/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const OrderSchema = require('../../schemas/order.schema'); +const OrderSchema = require('../../schemas/order.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const OrderInput = require('../../inputs/order.input'); +const OrderInput = require('../../inputs/order.input.js'); -// Resolvers -const { - orderCreateResolver, - orderUpdateResolver, - orderDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createOrder, updateOrder, removeOrder } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Order', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Order record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Order record for deletion.', }, }; /** * @name exports.OrderCreateMutation - * @summary OrderCreate Mutation. + * @summary OrderCreate mutation. */ module.exports.OrderCreateMutation = { - args: WriteArgs, - description: 'Create a Order', - resolve: scopeInvariant(scopeOptions, orderCreateResolver), + description: 'Create a Order record', + resolve: scopeInvariant(scopeOptions, createOrder), type: OrderSchema, + args: WriteArgs, }; /** * @name exports.OrderUpdateMutation - * @summary OrderUpdate Mutation. + * @summary OrderUpdate mutation. */ module.exports.OrderUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Orders', - resolve: scopeInvariant(scopeOptions, orderUpdateResolver), + description: 'Update a Order record', + resolve: scopeInvariant(scopeOptions, updateOrder), type: OrderSchema, + args: WriteArgs, }; /** - * @name exports.OrderDeleteMutation - * @summary OrderDelete Mutation. + * @name exports.OrderRemoveMutation + * @summary OrderRemove mutation. */ -module.exports.OrderDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Order', - resolve: scopeInvariant(scopeOptions, orderDeleteResolver), +module.exports.OrderRemoveMutation = { + description: 'Remove a Order record', + resolve: scopeInvariant(scopeOptions, removeOrder), type: OrderSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/order/query.js b/src/resources/1_0_2/profiles/order/query.js index 3d38f779..f0c0b6ca 100644 --- a/src/resources/1_0_2/profiles/order/query.js +++ b/src/resources/1_0_2/profiles/order/query.js @@ -1,55 +1,55 @@ // Schemas -const OrderSchema = require('../../schemas/order.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OrderSchema = require('../../schemas/order.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const OrderArgs = require('../../parameters/order.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const OrderArgs = require('../../parameters/order.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, OrderArgs); // Resolvers -const { - orderResolver, - orderListResolver, - orderInstanceResolver, -} = require('./resolver'); +const { getOrder, getOrderList, getOrderInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Order', action: 'read', - version: '1_0_2', }; /** * @name exports.OrderQuery - * @summary Order Query. + * @summary Order query. */ module.exports.OrderQuery = { - args: Object.assign({}, CommonArgs, OrderArgs), description: 'Query for a single Order', - resolve: scopeInvariant(scopeOptions, orderResolver), + resolve: scopeInvariant(scopeOptions, getOrder), type: OrderSchema, + args: args, }; /** * @name exports.OrderListQuery - * @summary OrderList Query. + * @summary Order query. */ module.exports.OrderListQuery = { - args: Object.assign({}, CommonArgs, OrderArgs), - description: 'Query for multiple Orders', - resolve: scopeInvariant(scopeOptions, orderListResolver), + description: 'Query for a more than or just one Order', + resolve: scopeInvariant(scopeOptions, getOrderList), type: BundleSchema, + args: args, }; /** * @name exports.OrderInstanceQuery - * @summary OrderInstance Query. + * @summary Order query. */ module.exports.OrderInstanceQuery = { - description: 'Get information about a single Order', - resolve: scopeInvariant(scopeOptions, orderInstanceResolver), + description: 'Access information about a single Order', + resolve: scopeInvariant(scopeOptions, getOrderInstance), type: OrderSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/order/index.js b/src/resources/1_0_2/profiles/order/register.js similarity index 93% rename from src/resources/1_0_2/profiles/order/index.js rename to src/resources/1_0_2/profiles/order/register.js index fdec24f9..9975d971 100644 --- a/src/resources/1_0_2/profiles/order/index.js +++ b/src/resources/1_0_2/profiles/order/register.js @@ -1,11 +1,11 @@ -const { OrderQuery, OrderListQuery, OrderInstanceQuery } = require('./query'); - const { OrderCreateMutation, OrderUpdateMutation, - OrderDeleteMutation, + OrderRemoveMutation, } = require('./mutation'); +const { OrderQuery, OrderListQuery, OrderInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { OrderCreate: OrderCreateMutation, OrderUpdate: OrderUpdateMutation, - OrderDelete: OrderDeleteMutation, + OrderRemove: OrderRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Order', path: '/1_0_2/Order/:id', query: OrderInstanceQuery, diff --git a/src/resources/1_0_2/profiles/order/resolver.js b/src/resources/1_0_2/profiles/order/resolver.js index 86523dc5..86184ec9 100644 --- a/src/resources/1_0_2/profiles/order/resolver.js +++ b/src/resources/1_0_2/profiles/order/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.orderResolver + * @name exports.getOrder * @static - * @summary Order Resolver. + * @summary Order resolver. */ -module.exports.orderResolver = function orderResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getOrder = function getOrder(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderListResolver + * @name exports.getOrderList * @static - * @summary Order List Resolver. + * @summary Order list resolver. */ -module.exports.orderListResolver = function orderListResolver( +module.exports.getOrderList = function getOrderList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderInstanceResolver + * @name exports.getOrderInstance * @static - * @summary Order Instance Resolver. + * @summary Order instance resolver. */ -module.exports.orderInstanceResolver = function orderInstanceResolver( +module.exports.getOrderInstance = function getOrderInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderCreateResolver + * @name exports.createOrder * @static - * @summary Order Create Resolver. + * @summary Create Order resolver. */ -module.exports.orderCreateResolver = function orderCreateResolver( +module.exports.createOrder = function createOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderUpdateResolver + * @name exports.updateOrder * @static - * @summary Order Update Resolver. + * @summary Update Order resolver. */ -module.exports.orderUpdateResolver = function orderUpdateResolver( +module.exports.updateOrder = function updateOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderDeleteResolver + * @name exports.removeOrder * @static - * @summary Order Delete Resolver. + * @summary Remove Order resolver. */ -module.exports.orderDeleteResolver = function orderDeleteResolver( +module.exports.removeOrder = function removeOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/orderresponse/mutation.js b/src/resources/1_0_2/profiles/orderresponse/mutation.js index a2e0c646..42ca39a1 100644 --- a/src/resources/1_0_2/profiles/orderresponse/mutation.js +++ b/src/resources/1_0_2/profiles/orderresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const OrderResponseSchema = require('../../schemas/orderresponse.schema'); +const OrderResponseSchema = require('../../schemas/orderresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const OrderResponseInput = require('../../inputs/orderresponse.input'); +const OrderResponseInput = require('../../inputs/orderresponse.input.js'); -// Resolvers -const { - orderresponseCreateResolver, - orderresponseUpdateResolver, - orderresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createOrderResponse, + updateOrderResponse, + removeOrderResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'OrderResponse', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a OrderResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a OrderResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.OrderResponseCreateMutation - * @summary OrderResponseCreate Mutation. + * @summary OrderResponseCreate mutation. */ module.exports.OrderResponseCreateMutation = { - args: WriteArgs, - description: 'Create a OrderResponse', - resolve: scopeInvariant(scopeOptions, orderresponseCreateResolver), + description: 'Create a OrderResponse record', + resolve: scopeInvariant(scopeOptions, createOrderResponse), type: OrderResponseSchema, + args: WriteArgs, }; /** * @name exports.OrderResponseUpdateMutation - * @summary OrderResponseUpdate Mutation. + * @summary OrderResponseUpdate mutation. */ module.exports.OrderResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple OrderResponses', - resolve: scopeInvariant(scopeOptions, orderresponseUpdateResolver), + description: 'Update a OrderResponse record', + resolve: scopeInvariant(scopeOptions, updateOrderResponse), type: OrderResponseSchema, + args: WriteArgs, }; /** - * @name exports.OrderResponseDeleteMutation - * @summary OrderResponseDelete Mutation. + * @name exports.OrderResponseRemoveMutation + * @summary OrderResponseRemove mutation. */ -module.exports.OrderResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single OrderResponse', - resolve: scopeInvariant(scopeOptions, orderresponseDeleteResolver), +module.exports.OrderResponseRemoveMutation = { + description: 'Remove a OrderResponse record', + resolve: scopeInvariant(scopeOptions, removeOrderResponse), type: OrderResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/orderresponse/query.js b/src/resources/1_0_2/profiles/orderresponse/query.js index d52cef3c..40bbc13b 100644 --- a/src/resources/1_0_2/profiles/orderresponse/query.js +++ b/src/resources/1_0_2/profiles/orderresponse/query.js @@ -1,55 +1,59 @@ // Schemas -const OrderResponseSchema = require('../../schemas/orderresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OrderResponseSchema = require('../../schemas/orderresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const OrderResponseArgs = require('../../parameters/orderresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const OrderResponseArgs = require('../../parameters/orderresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, OrderResponseArgs); // Resolvers const { - orderresponseResolver, - orderresponseListResolver, - orderresponseInstanceResolver, + getOrderResponse, + getOrderResponseList, + getOrderResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'OrderResponse', action: 'read', - version: '1_0_2', }; /** * @name exports.OrderResponseQuery - * @summary OrderResponse Query. + * @summary OrderResponse query. */ module.exports.OrderResponseQuery = { - args: Object.assign({}, CommonArgs, OrderResponseArgs), description: 'Query for a single OrderResponse', - resolve: scopeInvariant(scopeOptions, orderresponseResolver), + resolve: scopeInvariant(scopeOptions, getOrderResponse), type: OrderResponseSchema, + args: args, }; /** * @name exports.OrderResponseListQuery - * @summary OrderResponseList Query. + * @summary OrderResponse query. */ module.exports.OrderResponseListQuery = { - args: Object.assign({}, CommonArgs, OrderResponseArgs), - description: 'Query for multiple OrderResponses', - resolve: scopeInvariant(scopeOptions, orderresponseListResolver), + description: 'Query for a more than or just one OrderResponse', + resolve: scopeInvariant(scopeOptions, getOrderResponseList), type: BundleSchema, + args: args, }; /** * @name exports.OrderResponseInstanceQuery - * @summary OrderResponseInstance Query. + * @summary OrderResponse query. */ module.exports.OrderResponseInstanceQuery = { - description: 'Get information about a single OrderResponse', - resolve: scopeInvariant(scopeOptions, orderresponseInstanceResolver), + description: 'Access information about a single OrderResponse', + resolve: scopeInvariant(scopeOptions, getOrderResponseInstance), type: OrderResponseSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/orderresponse/index.js b/src/resources/1_0_2/profiles/orderresponse/register.js similarity index 92% rename from src/resources/1_0_2/profiles/orderresponse/index.js rename to src/resources/1_0_2/profiles/orderresponse/register.js index 4e322b79..9ad3d301 100644 --- a/src/resources/1_0_2/profiles/orderresponse/index.js +++ b/src/resources/1_0_2/profiles/orderresponse/register.js @@ -1,15 +1,15 @@ +const { + OrderResponseCreateMutation, + OrderResponseUpdateMutation, + OrderResponseRemoveMutation, +} = require('./mutation'); + const { OrderResponseQuery, OrderResponseListQuery, OrderResponseInstanceQuery, } = require('./query'); -const { - OrderResponseCreateMutation, - OrderResponseUpdateMutation, - OrderResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { OrderResponseCreate: OrderResponseCreateMutation, OrderResponseUpdate: OrderResponseUpdateMutation, - OrderResponseDelete: OrderResponseDeleteMutation, + OrderResponseRemove: OrderResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'OrderResponse', path: '/1_0_2/OrderResponse/:id', query: OrderResponseInstanceQuery, diff --git a/src/resources/1_0_2/profiles/orderresponse/resolver.js b/src/resources/1_0_2/profiles/orderresponse/resolver.js index 5eb92c29..67277e01 100644 --- a/src/resources/1_0_2/profiles/orderresponse/resolver.js +++ b/src/resources/1_0_2/profiles/orderresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.orderresponseResolver + * @name exports.getOrderResponse * @static - * @summary OrderResponse Resolver. + * @summary OrderResponse resolver. */ -module.exports.orderresponseResolver = function orderresponseResolver( +module.exports.getOrderResponse = function getOrderResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderresponseListResolver + * @name exports.getOrderResponseList * @static - * @summary OrderResponse List Resolver. + * @summary OrderResponse list resolver. */ -module.exports.orderresponseListResolver = function orderresponseListResolver( +module.exports.getOrderResponseList = function getOrderResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderresponseInstanceResolver + * @name exports.getOrderResponseInstance * @static - * @summary OrderResponse Instance Resolver. + * @summary OrderResponse instance resolver. */ -module.exports.orderresponseInstanceResolver = function orderresponseInstanceResolver( +module.exports.getOrderResponseInstance = function getOrderResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderresponseCreateResolver + * @name exports.createOrderResponse * @static - * @summary OrderResponse Create Resolver. + * @summary Create OrderResponse resolver. */ -module.exports.orderresponseCreateResolver = function orderresponseCreateResolver( +module.exports.createOrderResponse = function createOrderResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderresponseUpdateResolver + * @name exports.updateOrderResponse * @static - * @summary OrderResponse Update Resolver. + * @summary Update OrderResponse resolver. */ -module.exports.orderresponseUpdateResolver = function orderresponseUpdateResolver( +module.exports.updateOrderResponse = function updateOrderResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.orderresponseDeleteResolver + * @name exports.removeOrderResponse * @static - * @summary OrderResponse Delete Resolver. + * @summary Remove OrderResponse resolver. */ -module.exports.orderresponseDeleteResolver = function orderresponseDeleteResolver( +module.exports.removeOrderResponse = function removeOrderResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/organization/mutation.js b/src/resources/1_0_2/profiles/organization/mutation.js index ad3c8df6..8c814030 100644 --- a/src/resources/1_0_2/profiles/organization/mutation.js +++ b/src/resources/1_0_2/profiles/organization/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const OrganizationSchema = require('../../schemas/organization.schema'); +const OrganizationSchema = require('../../schemas/organization.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const OrganizationInput = require('../../inputs/organization.input'); +const OrganizationInput = require('../../inputs/organization.input.js'); -// Resolvers -const { - organizationCreateResolver, - organizationUpdateResolver, - organizationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createOrganization, + updateOrganization, + removeOrganization, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Organization', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Organization record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Organization record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.OrganizationCreateMutation - * @summary OrganizationCreate Mutation. + * @summary OrganizationCreate mutation. */ module.exports.OrganizationCreateMutation = { - args: WriteArgs, - description: 'Create a Organization', - resolve: scopeInvariant(scopeOptions, organizationCreateResolver), + description: 'Create a Organization record', + resolve: scopeInvariant(scopeOptions, createOrganization), type: OrganizationSchema, + args: WriteArgs, }; /** * @name exports.OrganizationUpdateMutation - * @summary OrganizationUpdate Mutation. + * @summary OrganizationUpdate mutation. */ module.exports.OrganizationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Organizations', - resolve: scopeInvariant(scopeOptions, organizationUpdateResolver), + description: 'Update a Organization record', + resolve: scopeInvariant(scopeOptions, updateOrganization), type: OrganizationSchema, + args: WriteArgs, }; /** - * @name exports.OrganizationDeleteMutation - * @summary OrganizationDelete Mutation. + * @name exports.OrganizationRemoveMutation + * @summary OrganizationRemove mutation. */ -module.exports.OrganizationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Organization', - resolve: scopeInvariant(scopeOptions, organizationDeleteResolver), +module.exports.OrganizationRemoveMutation = { + description: 'Remove a Organization record', + resolve: scopeInvariant(scopeOptions, removeOrganization), type: OrganizationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/organization/query.js b/src/resources/1_0_2/profiles/organization/query.js index 8651fd61..d1ca86e1 100644 --- a/src/resources/1_0_2/profiles/organization/query.js +++ b/src/resources/1_0_2/profiles/organization/query.js @@ -1,55 +1,59 @@ // Schemas -const OrganizationSchema = require('../../schemas/organization.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OrganizationSchema = require('../../schemas/organization.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const OrganizationArgs = require('../../parameters/organization.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const OrganizationArgs = require('../../parameters/organization.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, OrganizationArgs); // Resolvers const { - organizationResolver, - organizationListResolver, - organizationInstanceResolver, + getOrganization, + getOrganizationList, + getOrganizationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Organization', action: 'read', - version: '1_0_2', }; /** * @name exports.OrganizationQuery - * @summary Organization Query. + * @summary Organization query. */ module.exports.OrganizationQuery = { - args: Object.assign({}, CommonArgs, OrganizationArgs), description: 'Query for a single Organization', - resolve: scopeInvariant(scopeOptions, organizationResolver), + resolve: scopeInvariant(scopeOptions, getOrganization), type: OrganizationSchema, + args: args, }; /** * @name exports.OrganizationListQuery - * @summary OrganizationList Query. + * @summary Organization query. */ module.exports.OrganizationListQuery = { - args: Object.assign({}, CommonArgs, OrganizationArgs), - description: 'Query for multiple Organizations', - resolve: scopeInvariant(scopeOptions, organizationListResolver), + description: 'Query for a more than or just one Organization', + resolve: scopeInvariant(scopeOptions, getOrganizationList), type: BundleSchema, + args: args, }; /** * @name exports.OrganizationInstanceQuery - * @summary OrganizationInstance Query. + * @summary Organization query. */ module.exports.OrganizationInstanceQuery = { - description: 'Get information about a single Organization', - resolve: scopeInvariant(scopeOptions, organizationInstanceResolver), + description: 'Access information about a single Organization', + resolve: scopeInvariant(scopeOptions, getOrganizationInstance), type: OrganizationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/organization/index.js b/src/resources/1_0_2/profiles/organization/register.js similarity index 92% rename from src/resources/1_0_2/profiles/organization/index.js rename to src/resources/1_0_2/profiles/organization/register.js index 500ccc7f..66109dc2 100644 --- a/src/resources/1_0_2/profiles/organization/index.js +++ b/src/resources/1_0_2/profiles/organization/register.js @@ -1,15 +1,15 @@ +const { + OrganizationCreateMutation, + OrganizationUpdateMutation, + OrganizationRemoveMutation, +} = require('./mutation'); + const { OrganizationQuery, OrganizationListQuery, OrganizationInstanceQuery, } = require('./query'); -const { - OrganizationCreateMutation, - OrganizationUpdateMutation, - OrganizationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { OrganizationCreate: OrganizationCreateMutation, OrganizationUpdate: OrganizationUpdateMutation, - OrganizationDelete: OrganizationDeleteMutation, + OrganizationRemove: OrganizationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Organization', path: '/1_0_2/Organization/:id', query: OrganizationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/organization/resolver.js b/src/resources/1_0_2/profiles/organization/resolver.js index b770ad12..4cba8d20 100644 --- a/src/resources/1_0_2/profiles/organization/resolver.js +++ b/src/resources/1_0_2/profiles/organization/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.organizationResolver + * @name exports.getOrganization * @static - * @summary Organization Resolver. + * @summary Organization resolver. */ -module.exports.organizationResolver = function organizationResolver( +module.exports.getOrganization = function getOrganization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationListResolver + * @name exports.getOrganizationList * @static - * @summary Organization List Resolver. + * @summary Organization list resolver. */ -module.exports.organizationListResolver = function organizationListResolver( +module.exports.getOrganizationList = function getOrganizationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationInstanceResolver + * @name exports.getOrganizationInstance * @static - * @summary Organization Instance Resolver. + * @summary Organization instance resolver. */ -module.exports.organizationInstanceResolver = function organizationInstanceResolver( +module.exports.getOrganizationInstance = function getOrganizationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationCreateResolver + * @name exports.createOrganization * @static - * @summary Organization Create Resolver. + * @summary Create Organization resolver. */ -module.exports.organizationCreateResolver = function organizationCreateResolver( +module.exports.createOrganization = function createOrganization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationUpdateResolver + * @name exports.updateOrganization * @static - * @summary Organization Update Resolver. + * @summary Update Organization resolver. */ -module.exports.organizationUpdateResolver = function organizationUpdateResolver( +module.exports.updateOrganization = function updateOrganization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationDeleteResolver + * @name exports.removeOrganization * @static - * @summary Organization Delete Resolver. + * @summary Remove Organization resolver. */ -module.exports.organizationDeleteResolver = function organizationDeleteResolver( +module.exports.removeOrganization = function removeOrganization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/patient/mutation.js b/src/resources/1_0_2/profiles/patient/mutation.js index c657a815..7fb77ec6 100644 --- a/src/resources/1_0_2/profiles/patient/mutation.js +++ b/src/resources/1_0_2/profiles/patient/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PatientSchema = require('../../schemas/patient.schema'); +const PatientSchema = require('../../schemas/patient.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PatientInput = require('../../inputs/patient.input'); +const PatientInput = require('../../inputs/patient.input.js'); -// Resolvers -const { - patientCreateResolver, - patientUpdateResolver, - patientDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createPatient, updatePatient, removePatient } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Patient', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Patient record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Patient record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.PatientCreateMutation - * @summary PatientCreate Mutation. + * @summary PatientCreate mutation. */ module.exports.PatientCreateMutation = { - args: WriteArgs, - description: 'Create a Patient', - resolve: scopeInvariant(scopeOptions, patientCreateResolver), + description: 'Create a Patient record', + resolve: scopeInvariant(scopeOptions, createPatient), type: PatientSchema, + args: WriteArgs, }; /** * @name exports.PatientUpdateMutation - * @summary PatientUpdate Mutation. + * @summary PatientUpdate mutation. */ module.exports.PatientUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Patients', - resolve: scopeInvariant(scopeOptions, patientUpdateResolver), + description: 'Update a Patient record', + resolve: scopeInvariant(scopeOptions, updatePatient), type: PatientSchema, + args: WriteArgs, }; /** - * @name exports.PatientDeleteMutation - * @summary PatientDelete Mutation. + * @name exports.PatientRemoveMutation + * @summary PatientRemove mutation. */ -module.exports.PatientDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Patient', - resolve: scopeInvariant(scopeOptions, patientDeleteResolver), +module.exports.PatientRemoveMutation = { + description: 'Remove a Patient record', + resolve: scopeInvariant(scopeOptions, removePatient), type: PatientSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/patient/query.js b/src/resources/1_0_2/profiles/patient/query.js index 84479961..5f272764 100644 --- a/src/resources/1_0_2/profiles/patient/query.js +++ b/src/resources/1_0_2/profiles/patient/query.js @@ -1,55 +1,59 @@ // Schemas -const PatientSchema = require('../../schemas/patient.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PatientSchema = require('../../schemas/patient.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PatientArgs = require('../../parameters/patient.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PatientArgs = require('../../parameters/patient.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, PatientArgs); // Resolvers const { - patientResolver, - patientListResolver, - patientInstanceResolver, + getPatient, + getPatientList, + getPatientInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Patient', action: 'read', - version: '1_0_2', }; /** * @name exports.PatientQuery - * @summary Patient Query. + * @summary Patient query. */ module.exports.PatientQuery = { - args: Object.assign({}, CommonArgs, PatientArgs), description: 'Query for a single Patient', - resolve: scopeInvariant(scopeOptions, patientResolver), + resolve: scopeInvariant(scopeOptions, getPatient), type: PatientSchema, + args: args, }; /** * @name exports.PatientListQuery - * @summary PatientList Query. + * @summary Patient query. */ module.exports.PatientListQuery = { - args: Object.assign({}, CommonArgs, PatientArgs), - description: 'Query for multiple Patients', - resolve: scopeInvariant(scopeOptions, patientListResolver), + description: 'Query for a more than or just one Patient', + resolve: scopeInvariant(scopeOptions, getPatientList), type: BundleSchema, + args: args, }; /** * @name exports.PatientInstanceQuery - * @summary PatientInstance Query. + * @summary Patient query. */ module.exports.PatientInstanceQuery = { - description: 'Get information about a single Patient', - resolve: scopeInvariant(scopeOptions, patientInstanceResolver), + description: 'Access information about a single Patient', + resolve: scopeInvariant(scopeOptions, getPatientInstance), type: PatientSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/patient/index.js b/src/resources/1_0_2/profiles/patient/register.js similarity index 92% rename from src/resources/1_0_2/profiles/patient/index.js rename to src/resources/1_0_2/profiles/patient/register.js index fbcdbbc9..db860d14 100644 --- a/src/resources/1_0_2/profiles/patient/index.js +++ b/src/resources/1_0_2/profiles/patient/register.js @@ -1,15 +1,15 @@ +const { + PatientCreateMutation, + PatientUpdateMutation, + PatientRemoveMutation, +} = require('./mutation'); + const { PatientQuery, PatientListQuery, PatientInstanceQuery, } = require('./query'); -const { - PatientCreateMutation, - PatientUpdateMutation, - PatientDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PatientCreate: PatientCreateMutation, PatientUpdate: PatientUpdateMutation, - PatientDelete: PatientDeleteMutation, + PatientRemove: PatientRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Patient', path: '/1_0_2/Patient/:id', query: PatientInstanceQuery, diff --git a/src/resources/1_0_2/profiles/patient/resolver.js b/src/resources/1_0_2/profiles/patient/resolver.js index 9092516a..c717b007 100644 --- a/src/resources/1_0_2/profiles/patient/resolver.js +++ b/src/resources/1_0_2/profiles/patient/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.patientResolver + * @name exports.getPatient * @static - * @summary Patient Resolver. + * @summary Patient resolver. */ -module.exports.patientResolver = function patientResolver( +module.exports.getPatient = function getPatient( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientListResolver + * @name exports.getPatientList * @static - * @summary Patient List Resolver. + * @summary Patient list resolver. */ -module.exports.patientListResolver = function patientListResolver( +module.exports.getPatientList = function getPatientList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientInstanceResolver + * @name exports.getPatientInstance * @static - * @summary Patient Instance Resolver. + * @summary Patient instance resolver. */ -module.exports.patientInstanceResolver = function patientInstanceResolver( +module.exports.getPatientInstance = function getPatientInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientCreateResolver + * @name exports.createPatient * @static - * @summary Patient Create Resolver. + * @summary Create Patient resolver. */ -module.exports.patientCreateResolver = function patientCreateResolver( +module.exports.createPatient = function createPatient( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientUpdateResolver + * @name exports.updatePatient * @static - * @summary Patient Update Resolver. + * @summary Update Patient resolver. */ -module.exports.patientUpdateResolver = function patientUpdateResolver( +module.exports.updatePatient = function updatePatient( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientDeleteResolver + * @name exports.removePatient * @static - * @summary Patient Delete Resolver. + * @summary Remove Patient resolver. */ -module.exports.patientDeleteResolver = function patientDeleteResolver( +module.exports.removePatient = function removePatient( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/paymentnotice/mutation.js b/src/resources/1_0_2/profiles/paymentnotice/mutation.js index c53f6363..38435974 100644 --- a/src/resources/1_0_2/profiles/paymentnotice/mutation.js +++ b/src/resources/1_0_2/profiles/paymentnotice/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema'); +const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PaymentNoticeInput = require('../../inputs/paymentnotice.input'); +const PaymentNoticeInput = require('../../inputs/paymentnotice.input.js'); -// Resolvers -const { - paymentnoticeCreateResolver, - paymentnoticeUpdateResolver, - paymentnoticeDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createPaymentNotice, + updatePaymentNotice, + removePaymentNotice, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PaymentNotice', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a PaymentNotice record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a PaymentNotice record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.PaymentNoticeCreateMutation - * @summary PaymentNoticeCreate Mutation. + * @summary PaymentNoticeCreate mutation. */ module.exports.PaymentNoticeCreateMutation = { - args: WriteArgs, - description: 'Create a PaymentNotice', - resolve: scopeInvariant(scopeOptions, paymentnoticeCreateResolver), + description: 'Create a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, createPaymentNotice), type: PaymentNoticeSchema, + args: WriteArgs, }; /** * @name exports.PaymentNoticeUpdateMutation - * @summary PaymentNoticeUpdate Mutation. + * @summary PaymentNoticeUpdate mutation. */ module.exports.PaymentNoticeUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple PaymentNotices', - resolve: scopeInvariant(scopeOptions, paymentnoticeUpdateResolver), + description: 'Update a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, updatePaymentNotice), type: PaymentNoticeSchema, + args: WriteArgs, }; /** - * @name exports.PaymentNoticeDeleteMutation - * @summary PaymentNoticeDelete Mutation. + * @name exports.PaymentNoticeRemoveMutation + * @summary PaymentNoticeRemove mutation. */ -module.exports.PaymentNoticeDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single PaymentNotice', - resolve: scopeInvariant(scopeOptions, paymentnoticeDeleteResolver), +module.exports.PaymentNoticeRemoveMutation = { + description: 'Remove a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, removePaymentNotice), type: PaymentNoticeSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/paymentnotice/query.js b/src/resources/1_0_2/profiles/paymentnotice/query.js index f295789a..6d1fa814 100644 --- a/src/resources/1_0_2/profiles/paymentnotice/query.js +++ b/src/resources/1_0_2/profiles/paymentnotice/query.js @@ -1,55 +1,59 @@ // Schemas -const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PaymentNoticeArgs = require('../../parameters/paymentnotice.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PaymentNoticeArgs = require('../../parameters/paymentnotice.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, PaymentNoticeArgs); // Resolvers const { - paymentnoticeResolver, - paymentnoticeListResolver, - paymentnoticeInstanceResolver, + getPaymentNotice, + getPaymentNoticeList, + getPaymentNoticeInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PaymentNotice', action: 'read', - version: '1_0_2', }; /** * @name exports.PaymentNoticeQuery - * @summary PaymentNotice Query. + * @summary PaymentNotice query. */ module.exports.PaymentNoticeQuery = { - args: Object.assign({}, CommonArgs, PaymentNoticeArgs), description: 'Query for a single PaymentNotice', - resolve: scopeInvariant(scopeOptions, paymentnoticeResolver), + resolve: scopeInvariant(scopeOptions, getPaymentNotice), type: PaymentNoticeSchema, + args: args, }; /** * @name exports.PaymentNoticeListQuery - * @summary PaymentNoticeList Query. + * @summary PaymentNotice query. */ module.exports.PaymentNoticeListQuery = { - args: Object.assign({}, CommonArgs, PaymentNoticeArgs), - description: 'Query for multiple PaymentNotices', - resolve: scopeInvariant(scopeOptions, paymentnoticeListResolver), + description: 'Query for a more than or just one PaymentNotice', + resolve: scopeInvariant(scopeOptions, getPaymentNoticeList), type: BundleSchema, + args: args, }; /** * @name exports.PaymentNoticeInstanceQuery - * @summary PaymentNoticeInstance Query. + * @summary PaymentNotice query. */ module.exports.PaymentNoticeInstanceQuery = { - description: 'Get information about a single PaymentNotice', - resolve: scopeInvariant(scopeOptions, paymentnoticeInstanceResolver), + description: 'Access information about a single PaymentNotice', + resolve: scopeInvariant(scopeOptions, getPaymentNoticeInstance), type: PaymentNoticeSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/paymentnotice/index.js b/src/resources/1_0_2/profiles/paymentnotice/register.js similarity index 92% rename from src/resources/1_0_2/profiles/paymentnotice/index.js rename to src/resources/1_0_2/profiles/paymentnotice/register.js index 5f94efab..89a9d123 100644 --- a/src/resources/1_0_2/profiles/paymentnotice/index.js +++ b/src/resources/1_0_2/profiles/paymentnotice/register.js @@ -1,15 +1,15 @@ +const { + PaymentNoticeCreateMutation, + PaymentNoticeUpdateMutation, + PaymentNoticeRemoveMutation, +} = require('./mutation'); + const { PaymentNoticeQuery, PaymentNoticeListQuery, PaymentNoticeInstanceQuery, } = require('./query'); -const { - PaymentNoticeCreateMutation, - PaymentNoticeUpdateMutation, - PaymentNoticeDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PaymentNoticeCreate: PaymentNoticeCreateMutation, PaymentNoticeUpdate: PaymentNoticeUpdateMutation, - PaymentNoticeDelete: PaymentNoticeDeleteMutation, + PaymentNoticeRemove: PaymentNoticeRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'PaymentNotice', path: '/1_0_2/PaymentNotice/:id', query: PaymentNoticeInstanceQuery, diff --git a/src/resources/1_0_2/profiles/paymentnotice/resolver.js b/src/resources/1_0_2/profiles/paymentnotice/resolver.js index 353a241f..4522c307 100644 --- a/src/resources/1_0_2/profiles/paymentnotice/resolver.js +++ b/src/resources/1_0_2/profiles/paymentnotice/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.paymentnoticeResolver + * @name exports.getPaymentNotice * @static - * @summary PaymentNotice Resolver. + * @summary PaymentNotice resolver. */ -module.exports.paymentnoticeResolver = function paymentnoticeResolver( +module.exports.getPaymentNotice = function getPaymentNotice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeListResolver + * @name exports.getPaymentNoticeList * @static - * @summary PaymentNotice List Resolver. + * @summary PaymentNotice list resolver. */ -module.exports.paymentnoticeListResolver = function paymentnoticeListResolver( +module.exports.getPaymentNoticeList = function getPaymentNoticeList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeInstanceResolver + * @name exports.getPaymentNoticeInstance * @static - * @summary PaymentNotice Instance Resolver. + * @summary PaymentNotice instance resolver. */ -module.exports.paymentnoticeInstanceResolver = function paymentnoticeInstanceResolver( +module.exports.getPaymentNoticeInstance = function getPaymentNoticeInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeCreateResolver + * @name exports.createPaymentNotice * @static - * @summary PaymentNotice Create Resolver. + * @summary Create PaymentNotice resolver. */ -module.exports.paymentnoticeCreateResolver = function paymentnoticeCreateResolver( +module.exports.createPaymentNotice = function createPaymentNotice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeUpdateResolver + * @name exports.updatePaymentNotice * @static - * @summary PaymentNotice Update Resolver. + * @summary Update PaymentNotice resolver. */ -module.exports.paymentnoticeUpdateResolver = function paymentnoticeUpdateResolver( +module.exports.updatePaymentNotice = function updatePaymentNotice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeDeleteResolver + * @name exports.removePaymentNotice * @static - * @summary PaymentNotice Delete Resolver. + * @summary Remove PaymentNotice resolver. */ -module.exports.paymentnoticeDeleteResolver = function paymentnoticeDeleteResolver( +module.exports.removePaymentNotice = function removePaymentNotice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/paymentreconciliation/mutation.js b/src/resources/1_0_2/profiles/paymentreconciliation/mutation.js index 1274c351..be1e601c 100644 --- a/src/resources/1_0_2/profiles/paymentreconciliation/mutation.js +++ b/src/resources/1_0_2/profiles/paymentreconciliation/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema'); +const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PaymentReconciliationInput = require('../../inputs/paymentreconciliation.input'); +const PaymentReconciliationInput = require('../../inputs/paymentreconciliation.input.js'); -// Resolvers -const { - paymentreconciliationCreateResolver, - paymentreconciliationUpdateResolver, - paymentreconciliationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createPaymentReconciliation, + updatePaymentReconciliation, + removePaymentReconciliation, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PaymentReconciliation', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a PaymentReconciliation record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a PaymentReconciliation record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.PaymentReconciliationCreateMutation - * @summary PaymentReconciliationCreate Mutation. + * @summary PaymentReconciliationCreate mutation. */ module.exports.PaymentReconciliationCreateMutation = { - args: WriteArgs, - description: 'Create a PaymentReconciliation', - resolve: scopeInvariant(scopeOptions, paymentreconciliationCreateResolver), + description: 'Create a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, createPaymentReconciliation), type: PaymentReconciliationSchema, + args: WriteArgs, }; /** * @name exports.PaymentReconciliationUpdateMutation - * @summary PaymentReconciliationUpdate Mutation. + * @summary PaymentReconciliationUpdate mutation. */ module.exports.PaymentReconciliationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple PaymentReconciliations', - resolve: scopeInvariant(scopeOptions, paymentreconciliationUpdateResolver), + description: 'Update a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, updatePaymentReconciliation), type: PaymentReconciliationSchema, + args: WriteArgs, }; /** - * @name exports.PaymentReconciliationDeleteMutation - * @summary PaymentReconciliationDelete Mutation. + * @name exports.PaymentReconciliationRemoveMutation + * @summary PaymentReconciliationRemove mutation. */ -module.exports.PaymentReconciliationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single PaymentReconciliation', - resolve: scopeInvariant(scopeOptions, paymentreconciliationDeleteResolver), +module.exports.PaymentReconciliationRemoveMutation = { + description: 'Remove a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, removePaymentReconciliation), type: PaymentReconciliationSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/paymentreconciliation/query.js b/src/resources/1_0_2/profiles/paymentreconciliation/query.js index 6ba5c8d0..a19008ba 100644 --- a/src/resources/1_0_2/profiles/paymentreconciliation/query.js +++ b/src/resources/1_0_2/profiles/paymentreconciliation/query.js @@ -1,55 +1,59 @@ // Schemas -const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PaymentReconciliationArgs = require('../../parameters/paymentreconciliation.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PaymentReconciliationArgs = require('../../parameters/paymentreconciliation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, PaymentReconciliationArgs); // Resolvers const { - paymentreconciliationResolver, - paymentreconciliationListResolver, - paymentreconciliationInstanceResolver, + getPaymentReconciliation, + getPaymentReconciliationList, + getPaymentReconciliationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PaymentReconciliation', action: 'read', - version: '1_0_2', }; /** * @name exports.PaymentReconciliationQuery - * @summary PaymentReconciliation Query. + * @summary PaymentReconciliation query. */ module.exports.PaymentReconciliationQuery = { - args: Object.assign({}, CommonArgs, PaymentReconciliationArgs), description: 'Query for a single PaymentReconciliation', - resolve: scopeInvariant(scopeOptions, paymentreconciliationResolver), + resolve: scopeInvariant(scopeOptions, getPaymentReconciliation), type: PaymentReconciliationSchema, + args: args, }; /** * @name exports.PaymentReconciliationListQuery - * @summary PaymentReconciliationList Query. + * @summary PaymentReconciliation query. */ module.exports.PaymentReconciliationListQuery = { - args: Object.assign({}, CommonArgs, PaymentReconciliationArgs), - description: 'Query for multiple PaymentReconciliations', - resolve: scopeInvariant(scopeOptions, paymentreconciliationListResolver), + description: 'Query for a more than or just one PaymentReconciliation', + resolve: scopeInvariant(scopeOptions, getPaymentReconciliationList), type: BundleSchema, + args: args, }; /** * @name exports.PaymentReconciliationInstanceQuery - * @summary PaymentReconciliationInstance Query. + * @summary PaymentReconciliation query. */ module.exports.PaymentReconciliationInstanceQuery = { - description: 'Get information about a single PaymentReconciliation', - resolve: scopeInvariant(scopeOptions, paymentreconciliationInstanceResolver), + description: 'Access information about a single PaymentReconciliation', + resolve: scopeInvariant(scopeOptions, getPaymentReconciliationInstance), type: PaymentReconciliationSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/paymentreconciliation/index.js b/src/resources/1_0_2/profiles/paymentreconciliation/register.js similarity index 91% rename from src/resources/1_0_2/profiles/paymentreconciliation/index.js rename to src/resources/1_0_2/profiles/paymentreconciliation/register.js index 099dbd5a..ebda7e6f 100644 --- a/src/resources/1_0_2/profiles/paymentreconciliation/index.js +++ b/src/resources/1_0_2/profiles/paymentreconciliation/register.js @@ -1,15 +1,15 @@ +const { + PaymentReconciliationCreateMutation, + PaymentReconciliationUpdateMutation, + PaymentReconciliationRemoveMutation, +} = require('./mutation'); + const { PaymentReconciliationQuery, PaymentReconciliationListQuery, PaymentReconciliationInstanceQuery, } = require('./query'); -const { - PaymentReconciliationCreateMutation, - PaymentReconciliationUpdateMutation, - PaymentReconciliationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PaymentReconciliationCreate: PaymentReconciliationCreateMutation, PaymentReconciliationUpdate: PaymentReconciliationUpdateMutation, - PaymentReconciliationDelete: PaymentReconciliationDeleteMutation, + PaymentReconciliationRemove: PaymentReconciliationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'PaymentReconciliation', path: '/1_0_2/PaymentReconciliation/:id', query: PaymentReconciliationInstanceQuery, diff --git a/src/resources/1_0_2/profiles/paymentreconciliation/resolver.js b/src/resources/1_0_2/profiles/paymentreconciliation/resolver.js index 6c550306..8b6e5bb1 100644 --- a/src/resources/1_0_2/profiles/paymentreconciliation/resolver.js +++ b/src/resources/1_0_2/profiles/paymentreconciliation/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.paymentreconciliationResolver + * @name exports.getPaymentReconciliation * @static - * @summary PaymentReconciliation Resolver. + * @summary PaymentReconciliation resolver. */ -module.exports.paymentreconciliationResolver = function paymentreconciliationResolver( +module.exports.getPaymentReconciliation = function getPaymentReconciliation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationListResolver + * @name exports.getPaymentReconciliationList * @static - * @summary PaymentReconciliation List Resolver. + * @summary PaymentReconciliation list resolver. */ -module.exports.paymentreconciliationListResolver = function paymentreconciliationListResolver( +module.exports.getPaymentReconciliationList = function getPaymentReconciliationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationInstanceResolver + * @name exports.getPaymentReconciliationInstance * @static - * @summary PaymentReconciliation Instance Resolver. + * @summary PaymentReconciliation instance resolver. */ -module.exports.paymentreconciliationInstanceResolver = function paymentreconciliationInstanceResolver( +module.exports.getPaymentReconciliationInstance = function getPaymentReconciliationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationCreateResolver + * @name exports.createPaymentReconciliation * @static - * @summary PaymentReconciliation Create Resolver. + * @summary Create PaymentReconciliation resolver. */ -module.exports.paymentreconciliationCreateResolver = function paymentreconciliationCreateResolver( +module.exports.createPaymentReconciliation = function createPaymentReconciliation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationUpdateResolver + * @name exports.updatePaymentReconciliation * @static - * @summary PaymentReconciliation Update Resolver. + * @summary Update PaymentReconciliation resolver. */ -module.exports.paymentreconciliationUpdateResolver = function paymentreconciliationUpdateResolver( +module.exports.updatePaymentReconciliation = function updatePaymentReconciliation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationDeleteResolver + * @name exports.removePaymentReconciliation * @static - * @summary PaymentReconciliation Delete Resolver. + * @summary Remove PaymentReconciliation resolver. */ -module.exports.paymentreconciliationDeleteResolver = function paymentreconciliationDeleteResolver( +module.exports.removePaymentReconciliation = function removePaymentReconciliation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/person/mutation.js b/src/resources/1_0_2/profiles/person/mutation.js index d9434ac6..0f6cedbd 100644 --- a/src/resources/1_0_2/profiles/person/mutation.js +++ b/src/resources/1_0_2/profiles/person/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PersonSchema = require('../../schemas/person.schema'); +const PersonSchema = require('../../schemas/person.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PersonInput = require('../../inputs/person.input'); +const PersonInput = require('../../inputs/person.input.js'); -// Resolvers -const { - personCreateResolver, - personUpdateResolver, - personDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createPerson, updatePerson, removePerson } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Person', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Person record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Person record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.PersonCreateMutation - * @summary PersonCreate Mutation. + * @summary PersonCreate mutation. */ module.exports.PersonCreateMutation = { - args: WriteArgs, - description: 'Create a Person', - resolve: scopeInvariant(scopeOptions, personCreateResolver), + description: 'Create a Person record', + resolve: scopeInvariant(scopeOptions, createPerson), type: PersonSchema, + args: WriteArgs, }; /** * @name exports.PersonUpdateMutation - * @summary PersonUpdate Mutation. + * @summary PersonUpdate mutation. */ module.exports.PersonUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Persons', - resolve: scopeInvariant(scopeOptions, personUpdateResolver), + description: 'Update a Person record', + resolve: scopeInvariant(scopeOptions, updatePerson), type: PersonSchema, + args: WriteArgs, }; /** - * @name exports.PersonDeleteMutation - * @summary PersonDelete Mutation. + * @name exports.PersonRemoveMutation + * @summary PersonRemove mutation. */ -module.exports.PersonDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Person', - resolve: scopeInvariant(scopeOptions, personDeleteResolver), +module.exports.PersonRemoveMutation = { + description: 'Remove a Person record', + resolve: scopeInvariant(scopeOptions, removePerson), type: PersonSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/person/query.js b/src/resources/1_0_2/profiles/person/query.js index 7b365a10..2c4c1ff6 100644 --- a/src/resources/1_0_2/profiles/person/query.js +++ b/src/resources/1_0_2/profiles/person/query.js @@ -1,55 +1,55 @@ // Schemas -const PersonSchema = require('../../schemas/person.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PersonSchema = require('../../schemas/person.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PersonArgs = require('../../parameters/person.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PersonArgs = require('../../parameters/person.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, PersonArgs); // Resolvers -const { - personResolver, - personListResolver, - personInstanceResolver, -} = require('./resolver'); +const { getPerson, getPersonList, getPersonInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Person', action: 'read', - version: '1_0_2', }; /** * @name exports.PersonQuery - * @summary Person Query. + * @summary Person query. */ module.exports.PersonQuery = { - args: Object.assign({}, CommonArgs, PersonArgs), description: 'Query for a single Person', - resolve: scopeInvariant(scopeOptions, personResolver), + resolve: scopeInvariant(scopeOptions, getPerson), type: PersonSchema, + args: args, }; /** * @name exports.PersonListQuery - * @summary PersonList Query. + * @summary Person query. */ module.exports.PersonListQuery = { - args: Object.assign({}, CommonArgs, PersonArgs), - description: 'Query for multiple Persons', - resolve: scopeInvariant(scopeOptions, personListResolver), + description: 'Query for a more than or just one Person', + resolve: scopeInvariant(scopeOptions, getPersonList), type: BundleSchema, + args: args, }; /** * @name exports.PersonInstanceQuery - * @summary PersonInstance Query. + * @summary Person query. */ module.exports.PersonInstanceQuery = { - description: 'Get information about a single Person', - resolve: scopeInvariant(scopeOptions, personInstanceResolver), + description: 'Access information about a single Person', + resolve: scopeInvariant(scopeOptions, getPersonInstance), type: PersonSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/person/index.js b/src/resources/1_0_2/profiles/person/register.js similarity index 93% rename from src/resources/1_0_2/profiles/person/index.js rename to src/resources/1_0_2/profiles/person/register.js index 273a84b5..2749597c 100644 --- a/src/resources/1_0_2/profiles/person/index.js +++ b/src/resources/1_0_2/profiles/person/register.js @@ -1,15 +1,15 @@ +const { + PersonCreateMutation, + PersonUpdateMutation, + PersonRemoveMutation, +} = require('./mutation'); + const { PersonQuery, PersonListQuery, PersonInstanceQuery, } = require('./query'); -const { - PersonCreateMutation, - PersonUpdateMutation, - PersonDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PersonCreate: PersonCreateMutation, PersonUpdate: PersonUpdateMutation, - PersonDelete: PersonDeleteMutation, + PersonRemove: PersonRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Person', path: '/1_0_2/Person/:id', query: PersonInstanceQuery, diff --git a/src/resources/1_0_2/profiles/person/resolver.js b/src/resources/1_0_2/profiles/person/resolver.js index 442ec0ed..bfba2b56 100644 --- a/src/resources/1_0_2/profiles/person/resolver.js +++ b/src/resources/1_0_2/profiles/person/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.personResolver + * @name exports.getPerson * @static - * @summary Person Resolver. + * @summary Person resolver. */ -module.exports.personResolver = function personResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getPerson = function getPerson(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personListResolver + * @name exports.getPersonList * @static - * @summary Person List Resolver. + * @summary Person list resolver. */ -module.exports.personListResolver = function personListResolver( +module.exports.getPersonList = function getPersonList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personInstanceResolver + * @name exports.getPersonInstance * @static - * @summary Person Instance Resolver. + * @summary Person instance resolver. */ -module.exports.personInstanceResolver = function personInstanceResolver( +module.exports.getPersonInstance = function getPersonInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personCreateResolver + * @name exports.createPerson * @static - * @summary Person Create Resolver. + * @summary Create Person resolver. */ -module.exports.personCreateResolver = function personCreateResolver( +module.exports.createPerson = function createPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personUpdateResolver + * @name exports.updatePerson * @static - * @summary Person Update Resolver. + * @summary Update Person resolver. */ -module.exports.personUpdateResolver = function personUpdateResolver( +module.exports.updatePerson = function updatePerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personDeleteResolver + * @name exports.removePerson * @static - * @summary Person Delete Resolver. + * @summary Remove Person resolver. */ -module.exports.personDeleteResolver = function personDeleteResolver( +module.exports.removePerson = function removePerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/practitioner/mutation.js b/src/resources/1_0_2/profiles/practitioner/mutation.js index 89a124a8..8f7a0280 100644 --- a/src/resources/1_0_2/profiles/practitioner/mutation.js +++ b/src/resources/1_0_2/profiles/practitioner/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PractitionerSchema = require('../../schemas/practitioner.schema'); +const PractitionerSchema = require('../../schemas/practitioner.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PractitionerInput = require('../../inputs/practitioner.input'); +const PractitionerInput = require('../../inputs/practitioner.input.js'); -// Resolvers -const { - practitionerCreateResolver, - practitionerUpdateResolver, - practitionerDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createPractitioner, + updatePractitioner, + removePractitioner, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Practitioner', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Practitioner record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Practitioner record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.PractitionerCreateMutation - * @summary PractitionerCreate Mutation. + * @summary PractitionerCreate mutation. */ module.exports.PractitionerCreateMutation = { - args: WriteArgs, - description: 'Create a Practitioner', - resolve: scopeInvariant(scopeOptions, practitionerCreateResolver), + description: 'Create a Practitioner record', + resolve: scopeInvariant(scopeOptions, createPractitioner), type: PractitionerSchema, + args: WriteArgs, }; /** * @name exports.PractitionerUpdateMutation - * @summary PractitionerUpdate Mutation. + * @summary PractitionerUpdate mutation. */ module.exports.PractitionerUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Practitioners', - resolve: scopeInvariant(scopeOptions, practitionerUpdateResolver), + description: 'Update a Practitioner record', + resolve: scopeInvariant(scopeOptions, updatePractitioner), type: PractitionerSchema, + args: WriteArgs, }; /** - * @name exports.PractitionerDeleteMutation - * @summary PractitionerDelete Mutation. + * @name exports.PractitionerRemoveMutation + * @summary PractitionerRemove mutation. */ -module.exports.PractitionerDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Practitioner', - resolve: scopeInvariant(scopeOptions, practitionerDeleteResolver), +module.exports.PractitionerRemoveMutation = { + description: 'Remove a Practitioner record', + resolve: scopeInvariant(scopeOptions, removePractitioner), type: PractitionerSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/practitioner/query.js b/src/resources/1_0_2/profiles/practitioner/query.js index eddab4ef..5b5ceea0 100644 --- a/src/resources/1_0_2/profiles/practitioner/query.js +++ b/src/resources/1_0_2/profiles/practitioner/query.js @@ -1,55 +1,59 @@ // Schemas -const PractitionerSchema = require('../../schemas/practitioner.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PractitionerSchema = require('../../schemas/practitioner.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PractitionerArgs = require('../../parameters/practitioner.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PractitionerArgs = require('../../parameters/practitioner.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, PractitionerArgs); // Resolvers const { - practitionerResolver, - practitionerListResolver, - practitionerInstanceResolver, + getPractitioner, + getPractitionerList, + getPractitionerInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Practitioner', action: 'read', - version: '1_0_2', }; /** * @name exports.PractitionerQuery - * @summary Practitioner Query. + * @summary Practitioner query. */ module.exports.PractitionerQuery = { - args: Object.assign({}, CommonArgs, PractitionerArgs), description: 'Query for a single Practitioner', - resolve: scopeInvariant(scopeOptions, practitionerResolver), + resolve: scopeInvariant(scopeOptions, getPractitioner), type: PractitionerSchema, + args: args, }; /** * @name exports.PractitionerListQuery - * @summary PractitionerList Query. + * @summary Practitioner query. */ module.exports.PractitionerListQuery = { - args: Object.assign({}, CommonArgs, PractitionerArgs), - description: 'Query for multiple Practitioners', - resolve: scopeInvariant(scopeOptions, practitionerListResolver), + description: 'Query for a more than or just one Practitioner', + resolve: scopeInvariant(scopeOptions, getPractitionerList), type: BundleSchema, + args: args, }; /** * @name exports.PractitionerInstanceQuery - * @summary PractitionerInstance Query. + * @summary Practitioner query. */ module.exports.PractitionerInstanceQuery = { - description: 'Get information about a single Practitioner', - resolve: scopeInvariant(scopeOptions, practitionerInstanceResolver), + description: 'Access information about a single Practitioner', + resolve: scopeInvariant(scopeOptions, getPractitionerInstance), type: PractitionerSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/practitioner/index.js b/src/resources/1_0_2/profiles/practitioner/register.js similarity index 92% rename from src/resources/1_0_2/profiles/practitioner/index.js rename to src/resources/1_0_2/profiles/practitioner/register.js index cb253767..449ae677 100644 --- a/src/resources/1_0_2/profiles/practitioner/index.js +++ b/src/resources/1_0_2/profiles/practitioner/register.js @@ -1,15 +1,15 @@ +const { + PractitionerCreateMutation, + PractitionerUpdateMutation, + PractitionerRemoveMutation, +} = require('./mutation'); + const { PractitionerQuery, PractitionerListQuery, PractitionerInstanceQuery, } = require('./query'); -const { - PractitionerCreateMutation, - PractitionerUpdateMutation, - PractitionerDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PractitionerCreate: PractitionerCreateMutation, PractitionerUpdate: PractitionerUpdateMutation, - PractitionerDelete: PractitionerDeleteMutation, + PractitionerRemove: PractitionerRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Practitioner', path: '/1_0_2/Practitioner/:id', query: PractitionerInstanceQuery, diff --git a/src/resources/1_0_2/profiles/practitioner/resolver.js b/src/resources/1_0_2/profiles/practitioner/resolver.js index 627a5b4a..1f36b115 100644 --- a/src/resources/1_0_2/profiles/practitioner/resolver.js +++ b/src/resources/1_0_2/profiles/practitioner/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.practitionerResolver + * @name exports.getPractitioner * @static - * @summary Practitioner Resolver. + * @summary Practitioner resolver. */ -module.exports.practitionerResolver = function practitionerResolver( +module.exports.getPractitioner = function getPractitioner( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerListResolver + * @name exports.getPractitionerList * @static - * @summary Practitioner List Resolver. + * @summary Practitioner list resolver. */ -module.exports.practitionerListResolver = function practitionerListResolver( +module.exports.getPractitionerList = function getPractitionerList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerInstanceResolver + * @name exports.getPractitionerInstance * @static - * @summary Practitioner Instance Resolver. + * @summary Practitioner instance resolver. */ -module.exports.practitionerInstanceResolver = function practitionerInstanceResolver( +module.exports.getPractitionerInstance = function getPractitionerInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerCreateResolver + * @name exports.createPractitioner * @static - * @summary Practitioner Create Resolver. + * @summary Create Practitioner resolver. */ -module.exports.practitionerCreateResolver = function practitionerCreateResolver( +module.exports.createPractitioner = function createPractitioner( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerUpdateResolver + * @name exports.updatePractitioner * @static - * @summary Practitioner Update Resolver. + * @summary Update Practitioner resolver. */ -module.exports.practitionerUpdateResolver = function practitionerUpdateResolver( +module.exports.updatePractitioner = function updatePractitioner( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerDeleteResolver + * @name exports.removePractitioner * @static - * @summary Practitioner Delete Resolver. + * @summary Remove Practitioner resolver. */ -module.exports.practitionerDeleteResolver = function practitionerDeleteResolver( +module.exports.removePractitioner = function removePractitioner( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/procedure/mutation.js b/src/resources/1_0_2/profiles/procedure/mutation.js index bc07ddbd..48e07d9a 100644 --- a/src/resources/1_0_2/profiles/procedure/mutation.js +++ b/src/resources/1_0_2/profiles/procedure/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProcedureSchema = require('../../schemas/procedure.schema'); +const ProcedureSchema = require('../../schemas/procedure.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProcedureInput = require('../../inputs/procedure.input'); +const ProcedureInput = require('../../inputs/procedure.input.js'); -// Resolvers -const { - procedureCreateResolver, - procedureUpdateResolver, - procedureDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProcedure, + updateProcedure, + removeProcedure, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Procedure', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Procedure record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Procedure record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ProcedureCreateMutation - * @summary ProcedureCreate Mutation. + * @summary ProcedureCreate mutation. */ module.exports.ProcedureCreateMutation = { - args: WriteArgs, - description: 'Create a Procedure', - resolve: scopeInvariant(scopeOptions, procedureCreateResolver), + description: 'Create a Procedure record', + resolve: scopeInvariant(scopeOptions, createProcedure), type: ProcedureSchema, + args: WriteArgs, }; /** * @name exports.ProcedureUpdateMutation - * @summary ProcedureUpdate Mutation. + * @summary ProcedureUpdate mutation. */ module.exports.ProcedureUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Procedures', - resolve: scopeInvariant(scopeOptions, procedureUpdateResolver), + description: 'Update a Procedure record', + resolve: scopeInvariant(scopeOptions, updateProcedure), type: ProcedureSchema, + args: WriteArgs, }; /** - * @name exports.ProcedureDeleteMutation - * @summary ProcedureDelete Mutation. + * @name exports.ProcedureRemoveMutation + * @summary ProcedureRemove mutation. */ -module.exports.ProcedureDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Procedure', - resolve: scopeInvariant(scopeOptions, procedureDeleteResolver), +module.exports.ProcedureRemoveMutation = { + description: 'Remove a Procedure record', + resolve: scopeInvariant(scopeOptions, removeProcedure), type: ProcedureSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/procedure/query.js b/src/resources/1_0_2/profiles/procedure/query.js index cf255e9d..13f58870 100644 --- a/src/resources/1_0_2/profiles/procedure/query.js +++ b/src/resources/1_0_2/profiles/procedure/query.js @@ -1,55 +1,59 @@ // Schemas -const ProcedureSchema = require('../../schemas/procedure.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcedureSchema = require('../../schemas/procedure.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProcedureArgs = require('../../parameters/procedure.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProcedureArgs = require('../../parameters/procedure.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ProcedureArgs); // Resolvers const { - procedureResolver, - procedureListResolver, - procedureInstanceResolver, + getProcedure, + getProcedureList, + getProcedureInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Procedure', action: 'read', - version: '1_0_2', }; /** * @name exports.ProcedureQuery - * @summary Procedure Query. + * @summary Procedure query. */ module.exports.ProcedureQuery = { - args: Object.assign({}, CommonArgs, ProcedureArgs), description: 'Query for a single Procedure', - resolve: scopeInvariant(scopeOptions, procedureResolver), + resolve: scopeInvariant(scopeOptions, getProcedure), type: ProcedureSchema, + args: args, }; /** * @name exports.ProcedureListQuery - * @summary ProcedureList Query. + * @summary Procedure query. */ module.exports.ProcedureListQuery = { - args: Object.assign({}, CommonArgs, ProcedureArgs), - description: 'Query for multiple Procedures', - resolve: scopeInvariant(scopeOptions, procedureListResolver), + description: 'Query for a more than or just one Procedure', + resolve: scopeInvariant(scopeOptions, getProcedureList), type: BundleSchema, + args: args, }; /** * @name exports.ProcedureInstanceQuery - * @summary ProcedureInstance Query. + * @summary Procedure query. */ module.exports.ProcedureInstanceQuery = { - description: 'Get information about a single Procedure', - resolve: scopeInvariant(scopeOptions, procedureInstanceResolver), + description: 'Access information about a single Procedure', + resolve: scopeInvariant(scopeOptions, getProcedureInstance), type: ProcedureSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/procedure/index.js b/src/resources/1_0_2/profiles/procedure/register.js similarity index 92% rename from src/resources/1_0_2/profiles/procedure/index.js rename to src/resources/1_0_2/profiles/procedure/register.js index c99312d7..ec4ace62 100644 --- a/src/resources/1_0_2/profiles/procedure/index.js +++ b/src/resources/1_0_2/profiles/procedure/register.js @@ -1,15 +1,15 @@ +const { + ProcedureCreateMutation, + ProcedureUpdateMutation, + ProcedureRemoveMutation, +} = require('./mutation'); + const { ProcedureQuery, ProcedureListQuery, ProcedureInstanceQuery, } = require('./query'); -const { - ProcedureCreateMutation, - ProcedureUpdateMutation, - ProcedureDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProcedureCreate: ProcedureCreateMutation, ProcedureUpdate: ProcedureUpdateMutation, - ProcedureDelete: ProcedureDeleteMutation, + ProcedureRemove: ProcedureRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Procedure', path: '/1_0_2/Procedure/:id', query: ProcedureInstanceQuery, diff --git a/src/resources/1_0_2/profiles/procedure/resolver.js b/src/resources/1_0_2/profiles/procedure/resolver.js index 0eda09d3..a1340247 100644 --- a/src/resources/1_0_2/profiles/procedure/resolver.js +++ b/src/resources/1_0_2/profiles/procedure/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.procedureResolver + * @name exports.getProcedure * @static - * @summary Procedure Resolver. + * @summary Procedure resolver. */ -module.exports.procedureResolver = function procedureResolver( +module.exports.getProcedure = function getProcedure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureListResolver + * @name exports.getProcedureList * @static - * @summary Procedure List Resolver. + * @summary Procedure list resolver. */ -module.exports.procedureListResolver = function procedureListResolver( +module.exports.getProcedureList = function getProcedureList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureInstanceResolver + * @name exports.getProcedureInstance * @static - * @summary Procedure Instance Resolver. + * @summary Procedure instance resolver. */ -module.exports.procedureInstanceResolver = function procedureInstanceResolver( +module.exports.getProcedureInstance = function getProcedureInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureCreateResolver + * @name exports.createProcedure * @static - * @summary Procedure Create Resolver. + * @summary Create Procedure resolver. */ -module.exports.procedureCreateResolver = function procedureCreateResolver( +module.exports.createProcedure = function createProcedure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureUpdateResolver + * @name exports.updateProcedure * @static - * @summary Procedure Update Resolver. + * @summary Update Procedure resolver. */ -module.exports.procedureUpdateResolver = function procedureUpdateResolver( +module.exports.updateProcedure = function updateProcedure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureDeleteResolver + * @name exports.removeProcedure * @static - * @summary Procedure Delete Resolver. + * @summary Remove Procedure resolver. */ -module.exports.procedureDeleteResolver = function procedureDeleteResolver( +module.exports.removeProcedure = function removeProcedure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/procedurerequest/mutation.js b/src/resources/1_0_2/profiles/procedurerequest/mutation.js index 432b6817..6be4593b 100644 --- a/src/resources/1_0_2/profiles/procedurerequest/mutation.js +++ b/src/resources/1_0_2/profiles/procedurerequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProcedureRequestSchema = require('../../schemas/procedurerequest.schema'); +const ProcedureRequestSchema = require('../../schemas/procedurerequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProcedureRequestInput = require('../../inputs/procedurerequest.input'); +const ProcedureRequestInput = require('../../inputs/procedurerequest.input.js'); -// Resolvers -const { - procedurerequestCreateResolver, - procedurerequestUpdateResolver, - procedurerequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProcedureRequest, + updateProcedureRequest, + removeProcedureRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcedureRequest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ProcedureRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ProcedureRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ProcedureRequestCreateMutation - * @summary ProcedureRequestCreate Mutation. + * @summary ProcedureRequestCreate mutation. */ module.exports.ProcedureRequestCreateMutation = { - args: WriteArgs, - description: 'Create a ProcedureRequest', - resolve: scopeInvariant(scopeOptions, procedurerequestCreateResolver), + description: 'Create a ProcedureRequest record', + resolve: scopeInvariant(scopeOptions, createProcedureRequest), type: ProcedureRequestSchema, + args: WriteArgs, }; /** * @name exports.ProcedureRequestUpdateMutation - * @summary ProcedureRequestUpdate Mutation. + * @summary ProcedureRequestUpdate mutation. */ module.exports.ProcedureRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ProcedureRequests', - resolve: scopeInvariant(scopeOptions, procedurerequestUpdateResolver), + description: 'Update a ProcedureRequest record', + resolve: scopeInvariant(scopeOptions, updateProcedureRequest), type: ProcedureRequestSchema, + args: WriteArgs, }; /** - * @name exports.ProcedureRequestDeleteMutation - * @summary ProcedureRequestDelete Mutation. + * @name exports.ProcedureRequestRemoveMutation + * @summary ProcedureRequestRemove mutation. */ -module.exports.ProcedureRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ProcedureRequest', - resolve: scopeInvariant(scopeOptions, procedurerequestDeleteResolver), +module.exports.ProcedureRequestRemoveMutation = { + description: 'Remove a ProcedureRequest record', + resolve: scopeInvariant(scopeOptions, removeProcedureRequest), type: ProcedureRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/procedurerequest/query.js b/src/resources/1_0_2/profiles/procedurerequest/query.js index abd8447b..4dc73ca6 100644 --- a/src/resources/1_0_2/profiles/procedurerequest/query.js +++ b/src/resources/1_0_2/profiles/procedurerequest/query.js @@ -1,55 +1,59 @@ // Schemas -const ProcedureRequestSchema = require('../../schemas/procedurerequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcedureRequestSchema = require('../../schemas/procedurerequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProcedureRequestArgs = require('../../parameters/procedurerequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProcedureRequestArgs = require('../../parameters/procedurerequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ProcedureRequestArgs); // Resolvers const { - procedurerequestResolver, - procedurerequestListResolver, - procedurerequestInstanceResolver, + getProcedureRequest, + getProcedureRequestList, + getProcedureRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcedureRequest', action: 'read', - version: '1_0_2', }; /** * @name exports.ProcedureRequestQuery - * @summary ProcedureRequest Query. + * @summary ProcedureRequest query. */ module.exports.ProcedureRequestQuery = { - args: Object.assign({}, CommonArgs, ProcedureRequestArgs), description: 'Query for a single ProcedureRequest', - resolve: scopeInvariant(scopeOptions, procedurerequestResolver), + resolve: scopeInvariant(scopeOptions, getProcedureRequest), type: ProcedureRequestSchema, + args: args, }; /** * @name exports.ProcedureRequestListQuery - * @summary ProcedureRequestList Query. + * @summary ProcedureRequest query. */ module.exports.ProcedureRequestListQuery = { - args: Object.assign({}, CommonArgs, ProcedureRequestArgs), - description: 'Query for multiple ProcedureRequests', - resolve: scopeInvariant(scopeOptions, procedurerequestListResolver), + description: 'Query for a more than or just one ProcedureRequest', + resolve: scopeInvariant(scopeOptions, getProcedureRequestList), type: BundleSchema, + args: args, }; /** * @name exports.ProcedureRequestInstanceQuery - * @summary ProcedureRequestInstance Query. + * @summary ProcedureRequest query. */ module.exports.ProcedureRequestInstanceQuery = { - description: 'Get information about a single ProcedureRequest', - resolve: scopeInvariant(scopeOptions, procedurerequestInstanceResolver), + description: 'Access information about a single ProcedureRequest', + resolve: scopeInvariant(scopeOptions, getProcedureRequestInstance), type: ProcedureRequestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/procedurerequest/index.js b/src/resources/1_0_2/profiles/procedurerequest/register.js similarity index 91% rename from src/resources/1_0_2/profiles/procedurerequest/index.js rename to src/resources/1_0_2/profiles/procedurerequest/register.js index 33a548d2..874dce01 100644 --- a/src/resources/1_0_2/profiles/procedurerequest/index.js +++ b/src/resources/1_0_2/profiles/procedurerequest/register.js @@ -1,15 +1,15 @@ +const { + ProcedureRequestCreateMutation, + ProcedureRequestUpdateMutation, + ProcedureRequestRemoveMutation, +} = require('./mutation'); + const { ProcedureRequestQuery, ProcedureRequestListQuery, ProcedureRequestInstanceQuery, } = require('./query'); -const { - ProcedureRequestCreateMutation, - ProcedureRequestUpdateMutation, - ProcedureRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProcedureRequestCreate: ProcedureRequestCreateMutation, ProcedureRequestUpdate: ProcedureRequestUpdateMutation, - ProcedureRequestDelete: ProcedureRequestDeleteMutation, + ProcedureRequestRemove: ProcedureRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ProcedureRequest', path: '/1_0_2/ProcedureRequest/:id', query: ProcedureRequestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/procedurerequest/resolver.js b/src/resources/1_0_2/profiles/procedurerequest/resolver.js index f50b6027..596dad53 100644 --- a/src/resources/1_0_2/profiles/procedurerequest/resolver.js +++ b/src/resources/1_0_2/profiles/procedurerequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.procedurerequestResolver + * @name exports.getProcedureRequest * @static - * @summary ProcedureRequest Resolver. + * @summary ProcedureRequest resolver. */ -module.exports.procedurerequestResolver = function procedurerequestResolver( +module.exports.getProcedureRequest = function getProcedureRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestListResolver + * @name exports.getProcedureRequestList * @static - * @summary ProcedureRequest List Resolver. + * @summary ProcedureRequest list resolver. */ -module.exports.procedurerequestListResolver = function procedurerequestListResolver( +module.exports.getProcedureRequestList = function getProcedureRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestInstanceResolver + * @name exports.getProcedureRequestInstance * @static - * @summary ProcedureRequest Instance Resolver. + * @summary ProcedureRequest instance resolver. */ -module.exports.procedurerequestInstanceResolver = function procedurerequestInstanceResolver( +module.exports.getProcedureRequestInstance = function getProcedureRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestCreateResolver + * @name exports.createProcedureRequest * @static - * @summary ProcedureRequest Create Resolver. + * @summary Create ProcedureRequest resolver. */ -module.exports.procedurerequestCreateResolver = function procedurerequestCreateResolver( +module.exports.createProcedureRequest = function createProcedureRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestUpdateResolver + * @name exports.updateProcedureRequest * @static - * @summary ProcedureRequest Update Resolver. + * @summary Update ProcedureRequest resolver. */ -module.exports.procedurerequestUpdateResolver = function procedurerequestUpdateResolver( +module.exports.updateProcedureRequest = function updateProcedureRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestDeleteResolver + * @name exports.removeProcedureRequest * @static - * @summary ProcedureRequest Delete Resolver. + * @summary Remove ProcedureRequest resolver. */ -module.exports.procedurerequestDeleteResolver = function procedurerequestDeleteResolver( +module.exports.removeProcedureRequest = function removeProcedureRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/processrequest/mutation.js b/src/resources/1_0_2/profiles/processrequest/mutation.js index 3c123897..989ba8fa 100644 --- a/src/resources/1_0_2/profiles/processrequest/mutation.js +++ b/src/resources/1_0_2/profiles/processrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProcessRequestSchema = require('../../schemas/processrequest.schema'); +const ProcessRequestSchema = require('../../schemas/processrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProcessRequestInput = require('../../inputs/processrequest.input'); +const ProcessRequestInput = require('../../inputs/processrequest.input.js'); -// Resolvers -const { - processrequestCreateResolver, - processrequestUpdateResolver, - processrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProcessRequest, + updateProcessRequest, + removeProcessRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcessRequest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ProcessRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ProcessRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ProcessRequestCreateMutation - * @summary ProcessRequestCreate Mutation. + * @summary ProcessRequestCreate mutation. */ module.exports.ProcessRequestCreateMutation = { - args: WriteArgs, - description: 'Create a ProcessRequest', - resolve: scopeInvariant(scopeOptions, processrequestCreateResolver), + description: 'Create a ProcessRequest record', + resolve: scopeInvariant(scopeOptions, createProcessRequest), type: ProcessRequestSchema, + args: WriteArgs, }; /** * @name exports.ProcessRequestUpdateMutation - * @summary ProcessRequestUpdate Mutation. + * @summary ProcessRequestUpdate mutation. */ module.exports.ProcessRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ProcessRequests', - resolve: scopeInvariant(scopeOptions, processrequestUpdateResolver), + description: 'Update a ProcessRequest record', + resolve: scopeInvariant(scopeOptions, updateProcessRequest), type: ProcessRequestSchema, + args: WriteArgs, }; /** - * @name exports.ProcessRequestDeleteMutation - * @summary ProcessRequestDelete Mutation. + * @name exports.ProcessRequestRemoveMutation + * @summary ProcessRequestRemove mutation. */ -module.exports.ProcessRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ProcessRequest', - resolve: scopeInvariant(scopeOptions, processrequestDeleteResolver), +module.exports.ProcessRequestRemoveMutation = { + description: 'Remove a ProcessRequest record', + resolve: scopeInvariant(scopeOptions, removeProcessRequest), type: ProcessRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/processrequest/query.js b/src/resources/1_0_2/profiles/processrequest/query.js index 4f9c1ac4..de2d4059 100644 --- a/src/resources/1_0_2/profiles/processrequest/query.js +++ b/src/resources/1_0_2/profiles/processrequest/query.js @@ -1,55 +1,59 @@ // Schemas -const ProcessRequestSchema = require('../../schemas/processrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcessRequestSchema = require('../../schemas/processrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProcessRequestArgs = require('../../parameters/processrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProcessRequestArgs = require('../../parameters/processrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ProcessRequestArgs); // Resolvers const { - processrequestResolver, - processrequestListResolver, - processrequestInstanceResolver, + getProcessRequest, + getProcessRequestList, + getProcessRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcessRequest', action: 'read', - version: '1_0_2', }; /** * @name exports.ProcessRequestQuery - * @summary ProcessRequest Query. + * @summary ProcessRequest query. */ module.exports.ProcessRequestQuery = { - args: Object.assign({}, CommonArgs, ProcessRequestArgs), description: 'Query for a single ProcessRequest', - resolve: scopeInvariant(scopeOptions, processrequestResolver), + resolve: scopeInvariant(scopeOptions, getProcessRequest), type: ProcessRequestSchema, + args: args, }; /** * @name exports.ProcessRequestListQuery - * @summary ProcessRequestList Query. + * @summary ProcessRequest query. */ module.exports.ProcessRequestListQuery = { - args: Object.assign({}, CommonArgs, ProcessRequestArgs), - description: 'Query for multiple ProcessRequests', - resolve: scopeInvariant(scopeOptions, processrequestListResolver), + description: 'Query for a more than or just one ProcessRequest', + resolve: scopeInvariant(scopeOptions, getProcessRequestList), type: BundleSchema, + args: args, }; /** * @name exports.ProcessRequestInstanceQuery - * @summary ProcessRequestInstance Query. + * @summary ProcessRequest query. */ module.exports.ProcessRequestInstanceQuery = { - description: 'Get information about a single ProcessRequest', - resolve: scopeInvariant(scopeOptions, processrequestInstanceResolver), + description: 'Access information about a single ProcessRequest', + resolve: scopeInvariant(scopeOptions, getProcessRequestInstance), type: ProcessRequestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/processrequest/index.js b/src/resources/1_0_2/profiles/processrequest/register.js similarity index 92% rename from src/resources/1_0_2/profiles/processrequest/index.js rename to src/resources/1_0_2/profiles/processrequest/register.js index 1868d648..a96b01ba 100644 --- a/src/resources/1_0_2/profiles/processrequest/index.js +++ b/src/resources/1_0_2/profiles/processrequest/register.js @@ -1,15 +1,15 @@ +const { + ProcessRequestCreateMutation, + ProcessRequestUpdateMutation, + ProcessRequestRemoveMutation, +} = require('./mutation'); + const { ProcessRequestQuery, ProcessRequestListQuery, ProcessRequestInstanceQuery, } = require('./query'); -const { - ProcessRequestCreateMutation, - ProcessRequestUpdateMutation, - ProcessRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProcessRequestCreate: ProcessRequestCreateMutation, ProcessRequestUpdate: ProcessRequestUpdateMutation, - ProcessRequestDelete: ProcessRequestDeleteMutation, + ProcessRequestRemove: ProcessRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ProcessRequest', path: '/1_0_2/ProcessRequest/:id', query: ProcessRequestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/processrequest/resolver.js b/src/resources/1_0_2/profiles/processrequest/resolver.js index 8f63e290..d044a15d 100644 --- a/src/resources/1_0_2/profiles/processrequest/resolver.js +++ b/src/resources/1_0_2/profiles/processrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.processrequestResolver + * @name exports.getProcessRequest * @static - * @summary ProcessRequest Resolver. + * @summary ProcessRequest resolver. */ -module.exports.processrequestResolver = function processrequestResolver( +module.exports.getProcessRequest = function getProcessRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestListResolver + * @name exports.getProcessRequestList * @static - * @summary ProcessRequest List Resolver. + * @summary ProcessRequest list resolver. */ -module.exports.processrequestListResolver = function processrequestListResolver( +module.exports.getProcessRequestList = function getProcessRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestInstanceResolver + * @name exports.getProcessRequestInstance * @static - * @summary ProcessRequest Instance Resolver. + * @summary ProcessRequest instance resolver. */ -module.exports.processrequestInstanceResolver = function processrequestInstanceResolver( +module.exports.getProcessRequestInstance = function getProcessRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestCreateResolver + * @name exports.createProcessRequest * @static - * @summary ProcessRequest Create Resolver. + * @summary Create ProcessRequest resolver. */ -module.exports.processrequestCreateResolver = function processrequestCreateResolver( +module.exports.createProcessRequest = function createProcessRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestUpdateResolver + * @name exports.updateProcessRequest * @static - * @summary ProcessRequest Update Resolver. + * @summary Update ProcessRequest resolver. */ -module.exports.processrequestUpdateResolver = function processrequestUpdateResolver( +module.exports.updateProcessRequest = function updateProcessRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestDeleteResolver + * @name exports.removeProcessRequest * @static - * @summary ProcessRequest Delete Resolver. + * @summary Remove ProcessRequest resolver. */ -module.exports.processrequestDeleteResolver = function processrequestDeleteResolver( +module.exports.removeProcessRequest = function removeProcessRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/processresponse/mutation.js b/src/resources/1_0_2/profiles/processresponse/mutation.js index c05387ba..427c2f93 100644 --- a/src/resources/1_0_2/profiles/processresponse/mutation.js +++ b/src/resources/1_0_2/profiles/processresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProcessResponseSchema = require('../../schemas/processresponse.schema'); +const ProcessResponseSchema = require('../../schemas/processresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProcessResponseInput = require('../../inputs/processresponse.input'); +const ProcessResponseInput = require('../../inputs/processresponse.input.js'); -// Resolvers -const { - processresponseCreateResolver, - processresponseUpdateResolver, - processresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProcessResponse, + updateProcessResponse, + removeProcessResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcessResponse', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ProcessResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ProcessResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ProcessResponseCreateMutation - * @summary ProcessResponseCreate Mutation. + * @summary ProcessResponseCreate mutation. */ module.exports.ProcessResponseCreateMutation = { - args: WriteArgs, - description: 'Create a ProcessResponse', - resolve: scopeInvariant(scopeOptions, processresponseCreateResolver), + description: 'Create a ProcessResponse record', + resolve: scopeInvariant(scopeOptions, createProcessResponse), type: ProcessResponseSchema, + args: WriteArgs, }; /** * @name exports.ProcessResponseUpdateMutation - * @summary ProcessResponseUpdate Mutation. + * @summary ProcessResponseUpdate mutation. */ module.exports.ProcessResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ProcessResponses', - resolve: scopeInvariant(scopeOptions, processresponseUpdateResolver), + description: 'Update a ProcessResponse record', + resolve: scopeInvariant(scopeOptions, updateProcessResponse), type: ProcessResponseSchema, + args: WriteArgs, }; /** - * @name exports.ProcessResponseDeleteMutation - * @summary ProcessResponseDelete Mutation. + * @name exports.ProcessResponseRemoveMutation + * @summary ProcessResponseRemove mutation. */ -module.exports.ProcessResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ProcessResponse', - resolve: scopeInvariant(scopeOptions, processresponseDeleteResolver), +module.exports.ProcessResponseRemoveMutation = { + description: 'Remove a ProcessResponse record', + resolve: scopeInvariant(scopeOptions, removeProcessResponse), type: ProcessResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/processresponse/query.js b/src/resources/1_0_2/profiles/processresponse/query.js index 2a7fd232..052f4da8 100644 --- a/src/resources/1_0_2/profiles/processresponse/query.js +++ b/src/resources/1_0_2/profiles/processresponse/query.js @@ -1,55 +1,59 @@ // Schemas -const ProcessResponseSchema = require('../../schemas/processresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcessResponseSchema = require('../../schemas/processresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProcessResponseArgs = require('../../parameters/processresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProcessResponseArgs = require('../../parameters/processresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ProcessResponseArgs); // Resolvers const { - processresponseResolver, - processresponseListResolver, - processresponseInstanceResolver, + getProcessResponse, + getProcessResponseList, + getProcessResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcessResponse', action: 'read', - version: '1_0_2', }; /** * @name exports.ProcessResponseQuery - * @summary ProcessResponse Query. + * @summary ProcessResponse query. */ module.exports.ProcessResponseQuery = { - args: Object.assign({}, CommonArgs, ProcessResponseArgs), description: 'Query for a single ProcessResponse', - resolve: scopeInvariant(scopeOptions, processresponseResolver), + resolve: scopeInvariant(scopeOptions, getProcessResponse), type: ProcessResponseSchema, + args: args, }; /** * @name exports.ProcessResponseListQuery - * @summary ProcessResponseList Query. + * @summary ProcessResponse query. */ module.exports.ProcessResponseListQuery = { - args: Object.assign({}, CommonArgs, ProcessResponseArgs), - description: 'Query for multiple ProcessResponses', - resolve: scopeInvariant(scopeOptions, processresponseListResolver), + description: 'Query for a more than or just one ProcessResponse', + resolve: scopeInvariant(scopeOptions, getProcessResponseList), type: BundleSchema, + args: args, }; /** * @name exports.ProcessResponseInstanceQuery - * @summary ProcessResponseInstance Query. + * @summary ProcessResponse query. */ module.exports.ProcessResponseInstanceQuery = { - description: 'Get information about a single ProcessResponse', - resolve: scopeInvariant(scopeOptions, processresponseInstanceResolver), + description: 'Access information about a single ProcessResponse', + resolve: scopeInvariant(scopeOptions, getProcessResponseInstance), type: ProcessResponseSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/processresponse/index.js b/src/resources/1_0_2/profiles/processresponse/register.js similarity index 91% rename from src/resources/1_0_2/profiles/processresponse/index.js rename to src/resources/1_0_2/profiles/processresponse/register.js index 1b841664..079ce53e 100644 --- a/src/resources/1_0_2/profiles/processresponse/index.js +++ b/src/resources/1_0_2/profiles/processresponse/register.js @@ -1,15 +1,15 @@ +const { + ProcessResponseCreateMutation, + ProcessResponseUpdateMutation, + ProcessResponseRemoveMutation, +} = require('./mutation'); + const { ProcessResponseQuery, ProcessResponseListQuery, ProcessResponseInstanceQuery, } = require('./query'); -const { - ProcessResponseCreateMutation, - ProcessResponseUpdateMutation, - ProcessResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProcessResponseCreate: ProcessResponseCreateMutation, ProcessResponseUpdate: ProcessResponseUpdateMutation, - ProcessResponseDelete: ProcessResponseDeleteMutation, + ProcessResponseRemove: ProcessResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ProcessResponse', path: '/1_0_2/ProcessResponse/:id', query: ProcessResponseInstanceQuery, diff --git a/src/resources/1_0_2/profiles/processresponse/resolver.js b/src/resources/1_0_2/profiles/processresponse/resolver.js index b598c4db..1cdf7dc3 100644 --- a/src/resources/1_0_2/profiles/processresponse/resolver.js +++ b/src/resources/1_0_2/profiles/processresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.processresponseResolver + * @name exports.getProcessResponse * @static - * @summary ProcessResponse Resolver. + * @summary ProcessResponse resolver. */ -module.exports.processresponseResolver = function processresponseResolver( +module.exports.getProcessResponse = function getProcessResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseListResolver + * @name exports.getProcessResponseList * @static - * @summary ProcessResponse List Resolver. + * @summary ProcessResponse list resolver. */ -module.exports.processresponseListResolver = function processresponseListResolver( +module.exports.getProcessResponseList = function getProcessResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseInstanceResolver + * @name exports.getProcessResponseInstance * @static - * @summary ProcessResponse Instance Resolver. + * @summary ProcessResponse instance resolver. */ -module.exports.processresponseInstanceResolver = function processresponseInstanceResolver( +module.exports.getProcessResponseInstance = function getProcessResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseCreateResolver + * @name exports.createProcessResponse * @static - * @summary ProcessResponse Create Resolver. + * @summary Create ProcessResponse resolver. */ -module.exports.processresponseCreateResolver = function processresponseCreateResolver( +module.exports.createProcessResponse = function createProcessResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseUpdateResolver + * @name exports.updateProcessResponse * @static - * @summary ProcessResponse Update Resolver. + * @summary Update ProcessResponse resolver. */ -module.exports.processresponseUpdateResolver = function processresponseUpdateResolver( +module.exports.updateProcessResponse = function updateProcessResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseDeleteResolver + * @name exports.removeProcessResponse * @static - * @summary ProcessResponse Delete Resolver. + * @summary Remove ProcessResponse resolver. */ -module.exports.processresponseDeleteResolver = function processresponseDeleteResolver( +module.exports.removeProcessResponse = function removeProcessResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/provenance/mutation.js b/src/resources/1_0_2/profiles/provenance/mutation.js index 7d0ff522..781969d8 100644 --- a/src/resources/1_0_2/profiles/provenance/mutation.js +++ b/src/resources/1_0_2/profiles/provenance/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProvenanceSchema = require('../../schemas/provenance.schema'); +const ProvenanceSchema = require('../../schemas/provenance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProvenanceInput = require('../../inputs/provenance.input'); +const ProvenanceInput = require('../../inputs/provenance.input.js'); -// Resolvers -const { - provenanceCreateResolver, - provenanceUpdateResolver, - provenanceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProvenance, + updateProvenance, + removeProvenance, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Provenance', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Provenance record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Provenance record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ProvenanceCreateMutation - * @summary ProvenanceCreate Mutation. + * @summary ProvenanceCreate mutation. */ module.exports.ProvenanceCreateMutation = { - args: WriteArgs, - description: 'Create a Provenance', - resolve: scopeInvariant(scopeOptions, provenanceCreateResolver), + description: 'Create a Provenance record', + resolve: scopeInvariant(scopeOptions, createProvenance), type: ProvenanceSchema, + args: WriteArgs, }; /** * @name exports.ProvenanceUpdateMutation - * @summary ProvenanceUpdate Mutation. + * @summary ProvenanceUpdate mutation. */ module.exports.ProvenanceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Provenances', - resolve: scopeInvariant(scopeOptions, provenanceUpdateResolver), + description: 'Update a Provenance record', + resolve: scopeInvariant(scopeOptions, updateProvenance), type: ProvenanceSchema, + args: WriteArgs, }; /** - * @name exports.ProvenanceDeleteMutation - * @summary ProvenanceDelete Mutation. + * @name exports.ProvenanceRemoveMutation + * @summary ProvenanceRemove mutation. */ -module.exports.ProvenanceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Provenance', - resolve: scopeInvariant(scopeOptions, provenanceDeleteResolver), +module.exports.ProvenanceRemoveMutation = { + description: 'Remove a Provenance record', + resolve: scopeInvariant(scopeOptions, removeProvenance), type: ProvenanceSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/provenance/query.js b/src/resources/1_0_2/profiles/provenance/query.js index 023e2139..53467ae9 100644 --- a/src/resources/1_0_2/profiles/provenance/query.js +++ b/src/resources/1_0_2/profiles/provenance/query.js @@ -1,55 +1,59 @@ // Schemas -const ProvenanceSchema = require('../../schemas/provenance.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProvenanceSchema = require('../../schemas/provenance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProvenanceArgs = require('../../parameters/provenance.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProvenanceArgs = require('../../parameters/provenance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ProvenanceArgs); // Resolvers const { - provenanceResolver, - provenanceListResolver, - provenanceInstanceResolver, + getProvenance, + getProvenanceList, + getProvenanceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Provenance', action: 'read', - version: '1_0_2', }; /** * @name exports.ProvenanceQuery - * @summary Provenance Query. + * @summary Provenance query. */ module.exports.ProvenanceQuery = { - args: Object.assign({}, CommonArgs, ProvenanceArgs), description: 'Query for a single Provenance', - resolve: scopeInvariant(scopeOptions, provenanceResolver), + resolve: scopeInvariant(scopeOptions, getProvenance), type: ProvenanceSchema, + args: args, }; /** * @name exports.ProvenanceListQuery - * @summary ProvenanceList Query. + * @summary Provenance query. */ module.exports.ProvenanceListQuery = { - args: Object.assign({}, CommonArgs, ProvenanceArgs), - description: 'Query for multiple Provenances', - resolve: scopeInvariant(scopeOptions, provenanceListResolver), + description: 'Query for a more than or just one Provenance', + resolve: scopeInvariant(scopeOptions, getProvenanceList), type: BundleSchema, + args: args, }; /** * @name exports.ProvenanceInstanceQuery - * @summary ProvenanceInstance Query. + * @summary Provenance query. */ module.exports.ProvenanceInstanceQuery = { - description: 'Get information about a single Provenance', - resolve: scopeInvariant(scopeOptions, provenanceInstanceResolver), + description: 'Access information about a single Provenance', + resolve: scopeInvariant(scopeOptions, getProvenanceInstance), type: ProvenanceSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/provenance/index.js b/src/resources/1_0_2/profiles/provenance/register.js similarity index 92% rename from src/resources/1_0_2/profiles/provenance/index.js rename to src/resources/1_0_2/profiles/provenance/register.js index 87a69430..caea382b 100644 --- a/src/resources/1_0_2/profiles/provenance/index.js +++ b/src/resources/1_0_2/profiles/provenance/register.js @@ -1,15 +1,15 @@ +const { + ProvenanceCreateMutation, + ProvenanceUpdateMutation, + ProvenanceRemoveMutation, +} = require('./mutation'); + const { ProvenanceQuery, ProvenanceListQuery, ProvenanceInstanceQuery, } = require('./query'); -const { - ProvenanceCreateMutation, - ProvenanceUpdateMutation, - ProvenanceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProvenanceCreate: ProvenanceCreateMutation, ProvenanceUpdate: ProvenanceUpdateMutation, - ProvenanceDelete: ProvenanceDeleteMutation, + ProvenanceRemove: ProvenanceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Provenance', path: '/1_0_2/Provenance/:id', query: ProvenanceInstanceQuery, diff --git a/src/resources/1_0_2/profiles/provenance/resolver.js b/src/resources/1_0_2/profiles/provenance/resolver.js index 141a53c9..5359714e 100644 --- a/src/resources/1_0_2/profiles/provenance/resolver.js +++ b/src/resources/1_0_2/profiles/provenance/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.provenanceResolver + * @name exports.getProvenance * @static - * @summary Provenance Resolver. + * @summary Provenance resolver. */ -module.exports.provenanceResolver = function provenanceResolver( +module.exports.getProvenance = function getProvenance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceListResolver + * @name exports.getProvenanceList * @static - * @summary Provenance List Resolver. + * @summary Provenance list resolver. */ -module.exports.provenanceListResolver = function provenanceListResolver( +module.exports.getProvenanceList = function getProvenanceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceInstanceResolver + * @name exports.getProvenanceInstance * @static - * @summary Provenance Instance Resolver. + * @summary Provenance instance resolver. */ -module.exports.provenanceInstanceResolver = function provenanceInstanceResolver( +module.exports.getProvenanceInstance = function getProvenanceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceCreateResolver + * @name exports.createProvenance * @static - * @summary Provenance Create Resolver. + * @summary Create Provenance resolver. */ -module.exports.provenanceCreateResolver = function provenanceCreateResolver( +module.exports.createProvenance = function createProvenance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceUpdateResolver + * @name exports.updateProvenance * @static - * @summary Provenance Update Resolver. + * @summary Update Provenance resolver. */ -module.exports.provenanceUpdateResolver = function provenanceUpdateResolver( +module.exports.updateProvenance = function updateProvenance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceDeleteResolver + * @name exports.removeProvenance * @static - * @summary Provenance Delete Resolver. + * @summary Remove Provenance resolver. */ -module.exports.provenanceDeleteResolver = function provenanceDeleteResolver( +module.exports.removeProvenance = function removeProvenance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/questionnaire/mutation.js b/src/resources/1_0_2/profiles/questionnaire/mutation.js index 9501806e..abbb5966 100644 --- a/src/resources/1_0_2/profiles/questionnaire/mutation.js +++ b/src/resources/1_0_2/profiles/questionnaire/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const QuestionnaireSchema = require('../../schemas/questionnaire.schema'); +const QuestionnaireSchema = require('../../schemas/questionnaire.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const QuestionnaireInput = require('../../inputs/questionnaire.input'); +const QuestionnaireInput = require('../../inputs/questionnaire.input.js'); -// Resolvers -const { - questionnaireCreateResolver, - questionnaireUpdateResolver, - questionnaireDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createQuestionnaire, + updateQuestionnaire, + removeQuestionnaire, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Questionnaire', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Questionnaire record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Questionnaire record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.QuestionnaireCreateMutation - * @summary QuestionnaireCreate Mutation. + * @summary QuestionnaireCreate mutation. */ module.exports.QuestionnaireCreateMutation = { - args: WriteArgs, - description: 'Create a Questionnaire', - resolve: scopeInvariant(scopeOptions, questionnaireCreateResolver), + description: 'Create a Questionnaire record', + resolve: scopeInvariant(scopeOptions, createQuestionnaire), type: QuestionnaireSchema, + args: WriteArgs, }; /** * @name exports.QuestionnaireUpdateMutation - * @summary QuestionnaireUpdate Mutation. + * @summary QuestionnaireUpdate mutation. */ module.exports.QuestionnaireUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Questionnaires', - resolve: scopeInvariant(scopeOptions, questionnaireUpdateResolver), + description: 'Update a Questionnaire record', + resolve: scopeInvariant(scopeOptions, updateQuestionnaire), type: QuestionnaireSchema, + args: WriteArgs, }; /** - * @name exports.QuestionnaireDeleteMutation - * @summary QuestionnaireDelete Mutation. + * @name exports.QuestionnaireRemoveMutation + * @summary QuestionnaireRemove mutation. */ -module.exports.QuestionnaireDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Questionnaire', - resolve: scopeInvariant(scopeOptions, questionnaireDeleteResolver), +module.exports.QuestionnaireRemoveMutation = { + description: 'Remove a Questionnaire record', + resolve: scopeInvariant(scopeOptions, removeQuestionnaire), type: QuestionnaireSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/questionnaire/query.js b/src/resources/1_0_2/profiles/questionnaire/query.js index 3c89f3fd..e374d4e9 100644 --- a/src/resources/1_0_2/profiles/questionnaire/query.js +++ b/src/resources/1_0_2/profiles/questionnaire/query.js @@ -1,55 +1,59 @@ // Schemas -const QuestionnaireSchema = require('../../schemas/questionnaire.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const QuestionnaireSchema = require('../../schemas/questionnaire.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const QuestionnaireArgs = require('../../parameters/questionnaire.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const QuestionnaireArgs = require('../../parameters/questionnaire.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, QuestionnaireArgs); // Resolvers const { - questionnaireResolver, - questionnaireListResolver, - questionnaireInstanceResolver, + getQuestionnaire, + getQuestionnaireList, + getQuestionnaireInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Questionnaire', action: 'read', - version: '1_0_2', }; /** * @name exports.QuestionnaireQuery - * @summary Questionnaire Query. + * @summary Questionnaire query. */ module.exports.QuestionnaireQuery = { - args: Object.assign({}, CommonArgs, QuestionnaireArgs), description: 'Query for a single Questionnaire', - resolve: scopeInvariant(scopeOptions, questionnaireResolver), + resolve: scopeInvariant(scopeOptions, getQuestionnaire), type: QuestionnaireSchema, + args: args, }; /** * @name exports.QuestionnaireListQuery - * @summary QuestionnaireList Query. + * @summary Questionnaire query. */ module.exports.QuestionnaireListQuery = { - args: Object.assign({}, CommonArgs, QuestionnaireArgs), - description: 'Query for multiple Questionnaires', - resolve: scopeInvariant(scopeOptions, questionnaireListResolver), + description: 'Query for a more than or just one Questionnaire', + resolve: scopeInvariant(scopeOptions, getQuestionnaireList), type: BundleSchema, + args: args, }; /** * @name exports.QuestionnaireInstanceQuery - * @summary QuestionnaireInstance Query. + * @summary Questionnaire query. */ module.exports.QuestionnaireInstanceQuery = { - description: 'Get information about a single Questionnaire', - resolve: scopeInvariant(scopeOptions, questionnaireInstanceResolver), + description: 'Access information about a single Questionnaire', + resolve: scopeInvariant(scopeOptions, getQuestionnaireInstance), type: QuestionnaireSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/questionnaire/index.js b/src/resources/1_0_2/profiles/questionnaire/register.js similarity index 92% rename from src/resources/1_0_2/profiles/questionnaire/index.js rename to src/resources/1_0_2/profiles/questionnaire/register.js index a30a5f7e..c13c13ef 100644 --- a/src/resources/1_0_2/profiles/questionnaire/index.js +++ b/src/resources/1_0_2/profiles/questionnaire/register.js @@ -1,15 +1,15 @@ +const { + QuestionnaireCreateMutation, + QuestionnaireUpdateMutation, + QuestionnaireRemoveMutation, +} = require('./mutation'); + const { QuestionnaireQuery, QuestionnaireListQuery, QuestionnaireInstanceQuery, } = require('./query'); -const { - QuestionnaireCreateMutation, - QuestionnaireUpdateMutation, - QuestionnaireDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { QuestionnaireCreate: QuestionnaireCreateMutation, QuestionnaireUpdate: QuestionnaireUpdateMutation, - QuestionnaireDelete: QuestionnaireDeleteMutation, + QuestionnaireRemove: QuestionnaireRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Questionnaire', path: '/1_0_2/Questionnaire/:id', query: QuestionnaireInstanceQuery, diff --git a/src/resources/1_0_2/profiles/questionnaire/resolver.js b/src/resources/1_0_2/profiles/questionnaire/resolver.js index 26eff2bd..f3ecab16 100644 --- a/src/resources/1_0_2/profiles/questionnaire/resolver.js +++ b/src/resources/1_0_2/profiles/questionnaire/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.questionnaireResolver + * @name exports.getQuestionnaire * @static - * @summary Questionnaire Resolver. + * @summary Questionnaire resolver. */ -module.exports.questionnaireResolver = function questionnaireResolver( +module.exports.getQuestionnaire = function getQuestionnaire( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireListResolver + * @name exports.getQuestionnaireList * @static - * @summary Questionnaire List Resolver. + * @summary Questionnaire list resolver. */ -module.exports.questionnaireListResolver = function questionnaireListResolver( +module.exports.getQuestionnaireList = function getQuestionnaireList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireInstanceResolver + * @name exports.getQuestionnaireInstance * @static - * @summary Questionnaire Instance Resolver. + * @summary Questionnaire instance resolver. */ -module.exports.questionnaireInstanceResolver = function questionnaireInstanceResolver( +module.exports.getQuestionnaireInstance = function getQuestionnaireInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireCreateResolver + * @name exports.createQuestionnaire * @static - * @summary Questionnaire Create Resolver. + * @summary Create Questionnaire resolver. */ -module.exports.questionnaireCreateResolver = function questionnaireCreateResolver( +module.exports.createQuestionnaire = function createQuestionnaire( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireUpdateResolver + * @name exports.updateQuestionnaire * @static - * @summary Questionnaire Update Resolver. + * @summary Update Questionnaire resolver. */ -module.exports.questionnaireUpdateResolver = function questionnaireUpdateResolver( +module.exports.updateQuestionnaire = function updateQuestionnaire( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireDeleteResolver + * @name exports.removeQuestionnaire * @static - * @summary Questionnaire Delete Resolver. + * @summary Remove Questionnaire resolver. */ -module.exports.questionnaireDeleteResolver = function questionnaireDeleteResolver( +module.exports.removeQuestionnaire = function removeQuestionnaire( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/questionnaireresponse/mutation.js b/src/resources/1_0_2/profiles/questionnaireresponse/mutation.js index c85d1117..d3b85ac2 100644 --- a/src/resources/1_0_2/profiles/questionnaireresponse/mutation.js +++ b/src/resources/1_0_2/profiles/questionnaireresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema'); +const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const QuestionnaireResponseInput = require('../../inputs/questionnaireresponse.input'); +const QuestionnaireResponseInput = require('../../inputs/questionnaireresponse.input.js'); -// Resolvers -const { - questionnaireresponseCreateResolver, - questionnaireresponseUpdateResolver, - questionnaireresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createQuestionnaireResponse, + updateQuestionnaireResponse, + removeQuestionnaireResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'QuestionnaireResponse', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a QuestionnaireResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a QuestionnaireResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.QuestionnaireResponseCreateMutation - * @summary QuestionnaireResponseCreate Mutation. + * @summary QuestionnaireResponseCreate mutation. */ module.exports.QuestionnaireResponseCreateMutation = { - args: WriteArgs, - description: 'Create a QuestionnaireResponse', - resolve: scopeInvariant(scopeOptions, questionnaireresponseCreateResolver), + description: 'Create a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, createQuestionnaireResponse), type: QuestionnaireResponseSchema, + args: WriteArgs, }; /** * @name exports.QuestionnaireResponseUpdateMutation - * @summary QuestionnaireResponseUpdate Mutation. + * @summary QuestionnaireResponseUpdate mutation. */ module.exports.QuestionnaireResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple QuestionnaireResponses', - resolve: scopeInvariant(scopeOptions, questionnaireresponseUpdateResolver), + description: 'Update a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, updateQuestionnaireResponse), type: QuestionnaireResponseSchema, + args: WriteArgs, }; /** - * @name exports.QuestionnaireResponseDeleteMutation - * @summary QuestionnaireResponseDelete Mutation. + * @name exports.QuestionnaireResponseRemoveMutation + * @summary QuestionnaireResponseRemove mutation. */ -module.exports.QuestionnaireResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single QuestionnaireResponse', - resolve: scopeInvariant(scopeOptions, questionnaireresponseDeleteResolver), +module.exports.QuestionnaireResponseRemoveMutation = { + description: 'Remove a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, removeQuestionnaireResponse), type: QuestionnaireResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/questionnaireresponse/query.js b/src/resources/1_0_2/profiles/questionnaireresponse/query.js index 417008c0..e2db9a45 100644 --- a/src/resources/1_0_2/profiles/questionnaireresponse/query.js +++ b/src/resources/1_0_2/profiles/questionnaireresponse/query.js @@ -1,55 +1,59 @@ // Schemas -const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const QuestionnaireResponseArgs = require('../../parameters/questionnaireresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const QuestionnaireResponseArgs = require('../../parameters/questionnaireresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, QuestionnaireResponseArgs); // Resolvers const { - questionnaireresponseResolver, - questionnaireresponseListResolver, - questionnaireresponseInstanceResolver, + getQuestionnaireResponse, + getQuestionnaireResponseList, + getQuestionnaireResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'QuestionnaireResponse', action: 'read', - version: '1_0_2', }; /** * @name exports.QuestionnaireResponseQuery - * @summary QuestionnaireResponse Query. + * @summary QuestionnaireResponse query. */ module.exports.QuestionnaireResponseQuery = { - args: Object.assign({}, CommonArgs, QuestionnaireResponseArgs), description: 'Query for a single QuestionnaireResponse', - resolve: scopeInvariant(scopeOptions, questionnaireresponseResolver), + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponse), type: QuestionnaireResponseSchema, + args: args, }; /** * @name exports.QuestionnaireResponseListQuery - * @summary QuestionnaireResponseList Query. + * @summary QuestionnaireResponse query. */ module.exports.QuestionnaireResponseListQuery = { - args: Object.assign({}, CommonArgs, QuestionnaireResponseArgs), - description: 'Query for multiple QuestionnaireResponses', - resolve: scopeInvariant(scopeOptions, questionnaireresponseListResolver), + description: 'Query for a more than or just one QuestionnaireResponse', + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponseList), type: BundleSchema, + args: args, }; /** * @name exports.QuestionnaireResponseInstanceQuery - * @summary QuestionnaireResponseInstance Query. + * @summary QuestionnaireResponse query. */ module.exports.QuestionnaireResponseInstanceQuery = { - description: 'Get information about a single QuestionnaireResponse', - resolve: scopeInvariant(scopeOptions, questionnaireresponseInstanceResolver), + description: 'Access information about a single QuestionnaireResponse', + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponseInstance), type: QuestionnaireResponseSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/questionnaireresponse/index.js b/src/resources/1_0_2/profiles/questionnaireresponse/register.js similarity index 91% rename from src/resources/1_0_2/profiles/questionnaireresponse/index.js rename to src/resources/1_0_2/profiles/questionnaireresponse/register.js index 04071a6b..d3d784af 100644 --- a/src/resources/1_0_2/profiles/questionnaireresponse/index.js +++ b/src/resources/1_0_2/profiles/questionnaireresponse/register.js @@ -1,15 +1,15 @@ +const { + QuestionnaireResponseCreateMutation, + QuestionnaireResponseUpdateMutation, + QuestionnaireResponseRemoveMutation, +} = require('./mutation'); + const { QuestionnaireResponseQuery, QuestionnaireResponseListQuery, QuestionnaireResponseInstanceQuery, } = require('./query'); -const { - QuestionnaireResponseCreateMutation, - QuestionnaireResponseUpdateMutation, - QuestionnaireResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { QuestionnaireResponseCreate: QuestionnaireResponseCreateMutation, QuestionnaireResponseUpdate: QuestionnaireResponseUpdateMutation, - QuestionnaireResponseDelete: QuestionnaireResponseDeleteMutation, + QuestionnaireResponseRemove: QuestionnaireResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'QuestionnaireResponse', path: '/1_0_2/QuestionnaireResponse/:id', query: QuestionnaireResponseInstanceQuery, diff --git a/src/resources/1_0_2/profiles/questionnaireresponse/resolver.js b/src/resources/1_0_2/profiles/questionnaireresponse/resolver.js index 22e4c7ed..7592bda6 100644 --- a/src/resources/1_0_2/profiles/questionnaireresponse/resolver.js +++ b/src/resources/1_0_2/profiles/questionnaireresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.questionnaireresponseResolver + * @name exports.getQuestionnaireResponse * @static - * @summary QuestionnaireResponse Resolver. + * @summary QuestionnaireResponse resolver. */ -module.exports.questionnaireresponseResolver = function questionnaireresponseResolver( +module.exports.getQuestionnaireResponse = function getQuestionnaireResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseListResolver + * @name exports.getQuestionnaireResponseList * @static - * @summary QuestionnaireResponse List Resolver. + * @summary QuestionnaireResponse list resolver. */ -module.exports.questionnaireresponseListResolver = function questionnaireresponseListResolver( +module.exports.getQuestionnaireResponseList = function getQuestionnaireResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseInstanceResolver + * @name exports.getQuestionnaireResponseInstance * @static - * @summary QuestionnaireResponse Instance Resolver. + * @summary QuestionnaireResponse instance resolver. */ -module.exports.questionnaireresponseInstanceResolver = function questionnaireresponseInstanceResolver( +module.exports.getQuestionnaireResponseInstance = function getQuestionnaireResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseCreateResolver + * @name exports.createQuestionnaireResponse * @static - * @summary QuestionnaireResponse Create Resolver. + * @summary Create QuestionnaireResponse resolver. */ -module.exports.questionnaireresponseCreateResolver = function questionnaireresponseCreateResolver( +module.exports.createQuestionnaireResponse = function createQuestionnaireResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseUpdateResolver + * @name exports.updateQuestionnaireResponse * @static - * @summary QuestionnaireResponse Update Resolver. + * @summary Update QuestionnaireResponse resolver. */ -module.exports.questionnaireresponseUpdateResolver = function questionnaireresponseUpdateResolver( +module.exports.updateQuestionnaireResponse = function updateQuestionnaireResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseDeleteResolver + * @name exports.removeQuestionnaireResponse * @static - * @summary QuestionnaireResponse Delete Resolver. + * @summary Remove QuestionnaireResponse resolver. */ -module.exports.questionnaireresponseDeleteResolver = function questionnaireresponseDeleteResolver( +module.exports.removeQuestionnaireResponse = function removeQuestionnaireResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/referralrequest/mutation.js b/src/resources/1_0_2/profiles/referralrequest/mutation.js index 86d18c1e..0d679d98 100644 --- a/src/resources/1_0_2/profiles/referralrequest/mutation.js +++ b/src/resources/1_0_2/profiles/referralrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ReferralRequestSchema = require('../../schemas/referralrequest.schema'); +const ReferralRequestSchema = require('../../schemas/referralrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ReferralRequestInput = require('../../inputs/referralrequest.input'); +const ReferralRequestInput = require('../../inputs/referralrequest.input.js'); -// Resolvers -const { - referralrequestCreateResolver, - referralrequestUpdateResolver, - referralrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createReferralRequest, + updateReferralRequest, + removeReferralRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ReferralRequest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ReferralRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ReferralRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ReferralRequestCreateMutation - * @summary ReferralRequestCreate Mutation. + * @summary ReferralRequestCreate mutation. */ module.exports.ReferralRequestCreateMutation = { - args: WriteArgs, - description: 'Create a ReferralRequest', - resolve: scopeInvariant(scopeOptions, referralrequestCreateResolver), + description: 'Create a ReferralRequest record', + resolve: scopeInvariant(scopeOptions, createReferralRequest), type: ReferralRequestSchema, + args: WriteArgs, }; /** * @name exports.ReferralRequestUpdateMutation - * @summary ReferralRequestUpdate Mutation. + * @summary ReferralRequestUpdate mutation. */ module.exports.ReferralRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ReferralRequests', - resolve: scopeInvariant(scopeOptions, referralrequestUpdateResolver), + description: 'Update a ReferralRequest record', + resolve: scopeInvariant(scopeOptions, updateReferralRequest), type: ReferralRequestSchema, + args: WriteArgs, }; /** - * @name exports.ReferralRequestDeleteMutation - * @summary ReferralRequestDelete Mutation. + * @name exports.ReferralRequestRemoveMutation + * @summary ReferralRequestRemove mutation. */ -module.exports.ReferralRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ReferralRequest', - resolve: scopeInvariant(scopeOptions, referralrequestDeleteResolver), +module.exports.ReferralRequestRemoveMutation = { + description: 'Remove a ReferralRequest record', + resolve: scopeInvariant(scopeOptions, removeReferralRequest), type: ReferralRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/referralrequest/query.js b/src/resources/1_0_2/profiles/referralrequest/query.js index 1143f0c8..807d6fe9 100644 --- a/src/resources/1_0_2/profiles/referralrequest/query.js +++ b/src/resources/1_0_2/profiles/referralrequest/query.js @@ -1,55 +1,59 @@ // Schemas -const ReferralRequestSchema = require('../../schemas/referralrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ReferralRequestSchema = require('../../schemas/referralrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ReferralRequestArgs = require('../../parameters/referralrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ReferralRequestArgs = require('../../parameters/referralrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ReferralRequestArgs); // Resolvers const { - referralrequestResolver, - referralrequestListResolver, - referralrequestInstanceResolver, + getReferralRequest, + getReferralRequestList, + getReferralRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ReferralRequest', action: 'read', - version: '1_0_2', }; /** * @name exports.ReferralRequestQuery - * @summary ReferralRequest Query. + * @summary ReferralRequest query. */ module.exports.ReferralRequestQuery = { - args: Object.assign({}, CommonArgs, ReferralRequestArgs), description: 'Query for a single ReferralRequest', - resolve: scopeInvariant(scopeOptions, referralrequestResolver), + resolve: scopeInvariant(scopeOptions, getReferralRequest), type: ReferralRequestSchema, + args: args, }; /** * @name exports.ReferralRequestListQuery - * @summary ReferralRequestList Query. + * @summary ReferralRequest query. */ module.exports.ReferralRequestListQuery = { - args: Object.assign({}, CommonArgs, ReferralRequestArgs), - description: 'Query for multiple ReferralRequests', - resolve: scopeInvariant(scopeOptions, referralrequestListResolver), + description: 'Query for a more than or just one ReferralRequest', + resolve: scopeInvariant(scopeOptions, getReferralRequestList), type: BundleSchema, + args: args, }; /** * @name exports.ReferralRequestInstanceQuery - * @summary ReferralRequestInstance Query. + * @summary ReferralRequest query. */ module.exports.ReferralRequestInstanceQuery = { - description: 'Get information about a single ReferralRequest', - resolve: scopeInvariant(scopeOptions, referralrequestInstanceResolver), + description: 'Access information about a single ReferralRequest', + resolve: scopeInvariant(scopeOptions, getReferralRequestInstance), type: ReferralRequestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/referralrequest/index.js b/src/resources/1_0_2/profiles/referralrequest/register.js similarity index 91% rename from src/resources/1_0_2/profiles/referralrequest/index.js rename to src/resources/1_0_2/profiles/referralrequest/register.js index 5fe9593a..586ae494 100644 --- a/src/resources/1_0_2/profiles/referralrequest/index.js +++ b/src/resources/1_0_2/profiles/referralrequest/register.js @@ -1,15 +1,15 @@ +const { + ReferralRequestCreateMutation, + ReferralRequestUpdateMutation, + ReferralRequestRemoveMutation, +} = require('./mutation'); + const { ReferralRequestQuery, ReferralRequestListQuery, ReferralRequestInstanceQuery, } = require('./query'); -const { - ReferralRequestCreateMutation, - ReferralRequestUpdateMutation, - ReferralRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ReferralRequestCreate: ReferralRequestCreateMutation, ReferralRequestUpdate: ReferralRequestUpdateMutation, - ReferralRequestDelete: ReferralRequestDeleteMutation, + ReferralRequestRemove: ReferralRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ReferralRequest', path: '/1_0_2/ReferralRequest/:id', query: ReferralRequestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/referralrequest/resolver.js b/src/resources/1_0_2/profiles/referralrequest/resolver.js index 382aa24e..ee9682fd 100644 --- a/src/resources/1_0_2/profiles/referralrequest/resolver.js +++ b/src/resources/1_0_2/profiles/referralrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.referralrequestResolver + * @name exports.getReferralRequest * @static - * @summary ReferralRequest Resolver. + * @summary ReferralRequest resolver. */ -module.exports.referralrequestResolver = function referralrequestResolver( +module.exports.getReferralRequest = function getReferralRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestListResolver + * @name exports.getReferralRequestList * @static - * @summary ReferralRequest List Resolver. + * @summary ReferralRequest list resolver. */ -module.exports.referralrequestListResolver = function referralrequestListResolver( +module.exports.getReferralRequestList = function getReferralRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestInstanceResolver + * @name exports.getReferralRequestInstance * @static - * @summary ReferralRequest Instance Resolver. + * @summary ReferralRequest instance resolver. */ -module.exports.referralrequestInstanceResolver = function referralrequestInstanceResolver( +module.exports.getReferralRequestInstance = function getReferralRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestCreateResolver + * @name exports.createReferralRequest * @static - * @summary ReferralRequest Create Resolver. + * @summary Create ReferralRequest resolver. */ -module.exports.referralrequestCreateResolver = function referralrequestCreateResolver( +module.exports.createReferralRequest = function createReferralRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestUpdateResolver + * @name exports.updateReferralRequest * @static - * @summary ReferralRequest Update Resolver. + * @summary Update ReferralRequest resolver. */ -module.exports.referralrequestUpdateResolver = function referralrequestUpdateResolver( +module.exports.updateReferralRequest = function updateReferralRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestDeleteResolver + * @name exports.removeReferralRequest * @static - * @summary ReferralRequest Delete Resolver. + * @summary Remove ReferralRequest resolver. */ -module.exports.referralrequestDeleteResolver = function referralrequestDeleteResolver( +module.exports.removeReferralRequest = function removeReferralRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/relatedperson/mutation.js b/src/resources/1_0_2/profiles/relatedperson/mutation.js index da66231c..2e90ec2f 100644 --- a/src/resources/1_0_2/profiles/relatedperson/mutation.js +++ b/src/resources/1_0_2/profiles/relatedperson/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const RelatedPersonSchema = require('../../schemas/relatedperson.schema'); +const RelatedPersonSchema = require('../../schemas/relatedperson.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const RelatedPersonInput = require('../../inputs/relatedperson.input'); +const RelatedPersonInput = require('../../inputs/relatedperson.input.js'); -// Resolvers -const { - relatedpersonCreateResolver, - relatedpersonUpdateResolver, - relatedpersonDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createRelatedPerson, + updateRelatedPerson, + removeRelatedPerson, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RelatedPerson', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a RelatedPerson record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a RelatedPerson record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.RelatedPersonCreateMutation - * @summary RelatedPersonCreate Mutation. + * @summary RelatedPersonCreate mutation. */ module.exports.RelatedPersonCreateMutation = { - args: WriteArgs, - description: 'Create a RelatedPerson', - resolve: scopeInvariant(scopeOptions, relatedpersonCreateResolver), + description: 'Create a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, createRelatedPerson), type: RelatedPersonSchema, + args: WriteArgs, }; /** * @name exports.RelatedPersonUpdateMutation - * @summary RelatedPersonUpdate Mutation. + * @summary RelatedPersonUpdate mutation. */ module.exports.RelatedPersonUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple RelatedPersons', - resolve: scopeInvariant(scopeOptions, relatedpersonUpdateResolver), + description: 'Update a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, updateRelatedPerson), type: RelatedPersonSchema, + args: WriteArgs, }; /** - * @name exports.RelatedPersonDeleteMutation - * @summary RelatedPersonDelete Mutation. + * @name exports.RelatedPersonRemoveMutation + * @summary RelatedPersonRemove mutation. */ -module.exports.RelatedPersonDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single RelatedPerson', - resolve: scopeInvariant(scopeOptions, relatedpersonDeleteResolver), +module.exports.RelatedPersonRemoveMutation = { + description: 'Remove a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, removeRelatedPerson), type: RelatedPersonSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/relatedperson/query.js b/src/resources/1_0_2/profiles/relatedperson/query.js index bcc014d5..c9722373 100644 --- a/src/resources/1_0_2/profiles/relatedperson/query.js +++ b/src/resources/1_0_2/profiles/relatedperson/query.js @@ -1,55 +1,59 @@ // Schemas -const RelatedPersonSchema = require('../../schemas/relatedperson.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RelatedPersonSchema = require('../../schemas/relatedperson.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const RelatedPersonArgs = require('../../parameters/relatedperson.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const RelatedPersonArgs = require('../../parameters/relatedperson.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, RelatedPersonArgs); // Resolvers const { - relatedpersonResolver, - relatedpersonListResolver, - relatedpersonInstanceResolver, + getRelatedPerson, + getRelatedPersonList, + getRelatedPersonInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RelatedPerson', action: 'read', - version: '1_0_2', }; /** * @name exports.RelatedPersonQuery - * @summary RelatedPerson Query. + * @summary RelatedPerson query. */ module.exports.RelatedPersonQuery = { - args: Object.assign({}, CommonArgs, RelatedPersonArgs), description: 'Query for a single RelatedPerson', - resolve: scopeInvariant(scopeOptions, relatedpersonResolver), + resolve: scopeInvariant(scopeOptions, getRelatedPerson), type: RelatedPersonSchema, + args: args, }; /** * @name exports.RelatedPersonListQuery - * @summary RelatedPersonList Query. + * @summary RelatedPerson query. */ module.exports.RelatedPersonListQuery = { - args: Object.assign({}, CommonArgs, RelatedPersonArgs), - description: 'Query for multiple RelatedPersons', - resolve: scopeInvariant(scopeOptions, relatedpersonListResolver), + description: 'Query for a more than or just one RelatedPerson', + resolve: scopeInvariant(scopeOptions, getRelatedPersonList), type: BundleSchema, + args: args, }; /** * @name exports.RelatedPersonInstanceQuery - * @summary RelatedPersonInstance Query. + * @summary RelatedPerson query. */ module.exports.RelatedPersonInstanceQuery = { - description: 'Get information about a single RelatedPerson', - resolve: scopeInvariant(scopeOptions, relatedpersonInstanceResolver), + description: 'Access information about a single RelatedPerson', + resolve: scopeInvariant(scopeOptions, getRelatedPersonInstance), type: RelatedPersonSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/relatedperson/index.js b/src/resources/1_0_2/profiles/relatedperson/register.js similarity index 92% rename from src/resources/1_0_2/profiles/relatedperson/index.js rename to src/resources/1_0_2/profiles/relatedperson/register.js index 6ebb59c2..958126bb 100644 --- a/src/resources/1_0_2/profiles/relatedperson/index.js +++ b/src/resources/1_0_2/profiles/relatedperson/register.js @@ -1,15 +1,15 @@ +const { + RelatedPersonCreateMutation, + RelatedPersonUpdateMutation, + RelatedPersonRemoveMutation, +} = require('./mutation'); + const { RelatedPersonQuery, RelatedPersonListQuery, RelatedPersonInstanceQuery, } = require('./query'); -const { - RelatedPersonCreateMutation, - RelatedPersonUpdateMutation, - RelatedPersonDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { RelatedPersonCreate: RelatedPersonCreateMutation, RelatedPersonUpdate: RelatedPersonUpdateMutation, - RelatedPersonDelete: RelatedPersonDeleteMutation, + RelatedPersonRemove: RelatedPersonRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'RelatedPerson', path: '/1_0_2/RelatedPerson/:id', query: RelatedPersonInstanceQuery, diff --git a/src/resources/1_0_2/profiles/relatedperson/resolver.js b/src/resources/1_0_2/profiles/relatedperson/resolver.js index 7993e818..9302c7ce 100644 --- a/src/resources/1_0_2/profiles/relatedperson/resolver.js +++ b/src/resources/1_0_2/profiles/relatedperson/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.relatedpersonResolver + * @name exports.getRelatedPerson * @static - * @summary RelatedPerson Resolver. + * @summary RelatedPerson resolver. */ -module.exports.relatedpersonResolver = function relatedpersonResolver( +module.exports.getRelatedPerson = function getRelatedPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonListResolver + * @name exports.getRelatedPersonList * @static - * @summary RelatedPerson List Resolver. + * @summary RelatedPerson list resolver. */ -module.exports.relatedpersonListResolver = function relatedpersonListResolver( +module.exports.getRelatedPersonList = function getRelatedPersonList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonInstanceResolver + * @name exports.getRelatedPersonInstance * @static - * @summary RelatedPerson Instance Resolver. + * @summary RelatedPerson instance resolver. */ -module.exports.relatedpersonInstanceResolver = function relatedpersonInstanceResolver( +module.exports.getRelatedPersonInstance = function getRelatedPersonInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonCreateResolver + * @name exports.createRelatedPerson * @static - * @summary RelatedPerson Create Resolver. + * @summary Create RelatedPerson resolver. */ -module.exports.relatedpersonCreateResolver = function relatedpersonCreateResolver( +module.exports.createRelatedPerson = function createRelatedPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonUpdateResolver + * @name exports.updateRelatedPerson * @static - * @summary RelatedPerson Update Resolver. + * @summary Update RelatedPerson resolver. */ -module.exports.relatedpersonUpdateResolver = function relatedpersonUpdateResolver( +module.exports.updateRelatedPerson = function updateRelatedPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonDeleteResolver + * @name exports.removeRelatedPerson * @static - * @summary RelatedPerson Delete Resolver. + * @summary Remove RelatedPerson resolver. */ -module.exports.relatedpersonDeleteResolver = function relatedpersonDeleteResolver( +module.exports.removeRelatedPerson = function removeRelatedPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/riskassessment/mutation.js b/src/resources/1_0_2/profiles/riskassessment/mutation.js index 49dbbe99..51966f32 100644 --- a/src/resources/1_0_2/profiles/riskassessment/mutation.js +++ b/src/resources/1_0_2/profiles/riskassessment/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const RiskAssessmentSchema = require('../../schemas/riskassessment.schema'); +const RiskAssessmentSchema = require('../../schemas/riskassessment.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const RiskAssessmentInput = require('../../inputs/riskassessment.input'); +const RiskAssessmentInput = require('../../inputs/riskassessment.input.js'); -// Resolvers -const { - riskassessmentCreateResolver, - riskassessmentUpdateResolver, - riskassessmentDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createRiskAssessment, + updateRiskAssessment, + removeRiskAssessment, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RiskAssessment', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a RiskAssessment record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a RiskAssessment record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.RiskAssessmentCreateMutation - * @summary RiskAssessmentCreate Mutation. + * @summary RiskAssessmentCreate mutation. */ module.exports.RiskAssessmentCreateMutation = { - args: WriteArgs, - description: 'Create a RiskAssessment', - resolve: scopeInvariant(scopeOptions, riskassessmentCreateResolver), + description: 'Create a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, createRiskAssessment), type: RiskAssessmentSchema, + args: WriteArgs, }; /** * @name exports.RiskAssessmentUpdateMutation - * @summary RiskAssessmentUpdate Mutation. + * @summary RiskAssessmentUpdate mutation. */ module.exports.RiskAssessmentUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple RiskAssessments', - resolve: scopeInvariant(scopeOptions, riskassessmentUpdateResolver), + description: 'Update a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, updateRiskAssessment), type: RiskAssessmentSchema, + args: WriteArgs, }; /** - * @name exports.RiskAssessmentDeleteMutation - * @summary RiskAssessmentDelete Mutation. + * @name exports.RiskAssessmentRemoveMutation + * @summary RiskAssessmentRemove mutation. */ -module.exports.RiskAssessmentDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single RiskAssessment', - resolve: scopeInvariant(scopeOptions, riskassessmentDeleteResolver), +module.exports.RiskAssessmentRemoveMutation = { + description: 'Remove a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, removeRiskAssessment), type: RiskAssessmentSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/riskassessment/query.js b/src/resources/1_0_2/profiles/riskassessment/query.js index 3efafd87..9be44705 100644 --- a/src/resources/1_0_2/profiles/riskassessment/query.js +++ b/src/resources/1_0_2/profiles/riskassessment/query.js @@ -1,55 +1,59 @@ // Schemas -const RiskAssessmentSchema = require('../../schemas/riskassessment.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RiskAssessmentSchema = require('../../schemas/riskassessment.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const RiskAssessmentArgs = require('../../parameters/riskassessment.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const RiskAssessmentArgs = require('../../parameters/riskassessment.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, RiskAssessmentArgs); // Resolvers const { - riskassessmentResolver, - riskassessmentListResolver, - riskassessmentInstanceResolver, + getRiskAssessment, + getRiskAssessmentList, + getRiskAssessmentInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RiskAssessment', action: 'read', - version: '1_0_2', }; /** * @name exports.RiskAssessmentQuery - * @summary RiskAssessment Query. + * @summary RiskAssessment query. */ module.exports.RiskAssessmentQuery = { - args: Object.assign({}, CommonArgs, RiskAssessmentArgs), description: 'Query for a single RiskAssessment', - resolve: scopeInvariant(scopeOptions, riskassessmentResolver), + resolve: scopeInvariant(scopeOptions, getRiskAssessment), type: RiskAssessmentSchema, + args: args, }; /** * @name exports.RiskAssessmentListQuery - * @summary RiskAssessmentList Query. + * @summary RiskAssessment query. */ module.exports.RiskAssessmentListQuery = { - args: Object.assign({}, CommonArgs, RiskAssessmentArgs), - description: 'Query for multiple RiskAssessments', - resolve: scopeInvariant(scopeOptions, riskassessmentListResolver), + description: 'Query for a more than or just one RiskAssessment', + resolve: scopeInvariant(scopeOptions, getRiskAssessmentList), type: BundleSchema, + args: args, }; /** * @name exports.RiskAssessmentInstanceQuery - * @summary RiskAssessmentInstance Query. + * @summary RiskAssessment query. */ module.exports.RiskAssessmentInstanceQuery = { - description: 'Get information about a single RiskAssessment', - resolve: scopeInvariant(scopeOptions, riskassessmentInstanceResolver), + description: 'Access information about a single RiskAssessment', + resolve: scopeInvariant(scopeOptions, getRiskAssessmentInstance), type: RiskAssessmentSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/riskassessment/index.js b/src/resources/1_0_2/profiles/riskassessment/register.js similarity index 92% rename from src/resources/1_0_2/profiles/riskassessment/index.js rename to src/resources/1_0_2/profiles/riskassessment/register.js index 810ae473..2bfee774 100644 --- a/src/resources/1_0_2/profiles/riskassessment/index.js +++ b/src/resources/1_0_2/profiles/riskassessment/register.js @@ -1,15 +1,15 @@ +const { + RiskAssessmentCreateMutation, + RiskAssessmentUpdateMutation, + RiskAssessmentRemoveMutation, +} = require('./mutation'); + const { RiskAssessmentQuery, RiskAssessmentListQuery, RiskAssessmentInstanceQuery, } = require('./query'); -const { - RiskAssessmentCreateMutation, - RiskAssessmentUpdateMutation, - RiskAssessmentDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { RiskAssessmentCreate: RiskAssessmentCreateMutation, RiskAssessmentUpdate: RiskAssessmentUpdateMutation, - RiskAssessmentDelete: RiskAssessmentDeleteMutation, + RiskAssessmentRemove: RiskAssessmentRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'RiskAssessment', path: '/1_0_2/RiskAssessment/:id', query: RiskAssessmentInstanceQuery, diff --git a/src/resources/1_0_2/profiles/riskassessment/resolver.js b/src/resources/1_0_2/profiles/riskassessment/resolver.js index 708c6a1b..719040b7 100644 --- a/src/resources/1_0_2/profiles/riskassessment/resolver.js +++ b/src/resources/1_0_2/profiles/riskassessment/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.riskassessmentResolver + * @name exports.getRiskAssessment * @static - * @summary RiskAssessment Resolver. + * @summary RiskAssessment resolver. */ -module.exports.riskassessmentResolver = function riskassessmentResolver( +module.exports.getRiskAssessment = function getRiskAssessment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentListResolver + * @name exports.getRiskAssessmentList * @static - * @summary RiskAssessment List Resolver. + * @summary RiskAssessment list resolver. */ -module.exports.riskassessmentListResolver = function riskassessmentListResolver( +module.exports.getRiskAssessmentList = function getRiskAssessmentList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentInstanceResolver + * @name exports.getRiskAssessmentInstance * @static - * @summary RiskAssessment Instance Resolver. + * @summary RiskAssessment instance resolver. */ -module.exports.riskassessmentInstanceResolver = function riskassessmentInstanceResolver( +module.exports.getRiskAssessmentInstance = function getRiskAssessmentInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentCreateResolver + * @name exports.createRiskAssessment * @static - * @summary RiskAssessment Create Resolver. + * @summary Create RiskAssessment resolver. */ -module.exports.riskassessmentCreateResolver = function riskassessmentCreateResolver( +module.exports.createRiskAssessment = function createRiskAssessment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentUpdateResolver + * @name exports.updateRiskAssessment * @static - * @summary RiskAssessment Update Resolver. + * @summary Update RiskAssessment resolver. */ -module.exports.riskassessmentUpdateResolver = function riskassessmentUpdateResolver( +module.exports.updateRiskAssessment = function updateRiskAssessment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentDeleteResolver + * @name exports.removeRiskAssessment * @static - * @summary RiskAssessment Delete Resolver. + * @summary Remove RiskAssessment resolver. */ -module.exports.riskassessmentDeleteResolver = function riskassessmentDeleteResolver( +module.exports.removeRiskAssessment = function removeRiskAssessment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/schedule/mutation.js b/src/resources/1_0_2/profiles/schedule/mutation.js index 1e5d681a..dcf1ff41 100644 --- a/src/resources/1_0_2/profiles/schedule/mutation.js +++ b/src/resources/1_0_2/profiles/schedule/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ScheduleSchema = require('../../schemas/schedule.schema'); +const ScheduleSchema = require('../../schemas/schedule.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ScheduleInput = require('../../inputs/schedule.input'); +const ScheduleInput = require('../../inputs/schedule.input.js'); -// Resolvers -const { - scheduleCreateResolver, - scheduleUpdateResolver, - scheduleDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSchedule, + updateSchedule, + removeSchedule, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Schedule', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Schedule record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Schedule record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ScheduleCreateMutation - * @summary ScheduleCreate Mutation. + * @summary ScheduleCreate mutation. */ module.exports.ScheduleCreateMutation = { - args: WriteArgs, - description: 'Create a Schedule', - resolve: scopeInvariant(scopeOptions, scheduleCreateResolver), + description: 'Create a Schedule record', + resolve: scopeInvariant(scopeOptions, createSchedule), type: ScheduleSchema, + args: WriteArgs, }; /** * @name exports.ScheduleUpdateMutation - * @summary ScheduleUpdate Mutation. + * @summary ScheduleUpdate mutation. */ module.exports.ScheduleUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Schedules', - resolve: scopeInvariant(scopeOptions, scheduleUpdateResolver), + description: 'Update a Schedule record', + resolve: scopeInvariant(scopeOptions, updateSchedule), type: ScheduleSchema, + args: WriteArgs, }; /** - * @name exports.ScheduleDeleteMutation - * @summary ScheduleDelete Mutation. + * @name exports.ScheduleRemoveMutation + * @summary ScheduleRemove mutation. */ -module.exports.ScheduleDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Schedule', - resolve: scopeInvariant(scopeOptions, scheduleDeleteResolver), +module.exports.ScheduleRemoveMutation = { + description: 'Remove a Schedule record', + resolve: scopeInvariant(scopeOptions, removeSchedule), type: ScheduleSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/schedule/query.js b/src/resources/1_0_2/profiles/schedule/query.js index ffae10eb..1262904e 100644 --- a/src/resources/1_0_2/profiles/schedule/query.js +++ b/src/resources/1_0_2/profiles/schedule/query.js @@ -1,55 +1,59 @@ // Schemas -const ScheduleSchema = require('../../schemas/schedule.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ScheduleSchema = require('../../schemas/schedule.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ScheduleArgs = require('../../parameters/schedule.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ScheduleArgs = require('../../parameters/schedule.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ScheduleArgs); // Resolvers const { - scheduleResolver, - scheduleListResolver, - scheduleInstanceResolver, + getSchedule, + getScheduleList, + getScheduleInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Schedule', action: 'read', - version: '1_0_2', }; /** * @name exports.ScheduleQuery - * @summary Schedule Query. + * @summary Schedule query. */ module.exports.ScheduleQuery = { - args: Object.assign({}, CommonArgs, ScheduleArgs), description: 'Query for a single Schedule', - resolve: scopeInvariant(scopeOptions, scheduleResolver), + resolve: scopeInvariant(scopeOptions, getSchedule), type: ScheduleSchema, + args: args, }; /** * @name exports.ScheduleListQuery - * @summary ScheduleList Query. + * @summary Schedule query. */ module.exports.ScheduleListQuery = { - args: Object.assign({}, CommonArgs, ScheduleArgs), - description: 'Query for multiple Schedules', - resolve: scopeInvariant(scopeOptions, scheduleListResolver), + description: 'Query for a more than or just one Schedule', + resolve: scopeInvariant(scopeOptions, getScheduleList), type: BundleSchema, + args: args, }; /** * @name exports.ScheduleInstanceQuery - * @summary ScheduleInstance Query. + * @summary Schedule query. */ module.exports.ScheduleInstanceQuery = { - description: 'Get information about a single Schedule', - resolve: scopeInvariant(scopeOptions, scheduleInstanceResolver), + description: 'Access information about a single Schedule', + resolve: scopeInvariant(scopeOptions, getScheduleInstance), type: ScheduleSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/schedule/index.js b/src/resources/1_0_2/profiles/schedule/register.js similarity index 92% rename from src/resources/1_0_2/profiles/schedule/index.js rename to src/resources/1_0_2/profiles/schedule/register.js index 29449cf3..d8875502 100644 --- a/src/resources/1_0_2/profiles/schedule/index.js +++ b/src/resources/1_0_2/profiles/schedule/register.js @@ -1,15 +1,15 @@ +const { + ScheduleCreateMutation, + ScheduleUpdateMutation, + ScheduleRemoveMutation, +} = require('./mutation'); + const { ScheduleQuery, ScheduleListQuery, ScheduleInstanceQuery, } = require('./query'); -const { - ScheduleCreateMutation, - ScheduleUpdateMutation, - ScheduleDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ScheduleCreate: ScheduleCreateMutation, ScheduleUpdate: ScheduleUpdateMutation, - ScheduleDelete: ScheduleDeleteMutation, + ScheduleRemove: ScheduleRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Schedule', path: '/1_0_2/Schedule/:id', query: ScheduleInstanceQuery, diff --git a/src/resources/1_0_2/profiles/schedule/resolver.js b/src/resources/1_0_2/profiles/schedule/resolver.js index 2b02c4d6..759d0a83 100644 --- a/src/resources/1_0_2/profiles/schedule/resolver.js +++ b/src/resources/1_0_2/profiles/schedule/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.scheduleResolver + * @name exports.getSchedule * @static - * @summary Schedule Resolver. + * @summary Schedule resolver. */ -module.exports.scheduleResolver = function scheduleResolver( +module.exports.getSchedule = function getSchedule( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleListResolver + * @name exports.getScheduleList * @static - * @summary Schedule List Resolver. + * @summary Schedule list resolver. */ -module.exports.scheduleListResolver = function scheduleListResolver( +module.exports.getScheduleList = function getScheduleList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleInstanceResolver + * @name exports.getScheduleInstance * @static - * @summary Schedule Instance Resolver. + * @summary Schedule instance resolver. */ -module.exports.scheduleInstanceResolver = function scheduleInstanceResolver( +module.exports.getScheduleInstance = function getScheduleInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleCreateResolver + * @name exports.createSchedule * @static - * @summary Schedule Create Resolver. + * @summary Create Schedule resolver. */ -module.exports.scheduleCreateResolver = function scheduleCreateResolver( +module.exports.createSchedule = function createSchedule( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleUpdateResolver + * @name exports.updateSchedule * @static - * @summary Schedule Update Resolver. + * @summary Update Schedule resolver. */ -module.exports.scheduleUpdateResolver = function scheduleUpdateResolver( +module.exports.updateSchedule = function updateSchedule( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleDeleteResolver + * @name exports.removeSchedule * @static - * @summary Schedule Delete Resolver. + * @summary Remove Schedule resolver. */ -module.exports.scheduleDeleteResolver = function scheduleDeleteResolver( +module.exports.removeSchedule = function removeSchedule( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/searchparameter/mutation.js b/src/resources/1_0_2/profiles/searchparameter/mutation.js index 92660a7b..acc8e818 100644 --- a/src/resources/1_0_2/profiles/searchparameter/mutation.js +++ b/src/resources/1_0_2/profiles/searchparameter/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SearchParameterSchema = require('../../schemas/searchparameter.schema'); +const SearchParameterSchema = require('../../schemas/searchparameter.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SearchParameterInput = require('../../inputs/searchparameter.input'); +const SearchParameterInput = require('../../inputs/searchparameter.input.js'); -// Resolvers -const { - searchparameterCreateResolver, - searchparameterUpdateResolver, - searchparameterDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSearchParameter, + updateSearchParameter, + removeSearchParameter, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SearchParameter', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a SearchParameter record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a SearchParameter record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.SearchParameterCreateMutation - * @summary SearchParameterCreate Mutation. + * @summary SearchParameterCreate mutation. */ module.exports.SearchParameterCreateMutation = { - args: WriteArgs, - description: 'Create a SearchParameter', - resolve: scopeInvariant(scopeOptions, searchparameterCreateResolver), + description: 'Create a SearchParameter record', + resolve: scopeInvariant(scopeOptions, createSearchParameter), type: SearchParameterSchema, + args: WriteArgs, }; /** * @name exports.SearchParameterUpdateMutation - * @summary SearchParameterUpdate Mutation. + * @summary SearchParameterUpdate mutation. */ module.exports.SearchParameterUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple SearchParameters', - resolve: scopeInvariant(scopeOptions, searchparameterUpdateResolver), + description: 'Update a SearchParameter record', + resolve: scopeInvariant(scopeOptions, updateSearchParameter), type: SearchParameterSchema, + args: WriteArgs, }; /** - * @name exports.SearchParameterDeleteMutation - * @summary SearchParameterDelete Mutation. + * @name exports.SearchParameterRemoveMutation + * @summary SearchParameterRemove mutation. */ -module.exports.SearchParameterDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single SearchParameter', - resolve: scopeInvariant(scopeOptions, searchparameterDeleteResolver), +module.exports.SearchParameterRemoveMutation = { + description: 'Remove a SearchParameter record', + resolve: scopeInvariant(scopeOptions, removeSearchParameter), type: SearchParameterSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/searchparameter/query.js b/src/resources/1_0_2/profiles/searchparameter/query.js index 37a4295a..8d99723c 100644 --- a/src/resources/1_0_2/profiles/searchparameter/query.js +++ b/src/resources/1_0_2/profiles/searchparameter/query.js @@ -1,55 +1,59 @@ // Schemas -const SearchParameterSchema = require('../../schemas/searchparameter.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SearchParameterSchema = require('../../schemas/searchparameter.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SearchParameterArgs = require('../../parameters/searchparameter.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SearchParameterArgs = require('../../parameters/searchparameter.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, SearchParameterArgs); // Resolvers const { - searchparameterResolver, - searchparameterListResolver, - searchparameterInstanceResolver, + getSearchParameter, + getSearchParameterList, + getSearchParameterInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SearchParameter', action: 'read', - version: '1_0_2', }; /** * @name exports.SearchParameterQuery - * @summary SearchParameter Query. + * @summary SearchParameter query. */ module.exports.SearchParameterQuery = { - args: Object.assign({}, CommonArgs, SearchParameterArgs), description: 'Query for a single SearchParameter', - resolve: scopeInvariant(scopeOptions, searchparameterResolver), + resolve: scopeInvariant(scopeOptions, getSearchParameter), type: SearchParameterSchema, + args: args, }; /** * @name exports.SearchParameterListQuery - * @summary SearchParameterList Query. + * @summary SearchParameter query. */ module.exports.SearchParameterListQuery = { - args: Object.assign({}, CommonArgs, SearchParameterArgs), - description: 'Query for multiple SearchParameters', - resolve: scopeInvariant(scopeOptions, searchparameterListResolver), + description: 'Query for a more than or just one SearchParameter', + resolve: scopeInvariant(scopeOptions, getSearchParameterList), type: BundleSchema, + args: args, }; /** * @name exports.SearchParameterInstanceQuery - * @summary SearchParameterInstance Query. + * @summary SearchParameter query. */ module.exports.SearchParameterInstanceQuery = { - description: 'Get information about a single SearchParameter', - resolve: scopeInvariant(scopeOptions, searchparameterInstanceResolver), + description: 'Access information about a single SearchParameter', + resolve: scopeInvariant(scopeOptions, getSearchParameterInstance), type: SearchParameterSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/searchparameter/index.js b/src/resources/1_0_2/profiles/searchparameter/register.js similarity index 91% rename from src/resources/1_0_2/profiles/searchparameter/index.js rename to src/resources/1_0_2/profiles/searchparameter/register.js index c84967d3..3e6fe49b 100644 --- a/src/resources/1_0_2/profiles/searchparameter/index.js +++ b/src/resources/1_0_2/profiles/searchparameter/register.js @@ -1,15 +1,15 @@ +const { + SearchParameterCreateMutation, + SearchParameterUpdateMutation, + SearchParameterRemoveMutation, +} = require('./mutation'); + const { SearchParameterQuery, SearchParameterListQuery, SearchParameterInstanceQuery, } = require('./query'); -const { - SearchParameterCreateMutation, - SearchParameterUpdateMutation, - SearchParameterDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SearchParameterCreate: SearchParameterCreateMutation, SearchParameterUpdate: SearchParameterUpdateMutation, - SearchParameterDelete: SearchParameterDeleteMutation, + SearchParameterRemove: SearchParameterRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'SearchParameter', path: '/1_0_2/SearchParameter/:id', query: SearchParameterInstanceQuery, diff --git a/src/resources/1_0_2/profiles/searchparameter/resolver.js b/src/resources/1_0_2/profiles/searchparameter/resolver.js index c2355728..4543ddbf 100644 --- a/src/resources/1_0_2/profiles/searchparameter/resolver.js +++ b/src/resources/1_0_2/profiles/searchparameter/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.searchparameterResolver + * @name exports.getSearchParameter * @static - * @summary SearchParameter Resolver. + * @summary SearchParameter resolver. */ -module.exports.searchparameterResolver = function searchparameterResolver( +module.exports.getSearchParameter = function getSearchParameter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterListResolver + * @name exports.getSearchParameterList * @static - * @summary SearchParameter List Resolver. + * @summary SearchParameter list resolver. */ -module.exports.searchparameterListResolver = function searchparameterListResolver( +module.exports.getSearchParameterList = function getSearchParameterList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterInstanceResolver + * @name exports.getSearchParameterInstance * @static - * @summary SearchParameter Instance Resolver. + * @summary SearchParameter instance resolver. */ -module.exports.searchparameterInstanceResolver = function searchparameterInstanceResolver( +module.exports.getSearchParameterInstance = function getSearchParameterInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterCreateResolver + * @name exports.createSearchParameter * @static - * @summary SearchParameter Create Resolver. + * @summary Create SearchParameter resolver. */ -module.exports.searchparameterCreateResolver = function searchparameterCreateResolver( +module.exports.createSearchParameter = function createSearchParameter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterUpdateResolver + * @name exports.updateSearchParameter * @static - * @summary SearchParameter Update Resolver. + * @summary Update SearchParameter resolver. */ -module.exports.searchparameterUpdateResolver = function searchparameterUpdateResolver( +module.exports.updateSearchParameter = function updateSearchParameter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterDeleteResolver + * @name exports.removeSearchParameter * @static - * @summary SearchParameter Delete Resolver. + * @summary Remove SearchParameter resolver. */ -module.exports.searchparameterDeleteResolver = function searchparameterDeleteResolver( +module.exports.removeSearchParameter = function removeSearchParameter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/slot/mutation.js b/src/resources/1_0_2/profiles/slot/mutation.js index ffa7ad03..8f8d16a8 100644 --- a/src/resources/1_0_2/profiles/slot/mutation.js +++ b/src/resources/1_0_2/profiles/slot/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SlotSchema = require('../../schemas/slot.schema'); +const SlotSchema = require('../../schemas/slot.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SlotInput = require('../../inputs/slot.input'); +const SlotInput = require('../../inputs/slot.input.js'); -// Resolvers -const { - slotCreateResolver, - slotUpdateResolver, - slotDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createSlot, updateSlot, removeSlot } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Slot', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Slot record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Slot record for deletion.', }, }; /** * @name exports.SlotCreateMutation - * @summary SlotCreate Mutation. + * @summary SlotCreate mutation. */ module.exports.SlotCreateMutation = { - args: WriteArgs, - description: 'Create a Slot', - resolve: scopeInvariant(scopeOptions, slotCreateResolver), + description: 'Create a Slot record', + resolve: scopeInvariant(scopeOptions, createSlot), type: SlotSchema, + args: WriteArgs, }; /** * @name exports.SlotUpdateMutation - * @summary SlotUpdate Mutation. + * @summary SlotUpdate mutation. */ module.exports.SlotUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Slots', - resolve: scopeInvariant(scopeOptions, slotUpdateResolver), + description: 'Update a Slot record', + resolve: scopeInvariant(scopeOptions, updateSlot), type: SlotSchema, + args: WriteArgs, }; /** - * @name exports.SlotDeleteMutation - * @summary SlotDelete Mutation. + * @name exports.SlotRemoveMutation + * @summary SlotRemove mutation. */ -module.exports.SlotDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Slot', - resolve: scopeInvariant(scopeOptions, slotDeleteResolver), +module.exports.SlotRemoveMutation = { + description: 'Remove a Slot record', + resolve: scopeInvariant(scopeOptions, removeSlot), type: SlotSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/slot/query.js b/src/resources/1_0_2/profiles/slot/query.js index a477ea09..c7e8ba61 100644 --- a/src/resources/1_0_2/profiles/slot/query.js +++ b/src/resources/1_0_2/profiles/slot/query.js @@ -1,55 +1,55 @@ // Schemas -const SlotSchema = require('../../schemas/slot.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SlotSchema = require('../../schemas/slot.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SlotArgs = require('../../parameters/slot.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SlotArgs = require('../../parameters/slot.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, SlotArgs); // Resolvers -const { - slotResolver, - slotListResolver, - slotInstanceResolver, -} = require('./resolver'); +const { getSlot, getSlotList, getSlotInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Slot', action: 'read', - version: '1_0_2', }; /** * @name exports.SlotQuery - * @summary Slot Query. + * @summary Slot query. */ module.exports.SlotQuery = { - args: Object.assign({}, CommonArgs, SlotArgs), description: 'Query for a single Slot', - resolve: scopeInvariant(scopeOptions, slotResolver), + resolve: scopeInvariant(scopeOptions, getSlot), type: SlotSchema, + args: args, }; /** * @name exports.SlotListQuery - * @summary SlotList Query. + * @summary Slot query. */ module.exports.SlotListQuery = { - args: Object.assign({}, CommonArgs, SlotArgs), - description: 'Query for multiple Slots', - resolve: scopeInvariant(scopeOptions, slotListResolver), + description: 'Query for a more than or just one Slot', + resolve: scopeInvariant(scopeOptions, getSlotList), type: BundleSchema, + args: args, }; /** * @name exports.SlotInstanceQuery - * @summary SlotInstance Query. + * @summary Slot query. */ module.exports.SlotInstanceQuery = { - description: 'Get information about a single Slot', - resolve: scopeInvariant(scopeOptions, slotInstanceResolver), + description: 'Access information about a single Slot', + resolve: scopeInvariant(scopeOptions, getSlotInstance), type: SlotSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/slot/index.js b/src/resources/1_0_2/profiles/slot/register.js similarity index 93% rename from src/resources/1_0_2/profiles/slot/index.js rename to src/resources/1_0_2/profiles/slot/register.js index 186a1732..47b2ae2b 100644 --- a/src/resources/1_0_2/profiles/slot/index.js +++ b/src/resources/1_0_2/profiles/slot/register.js @@ -1,11 +1,11 @@ -const { SlotQuery, SlotListQuery, SlotInstanceQuery } = require('./query'); - const { SlotCreateMutation, SlotUpdateMutation, - SlotDeleteMutation, + SlotRemoveMutation, } = require('./mutation'); +const { SlotQuery, SlotListQuery, SlotInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { SlotCreate: SlotCreateMutation, SlotUpdate: SlotUpdateMutation, - SlotDelete: SlotDeleteMutation, + SlotRemove: SlotRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Slot', path: '/1_0_2/Slot/:id', query: SlotInstanceQuery, diff --git a/src/resources/1_0_2/profiles/slot/resolver.js b/src/resources/1_0_2/profiles/slot/resolver.js index fff5043c..6c533648 100644 --- a/src/resources/1_0_2/profiles/slot/resolver.js +++ b/src/resources/1_0_2/profiles/slot/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.slotResolver + * @name exports.getSlot * @static - * @summary Slot Resolver. + * @summary Slot resolver. */ -module.exports.slotResolver = function slotResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getSlot = function getSlot(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotListResolver + * @name exports.getSlotList * @static - * @summary Slot List Resolver. + * @summary Slot list resolver. */ -module.exports.slotListResolver = function slotListResolver( +module.exports.getSlotList = function getSlotList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotInstanceResolver + * @name exports.getSlotInstance * @static - * @summary Slot Instance Resolver. + * @summary Slot instance resolver. */ -module.exports.slotInstanceResolver = function slotInstanceResolver( +module.exports.getSlotInstance = function getSlotInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotCreateResolver + * @name exports.createSlot * @static - * @summary Slot Create Resolver. + * @summary Create Slot resolver. */ -module.exports.slotCreateResolver = function slotCreateResolver( +module.exports.createSlot = function createSlot( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotUpdateResolver + * @name exports.updateSlot * @static - * @summary Slot Update Resolver. + * @summary Update Slot resolver. */ -module.exports.slotUpdateResolver = function slotUpdateResolver( +module.exports.updateSlot = function updateSlot( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotDeleteResolver + * @name exports.removeSlot * @static - * @summary Slot Delete Resolver. + * @summary Remove Slot resolver. */ -module.exports.slotDeleteResolver = function slotDeleteResolver( +module.exports.removeSlot = function removeSlot( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/specimen/mutation.js b/src/resources/1_0_2/profiles/specimen/mutation.js index 3898d359..e6ec47bc 100644 --- a/src/resources/1_0_2/profiles/specimen/mutation.js +++ b/src/resources/1_0_2/profiles/specimen/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SpecimenSchema = require('../../schemas/specimen.schema'); +const SpecimenSchema = require('../../schemas/specimen.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SpecimenInput = require('../../inputs/specimen.input'); +const SpecimenInput = require('../../inputs/specimen.input.js'); -// Resolvers -const { - specimenCreateResolver, - specimenUpdateResolver, - specimenDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSpecimen, + updateSpecimen, + removeSpecimen, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Specimen', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Specimen record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Specimen record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.SpecimenCreateMutation - * @summary SpecimenCreate Mutation. + * @summary SpecimenCreate mutation. */ module.exports.SpecimenCreateMutation = { - args: WriteArgs, - description: 'Create a Specimen', - resolve: scopeInvariant(scopeOptions, specimenCreateResolver), + description: 'Create a Specimen record', + resolve: scopeInvariant(scopeOptions, createSpecimen), type: SpecimenSchema, + args: WriteArgs, }; /** * @name exports.SpecimenUpdateMutation - * @summary SpecimenUpdate Mutation. + * @summary SpecimenUpdate mutation. */ module.exports.SpecimenUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Specimens', - resolve: scopeInvariant(scopeOptions, specimenUpdateResolver), + description: 'Update a Specimen record', + resolve: scopeInvariant(scopeOptions, updateSpecimen), type: SpecimenSchema, + args: WriteArgs, }; /** - * @name exports.SpecimenDeleteMutation - * @summary SpecimenDelete Mutation. + * @name exports.SpecimenRemoveMutation + * @summary SpecimenRemove mutation. */ -module.exports.SpecimenDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Specimen', - resolve: scopeInvariant(scopeOptions, specimenDeleteResolver), +module.exports.SpecimenRemoveMutation = { + description: 'Remove a Specimen record', + resolve: scopeInvariant(scopeOptions, removeSpecimen), type: SpecimenSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/specimen/query.js b/src/resources/1_0_2/profiles/specimen/query.js index d3d24b9f..35ed01ce 100644 --- a/src/resources/1_0_2/profiles/specimen/query.js +++ b/src/resources/1_0_2/profiles/specimen/query.js @@ -1,55 +1,59 @@ // Schemas -const SpecimenSchema = require('../../schemas/specimen.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SpecimenSchema = require('../../schemas/specimen.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SpecimenArgs = require('../../parameters/specimen.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SpecimenArgs = require('../../parameters/specimen.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, SpecimenArgs); // Resolvers const { - specimenResolver, - specimenListResolver, - specimenInstanceResolver, + getSpecimen, + getSpecimenList, + getSpecimenInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Specimen', action: 'read', - version: '1_0_2', }; /** * @name exports.SpecimenQuery - * @summary Specimen Query. + * @summary Specimen query. */ module.exports.SpecimenQuery = { - args: Object.assign({}, CommonArgs, SpecimenArgs), description: 'Query for a single Specimen', - resolve: scopeInvariant(scopeOptions, specimenResolver), + resolve: scopeInvariant(scopeOptions, getSpecimen), type: SpecimenSchema, + args: args, }; /** * @name exports.SpecimenListQuery - * @summary SpecimenList Query. + * @summary Specimen query. */ module.exports.SpecimenListQuery = { - args: Object.assign({}, CommonArgs, SpecimenArgs), - description: 'Query for multiple Specimens', - resolve: scopeInvariant(scopeOptions, specimenListResolver), + description: 'Query for a more than or just one Specimen', + resolve: scopeInvariant(scopeOptions, getSpecimenList), type: BundleSchema, + args: args, }; /** * @name exports.SpecimenInstanceQuery - * @summary SpecimenInstance Query. + * @summary Specimen query. */ module.exports.SpecimenInstanceQuery = { - description: 'Get information about a single Specimen', - resolve: scopeInvariant(scopeOptions, specimenInstanceResolver), + description: 'Access information about a single Specimen', + resolve: scopeInvariant(scopeOptions, getSpecimenInstance), type: SpecimenSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/specimen/index.js b/src/resources/1_0_2/profiles/specimen/register.js similarity index 92% rename from src/resources/1_0_2/profiles/specimen/index.js rename to src/resources/1_0_2/profiles/specimen/register.js index deb60545..edadb16e 100644 --- a/src/resources/1_0_2/profiles/specimen/index.js +++ b/src/resources/1_0_2/profiles/specimen/register.js @@ -1,15 +1,15 @@ +const { + SpecimenCreateMutation, + SpecimenUpdateMutation, + SpecimenRemoveMutation, +} = require('./mutation'); + const { SpecimenQuery, SpecimenListQuery, SpecimenInstanceQuery, } = require('./query'); -const { - SpecimenCreateMutation, - SpecimenUpdateMutation, - SpecimenDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SpecimenCreate: SpecimenCreateMutation, SpecimenUpdate: SpecimenUpdateMutation, - SpecimenDelete: SpecimenDeleteMutation, + SpecimenRemove: SpecimenRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Specimen', path: '/1_0_2/Specimen/:id', query: SpecimenInstanceQuery, diff --git a/src/resources/1_0_2/profiles/specimen/resolver.js b/src/resources/1_0_2/profiles/specimen/resolver.js index 13af9e7e..3c829e26 100644 --- a/src/resources/1_0_2/profiles/specimen/resolver.js +++ b/src/resources/1_0_2/profiles/specimen/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.specimenResolver + * @name exports.getSpecimen * @static - * @summary Specimen Resolver. + * @summary Specimen resolver. */ -module.exports.specimenResolver = function specimenResolver( +module.exports.getSpecimen = function getSpecimen( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenListResolver + * @name exports.getSpecimenList * @static - * @summary Specimen List Resolver. + * @summary Specimen list resolver. */ -module.exports.specimenListResolver = function specimenListResolver( +module.exports.getSpecimenList = function getSpecimenList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenInstanceResolver + * @name exports.getSpecimenInstance * @static - * @summary Specimen Instance Resolver. + * @summary Specimen instance resolver. */ -module.exports.specimenInstanceResolver = function specimenInstanceResolver( +module.exports.getSpecimenInstance = function getSpecimenInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenCreateResolver + * @name exports.createSpecimen * @static - * @summary Specimen Create Resolver. + * @summary Create Specimen resolver. */ -module.exports.specimenCreateResolver = function specimenCreateResolver( +module.exports.createSpecimen = function createSpecimen( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenUpdateResolver + * @name exports.updateSpecimen * @static - * @summary Specimen Update Resolver. + * @summary Update Specimen resolver. */ -module.exports.specimenUpdateResolver = function specimenUpdateResolver( +module.exports.updateSpecimen = function updateSpecimen( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenDeleteResolver + * @name exports.removeSpecimen * @static - * @summary Specimen Delete Resolver. + * @summary Remove Specimen resolver. */ -module.exports.specimenDeleteResolver = function specimenDeleteResolver( +module.exports.removeSpecimen = function removeSpecimen( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/structuredefinition/mutation.js b/src/resources/1_0_2/profiles/structuredefinition/mutation.js index f747ef34..4e1ddcec 100644 --- a/src/resources/1_0_2/profiles/structuredefinition/mutation.js +++ b/src/resources/1_0_2/profiles/structuredefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema'); +const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const StructureDefinitionInput = require('../../inputs/structuredefinition.input'); +const StructureDefinitionInput = require('../../inputs/structuredefinition.input.js'); -// Resolvers -const { - structuredefinitionCreateResolver, - structuredefinitionUpdateResolver, - structuredefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createStructureDefinition, + updateStructureDefinition, + removeStructureDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'StructureDefinition', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a StructureDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a StructureDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.StructureDefinitionCreateMutation - * @summary StructureDefinitionCreate Mutation. + * @summary StructureDefinitionCreate mutation. */ module.exports.StructureDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a StructureDefinition', - resolve: scopeInvariant(scopeOptions, structuredefinitionCreateResolver), + description: 'Create a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, createStructureDefinition), type: StructureDefinitionSchema, + args: WriteArgs, }; /** * @name exports.StructureDefinitionUpdateMutation - * @summary StructureDefinitionUpdate Mutation. + * @summary StructureDefinitionUpdate mutation. */ module.exports.StructureDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple StructureDefinitions', - resolve: scopeInvariant(scopeOptions, structuredefinitionUpdateResolver), + description: 'Update a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, updateStructureDefinition), type: StructureDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.StructureDefinitionDeleteMutation - * @summary StructureDefinitionDelete Mutation. + * @name exports.StructureDefinitionRemoveMutation + * @summary StructureDefinitionRemove mutation. */ -module.exports.StructureDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single StructureDefinition', - resolve: scopeInvariant(scopeOptions, structuredefinitionDeleteResolver), +module.exports.StructureDefinitionRemoveMutation = { + description: 'Remove a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, removeStructureDefinition), type: StructureDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/structuredefinition/query.js b/src/resources/1_0_2/profiles/structuredefinition/query.js index d943df5f..2790111a 100644 --- a/src/resources/1_0_2/profiles/structuredefinition/query.js +++ b/src/resources/1_0_2/profiles/structuredefinition/query.js @@ -1,55 +1,59 @@ // Schemas -const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const StructureDefinitionArgs = require('../../parameters/structuredefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const StructureDefinitionArgs = require('../../parameters/structuredefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, StructureDefinitionArgs); // Resolvers const { - structuredefinitionResolver, - structuredefinitionListResolver, - structuredefinitionInstanceResolver, + getStructureDefinition, + getStructureDefinitionList, + getStructureDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'StructureDefinition', action: 'read', - version: '1_0_2', }; /** * @name exports.StructureDefinitionQuery - * @summary StructureDefinition Query. + * @summary StructureDefinition query. */ module.exports.StructureDefinitionQuery = { - args: Object.assign({}, CommonArgs, StructureDefinitionArgs), description: 'Query for a single StructureDefinition', - resolve: scopeInvariant(scopeOptions, structuredefinitionResolver), + resolve: scopeInvariant(scopeOptions, getStructureDefinition), type: StructureDefinitionSchema, + args: args, }; /** * @name exports.StructureDefinitionListQuery - * @summary StructureDefinitionList Query. + * @summary StructureDefinition query. */ module.exports.StructureDefinitionListQuery = { - args: Object.assign({}, CommonArgs, StructureDefinitionArgs), - description: 'Query for multiple StructureDefinitions', - resolve: scopeInvariant(scopeOptions, structuredefinitionListResolver), + description: 'Query for a more than or just one StructureDefinition', + resolve: scopeInvariant(scopeOptions, getStructureDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.StructureDefinitionInstanceQuery - * @summary StructureDefinitionInstance Query. + * @summary StructureDefinition query. */ module.exports.StructureDefinitionInstanceQuery = { - description: 'Get information about a single StructureDefinition', - resolve: scopeInvariant(scopeOptions, structuredefinitionInstanceResolver), + description: 'Access information about a single StructureDefinition', + resolve: scopeInvariant(scopeOptions, getStructureDefinitionInstance), type: StructureDefinitionSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/structuredefinition/index.js b/src/resources/1_0_2/profiles/structuredefinition/register.js similarity index 91% rename from src/resources/1_0_2/profiles/structuredefinition/index.js rename to src/resources/1_0_2/profiles/structuredefinition/register.js index 4ecd20ca..d3177434 100644 --- a/src/resources/1_0_2/profiles/structuredefinition/index.js +++ b/src/resources/1_0_2/profiles/structuredefinition/register.js @@ -1,15 +1,15 @@ +const { + StructureDefinitionCreateMutation, + StructureDefinitionUpdateMutation, + StructureDefinitionRemoveMutation, +} = require('./mutation'); + const { StructureDefinitionQuery, StructureDefinitionListQuery, StructureDefinitionInstanceQuery, } = require('./query'); -const { - StructureDefinitionCreateMutation, - StructureDefinitionUpdateMutation, - StructureDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { StructureDefinitionCreate: StructureDefinitionCreateMutation, StructureDefinitionUpdate: StructureDefinitionUpdateMutation, - StructureDefinitionDelete: StructureDefinitionDeleteMutation, + StructureDefinitionRemove: StructureDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'StructureDefinition', path: '/1_0_2/StructureDefinition/:id', query: StructureDefinitionInstanceQuery, diff --git a/src/resources/1_0_2/profiles/structuredefinition/resolver.js b/src/resources/1_0_2/profiles/structuredefinition/resolver.js index bd462148..66e0cc14 100644 --- a/src/resources/1_0_2/profiles/structuredefinition/resolver.js +++ b/src/resources/1_0_2/profiles/structuredefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.structuredefinitionResolver + * @name exports.getStructureDefinition * @static - * @summary StructureDefinition Resolver. + * @summary StructureDefinition resolver. */ -module.exports.structuredefinitionResolver = function structuredefinitionResolver( +module.exports.getStructureDefinition = function getStructureDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionListResolver + * @name exports.getStructureDefinitionList * @static - * @summary StructureDefinition List Resolver. + * @summary StructureDefinition list resolver. */ -module.exports.structuredefinitionListResolver = function structuredefinitionListResolver( +module.exports.getStructureDefinitionList = function getStructureDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionInstanceResolver + * @name exports.getStructureDefinitionInstance * @static - * @summary StructureDefinition Instance Resolver. + * @summary StructureDefinition instance resolver. */ -module.exports.structuredefinitionInstanceResolver = function structuredefinitionInstanceResolver( +module.exports.getStructureDefinitionInstance = function getStructureDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionCreateResolver + * @name exports.createStructureDefinition * @static - * @summary StructureDefinition Create Resolver. + * @summary Create StructureDefinition resolver. */ -module.exports.structuredefinitionCreateResolver = function structuredefinitionCreateResolver( +module.exports.createStructureDefinition = function createStructureDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionUpdateResolver + * @name exports.updateStructureDefinition * @static - * @summary StructureDefinition Update Resolver. + * @summary Update StructureDefinition resolver. */ -module.exports.structuredefinitionUpdateResolver = function structuredefinitionUpdateResolver( +module.exports.updateStructureDefinition = function updateStructureDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionDeleteResolver + * @name exports.removeStructureDefinition * @static - * @summary StructureDefinition Delete Resolver. + * @summary Remove StructureDefinition resolver. */ -module.exports.structuredefinitionDeleteResolver = function structuredefinitionDeleteResolver( +module.exports.removeStructureDefinition = function removeStructureDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/subscription/mutation.js b/src/resources/1_0_2/profiles/subscription/mutation.js index a389882a..e23edf53 100644 --- a/src/resources/1_0_2/profiles/subscription/mutation.js +++ b/src/resources/1_0_2/profiles/subscription/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SubscriptionSchema = require('../../schemas/subscription.schema'); +const SubscriptionSchema = require('../../schemas/subscription.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SubscriptionInput = require('../../inputs/subscription.input'); +const SubscriptionInput = require('../../inputs/subscription.input.js'); -// Resolvers -const { - subscriptionCreateResolver, - subscriptionUpdateResolver, - subscriptionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSubscription, + updateSubscription, + removeSubscription, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Subscription', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Subscription record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Subscription record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.SubscriptionCreateMutation - * @summary SubscriptionCreate Mutation. + * @summary SubscriptionCreate mutation. */ module.exports.SubscriptionCreateMutation = { - args: WriteArgs, - description: 'Create a Subscription', - resolve: scopeInvariant(scopeOptions, subscriptionCreateResolver), + description: 'Create a Subscription record', + resolve: scopeInvariant(scopeOptions, createSubscription), type: SubscriptionSchema, + args: WriteArgs, }; /** * @name exports.SubscriptionUpdateMutation - * @summary SubscriptionUpdate Mutation. + * @summary SubscriptionUpdate mutation. */ module.exports.SubscriptionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Subscriptions', - resolve: scopeInvariant(scopeOptions, subscriptionUpdateResolver), + description: 'Update a Subscription record', + resolve: scopeInvariant(scopeOptions, updateSubscription), type: SubscriptionSchema, + args: WriteArgs, }; /** - * @name exports.SubscriptionDeleteMutation - * @summary SubscriptionDelete Mutation. + * @name exports.SubscriptionRemoveMutation + * @summary SubscriptionRemove mutation. */ -module.exports.SubscriptionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Subscription', - resolve: scopeInvariant(scopeOptions, subscriptionDeleteResolver), +module.exports.SubscriptionRemoveMutation = { + description: 'Remove a Subscription record', + resolve: scopeInvariant(scopeOptions, removeSubscription), type: SubscriptionSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/subscription/query.js b/src/resources/1_0_2/profiles/subscription/query.js index be1c9f34..38eb27f3 100644 --- a/src/resources/1_0_2/profiles/subscription/query.js +++ b/src/resources/1_0_2/profiles/subscription/query.js @@ -1,55 +1,59 @@ // Schemas -const SubscriptionSchema = require('../../schemas/subscription.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SubscriptionSchema = require('../../schemas/subscription.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SubscriptionArgs = require('../../parameters/subscription.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SubscriptionArgs = require('../../parameters/subscription.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, SubscriptionArgs); // Resolvers const { - subscriptionResolver, - subscriptionListResolver, - subscriptionInstanceResolver, + getSubscription, + getSubscriptionList, + getSubscriptionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Subscription', action: 'read', - version: '1_0_2', }; /** * @name exports.SubscriptionQuery - * @summary Subscription Query. + * @summary Subscription query. */ module.exports.SubscriptionQuery = { - args: Object.assign({}, CommonArgs, SubscriptionArgs), description: 'Query for a single Subscription', - resolve: scopeInvariant(scopeOptions, subscriptionResolver), + resolve: scopeInvariant(scopeOptions, getSubscription), type: SubscriptionSchema, + args: args, }; /** * @name exports.SubscriptionListQuery - * @summary SubscriptionList Query. + * @summary Subscription query. */ module.exports.SubscriptionListQuery = { - args: Object.assign({}, CommonArgs, SubscriptionArgs), - description: 'Query for multiple Subscriptions', - resolve: scopeInvariant(scopeOptions, subscriptionListResolver), + description: 'Query for a more than or just one Subscription', + resolve: scopeInvariant(scopeOptions, getSubscriptionList), type: BundleSchema, + args: args, }; /** * @name exports.SubscriptionInstanceQuery - * @summary SubscriptionInstance Query. + * @summary Subscription query. */ module.exports.SubscriptionInstanceQuery = { - description: 'Get information about a single Subscription', - resolve: scopeInvariant(scopeOptions, subscriptionInstanceResolver), + description: 'Access information about a single Subscription', + resolve: scopeInvariant(scopeOptions, getSubscriptionInstance), type: SubscriptionSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/subscription/index.js b/src/resources/1_0_2/profiles/subscription/register.js similarity index 92% rename from src/resources/1_0_2/profiles/subscription/index.js rename to src/resources/1_0_2/profiles/subscription/register.js index f1c52ec7..695f1670 100644 --- a/src/resources/1_0_2/profiles/subscription/index.js +++ b/src/resources/1_0_2/profiles/subscription/register.js @@ -1,15 +1,15 @@ +const { + SubscriptionCreateMutation, + SubscriptionUpdateMutation, + SubscriptionRemoveMutation, +} = require('./mutation'); + const { SubscriptionQuery, SubscriptionListQuery, SubscriptionInstanceQuery, } = require('./query'); -const { - SubscriptionCreateMutation, - SubscriptionUpdateMutation, - SubscriptionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SubscriptionCreate: SubscriptionCreateMutation, SubscriptionUpdate: SubscriptionUpdateMutation, - SubscriptionDelete: SubscriptionDeleteMutation, + SubscriptionRemove: SubscriptionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Subscription', path: '/1_0_2/Subscription/:id', query: SubscriptionInstanceQuery, diff --git a/src/resources/1_0_2/profiles/subscription/resolver.js b/src/resources/1_0_2/profiles/subscription/resolver.js index f3a6a0f9..6c5c864a 100644 --- a/src/resources/1_0_2/profiles/subscription/resolver.js +++ b/src/resources/1_0_2/profiles/subscription/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.subscriptionResolver + * @name exports.getSubscription * @static - * @summary Subscription Resolver. + * @summary Subscription resolver. */ -module.exports.subscriptionResolver = function subscriptionResolver( +module.exports.getSubscription = function getSubscription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionListResolver + * @name exports.getSubscriptionList * @static - * @summary Subscription List Resolver. + * @summary Subscription list resolver. */ -module.exports.subscriptionListResolver = function subscriptionListResolver( +module.exports.getSubscriptionList = function getSubscriptionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionInstanceResolver + * @name exports.getSubscriptionInstance * @static - * @summary Subscription Instance Resolver. + * @summary Subscription instance resolver. */ -module.exports.subscriptionInstanceResolver = function subscriptionInstanceResolver( +module.exports.getSubscriptionInstance = function getSubscriptionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionCreateResolver + * @name exports.createSubscription * @static - * @summary Subscription Create Resolver. + * @summary Create Subscription resolver. */ -module.exports.subscriptionCreateResolver = function subscriptionCreateResolver( +module.exports.createSubscription = function createSubscription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionUpdateResolver + * @name exports.updateSubscription * @static - * @summary Subscription Update Resolver. + * @summary Update Subscription resolver. */ -module.exports.subscriptionUpdateResolver = function subscriptionUpdateResolver( +module.exports.updateSubscription = function updateSubscription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionDeleteResolver + * @name exports.removeSubscription * @static - * @summary Subscription Delete Resolver. + * @summary Remove Subscription resolver. */ -module.exports.subscriptionDeleteResolver = function subscriptionDeleteResolver( +module.exports.removeSubscription = function removeSubscription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/substance/mutation.js b/src/resources/1_0_2/profiles/substance/mutation.js index 2d09915a..660b442b 100644 --- a/src/resources/1_0_2/profiles/substance/mutation.js +++ b/src/resources/1_0_2/profiles/substance/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SubstanceSchema = require('../../schemas/substance.schema'); +const SubstanceSchema = require('../../schemas/substance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SubstanceInput = require('../../inputs/substance.input'); +const SubstanceInput = require('../../inputs/substance.input.js'); -// Resolvers -const { - substanceCreateResolver, - substanceUpdateResolver, - substanceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSubstance, + updateSubstance, + removeSubstance, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Substance', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Substance record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Substance record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.SubstanceCreateMutation - * @summary SubstanceCreate Mutation. + * @summary SubstanceCreate mutation. */ module.exports.SubstanceCreateMutation = { - args: WriteArgs, - description: 'Create a Substance', - resolve: scopeInvariant(scopeOptions, substanceCreateResolver), + description: 'Create a Substance record', + resolve: scopeInvariant(scopeOptions, createSubstance), type: SubstanceSchema, + args: WriteArgs, }; /** * @name exports.SubstanceUpdateMutation - * @summary SubstanceUpdate Mutation. + * @summary SubstanceUpdate mutation. */ module.exports.SubstanceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Substances', - resolve: scopeInvariant(scopeOptions, substanceUpdateResolver), + description: 'Update a Substance record', + resolve: scopeInvariant(scopeOptions, updateSubstance), type: SubstanceSchema, + args: WriteArgs, }; /** - * @name exports.SubstanceDeleteMutation - * @summary SubstanceDelete Mutation. + * @name exports.SubstanceRemoveMutation + * @summary SubstanceRemove mutation. */ -module.exports.SubstanceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Substance', - resolve: scopeInvariant(scopeOptions, substanceDeleteResolver), +module.exports.SubstanceRemoveMutation = { + description: 'Remove a Substance record', + resolve: scopeInvariant(scopeOptions, removeSubstance), type: SubstanceSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/substance/query.js b/src/resources/1_0_2/profiles/substance/query.js index 1ab93b0d..9a341f48 100644 --- a/src/resources/1_0_2/profiles/substance/query.js +++ b/src/resources/1_0_2/profiles/substance/query.js @@ -1,55 +1,59 @@ // Schemas -const SubstanceSchema = require('../../schemas/substance.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SubstanceSchema = require('../../schemas/substance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SubstanceArgs = require('../../parameters/substance.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SubstanceArgs = require('../../parameters/substance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, SubstanceArgs); // Resolvers const { - substanceResolver, - substanceListResolver, - substanceInstanceResolver, + getSubstance, + getSubstanceList, + getSubstanceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Substance', action: 'read', - version: '1_0_2', }; /** * @name exports.SubstanceQuery - * @summary Substance Query. + * @summary Substance query. */ module.exports.SubstanceQuery = { - args: Object.assign({}, CommonArgs, SubstanceArgs), description: 'Query for a single Substance', - resolve: scopeInvariant(scopeOptions, substanceResolver), + resolve: scopeInvariant(scopeOptions, getSubstance), type: SubstanceSchema, + args: args, }; /** * @name exports.SubstanceListQuery - * @summary SubstanceList Query. + * @summary Substance query. */ module.exports.SubstanceListQuery = { - args: Object.assign({}, CommonArgs, SubstanceArgs), - description: 'Query for multiple Substances', - resolve: scopeInvariant(scopeOptions, substanceListResolver), + description: 'Query for a more than or just one Substance', + resolve: scopeInvariant(scopeOptions, getSubstanceList), type: BundleSchema, + args: args, }; /** * @name exports.SubstanceInstanceQuery - * @summary SubstanceInstance Query. + * @summary Substance query. */ module.exports.SubstanceInstanceQuery = { - description: 'Get information about a single Substance', - resolve: scopeInvariant(scopeOptions, substanceInstanceResolver), + description: 'Access information about a single Substance', + resolve: scopeInvariant(scopeOptions, getSubstanceInstance), type: SubstanceSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/substance/index.js b/src/resources/1_0_2/profiles/substance/register.js similarity index 92% rename from src/resources/1_0_2/profiles/substance/index.js rename to src/resources/1_0_2/profiles/substance/register.js index 26098d02..696e6164 100644 --- a/src/resources/1_0_2/profiles/substance/index.js +++ b/src/resources/1_0_2/profiles/substance/register.js @@ -1,15 +1,15 @@ +const { + SubstanceCreateMutation, + SubstanceUpdateMutation, + SubstanceRemoveMutation, +} = require('./mutation'); + const { SubstanceQuery, SubstanceListQuery, SubstanceInstanceQuery, } = require('./query'); -const { - SubstanceCreateMutation, - SubstanceUpdateMutation, - SubstanceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SubstanceCreate: SubstanceCreateMutation, SubstanceUpdate: SubstanceUpdateMutation, - SubstanceDelete: SubstanceDeleteMutation, + SubstanceRemove: SubstanceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Substance', path: '/1_0_2/Substance/:id', query: SubstanceInstanceQuery, diff --git a/src/resources/1_0_2/profiles/substance/resolver.js b/src/resources/1_0_2/profiles/substance/resolver.js index 3cfb6ed5..2c04b7f3 100644 --- a/src/resources/1_0_2/profiles/substance/resolver.js +++ b/src/resources/1_0_2/profiles/substance/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.substanceResolver + * @name exports.getSubstance * @static - * @summary Substance Resolver. + * @summary Substance resolver. */ -module.exports.substanceResolver = function substanceResolver( +module.exports.getSubstance = function getSubstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceListResolver + * @name exports.getSubstanceList * @static - * @summary Substance List Resolver. + * @summary Substance list resolver. */ -module.exports.substanceListResolver = function substanceListResolver( +module.exports.getSubstanceList = function getSubstanceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceInstanceResolver + * @name exports.getSubstanceInstance * @static - * @summary Substance Instance Resolver. + * @summary Substance instance resolver. */ -module.exports.substanceInstanceResolver = function substanceInstanceResolver( +module.exports.getSubstanceInstance = function getSubstanceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceCreateResolver + * @name exports.createSubstance * @static - * @summary Substance Create Resolver. + * @summary Create Substance resolver. */ -module.exports.substanceCreateResolver = function substanceCreateResolver( +module.exports.createSubstance = function createSubstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceUpdateResolver + * @name exports.updateSubstance * @static - * @summary Substance Update Resolver. + * @summary Update Substance resolver. */ -module.exports.substanceUpdateResolver = function substanceUpdateResolver( +module.exports.updateSubstance = function updateSubstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceDeleteResolver + * @name exports.removeSubstance * @static - * @summary Substance Delete Resolver. + * @summary Remove Substance resolver. */ -module.exports.substanceDeleteResolver = function substanceDeleteResolver( +module.exports.removeSubstance = function removeSubstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/supplydelivery/mutation.js b/src/resources/1_0_2/profiles/supplydelivery/mutation.js index ce0d2c0c..84b89de7 100644 --- a/src/resources/1_0_2/profiles/supplydelivery/mutation.js +++ b/src/resources/1_0_2/profiles/supplydelivery/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema'); +const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SupplyDeliveryInput = require('../../inputs/supplydelivery.input'); +const SupplyDeliveryInput = require('../../inputs/supplydelivery.input.js'); -// Resolvers -const { - supplydeliveryCreateResolver, - supplydeliveryUpdateResolver, - supplydeliveryDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSupplyDelivery, + updateSupplyDelivery, + removeSupplyDelivery, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SupplyDelivery', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a SupplyDelivery record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a SupplyDelivery record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.SupplyDeliveryCreateMutation - * @summary SupplyDeliveryCreate Mutation. + * @summary SupplyDeliveryCreate mutation. */ module.exports.SupplyDeliveryCreateMutation = { - args: WriteArgs, - description: 'Create a SupplyDelivery', - resolve: scopeInvariant(scopeOptions, supplydeliveryCreateResolver), + description: 'Create a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, createSupplyDelivery), type: SupplyDeliverySchema, + args: WriteArgs, }; /** * @name exports.SupplyDeliveryUpdateMutation - * @summary SupplyDeliveryUpdate Mutation. + * @summary SupplyDeliveryUpdate mutation. */ module.exports.SupplyDeliveryUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple SupplyDeliverys', - resolve: scopeInvariant(scopeOptions, supplydeliveryUpdateResolver), + description: 'Update a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, updateSupplyDelivery), type: SupplyDeliverySchema, + args: WriteArgs, }; /** - * @name exports.SupplyDeliveryDeleteMutation - * @summary SupplyDeliveryDelete Mutation. + * @name exports.SupplyDeliveryRemoveMutation + * @summary SupplyDeliveryRemove mutation. */ -module.exports.SupplyDeliveryDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single SupplyDelivery', - resolve: scopeInvariant(scopeOptions, supplydeliveryDeleteResolver), +module.exports.SupplyDeliveryRemoveMutation = { + description: 'Remove a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, removeSupplyDelivery), type: SupplyDeliverySchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/supplydelivery/query.js b/src/resources/1_0_2/profiles/supplydelivery/query.js index 443b41ed..11877ee2 100644 --- a/src/resources/1_0_2/profiles/supplydelivery/query.js +++ b/src/resources/1_0_2/profiles/supplydelivery/query.js @@ -1,55 +1,59 @@ // Schemas -const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SupplyDeliveryArgs = require('../../parameters/supplydelivery.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SupplyDeliveryArgs = require('../../parameters/supplydelivery.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, SupplyDeliveryArgs); // Resolvers const { - supplydeliveryResolver, - supplydeliveryListResolver, - supplydeliveryInstanceResolver, + getSupplyDelivery, + getSupplyDeliveryList, + getSupplyDeliveryInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SupplyDelivery', action: 'read', - version: '1_0_2', }; /** * @name exports.SupplyDeliveryQuery - * @summary SupplyDelivery Query. + * @summary SupplyDelivery query. */ module.exports.SupplyDeliveryQuery = { - args: Object.assign({}, CommonArgs, SupplyDeliveryArgs), description: 'Query for a single SupplyDelivery', - resolve: scopeInvariant(scopeOptions, supplydeliveryResolver), + resolve: scopeInvariant(scopeOptions, getSupplyDelivery), type: SupplyDeliverySchema, + args: args, }; /** * @name exports.SupplyDeliveryListQuery - * @summary SupplyDeliveryList Query. + * @summary SupplyDelivery query. */ module.exports.SupplyDeliveryListQuery = { - args: Object.assign({}, CommonArgs, SupplyDeliveryArgs), - description: 'Query for multiple SupplyDeliverys', - resolve: scopeInvariant(scopeOptions, supplydeliveryListResolver), + description: 'Query for a more than or just one SupplyDelivery', + resolve: scopeInvariant(scopeOptions, getSupplyDeliveryList), type: BundleSchema, + args: args, }; /** * @name exports.SupplyDeliveryInstanceQuery - * @summary SupplyDeliveryInstance Query. + * @summary SupplyDelivery query. */ module.exports.SupplyDeliveryInstanceQuery = { - description: 'Get information about a single SupplyDelivery', - resolve: scopeInvariant(scopeOptions, supplydeliveryInstanceResolver), + description: 'Access information about a single SupplyDelivery', + resolve: scopeInvariant(scopeOptions, getSupplyDeliveryInstance), type: SupplyDeliverySchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/supplydelivery/index.js b/src/resources/1_0_2/profiles/supplydelivery/register.js similarity index 92% rename from src/resources/1_0_2/profiles/supplydelivery/index.js rename to src/resources/1_0_2/profiles/supplydelivery/register.js index 1628a645..753fd74b 100644 --- a/src/resources/1_0_2/profiles/supplydelivery/index.js +++ b/src/resources/1_0_2/profiles/supplydelivery/register.js @@ -1,15 +1,15 @@ +const { + SupplyDeliveryCreateMutation, + SupplyDeliveryUpdateMutation, + SupplyDeliveryRemoveMutation, +} = require('./mutation'); + const { SupplyDeliveryQuery, SupplyDeliveryListQuery, SupplyDeliveryInstanceQuery, } = require('./query'); -const { - SupplyDeliveryCreateMutation, - SupplyDeliveryUpdateMutation, - SupplyDeliveryDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SupplyDeliveryCreate: SupplyDeliveryCreateMutation, SupplyDeliveryUpdate: SupplyDeliveryUpdateMutation, - SupplyDeliveryDelete: SupplyDeliveryDeleteMutation, + SupplyDeliveryRemove: SupplyDeliveryRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'SupplyDelivery', path: '/1_0_2/SupplyDelivery/:id', query: SupplyDeliveryInstanceQuery, diff --git a/src/resources/1_0_2/profiles/supplydelivery/resolver.js b/src/resources/1_0_2/profiles/supplydelivery/resolver.js index f5caeed2..0ceb2dbf 100644 --- a/src/resources/1_0_2/profiles/supplydelivery/resolver.js +++ b/src/resources/1_0_2/profiles/supplydelivery/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.supplydeliveryResolver + * @name exports.getSupplyDelivery * @static - * @summary SupplyDelivery Resolver. + * @summary SupplyDelivery resolver. */ -module.exports.supplydeliveryResolver = function supplydeliveryResolver( +module.exports.getSupplyDelivery = function getSupplyDelivery( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryListResolver + * @name exports.getSupplyDeliveryList * @static - * @summary SupplyDelivery List Resolver. + * @summary SupplyDelivery list resolver. */ -module.exports.supplydeliveryListResolver = function supplydeliveryListResolver( +module.exports.getSupplyDeliveryList = function getSupplyDeliveryList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryInstanceResolver + * @name exports.getSupplyDeliveryInstance * @static - * @summary SupplyDelivery Instance Resolver. + * @summary SupplyDelivery instance resolver. */ -module.exports.supplydeliveryInstanceResolver = function supplydeliveryInstanceResolver( +module.exports.getSupplyDeliveryInstance = function getSupplyDeliveryInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryCreateResolver + * @name exports.createSupplyDelivery * @static - * @summary SupplyDelivery Create Resolver. + * @summary Create SupplyDelivery resolver. */ -module.exports.supplydeliveryCreateResolver = function supplydeliveryCreateResolver( +module.exports.createSupplyDelivery = function createSupplyDelivery( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryUpdateResolver + * @name exports.updateSupplyDelivery * @static - * @summary SupplyDelivery Update Resolver. + * @summary Update SupplyDelivery resolver. */ -module.exports.supplydeliveryUpdateResolver = function supplydeliveryUpdateResolver( +module.exports.updateSupplyDelivery = function updateSupplyDelivery( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryDeleteResolver + * @name exports.removeSupplyDelivery * @static - * @summary SupplyDelivery Delete Resolver. + * @summary Remove SupplyDelivery resolver. */ -module.exports.supplydeliveryDeleteResolver = function supplydeliveryDeleteResolver( +module.exports.removeSupplyDelivery = function removeSupplyDelivery( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/supplyrequest/mutation.js b/src/resources/1_0_2/profiles/supplyrequest/mutation.js index c05286b5..836df5e6 100644 --- a/src/resources/1_0_2/profiles/supplyrequest/mutation.js +++ b/src/resources/1_0_2/profiles/supplyrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SupplyRequestSchema = require('../../schemas/supplyrequest.schema'); +const SupplyRequestSchema = require('../../schemas/supplyrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SupplyRequestInput = require('../../inputs/supplyrequest.input'); +const SupplyRequestInput = require('../../inputs/supplyrequest.input.js'); -// Resolvers -const { - supplyrequestCreateResolver, - supplyrequestUpdateResolver, - supplyrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSupplyRequest, + updateSupplyRequest, + removeSupplyRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SupplyRequest', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a SupplyRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a SupplyRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.SupplyRequestCreateMutation - * @summary SupplyRequestCreate Mutation. + * @summary SupplyRequestCreate mutation. */ module.exports.SupplyRequestCreateMutation = { - args: WriteArgs, - description: 'Create a SupplyRequest', - resolve: scopeInvariant(scopeOptions, supplyrequestCreateResolver), + description: 'Create a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, createSupplyRequest), type: SupplyRequestSchema, + args: WriteArgs, }; /** * @name exports.SupplyRequestUpdateMutation - * @summary SupplyRequestUpdate Mutation. + * @summary SupplyRequestUpdate mutation. */ module.exports.SupplyRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple SupplyRequests', - resolve: scopeInvariant(scopeOptions, supplyrequestUpdateResolver), + description: 'Update a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, updateSupplyRequest), type: SupplyRequestSchema, + args: WriteArgs, }; /** - * @name exports.SupplyRequestDeleteMutation - * @summary SupplyRequestDelete Mutation. + * @name exports.SupplyRequestRemoveMutation + * @summary SupplyRequestRemove mutation. */ -module.exports.SupplyRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single SupplyRequest', - resolve: scopeInvariant(scopeOptions, supplyrequestDeleteResolver), +module.exports.SupplyRequestRemoveMutation = { + description: 'Remove a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, removeSupplyRequest), type: SupplyRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/supplyrequest/query.js b/src/resources/1_0_2/profiles/supplyrequest/query.js index 54e717b9..630ca238 100644 --- a/src/resources/1_0_2/profiles/supplyrequest/query.js +++ b/src/resources/1_0_2/profiles/supplyrequest/query.js @@ -1,55 +1,59 @@ // Schemas -const SupplyRequestSchema = require('../../schemas/supplyrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SupplyRequestSchema = require('../../schemas/supplyrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SupplyRequestArgs = require('../../parameters/supplyrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SupplyRequestArgs = require('../../parameters/supplyrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, SupplyRequestArgs); // Resolvers const { - supplyrequestResolver, - supplyrequestListResolver, - supplyrequestInstanceResolver, + getSupplyRequest, + getSupplyRequestList, + getSupplyRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SupplyRequest', action: 'read', - version: '1_0_2', }; /** * @name exports.SupplyRequestQuery - * @summary SupplyRequest Query. + * @summary SupplyRequest query. */ module.exports.SupplyRequestQuery = { - args: Object.assign({}, CommonArgs, SupplyRequestArgs), description: 'Query for a single SupplyRequest', - resolve: scopeInvariant(scopeOptions, supplyrequestResolver), + resolve: scopeInvariant(scopeOptions, getSupplyRequest), type: SupplyRequestSchema, + args: args, }; /** * @name exports.SupplyRequestListQuery - * @summary SupplyRequestList Query. + * @summary SupplyRequest query. */ module.exports.SupplyRequestListQuery = { - args: Object.assign({}, CommonArgs, SupplyRequestArgs), - description: 'Query for multiple SupplyRequests', - resolve: scopeInvariant(scopeOptions, supplyrequestListResolver), + description: 'Query for a more than or just one SupplyRequest', + resolve: scopeInvariant(scopeOptions, getSupplyRequestList), type: BundleSchema, + args: args, }; /** * @name exports.SupplyRequestInstanceQuery - * @summary SupplyRequestInstance Query. + * @summary SupplyRequest query. */ module.exports.SupplyRequestInstanceQuery = { - description: 'Get information about a single SupplyRequest', - resolve: scopeInvariant(scopeOptions, supplyrequestInstanceResolver), + description: 'Access information about a single SupplyRequest', + resolve: scopeInvariant(scopeOptions, getSupplyRequestInstance), type: SupplyRequestSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/supplyrequest/index.js b/src/resources/1_0_2/profiles/supplyrequest/register.js similarity index 92% rename from src/resources/1_0_2/profiles/supplyrequest/index.js rename to src/resources/1_0_2/profiles/supplyrequest/register.js index 4162678e..a9c11c81 100644 --- a/src/resources/1_0_2/profiles/supplyrequest/index.js +++ b/src/resources/1_0_2/profiles/supplyrequest/register.js @@ -1,15 +1,15 @@ +const { + SupplyRequestCreateMutation, + SupplyRequestUpdateMutation, + SupplyRequestRemoveMutation, +} = require('./mutation'); + const { SupplyRequestQuery, SupplyRequestListQuery, SupplyRequestInstanceQuery, } = require('./query'); -const { - SupplyRequestCreateMutation, - SupplyRequestUpdateMutation, - SupplyRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SupplyRequestCreate: SupplyRequestCreateMutation, SupplyRequestUpdate: SupplyRequestUpdateMutation, - SupplyRequestDelete: SupplyRequestDeleteMutation, + SupplyRequestRemove: SupplyRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'SupplyRequest', path: '/1_0_2/SupplyRequest/:id', query: SupplyRequestInstanceQuery, diff --git a/src/resources/1_0_2/profiles/supplyrequest/resolver.js b/src/resources/1_0_2/profiles/supplyrequest/resolver.js index 162dd8b4..13869b26 100644 --- a/src/resources/1_0_2/profiles/supplyrequest/resolver.js +++ b/src/resources/1_0_2/profiles/supplyrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.supplyrequestResolver + * @name exports.getSupplyRequest * @static - * @summary SupplyRequest Resolver. + * @summary SupplyRequest resolver. */ -module.exports.supplyrequestResolver = function supplyrequestResolver( +module.exports.getSupplyRequest = function getSupplyRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestListResolver + * @name exports.getSupplyRequestList * @static - * @summary SupplyRequest List Resolver. + * @summary SupplyRequest list resolver. */ -module.exports.supplyrequestListResolver = function supplyrequestListResolver( +module.exports.getSupplyRequestList = function getSupplyRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestInstanceResolver + * @name exports.getSupplyRequestInstance * @static - * @summary SupplyRequest Instance Resolver. + * @summary SupplyRequest instance resolver. */ -module.exports.supplyrequestInstanceResolver = function supplyrequestInstanceResolver( +module.exports.getSupplyRequestInstance = function getSupplyRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestCreateResolver + * @name exports.createSupplyRequest * @static - * @summary SupplyRequest Create Resolver. + * @summary Create SupplyRequest resolver. */ -module.exports.supplyrequestCreateResolver = function supplyrequestCreateResolver( +module.exports.createSupplyRequest = function createSupplyRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestUpdateResolver + * @name exports.updateSupplyRequest * @static - * @summary SupplyRequest Update Resolver. + * @summary Update SupplyRequest resolver. */ -module.exports.supplyrequestUpdateResolver = function supplyrequestUpdateResolver( +module.exports.updateSupplyRequest = function updateSupplyRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestDeleteResolver + * @name exports.removeSupplyRequest * @static - * @summary SupplyRequest Delete Resolver. + * @summary Remove SupplyRequest resolver. */ -module.exports.supplyrequestDeleteResolver = function supplyrequestDeleteResolver( +module.exports.removeSupplyRequest = function removeSupplyRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/testscript/mutation.js b/src/resources/1_0_2/profiles/testscript/mutation.js index 70d81ca6..ce962fd8 100644 --- a/src/resources/1_0_2/profiles/testscript/mutation.js +++ b/src/resources/1_0_2/profiles/testscript/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const TestScriptSchema = require('../../schemas/testscript.schema'); +const TestScriptSchema = require('../../schemas/testscript.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const TestScriptInput = require('../../inputs/testscript.input'); +const TestScriptInput = require('../../inputs/testscript.input.js'); -// Resolvers -const { - testscriptCreateResolver, - testscriptUpdateResolver, - testscriptDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createTestScript, + updateTestScript, + removeTestScript, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'TestScript', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a TestScript record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a TestScript record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.TestScriptCreateMutation - * @summary TestScriptCreate Mutation. + * @summary TestScriptCreate mutation. */ module.exports.TestScriptCreateMutation = { - args: WriteArgs, - description: 'Create a TestScript', - resolve: scopeInvariant(scopeOptions, testscriptCreateResolver), + description: 'Create a TestScript record', + resolve: scopeInvariant(scopeOptions, createTestScript), type: TestScriptSchema, + args: WriteArgs, }; /** * @name exports.TestScriptUpdateMutation - * @summary TestScriptUpdate Mutation. + * @summary TestScriptUpdate mutation. */ module.exports.TestScriptUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple TestScripts', - resolve: scopeInvariant(scopeOptions, testscriptUpdateResolver), + description: 'Update a TestScript record', + resolve: scopeInvariant(scopeOptions, updateTestScript), type: TestScriptSchema, + args: WriteArgs, }; /** - * @name exports.TestScriptDeleteMutation - * @summary TestScriptDelete Mutation. + * @name exports.TestScriptRemoveMutation + * @summary TestScriptRemove mutation. */ -module.exports.TestScriptDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single TestScript', - resolve: scopeInvariant(scopeOptions, testscriptDeleteResolver), +module.exports.TestScriptRemoveMutation = { + description: 'Remove a TestScript record', + resolve: scopeInvariant(scopeOptions, removeTestScript), type: TestScriptSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/testscript/query.js b/src/resources/1_0_2/profiles/testscript/query.js index ae57a3f5..bcb74daa 100644 --- a/src/resources/1_0_2/profiles/testscript/query.js +++ b/src/resources/1_0_2/profiles/testscript/query.js @@ -1,55 +1,59 @@ // Schemas -const TestScriptSchema = require('../../schemas/testscript.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const TestScriptSchema = require('../../schemas/testscript.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const TestScriptArgs = require('../../parameters/testscript.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const TestScriptArgs = require('../../parameters/testscript.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, TestScriptArgs); // Resolvers const { - testscriptResolver, - testscriptListResolver, - testscriptInstanceResolver, + getTestScript, + getTestScriptList, + getTestScriptInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'TestScript', action: 'read', - version: '1_0_2', }; /** * @name exports.TestScriptQuery - * @summary TestScript Query. + * @summary TestScript query. */ module.exports.TestScriptQuery = { - args: Object.assign({}, CommonArgs, TestScriptArgs), description: 'Query for a single TestScript', - resolve: scopeInvariant(scopeOptions, testscriptResolver), + resolve: scopeInvariant(scopeOptions, getTestScript), type: TestScriptSchema, + args: args, }; /** * @name exports.TestScriptListQuery - * @summary TestScriptList Query. + * @summary TestScript query. */ module.exports.TestScriptListQuery = { - args: Object.assign({}, CommonArgs, TestScriptArgs), - description: 'Query for multiple TestScripts', - resolve: scopeInvariant(scopeOptions, testscriptListResolver), + description: 'Query for a more than or just one TestScript', + resolve: scopeInvariant(scopeOptions, getTestScriptList), type: BundleSchema, + args: args, }; /** * @name exports.TestScriptInstanceQuery - * @summary TestScriptInstance Query. + * @summary TestScript query. */ module.exports.TestScriptInstanceQuery = { - description: 'Get information about a single TestScript', - resolve: scopeInvariant(scopeOptions, testscriptInstanceResolver), + description: 'Access information about a single TestScript', + resolve: scopeInvariant(scopeOptions, getTestScriptInstance), type: TestScriptSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/testscript/index.js b/src/resources/1_0_2/profiles/testscript/register.js similarity index 92% rename from src/resources/1_0_2/profiles/testscript/index.js rename to src/resources/1_0_2/profiles/testscript/register.js index a90037cb..a9490c98 100644 --- a/src/resources/1_0_2/profiles/testscript/index.js +++ b/src/resources/1_0_2/profiles/testscript/register.js @@ -1,15 +1,15 @@ +const { + TestScriptCreateMutation, + TestScriptUpdateMutation, + TestScriptRemoveMutation, +} = require('./mutation'); + const { TestScriptQuery, TestScriptListQuery, TestScriptInstanceQuery, } = require('./query'); -const { - TestScriptCreateMutation, - TestScriptUpdateMutation, - TestScriptDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { TestScriptCreate: TestScriptCreateMutation, TestScriptUpdate: TestScriptUpdateMutation, - TestScriptDelete: TestScriptDeleteMutation, + TestScriptRemove: TestScriptRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'TestScript', path: '/1_0_2/TestScript/:id', query: TestScriptInstanceQuery, diff --git a/src/resources/1_0_2/profiles/testscript/resolver.js b/src/resources/1_0_2/profiles/testscript/resolver.js index ef59e7f0..10514345 100644 --- a/src/resources/1_0_2/profiles/testscript/resolver.js +++ b/src/resources/1_0_2/profiles/testscript/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.testscriptResolver + * @name exports.getTestScript * @static - * @summary TestScript Resolver. + * @summary TestScript resolver. */ -module.exports.testscriptResolver = function testscriptResolver( +module.exports.getTestScript = function getTestScript( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptListResolver + * @name exports.getTestScriptList * @static - * @summary TestScript List Resolver. + * @summary TestScript list resolver. */ -module.exports.testscriptListResolver = function testscriptListResolver( +module.exports.getTestScriptList = function getTestScriptList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptInstanceResolver + * @name exports.getTestScriptInstance * @static - * @summary TestScript Instance Resolver. + * @summary TestScript instance resolver. */ -module.exports.testscriptInstanceResolver = function testscriptInstanceResolver( +module.exports.getTestScriptInstance = function getTestScriptInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptCreateResolver + * @name exports.createTestScript * @static - * @summary TestScript Create Resolver. + * @summary Create TestScript resolver. */ -module.exports.testscriptCreateResolver = function testscriptCreateResolver( +module.exports.createTestScript = function createTestScript( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptUpdateResolver + * @name exports.updateTestScript * @static - * @summary TestScript Update Resolver. + * @summary Update TestScript resolver. */ -module.exports.testscriptUpdateResolver = function testscriptUpdateResolver( +module.exports.updateTestScript = function updateTestScript( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptDeleteResolver + * @name exports.removeTestScript * @static - * @summary TestScript Delete Resolver. + * @summary Remove TestScript resolver. */ -module.exports.testscriptDeleteResolver = function testscriptDeleteResolver( +module.exports.removeTestScript = function removeTestScript( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/valueset/mutation.js b/src/resources/1_0_2/profiles/valueset/mutation.js index b3731d62..bec4ef6f 100644 --- a/src/resources/1_0_2/profiles/valueset/mutation.js +++ b/src/resources/1_0_2/profiles/valueset/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ValueSetSchema = require('../../schemas/valueset.schema'); +const ValueSetSchema = require('../../schemas/valueset.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ValueSetInput = require('../../inputs/valueset.input'); +const ValueSetInput = require('../../inputs/valueset.input.js'); -// Resolvers -const { - valuesetCreateResolver, - valuesetUpdateResolver, - valuesetDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createValueSet, + updateValueSet, + removeValueSet, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ValueSet', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ValueSet record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ValueSet record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ValueSetCreateMutation - * @summary ValueSetCreate Mutation. + * @summary ValueSetCreate mutation. */ module.exports.ValueSetCreateMutation = { - args: WriteArgs, - description: 'Create a ValueSet', - resolve: scopeInvariant(scopeOptions, valuesetCreateResolver), + description: 'Create a ValueSet record', + resolve: scopeInvariant(scopeOptions, createValueSet), type: ValueSetSchema, + args: WriteArgs, }; /** * @name exports.ValueSetUpdateMutation - * @summary ValueSetUpdate Mutation. + * @summary ValueSetUpdate mutation. */ module.exports.ValueSetUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ValueSets', - resolve: scopeInvariant(scopeOptions, valuesetUpdateResolver), + description: 'Update a ValueSet record', + resolve: scopeInvariant(scopeOptions, updateValueSet), type: ValueSetSchema, + args: WriteArgs, }; /** - * @name exports.ValueSetDeleteMutation - * @summary ValueSetDelete Mutation. + * @name exports.ValueSetRemoveMutation + * @summary ValueSetRemove mutation. */ -module.exports.ValueSetDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ValueSet', - resolve: scopeInvariant(scopeOptions, valuesetDeleteResolver), +module.exports.ValueSetRemoveMutation = { + description: 'Remove a ValueSet record', + resolve: scopeInvariant(scopeOptions, removeValueSet), type: ValueSetSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/valueset/query.js b/src/resources/1_0_2/profiles/valueset/query.js index 45c1bf25..f376131d 100644 --- a/src/resources/1_0_2/profiles/valueset/query.js +++ b/src/resources/1_0_2/profiles/valueset/query.js @@ -1,55 +1,59 @@ // Schemas -const ValueSetSchema = require('../../schemas/valueset.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ValueSetSchema = require('../../schemas/valueset.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ValueSetArgs = require('../../parameters/valueset.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ValueSetArgs = require('../../parameters/valueset.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, ValueSetArgs); // Resolvers const { - valuesetResolver, - valuesetListResolver, - valuesetInstanceResolver, + getValueSet, + getValueSetList, + getValueSetInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ValueSet', action: 'read', - version: '1_0_2', }; /** * @name exports.ValueSetQuery - * @summary ValueSet Query. + * @summary ValueSet query. */ module.exports.ValueSetQuery = { - args: Object.assign({}, CommonArgs, ValueSetArgs), description: 'Query for a single ValueSet', - resolve: scopeInvariant(scopeOptions, valuesetResolver), + resolve: scopeInvariant(scopeOptions, getValueSet), type: ValueSetSchema, + args: args, }; /** * @name exports.ValueSetListQuery - * @summary ValueSetList Query. + * @summary ValueSet query. */ module.exports.ValueSetListQuery = { - args: Object.assign({}, CommonArgs, ValueSetArgs), - description: 'Query for multiple ValueSets', - resolve: scopeInvariant(scopeOptions, valuesetListResolver), + description: 'Query for a more than or just one ValueSet', + resolve: scopeInvariant(scopeOptions, getValueSetList), type: BundleSchema, + args: args, }; /** * @name exports.ValueSetInstanceQuery - * @summary ValueSetInstance Query. + * @summary ValueSet query. */ module.exports.ValueSetInstanceQuery = { - description: 'Get information about a single ValueSet', - resolve: scopeInvariant(scopeOptions, valuesetInstanceResolver), + description: 'Access information about a single ValueSet', + resolve: scopeInvariant(scopeOptions, getValueSetInstance), type: ValueSetSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/valueset/index.js b/src/resources/1_0_2/profiles/valueset/register.js similarity index 92% rename from src/resources/1_0_2/profiles/valueset/index.js rename to src/resources/1_0_2/profiles/valueset/register.js index b790c26c..83f61770 100644 --- a/src/resources/1_0_2/profiles/valueset/index.js +++ b/src/resources/1_0_2/profiles/valueset/register.js @@ -1,15 +1,15 @@ +const { + ValueSetCreateMutation, + ValueSetUpdateMutation, + ValueSetRemoveMutation, +} = require('./mutation'); + const { ValueSetQuery, ValueSetListQuery, ValueSetInstanceQuery, } = require('./query'); -const { - ValueSetCreateMutation, - ValueSetUpdateMutation, - ValueSetDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ValueSetCreate: ValueSetCreateMutation, ValueSetUpdate: ValueSetUpdateMutation, - ValueSetDelete: ValueSetDeleteMutation, + ValueSetRemove: ValueSetRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ValueSet', path: '/1_0_2/ValueSet/:id', query: ValueSetInstanceQuery, diff --git a/src/resources/1_0_2/profiles/valueset/resolver.js b/src/resources/1_0_2/profiles/valueset/resolver.js index 00e62350..bda77ba5 100644 --- a/src/resources/1_0_2/profiles/valueset/resolver.js +++ b/src/resources/1_0_2/profiles/valueset/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.valuesetResolver + * @name exports.getValueSet * @static - * @summary ValueSet Resolver. + * @summary ValueSet resolver. */ -module.exports.valuesetResolver = function valuesetResolver( +module.exports.getValueSet = function getValueSet( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetListResolver + * @name exports.getValueSetList * @static - * @summary ValueSet List Resolver. + * @summary ValueSet list resolver. */ -module.exports.valuesetListResolver = function valuesetListResolver( +module.exports.getValueSetList = function getValueSetList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetInstanceResolver + * @name exports.getValueSetInstance * @static - * @summary ValueSet Instance Resolver. + * @summary ValueSet instance resolver. */ -module.exports.valuesetInstanceResolver = function valuesetInstanceResolver( +module.exports.getValueSetInstance = function getValueSetInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetCreateResolver + * @name exports.createValueSet * @static - * @summary ValueSet Create Resolver. + * @summary Create ValueSet resolver. */ -module.exports.valuesetCreateResolver = function valuesetCreateResolver( +module.exports.createValueSet = function createValueSet( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetUpdateResolver + * @name exports.updateValueSet * @static - * @summary ValueSet Update Resolver. + * @summary Update ValueSet resolver. */ -module.exports.valuesetUpdateResolver = function valuesetUpdateResolver( +module.exports.updateValueSet = function updateValueSet( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetDeleteResolver + * @name exports.removeValueSet * @static - * @summary ValueSet Delete Resolver. + * @summary Remove ValueSet resolver. */ -module.exports.valuesetDeleteResolver = function valuesetDeleteResolver( +module.exports.removeValueSet = function removeValueSet( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/profiles/visionprescription/mutation.js b/src/resources/1_0_2/profiles/visionprescription/mutation.js index ad79e3ee..202c8d04 100644 --- a/src/resources/1_0_2/profiles/visionprescription/mutation.js +++ b/src/resources/1_0_2/profiles/visionprescription/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema'); +const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const VisionPrescriptionInput = require('../../inputs/visionprescription.input'); +const VisionPrescriptionInput = require('../../inputs/visionprescription.input.js'); -// Resolvers -const { - visionprescriptionCreateResolver, - visionprescriptionUpdateResolver, - visionprescriptionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createVisionPrescription, + updateVisionPrescription, + removeVisionPrescription, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'VisionPrescription', action: 'write', - version: '1_0_2', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a VisionPrescription record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a VisionPrescription record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.VisionPrescriptionCreateMutation - * @summary VisionPrescriptionCreate Mutation. + * @summary VisionPrescriptionCreate mutation. */ module.exports.VisionPrescriptionCreateMutation = { - args: WriteArgs, - description: 'Create a VisionPrescription', - resolve: scopeInvariant(scopeOptions, visionprescriptionCreateResolver), + description: 'Create a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, createVisionPrescription), type: VisionPrescriptionSchema, + args: WriteArgs, }; /** * @name exports.VisionPrescriptionUpdateMutation - * @summary VisionPrescriptionUpdate Mutation. + * @summary VisionPrescriptionUpdate mutation. */ module.exports.VisionPrescriptionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple VisionPrescriptions', - resolve: scopeInvariant(scopeOptions, visionprescriptionUpdateResolver), + description: 'Update a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, updateVisionPrescription), type: VisionPrescriptionSchema, + args: WriteArgs, }; /** - * @name exports.VisionPrescriptionDeleteMutation - * @summary VisionPrescriptionDelete Mutation. + * @name exports.VisionPrescriptionRemoveMutation + * @summary VisionPrescriptionRemove mutation. */ -module.exports.VisionPrescriptionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single VisionPrescription', - resolve: scopeInvariant(scopeOptions, visionprescriptionDeleteResolver), +module.exports.VisionPrescriptionRemoveMutation = { + description: 'Remove a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, removeVisionPrescription), type: VisionPrescriptionSchema, + args: DeleteArgs, }; diff --git a/src/resources/1_0_2/profiles/visionprescription/query.js b/src/resources/1_0_2/profiles/visionprescription/query.js index 3ac7abb7..879ca90c 100644 --- a/src/resources/1_0_2/profiles/visionprescription/query.js +++ b/src/resources/1_0_2/profiles/visionprescription/query.js @@ -1,55 +1,59 @@ // Schemas -const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const VisionPrescriptionArgs = require('../../parameters/visionprescription.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const VisionPrescriptionArgs = require('../../parameters/visionprescription.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); + +let args = Object.assign({}, ResourceArgs, VisionPrescriptionArgs); // Resolvers const { - visionprescriptionResolver, - visionprescriptionListResolver, - visionprescriptionInstanceResolver, + getVisionPrescription, + getVisionPrescriptionList, + getVisionPrescriptionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'VisionPrescription', action: 'read', - version: '1_0_2', }; /** * @name exports.VisionPrescriptionQuery - * @summary VisionPrescription Query. + * @summary VisionPrescription query. */ module.exports.VisionPrescriptionQuery = { - args: Object.assign({}, CommonArgs, VisionPrescriptionArgs), description: 'Query for a single VisionPrescription', - resolve: scopeInvariant(scopeOptions, visionprescriptionResolver), + resolve: scopeInvariant(scopeOptions, getVisionPrescription), type: VisionPrescriptionSchema, + args: args, }; /** * @name exports.VisionPrescriptionListQuery - * @summary VisionPrescriptionList Query. + * @summary VisionPrescription query. */ module.exports.VisionPrescriptionListQuery = { - args: Object.assign({}, CommonArgs, VisionPrescriptionArgs), - description: 'Query for multiple VisionPrescriptions', - resolve: scopeInvariant(scopeOptions, visionprescriptionListResolver), + description: 'Query for a more than or just one VisionPrescription', + resolve: scopeInvariant(scopeOptions, getVisionPrescriptionList), type: BundleSchema, + args: args, }; /** * @name exports.VisionPrescriptionInstanceQuery - * @summary VisionPrescriptionInstance Query. + * @summary VisionPrescription query. */ module.exports.VisionPrescriptionInstanceQuery = { - description: 'Get information about a single VisionPrescription', - resolve: scopeInvariant(scopeOptions, visionprescriptionInstanceResolver), + description: 'Access information about a single VisionPrescription', + resolve: scopeInvariant(scopeOptions, getVisionPrescriptionInstance), type: VisionPrescriptionSchema, + args: args, }; diff --git a/src/resources/1_0_2/profiles/visionprescription/index.js b/src/resources/1_0_2/profiles/visionprescription/register.js similarity index 91% rename from src/resources/1_0_2/profiles/visionprescription/index.js rename to src/resources/1_0_2/profiles/visionprescription/register.js index aa8597df..682bf2a6 100644 --- a/src/resources/1_0_2/profiles/visionprescription/index.js +++ b/src/resources/1_0_2/profiles/visionprescription/register.js @@ -1,15 +1,15 @@ +const { + VisionPrescriptionCreateMutation, + VisionPrescriptionUpdateMutation, + VisionPrescriptionRemoveMutation, +} = require('./mutation'); + const { VisionPrescriptionQuery, VisionPrescriptionListQuery, VisionPrescriptionInstanceQuery, } = require('./query'); -const { - VisionPrescriptionCreateMutation, - VisionPrescriptionUpdateMutation, - VisionPrescriptionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { VisionPrescriptionCreate: VisionPrescriptionCreateMutation, VisionPrescriptionUpdate: VisionPrescriptionUpdateMutation, - VisionPrescriptionDelete: VisionPrescriptionDeleteMutation, + VisionPrescriptionRemove: VisionPrescriptionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'VisionPrescription', path: '/1_0_2/VisionPrescription/:id', query: VisionPrescriptionInstanceQuery, diff --git a/src/resources/1_0_2/profiles/visionprescription/resolver.js b/src/resources/1_0_2/profiles/visionprescription/resolver.js index da19cafd..af219e37 100644 --- a/src/resources/1_0_2/profiles/visionprescription/resolver.js +++ b/src/resources/1_0_2/profiles/visionprescription/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.visionprescriptionResolver + * @name exports.getVisionPrescription * @static - * @summary VisionPrescription Resolver. + * @summary VisionPrescription resolver. */ -module.exports.visionprescriptionResolver = function visionprescriptionResolver( +module.exports.getVisionPrescription = function getVisionPrescription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionListResolver + * @name exports.getVisionPrescriptionList * @static - * @summary VisionPrescription List Resolver. + * @summary VisionPrescription list resolver. */ -module.exports.visionprescriptionListResolver = function visionprescriptionListResolver( +module.exports.getVisionPrescriptionList = function getVisionPrescriptionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionInstanceResolver + * @name exports.getVisionPrescriptionInstance * @static - * @summary VisionPrescription Instance Resolver. + * @summary VisionPrescription instance resolver. */ -module.exports.visionprescriptionInstanceResolver = function visionprescriptionInstanceResolver( +module.exports.getVisionPrescriptionInstance = function getVisionPrescriptionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionCreateResolver + * @name exports.createVisionPrescription * @static - * @summary VisionPrescription Create Resolver. + * @summary Create VisionPrescription resolver. */ -module.exports.visionprescriptionCreateResolver = function visionprescriptionCreateResolver( +module.exports.createVisionPrescription = function createVisionPrescription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionUpdateResolver + * @name exports.updateVisionPrescription * @static - * @summary VisionPrescription Update Resolver. + * @summary Update VisionPrescription resolver. */ -module.exports.visionprescriptionUpdateResolver = function visionprescriptionUpdateResolver( +module.exports.updateVisionPrescription = function updateVisionPrescription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionDeleteResolver + * @name exports.removeVisionPrescription * @static - * @summary VisionPrescription Delete Resolver. + * @summary Remove VisionPrescription resolver. */ -module.exports.visionprescriptionDeleteResolver = function visionprescriptionDeleteResolver( +module.exports.removeVisionPrescription = function removeVisionPrescription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/1_0_2/scalars/base64binary.scalar.js b/src/resources/1_0_2/scalars/base64binary.scalar.js index cd99cd81..50474788 100644 --- a/src/resources/1_0_2/scalars/base64binary.scalar.js +++ b/src/resources/1_0_2/scalars/base64binary.scalar.js @@ -1,22 +1,22 @@ const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); const { Kind } = require('graphql/language'); /** * @name exports - * @summary base64binary Scalar + * @summary base64Binary scalar */ module.exports = new GraphQLScalarType({ - name: 'base64binary', + name: 'base64Binary', description: - 'Base StructureDefinition for base64Binary Type: A stream of bytes.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for base64Binary Type: A stream of bytes', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { let { kind, value } = ast; return kind === Kind.STRING ? value : undefined; diff --git a/src/resources/1_0_2/scalars/boolean.scalar.js b/src/resources/1_0_2/scalars/boolean.scalar.js new file mode 100644 index 00000000..ae43c6a7 --- /dev/null +++ b/src/resources/1_0_2/scalars/boolean.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary boolean scalar + */ +module.exports = new GraphQLScalarType({ + name: 'boolean', + description: + "Base StructureDefinition for boolean Type: Value of 'true' or 'false'", + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/1_0_2/scalars/code.scalar.js b/src/resources/1_0_2/scalars/code.scalar.js index b7e0859a..9c228835 100644 --- a/src/resources/1_0_2/scalars/code.scalar.js +++ b/src/resources/1_0_2/scalars/code.scalar.js @@ -4,20 +4,19 @@ const { Kind } = require('graphql/language'); /** * @name exports - * @summary code Scalar + * @summary code scalar */ module.exports = new GraphQLScalarType({ name: 'code', description: - 'Base StructureDefinition for code type: A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for code type: A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { let { kind, value } = ast; return kind === Kind.STRING ? value : undefined; diff --git a/src/resources/1_0_2/scalars/date.scalar.js b/src/resources/1_0_2/scalars/date.scalar.js index 69d0454e..75c5ccb5 100644 --- a/src/resources/1_0_2/scalars/date.scalar.js +++ b/src/resources/1_0_2/scalars/date.scalar.js @@ -1,44 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const moment = require('moment-timezone'); -const xss = require('xss'); - -const { resolve } = require('../../../utils/resolve.utils'); -const { DATE_CONFIG } = require(resolve('config')); - -const parse = (value, ast) => { - /* date pattern was simplified from document specified pattern of: - /-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?/ - The day portion of the date is optional. ie 2018-12 or 2018-12-01 are both valid */ - let date_pattern = /^[12]\d{3}-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01]))?$/; - let sanitized_value = xss(sanitize(value)).trim(); - let is_date = date_pattern.test(sanitized_value); - return is_date - ? moment(sanitized_value).format(DATE_CONFIG.dateFormat) - : new GraphQLError( - `Invalid date provided to DateScalar. Format should be ${ - DATE_CONFIG.dateFormat - }`, - ); -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary date Scalar + * @summary date scalar */ module.exports = new GraphQLScalarType({ name: 'date', description: 'Base StructureDefinition for date Type: A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates.', - // TODO: Implement proper serialization here + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/1_0_2/scalars/date.scalar.test.js b/src/resources/1_0_2/scalars/date.scalar.test.js deleted file mode 100644 index 78c79a8b..00000000 --- a/src/resources/1_0_2/scalars/date.scalar.test.js +++ /dev/null @@ -1,50 +0,0 @@ -const DateScalar = require('./date.scalar'); -const { GraphQLError } = require('graphql'); - -describe('Date Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid date', () => { - expect(DateScalar.parseLiteral({ value: '2018-12' })).toEqual( - '2018-12-01', - ); - expect(DateScalar.parseLiteral({ value: '2018-12-31' })).toEqual( - '2018-12-31', - ); - }); - test('should return error', () => { - expect(DateScalar.parseLiteral({ value: '2018-13' })).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseLiteral({ value: '2018-00' })).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseLiteral({ value: '2018-12-32' })).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseLiteral({ value: '2018-12-00' })).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseLiteral({ value: 20292920 })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return valid date', () => { - expect(DateScalar.parseValue('2018-12', {})).toEqual('2018-12-01'); - expect(DateScalar.parseValue('2018-12-31', {})).toEqual('2018-12-31'); - }); - test('should return error', () => { - expect(DateScalar.parseValue('2018-13', {})).toBeInstanceOf(GraphQLError); - expect(DateScalar.parseValue('2018-00', {})).toBeInstanceOf(GraphQLError); - expect(DateScalar.parseValue('2018-12-32', {})).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseValue('2018-12-00', {})).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseValue(392929239, {})).toBeInstanceOf(GraphQLError); - }); - }); -}); diff --git a/src/resources/1_0_2/scalars/datetime.scalar.js b/src/resources/1_0_2/scalars/datetime.scalar.js index 0c0152c1..3beb1940 100644 --- a/src/resources/1_0_2/scalars/datetime.scalar.js +++ b/src/resources/1_0_2/scalars/datetime.scalar.js @@ -1,46 +1,24 @@ const { GraphQLScalarType } = require('graphql'); -const sanitize = require('sanitize-html'); -const moment = require('moment-timezone'); -const xss = require('xss'); - -const { resolve } = require('../../../utils/resolve.utils'); -const { DATE_CONFIG } = require(resolve('config')); - -const parse = (value, ast) => { - /* date pattern was simplified from document specified pattern of: - /-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?/ - The day portion of the date is optional. If hours and minutes are - specified, a time zone SHALL be populated. Seconds must be provided - due to schema type constraints but may be zero-filled and may be - ignored. Dates SHALL be valid dates. The time "24:00" is not allowed */ - let date_pattern = /^[12]\d{3}-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?$/; - let sanitized_value = xss(sanitize(value)); - let is_date = date_pattern.test(sanitized_value); - return is_date - ? moment.parseZone(sanitized_value).format(DATE_CONFIG.dateTimeFormat) - : new GraphQLError( - `Invalid dateTime provided to DateTimeScalar. Format should be ${ - DATE_CONFIG.dateTimeFormat - } and date's missing time will be filled with 0's.`, - ); -}; +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); /** * @name exports - * @summary datetime Scalar + * @summary dateTime scalar */ module.exports = new GraphQLScalarType({ - name: 'datetime', + name: 'dateTime', description: 'Base StructureDefinition for dateTime Type: A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates.', - // TODO: Implement proper serialization here + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/1_0_2/scalars/decimal.scalar.js b/src/resources/1_0_2/scalars/decimal.scalar.js new file mode 100644 index 00000000..cc7d0e77 --- /dev/null +++ b/src/resources/1_0_2/scalars/decimal.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary decimal scalar + */ +module.exports = new GraphQLScalarType({ + name: 'decimal', + description: + 'Base StructureDefinition for decimal Type: A rational number with implicit precision', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/1_0_2/scalars/id.scalar.js b/src/resources/1_0_2/scalars/id.scalar.js index 573a37c0..cd66d8f5 100644 --- a/src/resources/1_0_2/scalars/id.scalar.js +++ b/src/resources/1_0_2/scalars/id.scalar.js @@ -1,22 +1,24 @@ const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); const { Kind } = require('graphql/language'); /** * @name exports - * @summary id Scalar + * @summary id scalar */ module.exports = new GraphQLScalarType({ name: 'id', description: "Base StructureDefinition for id type: Any combination of letters, numerals, '-' and '.', with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.", - // TODO: Implement proper serialization here + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => value, - // TODO: Implement proper parsing and sanitization here - parseLiteral: ast => { - let { value } = ast; + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { return value; }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, }); diff --git a/src/resources/1_0_2/scalars/instant.scalar.js b/src/resources/1_0_2/scalars/instant.scalar.js index c54988ac..579195b9 100644 --- a/src/resources/1_0_2/scalars/instant.scalar.js +++ b/src/resources/1_0_2/scalars/instant.scalar.js @@ -1,21 +1,24 @@ const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); /** * @name exports - * @summary instant Scalar + * @summary instant scalar */ module.exports = new GraphQLScalarType({ name: 'instant', description: - 'Base StructureDefinition for instant Type: An instant in time - known at least to the second.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for instant Type: An instant in time - known at least to the second', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => value, - // TODO: Implement proper parsing and sanitization here - parseLiteral: ast => { - let { value } = ast; + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { return value; }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, }); diff --git a/src/resources/1_0_2/scalars/integer.scalar.js b/src/resources/1_0_2/scalars/integer.scalar.js new file mode 100644 index 00000000..4e67eb06 --- /dev/null +++ b/src/resources/1_0_2/scalars/integer.scalar.js @@ -0,0 +1,23 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary integer scalar + */ +module.exports = new GraphQLScalarType({ + name: 'integer', + description: 'Base StructureDefinition for integer Type: A whole number', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/1_0_2/scalars/markdown.scalar.js b/src/resources/1_0_2/scalars/markdown.scalar.js new file mode 100644 index 00000000..666243ad --- /dev/null +++ b/src/resources/1_0_2/scalars/markdown.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary markdown scalar + */ +module.exports = new GraphQLScalarType({ + name: 'markdown', + description: + 'Base StructureDefinition for markdown type: A string that may contain markdown syntax for optional processing by a mark down presentation engine', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/1_0_2/scalars/oid.scalar.js b/src/resources/1_0_2/scalars/oid.scalar.js index d2632e26..22b43da6 100644 --- a/src/resources/1_0_2/scalars/oid.scalar.js +++ b/src/resources/1_0_2/scalars/oid.scalar.js @@ -1,36 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const xss = require('xss'); -const validator = require('validator'); - -const parse = (value, ast) => { - let pattern = /^urn:oid:[0-2](\.[1-9]\d*)+/; - let sanitized_value = validator.stripLow(xss(sanitize(value)).trim()); - let is_oid = pattern.test(sanitized_value); - return is_oid - ? sanitized_value - : new GraphQLError( - "Invalid value provided to OID Scalar. An OID must begin with 'urn:oid:' and is a uri not an id. See http://hl7.org/fhir/datatypes.html for a description on oid under uri.", - ); -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary oid Scalar + * @summary oid scalar */ module.exports = new GraphQLScalarType({ name: 'oid', description: - 'Base StructureDefinition for oid type: An oid represented as a URI.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for oid type: An oid represented as a URI', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/1_0_2/scalars/oid.scalar.test.js b/src/resources/1_0_2/scalars/oid.scalar.test.js deleted file mode 100644 index 564ecebe..00000000 --- a/src/resources/1_0_2/scalars/oid.scalar.test.js +++ /dev/null @@ -1,42 +0,0 @@ -const OidScalar = require('./oid.scalar'); -const { GraphQLError } = require('graphql'); - -describe('OID Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid OID', () => { - expect(OidScalar.parseLiteral({ value: 'urn:oid:1.2.3.4.5' })).toEqual( - 'urn:oid:1.2.3.4.5', - ); - }); - test('should return error', () => { - expect( - OidScalar.parseLiteral({ value: 'urn:oids:1.2.3.4.5' }), - ).toBeInstanceOf(GraphQLError); - expect( - OidScalar.parseLiteral({ value: 'urns:oid:1.2.3.4.5' }), - ).toBeInstanceOf(GraphQLError); - expect(OidScalar.parseLiteral({ value: 'oid:1.2.3.4.5' })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return valid OID', () => { - expect(OidScalar.parseValue('urn:oid:1.2.3.4.5', {})).toEqual( - 'urn:oid:1.2.3.4.5', - ); - }); - test('should return error', () => { - expect(OidScalar.parseLiteral('urn:oids:1.2.3.4.5', {})).toBeInstanceOf( - GraphQLError, - ); - expect(OidScalar.parseLiteral('urns:oid:1.2.3.4.5', {})).toBeInstanceOf( - GraphQLError, - ); - expect(OidScalar.parseLiteral('oid:1.2.3.4.5', {})).toBeInstanceOf( - GraphQLError, - ); - }); - }); -}); diff --git a/src/resources/1_0_2/scalars/positiveint.scalar.js b/src/resources/1_0_2/scalars/positiveint.scalar.js index 6c66c2ec..b32b429c 100644 --- a/src/resources/1_0_2/scalars/positiveint.scalar.js +++ b/src/resources/1_0_2/scalars/positiveint.scalar.js @@ -2,36 +2,23 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); const { Kind } = require('graphql/language'); -const parse = (value, ast) => { - try { - return validator.isInt(value, { min: 1, max: Number.MAX_SAFE_INTEGER }) - ? validator.toInt(value, 10) - : new GraphQLError( - 'Invalid value provided to positiveInt. String Int must be > 0.', - ); - } catch (e) { - return new GraphQLError( - 'Unsupported type value provided to positiveInt. String Int must be > 0.', - ); - } -}; - /** * @name exports - * @summary positiveint Scalar + * @summary positiveInt scalar */ module.exports = new GraphQLScalarType({ - name: 'positiveint', + name: 'positiveInt', description: - 'Base StructureDefinition for positiveInt type: An integer with a value that is positive (e.g. >0).', - // TODO: Implement proper serialization here + 'Base StructureDefinition for positiveInt type: An integer with a value that is positive (e.g. >0)', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/1_0_2/scalars/string.scalar.js b/src/resources/1_0_2/scalars/string.scalar.js new file mode 100644 index 00000000..f1175866 --- /dev/null +++ b/src/resources/1_0_2/scalars/string.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary string scalar + */ +module.exports = new GraphQLScalarType({ + name: 'string', + description: + 'Base StructureDefinition for string Type: A sequence of Unicode characters', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/1_0_2/scalars/time.scalar.js b/src/resources/1_0_2/scalars/time.scalar.js index c6b45f44..3f4a8bfe 100644 --- a/src/resources/1_0_2/scalars/time.scalar.js +++ b/src/resources/1_0_2/scalars/time.scalar.js @@ -1,42 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); const { Kind } = require('graphql/language'); -const sanitize = require('sanitize-html'); -const moment = require('moment-timezone'); -const xss = require('xss'); - -const { resolve } = require('../../../utils/resolve.utils'); -const { DATE_CONFIG } = require(resolve('config')); - -const parse = (value, ast) => { - let time_pattern = /([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/; - let sanitized_value = xss(sanitize(value)).trim(); - let is_time = time_pattern.test(sanitized_value); - return is_time - ? moment(sanitized_value, DATE_CONFIG.timeFormat).format( - DATE_CONFIG.timeFormat, - ) - : new GraphQLError( - `Invalid time provided to TimeScalar. Format should be ${DATE_CONFIG}`, - ); -}; /** * @name exports - * @summary time Scalar + * @summary time scalar */ module.exports = new GraphQLScalarType({ name: 'time', description: - 'Base StructureDefinition for time Type: A time during the day, with no date specified.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for time Type: A time during the day, with no date specified', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/1_0_2/scalars/time.scalar.test.js b/src/resources/1_0_2/scalars/time.scalar.test.js deleted file mode 100644 index abff4697..00000000 --- a/src/resources/1_0_2/scalars/time.scalar.test.js +++ /dev/null @@ -1,44 +0,0 @@ -const TimeScalar = require('./time.scalar'); -const { GraphQLError } = require('graphql'); - -describe('Time Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid time', () => { - expect(TimeScalar.parseLiteral({ value: '02:01:59' })).toEqual( - '02:01:59', - ); - expect(TimeScalar.parseLiteral({ value: '12:59:00' })).toEqual( - '12:59:00', - ); - }); - test('should return error', () => { - expect(TimeScalar.parseLiteral({ value: '24:00:00' })).toBeInstanceOf( - GraphQLError, - ); - expect(TimeScalar.parseLiteral({ value: '00:60:00' })).toBeInstanceOf( - GraphQLError, - ); - expect(TimeScalar.parseLiteral({ value: '01:01:60' })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return valid time', () => { - expect(TimeScalar.parseValue('02:01:59', {})).toEqual('02:01:59'); - expect(TimeScalar.parseValue('12:59:00', {})).toEqual('12:59:00'); - }); - test('should return error', () => { - expect(TimeScalar.parseValue('24:00:00', {})).toBeInstanceOf( - GraphQLError, - ); - expect(TimeScalar.parseValue('00:60:00', {})).toBeInstanceOf( - GraphQLError, - ); - expect(TimeScalar.parseValue('01:01:60', {})).toBeInstanceOf( - GraphQLError, - ); - }); - }); -}); diff --git a/src/resources/1_0_2/scalars/token.scalar.js b/src/resources/1_0_2/scalars/token.scalar.js index 1219c9e8..9d8c25a6 100644 --- a/src/resources/1_0_2/scalars/token.scalar.js +++ b/src/resources/1_0_2/scalars/token.scalar.js @@ -1,22 +1,23 @@ const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); /** * @name exports - * @summary token Scalar + * @summary token scalar */ module.exports = new GraphQLScalarType({ name: 'token', - description: 'Base StructureDefinition for token Type: A stream of bytes.', - // TODO: Implement proper serialization here + description: 'Base StructureDefinition for token type', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return value; + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/1_0_2/scalars/unsignedint.scalar.js b/src/resources/1_0_2/scalars/unsignedint.scalar.js index a471569d..b90da78c 100644 --- a/src/resources/1_0_2/scalars/unsignedint.scalar.js +++ b/src/resources/1_0_2/scalars/unsignedint.scalar.js @@ -1,37 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const validator = require('validator'); - -const parse = (value, ast) => { - try { - return validator.isInt(value, { min: 0, max: Number.MAX_SAFE_INTEGER }) - ? validator.toInt(value, 10) - : new GraphQLError( - 'Invalid value provided to UnsignedIntScalar. Int must be >= 0.', - ); - } catch (e) { - return new GraphQLError( - 'Unsupported type value provided to unsigned int. String Int must be >= 0.', - ); - } -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary unsignedint Scalar + * @summary unsignedInt scalar */ module.exports = new GraphQLScalarType({ - name: 'unsignedint', + name: 'unsignedInt', description: - 'Base StructureDefinition for unsignedInt type: An integer with a value that is not negative (e.g. >= 0).', - // TODO: Implement proper serialization here + 'Base StructureDefinition for unsignedInt type: An integer with a value that is not negative (e.g. >= 0)', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/1_0_2/scalars/unsignedint.scalar.test.js b/src/resources/1_0_2/scalars/unsignedint.scalar.test.js deleted file mode 100644 index 5c6442a9..00000000 --- a/src/resources/1_0_2/scalars/unsignedint.scalar.test.js +++ /dev/null @@ -1,42 +0,0 @@ -const UnsignedIntScalar = require('./unsignedint.scalar'); -const { GraphQLError } = require('graphql'); - -describe('Unsigned Int Scalar Test', () => { - describe('parseLiteral', () => { - test('should return unsigned integers', () => { - expect(UnsignedIntScalar.parseLiteral({ value: '0' })).toEqual(0); - expect(UnsignedIntScalar.parseLiteral({ value: '1024' })).toEqual(1024); - expect( - UnsignedIntScalar.parseLiteral({ - value: Number.MAX_SAFE_INTEGER.toString(), - }), - ).toEqual(Number.MAX_SAFE_INTEGER); - }); - test('should return error', () => { - expect(UnsignedIntScalar.parseLiteral({ value: '-1' })).toBeInstanceOf( - GraphQLError, - ); - expect(UnsignedIntScalar.parseLiteral({ value: 1024 })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return unsigned integers', () => { - expect(UnsignedIntScalar.parseValue('0', {})).toEqual(0); - expect(UnsignedIntScalar.parseValue('1024', {})).toEqual(1024); - expect( - UnsignedIntScalar.parseValue(Number.MAX_SAFE_INTEGER.toString(), {}), - ).toEqual(Number.MAX_SAFE_INTEGER); - }); - test('should return error', () => { - expect(UnsignedIntScalar.parseValue('-1', {})).toBeInstanceOf( - GraphQLError, - ); - expect(UnsignedIntScalar.parseValue(1024, {})).toBeInstanceOf( - GraphQLError, - ); - }); - }); -}); diff --git a/src/resources/1_0_2/scalars/uri.scalar.js b/src/resources/1_0_2/scalars/uri.scalar.js index c22b2522..43a6f136 100644 --- a/src/resources/1_0_2/scalars/uri.scalar.js +++ b/src/resources/1_0_2/scalars/uri.scalar.js @@ -4,20 +4,19 @@ const { Kind } = require('graphql/language'); /** * @name exports - * @summary uri Scalar + * @summary uri scalar */ module.exports = new GraphQLScalarType({ name: 'uri', description: - 'Base StructureDefinition for uri Type: String of characters used to identify a name or a resource.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for uri Type: String of characters used to identify a name or a resource', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { let { kind, value } = ast; return kind === Kind.STRING ? value : undefined; diff --git a/src/resources/1_0_2/scalars/uuid.scalar.js b/src/resources/1_0_2/scalars/uuid.scalar.js index cb4525f5..2fcca56d 100644 --- a/src/resources/1_0_2/scalars/uuid.scalar.js +++ b/src/resources/1_0_2/scalars/uuid.scalar.js @@ -1,36 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const xss = require('xss'); -const validator = require('validator'); - -const parse = (value, ast) => { - let pattern = /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/; - let sanitized_value = validator.stripLow(xss(sanitize(value)).trim()); - let is_uuid = pattern.test(sanitized_value); - return is_uuid - ? sanitized_value - : new GraphQLError( - "Invalid value provided to UuidScalar. A UUID must begin with 'urn:uuid:' and is a uri not an id. See http://hl7.org/fhir/datatypes.html for a description on uuid under uri.", - ); -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary uuid Scalar + * @summary uuid scalar */ module.exports = new GraphQLScalarType({ name: 'uuid', description: - 'Base StructureDefinition for uuid type: A UUID, represented as a URI.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for uuid type: A UUID, represented as a URI', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/1_0_2/scalars/uuid.scalar.test.js b/src/resources/1_0_2/scalars/uuid.scalar.test.js deleted file mode 100644 index 17f3891b..00000000 --- a/src/resources/1_0_2/scalars/uuid.scalar.test.js +++ /dev/null @@ -1,95 +0,0 @@ -const UuidScalar = require('./uuid.scalar'); -const { GraphQLError } = require('graphql'); - -describe('UUID Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid UUID', () => { - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7', - }), - ).toEqual('urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7'); - }); - test('should return error', () => { - expect( - UuidScalar.parseLiteral({ - value: 'urns:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee1208', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fcbb-4ff8-8a-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fcbb-48-8a92-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fb-4ff8-8a92-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fe2-fcbb-4ff8-8a92-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - }); - }); - - describe('parseValue', () => { - test('should return valid UUID', () => { - expect( - UuidScalar.parseValue( - 'urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7', - {}, - ), - ).toEqual('urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7'); - }); - test('should return error', () => { - expect( - UuidScalar.parseLiteral( - 'urns:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee1208', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fefa32-fcbb-4ff8-8a-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fefa32-fcbb-48-8a92-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fefa32-fb-4ff8-8a92-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fe2-fcbb-4ff8-8a92-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - }); - }); -}); diff --git a/src/resources/1_0_2/scalars/xhtml.scalar.js b/src/resources/1_0_2/scalars/xhtml.scalar.js index a5c1655d..517608a8 100644 --- a/src/resources/1_0_2/scalars/xhtml.scalar.js +++ b/src/resources/1_0_2/scalars/xhtml.scalar.js @@ -4,19 +4,18 @@ const { Kind } = require('graphql/language'); /** * @name exports - * @summary xhtml Scalar + * @summary xhtml scalar */ module.exports = new GraphQLScalarType({ name: 'xhtml', - description: 'Base StructureDefinition for xhtml Type: A stream of bytes.', - // TODO: Implement proper serialization here + description: 'Base StructureDefinition for xhtml type', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { let { kind, value } = ast; return kind === Kind.STRING ? value : undefined; diff --git a/src/resources/1_0_2/schemas/account.schema.js b/src/resources/1_0_2/schemas/account.schema.js index b4464e58..90eddb1f 100644 --- a/src/resources/1_0_2/schemas/account.schema.js +++ b/src/resources/1_0_2/schemas/account.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AccountResourceType = new GraphQLEnumType({ - name: 'AccountResourceType', - 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 @@ -22,83 +16,182 @@ let AccountResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Account', - description: 'Base StructureDefinition for Account Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AccountResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - 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.schema'), - description: - 'Name used for the account when displaying it to humans in reports, etc.', - }, - type: { - type: require('./codeableconcept.schema'), - 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.schema'), - description: - 'Indicates whether the account is presently used/useable or not.', - }, - activePeriod: { - type: require('./period.schema'), - description: - 'Indicates the period of time over which the account is allowed.', - }, - currency: { - type: require('./coding.schema'), - description: - 'Identifies the currency to which transactions must be converted when crediting or debiting the account.', - }, - balance: { - type: require('./quantity.schema'), - description: - 'Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.', - }, - coveragePeriod: { - type: require('./period.schema'), - description: - 'Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Account Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Account_Enum_schema', + values: { Account: { value: 'Account' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.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.schema.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.schema.js'), + description: + 'Categorizes the account for reporting and searching purposes.', + }, + _status: { + type: require('./element.schema.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.schema.js'), + description: + 'Indicates the period of time over which the account is allowed.', + }, + currency: { + type: require('./coding.schema.js'), + description: + 'Identifies the currency to which transactions must be converted when crediting or debiting the account.', + }, + balance: { + type: require('./quantity.schema.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.schema.js'), + description: + 'Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Accountsubject_subject_Union', description: 'Identifies the patient, device, practitioner, location or other object the account is associated with.', - }, - owner: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./location.schema.js'), + require('./healthcareservice.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the patient, device, practitioner, location or other object the account is associated with.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'Accountowner_owner_Union', 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.schema'), - description: - 'Provides additional information about what the account tracks and how it is used.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the organization, department, etc. with responsibility for the account.', + }, + _description: { + type: require('./element.schema.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.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/address.schema.js b/src/resources/1_0_2/schemas/address.schema.js index 4a7f097a..c9258f27 100644 --- a/src/resources/1_0_2/schemas/address.schema.js +++ b/src/resources/1_0_2/schemas/address.schema.js @@ -1,7 +1,6 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -9,98 +8,112 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Address', - description: 'Base StructureDefinition for Address Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/address-use - use: { - type: CodeScalar, - description: 'The purpose of this address.', - }, - _use: { - type: require('./element.schema'), - description: 'The purpose of this address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/address-type - type: { - type: CodeScalar, - description: - 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', - }, - _type: { - type: require('./element.schema'), - description: - 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', - }, - text: { - type: GraphQLString, - description: 'A full text representation of the address.', - }, - _text: { - type: require('./element.schema'), - description: 'A full text representation of the address.', - }, - line: { - type: new GraphQLList(GraphQLString), - description: - 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', - }, - _line: { - type: require('./element.schema'), - description: - 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', - }, - city: { - type: GraphQLString, - description: - 'The name of the city, town, village or other community or delivery center.', - }, - _city: { - type: require('./element.schema'), - description: - 'The name of the city, town, village or other community or delivery center.', - }, - district: { - type: GraphQLString, - description: 'The name of the administrative area (county).', - }, - _district: { - type: require('./element.schema'), - description: 'The name of the administrative area (county).', - }, - state: { - type: GraphQLString, - description: - 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', - }, - _state: { - type: require('./element.schema'), - description: - 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', - }, - postalCode: { - type: GraphQLString, - description: - 'A postal code designating a region defined by the postal service.', - }, - _postalCode: { - type: require('./element.schema'), - description: - 'A postal code designating a region defined by the postal service.', - }, - country: { - type: GraphQLString, - description: - 'Country - a nation as commonly understood or generally accepted.', - }, - _country: { - type: require('./element.schema'), - description: - 'Country - a nation as commonly understood or generally accepted.', - }, - period: { - type: require('./period.schema'), - description: 'Time period when address was/is in use.', - }, - }), + description: 'Base StructureDefinition for Address Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _use: { + type: require('./element.schema.js'), + description: 'The purpose of this address.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/address-use + use: { + type: CodeScalar, + description: 'The purpose of this address.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/address-type + type: { + type: CodeScalar, + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + _text: { + type: require('./element.schema.js'), + description: 'A full text representation of the address.', + }, + text: { + type: GraphQLString, + description: 'A full text representation of the address.', + }, + _line: { + type: require('./element.schema.js'), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + line: { + type: new GraphQLList(GraphQLString), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + _city: { + type: require('./element.schema.js'), + description: + 'The name of the city, town, village or other community or delivery center.', + }, + city: { + type: GraphQLString, + description: + 'The name of the city, town, village or other community or delivery center.', + }, + _district: { + type: require('./element.schema.js'), + description: 'The name of the administrative area (county).', + }, + district: { + type: GraphQLString, + description: 'The name of the administrative area (county).', + }, + _state: { + type: require('./element.schema.js'), + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', + }, + state: { + type: GraphQLString, + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', + }, + _postalCode: { + type: require('./element.schema.js'), + description: + 'A postal code designating a region defined by the postal service.', + }, + postalCode: { + type: GraphQLString, + description: + 'A postal code designating a region defined by the postal service.', + }, + _country: { + type: require('./element.schema.js'), + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + country: { + type: GraphQLString, + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period when address was/is in use.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/age.schema.js b/src/resources/1_0_2/schemas/age.schema.js index 0376b654..d8316478 100644 --- a/src/resources/1_0_2/schemas/age.schema.js +++ b/src/resources/1_0_2/schemas/age.schema.js @@ -1,13 +1,11 @@ const { GraphQLObjectType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Age Schema */ module.exports = new GraphQLObjectType({ name: 'Age', - description: 'A duration (length of time) with a UCUM code.', - fields: () => extendSchema(require('./quantity.schema')), + description: 'A duration (length of time) with a UCUM code', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/schemas/allergyintolerance.schema.js b/src/resources/1_0_2/schemas/allergyintolerance.schema.js index 1d296b80..f4588344 100644 --- a/src/resources/1_0_2/schemas/allergyintolerance.schema.js +++ b/src/resources/1_0_2/schemas/allergyintolerance.schema.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AllergyIntoleranceResourceType = new GraphQLEnumType({ - name: 'AllergyIntoleranceResourceType', - values: { - AllergyIntolerance: { value: 'AllergyIntolerance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,117 +16,221 @@ let AllergyIntoleranceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'AllergyIntolerance', - description: 'Base StructureDefinition for AllergyIntolerance Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AllergyIntoleranceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - onset: { - type: DateTimeScalar, - description: - 'Record of the date and/or time of the onset of the Allergy or Intolerance.', - }, - _onset: { - type: require('./element.schema'), - description: - 'Record of the date and/or time of the onset of the Allergy or Intolerance.', - }, - recordedDate: { - type: DateTimeScalar, - description: 'Date when the sensitivity was recorded.', - }, - _recordedDate: { - type: require('./element.schema'), - description: 'Date when the sensitivity was recorded.', - }, - recorder: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for AllergyIntolerance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AllergyIntolerance_Enum_schema', + values: { AllergyIntolerance: { value: 'AllergyIntolerance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _onset: { + type: require('./element.schema.js'), + description: + 'Record of the date and/or time of the onset of the Allergy or Intolerance.', + }, + onset: { + type: DateTimeScalar, + description: + 'Record of the date and/or time of the onset of the Allergy or Intolerance.', + }, + _recordedDate: { + type: require('./element.schema.js'), + description: 'Date when the sensitivity was recorded.', + }, + recordedDate: { + type: DateTimeScalar, + description: 'Date when the sensitivity was recorded.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'AllergyIntolerancerecorder_recorder_Union', description: 'Individual who recorded the record and takes responsibility for its conten.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient who has the allergy or intolerance.', - }, - reporter: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'Individual who recorded the record and takes responsibility for its conten.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AllergyIntolerancepatient_patient_Union', + description: 'The patient who has the allergy or intolerance.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient who has the allergy or intolerance.', + }, + reporter: { + type: new GraphQLUnionType({ + name: 'AllergyIntolerancereporter_reporter_Union', description: 'The source of the information about the allergy that is recorded.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergyintolerance-substance-code - substance: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-status - status: { - type: CodeScalar, - description: - 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.', - }, - _status: { - type: require('./element.schema'), - description: - 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality - criticality: { - type: CodeScalar, - description: - 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.', - }, - _criticality: { - type: require('./element.schema'), - description: - 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-type - type: { - type: CodeScalar, - description: - 'Identification of the underlying physiological mechanism for the reaction risk.', - }, - _type: { - type: require('./element.schema'), - description: - 'Identification of the underlying physiological mechanism for the reaction risk.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-category - category: { - type: CodeScalar, - description: 'Category of the identified Substance.', - }, - _category: { - type: require('./element.schema'), - description: 'Category of the identified Substance.', - }, - lastOccurence: { - type: DateTimeScalar, - description: - 'Represents the date and/or time of the last known occurrence of a reaction event.', - }, - _lastOccurence: { - type: require('./element.schema'), - description: - 'Represents the date and/or time of the last known occurrence of a reaction event.', - }, - note: { - type: require('./annotation.schema'), - description: - 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', - }, - reaction: { - type: new GraphQLList(require('./allergyintolerancereaction.schema')), - description: - 'Details about each adverse reaction event linked to exposure to the identified Substance.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The source of the information about the allergy that is recorded.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergyintolerance-substance-code + substance: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-status + status: { + type: CodeScalar, + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.', + }, + _criticality: { + type: require('./element.schema.js'), + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality + criticality: { + type: CodeScalar, + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-type + type: { + type: CodeScalar, + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + _category: { + type: require('./element.schema.js'), + description: 'Category of the identified Substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-category + category: { + type: CodeScalar, + description: 'Category of the identified Substance.', + }, + _lastOccurence: { + type: require('./element.schema.js'), + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + lastOccurence: { + type: DateTimeScalar, + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + note: { + type: require('./annotation.schema.js'), + description: + 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', + }, + reaction: { + type: new GraphQLList(require('./allergyintolerancereaction.schema.js')), + description: + 'Details about each adverse reaction event linked to exposure to the identified Substance.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/allergyintolerancereaction.schema.js b/src/resources/1_0_2/schemas/allergyintolerancereaction.schema.js index ee7e20e0..f3f1b866 100644 --- a/src/resources/1_0_2/schemas/allergyintolerancereaction.schema.js +++ b/src/resources/1_0_2/schemas/allergyintolerancereaction.schema.js @@ -1,90 +1,107 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary AllergyIntolerance.reaction Schema + * @summary AllergyIntolerancereaction Schema */ module.exports = new GraphQLObjectType({ - name: 'AllergyIntoleranceReaction', - description: - 'Details about each adverse reaction event linked to exposure to the identified Substance.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - substance: { - type: require('./codeableconcept.schema'), - description: - 'Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-certainty - certainty: { - type: CodeScalar, - description: - 'Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.', - }, - _certainty: { - type: require('./element.schema'), - description: - 'Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/manifestation-codes - manifestation: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.schema')), - ), - description: - 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', - }, - description: { - type: GraphQLString, - description: - 'Text description about the reaction as a whole, including details of the manifestation if required.', - }, - _description: { - type: require('./element.schema'), - description: - 'Text description about the reaction as a whole, including details of the manifestation if required.', - }, - onset: { - type: DateTimeScalar, - description: - 'Record of the date and/or time of the onset of the Reaction.', - }, - _onset: { - type: require('./element.schema'), - description: - 'Record of the date and/or time of the onset of the Reaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-severity - severity: { - type: CodeScalar, - description: - 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', - }, - _severity: { - type: require('./element.schema'), - description: - 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - exposureRoute: { - type: require('./codeableconcept.schema'), - description: - 'Identification of the route by which the subject was exposed to the substance.', - }, - note: { - type: require('./annotation.schema'), - description: - 'Additional text about the adverse reaction event not captured in other fields.', - }, - }), + name: 'AllergyIntolerancereaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + substance: { + type: require('./codeableconcept.schema.js'), + description: + 'Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance.', + }, + _certainty: { + type: require('./element.schema.js'), + description: + 'Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-certainty + certainty: { + type: CodeScalar, + description: + 'Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/manifestation-codes + manifestation: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.schema.js')), + ), + description: + 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + description: { + type: GraphQLString, + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + _onset: { + type: require('./element.schema.js'), + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + onset: { + type: DateTimeScalar, + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-severity + severity: { + type: CodeScalar, + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + exposureRoute: { + type: require('./codeableconcept.schema.js'), + description: + 'Identification of the route by which the subject was exposed to the substance.', + }, + note: { + type: require('./annotation.schema.js'), + description: + 'Additional text about the adverse reaction event not captured in other fields.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/annotation.schema.js b/src/resources/1_0_2/schemas/annotation.schema.js index daba5883..f6cffff4 100644 --- a/src/resources/1_0_2/schemas/annotation.schema.js +++ b/src/resources/1_0_2/schemas/annotation.schema.js @@ -1,7 +1,12 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -9,36 +14,69 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Annotation', - description: 'Base StructureDefinition for Annotation Type.', - fields: () => - extendSchema(require('./element.schema'), { - authorReference: { - type: require('./reference.schema'), - description: 'The individual responsible for making the annotation.', - }, - authorString: { - type: GraphQLString, - description: 'The individual responsible for making the annotation.', - }, - _authorString: { - type: require('./element.schema'), + description: 'Base StructureDefinition for Annotation Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + authorReference: { + type: new GraphQLUnionType({ + name: 'AnnotationauthorReference_authorReference_Union', description: 'The individual responsible for making the annotation.', - }, - time: { - type: DateTimeScalar, - description: 'Indicates when this particular annotation was made.', - }, - _time: { - type: require('./element.schema'), - description: 'Indicates when this particular annotation was made.', - }, - text: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text of the annotation.', - }, - _text: { - type: require('./element.schema'), - description: 'The text of the annotation.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The individual responsible for making the annotation.', + }, + _authorString: { + type: require('./element.schema.js'), + description: 'The individual responsible for making the annotation.', + }, + authorString: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _time: { + type: require('./element.schema.js'), + description: 'Indicates when this particular annotation was made.', + }, + time: { + type: DateTimeScalar, + description: 'Indicates when this particular annotation was made.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The text of the annotation.', + }, + text: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text of the annotation.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/appointment.schema.js b/src/resources/1_0_2/schemas/appointment.schema.js index f54d01af..0350520d 100644 --- a/src/resources/1_0_2/schemas/appointment.schema.js +++ b/src/resources/1_0_2/schemas/appointment.schema.js @@ -1,23 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AppointmentResourceType = new GraphQLEnumType({ - name: 'AppointmentResourceType', - values: { - Appointment: { value: 'Appointment' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -25,105 +19,174 @@ let AppointmentResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Appointment', - description: 'Base StructureDefinition for Appointment Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AppointmentResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', - }, - _status: { - type: require('./element.schema'), - description: - 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - type: { - type: require('./codeableconcept.schema'), - description: - 'The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason - reason: { - type: require('./codeableconcept.schema'), - description: - 'The reason that this appointment is being scheduled. This is more clinical than administrative.', - }, - priority: { - type: UnsignedIntScalar, - description: - 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', - }, - _priority: { - type: require('./element.schema'), - description: - 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', - }, - description: { - type: GraphQLString, - description: - 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', - }, - _description: { - type: require('./element.schema'), - description: - 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', - }, - start: { - type: InstantScalar, - description: 'Date/Time that the appointment is to take place.', - }, - _start: { - type: require('./element.schema'), - description: 'Date/Time that the appointment is to take place.', - }, - end: { - type: InstantScalar, - description: 'Date/Time that the appointment is to conclude.', - }, - _end: { - type: require('./element.schema'), - description: 'Date/Time that the appointment is to conclude.', - }, - minutesDuration: { - type: PositiveIntScalar, - description: - 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', - }, - _minutesDuration: { - type: require('./element.schema'), - description: - 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', - }, - slot: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the appointment.', - }, - _comment: { - type: require('./element.schema'), - description: 'Additional comments about the appointment.', - }, - participant: { - type: new GraphQLList( - new GraphQLNonNull(require('./appointmentparticipant.schema')), - ), - description: 'List of participants involved in the appointment.', - }, - }), + description: 'Base StructureDefinition for Appointment Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Appointment_Enum_schema', + values: { Appointment: { value: 'Appointment' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'The reason that this appointment is being scheduled. This is more clinical than administrative.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + priority: { + type: UnsignedIntScalar, + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + description: { + type: GraphQLString, + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + _start: { + type: require('./element.schema.js'), + description: 'Date/Time that the appointment is to take place.', + }, + start: { + type: InstantScalar, + description: 'Date/Time that the appointment is to take place.', + }, + _end: { + type: require('./element.schema.js'), + description: 'Date/Time that the appointment is to conclude.', + }, + end: { + type: InstantScalar, + description: 'Date/Time that the appointment is to conclude.', + }, + _minutesDuration: { + type: require('./element.schema.js'), + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', + }, + minutesDuration: { + type: PositiveIntScalar, + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', + }, + slot: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Appointmentslot_slot_Union', + description: + 'The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.', + types: () => [require('./slot.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Slot') { + return require('./slot.schema.js'); + } + }, + }), + ), + description: + 'The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + participant: { + type: new GraphQLList( + new GraphQLNonNull(require('./appointmentparticipant.schema.js')), + ), + description: 'List of participants involved in the appointment.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/appointmentparticipant.schema.js b/src/resources/1_0_2/schemas/appointmentparticipant.schema.js index a20fb371..fba0e393 100644 --- a/src/resources/1_0_2/schemas/appointmentparticipant.schema.js +++ b/src/resources/1_0_2/schemas/appointmentparticipant.schema.js @@ -1,46 +1,101 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Appointment.participant Schema + * @summary Appointmentparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'AppointmentParticipant', - description: 'List of participants involved in the appointment.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Role of participant in the appointment.', - }, - actor: { - type: require('./reference.schema'), + name: 'Appointmentparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'Appointmentparticipantactor_actor_Union', description: 'A Person, Location/HealthcareService or Device that is participating in the appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participantrequired - required: { - type: CodeScalar, - description: - 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', - }, - _required: { - type: require('./element.schema'), - description: - 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participationstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Participation status of the Patient.', - }, - _status: { - type: require('./element.schema'), - description: 'Participation status of the Patient.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _required: { + type: require('./element.schema.js'), + description: + 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participantrequired + required: { + type: CodeScalar, + description: + 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Participation status of the Patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participationstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Participation status of the Patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/appointmentresponse.schema.js b/src/resources/1_0_2/schemas/appointmentresponse.schema.js index f21dd409..f3c37739 100644 --- a/src/resources/1_0_2/schemas/appointmentresponse.schema.js +++ b/src/resources/1_0_2/schemas/appointmentresponse.schema.js @@ -1,21 +1,15 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AppointmentResponseResourceType = new GraphQLEnumType({ - name: 'AppointmentResponseResourceType', - values: { - AppointmentResponse: { value: 'AppointmentResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,70 +17,170 @@ let AppointmentResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'AppointmentResponse', - description: 'Base StructureDefinition for AppointmentResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AppointmentResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', - }, - appointment: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Appointment that this response is replying to.', - }, - start: { - type: InstantScalar, - description: - 'Date/Time that the appointment is to take place, or requested new start time.', - }, - _start: { - type: require('./element.schema'), - description: - 'Date/Time that the appointment is to take place, or requested new start time.', - }, - end: { - type: InstantScalar, - description: - 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', - }, - _end: { - type: require('./element.schema'), - description: - 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - participantType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Role of participant in the appointment.', - }, - actor: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for AppointmentResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AppointmentResponse_Enum_schema', + values: { AppointmentResponse: { value: 'AppointmentResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + appointment: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AppointmentResponseappointment_appointment_Union', + description: 'Appointment that this response is replying to.', + types: () => [require('./appointment.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + }, + }), + ), + description: 'Appointment that this response is replying to.', + }, + _start: { + type: require('./element.schema.js'), + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + start: { + type: InstantScalar, + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + end: { + type: InstantScalar, + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + participantType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'AppointmentResponseactor_actor_Union', description: 'A Person, Location/HealthcareService or Device that is participating in the appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participantstatus - participantStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', - }, - _participantStatus: { - type: require('./element.schema'), - description: - 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the appointment.', - }, - _comment: { - type: require('./element.schema'), - description: 'Additional comments about the appointment.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _participantStatus: { + type: require('./element.schema.js'), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participantstatus + participantStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/attachment.schema.js b/src/resources/1_0_2/schemas/attachment.schema.js index 99578117..e605ac0c 100644 --- a/src/resources/1_0_2/schemas/attachment.schema.js +++ b/src/resources/1_0_2/schemas/attachment.schema.js @@ -1,11 +1,10 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -13,82 +12,94 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Attachment', - description: 'Base StructureDefinition for Attachment Type.', - fields: () => - extendSchema(require('./element.schema'), { - contentType: { - type: CodeScalar, - description: - 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', - }, - _contentType: { - type: require('./element.schema'), - description: - 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', - }, - language: { - type: CodeScalar, - description: - 'The human language of the content. The value can be any valid value according to BCP 47.', - }, - _language: { - type: require('./element.schema'), - description: - 'The human language of the content. The value can be any valid value according to BCP 47.', - }, - data: { - type: Base64BinaryScalar, - description: - 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', - }, - _data: { - type: require('./element.schema'), - description: - 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', - }, - url: { - type: UriScalar, - description: 'An alternative location where the data can be accessed.', - }, - _url: { - type: require('./element.schema'), - description: 'An alternative location where the data can be accessed.', - }, - size: { - type: UnsignedIntScalar, - description: - 'The number of bytes of data that make up this attachment.', - }, - _size: { - type: require('./element.schema'), - description: - 'The number of bytes of data that make up this attachment.', - }, - hash: { - type: Base64BinaryScalar, - description: - 'The calculated hash of the data using SHA-1. Represented using base64.', - }, - _hash: { - type: require('./element.schema'), - description: - 'The calculated hash of the data using SHA-1. Represented using base64.', - }, - title: { - type: GraphQLString, - description: 'A label or set of text to display in place of the data.', - }, - _title: { - type: require('./element.schema'), - description: 'A label or set of text to display in place of the data.', - }, - creation: { - type: DateTimeScalar, - description: 'The date that the attachment was first created.', - }, - _creation: { - type: require('./element.schema'), - description: 'The date that the attachment was first created.', - }, - }), + description: 'Base StructureDefinition for Attachment Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + contentType: { + type: CodeScalar, + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + _language: { + type: require('./element.schema.js'), + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + language: { + type: CodeScalar, + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + _data: { + type: require('./element.schema.js'), + description: + 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', + }, + data: { + type: Base64BinaryScalar, + description: + 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', + }, + _url: { + type: require('./element.schema.js'), + description: 'An alternative location where the data can be accessed.', + }, + url: { + type: UriScalar, + description: 'An alternative location where the data can be accessed.', + }, + _size: { + type: require('./element.schema.js'), + description: 'The number of bytes of data that make up this attachment.', + }, + size: { + type: UnsignedIntScalar, + description: 'The number of bytes of data that make up this attachment.', + }, + _hash: { + type: require('./element.schema.js'), + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + hash: { + type: Base64BinaryScalar, + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A label or set of text to display in place of the data.', + }, + title: { + type: GraphQLString, + description: 'A label or set of text to display in place of the data.', + }, + _creation: { + type: require('./element.schema.js'), + description: 'The date that the attachment was first created.', + }, + creation: { + type: DateTimeScalar, + description: 'The date that the attachment was first created.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/auditevent.schema.js b/src/resources/1_0_2/schemas/auditevent.schema.js index 56fcf3fe..02b616d5 100644 --- a/src/resources/1_0_2/schemas/auditevent.schema.js +++ b/src/resources/1_0_2/schemas/auditevent.schema.js @@ -1,19 +1,13 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AuditEventResourceType = new GraphQLEnumType({ - name: 'AuditEventResourceType', - values: { - AuditEvent: { value: 'AuditEvent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,32 +15,89 @@ let AuditEventResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'AuditEvent', - description: 'Base StructureDefinition for AuditEvent Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AuditEventResourceType), - description: 'Type of this resource.', - }, - event: { - type: new GraphQLNonNull(require('./auditeventevent.schema')), - description: - 'Identifies the name, action type, time, and disposition of the audited event.', - }, - participant: { - type: new GraphQLList( - new GraphQLNonNull(require('./auditeventparticipant.schema')), - ), - description: 'A person, a hardware device or software process.', - }, - source: { - type: new GraphQLNonNull(require('./auditeventsource.schema')), - description: 'Application systems and processes.', - }, - object: { - type: new GraphQLList(require('./auditeventobject.schema')), - description: - 'Specific instances of data or objects that have been accessed.', - }, - }), + description: 'Base StructureDefinition for AuditEvent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AuditEvent_Enum_schema', + values: { AuditEvent: { value: 'AuditEvent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + event: { + type: new GraphQLNonNull(require('./auditeventevent.schema.js')), + description: + 'Identifies the name, action type, time, and disposition of the audited event.', + }, + participant: { + type: new GraphQLList( + new GraphQLNonNull(require('./auditeventparticipant.schema.js')), + ), + description: 'A person, a hardware device or software process.', + }, + source: { + type: new GraphQLNonNull(require('./auditeventsource.schema.js')), + description: 'Application systems and processes.', + }, + object: { + type: new GraphQLList(require('./auditeventobject.schema.js')), + description: + 'Specific instances of data or objects that have been accessed.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/auditeventevent.schema.js b/src/resources/1_0_2/schemas/auditeventevent.schema.js index 65aca0a6..983855f7 100644 --- a/src/resources/1_0_2/schemas/auditeventevent.schema.js +++ b/src/resources/1_0_2/schemas/auditeventevent.schema.js @@ -1,76 +1,93 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary AuditEvent.event Schema + * @summary AuditEventevent Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventEvent', - description: - 'Identifies the name, action type, time, and disposition of the audited event.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-type - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-sub-type - subtype: { - type: new GraphQLList(require('./coding.schema')), - description: 'Identifier for the category of event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-action - action: { - type: CodeScalar, - description: - 'Indicator for type of action performed during the event that generated the audit.', - }, - _action: { - type: require('./element.schema'), - description: - 'Indicator for type of action performed during the event that generated the audit.', - }, - dateTime: { - type: new GraphQLNonNull(InstantScalar), - description: 'The time when the event occurred on the source.', - }, - _dateTime: { - type: require('./element.schema'), - description: 'The time when the event occurred on the source.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-outcome - outcome: { - type: CodeScalar, - description: 'Indicates whether the event succeeded or failed.', - }, - _outcome: { - type: require('./element.schema'), - description: 'Indicates whether the event succeeded or failed.', - }, - outcomeDesc: { - type: GraphQLString, - description: 'A free text description of the outcome of the event.', - }, - _outcomeDesc: { - type: require('./element.schema'), - description: 'A free text description of the outcome of the event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purposeOfEvent: { - type: new GraphQLList(require('./coding.schema')), - description: - 'The purposeOfUse (reason) that was used during the event being recorded.', - }, - }), + name: 'AuditEventevent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-type + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-sub-type + subtype: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Identifier for the category of event.', + }, + _action: { + type: require('./element.schema.js'), + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-action + action: { + type: CodeScalar, + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + _dateTime: { + type: require('./element.schema.js'), + description: 'The time when the event occurred on the source.', + }, + dateTime: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time when the event occurred on the source.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Indicates whether the event succeeded or failed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-outcome + outcome: { + type: CodeScalar, + description: 'Indicates whether the event succeeded or failed.', + }, + _outcomeDesc: { + type: require('./element.schema.js'), + description: 'A free text description of the outcome of the event.', + }, + outcomeDesc: { + type: GraphQLString, + description: 'A free text description of the outcome of the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purposeOfEvent: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The purposeOfUse (reason) that was used during the event being recorded.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/auditeventobject.schema.js b/src/resources/1_0_2/schemas/auditeventobject.schema.js index fac967e9..b42511e5 100644 --- a/src/resources/1_0_2/schemas/auditeventobject.schema.js +++ b/src/resources/1_0_2/schemas/auditeventobject.schema.js @@ -1,79 +1,112 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary AuditEvent.object Schema + * @summary AuditEventobject Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventObject', - description: 'Specific instances of data or objects that have been accessed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Identifies a specific instance of the participant object. The reference should always be version specific.', - }, - reference: { - type: require('./reference.schema'), + name: 'AuditEventobject', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'Identifies a specific instance of the participant object. The reference should always be version specific.', + }, + reference: { + type: new GraphQLUnionType({ + name: 'AuditEventobjectreference_reference_Union', description: 'Identifies a specific instance of the participant object. The reference should always be version specific.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-type - type: { - type: require('./coding.schema'), - description: - 'The type of the object that was involved in this audit event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-role - role: { - type: require('./coding.schema'), - description: - 'Code representing the functional application role of Participant Object being audited.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-lifecycle - lifecycle: { - type: require('./coding.schema'), - description: - 'Identifier for the data life-cycle stage for the participant object.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.schema')), - description: 'Denotes security labels for the identified object.', - }, - name: { - type: GraphQLString, - description: - "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", - }, - _name: { - type: require('./element.schema'), - description: - "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", - }, - description: { - type: GraphQLString, - description: 'Text that describes the object in more detail.', - }, - _description: { - type: require('./element.schema'), - description: 'Text that describes the object in more detail.', - }, - query: { - type: Base64BinaryScalar, - description: 'The actual query for a query-type participant object.', - }, - _query: { - type: require('./element.schema'), - description: 'The actual query for a query-type participant object.', - }, - detail: { - type: new GraphQLList(require('./auditeventobjectdetail.schema')), - description: 'Additional Information about the Object.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Identifies a specific instance of the participant object. The reference should always be version specific.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-type + type: { + type: require('./coding.schema.js'), + description: + 'The type of the object that was involved in this audit event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-role + role: { + type: require('./coding.schema.js'), + description: + 'Code representing the functional application role of Participant Object being audited.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-lifecycle + lifecycle: { + type: require('./coding.schema.js'), + description: + 'Identifier for the data life-cycle stage for the participant object.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Denotes security labels for the identified object.', + }, + _name: { + type: require('./element.schema.js'), + description: + "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", + }, + name: { + type: GraphQLString, + description: + "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", + }, + _description: { + type: require('./element.schema.js'), + description: 'Text that describes the object in more detail.', + }, + description: { + type: GraphQLString, + description: 'Text that describes the object in more detail.', + }, + _query: { + type: require('./element.schema.js'), + description: 'The actual query for a query-type participant object.', + }, + query: { + type: Base64BinaryScalar, + description: 'The actual query for a query-type participant object.', + }, + detail: { + type: new GraphQLList(require('./auditeventobjectdetail.schema.js')), + description: 'Additional Information about the Object.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/auditeventobjectdetail.schema.js b/src/resources/1_0_2/schemas/auditeventobjectdetail.schema.js index ac31e290..02f39421 100644 --- a/src/resources/1_0_2/schemas/auditeventobjectdetail.schema.js +++ b/src/resources/1_0_2/schemas/auditeventobjectdetail.schema.js @@ -1,32 +1,55 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary AuditEvent.object.detail Schema + * @summary AuditEventobjectdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventObjectDetail', - description: 'Additional Information about the Object.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - type: { - type: new GraphQLNonNull(GraphQLString), - description: 'Name of the property.', - }, - _type: { - type: require('./element.schema'), - description: 'Name of the property.', - }, - value: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'Property value.', - }, - _value: { - type: require('./element.schema'), - description: 'Property value.', - }, - }), + name: 'AuditEventobjectdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Name of the property.', + }, + type: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name of the property.', + }, + _value: { + type: require('./element.schema.js'), + description: 'Property value.', + }, + value: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'Property value.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/auditeventparticipant.schema.js b/src/resources/1_0_2/schemas/auditeventparticipant.schema.js index fca7f17d..afb4b84c 100644 --- a/src/resources/1_0_2/schemas/auditeventparticipant.schema.js +++ b/src/resources/1_0_2/schemas/auditeventparticipant.schema.js @@ -1,97 +1,153 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLNonNull, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary AuditEvent.participant Schema + * @summary AuditEventparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventParticipant', - description: 'A person, a hardware device or software process.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicm-402-roleid - role: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.', - }, - reference: { - type: require('./reference.schema'), + name: 'AuditEventparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicm-402-roleid + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.', + }, + reference: { + type: new GraphQLUnionType({ + name: 'AuditEventparticipantreference_reference_Union', description: 'Direct reference to a resource that identifies the participant.', - }, - userId: { - type: require('./identifier.schema'), - description: - 'Unique identifier for the user actively participating in the event.', - }, - altId: { - type: GraphQLString, - description: - 'Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', - }, - _altId: { - type: require('./element.schema'), - description: - 'Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', - }, - name: { - type: GraphQLString, - description: 'Human-meaningful name for the user.', - }, - _name: { - type: require('./element.schema'), - description: 'Human-meaningful name for the user.', - }, - requestor: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', - }, - _requestor: { - type: require('./element.schema'), - description: - 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', - }, - location: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Direct reference to a resource that identifies the participant.', + }, + userId: { + type: require('./identifier.schema.js'), + description: + 'Unique identifier for the user actively participating in the event.', + }, + _altId: { + type: require('./element.schema.js'), + description: + 'Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + altId: { + type: GraphQLString, + description: + 'Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-meaningful name for the user.', + }, + name: { + type: GraphQLString, + description: 'Human-meaningful name for the user.', + }, + _requestor: { + type: require('./element.schema.js'), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + requestor: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + location: { + type: new GraphQLUnionType({ + name: 'AuditEventparticipantlocation_location_Union', description: 'Where the event occurred.', - }, - policy: { - type: new GraphQLList(UriScalar), - description: - 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', - }, - _policy: { - type: require('./element.schema'), - description: - 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicm-405-mediatype - media: { - type: require('./coding.schema'), - description: - 'Type of media involved. Used when the event is about exporting/importing onto media.', - }, - network: { - type: require('./auditeventparticipantnetwork.schema'), - description: - 'Logical network location for application activity, if the activity has a network location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purposeOfUse: { - type: new GraphQLList(require('./coding.schema')), - description: - 'The reason (purpose of use), specific to this participant, that was used during the event being recorded.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the event occurred.', + }, + _policy: { + type: require('./element.schema.js'), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicm-405-mediatype + media: { + type: require('./coding.schema.js'), + description: + 'Type of media involved. Used when the event is about exporting/importing onto media.', + }, + network: { + type: require('./auditeventparticipantnetwork.schema.js'), + description: + 'Logical network location for application activity, if the activity has a network location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purposeOfUse: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The reason (purpose of use), specific to this participant, that was used during the event being recorded.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/auditeventparticipantnetwork.schema.js b/src/resources/1_0_2/schemas/auditeventparticipantnetwork.schema.js index 70db6377..1f04d202 100644 --- a/src/resources/1_0_2/schemas/auditeventparticipantnetwork.schema.js +++ b/src/resources/1_0_2/schemas/auditeventparticipantnetwork.schema.js @@ -1,38 +1,55 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary AuditEvent.participant.network Schema + * @summary AuditEventparticipantnetwork Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventParticipantNetwork', - description: - 'Logical network location for application activity, if the activity has a network location.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - address: { - type: GraphQLString, - description: - 'An identifier for the network access point of the user device for the audit event.', - }, - _address: { - type: require('./element.schema'), - description: - 'An identifier for the network access point of the user device for the audit event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/network-type - type: { - type: CodeScalar, - description: - 'An identifier for the type of network access point that originated the audit event.', - }, - _type: { - type: require('./element.schema'), - description: - 'An identifier for the type of network access point that originated the audit event.', - }, - }), + name: 'AuditEventparticipantnetwork', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _address: { + type: require('./element.schema.js'), + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + address: { + type: GraphQLString, + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/network-type + type: { + type: CodeScalar, + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/auditeventsource.schema.js b/src/resources/1_0_2/schemas/auditeventsource.schema.js index d4cb64e2..d3e08ab7 100644 --- a/src/resources/1_0_2/schemas/auditeventsource.schema.js +++ b/src/resources/1_0_2/schemas/auditeventsource.schema.js @@ -1,40 +1,57 @@ const { - GraphQLObjectType, + GraphQLList, GraphQLString, GraphQLNonNull, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary AuditEvent.source Schema + * @summary AuditEventsource Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventSource', - description: 'Application systems and processes.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - site: { - type: GraphQLString, - description: - 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', - }, - _site: { - type: require('./element.schema'), - description: - 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: 'Identifier of the source where the event was detected.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-source-type - type: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Code specifying the type of source where event originated.', - }, - }), + name: 'AuditEventsource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _site: { + type: require('./element.schema.js'), + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + site: { + type: GraphQLString, + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + identifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: 'Identifier of the source where the event was detected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-source-type + type: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Code specifying the type of source where event originated.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/backboneelement.schema.js b/src/resources/1_0_2/schemas/backboneelement.schema.js index a987bb44..0bb926c1 100644 --- a/src/resources/1_0_2/schemas/backboneelement.schema.js +++ b/src/resources/1_0_2/schemas/backboneelement.schema.js @@ -1,6 +1,5 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -8,13 +7,27 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'BackboneElement', - description: 'Base StructureDefinition for BackboneElement Type.', - fields: () => - extendSchema(require('./element.schema'), { - modifierExtension: { - type: new GraphQLList(require('./extension.schema')), - description: - 'May be used to represent additional information that is not part of the basic definition of the element, 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.', - }, - }), + description: 'Base StructureDefinition for BackboneElement Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/basic.schema.js b/src/resources/1_0_2/schemas/basic.schema.js index 1bf5d9b9..7808f665 100644 --- a/src/resources/1_0_2/schemas/basic.schema.js +++ b/src/resources/1_0_2/schemas/basic.schema.js @@ -1,20 +1,14 @@ -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BasicResourceType = new GraphQLEnumType({ - name: 'BasicResourceType', - values: { - Basic: { value: 'Basic' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -22,41 +16,128 @@ let BasicResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Basic', - description: 'Base StructureDefinition for Basic Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(BasicResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/basic-resource-type - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Identifies the 'type' of resource - equivalent to the resource name for other resources.", - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Basic Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Basic_Enum_schema', + values: { Basic: { value: 'Basic' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/basic-resource-type + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Identifies the 'type' of resource - equivalent to the resource name for other resources.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'Basicsubject_subject_Union', description: "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", - }, - author: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", + }, + author: { + type: new GraphQLUnionType({ + name: 'Basicauthor_author_Union', description: 'Indicates who was responsible for creating the resource instance.', - }, - created: { - type: DateScalar, - description: 'Identifies when the resource was first created.', - }, - _created: { - type: require('./element.schema'), - description: 'Identifies when the resource was first created.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Indicates who was responsible for creating the resource instance.', + }, + _created: { + type: require('./element.schema.js'), + description: 'Identifies when the resource was first created.', + }, + created: { + type: DateScalar, + description: 'Identifies when the resource was first created.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/binary.schema.js b/src/resources/1_0_2/schemas/binary.schema.js index b895faff..d12065cd 100644 --- a/src/resources/1_0_2/schemas/binary.schema.js +++ b/src/resources/1_0_2/schemas/binary.schema.js @@ -1,20 +1,12 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BinaryResourceType = new GraphQLEnumType({ - name: 'BinaryResourceType', - values: { - Binary: { value: 'Binary' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports @@ -22,30 +14,67 @@ let BinaryResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Binary', - description: 'Base StructureDefinition for Binary Resource.', - fields: () => - extendSchema(require('./resource.schema'), { - resourceType: { - type: new GraphQLNonNull(BinaryResourceType), - description: 'Type of this resource.', - }, - contentType: { - type: new GraphQLNonNull(CodeScalar), - description: - 'MimeType of the binary content represented as a standard MimeType (BCP 13).', - }, - _contentType: { - type: require('./element.schema'), - description: - 'MimeType of the binary content represented as a standard MimeType (BCP 13).', - }, - content: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The actual content, base64 encoded.', - }, - _content: { - type: require('./element.schema'), - description: 'The actual content, base64 encoded.', - }, - }), + description: 'Base StructureDefinition for Binary Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Binary_Enum_schema', + values: { Binary: { value: 'Binary' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + contentType: { + type: new GraphQLNonNull(CodeScalar), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + _content: { + type: require('./element.schema.js'), + description: 'The actual content, base64 encoded.', + }, + content: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The actual content, base64 encoded.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/bodysite.schema.js b/src/resources/1_0_2/schemas/bodysite.schema.js index 53b3a8ba..5a9a2028 100644 --- a/src/resources/1_0_2/schemas/bodysite.schema.js +++ b/src/resources/1_0_2/schemas/bodysite.schema.js @@ -1,19 +1,14 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BodySiteResourceType = new GraphQLEnumType({ - name: 'BodySiteResourceType', - values: { - BodySite: { value: 'BodySite' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,44 +16,111 @@ let BodySiteResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'BodySite', - description: 'Base StructureDefinition for BodySite Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(BodySiteResourceType), - description: 'Type of this resource.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The person to which the body site belongs.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier for this instance of the anatomical location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - code: { - type: require('./codeableconcept.schema'), - description: - 'Named anatomical location - ideally coded where possible.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bodysite-relative-location - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane.', - }, - description: { - type: GraphQLString, - description: 'Description of anatomical location.', - }, - _description: { - type: require('./element.schema'), - description: 'Description of anatomical location.', - }, - image: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Image or images used to identify a location.', - }, - }), + description: 'Base StructureDefinition for BodySite Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'BodySite_Enum_schema', + values: { BodySite: { value: 'BodySite' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'BodySitepatient_patient_Union', + description: 'The person to which the body site belongs.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The person to which the body site belongs.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Identifier for this instance of the anatomical location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + code: { + type: require('./codeableconcept.schema.js'), + description: 'Named anatomical location - ideally coded where possible.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bodysite-relative-location + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Description of anatomical location.', + }, + description: { + type: GraphQLString, + description: 'Description of anatomical location.', + }, + image: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image or images used to identify a location.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/bundle.schema.js b/src/resources/1_0_2/schemas/bundle.schema.js index 7fe78a48..84d56f13 100644 --- a/src/resources/1_0_2/schemas/bundle.schema.js +++ b/src/resources/1_0_2/schemas/bundle.schema.js @@ -1,21 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BundleResourceType = new GraphQLEnumType({ - name: 'BundleResourceType', - values: { - Bundle: { value: 'Bundle' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -23,46 +15,83 @@ let BundleResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Bundle', - description: 'Base StructureDefinition for Bundle Resource.', - fields: () => - extendSchema(require('./resource.schema'), { - resourceType: { - type: new GraphQLNonNull(BundleResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bundle-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the purpose of this bundle- how it was intended to be used.', - }, - _type: { - type: require('./element.schema'), - description: - 'Indicates the purpose of this bundle- how it was intended to be used.', - }, - total: { - type: UnsignedIntScalar, - description: - 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', - }, - _total: { - type: require('./element.schema'), - description: - 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', - }, - link: { - type: new GraphQLList(require('./bundlelink.schema')), - description: 'A series of links that provide context to this bundle.', - }, - entry: { - type: new GraphQLList(require('./bundleentry.schema')), - description: - 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', - }, - signature: { - type: require('./signature.schema'), - description: 'Digital Signature - base64 encoded. XML DigSIg or a JWT.', - }, - }), + description: 'Base StructureDefinition for Bundle Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Bundle_Enum_schema', + values: { Bundle: { value: 'Bundle' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Indicates the purpose of this bundle- how it was intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bundle-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose of this bundle- how it was intended to be used.', + }, + _total: { + type: require('./element.schema.js'), + description: + 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', + }, + total: { + type: UnsignedIntScalar, + description: + 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', + }, + link: { + type: new GraphQLList(require('./bundlelink.schema.js')), + description: 'A series of links that provide context to this bundle.', + }, + entry: { + type: new GraphQLList(require('./bundleentry.schema.js')), + description: + 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', + }, + signature: { + type: require('./signature.schema.js'), + description: 'Digital Signature - base64 encoded. XML DigSIg or a JWT.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/bundleentry.schema.js b/src/resources/1_0_2/schemas/bundleentry.schema.js index e29d540e..2ad13619 100644 --- a/src/resources/1_0_2/schemas/bundleentry.schema.js +++ b/src/resources/1_0_2/schemas/bundleentry.schema.js @@ -1,46 +1,63 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Bundle.entry Schema + * @summary Bundleentry Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleEntry', - description: - 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - fullUrl: { - type: UriScalar, - description: - 'The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.', - }, - _fullUrl: { - type: require('./element.schema'), - description: - 'The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.', - }, - resource: { - type: require('./resourcelist.schema'), - description: 'The Resources for the entry.', - }, - search: { - type: require('./bundleentrysearch.schema'), - description: - 'Information about the search process that lead to the creation of this entry.', - }, - request: { - type: require('./bundleentryrequest.schema'), - description: - 'Additional information about how this entry should be processed as part of a transaction.', - }, - response: { - type: require('./bundleentryresponse.schema'), - description: - 'Additional information about how this entry should be processed as part of a transaction.', - }, - }), + name: 'Bundleentry', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _fullUrl: { + type: require('./element.schema.js'), + description: + 'The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.', + }, + fullUrl: { + type: UriScalar, + description: + 'The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.', + }, + resource: { + type: require('./resourcelist.schema'), + description: 'The Resources for the entry.', + }, + search: { + type: require('./bundleentrysearch.schema.js'), + description: + 'Information about the search process that lead to the creation of this entry.', + }, + request: { + type: require('./bundleentryrequest.schema.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction.', + }, + response: { + type: require('./bundleentryresponse.schema.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/bundleentryrequest.schema.js b/src/resources/1_0_2/schemas/bundleentryrequest.schema.js index f2a5a5c1..4927ecb5 100644 --- a/src/resources/1_0_2/schemas/bundleentryrequest.schema.js +++ b/src/resources/1_0_2/schemas/bundleentryrequest.schema.js @@ -1,80 +1,102 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary Bundle.entry.request Schema + * @summary Bundleentryrequest Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleEntryRequest', - description: - 'Additional information about how this entry should be processed as part of a transaction.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/http-verb - method: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The HTTP verb for this entry in either a update history, or a transaction/ transaction response.', - }, - _method: { - type: require('./element.schema'), - description: - 'The HTTP verb for this entry in either a update history, or a transaction/ transaction response.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'The URL for this entry, relative to the root (the address to which the request is posted).', - }, - _url: { - type: require('./element.schema'), - description: - 'The URL for this entry, relative to the root (the address to which the request is posted).', - }, - ifNoneMatch: { - type: GraphQLString, - description: - "If the ETag values match, return a 304 Not modified status. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - _ifNoneMatch: { - type: require('./element.schema'), - description: - "If the ETag values match, return a 304 Not modified status. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - ifModifiedSince: { - type: InstantScalar, - description: - "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - _ifModifiedSince: { - type: require('./element.schema'), - description: - "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - ifMatch: { - type: GraphQLString, - description: - "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", - }, - _ifMatch: { - type: require('./element.schema'), - description: - "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", - }, - ifNoneExist: { - type: GraphQLString, - description: - "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", - }, - _ifNoneExist: { - type: require('./element.schema'), - description: - "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", - }, - }), + name: 'Bundleentryrequest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _method: { + type: require('./element.schema.js'), + description: + 'The HTTP verb for this entry in either a update history, or a transaction/ transaction response.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/http-verb + method: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The HTTP verb for this entry in either a update history, or a transaction/ transaction response.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + _ifNoneMatch: { + type: require('./element.schema.js'), + description: + "If the ETag values match, return a 304 Not modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifNoneMatch: { + type: GraphQLString, + description: + "If the ETag values match, return a 304 Not modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifModifiedSince: { + type: require('./element.schema.js'), + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifModifiedSince: { + type: InstantScalar, + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifMatch: { + type: require('./element.schema.js'), + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + ifMatch: { + type: GraphQLString, + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + _ifNoneExist: { + type: require('./element.schema.js'), + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + ifNoneExist: { + type: GraphQLString, + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/bundleentryresponse.schema.js b/src/resources/1_0_2/schemas/bundleentryresponse.schema.js index 273e8d66..5d6cdf5c 100644 --- a/src/resources/1_0_2/schemas/bundleentryresponse.schema.js +++ b/src/resources/1_0_2/schemas/bundleentryresponse.schema.js @@ -1,56 +1,76 @@ -const UriScalar = require('../scalars/uri.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary Bundle.entry.response Schema + * @summary Bundleentryresponse Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleEntryResponse', - description: - 'Additional information about how this entry should be processed as part of a transaction.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - status: { - type: new GraphQLNonNull(GraphQLString), - description: 'The status code returned by processing this entry.', - }, - _status: { - type: require('./element.schema'), - description: 'The status code returned by processing this entry.', - }, - location: { - type: UriScalar, - description: - 'The location header created by processing this operation.', - }, - _location: { - type: require('./element.schema'), - description: - 'The location header created by processing this operation.', - }, - etag: { - type: GraphQLString, - description: - 'The etag for the resource, it the operation for the entry produced a versioned resource.', - }, - _etag: { - type: require('./element.schema'), - description: - 'The etag for the resource, it the operation for the entry produced a versioned resource.', - }, - lastModified: { - type: InstantScalar, - description: - 'The date/time that the resource was modified on the server.', - }, - _lastModified: { - type: require('./element.schema'), - description: - 'The date/time that the resource was modified on the server.', - }, - }), + name: 'Bundleentryresponse', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status code returned by processing this entry.', + }, + status: { + type: new GraphQLNonNull(GraphQLString), + description: 'The status code returned by processing this entry.', + }, + _location: { + type: require('./element.schema.js'), + description: 'The location header created by processing this operation.', + }, + location: { + type: UriScalar, + description: 'The location header created by processing this operation.', + }, + _etag: { + type: require('./element.schema.js'), + description: + 'The etag for the resource, it the operation for the entry produced a versioned resource.', + }, + etag: { + type: GraphQLString, + description: + 'The etag for the resource, it the operation for the entry produced a versioned resource.', + }, + _lastModified: { + type: require('./element.schema.js'), + description: + 'The date/time that the resource was modified on the server.', + }, + lastModified: { + type: InstantScalar, + description: + 'The date/time that the resource was modified on the server.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/bundleentrysearch.schema.js b/src/resources/1_0_2/schemas/bundleentrysearch.schema.js index 75b21e7d..4d875e29 100644 --- a/src/resources/1_0_2/schemas/bundleentrysearch.schema.js +++ b/src/resources/1_0_2/schemas/bundleentrysearch.schema.js @@ -1,38 +1,55 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLFloat, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Bundle.entry.search Schema + * @summary Bundleentrysearch Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleEntrySearch', - description: - 'Information about the search process that lead to the creation of this entry.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-entry-mode - mode: { - type: CodeScalar, - description: - "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", - }, - _mode: { - type: require('./element.schema'), - description: - "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", - }, - score: { - type: GraphQLFloat, - description: - "When searching, the server's search ranking score for the entry.", - }, - _score: { - type: require('./element.schema'), - description: - "When searching, the server's search ranking score for the entry.", - }, - }), + name: 'Bundleentrysearch', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-entry-mode + mode: { + type: CodeScalar, + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", + }, + _score: { + type: require('./element.schema.js'), + description: + "When searching, the server's search ranking score for the entry.", + }, + score: { + type: GraphQLFloat, + description: + "When searching, the server's search ranking score for the entry.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/bundlelink.schema.js b/src/resources/1_0_2/schemas/bundlelink.schema.js index 07bcdce7..bfec0140 100644 --- a/src/resources/1_0_2/schemas/bundlelink.schema.js +++ b/src/resources/1_0_2/schemas/bundlelink.schema.js @@ -1,34 +1,57 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Bundle.link Schema + * @summary Bundlelink Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleLink', - description: 'A series of links that provide context to this bundle.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - relation: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].', - }, - _relation: { - type: require('./element.schema'), - description: - 'A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: 'The reference details for the link.', - }, - _url: { - type: require('./element.schema'), - description: 'The reference details for the link.', - }, - }), + name: 'Bundlelink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _relation: { + type: require('./element.schema.js'), + description: + 'A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].', + }, + relation: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]].', + }, + _url: { + type: require('./element.schema.js'), + description: 'The reference details for the link.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'The reference details for the link.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/careplan.schema.js b/src/resources/1_0_2/schemas/careplan.schema.js index 7da2f1b4..f53af5b3 100644 --- a/src/resources/1_0_2/schemas/careplan.schema.js +++ b/src/resources/1_0_2/schemas/careplan.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CarePlanResourceType = new GraphQLEnumType({ - name: 'CarePlanResourceType', - values: { - CarePlan: { value: 'CarePlan' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,106 +17,257 @@ let CarePlanResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'CarePlan', - description: 'Base StructureDefinition for CarePlan Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CarePlanResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for CarePlan Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CarePlan_Enum_schema', + values: { CarePlan: { value: 'CarePlan' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'CarePlansubject_subject_Union', description: 'Identifies the patient or group whose intended care is described by the plan.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', - }, - _status: { - type: require('./element.schema'), - description: - 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'Identifies the patient or group whose intended care is described by the plan.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + context: { + type: new GraphQLUnionType({ + name: 'CarePlancontext_context_Union', description: 'Identifies the context in which this particular CarePlan is defined.', - }, - period: { - type: require('./period.schema'), - description: - 'Indicates when the plan did (or is intended to) come into effect and end.', - }, - author: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', - }, - modified: { - type: DateTimeScalar, - description: - 'Identifies the most recent date on which the plan has been revised.', - }, - _modified: { - type: require('./element.schema'), - description: - 'Identifies the most recent date on which the plan has been revised.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", - }, - description: { - type: GraphQLString, - description: 'A description of the scope and nature of the plan.', - }, - _description: { - type: require('./element.schema'), - description: 'A description of the scope and nature of the plan.', - }, - addresses: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', - }, - support: { - type: new GraphQLList(require('./reference.schema')), - description: - "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", - }, - relatedPlan: { - type: new GraphQLList(require('./careplanrelatedplan.schema')), - description: - 'Identifies CarePlans with some sort of formal relationship to the current plan.', - }, - participant: { - type: new GraphQLList(require('./careplanparticipant.schema')), - description: - 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', - }, - goal: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Describes the intended objective(s) of carrying out the care plan.', - }, - activity: { - type: new GraphQLList(require('./careplanactivity.schema')), - description: - 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', - }, - note: { - type: require('./annotation.schema'), - description: 'General notes about the care plan not covered elsewhere.', - }, - }), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'Identifies the context in which this particular CarePlan is defined.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates when the plan did (or is intended to) come into effect and end.', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanauthor_author_Union', + description: + 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', + }, + _modified: { + type: require('./element.schema.js'), + description: + 'Identifies the most recent date on which the plan has been revised.', + }, + modified: { + type: DateTimeScalar, + description: + 'Identifies the most recent date on which the plan has been revised.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of the scope and nature of the plan.', + }, + description: { + type: GraphQLString, + description: 'A description of the scope and nature of the plan.', + }, + addresses: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanaddresses_addresses_Union', + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + }, + support: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlansupport_support_Union', + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", + }, + relatedPlan: { + type: new GraphQLList(require('./careplanrelatedplan.schema.js')), + description: + 'Identifies CarePlans with some sort of formal relationship to the current plan.', + }, + participant: { + type: new GraphQLList(require('./careplanparticipant.schema.js')), + description: + 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', + }, + goal: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlangoal_goal_Union', + description: + 'Describes the intended objective(s) of carrying out the care plan.', + types: () => [require('./goal.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); + } + }, + }), + ), + description: + 'Describes the intended objective(s) of carrying out the care plan.', + }, + activity: { + type: new GraphQLList(require('./careplanactivity.schema.js')), + description: + 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', + }, + note: { + type: require('./annotation.schema.js'), + description: 'General notes about the care plan not covered elsewhere.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/careplanactivity.schema.js b/src/resources/1_0_2/schemas/careplanactivity.schema.js index 57b23991..b4c211ad 100644 --- a/src/resources/1_0_2/schemas/careplanactivity.schema.js +++ b/src/resources/1_0_2/schemas/careplanactivity.schema.js @@ -1,36 +1,120 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary CarePlan.activity Schema + * @summary CarePlanactivity Schema */ module.exports = new GraphQLObjectType({ - name: 'CarePlanActivity', - description: - 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - actionResulting: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.', - }, - progress: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Notes about the adherence/status/progress of the activity.', - }, - reference: { - type: require('./reference.schema'), + name: 'CarePlanactivity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + actionResulting: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivityactionResulting_actionResulting_Union', + description: + 'Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Resources that describe follow-on actions resulting from the plan, such as drug prescriptions, encounter records, appointments, etc.', + }, + progress: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Notes about the adherence/status/progress of the activity.', + }, + reference: { + type: new GraphQLUnionType({ + name: 'CarePlanactivityreference_reference_Union', description: 'The details of the proposed activity represented in a specific resource.', - }, - detail: { - type: require('./careplanactivitydetail.schema'), - description: - "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", - }, - }), + types: () => [ + require('./appointment.schema.js'), + require('./communicationrequest.schema.js'), + require('./deviceuserequest.schema.js'), + require('./diagnosticorder.schema.js'), + require('./medicationorder.schema.js'), + require('./nutritionorder.schema.js'), + require('./order.schema.js'), + require('./procedurerequest.schema.js'), + require('./processrequest.schema.js'), + require('./referralrequest.schema.js'), + require('./supplyrequest.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + if (data && data.resourceType === 'DeviceUseRequest') { + return require('./deviceuserequest.schema.js'); + } + if (data && data.resourceType === 'DiagnosticOrder') { + return require('./diagnosticorder.schema.js'); + } + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'Order') { + return require('./order.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ProcessRequest') { + return require('./processrequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + if (data && data.resourceType === 'SupplyRequest') { + return require('./supplyrequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, + }), + description: + 'The details of the proposed activity represented in a specific resource.', + }, + detail: { + type: require('./careplanactivitydetail.schema.js'), + description: + "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/careplanactivitydetail.schema.js b/src/resources/1_0_2/schemas/careplanactivitydetail.schema.js index ad09696c..76736266 100644 --- a/src/resources/1_0_2/schemas/careplanactivitydetail.schema.js +++ b/src/resources/1_0_2/schemas/careplanactivitydetail.schema.js @@ -1,140 +1,233 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, GraphQLList, + GraphQLUnionType, GraphQLNonNull, GraphQLBoolean, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CarePlan.activity.detail Schema + * @summary CarePlanactivitydetail Schema */ module.exports = new GraphQLObjectType({ - name: 'CarePlanActivityDetail', - description: - "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-category - category: { - type: require('./codeableconcept.schema'), - description: - 'High-level categorization of the type of activity in a care plan.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity - code: { - type: require('./codeableconcept.schema'), - description: - 'Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/activity-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Provides the rationale that drove the inclusion of this particular activity as part of the plan.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', - }, - goal: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-status - status: { - type: CodeScalar, - description: - 'Identifies what progress is being made for the specific activity.', - }, - _status: { - type: require('./element.schema'), - description: - 'Identifies what progress is being made for the specific activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-status-reason - statusReason: { - type: require('./codeableconcept.schema'), - description: - "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", - }, - prohibited: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan.', - }, - _prohibited: { - type: require('./element.schema'), - description: - 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan.', - }, - scheduledTiming: { - type: require('./timing.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - scheduledPeriod: { - type: require('./period.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - scheduledString: { - type: GraphQLString, - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - _scheduledString: { - type: require('./element.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - location: { - type: require('./reference.schema'), + name: 'CarePlanactivitydetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'High-level categorization of the type of activity in a care plan.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/activity-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Provides the rationale that drove the inclusion of this particular activity as part of the plan.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailreasonReference_reasonReference_Union', + description: + 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', + }, + goal: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailgoal_goal_Union', + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + types: () => [require('./goal.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); + } + }, + }), + ), + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Identifies what progress is being made for the specific activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-status + status: { + type: CodeScalar, + description: + 'Identifies what progress is being made for the specific activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-status-reason + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", + }, + _prohibited: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan.', + }, + prohibited: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan.', + }, + scheduledTiming: { + type: require('./timing.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledPeriod: { + type: require('./period.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _scheduledString: { + type: require('./element.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledString: { + type: GraphQLString, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: new GraphQLUnionType({ + name: 'CarePlanactivitydetaillocation_location_Union', description: 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', - }, - performer: { - type: new GraphQLList(require('./reference.schema')), - description: - "Identifies who's expected to be involved in the activity.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productCodeableConcept: { - type: require('./codeableconcept.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailperformer_performer_Union', + description: + "Identifies who's expected to be involved in the activity.", + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: "Identifies who's expected to be involved in the activity.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productReference: { + type: new GraphQLUnionType({ + name: 'CarePlanactivitydetailproductReference_productReference_Union', description: 'Identifies the food, drug or other product to be consumed or supplied in the activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productReference: { - type: require('./reference.schema'), - description: - 'Identifies the food, drug or other product to be consumed or supplied in the activity.', - }, - dailyAmount: { - type: require('./quantity.schema'), - description: - 'Identifies the quantity expected to be consumed in a given day.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', - }, - description: { - type: GraphQLString, - description: - 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', - }, - _description: { - type: require('./element.schema'), - description: - 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', - }, - }), + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + dailyAmount: { + type: require('./quantity.schema.js'), + description: + 'Identifies the quantity expected to be consumed in a given day.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + description: { + type: GraphQLString, + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/careplanparticipant.schema.js b/src/resources/1_0_2/schemas/careplanparticipant.schema.js index 9231b752..b1de0516 100644 --- a/src/resources/1_0_2/schemas/careplanparticipant.schema.js +++ b/src/resources/1_0_2/schemas/careplanparticipant.schema.js @@ -1,27 +1,68 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary CarePlan.participant Schema + * @summary CarePlanparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'CarePlanParticipant', - description: - 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - role: { - type: require('./codeableconcept.schema'), - description: - "Indicates specific responsibility of an individual within the care plan; e.g. 'Primary physician', 'Team coordinator', 'Caregiver', etc.", - }, - member: { - type: require('./reference.schema'), + name: 'CarePlanparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + role: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates specific responsibility of an individual within the care plan; e.g. 'Primary physician', 'Team coordinator', 'Caregiver', etc.", + }, + member: { + type: new GraphQLUnionType({ + name: 'CarePlanparticipantmember_member_Union', description: 'The specific person or organization who is participating/expected to participate in the care plan.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The specific person or organization who is participating/expected to participate in the care plan.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/careplanrelatedplan.schema.js b/src/resources/1_0_2/schemas/careplanrelatedplan.schema.js index 93ef6a77..496f9799 100644 --- a/src/resources/1_0_2/schemas/careplanrelatedplan.schema.js +++ b/src/resources/1_0_2/schemas/careplanrelatedplan.schema.js @@ -1,33 +1,67 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CarePlan.relatedPlan Schema + * @summary CarePlanrelatedPlan Schema */ module.exports = new GraphQLObjectType({ - name: 'CarePlanRelatedPlan', - description: - 'Identifies CarePlans with some sort of formal relationship to the current plan.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-relationship - code: { - type: CodeScalar, - description: - 'Identifies the type of relationship this plan has to the target plan.', - }, - _code: { - type: require('./element.schema'), - description: - 'Identifies the type of relationship this plan has to the target plan.', - }, - plan: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the plan to which a relationship is asserted.', - }, - }), + name: 'CarePlanrelatedPlan', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Identifies the type of relationship this plan has to the target plan.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-relationship + code: { + type: CodeScalar, + description: + 'Identifies the type of relationship this plan has to the target plan.', + }, + plan: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CarePlanrelatedPlanplan_plan_Union', + description: + 'A reference to the plan to which a relationship is asserted.', + types: () => [require('./careplan.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + }, + }), + ), + description: + 'A reference to the plan to which a relationship is asserted.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claim.schema.js b/src/resources/1_0_2/schemas/claim.schema.js index 1dabd426..e431cbf2 100644 --- a/src/resources/1_0_2/schemas/claim.schema.js +++ b/src/resources/1_0_2/schemas/claim.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ClaimResourceType = new GraphQLEnumType({ - name: 'ClaimResourceType', - values: { - Claim: { value: 'Claim' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,180 +18,331 @@ let ClaimResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Claim', - description: 'Base StructureDefinition for Claim Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ClaimResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-type-link - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The category of claim this is.', - }, - _type: { - type: require('./element.schema'), - description: 'The category of claim this is.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the specification on which this instance relies.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The version of the specification from which the original instance was created.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - target: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Claim Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Claim_Enum_schema', + values: { Claim: { value: 'Claim' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The category of claim this is.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-type-link + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The category of claim this is.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the specification on which this instance relies.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The version of the specification from which the original instance was created.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + target: { + type: new GraphQLUnionType({ + name: 'Claimtarget_target_Union', description: 'Insurer Identifier, typical BIN number (6 digit).', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Insurer Identifier, typical BIN number (6 digit).', + }, + provider: { + type: new GraphQLUnionType({ + name: 'Claimprovider_provider_Union', description: 'The provider which is responsible for the bill, claim pre-determination, pre-authorization.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The provider which is responsible for the bill, claim pre-determination, pre-authorization.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'Claimorganization_organization_Union', description: 'The organization which is responsible for the bill, claim pre-determination, pre-authorization.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-use-link - use: { - type: CodeScalar, - description: - 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', - }, - _use: { - type: require('./element.schema'), - description: - 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-priority - priority: { - type: require('./coding.schema'), - description: - 'Immediate (stat), best effort (normal), deferred (deferred).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve - fundsReserve: { - type: require('./coding.schema'), - description: - "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", - }, - enterer: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the bill, claim pre-determination, pre-authorization.', + }, + _use: { + type: require('./element.schema.js'), + description: + 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-use-link + use: { + type: CodeScalar, + description: + 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-priority + priority: { + type: require('./coding.schema.js'), + description: + 'Immediate (stat), best effort (normal), deferred (deferred).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve + fundsReserve: { + type: require('./coding.schema.js'), + description: + "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", + }, + enterer: { + type: new GraphQLUnionType({ + name: 'Claimenterer_enterer_Union', description: 'Person who created the invoice/claim/pre-determination or pre-authorization.', - }, - facility: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Person who created the invoice/claim/pre-determination or pre-authorization.', + }, + facility: { + type: new GraphQLUnionType({ + name: 'Claimfacility_facility_Union', description: 'Facility where the services were provided.', - }, - prescription: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Facility where the services were provided.', + }, + prescription: { + type: new GraphQLUnionType({ + name: 'Claimprescription_prescription_Union', description: 'Prescription to support the dispensing of Pharmacy or Vision products.', - }, - originalPrescription: { - type: require('./reference.schema'), + types: () => [ + require('./medicationorder.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, + }), + description: + 'Prescription to support the dispensing of Pharmacy or Vision products.', + }, + originalPrescription: { + type: new GraphQLUnionType({ + name: 'ClaimoriginalPrescription_originalPrescription_Union', description: 'Original prescription to support the dispensing of pharmacy services, medications or products.', - }, - payee: { - type: require('./claimpayee.schema'), - description: 'The party to be reimbursed for the services.', - }, - referral: { - type: require('./reference.schema'), + types: () => [require('./medicationorder.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); + } + }, + }), + description: + 'Original prescription to support the dispensing of pharmacy services, medications or products.', + }, + payee: { + type: require('./claimpayee.schema.js'), + description: 'The party to be reimbursed for the services.', + }, + referral: { + type: new GraphQLUnionType({ + name: 'Claimreferral_referral_Union', description: 'The referral resource which lists the date, practitioner, reason and other supporting information.', - }, - diagnosis: { - type: new GraphQLList(require('./claimdiagnosis.schema')), - description: - 'Ordered list of patient diagnosis for which care is sought.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-conditions - condition: { - type: new GraphQLList(require('./coding.schema')), - description: 'List of patient conditions for which care is sought.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Patient Resource.', - }, - coverage: { - type: new GraphQLList(require('./claimcoverage.schema')), - description: - 'Financial instrument by which payment information for health care.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-exception - exception: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Factors which may influence the applicability of coverage.', - }, - school: { - type: GraphQLString, - description: 'Name of school for over-aged dependents.', - }, - _school: { - type: require('./element.schema'), - description: 'Name of school for over-aged dependents.', - }, - accident: { - type: DateScalar, - description: 'Date of an accident which these services are addressing.', - }, - _accident: { - type: require('./element.schema'), - description: 'Date of an accident which these services are addressing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode - accidentType: { - type: require('./coding.schema'), - description: 'Type of accident: work, auto, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/intervention - interventionException: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A list of intervention and exception codes which may influence the adjudication of the claim.', - }, - item: { - type: new GraphQLList(require('./claimitem.schema')), - description: 'First tier of goods and services.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/additionalmaterials - additionalMaterials: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.', - }, - missingTeeth: { - type: new GraphQLList(require('./claimmissingteeth.schema')), - description: - 'A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.', - }, - }), + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + description: + 'The referral resource which lists the date, practitioner, reason and other supporting information.', + }, + diagnosis: { + type: new GraphQLList(require('./claimdiagnosis.schema.js')), + description: + 'Ordered list of patient diagnosis for which care is sought.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-conditions + condition: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'List of patient conditions for which care is sought.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Claimpatient_patient_Union', + description: 'Patient Resource.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'Patient Resource.', + }, + coverage: { + type: new GraphQLList(require('./claimcoverage.schema.js')), + description: + 'Financial instrument by which payment information for health care.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-exception + exception: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Factors which may influence the applicability of coverage.', + }, + _school: { + type: require('./element.schema.js'), + description: 'Name of school for over-aged dependents.', + }, + school: { + type: GraphQLString, + description: 'Name of school for over-aged dependents.', + }, + _accident: { + type: require('./element.schema.js'), + description: 'Date of an accident which these services are addressing.', + }, + accident: { + type: DateScalar, + description: 'Date of an accident which these services are addressing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode + accidentType: { + type: require('./coding.schema.js'), + description: 'Type of accident: work, auto, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/intervention + interventionException: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A list of intervention and exception codes which may influence the adjudication of the claim.', + }, + item: { + type: new GraphQLList(require('./claimitem.schema.js')), + description: 'First tier of goods and services.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/additionalmaterials + additionalMaterials: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.', + }, + missingTeeth: { + type: new GraphQLList(require('./claimmissingteeth.schema.js')), + description: + 'A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimcoverage.schema.js b/src/resources/1_0_2/schemas/claimcoverage.schema.js index 33734006..53fce645 100644 --- a/src/resources/1_0_2/schemas/claimcoverage.schema.js +++ b/src/resources/1_0_2/schemas/claimcoverage.schema.js @@ -1,81 +1,120 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLUnionType, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.coverage Schema + * @summary Claimcoverage Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimCoverage', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line item.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line item.', - }, - focal: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - _focal: { - type: require('./element.schema'), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.schema'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relationship - relationship: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The relationship of the patient to the subscriber.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.schema'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - claimResponse: { - type: require('./reference.schema'), + name: 'Claimcoverage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line item.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line item.', + }, + _focal: { + type: require('./element.schema.js'), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Claimcoveragecoverage_coverage_Union', + description: + 'Reference to the program or plan identification, underwriter or payor.', + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _businessArrangement: { + type: require('./element.schema.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relationship + relationship: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The relationship of the patient to the subscriber.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + claimResponse: { + type: new GraphQLUnionType({ + name: 'ClaimcoverageclaimResponse_claimResponse_Union', description: 'The Coverages adjudication details.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - }), + types: () => [require('./claimresponse.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + description: 'The Coverages adjudication details.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimdiagnosis.schema.js b/src/resources/1_0_2/schemas/claimdiagnosis.schema.js index 6e9d6c57..19bb5366 100644 --- a/src/resources/1_0_2/schemas/claimdiagnosis.schema.js +++ b/src/resources/1_0_2/schemas/claimdiagnosis.schema.js @@ -1,31 +1,49 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.diagnosis Schema + * @summary Claimdiagnosis Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimDiagnosis', - description: 'Ordered list of patient diagnosis for which care is sought.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of diagnosis which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Sequence of diagnosis which serves to order and provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosis: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The diagnosis.', - }, - }), + name: 'Claimdiagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Sequence of diagnosis which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of diagnosis which serves to order and provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosis: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The diagnosis.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimitem.schema.js b/src/resources/1_0_2/schemas/claimitem.schema.js index 8a06d9c2..3ceddcf2 100644 --- a/src/resources/1_0_2/schemas/claimitem.schema.js +++ b/src/resources/1_0_2/schemas/claimitem.schema.js @@ -1,131 +1,159 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLUnionType, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.item Schema + * @summary Claimitem Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimItem', - description: 'First tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The type of product or service.', - }, - provider: { - type: require('./reference.schema'), + name: 'Claimitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The type of product or service.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'Claimitemprovider_provider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - diagnosisLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Diagnosis applicable for this service or product line.', - }, - _diagnosisLinkId: { - type: require('./element.schema'), - description: 'Diagnosis applicable for this service or product line.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", - }, - serviceDate: { - type: DateScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _serviceDate: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./quantity.schema'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.schema'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.schema'), - description: - 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/udi - udi: { - type: require('./coding.schema'), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/tooth - bodySite: { - type: require('./coding.schema'), - description: - 'Physical service site on the patient (limb, tooth, etc.).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/surface - subSite: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A region or surface of the site, e.g. limb region or tooth surface(s).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.', - }, - detail: { - type: new GraphQLList(require('./claimitemdetail.schema')), - description: 'Second tier of goods and services.', - }, - prosthesis: { - type: require('./claimitemprosthesis.schema'), - description: - 'The materials and placement date of prior fixed prosthesis.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + _diagnosisLinkId: { + type: require('./element.schema.js'), + description: 'Diagnosis applicable for this service or product line.', + }, + diagnosisLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnosis applicable for this service or product line.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", + }, + _serviceDate: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + serviceDate: { + type: DateScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./quantity.schema.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.schema.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/udi + udi: { + type: require('./coding.schema.js'), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/tooth + bodySite: { + type: require('./coding.schema.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/surface + subSite: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A region or surface of the site, e.g. limb region or tooth surface(s).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Item typification or modifiers codes, e.g. for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.', + }, + detail: { + type: new GraphQLList(require('./claimitemdetail.schema.js')), + description: 'Second tier of goods and services.', + }, + prosthesis: { + type: require('./claimitemprosthesis.schema.js'), + description: + 'The materials and placement date of prior fixed prosthesis.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimitemdetail.schema.js b/src/resources/1_0_2/schemas/claimitemdetail.schema.js index bfa16bda..e5a7f278 100644 --- a/src/resources/1_0_2/schemas/claimitemdetail.schema.js +++ b/src/resources/1_0_2/schemas/claimitemdetail.schema.js @@ -1,84 +1,102 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.item.detail Schema + * @summary Claimitemdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimItemDetail', - description: 'Second tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The type of product or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./quantity.schema'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.schema'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.schema'), - description: - 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/udi - udi: { - type: require('./coding.schema'), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - subDetail: { - type: new GraphQLList(require('./claimitemdetailsubdetail.schema')), - description: 'Third tier of goods and services.', - }, - }), + name: 'Claimitemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The type of product or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./quantity.schema.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.schema.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/udi + udi: { + type: require('./coding.schema.js'), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + subDetail: { + type: new GraphQLList(require('./claimitemdetailsubdetail.schema.js')), + description: 'Third tier of goods and services.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimitemdetailsubdetail.schema.js b/src/resources/1_0_2/schemas/claimitemdetailsubdetail.schema.js index 19e5390d..e0649f21 100644 --- a/src/resources/1_0_2/schemas/claimitemdetailsubdetail.schema.js +++ b/src/resources/1_0_2/schemas/claimitemdetailsubdetail.schema.js @@ -1,73 +1,96 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.item.detail.subDetail Schema + * @summary ClaimitemdetailsubDetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimItemDetailSubDetail', - description: 'Third tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The type of product or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The fee for an additional service or product or charge.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./quantity.schema'), - description: 'The fee for an additional service or product or charge.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.schema'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.schema'), - description: - 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/udi - udi: { - type: require('./coding.schema'), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - }), + name: 'ClaimitemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The type of product or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The fee for an additional service or product or charge.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./quantity.schema.js'), + description: 'The fee for an additional service or product or charge.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.schema.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/udi + udi: { + type: require('./coding.schema.js'), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimitemprosthesis.schema.js b/src/resources/1_0_2/schemas/claimitemprosthesis.schema.js index 218038a6..2d13354d 100644 --- a/src/resources/1_0_2/schemas/claimitemprosthesis.schema.js +++ b/src/resources/1_0_2/schemas/claimitemprosthesis.schema.js @@ -1,40 +1,58 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLBoolean, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.item.prosthesis Schema + * @summary Claimitemprosthesis Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimItemProsthesis', - description: 'The materials and placement date of prior fixed prosthesis.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - initial: { - type: GraphQLBoolean, - description: - 'Indicates whether this is the initial placement of a fixed prosthesis.', - }, - _initial: { - type: require('./element.schema'), - description: - 'Indicates whether this is the initial placement of a fixed prosthesis.', - }, - priorDate: { - type: DateScalar, - description: 'Date of the initial placement.', - }, - _priorDate: { - type: require('./element.schema'), - description: 'Date of the initial placement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/oral-prosthodontic-material - priorMaterial: { - type: require('./coding.schema'), - description: - 'Material of the prior denture or bridge prosthesis. (Oral).', - }, - }), + name: 'Claimitemprosthesis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _initial: { + type: require('./element.schema.js'), + description: + 'Indicates whether this is the initial placement of a fixed prosthesis.', + }, + initial: { + type: GraphQLBoolean, + description: + 'Indicates whether this is the initial placement of a fixed prosthesis.', + }, + _priorDate: { + type: require('./element.schema.js'), + description: 'Date of the initial placement.', + }, + priorDate: { + type: DateScalar, + description: 'Date of the initial placement.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/oral-prosthodontic-material + priorMaterial: { + type: require('./coding.schema.js'), + description: + 'Material of the prior denture or bridge prosthesis. (Oral).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimmissingteeth.schema.js b/src/resources/1_0_2/schemas/claimmissingteeth.schema.js index b637044f..29f558ee 100644 --- a/src/resources/1_0_2/schemas/claimmissingteeth.schema.js +++ b/src/resources/1_0_2/schemas/claimmissingteeth.schema.js @@ -1,37 +1,54 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.missingTeeth Schema + * @summary ClaimmissingTeeth Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimMissingTeeth', - description: - 'A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/teeth - tooth: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The code identifying which tooth is missing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason - reason: { - type: require('./coding.schema'), - description: 'Missing reason may be: E-extraction, O-other.', - }, - extractionDate: { - type: DateScalar, - description: - 'The date of the extraction either known from records or patient reported estimate.', - }, - _extractionDate: { - type: require('./element.schema'), - description: - 'The date of the extraction either known from records or patient reported estimate.', - }, - }), + name: 'ClaimmissingTeeth', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/teeth + tooth: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The code identifying which tooth is missing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason + reason: { + type: require('./coding.schema.js'), + description: 'Missing reason may be: E-extraction, O-other.', + }, + _extractionDate: { + type: require('./element.schema.js'), + description: + 'The date of the extraction either known from records or patient reported estimate.', + }, + extractionDate: { + type: DateScalar, + description: + 'The date of the extraction either known from records or patient reported estimate.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimpayee.schema.js b/src/resources/1_0_2/schemas/claimpayee.schema.js index d5a8e609..5a64ba62 100644 --- a/src/resources/1_0_2/schemas/claimpayee.schema.js +++ b/src/resources/1_0_2/schemas/claimpayee.schema.js @@ -1,35 +1,83 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Claim.payee Schema + * @summary Claimpayee Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimPayee', - description: 'The party to be reimbursed for the services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - type: { - type: require('./coding.schema'), - description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - provider: { - type: require('./reference.schema'), + name: 'Claimpayee', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + type: { + type: require('./coding.schema.js'), + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'Claimpayeeprovider_provider_Union', description: 'The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).', + }, + organization: { + type: new GraphQLUnionType({ + name: 'Claimpayeeorganization_organization_Union', description: 'The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).', - }, - person: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).', + }, + person: { + type: new GraphQLUnionType({ + name: 'Claimpayeeperson_person_Union', description: 'The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).', - }, - }), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponse.schema.js b/src/resources/1_0_2/schemas/claimresponse.schema.js index 3a1ecae8..8c971b23 100644 --- a/src/resources/1_0_2/schemas/claimresponse.schema.js +++ b/src/resources/1_0_2/schemas/claimresponse.schema.js @@ -1,22 +1,16 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ClaimResponseResourceType = new GraphQLEnumType({ - name: 'ClaimResponseResourceType', - values: { - ClaimResponse: { value: 'ClaimResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,152 +18,247 @@ let ClaimResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ClaimResponse', - description: 'Base StructureDefinition for ClaimResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ClaimResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ClaimResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClaimResponse_Enum_schema', + values: { ClaimResponse: { value: 'ClaimResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + request: { + type: new GraphQLUnionType({ + name: 'ClaimResponserequest_request_Union', description: 'Original request resource referrence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: 'Original request resource referrence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'ClaimResponseorganization_organization_Union', description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'ClaimResponserequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: 'ClaimResponserequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.schema'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - payeeType: { - type: require('./coding.schema'), - description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - item: { - type: new GraphQLList(require('./claimresponseitem.schema')), - description: - 'The first tier service adjudications for submitted services.', - }, - addItem: { - type: new GraphQLList(require('./claimresponseadditem.schema')), - description: - 'The first tier service adjudications for payor added services.', - }, - error: { - type: new GraphQLList(require('./claimresponseerror.schema')), - description: 'Mutually exclusive with Services Provided (Item).', - }, - totalCost: { - type: require('./quantity.schema'), - description: 'The total cost of the services reported.', - }, - unallocDeductable: { - type: require('./quantity.schema'), - description: - 'The amount of deductible applied which was not allocated to any particular service line.', - }, - totalBenefit: { - type: require('./quantity.schema'), - description: - 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).', - }, - paymentAdjustment: { - type: require('./quantity.schema'), - description: - 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjustment-reason - paymentAdjustmentReason: { - type: require('./coding.schema'), - description: 'Reason for the payment adjustment.', - }, - paymentDate: { - type: DateScalar, - description: 'Estimated payment data.', - }, - _paymentDate: { - type: require('./element.schema'), - description: 'Estimated payment data.', - }, - paymentAmount: { - type: require('./quantity.schema'), - description: 'Payable less any payment adjustment.', - }, - paymentRef: { - type: require('./identifier.schema'), - description: 'Payment identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve - reserved: { - type: require('./coding.schema'), - description: - 'Status of funds reservation (For provider, for Patient, None).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./coding.schema'), - description: 'The form to be used for printing the content.', - }, - note: { - type: new GraphQLList(require('./claimresponsenote.schema')), - description: 'Note text.', - }, - coverage: { - type: new GraphQLList(require('./claimresponsecoverage.schema')), - description: - 'Financial instrument by which payment information for health care.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + payeeType: { + type: require('./coding.schema.js'), + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + item: { + type: new GraphQLList(require('./claimresponseitem.schema.js')), + description: + 'The first tier service adjudications for submitted services.', + }, + addItem: { + type: new GraphQLList(require('./claimresponseadditem.schema.js')), + description: + 'The first tier service adjudications for payor added services.', + }, + error: { + type: new GraphQLList(require('./claimresponseerror.schema.js')), + description: 'Mutually exclusive with Services Provided (Item).', + }, + totalCost: { + type: require('./quantity.schema.js'), + description: 'The total cost of the services reported.', + }, + unallocDeductable: { + type: require('./quantity.schema.js'), + description: + 'The amount of deductible applied which was not allocated to any particular service line.', + }, + totalBenefit: { + type: require('./quantity.schema.js'), + description: + 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).', + }, + paymentAdjustment: { + type: require('./quantity.schema.js'), + description: + 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjustment-reason + paymentAdjustmentReason: { + type: require('./coding.schema.js'), + description: 'Reason for the payment adjustment.', + }, + _paymentDate: { + type: require('./element.schema.js'), + description: 'Estimated payment data.', + }, + paymentDate: { + type: DateScalar, + description: 'Estimated payment data.', + }, + paymentAmount: { + type: require('./quantity.schema.js'), + description: 'Payable less any payment adjustment.', + }, + paymentRef: { + type: require('./identifier.schema.js'), + description: 'Payment identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve + reserved: { + type: require('./coding.schema.js'), + description: + 'Status of funds reservation (For provider, for Patient, None).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./coding.schema.js'), + description: 'The form to be used for printing the content.', + }, + note: { + type: new GraphQLList(require('./claimresponsenote.schema.js')), + description: 'Note text.', + }, + coverage: { + type: new GraphQLList(require('./claimresponsecoverage.schema.js')), + description: + 'Financial instrument by which payment information for health care.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseadditem.schema.js b/src/resources/1_0_2/schemas/claimresponseadditem.schema.js index f943e273..5270f461 100644 --- a/src/resources/1_0_2/schemas/claimresponseadditem.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseadditem.schema.js @@ -1,56 +1,73 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem Schema + * @summary ClaimResponseaddItem Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseAddItem', - description: 'The first tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'List of input service items which this service line is intended to replace.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: - 'List of input service items which this service line is intended to replace.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'A code to indicate the Professional Service or Product supplied.', - }, - fee: { - type: require('./quantity.schema'), - description: - 'The fee charged for the professional service or product..', - }, - noteNumberLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumberLinkId: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseadditemadjudication.schema'), - ), - description: 'The adjudications results.', - }, - detail: { - type: new GraphQLList(require('./claimresponseadditemdetail.schema')), - description: - 'The second tier service adjudications for payor added services.', - }, - }), + name: 'ClaimResponseaddItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: + 'List of input service items which this service line is intended to replace.', + }, + sequenceLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'List of input service items which this service line is intended to replace.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A code to indicate the Professional Service or Product supplied.', + }, + fee: { + type: require('./quantity.schema.js'), + description: 'The fee charged for the professional service or product..', + }, + _noteNumberLinkId: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumberLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseadditemadjudication.schema.js'), + ), + description: 'The adjudications results.', + }, + detail: { + type: new GraphQLList(require('./claimresponseadditemdetail.schema.js')), + description: + 'The second tier service adjudications for payor added services.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseadditemadjudication.schema.js b/src/resources/1_0_2/schemas/claimresponseadditemadjudication.schema.js index dcadd7a6..93ba841c 100644 --- a/src/resources/1_0_2/schemas/claimresponseadditemadjudication.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseadditemadjudication.schema.js @@ -1,35 +1,58 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem.adjudication Schema + * @summary ClaimResponseaddItemadjudication Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseAddItemAdjudication', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.schema'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.schema'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseaddItemadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseadditemdetail.schema.js b/src/resources/1_0_2/schemas/claimresponseadditemdetail.schema.js index 08a4a079..40cb2f25 100644 --- a/src/resources/1_0_2/schemas/claimresponseadditemdetail.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseadditemdetail.schema.js @@ -1,33 +1,49 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem.detail Schema + * @summary ClaimResponseaddItemdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseAddItemDetail', - description: - 'The second tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'A code to indicate the Professional Service or Product supplied.', - }, - fee: { - type: require('./quantity.schema'), - description: - 'The fee charged for the professional service or product..', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseadditemdetailadjudication.schema'), - ), - description: 'The adjudications results.', - }, - }), + name: 'ClaimResponseaddItemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A code to indicate the Professional Service or Product supplied.', + }, + fee: { + type: require('./quantity.schema.js'), + description: 'The fee charged for the professional service or product..', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseadditemdetailadjudication.schema.js'), + ), + description: 'The adjudications results.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseadditemdetailadjudication.schema.js b/src/resources/1_0_2/schemas/claimresponseadditemdetailadjudication.schema.js index cb96fe06..1ef68793 100644 --- a/src/resources/1_0_2/schemas/claimresponseadditemdetailadjudication.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseadditemdetailadjudication.schema.js @@ -1,35 +1,58 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem.detail.adjudication Schema + * @summary ClaimResponseaddItemdetailadjudication Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseAddItemDetailAdjudication', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.schema'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.schema'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseaddItemdetailadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponsecoverage.schema.js b/src/resources/1_0_2/schemas/claimresponsecoverage.schema.js index 9a5046c5..ec401158 100644 --- a/src/resources/1_0_2/schemas/claimresponsecoverage.schema.js +++ b/src/resources/1_0_2/schemas/claimresponsecoverage.schema.js @@ -1,81 +1,120 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLUnionType, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.coverage Schema + * @summary ClaimResponsecoverage Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseCoverage', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line item.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line item.', - }, - focal: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - _focal: { - type: require('./element.schema'), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.schema'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relationship - relationship: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The relationship of the patient to the subscriber.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.schema'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - claimResponse: { - type: require('./reference.schema'), + name: 'ClaimResponsecoverage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line item.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line item.', + }, + _focal: { + type: require('./element.schema.js'), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimResponsecoveragecoverage_coverage_Union', + description: + 'Reference to the program or plan identification, underwriter or payor.', + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _businessArrangement: { + type: require('./element.schema.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relationship + relationship: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The relationship of the patient to the subscriber.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + claimResponse: { + type: new GraphQLUnionType({ + name: 'ClaimResponsecoverageclaimResponse_claimResponse_Union', description: 'The Coverages adjudication details.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - }), + types: () => [require('./claimresponse.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + description: 'The Coverages adjudication details.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseerror.schema.js b/src/resources/1_0_2/schemas/claimresponseerror.schema.js index 06814e9a..19816d58 100644 --- a/src/resources/1_0_2/schemas/claimresponseerror.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseerror.schema.js @@ -1,52 +1,70 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.error Schema + * @summary ClaimResponseerror Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseError', - description: 'Mutually exclusive with Services Provided (Item).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: - 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', - }, - detailSequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - _detailSequenceLinkId: { - type: require('./element.schema'), - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - subdetailSequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - _subdetailSequenceLinkId: { - type: require('./element.schema'), - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'An error code,froma specified code system, which details why the claim could not be adjudicated.', - }, - }), + name: 'ClaimResponseerror', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', + }, + sequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', + }, + _detailSequenceLinkId: { + type: require('./element.schema.js'), + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + detailSequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + _subdetailSequenceLinkId: { + type: require('./element.schema.js'), + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + subdetailSequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'An error code,froma specified code system, which details why the claim could not be adjudicated.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseitem.schema.js b/src/resources/1_0_2/schemas/claimresponseitem.schema.js index 1760b8b1..6ec17dc8 100644 --- a/src/resources/1_0_2/schemas/claimresponseitem.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseitem.schema.js @@ -1,43 +1,61 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item Schema + * @summary ClaimResponseitem Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItem', - description: 'The first tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: 'A service line number.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseitemadjudication.schema'), - ), - description: 'The adjudications results.', - }, - detail: { - type: new GraphQLList(require('./claimresponseitemdetail.schema')), - description: - 'The second tier service adjudications for submitted services.', - }, - }), + name: 'ClaimResponseitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseitemadjudication.schema.js'), + ), + description: 'The adjudications results.', + }, + detail: { + type: new GraphQLList(require('./claimresponseitemdetail.schema.js')), + description: + 'The second tier service adjudications for submitted services.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseitemadjudication.schema.js b/src/resources/1_0_2/schemas/claimresponseitemadjudication.schema.js index 22ac996d..13902b2b 100644 --- a/src/resources/1_0_2/schemas/claimresponseitemadjudication.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseitemadjudication.schema.js @@ -1,35 +1,58 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.adjudication Schema + * @summary ClaimResponseitemadjudication Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItemAdjudication', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.schema'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.schema'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseitemadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseitemdetail.schema.js b/src/resources/1_0_2/schemas/claimresponseitemdetail.schema.js index 2cf94271..4bbf98d0 100644 --- a/src/resources/1_0_2/schemas/claimresponseitemdetail.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseitemdetail.schema.js @@ -1,37 +1,55 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail Schema + * @summary ClaimResponseitemdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItemDetail', - description: 'The second tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: 'A service line number.', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseitemdetailadjudication.schema'), - ), - description: 'The adjudications results.', - }, - subDetail: { - type: new GraphQLList( - require('./claimresponseitemdetailsubdetail.schema'), - ), - description: - 'The third tier service adjudications for submitted services.', - }, - }), + name: 'ClaimResponseitemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseitemdetailadjudication.schema.js'), + ), + description: 'The adjudications results.', + }, + subDetail: { + type: new GraphQLList( + require('./claimresponseitemdetailsubdetail.schema.js'), + ), + description: + 'The third tier service adjudications for submitted services.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseitemdetailadjudication.schema.js b/src/resources/1_0_2/schemas/claimresponseitemdetailadjudication.schema.js index 2ecc230d..882ec0be 100644 --- a/src/resources/1_0_2/schemas/claimresponseitemdetailadjudication.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseitemdetailadjudication.schema.js @@ -1,35 +1,58 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail.adjudication Schema + * @summary ClaimResponseitemdetailadjudication Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItemDetailAdjudication', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.schema'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.schema'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseitemdetailadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseitemdetailsubdetail.schema.js b/src/resources/1_0_2/schemas/claimresponseitemdetailsubdetail.schema.js index 10b0fdfd..3da18b0d 100644 --- a/src/resources/1_0_2/schemas/claimresponseitemdetailsubdetail.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseitemdetailsubdetail.schema.js @@ -1,30 +1,48 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail.subDetail Schema + * @summary ClaimResponseitemdetailsubDetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItemDetailSubDetail', - description: 'The third tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: 'A service line number.', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseitemdetailsubdetailadjudication.schema'), - ), - description: 'The adjudications results.', - }, - }), + name: 'ClaimResponseitemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseitemdetailsubdetailadjudication.schema.js'), + ), + description: 'The adjudications results.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponseitemdetailsubdetailadjudication.schema.js b/src/resources/1_0_2/schemas/claimresponseitemdetailsubdetailadjudication.schema.js index 051bcf0a..20fb390c 100644 --- a/src/resources/1_0_2/schemas/claimresponseitemdetailsubdetailadjudication.schema.js +++ b/src/resources/1_0_2/schemas/claimresponseitemdetailsubdetailadjudication.schema.js @@ -1,35 +1,58 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail.subDetail.adjudication Schema + * @summary ClaimResponseitemdetailsubDetailadjudication Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItemDetailSubDetailAdjudication', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - amount: { - type: require('./quantity.schema'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.schema'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseitemdetailsubDetailadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/claimresponsenote.schema.js b/src/resources/1_0_2/schemas/claimresponsenote.schema.js index 4fe24e76..791dde36 100644 --- a/src/resources/1_0_2/schemas/claimresponsenote.schema.js +++ b/src/resources/1_0_2/schemas/claimresponsenote.schema.js @@ -1,39 +1,57 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.note Schema + * @summary ClaimResponsenote Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseNote', - description: 'Note text.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - number: { - type: PositiveIntScalar, - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - _number: { - type: require('./element.schema'), - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./coding.schema'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.schema'), - description: 'The note text.', - }, - }), + name: 'ClaimResponsenote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _number: { + type: require('./element.schema.js'), + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + number: { + type: PositiveIntScalar, + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./coding.schema.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/clinicalimpression.schema.js b/src/resources/1_0_2/schemas/clinicalimpression.schema.js index f247aa58..e2153d27 100644 --- a/src/resources/1_0_2/schemas/clinicalimpression.schema.js +++ b/src/resources/1_0_2/schemas/clinicalimpression.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ClinicalImpressionResourceType = new GraphQLEnumType({ - name: 'ClinicalImpressionResourceType', - values: { - ClinicalImpression: { value: 'ClinicalImpression' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,126 +17,343 @@ let ClinicalImpressionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ClinicalImpression', - description: 'Base StructureDefinition for ClinicalImpression Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ClinicalImpressionResourceType), - description: 'Type of this resource.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient being assessed.', - }, - assessor: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ClinicalImpression Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClinicalImpression_Enum_schema', + values: { ClinicalImpression: { value: 'ClinicalImpression' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClinicalImpressionpatient_patient_Union', + description: 'The patient being assessed.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient being assessed.', + }, + assessor: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressionassessor_assessor_Union', description: 'The clinician performing the assessment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-impression-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Identifies the workflow status of the assessment.', - }, - _status: { - type: require('./element.schema'), - description: 'Identifies the workflow status of the assessment.', - }, - date: { - type: DateTimeScalar, - description: - 'The point in time at which the assessment was concluded (not when it was recorded).', - }, - _date: { - type: require('./element.schema'), - description: - 'The point in time at which the assessment was concluded (not when it was recorded).', - }, - description: { - type: GraphQLString, - description: - 'A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.', - }, - _description: { - type: require('./element.schema'), - description: - 'A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.', - }, - previous: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The clinician performing the assessment.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Identifies the workflow status of the assessment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-impression-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the workflow status of the assessment.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The point in time at which the assessment was concluded (not when it was recorded).', + }, + date: { + type: DateTimeScalar, + description: + 'The point in time at which the assessment was concluded (not when it was recorded).', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.', + }, + description: { + type: GraphQLString, + description: + 'A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.', + }, + previous: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressionprevious_previous_Union', description: "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", - }, - problem: { - type: new GraphQLList(require('./reference.schema')), - description: - 'This a list of the general problems/conditions for a patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - triggerCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - triggerReference: { - type: require('./reference.schema'), + types: () => [require('./clinicalimpression.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); + } + }, + }), + description: + "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", + }, + problem: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionproblem_problem_Union', + description: + 'This a list of the general problems/conditions for a patient.', + types: () => [ + require('./condition.schema.js'), + require('./allergyintolerance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + }, + }), + ), + description: + 'This a list of the general problems/conditions for a patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + triggerCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + triggerReference: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressiontriggerReference_triggerReference_Union', description: 'The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.', - }, - investigations: { - type: new GraphQLList( - require('./clinicalimpressioninvestigations.schema'), - ), - description: - 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', - }, - protocol: { - type: UriScalar, - description: - 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', - }, - _protocol: { - type: require('./element.schema'), - description: - 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', - }, - summary: { - type: GraphQLString, - description: 'A text summary of the investigations and the diagnosis.', - }, - _summary: { - type: require('./element.schema'), - description: 'A text summary of the investigations and the diagnosis.', - }, - finding: { - type: new GraphQLList(require('./clinicalimpressionfinding.schema')), - description: - 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - resolved: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Diagnoses/conditions resolved since the last assessment.', - }, - ruledOut: { - type: new GraphQLList(require('./clinicalimpressionruledout.schema')), - description: 'Diagnosis considered not possible.', - }, - prognosis: { - type: GraphQLString, - description: 'Estimate of likely outcome.', - }, - _prognosis: { - type: require('./element.schema'), - description: 'Estimate of likely outcome.', - }, - plan: { - type: new GraphQLList(require('./reference.schema')), - description: 'Plan of action after assessment.', - }, - action: { - type: new GraphQLList(require('./reference.schema')), - description: 'Actions taken during assessment.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The request or event that necessitated this assessment. This may be a diagnosis, a Care Plan, a Request Referral, or some other resource.', + }, + investigations: { + type: new GraphQLList( + require('./clinicalimpressioninvestigations.schema.js'), + ), + description: + 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', + }, + _protocol: { + type: require('./element.schema.js'), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + protocol: { + type: UriScalar, + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + _summary: { + type: require('./element.schema.js'), + description: 'A text summary of the investigations and the diagnosis.', + }, + summary: { + type: GraphQLString, + description: 'A text summary of the investigations and the diagnosis.', + }, + finding: { + type: new GraphQLList(require('./clinicalimpressionfinding.schema.js')), + description: + 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + resolved: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Diagnoses/conditions resolved since the last assessment.', + }, + ruledOut: { + type: new GraphQLList(require('./clinicalimpressionruledout.schema.js')), + description: 'Diagnosis considered not possible.', + }, + _prognosis: { + type: require('./element.schema.js'), + description: 'Estimate of likely outcome.', + }, + prognosis: { + type: GraphQLString, + description: 'Estimate of likely outcome.', + }, + plan: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionplan_plan_Union', + description: 'Plan of action after assessment.', + types: () => [ + require('./careplan.schema.js'), + require('./appointment.schema.js'), + require('./communicationrequest.schema.js'), + require('./deviceuserequest.schema.js'), + require('./diagnosticorder.schema.js'), + require('./medicationorder.schema.js'), + require('./nutritionorder.schema.js'), + require('./order.schema.js'), + require('./procedurerequest.schema.js'), + require('./processrequest.schema.js'), + require('./referralrequest.schema.js'), + require('./supplyrequest.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + if (data && data.resourceType === 'DeviceUseRequest') { + return require('./deviceuserequest.schema.js'); + } + if (data && data.resourceType === 'DiagnosticOrder') { + return require('./diagnosticorder.schema.js'); + } + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'Order') { + return require('./order.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ProcessRequest') { + return require('./processrequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + if (data && data.resourceType === 'SupplyRequest') { + return require('./supplyrequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, + }), + ), + description: 'Plan of action after assessment.', + }, + action: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionaction_action_Union', + description: 'Actions taken during assessment.', + types: () => [ + require('./referralrequest.schema.js'), + require('./procedurerequest.schema.js'), + require('./procedure.schema.js'), + require('./medicationorder.schema.js'), + require('./diagnosticorder.schema.js'), + require('./nutritionorder.schema.js'), + require('./supplyrequest.schema.js'), + require('./appointment.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); + } + if (data && data.resourceType === 'DiagnosticOrder') { + return require('./diagnosticorder.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'SupplyRequest') { + return require('./supplyrequest.schema.js'); + } + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + }, + }), + ), + description: 'Actions taken during assessment.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/clinicalimpressionfinding.schema.js b/src/resources/1_0_2/schemas/clinicalimpressionfinding.schema.js index ad4598f8..1325cec7 100644 --- a/src/resources/1_0_2/schemas/clinicalimpressionfinding.schema.js +++ b/src/resources/1_0_2/schemas/clinicalimpressionfinding.schema.js @@ -1,29 +1,51 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClinicalImpression.finding Schema + * @summary ClinicalImpressionfinding Schema */ module.exports = new GraphQLObjectType({ - name: 'ClinicalImpressionFinding', - description: - 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - item: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Specific text of code for finding or diagnosis.', - }, - cause: { - type: GraphQLString, - description: 'Which investigations support finding or diagnosis.', - }, - _cause: { - type: require('./element.schema'), - description: 'Which investigations support finding or diagnosis.', - }, - }), + name: 'ClinicalImpressionfinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + item: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Specific text of code for finding or diagnosis.', + }, + _cause: { + type: require('./element.schema.js'), + description: 'Which investigations support finding or diagnosis.', + }, + cause: { + type: GraphQLString, + description: 'Which investigations support finding or diagnosis.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/clinicalimpressioninvestigations.schema.js b/src/resources/1_0_2/schemas/clinicalimpressioninvestigations.schema.js index 00a93a5c..e8344cfd 100644 --- a/src/resources/1_0_2/schemas/clinicalimpressioninvestigations.schema.js +++ b/src/resources/1_0_2/schemas/clinicalimpressioninvestigations.schema.js @@ -1,27 +1,74 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClinicalImpression.investigations Schema + * @summary ClinicalImpressioninvestigations Schema */ module.exports = new GraphQLObjectType({ - name: 'ClinicalImpressionInvestigations', - description: - 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/investigation-sets - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", - }, - item: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A record of a specific investigation that was undertaken.', - }, - }), + name: 'ClinicalImpressioninvestigations', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/investigation-sets + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", + }, + item: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressioninvestigationsitem_item_Union', + description: + 'A record of a specific investigation that was undertaken.', + types: () => [ + require('./observation.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./familymemberhistory.schema.js'), + require('./diagnosticreport.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'FamilyMemberHistory') { + return require('./familymemberhistory.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + }, + }), + ), + description: 'A record of a specific investigation that was undertaken.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/clinicalimpressionruledout.schema.js b/src/resources/1_0_2/schemas/clinicalimpressionruledout.schema.js index 2ec2a064..16aa2d19 100644 --- a/src/resources/1_0_2/schemas/clinicalimpressionruledout.schema.js +++ b/src/resources/1_0_2/schemas/clinicalimpressionruledout.schema.js @@ -1,28 +1,51 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ClinicalImpression.ruledOut Schema + * @summary ClinicalImpressionruledOut Schema */ module.exports = new GraphQLObjectType({ - name: 'ClinicalImpressionRuledOut', - description: 'Diagnosis considered not possible.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - item: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Specific text of code for diagnosis.', - }, - reason: { - type: GraphQLString, - description: 'Grounds for elimination.', - }, - _reason: { - type: require('./element.schema'), - description: 'Grounds for elimination.', - }, - }), + name: 'ClinicalImpressionruledOut', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + item: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Specific text of code for diagnosis.', + }, + _reason: { + type: require('./element.schema.js'), + description: 'Grounds for elimination.', + }, + reason: { + type: GraphQLString, + description: 'Grounds for elimination.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/codeableconcept.schema.js b/src/resources/1_0_2/schemas/codeableconcept.schema.js index d1364f67..e2191b82 100644 --- a/src/resources/1_0_2/schemas/codeableconcept.schema.js +++ b/src/resources/1_0_2/schemas/codeableconcept.schema.js @@ -1,6 +1,5 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -8,22 +7,36 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'CodeableConcept', - description: 'Base StructureDefinition for CodeableConcept Type.', - fields: () => - extendSchema(require('./element.schema'), { - coding: { - type: new GraphQLList(require('./coding.schema')), - description: 'A reference to a code defined by a terminology system.', - }, - text: { - type: GraphQLString, - description: - 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', - }, - _text: { - type: require('./element.schema'), - description: - 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', - }, - }), + description: 'Base StructureDefinition for CodeableConcept Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + coding: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'A reference to a code defined by a terminology system.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + text: { + type: GraphQLString, + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/coding.schema.js b/src/resources/1_0_2/schemas/coding.schema.js index b0f9709d..fe873dc0 100644 --- a/src/resources/1_0_2/schemas/coding.schema.js +++ b/src/resources/1_0_2/schemas/coding.schema.js @@ -1,8 +1,12 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -10,58 +14,72 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Coding', - description: 'Base StructureDefinition for Coding Type.', - fields: () => - extendSchema(require('./element.schema'), { - system: { - type: UriScalar, - description: - 'The identification of the code system that defines the meaning of the symbol in the code.', - }, - _system: { - type: require('./element.schema'), - description: - 'The identification of the code system that defines the meaning of the symbol in the code.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', - }, - code: { - type: CodeScalar, - description: - 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', - }, - _code: { - type: require('./element.schema'), - description: - 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', - }, - display: { - type: GraphQLString, - description: - 'A representation of the meaning of the code in the system, following the rules of the system.', - }, - _display: { - type: require('./element.schema'), - description: - 'A representation of the meaning of the code in the system, following the rules of the system.', - }, - userSelected: { - type: GraphQLBoolean, - description: - 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', - }, - _userSelected: { - type: require('./element.schema'), - description: - 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', - }, - }), + description: 'Base StructureDefinition for Coding Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + system: { + type: UriScalar, + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + code: { + type: CodeScalar, + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + _display: { + type: require('./element.schema.js'), + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + display: { + type: GraphQLString, + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + _userSelected: { + type: require('./element.schema.js'), + description: + 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', + }, + userSelected: { + type: GraphQLBoolean, + description: + 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/communication.schema.js b/src/resources/1_0_2/schemas/communication.schema.js index efa6900a..eee8241e 100644 --- a/src/resources/1_0_2/schemas/communication.schema.js +++ b/src/resources/1_0_2/schemas/communication.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CommunicationResourceType = new GraphQLEnumType({ - name: 'CommunicationResourceType', - values: { - Communication: { value: 'Communication' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,87 +16,234 @@ let CommunicationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Communication', - description: 'Base StructureDefinition for Communication Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CommunicationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - category: { - type: require('./codeableconcept.schema'), - description: - 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', - }, - sender: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Communication Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Communication_Enum_schema', + values: { Communication: { value: 'Communication' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', + }, + sender: { + type: new GraphQLUnionType({ + name: 'Communicationsender_sender_Union', description: 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', - }, - payload: { - type: new GraphQLList(require('./communicationpayload.schema')), - description: - 'Text, attachment(s), or resource(s) that was communicated to the recipient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode - medium: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A channel that was used for this communication (e.g. email, fax).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-status - status: { - type: CodeScalar, - description: 'The status of the transmission.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the transmission.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Communicationrecipient_recipient_Union', + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', + }, + payload: { + type: new GraphQLList(require('./communicationpayload.schema.js')), + description: + 'Text, attachment(s), or resource(s) that was communicated to the recipient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode + medium: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the transmission.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-status + status: { + type: CodeScalar, + description: 'The status of the transmission.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Communicationencounter_encounter_Union', description: 'The encounter within which the communication was sent.', - }, - sent: { - type: DateTimeScalar, - description: 'The time when this communication was sent.', - }, - _sent: { - type: require('./element.schema'), - description: 'The time when this communication was sent.', - }, - received: { - type: DateTimeScalar, - description: - 'The time when this communication arrived at the destination.', - }, - _received: { - type: require('./element.schema'), - description: - 'The time when this communication arrived at the destination.', - }, - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'The reason or justification for the communication.', - }, - subject: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'The encounter within which the communication was sent.', + }, + _sent: { + type: require('./element.schema.js'), + description: 'The time when this communication was sent.', + }, + sent: { + type: DateTimeScalar, + description: 'The time when this communication was sent.', + }, + _received: { + type: require('./element.schema.js'), + description: + 'The time when this communication arrived at the destination.', + }, + received: { + type: DateTimeScalar, + description: + 'The time when this communication arrived at the destination.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason or justification for the communication.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Communicationsubject_subject_Union', description: 'The patient who was the focus of this communication.', - }, - requestDetail: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'The patient who was the focus of this communication.', + }, + requestDetail: { + type: new GraphQLUnionType({ + name: 'CommunicationrequestDetail_requestDetail_Union', description: 'The communication request that was responsible for producing this communication.', - }, - }), + types: () => [require('./communicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + }, + }), + description: + 'The communication request that was responsible for producing this communication.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/communicationpayload.schema.js b/src/resources/1_0_2/schemas/communicationpayload.schema.js index 1df61402..aeb22aef 100644 --- a/src/resources/1_0_2/schemas/communicationpayload.schema.js +++ b/src/resources/1_0_2/schemas/communicationpayload.schema.js @@ -1,36 +1,71 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Communication.payload Schema + * @summary Communicationpayload Schema */ module.exports = new GraphQLObjectType({ - name: 'CommunicationPayload', - description: - 'Text, attachment(s), or resource(s) that was communicated to the recipient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - _contentString: { - type: require('./element.schema'), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - }), + name: 'Communicationpayload', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _contentString: { + type: require('./element.schema.js'), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CommunicationpayloadcontentReference_contentReference_Union', + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/communicationrequest.schema.js b/src/resources/1_0_2/schemas/communicationrequest.schema.js index 141f82ab..fbfa61ce 100644 --- a/src/resources/1_0_2/schemas/communicationrequest.schema.js +++ b/src/resources/1_0_2/schemas/communicationrequest.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CommunicationRequestResourceType = new GraphQLEnumType({ - name: 'CommunicationRequestResourceType', - values: { - CommunicationRequest: { value: 'CommunicationRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,98 +16,252 @@ let CommunicationRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'CommunicationRequest', - description: 'Base StructureDefinition for CommunicationRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CommunicationRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.', - }, - category: { - type: require('./codeableconcept.schema'), - description: - 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', - }, - sender: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for CommunicationRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CommunicationRequest_Enum_schema', + values: { CommunicationRequest: { value: 'CommunicationRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', + }, + sender: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestsender_sender_Union', description: 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.', - }, - payload: { - type: new GraphQLList(require('./communicationrequestpayload.schema')), - description: - 'Text, attachment(s), or resource(s) to be communicated to the recipient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode - medium: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A channel that was used for this communication (e.g. email, fax).', - }, - requester: { - type: require('./reference.schema'), + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestrecipient_recipient_Union', + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication.', + }, + payload: { + type: new GraphQLList(require('./communicationrequestpayload.schema.js')), + description: + 'Text, attachment(s), or resource(s) to be communicated to the recipient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode + medium: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + requester: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestrequester_requester_Union', description: 'The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-request-status - status: { - type: CodeScalar, - description: 'The status of the proposal or order.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the proposal or order.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the proposal or order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-request-status + status: { + type: CodeScalar, + description: 'The status of the proposal or order.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestencounter_encounter_Union', description: 'The encounter within which the communication request was created.', - }, - scheduledDateTime: { - type: DateTimeScalar, - description: 'The time when this communication is to occur.', - }, - _scheduledDateTime: { - type: require('./element.schema'), - description: 'The time when this communication is to occur.', - }, - scheduledPeriod: { - type: require('./period.schema'), - description: 'The time when this communication is to occur.', - }, - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The reason or justification for the communication request.', - }, - requestedOn: { - type: DateTimeScalar, - description: 'The time when the request was made.', - }, - _requestedOn: { - type: require('./element.schema'), - description: 'The time when the request was made.', - }, - subject: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The encounter within which the communication request was created.', + }, + _scheduledDateTime: { + type: require('./element.schema.js'), + description: 'The time when this communication is to occur.', + }, + scheduledDateTime: { + type: DateTimeScalar, + description: 'The time when this communication is to occur.', + }, + scheduledPeriod: { + type: require('./period.schema.js'), + description: 'The time when this communication is to occur.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason or justification for the communication request.', + }, + _requestedOn: { + type: require('./element.schema.js'), + description: 'The time when the request was made.', + }, + requestedOn: { + type: DateTimeScalar, + description: 'The time when the request was made.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestsubject_subject_Union', description: 'The patient who is the focus of this communication request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority - priority: { - type: require('./codeableconcept.schema'), - description: - 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', - }, - }), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The patient who is the focus of this communication request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/communicationrequestpayload.schema.js b/src/resources/1_0_2/schemas/communicationrequestpayload.schema.js index 88afaea1..17d2203b 100644 --- a/src/resources/1_0_2/schemas/communicationrequestpayload.schema.js +++ b/src/resources/1_0_2/schemas/communicationrequestpayload.schema.js @@ -1,36 +1,72 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary CommunicationRequest.payload Schema + * @summary CommunicationRequestpayload Schema */ module.exports = new GraphQLObjectType({ - name: 'CommunicationRequestPayload', - description: - 'Text, attachment(s), or resource(s) to be communicated to the recipient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - _contentString: { - type: require('./element.schema'), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - }), + name: 'CommunicationRequestpayload', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _contentString: { + type: require('./element.schema.js'), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'CommunicationRequestpayloadcontentReference_contentReference_Union', + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/composition.schema.js b/src/resources/1_0_2/schemas/composition.schema.js index e166c310..3aee5b43 100644 --- a/src/resources/1_0_2/schemas/composition.schema.js +++ b/src/resources/1_0_2/schemas/composition.schema.js @@ -1,21 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CompositionResourceType = new GraphQLEnumType({ - name: 'CompositionResourceType', - values: { - Composition: { value: 'Composition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,105 +17,220 @@ let CompositionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Composition', - description: 'Base StructureDefinition for Composition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CompositionResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The composition editing time, when the composition was last logically changed by the author.', - }, - _date: { - type: require('./element.schema'), - description: - 'The composition editing time, when the composition was last logically changed by the author.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-typecodes - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-classcodes - class: { - type: require('./codeableconcept.schema'), - description: - 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', - }, - title: { - type: new GraphQLNonNull(GraphQLString), - description: 'Official human-readable label for the composition.', - }, - _title: { - type: require('./element.schema'), - description: 'Official human-readable label for the composition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', - }, - _status: { - type: require('./element.schema'), - description: - 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-Confidentiality - confidentiality: { - type: CodeScalar, - description: - 'The code specifying the level of confidentiality of the Composition.', - }, - _confidentiality: { - type: require('./element.schema'), - description: - 'The code specifying the level of confidentiality of the Composition.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', - }, - author: { - type: new GraphQLList( - new GraphQLNonNull(require('./reference.schema')), + description: 'Base StructureDefinition for Composition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Composition_Enum_schema', + values: { Composition: { value: 'Composition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-typecodes + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-classcodes + class: { + type: require('./codeableconcept.schema.js'), + description: + 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', + }, + _title: { + type: require('./element.schema.js'), + description: 'Official human-readable label for the composition.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: 'Official human-readable label for the composition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + _confidentiality: { + type: require('./element.schema.js'), + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-Confidentiality + confidentiality: { + type: CodeScalar, + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Compositionsubject_subject_Union', + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + }, + author: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Compositionauthor_author_Union', + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), ), - description: - 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', - }, - attester: { - type: new GraphQLList(require('./compositionattester.schema')), - description: - 'A participant who has attested to the accuracy of the composition/document.', - }, - custodian: { - type: require('./reference.schema'), + ), + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + }, + attester: { + type: new GraphQLList(require('./compositionattester.schema.js')), + description: + 'A participant who has attested to the accuracy of the composition/document.', + }, + custodian: { + type: new GraphQLUnionType({ + name: 'Compositioncustodian_custodian_Union', description: 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', - }, - event: { - type: new GraphQLList(require('./compositionevent.schema')), - description: - 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', + }, + event: { + type: new GraphQLList(require('./compositionevent.schema.js')), + description: + 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Compositionencounter_encounter_Union', description: 'Describes the clinical encounter or type of care this documentation is associated with.', - }, - section: { - type: new GraphQLList(require('./compositionsection.schema')), - description: 'The root of the sections that make up the composition.', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Describes the clinical encounter or type of care this documentation is associated with.', + }, + section: { + type: new GraphQLList(require('./compositionsection.schema.js')), + description: 'The root of the sections that make up the composition.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/compositionattester.schema.js b/src/resources/1_0_2/schemas/compositionattester.schema.js index 0624d754..477e8ed6 100644 --- a/src/resources/1_0_2/schemas/compositionattester.schema.js +++ b/src/resources/1_0_2/schemas/compositionattester.schema.js @@ -1,39 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Composition.attester Schema + * @summary Compositionattester Schema */ module.exports = new GraphQLObjectType({ - name: 'CompositionAttester', - description: - 'A participant who has attested to the accuracy of the composition/document.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-attestation-mode - mode: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: 'The type of attestation the authenticator offers.', - }, - _mode: { - type: require('./element.schema'), - description: 'The type of attestation the authenticator offers.', - }, - time: { - type: DateTimeScalar, - description: 'When composition was attested by the party.', - }, - _time: { - type: require('./element.schema'), - description: 'When composition was attested by the party.', - }, - party: { - type: require('./reference.schema'), + name: 'Compositionattester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: 'The type of attestation the authenticator offers.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-attestation-mode + mode: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'The type of attestation the authenticator offers.', + }, + _time: { + type: require('./element.schema.js'), + description: 'When composition was attested by the party.', + }, + time: { + type: DateTimeScalar, + description: 'When composition was attested by the party.', + }, + party: { + type: new GraphQLUnionType({ + name: 'Compositionattesterparty_party_Union', description: 'Who attested the composition in the specified way.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Who attested the composition in the specified way.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/compositionevent.schema.js b/src/resources/1_0_2/schemas/compositionevent.schema.js index 395d98df..e46a3e06 100644 --- a/src/resources/1_0_2/schemas/compositionevent.schema.js +++ b/src/resources/1_0_2/schemas/compositionevent.schema.js @@ -1,32 +1,61 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Composition.event Schema + * @summary Compositionevent Schema */ module.exports = new GraphQLObjectType({ - name: 'CompositionEvent', - description: - 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode - code: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", - }, - period: { - type: require('./period.schema'), - description: - 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', - }, - detail: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', - }, - }), + name: 'Compositionevent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', + }, + detail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Compositioneventdetail_detail_Union', + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/compositionsection.schema.js b/src/resources/1_0_2/schemas/compositionsection.schema.js index 50be2467..108b8afe 100644 --- a/src/resources/1_0_2/schemas/compositionsection.schema.js +++ b/src/resources/1_0_2/schemas/compositionsection.schema.js @@ -1,65 +1,100 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Composition.section Schema + * @summary Compositionsection Schema */ module.exports = new GraphQLObjectType({ - name: 'CompositionSection', - description: 'The root of the sections that make up the composition.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - title: { - type: GraphQLString, - description: - 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', - }, - _title: { - type: require('./element.schema'), - description: - 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-section-codes - code: { - type: require('./codeableconcept.schema'), - description: - 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', - }, - text: { - type: require('./narrative.schema'), - description: - "A human-readable narrative that contains the attested content of the section, 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.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-mode - mode: { - type: CodeScalar, - description: - 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - _mode: { - type: require('./element.schema'), - description: - 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-order - orderedBy: { - type: require('./codeableconcept.schema'), - description: - 'Specifies the order applied to the items in the section entries.', - }, - entry: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A reference to the actual resource from which the narrative in the section is derived.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason - emptyReason: { - type: require('./codeableconcept.schema'), - description: - 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', - }, - }), + name: 'Compositionsection', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + title: { + type: GraphQLString, + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-section-codes + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', + }, + text: { + type: require('./narrative.schema.js'), + description: + "A human-readable narrative that contains the attested content of the section, 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.", + }, + _mode: { + type: require('./element.schema.js'), + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-mode + mode: { + type: CodeScalar, + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-order + orderedBy: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies the order applied to the items in the section entries.', + }, + entry: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Compositionsectionentry_entry_Union', + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason + emptyReason: { + type: require('./codeableconcept.schema.js'), + description: + 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conceptmap.schema.js b/src/resources/1_0_2/schemas/conceptmap.schema.js index d974ba9e..bb6ee722 100644 --- a/src/resources/1_0_2/schemas/conceptmap.schema.js +++ b/src/resources/1_0_2/schemas/conceptmap.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConceptMapResourceType = new GraphQLEnumType({ - name: 'ConceptMapResourceType', - values: { - ConceptMap: { value: 'ConceptMap' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,162 +18,255 @@ let ConceptMapResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ConceptMap', - description: 'Base StructureDefinition for ConceptMap Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ConceptMapResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - name: { - type: GraphQLString, - description: - 'A free text natural language name describing the concept map.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name describing the concept map.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the concept map.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the concept map.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the concept map.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the concept map.', - }, - contact: { - type: new GraphQLList(require('./conceptmapcontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.', - }, - _description: { - type: require('./element.schema'), - description: - 'A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.', - }, - requirements: { - type: GraphQLString, - description: - 'Explains why this concept map is needed and why it has been constrained as it has.', - }, - _requirements: { - type: require('./element.schema'), - description: - 'Explains why this concept map is needed and why it has been constrained as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the concept map and/or its contents.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the concept map and/or its contents.', - }, - sourceUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - _sourceUri: { - type: require('./element.schema'), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - sourceReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - targetUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - _targetUri: { - type: require('./element.schema'), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - targetReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - element: { - type: new GraphQLList(require('./conceptmapelement.schema')), - description: - 'Mappings for an individual concept in the source to one or more concepts in the target.', - }, - }), + description: 'Base StructureDefinition for ConceptMap Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ConceptMap_Enum_schema', + values: { ConceptMap: { value: 'ConceptMap' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name describing the concept map.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name describing the concept map.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the concept map.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the concept map.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the concept map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the concept map.', + }, + contact: { + type: new GraphQLList(require('./conceptmapcontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'Explains why this concept map is needed and why it has been constrained as it has.', + }, + requirements: { + type: GraphQLString, + description: + 'Explains why this concept map is needed and why it has been constrained as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the concept map and/or its contents.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the concept map and/or its contents.', + }, + _sourceUri: { + type: require('./element.schema.js'), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + sourceUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + sourceReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ConceptMapsourceReference_sourceReference_Union', + description: + 'The source value set that specifies the concepts that are being mapped.', + types: () => [ + require('./valueset.schema.js'), + require('./structuredefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + _targetUri: { + type: require('./element.schema.js'), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ConceptMaptargetReference_targetReference_Union', + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + types: () => [ + require('./valueset.schema.js'), + require('./structuredefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + element: { + type: new GraphQLList(require('./conceptmapelement.schema.js')), + description: + 'Mappings for an individual concept in the source to one or more concepts in the target.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conceptmapcontact.schema.js b/src/resources/1_0_2/schemas/conceptmapcontact.schema.js index d8eb6809..ec80532d 100644 --- a/src/resources/1_0_2/schemas/conceptmapcontact.schema.js +++ b/src/resources/1_0_2/schemas/conceptmapcontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ConceptMap.contact Schema + * @summary ConceptMapcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the concept map.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the concept map.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'ConceptMapcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the concept map.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the concept map.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conceptmapelement.schema.js b/src/resources/1_0_2/schemas/conceptmapelement.schema.js index 8a56ed37..7ea8128f 100644 --- a/src/resources/1_0_2/schemas/conceptmapelement.schema.js +++ b/src/resources/1_0_2/schemas/conceptmapelement.schema.js @@ -1,43 +1,58 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ConceptMap.element Schema + * @summary ConceptMapelement Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapElement', - description: - 'Mappings for an individual concept in the source to one or more concepts in the target.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - codeSystem: { - type: UriScalar, - description: - 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', - }, - _codeSystem: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', - }, - code: { - type: CodeScalar, - description: - 'Identity (code or path) or the element/item being mapped.', - }, - _code: { - type: require('./element.schema'), - description: - 'Identity (code or path) or the element/item being mapped.', - }, - target: { - type: new GraphQLList(require('./conceptmapelementtarget.schema')), - description: - 'A concept from the target value set that this concept maps to.', - }, - }), + name: 'ConceptMapelement', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _codeSystem: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', + }, + codeSystem: { + type: UriScalar, + description: + 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', + }, + _code: { + type: require('./element.schema.js'), + description: 'Identity (code or path) or the element/item being mapped.', + }, + code: { + type: CodeScalar, + description: 'Identity (code or path) or the element/item being mapped.', + }, + target: { + type: new GraphQLList(require('./conceptmapelementtarget.schema.js')), + description: + 'A concept from the target value set that this concept maps to.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conceptmapelementtarget.schema.js b/src/resources/1_0_2/schemas/conceptmapelementtarget.schema.js index 0b0dd79a..9d3b3f1f 100644 --- a/src/resources/1_0_2/schemas/conceptmapelementtarget.schema.js +++ b/src/resources/1_0_2/schemas/conceptmapelementtarget.schema.js @@ -1,70 +1,88 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ConceptMap.element.target Schema + * @summary ConceptMapelementtarget Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapElementTarget', - description: 'A concept from the target value set that this concept maps to.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - codeSystem: { - type: UriScalar, - description: - 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', - }, - _codeSystem: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', - }, - code: { - type: CodeScalar, - description: - 'Identity (code or path) or the element/item that the map refers to.', - }, - _code: { - type: require('./element.schema'), - description: - 'Identity (code or path) or the element/item that the map refers to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/concept-map-equivalence - equivalence: { - type: new GraphQLNonNull(CodeScalar), - description: - "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", - }, - _equivalence: { - type: require('./element.schema'), - description: - "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", - }, - comments: { - type: GraphQLString, - description: - 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', - }, - _comments: { - type: require('./element.schema'), - description: - 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', - }, - dependsOn: { - type: new GraphQLList( - require('./conceptmapelementtargetdependson.schema'), - ), - description: - 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', - }, - }), + name: 'ConceptMapelementtarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _codeSystem: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', + }, + codeSystem: { + type: UriScalar, + description: + 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + code: { + type: CodeScalar, + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + _equivalence: { + type: require('./element.schema.js'), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/concept-map-equivalence + equivalence: { + type: new GraphQLNonNull(CodeScalar), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + _comments: { + type: require('./element.schema.js'), + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + comments: { + type: GraphQLString, + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + dependsOn: { + type: new GraphQLList( + require('./conceptmapelementtargetdependson.schema.js'), + ), + description: + 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conceptmapelementtargetdependson.schema.js b/src/resources/1_0_2/schemas/conceptmapelementtargetdependson.schema.js index 1d746b71..d8897481 100644 --- a/src/resources/1_0_2/schemas/conceptmapelementtargetdependson.schema.js +++ b/src/resources/1_0_2/schemas/conceptmapelementtargetdependson.schema.js @@ -1,47 +1,69 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ConceptMap.element.target.dependsOn Schema + * @summary ConceptMapelementtargetdependsOn Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapElementTargetDependsOn', - description: - 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - element: { - type: new GraphQLNonNull(UriScalar), - description: - 'A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.', - }, - _element: { - type: require('./element.schema'), - description: - 'A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.', - }, - codeSystem: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', - }, - _codeSystem: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', - }, - code: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', - }, - _code: { - type: require('./element.schema'), - description: - 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', - }, - }), + name: 'ConceptMapelementtargetdependsOn', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _element: { + type: require('./element.schema.js'), + description: + 'A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.', + }, + element: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.', + }, + _codeSystem: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + codeSystem: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', + }, + code: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/condition.schema.js b/src/resources/1_0_2/schemas/condition.schema.js index 429c1bb0..41b428e6 100644 --- a/src/resources/1_0_2/schemas/condition.schema.js +++ b/src/resources/1_0_2/schemas/condition.schema.js @@ -1,23 +1,17 @@ -const DateScalar = require('../scalars/date.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConditionResourceType = new GraphQLEnumType({ - name: 'ConditionResourceType', - values: { - Condition: { value: 'Condition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,180 +19,273 @@ let ConditionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Condition', - description: 'Base StructureDefinition for Condition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ConditionResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Indicates the patient who the condition record is associated with.', - }, - encounter: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Condition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Condition_Enum_schema', + values: { Condition: { value: 'Condition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Conditionpatient_patient_Union', + description: + 'Indicates the patient who the condition record is associated with.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'Indicates the patient who the condition record is associated with.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Conditionencounter_encounter_Union', description: 'Encounter during which the condition was first asserted.', - }, - asserter: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'Encounter during which the condition was first asserted.', + }, + asserter: { + type: new GraphQLUnionType({ + name: 'Conditionasserter_asserter_Union', description: 'Individual who is making the condition statement.', - }, - dateRecorded: { - type: DateScalar, - description: 'A date, when the Condition statement was documented.', - }, - _dateRecorded: { - type: require('./element.schema'), - description: 'A date, when the Condition statement was documented.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Identification of the condition, problem or diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-category - category: { - type: require('./codeableconcept.schema'), - description: 'A category assigned to the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-clinical - clinicalStatus: { - type: CodeScalar, - description: 'The clinical status of the condition.', - }, - _clinicalStatus: { - type: require('./element.schema'), - description: 'The clinical status of the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-ver-status - verificationStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The verification status to support the clinical status of the condition.', - }, - _verificationStatus: { - type: require('./element.schema'), - description: - 'The verification status to support the clinical status of the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-severity - severity: { - type: require('./codeableconcept.schema'), - description: - 'A subjective assessment of the severity of the condition as evaluated by the clinician.', - }, - onsetDateTime: { - type: DateTimeScalar, - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - _onsetDateTime: { - type: require('./element.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetQuantity: { - type: require('./quantity.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetPeriod: { - type: require('./period.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetRange: { - type: require('./range.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetString: { - type: GraphQLString, - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - _onsetString: { - type: require('./element.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - abatementDateTime: { - type: DateTimeScalar, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementDateTime: { - type: require('./element.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementQuantity: { - type: require('./quantity.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementBoolean: { - type: GraphQLBoolean, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementBoolean: { - type: require('./element.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementPeriod: { - type: require('./period.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementRange: { - type: require('./range.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementString: { - type: GraphQLString, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementString: { - type: require('./element.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - stage: { - type: require('./conditionstage.schema'), - description: - 'Clinical stage or grade of a condition. May include formal severity assessments.', - }, - evidence: { - type: new GraphQLList(require('./conditionevidence.schema')), - description: - 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The anatomical location where this condition manifests itself.', - }, - notes: { - type: GraphQLString, - description: - 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', - }, - _notes: { - type: require('./element.schema'), - description: - 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Individual who is making the condition statement.', + }, + _dateRecorded: { + type: require('./element.schema.js'), + description: 'A date, when the Condition statement was documented.', + }, + dateRecorded: { + type: DateScalar, + description: 'A date, when the Condition statement was documented.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Identification of the condition, problem or diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-category + category: { + type: require('./codeableconcept.schema.js'), + description: 'A category assigned to the condition.', + }, + _clinicalStatus: { + type: require('./element.schema.js'), + description: 'The clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-clinical + clinicalStatus: { + type: CodeScalar, + description: 'The clinical status of the condition.', + }, + _verificationStatus: { + type: require('./element.schema.js'), + description: + 'The verification status to support the clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-ver-status + verificationStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The verification status to support the clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-severity + severity: { + type: require('./codeableconcept.schema.js'), + description: + 'A subjective assessment of the severity of the condition as evaluated by the clinician.', + }, + _onsetDateTime: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetQuantity: { + type: require('./quantity.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetPeriod: { + type: require('./period.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetRange: { + type: require('./range.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _onsetString: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _abatementDateTime: { + type: require('./element.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementDateTime: { + type: DateTimeScalar, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementQuantity: { + type: require('./quantity.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementBoolean: { + type: require('./element.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementBoolean: { + type: GraphQLBoolean, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementPeriod: { + type: require('./period.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementRange: { + type: require('./range.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementString: { + type: require('./element.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementString: { + type: GraphQLString, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + stage: { + type: require('./conditionstage.schema.js'), + description: + 'Clinical stage or grade of a condition. May include formal severity assessments.', + }, + evidence: { + type: new GraphQLList(require('./conditionevidence.schema.js')), + description: + 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The anatomical location where this condition manifests itself.', + }, + _notes: { + type: require('./element.schema.js'), + description: + 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', + }, + notes: { + type: GraphQLString, + description: + 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conditionevidence.schema.js b/src/resources/1_0_2/schemas/conditionevidence.schema.js index c4ab8dab..024cb8e2 100644 --- a/src/resources/1_0_2/schemas/conditionevidence.schema.js +++ b/src/resources/1_0_2/schemas/conditionevidence.schema.js @@ -1,27 +1,56 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Condition.evidence Schema + * @summary Conditionevidence Schema */ module.exports = new GraphQLObjectType({ - name: 'ConditionEvidence', - description: - 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/manifestation-or-symptom - code: { - type: require('./codeableconcept.schema'), - description: - 'A manifestation or symptom that led to the recording of this condition.', - }, - detail: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Links to other relevant information, including pathology reports.', - }, - }), + name: 'Conditionevidence', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/manifestation-or-symptom + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A manifestation or symptom that led to the recording of this condition.', + }, + detail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Conditionevidencedetail_detail_Union', + description: + 'Links to other relevant information, including pathology reports.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Links to other relevant information, including pathology reports.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conditionstage.schema.js b/src/resources/1_0_2/schemas/conditionstage.schema.js index e9eefb42..71131909 100644 --- a/src/resources/1_0_2/schemas/conditionstage.schema.js +++ b/src/resources/1_0_2/schemas/conditionstage.schema.js @@ -1,27 +1,66 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Condition.stage Schema + * @summary Conditionstage Schema */ module.exports = new GraphQLObjectType({ - name: 'ConditionStage', - description: - 'Clinical stage or grade of a condition. May include formal severity assessments.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-stage - summary: { - type: require('./codeableconcept.schema'), - description: - "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", - }, - assessment: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Reference to a formal record of the evidence on which the staging assessment is based.', - }, - }), + name: 'Conditionstage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-stage + summary: { + type: require('./codeableconcept.schema.js'), + description: + "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", + }, + assessment: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Conditionstageassessment_assessment_Union', + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + types: () => [ + require('./clinicalimpression.schema.js'), + require('./diagnosticreport.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformance.schema.js b/src/resources/1_0_2/schemas/conformance.schema.js index 8968afb5..6c6789ec 100644 --- a/src/resources/1_0_2/schemas/conformance.schema.js +++ b/src/resources/1_0_2/schemas/conformance.schema.js @@ -1,24 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConformanceResourceType = new GraphQLEnumType({ - name: 'ConformanceResourceType', - values: { - Conformance: { value: 'Conformance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,187 +18,256 @@ let ConformanceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Conformance', - description: 'Base StructureDefinition for Conformance Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ConformanceResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - name: { - type: GraphQLString, - description: - 'A free text natural language name identifying the conformance statement.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name identifying the conformance statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: CodeScalar, - description: 'The status of this conformance statement.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of this conformance statement.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the conformance.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the conformance.', - }, - contact: { - type: new GraphQLList(require('./conformancecontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.', - }, - _description: { - type: require('./element.schema'), - description: - 'A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.', - }, - requirements: { - type: GraphQLString, - description: - "Explains why this conformance statement is needed and why it's been constrained as it has.", - }, - _requirements: { - type: require('./element.schema'), - description: - "Explains why this conformance statement is needed and why it's been constrained as it has.", - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-statement-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', - }, - _kind: { - type: require('./element.schema'), - description: - 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', - }, - software: { - type: require('./conformancesoftware.schema'), - description: - 'Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.', - }, - implementation: { - type: require('./conformanceimplementation.schema'), - description: - 'Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.', - }, - fhirVersion: { - type: new GraphQLNonNull(IdScalar), - description: - 'The version of the FHIR specification on which this conformance statement is based.', - }, - _fhirVersion: { - type: require('./element.schema'), - description: - 'The version of the FHIR specification on which this conformance statement is based.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/unknown-content-code - acceptUnknown: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', - }, - _acceptUnknown: { - type: require('./element.schema'), - description: - 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', - }, - format: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: - 'A list of the formats supported by this implementation using their content types.', - }, - _format: { - type: require('./element.schema'), - description: - 'A list of the formats supported by this implementation using their content types.', - }, - profile: { - type: new GraphQLList(require('./reference.schema')), - description: - "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", - }, - rest: { - type: new GraphQLList(require('./conformancerest.schema')), - description: - 'A definition of the restful capabilities of the solution, if any.', - }, - messaging: { - type: new GraphQLList(require('./conformancemessaging.schema')), - description: - 'A description of the messaging capabilities of the solution.', - }, - document: { - type: new GraphQLList(require('./conformancedocument.schema')), - description: 'A document definition.', - }, - }), + description: 'Base StructureDefinition for Conformance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Conformance_Enum_schema', + values: { Conformance: { value: 'Conformance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name identifying the conformance statement.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name identifying the conformance statement.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this conformance statement.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: CodeScalar, + description: 'The status of this conformance statement.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the conformance.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the conformance.', + }, + contact: { + type: new GraphQLList(require('./conformancecontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + "Explains why this conformance statement is needed and why it's been constrained as it has.", + }, + requirements: { + type: GraphQLString, + description: + "Explains why this conformance statement is needed and why it's been constrained as it has.", + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-statement-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + software: { + type: require('./conformancesoftware.schema.js'), + description: + 'Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.', + }, + implementation: { + type: require('./conformanceimplementation.schema.js'), + description: + 'Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version of the FHIR specification on which this conformance statement is based.', + }, + fhirVersion: { + type: new GraphQLNonNull(IdScalar), + description: + 'The version of the FHIR specification on which this conformance statement is based.', + }, + _acceptUnknown: { + type: require('./element.schema.js'), + description: + 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/unknown-content-code + acceptUnknown: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', + }, + _format: { + type: require('./element.schema.js'), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + format: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + profile: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Conformanceprofile_profile_Union', + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", + }, + rest: { + type: new GraphQLList(require('./conformancerest.schema.js')), + description: + 'A definition of the restful capabilities of the solution, if any.', + }, + messaging: { + type: new GraphQLList(require('./conformancemessaging.schema.js')), + description: + 'A description of the messaging capabilities of the solution.', + }, + document: { + type: new GraphQLList(require('./conformancedocument.schema.js')), + description: 'A document definition.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancecontact.schema.js b/src/resources/1_0_2/schemas/conformancecontact.schema.js index 1f70fbdd..748e660c 100644 --- a/src/resources/1_0_2/schemas/conformancecontact.schema.js +++ b/src/resources/1_0_2/schemas/conformancecontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Conformance.contact Schema + * @summary Conformancecontact Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the conformance.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the conformance.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'Conformancecontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the conformance.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the conformance.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancedocument.schema.js b/src/resources/1_0_2/schemas/conformancedocument.schema.js index bf0a5913..d33e6033 100644 --- a/src/resources/1_0_2/schemas/conformancedocument.schema.js +++ b/src/resources/1_0_2/schemas/conformancedocument.schema.js @@ -1,41 +1,76 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.document Schema + * @summary Conformancedocument Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceDocument', - description: 'A document definition.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Mode of this document declaration - whether application is producer or consumer.', - }, - _mode: { - type: require('./element.schema'), - description: - 'Mode of this document declaration - whether application is producer or consumer.', - }, - documentation: { - type: GraphQLString, - description: - 'A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.', - }, - profile: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'A constraint on a resource used in the document.', - }, - }), + name: 'Conformancedocument', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Mode of this document declaration - whether application is producer or consumer.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Mode of this document declaration - whether application is producer or consumer.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.', + }, + profile: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Conformancedocumentprofile_profile_Union', + description: 'A constraint on a resource used in the document.', + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: 'A constraint on a resource used in the document.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformanceimplementation.schema.js b/src/resources/1_0_2/schemas/conformanceimplementation.schema.js index b67d3b64..e5902da1 100644 --- a/src/resources/1_0_2/schemas/conformanceimplementation.schema.js +++ b/src/resources/1_0_2/schemas/conformanceimplementation.schema.js @@ -1,37 +1,59 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Conformance.implementation Schema + * @summary Conformanceimplementation Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceImplementation', - description: - 'Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Information about the specific installation that this conformance statement relates to.', - }, - _description: { - type: require('./element.schema'), - description: - 'Information about the specific installation that this conformance statement relates to.', - }, - url: { - type: UriScalar, - description: - 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', - }, - }), + name: 'Conformanceimplementation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Information about the specific installation that this conformance statement relates to.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Information about the specific installation that this conformance statement relates to.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + url: { + type: UriScalar, + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancemessaging.schema.js b/src/resources/1_0_2/schemas/conformancemessaging.schema.js index effa6483..7cd3a373 100644 --- a/src/resources/1_0_2/schemas/conformancemessaging.schema.js +++ b/src/resources/1_0_2/schemas/conformancemessaging.schema.js @@ -1,53 +1,73 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, GraphQLList, GraphQLString, GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary Conformance.messaging Schema + * @summary Conformancemessaging Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceMessaging', - description: 'A description of the messaging capabilities of the solution.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - endpoint: { - type: new GraphQLList(require('./conformancemessagingendpoint.schema')), - description: - 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', - }, - reliableCache: { - type: UnsignedIntScalar, - description: - "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", - }, - _reliableCache: { - type: require('./element.schema'), - description: - "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", - }, - documentation: { - type: GraphQLString, - description: - "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", - }, - _documentation: { - type: require('./element.schema'), - description: - "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", - }, - event: { - type: new GraphQLList( - new GraphQLNonNull(require('./conformancemessagingevent.schema')), - ), - description: - "A description of the solution's support for an event at this end-point.", - }, - }), + name: 'Conformancemessaging', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + endpoint: { + type: new GraphQLList( + require('./conformancemessagingendpoint.schema.js'), + ), + description: + 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', + }, + _reliableCache: { + type: require('./element.schema.js'), + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + reliableCache: { + type: UnsignedIntScalar, + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", + }, + documentation: { + type: GraphQLString, + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", + }, + event: { + type: new GraphQLList( + new GraphQLNonNull(require('./conformancemessagingevent.schema.js')), + ), + description: + "A description of the solution's support for an event at this end-point.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancemessagingendpoint.schema.js b/src/resources/1_0_2/schemas/conformancemessagingendpoint.schema.js index 7b74f963..534fb169 100644 --- a/src/resources/1_0_2/schemas/conformancemessagingendpoint.schema.js +++ b/src/resources/1_0_2/schemas/conformancemessagingendpoint.schema.js @@ -1,33 +1,50 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Conformance.messaging.endpoint Schema + * @summary Conformancemessagingendpoint Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceMessagingEndpoint', - description: - 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-transport - protocol: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', - }, - address: { - type: new GraphQLNonNull(UriScalar), - description: - 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', - }, - _address: { - type: require('./element.schema'), - description: - 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', - }, - }), + name: 'Conformancemessagingendpoint', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-transport + protocol: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', + }, + _address: { + type: require('./element.schema.js'), + description: + 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + address: { + type: new GraphQLNonNull(UriScalar), + description: + 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancemessagingevent.schema.js b/src/resources/1_0_2/schemas/conformancemessagingevent.schema.js index 11379871..acd40fb3 100644 --- a/src/resources/1_0_2/schemas/conformancemessagingevent.schema.js +++ b/src/resources/1_0_2/schemas/conformancemessagingevent.schema.js @@ -1,71 +1,116 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.messaging.event Schema + * @summary Conformancemessagingevent Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceMessagingEvent', - description: - "A description of the solution's support for an event at this end-point.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'A coded identifier of a supported messaging event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category - category: { - type: CodeScalar, - description: 'The impact of the content of the message.', - }, - _category: { - type: require('./element.schema'), - description: 'The impact of the content of the message.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-conformance-event-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The mode of this event declaration - whether application is sender or receiver.', - }, - _mode: { - type: require('./element.schema'), - description: - 'The mode of this event declaration - whether application is sender or receiver.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - focus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A resource associated with the event. This is the resource that defines the event.', - }, - _focus: { - type: require('./element.schema'), - description: - 'A resource associated with the event. This is the resource that defines the event.', - }, - request: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Information about the request for this event.', - }, - response: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Information about the response for this event.', - }, - documentation: { - type: GraphQLString, - description: - 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', - }, - }), + name: 'Conformancemessagingevent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'A coded identifier of a supported messaging event.', + }, + _category: { + type: require('./element.schema.js'), + description: 'The impact of the content of the message.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category + category: { + type: CodeScalar, + description: 'The impact of the content of the message.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-conformance-event-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + _focus: { + type: require('./element.schema.js'), + description: + 'A resource associated with the event. This is the resource that defines the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + focus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A resource associated with the event. This is the resource that defines the event.', + }, + request: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Conformancemessagingeventrequest_request_Union', + description: 'Information about the request for this event.', + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: 'Information about the request for this event.', + }, + response: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Conformancemessagingeventresponse_response_Union', + description: 'Information about the response for this event.', + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: 'Information about the response for this event.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancerest.schema.js b/src/resources/1_0_2/schemas/conformancerest.schema.js index 73abba77..e2b9d7d2 100644 --- a/src/resources/1_0_2/schemas/conformancerest.schema.js +++ b/src/resources/1_0_2/schemas/conformancerest.schema.js @@ -1,85 +1,102 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Conformance.rest Schema + * @summary Conformancerest Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceRest', - description: - 'A definition of the restful capabilities of the solution, if any.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/restful-conformance-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.', - }, - _mode: { - type: require('./element.schema'), - description: - 'Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.', - }, - documentation: { - type: GraphQLString, - description: - "Information about the system's restful capabilities that apply across all applications, such as security.", - }, - _documentation: { - type: require('./element.schema'), - description: - "Information about the system's restful capabilities that apply across all applications, such as security.", - }, - security: { - type: require('./conformancerestsecurity.schema'), - description: - 'Information about security implementation from an interface perspective - what a client needs to know.', - }, - resource: { - type: new GraphQLList( - new GraphQLNonNull(require('./conformancerestresource.schema')), - ), - description: - 'A specification of the restful capabilities of the solution for a specific resource type.', - }, - interaction: { - type: new GraphQLList(require('./conformancerestinteraction.schema')), - description: - 'A specification of restful operations supported by the system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/transaction-mode - transactionMode: { - type: CodeScalar, - description: 'A code that indicates how transactions are supported.', - }, - _transactionMode: { - type: require('./element.schema'), - description: 'A code that indicates how transactions are supported.', - }, - operation: { - type: new GraphQLList(require('./conformancerestoperation.schema')), - description: - 'Definition of an operation or a named query and with its parameters and their meaning and type.', - }, - compartment: { - type: new GraphQLList(UriScalar), - description: - 'An absolute URI which is a reference to the definition of a compartment hosted by the system.', - }, - _compartment: { - type: require('./element.schema'), - description: - 'An absolute URI which is a reference to the definition of a compartment hosted by the system.', - }, - }), + name: 'Conformancerest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/restful-conformance-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + documentation: { + type: GraphQLString, + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + security: { + type: require('./conformancerestsecurity.schema.js'), + description: + 'Information about security implementation from an interface perspective - what a client needs to know.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull(require('./conformancerestresource.schema.js')), + ), + description: + 'A specification of the restful capabilities of the solution for a specific resource type.', + }, + interaction: { + type: new GraphQLList(require('./conformancerestinteraction.schema.js')), + description: + 'A specification of restful operations supported by the system.', + }, + _transactionMode: { + type: require('./element.schema.js'), + description: 'A code that indicates how transactions are supported.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/transaction-mode + transactionMode: { + type: CodeScalar, + description: 'A code that indicates how transactions are supported.', + }, + operation: { + type: new GraphQLList(require('./conformancerestoperation.schema.js')), + description: + 'Definition of an operation or a named query and with its parameters and their meaning and type.', + }, + _compartment: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is a reference to the definition of a compartment hosted by the system.', + }, + compartment: { + type: new GraphQLList(UriScalar), + description: + 'An absolute URI which is a reference to the definition of a compartment hosted by the system.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancerestinteraction.schema.js b/src/resources/1_0_2/schemas/conformancerestinteraction.schema.js index 2aa25a64..018de349 100644 --- a/src/resources/1_0_2/schemas/conformancerestinteraction.schema.js +++ b/src/resources/1_0_2/schemas/conformancerestinteraction.schema.js @@ -1,37 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.rest.interaction Schema + * @summary Conformancerestinteraction Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceRestInteraction', - description: 'A specification of restful operations supported by the system.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/system-restful-interaction - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A coded identifier of the operation, supported by the system.', - }, - _code: { - type: require('./element.schema'), - description: - 'A coded identifier of the operation, supported by the system.', - }, - documentation: { - type: GraphQLString, - description: - 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', - }, - }), + name: 'Conformancerestinteraction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A coded identifier of the operation, supported by the system.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/system-restful-interaction + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A coded identifier of the operation, supported by the system.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancerestoperation.schema.js b/src/resources/1_0_2/schemas/conformancerestoperation.schema.js index 198b1ce2..4cbbb0b6 100644 --- a/src/resources/1_0_2/schemas/conformancerestoperation.schema.js +++ b/src/resources/1_0_2/schemas/conformancerestoperation.schema.js @@ -1,30 +1,64 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Conformance.rest.operation Schema + * @summary Conformancerestoperation Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceRestOperation', - description: - 'Definition of an operation or a named query and with its parameters and their meaning and type.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of a query, which is used in the _query parameter when the query is called.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of a query, which is used in the _query parameter when the query is called.', - }, - definition: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Where the formal definition can be found.', - }, - }), + name: 'Conformancerestoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of a query, which is used in the _query parameter when the query is called.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of a query, which is used in the _query parameter when the query is called.', + }, + definition: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Conformancerestoperationdefinition_definition_Union', + description: 'Where the formal definition can be found.', + types: () => [require('./operationdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationDefinition') { + return require('./operationdefinition.schema.js'); + } + }, + }), + ), + description: 'Where the formal definition can be found.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancerestresource.schema.js b/src/resources/1_0_2/schemas/conformancerestresource.schema.js index 797cd2d1..edefc638 100644 --- a/src/resources/1_0_2/schemas/conformancerestresource.schema.js +++ b/src/resources/1_0_2/schemas/conformancerestresource.schema.js @@ -1,133 +1,160 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLUnionType, GraphQLBoolean, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.rest.resource Schema + * @summary Conformancerestresource Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceRestResource', - description: - 'A specification of the restful capabilities of the solution for a specific resource type.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'A type of resource exposed via the restful interface.', - }, - _type: { - type: require('./element.schema'), - description: 'A type of resource exposed via the restful interface.', - }, - profile: { - type: require('./reference.schema'), + name: 'Conformancerestresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'A type of resource exposed via the restful interface.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'A type of resource exposed via the restful interface.', + }, + profile: { + type: new GraphQLUnionType({ + name: 'Conformancerestresourceprofile_profile_Union', description: "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", - }, - interaction: { - type: new GraphQLList( - new GraphQLNonNull( - require('./conformancerestresourceinteraction.schema'), - ), - ), - description: - 'Identifies a restful operation supported by the solution.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/versioning-policy - versioning: { - type: CodeScalar, - description: - "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", - }, - _versioning: { - type: require('./element.schema'), - description: - "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", - }, - readHistory: { - type: GraphQLBoolean, - description: - 'A flag for whether the server is able to return past versions as part of the vRead operation.', - }, - _readHistory: { - type: require('./element.schema'), - description: - 'A flag for whether the server is able to return past versions as part of the vRead operation.', - }, - updateCreate: { - type: GraphQLBoolean, - description: - 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', - }, - _updateCreate: { - type: require('./element.schema'), - description: - 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', - }, - conditionalCreate: { - type: GraphQLBoolean, - description: - 'A flag that indicates that the server supports conditional create.', - }, - _conditionalCreate: { - type: require('./element.schema'), - description: - 'A flag that indicates that the server supports conditional create.', - }, - conditionalUpdate: { - type: GraphQLBoolean, - description: - 'A flag that indicates that the server supports conditional update.', - }, - _conditionalUpdate: { - type: require('./element.schema'), - description: - 'A flag that indicates that the server supports conditional update.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conditional-delete-status - conditionalDelete: { - type: CodeScalar, - description: - 'A code that indicates how the server supports conditional delete.', - }, - _conditionalDelete: { - type: require('./element.schema'), - description: - 'A code that indicates how the server supports conditional delete.', - }, - searchInclude: { - type: new GraphQLList(GraphQLString), - description: 'A list of _include values supported by the server.', - }, - _searchInclude: { - type: require('./element.schema'), - description: 'A list of _include values supported by the server.', - }, - searchRevInclude: { - type: new GraphQLList(GraphQLString), - description: - 'A list of _revinclude (reverse include) values supported by the server.', - }, - _searchRevInclude: { - type: require('./element.schema'), - description: - 'A list of _revinclude (reverse include) values supported by the server.', - }, - searchParam: { - type: new GraphQLList( - require('./conformancerestresourcesearchparam.schema'), + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + description: + "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", + }, + interaction: { + type: new GraphQLList( + new GraphQLNonNull( + require('./conformancerestresourceinteraction.schema.js'), ), - description: - 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', - }, - }), + ), + description: 'Identifies a restful operation supported by the solution.', + }, + _versioning: { + type: require('./element.schema.js'), + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/versioning-policy + versioning: { + type: CodeScalar, + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + _readHistory: { + type: require('./element.schema.js'), + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + readHistory: { + type: GraphQLBoolean, + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + _updateCreate: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + updateCreate: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + _conditionalCreate: { + type: require('./element.schema.js'), + description: + 'A flag that indicates that the server supports conditional create.', + }, + conditionalCreate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional create.', + }, + _conditionalUpdate: { + type: require('./element.schema.js'), + description: + 'A flag that indicates that the server supports conditional update.', + }, + conditionalUpdate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional update.', + }, + _conditionalDelete: { + type: require('./element.schema.js'), + description: + 'A code that indicates how the server supports conditional delete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conditional-delete-status + conditionalDelete: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional delete.', + }, + _searchInclude: { + type: require('./element.schema.js'), + description: 'A list of _include values supported by the server.', + }, + searchInclude: { + type: new GraphQLList(GraphQLString), + description: 'A list of _include values supported by the server.', + }, + _searchRevInclude: { + type: require('./element.schema.js'), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchRevInclude: { + type: new GraphQLList(GraphQLString), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchParam: { + type: new GraphQLList( + require('./conformancerestresourcesearchparam.schema.js'), + ), + description: + 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancerestresourceinteraction.schema.js b/src/resources/1_0_2/schemas/conformancerestresourceinteraction.schema.js index 0725f41a..0bb0d7d4 100644 --- a/src/resources/1_0_2/schemas/conformancerestresourceinteraction.schema.js +++ b/src/resources/1_0_2/schemas/conformancerestresourceinteraction.schema.js @@ -1,37 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.rest.resource.interaction Schema + * @summary Conformancerestresourceinteraction Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceRestResourceInteraction', - description: 'Identifies a restful operation supported by the solution.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/type-restful-interaction - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Coded identifier of the operation, supported by the system resource.', - }, - _code: { - type: require('./element.schema'), - description: - 'Coded identifier of the operation, supported by the system resource.', - }, - documentation: { - type: GraphQLString, - description: - "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", - }, - _documentation: { - type: require('./element.schema'), - description: - "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", - }, - }), + name: 'Conformancerestresourceinteraction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/type-restful-interaction + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + documentation: { + type: GraphQLString, + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancerestresourcesearchparam.schema.js b/src/resources/1_0_2/schemas/conformancerestresourcesearchparam.schema.js index e8c7ed5f..9a2fe27b 100644 --- a/src/resources/1_0_2/schemas/conformancerestresourcesearchparam.schema.js +++ b/src/resources/1_0_2/schemas/conformancerestresourcesearchparam.schema.js @@ -1,90 +1,107 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Conformance.rest.resource.searchParam Schema + * @summary ConformancerestresourcesearchParam Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceRestResourceSearchParam', - description: - 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name of the search parameter used in the interface.', - }, - _name: { - type: require('./element.schema'), - description: 'The name of the search parameter used in the interface.', - }, - definition: { - type: UriScalar, - description: - 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).', - }, - _definition: { - type: require('./element.schema'), - description: - 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - _type: { - type: require('./element.schema'), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - documentation: { - type: GraphQLString, - description: - 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - target: { - type: new GraphQLList(CodeScalar), - description: 'Types of resource (if a resource is referenced).', - }, - _target: { - type: require('./element.schema'), - description: 'Types of resource (if a resource is referenced).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-modifier-code - modifier: { - type: new GraphQLList(CodeScalar), - description: 'A modifier supported for the search parameter.', - }, - _modifier: { - type: require('./element.schema'), - description: 'A modifier supported for the search parameter.', - }, - chain: { - type: new GraphQLList(GraphQLString), - description: - 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.', - }, - _chain: { - type: require('./element.schema'), - description: - 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.', - }, - }), + name: 'ConformancerestresourcesearchParam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of the search parameter used in the interface.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the search parameter used in the interface.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).', + }, + definition: { + type: UriScalar, + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + documentation: { + type: GraphQLString, + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + _target: { + type: require('./element.schema.js'), + description: 'Types of resource (if a resource is referenced).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + target: { + type: new GraphQLList(CodeScalar), + description: 'Types of resource (if a resource is referenced).', + }, + _modifier: { + type: require('./element.schema.js'), + description: 'A modifier supported for the search parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-modifier-code + modifier: { + type: new GraphQLList(CodeScalar), + description: 'A modifier supported for the search parameter.', + }, + _chain: { + type: require('./element.schema.js'), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.', + }, + chain: { + type: new GraphQLList(GraphQLString), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancerestsecurity.schema.js b/src/resources/1_0_2/schemas/conformancerestsecurity.schema.js index b678d3ee..e784ede0 100644 --- a/src/resources/1_0_2/schemas/conformancerestsecurity.schema.js +++ b/src/resources/1_0_2/schemas/conformancerestsecurity.schema.js @@ -1,51 +1,68 @@ const { - GraphQLObjectType, - GraphQLBoolean, GraphQLList, + GraphQLBoolean, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Conformance.rest.security Schema + * @summary Conformancerestsecurity Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceRestSecurity', - description: - 'Information about security implementation from an interface perspective - what a client needs to know.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - cors: { - type: GraphQLBoolean, - description: - 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', - }, - _cors: { - type: require('./element.schema'), - description: - 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/restful-security-service - service: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Types of security services are supported/required by the system.', - }, - description: { - type: GraphQLString, - description: 'General description of how security works.', - }, - _description: { - type: require('./element.schema'), - description: 'General description of how security works.', - }, - certificate: { - type: new GraphQLList( - require('./conformancerestsecuritycertificate.schema'), - ), - description: 'Certificates associated with security profiles.', - }, - }), + name: 'Conformancerestsecurity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _cors: { + type: require('./element.schema.js'), + description: + 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', + }, + cors: { + type: GraphQLBoolean, + description: + 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/restful-security-service + service: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Types of security services are supported/required by the system.', + }, + _description: { + type: require('./element.schema.js'), + description: 'General description of how security works.', + }, + description: { + type: GraphQLString, + description: 'General description of how security works.', + }, + certificate: { + type: new GraphQLList( + require('./conformancerestsecuritycertificate.schema.js'), + ), + description: 'Certificates associated with security profiles.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancerestsecuritycertificate.schema.js b/src/resources/1_0_2/schemas/conformancerestsecuritycertificate.schema.js index fba7c963..7eeecbaf 100644 --- a/src/resources/1_0_2/schemas/conformancerestsecuritycertificate.schema.js +++ b/src/resources/1_0_2/schemas/conformancerestsecuritycertificate.schema.js @@ -1,33 +1,51 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary Conformance.rest.security.certificate Schema + * @summary Conformancerestsecuritycertificate Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceRestSecurityCertificate', - description: 'Certificates associated with security profiles.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - type: { - type: CodeScalar, - description: 'Mime type for certificate.', - }, - _type: { - type: require('./element.schema'), - description: 'Mime type for certificate.', - }, - blob: { - type: Base64BinaryScalar, - description: 'Actual certificate.', - }, - _blob: { - type: require('./element.schema'), - description: 'Actual certificate.', - }, - }), + name: 'Conformancerestsecuritycertificate', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Mime type for certificate.', + }, + type: { + type: CodeScalar, + description: 'Mime type for certificate.', + }, + _blob: { + type: require('./element.schema.js'), + description: 'Actual certificate.', + }, + blob: { + type: Base64BinaryScalar, + description: 'Actual certificate.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/conformancesoftware.schema.js b/src/resources/1_0_2/schemas/conformancesoftware.schema.js index d0100794..1398fc6a 100644 --- a/src/resources/1_0_2/schemas/conformancesoftware.schema.js +++ b/src/resources/1_0_2/schemas/conformancesoftware.schema.js @@ -1,43 +1,65 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Conformance.software Schema + * @summary Conformancesoftware Schema */ module.exports = new GraphQLObjectType({ - name: 'ConformanceSoftware', - description: - 'Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Name software is known by.', - }, - _name: { - type: require('./element.schema'), - description: 'Name software is known by.', - }, - version: { - type: GraphQLString, - description: - 'The version identifier for the software covered by this statement.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version identifier for the software covered by this statement.', - }, - releaseDate: { - type: DateTimeScalar, - description: 'Date this version of the software released.', - }, - _releaseDate: { - type: require('./element.schema'), - description: 'Date this version of the software released.', - }, - }), + name: 'Conformancesoftware', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Name software is known by.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name software is known by.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version identifier for the software covered by this statement.', + }, + version: { + type: GraphQLString, + description: + 'The version identifier for the software covered by this statement.', + }, + _releaseDate: { + type: require('./element.schema.js'), + description: 'Date this version of the software released.', + }, + releaseDate: { + type: DateTimeScalar, + description: 'Date this version of the software released.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contactpoint.schema.js b/src/resources/1_0_2/schemas/contactpoint.schema.js index ecfea01c..782559dc 100644 --- a/src/resources/1_0_2/schemas/contactpoint.schema.js +++ b/src/resources/1_0_2/schemas/contactpoint.schema.js @@ -1,8 +1,7 @@ -const CodeScalar = require('../scalars/code.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -10,52 +9,66 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'ContactPoint', - description: 'Base StructureDefinition for ContactPoint Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contact-point-system - system: { - type: CodeScalar, - description: - 'Telecommunications form for contact point - what communications system is required to make use of the contact.', - }, - _system: { - type: require('./element.schema'), - description: - 'Telecommunications form for contact point - what communications system is required to make use of the contact.', - }, - value: { - type: GraphQLString, - description: - 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', - }, - _value: { - type: require('./element.schema'), - description: - 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contact-point-use - use: { - type: CodeScalar, - description: 'Identifies the purpose for the contact point.', - }, - _use: { - type: require('./element.schema'), - description: 'Identifies the purpose for the contact point.', - }, - rank: { - type: PositiveIntScalar, - description: - 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', - }, - _rank: { - type: require('./element.schema'), - description: - 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', - }, - period: { - type: require('./period.schema'), - description: 'Time period when the contact point was/is in use.', - }, - }), + description: 'Base StructureDefinition for ContactPoint Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contact-point-system + system: { + type: CodeScalar, + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + value: { + type: GraphQLString, + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + _use: { + type: require('./element.schema.js'), + description: 'Identifies the purpose for the contact point.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contact-point-use + use: { + type: CodeScalar, + description: 'Identifies the purpose for the contact point.', + }, + _rank: { + type: require('./element.schema.js'), + description: + 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', + }, + rank: { + type: PositiveIntScalar, + description: + 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period when the contact point was/is in use.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contract.schema.js b/src/resources/1_0_2/schemas/contract.schema.js index 3ba03395..1b9eecd1 100644 --- a/src/resources/1_0_2/schemas/contract.schema.js +++ b/src/resources/1_0_2/schemas/contract.schema.js @@ -1,20 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ContractResourceType = new GraphQLEnumType({ - name: 'ContractResourceType', - values: { - Contract: { value: 'Contract' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,108 +16,221 @@ let ContractResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Contract', - description: 'Base StructureDefinition for Contract Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ContractResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Unique identifier for this Contract.', - }, - issued: { - type: DateTimeScalar, - description: 'When this Contract was issued.', - }, - _issued: { - type: require('./element.schema'), - description: 'When this Contract was issued.', - }, - applies: { - type: require('./period.schema'), - description: - 'Relevant time or time-period when this Contract is applicable.', - }, - subject: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.', - }, - authority: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', - }, - domain: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-subtype - subType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-action - action: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Action stipulated by this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - actionReason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reason for action stipulated by this Contract.', - }, - actor: { - type: new GraphQLList(require('./contractactor.schema')), - description: 'List of Contract actors.', - }, - valuedItem: { - type: new GraphQLList(require('./contractvalueditem.schema')), - description: 'Contract Valued Item List.', - }, - signer: { - type: new GraphQLList(require('./contractsigner.schema')), - description: 'Party signing this Contract.', - }, - term: { - type: new GraphQLList(require('./contractterm.schema')), - description: - 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', - }, - bindingAttachment: { - type: require('./attachment.schema'), + description: 'Base StructureDefinition for Contract Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Contract_Enum_schema', + values: { Contract: { value: 'Contract' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: 'Unique identifier for this Contract.', + }, + _issued: { + type: require('./element.schema.js'), + description: 'When this Contract was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract was issued.', + }, + applies: { + type: require('./period.schema.js'), + description: + 'Relevant time or time-period when this Contract is applicable.', + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractsubject_subject_Union', + description: + 'Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.', + }, + authority: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractauthority_authority_Union', + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + }, + domain: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractdomain_domain_Union', + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-subtype + subType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-action + action: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Action stipulated by this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + actionReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason for action stipulated by this Contract.', + }, + actor: { + type: new GraphQLList(require('./contractactor.schema.js')), + description: 'List of Contract actors.', + }, + valuedItem: { + type: new GraphQLList(require('./contractvalueditem.schema.js')), + description: 'Contract Valued Item List.', + }, + signer: { + type: new GraphQLList(require('./contractsigner.schema.js')), + description: 'Party signing this Contract.', + }, + term: { + type: new GraphQLList(require('./contractterm.schema.js')), + description: + 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', + }, + bindingAttachment: { + type: require('./attachment.schema.js'), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + bindingReference: { + type: new GraphQLUnionType({ + name: 'ContractbindingReference_bindingReference_Union', description: "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", - }, - bindingReference: { - type: require('./reference.schema'), - description: - "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", - }, - friendly: { - type: new GraphQLList(require('./contractfriendly.schema')), - description: - "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", - }, - legal: { - type: new GraphQLList(require('./contractlegal.schema')), - description: - 'List of Legal expressions or representations of this Contract.', - }, - rule: { - type: new GraphQLList(require('./contractrule.schema')), - description: - 'List of Computable Policy Rule Language Representations of this Contract.', - }, - }), + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + friendly: { + type: new GraphQLList(require('./contractfriendly.schema.js')), + description: + "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", + }, + legal: { + type: new GraphQLList(require('./contractlegal.schema.js')), + description: + 'List of Legal expressions or representations of this Contract.', + }, + rule: { + type: new GraphQLList(require('./contractrule.schema.js')), + description: + 'List of Computable Policy Rule Language Representations of this Contract.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contractactor.schema.js b/src/resources/1_0_2/schemas/contractactor.schema.js index 46914cad..1942710c 100644 --- a/src/resources/1_0_2/schemas/contractactor.schema.js +++ b/src/resources/1_0_2/schemas/contractactor.schema.js @@ -1,24 +1,93 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.actor Schema + * @summary Contractactor Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractActor', - description: 'List of Contract actors.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - entity: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Who or what actors are assigned roles in this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole - role: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Role type of actors assigned roles in this Contract.', - }, - }), + name: 'Contractactor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + entity: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contractactorentity_entity_Union', + description: + 'Who or what actors are assigned roles in this Contract.', + types: () => [ + require('./contract.schema.js'), + require('./device.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'Who or what actors are assigned roles in this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role type of actors assigned roles in this Contract.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contractfriendly.schema.js b/src/resources/1_0_2/schemas/contractfriendly.schema.js index 0cd7e668..a0632d6b 100644 --- a/src/resources/1_0_2/schemas/contractfriendly.schema.js +++ b/src/resources/1_0_2/schemas/contractfriendly.schema.js @@ -1,26 +1,70 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.friendly Schema + * @summary Contractfriendly Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractFriendly', - description: - "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', - }, - }), + name: 'Contractfriendly', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractfriendlycontentReference_contentReference_Union', + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contractlegal.schema.js b/src/resources/1_0_2/schemas/contractlegal.schema.js index c231a530..612eaa2a 100644 --- a/src/resources/1_0_2/schemas/contractlegal.schema.js +++ b/src/resources/1_0_2/schemas/contractlegal.schema.js @@ -1,23 +1,67 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.legal Schema + * @summary Contractlegal Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractLegal', - description: 'List of Legal expressions or representations of this Contract.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: 'Contract legal text in human renderable form.', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Contract legal text in human renderable form.', - }, - }), + name: 'Contractlegal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: 'Contract legal text in human renderable form.', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractlegalcontentReference_contentReference_Union', + description: 'Contract legal text in human renderable form.', + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: 'Contract legal text in human renderable form.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contractrule.schema.js b/src/resources/1_0_2/schemas/contractrule.schema.js index 0834a237..398b4aad 100644 --- a/src/resources/1_0_2/schemas/contractrule.schema.js +++ b/src/resources/1_0_2/schemas/contractrule.schema.js @@ -1,26 +1,60 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.rule Schema + * @summary Contractrule Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractRule', - description: - 'List of Computable Policy Rule Language Representations of this Contract.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', - }, - }), + name: 'Contractrule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractrulecontentReference_contentReference_Union', + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contractsigner.schema.js b/src/resources/1_0_2/schemas/contractsigner.schema.js index 86ce9fe2..1b32336d 100644 --- a/src/resources/1_0_2/schemas/contractsigner.schema.js +++ b/src/resources/1_0_2/schemas/contractsigner.schema.js @@ -1,34 +1,83 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.signer Schema + * @summary Contractsigner Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractSigner', - description: 'Party signing this Contract.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-signer-type - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'Role of this Contract signer, e.g. notary, grantee.', - }, - party: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Party which is a signator to this Contract.', - }, - signature: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Legally binding Contract DSIG signature contents in Base64.', - }, - _signature: { - type: require('./element.schema'), - description: - 'Legally binding Contract DSIG signature contents in Base64.', - }, - }), + name: 'Contractsigner', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-signer-type + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'Role of this Contract signer, e.g. notary, grantee.', + }, + party: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contractsignerparty_party_Union', + description: 'Party which is a signator to this Contract.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'Party which is a signator to this Contract.', + }, + _signature: { + type: require('./element.schema.js'), + description: + 'Legally binding Contract DSIG signature contents in Base64.', + }, + signature: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Legally binding Contract DSIG signature contents in Base64.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contractterm.schema.js b/src/resources/1_0_2/schemas/contractterm.schema.js index 77608c34..7f6fec44 100644 --- a/src/resources/1_0_2/schemas/contractterm.schema.js +++ b/src/resources/1_0_2/schemas/contractterm.schema.js @@ -1,78 +1,108 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.term Schema + * @summary Contractterm Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractTerm', - description: - 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Unique identifier for this particular Contract Provision.', - }, - issued: { - type: DateTimeScalar, - description: 'When this Contract Provision was issued.', - }, - _issued: { - type: require('./element.schema'), - description: 'When this Contract Provision was issued.', - }, - applies: { - type: require('./period.schema'), - description: - 'Relevant time or time-period when this Contract Provision is applicable.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-term-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-term-subtype - subType: { - type: require('./codeableconcept.schema'), - description: - 'Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.', - }, - subject: { - type: require('./reference.schema'), + name: 'Contractterm', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: 'Unique identifier for this particular Contract Provision.', + }, + _issued: { + type: require('./element.schema.js'), + description: 'When this Contract Provision was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract Provision was issued.', + }, + applies: { + type: require('./period.schema.js'), + description: + 'Relevant time or time-period when this Contract Provision is applicable.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-term-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-term-subtype + subType: { + type: require('./codeableconcept.schema.js'), + description: + 'Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Contracttermsubject_subject_Union', description: 'Who or what this Contract Provision is about.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-action - action: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Action stipulated by this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - actionReason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Reason or purpose for the action stipulated by this Contract Provision.', - }, - actor: { - type: new GraphQLList(require('./contracttermactor.schema')), - description: 'List of actors participating in this Contract Provision.', - }, - text: { - type: GraphQLString, - description: 'Human readable form of this Contract Provision.', - }, - _text: { - type: require('./element.schema'), - description: 'Human readable form of this Contract Provision.', - }, - valuedItem: { - type: new GraphQLList(require('./contracttermvalueditem.schema')), - description: 'Contract Provision Valued Item List.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Who or what this Contract Provision is about.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-action + action: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Action stipulated by this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + actionReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Reason or purpose for the action stipulated by this Contract Provision.', + }, + actor: { + type: new GraphQLList(require('./contracttermactor.schema.js')), + description: 'List of actors participating in this Contract Provision.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Human readable form of this Contract Provision.', + }, + text: { + type: GraphQLString, + description: 'Human readable form of this Contract Provision.', + }, + valuedItem: { + type: new GraphQLList(require('./contracttermvalueditem.schema.js')), + description: 'Contract Provision Valued Item List.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contracttermactor.schema.js b/src/resources/1_0_2/schemas/contracttermactor.schema.js index f4ad89c3..3ff4a932 100644 --- a/src/resources/1_0_2/schemas/contracttermactor.schema.js +++ b/src/resources/1_0_2/schemas/contracttermactor.schema.js @@ -1,25 +1,93 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Contract.term.actor Schema + * @summary Contracttermactor Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractTermActor', - description: 'List of actors participating in this Contract Provision.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - entity: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The actor assigned a role in this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole - role: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Role played by the actor assigned this role in this Contract Provision.', - }, - }), + name: 'Contracttermactor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + entity: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contracttermactorentity_entity_Union', + description: 'The actor assigned a role in this Contract Provision.', + types: () => [ + require('./contract.schema.js'), + require('./device.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'The actor assigned a role in this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Role played by the actor assigned this role in this Contract Provision.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contracttermvalueditem.schema.js b/src/resources/1_0_2/schemas/contracttermvalueditem.schema.js index 55b4d812..14f19970 100644 --- a/src/resources/1_0_2/schemas/contracttermvalueditem.schema.js +++ b/src/resources/1_0_2/schemas/contracttermvalueditem.schema.js @@ -1,74 +1,107 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLUnionType, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.term.valuedItem Schema + * @summary ContracttermvaluedItem Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractTermValuedItem', - description: 'Contract Provision Valued Item List.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - entityCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Specific type of Contract Provision Valued Item that may be priced.', - }, - entityReference: { - type: require('./reference.schema'), + name: 'ContracttermvaluedItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + entityCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specific type of Contract Provision Valued Item that may be priced.', + }, + entityReference: { + type: new GraphQLUnionType({ + name: 'ContracttermvaluedItementityReference_entityReference_Union', description: 'Specific type of Contract Provision Valued Item that may be priced.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Identifies a Contract Provision Valued Item instance.', - }, - effectiveTime: { - type: DateTimeScalar, - description: - 'Indicates the time during which this Contract Term ValuedItem information is effective.', - }, - _effectiveTime: { - type: require('./element.schema'), - description: - 'Indicates the time during which this Contract Term ValuedItem information is effective.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.', - }, - unitPrice: { - type: require('./quantity.schema'), - description: 'A Contract Provision Valued Item unit valuation measure.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.schema'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.schema'), - description: - 'Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Specific type of Contract Provision Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Identifies a Contract Provision Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.schema.js'), + description: + 'Indicates the time during which this Contract Term ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract Term ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.', + }, + unitPrice: { + type: require('./quantity.schema.js'), + description: 'A Contract Provision Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.schema.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.schema.js'), + description: + 'Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/contractvalueditem.schema.js b/src/resources/1_0_2/schemas/contractvalueditem.schema.js index 7ba20a4e..58513e53 100644 --- a/src/resources/1_0_2/schemas/contractvalueditem.schema.js +++ b/src/resources/1_0_2/schemas/contractvalueditem.schema.js @@ -1,74 +1,105 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLUnionType, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.valuedItem Schema + * @summary ContractvaluedItem Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractValuedItem', - description: 'Contract Valued Item List.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - entityCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Specific type of Contract Valued Item that may be priced.', - }, - entityReference: { - type: require('./reference.schema'), + name: 'ContractvaluedItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + entityCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + entityReference: { + type: new GraphQLUnionType({ + name: 'ContractvaluedItementityReference_entityReference_Union', description: 'Specific type of Contract Valued Item that may be priced.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Identifies a Contract Valued Item instance.', - }, - effectiveTime: { - type: DateTimeScalar, - description: - 'Indicates the time during which this Contract ValuedItem information is effective.', - }, - _effectiveTime: { - type: require('./element.schema'), - description: - 'Indicates the time during which this Contract ValuedItem information is effective.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', - }, - unitPrice: { - type: require('./quantity.schema'), - description: 'A Contract Valued Item unit valuation measure.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.schema'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./quantity.schema'), - description: - 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Identifies a Contract Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.schema.js'), + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', + }, + unitPrice: { + type: require('./quantity.schema.js'), + description: 'A Contract Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.schema.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./quantity.schema.js'), + description: + 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/count.schema.js b/src/resources/1_0_2/schemas/count.schema.js index 7cabc61b..78470edc 100644 --- a/src/resources/1_0_2/schemas/count.schema.js +++ b/src/resources/1_0_2/schemas/count.schema.js @@ -1,13 +1,11 @@ const { GraphQLObjectType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Count Schema */ module.exports = new GraphQLObjectType({ name: 'Count', - description: 'A count of a discrete element (no unit).', - fields: () => extendSchema(require('./quantity.schema')), + description: 'A count of a discrete element (no unit)', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/schemas/coverage.schema.js b/src/resources/1_0_2/schemas/coverage.schema.js index 7ac46f2c..d9831175 100644 --- a/src/resources/1_0_2/schemas/coverage.schema.js +++ b/src/resources/1_0_2/schemas/coverage.schema.js @@ -1,20 +1,15 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CoverageResourceType = new GraphQLEnumType({ - name: 'CoverageResourceType', - values: { - Coverage: { value: 'Coverage' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -22,102 +17,190 @@ let CoverageResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Coverage', - description: 'Base StructureDefinition for Coverage Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CoverageResourceType), - description: 'Type of this resource.', - }, - issuer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Coverage Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Coverage_Enum_schema', + values: { Coverage: { value: 'Coverage' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + issuer: { + type: new GraphQLUnionType({ + name: 'Coverageissuer_issuer_Union', description: 'The program or plan underwriter or payor.', - }, - bin: { - type: require('./identifier.schema'), - description: - "Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.", - }, - period: { - type: require('./period.schema'), - description: - "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCoverageTypeCode - type: { - type: require('./coding.schema'), - description: - 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.', - }, - subscriberId: { - type: require('./identifier.schema'), - description: 'The id issued to the subscriber.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID.', - }, - group: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', - }, - _group: { - type: require('./element.schema'), - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', - }, - plan: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', - }, - _plan: { - type: require('./element.schema'), - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', - }, - subPlan: { - type: GraphQLString, - description: - 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.', - }, - _subPlan: { - type: require('./element.schema'), - description: - 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.', - }, - dependent: { - type: PositiveIntScalar, - description: 'A unique identifier for a dependent under the coverage.', - }, - _dependent: { - type: require('./element.schema'), - description: 'A unique identifier for a dependent under the coverage.', - }, - sequence: { - type: PositiveIntScalar, - description: - 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', - }, - subscriber: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The program or plan underwriter or payor.', + }, + bin: { + type: require('./identifier.schema.js'), + description: + "Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.", + }, + period: { + type: require('./period.schema.js'), + description: + "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCoverageTypeCode + type: { + type: require('./coding.schema.js'), + description: + 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.', + }, + subscriberId: { + type: require('./identifier.schema.js'), + description: 'The id issued to the subscriber.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID.', + }, + _group: { + type: require('./element.schema.js'), + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', + }, + group: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', + }, + _plan: { + type: require('./element.schema.js'), + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', + }, + plan: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.', + }, + _subPlan: { + type: require('./element.schema.js'), + description: + 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.', + }, + subPlan: { + type: GraphQLString, + description: + 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.', + }, + _dependent: { + type: require('./element.schema.js'), + description: 'A unique identifier for a dependent under the coverage.', + }, + dependent: { + type: PositiveIntScalar, + description: 'A unique identifier for a dependent under the coverage.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', + }, + sequence: { + type: PositiveIntScalar, + description: + 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', + }, + subscriber: { + type: new GraphQLUnionType({ + name: 'Coveragesubscriber_subscriber_Union', description: "The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.", - }, - network: { - type: require('./identifier.schema'), - description: 'The identifier for a community of providers.', - }, - contract: { - type: new GraphQLList(require('./reference.schema')), - description: 'The policy(s) which constitute this insurance coverage.', - }, - }), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + "The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.", + }, + network: { + type: require('./identifier.schema.js'), + description: 'The identifier for a community of providers.', + }, + contract: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Coveragecontract_contract_Union', + description: + 'The policy(s) which constitute this insurance coverage.', + types: () => [require('./contract.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + }, + }), + ), + description: 'The policy(s) which constitute this insurance coverage.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/dataelement.schema.js b/src/resources/1_0_2/schemas/dataelement.schema.js index 5ee6312f..01b8917c 100644 --- a/src/resources/1_0_2/schemas/dataelement.schema.js +++ b/src/resources/1_0_2/schemas/dataelement.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DataElementResourceType = new GraphQLEnumType({ - name: 'DataElementResourceType', - values: { - DataElement: { value: 'DataElement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,130 +18,187 @@ let DataElementResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DataElement', - description: 'Base StructureDefinition for DataElement Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DataElementResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.', - }, - name: { - type: GraphQLString, - description: - 'The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.', - }, - _name: { - type: require('./element.schema'), - description: - 'The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the data element.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the data element.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the data element.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the data element.', - }, - contact: { - type: new GraphQLList(require('./dataelementcontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dataelement-stringency - stringency: { - type: CodeScalar, - description: - 'Identifies how precise the data element is in its definition.', - }, - _stringency: { - type: require('./element.schema'), - description: - 'Identifies how precise the data element is in its definition.', - }, - mapping: { - type: new GraphQLList(require('./dataelementmapping.schema')), - description: - 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', - }, - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.schema')), - ), - description: - 'Defines the structure, type, allowed values and other constraining characteristics of the data element.', - }, - }), + description: 'Base StructureDefinition for DataElement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DataElement_Enum_schema', + values: { DataElement: { value: 'DataElement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.', + }, + name: { + type: GraphQLString, + description: + 'The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the data element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the data element.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the data element.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the data element.', + }, + contact: { + type: new GraphQLList(require('./dataelementcontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.', + }, + _stringency: { + type: require('./element.schema.js'), + description: + 'Identifies how precise the data element is in its definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dataelement-stringency + stringency: { + type: CodeScalar, + description: + 'Identifies how precise the data element is in its definition.', + }, + mapping: { + type: new GraphQLList(require('./dataelementmapping.schema.js')), + description: + 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.schema.js')), + ), + description: + 'Defines the structure, type, allowed values and other constraining characteristics of the data element.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/dataelementcontact.schema.js b/src/resources/1_0_2/schemas/dataelementcontact.schema.js index e97f7b3c..1f570d2e 100644 --- a/src/resources/1_0_2/schemas/dataelementcontact.schema.js +++ b/src/resources/1_0_2/schemas/dataelementcontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DataElement.contact Schema + * @summary DataElementcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'DataElementContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the data element.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the data element.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'DataElementcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the data element.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the data element.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/dataelementmapping.schema.js b/src/resources/1_0_2/schemas/dataelementmapping.schema.js index d10a1614..78fb7488 100644 --- a/src/resources/1_0_2/schemas/dataelementmapping.schema.js +++ b/src/resources/1_0_2/schemas/dataelementmapping.schema.js @@ -1,56 +1,77 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary DataElement.mapping Schema + * @summary DataElementmapping Schema */ module.exports = new GraphQLObjectType({ - name: 'DataElementMapping', - description: - 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: - 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', - }, - _identity: { - type: require('./element.schema'), - description: - 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', - }, - uri: { - type: UriScalar, - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - _uri: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - name: { - type: GraphQLString, - description: 'A name for the specification that is being mapped to.', - }, - _name: { - type: require('./element.schema'), - description: 'A name for the specification that is being mapped to.', - }, - comments: { - type: GraphQLString, - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - _comments: { - type: require('./element.schema'), - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - }), + name: 'DataElementmapping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _identity: { + type: require('./element.schema.js'), + description: + 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comments: { + type: require('./element.schema.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comments: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/detectedissue.schema.js b/src/resources/1_0_2/schemas/detectedissue.schema.js index a54ced92..fbc4528a 100644 --- a/src/resources/1_0_2/schemas/detectedissue.schema.js +++ b/src/resources/1_0_2/schemas/detectedissue.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DetectedIssueResourceType = new GraphQLEnumType({ - name: 'DetectedIssueResourceType', - values: { - DetectedIssue: { value: 'DetectedIssue' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,81 +17,176 @@ let DetectedIssueResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DetectedIssue', - description: 'Base StructureDefinition for DetectedIssue Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DetectedIssueResourceType), - description: 'Type of this resource.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DetectedIssue Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DetectedIssue_Enum_schema', + values: { DetectedIssue: { value: 'DetectedIssue' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'DetectedIssuepatient_patient_Union', description: 'Indicates the patient whose record the detected issue is associated with.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-category - category: { - type: require('./codeableconcept.schema'), - description: 'Identifies the general type of issue identified.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-severity - severity: { - type: CodeScalar, - description: - 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', - }, - _severity: { - type: require('./element.schema'), - description: - 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', - }, - implicated: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', - }, - detail: { - type: GraphQLString, - description: 'A textual explanation of the detected issue.', - }, - _detail: { - type: require('./element.schema'), - description: 'A textual explanation of the detected issue.', - }, - date: { - type: DateTimeScalar, - description: - 'The date or date-time when the detected issue was initially identified.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date or date-time when the detected issue was initially identified.', - }, - author: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'Indicates the patient whose record the detected issue is associated with.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-category + category: { + type: require('./codeableconcept.schema.js'), + description: 'Identifies the general type of issue identified.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-severity + severity: { + type: CodeScalar, + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + implicated: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DetectedIssueimplicated_implicated_Union', + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + }, + _detail: { + type: require('./element.schema.js'), + description: 'A textual explanation of the detected issue.', + }, + detail: { + type: GraphQLString, + description: 'A textual explanation of the detected issue.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date or date-time when the detected issue was initially identified.', + }, + date: { + type: DateTimeScalar, + description: + 'The date or date-time when the detected issue was initially identified.', + }, + author: { + type: new GraphQLUnionType({ + name: 'DetectedIssueauthor_author_Union', description: 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Business identifier associated with the detected issue record.', - }, - reference: { - type: UriScalar, - description: - 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', - }, - _reference: { - type: require('./element.schema'), - description: - 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', - }, - mitigation: { - type: new GraphQLList(require('./detectedissuemitigation.schema')), - description: - 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Business identifier associated with the detected issue record.', + }, + _reference: { + type: require('./element.schema.js'), + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + reference: { + type: UriScalar, + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + mitigation: { + type: new GraphQLList(require('./detectedissuemitigation.schema.js')), + description: + 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/detectedissuemitigation.schema.js b/src/resources/1_0_2/schemas/detectedissuemitigation.schema.js index 1a80d1c9..79ab3372 100644 --- a/src/resources/1_0_2/schemas/detectedissuemitigation.schema.js +++ b/src/resources/1_0_2/schemas/detectedissuemitigation.schema.js @@ -1,36 +1,68 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary DetectedIssue.mitigation Schema + * @summary DetectedIssuemitigation Schema */ module.exports = new GraphQLObjectType({ - name: 'DetectedIssueMitigation', - description: - 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action - action: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', - }, - date: { - type: DateTimeScalar, - description: 'Indicates when the mitigating action was documented.', - }, - _date: { - type: require('./element.schema'), - description: 'Indicates when the mitigating action was documented.', - }, - author: { - type: require('./reference.schema'), + name: 'DetectedIssuemitigation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action + action: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Indicates when the mitigating action was documented.', + }, + date: { + type: DateTimeScalar, + description: 'Indicates when the mitigating action was documented.', + }, + author: { + type: new GraphQLUnionType({ + name: 'DetectedIssuemitigationauthor_author_Union', description: 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/device.schema.js b/src/resources/1_0_2/schemas/device.schema.js index 638f1efc..57a63ed2 100644 --- a/src/resources/1_0_2/schemas/device.schema.js +++ b/src/resources/1_0_2/schemas/device.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceResourceType = new GraphQLEnumType({ - name: 'DeviceResourceType', - values: { - Device: { value: 'Device' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,128 +17,214 @@ let DeviceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Device', - description: 'Base StructureDefinition for Device Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.', - }, - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Code or identifier to identify a kind of device.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Descriptive information, usage information or implantation information that is not captured in an existing element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/devicestatus - status: { - type: CodeScalar, - description: 'Status of the Device availability.', - }, - _status: { - type: require('./element.schema'), - description: 'Status of the Device availability.', - }, - manufacturer: { - type: GraphQLString, - description: 'A name of the manufacturer.', - }, - _manufacturer: { - type: require('./element.schema'), - description: 'A name of the manufacturer.', - }, - model: { - type: GraphQLString, - description: - "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", - }, - _model: { - type: require('./element.schema'), - description: - "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", - }, - version: { - type: GraphQLString, - description: - 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', - }, - manufactureDate: { - type: DateTimeScalar, - description: 'The date and time when the device was manufactured.', - }, - _manufactureDate: { - type: require('./element.schema'), - description: 'The date and time when the device was manufactured.', - }, - expiry: { - type: DateTimeScalar, - description: - 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', - }, - _expiry: { - type: require('./element.schema'), - description: - 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', - }, - udi: { - type: GraphQLString, - description: - 'United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.', - }, - _udi: { - type: require('./element.schema'), - description: - 'United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.', - }, - lotNumber: { - type: GraphQLString, - description: 'Lot number assigned by the manufacturer.', - }, - _lotNumber: { - type: require('./element.schema'), - description: 'Lot number assigned by the manufacturer.', - }, - owner: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Device Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Device_Enum_schema', + values: { Device: { value: 'Device' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Code or identifier to identify a kind of device.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Descriptive information, usage information or implantation information that is not captured in an existing element.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Status of the Device availability.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/devicestatus + status: { + type: CodeScalar, + description: 'Status of the Device availability.', + }, + _manufacturer: { + type: require('./element.schema.js'), + description: 'A name of the manufacturer.', + }, + manufacturer: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + _model: { + type: require('./element.schema.js'), + description: + "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", + }, + model: { + type: GraphQLString, + description: + "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', + }, + version: { + type: GraphQLString, + description: + 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', + }, + _manufactureDate: { + type: require('./element.schema.js'), + description: 'The date and time when the device was manufactured.', + }, + manufactureDate: { + type: DateTimeScalar, + description: 'The date and time when the device was manufactured.', + }, + _expiry: { + type: require('./element.schema.js'), + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + expiry: { + type: DateTimeScalar, + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + _udi: { + type: require('./element.schema.js'), + description: + 'United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.', + }, + udi: { + type: GraphQLString, + description: + 'United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.', + }, + _lotNumber: { + type: require('./element.schema.js'), + description: 'Lot number assigned by the manufacturer.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number assigned by the manufacturer.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'Deviceowner_owner_Union', description: 'An organization that is responsible for the provision and ongoing maintenance of the device.', - }, - location: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Devicelocation_location_Union', description: 'The place where the device can be found.', - }, - patient: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The place where the device can be found.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'Devicepatient_patient_Union', description: 'Patient information, if the resource is affixed to a person.', - }, - contact: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for an organization or a particular human that is responsible for the device.', - }, - url: { - type: UriScalar, - description: - 'A network address on which the device may be contacted directly.', - }, - _url: { - type: require('./element.schema'), - description: - 'A network address on which the device may be contacted directly.', - }, - }), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'Patient information, if the resource is affixed to a person.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for an organization or a particular human that is responsible for the device.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'A network address on which the device may be contacted directly.', + }, + url: { + type: UriScalar, + description: + 'A network address on which the device may be contacted directly.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/devicecomponent.schema.js b/src/resources/1_0_2/schemas/devicecomponent.schema.js index d9e0de1b..b451acf7 100644 --- a/src/resources/1_0_2/schemas/devicecomponent.schema.js +++ b/src/resources/1_0_2/schemas/devicecomponent.schema.js @@ -1,21 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceComponentResourceType = new GraphQLEnumType({ - name: 'DeviceComponentResourceType', - values: { - DeviceComponent: { value: 'DeviceComponent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,75 +16,152 @@ let DeviceComponentResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DeviceComponent', - description: 'Base StructureDefinition for DeviceComponent Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceComponentResourceType), - description: 'Type of this resource.', - }, - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Describes the specific component type as defined in the object-oriented or metric nomenclature partition.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: - 'Describes the local assigned unique identification by the software. For example: handle ID.', - }, - lastSystemChange: { - type: new GraphQLNonNull(InstantScalar), - description: - 'Describes the timestamp for the most recent system change which includes device configuration or setting change.', - }, - _lastSystemChange: { - type: require('./element.schema'), - description: - 'Describes the timestamp for the most recent system change which includes device configuration or setting change.', - }, - source: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DeviceComponent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceComponent_Enum_schema', + values: { DeviceComponent: { value: 'DeviceComponent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Describes the specific component type as defined in the object-oriented or metric nomenclature partition.', + }, + identifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: + 'Describes the local assigned unique identification by the software. For example: handle ID.', + }, + _lastSystemChange: { + type: require('./element.schema.js'), + description: + 'Describes the timestamp for the most recent system change which includes device configuration or setting change.', + }, + lastSystemChange: { + type: new GraphQLNonNull(InstantScalar), + description: + 'Describes the timestamp for the most recent system change which includes device configuration or setting change.', + }, + source: { + type: new GraphQLUnionType({ + name: 'DeviceComponentsource_source_Union', description: 'Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.', - }, - parent: { - type: require('./reference.schema'), + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Describes the link to the source Device that contains administrative device information such as manufacture, serial number, etc.', + }, + parent: { + type: new GraphQLUnionType({ + name: 'DeviceComponentparent_parent_Union', description: 'Describes the link to the parent resource. For example: Channel is linked to its VMD parent.', - }, - operationalStatus: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Indicates current operational status of the device. For example: On, Off, Standby, etc.', - }, - parameterGroup: { - type: require('./codeableconcept.schema'), - description: - 'Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measurement-principle - measurementPrinciple: { - type: CodeScalar, - description: - 'Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', - }, - _measurementPrinciple: { - type: require('./element.schema'), - description: - 'Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', - }, - productionSpecification: { - type: new GraphQLList( - require('./devicecomponentproductionspecification.schema'), - ), - description: - 'Describes the production specification such as component revision, serial number, etc.', - }, - languageCode: { - type: require('./codeableconcept.schema'), - description: - 'Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.', - }, - }), + types: () => [require('./devicecomponent.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DeviceComponent') { + return require('./devicecomponent.schema.js'); + } + }, + }), + description: + 'Describes the link to the parent resource. For example: Channel is linked to its VMD parent.', + }, + operationalStatus: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates current operational status of the device. For example: On, Off, Standby, etc.', + }, + parameterGroup: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.', + }, + _measurementPrinciple: { + type: require('./element.schema.js'), + description: + 'Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measurement-principle + measurementPrinciple: { + type: CodeScalar, + description: + 'Describes the physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', + }, + productionSpecification: { + type: new GraphQLList( + require('./devicecomponentproductionspecification.schema.js'), + ), + description: + 'Describes the production specification such as component revision, serial number, etc.', + }, + languageCode: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/devicecomponentproductionspecification.schema.js b/src/resources/1_0_2/schemas/devicecomponentproductionspecification.schema.js index 23ff4c4f..878974cd 100644 --- a/src/resources/1_0_2/schemas/devicecomponentproductionspecification.schema.js +++ b/src/resources/1_0_2/schemas/devicecomponentproductionspecification.schema.js @@ -1,34 +1,51 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DeviceComponent.productionSpecification Schema + * @summary DeviceComponentproductionSpecification Schema */ module.exports = new GraphQLObjectType({ - name: 'DeviceComponentProductionSpecification', - description: - 'Describes the production specification such as component revision, serial number, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - specType: { - type: require('./codeableconcept.schema'), - description: - 'Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.', - }, - componentId: { - type: require('./identifier.schema'), - description: - 'Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.', - }, - productionSpec: { - type: GraphQLString, - description: 'Describes the printable string defining the component.', - }, - _productionSpec: { - type: require('./element.schema'), - description: 'Describes the printable string defining the component.', - }, - }), + name: 'DeviceComponentproductionSpecification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + specType: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the specification type, such as, serial number, part number, hardware revision, software revision, etc.', + }, + componentId: { + type: require('./identifier.schema.js'), + description: + 'Describes the internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacture can make use of.', + }, + _productionSpec: { + type: require('./element.schema.js'), + description: 'Describes the printable string defining the component.', + }, + productionSpec: { + type: GraphQLString, + description: 'Describes the printable string defining the component.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/devicemetric.schema.js b/src/resources/1_0_2/schemas/devicemetric.schema.js index c9876e16..8f62d8b2 100644 --- a/src/resources/1_0_2/schemas/devicemetric.schema.js +++ b/src/resources/1_0_2/schemas/devicemetric.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceMetricResourceType = new GraphQLEnumType({ - name: 'DeviceMetricResourceType', - values: { - DeviceMetric: { value: 'DeviceMetric' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,80 +15,157 @@ let DeviceMetricResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DeviceMetric', - description: 'Base StructureDefinition for DeviceMetric Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceMetricResourceType), - description: 'Type of this resource.', - }, - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: - 'Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.', - }, - unit: { - type: require('./codeableconcept.schema'), - description: - 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', - }, - source: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DeviceMetric Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceMetric_Enum_schema', + values: { DeviceMetric: { value: 'DeviceMetric' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', + }, + identifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: + 'Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.', + }, + unit: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', + }, + source: { + type: new GraphQLUnionType({ + name: 'DeviceMetricsource_source_Union', description: 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.', - }, - parent: { - type: require('./reference.schema'), + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacture, serial number, etc.', + }, + parent: { + type: new GraphQLUnionType({ + name: 'DeviceMetricparent_parent_Union', description: 'Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-operational-status - operationalStatus: { - type: CodeScalar, - description: - 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', - }, - _operationalStatus: { - type: require('./element.schema'), - description: - 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-color - color: { - type: CodeScalar, - description: - 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', - }, - _color: { - type: require('./element.schema'), - description: - 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-category - category: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', - }, - _category: { - type: require('./element.schema'), - description: - 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', - }, - measurementPeriod: { - type: require('./timing.schema'), - description: - 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', - }, - calibration: { - type: new GraphQLList(require('./devicemetriccalibration.schema')), - description: - 'Describes the calibrations that have been performed or that are required to be performed.', - }, - }), + types: () => [require('./devicecomponent.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DeviceComponent') { + return require('./devicecomponent.schema.js'); + } + }, + }), + description: + 'Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', + }, + _operationalStatus: { + type: require('./element.schema.js'), + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-operational-status + operationalStatus: { + type: CodeScalar, + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + _color: { + type: require('./element.schema.js'), + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-color + color: { + type: CodeScalar, + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + _category: { + type: require('./element.schema.js'), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-category + category: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + measurementPeriod: { + type: require('./timing.schema.js'), + description: + 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', + }, + calibration: { + type: new GraphQLList(require('./devicemetriccalibration.schema.js')), + description: + 'Describes the calibrations that have been performed or that are required to be performed.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/devicemetriccalibration.schema.js b/src/resources/1_0_2/schemas/devicemetriccalibration.schema.js index 38834c65..8c0611c0 100644 --- a/src/resources/1_0_2/schemas/devicemetriccalibration.schema.js +++ b/src/resources/1_0_2/schemas/devicemetriccalibration.schema.js @@ -1,44 +1,61 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary DeviceMetric.calibration Schema + * @summary DeviceMetriccalibration Schema */ module.exports = new GraphQLObjectType({ - name: 'DeviceMetricCalibration', - description: - 'Describes the calibrations that have been performed or that are required to be performed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-type - type: { - type: CodeScalar, - description: 'Describes the type of the calibration method.', - }, - _type: { - type: require('./element.schema'), - description: 'Describes the type of the calibration method.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-state - state: { - type: CodeScalar, - description: 'Describes the state of the calibration.', - }, - _state: { - type: require('./element.schema'), - description: 'Describes the state of the calibration.', - }, - time: { - type: InstantScalar, - description: 'Describes the time last calibration has been performed.', - }, - _time: { - type: require('./element.schema'), - description: 'Describes the time last calibration has been performed.', - }, - }), + name: 'DeviceMetriccalibration', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Describes the type of the calibration method.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-type + type: { + type: CodeScalar, + description: 'Describes the type of the calibration method.', + }, + _state: { + type: require('./element.schema.js'), + description: 'Describes the state of the calibration.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-state + state: { + type: CodeScalar, + description: 'Describes the state of the calibration.', + }, + _time: { + type: require('./element.schema.js'), + description: 'Describes the time last calibration has been performed.', + }, + time: { + type: InstantScalar, + description: 'Describes the time last calibration has been performed.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/deviceuserequest.schema.js b/src/resources/1_0_2/schemas/deviceuserequest.schema.js index 4770c333..7b654ec9 100644 --- a/src/resources/1_0_2/schemas/deviceuserequest.schema.js +++ b/src/resources/1_0_2/schemas/deviceuserequest.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceUseRequestResourceType = new GraphQLEnumType({ - name: 'DeviceUseRequestResourceType', - values: { - DeviceUseRequest: { value: 'DeviceUseRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,115 +17,214 @@ let DeviceUseRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DeviceUseRequest', - description: 'Base StructureDefinition for DeviceUseRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceUseRequestResourceType), - description: 'Type of this resource.', - }, - bodySiteCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", - }, - bodySiteReference: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DeviceUseRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceUseRequest_Enum_schema', + values: { DeviceUseRequest: { value: 'DeviceUseRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + bodySiteCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", + }, + bodySiteReference: { + type: new GraphQLUnionType({ + name: 'DeviceUseRequestbodySiteReference_bodySiteReference_Union', description: "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-use-request-status - status: { - type: CodeScalar, - description: 'The status of the request.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the request.', - }, - device: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The details of the device to be used.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./bodysite.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'BodySite') { + return require('./bodysite.schema.js'); + } + }, + }), + description: + "Indicates the site on the subject's body where the device should be used ( i.e. the target site).", + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-use-request-status + status: { + type: CodeScalar, + description: 'The status of the request.', + }, + device: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceUseRequestdevice_device_Union', + description: 'The details of the device to be used.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The details of the device to be used.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'DeviceUseRequestencounter_encounter_Union', description: 'An encounter that provides additional context in which this request is made.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order by the orderer or by the receiver.', - }, - indication: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reason or justification for the use of this device.', - }, - notes: { - type: new GraphQLList(GraphQLString), - description: - 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - _notes: { - type: require('./element.schema'), - description: - 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - prnReason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', - }, - orderedOn: { - type: DateTimeScalar, - description: 'The time when the request was made.', - }, - _orderedOn: { - type: require('./element.schema'), - description: 'The time when the request was made.', - }, - recordedOn: { - type: DateTimeScalar, - description: 'The time at which the request was made/recorded.', - }, - _recordedOn: { - type: require('./element.schema'), - description: 'The time at which the request was made/recorded.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient who will use the device.', - }, - timingTiming: { - type: require('./timing.schema'), - description: - "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - timingPeriod: { - type: require('./period.schema'), - description: - "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - timingDateTime: { - type: DateTimeScalar, - description: - "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - _timingDateTime: { - type: require('./element.schema'), - description: - "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-use-request-priority - priority: { - type: CodeScalar, - description: - 'Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.', - }, - _priority: { - type: require('./element.schema'), - description: - 'Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'An encounter that provides additional context in which this request is made.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this order by the orderer or by the receiver.', + }, + indication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason or justification for the use of this device.', + }, + _notes: { + type: require('./element.schema.js'), + description: + 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + notes: { + type: new GraphQLList(GraphQLString), + description: + 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + prnReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', + }, + _orderedOn: { + type: require('./element.schema.js'), + description: 'The time when the request was made.', + }, + orderedOn: { + type: DateTimeScalar, + description: 'The time when the request was made.', + }, + _recordedOn: { + type: require('./element.schema.js'), + description: 'The time at which the request was made/recorded.', + }, + recordedOn: { + type: DateTimeScalar, + description: 'The time at which the request was made/recorded.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceUseRequestsubject_subject_Union', + description: 'The patient who will use the device.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient who will use the device.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: + "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + timingPeriod: { + type: require('./period.schema.js'), + description: + "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: + "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + timingDateTime: { + type: DateTimeScalar, + description: + "The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-use-request-priority + priority: { + type: CodeScalar, + description: + 'Characterizes how quickly the use of device must be initiated. Includes concepts such as stat, urgent, routine.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/deviceusestatement.schema.js b/src/resources/1_0_2/schemas/deviceusestatement.schema.js index 571328df..669a947a 100644 --- a/src/resources/1_0_2/schemas/deviceusestatement.schema.js +++ b/src/resources/1_0_2/schemas/deviceusestatement.schema.js @@ -1,20 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceUseStatementResourceType = new GraphQLEnumType({ - name: 'DeviceUseStatementResourceType', - values: { - DeviceUseStatement: { value: 'DeviceUseStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,77 +17,165 @@ let DeviceUseStatementResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DeviceUseStatement', - description: 'Base StructureDefinition for DeviceUseStatement Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceUseStatementResourceType), - description: 'Type of this resource.', - }, - bodySiteCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - "Indicates the site on the subject's body where the device was used ( i.e. the target site).", - }, - bodySiteReference: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DeviceUseStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceUseStatement_Enum_schema', + values: { DeviceUseStatement: { value: 'DeviceUseStatement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + bodySiteCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the site on the subject's body where the device was used ( i.e. the target site).", + }, + bodySiteReference: { + type: new GraphQLUnionType({ + name: 'DeviceUseStatementbodySiteReference_bodySiteReference_Union', description: "Indicates the site on the subject's body where the device was used ( i.e. the target site).", - }, - whenUsed: { - type: require('./period.schema'), - description: 'The time period over which the device was used.', - }, - device: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The details of the device used.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'An external identifier for this statement such as an IRI.', - }, - indication: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reason or justification for the use of the device.', - }, - notes: { - type: new GraphQLList(GraphQLString), - description: - 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - _notes: { - type: require('./element.schema'), - description: - 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - recordedOn: { - type: DateTimeScalar, - description: 'The time at which the statement was made/recorded.', - }, - _recordedOn: { - type: require('./element.schema'), - description: 'The time at which the statement was made/recorded.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient who used the device.', - }, - timingTiming: { - type: require('./timing.schema'), - description: 'How often the device was used.', - }, - timingPeriod: { - type: require('./period.schema'), - description: 'How often the device was used.', - }, - timingDateTime: { - type: DateTimeScalar, - description: 'How often the device was used.', - }, - _timingDateTime: { - type: require('./element.schema'), - description: 'How often the device was used.', - }, - }), + types: () => [require('./bodysite.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'BodySite') { + return require('./bodysite.schema.js'); + } + }, + }), + description: + "Indicates the site on the subject's body where the device was used ( i.e. the target site).", + }, + whenUsed: { + type: require('./period.schema.js'), + description: 'The time period over which the device was used.', + }, + device: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceUseStatementdevice_device_Union', + description: 'The details of the device used.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The details of the device used.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'An external identifier for this statement such as an IRI.', + }, + indication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason or justification for the use of the device.', + }, + _notes: { + type: require('./element.schema.js'), + description: + 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + notes: { + type: new GraphQLList(GraphQLString), + description: + 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + _recordedOn: { + type: require('./element.schema.js'), + description: 'The time at which the statement was made/recorded.', + }, + recordedOn: { + type: DateTimeScalar, + description: 'The time at which the statement was made/recorded.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceUseStatementsubject_subject_Union', + description: 'The patient who used the device.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient who used the device.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: 'How often the device was used.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: 'How often the device was used.', + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: 'How often the device was used.', + }, + timingDateTime: { + type: DateTimeScalar, + description: 'How often the device was used.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/diagnosticorder.schema.js b/src/resources/1_0_2/schemas/diagnosticorder.schema.js index ec73ba1a..3bc1d18f 100644 --- a/src/resources/1_0_2/schemas/diagnosticorder.schema.js +++ b/src/resources/1_0_2/schemas/diagnosticorder.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DiagnosticOrderResourceType = new GraphQLEnumType({ - name: 'DiagnosticOrderResourceType', - values: { - DiagnosticOrder: { value: 'DiagnosticOrder' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,81 +15,219 @@ let DiagnosticOrderResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DiagnosticOrder', - description: 'Base StructureDefinition for DiagnosticOrder Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DiagnosticOrderResourceType), - description: 'Type of this resource.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', - }, - orderer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DiagnosticOrder Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DiagnosticOrder_Enum_schema', + values: { DiagnosticOrder: { value: 'DiagnosticOrder' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DiagnosticOrdersubject_subject_Union', + description: + 'Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + }, + orderer: { + type: new GraphQLUnionType({ + name: 'DiagnosticOrderorderer_orderer_Union', description: 'The practitioner that holds legal responsibility for ordering the investigation.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner that holds legal responsibility for ordering the investigation.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'DiagnosticOrderencounter_encounter_Union', description: 'An encounter that provides additional information about the healthcare context in which this request is made.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.', - }, - specimen: { - type: new GraphQLList(require('./reference.schema')), - description: - 'One or more specimens that the diagnostic investigation is about.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status - status: { - type: CodeScalar, - description: 'The status of the order.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority - priority: { - type: CodeScalar, - description: 'The clinical priority associated with this order.', - }, - _priority: { - type: require('./element.schema'), - description: 'The clinical priority associated with this order.', - }, - event: { - type: new GraphQLList(require('./diagnosticorderevent.schema')), - description: - 'A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.', - }, - item: { - type: new GraphQLList(require('./diagnosticorderitem.schema')), - description: - 'The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - "Any other notes associated with this patient, specimen or order (e.g. 'patient hates needles').", - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'DiagnosticOrdersupportingInformation_supportingInformation_Union', + description: + 'Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.', + types: () => [ + require('./observation.schema.js'), + require('./condition.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.', + }, + specimen: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticOrderspecimen_specimen_Union', + description: + 'One or more specimens that the diagnostic investigation is about.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'One or more specimens that the diagnostic investigation is about.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status + status: { + type: CodeScalar, + description: 'The status of the order.', + }, + _priority: { + type: require('./element.schema.js'), + description: 'The clinical priority associated with this order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority + priority: { + type: CodeScalar, + description: 'The clinical priority associated with this order.', + }, + event: { + type: new GraphQLList(require('./diagnosticorderevent.schema.js')), + description: + 'A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.', + }, + item: { + type: new GraphQLList(require('./diagnosticorderitem.schema.js')), + description: + 'The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + "Any other notes associated with this patient, specimen or order (e.g. 'patient hates needles').", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/diagnosticorderevent.schema.js b/src/resources/1_0_2/schemas/diagnosticorderevent.schema.js index 46dd0941..a68936a1 100644 --- a/src/resources/1_0_2/schemas/diagnosticorderevent.schema.js +++ b/src/resources/1_0_2/schemas/diagnosticorderevent.schema.js @@ -1,46 +1,84 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary DiagnosticOrder.event Schema + * @summary DiagnosticOrderevent Schema */ module.exports = new GraphQLObjectType({ - name: 'DiagnosticOrderEvent', - description: - 'A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status for the event.', - }, - _status: { - type: require('./element.schema'), - description: 'The status for the event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-event - description: { - type: require('./codeableconcept.schema'), - description: - 'Additional information about the event that occurred - e.g. if the status remained unchanged.', - }, - dateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The date/time at which the event occurred.', - }, - _dateTime: { - type: require('./element.schema'), - description: 'The date/time at which the event occurred.', - }, - actor: { - type: require('./reference.schema'), + name: 'DiagnosticOrderevent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status for the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status for the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-event + description: { + type: require('./codeableconcept.schema.js'), + description: + 'Additional information about the event that occurred - e.g. if the status remained unchanged.', + }, + _dateTime: { + type: require('./element.schema.js'), + description: 'The date/time at which the event occurred.', + }, + dateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date/time at which the event occurred.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'DiagnosticOrdereventactor_actor_Union', description: 'The person responsible for performing or recording the action.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The person responsible for performing or recording the action.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/diagnosticorderitem.schema.js b/src/resources/1_0_2/schemas/diagnosticorderitem.schema.js index 3e58130a..72f528a8 100644 --- a/src/resources/1_0_2/schemas/diagnosticorderitem.schema.js +++ b/src/resources/1_0_2/schemas/diagnosticorderitem.schema.js @@ -1,42 +1,75 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary DiagnosticOrder.item Schema + * @summary DiagnosticOrderitem Schema */ module.exports = new GraphQLObjectType({ - name: 'DiagnosticOrderItem', - description: - 'The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-requests - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.', - }, - specimen: { - type: new GraphQLList(require('./reference.schema')), - description: 'If the item is related to a specific specimen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.schema'), - description: - 'Anatomical location where the request test should be performed. This is the target site.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status - status: { - type: CodeScalar, - description: 'The status of this individual item within the order.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of this individual item within the order.', - }, - }), + name: 'DiagnosticOrderitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-requests + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code that identifies a particular diagnostic investigation, or panel of investigations, that have been requested.', + }, + specimen: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticOrderitemspecimen_specimen_Union', + description: 'If the item is related to a specific specimen.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: 'If the item is related to a specific specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + 'Anatomical location where the request test should be performed. This is the target site.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this individual item within the order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-status + status: { + type: CodeScalar, + description: 'The status of this individual item within the order.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/diagnosticreport.schema.js b/src/resources/1_0_2/schemas/diagnosticreport.schema.js index 0bce420f..ded9184b 100644 --- a/src/resources/1_0_2/schemas/diagnosticreport.schema.js +++ b/src/resources/1_0_2/schemas/diagnosticreport.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DiagnosticReportResourceType = new GraphQLEnumType({ - name: 'DiagnosticReportResourceType', - values: { - DiagnosticReport: { value: 'DiagnosticReport' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,121 +18,295 @@ let DiagnosticReportResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DiagnosticReport', - description: 'Base StructureDefinition for DiagnosticReport Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DiagnosticReportResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-report-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the diagnostic report as a whole.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the diagnostic report as a whole.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-service-sections - category: { - type: require('./codeableconcept.schema'), - description: - 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'A code or name that describes this diagnostic report.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', - }, - encounter: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DiagnosticReport Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DiagnosticReport_Enum_schema', + values: { DiagnosticReport: { value: 'DiagnosticReport' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the diagnostic report as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-report-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the diagnostic report as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-service-sections + category: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code or name that describes this diagnostic report.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DiagnosticReportsubject_subject_Union', + description: + 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'DiagnosticReportencounter_encounter_Union', description: 'The link to the health care event (encounter) when the order was made.', - }, - effectiveDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - _effectiveDateTime: { - type: require('./element.schema'), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - effectivePeriod: { - type: new GraphQLNonNull(require('./period.schema')), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - issued: { - type: new GraphQLNonNull(InstantScalar), - description: - 'The date and time that this version of the report was released from the source diagnostic service.', - }, - _issued: { - type: require('./element.schema'), - description: - 'The date and time that this version of the report was released from the source diagnostic service.', - }, - performer: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The diagnostic service that is responsible for issuing the report.', - }, - request: { - type: new GraphQLList(require('./reference.schema')), - description: 'Details concerning a test or procedure requested.', - }, - specimen: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Details about the specimens on which this diagnostic report is based.', - }, - result: { - type: new GraphQLList(require('./reference.schema')), - description: - "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", - }, - imagingStudy: { - type: new GraphQLList(require('./reference.schema')), - description: - 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', - }, - image: { - type: new GraphQLList(require('./diagnosticreportimage.schema')), - description: - 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', - }, - conclusion: { - type: GraphQLString, - description: - 'Concise and clinically contextualized narrative interpretation of the diagnostic report.', - }, - _conclusion: { - type: require('./element.schema'), - description: - 'Concise and clinically contextualized narrative interpretation of the diagnostic report.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - codedDiagnosis: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Codes for the conclusion.', - }, - presentedForm: { - type: new GraphQLList(require('./attachment.schema')), - description: - 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The link to the health care event (encounter) when the order was made.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectiveDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectivePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + _issued: { + type: require('./element.schema.js'), + description: + 'The date and time that this version of the report was released from the source diagnostic service.', + }, + issued: { + type: new GraphQLNonNull(InstantScalar), + description: + 'The date and time that this version of the report was released from the source diagnostic service.', + }, + performer: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DiagnosticReportperformer_performer_Union', + description: + 'The diagnostic service that is responsible for issuing the report.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The diagnostic service that is responsible for issuing the report.', + }, + request: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportrequest_request_Union', + description: 'Details concerning a test or procedure requested.', + types: () => [ + require('./diagnosticorder.schema.js'), + require('./procedurerequest.schema.js'), + require('./referralrequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'DiagnosticOrder') { + return require('./diagnosticorder.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: 'Details concerning a test or procedure requested.', + }, + specimen: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportspecimen_specimen_Union', + description: + 'Details about the specimens on which this diagnostic report is based.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'Details about the specimens on which this diagnostic report is based.', + }, + result: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportresult_result_Union', + description: + "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", + }, + imagingStudy: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportimagingStudy_imagingStudy_Union', + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + types: () => [ + require('./imagingstudy.schema.js'), + require('./imagingobjectselection.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + if (data && data.resourceType === 'ImagingObjectSelection') { + return require('./imagingobjectselection.schema.js'); + } + }, + }), + ), + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + }, + image: { + type: new GraphQLList(require('./diagnosticreportimage.schema.js')), + description: + 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', + }, + _conclusion: { + type: require('./element.schema.js'), + description: + 'Concise and clinically contextualized narrative interpretation of the diagnostic report.', + }, + conclusion: { + type: GraphQLString, + description: + 'Concise and clinically contextualized narrative interpretation of the diagnostic report.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + codedDiagnosis: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Codes for the conclusion.', + }, + presentedForm: { + type: new GraphQLList(require('./attachment.schema.js')), + description: + 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/diagnosticreportimage.schema.js b/src/resources/1_0_2/schemas/diagnosticreportimage.schema.js index 73cad088..95f7c360 100644 --- a/src/resources/1_0_2/schemas/diagnosticreportimage.schema.js +++ b/src/resources/1_0_2/schemas/diagnosticreportimage.schema.js @@ -1,30 +1,64 @@ -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DiagnosticReport.image Schema + * @summary DiagnosticReportimage Schema */ module.exports = new GraphQLObjectType({ - name: 'DiagnosticReportImage', - description: - 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - comment: { - type: GraphQLString, - description: - "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", - }, - _comment: { - type: require('./element.schema'), - description: - "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", - }, - link: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Reference to the image source.', - }, - }), + name: 'DiagnosticReportimage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _comment: { + type: require('./element.schema.js'), + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + comment: { + type: GraphQLString, + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + link: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DiagnosticReportimagelink_link_Union', + description: 'Reference to the image source.', + types: () => [require('./media.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + }, + }), + ), + description: 'Reference to the image source.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/distance.schema.js b/src/resources/1_0_2/schemas/distance.schema.js index 060b9f9d..35e4a4df 100644 --- a/src/resources/1_0_2/schemas/distance.schema.js +++ b/src/resources/1_0_2/schemas/distance.schema.js @@ -1,13 +1,11 @@ const { GraphQLObjectType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Distance Schema */ module.exports = new GraphQLObjectType({ name: 'Distance', - description: 'A measure of distance.', - fields: () => extendSchema(require('./quantity.schema')), + description: 'A measure of distance', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/schemas/documentmanifest.schema.js b/src/resources/1_0_2/schemas/documentmanifest.schema.js index 3d045bbb..68be0793 100644 --- a/src/resources/1_0_2/schemas/documentmanifest.schema.js +++ b/src/resources/1_0_2/schemas/documentmanifest.schema.js @@ -1,22 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DocumentManifestResourceType = new GraphQLEnumType({ - name: 'DocumentManifestResourceType', - values: { - DocumentManifest: { value: 'DocumentManifest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,93 +17,230 @@ let DocumentManifestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DocumentManifest', - description: 'Base StructureDefinition for DocumentManifest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DocumentManifestResourceType), - description: 'Type of this resource.', - }, - masterIdentifier: { - type: require('./identifier.schema'), - description: - 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Other identifiers associated with the document manifest, including version independent identifiers.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DocumentManifest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentManifest_Enum_schema', + values: { DocumentManifest: { value: 'DocumentManifest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + masterIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Other identifiers associated with the document manifest, including version independent identifiers.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'DocumentManifestsubject_subject_Union', description: 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A patient, practitioner, or organization for which this set of documents is intended.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - type: { - type: require('./codeableconcept.schema'), - description: - 'Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.', - }, - author: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies who is responsible for creating the manifest, and adding documents to it.', - }, - created: { - type: DateTimeScalar, - description: - 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', - }, - _created: { - type: require('./element.schema'), - description: - 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', - }, - source: { - type: UriScalar, - description: - 'Identifies the source system, application, or software that produced the document manifest.', - }, - _source: { - type: require('./element.schema'), - description: - 'Identifies the source system, application, or software that produced the document manifest.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of this document manifest.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of this document manifest.', - }, - description: { - type: GraphQLString, - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - _description: { - type: require('./element.schema'), - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - content: { - type: new GraphQLList( - new GraphQLNonNull(require('./documentmanifestcontent.schema')), - ), - description: 'The list of Documents included in the manifest.', - }, - related: { - type: new GraphQLList(require('./documentmanifestrelated.schema')), - description: - 'Related identifiers or resources associated with the DocumentManifest.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentManifestrecipient_recipient_Union', + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentManifestauthor_author_Union', + description: + 'Identifies who is responsible for creating the manifest, and adding documents to it.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'Identifies who is responsible for creating the manifest, and adding documents to it.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + created: { + type: DateTimeScalar, + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + _source: { + type: require('./element.schema.js'), + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + source: { + type: UriScalar, + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this document manifest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document manifest.', + }, + _description: { + type: require('./element.schema.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentmanifestcontent.schema.js')), + ), + description: 'The list of Documents included in the manifest.', + }, + related: { + type: new GraphQLList(require('./documentmanifestrelated.schema.js')), + description: + 'Related identifiers or resources associated with the DocumentManifest.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/documentmanifestcontent.schema.js b/src/resources/1_0_2/schemas/documentmanifestcontent.schema.js index 0d343265..5356840a 100644 --- a/src/resources/1_0_2/schemas/documentmanifestcontent.schema.js +++ b/src/resources/1_0_2/schemas/documentmanifestcontent.schema.js @@ -1,25 +1,60 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentManifest.content Schema + * @summary DocumentManifestcontent Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentManifestContent', - description: 'The list of Documents included in the manifest.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - pAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', - }, - pReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', - }, - }), + name: 'DocumentManifestcontent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + pAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + }, + pReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DocumentManifestcontentpReference_pReference_Union', + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/documentmanifestrelated.schema.js b/src/resources/1_0_2/schemas/documentmanifestrelated.schema.js index 7eb5744b..6e8be503 100644 --- a/src/resources/1_0_2/schemas/documentmanifestrelated.schema.js +++ b/src/resources/1_0_2/schemas/documentmanifestrelated.schema.js @@ -1,26 +1,53 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentManifest.related Schema + * @summary DocumentManifestrelated Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentManifestRelated', - description: - 'Related identifiers or resources associated with the DocumentManifest.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', - }, - ref: { - type: require('./reference.schema'), + name: 'DocumentManifestrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', + }, + ref: { + type: new GraphQLUnionType({ + name: 'DocumentManifestrelatedref_ref_Union', description: 'Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder, Procedure, EligibilityRequest, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/documentreference.schema.js b/src/resources/1_0_2/schemas/documentreference.schema.js index 44ceebc5..e0a86e37 100644 --- a/src/resources/1_0_2/schemas/documentreference.schema.js +++ b/src/resources/1_0_2/schemas/documentreference.schema.js @@ -1,22 +1,16 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DocumentReferenceResourceType = new GraphQLEnumType({ - name: 'DocumentReferenceResourceType', - values: { - DocumentReference: { value: 'DocumentReference' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,116 +18,253 @@ let DocumentReferenceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DocumentReference', - description: 'Base StructureDefinition for DocumentReference Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DocumentReferenceResourceType), - description: 'Type of this resource.', - }, - masterIdentifier: { - type: require('./identifier.schema'), - description: - 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Other identifiers associated with the document, including version independent identifiers.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DocumentReference Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentReference_Enum_schema', + values: { DocumentReference: { value: 'DocumentReference' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + masterIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Other identifiers associated with the document, including version independent identifiers.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'DocumentReferencesubject_subject_Union', description: 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-classcodes - class: { - type: require('./codeableconcept.schema'), - description: - 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', - }, - author: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies who is responsible for adding the information to the document.', - }, - custodian: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-classcodes + class: { + type: require('./codeableconcept.schema.js'), + description: + 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentReferenceauthor_author_Union', + description: + 'Identifies who is responsible for adding the information to the document.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'Identifies who is responsible for adding the information to the document.', + }, + custodian: { + type: new GraphQLUnionType({ + name: 'DocumentReferencecustodian_custodian_Union', description: 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', - }, - authenticator: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', + }, + authenticator: { + type: new GraphQLUnionType({ + name: 'DocumentReferenceauthenticator_authenticator_Union', description: 'Which person or organization authenticates that this document is valid.', - }, - created: { - type: DateTimeScalar, - description: 'When the document was created.', - }, - _created: { - type: require('./element.schema'), - description: 'When the document was created.', - }, - indexed: { - type: new GraphQLNonNull(InstantScalar), - description: 'When the document reference was created.', - }, - _indexed: { - type: require('./element.schema'), - description: 'When the document reference was created.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of this document reference.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of this document reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-status - docStatus: { - type: require('./codeableconcept.schema'), - description: 'The status of the underlying document.', - }, - relatesTo: { - type: new GraphQLList(require('./documentreferencerelatesto.schema')), - description: - 'Relationships that this document has with other document references that already exist.', - }, - description: { - type: GraphQLString, - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - _description: { - type: require('./element.schema'), - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", - }, - content: { - type: new GraphQLList( - new GraphQLNonNull(require('./documentreferencecontent.schema')), - ), - description: - 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', - }, - context: { - type: require('./documentreferencecontext.schema'), - description: 'The clinical context in which the document was prepared.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Which person or organization authenticates that this document is valid.', + }, + _created: { + type: require('./element.schema.js'), + description: 'When the document was created.', + }, + created: { + type: DateTimeScalar, + description: 'When the document was created.', + }, + _indexed: { + type: require('./element.schema.js'), + description: 'When the document reference was created.', + }, + indexed: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the document reference was created.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this document reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-status + docStatus: { + type: require('./codeableconcept.schema.js'), + description: 'The status of the underlying document.', + }, + relatesTo: { + type: new GraphQLList(require('./documentreferencerelatesto.schema.js')), + description: + 'Relationships that this document has with other document references that already exist.', + }, + _description: { + type: require('./element.schema.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentreferencecontent.schema.js')), + ), + description: + 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', + }, + context: { + type: require('./documentreferencecontext.schema.js'), + description: 'The clinical context in which the document was prepared.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/documentreferencecontent.schema.js b/src/resources/1_0_2/schemas/documentreferencecontent.schema.js index fe295914..8ef5c89a 100644 --- a/src/resources/1_0_2/schemas/documentreferencecontent.schema.js +++ b/src/resources/1_0_2/schemas/documentreferencecontent.schema.js @@ -1,27 +1,44 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentReference.content Schema + * @summary DocumentReferencecontent Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentReferenceContent', - description: - 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - attachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The document or url of the document along with critical metadata to prove content has integrity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/formatcodes - format: { - type: new GraphQLList(require('./coding.schema')), - description: - 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', - }, - }), + name: 'DocumentReferencecontent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + attachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The document or url of the document along with critical metadata to prove content has integrity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/formatcodes + format: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/documentreferencecontext.schema.js b/src/resources/1_0_2/schemas/documentreferencecontext.schema.js index 5f207216..c7018cda 100644 --- a/src/resources/1_0_2/schemas/documentreferencecontext.schema.js +++ b/src/resources/1_0_2/schemas/documentreferencecontext.schema.js @@ -1,54 +1,93 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentReference.context Schema + * @summary DocumentReferencecontext Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentReferenceContext', - description: 'The clinical context in which the document was prepared.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - encounter: { - type: require('./reference.schema'), + name: 'DocumentReferencecontext', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'DocumentReferencecontextencounter_encounter_Union', description: 'Describes the clinical encounter or type of care that the document content is associated with.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode - event: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", - }, - period: { - type: require('./period.schema'), - description: - 'The time period over which the service that is described by the document was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-facilitycodes - facilityType: { - type: require('./codeableconcept.schema'), - description: 'The kind of facility where the patient was seen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - practiceSetting: { - type: require('./codeableconcept.schema'), - description: - 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', - }, - sourcePatientInfo: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Describes the clinical encounter or type of care that the document content is associated with.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode + event: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.schema.js'), + description: + 'The time period over which the service that is described by the document was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-facilitycodes + facilityType: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of facility where the patient was seen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + practiceSetting: { + type: require('./codeableconcept.schema.js'), + description: + 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', + }, + sourcePatientInfo: { + type: new GraphQLUnionType({ + name: + 'DocumentReferencecontextsourcePatientInfo_sourcePatientInfo_Union', description: 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', - }, - related: { - type: new GraphQLList( - require('./documentreferencecontextrelated.schema'), - ), - description: - 'Related identifiers or resources associated with the DocumentReference.', - }, - }), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', + }, + related: { + type: new GraphQLList( + require('./documentreferencecontextrelated.schema.js'), + ), + description: + 'Related identifiers or resources associated with the DocumentReference.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/documentreferencecontextrelated.schema.js b/src/resources/1_0_2/schemas/documentreferencecontextrelated.schema.js index a6af4e15..525107dc 100644 --- a/src/resources/1_0_2/schemas/documentreferencecontextrelated.schema.js +++ b/src/resources/1_0_2/schemas/documentreferencecontextrelated.schema.js @@ -1,26 +1,53 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary DocumentReference.context.related Schema + * @summary DocumentReferencecontextrelated Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentReferenceContextRelated', - description: - 'Related identifiers or resources associated with the DocumentReference.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.', - }, - ref: { - type: require('./reference.schema'), + name: 'DocumentReferencecontextrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.', + }, + ref: { + type: new GraphQLUnionType({ + name: 'DocumentReferencecontextrelatedref_ref_Union', description: 'Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/documentreferencerelatesto.schema.js b/src/resources/1_0_2/schemas/documentreferencerelatesto.schema.js index c8e21bf7..ac84222d 100644 --- a/src/resources/1_0_2/schemas/documentreferencerelatesto.schema.js +++ b/src/resources/1_0_2/schemas/documentreferencerelatesto.schema.js @@ -1,32 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary DocumentReference.relatesTo Schema + * @summary DocumentReferencerelatesTo Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentReferenceRelatesTo', - description: - 'Relationships that this document has with other document references that already exist.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of relationship that this document has with anther document.', - }, - _code: { - type: require('./element.schema'), - description: - 'The type of relationship that this document has with anther document.', - }, - target: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The target document of this relationship.', - }, - }), + name: 'DocumentReferencerelatesTo', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The type of relationship that this document has with anther document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this document has with anther document.', + }, + target: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DocumentReferencerelatesTotarget_target_Union', + description: 'The target document of this relationship.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'The target document of this relationship.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/domainresource.schema.js b/src/resources/1_0_2/schemas/domainresource.schema.js index c1800b55..2be3f563 100644 --- a/src/resources/1_0_2/schemas/domainresource.schema.js +++ b/src/resources/1_0_2/schemas/domainresource.schema.js @@ -1,19 +1,13 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DomainResourceResourceType = new GraphQLEnumType({ - name: 'DomainResourceResourceType', - values: { - DomainResource: { value: 'DomainResource' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,32 +15,69 @@ let DomainResourceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DomainResource', - description: 'Base StructureDefinition for DomainResource Resource.', - fields: () => - extendSchema(require('./resource.schema'), { - resourceType: { - type: new GraphQLNonNull(DomainResourceResourceType), - description: 'Type of this resource.', - }, - text: { - type: require('./narrative.schema'), - 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(require('./resourcelist.schema')), - 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.schema')), - 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.schema')), - 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.', - }, - }), + description: 'Base StructureDefinition for DomainResource Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DomainResource_Enum_schema', + values: { DomainResource: { value: 'DomainResource' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/duration.schema.js b/src/resources/1_0_2/schemas/duration.schema.js index 3ac9950e..4dd4acc0 100644 --- a/src/resources/1_0_2/schemas/duration.schema.js +++ b/src/resources/1_0_2/schemas/duration.schema.js @@ -1,13 +1,11 @@ const { GraphQLObjectType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Duration Schema */ module.exports = new GraphQLObjectType({ name: 'Duration', - description: 'A length of time.', - fields: () => extendSchema(require('./quantity.schema')), + description: 'A length of time', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/schemas/element.schema.js b/src/resources/1_0_2/schemas/element.schema.js index 316c99ee..2e153854 100644 --- a/src/resources/1_0_2/schemas/element.schema.js +++ b/src/resources/1_0_2/schemas/element.schema.js @@ -1,7 +1,5 @@ -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -9,23 +7,22 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Element', - description: 'Base StructureDefinition for Element Type.', - fields: () => - extendSchema({ - id: { - type: IdScalar, - description: - 'unique id for the element within a resource (for internal references).', - }, - _id: { - type: require('./element.schema'), - description: - 'unique id for the element within a resource (for internal references).', - }, - extension: { - type: new GraphQLList(require('./extension.schema')), - description: - 'May be used to represent additional information that is not part of the basic definition of the element. 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.', - }, - }), + description: 'Base StructureDefinition for Element Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/elementdefinition.schema.js b/src/resources/1_0_2/schemas/elementdefinition.schema.js index 23500d3b..abf47dd0 100644 --- a/src/resources/1_0_2/schemas/elementdefinition.schema.js +++ b/src/resources/1_0_2/schemas/elementdefinition.schema.js @@ -1,25 +1,24 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, GraphQLInt, GraphQLBoolean, GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -27,1695 +26,1709 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'ElementDefinition', - description: 'Base StructureDefinition for ElementDefinition Type.', - fields: () => - extendSchema(require('./element.schema'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", - }, - _path: { - type: require('./element.schema'), - description: - "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/property-representation - representation: { - type: new GraphQLList(CodeScalar), - description: - 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', - }, - _representation: { - type: require('./element.schema'), - description: - 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', - }, - name: { - type: GraphQLString, - description: - 'The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.', - }, - label: { - type: GraphQLString, - description: - 'The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', - }, - _label: { - type: require('./element.schema'), - description: - 'The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A code that provides the meaning for the element according to a particular terminology.', - }, - slicing: { - type: require('./elementdefinitionslicing.schema'), - description: - 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', - }, - short: { - type: GraphQLString, - description: - 'A concise description of what this element means (e.g. for use in autogenerated summaries).', - }, - _short: { - type: require('./element.schema'), - description: - 'A concise description of what this element means (e.g. for use in autogenerated summaries).', - }, - definition: { - type: GraphQLString, - description: - 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', - }, - _definition: { - type: require('./element.schema'), - description: - 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', - }, - comments: { - type: GraphQLString, - description: - 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', - }, - _comments: { - type: require('./element.schema'), - description: - 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', - }, - requirements: { - type: GraphQLString, - description: - 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', - }, - _requirements: { - type: require('./element.schema'), - description: - 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', - }, - alias: { - type: new GraphQLList(GraphQLString), - description: - 'Identifies additional names by which this element might also be known.', - }, - _alias: { - type: require('./element.schema'), - description: - 'Identifies additional names by which this element might also be known.', - }, - min: { - type: GraphQLInt, - description: - 'The minimum number of times this element SHALL appear in the instance.', - }, - _min: { - type: require('./element.schema'), - description: - 'The minimum number of times this element SHALL appear in the instance.', - }, - max: { - type: GraphQLString, - description: - 'The maximum number of times this element is permitted to appear in the instance.', - }, - _max: { - type: require('./element.schema'), - description: - 'The maximum number of times this element is permitted to appear in the instance.', - }, - base: { - type: require('./elementdefinitionbase.schema'), - description: - 'Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.', - }, - type: { - type: new GraphQLList(require('./elementdefinitiontype.schema')), - description: - 'The data type or resource that the value of this element is permitted to be.', - }, - nameReference: { - type: GraphQLString, - description: - 'Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.', - }, - _nameReference: { - type: require('./element.schema'), - description: - 'Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.', - }, - defaultValueBoolean: { - type: GraphQLBoolean, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueBoolean: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueInteger: { - type: GraphQLInt, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueInteger: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDecimal: { - type: GraphQLFloat, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDecimal: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueBase64Binary: { - type: Base64BinaryScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueBase64Binary: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueInstant: { - type: InstantScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueInstant: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueString: { - type: GraphQLString, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueString: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueUri: { - type: UriScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueUri: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDate: { - type: DateScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDate: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDateTime: { - type: DateTimeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDateTime: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueTime: { - type: TimeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueTime: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCode: { - type: CodeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueCode: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueOid: { - type: OidScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueOid: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueId: { - type: IdScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueId: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueUnsignedInt: { - type: UnsignedIntScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueUnsignedInt: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValuePositiveInt: { - type: PositiveIntScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValuePositiveInt: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMarkdown: { - type: GraphQLString, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueMarkdown: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAnnotation: { - type: require('./annotation.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAttachment: { - type: require('./attachment.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueIdentifier: { - type: require('./identifier.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCoding: { - type: require('./coding.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueQuantity: { - type: require('./quantity.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueRange: { - type: require('./range.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValuePeriod: { - type: require('./period.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueRatio: { - type: require('./ratio.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueSampledData: { - type: require('./sampleddata.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueSignature: { - type: require('./signature.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueHumanName: { - type: require('./humanname.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAddress: { - type: require('./address.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueContactPoint: { - type: require('./contactpoint.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueTiming: { - type: require('./timing.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueReference: { - type: require('./reference.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMeta: { - type: require('./meta.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - meaningWhenMissing: { - type: GraphQLString, - description: - "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", - }, - _meaningWhenMissing: { - type: require('./element.schema'), - description: - "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", - }, - fixedBoolean: { - type: GraphQLBoolean, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedBoolean: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedInteger: { - type: GraphQLInt, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedInteger: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDecimal: { - type: GraphQLFloat, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDecimal: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedBase64Binary: { - type: Base64BinaryScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedBase64Binary: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedInstant: { - type: InstantScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedInstant: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedString: { - type: GraphQLString, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedString: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedUri: { - type: UriScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedUri: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDate: { - type: DateScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDate: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDateTime: { - type: DateTimeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDateTime: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedTime: { - type: TimeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedTime: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCode: { - type: CodeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedCode: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedOid: { - type: OidScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedOid: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedId: { - type: IdScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedId: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedUnsignedInt: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedPositiveInt: { - type: PositiveIntScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedPositiveInt: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMarkdown: { - type: GraphQLString, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedMarkdown: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAnnotation: { - type: require('./annotation.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAttachment: { - type: require('./attachment.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedIdentifier: { - type: require('./identifier.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCoding: { - type: require('./coding.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedQuantity: { - type: require('./quantity.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedRange: { - type: require('./range.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedPeriod: { - type: require('./period.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedRatio: { - type: require('./ratio.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedSampledData: { - type: require('./sampleddata.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedSignature: { - type: require('./signature.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedHumanName: { - type: require('./humanname.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAddress: { - type: require('./address.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedContactPoint: { - type: require('./contactpoint.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedTiming: { - type: require('./timing.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedReference: { - type: require('./reference.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMeta: { - type: require('./meta.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - patternBoolean: { - type: GraphQLBoolean, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternBoolean: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternInteger: { - type: GraphQLInt, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternInteger: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDecimal: { - type: GraphQLFloat, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDecimal: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternBase64Binary: { - type: Base64BinaryScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternBase64Binary: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternInstant: { - type: InstantScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternInstant: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternString: { - type: GraphQLString, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternString: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternUri: { - type: UriScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternUri: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDate: { - type: DateScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDate: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDateTime: { - type: DateTimeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDateTime: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternTime: { - type: TimeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternTime: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCode: { - type: CodeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternCode: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternOid: { - type: OidScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternOid: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternId: { - type: IdScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternId: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternUnsignedInt: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternPositiveInt: { - type: PositiveIntScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternPositiveInt: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMarkdown: { - type: GraphQLString, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternMarkdown: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAnnotation: { - type: require('./annotation.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAttachment: { - type: require('./attachment.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternIdentifier: { - type: require('./identifier.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCoding: { - type: require('./coding.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternQuantity: { - type: require('./quantity.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternRange: { - type: require('./range.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternPeriod: { - type: require('./period.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternRatio: { - type: require('./ratio.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternSampledData: { - type: require('./sampleddata.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternSignature: { - type: require('./signature.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternHumanName: { - type: require('./humanname.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAddress: { - type: require('./address.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternContactPoint: { - type: require('./contactpoint.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternTiming: { - type: require('./timing.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternReference: { - type: require('./reference.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMeta: { - type: require('./meta.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - exampleBoolean: { - type: GraphQLBoolean, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleBoolean: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleInteger: { - type: GraphQLInt, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleInteger: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleDecimal: { - type: GraphQLFloat, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleDecimal: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleBase64Binary: { - type: Base64BinaryScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleBase64Binary: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleInstant: { - type: InstantScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleInstant: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleString: { - type: GraphQLString, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleString: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleUri: { - type: UriScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleUri: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleDate: { - type: DateScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleDate: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleDateTime: { - type: DateTimeScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleDateTime: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleTime: { - type: TimeScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleTime: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleCode: { - type: CodeScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleCode: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleOid: { - type: OidScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleOid: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleId: { - type: IdScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleId: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleUnsignedInt: { - type: UnsignedIntScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleUnsignedInt: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - examplePositiveInt: { - type: PositiveIntScalar, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _examplePositiveInt: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleMarkdown: { - type: GraphQLString, - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - _exampleMarkdown: { - type: require('./element.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleAnnotation: { - type: require('./annotation.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleAttachment: { - type: require('./attachment.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleIdentifier: { - type: require('./identifier.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleCoding: { - type: require('./coding.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleQuantity: { - type: require('./quantity.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleRange: { - type: require('./range.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - examplePeriod: { - type: require('./period.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleRatio: { - type: require('./ratio.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleSampledData: { - type: require('./sampleddata.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleSignature: { - type: require('./signature.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleHumanName: { - type: require('./humanname.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleAddress: { - type: require('./address.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleContactPoint: { - type: require('./contactpoint.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleTiming: { - type: require('./timing.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleReference: { - type: require('./reference.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - exampleMeta: { - type: require('./meta.schema'), - description: - 'A sample value for this element demonstrating the type of information that would typically be captured.', - }, - minValueBoolean: { - type: GraphQLBoolean, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueBoolean: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueInteger: { - type: GraphQLInt, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueInteger: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDecimal: { - type: GraphQLFloat, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDecimal: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueBase64Binary: { - type: Base64BinaryScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueBase64Binary: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueInstant: { - type: InstantScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueInstant: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueString: { - type: GraphQLString, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueString: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueUri: { - type: UriScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueUri: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDate: { - type: DateScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDate: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDateTime: { - type: DateTimeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDateTime: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueTime: { - type: TimeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueTime: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueCode: { - type: CodeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueCode: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueOid: { - type: OidScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueOid: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueId: { - type: IdScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueId: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueUnsignedInt: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValuePositiveInt: { - type: PositiveIntScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValuePositiveInt: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueMarkdown: { - type: GraphQLString, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueMarkdown: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueAnnotation: { - type: require('./annotation.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueAttachment: { - type: require('./attachment.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueIdentifier: { - type: require('./identifier.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueCoding: { - type: require('./coding.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueQuantity: { - type: require('./quantity.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueRange: { - type: require('./range.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValuePeriod: { - type: require('./period.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueRatio: { - type: require('./ratio.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueSampledData: { - type: require('./sampleddata.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueSignature: { - type: require('./signature.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueHumanName: { - type: require('./humanname.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueAddress: { - type: require('./address.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueContactPoint: { - type: require('./contactpoint.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueTiming: { - type: require('./timing.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueReference: { - type: require('./reference.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueMeta: { - type: require('./meta.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueBoolean: { - type: GraphQLBoolean, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueBoolean: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueInteger: { - type: GraphQLInt, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueInteger: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDecimal: { - type: GraphQLFloat, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDecimal: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueBase64Binary: { - type: Base64BinaryScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueBase64Binary: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueInstant: { - type: InstantScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueInstant: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueString: { - type: GraphQLString, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueString: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueUri: { - type: UriScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueUri: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDate: { - type: DateScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDate: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDateTime: { - type: DateTimeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDateTime: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueTime: { - type: TimeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueTime: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueCode: { - type: CodeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueCode: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueOid: { - type: OidScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueOid: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueId: { - type: IdScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueId: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueUnsignedInt: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValuePositiveInt: { - type: PositiveIntScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValuePositiveInt: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueMarkdown: { - type: GraphQLString, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueMarkdown: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueAnnotation: { - type: require('./annotation.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueAttachment: { - type: require('./attachment.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueIdentifier: { - type: require('./identifier.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueCoding: { - type: require('./coding.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueQuantity: { - type: require('./quantity.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueRange: { - type: require('./range.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValuePeriod: { - type: require('./period.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueRatio: { - type: require('./ratio.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueSampledData: { - type: require('./sampleddata.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueSignature: { - type: require('./signature.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueHumanName: { - type: require('./humanname.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueAddress: { - type: require('./address.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueContactPoint: { - type: require('./contactpoint.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueTiming: { - type: require('./timing.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueReference: { - type: require('./reference.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueMeta: { - type: require('./meta.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxLength: { - type: GraphQLInt, - description: - 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', - }, - _maxLength: { - type: require('./element.schema'), - description: - 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', - }, - condition: { - type: new GraphQLList(IdScalar), - description: - 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', - }, - _condition: { - type: require('./element.schema'), - description: - 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', - }, - constraint: { - type: new GraphQLList(require('./elementdefinitionconstraint.schema')), - description: - 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', - }, - mustSupport: { - type: GraphQLBoolean, - description: - "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", - }, - _mustSupport: { - type: require('./element.schema'), - description: - "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", - }, - isModifier: { - type: GraphQLBoolean, - description: - 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', - }, - _isModifier: { - type: require('./element.schema'), - description: - 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', - }, - isSummary: { - type: GraphQLBoolean, - description: - 'Whether the element should be included if a client requests a search with the parameter _summary=true.', - }, - _isSummary: { - type: require('./element.schema'), - description: - 'Whether the element should be included if a client requests a search with the parameter _summary=true.', - }, - binding: { - type: require('./elementdefinitionbinding.schema'), - description: - 'Binds to a value set if this element is coded (code, Coding, CodeableConcept).', - }, - mapping: { - type: new GraphQLList(require('./elementdefinitionmapping.schema')), - description: - 'Identifies a concept from an external specification that roughly corresponds to this element.', - }, - }), + description: 'Base StructureDefinition for ElementDefinition Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _path: { + type: require('./element.schema.js'), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + _representation: { + type: require('./element.schema.js'), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/property-representation + representation: { + type: new GraphQLList(CodeScalar), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.', + }, + name: { + type: GraphQLString, + description: + 'The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + label: { + type: GraphQLString, + description: + 'The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A code that provides the meaning for the element according to a particular terminology.', + }, + slicing: { + type: require('./element.schema.js'), + description: + 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', + }, + _short: { + type: require('./element.schema.js'), + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + short: { + type: GraphQLString, + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', + }, + definition: { + type: GraphQLString, + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', + }, + _comments: { + type: require('./element.schema.js'), + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', + }, + comments: { + type: GraphQLString, + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + requirements: { + type: GraphQLString, + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'Identifies additional names by which this element might also be known.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies additional names by which this element might also be known.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + min: { + type: GraphQLInt, + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + base: { + type: require('./element.schema.js'), + description: + 'Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.', + }, + type: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'The data type or resource that the value of this element is permitted to be.', + }, + _nameReference: { + type: require('./element.schema.js'), + description: + 'Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.', + }, + nameReference: { + type: GraphQLString, + description: + 'Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.', + }, + _defaultValueBoolean: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInteger: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInteger: { + type: GraphQLInt, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDecimal: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueBase64Binary: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInstant: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInstant: { + type: InstantScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueString: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueString: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUri: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUri: { + type: UriScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDate: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDate: { + type: DateScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDateTime: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueTime: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTime: { + type: TimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueCode: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCode: { + type: CodeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueOid: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueOid: { + type: OidScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueId: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueId: { + type: IdScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUnsignedInt: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValuePositiveInt: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueMarkdown: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAnnotation: { + type: require('./annotation.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAttachment: { + type: require('./attachment.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueIdentifier: { + type: require('./identifier.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCoding: { + type: require('./coding.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueQuantity: { + type: require('./quantity.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRange: { + type: require('./range.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePeriod: { + type: require('./period.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRatio: { + type: require('./ratio.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSampledData: { + type: require('./sampleddata.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSignature: { + type: require('./signature.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueHumanName: { + type: require('./humanname.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAddress: { + type: require('./address.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTiming: { + type: require('./timing.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueReference: { + type: require('./resourcelist.schema'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMeta: { + type: require('./meta.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _meaningWhenMissing: { + type: require('./element.schema.js'), + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", + }, + meaningWhenMissing: { + type: GraphQLString, + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", + }, + _fixedBoolean: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInteger: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInteger: { + type: GraphQLInt, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDecimal: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedBase64Binary: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInstant: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInstant: { + type: InstantScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedString: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedString: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUri: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUri: { + type: UriScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDate: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDate: { + type: DateScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDateTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTime: { + type: TimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedCode: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCode: { + type: CodeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedOid: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedOid: { + type: OidScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedId: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedId: { + type: IdScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedPositiveInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedMarkdown: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAttachment: { + type: require('./attachment.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCoding: { + type: require('./coding.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedQuantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRange: { + type: require('./range.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPeriod: { + type: require('./period.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRatio: { + type: require('./ratio.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSignature: { + type: require('./signature.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedHumanName: { + type: require('./humanname.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAddress: { + type: require('./address.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTiming: { + type: require('./timing.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedReference: { + type: require('./resourcelist.schema'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMeta: { + type: require('./meta.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _patternBoolean: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternInteger: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternInteger: { + type: GraphQLInt, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDecimal: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternBase64Binary: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternInstant: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternInstant: { + type: InstantScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternString: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternString: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternUri: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternUri: { + type: UriScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDate: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDate: { + type: DateScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDateTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternTime: { + type: TimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternCode: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCode: { + type: CodeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternOid: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternOid: { + type: OidScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternId: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternId: { + type: IdScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternPositiveInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternMarkdown: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAttachment: { + type: require('./attachment.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCoding: { + type: require('./coding.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternQuantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternRange: { + type: require('./range.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternPeriod: { + type: require('./period.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternRatio: { + type: require('./ratio.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternSignature: { + type: require('./signature.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternHumanName: { + type: require('./humanname.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAddress: { + type: require('./address.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternTiming: { + type: require('./timing.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternReference: { + type: require('./resourcelist.schema'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMeta: { + type: require('./meta.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _exampleBoolean: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleBoolean: { + type: GraphQLBoolean, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleInteger: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleInteger: { + type: GraphQLInt, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleDecimal: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleDecimal: { + type: GraphQLFloat, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleBase64Binary: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleBase64Binary: { + type: Base64BinaryScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleInstant: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleInstant: { + type: InstantScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleString: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleString: { + type: GraphQLString, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleUri: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleUri: { + type: UriScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleDate: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleDate: { + type: DateScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleDateTime: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleDateTime: { + type: DateTimeScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleTime: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleTime: { + type: TimeScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleCode: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleCode: { + type: CodeScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleOid: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleOid: { + type: OidScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleId: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleId: { + type: IdScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleUnsignedInt: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleUnsignedInt: { + type: UnsignedIntScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _examplePositiveInt: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + examplePositiveInt: { + type: PositiveIntScalar, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _exampleMarkdown: { + type: require('./element.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleMarkdown: { + type: GraphQLString, + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleAnnotation: { + type: require('./annotation.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleAttachment: { + type: require('./attachment.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleCoding: { + type: require('./coding.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleQuantity: { + type: require('./quantity.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleRange: { + type: require('./range.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + examplePeriod: { + type: require('./period.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleRatio: { + type: require('./ratio.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleSignature: { + type: require('./signature.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleHumanName: { + type: require('./humanname.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleAddress: { + type: require('./address.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleTiming: { + type: require('./timing.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleReference: { + type: require('./resourcelist.schema'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + exampleMeta: { + type: require('./meta.schema.js'), + description: + 'A sample value for this element demonstrating the type of information that would typically be captured.', + }, + _minValueBoolean: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueBoolean: { + type: GraphQLBoolean, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInteger: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInteger: { + type: GraphQLInt, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDecimal: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDecimal: { + type: GraphQLFloat, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueBase64Binary: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueBase64Binary: { + type: Base64BinaryScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInstant: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInstant: { + type: InstantScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueString: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueString: { + type: GraphQLString, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueUri: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueUri: { + type: UriScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDate: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDate: { + type: DateScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDateTime: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDateTime: { + type: DateTimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueTime: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueTime: { + type: TimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueCode: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueCode: { + type: CodeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueOid: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueOid: { + type: OidScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueId: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueId: { + type: IdScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValuePositiveInt: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueMarkdown: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueMarkdown: { + type: GraphQLString, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueAnnotation: { + type: require('./annotation.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueIdentifier: { + type: require('./identifier.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueCoding: { + type: require('./coding.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueRange: { + type: require('./range.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValuePeriod: { + type: require('./period.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueRatio: { + type: require('./ratio.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueSignature: { + type: require('./signature.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueHumanName: { + type: require('./humanname.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueAddress: { + type: require('./address.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueTiming: { + type: require('./timing.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueReference: { + type: require('./resourcelist.schema'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueMeta: { + type: require('./meta.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueBoolean: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueBoolean: { + type: GraphQLBoolean, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInteger: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInteger: { + type: GraphQLInt, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDecimal: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDecimal: { + type: GraphQLFloat, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueBase64Binary: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueBase64Binary: { + type: Base64BinaryScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInstant: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInstant: { + type: InstantScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueString: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueString: { + type: GraphQLString, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueUri: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueUri: { + type: UriScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDate: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDate: { + type: DateScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDateTime: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDateTime: { + type: DateTimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueTime: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueTime: { + type: TimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueCode: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueCode: { + type: CodeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueOid: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueOid: { + type: OidScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueId: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueId: { + type: IdScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValuePositiveInt: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueMarkdown: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueMarkdown: { + type: GraphQLString, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueAnnotation: { + type: require('./annotation.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueIdentifier: { + type: require('./identifier.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueCoding: { + type: require('./coding.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueRange: { + type: require('./range.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValuePeriod: { + type: require('./period.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueRatio: { + type: require('./ratio.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueSignature: { + type: require('./signature.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueHumanName: { + type: require('./humanname.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueAddress: { + type: require('./address.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueTiming: { + type: require('./timing.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueReference: { + type: require('./resourcelist.schema'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueMeta: { + type: require('./meta.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxLength: { + type: require('./element.schema.js'), + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + maxLength: { + type: GraphQLInt, + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + _condition: { + type: require('./element.schema.js'), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + condition: { + type: new GraphQLList(IdScalar), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + constraint: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', + }, + _mustSupport: { + type: require('./element.schema.js'), + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", + }, + mustSupport: { + type: GraphQLBoolean, + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", + }, + _isModifier: { + type: require('./element.schema.js'), + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + isModifier: { + type: GraphQLBoolean, + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + _isSummary: { + type: require('./element.schema.js'), + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + isSummary: { + type: GraphQLBoolean, + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + binding: { + type: require('./element.schema.js'), + description: + 'Binds to a value set if this element is coded (code, Coding, CodeableConcept).', + }, + mapping: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Identifies a concept from an external specification that roughly corresponds to this element.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/elementdefinitionbase.schema.js b/src/resources/1_0_2/schemas/elementdefinitionbase.schema.js index 3e75ddc0..b96fe3ad 100644 --- a/src/resources/1_0_2/schemas/elementdefinitionbase.schema.js +++ b/src/resources/1_0_2/schemas/elementdefinitionbase.schema.js @@ -1,51 +1,64 @@ const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLInt, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ElementDefinition.base Schema + * @summary ElementDefinitionbase Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionBase', - description: - 'Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.', - fields: () => - extendSchema(require('./element.schema'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.', - }, - _path: { - type: require('./element.schema'), - description: - 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.', - }, - min: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Minimum cardinality of the base element identified by the path.', - }, - _min: { - type: require('./element.schema'), - description: - 'Minimum cardinality of the base element identified by the path.', - }, - max: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Maximum cardinality of the base element identified by the path.', - }, - _max: { - type: require('./element.schema'), - description: - 'Maximum cardinality of the base element identified by the path.', - }, - }), + name: 'ElementDefinitionbase', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [[[StructureDefinition]]] without a StructureDefinition.base.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + min: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/elementdefinitionbinding.schema.js b/src/resources/1_0_2/schemas/elementdefinitionbinding.schema.js index 5590fc3c..1cd54201 100644 --- a/src/resources/1_0_2/schemas/elementdefinitionbinding.schema.js +++ b/src/resources/1_0_2/schemas/elementdefinitionbinding.schema.js @@ -1,54 +1,83 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.binding Schema + * @summary ElementDefinitionbinding Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionBinding', - description: - 'Binds to a value set if this element is coded (code, Coding, CodeableConcept).', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/binding-strength - strength: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - _strength: { - type: require('./element.schema'), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - description: { - type: GraphQLString, - description: - 'Describes the intended use of this particular set of codes.', - }, - _description: { - type: require('./element.schema'), - description: - 'Describes the intended use of this particular set of codes.', - }, - valueSetUri: { - type: UriScalar, - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - _valueSetUri: { - type: require('./element.schema'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - valueSetReference: { - type: require('./reference.schema'), + name: 'ElementDefinitionbinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _strength: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/binding-strength + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Describes the intended use of this particular set of codes.', + }, + description: { + type: GraphQLString, + description: + 'Describes the intended use of this particular set of codes.', + }, + _valueSetUri: { + type: require('./element.schema.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetUri: { + type: UriScalar, + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetReference: { + type: new GraphQLUnionType({ + name: + 'ElementDefinitionbindingvalueSetReference_valueSetReference_Union', description: 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - }), + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/elementdefinitionconstraint.schema.js b/src/resources/1_0_2/schemas/elementdefinitionconstraint.schema.js index 5a0c2f91..35f75bcd 100644 --- a/src/resources/1_0_2/schemas/elementdefinitionconstraint.schema.js +++ b/src/resources/1_0_2/schemas/elementdefinitionconstraint.schema.js @@ -1,69 +1,85 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.constraint Schema + * @summary ElementDefinitionconstraint Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionConstraint', - description: - 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', - fields: () => - extendSchema(require('./element.schema'), { - key: { - type: new GraphQLNonNull(IdScalar), - description: - 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', - }, - _key: { - type: require('./element.schema'), - description: - 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', - }, - requirements: { - type: GraphQLString, - description: - 'Description of why this constraint is necessary or appropriate.', - }, - _requirements: { - type: require('./element.schema'), - description: - 'Description of why this constraint is necessary or appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/constraint-severity - severity: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the impact constraint violation has on the conformance of the instance.', - }, - _severity: { - type: require('./element.schema'), - description: - 'Identifies the impact constraint violation has on the conformance of the instance.', - }, - human: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', - }, - _human: { - type: require('./element.schema'), - description: - 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', - }, - xpath: { - type: new GraphQLNonNull(GraphQLString), - description: - 'An XPath expression of constraint that can be executed to see if this constraint is met.', - }, - _xpath: { - type: require('./element.schema'), - description: - 'An XPath expression of constraint that can be executed to see if this constraint is met.', - }, - }), + name: 'ElementDefinitionconstraint', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _key: { + type: require('./element.schema.js'), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + key: { + type: new GraphQLNonNull(IdScalar), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'Description of why this constraint is necessary or appropriate.', + }, + requirements: { + type: GraphQLString, + description: + 'Description of why this constraint is necessary or appropriate.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/constraint-severity + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + _human: { + type: require('./element.schema.js'), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + human: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + _xpath: { + type: require('./element.schema.js'), + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + xpath: { + type: new GraphQLNonNull(GraphQLString), + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/elementdefinitionmapping.schema.js b/src/resources/1_0_2/schemas/elementdefinitionmapping.schema.js index 1ec4e4c1..8d2c43eb 100644 --- a/src/resources/1_0_2/schemas/elementdefinitionmapping.schema.js +++ b/src/resources/1_0_2/schemas/elementdefinitionmapping.schema.js @@ -1,46 +1,62 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.mapping Schema + * @summary ElementDefinitionmapping Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionMapping', - description: - 'Identifies a concept from an external specification that roughly corresponds to this element.', - fields: () => - extendSchema(require('./element.schema'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: 'An internal reference to the definition of a mapping.', - }, - _identity: { - type: require('./element.schema'), - description: 'An internal reference to the definition of a mapping.', - }, - language: { - type: CodeScalar, - description: - 'Identifies the computable language in which mapping.map is expressed.', - }, - _language: { - type: require('./element.schema'), - description: - 'Identifies the computable language in which mapping.map is expressed.', - }, - map: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Expresses what part of the target specification corresponds to this element.', - }, - _map: { - type: require('./element.schema'), - description: - 'Expresses what part of the target specification corresponds to this element.', - }, - }), + name: 'ElementDefinitionmapping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _identity: { + type: require('./element.schema.js'), + description: 'An internal reference to the definition of a mapping.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: 'An internal reference to the definition of a mapping.', + }, + _language: { + type: require('./element.schema.js'), + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + language: { + type: CodeScalar, + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + _map: { + type: require('./element.schema.js'), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + map: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/elementdefinitionslicing.schema.js b/src/resources/1_0_2/schemas/elementdefinitionslicing.schema.js index 46377da9..d8104651 100644 --- a/src/resources/1_0_2/schemas/elementdefinitionslicing.schema.js +++ b/src/resources/1_0_2/schemas/elementdefinitionslicing.schema.js @@ -1,64 +1,76 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, GraphQLList, GraphQLString, GraphQLBoolean, GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.slicing Schema + * @summary ElementDefinitionslicing Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionSlicing', - description: - 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', - fields: () => - extendSchema(require('./element.schema'), { - discriminator: { - type: new GraphQLList(GraphQLString), - description: - 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', - }, - _discriminator: { - type: require('./element.schema'), - description: - 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', - }, - description: { - type: GraphQLString, - description: - 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', - }, - _description: { - type: require('./element.schema'), - description: - 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', - }, - ordered: { - type: GraphQLBoolean, - description: - 'If the matching elements have to occur in the same order as defined in the profile.', - }, - _ordered: { - type: require('./element.schema'), - description: - 'If the matching elements have to occur in the same order as defined in the profile.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-slicing-rules - rules: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', - }, - _rules: { - type: require('./element.schema'), - description: - 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', - }, - }), + name: 'ElementDefinitionslicing', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _discriminator: { + type: require('./element.schema.js'), + description: + 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', + }, + discriminator: { + type: new GraphQLList(GraphQLString), + description: + 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + description: { + type: GraphQLString, + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + _ordered: { + type: require('./element.schema.js'), + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + ordered: { + type: GraphQLBoolean, + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + _rules: { + type: require('./element.schema.js'), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-slicing-rules + rules: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/elementdefinitiontype.schema.js b/src/resources/1_0_2/schemas/elementdefinitiontype.schema.js index be0f8add..ad070055 100644 --- a/src/resources/1_0_2/schemas/elementdefinitiontype.schema.js +++ b/src/resources/1_0_2/schemas/elementdefinitiontype.schema.js @@ -1,50 +1,62 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.type Schema + * @summary ElementDefinitiontype Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionType', - description: - 'The data type or resource that the value of this element is permitted to be.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Name of Data type or Resource that is a(or the) type used for this element.', - }, - _code: { - type: require('./element.schema'), - description: - 'Name of Data type or Resource that is a(or the) type used for this element.', - }, - profile: { - type: new GraphQLList(UriScalar), - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - _profile: { - type: require('./element.schema'), - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-aggregation-mode - aggregation: { - type: new GraphQLList(CodeScalar), - description: - 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', - }, - _aggregation: { - type: require('./element.schema'), - description: - 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', - }, - }), + name: 'ElementDefinitiontype', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Name of Data type or Resource that is a(or the) type used for this element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Name of Data type or Resource that is a(or the) type used for this element.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + profile: { + type: new GraphQLList(UriScalar), + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + _aggregation: { + type: require('./element.schema.js'), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-aggregation-mode + aggregation: { + type: new GraphQLList(CodeScalar), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/eligibilityrequest.schema.js b/src/resources/1_0_2/schemas/eligibilityrequest.schema.js index e7c7c46d..e44126a5 100644 --- a/src/resources/1_0_2/schemas/eligibilityrequest.schema.js +++ b/src/resources/1_0_2/schemas/eligibilityrequest.schema.js @@ -1,20 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EligibilityRequestResourceType = new GraphQLEnumType({ - name: 'EligibilityRequestResourceType', - values: { - EligibilityRequest: { value: 'EligibilityRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,50 +16,136 @@ let EligibilityRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EligibilityRequest', - description: 'Base StructureDefinition for EligibilityRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EligibilityRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EligibilityRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EligibilityRequest_Enum_schema', + values: { EligibilityRequest: { value: 'EligibilityRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: new GraphQLUnionType({ + name: 'EligibilityRequesttarget_target_Union', description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestprovider_provider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestorganization_organization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/eligibilityresponse.schema.js b/src/resources/1_0_2/schemas/eligibilityresponse.schema.js index 74aee0bb..770f5224 100644 --- a/src/resources/1_0_2/schemas/eligibilityresponse.schema.js +++ b/src/resources/1_0_2/schemas/eligibilityresponse.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EligibilityResponseResourceType = new GraphQLEnumType({ - name: 'EligibilityResponseResourceType', - values: { - EligibilityResponse: { value: 'EligibilityResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,73 +17,169 @@ let EligibilityResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EligibilityResponse', - description: 'Base StructureDefinition for EligibilityResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EligibilityResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EligibilityResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EligibilityResponse_Enum_schema', + values: { EligibilityResponse: { value: 'EligibilityResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + request: { + type: new GraphQLUnionType({ + name: 'EligibilityResponserequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.schema'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./eligibilityrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EligibilityRequest') { + return require('./eligibilityrequest.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'EligibilityResponseorganization_organization_Union', description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'EligibilityResponserequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: + 'EligibilityResponserequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/encounter.schema.js b/src/resources/1_0_2/schemas/encounter.schema.js index f0129688..f5de317e 100644 --- a/src/resources/1_0_2/schemas/encounter.schema.js +++ b/src/resources/1_0_2/schemas/encounter.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EncounterResourceType = new GraphQLEnumType({ - name: 'EncounterResourceType', - values: { - Encounter: { value: 'Encounter' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,114 +15,250 @@ let EncounterResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Encounter', - description: 'Base StructureDefinition for Encounter Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EncounterResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier(s) by which this encounter is known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-state - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | arrived | in-progress | onleave | finished | cancelled.', - }, - _status: { - type: require('./element.schema'), - description: - 'planned | arrived | in-progress | onleave | finished | cancelled.', - }, - statusHistory: { - type: new GraphQLList(require('./encounterstatushistory.schema')), - description: - 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-class - class: { - type: CodeScalar, - description: 'inpatient | outpatient | ambulatory | emergency +.', - }, - _class: { - type: require('./element.schema'), - description: 'inpatient | outpatient | ambulatory | emergency +.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-priority - priority: { - type: require('./codeableconcept.schema'), - description: 'Indicates the urgency of the encounter.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Encounter Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Encounter_Enum_schema', + values: { Encounter: { value: 'Encounter' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Identifier(s) by which this encounter is known.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | arrived | in-progress | onleave | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-state + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | in-progress | onleave | finished | cancelled.', + }, + statusHistory: { + type: new GraphQLList(require('./encounterstatushistory.schema.js')), + description: + 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', + }, + _class: { + type: require('./element.schema.js'), + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-class + class: { + type: CodeScalar, + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-priority + priority: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the urgency of the encounter.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'Encounterpatient_patient_Union', description: 'The patient present at the encounter.', - }, - episodeOfCare: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', - }, - incomingReferral: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The referral request this encounter satisfies (incoming referral).', - }, - participant: { - type: new GraphQLList(require('./encounterparticipant.schema')), - description: - 'The list of people responsible for providing the service.', - }, - appointment: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'The patient present at the encounter.', + }, + episodeOfCare: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EncounterepisodeOfCare_episodeOfCare_Union', + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + types: () => [require('./episodeofcare.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + ), + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + }, + incomingReferral: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EncounterincomingReferral_incomingReferral_Union', + description: + 'The referral request this encounter satisfies (incoming referral).', + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'The referral request this encounter satisfies (incoming referral).', + }, + participant: { + type: new GraphQLList(require('./encounterparticipant.schema.js')), + description: 'The list of people responsible for providing the service.', + }, + appointment: { + type: new GraphQLUnionType({ + name: 'Encounterappointment_appointment_Union', description: 'The appointment that scheduled this encounter.', - }, - period: { - type: require('./period.schema'), - description: 'The start and end time of the encounter.', - }, - length: { - type: require('./quantity.schema'), - description: - 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', - }, - indication: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', - }, - hospitalization: { - type: require('./encounterhospitalization.schema'), - description: 'Details about the admission to a healthcare service.', - }, - location: { - type: new GraphQLList(require('./encounterlocation.schema')), - description: - 'List of locations where the patient has been during this encounter.', - }, - serviceProvider: { - type: require('./reference.schema'), + types: () => [require('./appointment.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + }, + }), + description: 'The appointment that scheduled this encounter.', + }, + period: { + type: require('./period.schema.js'), + description: 'The start and end time of the encounter.', + }, + length: { + type: require('./quantity.schema.js'), + description: + 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + }, + indication: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Encounterindication_indication_Union', + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + types: () => [ + require('./condition.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + hospitalization: { + type: require('./encounterhospitalization.schema.js'), + description: 'Details about the admission to a healthcare service.', + }, + location: { + type: new GraphQLList(require('./encounterlocation.schema.js')), + description: + 'List of locations where the patient has been during this encounter.', + }, + serviceProvider: { + type: new GraphQLUnionType({ + name: 'EncounterserviceProvider_serviceProvider_Union', description: "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", - }, - partOf: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", + }, + partOf: { + type: new GraphQLUnionType({ + name: 'EncounterpartOf_partOf_Union', description: 'Another Encounter of which this encounter is a part of (administratively or in time).', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Another Encounter of which this encounter is a part of (administratively or in time).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/encounterhospitalization.schema.js b/src/resources/1_0_2/schemas/encounterhospitalization.schema.js index e52f637b..89cde59d 100644 --- a/src/resources/1_0_2/schemas/encounterhospitalization.schema.js +++ b/src/resources/1_0_2/schemas/encounterhospitalization.schema.js @@ -1,69 +1,131 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Encounter.hospitalization Schema + * @summary Encounterhospitalization Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterHospitalization', - description: 'Details about the admission to a healthcare service.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - preAdmissionIdentifier: { - type: require('./identifier.schema'), - description: 'Pre-admission identifier.', - }, - origin: { - type: require('./reference.schema'), + name: 'Encounterhospitalization', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + preAdmissionIdentifier: { + type: require('./identifier.schema.js'), + description: 'Pre-admission identifier.', + }, + origin: { + type: new GraphQLUnionType({ + name: 'Encounterhospitalizationorigin_origin_Union', description: 'The location from which the patient came before admission.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-admit-source - admitSource: { - type: require('./codeableconcept.schema'), - description: - 'From where patient was admitted (physician referral, transfer).', - }, - admittingDiagnosis: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.', - }, - reAdmission: { - type: require('./codeableconcept.schema'), - description: - 'Whether this hospitalization is a readmission and why if known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet - dietPreference: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Diet preferences reported by the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-courtesy - specialCourtesy: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Special courtesies (VIP, board member).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-arrangements - specialArrangement: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Wheelchair, translator, stretcher, etc.', - }, - destination: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The location from which the patient came before admission.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-admit-source + admitSource: { + type: require('./codeableconcept.schema.js'), + description: + 'From where patient was admitted (physician referral, transfer).', + }, + admittingDiagnosis: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'EncounterhospitalizationadmittingDiagnosis_admittingDiagnosis_Union', + description: + 'The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'The admitting diagnosis field is used to record the diagnosis codes as reported by admitting practitioner. This could be different or in addition to the conditions reported as reason-condition(s) for the encounter.', + }, + reAdmission: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether this hospitalization is a readmission and why if known.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet + dietPreference: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Diet preferences reported by the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-courtesy + specialCourtesy: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Special courtesies (VIP, board member).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-arrangements + specialArrangement: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Wheelchair, translator, stretcher, etc.', + }, + destination: { + type: new GraphQLUnionType({ + name: 'Encounterhospitalizationdestination_destination_Union', description: 'Location to which the patient is discharged.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition - dischargeDisposition: { - type: require('./codeableconcept.schema'), - description: 'Category or kind of location after discharge.', - }, - dischargeDiagnosis: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Location to which the patient is discharged.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition + dischargeDisposition: { + type: require('./codeableconcept.schema.js'), + description: 'Category or kind of location after discharge.', + }, + dischargeDiagnosis: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'EncounterhospitalizationdischargeDiagnosis_dischargeDiagnosis_Union', + description: + 'The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'The final diagnosis given a patient before release from the hospital after all testing, surgery, and workup are complete.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/encounterlocation.schema.js b/src/resources/1_0_2/schemas/encounterlocation.schema.js index 21b99845..9f93f1e7 100644 --- a/src/resources/1_0_2/schemas/encounterlocation.schema.js +++ b/src/resources/1_0_2/schemas/encounterlocation.schema.js @@ -1,37 +1,70 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Encounter.location Schema + * @summary Encounterlocation Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterLocation', - description: - 'List of locations where the patient has been during this encounter.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - location: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The location where the encounter takes place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-location-status - status: { - type: CodeScalar, - description: - "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", - }, - _status: { - type: require('./element.schema'), - description: - "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", - }, - period: { - type: require('./period.schema'), - description: - 'Time period during which the patient was present at the location.', - }, - }), + name: 'Encounterlocation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + location: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Encounterlocationlocation_location_Union', + description: 'The location where the encounter takes place.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: 'The location where the encounter takes place.', + }, + _status: { + type: require('./element.schema.js'), + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-location-status + status: { + type: CodeScalar, + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", + }, + period: { + type: require('./period.schema.js'), + description: + 'Time period during which the patient was present at the location.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/encounterparticipant.schema.js b/src/resources/1_0_2/schemas/encounterparticipant.schema.js index 5ff8ce12..32e2d2c2 100644 --- a/src/resources/1_0_2/schemas/encounterparticipant.schema.js +++ b/src/resources/1_0_2/schemas/encounterparticipant.schema.js @@ -1,30 +1,63 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Encounter.participant Schema + * @summary Encounterparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterParticipant', - description: 'The list of people responsible for providing the service.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Role of participant in encounter.', - }, - period: { - type: require('./period.schema'), - description: - 'The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period.', - }, - individual: { - type: require('./reference.schema'), + name: 'Encounterparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in encounter.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time that the specified participant was present during the encounter. These can overlap or be sub-sets of the overall encounters period.', + }, + individual: { + type: new GraphQLUnionType({ + name: 'Encounterparticipantindividual_individual_Union', description: 'Persons involved in the encounter other than the patient.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Persons involved in the encounter other than the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/encounterstatushistory.schema.js b/src/resources/1_0_2/schemas/encounterstatushistory.schema.js index 6ea465c9..e465d90c 100644 --- a/src/resources/1_0_2/schemas/encounterstatushistory.schema.js +++ b/src/resources/1_0_2/schemas/encounterstatushistory.schema.js @@ -1,32 +1,49 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Encounter.statusHistory Schema + * @summary EncounterstatusHistory Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterStatusHistory', - description: - 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-state - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | arrived | in-progress | onleave | finished | cancelled.', - }, - _status: { - type: require('./element.schema'), - description: - 'planned | arrived | in-progress | onleave | finished | cancelled.', - }, - period: { - type: new GraphQLNonNull(require('./period.schema')), - description: 'The time that the episode was in the specified status.', - }, - }), + name: 'EncounterstatusHistory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | arrived | in-progress | onleave | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-state + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | in-progress | onleave | finished | cancelled.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The time that the episode was in the specified status.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/enrollmentrequest.schema.js b/src/resources/1_0_2/schemas/enrollmentrequest.schema.js index cd3edba8..2343ecae 100644 --- a/src/resources/1_0_2/schemas/enrollmentrequest.schema.js +++ b/src/resources/1_0_2/schemas/enrollmentrequest.schema.js @@ -1,20 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EnrollmentRequestResourceType = new GraphQLEnumType({ - name: 'EnrollmentRequestResourceType', - values: { - EnrollmentRequest: { value: 'EnrollmentRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,64 +16,173 @@ let EnrollmentRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EnrollmentRequest', - description: 'Base StructureDefinition for EnrollmentRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EnrollmentRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EnrollmentRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentRequest_Enum_schema', + values: { EnrollmentRequest: { value: 'EnrollmentRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequesttarget_target_Union', description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestprovider_provider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestorganization_organization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Patient Resource.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relationship - relationship: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The relationship of the patient to the subscriber.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EnrollmentRequestsubject_subject_Union', + description: 'Patient Resource.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'Patient Resource.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EnrollmentRequestcoverage_coverage_Union', + description: + 'Reference to the program or plan identification, underwriter or payor.', + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relationship + relationship: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The relationship of the patient to the subscriber.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/enrollmentresponse.schema.js b/src/resources/1_0_2/schemas/enrollmentresponse.schema.js index 6b4f0f01..06497037 100644 --- a/src/resources/1_0_2/schemas/enrollmentresponse.schema.js +++ b/src/resources/1_0_2/schemas/enrollmentresponse.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EnrollmentResponseResourceType = new GraphQLEnumType({ - name: 'EnrollmentResponseResourceType', - values: { - EnrollmentResponse: { value: 'EnrollmentResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,73 +17,168 @@ let EnrollmentResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EnrollmentResponse', - description: 'Base StructureDefinition for EnrollmentResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EnrollmentResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EnrollmentResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentResponse_Enum_schema', + values: { EnrollmentResponse: { value: 'EnrollmentResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + request: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponserequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.schema'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./enrollmentrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EnrollmentRequest') { + return require('./enrollmentrequest.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponseorganization_organization_Union', description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponserequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponserequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/episodeofcare.schema.js b/src/resources/1_0_2/schemas/episodeofcare.schema.js index e0d23597..28383467 100644 --- a/src/resources/1_0_2/schemas/episodeofcare.schema.js +++ b/src/resources/1_0_2/schemas/episodeofcare.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EpisodeOfCareResourceType = new GraphQLEnumType({ - name: 'EpisodeOfCareResourceType', - values: { - EpisodeOfCare: { value: 'EpisodeOfCare' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,71 +15,183 @@ let EpisodeOfCareResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EpisodeOfCare', - description: 'Base StructureDefinition for EpisodeOfCare Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EpisodeOfCareResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier(s) by which this EpisodeOfCare is known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - _status: { - type: require('./element.schema'), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - statusHistory: { - type: new GraphQLList(require('./episodeofcarestatushistory.schema')), - description: - 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', - }, - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.', - }, - condition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient that this EpisodeOfCare applies to.', - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EpisodeOfCare Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EpisodeOfCare_Enum_schema', + values: { EpisodeOfCare: { value: 'EpisodeOfCare' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Identifier(s) by which this EpisodeOfCare is known.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + statusHistory: { + type: new GraphQLList(require('./episodeofcarestatushistory.schema.js')), + description: + 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.', + }, + condition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EpisodeOfCarecondition_condition_Union', + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EpisodeOfCarepatient_patient_Union', + description: 'The patient that this EpisodeOfCare applies to.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient that this EpisodeOfCare applies to.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'EpisodeOfCaremanagingOrganization_managingOrganization_Union', description: 'The organization that has assumed the specific responsibilities for the specified duration.', - }, - period: { - type: require('./period.schema'), - description: - 'The interval during which the managing organization assumes the defined responsibility.', - }, - referralRequest: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', - }, - careManager: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization that has assumed the specific responsibilities for the specified duration.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The interval during which the managing organization assumes the defined responsibility.', + }, + referralRequest: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EpisodeOfCarereferralRequest_referralRequest_Union', + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + }, + careManager: { + type: new GraphQLUnionType({ + name: 'EpisodeOfCarecareManager_careManager_Union', description: 'The practitioner that is the care manager/care co-ordinator for this patient.', - }, - careTeam: { - type: new GraphQLList(require('./episodeofcarecareteam.schema')), - description: - 'The list of practitioners that may be facilitating this episode of care for specific purposes.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner that is the care manager/care co-ordinator for this patient.', + }, + careTeam: { + type: new GraphQLList(require('./episodeofcarecareteam.schema.js')), + description: + 'The list of practitioners that may be facilitating this episode of care for specific purposes.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/episodeofcarecareteam.schema.js b/src/resources/1_0_2/schemas/episodeofcarecareteam.schema.js index ee12c7fe..59f21047 100644 --- a/src/resources/1_0_2/schemas/episodeofcarecareteam.schema.js +++ b/src/resources/1_0_2/schemas/episodeofcarecareteam.schema.js @@ -1,31 +1,63 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary EpisodeOfCare.careTeam Schema + * @summary EpisodeOfCarecareTeam Schema */ module.exports = new GraphQLObjectType({ - name: 'EpisodeOfCareCareTeam', - description: - 'The list of practitioners that may be facilitating this episode of care for specific purposes.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - role: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The role this team member is taking within this episode of care.', - }, - period: { - type: require('./period.schema'), - description: - 'The period of time this practitioner is performing some role within the episode of care.', - }, - member: { - type: require('./reference.schema'), + name: 'EpisodeOfCarecareTeam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The role this team member is taking within this episode of care.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time this practitioner is performing some role within the episode of care.', + }, + member: { + type: new GraphQLUnionType({ + name: 'EpisodeOfCarecareTeammember_member_Union', description: 'The practitioner (or Organization) within the team.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The practitioner (or Organization) within the team.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/episodeofcarestatushistory.schema.js b/src/resources/1_0_2/schemas/episodeofcarestatushistory.schema.js index af90c363..4ba8a6b1 100644 --- a/src/resources/1_0_2/schemas/episodeofcarestatushistory.schema.js +++ b/src/resources/1_0_2/schemas/episodeofcarestatushistory.schema.js @@ -1,33 +1,50 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary EpisodeOfCare.statusHistory Schema + * @summary EpisodeOfCarestatusHistory Schema */ module.exports = new GraphQLObjectType({ - name: 'EpisodeOfCareStatusHistory', - description: - 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - _status: { - type: require('./element.schema'), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - period: { - type: new GraphQLNonNull(require('./period.schema')), - description: - 'The period during this EpisodeOfCare that the specific status applied.', - }, - }), + name: 'EpisodeOfCarestatusHistory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + 'The period during this EpisodeOfCare that the specific status applied.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/explanationofbenefit.schema.js b/src/resources/1_0_2/schemas/explanationofbenefit.schema.js index b478649a..228641e1 100644 --- a/src/resources/1_0_2/schemas/explanationofbenefit.schema.js +++ b/src/resources/1_0_2/schemas/explanationofbenefit.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ExplanationOfBenefitResourceType = new GraphQLEnumType({ - name: 'ExplanationOfBenefitResourceType', - values: { - ExplanationOfBenefit: { value: 'ExplanationOfBenefit' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,73 +17,169 @@ let ExplanationOfBenefitResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ExplanationOfBenefit', - description: 'Base StructureDefinition for ExplanationOfBenefit Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ExplanationOfBenefitResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ExplanationOfBenefit Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExplanationOfBenefit_Enum_schema', + values: { ExplanationOfBenefit: { value: 'ExplanationOfBenefit' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + request: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitrequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.schema'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitorganization_organization_Union', description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitrequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefitrequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/extension.schema.js b/src/resources/1_0_2/schemas/extension.schema.js index 3a0ddbd3..945980ed 100644 --- a/src/resources/1_0_2/schemas/extension.schema.js +++ b/src/resources/1_0_2/schemas/extension.schema.js @@ -1,24 +1,24 @@ -const UriScalar = require('../scalars/uri.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLInt, GraphQLFloat, GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -26,263 +26,277 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Extension', - description: 'Base StructureDefinition for Extension Type.', - fields: () => - extendSchema(require('./element.schema'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'Source of the definition for the extension code - a logical name or a URL.', - }, - _url: { - type: require('./element.schema'), - description: - 'Source of the definition for the extension code - a logical name or a URL.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueBoolean: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueInteger: { - type: GraphQLInt, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueInteger: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDecimal: { - type: GraphQLFloat, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDecimal: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueBase64Binary: { - type: Base64BinaryScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueBase64Binary: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueInstant: { - type: InstantScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueInstant: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueString: { - type: GraphQLString, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueString: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueUri: { - type: UriScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueUri: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDate: { - type: DateScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDate: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueTime: { - type: TimeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCode: { - type: CodeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueCode: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueOid: { - type: OidScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueOid: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueId: { - type: IdScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueId: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueUnsignedInt: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valuePositiveInt: { - type: PositiveIntScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valuePositiveInt: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMarkdown: { - type: GraphQLString, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueMarkdown: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAnnotation: { - type: require('./annotation.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueIdentifier: { - type: require('./identifier.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCoding: { - type: require('./coding.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueRange: { - type: require('./range.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valuePeriod: { - type: require('./period.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueRatio: { - type: require('./ratio.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueSampledData: { - type: require('./sampleddata.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueSignature: { - type: require('./signature.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueHumanName: { - type: require('./humanname.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAddress: { - type: require('./address.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueContactPoint: { - type: require('./contactpoint.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueTiming: { - type: require('./timing.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueReference: { - type: require('./reference.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMeta: { - type: require('./meta.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - }), + description: 'Base StructureDefinition for Extension Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueInteger: { + type: GraphQLInt, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueInstant: { + type: InstantScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueString: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueUri: { + type: UriScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDate: { + type: DateScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueTime: { + type: TimeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueCode: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCode: { + type: CodeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueOid: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueOid: { + type: OidScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueId: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueId: { + type: IdScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMarkdown: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCoding: { + type: require('./coding.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueSignature: { + type: require('./signature.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueHumanName: { + type: require('./humanname.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAddress: { + type: require('./address.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueTiming: { + type: require('./timing.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueReference: { + type: require('./resourcelist.schema'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMeta: { + type: require('./meta.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/familymemberhistory.schema.js b/src/resources/1_0_2/schemas/familymemberhistory.schema.js index 6f3c397f..5c6967bd 100644 --- a/src/resources/1_0_2/schemas/familymemberhistory.schema.js +++ b/src/resources/1_0_2/schemas/familymemberhistory.schema.js @@ -1,23 +1,17 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let FamilyMemberHistoryResourceType = new GraphQLEnumType({ - name: 'FamilyMemberHistoryResourceType', - values: { - FamilyMemberHistory: { value: 'FamilyMemberHistory' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,159 +19,229 @@ let FamilyMemberHistoryResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'FamilyMemberHistory', - description: 'Base StructureDefinition for FamilyMemberHistory Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(FamilyMemberHistoryResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The person who this history concerns.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and possibly time) when the family member history was taken.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and possibly time) when the family member history was taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/history-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code specifying a state of a Family Member History record.', - }, - _status: { - type: require('./element.schema'), - description: - 'A code specifying a state of a Family Member History record.', - }, - name: { - type: GraphQLString, - description: - "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", - }, - _name: { - type: require('./element.schema'), - description: - "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-FamilyMember - relationship: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The type of relationship this person has to the patient (father, mother, brother etc.).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', - }, - bornPeriod: { - type: require('./period.schema'), - description: 'The actual or approximate date of birth of the relative.', - }, - bornDate: { - type: DateScalar, - description: 'The actual or approximate date of birth of the relative.', - }, - _bornDate: { - type: require('./element.schema'), - description: 'The actual or approximate date of birth of the relative.', - }, - bornString: { - type: GraphQLString, - description: 'The actual or approximate date of birth of the relative.', - }, - _bornString: { - type: require('./element.schema'), - description: 'The actual or approximate date of birth of the relative.', - }, - ageQuantity: { - type: require('./quantity.schema'), - description: - 'The actual or approximate age of the relative at the time the family member history is recorded.', - }, - ageRange: { - type: require('./range.schema'), - description: - 'The actual or approximate age of the relative at the time the family member history is recorded.', - }, - ageString: { - type: GraphQLString, - description: - 'The actual or approximate age of the relative at the time the family member history is recorded.', - }, - _ageString: { - type: require('./element.schema'), - description: - 'The actual or approximate age of the relative at the time the family member history is recorded.', - }, - deceasedBoolean: { - type: GraphQLBoolean, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedBoolean: { - type: require('./element.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedQuantity: { - type: require('./quantity.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedRange: { - type: require('./range.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedDate: { - type: DateScalar, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedDate: { - type: require('./element.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedString: { - type: GraphQLString, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedString: { - type: require('./element.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - note: { - type: require('./annotation.schema'), - description: - 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', - }, - condition: { - type: new GraphQLList(require('./familymemberhistorycondition.schema')), - description: - 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', - }, - }), + description: 'Base StructureDefinition for FamilyMemberHistory Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'FamilyMemberHistory_Enum_schema', + values: { FamilyMemberHistory: { value: 'FamilyMemberHistory' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'FamilyMemberHistorypatient_patient_Union', + description: 'The person who this history concerns.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The person who this history concerns.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and possibly time) when the family member history was taken.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and possibly time) when the family member history was taken.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying a state of a Family Member History record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/history-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying a state of a Family Member History record.', + }, + _name: { + type: require('./element.schema.js'), + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + name: { + type: GraphQLString, + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-FamilyMember + relationship: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The type of relationship this person has to the patient (father, mother, brother etc.).', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', + }, + bornPeriod: { + type: require('./period.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + _bornDate: { + type: require('./element.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornDate: { + type: DateScalar, + description: 'The actual or approximate date of birth of the relative.', + }, + _bornString: { + type: require('./element.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornString: { + type: GraphQLString, + description: 'The actual or approximate date of birth of the relative.', + }, + ageQuantity: { + type: require('./quantity.schema.js'), + description: + 'The actual or approximate age of the relative at the time the family member history is recorded.', + }, + ageRange: { + type: require('./range.schema.js'), + description: + 'The actual or approximate age of the relative at the time the family member history is recorded.', + }, + _ageString: { + type: require('./element.schema.js'), + description: + 'The actual or approximate age of the relative at the time the family member history is recorded.', + }, + ageString: { + type: GraphQLString, + description: + 'The actual or approximate age of the relative at the time the family member history is recorded.', + }, + _deceasedBoolean: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedQuantity: { + type: require('./quantity.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedRange: { + type: require('./range.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedDate: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedDate: { + type: DateScalar, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedString: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedString: { + type: GraphQLString, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + note: { + type: require('./annotation.schema.js'), + description: + 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', + }, + condition: { + type: new GraphQLList( + require('./familymemberhistorycondition.schema.js'), + ), + description: + 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/familymemberhistorycondition.schema.js b/src/resources/1_0_2/schemas/familymemberhistorycondition.schema.js index bc37a0e3..7120eaca 100644 --- a/src/resources/1_0_2/schemas/familymemberhistorycondition.schema.js +++ b/src/resources/1_0_2/schemas/familymemberhistorycondition.schema.js @@ -1,58 +1,80 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary FamilyMemberHistory.condition Schema + * @summary FamilyMemberHistorycondition Schema */ module.exports = new GraphQLObjectType({ - name: 'FamilyMemberHistoryCondition', - description: - 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: - 'Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.', - }, - onsetQuantity: { - type: require('./quantity.schema'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetRange: { - type: require('./range.schema'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetPeriod: { - type: require('./period.schema'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetString: { - type: GraphQLString, - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - _onsetString: { - type: require('./element.schema'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - note: { - type: require('./annotation.schema'), - description: - 'An area where general notes can be placed about this specific condition.', - }, - }), + name: 'FamilyMemberHistorycondition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.', + }, + onsetQuantity: { + type: require('./quantity.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetRange: { + type: require('./range.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetPeriod: { + type: require('./period.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + _onsetString: { + type: require('./element.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetString: { + type: GraphQLString, + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + note: { + type: require('./annotation.schema.js'), + description: + 'An area where general notes can be placed about this specific condition.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/flag.schema.js b/src/resources/1_0_2/schemas/flag.schema.js index e985394f..a665ed7e 100644 --- a/src/resources/1_0_2/schemas/flag.schema.js +++ b/src/resources/1_0_2/schemas/flag.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let FlagResourceType = new GraphQLEnumType({ - name: 'FlagResourceType', - values: { - Flag: { value: 'Flag' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,57 +15,176 @@ let FlagResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Flag', - description: 'Base StructureDefinition for Flag Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(FlagResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier assigned to the flag for external use (outside the FHIR environment).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-category - category: { - type: require('./codeableconcept.schema'), - description: - 'Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Supports basic workflow.', - }, - _status: { - type: require('./element.schema'), - description: 'Supports basic workflow.', - }, - period: { - type: require('./period.schema'), - description: - 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The patient, location, group , organization , or practitioner this is about record this flag is associated with.', - }, - encounter: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Flag Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Flag_Enum_schema', + values: { Flag: { value: 'Flag' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier assigned to the flag for external use (outside the FHIR environment).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Supports basic workflow.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Supports basic workflow.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Flagsubject_subject_Union', + description: + 'The patient, location, group , organization , or practitioner this is about record this flag is associated with.', + types: () => [ + require('./patient.schema.js'), + require('./location.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: + 'The patient, location, group , organization , or practitioner this is about record this flag is associated with.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Flagencounter_encounter_Union', description: 'This alert is only relevant during the encounter.', - }, - author: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'This alert is only relevant during the encounter.', + }, + author: { + type: new GraphQLUnionType({ + name: 'Flagauthor_author_Union', description: 'The person, organization or device that created the flag.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The coded value or textual component of the flag to display to the user.', - }, - }), + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The person, organization or device that created the flag.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The coded value or textual component of the flag to display to the user.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/goal.schema.js b/src/resources/1_0_2/schemas/goal.schema.js index fdd36c89..daf67a20 100644 --- a/src/resources/1_0_2/schemas/goal.schema.js +++ b/src/resources/1_0_2/schemas/goal.schema.js @@ -1,21 +1,15 @@ -const DateScalar = require('../scalars/date.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GoalResourceType = new GraphQLEnumType({ - name: 'GoalResourceType', - values: { - Goal: { value: 'Goal' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -23,120 +17,251 @@ let GoalResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Goal', - description: 'Base StructureDefinition for Goal Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(GoalResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Goal Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Goal_Enum_schema', + values: { Goal: { value: 'Goal' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Goalsubject_subject_Union', description: 'Identifies the patient, group or organization for whom the goal is being established.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - startDate: { - type: DateScalar, - description: - 'The date or event after which the goal should begin being pursued.', - }, - _startDate: { - type: require('./element.schema'), - description: - 'The date or event after which the goal should begin being pursued.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - startCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The date or event after which the goal should begin being pursued.', - }, - targetDate: { - type: DateScalar, - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - _targetDate: { - type: require('./element.schema'), - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - targetQuantity: { - type: require('./quantity.schema'), - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Indicates a category the goal falls within.', - }, - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Human-readable description of a specific desired objective of care.', - }, - _description: { - type: require('./element.schema'), - description: - 'Human-readable description of a specific desired objective of care.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the goal has been reached and is still considered relevant.', - }, - _status: { - type: require('./element.schema'), - description: - 'Indicates whether the goal has been reached and is still considered relevant.', - }, - statusDate: { - type: DateScalar, - description: - 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', - }, - _statusDate: { - type: require('./element.schema'), - description: - 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-status-reason - statusReason: { - type: require('./codeableconcept.schema'), - description: 'Captures the reason for the current status.', - }, - author: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the patient, group or organization for whom the goal is being established.', + }, + _startDate: { + type: require('./element.schema.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + startDate: { + type: DateScalar, + description: + 'The date or event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + startCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + _targetDate: { + type: require('./element.schema.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + targetDate: { + type: DateScalar, + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + targetQuantity: { + type: require('./quantity.schema.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Indicates a category the goal falls within.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Human-readable description of a specific desired objective of care.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Human-readable description of a specific desired objective of care.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Indicates whether the goal has been reached and is still considered relevant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the goal has been reached and is still considered relevant.', + }, + _statusDate: { + type: require('./element.schema.js'), + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + statusDate: { + type: DateScalar, + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-status-reason + statusReason: { + type: require('./codeableconcept.schema.js'), + description: 'Captures the reason for the current status.', + }, + author: { + type: new GraphQLUnionType({ + name: 'Goalauthor_author_Union', description: 'Indicates whose goal this is - patient goal, practitioner goal, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-priority - priority: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', - }, - addresses: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The identified conditions and other health record elements that are intended to be addressed by the goal.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: 'Any comments related to the goal.', - }, - outcome: { - type: new GraphQLList(require('./goaloutcome.schema')), - description: - 'Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Indicates whose goal this is - patient goal, practitioner goal, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-priority + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', + }, + addresses: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Goaladdresses_addresses_Union', + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./medicationstatement.schema.js'), + require('./nutritionorder.schema.js'), + require('./procedurerequest.schema.js'), + require('./riskassessment.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); + } + }, + }), + ), + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Any comments related to the goal.', + }, + outcome: { + type: new GraphQLList(require('./goaloutcome.schema.js')), + description: + 'Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/goaloutcome.schema.js b/src/resources/1_0_2/schemas/goaloutcome.schema.js index d80b2662..1ea01772 100644 --- a/src/resources/1_0_2/schemas/goaloutcome.schema.js +++ b/src/resources/1_0_2/schemas/goaloutcome.schema.js @@ -1,24 +1,50 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Goal.outcome Schema + * @summary Goaloutcome Schema */ module.exports = new GraphQLObjectType({ - name: 'GoalOutcome', - description: - 'Identifies the change (or lack of change) at the point where the goal was deepmed to be cancelled or achieved.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - resultCodeableConcept: { - type: require('./codeableconcept.schema'), - description: "Details of what's changed (or not changed).", - }, - resultReference: { - type: require('./reference.schema'), + name: 'Goaloutcome', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + resultCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: "Details of what's changed (or not changed).", + }, + resultReference: { + type: new GraphQLUnionType({ + name: 'GoaloutcomeresultReference_resultReference_Union', description: "Details of what's changed (or not changed).", - }, - }), + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + description: "Details of what's changed (or not changed).", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/group.schema.js b/src/resources/1_0_2/schemas/group.schema.js index 5150f7e6..e3279eed 100644 --- a/src/resources/1_0_2/schemas/group.schema.js +++ b/src/resources/1_0_2/schemas/group.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GroupResourceType = new GraphQLEnumType({ - name: 'GroupResourceType', - values: { - Group: { value: 'Group' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -24,71 +18,128 @@ let GroupResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Group', - description: 'Base StructureDefinition for Group Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(GroupResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'A unique business identifier for this group.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/group-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the broad classification of the kind of resources the group includes.', - }, - _type: { - type: require('./element.schema'), - description: - 'Identifies the broad classification of the kind of resources the group includes.', - }, - actual: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', - }, - _actual: { - type: require('./element.schema'), - description: - 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', - }, - code: { - type: require('./codeableconcept.schema'), - description: - "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", - }, - name: { - type: GraphQLString, - description: - 'A label assigned to the group for human identification and communication.', - }, - _name: { - type: require('./element.schema'), - description: - 'A label assigned to the group for human identification and communication.', - }, - quantity: { - type: UnsignedIntScalar, - description: - 'A count of the number of resource instances that are part of the group.', - }, - _quantity: { - type: require('./element.schema'), - description: - 'A count of the number of resource instances that are part of the group.', - }, - characteristic: { - type: new GraphQLList(require('./groupcharacteristic.schema')), - description: 'Identifies the traits shared by members of the group.', - }, - member: { - type: new GraphQLList(require('./groupmember.schema')), - description: - 'Identifies the resource instances that are members of the group.', - }, - }), + description: 'Base StructureDefinition for Group Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Group_Enum_schema', + values: { Group: { value: 'Group' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'A unique business identifier for this group.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/group-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + _actual: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + actual: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", + }, + _name: { + type: require('./element.schema.js'), + description: + 'A label assigned to the group for human identification and communication.', + }, + name: { + type: GraphQLString, + description: + 'A label assigned to the group for human identification and communication.', + }, + _quantity: { + type: require('./element.schema.js'), + description: + 'A count of the number of resource instances that are part of the group.', + }, + quantity: { + type: UnsignedIntScalar, + description: + 'A count of the number of resource instances that are part of the group.', + }, + characteristic: { + type: new GraphQLList(require('./groupcharacteristic.schema.js')), + description: 'Identifies the traits shared by members of the group.', + }, + member: { + type: new GraphQLList(require('./groupmember.schema.js')), + description: + 'Identifies the resource instances that are members of the group.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/groupcharacteristic.schema.js b/src/resources/1_0_2/schemas/groupcharacteristic.schema.js index ba810ca5..6738dffc 100644 --- a/src/resources/1_0_2/schemas/groupcharacteristic.schema.js +++ b/src/resources/1_0_2/schemas/groupcharacteristic.schema.js @@ -1,63 +1,82 @@ const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Group.characteristic Schema + * @summary Groupcharacteristic Schema */ module.exports = new GraphQLObjectType({ - name: 'GroupCharacteristic', - description: 'Identifies the traits shared by members of the group.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'A code that identifies the kind of trait being asserted.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - _valueBoolean: { - type: require('./element.schema'), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueRange: { - type: new GraphQLNonNull(require('./range.schema')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - exclude: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates the characteristic is one that is NOT held by members of the group.', - }, - _exclude: { - type: require('./element.schema'), - description: - 'If true, indicates the characteristic is one that is NOT held by members of the group.', - }, - period: { - type: require('./period.schema'), - description: - 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', - }, - }), + name: 'Groupcharacteristic', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code that identifies the kind of trait being asserted.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _exclude: { + type: require('./element.schema.js'), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + exclude: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/groupmember.schema.js b/src/resources/1_0_2/schemas/groupmember.schema.js index 56c9ed24..5dcc4d78 100644 --- a/src/resources/1_0_2/schemas/groupmember.schema.js +++ b/src/resources/1_0_2/schemas/groupmember.schema.js @@ -1,39 +1,88 @@ const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Group.member Schema + * @summary Groupmember Schema */ module.exports = new GraphQLObjectType({ - name: 'GroupMember', - description: - 'Identifies the resource instances that are members of the group.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - entity: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', - }, - period: { - type: require('./period.schema'), - description: 'The period that the member was in the group, if known.', - }, - inactive: { - type: GraphQLBoolean, - description: - 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', - }, - _inactive: { - type: require('./element.schema'), - description: - 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', - }, - }), + name: 'Groupmember', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + entity: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Groupmemberentity_entity_Union', + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./device.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', + }, + period: { + type: require('./period.schema.js'), + description: 'The period that the member was in the group, if known.', + }, + _inactive: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + inactive: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/healthcareservice.schema.js b/src/resources/1_0_2/schemas/healthcareservice.schema.js index 339e56e9..d6c6e21c 100644 --- a/src/resources/1_0_2/schemas/healthcareservice.schema.js +++ b/src/resources/1_0_2/schemas/healthcareservice.schema.js @@ -1,20 +1,15 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let HealthcareServiceResourceType = new GraphQLEnumType({ - name: 'HealthcareServiceResourceType', - values: { - HealthcareService: { value: 'HealthcareService' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,163 +17,252 @@ let HealthcareServiceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'HealthcareService', - description: 'Base StructureDefinition for HealthcareService Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(HealthcareServiceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'External identifiers for this item.', - }, - providedBy: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for HealthcareService Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'HealthcareService_Enum_schema', + values: { HealthcareService: { value: 'HealthcareService' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'External identifiers for this item.', + }, + providedBy: { + type: new GraphQLUnionType({ + name: 'HealthcareServiceprovidedBy_providedBy_Union', description: 'The organization that provides this healthcare service.', - }, - serviceCategory: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the broad category of service being performed or delivered.', - }, - serviceType: { - type: new GraphQLList(require('./healthcareserviceservicetype.schema')), - description: - 'A specific type of service that may be delivered or performed.', - }, - location: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The location where this healthcare service may be provided.', - }, - serviceName: { - type: GraphQLString, - description: - 'Further description of the service as it would be presented to a consumer while searching.', - }, - _serviceName: { - type: require('./element.schema'), - description: - 'Further description of the service as it would be presented to a consumer while searching.', - }, - comment: { - type: GraphQLString, - description: - 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', - }, - extraDetails: { - type: GraphQLString, - description: - "Extra details about the service that can't be placed in the other fields.", - }, - _extraDetails: { - type: require('./element.schema'), - description: - "Extra details about the service that can't be placed in the other fields.", - }, - photo: { - type: require('./attachment.schema'), - description: - 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'List of contacts related to this specific healthcare service.', - }, - coverageArea: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The location(s) that this service is available to (not where the service is provided).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-provision-conditions - serviceProvisionCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The code(s) that detail the conditions under which the healthcare service is available/offered.', - }, - eligibility: { - type: require('./codeableconcept.schema'), - description: - 'Does this service have specific eligibility requirements that need to be met in order to use the service?.', - }, - eligibilityNote: { - type: GraphQLString, - description: 'Describes the eligibility conditions for the service.', - }, - _eligibilityNote: { - type: require('./element.schema'), - description: 'Describes the eligibility conditions for the service.', - }, - programName: { - type: new GraphQLList(GraphQLString), - description: - 'Program Names that can be used to categorize the service.', - }, - _programName: { - type: require('./element.schema'), - description: - 'Program Names that can be used to categorize the service.', - }, - characteristic: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Collection of characteristics (attributes).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-referral-method - referralMethod: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', - }, - publicKey: { - type: GraphQLString, - description: - "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", - }, - _publicKey: { - type: require('./element.schema'), - description: - "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", - }, - appointmentRequired: { - type: GraphQLBoolean, - description: - 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', - }, - _appointmentRequired: { - type: require('./element.schema'), - description: - 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', - }, - availableTime: { - type: new GraphQLList( - require('./healthcareserviceavailabletime.schema'), - ), - description: - 'A collection of times that the Service Site is available.', - }, - notAvailable: { - type: new GraphQLList( - require('./healthcareservicenotavailable.schema'), - ), - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - }, - availabilityExceptions: { - type: GraphQLString, - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - _availabilityExceptions: { - type: require('./element.schema'), - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization that provides this healthcare service.', + }, + serviceCategory: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the broad category of service being performed or delivered.', + }, + serviceType: { + type: new GraphQLList( + require('./healthcareserviceservicetype.schema.js'), + ), + description: + 'A specific type of service that may be delivered or performed.', + }, + location: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'HealthcareServicelocation_location_Union', + description: + 'The location where this healthcare service may be provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'The location where this healthcare service may be provided.', + }, + _serviceName: { + type: require('./element.schema.js'), + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + serviceName: { + type: GraphQLString, + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + comment: { + type: GraphQLString, + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + _extraDetails: { + type: require('./element.schema.js'), + description: + "Extra details about the service that can't be placed in the other fields.", + }, + extraDetails: { + type: GraphQLString, + description: + "Extra details about the service that can't be placed in the other fields.", + }, + photo: { + type: require('./attachment.schema.js'), + description: + 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'List of contacts related to this specific healthcare service.', + }, + coverageArea: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'HealthcareServicecoverageArea_coverageArea_Union', + description: + 'The location(s) that this service is available to (not where the service is provided).', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'The location(s) that this service is available to (not where the service is provided).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-provision-conditions + serviceProvisionCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The code(s) that detail the conditions under which the healthcare service is available/offered.', + }, + eligibility: { + type: require('./codeableconcept.schema.js'), + description: + 'Does this service have specific eligibility requirements that need to be met in order to use the service?', + }, + _eligibilityNote: { + type: require('./element.schema.js'), + description: 'Describes the eligibility conditions for the service.', + }, + eligibilityNote: { + type: GraphQLString, + description: 'Describes the eligibility conditions for the service.', + }, + _programName: { + type: require('./element.schema.js'), + description: 'Program Names that can be used to categorize the service.', + }, + programName: { + type: new GraphQLList(GraphQLString), + description: 'Program Names that can be used to categorize the service.', + }, + characteristic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Collection of characteristics (attributes).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-referral-method + referralMethod: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', + }, + _publicKey: { + type: require('./element.schema.js'), + description: + "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", + }, + publicKey: { + type: GraphQLString, + description: + "The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available.", + }, + _appointmentRequired: { + type: require('./element.schema.js'), + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + appointmentRequired: { + type: GraphQLBoolean, + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + availableTime: { + type: new GraphQLList( + require('./healthcareserviceavailabletime.schema.js'), + ), + description: 'A collection of times that the Service Site is available.', + }, + notAvailable: { + type: new GraphQLList( + require('./healthcareservicenotavailable.schema.js'), + ), + description: + 'The HealthcareService is not available during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.schema.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/healthcareserviceavailabletime.schema.js b/src/resources/1_0_2/schemas/healthcareserviceavailabletime.schema.js index 4d5a3437..978ffccf 100644 --- a/src/resources/1_0_2/schemas/healthcareserviceavailabletime.schema.js +++ b/src/resources/1_0_2/schemas/healthcareserviceavailabletime.schema.js @@ -1,58 +1,76 @@ -const CodeScalar = require('../scalars/code.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLBoolean, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary HealthcareService.availableTime Schema + * @summary HealthcareServiceavailableTime Schema */ module.exports = new GraphQLObjectType({ - name: 'HealthcareServiceAvailableTime', - description: 'A collection of times that the Service Site is available.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/days-of-week - daysOfWeek: { - type: new GraphQLList(CodeScalar), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - _daysOfWeek: { - type: require('./element.schema'), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - allDay: { - type: GraphQLBoolean, - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - _allDay: { - type: require('./element.schema'), - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - availableStartTime: { - type: TimeScalar, - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableStartTime: { - type: require('./element.schema'), - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - availableEndTime: { - type: TimeScalar, - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableEndTime: { - type: require('./element.schema'), - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - }), + name: 'HealthcareServiceavailableTime', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _daysOfWeek: { + type: require('./element.schema.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/days-of-week + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.schema.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.schema.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.schema.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/healthcareservicenotavailable.schema.js b/src/resources/1_0_2/schemas/healthcareservicenotavailable.schema.js index 5836a381..9bf73d2a 100644 --- a/src/resources/1_0_2/schemas/healthcareservicenotavailable.schema.js +++ b/src/resources/1_0_2/schemas/healthcareservicenotavailable.schema.js @@ -1,31 +1,53 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary HealthcareService.notAvailable Schema + * @summary HealthcareServicenotAvailable Schema */ module.exports = new GraphQLObjectType({ - name: 'HealthcareServiceNotAvailable', - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - _description: { - type: require('./element.schema'), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - during: { - type: require('./period.schema'), - description: - 'Service is not available (seasonally or for a public holiday) from this date.', - }, - }), + name: 'HealthcareServicenotAvailable', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.schema.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/healthcareserviceservicetype.schema.js b/src/resources/1_0_2/schemas/healthcareserviceservicetype.schema.js index 1a7fe53a..ef9f3bf1 100644 --- a/src/resources/1_0_2/schemas/healthcareserviceservicetype.schema.js +++ b/src/resources/1_0_2/schemas/healthcareserviceservicetype.schema.js @@ -1,26 +1,43 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary HealthcareService.serviceType Schema + * @summary HealthcareServiceserviceType Schema */ module.exports = new GraphQLObjectType({ - name: 'HealthcareServiceServiceType', - description: 'A specific type of service that may be delivered or performed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The specific type of service being delivered or performed.', - }, - specialty: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Collection of specialties handled by the service site. This is more of a medical term.', - }, - }), + name: 'HealthcareServiceserviceType', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The specific type of service being delivered or performed.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Collection of specialties handled by the service site. This is more of a medical term.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/humanname.schema.js b/src/resources/1_0_2/schemas/humanname.schema.js index ae2ff677..48c6e70f 100644 --- a/src/resources/1_0_2/schemas/humanname.schema.js +++ b/src/resources/1_0_2/schemas/humanname.schema.js @@ -1,7 +1,6 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -9,68 +8,82 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'HumanName', - description: 'Base StructureDefinition for HumanName Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/name-use - use: { - type: CodeScalar, - description: 'Identifies the purpose for this name.', - }, - _use: { - type: require('./element.schema'), - description: 'Identifies the purpose for this name.', - }, - text: { - type: GraphQLString, - description: 'A full text representation of the name.', - }, - _text: { - type: require('./element.schema'), - description: 'A full text representation of the name.', - }, - family: { - type: new GraphQLList(GraphQLString), - description: - 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', - }, - _family: { - type: require('./element.schema'), - description: - 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', - }, - given: { - type: new GraphQLList(GraphQLString), - description: 'Given name.', - }, - _given: { - type: require('./element.schema'), - description: 'Given name.', - }, - prefix: { - type: new GraphQLList(GraphQLString), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', - }, - _prefix: { - type: require('./element.schema'), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', - }, - suffix: { - type: new GraphQLList(GraphQLString), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', - }, - _suffix: { - type: require('./element.schema'), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', - }, - period: { - type: require('./period.schema'), - description: - 'Indicates the period of time when this name was valid for the named person.', - }, - }), + description: 'Base StructureDefinition for HumanName Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _use: { + type: require('./element.schema.js'), + description: 'Identifies the purpose for this name.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/name-use + use: { + type: CodeScalar, + description: 'Identifies the purpose for this name.', + }, + _text: { + type: require('./element.schema.js'), + description: 'A full text representation of the name.', + }, + text: { + type: GraphQLString, + description: 'A full text representation of the name.', + }, + _family: { + type: require('./element.schema.js'), + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + family: { + type: new GraphQLList(GraphQLString), + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + _given: { + type: require('./element.schema.js'), + description: 'Given name.', + }, + given: { + type: new GraphQLList(GraphQLString), + description: 'Given name.', + }, + _prefix: { + type: require('./element.schema.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + prefix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + _suffix: { + type: require('./element.schema.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + suffix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates the period of time when this name was valid for the named person.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/identifier.schema.js b/src/resources/1_0_2/schemas/identifier.schema.js index 4b1cf4e7..79f4fa2b 100644 --- a/src/resources/1_0_2/schemas/identifier.schema.js +++ b/src/resources/1_0_2/schemas/identifier.schema.js @@ -1,8 +1,12 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -10,52 +14,74 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Identifier', - description: 'Base StructureDefinition for Identifier Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-use - use: { - type: CodeScalar, - description: 'The purpose of this identifier.', - }, - _use: { - type: require('./element.schema'), - description: 'The purpose of this identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-type - type: { - type: require('./codeableconcept.schema'), - description: - 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', - }, - system: { - type: UriScalar, - description: - 'Establishes the namespace in which set of possible id values is unique.', - }, - _system: { - type: require('./element.schema'), - description: - 'Establishes the namespace in which set of possible id values is unique.', - }, - value: { - type: GraphQLString, - description: - 'The portion of the identifier typically displayed to the user and which is unique within the context of the system.', - }, - _value: { - type: require('./element.schema'), - description: - 'The portion of the identifier typically displayed to the user and which is unique within the context of the system.', - }, - period: { - type: require('./period.schema'), - description: - 'Time period during which identifier is/was valid for use.', - }, - assigner: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Identifier Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _use: { + type: require('./element.schema.js'), + description: 'The purpose of this identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-use + use: { + type: CodeScalar, + description: 'The purpose of this identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Establishes the namespace in which set of possible id values is unique.', + }, + system: { + type: UriScalar, + description: + 'Establishes the namespace in which set of possible id values is unique.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The portion of the identifier typically displayed to the user and which is unique within the context of the system.', + }, + value: { + type: GraphQLString, + description: + 'The portion of the identifier typically displayed to the user and which is unique within the context of the system.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period during which identifier is/was valid for use.', + }, + assigner: { + type: new GraphQLUnionType({ + name: 'Identifierassigner_assigner_Union', description: 'Organization that issued/manages the identifier.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that issued/manages the identifier.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/imagingobjectselection.schema.js b/src/resources/1_0_2/schemas/imagingobjectselection.schema.js index 4153e31c..5e0545e7 100644 --- a/src/resources/1_0_2/schemas/imagingobjectselection.schema.js +++ b/src/resources/1_0_2/schemas/imagingobjectselection.schema.js @@ -1,21 +1,16 @@ -const OidScalar = require('../scalars/oid.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImagingObjectSelectionResourceType = new GraphQLEnumType({ - name: 'ImagingObjectSelectionResourceType', - values: { - ImagingObjectSelection: { value: 'ImagingObjectSelection' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,65 +18,164 @@ let ImagingObjectSelectionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ImagingObjectSelection', - description: 'Base StructureDefinition for ImagingObjectSelection Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImagingObjectSelectionResourceType), - description: 'Type of this resource.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: - 'Instance UID of the DICOM KOS SOP Instances represented in this resource.', - }, - _uid: { - type: require('./element.schema'), - description: - 'Instance UID of the DICOM KOS SOP Instances represented in this resource.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/kos-title - title: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The reason for, or significance of, the selection of objects referenced in the resource.', - }, - description: { - type: GraphQLString, - description: - 'Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.', - }, - _description: { - type: require('./element.schema'), - description: - 'Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.', - }, - author: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ImagingObjectSelection Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingObjectSelection_Enum_schema', + values: { + ImagingObjectSelection: { value: 'ImagingObjectSelection' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _uid: { + type: require('./element.schema.js'), + description: + 'Instance UID of the DICOM KOS SOP Instances represented in this resource.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: + 'Instance UID of the DICOM KOS SOP Instances represented in this resource.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImagingObjectSelectionpatient_patient_Union', + description: + 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/kos-title + title: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The reason for, or significance of, the selection of objects referenced in the resource.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.', + }, + description: { + type: GraphQLString, + description: + 'Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.', + }, + author: { + type: new GraphQLUnionType({ + name: 'ImagingObjectSelectionauthor_author_Union', description: 'Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.', - }, - authoringTime: { - type: DateTimeScalar, - description: - 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', - }, - _authoringTime: { - type: require('./element.schema'), - description: - 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', - }, - study: { - type: new GraphQLList( - new GraphQLNonNull(require('./imagingobjectselectionstudy.schema')), - ), - description: - 'Study identity and locating information of the DICOM SOP instances in the selection.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.', + }, + _authoringTime: { + type: require('./element.schema.js'), + description: + 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', + }, + authoringTime: { + type: DateTimeScalar, + description: + 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', + }, + study: { + type: new GraphQLList( + new GraphQLNonNull(require('./imagingobjectselectionstudy.schema.js')), + ), + description: + 'Study identity and locating information of the DICOM SOP instances in the selection.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/imagingobjectselectionstudy.schema.js b/src/resources/1_0_2/schemas/imagingobjectselectionstudy.schema.js index 051fea67..38b575f0 100644 --- a/src/resources/1_0_2/schemas/imagingobjectselectionstudy.schema.js +++ b/src/resources/1_0_2/schemas/imagingobjectselectionstudy.schema.js @@ -1,51 +1,80 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImagingObjectSelection.study Schema + * @summary ImagingObjectSelectionstudy Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingObjectSelectionStudy', - description: - 'Study identity and locating information of the DICOM SOP instances in the selection.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: - 'Study instance UID of the SOP instances in the selection.', - }, - _uid: { - type: require('./element.schema'), - description: - 'Study instance UID of the SOP instances in the selection.', - }, - url: { - type: UriScalar, - description: - 'WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.', - }, - _url: { - type: require('./element.schema'), - description: - 'WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.', - }, - imagingStudy: { - type: require('./reference.schema'), + name: 'ImagingObjectSelectionstudy', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Study instance UID of the SOP instances in the selection.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Study instance UID of the SOP instances in the selection.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.', + }, + url: { + type: UriScalar, + description: + 'WADO-RS URL to retrieve the study. Note that this URL retrieves all SOP instances of the study, not only those in the selection.', + }, + imagingStudy: { + type: new GraphQLUnionType({ + name: 'ImagingObjectSelectionstudyimagingStudy_imagingStudy_Union', description: 'Reference to the Imaging Study in FHIR form.', - }, - series: { - type: new GraphQLList( - new GraphQLNonNull( - require('./imagingobjectselectionstudyseries.schema'), - ), + types: () => [require('./imagingstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + }, + }), + description: 'Reference to the Imaging Study in FHIR form.', + }, + series: { + type: new GraphQLList( + new GraphQLNonNull( + require('./imagingobjectselectionstudyseries.schema.js'), ), - description: - 'Series identity and locating information of the DICOM SOP instances in the selection.', - }, - }), + ), + description: + 'Series identity and locating information of the DICOM SOP instances in the selection.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/imagingobjectselectionstudyseries.schema.js b/src/resources/1_0_2/schemas/imagingobjectselectionstudyseries.schema.js index 7ade5c09..9c707ec7 100644 --- a/src/resources/1_0_2/schemas/imagingobjectselectionstudyseries.schema.js +++ b/src/resources/1_0_2/schemas/imagingobjectselectionstudyseries.schema.js @@ -1,47 +1,62 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImagingObjectSelection.study.series Schema + * @summary ImagingObjectSelectionstudyseries Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingObjectSelectionStudySeries', - description: - 'Series identity and locating information of the DICOM SOP instances in the selection.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - uid: { - type: OidScalar, - description: - 'Series instance UID of the SOP instances in the selection.', - }, - _uid: { - type: require('./element.schema'), - description: - 'Series instance UID of the SOP instances in the selection.', - }, - url: { - type: UriScalar, - description: - 'WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.', - }, - _url: { - type: require('./element.schema'), - description: - 'WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.', - }, - instance: { - type: new GraphQLList( - new GraphQLNonNull( - require('./imagingobjectselectionstudyseriesinstance.schema'), - ), + name: 'ImagingObjectSelectionstudyseries', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Series instance UID of the SOP instances in the selection.', + }, + uid: { + type: OidScalar, + description: 'Series instance UID of the SOP instances in the selection.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.', + }, + url: { + type: UriScalar, + description: + 'WADO-RS URL to retrieve the series. Note that this URL retrieves all SOP instances of the series not only those in the selection.', + }, + instance: { + type: new GraphQLList( + new GraphQLNonNull( + require('./imagingobjectselectionstudyseriesinstance.schema.js'), ), - description: - 'Identity and locating information of the selected DICOM SOP instances.', - }, - }), + ), + description: + 'Identity and locating information of the selected DICOM SOP instances.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/imagingobjectselectionstudyseriesinstance.schema.js b/src/resources/1_0_2/schemas/imagingobjectselectionstudyseriesinstance.schema.js index 2c1c3ff9..c675e10f 100644 --- a/src/resources/1_0_2/schemas/imagingobjectselectionstudyseriesinstance.schema.js +++ b/src/resources/1_0_2/schemas/imagingobjectselectionstudyseriesinstance.schema.js @@ -1,49 +1,66 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImagingObjectSelection.study.series.instance Schema + * @summary ImagingObjectSelectionstudyseriesinstance Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingObjectSelectionStudySeriesInstance', - description: - 'Identity and locating information of the selected DICOM SOP instances.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sopClass: { - type: new GraphQLNonNull(OidScalar), - description: 'SOP class UID of the selected instance.', - }, - _sopClass: { - type: require('./element.schema'), - description: 'SOP class UID of the selected instance.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'SOP Instance UID of the selected instance.', - }, - _uid: { - type: require('./element.schema'), - description: 'SOP Instance UID of the selected instance.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: 'WADO-RS URL to retrieve the DICOM SOP Instance.', - }, - _url: { - type: require('./element.schema'), - description: 'WADO-RS URL to retrieve the DICOM SOP Instance.', - }, - frames: { - type: new GraphQLList( - require('./imagingobjectselectionstudyseriesinstanceframes.schema'), - ), - description: - 'Identity and location information of the frames in the selected instance.', - }, - }), + name: 'ImagingObjectSelectionstudyseriesinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sopClass: { + type: require('./element.schema.js'), + description: 'SOP class UID of the selected instance.', + }, + sopClass: { + type: new GraphQLNonNull(OidScalar), + description: 'SOP class UID of the selected instance.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'SOP Instance UID of the selected instance.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'SOP Instance UID of the selected instance.', + }, + _url: { + type: require('./element.schema.js'), + description: 'WADO-RS URL to retrieve the DICOM SOP Instance.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'WADO-RS URL to retrieve the DICOM SOP Instance.', + }, + frames: { + type: new GraphQLList( + require('./imagingobjectselectionstudyseriesinstanceframes.schema.js'), + ), + description: + 'Identity and location information of the frames in the selected instance.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/imagingobjectselectionstudyseriesinstanceframes.schema.js b/src/resources/1_0_2/schemas/imagingobjectselectionstudyseriesinstanceframes.schema.js index 1d028e87..5aea524d 100644 --- a/src/resources/1_0_2/schemas/imagingobjectselectionstudyseriesinstanceframes.schema.js +++ b/src/resources/1_0_2/schemas/imagingobjectselectionstudyseriesinstanceframes.schema.js @@ -1,34 +1,51 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImagingObjectSelection.study.series.instance.frames Schema + * @summary ImagingObjectSelectionstudyseriesinstanceframes Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingObjectSelectionStudySeriesInstanceFrames', - description: - 'Identity and location information of the frames in the selected instance.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - frameNumbers: { - type: new GraphQLList(new GraphQLNonNull(UnsignedIntScalar)), - description: 'The frame numbers in the frame set.', - }, - _frameNumbers: { - type: require('./element.schema'), - description: 'The frame numbers in the frame set.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: 'WADO-RS URL to retrieve the DICOM frames.', - }, - _url: { - type: require('./element.schema'), - description: 'WADO-RS URL to retrieve the DICOM frames.', - }, - }), + name: 'ImagingObjectSelectionstudyseriesinstanceframes', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _frameNumbers: { + type: require('./element.schema.js'), + description: 'The frame numbers in the frame set.', + }, + frameNumbers: { + type: new GraphQLList(new GraphQLNonNull(UnsignedIntScalar)), + description: 'The frame numbers in the frame set.', + }, + _url: { + type: require('./element.schema.js'), + description: 'WADO-RS URL to retrieve the DICOM frames.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'WADO-RS URL to retrieve the DICOM frames.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/imagingstudy.schema.js b/src/resources/1_0_2/schemas/imagingstudy.schema.js index 0230dabe..da21d053 100644 --- a/src/resources/1_0_2/schemas/imagingstudy.schema.js +++ b/src/resources/1_0_2/schemas/imagingstudy.schema.js @@ -1,24 +1,17 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImagingStudyResourceType = new GraphQLEnumType({ - name: 'ImagingStudyResourceType', - values: { - ImagingStudy: { value: 'ImagingStudy' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -26,113 +19,223 @@ let ImagingStudyResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ImagingStudy', - description: 'Base StructureDefinition for ImagingStudy Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImagingStudyResourceType), - description: 'Type of this resource.', - }, - started: { - type: DateTimeScalar, - description: 'Date and Time the study started.', - }, - _started: { - type: require('./element.schema'), - description: 'Date and Time the study started.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient imaged in the study.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for the study.', - }, - _uid: { - type: require('./element.schema'), - description: 'Formal identifier for the study.', - }, - accession: { - type: require('./identifier.schema'), - description: - 'Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Other identifiers for the study.', - }, - order: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A list of the diagnostic orders that resulted in this imaging study being performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 - modalityList: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', - }, - referrer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ImagingStudy Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingStudy_Enum_schema', + values: { ImagingStudy: { value: 'ImagingStudy' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _started: { + type: require('./element.schema.js'), + description: 'Date and Time the study started.', + }, + started: { + type: DateTimeScalar, + description: 'Date and Time the study started.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImagingStudypatient_patient_Union', + description: 'The patient imaged in the study.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient imaged in the study.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Formal identifier for the study.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for the study.', + }, + accession: { + type: require('./identifier.schema.js'), + description: + 'Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Other identifiers for the study.', + }, + order: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyorder_order_Union', + description: + 'A list of the diagnostic orders that resulted in this imaging study being performed.', + types: () => [require('./diagnosticorder.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DiagnosticOrder') { + return require('./diagnosticorder.schema.js'); + } + }, + }), + ), + description: + 'A list of the diagnostic orders that resulted in this imaging study being performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 + modalityList: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', + }, + referrer: { + type: new GraphQLUnionType({ + name: 'ImagingStudyreferrer_referrer_Union', description: 'The requesting/referring physician.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/instance-availability - availability: { - type: CodeScalar, - description: 'Availability of study (online, offline or nearline).', - }, - _availability: { - type: require('./element.schema'), - description: 'Availability of study (online, offline or nearline).', - }, - url: { - type: UriScalar, - description: 'WADO-RS resource where Study is available.', - }, - _url: { - type: require('./element.schema'), - description: 'WADO-RS resource where Study is available.', - }, - numberOfSeries: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'Number of Series in Study.', - }, - _numberOfSeries: { - type: require('./element.schema'), - description: 'Number of Series in Study.', - }, - numberOfInstances: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'Number of SOP Instances in Study.', - }, - _numberOfInstances: { - type: require('./element.schema'), - description: 'Number of SOP Instances in Study.', - }, - procedure: { - type: new GraphQLList(require('./reference.schema')), - description: 'Type of procedure performed.', - }, - interpreter: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The requesting/referring physician.', + }, + _availability: { + type: require('./element.schema.js'), + description: 'Availability of study (online, offline or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/instance-availability + availability: { + type: CodeScalar, + description: 'Availability of study (online, offline or nearline).', + }, + _url: { + type: require('./element.schema.js'), + description: 'WADO-RS resource where Study is available.', + }, + url: { + type: UriScalar, + description: 'WADO-RS resource where Study is available.', + }, + _numberOfSeries: { + type: require('./element.schema.js'), + description: 'Number of Series in Study.', + }, + numberOfSeries: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'Number of Series in Study.', + }, + _numberOfInstances: { + type: require('./element.schema.js'), + description: 'Number of SOP Instances in Study.', + }, + numberOfInstances: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'Number of SOP Instances in Study.', + }, + procedure: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyprocedure_procedure_Union', + description: 'Type of procedure performed.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: 'Type of procedure performed.', + }, + interpreter: { + type: new GraphQLUnionType({ + name: 'ImagingStudyinterpreter_interpreter_Union', description: 'Who read the study and interpreted the images or other content.', - }, - description: { - type: GraphQLString, - description: - 'Institution-generated description or classification of the Study performed.', - }, - _description: { - type: require('./element.schema'), - description: - 'Institution-generated description or classification of the Study performed.', - }, - series: { - type: new GraphQLList(require('./imagingstudyseries.schema')), - description: - 'Each study has one or more series of images or other content.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Who read the study and interpreted the images or other content.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Institution-generated description or classification of the Study performed.', + }, + description: { + type: GraphQLString, + description: + 'Institution-generated description or classification of the Study performed.', + }, + series: { + type: new GraphQLList(require('./imagingstudyseries.schema.js')), + description: + 'Each study has one or more series of images or other content.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/imagingstudyseries.schema.js b/src/resources/1_0_2/schemas/imagingstudyseries.schema.js index bb13b69d..80083882 100644 --- a/src/resources/1_0_2/schemas/imagingstudyseries.schema.js +++ b/src/resources/1_0_2/schemas/imagingstudyseries.schema.js @@ -1,106 +1,124 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ImagingStudy.series Schema + * @summary ImagingStudyseries Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingStudySeries', - description: 'Each study has one or more series of images or other content.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - number: { - type: UnsignedIntScalar, - description: 'The Numeric identifier of this series in the study.', - }, - _number: { - type: require('./element.schema'), - description: 'The Numeric identifier of this series in the study.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 - modality: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The modality of this series sequence.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for this series.', - }, - _uid: { - type: require('./element.schema'), - description: 'Formal identifier for this series.', - }, - description: { - type: GraphQLString, - description: 'A description of the series.', - }, - _description: { - type: require('./element.schema'), - description: 'A description of the series.', - }, - numberOfInstances: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'Number of SOP Instances in Series.', - }, - _numberOfInstances: { - type: require('./element.schema'), - description: 'Number of SOP Instances in Series.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/instance-availability - availability: { - type: CodeScalar, - description: 'Availability of series (online, offline or nearline).', - }, - _availability: { - type: require('./element.schema'), - description: 'Availability of series (online, offline or nearline).', - }, - url: { - type: UriScalar, - description: - 'URI/URL specifying the location of the referenced series using WADO-RS.', - }, - _url: { - type: require('./element.schema'), - description: - 'URI/URL specifying the location of the referenced series using WADO-RS.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./coding.schema'), - description: - 'Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bodysite-laterality - laterality: { - type: require('./coding.schema'), - description: - 'Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.', - }, - started: { - type: DateTimeScalar, - description: 'The date and time the series was started.', - }, - _started: { - type: require('./element.schema'), - description: 'The date and time the series was started.', - }, - instance: { - type: new GraphQLList(require('./imagingstudyseriesinstance.schema')), - description: - 'A single SOP Instance within the series, e.g. an image, or presentation state.', - }, - }), + name: 'ImagingStudyseries', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _number: { + type: require('./element.schema.js'), + description: 'The Numeric identifier of this series in the study.', + }, + number: { + type: UnsignedIntScalar, + description: 'The Numeric identifier of this series in the study.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 + modality: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The modality of this series sequence.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Formal identifier for this series.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for this series.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of the series.', + }, + description: { + type: GraphQLString, + description: 'A description of the series.', + }, + _numberOfInstances: { + type: require('./element.schema.js'), + description: 'Number of SOP Instances in Series.', + }, + numberOfInstances: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'Number of SOP Instances in Series.', + }, + _availability: { + type: require('./element.schema.js'), + description: 'Availability of series (online, offline or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/instance-availability + availability: { + type: CodeScalar, + description: 'Availability of series (online, offline or nearline).', + }, + _url: { + type: require('./element.schema.js'), + description: + 'URI/URL specifying the location of the referenced series using WADO-RS.', + }, + url: { + type: UriScalar, + description: + 'URI/URL specifying the location of the referenced series using WADO-RS.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./coding.schema.js'), + description: + 'Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bodysite-laterality + laterality: { + type: require('./coding.schema.js'), + description: + 'Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.', + }, + _started: { + type: require('./element.schema.js'), + description: 'The date and time the series was started.', + }, + started: { + type: DateTimeScalar, + description: 'The date and time the series was started.', + }, + instance: { + type: new GraphQLList(require('./imagingstudyseriesinstance.schema.js')), + description: + 'A single SOP Instance within the series, e.g. an image, or presentation state.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/imagingstudyseriesinstance.schema.js b/src/resources/1_0_2/schemas/imagingstudyseriesinstance.schema.js index 23fcb413..54b64902 100644 --- a/src/resources/1_0_2/schemas/imagingstudyseriesinstance.schema.js +++ b/src/resources/1_0_2/schemas/imagingstudyseriesinstance.schema.js @@ -1,68 +1,85 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const OidScalar = require('../scalars/oid.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); /** * @name exports - * @summary ImagingStudy.series.instance Schema + * @summary ImagingStudyseriesinstance Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingStudySeriesInstance', - description: - 'A single SOP Instance within the series, e.g. an image, or presentation state.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - number: { - type: UnsignedIntScalar, - description: 'The number of instance in the series.', - }, - _number: { - type: require('./element.schema'), - description: 'The number of instance in the series.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for this image or other content.', - }, - _uid: { - type: require('./element.schema'), - description: 'Formal identifier for this image or other content.', - }, - sopClass: { - type: new GraphQLNonNull(OidScalar), - description: 'DICOM instance type.', - }, - _sopClass: { - type: require('./element.schema'), - description: 'DICOM instance type.', - }, - type: { - type: GraphQLString, - description: 'A human-friendly SOP Class name.', - }, - _type: { - type: require('./element.schema'), - description: 'A human-friendly SOP Class name.', - }, - title: { - type: GraphQLString, - description: 'The description of the instance.', - }, - _title: { - type: require('./element.schema'), - description: 'The description of the instance.', - }, - content: { - type: new GraphQLList(require('./attachment.schema')), - description: - 'Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.', - }, - }), + name: 'ImagingStudyseriesinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _number: { + type: require('./element.schema.js'), + description: 'The number of instance in the series.', + }, + number: { + type: UnsignedIntScalar, + description: 'The number of instance in the series.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Formal identifier for this image or other content.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for this image or other content.', + }, + _sopClass: { + type: require('./element.schema.js'), + description: 'DICOM instance type.', + }, + sopClass: { + type: new GraphQLNonNull(OidScalar), + description: 'DICOM instance type.', + }, + _type: { + type: require('./element.schema.js'), + description: 'A human-friendly SOP Class name.', + }, + type: { + type: GraphQLString, + description: 'A human-friendly SOP Class name.', + }, + _title: { + type: require('./element.schema.js'), + description: 'The description of the instance.', + }, + title: { + type: GraphQLString, + description: 'The description of the instance.', + }, + content: { + type: new GraphQLList(require('./attachment.schema.js')), + description: + 'Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/immunization.schema.js b/src/resources/1_0_2/schemas/immunization.schema.js index b60bf896..c26894ec 100644 --- a/src/resources/1_0_2/schemas/immunization.schema.js +++ b/src/resources/1_0_2/schemas/immunization.schema.js @@ -1,23 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImmunizationResourceType = new GraphQLEnumType({ - name: 'ImmunizationResourceType', - values: { - Immunization: { value: 'Immunization' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,136 +19,251 @@ let ImmunizationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Immunization', - description: 'Base StructureDefinition for Immunization Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImmunizationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A unique identifier assigned to this immunization record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current status of the vaccination event.', - }, - _status: { - type: require('./element.schema'), - description: 'Indicates the current status of the vaccination event.', - }, - date: { - type: DateTimeScalar, - description: 'Date vaccine administered or was to be administered.', - }, - _date: { - type: require('./element.schema'), - description: 'Date vaccine administered or was to be administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code - vaccineCode: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Vaccine that was administered or was to be administered.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The patient who either received or did not receive the immunization.', - }, - wasNotGiven: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'Indicates if the vaccination was or was not given.', - }, - _wasNotGiven: { - type: require('./element.schema'), - description: 'Indicates if the vaccination was or was not given.', - }, - reported: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'True if this administration was reported rather than directly administered.', - }, - _reported: { - type: require('./element.schema'), - description: - 'True if this administration was reported rather than directly administered.', - }, - performer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Immunization Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Immunization_Enum_schema', + values: { Immunization: { value: 'Immunization' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'A unique identifier assigned to this immunization record.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current status of the vaccination event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current status of the vaccination event.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date vaccine administered or was to be administered.', + }, + date: { + type: DateTimeScalar, + description: 'Date vaccine administered or was to be administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code + vaccineCode: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Vaccine that was administered or was to be administered.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Immunizationpatient_patient_Union', + description: + 'The patient who either received or did not receive the immunization.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The patient who either received or did not receive the immunization.', + }, + _wasNotGiven: { + type: require('./element.schema.js'), + description: 'Indicates if the vaccination was or was not given.', + }, + wasNotGiven: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Indicates if the vaccination was or was not given.', + }, + _reported: { + type: require('./element.schema.js'), + description: + 'True if this administration was reported rather than directly administered.', + }, + reported: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if this administration was reported rather than directly administered.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'Immunizationperformer_performer_Union', description: 'Clinician who administered the vaccine.', - }, - requester: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'Clinician who administered the vaccine.', + }, + requester: { + type: new GraphQLUnionType({ + name: 'Immunizationrequester_requester_Union', description: 'Clinician who ordered the vaccination.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'Clinician who ordered the vaccination.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Immunizationencounter_encounter_Union', description: 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', - }, - manufacturer: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', + }, + manufacturer: { + type: new GraphQLUnionType({ + name: 'Immunizationmanufacturer_manufacturer_Union', description: 'Name of vaccine manufacturer.', - }, - location: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Name of vaccine manufacturer.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Immunizationlocation_location_Union', description: 'The service delivery location where the vaccine administration occurred.', - }, - lotNumber: { - type: GraphQLString, - description: 'Lot number of the vaccine product.', - }, - _lotNumber: { - type: require('./element.schema'), - description: 'Lot number of the vaccine product.', - }, - expirationDate: { - type: DateScalar, - description: 'Date vaccine batch expires.', - }, - _expirationDate: { - type: require('./element.schema'), - description: 'Date vaccine batch expires.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-site - site: { - type: require('./codeableconcept.schema'), - description: 'Body site where vaccine was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-route - route: { - type: require('./codeableconcept.schema'), - description: - 'The path by which the vaccine product is taken into the body.', - }, - doseQuantity: { - type: require('./quantity.schema'), - description: 'The quantity of vaccine product that was administered.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Extra information about the immunization that is not conveyed by the other attributes.', - }, - explanation: { - type: require('./immunizationexplanation.schema'), - description: 'Reasons why a vaccine was or was not administered.', - }, - reaction: { - type: new GraphQLList(require('./immunizationreaction.schema')), - description: - 'Categorical data indicating that an adverse event is associated in time to an immunization.', - }, - vaccinationProtocol: { - type: new GraphQLList( - require('./immunizationvaccinationprotocol.schema'), - ), - description: - 'Contains information about the protocol(s) under which the vaccine was administered.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The service delivery location where the vaccine administration occurred.', + }, + _lotNumber: { + type: require('./element.schema.js'), + description: 'Lot number of the vaccine product.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number of the vaccine product.', + }, + _expirationDate: { + type: require('./element.schema.js'), + description: 'Date vaccine batch expires.', + }, + expirationDate: { + type: DateScalar, + description: 'Date vaccine batch expires.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-site + site: { + type: require('./codeableconcept.schema.js'), + description: 'Body site where vaccine was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-route + route: { + type: require('./codeableconcept.schema.js'), + description: + 'The path by which the vaccine product is taken into the body.', + }, + doseQuantity: { + type: require('./quantity.schema.js'), + description: 'The quantity of vaccine product that was administered.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the immunization that is not conveyed by the other attributes.', + }, + explanation: { + type: require('./immunizationexplanation.schema.js'), + description: 'Reasons why a vaccine was or was not administered.', + }, + reaction: { + type: new GraphQLList(require('./immunizationreaction.schema.js')), + description: + 'Categorical data indicating that an adverse event is associated in time to an immunization.', + }, + vaccinationProtocol: { + type: new GraphQLList( + require('./immunizationvaccinationprotocol.schema.js'), + ), + description: + 'Contains information about the protocol(s) under which the vaccine was administered.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/immunizationexplanation.schema.js b/src/resources/1_0_2/schemas/immunizationexplanation.schema.js index c487c29a..f1918a50 100644 --- a/src/resources/1_0_2/schemas/immunizationexplanation.schema.js +++ b/src/resources/1_0_2/schemas/immunizationexplanation.schema.js @@ -1,25 +1,43 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Immunization.explanation Schema + * @summary Immunizationexplanation Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationExplanation', - description: 'Reasons why a vaccine was or was not administered.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-reason - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reasons why a vaccine was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/no-immunization-reason - reasonNotGiven: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reason why a vaccine was not administered.', - }, - }), + name: 'Immunizationexplanation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-reason + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reasons why a vaccine was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/no-immunization-reason + reasonNotGiven: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason why a vaccine was not administered.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/immunizationreaction.schema.js b/src/resources/1_0_2/schemas/immunizationreaction.schema.js index ba1b24fa..5a3e8ae8 100644 --- a/src/resources/1_0_2/schemas/immunizationreaction.schema.js +++ b/src/resources/1_0_2/schemas/immunizationreaction.schema.js @@ -1,37 +1,68 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Immunization.reaction Schema + * @summary Immunizationreaction Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationReaction', - description: - 'Categorical data indicating that an adverse event is associated in time to an immunization.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - date: { - type: DateTimeScalar, - description: 'Date of reaction to the immunization.', - }, - _date: { - type: require('./element.schema'), - description: 'Date of reaction to the immunization.', - }, - detail: { - type: require('./reference.schema'), + name: 'Immunizationreaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date of reaction to the immunization.', + }, + date: { + type: DateTimeScalar, + description: 'Date of reaction to the immunization.', + }, + detail: { + type: new GraphQLUnionType({ + name: 'Immunizationreactiondetail_detail_Union', description: 'Details of the reaction.', - }, - reported: { - type: GraphQLBoolean, - description: 'Self-reported indicator.', - }, - _reported: { - type: require('./element.schema'), - description: 'Self-reported indicator.', - }, - }), + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + description: 'Details of the reaction.', + }, + _reported: { + type: require('./element.schema.js'), + description: 'Self-reported indicator.', + }, + reported: { + type: GraphQLBoolean, + description: 'Self-reported indicator.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/immunizationrecommendation.schema.js b/src/resources/1_0_2/schemas/immunizationrecommendation.schema.js index a21e5274..3c6b4145 100644 --- a/src/resources/1_0_2/schemas/immunizationrecommendation.schema.js +++ b/src/resources/1_0_2/schemas/immunizationrecommendation.schema.js @@ -1,19 +1,13 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImmunizationRecommendationResourceType = new GraphQLEnumType({ - name: 'ImmunizationRecommendationResourceType', - values: { - ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,29 +16,99 @@ let ImmunizationRecommendationResourceType = new GraphQLEnumType({ module.exports = new GraphQLObjectType({ name: 'ImmunizationRecommendation', description: - 'Base StructureDefinition for ImmunizationRecommendation Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImmunizationRecommendationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A unique identifier assigned to this particular recommendation record.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient for whom the recommendations are for.', - }, - recommendation: { - type: new GraphQLList( - new GraphQLNonNull( - require('./immunizationrecommendationrecommendation.schema'), - ), + 'Base StructureDefinition for ImmunizationRecommendation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImmunizationRecommendation_Enum_schema', + values: { + ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'A unique identifier assigned to this particular recommendation record.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImmunizationRecommendationpatient_patient_Union', + description: 'The patient for whom the recommendations are for.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient for whom the recommendations are for.', + }, + recommendation: { + type: new GraphQLList( + new GraphQLNonNull( + require('./immunizationrecommendationrecommendation.schema.js'), ), - description: 'Vaccine administration recommendations.', - }, - }), + ), + description: 'Vaccine administration recommendations.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/immunizationrecommendationrecommendation.schema.js b/src/resources/1_0_2/schemas/immunizationrecommendationrecommendation.schema.js index 46088cd5..5a95187a 100644 --- a/src/resources/1_0_2/schemas/immunizationrecommendationrecommendation.schema.js +++ b/src/resources/1_0_2/schemas/immunizationrecommendationrecommendation.schema.js @@ -1,67 +1,122 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation Schema + * @summary ImmunizationRecommendationrecommendation Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationRecommendationRecommendation', - description: 'Vaccine administration recommendations.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The date the immunization recommendation was created.', - }, - _date: { - type: require('./element.schema'), - description: 'The date the immunization recommendation was created.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code - vaccineCode: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Vaccine that pertains to the recommendation.', - }, - doseNumber: { - type: PositiveIntScalar, - description: - 'This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).', - }, - _doseNumber: { - type: require('./element.schema'), - description: - 'This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-status - forecastStatus: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Vaccine administration status.', - }, - dateCriterion: { - type: new GraphQLList( - require('./immunizationrecommendationrecommendationdatecriterion.schema'), - ), - description: - 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', - }, - protocol: { - type: require('./immunizationrecommendationrecommendationprotocol.schema'), - description: - 'Contains information about the protocol under which the vaccine was administered.', - }, - supportingImmunization: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Immunization event history that supports the status and recommendation.', - }, - supportingPatientInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', - }, - }), + name: 'ImmunizationRecommendationrecommendation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date the immunization recommendation was created.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date the immunization recommendation was created.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code + vaccineCode: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Vaccine that pertains to the recommendation.', + }, + _doseNumber: { + type: require('./element.schema.js'), + description: + 'This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).', + }, + doseNumber: { + type: PositiveIntScalar, + description: + 'This indicates the next recommended dose number (e.g. dose 2 is the next recommended dose).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-status + forecastStatus: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Vaccine administration status.', + }, + dateCriterion: { + type: new GraphQLList( + require('./immunizationrecommendationrecommendationdatecriterion.schema.js'), + ), + description: + 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', + }, + protocol: { + type: require('./immunizationrecommendationrecommendationprotocol.schema.js'), + description: + 'Contains information about the protocol under which the vaccine was administered.', + }, + supportingImmunization: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ImmunizationRecommendationrecommendationsupportingImmunization_supportingImmunization_Union', + description: + 'Immunization event history that supports the status and recommendation.', + types: () => [require('./immunization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + }, + }), + ), + description: + 'Immunization event history that supports the status and recommendation.', + }, + supportingPatientInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ImmunizationRecommendationrecommendationsupportingPatientInformation_supportingPatientInformation_Union', + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + types: () => [ + require('./observation.schema.js'), + require('./allergyintolerance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + }, + }), + ), + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js b/src/resources/1_0_2/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js index ad9d9ad1..be302b9c 100644 --- a/src/resources/1_0_2/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js +++ b/src/resources/1_0_2/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js @@ -1,33 +1,48 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation.dateCriterion Schema + * @summary ImmunizationRecommendationrecommendationdateCriterion Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationRecommendationRecommendationDateCriterion', - description: - 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', - }, - value: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date whose meaning is specified by dateCriterion.code.', - }, - _value: { - type: require('./element.schema'), - description: - 'The date whose meaning is specified by dateCriterion.code.', - }, - }), + name: 'ImmunizationRecommendationrecommendationdateCriterion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + value: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/immunizationrecommendationrecommendationprotocol.schema.js b/src/resources/1_0_2/schemas/immunizationrecommendationrecommendationprotocol.schema.js index 3d816a8c..ea1016fb 100644 --- a/src/resources/1_0_2/schemas/immunizationrecommendationrecommendationprotocol.schema.js +++ b/src/resources/1_0_2/schemas/immunizationrecommendationrecommendationprotocol.schema.js @@ -1,51 +1,85 @@ -const { GraphQLObjectType, GraphQLInt, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLInt, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation.protocol Schema + * @summary ImmunizationRecommendationrecommendationprotocol Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationRecommendationRecommendationProtocol', - description: - 'Contains information about the protocol under which the vaccine was administered.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - doseSequence: { - type: GraphQLInt, - description: - 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', - }, - _doseSequence: { - type: require('./element.schema'), - description: - 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', - }, - description: { - type: GraphQLString, - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - _description: { - type: require('./element.schema'), - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - authority: { - type: require('./reference.schema'), + name: 'ImmunizationRecommendationrecommendationprotocol', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _doseSequence: { + type: require('./element.schema.js'), + description: + 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', + }, + doseSequence: { + type: GraphQLInt, + description: + 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + authority: { + type: new GraphQLUnionType({ + name: + 'ImmunizationRecommendationrecommendationprotocolauthority_authority_Union', description: 'Indicates the authority who published the protocol. For example, ACIP.', - }, - series: { - type: GraphQLString, - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - _series: { - type: require('./element.schema'), - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the authority who published the protocol. For example, ACIP.', + }, + _series: { + type: require('./element.schema.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/immunizationvaccinationprotocol.schema.js b/src/resources/1_0_2/schemas/immunizationvaccinationprotocol.schema.js index f94da60d..d93314b6 100644 --- a/src/resources/1_0_2/schemas/immunizationvaccinationprotocol.schema.js +++ b/src/resources/1_0_2/schemas/immunizationvaccinationprotocol.schema.js @@ -1,82 +1,110 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Immunization.vaccinationProtocol Schema + * @summary ImmunizationvaccinationProtocol Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationVaccinationProtocol', - description: - 'Contains information about the protocol(s) under which the vaccine was administered.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - doseSequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'Nominal position in a series.', - }, - _doseSequence: { - type: require('./element.schema'), - description: 'Nominal position in a series.', - }, - description: { - type: GraphQLString, - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - _description: { - type: require('./element.schema'), - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - authority: { - type: require('./reference.schema'), + name: 'ImmunizationvaccinationProtocol', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _doseSequence: { + type: require('./element.schema.js'), + description: 'Nominal position in a series.', + }, + doseSequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'Nominal position in a series.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + authority: { + type: new GraphQLUnionType({ + name: 'ImmunizationvaccinationProtocolauthority_authority_Union', description: 'Indicates the authority who published the protocol. E.g. ACIP.', - }, - series: { - type: GraphQLString, - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - _series: { - type: require('./element.schema'), - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - seriesDoses: { - type: PositiveIntScalar, - description: 'The recommended number of doses to achieve immunity.', - }, - _seriesDoses: { - type: require('./element.schema'), - description: 'The recommended number of doses to achieve immunity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-target - targetDisease: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.schema')), - ), - description: 'The targeted disease.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status - doseStatus: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Indicates if the immunization event should 'count' against the protocol.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status-reason - doseStatusReason: { - type: require('./codeableconcept.schema'), - description: - 'Provides an explanation as to why an immunization event should or should not count against the protocol.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the authority who published the protocol. E.g. ACIP.', + }, + _series: { + type: require('./element.schema.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + _seriesDoses: { + type: require('./element.schema.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDoses: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-target + targetDisease: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.schema.js')), + ), + description: 'The targeted disease.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status + doseStatus: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Indicates if the immunization event should 'count' against the protocol.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status-reason + doseStatusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides an explanation as to why an immunization event should or should not count against the protocol.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/implementationguide.schema.js b/src/resources/1_0_2/schemas/implementationguide.schema.js index 8f1055f5..99e6e836 100644 --- a/src/resources/1_0_2/schemas/implementationguide.schema.js +++ b/src/resources/1_0_2/schemas/implementationguide.schema.js @@ -1,24 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImplementationGuideResourceType = new GraphQLEnumType({ - name: 'ImplementationGuideResourceType', - values: { - ImplementationGuide: { value: 'ImplementationGuide' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,156 +18,213 @@ let ImplementationGuideResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ImplementationGuide', - description: 'Base StructureDefinition for ImplementationGuide Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImplementationGuideResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the Implementation Guide.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name identifying the Implementation Guide.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the Implementation Guide.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the Implementation Guide.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the implementation guide.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the implementation guide.', - }, - contact: { - type: new GraphQLList(require('./implementationguidecontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the Implementation Guide and its use.', - }, - _description: { - type: require('./element.schema'), - description: - 'A free text natural language description of the Implementation Guide and its use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - fhirVersion: { - type: IdScalar, - description: - 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', - }, - _fhirVersion: { - type: require('./element.schema'), - description: - 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', - }, - dependency: { - type: new GraphQLList( - require('./implementationguidedependency.schema'), - ), - description: - 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', - }, - package: { - type: new GraphQLList( - new GraphQLNonNull(require('./implementationguidepackage.schema')), - ), - description: - 'A logical group of resources. Logical groups can be used when building pages.', - }, - global: { - type: new GraphQLList(require('./implementationguideglobal.schema')), - description: - 'A set of profiles that all resources covered by this implementation guide must conform to.', - }, - binary: { - type: new GraphQLList(UriScalar), - description: - 'A binary file that is included in the implementation guide when it is published.', - }, - _binary: { - type: require('./element.schema'), - description: - 'A binary file that is included in the implementation guide when it is published.', - }, - page: { - type: new GraphQLNonNull(require('./implementationguidepage.schema')), - description: - 'A page / section in the implementation guide. The root page is the implementation guide home page.', - }, - }), + description: 'Base StructureDefinition for ImplementationGuide Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImplementationGuide_Enum_schema', + values: { ImplementationGuide: { value: 'ImplementationGuide' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name identifying the Implementation Guide.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the Implementation Guide.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the Implementation Guide.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the Implementation Guide.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the implementation guide.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the implementation guide.', + }, + contact: { + type: new GraphQLList(require('./implementationguidecontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A free text natural language description of the Implementation Guide and its use.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the Implementation Guide and its use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', + }, + fhirVersion: { + type: IdScalar, + description: + 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', + }, + dependency: { + type: new GraphQLList( + require('./implementationguidedependency.schema.js'), + ), + description: + 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', + }, + package: { + type: new GraphQLList( + new GraphQLNonNull(require('./implementationguidepackage.schema.js')), + ), + description: + 'A logical group of resources. Logical groups can be used when building pages.', + }, + global: { + type: new GraphQLList(require('./implementationguideglobal.schema.js')), + description: + 'A set of profiles that all resources covered by this implementation guide must conform to.', + }, + _binary: { + type: require('./element.schema.js'), + description: + 'A binary file that is included in the implementation guide when it is published.', + }, + binary: { + type: new GraphQLList(UriScalar), + description: + 'A binary file that is included in the implementation guide when it is published.', + }, + page: { + type: new GraphQLNonNull(require('./implementationguidepage.schema.js')), + description: + 'A page / section in the implementation guide. The root page is the implementation guide home page.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/implementationguidecontact.schema.js b/src/resources/1_0_2/schemas/implementationguidecontact.schema.js index 23267b58..4d2e9b90 100644 --- a/src/resources/1_0_2/schemas/implementationguidecontact.schema.js +++ b/src/resources/1_0_2/schemas/implementationguidecontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ImplementationGuide.contact Schema + * @summary ImplementationGuidecontact Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuideContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the implementation guide.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the implementation guide.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'ImplementationGuidecontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the implementation guide.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the implementation guide.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/implementationguidedependency.schema.js b/src/resources/1_0_2/schemas/implementationguidedependency.schema.js index 5a965b34..21b6c9d6 100644 --- a/src/resources/1_0_2/schemas/implementationguidedependency.schema.js +++ b/src/resources/1_0_2/schemas/implementationguidedependency.schema.js @@ -1,37 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImplementationGuide.dependency Schema + * @summary ImplementationGuidedependency Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuideDependency', - description: - 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-dependency-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the dependency is represented when the guide is published.', - }, - _type: { - type: require('./element.schema'), - description: - 'How the dependency is represented when the guide is published.', - }, - uri: { - type: new GraphQLNonNull(UriScalar), - description: 'Where the dependency is located.', - }, - _uri: { - type: require('./element.schema'), - description: 'Where the dependency is located.', - }, - }), + name: 'ImplementationGuidedependency', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'How the dependency is represented when the guide is published.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-dependency-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the dependency is represented when the guide is published.', + }, + _uri: { + type: require('./element.schema.js'), + description: 'Where the dependency is located.', + }, + uri: { + type: new GraphQLNonNull(UriScalar), + description: 'Where the dependency is located.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/implementationguideglobal.schema.js b/src/resources/1_0_2/schemas/implementationguideglobal.schema.js index 3b480008..83e47c63 100644 --- a/src/resources/1_0_2/schemas/implementationguideglobal.schema.js +++ b/src/resources/1_0_2/schemas/implementationguideglobal.schema.js @@ -1,31 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ImplementationGuide.global Schema + * @summary ImplementationGuideglobal Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuideGlobal', - description: - 'A set of profiles that all resources covered by this implementation guide must conform to.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of resource that all instances must conform to.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of resource that all instances must conform to.', - }, - profile: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the profile that all instances must conform to.', - }, - }), + name: 'ImplementationGuideglobal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of resource that all instances must conform to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of resource that all instances must conform to.', + }, + profile: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImplementationGuideglobalprofile_profile_Union', + description: + 'A reference to the profile that all instances must conform to.', + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: + 'A reference to the profile that all instances must conform to.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/implementationguidepackage.schema.js b/src/resources/1_0_2/schemas/implementationguidepackage.schema.js index b243bd7e..a3ce06a1 100644 --- a/src/resources/1_0_2/schemas/implementationguidepackage.schema.js +++ b/src/resources/1_0_2/schemas/implementationguidepackage.schema.js @@ -1,46 +1,63 @@ const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ImplementationGuide.package Schema + * @summary ImplementationGuidepackage Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuidePackage', - description: - 'A logical group of resources. Logical groups can be used when building pages.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name for the group, as used in page.package.', - }, - _name: { - type: require('./element.schema'), - description: 'The name for the group, as used in page.package.', - }, - description: { - type: GraphQLString, - description: 'Human readable text describing the package.', - }, - _description: { - type: require('./element.schema'), - description: 'Human readable text describing the package.', - }, - resource: { - type: new GraphQLList( - new GraphQLNonNull( - require('./implementationguidepackageresource.schema'), - ), + name: 'ImplementationGuidepackage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name for the group, as used in page.package.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name for the group, as used in page.package.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Human readable text describing the package.', + }, + description: { + type: GraphQLString, + description: 'Human readable text describing the package.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull( + require('./implementationguidepackageresource.schema.js'), ), - description: - 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', - }, - }), + ), + description: + 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/implementationguidepackageresource.schema.js b/src/resources/1_0_2/schemas/implementationguidepackageresource.schema.js index 4e59cbb8..280d7f1d 100644 --- a/src/resources/1_0_2/schemas/implementationguidepackageresource.schema.js +++ b/src/resources/1_0_2/schemas/implementationguidepackageresource.schema.js @@ -1,74 +1,119 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImplementationGuide.package.resource Schema + * @summary ImplementationGuidepackageresource Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuidePackageResource', - description: - 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-resource-purpose - purpose: { - type: new GraphQLNonNull(CodeScalar), - description: 'Why the resource is included in the guide.', - }, - _purpose: { - type: require('./element.schema'), - description: 'Why the resource is included in the guide.', - }, - name: { - type: GraphQLString, - description: - 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', - }, - _name: { - type: require('./element.schema'), - description: - 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', - }, - description: { - type: GraphQLString, - description: - 'A description of the reason that a resource has been included in the implementation guide.', - }, - _description: { - type: require('./element.schema'), - description: - 'A description of the reason that a resource has been included in the implementation guide.', - }, - acronym: { - type: GraphQLString, - description: - 'A short code that may be used to identify the resource throughout the implementation guide.', - }, - _acronym: { - type: require('./element.schema'), - description: - 'A short code that may be used to identify the resource throughout the implementation guide.', - }, - sourceUri: { - type: new GraphQLNonNull(UriScalar), - description: 'Where this resource is found.', - }, - _sourceUri: { - type: require('./element.schema'), - description: 'Where this resource is found.', - }, - sourceReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Where this resource is found.', - }, - exampleFor: { - type: require('./reference.schema'), + name: 'ImplementationGuidepackageresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _purpose: { + type: require('./element.schema.js'), + description: 'Why the resource is included in the guide.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-resource-purpose + purpose: { + type: new GraphQLNonNull(CodeScalar), + description: 'Why the resource is included in the guide.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + name: { + type: GraphQLString, + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + description: { + type: GraphQLString, + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + _acronym: { + type: require('./element.schema.js'), + description: + 'A short code that may be used to identify the resource throughout the implementation guide.', + }, + acronym: { + type: GraphQLString, + description: + 'A short code that may be used to identify the resource throughout the implementation guide.', + }, + _sourceUri: { + type: require('./element.schema.js'), + description: 'Where this resource is found.', + }, + sourceUri: { + type: new GraphQLNonNull(UriScalar), + description: 'Where this resource is found.', + }, + sourceReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ImplementationGuidepackageresourcesourceReference_sourceReference_Union', + description: 'Where this resource is found.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Where this resource is found.', + }, + exampleFor: { + type: new GraphQLUnionType({ + name: 'ImplementationGuidepackageresourceexampleFor_exampleFor_Union', description: 'Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.', - }, - }), + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + description: + 'Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/implementationguidepage.schema.js b/src/resources/1_0_2/schemas/implementationguidepage.schema.js index d3a599f4..3579d55e 100644 --- a/src/resources/1_0_2/schemas/implementationguidepage.schema.js +++ b/src/resources/1_0_2/schemas/implementationguidepage.schema.js @@ -1,81 +1,98 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ImplementationGuide.page Schema + * @summary ImplementationGuidepage Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuidePage', - description: - 'A page / section in the implementation guide. The root page is the implementation guide home page.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - source: { - type: new GraphQLNonNull(UriScalar), - description: 'The source address for the page.', - }, - _source: { - type: require('./element.schema'), - description: 'The source address for the page.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', - }, - _name: { - type: require('./element.schema'), - description: - 'A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-page-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', - }, - _kind: { - type: require('./element.schema'), - description: - 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLList(CodeScalar), - description: - 'For constructed pages, what kind of resources to include in the list.', - }, - _type: { - type: require('./element.schema'), - description: - 'For constructed pages, what kind of resources to include in the list.', - }, - package: { - type: new GraphQLList(GraphQLString), - description: - 'For constructed pages, a list of packages to include in the page (or else empty for everything).', - }, - _package: { - type: require('./element.schema'), - description: - 'For constructed pages, a list of packages to include in the page (or else empty for everything).', - }, - format: { - type: CodeScalar, - description: 'The format of the page.', - }, - _format: { - type: require('./element.schema'), - description: 'The format of the page.', - }, - }), + name: 'ImplementationGuidepage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _source: { + type: require('./element.schema.js'), + description: 'The source address for the page.', + }, + source: { + type: new GraphQLNonNull(UriScalar), + description: 'The source address for the page.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-page-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'For constructed pages, what kind of resources to include in the list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLList(CodeScalar), + description: + 'For constructed pages, what kind of resources to include in the list.', + }, + _package: { + type: require('./element.schema.js'), + description: + 'For constructed pages, a list of packages to include in the page (or else empty for everything).', + }, + package: { + type: new GraphQLList(GraphQLString), + description: + 'For constructed pages, a list of packages to include in the page (or else empty for everything).', + }, + _format: { + type: require('./element.schema.js'), + description: 'The format of the page.', + }, + format: { + type: CodeScalar, + description: 'The format of the page.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/list.schema.js b/src/resources/1_0_2/schemas/list.schema.js index 2ea7c250..d7056730 100644 --- a/src/resources/1_0_2/schemas/list.schema.js +++ b/src/resources/1_0_2/schemas/list.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ListResourceType = new GraphQLEnumType({ - name: 'ListResourceType', - values: { - List: { value: 'List' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,96 +17,207 @@ let ListResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'List', - description: 'Base StructureDefinition for List Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ListResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier for the List assigned for business purposes outside the context of FHIR.', - }, - title: { - type: GraphQLString, - description: 'A label for the list assigned by the author.', - }, - _title: { - type: require('./element.schema'), - description: 'A label for the list assigned by the author.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-example-codes - code: { - type: require('./codeableconcept.schema'), - description: - 'This code defines the purpose of the list - why it was created.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for List Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'List_Enum_schema', + values: { List: { value: 'List' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier for the List assigned for business purposes outside the context of FHIR.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A label for the list assigned by the author.', + }, + title: { + type: GraphQLString, + description: 'A label for the list assigned by the author.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-example-codes + code: { + type: require('./codeableconcept.schema.js'), + description: + 'This code defines the purpose of the list - why it was created.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Listsubject_subject_Union', description: 'The common subject (or patient) of the resources that are in the list, if there is one.', - }, - source: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The common subject (or patient) of the resources that are in the list, if there is one.', + }, + source: { + type: new GraphQLUnionType({ + name: 'Listsource_source_Union', description: 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Listencounter_encounter_Union', description: 'The encounter that is the context in which this list was created.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current state of this list.', - }, - _status: { - type: require('./element.schema'), - description: 'Indicates the current state of this list.', - }, - date: { - type: DateTimeScalar, - description: 'The date that the list was prepared.', - }, - _date: { - type: require('./element.schema'), - description: 'The date that the list was prepared.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-order - orderedBy: { - type: require('./codeableconcept.schema'), - description: 'What order applies to the items in the list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - _mode: { - type: require('./element.schema'), - description: - 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - note: { - type: GraphQLString, - description: 'Comments that apply to the overall list.', - }, - _note: { - type: require('./element.schema'), - description: 'Comments that apply to the overall list.', - }, - entry: { - type: new GraphQLList(require('./listentry.schema')), - description: 'Entries in this list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason - emptyReason: { - type: require('./codeableconcept.schema'), - description: 'If the list is empty, why the list is empty.', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The encounter that is the context in which this list was created.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current state of this list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this list.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date that the list was prepared.', + }, + date: { + type: DateTimeScalar, + description: 'The date that the list was prepared.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-order + orderedBy: { + type: require('./codeableconcept.schema.js'), + description: 'What order applies to the items in the list.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + _note: { + type: require('./element.schema.js'), + description: 'Comments that apply to the overall list.', + }, + note: { + type: GraphQLString, + description: 'Comments that apply to the overall list.', + }, + entry: { + type: new GraphQLList(require('./listentry.schema.js')), + description: 'Entries in this list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason + emptyReason: { + type: require('./codeableconcept.schema.js'), + description: 'If the list is empty, why the list is empty.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/listentry.schema.js b/src/resources/1_0_2/schemas/listentry.schema.js index f9a641c6..6a5f1d65 100644 --- a/src/resources/1_0_2/schemas/listentry.schema.js +++ b/src/resources/1_0_2/schemas/listentry.schema.js @@ -1,47 +1,79 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLBoolean, GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary List.entry Schema + * @summary Listentry Schema */ module.exports = new GraphQLObjectType({ - name: 'ListEntry', - description: 'Entries in this list.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-item-flag - flag: { - type: require('./codeableconcept.schema'), - description: - 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', - }, - deleted: { - type: GraphQLBoolean, - description: 'True if this item is marked as deleted in the list.', - }, - _deleted: { - type: require('./element.schema'), - description: 'True if this item is marked as deleted in the list.', - }, - date: { - type: DateTimeScalar, - description: 'When this item was added to the list.', - }, - _date: { - type: require('./element.schema'), - description: 'When this item was added to the list.', - }, - item: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the actual resource from which data was derived.', - }, - }), + name: 'Listentry', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-item-flag + flag: { + type: require('./codeableconcept.schema.js'), + description: + 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', + }, + _deleted: { + type: require('./element.schema.js'), + description: 'True if this item is marked as deleted in the list.', + }, + deleted: { + type: GraphQLBoolean, + description: 'True if this item is marked as deleted in the list.', + }, + _date: { + type: require('./element.schema.js'), + description: 'When this item was added to the list.', + }, + date: { + type: DateTimeScalar, + description: 'When this item was added to the list.', + }, + item: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Listentryitem_item_Union', + description: + 'A reference to the actual resource from which data was derived.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to the actual resource from which data was derived.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/location.schema.js b/src/resources/1_0_2/schemas/location.schema.js index 2e64e80c..768c4068 100644 --- a/src/resources/1_0_2/schemas/location.schema.js +++ b/src/resources/1_0_2/schemas/location.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let LocationResourceType = new GraphQLEnumType({ - name: 'LocationResourceType', - values: { - Location: { value: 'Location' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,93 +16,169 @@ let LocationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Location', - description: 'Base StructureDefinition for Location Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(LocationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Unique code or number identifying the location to its users.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-status - status: { - type: CodeScalar, - description: 'active | suspended | inactive.', - }, - _status: { - type: require('./element.schema'), - description: 'active | suspended | inactive.', - }, - name: { - type: GraphQLString, - description: - 'Name of the location as used by humans. Does not need to be unique.', - }, - _name: { - type: require('./element.schema'), - description: - 'Name of the location as used by humans. Does not need to be unique.', - }, - description: { - type: GraphQLString, - description: - 'Description of the Location, which helps in finding or referencing the place.', - }, - _description: { - type: require('./element.schema'), - description: - 'Description of the Location, which helps in finding or referencing the place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-mode - mode: { - type: CodeScalar, - description: - 'Indicates whether a resource instance represents a specific location or a class of locations.', - }, - _mode: { - type: require('./element.schema'), - description: - 'Indicates whether a resource instance represents a specific location or a class of locations.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType - type: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of function performed at the location.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', - }, - address: { - type: require('./address.schema'), - description: 'Physical location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-physical-type - physicalType: { - type: require('./codeableconcept.schema'), - description: - 'Physical form of the location, e.g. building, room, vehicle, road.', - }, - position: { - type: require('./locationposition.schema'), - description: - 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Location Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Location_Enum_schema', + values: { Location: { value: 'Location' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Unique code or number identifying the location to its users.', + }, + _status: { + type: require('./element.schema.js'), + description: 'active | suspended | inactive.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-status + status: { + type: CodeScalar, + description: 'active | suspended | inactive.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + name: { + type: GraphQLString, + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + description: { + type: GraphQLString, + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-mode + mode: { + type: CodeScalar, + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType + type: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the type of function performed at the location.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', + }, + address: { + type: require('./address.schema.js'), + description: 'Physical location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-physical-type + physicalType: { + type: require('./codeableconcept.schema.js'), + description: + 'Physical form of the location, e.g. building, room, vehicle, road.', + }, + position: { + type: require('./locationposition.schema.js'), + description: + 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'LocationmanagingOrganization_managingOrganization_Union', description: 'The organization responsible for the provisioning and upkeep of the location.', - }, - partOf: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization responsible for the provisioning and upkeep of the location.', + }, + partOf: { + type: new GraphQLUnionType({ + name: 'LocationpartOf_partOf_Union', description: 'Another Location which this Location is physically part of.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Another Location which this Location is physically part of.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/locationposition.schema.js b/src/resources/1_0_2/schemas/locationposition.schema.js index 154dfad1..d6162c7a 100644 --- a/src/resources/1_0_2/schemas/locationposition.schema.js +++ b/src/resources/1_0_2/schemas/locationposition.schema.js @@ -1,46 +1,68 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Location.position Schema + * @summary Locationposition Schema */ module.exports = new GraphQLObjectType({ - name: 'LocationPosition', - description: - 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - longitude: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', - }, - _longitude: { - type: require('./element.schema'), - description: - 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', - }, - latitude: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', - }, - _latitude: { - type: require('./element.schema'), - description: - 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', - }, - altitude: { - type: GraphQLFloat, - description: - 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', - }, - _altitude: { - type: require('./element.schema'), - description: - 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', - }, - }), + name: 'Locationposition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _longitude: { + type: require('./element.schema.js'), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + longitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + _latitude: { + type: require('./element.schema.js'), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + latitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + _altitude: { + type: require('./element.schema.js'), + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + altitude: { + type: GraphQLFloat, + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/media.schema.js b/src/resources/1_0_2/schemas/media.schema.js index 70586a51..dd59ee6e 100644 --- a/src/resources/1_0_2/schemas/media.schema.js +++ b/src/resources/1_0_2/schemas/media.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MediaResourceType = new GraphQLEnumType({ - name: 'MediaResourceType', - values: { - Media: { value: 'Media' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -24,99 +18,192 @@ let MediaResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Media', - description: 'Base StructureDefinition for Media Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MediaResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/digital-media-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether the media is a photo (still image), an audio recording, or a video recording.', - }, - _type: { - type: require('./element.schema'), - description: - 'Whether the media is a photo (still image), an audio recording, or a video recording.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/digital-media-subtype - subtype: { - type: require('./codeableconcept.schema'), - description: - 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Media Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Media_Enum_schema', + values: { Media: { value: 'Media' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Whether the media is a photo (still image), an audio recording, or a video recording.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/digital-media-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the media is a photo (still image), an audio recording, or a video recording.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/digital-media-subtype + subtype: { + type: require('./codeableconcept.schema.js'), + description: + 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Mediasubject_subject_Union', description: 'Who/What this Media is a record of.', - }, - operator: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./specimen.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + description: 'Who/What this Media is a record of.', + }, + operator: { + type: new GraphQLUnionType({ + name: 'Mediaoperator_operator_Union', description: 'The person who administered the collection of the image.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/media-view - view: { - type: require('./codeableconcept.schema'), - description: - 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', - }, - deviceName: { - type: GraphQLString, - description: - 'The name of the device / manufacturer of the device that was used to make the recording.', - }, - _deviceName: { - type: require('./element.schema'), - description: - 'The name of the device / manufacturer of the device that was used to make the recording.', - }, - height: { - type: PositiveIntScalar, - description: 'Height of the image in pixels (photo/video).', - }, - _height: { - type: require('./element.schema'), - description: 'Height of the image in pixels (photo/video).', - }, - width: { - type: PositiveIntScalar, - description: 'Width of the image in pixels (photo/video).', - }, - _width: { - type: require('./element.schema'), - description: 'Width of the image in pixels (photo/video).', - }, - frames: { - type: PositiveIntScalar, - description: - 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', - }, - _frames: { - type: require('./element.schema'), - description: - 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', - }, - duration: { - type: UnsignedIntScalar, - description: - 'The duration of the recording in seconds - for audio and video.', - }, - _duration: { - type: require('./element.schema'), - description: - 'The duration of the recording in seconds - for audio and video.', - }, - content: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The actual content of the media - inline or by direct reference to the media source file.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The person who administered the collection of the image.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/media-view + view: { + type: require('./codeableconcept.schema.js'), + description: + 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', + }, + _deviceName: { + type: require('./element.schema.js'), + description: + 'The name of the device / manufacturer of the device that was used to make the recording.', + }, + deviceName: { + type: GraphQLString, + description: + 'The name of the device / manufacturer of the device that was used to make the recording.', + }, + _height: { + type: require('./element.schema.js'), + description: 'Height of the image in pixels (photo/video).', + }, + height: { + type: PositiveIntScalar, + description: 'Height of the image in pixels (photo/video).', + }, + _width: { + type: require('./element.schema.js'), + description: 'Width of the image in pixels (photo/video).', + }, + width: { + type: PositiveIntScalar, + description: 'Width of the image in pixels (photo/video).', + }, + _frames: { + type: require('./element.schema.js'), + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + frames: { + type: PositiveIntScalar, + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + _duration: { + type: require('./element.schema.js'), + description: + 'The duration of the recording in seconds - for audio and video.', + }, + duration: { + type: UnsignedIntScalar, + description: + 'The duration of the recording in seconds - for audio and video.', + }, + content: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The actual content of the media - inline or by direct reference to the media source file.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medication.schema.js b/src/resources/1_0_2/schemas/medication.schema.js index 094ec04c..c683a189 100644 --- a/src/resources/1_0_2/schemas/medication.schema.js +++ b/src/resources/1_0_2/schemas/medication.schema.js @@ -1,19 +1,14 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationResourceType = new GraphQLEnumType({ - name: 'MedicationResourceType', - values: { - Medication: { value: 'Medication' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,42 +16,106 @@ let MedicationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Medication', - description: 'Base StructureDefinition for Medication Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - code: { - type: require('./codeableconcept.schema'), - description: - 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', - }, - isBrand: { - type: GraphQLBoolean, - description: - 'Set to true if the item is attributable to a specific manufacturer.', - }, - _isBrand: { - type: require('./element.schema'), - description: - 'Set to true if the item is attributable to a specific manufacturer.', - }, - manufacturer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Medication Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Medication_Enum_schema', + values: { Medication: { value: 'Medication' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', + }, + _isBrand: { + type: require('./element.schema.js'), + description: + 'Set to true if the item is attributable to a specific manufacturer.', + }, + isBrand: { + type: GraphQLBoolean, + description: + 'Set to true if the item is attributable to a specific manufacturer.', + }, + manufacturer: { + type: new GraphQLUnionType({ + name: 'Medicationmanufacturer_manufacturer_Union', description: 'Describes the details of the manufacturer.', - }, - product: { - type: require('./medicationproduct.schema'), - description: - 'Information that only applies to products (not packages).', - }, - package: { - type: require('./medicationpackage.schema'), - description: - 'Information that only applies to packages (not products).', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Describes the details of the manufacturer.', + }, + product: { + type: require('./medicationproduct.schema.js'), + description: 'Information that only applies to products (not packages).', + }, + package: { + type: require('./medicationpackage.schema.js'), + description: 'Information that only applies to packages (not products).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationadministration.schema.js b/src/resources/1_0_2/schemas/medicationadministration.schema.js index 00fb3c90..5821c918 100644 --- a/src/resources/1_0_2/schemas/medicationadministration.schema.js +++ b/src/resources/1_0_2/schemas/medicationadministration.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationAdministrationResourceType = new GraphQLEnumType({ - name: 'MedicationAdministrationResourceType', - values: { - MedicationAdministration: { value: 'MedicationAdministration' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,114 +18,248 @@ let MedicationAdministrationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MedicationAdministration', - description: - 'Base StructureDefinition for MedicationAdministration Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationAdministrationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', - }, - _status: { - type: require('./element.schema'), - description: - 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The person or animal receiving the medication.', - }, - practitioner: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MedicationAdministration Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationAdministration_Enum_schema', + values: { + MedicationAdministration: { value: 'MedicationAdministration' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationAdministrationpatient_patient_Union', + description: 'The person or animal receiving the medication.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The person or animal receiving the medication.', + }, + practitioner: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationpractitioner_practitioner_Union', description: 'The individual who was responsible for giving the medication to the patient.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The individual who was responsible for giving the medication to the patient.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationencounter_encounter_Union', description: 'The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.', - }, - prescription: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.', + }, + prescription: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationprescription_prescription_Union', description: 'The original request, instruction or authority to perform the administration.', - }, - wasNotGiven: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the medication was NOT administered.', - }, - _wasNotGiven: { - type: require('./element.schema'), - description: - 'Set this to true if the record is saying that the medication was NOT administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes - reasonNotGiven: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A code indicating why the administration was not performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-given-codes - reasonGiven: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'A code indicating why the medication was given.', - }, - effectiveTimeDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - _effectiveTimeDateTime: { - type: require('./element.schema'), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - effectiveTimePeriod: { - type: new GraphQLNonNull(require('./period.schema')), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - device: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The device used in administering the medication to the patient. For example, a particular infusion pump.', - }, - note: { - type: GraphQLString, - description: - 'Extra information about the medication administration that is not conveyed by the other attributes.', - }, - _note: { - type: require('./element.schema'), - description: - 'Extra information about the medication administration that is not conveyed by the other attributes.', - }, - dosage: { - type: require('./medicationadministrationdosage.schema'), - description: - 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', - }, - }), + types: () => [require('./medicationorder.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); + } + }, + }), + description: + 'The original request, instruction or authority to perform the administration.', + }, + _wasNotGiven: { + type: require('./element.schema.js'), + description: + 'Set this to true if the record is saying that the medication was NOT administered.', + }, + wasNotGiven: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the medication was NOT administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes + reasonNotGiven: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code indicating why the administration was not performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-given-codes + reasonGiven: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A code indicating why the medication was given.', + }, + _effectiveTimeDateTime: { + type: require('./element.schema.js'), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectiveTimeDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectiveTimePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationAdministrationmedicationReference_medicationReference_Union', + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + device: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationdevice_device_Union', + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + }, + _note: { + type: require('./element.schema.js'), + description: + 'Extra information about the medication administration that is not conveyed by the other attributes.', + }, + note: { + type: GraphQLString, + description: + 'Extra information about the medication administration that is not conveyed by the other attributes.', + }, + dosage: { + type: require('./medicationadministrationdosage.schema.js'), + description: + 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationadministrationdosage.schema.js b/src/resources/1_0_2/schemas/medicationadministrationdosage.schema.js index 93e25345..3afe1876 100644 --- a/src/resources/1_0_2/schemas/medicationadministrationdosage.schema.js +++ b/src/resources/1_0_2/schemas/medicationadministrationdosage.schema.js @@ -1,64 +1,96 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationAdministration.dosage Schema + * @summary MedicationAdministrationdosage Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationAdministrationDosage', - description: - 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - text: { - type: GraphQLString, - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', - }, - _text: { - type: require('./element.schema'), - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteReference: { - type: require('./reference.schema'), + name: 'MedicationAdministrationdosage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteReference: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationdosagesiteReference_siteReference_Union', description: "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.schema'), - description: - 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', - }, - method: { - type: require('./codeableconcept.schema'), - description: - 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', - }, - rateRatio: { - type: require('./ratio.schema'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - rateRange: { - type: require('./range.schema'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - }), + types: () => [require('./bodysite.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'BodySite') { + return require('./bodysite.schema.js'); + } + }, + }), + description: + "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.schema.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + rateRange: { + type: require('./range.schema.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationdispense.schema.js b/src/resources/1_0_2/schemas/medicationdispense.schema.js index 7f97d49c..16832a49 100644 --- a/src/resources/1_0_2/schemas/medicationdispense.schema.js +++ b/src/resources/1_0_2/schemas/medicationdispense.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationDispenseResourceType = new GraphQLEnumType({ - name: 'MedicationDispenseResourceType', - values: { - MedicationDispense: { value: 'MedicationDispense' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,120 +17,247 @@ let MedicationDispenseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MedicationDispense', - description: 'Base StructureDefinition for MedicationDispense Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationDispenseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-status - status: { - type: CodeScalar, - description: - 'A code specifying the state of the set of dispense events.', - }, - _status: { - type: require('./element.schema'), - description: - 'A code specifying the state of the set of dispense events.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MedicationDispense Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationDispense_Enum_schema', + values: { MedicationDispense: { value: 'MedicationDispense' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code specifying the state of the set of dispense events.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-status + status: { + type: CodeScalar, + description: 'A code specifying the state of the set of dispense events.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'MedicationDispensepatient_patient_Union', description: 'A link to a resource representing the person to whom the medication will be given.', - }, - dispenser: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person to whom the medication will be given.', + }, + dispenser: { + type: new GraphQLUnionType({ + name: 'MedicationDispensedispenser_dispenser_Union', description: 'The individual responsible for dispensing the medication.', - }, - authorizingPrescription: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates the medication order that is being dispensed against.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType - type: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The amount of medication that has been dispensed. Includes unit of measure.', - }, - daysSupply: { - type: require('./quantity.schema'), - description: 'The amount of medication expressed as a timing amount.', - }, - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - whenPrepared: { - type: DateTimeScalar, - description: - 'The time when the dispensed product was packaged and reviewed.', - }, - _whenPrepared: { - type: require('./element.schema'), - description: - 'The time when the dispensed product was packaged and reviewed.', - }, - whenHandedOver: { - type: DateTimeScalar, - description: - 'The time the dispensed product was provided to the patient or their representative.', - }, - _whenHandedOver: { - type: require('./element.schema'), - description: - 'The time the dispensed product was provided to the patient or their representative.', - }, - destination: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The individual responsible for dispensing the medication.', + }, + authorizingPrescription: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationDispenseauthorizingPrescription_authorizingPrescription_Union', + description: + 'Indicates the medication order that is being dispensed against.', + types: () => [require('./medicationorder.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); + } + }, + }), + ), + description: + 'Indicates the medication order that is being dispensed against.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of medication that has been dispensed. Includes unit of measure.', + }, + daysSupply: { + type: require('./quantity.schema.js'), + description: 'The amount of medication expressed as a timing amount.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationDispensemedicationReference_medicationReference_Union', + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + _whenPrepared: { + type: require('./element.schema.js'), + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + whenPrepared: { + type: DateTimeScalar, + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + _whenHandedOver: { + type: require('./element.schema.js'), + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + whenHandedOver: { + type: DateTimeScalar, + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + destination: { + type: new GraphQLUnionType({ + name: 'MedicationDispensedestination_destination_Union', description: 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', - }, - receiver: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', - }, - note: { - type: GraphQLString, - description: - 'Extra information about the dispense that could not be conveyed in the other attributes.', - }, - _note: { - type: require('./element.schema'), - description: - 'Extra information about the dispense that could not be conveyed in the other attributes.', - }, - dosageInstruction: { - type: new GraphQLList( - require('./medicationdispensedosageinstruction.schema'), - ), - description: - 'Indicates how the medication is to be used by the patient.', - }, - substitution: { - type: require('./medicationdispensesubstitution.schema'), - description: - 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispensereceiver_receiver_Union', + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + }, + _note: { + type: require('./element.schema.js'), + description: + 'Extra information about the dispense that could not be conveyed in the other attributes.', + }, + note: { + type: GraphQLString, + description: + 'Extra information about the dispense that could not be conveyed in the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList( + require('./medicationdispensedosageinstruction.schema.js'), + ), + description: 'Indicates how the medication is to be used by the patient.', + }, + substitution: { + type: require('./medicationdispensesubstitution.schema.js'), + description: + 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationdispensedosageinstruction.schema.js b/src/resources/1_0_2/schemas/medicationdispensedosageinstruction.schema.js index 3407591b..34c86c58 100644 --- a/src/resources/1_0_2/schemas/medicationdispensedosageinstruction.schema.js +++ b/src/resources/1_0_2/schemas/medicationdispensedosageinstruction.schema.js @@ -1,98 +1,133 @@ -const { GraphQLObjectType, GraphQLString, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationDispense.dosageInstruction Schema + * @summary MedicationDispensedosageInstruction Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationDispenseDosageInstruction', - description: 'Indicates how the medication is to be used by the patient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - text: { - type: GraphQLString, - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', - }, - _text: { - type: require('./element.schema'), - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', - }, - additionalInstructions: { - type: require('./codeableconcept.schema'), - description: - "Additional instructions such as 'Swallow with plenty of water' which may or may not be coded.", - }, - timing: { - type: require('./timing.schema'), - description: - "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - asNeededBoolean: { - type: GraphQLBoolean, - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - _asNeededBoolean: { - type: require('./element.schema'), - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - asNeededCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteCodeableConcept: { - type: require('./codeableconcept.schema'), + name: 'MedicationDispensedosageInstruction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication.', + }, + additionalInstructions: { + type: require('./codeableconcept.schema.js'), + description: + "Additional instructions such as 'Swallow with plenty of water' which may or may not be coded.", + }, + timing: { + type: require('./timing.schema.js'), + description: + "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example, 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _asNeededBoolean: { + type: require('./element.schema.js'), + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded specification of the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteReference: { + type: new GraphQLUnionType({ + name: + 'MedicationDispensedosageInstructionsiteReference_siteReference_Union', description: 'A coded specification of the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteReference: { - type: require('./reference.schema'), - description: - 'A coded specification of the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.schema'), - description: - 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.', - }, - method: { - type: require('./codeableconcept.schema'), - description: - 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.', - }, - doseRange: { - type: require('./range.schema'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - doseQuantity: { - type: require('./quantity.schema'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - rateRatio: { - type: require('./ratio.schema'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - rateRange: { - type: require('./range.schema'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - maxDosePerPeriod: { - type: require('./ratio.schema'), - description: - 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours.', - }, - }), + types: () => [require('./bodysite.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'BodySite') { + return require('./bodysite.schema.js'); + } + }, + }), + description: + 'A coded specification of the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.schema.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.', + }, + doseRange: { + type: require('./range.schema.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + doseQuantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + rateRange: { + type: require('./range.schema.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + maxDosePerPeriod: { + type: require('./ratio.schema.js'), + description: + 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time, e.g. 1000mg in 24 hours.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationdispensesubstitution.schema.js b/src/resources/1_0_2/schemas/medicationdispensesubstitution.schema.js index 3996d014..158274aa 100644 --- a/src/resources/1_0_2/schemas/medicationdispensesubstitution.schema.js +++ b/src/resources/1_0_2/schemas/medicationdispensesubstitution.schema.js @@ -1,33 +1,68 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationDispense.substitution Schema + * @summary MedicationDispensesubstitution Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationDispenseSubstitution', - description: - 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'A code signifying whether a different drug was dispensed from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.', - }, - responsibleParty: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The person or organization that has primary responsibility for the substitution.', - }, - }), + name: 'MedicationDispensesubstitution', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code signifying whether a different drug was dispensed from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.', + }, + responsibleParty: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationDispensesubstitutionresponsibleParty_responsibleParty_Union', + description: + 'The person or organization that has primary responsibility for the substitution.', + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: + 'The person or organization that has primary responsibility for the substitution.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationorder.schema.js b/src/resources/1_0_2/schemas/medicationorder.schema.js index cab8c98a..f1bd168c 100644 --- a/src/resources/1_0_2/schemas/medicationorder.schema.js +++ b/src/resources/1_0_2/schemas/medicationorder.schema.js @@ -1,21 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationOrderResourceType = new GraphQLEnumType({ - name: 'MedicationOrderResourceType', - values: { - MedicationOrder: { value: 'MedicationOrder' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,121 +17,239 @@ let MedicationOrderResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MedicationOrder', - description: 'Base StructureDefinition for MedicationOrder Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationOrderResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.', - }, - dateWritten: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was written.', - }, - _dateWritten: { - type: require('./element.schema'), - description: - 'The date (and perhaps time) when the prescription was written.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-order-status - status: { - type: CodeScalar, - description: - 'A code specifying the state of the order. Generally this will be active or completed state.', - }, - _status: { - type: require('./element.schema'), - description: - 'A code specifying the state of the order. Generally this will be active or completed state.', - }, - dateEnded: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was stopped.', - }, - _dateEnded: { - type: require('./element.schema'), - description: - 'The date (and perhaps time) when the prescription was stopped.', - }, - reasonEnded: { - type: require('./codeableconcept.schema'), - description: 'The reason why the prescription was stopped, if it was.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MedicationOrder Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationOrder_Enum_schema', + values: { MedicationOrder: { value: 'MedicationOrder' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.', + }, + _dateWritten: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + dateWritten: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was written.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying the state of the order. Generally this will be active or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-order-status + status: { + type: CodeScalar, + description: + 'A code specifying the state of the order. Generally this will be active or completed state.', + }, + _dateEnded: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the prescription was stopped.', + }, + dateEnded: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was stopped.', + }, + reasonEnded: { + type: require('./codeableconcept.schema.js'), + description: 'The reason why the prescription was stopped, if it was.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'MedicationOrderpatient_patient_Union', description: 'A link to a resource representing the person to whom the medication will be given.', - }, - prescriber: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person to whom the medication will be given.', + }, + prescriber: { + type: new GraphQLUnionType({ + name: 'MedicationOrderprescriber_prescriber_Union', description: 'The healthcare professional responsible for authorizing the prescription.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The healthcare professional responsible for authorizing the prescription.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'MedicationOrderencounter_encounter_Union', description: 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonReference: { + type: new GraphQLUnionType({ + name: 'MedicationOrderreasonReference_reasonReference_Union', description: 'Can be the reason or the indication for writing the prescription.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonReference: { - type: require('./reference.schema'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - note: { - type: GraphQLString, - description: - 'Extra information about the prescription that could not be conveyed by the other attributes.', - }, - _note: { - type: require('./element.schema'), - description: - 'Extra information about the prescription that could not be conveyed by the other attributes.', - }, - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - dosageInstruction: { - type: new GraphQLList( - require('./medicationorderdosageinstruction.schema'), - ), - description: - 'Indicates how the medication is to be used by the patient.', - }, - dispenseRequest: { - type: require('./medicationorderdispenserequest.schema'), - description: - 'Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', - }, - substitution: { - type: require('./medicationordersubstitution.schema'), - description: - "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.", - }, - priorPrescription: { - type: require('./reference.schema'), + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + _note: { + type: require('./element.schema.js'), + description: + 'Extra information about the prescription that could not be conveyed by the other attributes.', + }, + note: { + type: GraphQLString, + description: + 'Extra information about the prescription that could not be conveyed by the other attributes.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationOrdermedicationReference_medicationReference_Union', + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + dosageInstruction: { + type: new GraphQLList( + require('./medicationorderdosageinstruction.schema.js'), + ), + description: 'Indicates how the medication is to be used by the patient.', + }, + dispenseRequest: { + type: require('./medicationorderdispenserequest.schema.js'), + description: + 'Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', + }, + substitution: { + type: require('./medicationordersubstitution.schema.js'), + description: + "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.", + }, + priorPrescription: { + type: new GraphQLUnionType({ + name: 'MedicationOrderpriorPrescription_priorPrescription_Union', description: 'A link to a resource representing an earlier order or prescription that this order supersedes.', - }, - }), + types: () => [require('./medicationorder.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); + } + }, + }), + description: + 'A link to a resource representing an earlier order or prescription that this order supersedes.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationorderdispenserequest.schema.js b/src/resources/1_0_2/schemas/medicationorderdispenserequest.schema.js index 801b16c6..8b4ed89b 100644 --- a/src/resources/1_0_2/schemas/medicationorderdispenserequest.schema.js +++ b/src/resources/1_0_2/schemas/medicationorderdispenserequest.schema.js @@ -1,51 +1,79 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary MedicationOrder.dispenseRequest Schema + * @summary MedicationOrderdispenseRequest Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationOrderDispenseRequest', - description: - 'Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - medicationCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: require('./reference.schema'), + name: 'MedicationOrderdispenseRequest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + medicationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLUnionType({ + name: + 'MedicationOrderdispenseRequestmedicationReference_medicationReference_Union', description: 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - validityPeriod: { - type: require('./period.schema'), - description: - 'This indicates the validity period of a prescription (stale dating the Prescription).', - }, - numberOfRepeatsAllowed: { - type: PositiveIntScalar, - description: - "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", - }, - _numberOfRepeatsAllowed: { - type: require('./element.schema'), - description: - "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", - }, - quantity: { - type: require('./quantity.schema'), - description: 'The amount that is to be dispensed for one fill.', - }, - expectedSupplyDuration: { - type: require('./quantity.schema'), - description: - 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', - }, - }), + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + description: + 'Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + validityPeriod: { + type: require('./period.schema.js'), + description: + 'This indicates the validity period of a prescription (stale dating the Prescription).', + }, + _numberOfRepeatsAllowed: { + type: require('./element.schema.js'), + description: + "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", + }, + numberOfRepeatsAllowed: { + type: PositiveIntScalar, + description: + "An integer indicating the number of additional times (aka refills or repeats) the patient can receive the prescribed medication. Usage Notes: This integer does NOT include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount that is to be dispensed for one fill.', + }, + expectedSupplyDuration: { + type: require('./quantity.schema.js'), + description: + 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationorderdosageinstruction.schema.js b/src/resources/1_0_2/schemas/medicationorderdosageinstruction.schema.js index bbeab311..e1704489 100644 --- a/src/resources/1_0_2/schemas/medicationorderdosageinstruction.schema.js +++ b/src/resources/1_0_2/schemas/medicationorderdosageinstruction.schema.js @@ -1,98 +1,133 @@ -const { GraphQLObjectType, GraphQLString, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationOrder.dosageInstruction Schema + * @summary MedicationOrderdosageInstruction Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationOrderDosageInstruction', - description: 'Indicates how the medication is to be used by the patient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - text: { - type: GraphQLString, - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.', - }, - _text: { - type: require('./element.schema'), - description: - 'Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.', - }, - additionalInstructions: { - type: require('./codeableconcept.schema'), - description: - "Additional instructions such as 'Swallow with plenty of water' which may or may not be coded.", - }, - timing: { - type: require('./timing.schema'), - description: - "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - asNeededBoolean: { - type: GraphQLBoolean, - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - _asNeededBoolean: { - type: require('./element.schema'), - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - asNeededCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteCodeableConcept: { - type: require('./codeableconcept.schema'), + name: 'MedicationOrderdosageInstruction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing.', + }, + additionalInstructions: { + type: require('./codeableconcept.schema.js'), + description: + "Additional instructions such as 'Swallow with plenty of water' which may or may not be coded.", + }, + timing: { + type: require('./timing.schema.js'), + description: + "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions. For example: 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _asNeededBoolean: { + type: require('./element.schema.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded specification of the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteReference: { + type: new GraphQLUnionType({ + name: + 'MedicationOrderdosageInstructionsiteReference_siteReference_Union', description: 'A coded specification of the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteReference: { - type: require('./reference.schema'), - description: - 'A coded specification of the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.schema'), - description: - "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.", - }, - method: { - type: require('./codeableconcept.schema'), - description: - 'A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV.', - }, - doseRange: { - type: require('./range.schema'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - doseQuantity: { - type: require('./quantity.schema'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - rateRatio: { - type: require('./ratio.schema'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - rateRange: { - type: require('./range.schema'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - maxDosePerPeriod: { - type: require('./ratio.schema'), - description: - 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.', - }, - }), + types: () => [require('./bodysite.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'BodySite') { + return require('./bodysite.schema.js'); + } + }, + }), + description: + 'A coded specification of the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.schema.js'), + description: + "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.", + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV.', + }, + doseRange: { + type: require('./range.schema.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + doseQuantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + rateRange: { + type: require('./range.schema.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + maxDosePerPeriod: { + type: require('./ratio.schema.js'), + description: + 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationordersubstitution.schema.js b/src/resources/1_0_2/schemas/medicationordersubstitution.schema.js index e246321a..05e605c1 100644 --- a/src/resources/1_0_2/schemas/medicationordersubstitution.schema.js +++ b/src/resources/1_0_2/schemas/medicationordersubstitution.schema.js @@ -1,28 +1,45 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationOrder.substitution Schema + * @summary MedicationOrdersubstitution Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationOrderSubstitution', - description: - "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'A code signifying whether a different drug should be dispensed from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason - reason: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the reason for the substitution, or why substitution must or must not be performed.', - }, - }), + name: 'MedicationOrdersubstitution', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code signifying whether a different drug should be dispensed from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the reason for the substitution, or why substitution must or must not be performed.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationpackage.schema.js b/src/resources/1_0_2/schemas/medicationpackage.schema.js index 543ed512..c35ec0c5 100644 --- a/src/resources/1_0_2/schemas/medicationpackage.schema.js +++ b/src/resources/1_0_2/schemas/medicationpackage.schema.js @@ -1,25 +1,42 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Medication.package Schema + * @summary Medicationpackage Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationPackage', - description: 'Information that only applies to packages (not products).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-package-form-codes - container: { - type: require('./codeableconcept.schema'), - description: 'The kind of container that this package comes as.', - }, - content: { - type: new GraphQLList(require('./medicationpackagecontent.schema')), - description: - 'A set of components that go to make up the described item.', - }, - }), + name: 'Medicationpackage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-package-form-codes + container: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of container that this package comes as.', + }, + content: { + type: new GraphQLList(require('./medicationpackagecontent.schema.js')), + description: 'A set of components that go to make up the described item.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationpackagecontent.schema.js b/src/resources/1_0_2/schemas/medicationpackagecontent.schema.js index 05dd31b0..95abbbc7 100644 --- a/src/resources/1_0_2/schemas/medicationpackagecontent.schema.js +++ b/src/resources/1_0_2/schemas/medicationpackagecontent.schema.js @@ -1,23 +1,57 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Medication.package.content Schema + * @summary Medicationpackagecontent Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationPackageContent', - description: 'A set of components that go to make up the described item.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - item: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Identifies one of the items in the package.', - }, - amount: { - type: require('./quantity.schema'), - description: 'The amount of the product that is in the package.', - }, - }), + name: 'Medicationpackagecontent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + item: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Medicationpackagecontentitem_item_Union', + description: 'Identifies one of the items in the package.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: 'Identifies one of the items in the package.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'The amount of the product that is in the package.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationproduct.schema.js b/src/resources/1_0_2/schemas/medicationproduct.schema.js index c00761c7..cac83528 100644 --- a/src/resources/1_0_2/schemas/medicationproduct.schema.js +++ b/src/resources/1_0_2/schemas/medicationproduct.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Medication.product Schema + * @summary Medicationproduct Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationProduct', - description: 'Information that only applies to products (not packages).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-form-codes - form: { - type: require('./codeableconcept.schema'), - description: - 'Describes the form of the item. Powder; tablets; carton.', - }, - ingredient: { - type: new GraphQLList(require('./medicationproductingredient.schema')), - description: - 'Identifies a particular constituent of interest in the product.', - }, - batch: { - type: new GraphQLList(require('./medicationproductbatch.schema')), - description: - 'Information about a group of medication produced or packaged from one production run.', - }, - }), + name: 'Medicationproduct', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-form-codes + form: { + type: require('./codeableconcept.schema.js'), + description: 'Describes the form of the item. Powder; tablets; carton.', + }, + ingredient: { + type: new GraphQLList(require('./medicationproductingredient.schema.js')), + description: + 'Identifies a particular constituent of interest in the product.', + }, + batch: { + type: new GraphQLList(require('./medicationproductbatch.schema.js')), + description: + 'Information about a group of medication produced or packaged from one production run.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationproductbatch.schema.js b/src/resources/1_0_2/schemas/medicationproductbatch.schema.js index 6d5db868..9a325b04 100644 --- a/src/resources/1_0_2/schemas/medicationproductbatch.schema.js +++ b/src/resources/1_0_2/schemas/medicationproductbatch.schema.js @@ -1,35 +1,52 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Medication.product.batch Schema + * @summary Medicationproductbatch Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationProductBatch', - description: - 'Information about a group of medication produced or packaged from one production run.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - lotNumber: { - type: GraphQLString, - description: - 'The assigned lot number of a batch of the specified product.', - }, - _lotNumber: { - type: require('./element.schema'), - description: - 'The assigned lot number of a batch of the specified product.', - }, - expirationDate: { - type: DateTimeScalar, - description: 'When this specific batch of product will expire.', - }, - _expirationDate: { - type: require('./element.schema'), - description: 'When this specific batch of product will expire.', - }, - }), + name: 'Medicationproductbatch', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _lotNumber: { + type: require('./element.schema.js'), + description: + 'The assigned lot number of a batch of the specified product.', + }, + lotNumber: { + type: GraphQLString, + description: + 'The assigned lot number of a batch of the specified product.', + }, + _expirationDate: { + type: require('./element.schema.js'), + description: 'When this specific batch of product will expire.', + }, + expirationDate: { + type: DateTimeScalar, + description: 'When this specific batch of product will expire.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationproductingredient.schema.js b/src/resources/1_0_2/schemas/medicationproductingredient.schema.js index b2d69dcf..d0781099 100644 --- a/src/resources/1_0_2/schemas/medicationproductingredient.schema.js +++ b/src/resources/1_0_2/schemas/medicationproductingredient.schema.js @@ -1,26 +1,66 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Medication.product.ingredient Schema + * @summary Medicationproductingredient Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationProductIngredient', - description: - 'Identifies a particular constituent of interest in the product.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - item: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The actual ingredient - either a substance (simple ingredient) or another medication.', - }, - amount: { - type: require('./ratio.schema'), - description: - 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.', - }, - }), + name: 'Medicationproductingredient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + item: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Medicationproductingredientitem_item_Union', + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + types: () => [ + require('./substance.schema.js'), + require('./medication.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + amount: { + type: require('./ratio.schema.js'), + description: + 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationstatement.schema.js b/src/resources/1_0_2/schemas/medicationstatement.schema.js index f2338966..3f68c402 100644 --- a/src/resources/1_0_2/schemas/medicationstatement.schema.js +++ b/src/resources/1_0_2/schemas/medicationstatement.schema.js @@ -1,22 +1,16 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationStatementResourceType = new GraphQLEnumType({ - name: 'MedicationStatementResourceType', - values: { - MedicationStatement: { value: 'MedicationStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,116 +18,240 @@ let MedicationStatementResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MedicationStatement', - description: 'Base StructureDefinition for MedicationStatement Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationStatementResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The person or animal who is/was taking the medication.', - }, - informationSource: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MedicationStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationStatement_Enum_schema', + values: { MedicationStatement: { value: 'MedicationStatement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationStatementpatient_patient_Union', + description: 'The person or animal who is/was taking the medication.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The person or animal who is/was taking the medication.', + }, + informationSource: { + type: new GraphQLUnionType({ + name: 'MedicationStatementinformationSource_informationSource_Union', description: 'The person who provided the information about the taking of this medication.', - }, - dateAsserted: { - type: DateTimeScalar, - description: - 'The date when the medication statement was asserted by the information source.', - }, - _dateAsserted: { - type: require('./element.schema'), - description: - 'The date when the medication statement was asserted by the information source.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", - }, - _status: { - type: require('./element.schema'), - description: - "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", - }, - wasNotTaken: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the medication was NOT taken.', - }, - _wasNotTaken: { - type: require('./element.schema'), - description: - 'Set this to true if the record is saying that the medication was NOT taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes - reasonNotTaken: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'A code indicating why the medication was not taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonForUseCodeableConcept: { - type: require('./codeableconcept.schema'), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The person who provided the information about the taking of this medication.', + }, + _dateAsserted: { + type: require('./element.schema.js'), + description: + 'The date when the medication statement was asserted by the information source.', + }, + dateAsserted: { + type: DateTimeScalar, + description: + 'The date when the medication statement was asserted by the information source.', + }, + _status: { + type: require('./element.schema.js'), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", + }, + _wasNotTaken: { + type: require('./element.schema.js'), + description: + 'Set this to true if the record is saying that the medication was NOT taken.', + }, + wasNotTaken: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the medication was NOT taken.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes + reasonNotTaken: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A code indicating why the medication was not taken.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonForUseCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'A reason for why the medication is being/was taken.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonForUseReference: { + type: new GraphQLUnionType({ + name: + 'MedicationStatementreasonForUseReference_reasonForUseReference_Union', description: 'A reason for why the medication is being/was taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonForUseReference: { - type: require('./reference.schema'), - description: 'A reason for why the medication is being/was taken.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - _effectiveDateTime: { - type: require('./element.schema'), - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - note: { - type: GraphQLString, - description: - 'Provides extra information about the medication statement that is not conveyed by the other attributes.', - }, - _note: { - type: require('./element.schema'), - description: - 'Provides extra information about the medication statement that is not conveyed by the other attributes.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.', - }, - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - medicationReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - dosage: { - type: new GraphQLList(require('./medicationstatementdosage.schema')), - description: 'Indicates how the medication is/was used by the patient.', - }, - }), + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: 'A reason for why the medication is being/was taken.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + _note: { + type: require('./element.schema.js'), + description: + 'Provides extra information about the medication statement that is not conveyed by the other attributes.', + }, + note: { + type: GraphQLString, + description: + 'Provides extra information about the medication statement that is not conveyed by the other attributes.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationStatementsupportingInformation_supportingInformation_Union', + description: + 'Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationStatementmedicationReference_medicationReference_Union', + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + dosage: { + type: new GraphQLList(require('./medicationstatementdosage.schema.js')), + description: 'Indicates how the medication is/was used by the patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/medicationstatementdosage.schema.js b/src/resources/1_0_2/schemas/medicationstatementdosage.schema.js index 4f158b71..08348fb0 100644 --- a/src/resources/1_0_2/schemas/medicationstatementdosage.schema.js +++ b/src/resources/1_0_2/schemas/medicationstatementdosage.schema.js @@ -1,93 +1,127 @@ -const { GraphQLObjectType, GraphQLString, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary MedicationStatement.dosage Schema + * @summary MedicationStatementdosage Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationStatementDosage', - description: 'Indicates how the medication is/was used by the patient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - text: { - type: GraphQLString, - description: - "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", - }, - _text: { - type: require('./element.schema'), - description: - "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", - }, - timing: { - type: require('./timing.schema'), - description: - "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - asNeededBoolean: { - type: GraphQLBoolean, - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - _asNeededBoolean: { - type: require('./element.schema'), - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - asNeededCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'A coded specification of or a reference to the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - siteReference: { - type: require('./reference.schema'), + name: 'MedicationStatementdosage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _text: { + type: require('./element.schema.js'), + description: + "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", + }, + text: { + type: GraphQLString, + description: + "Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans.", + }, + timing: { + type: require('./timing.schema.js'), + description: + "The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _asNeededBoolean: { + type: require('./element.schema.js'), + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded specification of or a reference to the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + siteReference: { + type: new GraphQLUnionType({ + name: 'MedicationStatementdosagesiteReference_siteReference_Union', description: 'A coded specification of or a reference to the anatomic site where the medication first enters the body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.schema'), - description: - 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.', - }, - method: { - type: require('./codeableconcept.schema'), - description: - 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', - }, - quantityQuantity: { - type: require('./quantity.schema'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - quantityRange: { - type: require('./range.schema'), - description: - 'The amount of therapeutic or other substance given at one administration event.', - }, - rateRatio: { - type: require('./ratio.schema'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - rateRange: { - type: require('./range.schema'), - description: - "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", - }, - maxDosePerPeriod: { - type: require('./ratio.schema'), - description: - 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.', - }, - }), + types: () => [require('./bodysite.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'BodySite') { + return require('./bodysite.schema.js'); + } + }, + }), + description: + 'A coded specification of or a reference to the anatomic site where the medication first enters the body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.schema.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', + }, + quantityQuantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + quantityRange: { + type: require('./range.schema.js'), + description: + 'The amount of therapeutic or other substance given at one administration event.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + rateRange: { + type: require('./range.schema.js'), + description: + "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", + }, + maxDosePerPeriod: { + type: require('./ratio.schema.js'), + description: + 'The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/messageheader.schema.js b/src/resources/1_0_2/schemas/messageheader.schema.js index a8d87a11..7cee61fd 100644 --- a/src/resources/1_0_2/schemas/messageheader.schema.js +++ b/src/resources/1_0_2/schemas/messageheader.schema.js @@ -1,20 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MessageHeaderResourceType = new GraphQLEnumType({ - name: 'MessageHeaderResourceType', - values: { - MessageHeader: { value: 'MessageHeader' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -22,72 +16,192 @@ let MessageHeaderResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MessageHeader', - description: 'Base StructureDefinition for MessageHeader Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MessageHeaderResourceType), - description: 'Type of this resource.', - }, - timestamp: { - type: new GraphQLNonNull(InstantScalar), - description: 'The time that the message was sent.', - }, - _timestamp: { - type: require('./element.schema'), - description: 'The time that the message was sent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - event: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-events'.", - }, - response: { - type: require('./messageheaderresponse.schema'), - description: - 'Information about the message that this message is a response to. Only present if this message is a response.', - }, - source: { - type: new GraphQLNonNull(require('./messageheadersource.schema')), - description: - 'The source application from which this message originated.', - }, - destination: { - type: new GraphQLList(require('./messageheaderdestination.schema')), - description: - 'The destination application which the message is intended for.', - }, - enterer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MessageHeader Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageHeader_Enum_schema', + values: { MessageHeader: { value: 'MessageHeader' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _timestamp: { + type: require('./element.schema.js'), + description: 'The time that the message was sent.', + }, + timestamp: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time that the message was sent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + event: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-events'.", + }, + response: { + type: require('./messageheaderresponse.schema.js'), + description: + 'Information about the message that this message is a response to. Only present if this message is a response.', + }, + source: { + type: new GraphQLNonNull(require('./messageheadersource.schema.js')), + description: 'The source application from which this message originated.', + }, + destination: { + type: new GraphQLList(require('./messageheaderdestination.schema.js')), + description: + 'The destination application which the message is intended for.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'MessageHeaderenterer_enterer_Union', description: 'The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', - }, - author: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The person or device that performed the data entry leading to this message. Where there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', + }, + author: { + type: new GraphQLUnionType({ + name: 'MessageHeaderauthor_author_Union', description: 'The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', - }, - receiver: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The logical author of the message - the person or device that decided the described event should happen. Where there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', + }, + receiver: { + type: new GraphQLUnionType({ + name: 'MessageHeaderreceiver_receiver_Union', description: "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", - }, - responsible: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", + }, + responsible: { + type: new GraphQLUnionType({ + name: 'MessageHeaderresponsible_responsible_Union', description: 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-reason-encounter - reason: { - type: require('./codeableconcept.schema'), - description: - 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', - }, - data: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The actual data of the message - a reference to the root/focus class of the event.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-reason-encounter + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', + }, + data: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MessageHeaderdata_data_Union', + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/messageheaderdestination.schema.js b/src/resources/1_0_2/schemas/messageheaderdestination.schema.js index 52f458b8..d23b835c 100644 --- a/src/resources/1_0_2/schemas/messageheaderdestination.schema.js +++ b/src/resources/1_0_2/schemas/messageheaderdestination.schema.js @@ -1,37 +1,71 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary MessageHeader.destination Schema + * @summary MessageHeaderdestination Schema */ module.exports = new GraphQLObjectType({ - name: 'MessageHeaderDestination', - description: 'The destination application which the message is intended for.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: 'Human-readable name for the target system.', - }, - _name: { - type: require('./element.schema'), - description: 'Human-readable name for the target system.', - }, - target: { - type: require('./reference.schema'), + name: 'MessageHeaderdestination', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-readable name for the target system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the target system.', + }, + target: { + type: new GraphQLUnionType({ + name: 'MessageHeaderdestinationtarget_target_Union', description: 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', - }, - endpoint: { - type: new GraphQLNonNull(UriScalar), - description: 'Indicates where the message should be routed to.', - }, - _endpoint: { - type: require('./element.schema'), - description: 'Indicates where the message should be routed to.', - }, - }), + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: 'Indicates where the message should be routed to.', + }, + endpoint: { + type: new GraphQLNonNull(UriScalar), + description: 'Indicates where the message should be routed to.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/messageheaderresponse.schema.js b/src/resources/1_0_2/schemas/messageheaderresponse.schema.js index 31a2dc39..eb834197 100644 --- a/src/resources/1_0_2/schemas/messageheaderresponse.schema.js +++ b/src/resources/1_0_2/schemas/messageheaderresponse.schema.js @@ -1,43 +1,71 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary MessageHeader.response Schema + * @summary MessageHeaderresponse Schema */ module.exports = new GraphQLObjectType({ - name: 'MessageHeaderResponse', - description: - 'Information about the message that this message is a response to. Only present if this message is a response.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLNonNull(IdScalar), - description: - 'The id of the message that this message is a response to.', - }, - _identifier: { - type: require('./element.schema'), - description: - 'The id of the message that this message is a response to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/response-code - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', - }, - _code: { - type: require('./element.schema'), - description: - 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', - }, - details: { - type: require('./reference.schema'), + name: 'MessageHeaderresponse', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./element.schema.js'), + description: 'The id of the message that this message is a response to.', + }, + identifier: { + type: new GraphQLNonNull(IdScalar), + description: 'The id of the message that this message is a response to.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/response-code + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + details: { + type: new GraphQLUnionType({ + name: 'MessageHeaderresponsedetails_details_Union', description: 'Full details of any issues found in the message.', - }, - }), + types: () => [require('./operationoutcome.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationOutcome') { + return require('./operationoutcome.schema.js'); + } + }, + }), + description: 'Full details of any issues found in the message.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/messageheadersource.schema.js b/src/resources/1_0_2/schemas/messageheadersource.schema.js index 5ae91229..a681ba89 100644 --- a/src/resources/1_0_2/schemas/messageheadersource.schema.js +++ b/src/resources/1_0_2/schemas/messageheadersource.schema.js @@ -1,59 +1,80 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary MessageHeader.source Schema + * @summary MessageHeadersource Schema */ module.exports = new GraphQLObjectType({ - name: 'MessageHeaderSource', - description: 'The source application from which this message originated.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: 'Human-readable name for the source system.', - }, - _name: { - type: require('./element.schema'), - description: 'Human-readable name for the source system.', - }, - software: { - type: GraphQLString, - description: - 'May include configuration or other information useful in debugging.', - }, - _software: { - type: require('./element.schema'), - description: - 'May include configuration or other information useful in debugging.', - }, - version: { - type: GraphQLString, - description: - 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', - }, - _version: { - type: require('./element.schema'), - description: - 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', - }, - contact: { - type: require('./contactpoint.schema'), - description: - 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', - }, - endpoint: { - type: new GraphQLNonNull(UriScalar), - description: - 'Identifies the routing target to send acknowledgements to.', - }, - _endpoint: { - type: require('./element.schema'), - description: - 'Identifies the routing target to send acknowledgements to.', - }, - }), + name: 'MessageHeadersource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-readable name for the source system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the source system.', + }, + _software: { + type: require('./element.schema.js'), + description: + 'May include configuration or other information useful in debugging.', + }, + software: { + type: GraphQLString, + description: + 'May include configuration or other information useful in debugging.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + version: { + type: GraphQLString, + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + contact: { + type: require('./contactpoint.schema.js'), + description: + 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: 'Identifies the routing target to send acknowledgements to.', + }, + endpoint: { + type: new GraphQLNonNull(UriScalar), + description: 'Identifies the routing target to send acknowledgements to.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/meta.schema.js b/src/resources/1_0_2/schemas/meta.schema.js index dd4b18c8..20c1f91e 100644 --- a/src/resources/1_0_2/schemas/meta.schema.js +++ b/src/resources/1_0_2/schemas/meta.schema.js @@ -1,9 +1,7 @@ -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -11,49 +9,63 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Meta', - description: 'Base StructureDefinition for Meta Type.', - fields: () => - extendSchema(require('./element.schema'), { - versionId: { - type: IdScalar, - description: - 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', - }, - _versionId: { - type: require('./element.schema'), - description: - 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', - }, - lastUpdated: { - type: InstantScalar, - description: - 'When the resource last changed - e.g. when the version changed.', - }, - _lastUpdated: { - type: require('./element.schema'), - description: - 'When the resource last changed - e.g. when the version changed.', - }, - profile: { - type: new GraphQLList(UriScalar), - description: - 'A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].', - }, - _profile: { - type: require('./element.schema'), - description: - 'A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - security: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', - }, - tag: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', - }, - }), + description: 'Base StructureDefinition for Meta Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _versionId: { + type: require('./element.schema.js'), + description: + 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', + }, + versionId: { + type: IdScalar, + description: + 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', + }, + _lastUpdated: { + type: require('./element.schema.js'), + description: + 'When the resource last changed - e.g. when the version changed.', + }, + lastUpdated: { + type: InstantScalar, + description: + 'When the resource last changed - e.g. when the version changed.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].', + }, + profile: { + type: new GraphQLList(UriScalar), + description: + 'A list of profiles [[[StructureDefinition]]]s that this resource claims to conform to. The URL is a reference to [[[StructureDefinition.url]]].', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + security: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', + }, + tag: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/money.schema.js b/src/resources/1_0_2/schemas/money.schema.js index bd147fa5..a1f22478 100644 --- a/src/resources/1_0_2/schemas/money.schema.js +++ b/src/resources/1_0_2/schemas/money.schema.js @@ -1,7 +1,5 @@ const { GraphQLObjectType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Money Schema @@ -9,6 +7,6 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); module.exports = new GraphQLObjectType({ name: 'Money', description: - 'An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision).', - fields: () => extendSchema(require('./quantity.schema')), + 'An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision)', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/schemas/namingsystem.schema.js b/src/resources/1_0_2/schemas/namingsystem.schema.js index 98d482f0..9cc3e3ef 100644 --- a/src/resources/1_0_2/schemas/namingsystem.schema.js +++ b/src/resources/1_0_2/schemas/namingsystem.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let NamingSystemResourceType = new GraphQLEnumType({ - name: 'NamingSystemResourceType', - values: { - NamingSystem: { value: 'NamingSystem' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,123 +17,190 @@ let NamingSystemResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'NamingSystem', - description: 'Base StructureDefinition for NamingSystem Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(NamingSystemResourceType), - description: 'Type of this resource.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The descriptive name of this particular identifier type or code system.', - }, - _name: { - type: require('./element.schema'), - description: - 'The descriptive name of this particular identifier type or code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "Indicates whether the naming system is 'ready for use' or not.", - }, - _status: { - type: require('./element.schema'), - description: - "Indicates whether the naming system is 'ready for use' or not.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-type - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the purpose for the naming system - what kinds of things does it make unique?.', - }, - _kind: { - type: require('./element.schema'), - description: - 'Indicates the purpose for the naming system - what kinds of things does it make unique?.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the naming system.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the naming system.', - }, - contact: { - type: new GraphQLList(require('./namingsystemcontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - responsible: { - type: GraphQLString, - description: - 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', - }, - _responsible: { - type: require('./element.schema'), - description: - 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Categorizes a naming system for easier search by grouping related naming systems.', - }, - description: { - type: GraphQLString, - description: - 'Details about what the namespace identifies including scope, granularity, version labeling, etc.', - }, - _description: { - type: require('./element.schema'), - description: - 'Details about what the namespace identifies including scope, granularity, version labeling, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems.', - }, - usage: { - type: GraphQLString, - description: - 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', - }, - _usage: { - type: require('./element.schema'), - description: - 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', - }, - uniqueId: { - type: new GraphQLList( - new GraphQLNonNull(require('./namingsystemuniqueid.schema')), - ), - description: - 'Indicates how the system may be identified when referenced in electronic exchange.', - }, - replacedBy: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for NamingSystem Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NamingSystem_Enum_schema', + values: { NamingSystem: { value: 'NamingSystem' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The descriptive name of this particular identifier type or code system.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The descriptive name of this particular identifier type or code system.', + }, + _status: { + type: require('./element.schema.js'), + description: + "Indicates whether the naming system is 'ready for use' or not.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "Indicates whether the naming system is 'ready for use' or not.", + }, + _kind: { + type: require('./element.schema.js'), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-type + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the naming system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the naming system.', + }, + contact: { + type: new GraphQLList(require('./namingsystemcontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _responsible: { + type: require('./element.schema.js'), + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + responsible: { + type: GraphQLString, + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Categorizes a naming system for easier search by grouping related naming systems.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Details about what the namespace identifies including scope, granularity, version labeling, etc.', + }, + description: { + type: GraphQLString, + description: + 'Details about what the namespace identifies including scope, granularity, version labeling, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + usage: { + type: GraphQLString, + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + uniqueId: { + type: new GraphQLList( + new GraphQLNonNull(require('./namingsystemuniqueid.schema.js')), + ), + description: + 'Indicates how the system may be identified when referenced in electronic exchange.', + }, + replacedBy: { + type: new GraphQLUnionType({ + name: 'NamingSystemreplacedBy_replacedBy_Union', description: 'For naming systems that are retired, indicates the naming system that should be used in their place (if any).', - }, - }), + types: () => [require('./namingsystem.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'NamingSystem') { + return require('./namingsystem.schema.js'); + } + }, + }), + description: + 'For naming systems that are retired, indicates the naming system that should be used in their place (if any).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/namingsystemcontact.schema.js b/src/resources/1_0_2/schemas/namingsystemcontact.schema.js index 618c416c..11ca0d72 100644 --- a/src/resources/1_0_2/schemas/namingsystemcontact.schema.js +++ b/src/resources/1_0_2/schemas/namingsystemcontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NamingSystem.contact Schema + * @summary NamingSystemcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'NamingSystemContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the naming system.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the naming system.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'NamingSystemcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the naming system.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the naming system.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/namingsystemuniqueid.schema.js b/src/resources/1_0_2/schemas/namingsystemuniqueid.schema.js index 7d6e0fbd..c0f5e999 100644 --- a/src/resources/1_0_2/schemas/namingsystemuniqueid.schema.js +++ b/src/resources/1_0_2/schemas/namingsystemuniqueid.schema.js @@ -1,58 +1,76 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary NamingSystem.uniqueId Schema + * @summary NamingSystemuniqueId Schema */ module.exports = new GraphQLObjectType({ - name: 'NamingSystemUniqueId', - description: - 'Indicates how the system may be identified when referenced in electronic exchange.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-identifier-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the unique identifier scheme used for this particular identifier.', - }, - _type: { - type: require('./element.schema'), - description: - 'Identifies the unique identifier scheme used for this particular identifier.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The string that should be sent over the wire to identify the code system or identifier system.', - }, - _value: { - type: require('./element.schema'), - description: - 'The string that should be sent over the wire to identify the code system or identifier system.', - }, - preferred: { - type: GraphQLBoolean, - description: - "Indicates whether this identifier is the 'preferred' identifier of this type.", - }, - _preferred: { - type: require('./element.schema'), - description: - "Indicates whether this identifier is the 'preferred' identifier of this type.", - }, - period: { - type: require('./period.schema'), - description: - 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', - }, - }), + name: 'NamingSystemuniqueId', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-identifier-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + _preferred: { + type: require('./element.schema.js'), + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + preferred: { + type: GraphQLBoolean, + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + period: { + type: require('./period.schema.js'), + description: + 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/narrative.schema.js b/src/resources/1_0_2/schemas/narrative.schema.js index cc81f7b6..aef6921a 100644 --- a/src/resources/1_0_2/schemas/narrative.schema.js +++ b/src/resources/1_0_2/schemas/narrative.schema.js @@ -1,8 +1,7 @@ -const CodeScalar = require('../scalars/code.scalar'); -const XhtmlScalar = require('../scalars/xhtml.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const XhtmlScalar = require('../scalars/xhtml.scalar.js'); /** * @name exports @@ -10,29 +9,43 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Narrative', - description: 'Base StructureDefinition for Narrative Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/narrative-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", - }, - _status: { - type: require('./element.schema'), - description: - "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", - }, - div: { - type: new GraphQLNonNull(XhtmlScalar), - description: - 'The actual narrative content, a stripped down version of XHTML.', - }, - _div: { - type: require('./element.schema'), - description: - 'The actual narrative content, a stripped down version of XHTML.', - }, - }), + description: 'Base StructureDefinition for Narrative Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _status: { + type: require('./element.schema.js'), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/narrative-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + _div: { + type: require('./element.schema.js'), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + div: { + type: new GraphQLNonNull(XhtmlScalar), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/nutritionorder.schema.js b/src/resources/1_0_2/schemas/nutritionorder.schema.js index f533e8b9..50b5bc20 100644 --- a/src/resources/1_0_2/schemas/nutritionorder.schema.js +++ b/src/resources/1_0_2/schemas/nutritionorder.schema.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let NutritionOrderResourceType = new GraphQLEnumType({ - name: 'NutritionOrderResourceType', - values: { - NutritionOrder: { value: 'NutritionOrder' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,82 +16,181 @@ let NutritionOrderResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'NutritionOrder', - description: 'Base StructureDefinition for NutritionOrder Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(NutritionOrderResourceType), - description: 'Type of this resource.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', - }, - orderer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for NutritionOrder Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NutritionOrder_Enum_schema', + values: { NutritionOrder: { value: 'NutritionOrder' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'NutritionOrderpatient_patient_Union', + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + }, + orderer: { + type: new GraphQLUnionType({ + name: 'NutritionOrderorderer_orderer_Union', description: 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order by the order sender or by the order receiver.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this order by the order sender or by the order receiver.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'NutritionOrderencounter_encounter_Union', description: 'An encounter that provides additional information about the healthcare context in which this request is made.', - }, - dateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date and time that this nutrition order was requested.', - }, - _dateTime: { - type: require('./element.schema'), - description: - 'The date and time that this nutrition order was requested.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/nutrition-order-status - status: { - type: CodeScalar, - description: 'The workflow status of the nutrition order/request.', - }, - _status: { - type: require('./element.schema'), - description: 'The workflow status of the nutrition order/request.', - }, - allergyIntolerance: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A link to a record of allergies or intolerances which should be included in the nutrition order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet - foodPreferenceModifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/food-type - excludeFoodModifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', - }, - oralDiet: { - type: require('./nutritionorderoraldiet.schema'), - description: 'Diet given orally in contrast to enteral (tube) feeding.', - }, - supplement: { - type: new GraphQLList(require('./nutritionordersupplement.schema')), - description: - "Oral nutritional products given in order to add further nutritional value to the patient's diet.", - }, - enteralFormula: { - type: require('./nutritionorderenteralformula.schema'), - description: - 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + _dateTime: { + type: require('./element.schema.js'), + description: 'The date and time that this nutrition order was requested.', + }, + dateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date and time that this nutrition order was requested.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The workflow status of the nutrition order/request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/nutrition-order-status + status: { + type: CodeScalar, + description: 'The workflow status of the nutrition order/request.', + }, + allergyIntolerance: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'NutritionOrderallergyIntolerance_allergyIntolerance_Union', + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + types: () => [require('./allergyintolerance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + }, + }), + ), + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet + foodPreferenceModifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/food-type + excludeFoodModifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + oralDiet: { + type: require('./nutritionorderoraldiet.schema.js'), + description: 'Diet given orally in contrast to enteral (tube) feeding.', + }, + supplement: { + type: new GraphQLList(require('./nutritionordersupplement.schema.js')), + description: + "Oral nutritional products given in order to add further nutritional value to the patient's diet.", + }, + enteralFormula: { + type: require('./nutritionorderenteralformula.schema.js'), + description: + 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/nutritionorderenteralformula.schema.js b/src/resources/1_0_2/schemas/nutritionorderenteralformula.schema.js index 064553b5..8eee34e8 100644 --- a/src/resources/1_0_2/schemas/nutritionorderenteralformula.schema.js +++ b/src/resources/1_0_2/schemas/nutritionorderenteralformula.schema.js @@ -1,81 +1,98 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.enteralFormula Schema + * @summary NutritionOrderenteralFormula Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderEnteralFormula', - description: - 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/entformula-type - baseFormulaType: { - type: require('./codeableconcept.schema'), - description: - 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', - }, - baseFormulaProductName: { - type: GraphQLString, - description: - "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", - }, - _baseFormulaProductName: { - type: require('./element.schema'), - description: - "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/entformula-additive - additiveType: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', - }, - additiveProductName: { - type: GraphQLString, - description: - 'The product or brand name of the type of modular component to be added to the formula.', - }, - _additiveProductName: { - type: require('./element.schema'), - description: - 'The product or brand name of the type of modular component to be added to the formula.', - }, - caloricDensity: { - type: require('./quantity.schema'), - description: - 'The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/enteral-route - routeofAdministration: { - type: require('./codeableconcept.schema'), - description: - "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", - }, - administration: { - type: new GraphQLList( - require('./nutritionorderenteralformulaadministration.schema'), - ), - description: - 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', - }, - maxVolumeToDeliver: { - type: require('./quantity.schema'), - description: - 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', - }, - administrationInstruction: { - type: GraphQLString, - description: - 'Free text formula administration, feeding instructions or additional instructions or information.', - }, - _administrationInstruction: { - type: require('./element.schema'), - description: - 'Free text formula administration, feeding instructions or additional instructions or information.', - }, - }), + name: 'NutritionOrderenteralFormula', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/entformula-type + baseFormulaType: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', + }, + _baseFormulaProductName: { + type: require('./element.schema.js'), + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + baseFormulaProductName: { + type: GraphQLString, + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/entformula-additive + additiveType: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', + }, + _additiveProductName: { + type: require('./element.schema.js'), + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + additiveProductName: { + type: GraphQLString, + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + caloricDensity: { + type: require('./quantity.schema.js'), + description: + 'The amount of energy (Calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 Calories per fluid ounce or an adult may require an enteral formula that provides 1.5 Calorie/mL.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/enteral-route + routeofAdministration: { + type: require('./codeableconcept.schema.js'), + description: + "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", + }, + administration: { + type: new GraphQLList( + require('./nutritionorderenteralformulaadministration.schema.js'), + ), + description: + 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', + }, + maxVolumeToDeliver: { + type: require('./quantity.schema.js'), + description: + 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', + }, + _administrationInstruction: { + type: require('./element.schema.js'), + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + administrationInstruction: { + type: GraphQLString, + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/nutritionorderenteralformulaadministration.schema.js b/src/resources/1_0_2/schemas/nutritionorderenteralformulaadministration.schema.js index c1c12d80..2d4bafc5 100644 --- a/src/resources/1_0_2/schemas/nutritionorderenteralformulaadministration.schema.js +++ b/src/resources/1_0_2/schemas/nutritionorderenteralformulaadministration.schema.js @@ -1,36 +1,53 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.enteralFormula.administration Schema + * @summary NutritionOrderenteralFormulaadministration Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderEnteralFormulaAdministration', - description: - 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - schedule: { - type: require('./timing.schema'), - description: - 'The time period and frequency at which the enteral formula should be delivered to the patient.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The volume of formula to provide to the patient per the specified administration schedule.', - }, - rateQuantity: { - type: require('./quantity.schema'), - description: - 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', - }, - rateRatio: { - type: require('./ratio.schema'), - description: - 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', - }, - }), + name: 'NutritionOrderenteralFormulaadministration', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + schedule: { + type: require('./timing.schema.js'), + description: + 'The time period and frequency at which the enteral formula should be delivered to the patient.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The volume of formula to provide to the patient per the specified administration schedule.', + }, + rateQuantity: { + type: require('./quantity.schema.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/nutritionorderoraldiet.schema.js b/src/resources/1_0_2/schemas/nutritionorderoraldiet.schema.js index 66eefe16..8756ea60 100644 --- a/src/resources/1_0_2/schemas/nutritionorderoraldiet.schema.js +++ b/src/resources/1_0_2/schemas/nutritionorderoraldiet.schema.js @@ -1,56 +1,74 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.oralDiet Schema + * @summary NutritionOrderoralDiet Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderOralDiet', - description: 'Diet given orally in contrast to enteral (tube) feeding.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/diet-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', - }, - schedule: { - type: new GraphQLList(require('./timing.schema')), - description: - 'The time period and frequency at which the diet should be given.', - }, - nutrient: { - type: new GraphQLList( - require('./nutritionorderoraldietnutrient.schema'), - ), - description: - 'Class that defines the quantity and type of nutrient modifications required for the oral diet.', - }, - texture: { - type: new GraphQLList( - require('./nutritionorderoraldiettexture.schema'), - ), - description: - 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consistency-type - fluidConsistencyType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', - }, - instruction: { - type: GraphQLString, - description: - 'Free text or additional instructions or information pertaining to the oral diet.', - }, - _instruction: { - type: require('./element.schema'), - description: - 'Free text or additional instructions or information pertaining to the oral diet.', - }, - }), + name: 'NutritionOrderoralDiet', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diet-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', + }, + schedule: { + type: new GraphQLList(require('./timing.schema.js')), + description: + 'The time period and frequency at which the diet should be given.', + }, + nutrient: { + type: new GraphQLList( + require('./nutritionorderoraldietnutrient.schema.js'), + ), + description: + 'Class that defines the quantity and type of nutrient modifications required for the oral diet.', + }, + texture: { + type: new GraphQLList( + require('./nutritionorderoraldiettexture.schema.js'), + ), + description: + 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consistency-type + fluidConsistencyType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', + }, + _instruction: { + type: require('./element.schema.js'), + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/nutritionorderoraldietnutrient.schema.js b/src/resources/1_0_2/schemas/nutritionorderoraldietnutrient.schema.js index 33a7a73e..95eb3b8c 100644 --- a/src/resources/1_0_2/schemas/nutritionorderoraldietnutrient.schema.js +++ b/src/resources/1_0_2/schemas/nutritionorderoraldietnutrient.schema.js @@ -1,27 +1,43 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.oralDiet.nutrient Schema + * @summary NutritionOrderoralDietnutrient Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderOralDietNutrient', - description: - 'Class that defines the quantity and type of nutrient modifications required for the oral diet.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/nutrient-code - modifier: { - type: require('./codeableconcept.schema'), - description: - 'The nutrient that is being modified such as carbohydrate or sodium.', - }, - amount: { - type: require('./quantity.schema'), - description: - 'The quantity of the specified nutrient to include in diet.', - }, - }), + name: 'NutritionOrderoralDietnutrient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/nutrient-code + modifier: { + type: require('./codeableconcept.schema.js'), + description: + 'The nutrient that is being modified such as carbohydrate or sodium.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'The quantity of the specified nutrient to include in diet.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/nutritionorderoraldiettexture.schema.js b/src/resources/1_0_2/schemas/nutritionorderoraldiettexture.schema.js index 25fa7c8f..b3fd4e47 100644 --- a/src/resources/1_0_2/schemas/nutritionorderoraldiettexture.schema.js +++ b/src/resources/1_0_2/schemas/nutritionorderoraldiettexture.schema.js @@ -1,28 +1,45 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.oralDiet.texture Schema + * @summary NutritionOrderoralDiettexture Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderOralDietTexture', - description: - 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/texture-code - modifier: { - type: require('./codeableconcept.schema'), - description: - 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/modified-foodtype - foodType: { - type: require('./codeableconcept.schema'), - description: - 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', - }, - }), + name: 'NutritionOrderoralDiettexture', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/texture-code + modifier: { + type: require('./codeableconcept.schema.js'), + description: + 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/modified-foodtype + foodType: { + type: require('./codeableconcept.schema.js'), + description: + 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/nutritionordersupplement.schema.js b/src/resources/1_0_2/schemas/nutritionordersupplement.schema.js index b85a0890..be62a3b5 100644 --- a/src/resources/1_0_2/schemas/nutritionordersupplement.schema.js +++ b/src/resources/1_0_2/schemas/nutritionordersupplement.schema.js @@ -1,51 +1,68 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary NutritionOrder.supplement Schema + * @summary NutritionOrdersupplement Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderSupplement', - description: - "Oral nutritional products given in order to add further nutritional value to the patient's diet.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplement-type - type: { - type: require('./codeableconcept.schema'), - description: - 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', - }, - productName: { - type: GraphQLString, - description: - "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", - }, - _productName: { - type: require('./element.schema'), - description: - "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", - }, - schedule: { - type: new GraphQLList(require('./timing.schema')), - description: - 'The time period and frequency at which the supplement(s) should be given.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The amount of the nutritional supplement to be given.', - }, - instruction: { - type: GraphQLString, - description: - 'Free text or additional instructions or information pertaining to the oral supplement.', - }, - _instruction: { - type: require('./element.schema'), - description: - 'Free text or additional instructions or information pertaining to the oral supplement.', - }, - }), + name: 'NutritionOrdersupplement', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplement-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', + }, + _productName: { + type: require('./element.schema.js'), + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + productName: { + type: GraphQLString, + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + schedule: { + type: new GraphQLList(require('./timing.schema.js')), + description: + 'The time period and frequency at which the supplement(s) should be given.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount of the nutritional supplement to be given.', + }, + _instruction: { + type: require('./element.schema.js'), + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/observation.schema.js b/src/resources/1_0_2/schemas/observation.schema.js index 68c71f19..9d08085b 100644 --- a/src/resources/1_0_2/schemas/observation.schema.js +++ b/src/resources/1_0_2/schemas/observation.schema.js @@ -1,23 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ObservationResourceType = new GraphQLEnumType({ - name: 'ObservationResourceType', - values: { - Observation: { value: 'Observation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports @@ -25,199 +19,340 @@ let ObservationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Observation', - description: 'Base StructureDefinition for Observation Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ObservationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'A unique identifier for the simple observation instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the result value.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the result value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-category - category: { - type: require('./codeableconcept.schema'), - description: - 'A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Describes what was observed. Sometimes this is called the observation 'name'.", - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Observation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Observation_Enum_schema', + values: { Observation: { value: 'Observation' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'A unique identifier for the simple observation instance.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the result value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the result value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'name'.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'Observationsubject_subject_Union', description: 'The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Observationencounter_encounter_Union', description: 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - _effectiveDateTime: { - type: require('./element.schema'), - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - effectivePeriod: { - type: require('./period.schema'), - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - issued: { - type: InstantScalar, - description: - 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', - }, - _issued: { - type: require('./element.schema'), - description: - 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', - }, - performer: { - type: new GraphQLList(require('./reference.schema')), - description: - "Who was responsible for asserting the observed value as 'true'.", - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueString: { - type: GraphQLString, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRange: { - type: require('./range.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRatio: { - type: require('./ratio.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueSampledData: { - type: require('./sampleddata.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueTime: { - type: TimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valuePeriod: { - type: require('./period.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason - dataAbsentReason: { - type: require('./codeableconcept.schema'), - description: - 'Provides a reason why the expected value in the element Observation.value[x] is missing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation - interpretation: { - type: require('./codeableconcept.schema'), - description: - 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', - }, - comments: { - type: GraphQLString, - description: - 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', - }, - _comments: { - type: require('./element.schema'), - description: - 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.schema'), - description: - "Indicates the site on the subject's body where the observation was made (i.e. the target site).", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-methods - method: { - type: require('./codeableconcept.schema'), - description: 'Indicates the mechanism used to perform the observation.', - }, - specimen: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + _issued: { + type: require('./element.schema.js'), + description: + 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Observationperformer_performer_Union', + description: + "Who was responsible for asserting the observed value as 'true'.", + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + "Who was responsible for asserting the observed value as 'true'.", + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason + dataAbsentReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation + interpretation: { + type: require('./codeableconcept.schema.js'), + description: + 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', + }, + _comments: { + type: require('./element.schema.js'), + description: + 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', + }, + comments: { + type: GraphQLString, + description: + 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-methods + method: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the mechanism used to perform the observation.', + }, + specimen: { + type: new GraphQLUnionType({ + name: 'Observationspecimen_specimen_Union', description: 'The specimen that was used when this observation was made.', - }, - device: { - type: require('./reference.schema'), + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + description: 'The specimen that was used when this observation was made.', + }, + device: { + type: new GraphQLUnionType({ + name: 'Observationdevice_device_Union', description: 'The device used to generate the observation data.', - }, - referenceRange: { - type: new GraphQLList(require('./observationreferencerange.schema')), - description: - 'Guidance on how to interpret the value by comparison to a normal or recommended range.', - }, - related: { - type: new GraphQLList(require('./observationrelated.schema')), - description: - 'A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.', - }, - component: { - type: new GraphQLList(require('./observationcomponent.schema')), - description: - 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', - }, - }), + types: () => [ + require('./device.schema.js'), + require('./devicemetric.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'DeviceMetric') { + return require('./devicemetric.schema.js'); + } + }, + }), + description: 'The device used to generate the observation data.', + }, + referenceRange: { + type: new GraphQLList(require('./observationreferencerange.schema.js')), + description: + 'Guidance on how to interpret the value by comparison to a normal or recommended range.', + }, + related: { + type: new GraphQLList(require('./observationrelated.schema.js')), + description: + 'A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.', + }, + component: { + type: new GraphQLList(require('./observationcomponent.schema.js')), + description: + 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/observationcomponent.schema.js b/src/resources/1_0_2/schemas/observationcomponent.schema.js index e20a879c..0ab44c6f 100644 --- a/src/resources/1_0_2/schemas/observationcomponent.schema.js +++ b/src/resources/1_0_2/schemas/observationcomponent.schema.js @@ -1,95 +1,117 @@ -const TimeScalar = require('../scalars/time.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Observation.component Schema + * @summary Observationcomponent Schema */ module.exports = new GraphQLObjectType({ - name: 'ObservationComponent', - description: - 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Describes what was observed. Sometimes this is called the observation 'code'.", - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueString: { - type: GraphQLString, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRange: { - type: require('./range.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRatio: { - type: require('./ratio.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueSampledData: { - type: require('./sampleddata.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueTime: { - type: TimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valuePeriod: { - type: require('./period.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason - dataAbsentReason: { - type: require('./codeableconcept.schema'), - description: - 'Provides a reason why the expected value in the element Observation.value[x] is missing.', - }, - }), + name: 'Observationcomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'code'.", + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason + dataAbsentReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/observationreferencerange.schema.js b/src/resources/1_0_2/schemas/observationreferencerange.schema.js index 2459e0a7..6326aacb 100644 --- a/src/resources/1_0_2/schemas/observationreferencerange.schema.js +++ b/src/resources/1_0_2/schemas/observationreferencerange.schema.js @@ -1,46 +1,63 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Observation.referenceRange Schema + * @summary ObservationreferenceRange Schema */ module.exports = new GraphQLObjectType({ - name: 'ObservationReferenceRange', - description: - 'Guidance on how to interpret the value by comparison to a normal or recommended range.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - low: { - type: require('./quantity.schema'), - description: - 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', - }, - high: { - type: require('./quantity.schema'), - description: - 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referencerange-meaning - meaning: { - type: require('./codeableconcept.schema'), - description: 'Code for the meaning of the reference range.', - }, - age: { - type: require('./range.schema'), - description: - 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', - }, - text: { - type: GraphQLString, - description: - "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", - }, - _text: { - type: require('./element.schema'), - description: - "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", - }, - }), + name: 'ObservationreferenceRange', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + low: { + type: require('./quantity.schema.js'), + description: + 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', + }, + high: { + type: require('./quantity.schema.js'), + description: + 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referencerange-meaning + meaning: { + type: require('./codeableconcept.schema.js'), + description: 'Code for the meaning of the reference range.', + }, + age: { + type: require('./range.schema.js'), + description: + 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', + }, + _text: { + type: require('./element.schema.js'), + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + text: { + type: GraphQLString, + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/observationrelated.schema.js b/src/resources/1_0_2/schemas/observationrelated.schema.js index 731d2cdf..e4d9dc9a 100644 --- a/src/resources/1_0_2/schemas/observationrelated.schema.js +++ b/src/resources/1_0_2/schemas/observationrelated.schema.js @@ -1,33 +1,73 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Observation.related Schema + * @summary Observationrelated Schema */ module.exports = new GraphQLObjectType({ - name: 'ObservationRelated', - description: - 'A reference to another resource (usually another Observation but could also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-relationshiptypes - type: { - type: CodeScalar, - description: - 'A code specifying the kind of relationship that exists with the target resource.', - }, - _type: { - type: require('./element.schema'), - description: - 'A code specifying the kind of relationship that exists with the target resource.', - }, - target: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.', - }, - }), + name: 'Observationrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'A code specifying the kind of relationship that exists with the target resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-relationshiptypes + type: { + type: CodeScalar, + description: + 'A code specifying the kind of relationship that exists with the target resource.', + }, + target: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Observationrelatedtarget_target_Union', + description: + 'A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.', + types: () => [ + require('./observation.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: + 'A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/operationdefinition.schema.js b/src/resources/1_0_2/schemas/operationdefinition.schema.js index d8d0a057..686d9ace 100644 --- a/src/resources/1_0_2/schemas/operationdefinition.schema.js +++ b/src/resources/1_0_2/schemas/operationdefinition.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OperationDefinitionResourceType = new GraphQLEnumType({ - name: 'OperationDefinitionResourceType', - values: { - OperationDefinition: { value: 'OperationDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,183 +18,252 @@ let OperationDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'OperationDefinition', - description: 'Base StructureDefinition for OperationDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(OperationDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the operation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name identifying the operation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the profile.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the profile.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether this is an operation or a named query.', - }, - _kind: { - type: require('./element.schema'), - description: 'Whether this is an operation or a named query.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the operation definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the operation definition.', - }, - contact: { - type: new GraphQLList(require('./operationdefinitioncontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the profile and its use.', - }, - _description: { - type: require('./element.schema'), - description: - 'A free text natural language description of the profile and its use.', - }, - requirements: { - type: GraphQLString, - description: - "Explains why this operation definition is needed and why it's been constrained as it has.", - }, - _requirements: { - type: require('./element.schema'), - description: - "Explains why this operation definition is needed and why it's been constrained as it has.", - }, - idempotent: { - type: GraphQLBoolean, - description: - 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', - }, - _idempotent: { - type: require('./element.schema'), - description: - 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', - }, - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name used to invoke the operation.', - }, - _code: { - type: require('./element.schema'), - description: 'The name used to invoke the operation.', - }, - notes: { - type: GraphQLString, - description: - 'Additional information about how to use this operation or named query.', - }, - _notes: { - type: require('./element.schema'), - description: - 'Additional information about how to use this operation or named query.', - }, - base: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for OperationDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationDefinition_Enum_schema', + values: { OperationDefinition: { value: 'OperationDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name identifying the operation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the operation.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the profile.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the profile.', + }, + _kind: { + type: require('./element.schema.js'), + description: 'Whether this is an operation or a named query.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an operation or a named query.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the operation definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the operation definition.', + }, + contact: { + type: new GraphQLList(require('./operationdefinitioncontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the operation definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the Operation Definition changes.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A free text natural language description of the profile and its use.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the profile and its use.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + "Explains why this operation definition is needed and why it's been constrained as it has.", + }, + requirements: { + type: GraphQLString, + description: + "Explains why this operation definition is needed and why it's been constrained as it has.", + }, + _idempotent: { + type: require('./element.schema.js'), + description: + 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', + }, + idempotent: { + type: GraphQLBoolean, + description: + 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', + }, + _code: { + type: require('./element.schema.js'), + description: 'The name used to invoke the operation.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name used to invoke the operation.', + }, + _notes: { + type: require('./element.schema.js'), + description: + 'Additional information about how to use this operation or named query.', + }, + notes: { + type: GraphQLString, + description: + 'Additional information about how to use this operation or named query.', + }, + base: { + type: new GraphQLUnionType({ + name: 'OperationDefinitionbase_base_Union', description: 'Indicates that this operation definition is a constraining profile on the base.', - }, - system: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', - }, - _system: { - type: require('./element.schema'), - description: - 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLList(CodeScalar), - description: - 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).', - }, - _type: { - type: require('./element.schema'), - description: - 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).', - }, - instance: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', - }, - _instance: { - type: require('./element.schema'), - description: - 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', - }, - parameter: { - type: new GraphQLList(require('./operationdefinitionparameter.schema')), - description: 'The parameters for the operation/query.', - }, - }), + types: () => [require('./operationdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationDefinition') { + return require('./operationdefinition.schema.js'); + } + }, + }), + description: + 'Indicates that this operation definition is a constraining profile on the base.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + system: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).', + }, + _instance: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + instance: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + parameter: { + type: new GraphQLList( + require('./operationdefinitionparameter.schema.js'), + ), + description: 'The parameters for the operation/query.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/operationdefinitioncontact.schema.js b/src/resources/1_0_2/schemas/operationdefinitioncontact.schema.js index 58f81d67..c3e11e03 100644 --- a/src/resources/1_0_2/schemas/operationdefinitioncontact.schema.js +++ b/src/resources/1_0_2/schemas/operationdefinitioncontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary OperationDefinition.contact Schema + * @summary OperationDefinitioncontact Schema */ module.exports = new GraphQLObjectType({ - name: 'OperationDefinitionContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the operation definition.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the operation definition.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'OperationDefinitioncontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the operation definition.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the operation definition.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/operationdefinitionparameter.schema.js b/src/resources/1_0_2/schemas/operationdefinitionparameter.schema.js index 0089c772..230d6321 100644 --- a/src/resources/1_0_2/schemas/operationdefinitionparameter.schema.js +++ b/src/resources/1_0_2/schemas/operationdefinitionparameter.schema.js @@ -1,85 +1,115 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLInt, GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary OperationDefinition.parameter Schema + * @summary OperationDefinitionparameter Schema */ module.exports = new GraphQLObjectType({ - name: 'OperationDefinitionParameter', - description: 'The parameters for the operation/query.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name of used to identify the parameter.', - }, - _name: { - type: require('./element.schema'), - description: 'The name of used to identify the parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use - use: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether this is an input or an output parameter.', - }, - _use: { - type: require('./element.schema'), - description: 'Whether this is an input or an output parameter.', - }, - min: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - _min: { - type: require('./element.schema'), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - max: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - _max: { - type: require('./element.schema'), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - documentation: { - type: GraphQLString, - description: 'Describes the meaning or use of this parameter.', - }, - _documentation: { - type: require('./element.schema'), - description: 'Describes the meaning or use of this parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-type - type: { - type: CodeScalar, - description: 'The type for this parameter.', - }, - _type: { - type: require('./element.schema'), - description: 'The type for this parameter.', - }, - profile: { - type: require('./reference.schema'), + name: 'OperationDefinitionparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of used to identify the parameter.', + }, + name: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of used to identify the parameter.', + }, + _use: { + type: require('./element.schema.js'), + description: 'Whether this is an input or an output parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an input or an output parameter.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.schema.js'), + description: 'Describes the meaning or use of this parameter.', + }, + documentation: { + type: GraphQLString, + description: 'Describes the meaning or use of this parameter.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type for this parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-type + type: { + type: CodeScalar, + description: 'The type for this parameter.', + }, + profile: { + type: new GraphQLUnionType({ + name: 'OperationDefinitionparameterprofile_profile_Union', description: 'A profile the specifies the rules that this parameter must conform to.', - }, - binding: { - type: require('./operationdefinitionparameterbinding.schema'), - description: - 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', - }, - }), + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + description: + 'A profile the specifies the rules that this parameter must conform to.', + }, + binding: { + type: require('./operationdefinitionparameterbinding.schema.js'), + description: + 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/operationdefinitionparameterbinding.schema.js b/src/resources/1_0_2/schemas/operationdefinitionparameterbinding.schema.js index 41ade696..bcc0863e 100644 --- a/src/resources/1_0_2/schemas/operationdefinitionparameterbinding.schema.js +++ b/src/resources/1_0_2/schemas/operationdefinitionparameterbinding.schema.js @@ -1,44 +1,79 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary OperationDefinition.parameter.binding Schema + * @summary OperationDefinitionparameterbinding Schema */ module.exports = new GraphQLObjectType({ - name: 'OperationDefinitionParameterBinding', - description: - 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/binding-strength - strength: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - _strength: { - type: require('./element.schema'), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - valueSetUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - _valueSetUri: { - type: require('./element.schema'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - valueSetReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - }), + name: 'OperationDefinitionparameterbinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _strength: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/binding-strength + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _valueSetUri: { + type: require('./element.schema.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'OperationDefinitionparameterbindingvalueSetReference_valueSetReference_Union', + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + ), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/operationoutcome.schema.js b/src/resources/1_0_2/schemas/operationoutcome.schema.js index 24bd72b8..3b104906 100644 --- a/src/resources/1_0_2/schemas/operationoutcome.schema.js +++ b/src/resources/1_0_2/schemas/operationoutcome.schema.js @@ -1,19 +1,13 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OperationOutcomeResourceType = new GraphQLEnumType({ - name: 'OperationOutcomeResourceType', - values: { - OperationOutcome: { value: 'OperationOutcome' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,19 +15,76 @@ let OperationOutcomeResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'OperationOutcome', - description: 'Base StructureDefinition for OperationOutcome Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(OperationOutcomeResourceType), - description: 'Type of this resource.', - }, - issue: { - type: new GraphQLList( - new GraphQLNonNull(require('./operationoutcomeissue.schema')), - ), - description: - 'An error, warning or information message that results from a system action.', - }, - }), + description: 'Base StructureDefinition for OperationOutcome Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationOutcome_Enum_schema', + values: { OperationOutcome: { value: 'OperationOutcome' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + issue: { + type: new GraphQLList( + new GraphQLNonNull(require('./operationoutcomeissue.schema.js')), + ), + description: + 'An error, warning or information message that results from a system action.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/operationoutcomeissue.schema.js b/src/resources/1_0_2/schemas/operationoutcomeissue.schema.js index 86511b96..d44b9fe8 100644 --- a/src/resources/1_0_2/schemas/operationoutcomeissue.schema.js +++ b/src/resources/1_0_2/schemas/operationoutcomeissue.schema.js @@ -1,70 +1,87 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary OperationOutcome.issue Schema + * @summary OperationOutcomeissue Schema */ module.exports = new GraphQLObjectType({ - name: 'OperationOutcomeIssue', - description: - 'An error, warning or information message that results from a system action.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/issue-severity - severity: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the issue indicates a variation from successful processing.', - }, - _severity: { - type: require('./element.schema'), - description: - 'Indicates whether the issue indicates a variation from successful processing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/issue-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', - }, - _code: { - type: require('./element.schema'), - description: - 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-outcome - details: { - type: require('./codeableconcept.schema'), - description: - 'Additional details about the error. This may be a text description of the error, or a system code that identifies the error.', - }, - diagnostics: { - type: GraphQLString, - description: - 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', - }, - _diagnostics: { - type: require('./element.schema'), - description: - 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', - }, - location: { - type: new GraphQLList(GraphQLString), - description: - 'A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', - }, - _location: { - type: require('./element.schema'), - description: - 'A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', - }, - }), + name: 'OperationOutcomeissue', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/issue-severity + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/issue-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-outcome + details: { + type: require('./codeableconcept.schema.js'), + description: + 'Additional details about the error. This may be a text description of the error, or a system code that identifies the error.', + }, + _diagnostics: { + type: require('./element.schema.js'), + description: + 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', + }, + diagnostics: { + type: GraphQLString, + description: + 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', + }, + _location: { + type: require('./element.schema.js'), + description: + 'A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', + }, + location: { + type: new GraphQLList(GraphQLString), + description: + 'A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/order.schema.js b/src/resources/1_0_2/schemas/order.schema.js index 5aab90a5..20eb86b9 100644 --- a/src/resources/1_0_2/schemas/order.schema.js +++ b/src/resources/1_0_2/schemas/order.schema.js @@ -1,20 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OrderResourceType = new GraphQLEnumType({ - name: 'OrderResourceType', - values: { - Order: { value: 'Order' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,55 +16,189 @@ let OrderResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Order', - description: 'Base StructureDefinition for Order Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(OrderResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order by the orderer or by the receiver.', - }, - date: { - type: DateTimeScalar, - description: 'When the order was made.', - }, - _date: { - type: require('./element.schema'), - description: 'When the order was made.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Order Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Order_Enum_schema', + values: { Order: { value: 'Order' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers assigned to this order by the orderer or by the receiver.', + }, + _date: { + type: require('./element.schema.js'), + description: 'When the order was made.', + }, + date: { + type: DateTimeScalar, + description: 'When the order was made.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Ordersubject_subject_Union', description: 'Patient this order is about.', - }, - source: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: 'Patient this order is about.', + }, + source: { + type: new GraphQLUnionType({ + name: 'Ordersource_source_Union', description: 'Who initiated the order.', - }, - target: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Who initiated the order.', + }, + target: { + type: new GraphQLUnionType({ + name: 'Ordertarget_target_Union', description: 'Who is intended to fulfill the order.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'Text - why the order was made.', - }, - reasonReference: { - type: require('./reference.schema'), + types: () => [ + require('./organization.schema.js'), + require('./device.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'Who is intended to fulfill the order.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Text - why the order was made.', + }, + reasonReference: { + type: new GraphQLUnionType({ + name: 'OrderreasonReference_reasonReference_Union', description: 'Text - why the order was made.', - }, - when: { - type: require('./orderwhen.schema'), - description: 'When order should be fulfilled.', - }, - detail: { - type: new GraphQLList( - new GraphQLNonNull(require('./reference.schema')), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Text - why the order was made.', + }, + when: { + type: require('./orderwhen.schema.js'), + description: 'When order should be fulfilled.', + }, + detail: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Orderdetail_detail_Union', + description: 'What action is being ordered.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), ), - description: 'What action is being ordered.', - }, - }), + ), + description: 'What action is being ordered.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/orderresponse.schema.js b/src/resources/1_0_2/schemas/orderresponse.schema.js index 79e89a02..2859eff3 100644 --- a/src/resources/1_0_2/schemas/orderresponse.schema.js +++ b/src/resources/1_0_2/schemas/orderresponse.schema.js @@ -1,21 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OrderResponseResourceType = new GraphQLEnumType({ - name: 'OrderResponseResourceType', - values: { - OrderResponse: { value: 'OrderResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,62 +17,162 @@ let OrderResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'OrderResponse', - description: 'Base StructureDefinition for OrderResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(OrderResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems.', - }, - request: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'A reference to the order that this is in response to.', - }, - date: { - type: DateTimeScalar, - description: - 'The date and time at which this order response was made (created/posted).', - }, - _date: { - type: require('./element.schema'), - description: - 'The date and time at which this order response was made (created/posted).', - }, - who: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for OrderResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OrderResponse_Enum_schema', + values: { OrderResponse: { value: 'OrderResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers assigned to this order. The identifiers are usually assigned by the system responding to the order, but they may be provided or added to by other systems.', + }, + request: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'OrderResponserequest_request_Union', + description: 'A reference to the order that this is in response to.', + types: () => [require('./order.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Order') { + return require('./order.schema.js'); + } + }, + }), + ), + description: 'A reference to the order that this is in response to.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date and time at which this order response was made (created/posted).', + }, + date: { + type: DateTimeScalar, + description: + 'The date and time at which this order response was made (created/posted).', + }, + who: { + type: new GraphQLUnionType({ + name: 'OrderResponsewho_who_Union', description: 'The person, organization, or device credited with making the response.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/order-status - orderStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'What this response says about the status of the original order.', - }, - _orderStatus: { - type: require('./element.schema'), - description: - 'What this response says about the status of the original order.', - }, - description: { - type: GraphQLString, - description: - 'Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.', - }, - _description: { - type: require('./element.schema'), - description: - 'Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.', - }, - fulfillment: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The person, organization, or device credited with making the response.', + }, + _orderStatus: { + type: require('./element.schema.js'), + description: + 'What this response says about the status of the original order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/order-status + orderStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'What this response says about the status of the original order.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.', + }, + description: { + type: GraphQLString, + description: + 'Additional description about the response - e.g. a text description provided by a human user when making decisions about the order.', + }, + fulfillment: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'OrderResponsefulfillment_fulfillment_Union', + description: + 'Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Links to resources that provide details of the outcome of performing the order; e.g. Diagnostic Reports in a response that is made to an order that referenced a diagnostic order.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/orderwhen.schema.js b/src/resources/1_0_2/schemas/orderwhen.schema.js index 13950b25..b7c86e03 100644 --- a/src/resources/1_0_2/schemas/orderwhen.schema.js +++ b/src/resources/1_0_2/schemas/orderwhen.schema.js @@ -1,24 +1,42 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Order.when Schema + * @summary Orderwhen Schema */ module.exports = new GraphQLObjectType({ - name: 'OrderWhen', - description: 'When order should be fulfilled.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: require('./codeableconcept.schema'), - description: - 'Code specifies when request should be done. The code may simply be a priority code.', - }, - schedule: { - type: require('./timing.schema'), - description: 'A formal schedule.', - }, - }), + name: 'Orderwhen', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Code specifies when request should be done. The code may simply be a priority code.', + }, + schedule: { + type: require('./timing.schema.js'), + description: 'A formal schedule.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/organization.schema.js b/src/resources/1_0_2/schemas/organization.schema.js index f95cbc3a..3254c1d1 100644 --- a/src/resources/1_0_2/schemas/organization.schema.js +++ b/src/resources/1_0_2/schemas/organization.schema.js @@ -1,20 +1,15 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OrganizationResourceType = new GraphQLEnumType({ - name: 'OrganizationResourceType', - values: { - Organization: { value: 'Organization' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,57 +17,121 @@ let OrganizationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Organization', - description: 'Base StructureDefinition for Organization Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(OrganizationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', - }, - active: { - type: GraphQLBoolean, - description: - "Whether the organization's record is still in active use.", - }, - _active: { - type: require('./element.schema'), - description: - "Whether the organization's record is still in active use.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/organization-type - type: { - type: require('./codeableconcept.schema'), - description: 'The kind of organization that this is.', - }, - name: { - type: GraphQLString, - description: 'A name associated with the organization.', - }, - _name: { - type: require('./element.schema'), - description: 'A name associated with the organization.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: 'A contact detail for the organization.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: 'An address for the organization.', - }, - partOf: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Organization Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Organization_Enum_schema', + values: { Organization: { value: 'Organization' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether the organization's record is still in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether the organization's record is still in active use.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/organization-type + type: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of organization that this is.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name associated with the organization.', + }, + name: { + type: GraphQLString, + description: 'A name associated with the organization.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: 'A contact detail for the organization.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'An address for the organization.', + }, + partOf: { + type: new GraphQLUnionType({ + name: 'OrganizationpartOf_partOf_Union', description: 'The organization of which this organization forms a part.', - }, - contact: { - type: new GraphQLList(require('./organizationcontact.schema')), - description: 'Contact for the organization for a certain purpose.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization of which this organization forms a part.', + }, + contact: { + type: new GraphQLList(require('./organizationcontact.schema.js')), + description: 'Contact for the organization for a certain purpose.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/organizationcontact.schema.js b/src/resources/1_0_2/schemas/organizationcontact.schema.js index 38c14895..d67baa13 100644 --- a/src/resources/1_0_2/schemas/organizationcontact.schema.js +++ b/src/resources/1_0_2/schemas/organizationcontact.schema.js @@ -1,34 +1,51 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Organization.contact Schema + * @summary Organizationcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'OrganizationContact', - description: 'Contact for the organization for a certain purpose.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contactentity-type - purpose: { - type: require('./codeableconcept.schema'), - description: - 'Indicates a purpose for which the contact can be reached.', - }, - name: { - type: require('./humanname.schema'), - description: 'A name associated with the contact.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', - }, - address: { - type: require('./address.schema'), - description: 'Visiting or postal addresses for the contact.', - }, - }), + name: 'Organizationcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contactentity-type + purpose: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates a purpose for which the contact can be reached.', + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', + }, + address: { + type: require('./address.schema.js'), + description: 'Visiting or postal addresses for the contact.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/parameters.schema.js b/src/resources/1_0_2/schemas/parameters.schema.js index 8f1c49c9..6be03c25 100644 --- a/src/resources/1_0_2/schemas/parameters.schema.js +++ b/src/resources/1_0_2/schemas/parameters.schema.js @@ -1,19 +1,12 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ParametersResourceType = new GraphQLEnumType({ - name: 'ParametersResourceType', - values: { - Parameters: { value: 'Parameters' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,16 +14,53 @@ let ParametersResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Parameters', - description: 'Base StructureDefinition for Parameters Resource.', - fields: () => - extendSchema(require('./resource.schema'), { - resourceType: { - type: new GraphQLNonNull(ParametersResourceType), - description: 'Type of this resource.', - }, - parameter: { - type: new GraphQLList(require('./parametersparameter.schema')), - description: 'A parameter passed to or received from the operation.', - }, - }), + description: 'Base StructureDefinition for Parameters Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Parameters_Enum_schema', + values: { Parameters: { value: 'Parameters' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + parameter: { + type: new GraphQLList(require('./parametersparameter.schema.js')), + description: 'A parameter passed to or received from the operation.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/parametersparameter.schema.js b/src/resources/1_0_2/schemas/parametersparameter.schema.js index 1cd5ea35..37663b35 100644 --- a/src/resources/1_0_2/schemas/parametersparameter.schema.js +++ b/src/resources/1_0_2/schemas/parametersparameter.schema.js @@ -1,243 +1,262 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Parameters.parameter Schema + * @summary Parametersparameter Schema */ module.exports = new GraphQLObjectType({ - name: 'ParametersParameter', - description: 'A parameter passed to or received from the operation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of the parameter (reference to the operation definition).', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of the parameter (reference to the operation definition).', - }, - valueBoolean: { - type: GraphQLBoolean, - description: 'If the parameter is a data type.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueInteger: { - type: GraphQLInt, - description: 'If the parameter is a data type.', - }, - _valueInteger: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueDecimal: { - type: GraphQLFloat, - description: 'If the parameter is a data type.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueBase64Binary: { - type: Base64BinaryScalar, - description: 'If the parameter is a data type.', - }, - _valueBase64Binary: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueInstant: { - type: InstantScalar, - description: 'If the parameter is a data type.', - }, - _valueInstant: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueString: { - type: GraphQLString, - description: 'If the parameter is a data type.', - }, - _valueString: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueUri: { - type: UriScalar, - description: 'If the parameter is a data type.', - }, - _valueUri: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueDate: { - type: DateScalar, - description: 'If the parameter is a data type.', - }, - _valueDate: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueDateTime: { - type: DateTimeScalar, - description: 'If the parameter is a data type.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueTime: { - type: TimeScalar, - description: 'If the parameter is a data type.', - }, - _valueTime: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueCode: { - type: CodeScalar, - description: 'If the parameter is a data type.', - }, - _valueCode: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueOid: { - type: OidScalar, - description: 'If the parameter is a data type.', - }, - _valueOid: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueId: { - type: IdScalar, - description: 'If the parameter is a data type.', - }, - _valueId: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueUnsignedInt: { - type: UnsignedIntScalar, - description: 'If the parameter is a data type.', - }, - _valueUnsignedInt: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valuePositiveInt: { - type: PositiveIntScalar, - description: 'If the parameter is a data type.', - }, - _valuePositiveInt: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueMarkdown: { - type: GraphQLString, - description: 'If the parameter is a data type.', - }, - _valueMarkdown: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueAnnotation: { - type: require('./annotation.schema'), - description: 'If the parameter is a data type.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: 'If the parameter is a data type.', - }, - valueIdentifier: { - type: require('./identifier.schema'), - description: 'If the parameter is a data type.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'If the parameter is a data type.', - }, - valueCoding: { - type: require('./coding.schema'), - description: 'If the parameter is a data type.', - }, - valueQuantity: { - type: require('./quantity.schema'), - description: 'If the parameter is a data type.', - }, - valueRange: { - type: require('./range.schema'), - description: 'If the parameter is a data type.', - }, - valuePeriod: { - type: require('./period.schema'), - description: 'If the parameter is a data type.', - }, - valueRatio: { - type: require('./ratio.schema'), - description: 'If the parameter is a data type.', - }, - valueSampledData: { - type: require('./sampleddata.schema'), - description: 'If the parameter is a data type.', - }, - valueSignature: { - type: require('./signature.schema'), - description: 'If the parameter is a data type.', - }, - valueHumanName: { - type: require('./humanname.schema'), - description: 'If the parameter is a data type.', - }, - valueAddress: { - type: require('./address.schema'), - description: 'If the parameter is a data type.', - }, - valueContactPoint: { - type: require('./contactpoint.schema'), - description: 'If the parameter is a data type.', - }, - valueTiming: { - type: require('./timing.schema'), - description: 'If the parameter is a data type.', - }, - valueReference: { - type: require('./reference.schema'), - description: 'If the parameter is a data type.', - }, - valueMeta: { - type: require('./meta.schema'), - description: 'If the parameter is a data type.', - }, - resource: { - type: require('./resourcelist.schema'), - description: 'If the parameter is a whole resource.', - }, - }), + name: 'Parametersparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the parameter (reference to the operation definition).', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the parameter (reference to the operation definition).', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'If the parameter is a data type.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueInteger: { + type: GraphQLInt, + description: 'If the parameter is a data type.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'If the parameter is a data type.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: 'If the parameter is a data type.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueInstant: { + type: InstantScalar, + description: 'If the parameter is a data type.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueString: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUri: { + type: UriScalar, + description: 'If the parameter is a data type.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDate: { + type: DateScalar, + description: 'If the parameter is a data type.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDateTime: { + type: DateTimeScalar, + description: 'If the parameter is a data type.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueTime: { + type: TimeScalar, + description: 'If the parameter is a data type.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCode: { + type: CodeScalar, + description: 'If the parameter is a data type.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueOid: { + type: OidScalar, + description: 'If the parameter is a data type.', + }, + _valueId: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueId: { + type: IdScalar, + description: 'If the parameter is a data type.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: 'If the parameter is a data type.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: 'If the parameter is a data type.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueMarkdown: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + valueAnnotation: { + type: require('./annotation.schema.js'), + description: 'If the parameter is a data type.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: 'If the parameter is a data type.', + }, + valueIdentifier: { + type: require('./identifier.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCoding: { + type: require('./coding.schema.js'), + description: 'If the parameter is a data type.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: 'If the parameter is a data type.', + }, + valueRange: { + type: require('./range.schema.js'), + description: 'If the parameter is a data type.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: 'If the parameter is a data type.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: 'If the parameter is a data type.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: 'If the parameter is a data type.', + }, + valueSignature: { + type: require('./signature.schema.js'), + description: 'If the parameter is a data type.', + }, + valueHumanName: { + type: require('./humanname.schema.js'), + description: 'If the parameter is a data type.', + }, + valueAddress: { + type: require('./address.schema.js'), + description: 'If the parameter is a data type.', + }, + valueContactPoint: { + type: require('./contactpoint.schema.js'), + description: 'If the parameter is a data type.', + }, + valueTiming: { + type: require('./timing.schema.js'), + description: 'If the parameter is a data type.', + }, + valueReference: { + type: require('./resourcelist.schema'), + description: 'If the parameter is a data type.', + }, + valueMeta: { + type: require('./meta.schema.js'), + description: 'If the parameter is a data type.', + }, + resource: { + type: require('./resourcelist.schema'), + description: 'If the parameter is a whole resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/patient.schema.js b/src/resources/1_0_2/schemas/patient.schema.js index 02d283d3..d2625693 100644 --- a/src/resources/1_0_2/schemas/patient.schema.js +++ b/src/resources/1_0_2/schemas/patient.schema.js @@ -1,24 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, GraphQLInt, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PatientResourceType = new GraphQLEnumType({ - name: 'PatientResourceType', - values: { - Patient: { value: 'Patient' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,130 +19,213 @@ let PatientResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Patient', - description: 'Base StructureDefinition for Patient Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PatientResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'An identifier for this patient.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this patient record is in active use.', - }, - _active: { - type: require('./element.schema'), - description: 'Whether this patient record is in active use.', - }, - name: { - type: new GraphQLList(require('./humanname.schema')), - description: 'A name associated with the individual.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date of birth for the individual.', - }, - _birthDate: { - type: require('./element.schema'), - description: 'The date of birth for the individual.', - }, - deceasedBoolean: { - type: GraphQLBoolean, - description: 'Indicates if the individual is deceased or not.', - }, - _deceasedBoolean: { - type: require('./element.schema'), - description: 'Indicates if the individual is deceased or not.', - }, - deceasedDateTime: { - type: DateTimeScalar, - description: 'Indicates if the individual is deceased or not.', - }, - _deceasedDateTime: { - type: require('./element.schema'), - description: 'Indicates if the individual is deceased or not.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: 'Addresses for the individual.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/marital-status - maritalStatus: { - type: require('./codeableconcept.schema'), - description: - "This field contains a patient's most recent marital (civil) status.", - }, - multipleBirthBoolean: { - type: GraphQLBoolean, - description: - 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', - }, - _multipleBirthBoolean: { - type: require('./element.schema'), - description: - 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', - }, - multipleBirthInteger: { - type: GraphQLInt, - description: - 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', - }, - _multipleBirthInteger: { - type: require('./element.schema'), - description: - 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', - }, - photo: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Image of the patient.', - }, - contact: { - type: new GraphQLList(require('./patientcontact.schema')), - description: - 'A contact party (e.g. guardian, partner, friend) for the patient.', - }, - animal: { - type: require('./patientanimal.schema'), - description: 'This patient is known to be an animal.', - }, - communication: { - type: new GraphQLList(require('./patientcommunication.schema')), - description: - 'Languages which may be used to communicate with the patient about his or her health.', - }, - careProvider: { - type: new GraphQLList(require('./reference.schema')), - description: "Patient's nominated care provider.", - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Patient Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Patient_Enum_schema', + values: { Patient: { value: 'Patient' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'An identifier for this patient.', + }, + _active: { + type: require('./element.schema.js'), + description: 'Whether this patient record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this patient record is in active use.', + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'A name associated with the individual.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date of birth for the individual.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the individual.', + }, + _deceasedBoolean: { + type: require('./element.schema.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: 'Indicates if the individual is deceased or not.', + }, + _deceasedDateTime: { + type: require('./element.schema.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedDateTime: { + type: DateTimeScalar, + description: 'Indicates if the individual is deceased or not.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'Addresses for the individual.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/marital-status + maritalStatus: { + type: require('./codeableconcept.schema.js'), + description: + "This field contains a patient's most recent marital (civil) status.", + }, + _multipleBirthBoolean: { + type: require('./element.schema.js'), + description: + 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', + }, + multipleBirthBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', + }, + _multipleBirthInteger: { + type: require('./element.schema.js'), + description: + 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', + }, + multipleBirthInteger: { + type: GraphQLInt, + description: + 'Indicates whether the patient is part of a multiple or indicates the actual birth order.', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the patient.', + }, + contact: { + type: new GraphQLList(require('./patientcontact.schema.js')), + description: + 'A contact party (e.g. guardian, partner, friend) for the patient.', + }, + animal: { + type: require('./patientanimal.schema.js'), + description: 'This patient is known to be an animal.', + }, + communication: { + type: new GraphQLList(require('./patientcommunication.schema.js')), + description: + 'Languages which may be used to communicate with the patient about his or her health.', + }, + careProvider: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PatientcareProvider_careProvider_Union', + description: "Patient's nominated care provider.", + types: () => [ + require('./organization.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: "Patient's nominated care provider.", + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'PatientmanagingOrganization_managingOrganization_Union', description: 'Organization that is the custodian of the patient record.', - }, - link: { - type: new GraphQLList(require('./patientlink.schema')), - description: - 'Link to another patient resource that concerns the same actual patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that is the custodian of the patient record.', + }, + link: { + type: new GraphQLList(require('./patientlink.schema.js')), + description: + 'Link to another patient resource that concerns the same actual patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/patientanimal.schema.js b/src/resources/1_0_2/schemas/patientanimal.schema.js index 337af955..369cc8dd 100644 --- a/src/resources/1_0_2/schemas/patientanimal.schema.js +++ b/src/resources/1_0_2/schemas/patientanimal.schema.js @@ -1,33 +1,51 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Patient.animal Schema + * @summary Patientanimal Schema */ module.exports = new GraphQLObjectType({ - name: 'PatientAnimal', - description: 'This patient is known to be an animal.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-species - species: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the high level taxonomic categorization of the kind of animal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-breeds - breed: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the detailed categorization of the kind of animal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-genderstatus - genderStatus: { - type: require('./codeableconcept.schema'), - description: - "Indicates the current state of the animal's reproductive organs.", - }, - }), + name: 'Patientanimal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-species + species: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the high level taxonomic categorization of the kind of animal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-breeds + breed: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the detailed categorization of the kind of animal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-genderstatus + genderStatus: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the current state of the animal's reproductive organs.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/patientcommunication.schema.js b/src/resources/1_0_2/schemas/patientcommunication.schema.js index d4dcfe10..ae6e330f 100644 --- a/src/resources/1_0_2/schemas/patientcommunication.schema.js +++ b/src/resources/1_0_2/schemas/patientcommunication.schema.js @@ -1,35 +1,53 @@ const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Patient.communication Schema + * @summary Patientcommunication Schema */ module.exports = new GraphQLObjectType({ - name: 'PatientCommunication', - description: - 'Languages which may be used to communicate with the patient about his or her health.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - language: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", - }, - preferred: { - type: GraphQLBoolean, - description: - 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', - }, - _preferred: { - type: require('./element.schema'), - description: - 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', - }, - }), + name: 'Patientcommunication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + language: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + _preferred: { + type: require('./element.schema.js'), + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + preferred: { + type: GraphQLBoolean, + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/patientcontact.schema.js b/src/resources/1_0_2/schemas/patientcontact.schema.js index 000e36c4..a5c9a349 100644 --- a/src/resources/1_0_2/schemas/patientcontact.schema.js +++ b/src/resources/1_0_2/schemas/patientcontact.schema.js @@ -1,57 +1,84 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Patient.contact Schema + * @summary Patientcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'PatientContact', - description: - 'A contact party (e.g. guardian, partner, friend) for the patient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/patient-contact-relationship - relationship: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The nature of the relationship between the patient and the contact person.', - }, - name: { - type: require('./humanname.schema'), - description: 'A name associated with the contact person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - address: { - type: require('./address.schema'), - description: 'Address for the contact person.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', - }, - organization: { - type: require('./reference.schema'), + name: 'Patientcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/patient-contact-relationship + relationship: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The nature of the relationship between the patient and the contact person.', + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the contact person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + address: { + type: require('./address.schema.js'), + description: 'Address for the contact person.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'Patientcontactorganization_organization_Union', description: 'Organization on behalf of which the contact is acting or for which the contact is working.', - }, - period: { - type: require('./period.schema'), - description: - 'The period during which this contact person or organization is valid to be contacted relating to this patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Organization on behalf of which the contact is acting or for which the contact is working.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period during which this contact person or organization is valid to be contacted relating to this patient.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/patientlink.schema.js b/src/resources/1_0_2/schemas/patientlink.schema.js index 757e6b78..d45bf564 100644 --- a/src/resources/1_0_2/schemas/patientlink.schema.js +++ b/src/resources/1_0_2/schemas/patientlink.schema.js @@ -1,32 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Patient.link Schema + * @summary Patientlink Schema */ module.exports = new GraphQLObjectType({ - name: 'PatientLink', - description: - 'Link to another patient resource that concerns the same actual patient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - other: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The other patient resource that the link refers to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/link-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of link between this patient resource and another patient resource.', - }, - _type: { - type: require('./element.schema'), - description: - 'The type of link between this patient resource and another patient resource.', - }, - }), + name: 'Patientlink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + other: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Patientlinkother_other_Union', + description: 'The other patient resource that the link refers to.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The other patient resource that the link refers to.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of link between this patient resource and another patient resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/link-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of link between this patient resource and another patient resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/paymentnotice.schema.js b/src/resources/1_0_2/schemas/paymentnotice.schema.js index 8c604b59..5809f28e 100644 --- a/src/resources/1_0_2/schemas/paymentnotice.schema.js +++ b/src/resources/1_0_2/schemas/paymentnotice.schema.js @@ -1,20 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PaymentNoticeResourceType = new GraphQLEnumType({ - name: 'PaymentNoticeResourceType', - values: { - PaymentNotice: { value: 'PaymentNotice' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,64 +16,168 @@ let PaymentNoticeResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'PaymentNotice', - description: 'Base StructureDefinition for PaymentNotice Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PaymentNoticeResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for PaymentNotice Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentNotice_Enum_schema', + values: { PaymentNotice: { value: 'PaymentNotice' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: new GraphQLUnionType({ + name: 'PaymentNoticetarget_target_Union', description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'PaymentNoticeprovider_provider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'PaymentNoticeorganization_organization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - request: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentNoticerequest_request_Union', description: 'Reference of resource to reverse.', - }, - response: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Reference of resource to reverse.', + }, + response: { + type: new GraphQLUnionType({ + name: 'PaymentNoticeresponse_response_Union', description: 'Reference of response to resource to reverse.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-status - paymentStatus: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'The payment status, typically paid: payment sent, cleared: payment received.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Reference of response to resource to reverse.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-status + paymentStatus: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'The payment status, typically paid: payment sent, cleared: payment received.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/paymentreconciliation.schema.js b/src/resources/1_0_2/schemas/paymentreconciliation.schema.js index 7cc75ff9..03d550a3 100644 --- a/src/resources/1_0_2/schemas/paymentreconciliation.schema.js +++ b/src/resources/1_0_2/schemas/paymentreconciliation.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PaymentReconciliationResourceType = new GraphQLEnumType({ - name: 'PaymentReconciliationResourceType', - values: { - PaymentReconciliation: { value: 'PaymentReconciliation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,96 +17,192 @@ let PaymentReconciliationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'PaymentReconciliation', - description: 'Base StructureDefinition for PaymentReconciliation Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PaymentReconciliationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for PaymentReconciliation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentReconciliation_Enum_schema', + values: { PaymentReconciliation: { value: 'PaymentReconciliation' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationrequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: CodeScalar, - description: 'Transaction status: error, complete.', - }, - _outcome: { - type: require('./element.schema'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - period: { - type: require('./period.schema'), - description: - 'The period of time for which payments have been gathered into this bulk payment for settlement.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./processrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ProcessRequest') { + return require('./processrequest.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Transaction status: error, complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: CodeScalar, + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time for which payments have been gathered into this bulk payment for settlement.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationorganization_organization_Union', description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationrequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: + 'PaymentReconciliationrequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - detail: { - type: new GraphQLList(require('./paymentreconciliationdetail.schema')), - description: - 'List of individual settlement amounts and the corresponding transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./coding.schema'), - description: 'The form to be used for printing the content.', - }, - total: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: 'Total payment amount.', - }, - note: { - type: new GraphQLList(require('./paymentreconciliationnote.schema')), - description: 'Suite of notes.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + detail: { + type: new GraphQLList(require('./paymentreconciliationdetail.schema.js')), + description: + 'List of individual settlement amounts and the corresponding transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./coding.schema.js'), + description: 'The form to be used for printing the content.', + }, + total: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'Total payment amount.', + }, + note: { + type: new GraphQLList(require('./paymentreconciliationnote.schema.js')), + description: 'Suite of notes.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/paymentreconciliationdetail.schema.js b/src/resources/1_0_2/schemas/paymentreconciliationdetail.schema.js index c60627d9..e8ba7e71 100644 --- a/src/resources/1_0_2/schemas/paymentreconciliationdetail.schema.js +++ b/src/resources/1_0_2/schemas/paymentreconciliationdetail.schema.js @@ -1,52 +1,111 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary PaymentReconciliation.detail Schema + * @summary PaymentReconciliationdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'PaymentReconciliationDetail', - description: - 'List of individual settlement amounts and the corresponding transaction.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-type - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Code to indicate the nature of the payment, adjustment, funds advance, etc.', - }, - request: { - type: require('./reference.schema'), + name: 'PaymentReconciliationdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-type + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Code to indicate the nature of the payment, adjustment, funds advance, etc.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailrequest_request_Union', description: 'The claim or financial resource.', - }, - responce: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'The claim or financial resource.', + }, + responce: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailresponce_responce_Union', description: 'The claim response resource.', - }, - submitter: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'The claim response resource.', + }, + submitter: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailsubmitter_submitter_Union', description: 'The Organization which submitted the invoice or financial transaction.', - }, - payee: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The Organization which submitted the invoice or financial transaction.', + }, + payee: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailpayee_payee_Union', description: 'The organization which is receiving the payment.', - }, - date: { - type: DateScalar, - description: 'The date of the invoice or financial resource.', - }, - _date: { - type: require('./element.schema'), - description: 'The date of the invoice or financial resource.', - }, - amount: { - type: require('./quantity.schema'), - description: 'Amount paid for this detail.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization which is receiving the payment.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date of the invoice or financial resource.', + }, + date: { + type: DateScalar, + description: 'The date of the invoice or financial resource.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'Amount paid for this detail.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/paymentreconciliationnote.schema.js b/src/resources/1_0_2/schemas/paymentreconciliationnote.schema.js index 1ab4db66..0f75ebe9 100644 --- a/src/resources/1_0_2/schemas/paymentreconciliationnote.schema.js +++ b/src/resources/1_0_2/schemas/paymentreconciliationnote.schema.js @@ -1,28 +1,46 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary PaymentReconciliation.note Schema + * @summary PaymentReconciliationnote Schema */ module.exports = new GraphQLObjectType({ - name: 'PaymentReconciliationNote', - description: 'Suite of notes.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./coding.schema'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.schema'), - description: 'The note text.', - }, - }), + name: 'PaymentReconciliationnote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./coding.schema.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/period.schema.js b/src/resources/1_0_2/schemas/period.schema.js index 69a49542..1b108f22 100644 --- a/src/resources/1_0_2/schemas/period.schema.js +++ b/src/resources/1_0_2/schemas/period.schema.js @@ -1,7 +1,6 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -9,26 +8,40 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Period', - description: 'Base StructureDefinition for Period Type.', - fields: () => - extendSchema(require('./element.schema'), { - start: { - type: DateTimeScalar, - description: 'The start of the period. The boundary is inclusive.', - }, - _start: { - type: require('./element.schema'), - description: 'The start of the period. The boundary is inclusive.', - }, - end: { - type: DateTimeScalar, - description: - 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', - }, - _end: { - type: require('./element.schema'), - description: - 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', - }, - }), + description: 'Base StructureDefinition for Period Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _start: { + type: require('./element.schema.js'), + description: 'The start of the period. The boundary is inclusive.', + }, + start: { + type: DateTimeScalar, + description: 'The start of the period. The boundary is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + end: { + type: DateTimeScalar, + description: + 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/person.schema.js b/src/resources/1_0_2/schemas/person.schema.js index b770ded7..f3d9bffa 100644 --- a/src/resources/1_0_2/schemas/person.schema.js +++ b/src/resources/1_0_2/schemas/person.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PersonResourceType = new GraphQLEnumType({ - name: 'PersonResourceType', - values: { - Person: { value: 'Person' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,68 +17,135 @@ let PersonResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Person', - description: 'Base StructureDefinition for Person Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PersonResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier for a person within a particular scope.', - }, - name: { - type: new GraphQLList(require('./humanname.schema')), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: 'Administrative Gender.', - }, - _gender: { - type: require('./element.schema'), - description: 'Administrative Gender.', - }, - birthDate: { - type: DateScalar, - description: 'The birth date for the person.', - }, - _birthDate: { - type: require('./element.schema'), - description: 'The birth date for the person.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: 'One or more addresses for the person.', - }, - photo: { - type: require('./attachment.schema'), - description: - 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Person Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Person_Enum_schema', + values: { Person: { value: 'Person' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Identifier for a person within a particular scope.', + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.schema.js'), + description: 'Administrative Gender.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: 'Administrative Gender.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The birth date for the person.', + }, + birthDate: { + type: DateScalar, + description: 'The birth date for the person.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'One or more addresses for the person.', + }, + photo: { + type: require('./attachment.schema.js'), + description: + 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'PersonmanagingOrganization_managingOrganization_Union', description: 'The organization that is the custodian of the person record.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this person's record is in active use.", - }, - _active: { - type: require('./element.schema'), - description: "Whether this person's record is in active use.", - }, - link: { - type: new GraphQLList(require('./personlink.schema')), - description: 'Link to a resource that concerns the same actual person.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization that is the custodian of the person record.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether this person's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this person's record is in active use.", + }, + link: { + type: new GraphQLList(require('./personlink.schema.js')), + description: 'Link to a resource that concerns the same actual person.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/personlink.schema.js b/src/resources/1_0_2/schemas/personlink.schema.js index 1d8a4ff6..9f0291b1 100644 --- a/src/resources/1_0_2/schemas/personlink.schema.js +++ b/src/resources/1_0_2/schemas/personlink.schema.js @@ -1,31 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Person.link Schema + * @summary Personlink Schema */ module.exports = new GraphQLObjectType({ - name: 'PersonLink', - description: 'Link to a resource that concerns the same actual person.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - target: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The resource to which this actual person is associated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identity-assuranceLevel - assurance: { - type: CodeScalar, - description: - 'Level of assurance that this link is actually associated with the target resource.', - }, - _assurance: { - type: require('./element.schema'), - description: - 'Level of assurance that this link is actually associated with the target resource.', - }, - }), + name: 'Personlink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + target: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Personlinktarget_target_Union', + description: + 'The resource to which this actual person is associated.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./person.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Person') { + return require('./person.schema.js'); + } + }, + }), + ), + description: 'The resource to which this actual person is associated.', + }, + _assurance: { + type: require('./element.schema.js'), + description: + 'Level of assurance that this link is actually associated with the target resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identity-assuranceLevel + assurance: { + type: CodeScalar, + description: + 'Level of assurance that this link is actually associated with the target resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/practitioner.schema.js b/src/resources/1_0_2/schemas/practitioner.schema.js index d2e517c7..7d218695 100644 --- a/src/resources/1_0_2/schemas/practitioner.schema.js +++ b/src/resources/1_0_2/schemas/practitioner.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PractitionerResourceType = new GraphQLEnumType({ - name: 'PractitionerResourceType', - values: { - Practitioner: { value: 'Practitioner' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,75 +17,134 @@ let PractitionerResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Practitioner', - description: 'Base StructureDefinition for Practitioner Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PractitionerResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'An identifier that applies to this person in this role.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this practitioner's record is in active use.", - }, - _active: { - type: require('./element.schema'), - description: "Whether this practitioner's record is in active use.", - }, - name: { - type: require('./humanname.schema'), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail for the practitioner, e.g. a telephone number or an email address.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: - 'The postal address where the practitioner can be found or visited or to which mail can be delivered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date of birth for the practitioner.', - }, - _birthDate: { - type: require('./element.schema'), - description: 'The date of birth for the practitioner.', - }, - photo: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Image of the person.', - }, - practitionerRole: { - type: new GraphQLList(require('./practitionerpractitionerrole.schema')), - description: - 'The list of roles/organizations that the practitioner is associated with.', - }, - qualification: { - type: new GraphQLList(require('./practitionerqualification.schema')), - description: 'Qualifications obtained by training and certification.', - }, - communication: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A language the practitioner is able to use in patient communication.', - }, - }), + description: 'Base StructureDefinition for Practitioner Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Practitioner_Enum_schema', + values: { Practitioner: { value: 'Practitioner' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'An identifier that applies to this person in this role.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether this practitioner's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this practitioner's record is in active use.", + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the practitioner, e.g. a telephone number or an email address.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: + 'The postal address where the practitioner can be found or visited or to which mail can be delivered.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date of birth for the practitioner.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the practitioner.', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the person.', + }, + practitionerRole: { + type: new GraphQLList( + require('./practitionerpractitionerrole.schema.js'), + ), + description: + 'The list of roles/organizations that the practitioner is associated with.', + }, + qualification: { + type: new GraphQLList(require('./practitionerqualification.schema.js')), + description: 'Qualifications obtained by training and certification.', + }, + communication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A language the practitioner is able to use in patient communication.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/practitionerpractitionerrole.schema.js b/src/resources/1_0_2/schemas/practitionerpractitionerrole.schema.js index 4db0c9ad..a357f9f5 100644 --- a/src/resources/1_0_2/schemas/practitionerpractitionerrole.schema.js +++ b/src/resources/1_0_2/schemas/practitionerpractitionerrole.schema.js @@ -1,47 +1,99 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Practitioner.practitionerRole Schema + * @summary PractitionerpractitionerRole Schema */ module.exports = new GraphQLObjectType({ - name: 'PractitionerPractitionerRole', - description: - 'The list of roles/organizations that the practitioner is associated with.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - managingOrganization: { - type: require('./reference.schema'), + name: 'PractitionerpractitionerRole', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: + 'PractitionerpractitionerRolemanagingOrganization_managingOrganization_Union', description: 'The organization where the Practitioner performs the roles associated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-role - role: { - type: require('./codeableconcept.schema'), - description: - 'Roles which this practitioner is authorized to perform for the organization.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty - specialty: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Specific specialty of the practitioner.', - }, - period: { - type: require('./period.schema'), - description: - 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', - }, - location: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The location(s) at which this practitioner provides care.', - }, - healthcareService: { - type: new GraphQLList(require('./reference.schema')), - description: - "The list of healthcare services that this worker provides for this role's Organization/Location(s).", - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization where the Practitioner performs the roles associated.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-role + role: { + type: require('./codeableconcept.schema.js'), + description: + 'Roles which this practitioner is authorized to perform for the organization.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Specific specialty of the practitioner.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', + }, + location: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PractitionerpractitionerRolelocation_location_Union', + description: + 'The location(s) at which this practitioner provides care.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: 'The location(s) at which this practitioner provides care.', + }, + healthcareService: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'PractitionerpractitionerRolehealthcareService_healthcareService_Union', + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + types: () => [require('./healthcareservice.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/practitionerqualification.schema.js b/src/resources/1_0_2/schemas/practitionerqualification.schema.js index 6a5027c9..7b028e19 100644 --- a/src/resources/1_0_2/schemas/practitionerqualification.schema.js +++ b/src/resources/1_0_2/schemas/practitionerqualification.schema.js @@ -1,34 +1,66 @@ -const { GraphQLObjectType, GraphQLList, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Practitioner.qualification Schema + * @summary Practitionerqualification Schema */ module.exports = new GraphQLObjectType({ - name: 'PractitionerQualification', - description: 'Qualifications obtained by training and certification.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - "An identifier that applies to this person's qualification in this role.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/anzsco-occupations - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Coded representation of the qualification.', - }, - period: { - type: require('./period.schema'), - description: 'Period during which the qualification is valid.', - }, - issuer: { - type: require('./reference.schema'), + name: 'Practitionerqualification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.schema.js')), + description: + "An identifier that applies to this person's qualification in this role.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/anzsco-occupations + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Coded representation of the qualification.', + }, + period: { + type: require('./period.schema.js'), + description: 'Period during which the qualification is valid.', + }, + issuer: { + type: new GraphQLUnionType({ + name: 'Practitionerqualificationissuer_issuer_Union', description: 'Organization that regulates and issues the qualification.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that regulates and issues the qualification.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/procedure.schema.js b/src/resources/1_0_2/schemas/procedure.schema.js index 1ef4b74a..56540553 100644 --- a/src/resources/1_0_2/schemas/procedure.schema.js +++ b/src/resources/1_0_2/schemas/procedure.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcedureResourceType = new GraphQLEnumType({ - name: 'ProcedureResourceType', - values: { - Procedure: { value: 'Procedure' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,149 +17,311 @@ let ProcedureResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Procedure', - description: 'Base StructureDefinition for Procedure Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProcedureResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The person, animal or group on which the procedure was performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', - }, - _status: { - type: require('./element.schema'), - description: - 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-category - category: { - type: require('./codeableconcept.schema'), - description: - "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", - }, - notPerformed: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the procedure was NOT performed.', - }, - _notPerformed: { - type: require('./element.schema'), - description: - 'Set this to true if the record is saying that the procedure was NOT performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-not-performed-reason - reasonNotPerformed: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'A code indicating why the procedure was not performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonReference: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Procedure Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Procedure_Enum_schema', + values: { Procedure: { value: 'Procedure' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Proceduresubject_subject_Union', + description: + 'The person, animal or group on which the procedure was performed.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The person, animal or group on which the procedure was performed.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-category + category: { + type: require('./codeableconcept.schema.js'), + description: + "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", + }, + _notPerformed: { + type: require('./element.schema.js'), + description: + 'Set this to true if the record is saying that the procedure was NOT performed.', + }, + notPerformed: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the procedure was NOT performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-not-performed-reason + reasonNotPerformed: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A code indicating why the procedure was not performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonReference: { + type: new GraphQLUnionType({ + name: 'ProcedurereasonReference_reasonReference_Union', description: 'The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.', - }, - performer: { - type: new GraphQLList(require('./procedureperformer.schema')), - description: "Limited to 'real' people rather than equipment.", - }, - performedDateTime: { - type: DateTimeScalar, - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - _performedDateTime: { - type: require('./element.schema'), - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - performedPeriod: { - type: require('./period.schema'), - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.', + }, + performer: { + type: new GraphQLList(require('./procedureperformer.schema.js')), + description: "Limited to 'real' people rather than equipment.", + }, + _performedDateTime: { + type: require('./element.schema.js'), + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedDateTime: { + type: DateTimeScalar, + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedPeriod: { + type: require('./period.schema.js'), + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Procedureencounter_encounter_Union', description: 'The encounter during which the procedure was performed.', - }, - location: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'The encounter during which the procedure was performed.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Procedurelocation_location_Union', description: 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: - 'The outcome of the procedure - did it resolve reasons for the procedure being performed?.', - }, - report: { - type: new GraphQLList(require('./reference.schema')), - description: - 'This could be a histology result, pathology report, surgical report, etc..', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - complication: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-followup - followUp: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.', - }, - request: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: + 'The outcome of the procedure - did it resolve reasons for the procedure being performed?', + }, + report: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Procedurereport_report_Union', + description: + 'This could be a histology result, pathology report, surgical report, etc..', + types: () => [require('./diagnosticreport.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + }, + }), + ), + description: + 'This could be a histology result, pathology report, surgical report, etc..', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + complication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-followup + followUp: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.', + }, + request: { + type: new GraphQLUnionType({ + name: 'Procedurerequest_request_Union', description: 'A reference to a resource that contains details of the request for this procedure.', - }, - notes: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Any other notes about the procedure. E.g. the operative notes.', - }, - focalDevice: { - type: new GraphQLList(require('./procedurefocaldevice.schema')), - description: - 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', - }, - used: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies medications, devices and any other substance used as part of the procedure.', - }, - }), + types: () => [ + require('./careplan.schema.js'), + require('./diagnosticorder.schema.js'), + require('./procedurerequest.schema.js'), + require('./referralrequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'DiagnosticOrder') { + return require('./diagnosticorder.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + description: + 'A reference to a resource that contains details of the request for this procedure.', + }, + notes: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Any other notes about the procedure. E.g. the operative notes.', + }, + focalDevice: { + type: new GraphQLList(require('./procedurefocaldevice.schema.js')), + description: + 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', + }, + used: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Procedureused_used_Union', + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + types: () => [ + require('./device.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/procedurefocaldevice.schema.js b/src/resources/1_0_2/schemas/procedurefocaldevice.schema.js index e9b0cc7e..09a21e54 100644 --- a/src/resources/1_0_2/schemas/procedurefocaldevice.schema.js +++ b/src/resources/1_0_2/schemas/procedurefocaldevice.schema.js @@ -1,27 +1,61 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Procedure.focalDevice Schema + * @summary ProcedurefocalDevice Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcedureFocalDevice', - description: - 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-action - action: { - type: require('./codeableconcept.schema'), - description: - 'The kind of change that happened to the device during the procedure.', - }, - manipulated: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device that was manipulated (changed) during the procedure.', - }, - }), + name: 'ProcedurefocalDevice', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-action + action: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of change that happened to the device during the procedure.', + }, + manipulated: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ProcedurefocalDevicemanipulated_manipulated_Union', + description: + 'The device that was manipulated (changed) during the procedure.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The device that was manipulated (changed) during the procedure.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/procedureperformer.schema.js b/src/resources/1_0_2/schemas/procedureperformer.schema.js index 34af31bd..8bf98d64 100644 --- a/src/resources/1_0_2/schemas/procedureperformer.schema.js +++ b/src/resources/1_0_2/schemas/procedureperformer.schema.js @@ -1,24 +1,65 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLUnionType, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Procedure.performer Schema + * @summary Procedureperformer Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcedurePerformer', - description: "Limited to 'real' people rather than equipment.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - actor: { - type: require('./reference.schema'), + name: 'Procedureperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'Procedureperformeractor_actor_Union', description: 'The practitioner who was involved in the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/performer-role - role: { - type: require('./codeableconcept.schema'), - description: 'For example: surgeon, anaethetist, endoscopist.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The practitioner who was involved in the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/performer-role + role: { + type: require('./codeableconcept.schema.js'), + description: 'For example: surgeon, anaethetist, endoscopist.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/procedurerequest.schema.js b/src/resources/1_0_2/schemas/procedurerequest.schema.js index 6a73fe1e..14ac0411 100644 --- a/src/resources/1_0_2/schemas/procedurerequest.schema.js +++ b/src/resources/1_0_2/schemas/procedurerequest.schema.js @@ -1,22 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcedureRequestResourceType = new GraphQLEnumType({ - name: 'ProcedureRequestResourceType', - values: { - ProcedureRequest: { value: 'ProcedureRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,126 +17,268 @@ let ProcedureRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ProcedureRequest', - description: 'Base StructureDefinition for ProcedureRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProcedureRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order by the order or by the receiver.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The person, animal or group that should receive the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), + description: 'Base StructureDefinition for ProcedureRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcedureRequest_Enum_schema', + values: { ProcedureRequest: { value: 'ProcedureRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers assigned to this order by the order or by the receiver.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ProcedureRequestsubject_subject_Union', + description: + 'The person, animal or group that should receive the procedure.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The person, animal or group that should receive the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The specific procedure that is ordered. Use text if the exact nature of the procedure cannot be coded.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonReference: { + type: new GraphQLUnionType({ + name: 'ProcedureRequestreasonReference_reasonReference_Union', description: 'The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonReference: { - type: require('./reference.schema'), - description: - 'The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.', - }, - scheduledDateTime: { - type: DateTimeScalar, - description: - "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - _scheduledDateTime: { - type: require('./element.schema'), - description: - "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - scheduledPeriod: { - type: require('./period.schema'), - description: - "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - scheduledTiming: { - type: require('./timing.schema'), - description: - "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'The reason why the procedure is being proposed or ordered. This procedure request may be motivated by a Condition for instance.', + }, + _scheduledDateTime: { + type: require('./element.schema.js'), + description: + "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + scheduledDateTime: { + type: DateTimeScalar, + description: + "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + scheduledPeriod: { + type: require('./period.schema.js'), + description: + "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + scheduledTiming: { + type: require('./timing.schema.js'), + description: + "The timing schedule for the proposed or ordered procedure. The Schedule data type allows many different expressions. E.g. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + encounter: { + type: new GraphQLUnionType({ + name: 'ProcedureRequestencounter_encounter_Union', description: 'The encounter within which the procedure proposal or request was created.', - }, - performer: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The encounter within which the procedure proposal or request was created.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'ProcedureRequestperformer_performer_Union', description: 'For example, the surgeon, anaethetist, endoscopist, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-request-status - status: { - type: CodeScalar, - description: 'The status of the order.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the order.', - }, - notes: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Any other notes associated with this proposal or order - e.g. provider instructions.', - }, - asNeededBoolean: { - type: GraphQLBoolean, - description: - 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', - }, - _asNeededBoolean: { - type: require('./element.schema'), - description: - 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', - }, - asNeededCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', - }, - orderedOn: { - type: DateTimeScalar, - description: 'The time when the request was made.', - }, - _orderedOn: { - type: require('./element.schema'), - description: 'The time when the request was made.', - }, - orderer: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'For example, the surgeon, anaethetist, endoscopist, etc.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-request-status + status: { + type: CodeScalar, + description: 'The status of the order.', + }, + notes: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Any other notes associated with this proposal or order - e.g. provider instructions.', + }, + _asNeededBoolean: { + type: require('./element.schema.js'), + description: + 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'If a CodeableConcept is present, it indicates the pre-condition for performing the procedure.', + }, + _orderedOn: { + type: require('./element.schema.js'), + description: 'The time when the request was made.', + }, + orderedOn: { + type: DateTimeScalar, + description: 'The time when the request was made.', + }, + orderer: { + type: new GraphQLUnionType({ + name: 'ProcedureRequestorderer_orderer_Union', description: 'The healthcare professional responsible for proposing or ordering the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-request-priority - priority: { - type: CodeScalar, - description: 'The clinical priority associated with this order.', - }, - _priority: { - type: require('./element.schema'), - description: 'The clinical priority associated with this order.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The healthcare professional responsible for proposing or ordering the procedure.', + }, + _priority: { + type: require('./element.schema.js'), + description: 'The clinical priority associated with this order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-request-priority + priority: { + type: CodeScalar, + description: 'The clinical priority associated with this order.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/processrequest.schema.js b/src/resources/1_0_2/schemas/processrequest.schema.js index 63d3372d..1ac46be1 100644 --- a/src/resources/1_0_2/schemas/processrequest.schema.js +++ b/src/resources/1_0_2/schemas/processrequest.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcessRequestResourceType = new GraphQLEnumType({ - name: 'ProcessRequestResourceType', - values: { - ProcessRequest: { value: 'ProcessRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,113 +18,219 @@ let ProcessRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ProcessRequest', - description: 'Base StructureDefinition for ProcessRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProcessRequestResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/actionlist - action: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', - }, - _action: { - type: require('./element.schema'), - description: - 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The ProcessRequest business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ProcessRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcessRequest_Enum_schema', + values: { ProcessRequest: { value: 'ProcessRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _action: { + type: require('./element.schema.js'), + description: + 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/actionlist + action: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'The ProcessRequest business identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: new GraphQLUnionType({ + name: 'ProcessRequesttarget_target_Union', description: 'The organization which is the target of the request.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization which is the target of the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'ProcessRequestprovider_provider_Union', description: 'The practitioner who is responsible for the action specified in thise request.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the action specified in thise request.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'ProcessRequestorganization_organization_Union', description: 'The organization which is responsible for the action speccified in thise request.', - }, - request: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the action speccified in thise request.', + }, + request: { + type: new GraphQLUnionType({ + name: 'ProcessRequestrequest_request_Union', description: 'Reference of resource which is the target or subject of this action.', - }, - response: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference of resource which is the target or subject of this action.', + }, + response: { + type: new GraphQLUnionType({ + name: 'ProcessRequestresponse_response_Union', description: 'Reference of a prior response to resource which is the target or subject of this action.', - }, - nullify: { - type: GraphQLBoolean, - description: 'If true remove all history excluding audit.', - }, - _nullify: { - type: require('./element.schema'), - description: 'If true remove all history excluding audit.', - }, - reference: { - type: GraphQLString, - description: 'A reference to supply which authenticates the process.', - }, - _reference: { - type: require('./element.schema'), - description: 'A reference to supply which authenticates the process.', - }, - item: { - type: new GraphQLList(require('./processrequestitem.schema')), - description: - 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', - }, - include: { - type: new GraphQLList(GraphQLString), - description: 'Names of resource types to include.', - }, - _include: { - type: require('./element.schema'), - description: 'Names of resource types to include.', - }, - exclude: { - type: new GraphQLList(GraphQLString), - description: 'Names of resource types to exclude.', - }, - _exclude: { - type: require('./element.schema'), - description: 'Names of resource types to exclude.', - }, - period: { - type: require('./period.schema'), - description: - 'A period of time during which the fulfilling resources would have been created.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference of a prior response to resource which is the target or subject of this action.', + }, + _nullify: { + type: require('./element.schema.js'), + description: 'If true remove all history excluding audit.', + }, + nullify: { + type: GraphQLBoolean, + description: 'If true remove all history excluding audit.', + }, + _reference: { + type: require('./element.schema.js'), + description: 'A reference to supply which authenticates the process.', + }, + reference: { + type: GraphQLString, + description: 'A reference to supply which authenticates the process.', + }, + item: { + type: new GraphQLList(require('./processrequestitem.schema.js')), + description: + 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', + }, + _include: { + type: require('./element.schema.js'), + description: 'Names of resource types to include.', + }, + include: { + type: new GraphQLList(GraphQLString), + description: 'Names of resource types to include.', + }, + _exclude: { + type: require('./element.schema.js'), + description: 'Names of resource types to exclude.', + }, + exclude: { + type: new GraphQLList(GraphQLString), + description: 'Names of resource types to exclude.', + }, + period: { + type: require('./period.schema.js'), + description: + 'A period of time during which the fulfilling resources would have been created.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/processrequestitem.schema.js b/src/resources/1_0_2/schemas/processrequestitem.schema.js index 38e61031..b911f5c3 100644 --- a/src/resources/1_0_2/schemas/processrequestitem.schema.js +++ b/src/resources/1_0_2/schemas/processrequestitem.schema.js @@ -1,24 +1,46 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLInt } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ProcessRequest.item Schema + * @summary ProcessRequestitem Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcessRequestItem', - description: - 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLNonNull(GraphQLInt), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: 'A service line number.', - }, - }), + name: 'ProcessRequestitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(GraphQLInt), + description: 'A service line number.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/processresponse.schema.js b/src/resources/1_0_2/schemas/processresponse.schema.js index 4581ca49..0c2bb76e 100644 --- a/src/resources/1_0_2/schemas/processresponse.schema.js +++ b/src/resources/1_0_2/schemas/processresponse.schema.js @@ -1,20 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcessResponseResourceType = new GraphQLEnumType({ - name: 'ProcessResponseResourceType', - values: { - ProcessResponse: { value: 'ProcessResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,86 +17,181 @@ let ProcessResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ProcessResponse', - description: 'Base StructureDefinition for ProcessResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProcessResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - request: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ProcessResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcessResponse_Enum_schema', + values: { ProcessResponse: { value: 'ProcessResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + request: { + type: new GraphQLUnionType({ + name: 'ProcessResponserequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-outcome - outcome: { - type: require('./coding.schema'), - description: 'Transaction status: error, complete, held.', - }, - disposition: { - type: GraphQLString, - description: - 'A description of the status of the adjudication or processing.', - }, - _disposition: { - type: require('./element.schema'), - description: - 'A description of the status of the adjudication or processing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - ruleset: { - type: require('./coding.schema'), - description: - 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ruleset - originalRuleset: { - type: require('./coding.schema'), - description: - 'The style (standard) and version of the original material which was converted into this resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-outcome + outcome: { + type: require('./coding.schema.js'), + description: 'Transaction status: error, complete, held.', + }, + _disposition: { + type: require('./element.schema.js'), + description: + 'A description of the status of the adjudication or processing.', + }, + disposition: { + type: GraphQLString, + description: + 'A description of the status of the adjudication or processing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + ruleset: { + type: require('./coding.schema.js'), + description: + 'The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ruleset + originalRuleset: { + type: require('./coding.schema.js'), + description: + 'The style (standard) and version of the original material which was converted into this resource.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'ProcessResponseorganization_organization_Union', description: 'The organization who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'ProcessResponserequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: 'ProcessResponserequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./coding.schema'), - description: 'The form to be used for printing the content.', - }, - notes: { - type: new GraphQLList(require('./processresponsenotes.schema')), - description: - 'Suite of processing note or additional requirements is the processing has been held.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - error: { - type: new GraphQLList(require('./coding.schema')), - description: 'Processing errors.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./coding.schema.js'), + description: 'The form to be used for printing the content.', + }, + notes: { + type: new GraphQLList(require('./processresponsenotes.schema.js')), + description: + 'Suite of processing note or additional requirements is the processing has been held.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + error: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Processing errors.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/processresponsenotes.schema.js b/src/resources/1_0_2/schemas/processresponsenotes.schema.js index 17e63283..f50d96f5 100644 --- a/src/resources/1_0_2/schemas/processresponsenotes.schema.js +++ b/src/resources/1_0_2/schemas/processresponsenotes.schema.js @@ -1,29 +1,46 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ProcessResponse.notes Schema + * @summary ProcessResponsenotes Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcessResponseNotes', - description: - 'Suite of processing note or additional requirements is the processing has been held.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./coding.schema'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.schema'), - description: 'The note text.', - }, - }), + name: 'ProcessResponsenotes', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./coding.schema.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/provenance.schema.js b/src/resources/1_0_2/schemas/provenance.schema.js index 7b2af5d5..4ae650e1 100644 --- a/src/resources/1_0_2/schemas/provenance.schema.js +++ b/src/resources/1_0_2/schemas/provenance.schema.js @@ -1,21 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProvenanceResourceType = new GraphQLEnumType({ - name: 'ProvenanceResourceType', - values: { - Provenance: { value: 'Provenance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,70 +16,148 @@ let ProvenanceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Provenance', - description: 'Base StructureDefinition for Provenance Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProvenanceResourceType), - description: 'Type of this resource.', - }, - target: { - type: new GraphQLList( - new GraphQLNonNull(require('./reference.schema')), + description: 'Base StructureDefinition for Provenance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Provenance_Enum_schema', + values: { Provenance: { value: 'Provenance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + target: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Provenancetarget_target_Union', + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), ), - description: - 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', - }, - period: { - type: require('./period.schema'), - description: 'The period during which the activity occurred.', - }, - recorded: { - type: new GraphQLNonNull(InstantScalar), - description: 'The instant of time at which the activity was recorded.', - }, - _recorded: { - type: require('./element.schema'), - description: 'The instant of time at which the activity was recorded.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'The reason that the activity was taking place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ProvenanceEventCurrentState - activity: { - type: require('./codeableconcept.schema'), - description: - 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', - }, - location: { - type: require('./reference.schema'), + ), + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + }, + period: { + type: require('./period.schema.js'), + description: 'The period during which the activity occurred.', + }, + _recorded: { + type: require('./element.schema.js'), + description: 'The instant of time at which the activity was recorded.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The instant of time at which the activity was recorded.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason that the activity was taking place.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ProvenanceEventCurrentState + activity: { + type: require('./codeableconcept.schema.js'), + description: + 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Provenancelocation_location_Union', description: 'Where the activity occurred, if relevant.', - }, - policy: { - type: new GraphQLList(UriScalar), - description: - 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', - }, - _policy: { - type: require('./element.schema'), - description: - 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', - }, - agent: { - type: new GraphQLList(require('./provenanceagent.schema')), - description: - 'An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.', - }, - entity: { - type: new GraphQLList(require('./provenanceentity.schema')), - description: 'An entity used in this activity.', - }, - signature: { - type: new GraphQLList(require('./signature.schema')), - description: - 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the activity occurred, if relevant.', + }, + _policy: { + type: require('./element.schema.js'), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + agent: { + type: new GraphQLList(require('./provenanceagent.schema.js')), + description: + 'An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.', + }, + entity: { + type: new GraphQLList(require('./provenanceentity.schema.js')), + description: 'An entity used in this activity.', + }, + signature: { + type: new GraphQLList(require('./signature.schema.js')), + description: + 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/provenanceagent.schema.js b/src/resources/1_0_2/schemas/provenanceagent.schema.js index 9d95e1d2..2efabaa6 100644 --- a/src/resources/1_0_2/schemas/provenanceagent.schema.js +++ b/src/resources/1_0_2/schemas/provenanceagent.schema.js @@ -1,36 +1,86 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Provenance.agent Schema + * @summary Provenanceagent Schema */ module.exports = new GraphQLObjectType({ - name: 'ProvenanceAgent', - description: - 'An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/provenance-agent-role - role: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The function of the agent with respect to the activity.', - }, - actor: { - type: require('./reference.schema'), + name: 'Provenanceagent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provenance-agent-role + role: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The function of the agent with respect to the activity.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'Provenanceagentactor_actor_Union', description: 'The individual, device or organization that participated in the event.', - }, - userId: { - type: require('./identifier.schema'), - description: - 'The identity of the agent as known by the authorization system.', - }, - relatedAgent: { - type: new GraphQLList(require('./provenanceagentrelatedagent.schema')), - description: - "A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.", - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual, device or organization that participated in the event.', + }, + userId: { + type: require('./identifier.schema.js'), + description: + 'The identity of the agent as known by the authorization system.', + }, + relatedAgent: { + type: new GraphQLList(require('./provenanceagentrelatedagent.schema.js')), + description: + "A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/provenanceagentrelatedagent.schema.js b/src/resources/1_0_2/schemas/provenanceagentrelatedagent.schema.js index a7689576..38df742a 100644 --- a/src/resources/1_0_2/schemas/provenanceagentrelatedagent.schema.js +++ b/src/resources/1_0_2/schemas/provenanceagentrelatedagent.schema.js @@ -1,32 +1,49 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Provenance.agent.relatedAgent Schema + * @summary ProvenanceagentrelatedAgent Schema */ module.exports = new GraphQLObjectType({ - name: 'ProvenanceAgentRelatedAgent', - description: - "A relationship between two the agents referenced in this resource. This is defined to allow for explicit description of the delegation between agents. For example, this human author used this device, or one person acted on another's behest.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-RoleLinkType - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The type of relationship between agents.', - }, - target: { - type: new GraphQLNonNull(UriScalar), - description: - 'An internal reference to another agent listed in this provenance by its identifier.', - }, - _target: { - type: require('./element.schema'), - description: - 'An internal reference to another agent listed in this provenance by its identifier.', - }, - }), + name: 'ProvenanceagentrelatedAgent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-RoleLinkType + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The type of relationship between agents.', + }, + _target: { + type: require('./element.schema.js'), + description: + 'An internal reference to another agent listed in this provenance by its identifier.', + }, + target: { + type: new GraphQLNonNull(UriScalar), + description: + 'An internal reference to another agent listed in this provenance by its identifier.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/provenanceentity.schema.js b/src/resources/1_0_2/schemas/provenanceentity.schema.js index dc6e874a..6384bc7a 100644 --- a/src/resources/1_0_2/schemas/provenanceentity.schema.js +++ b/src/resources/1_0_2/schemas/provenanceentity.schema.js @@ -1,50 +1,73 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Provenance.entity Schema + * @summary Provenanceentity Schema */ module.exports = new GraphQLObjectType({ - name: 'ProvenanceEntity', - description: 'An entity used in this activity.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/provenance-entity-role - role: { - type: new GraphQLNonNull(CodeScalar), - description: 'How the entity was used during the activity.', - }, - _role: { - type: require('./element.schema'), - description: 'How the entity was used during the activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'The type of the entity. If the entity is a resource, then this is a resource type.', - }, - reference: { - type: new GraphQLNonNull(UriScalar), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - _reference: { - type: require('./element.schema'), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - display: { - type: GraphQLString, - description: 'Human-readable description of the entity.', - }, - _display: { - type: require('./element.schema'), - description: 'Human-readable description of the entity.', - }, - }), + name: 'Provenanceentity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _role: { + type: require('./element.schema.js'), + description: 'How the entity was used during the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provenance-entity-role + role: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the entity was used during the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'The type of the entity. If the entity is a resource, then this is a resource type.', + }, + _reference: { + type: require('./element.schema.js'), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + reference: { + type: new GraphQLNonNull(UriScalar), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + _display: { + type: require('./element.schema.js'), + description: 'Human-readable description of the entity.', + }, + display: { + type: GraphQLString, + description: 'Human-readable description of the entity.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/quantity.schema.js b/src/resources/1_0_2/schemas/quantity.schema.js index b16922e4..2c11a105 100644 --- a/src/resources/1_0_2/schemas/quantity.schema.js +++ b/src/resources/1_0_2/schemas/quantity.schema.js @@ -1,8 +1,12 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLFloat, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLFloat, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -10,57 +14,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Quantity', - description: 'Base StructureDefinition for Quantity Type.', - fields: () => - extendSchema(require('./element.schema'), { - value: { - type: GraphQLFloat, - description: - 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', - }, - _value: { - type: require('./element.schema'), - description: - 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator - comparator: { - type: CodeScalar, - description: - "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", - }, - _comparator: { - type: require('./element.schema'), - description: - "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", - }, - unit: { - type: GraphQLString, - description: 'A human-readable form of the unit.', - }, - _unit: { - type: require('./element.schema'), - description: 'A human-readable form of the unit.', - }, - system: { - type: UriScalar, - description: - 'The identification of the system that provides the coded form of the unit.', - }, - _system: { - type: require('./element.schema'), - description: - 'The identification of the system that provides the coded form of the unit.', - }, - code: { - type: CodeScalar, - description: - 'A computer processable form of the unit in some unit representation system.', - }, - _code: { - type: require('./element.schema'), - description: - 'A computer processable form of the unit in some unit representation system.', - }, - }), + description: 'Base StructureDefinition for Quantity Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/questionnaire.schema.js b/src/resources/1_0_2/schemas/questionnaire.schema.js index ea0defb6..a64ba906 100644 --- a/src/resources/1_0_2/schemas/questionnaire.schema.js +++ b/src/resources/1_0_2/schemas/questionnaire.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let QuestionnaireResourceType = new GraphQLEnumType({ - name: 'QuestionnaireResourceType', - values: { - Questionnaire: { value: 'Questionnaire' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,75 +17,132 @@ let QuestionnaireResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Questionnaire', - description: 'Base StructureDefinition for Questionnaire Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(QuestionnaireResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - version: { - type: GraphQLString, - description: - 'The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The lifecycle status of the questionnaire as a whole.', - }, - _status: { - type: require('./element.schema'), - description: 'The lifecycle status of the questionnaire as a whole.', - }, - date: { - type: DateTimeScalar, - description: 'The date that this questionnaire was last changed.', - }, - _date: { - type: require('./element.schema'), - description: 'The date that this questionnaire was last changed.', - }, - publisher: { - type: GraphQLString, - description: - 'Organization or person responsible for developing and maintaining the questionnaire.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'Organization or person responsible for developing and maintaining the questionnaire.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - subjectType: { - type: new GraphQLList(CodeScalar), - description: - 'Identifies the types of subjects that can be the subject of the questionnaire.', - }, - _subjectType: { - type: require('./element.schema'), - description: - 'Identifies the types of subjects that can be the subject of the questionnaire.', - }, - group: { - type: new GraphQLNonNull(require('./questionnairegroup.schema')), - description: - 'A collection of related questions (or further groupings of questions).', - }, - }), + description: 'Base StructureDefinition for Questionnaire Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Questionnaire_Enum_schema', + values: { Questionnaire: { value: 'Questionnaire' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.', + }, + version: { + type: GraphQLString, + description: + 'The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The lifecycle status of the questionnaire as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The lifecycle status of the questionnaire as a whole.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date that this questionnaire was last changed.', + }, + date: { + type: DateTimeScalar, + description: 'The date that this questionnaire was last changed.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'Organization or person responsible for developing and maintaining the questionnaire.', + }, + publisher: { + type: GraphQLString, + description: + 'Organization or person responsible for developing and maintaining the questionnaire.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _subjectType: { + type: require('./element.schema.js'), + description: + 'Identifies the types of subjects that can be the subject of the questionnaire.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + subjectType: { + type: new GraphQLList(CodeScalar), + description: + 'Identifies the types of subjects that can be the subject of the questionnaire.', + }, + group: { + type: new GraphQLNonNull(require('./questionnairegroup.schema.js')), + description: + 'A collection of related questions (or further groupings of questions).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/questionnairegroup.schema.js b/src/resources/1_0_2/schemas/questionnairegroup.schema.js index 2433a9a7..28d07369 100644 --- a/src/resources/1_0_2/schemas/questionnairegroup.schema.js +++ b/src/resources/1_0_2/schemas/questionnairegroup.schema.js @@ -1,82 +1,97 @@ const { - GraphQLObjectType, - GraphQLString, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Questionnaire.group Schema + * @summary Questionnairegroup Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireGroup', - description: - 'A collection of related questions (or further groupings of questions).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - linkId: { - type: GraphQLString, - description: - 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.schema'), - description: - 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.', - }, - title: { - type: GraphQLString, - description: - 'The human-readable name for this section of the questionnaire.', - }, - _title: { - type: require('./element.schema'), - description: - 'The human-readable name for this section of the questionnaire.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions - concept: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Identifies a how this group of questions is known in a particular terminology such as LOINC.', - }, - text: { - type: GraphQLString, - description: - 'Additional text for the group, used for display purposes.', - }, - _text: { - type: require('./element.schema'), - description: - 'Additional text for the group, used for display purposes.', - }, - required: { - type: GraphQLBoolean, - description: - 'If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.', - }, - _required: { - type: require('./element.schema'), - description: - 'If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.', - }, - repeats: { - type: GraphQLBoolean, - description: - 'Whether the group may occur multiple times in the instance, containing multiple sets of answers.', - }, - _repeats: { - type: require('./element.schema'), - description: - 'Whether the group may occur multiple times in the instance, containing multiple sets of answers.', - }, - question: { - type: new GraphQLList(require('./questionnairegroupquestion.schema')), - description: - 'Set of questions within this group. The order of questions within the group is relevant.', - }, - }), + name: 'Questionnairegroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.', + }, + linkId: { + type: GraphQLString, + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent group in a QuestionnaireResponse resource.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'The human-readable name for this section of the questionnaire.', + }, + title: { + type: GraphQLString, + description: + 'The human-readable name for this section of the questionnaire.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions + concept: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Identifies a how this group of questions is known in a particular terminology such as LOINC.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Additional text for the group, used for display purposes.', + }, + text: { + type: GraphQLString, + description: 'Additional text for the group, used for display purposes.', + }, + _required: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.', + }, + required: { + type: GraphQLBoolean, + description: + 'If true, indicates that the group must be present and have required questions within it answered. If false, the group may be skipped when answering the questionnaire.', + }, + _repeats: { + type: require('./element.schema.js'), + description: + 'Whether the group may occur multiple times in the instance, containing multiple sets of answers.', + }, + repeats: { + type: GraphQLBoolean, + description: + 'Whether the group may occur multiple times in the instance, containing multiple sets of answers.', + }, + question: { + type: new GraphQLList(require('./questionnairegroupquestion.schema.js')), + description: + 'Set of questions within this group. The order of questions within the group is relevant.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/questionnairegroupquestion.schema.js b/src/resources/1_0_2/schemas/questionnairegroupquestion.schema.js index 56c60c40..dc5d6ea7 100644 --- a/src/resources/1_0_2/schemas/questionnairegroupquestion.schema.js +++ b/src/resources/1_0_2/schemas/questionnairegroupquestion.schema.js @@ -1,88 +1,116 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLString, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Questionnaire.group.question Schema + * @summary Questionnairegroupquestion Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireGroupQuestion', - description: - 'Set of questions within this group. The order of questions within the group is relevant.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - linkId: { - type: GraphQLString, - description: - 'An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.', - }, - _linkId: { - type: require('./element.schema'), - description: - 'An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions - concept: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Identifies a how this question is known in a particular terminology such as LOINC.', - }, - text: { - type: GraphQLString, - description: - 'The actual question as shown to the user to prompt them for an answer.', - }, - _text: { - type: require('./element.schema'), - description: - 'The actual question as shown to the user to prompt them for an answer.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/answer-format - type: { - type: CodeScalar, - description: - 'The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.', - }, - _type: { - type: require('./element.schema'), - description: - 'The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.', - }, - required: { - type: GraphQLBoolean, - description: - 'If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.', - }, - _required: { - type: require('./element.schema'), - description: - 'If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.', - }, - repeats: { - type: GraphQLBoolean, - description: 'If true, the question may have more than one answer.', - }, - _repeats: { - type: require('./element.schema'), - description: 'If true, the question may have more than one answer.', - }, - options: { - type: require('./reference.schema'), + name: 'Questionnairegroupquestion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.', + }, + linkId: { + type: GraphQLString, + description: + 'An identifier that is unique within the questionnaire allowing linkage to the equivalent group in a [[[QuestionnaireResponse]]] resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions + concept: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Identifies a how this question is known in a particular terminology such as LOINC.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'The actual question as shown to the user to prompt them for an answer.', + }, + text: { + type: GraphQLString, + description: + 'The actual question as shown to the user to prompt them for an answer.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/answer-format + type: { + type: CodeScalar, + description: + 'The expected format of the answer, e.g. the type of input (string, integer) or whether a (multiple) choice is expected.', + }, + _required: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.', + }, + required: { + type: GraphQLBoolean, + description: + 'If true, indicates that the question must be answered and have required groups within it also present. If false, the question and any contained groups may be skipped when answering the questionnaire.', + }, + _repeats: { + type: require('./element.schema.js'), + description: 'If true, the question may have more than one answer.', + }, + repeats: { + type: GraphQLBoolean, + description: 'If true, the question may have more than one answer.', + }, + options: { + type: new GraphQLUnionType({ + name: 'Questionnairegroupquestionoptions_options_Union', description: 'Reference to a value set containing a list of codes representing permitted answers for the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - option: { - type: new GraphQLList(require('./coding.schema')), - description: - "For a 'choice' question, identifies one of the permitted answers for the question.", - }, - }), + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'Reference to a value set containing a list of codes representing permitted answers for the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + option: { + type: new GraphQLList(require('./coding.schema.js')), + description: + "For a 'choice' question, identifies one of the permitted answers for the question.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/questionnaireresponse.schema.js b/src/resources/1_0_2/schemas/questionnaireresponse.schema.js index 54491969..b6e50e3d 100644 --- a/src/resources/1_0_2/schemas/questionnaireresponse.schema.js +++ b/src/resources/1_0_2/schemas/questionnaireresponse.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let QuestionnaireResponseResourceType = new GraphQLEnumType({ - name: 'QuestionnaireResponseResourceType', - values: { - QuestionnaireResponse: { value: 'QuestionnaireResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,67 +16,197 @@ let QuestionnaireResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'QuestionnaireResponse', - description: 'Base StructureDefinition for QuestionnaireResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(QuestionnaireResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', - }, - questionnaire: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for QuestionnaireResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'QuestionnaireResponse_Enum_schema', + values: { QuestionnaireResponse: { value: 'QuestionnaireResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', + }, + questionnaire: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsequestionnaire_questionnaire_Union', description: 'Indicates the Questionnaire resource that defines the form for which answers are being provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The lifecycle status of the questionnaire response as a whole.', - }, - _status: { - type: require('./element.schema'), - description: - 'The lifecycle status of the questionnaire response as a whole.', - }, - subject: { - type: require('./reference.schema'), + types: () => [require('./questionnaire.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); + } + }, + }), + description: + 'Indicates the Questionnaire resource that defines the form for which answers are being provided.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The lifecycle status of the questionnaire response as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The lifecycle status of the questionnaire response as a whole.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsesubject_subject_Union', description: 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', - }, - author: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', + }, + author: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponseauthor_author_Union', description: 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', - }, - authored: { - type: DateTimeScalar, - description: - 'The date and/or time that this version of the questionnaire response was authored.', - }, - _authored: { - type: require('./element.schema'), - description: - 'The date and/or time that this version of the questionnaire response was authored.', - }, - source: { - type: require('./reference.schema'), + types: () => [ + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', + }, + _authored: { + type: require('./element.schema.js'), + description: + 'The date and/or time that this version of the questionnaire response was authored.', + }, + authored: { + type: DateTimeScalar, + description: + 'The date and/or time that this version of the questionnaire response was authored.', + }, + source: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsesource_source_Union', description: 'The person who answered the questions about the subject.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The person who answered the questions about the subject.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponseencounter_encounter_Union', description: 'Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.', - }, - group: { - type: require('./questionnaireresponsegroup.schema'), - description: - 'A group of questions to a possibly similarly grouped set of questions in the questionnaire response.', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.', + }, + group: { + type: require('./questionnaireresponsegroup.schema.js'), + description: + 'A group of questions to a possibly similarly grouped set of questions in the questionnaire response.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/questionnaireresponsegroup.schema.js b/src/resources/1_0_2/schemas/questionnaireresponsegroup.schema.js index ae9c4f00..296f66e4 100644 --- a/src/resources/1_0_2/schemas/questionnaireresponsegroup.schema.js +++ b/src/resources/1_0_2/schemas/questionnaireresponsegroup.schema.js @@ -1,56 +1,86 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.group Schema + * @summary QuestionnaireResponsegroup Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireResponseGroup', - description: - 'A group of questions to a possibly similarly grouped set of questions in the questionnaire response.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - linkId: { - type: GraphQLString, - description: - 'Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.schema'), - description: - 'Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.', - }, - title: { - type: GraphQLString, - description: 'Text that is displayed above the contents of the group.', - }, - _title: { - type: require('./element.schema'), - description: 'Text that is displayed above the contents of the group.', - }, - text: { - type: GraphQLString, - description: - 'Additional text for the group, used for display purposes.', - }, - _text: { - type: require('./element.schema'), - description: - 'Additional text for the group, used for display purposes.', - }, - subject: { - type: require('./reference.schema'), + name: 'QuestionnaireResponsegroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.', + }, + linkId: { + type: GraphQLString, + description: + 'Identifies the group from the Questionnaire that corresponds to this group in the QuestionnaireResponse resource.', + }, + _title: { + type: require('./element.schema.js'), + description: 'Text that is displayed above the contents of the group.', + }, + title: { + type: GraphQLString, + description: 'Text that is displayed above the contents of the group.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Additional text for the group, used for display purposes.', + }, + text: { + type: GraphQLString, + description: 'Additional text for the group, used for display purposes.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsegroupsubject_subject_Union', description: "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", - }, - question: { - type: new GraphQLList( - require('./questionnaireresponsegroupquestion.schema'), - ), - description: - 'Set of questions within this group. The order of questions within the group is relevant.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", + }, + question: { + type: new GraphQLList( + require('./questionnaireresponsegroupquestion.schema.js'), + ), + description: + 'Set of questions within this group. The order of questions within the group is relevant.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/questionnaireresponsegroupquestion.schema.js b/src/resources/1_0_2/schemas/questionnaireresponsegroupquestion.schema.js index 962c1804..ed8bec80 100644 --- a/src/resources/1_0_2/schemas/questionnaireresponsegroupquestion.schema.js +++ b/src/resources/1_0_2/schemas/questionnaireresponsegroupquestion.schema.js @@ -1,42 +1,59 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.group.question Schema + * @summary QuestionnaireResponsegroupquestion Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireResponseGroupQuestion', - description: - 'Set of questions within this group. The order of questions within the group is relevant.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - linkId: { - type: GraphQLString, - description: - 'Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.schema'), - description: - 'Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.', - }, - text: { - type: GraphQLString, - description: - 'The actual question as shown to the user to prompt them for an answer.', - }, - _text: { - type: require('./element.schema'), - description: - 'The actual question as shown to the user to prompt them for an answer.', - }, - answer: { - type: new GraphQLList( - require('./questionnaireresponsegroupquestionanswer.schema'), - ), - description: "The respondent's answer(s) to the question.", - }, - }), + name: 'QuestionnaireResponsegroupquestion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.', + }, + linkId: { + type: GraphQLString, + description: + 'Identifies the question from the Questionnaire that corresponds to this question in the QuestionnaireResponse resource.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'The actual question as shown to the user to prompt them for an answer.', + }, + text: { + type: GraphQLString, + description: + 'The actual question as shown to the user to prompt them for an answer.', + }, + answer: { + type: new GraphQLList( + require('./questionnaireresponsegroupquestionanswer.schema.js'), + ), + description: "The respondent's answer(s) to the question.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/questionnaireresponsegroupquestionanswer.schema.js b/src/resources/1_0_2/schemas/questionnaireresponsegroupquestionanswer.schema.js index 7487d3f0..a2476682 100644 --- a/src/resources/1_0_2/schemas/questionnaireresponsegroupquestionanswer.schema.js +++ b/src/resources/1_0_2/schemas/questionnaireresponsegroupquestionanswer.schema.js @@ -1,136 +1,167 @@ -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLBoolean, GraphQLFloat, GraphQLInt, GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.group.question.answer Schema + * @summary QuestionnaireResponsegroupquestionanswer Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireResponseGroupQuestionAnswer', - description: "The respondent's answer(s) to the question.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - valueBoolean: { - type: GraphQLBoolean, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueDecimal: { - type: GraphQLFloat, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueInteger: { - type: GraphQLInt, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueInteger: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueDate: { - type: DateScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDate: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueInstant: { - type: InstantScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueInstant: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueTime: { - type: TimeScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueString: { - type: GraphQLString, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueUri: { - type: UriScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueUri: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueCoding: { - type: require('./coding.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - valueReference: { - type: require('./reference.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - }), + name: 'QuestionnaireResponsegroupquestionanswer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueInteger: { + type: GraphQLInt, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDate: { + type: DateScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueInstant: { + type: InstantScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueTime: { + type: TimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueString: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueUri: { + type: UriScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueCoding: { + type: require('./coding.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueReference: { + type: new GraphQLUnionType({ + name: + 'QuestionnaireResponsegroupquestionanswervalueReference_valueReference_Union', + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/range.schema.js b/src/resources/1_0_2/schemas/range.schema.js index 2c1c87a1..15ed5e89 100644 --- a/src/resources/1_0_2/schemas/range.schema.js +++ b/src/resources/1_0_2/schemas/range.schema.js @@ -1,6 +1,5 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -8,16 +7,30 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Range', - description: 'Base StructureDefinition for Range Type.', - fields: () => - extendSchema(require('./element.schema'), { - low: { - type: require('./quantity.schema'), - description: 'The low limit. The boundary is inclusive.', - }, - high: { - type: require('./quantity.schema'), - description: 'The high limit. The boundary is inclusive.', - }, - }), + description: 'Base StructureDefinition for Range Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + low: { + type: require('./quantity.schema.js'), + description: 'The low limit. The boundary is inclusive.', + }, + high: { + type: require('./quantity.schema.js'), + description: 'The high limit. The boundary is inclusive.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/ratio.schema.js b/src/resources/1_0_2/schemas/ratio.schema.js index 6dfc4993..2760621e 100644 --- a/src/resources/1_0_2/schemas/ratio.schema.js +++ b/src/resources/1_0_2/schemas/ratio.schema.js @@ -1,6 +1,5 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -8,16 +7,30 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Ratio', - description: 'Base StructureDefinition for Ratio Type.', - fields: () => - extendSchema(require('./element.schema'), { - numerator: { - type: require('./quantity.schema'), - description: 'The value of the numerator.', - }, - denominator: { - type: require('./quantity.schema'), - description: 'The value of the denominator.', - }, - }), + description: 'Base StructureDefinition for Ratio Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + numerator: { + type: require('./quantity.schema.js'), + description: 'The value of the numerator.', + }, + denominator: { + type: require('./quantity.schema.js'), + description: 'The value of the denominator.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/reference.schema.js b/src/resources/1_0_2/schemas/reference.schema.js index 8170a88c..c640125a 100644 --- a/src/resources/1_0_2/schemas/reference.schema.js +++ b/src/resources/1_0_2/schemas/reference.schema.js @@ -1,6 +1,5 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports @@ -8,28 +7,42 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Reference', - description: 'Base StructureDefinition for Reference Type.', - fields: () => - extendSchema(require('./element.schema'), { - reference: { - type: GraphQLString, - description: - "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", - }, - _reference: { - type: require('./element.schema'), - description: - "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", - }, - display: { - type: GraphQLString, - description: - 'Plain text narrative that identifies the resource in addition to the resource reference.', - }, - _display: { - type: require('./element.schema'), - description: - 'Plain text narrative that identifies the resource in addition to the resource reference.', - }, - }), + description: 'Base StructureDefinition for Reference Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _reference: { + type: require('./element.schema.js'), + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + reference: { + type: GraphQLString, + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + _display: { + type: require('./element.schema.js'), + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + display: { + type: GraphQLString, + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/referralrequest.schema.js b/src/resources/1_0_2/schemas/referralrequest.schema.js index 9c3a1b1d..d9d8e4fb 100644 --- a/src/resources/1_0_2/schemas/referralrequest.schema.js +++ b/src/resources/1_0_2/schemas/referralrequest.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ReferralRequestResourceType = new GraphQLEnumType({ - name: 'ReferralRequestResourceType', - values: { - ReferralRequest: { value: 'ReferralRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,116 +17,244 @@ let ReferralRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ReferralRequest', - description: 'Base StructureDefinition for ReferralRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ReferralRequestResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referralstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The workflow status of the referral or transfer of care request.', - }, - _status: { - type: require('./element.schema'), - description: - 'The workflow status of the referral or transfer of care request.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Business identifier that uniquely identifies the referral/care transfer request instance.', - }, - date: { - type: DateTimeScalar, - description: - 'Date/DateTime of creation for draft requests and date of activation for active requests.', - }, - _date: { - type: require('./element.schema'), - description: - 'Date/DateTime of creation for draft requests and date of activation for active requests.', - }, - type: { - type: require('./codeableconcept.schema'), - description: - 'An indication of the type of referral (or where applicable the type of transfer of care) request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty - specialty: { - type: require('./codeableconcept.schema'), - description: - 'Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority - priority: { - type: require('./codeableconcept.schema'), - description: - 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ReferralRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ReferralRequest_Enum_schema', + values: { ReferralRequest: { value: 'ReferralRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The workflow status of the referral or transfer of care request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referralstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The workflow status of the referral or transfer of care request.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifier that uniquely identifies the referral/care transfer request instance.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'Date/DateTime of creation for draft requests and date of activation for active requests.', + }, + date: { + type: DateTimeScalar, + description: + 'Date/DateTime of creation for draft requests and date of activation for active requests.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'An indication of the type of referral (or where applicable the type of transfer of care) request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty + specialty: { + type: require('./codeableconcept.schema.js'), + description: + 'Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-order-priority + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'ReferralRequestpatient_patient_Union', description: 'The patient who is the subject of a referral or transfer of care request.', - }, - requester: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The patient who is the subject of a referral or transfer of care request.', + }, + requester: { + type: new GraphQLUnionType({ + name: 'ReferralRequestrequester_requester_Union', description: 'The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ReferralRequestrecipient_recipient_Union', + description: + 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'ReferralRequestencounter_encounter_Union', description: 'The encounter at which the request for referral or transfer of care is initiated.', - }, - dateSent: { - type: DateTimeScalar, - description: - 'Date/DateTime the request for referral or transfer of care is sent by the author.', - }, - _dateSent: { - type: require('./element.schema'), - description: - 'Date/DateTime the request for referral or transfer of care is sent by the author.', - }, - reason: { - type: require('./codeableconcept.schema'), - description: - 'Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.', - }, - description: { - type: GraphQLString, - description: - 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', - }, - _description: { - type: require('./element.schema'), - description: - 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - serviceRequested: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', - }, - fulfillmentTime: { - type: require('./period.schema'), - description: - 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The encounter at which the request for referral or transfer of care is initiated.', + }, + _dateSent: { + type: require('./element.schema.js'), + description: + 'Date/DateTime the request for referral or transfer of care is sent by the author.', + }, + dateSent: { + type: DateTimeScalar, + description: + 'Date/DateTime the request for referral or transfer of care is sent by the author.', + }, + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', + }, + description: { + type: GraphQLString, + description: + 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + serviceRequested: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ReferralRequestsupportingInformation_supportingInformation_Union', + description: + 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', + }, + fulfillmentTime: { + type: require('./period.schema.js'), + description: + 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/relatedperson.schema.js b/src/resources/1_0_2/schemas/relatedperson.schema.js index 1c6eaedf..f91b871d 100644 --- a/src/resources/1_0_2/schemas/relatedperson.schema.js +++ b/src/resources/1_0_2/schemas/relatedperson.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let RelatedPersonResourceType = new GraphQLEnumType({ - name: 'RelatedPersonResourceType', - values: { - RelatedPerson: { value: 'RelatedPerson' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -23,68 +16,136 @@ let RelatedPersonResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'RelatedPerson', - description: 'Base StructureDefinition for RelatedPerson Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(RelatedPersonResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier for a person within a particular scope.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient this person is related to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype - relationship: { - type: require('./codeableconcept.schema'), - description: - 'The nature of the relationship between a patient and the related person.', - }, - name: { - type: require('./humanname.schema'), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date on which the related person was born.', - }, - _birthDate: { - type: require('./element.schema'), - description: 'The date on which the related person was born.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: - 'Address where the related person can be contacted or visited.', - }, - photo: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Image of the person.', - }, - period: { - type: require('./period.schema'), - description: - 'The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.', - }, - }), + description: 'Base StructureDefinition for RelatedPerson Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RelatedPerson_Enum_schema', + values: { RelatedPerson: { value: 'RelatedPerson' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Identifier for a person within a particular scope.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'RelatedPersonpatient_patient_Union', + description: 'The patient this person is related to.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient this person is related to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype + relationship: { + type: require('./codeableconcept.schema.js'), + description: + 'The nature of the relationship between a patient and the related person.', + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date on which the related person was born.', + }, + birthDate: { + type: DateScalar, + description: 'The date on which the related person was born.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: + 'Address where the related person can be contacted or visited.', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the person.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/resource.schema.js b/src/resources/1_0_2/schemas/resource.schema.js index 8be7009c..87904aa9 100644 --- a/src/resources/1_0_2/schemas/resource.schema.js +++ b/src/resources/1_0_2/schemas/resource.schema.js @@ -1,21 +1,11 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ResourceResourceType = new GraphQLEnumType({ - name: 'ResourceResourceType', - values: { - Resource: { value: 'Resource' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,45 +13,49 @@ let ResourceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Resource', - description: 'Base StructureDefinition for Resource Resource.', - fields: () => - extendSchema({ - resourceType: { - type: new GraphQLNonNull(ResourceResourceType), - description: 'Type of this resource.', - }, - id: { - type: IdScalar, - description: - 'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.', - }, - _id: { - type: require('./element.schema'), - 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.schema'), - 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: 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.', - }, - _implicitRules: { - type: require('./element.schema'), - 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: CodeScalar, - description: 'The base language in which the resource is written.', - }, - _language: { - type: require('./element.schema'), - description: 'The base language in which the resource is written.', - }, - }), + description: 'Base StructureDefinition for Resource Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Resource_Enum_schema', + values: { Resource: { value: 'Resource' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/resourcelist.schema.js b/src/resources/1_0_2/schemas/resourcelist.schema.js index 1f8d2ff9..0bd9e066 100644 --- a/src/resources/1_0_2/schemas/resourcelist.schema.js +++ b/src/resources/1_0_2/schemas/resourcelist.schema.js @@ -1,476 +1,398 @@ -const Account = require('../schemas/account.schema'); -const AllergyIntolerance = require('../schemas/allergyintolerance.schema'); -const Appointment = require('../schemas/appointment.schema'); -const AppointmentResponse = require('../schemas/appointmentresponse.schema'); -const AuditEvent = require('../schemas/auditevent.schema'); -const Basic = require('../schemas/basic.schema'); -const Binary = require('../schemas/binary.schema'); -const BodySite = require('../schemas/bodysite.schema'); -const Bundle = require('../schemas/bundle.schema'); -const CarePlan = require('../schemas/careplan.schema'); -const Claim = require('../schemas/claim.schema'); -const ClaimResponse = require('../schemas/claimresponse.schema'); -const ClinicalImpression = require('../schemas/clinicalimpression.schema'); -const Communication = require('../schemas/communication.schema'); -const CommunicationRequest = require('../schemas/communicationrequest.schema'); -const Composition = require('../schemas/composition.schema'); -const ConceptMap = require('../schemas/conceptmap.schema'); -const Condition = require('../schemas/condition.schema'); -const Conformance = require('../schemas/conformance.schema'); -const Contract = require('../schemas/contract.schema'); -const Coverage = require('../schemas/coverage.schema'); -const DataElement = require('../schemas/dataelement.schema'); -const DetectedIssue = require('../schemas/detectedissue.schema'); -const Device = require('../schemas/device.schema'); -const DeviceComponent = require('../schemas/devicecomponent.schema'); -const DeviceMetric = require('../schemas/devicemetric.schema'); -const DeviceUseRequest = require('../schemas/deviceuserequest.schema'); -const DeviceUseStatement = require('../schemas/deviceusestatement.schema'); -const DiagnosticOrder = require('../schemas/diagnosticorder.schema'); -const DiagnosticReport = require('../schemas/diagnosticreport.schema'); -const DocumentManifest = require('../schemas/documentmanifest.schema'); -const DocumentReference = require('../schemas/documentreference.schema'); -const EligibilityRequest = require('../schemas/eligibilityrequest.schema'); -const EligibilityResponse = require('../schemas/eligibilityresponse.schema'); -const Encounter = require('../schemas/encounter.schema'); -const EnrollmentRequest = require('../schemas/enrollmentrequest.schema'); -const EnrollmentResponse = require('../schemas/enrollmentresponse.schema'); -const EpisodeOfCare = require('../schemas/episodeofcare.schema'); -const ExplanationOfBenefit = require('../schemas/explanationofbenefit.schema'); -const FamilyMemberHistory = require('../schemas/familymemberhistory.schema'); -const Flag = require('../schemas/flag.schema'); -const Goal = require('../schemas/goal.schema'); -const Group = require('../schemas/group.schema'); -const HealthcareService = require('../schemas/healthcareservice.schema'); -const ImagingObjectSelection = require('../schemas/imagingobjectselection.schema'); -const ImagingStudy = require('../schemas/imagingstudy.schema'); -const Immunization = require('../schemas/immunization.schema'); -const ImmunizationRecommendation = require('../schemas/immunizationrecommendation.schema'); -const ImplementationGuide = require('../schemas/implementationguide.schema'); -const List = require('../schemas/list.schema'); -const Location = require('../schemas/location.schema'); -const Media = require('../schemas/media.schema'); -const Medication = require('../schemas/medication.schema'); -const MedicationAdministration = require('../schemas/medicationadministration.schema'); -const MedicationDispense = require('../schemas/medicationdispense.schema'); -const MedicationOrder = require('../schemas/medicationorder.schema'); -const MedicationStatement = require('../schemas/medicationstatement.schema'); -const MessageHeader = require('../schemas/messageheader.schema'); -const NamingSystem = require('../schemas/namingsystem.schema'); -const NutritionOrder = require('../schemas/nutritionorder.schema'); -const Observation = require('../schemas/observation.schema'); -const OperationDefinition = require('../schemas/operationdefinition.schema'); -const Order = require('../schemas/order.schema'); -const OrderResponse = require('../schemas/orderresponse.schema'); -const Organization = require('../schemas/organization.schema'); -const Patient = require('../schemas/patient.schema'); -const PaymentNotice = require('../schemas/paymentnotice.schema'); -const PaymentReconciliation = require('../schemas/paymentreconciliation.schema'); -const Person = require('../schemas/person.schema'); -const Practitioner = require('../schemas/practitioner.schema'); -const Procedure = require('../schemas/procedure.schema'); -const ProcedureRequest = require('../schemas/procedurerequest.schema'); -const ProcessRequest = require('../schemas/processrequest.schema'); -const ProcessResponse = require('../schemas/processresponse.schema'); -const Provenance = require('../schemas/provenance.schema'); -const Questionnaire = require('../schemas/questionnaire.schema'); -const QuestionnaireResponse = require('../schemas/questionnaireresponse.schema'); -const ReferralRequest = require('../schemas/referralrequest.schema'); -const RelatedPerson = require('../schemas/relatedperson.schema'); -const RiskAssessment = require('../schemas/riskassessment.schema'); -const Schedule = require('../schemas/schedule.schema'); -const SearchParameter = require('../schemas/searchparameter.schema'); -const Slot = require('../schemas/slot.schema'); -const Specimen = require('../schemas/specimen.schema'); -const StructureDefinition = require('../schemas/structuredefinition.schema'); -const Subscription = require('../schemas/subscription.schema'); -const Substance = require('../schemas/substance.schema'); -const SupplyDelivery = require('../schemas/supplydelivery.schema'); -const SupplyRequest = require('../schemas/supplyrequest.schema'); -const TestScript = require('../schemas/testscript.schema'); -const ValueSet = require('../schemas/valueset.schema'); -const VisionPrescription = require('../schemas/visionprescription.schema'); const { GraphQLUnionType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary ResourceList Union */ module.exports = new GraphQLUnionType({ name: 'ResourceList', - description: 'Union of all available resources.', + description: 'Union of all available resources', types: [ - Account, - AllergyIntolerance, - Appointment, - AppointmentResponse, - AuditEvent, - Basic, - Binary, - BodySite, - Bundle, - CarePlan, - Claim, - ClaimResponse, - ClinicalImpression, - Communication, - CommunicationRequest, - Composition, - ConceptMap, - Condition, - Conformance, - Contract, - Coverage, - DataElement, - DetectedIssue, - Device, - DeviceComponent, - DeviceMetric, - DeviceUseRequest, - DeviceUseStatement, - DiagnosticOrder, - DiagnosticReport, - DocumentManifest, - DocumentReference, - EligibilityRequest, - EligibilityResponse, - Encounter, - EnrollmentRequest, - EnrollmentResponse, - EpisodeOfCare, - ExplanationOfBenefit, - FamilyMemberHistory, - Flag, - Goal, - Group, - HealthcareService, - ImagingObjectSelection, - ImagingStudy, - Immunization, - ImmunizationRecommendation, - ImplementationGuide, - List, - Location, - Media, - Medication, - MedicationAdministration, - MedicationDispense, - MedicationOrder, - MedicationStatement, - MessageHeader, - NamingSystem, - NutritionOrder, - Observation, - OperationDefinition, - Order, - OrderResponse, - Organization, - Patient, - PaymentNotice, - PaymentReconciliation, - Person, - Practitioner, - Procedure, - ProcedureRequest, - ProcessRequest, - ProcessResponse, - Provenance, - Questionnaire, - QuestionnaireResponse, - ReferralRequest, - RelatedPerson, - RiskAssessment, - Schedule, - SearchParameter, - Slot, - Specimen, - StructureDefinition, - Subscription, - Substance, - SupplyDelivery, - SupplyRequest, - TestScript, - ValueSet, - VisionPrescription, + require('./valueset.schema.js'), + require('./parameters.schema.js'), + require('./resource.schema.js'), + require('./domainresource.schema.js'), + require('./account.schema.js'), + require('./allergyintolerance.schema.js'), + require('./appointment.schema.js'), + require('./appointmentresponse.schema.js'), + require('./auditevent.schema.js'), + require('./basic.schema.js'), + require('./binary.schema.js'), + require('./bodysite.schema.js'), + require('./bundle.schema.js'), + require('./careplan.schema.js'), + require('./claim.schema.js'), + require('./claimresponse.schema.js'), + require('./clinicalimpression.schema.js'), + require('./communication.schema.js'), + require('./communicationrequest.schema.js'), + require('./composition.schema.js'), + require('./conceptmap.schema.js'), + require('./condition.schema.js'), + require('./conformance.schema.js'), + require('./contract.schema.js'), + require('./coverage.schema.js'), + require('./dataelement.schema.js'), + require('./detectedissue.schema.js'), + require('./device.schema.js'), + require('./devicecomponent.schema.js'), + require('./devicemetric.schema.js'), + require('./deviceuserequest.schema.js'), + require('./deviceusestatement.schema.js'), + require('./diagnosticorder.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentmanifest.schema.js'), + require('./documentreference.schema.js'), + require('./eligibilityrequest.schema.js'), + require('./eligibilityresponse.schema.js'), + require('./encounter.schema.js'), + require('./enrollmentrequest.schema.js'), + require('./enrollmentresponse.schema.js'), + require('./episodeofcare.schema.js'), + require('./explanationofbenefit.schema.js'), + require('./familymemberhistory.schema.js'), + require('./flag.schema.js'), + require('./goal.schema.js'), + require('./group.schema.js'), + require('./healthcareservice.schema.js'), + require('./imagingobjectselection.schema.js'), + require('./imagingstudy.schema.js'), + require('./immunization.schema.js'), + require('./immunizationrecommendation.schema.js'), + require('./implementationguide.schema.js'), + require('./list.schema.js'), + require('./location.schema.js'), + require('./media.schema.js'), + require('./medication.schema.js'), + require('./medicationadministration.schema.js'), + require('./medicationdispense.schema.js'), + require('./medicationorder.schema.js'), + require('./medicationstatement.schema.js'), + require('./messageheader.schema.js'), + require('./namingsystem.schema.js'), + require('./nutritionorder.schema.js'), + require('./observation.schema.js'), + require('./operationdefinition.schema.js'), + require('./operationoutcome.schema.js'), + require('./order.schema.js'), + require('./orderresponse.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./paymentnotice.schema.js'), + require('./paymentreconciliation.schema.js'), + require('./person.schema.js'), + require('./practitioner.schema.js'), + require('./procedure.schema.js'), + require('./procedurerequest.schema.js'), + require('./processrequest.schema.js'), + require('./processresponse.schema.js'), + require('./provenance.schema.js'), + require('./questionnaire.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./referralrequest.schema.js'), + require('./relatedperson.schema.js'), + require('./riskassessment.schema.js'), + require('./schedule.schema.js'), + require('./searchparameter.schema.js'), + require('./slot.schema.js'), + require('./specimen.schema.js'), + require('./structuredefinition.schema.js'), + require('./subscription.schema.js'), + require('./substance.schema.js'), + require('./supplydelivery.schema.js'), + require('./supplyrequest.schema.js'), + require('./testscript.schema.js'), + require('./visionprescription.schema.js'), ], resolveType(value) { - if (value && value.resourceType === 'Account') { - return Account; + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + if (data && data.resourceType === 'Parameters') { + return require('./parameters.schema.js'); + } + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + if (data && data.resourceType === 'DomainResource') { + return require('./domainresource.schema.js'); + } + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); } - if (value && value.resourceType === 'AllergyIntolerance') { - return AllergyIntolerance; + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); } - if (value && value.resourceType === 'Appointment') { - return Appointment; + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); } - if (value && value.resourceType === 'AppointmentResponse') { - return AppointmentResponse; + if (data && data.resourceType === 'AppointmentResponse') { + return require('./appointmentresponse.schema.js'); } - if (value && value.resourceType === 'AuditEvent') { - return AuditEvent; + if (data && data.resourceType === 'AuditEvent') { + return require('./auditevent.schema.js'); } - if (value && value.resourceType === 'Basic') { - return Basic; + if (data && data.resourceType === 'Basic') { + return require('./basic.schema.js'); } - if (value && value.resourceType === 'Binary') { - return Binary; + if (data && data.resourceType === 'Binary') { + return require('./binary.schema.js'); } - if (value && value.resourceType === 'BodySite') { - return BodySite; + if (data && data.resourceType === 'BodySite') { + return require('./bodysite.schema.js'); } - if (value && value.resourceType === 'Bundle') { - return Bundle; + if (data && data.resourceType === 'Bundle') { + return require('./bundle.schema.js'); } - if (value && value.resourceType === 'CarePlan') { - return CarePlan; + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); } - if (value && value.resourceType === 'Claim') { - return Claim; + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); } - if (value && value.resourceType === 'ClaimResponse') { - return ClaimResponse; + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); } - if (value && value.resourceType === 'ClinicalImpression') { - return ClinicalImpression; + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); } - if (value && value.resourceType === 'Communication') { - return Communication; + if (data && data.resourceType === 'Communication') { + return require('./communication.schema.js'); } - if (value && value.resourceType === 'CommunicationRequest') { - return CommunicationRequest; + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); } - if (value && value.resourceType === 'Composition') { - return Composition; + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); } - if (value && value.resourceType === 'ConceptMap') { - return ConceptMap; + if (data && data.resourceType === 'ConceptMap') { + return require('./conceptmap.schema.js'); } - if (value && value.resourceType === 'Condition') { - return Condition; + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); } - if (value && value.resourceType === 'Conformance') { - return Conformance; + if (data && data.resourceType === 'Conformance') { + return require('./conformance.schema.js'); } - if (value && value.resourceType === 'Contract') { - return Contract; + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); } - if (value && value.resourceType === 'Coverage') { - return Coverage; + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); } - if (value && value.resourceType === 'DataElement') { - return DataElement; + if (data && data.resourceType === 'DataElement') { + return require('./dataelement.schema.js'); } - if (value && value.resourceType === 'DetectedIssue') { - return DetectedIssue; + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); } - if (value && value.resourceType === 'Device') { - return Device; + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); } - if (value && value.resourceType === 'DeviceComponent') { - return DeviceComponent; + if (data && data.resourceType === 'DeviceComponent') { + return require('./devicecomponent.schema.js'); } - if (value && value.resourceType === 'DeviceMetric') { - return DeviceMetric; + if (data && data.resourceType === 'DeviceMetric') { + return require('./devicemetric.schema.js'); } - if (value && value.resourceType === 'DeviceUseRequest') { - return DeviceUseRequest; + if (data && data.resourceType === 'DeviceUseRequest') { + return require('./deviceuserequest.schema.js'); } - if (value && value.resourceType === 'DeviceUseStatement') { - return DeviceUseStatement; + if (data && data.resourceType === 'DeviceUseStatement') { + return require('./deviceusestatement.schema.js'); } - if (value && value.resourceType === 'DiagnosticOrder') { - return DiagnosticOrder; + if (data && data.resourceType === 'DiagnosticOrder') { + return require('./diagnosticorder.schema.js'); } - if (value && value.resourceType === 'DiagnosticReport') { - return DiagnosticReport; + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); } - if (value && value.resourceType === 'DocumentManifest') { - return DocumentManifest; + if (data && data.resourceType === 'DocumentManifest') { + return require('./documentmanifest.schema.js'); } - if (value && value.resourceType === 'DocumentReference') { - return DocumentReference; + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); } - if (value && value.resourceType === 'EligibilityRequest') { - return EligibilityRequest; + if (data && data.resourceType === 'EligibilityRequest') { + return require('./eligibilityrequest.schema.js'); } - if (value && value.resourceType === 'EligibilityResponse') { - return EligibilityResponse; + if (data && data.resourceType === 'EligibilityResponse') { + return require('./eligibilityresponse.schema.js'); } - if (value && value.resourceType === 'Encounter') { - return Encounter; + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); } - if (value && value.resourceType === 'EnrollmentRequest') { - return EnrollmentRequest; + if (data && data.resourceType === 'EnrollmentRequest') { + return require('./enrollmentrequest.schema.js'); } - if (value && value.resourceType === 'EnrollmentResponse') { - return EnrollmentResponse; + if (data && data.resourceType === 'EnrollmentResponse') { + return require('./enrollmentresponse.schema.js'); } - if (value && value.resourceType === 'EpisodeOfCare') { - return EpisodeOfCare; + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); } - if (value && value.resourceType === 'ExplanationOfBenefit') { - return ExplanationOfBenefit; + if (data && data.resourceType === 'ExplanationOfBenefit') { + return require('./explanationofbenefit.schema.js'); } - if (value && value.resourceType === 'FamilyMemberHistory') { - return FamilyMemberHistory; + if (data && data.resourceType === 'FamilyMemberHistory') { + return require('./familymemberhistory.schema.js'); } - if (value && value.resourceType === 'Flag') { - return Flag; + if (data && data.resourceType === 'Flag') { + return require('./flag.schema.js'); } - if (value && value.resourceType === 'Goal') { - return Goal; + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); } - if (value && value.resourceType === 'Group') { - return Group; + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); } - if (value && value.resourceType === 'HealthcareService') { - return HealthcareService; + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); } - if (value && value.resourceType === 'ImagingObjectSelection') { - return ImagingObjectSelection; + if (data && data.resourceType === 'ImagingObjectSelection') { + return require('./imagingobjectselection.schema.js'); } - if (value && value.resourceType === 'ImagingStudy') { - return ImagingStudy; + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); } - if (value && value.resourceType === 'Immunization') { - return Immunization; + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); } - if (value && value.resourceType === 'ImmunizationRecommendation') { - return ImmunizationRecommendation; + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); } - if (value && value.resourceType === 'ImplementationGuide') { - return ImplementationGuide; + if (data && data.resourceType === 'ImplementationGuide') { + return require('./implementationguide.schema.js'); } - if (value && value.resourceType === 'List') { - return List; + if (data && data.resourceType === 'List') { + return require('./list.schema.js'); } - if (value && value.resourceType === 'Location') { - return Location; + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); } - if (value && value.resourceType === 'Media') { - return Media; + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); } - if (value && value.resourceType === 'Medication') { - return Medication; + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); } - if (value && value.resourceType === 'MedicationAdministration') { - return MedicationAdministration; + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); } - if (value && value.resourceType === 'MedicationDispense') { - return MedicationDispense; + if (data && data.resourceType === 'MedicationDispense') { + return require('./medicationdispense.schema.js'); } - if (value && value.resourceType === 'MedicationOrder') { - return MedicationOrder; + if (data && data.resourceType === 'MedicationOrder') { + return require('./medicationorder.schema.js'); } - if (value && value.resourceType === 'MedicationStatement') { - return MedicationStatement; + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); } - if (value && value.resourceType === 'MessageHeader') { - return MessageHeader; + if (data && data.resourceType === 'MessageHeader') { + return require('./messageheader.schema.js'); } - if (value && value.resourceType === 'NamingSystem') { - return NamingSystem; + if (data && data.resourceType === 'NamingSystem') { + return require('./namingsystem.schema.js'); } - if (value && value.resourceType === 'NutritionOrder') { - return NutritionOrder; + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); } - if (value && value.resourceType === 'Observation') { - return Observation; + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); } - if (value && value.resourceType === 'OperationDefinition') { - return OperationDefinition; + if (data && data.resourceType === 'OperationDefinition') { + return require('./operationdefinition.schema.js'); } - if (value && value.resourceType === 'Order') { - return Order; + if (data && data.resourceType === 'OperationOutcome') { + return require('./operationoutcome.schema.js'); } - if (value && value.resourceType === 'OrderResponse') { - return OrderResponse; + if (data && data.resourceType === 'Order') { + return require('./order.schema.js'); } - if (value && value.resourceType === 'Organization') { - return Organization; + if (data && data.resourceType === 'OrderResponse') { + return require('./orderresponse.schema.js'); } - if (value && value.resourceType === 'Patient') { - return Patient; + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); } - if (value && value.resourceType === 'PaymentNotice') { - return PaymentNotice; + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); } - if (value && value.resourceType === 'PaymentReconciliation') { - return PaymentReconciliation; + if (data && data.resourceType === 'PaymentNotice') { + return require('./paymentnotice.schema.js'); } - if (value && value.resourceType === 'Person') { - return Person; + if (data && data.resourceType === 'PaymentReconciliation') { + return require('./paymentreconciliation.schema.js'); } - if (value && value.resourceType === 'Practitioner') { - return Practitioner; + if (data && data.resourceType === 'Person') { + return require('./person.schema.js'); } - if (value && value.resourceType === 'Procedure') { - return Procedure; + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); } - if (value && value.resourceType === 'ProcedureRequest') { - return ProcedureRequest; + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); } - if (value && value.resourceType === 'ProcessRequest') { - return ProcessRequest; + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); } - if (value && value.resourceType === 'ProcessResponse') { - return ProcessResponse; + if (data && data.resourceType === 'ProcessRequest') { + return require('./processrequest.schema.js'); } - if (value && value.resourceType === 'Provenance') { - return Provenance; + if (data && data.resourceType === 'ProcessResponse') { + return require('./processresponse.schema.js'); } - if (value && value.resourceType === 'Questionnaire') { - return Questionnaire; + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); } - if (value && value.resourceType === 'QuestionnaireResponse') { - return QuestionnaireResponse; + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); } - if (value && value.resourceType === 'ReferralRequest') { - return ReferralRequest; + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); } - if (value && value.resourceType === 'RelatedPerson') { - return RelatedPerson; + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); } - if (value && value.resourceType === 'RiskAssessment') { - return RiskAssessment; + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); } - if (value && value.resourceType === 'Schedule') { - return Schedule; + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); } - if (value && value.resourceType === 'SearchParameter') { - return SearchParameter; + if (data && data.resourceType === 'Schedule') { + return require('./schedule.schema.js'); } - if (value && value.resourceType === 'Slot') { - return Slot; + if (data && data.resourceType === 'SearchParameter') { + return require('./searchparameter.schema.js'); } - if (value && value.resourceType === 'Specimen') { - return Specimen; + if (data && data.resourceType === 'Slot') { + return require('./slot.schema.js'); } - if (value && value.resourceType === 'StructureDefinition') { - return StructureDefinition; + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); } - if (value && value.resourceType === 'Subscription') { - return Subscription; + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); } - if (value && value.resourceType === 'Substance') { - return Substance; + if (data && data.resourceType === 'Subscription') { + return require('./subscription.schema.js'); } - if (value && value.resourceType === 'SupplyDelivery') { - return SupplyDelivery; + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); } - if (value && value.resourceType === 'SupplyRequest') { - return SupplyRequest; + if (data && data.resourceType === 'SupplyDelivery') { + return require('./supplydelivery.schema.js'); } - if (value && value.resourceType === 'TestScript') { - return TestScript; + if (data && data.resourceType === 'SupplyRequest') { + return require('./supplyrequest.schema.js'); } - if (value && value.resourceType === 'ValueSet') { - return ValueSet; + if (data && data.resourceType === 'TestScript') { + return require('./testscript.schema.js'); } - if (value && value.resourceType === 'VisionPrescription') { - return VisionPrescription; + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); } }, }); diff --git a/src/resources/1_0_2/schemas/riskassessment.schema.js b/src/resources/1_0_2/schemas/riskassessment.schema.js index 3039d05c..05031def 100644 --- a/src/resources/1_0_2/schemas/riskassessment.schema.js +++ b/src/resources/1_0_2/schemas/riskassessment.schema.js @@ -1,20 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let RiskAssessmentResourceType = new GraphQLEnumType({ - name: 'RiskAssessmentResourceType', - values: { - RiskAssessment: { value: 'RiskAssessment' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,68 +17,187 @@ let RiskAssessmentResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'RiskAssessment', - description: 'Base StructureDefinition for RiskAssessment Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(RiskAssessmentResourceType), - description: 'Type of this resource.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for RiskAssessment Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RiskAssessment_Enum_schema', + values: { RiskAssessment: { value: 'RiskAssessment' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentsubject_subject_Union', description: 'The patient or group the risk assessment applies to.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - condition: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: 'The patient or group the risk assessment applies to.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + condition: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentcondition_condition_Union', description: 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentencounter_encounter_Union', description: 'The encounter where the assessment was performed.', - }, - performer: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'The encounter where the assessment was performed.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentperformer_performer_Union', description: 'The provider or software application that performed the assessment.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Business identifier assigned to the risk assessment.', - }, - method: { - type: require('./codeableconcept.schema'), - description: - 'The algorithm, process or mechanism used to evaluate the risk.', - }, - basis: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', - }, - prediction: { - type: new GraphQLList(require('./riskassessmentprediction.schema')), - description: 'Describes the expected outcome for the subject.', - }, - mitigation: { - type: GraphQLString, - description: - 'A description of the steps that might be taken to reduce the identified risk(s).', - }, - _mitigation: { - type: require('./element.schema'), - description: - 'A description of the steps that might be taken to reduce the identified risk(s).', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The provider or software application that performed the assessment.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Business identifier assigned to the risk assessment.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'The algorithm, process or mechanism used to evaluate the risk.', + }, + basis: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RiskAssessmentbasis_basis_Union', + description: + 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', + }, + prediction: { + type: new GraphQLList(require('./riskassessmentprediction.schema.js')), + description: 'Describes the expected outcome for the subject.', + }, + _mitigation: { + type: require('./element.schema.js'), + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + mitigation: { + type: GraphQLString, + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/riskassessmentprediction.schema.js b/src/resources/1_0_2/schemas/riskassessmentprediction.schema.js index ac26e9fa..1e8e8bc2 100644 --- a/src/resources/1_0_2/schemas/riskassessmentprediction.schema.js +++ b/src/resources/1_0_2/schemas/riskassessmentprediction.schema.js @@ -1,74 +1,93 @@ const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary RiskAssessment.prediction Schema + * @summary RiskAssessmentprediction Schema */ module.exports = new GraphQLObjectType({ - name: 'RiskAssessmentPrediction', - description: 'Describes the expected outcome for the subject.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - outcome: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/risk-probability - probabilityDecimal: { - type: GraphQLFloat, - description: 'How likely is the outcome (in the specified timeframe).', - }, - _probabilityDecimal: { - type: require('./element.schema'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/risk-probability - probabilityRange: { - type: require('./range.schema'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/risk-probability - probabilityCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - relativeRisk: { - type: GraphQLFloat, - description: - 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', - }, - _relativeRisk: { - type: require('./element.schema'), - description: - 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', - }, - whenPeriod: { - type: require('./period.schema'), - description: - 'Indicates the period of time or age range of the subject to which the specified probability applies.', - }, - whenRange: { - type: require('./range.schema'), - description: - 'Indicates the period of time or age range of the subject to which the specified probability applies.', - }, - rationale: { - type: GraphQLString, - description: - 'Additional information explaining the basis for the prediction.', - }, - _rationale: { - type: require('./element.schema'), - description: - 'Additional information explaining the basis for the prediction.', - }, - }), + name: 'RiskAssessmentprediction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + outcome: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', + }, + _probabilityDecimal: { + type: require('./element.schema.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/risk-probability + probabilityDecimal: { + type: GraphQLFloat, + description: 'How likely is the outcome (in the specified timeframe).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/risk-probability + probabilityRange: { + type: require('./range.schema.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/risk-probability + probabilityCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + _relativeRisk: { + type: require('./element.schema.js'), + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + relativeRisk: { + type: GraphQLFloat, + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + whenPeriod: { + type: require('./period.schema.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + whenRange: { + type: require('./range.schema.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + _rationale: { + type: require('./element.schema.js'), + description: + 'Additional information explaining the basis for the prediction.', + }, + rationale: { + type: GraphQLString, + description: + 'Additional information explaining the basis for the prediction.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/sampleddata.schema.js b/src/resources/1_0_2/schemas/sampleddata.schema.js index 89b4309e..21e6f2cf 100644 --- a/src/resources/1_0_2/schemas/sampleddata.schema.js +++ b/src/resources/1_0_2/schemas/sampleddata.schema.js @@ -1,12 +1,12 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -14,73 +14,87 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'SampledData', - description: 'Base StructureDefinition for SampledData Type.', - fields: () => - extendSchema(require('./element.schema'), { - origin: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: - 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', - }, - period: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'The length of time between sampling times, measured in milliseconds.', - }, - _period: { - type: require('./element.schema'), - description: - 'The length of time between sampling times, measured in milliseconds.', - }, - factor: { - type: GraphQLFloat, - description: - 'A correction factor that is applied to the sampled data points before they are added to the origin.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A correction factor that is applied to the sampled data points before they are added to the origin.', - }, - lowerLimit: { - type: GraphQLFloat, - description: - "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", - }, - _lowerLimit: { - type: require('./element.schema'), - description: - "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", - }, - upperLimit: { - type: GraphQLFloat, - description: - "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", - }, - _upperLimit: { - type: require('./element.schema'), - description: - "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", - }, - dimensions: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', - }, - _dimensions: { - type: require('./element.schema'), - description: - 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', - }, - data: { - type: new GraphQLNonNull(GraphQLString), - description: - "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", - }, - _data: { - type: require('./element.schema'), - description: - "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", - }, - }), + description: 'Base StructureDefinition for SampledData Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + origin: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', + }, + _period: { + type: require('./element.schema.js'), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + period: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + factor: { + type: GraphQLFloat, + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + _lowerLimit: { + type: require('./element.schema.js'), + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + lowerLimit: { + type: GraphQLFloat, + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + _upperLimit: { + type: require('./element.schema.js'), + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + upperLimit: { + type: GraphQLFloat, + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + _dimensions: { + type: require('./element.schema.js'), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + dimensions: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + _data: { + type: require('./element.schema.js'), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + data: { + type: new GraphQLNonNull(GraphQLString), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/schedule.schema.js b/src/resources/1_0_2/schemas/schedule.schema.js index a1d939f2..e49d575d 100644 --- a/src/resources/1_0_2/schemas/schedule.schema.js +++ b/src/resources/1_0_2/schemas/schedule.schema.js @@ -1,19 +1,14 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ScheduleResourceType = new GraphQLEnumType({ - name: 'ScheduleResourceType', - values: { - Schedule: { value: 'Schedule' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,42 +16,133 @@ let ScheduleResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Schedule', - description: 'Base StructureDefinition for Schedule Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ScheduleResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'External Ids for this item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The schedule type can be used for the categorization of healthcare services or other appointment types.', - }, - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.', - }, - planningHorizon: { - type: require('./period.schema'), - description: - "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", - }, - comment: { - type: GraphQLString, - description: - 'Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.', - }, - }), + description: 'Base StructureDefinition for Schedule Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Schedule_Enum_schema', + values: { Schedule: { value: 'Schedule' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'External Ids for this item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The schedule type can be used for the categorization of healthcare services or other appointment types.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Scheduleactor_actor_Union', + description: + 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.', + }, + planningHorizon: { + type: require('./period.schema.js'), + description: + "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/searchparameter.schema.js b/src/resources/1_0_2/schemas/searchparameter.schema.js index 5a9d5188..ecf0a9dc 100644 --- a/src/resources/1_0_2/schemas/searchparameter.schema.js +++ b/src/resources/1_0_2/schemas/searchparameter.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SearchParameterResourceType = new GraphQLEnumType({ - name: 'SearchParameterResourceType', - values: { - SearchParameter: { value: 'SearchParameter' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,156 +18,213 @@ let SearchParameterResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'SearchParameter', - description: 'Base StructureDefinition for SearchParameter Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SearchParameterResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the search parameter.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name identifying the search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: CodeScalar, - description: 'The status of this search parameter definition.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of this search parameter definition.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the search parameter.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the search parameter.', - }, - contact: { - type: new GraphQLList(require('./searchparametercontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', - }, - requirements: { - type: GraphQLString, - description: - 'The Scope and Usage that this search parameter was created to meet.', - }, - _requirements: { - type: require('./element.schema'), - description: - 'The Scope and Usage that this search parameter was created to meet.', - }, - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', - }, - _code: { - type: require('./element.schema'), - description: - 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - base: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The base resource type that this search parameter refers to.', - }, - _base: { - type: require('./element.schema'), - description: - 'The base resource type that this search parameter refers to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - _type: { - type: require('./element.schema'), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - description: { - type: new GraphQLNonNull(GraphQLString), - description: 'A description of the search parameters and how it used.', - }, - _description: { - type: require('./element.schema'), - description: 'A description of the search parameters and how it used.', - }, - xpath: { - type: GraphQLString, - description: - 'An XPath expression that returns a set of elements for the search parameter.', - }, - _xpath: { - type: require('./element.schema'), - description: - 'An XPath expression that returns a set of elements for the search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-xpath-usage - xpathUsage: { - type: CodeScalar, - description: - 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', - }, - _xpathUsage: { - type: require('./element.schema'), - description: - 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - target: { - type: new GraphQLList(CodeScalar), - description: 'Types of resource (if a resource is referenced).', - }, - _target: { - type: require('./element.schema'), - description: 'Types of resource (if a resource is referenced).', - }, - }), + description: 'Base StructureDefinition for SearchParameter Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SearchParameter_Enum_schema', + values: { SearchParameter: { value: 'SearchParameter' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URL that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name identifying the search parameter.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the search parameter.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this search parameter definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: CodeScalar, + description: 'The status of this search parameter definition.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the search parameter.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the search parameter.', + }, + contact: { + type: new GraphQLList(require('./searchparametercontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'The Scope and Usage that this search parameter was created to meet.', + }, + requirements: { + type: GraphQLString, + description: + 'The Scope and Usage that this search parameter was created to meet.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + _base: { + type: require('./element.schema.js'), + description: + 'The base resource type that this search parameter refers to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + base: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The base resource type that this search parameter refers to.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of the search parameters and how it used.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of the search parameters and how it used.', + }, + _xpath: { + type: require('./element.schema.js'), + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + _xpathUsage: { + type: require('./element.schema.js'), + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-xpath-usage + xpathUsage: { + type: CodeScalar, + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + _target: { + type: require('./element.schema.js'), + description: 'Types of resource (if a resource is referenced).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + target: { + type: new GraphQLList(CodeScalar), + description: 'Types of resource (if a resource is referenced).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/searchparametercontact.schema.js b/src/resources/1_0_2/schemas/searchparametercontact.schema.js index 0b735322..be3118c8 100644 --- a/src/resources/1_0_2/schemas/searchparametercontact.schema.js +++ b/src/resources/1_0_2/schemas/searchparametercontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary SearchParameter.contact Schema + * @summary SearchParametercontact Schema */ module.exports = new GraphQLObjectType({ - name: 'SearchParameterContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the search parameter.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the search parameter.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'SearchParametercontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the search parameter.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the search parameter.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/signature.schema.js b/src/resources/1_0_2/schemas/signature.schema.js index 9df41b8e..2d7ce377 100644 --- a/src/resources/1_0_2/schemas/signature.schema.js +++ b/src/resources/1_0_2/schemas/signature.schema.js @@ -1,10 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports @@ -12,55 +16,99 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Signature', - description: 'Base StructureDefinition for Signature Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/signature-type - type: { - type: new GraphQLList(new GraphQLNonNull(require('./coding.schema'))), - description: - 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', - }, - when: { - type: new GraphQLNonNull(InstantScalar), - description: 'When the digital signature was signed.', - }, - _when: { - type: require('./element.schema'), - description: 'When the digital signature was signed.', - }, - whoUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', - }, - _whoUri: { - type: require('./element.schema'), - description: - 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', - }, - whoReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', - }, - contentType: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.', - }, - _contentType: { - type: require('./element.schema'), - description: - 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.', - }, - blob: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The base64 encoding of the Signature content.', - }, - _blob: { - type: require('./element.schema'), - description: 'The base64 encoding of the Signature content.', - }, - }), + description: 'Base StructureDefinition for Signature Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/signature-type + type: { + type: new GraphQLList(new GraphQLNonNull(require('./coding.schema.js'))), + description: + 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', + }, + _when: { + type: require('./element.schema.js'), + description: 'When the digital signature was signed.', + }, + when: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the digital signature was signed.', + }, + _whoUri: { + type: require('./element.schema.js'), + description: + 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', + }, + whoUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', + }, + whoReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'SignaturewhoReference_whoReference_Union', + description: + 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).', + }, + _contentType: { + type: require('./element.schema.js'), + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.', + }, + contentType: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.', + }, + _blob: { + type: require('./element.schema.js'), + description: 'The base64 encoding of the Signature content.', + }, + blob: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The base64 encoding of the Signature content.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/simplequantity.schema.js b/src/resources/1_0_2/schemas/simplequantity.schema.js index 03143a75..1b9b0e5f 100644 --- a/src/resources/1_0_2/schemas/simplequantity.schema.js +++ b/src/resources/1_0_2/schemas/simplequantity.schema.js @@ -1,13 +1,11 @@ const { GraphQLObjectType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary SimpleQuantity Schema */ module.exports = new GraphQLObjectType({ name: 'SimpleQuantity', - description: 'A fixed quantity (no comparator).', - fields: () => extendSchema(require('./quantity.schema')), + description: 'A fixed quantity (no comparator)', + fields: () => ({}), }); diff --git a/src/resources/1_0_2/schemas/slot.schema.js b/src/resources/1_0_2/schemas/slot.schema.js index 5859362b..452ca126 100644 --- a/src/resources/1_0_2/schemas/slot.schema.js +++ b/src/resources/1_0_2/schemas/slot.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SlotResourceType = new GraphQLEnumType({ - name: 'SlotResourceType', - values: { - Slot: { value: 'Slot' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,72 +18,141 @@ let SlotResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Slot', - description: 'Base StructureDefinition for Slot Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SlotResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'External Ids for this item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - type: { - type: require('./codeableconcept.schema'), - description: - 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', - }, - schedule: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The schedule resource that this slot defines an interval of status information.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/slotstatus - freeBusyType: { - type: new GraphQLNonNull(CodeScalar), - description: 'busy | free | busy-unavailable | busy-tentative.', - }, - _freeBusyType: { - type: require('./element.schema'), - description: 'busy | free | busy-unavailable | busy-tentative.', - }, - start: { - type: new GraphQLNonNull(InstantScalar), - description: 'Date/Time that the slot is to begin.', - }, - _start: { - type: require('./element.schema'), - description: 'Date/Time that the slot is to begin.', - }, - end: { - type: new GraphQLNonNull(InstantScalar), - description: 'Date/Time that the slot is to conclude.', - }, - _end: { - type: require('./element.schema'), - description: 'Date/Time that the slot is to conclude.', - }, - overbooked: { - type: GraphQLBoolean, - description: - 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', - }, - _overbooked: { - type: require('./element.schema'), - description: - 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', - }, - comment: { - type: GraphQLString, - description: - 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', - }, - }), + description: 'Base StructureDefinition for Slot Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Slot_Enum_schema', + values: { Slot: { value: 'Slot' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'External Ids for this item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', + }, + schedule: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Slotschedule_schedule_Union', + description: + 'The schedule resource that this slot defines an interval of status information.', + types: () => [require('./schedule.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Schedule') { + return require('./schedule.schema.js'); + } + }, + }), + ), + description: + 'The schedule resource that this slot defines an interval of status information.', + }, + _freeBusyType: { + type: require('./element.schema.js'), + description: 'busy | free | busy-unavailable | busy-tentative.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/slotstatus + freeBusyType: { + type: new GraphQLNonNull(CodeScalar), + description: 'busy | free | busy-unavailable | busy-tentative.', + }, + _start: { + type: require('./element.schema.js'), + description: 'Date/Time that the slot is to begin.', + }, + start: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to begin.', + }, + _end: { + type: require('./element.schema.js'), + description: 'Date/Time that the slot is to conclude.', + }, + end: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to conclude.', + }, + _overbooked: { + type: require('./element.schema.js'), + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + overbooked: { + type: GraphQLBoolean, + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/specimen.schema.js b/src/resources/1_0_2/schemas/specimen.schema.js index f5af397a..e6d9109b 100644 --- a/src/resources/1_0_2/schemas/specimen.schema.js +++ b/src/resources/1_0_2/schemas/specimen.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SpecimenResourceType = new GraphQLEnumType({ - name: 'SpecimenResourceType', - values: { - Specimen: { value: 'Specimen' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,69 +16,162 @@ let SpecimenResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Specimen', - description: 'Base StructureDefinition for Specimen Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SpecimenResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Id for specimen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-status - status: { - type: CodeScalar, - description: 'The availability of the specimen.', - }, - _status: { - type: require('./element.schema'), - description: 'The availability of the specimen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0487 - type: { - type: require('./codeableconcept.schema'), - description: 'The kind of material that forms the specimen.', - }, - parent: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', - }, - accessionIdentifier: { - type: require('./identifier.schema'), - description: - 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', - }, - receivedTime: { - type: DateTimeScalar, - description: - 'Time when specimen was received for processing or testing.', - }, - _receivedTime: { - type: require('./element.schema'), - description: - 'Time when specimen was received for processing or testing.', - }, - collection: { - type: require('./specimencollection.schema'), - description: 'Details concerning the specimen collection.', - }, - treatment: { - type: new GraphQLList(require('./specimentreatment.schema')), - description: - 'Details concerning treatment and processing steps for the specimen.', - }, - container: { - type: new GraphQLList(require('./specimencontainer.schema')), - description: - 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', - }, - }), + description: 'Base StructureDefinition for Specimen Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Specimen_Enum_schema', + values: { Specimen: { value: 'Specimen' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Id for specimen.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The availability of the specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-status + status: { + type: CodeScalar, + description: 'The availability of the specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0487 + type: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of material that forms the specimen.', + }, + parent: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Specimenparent_parent_Union', + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Specimensubject_subject_Union', + description: + 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', + }, + accessionIdentifier: { + type: require('./identifier.schema.js'), + description: + 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', + }, + _receivedTime: { + type: require('./element.schema.js'), + description: 'Time when specimen was received for processing or testing.', + }, + receivedTime: { + type: DateTimeScalar, + description: 'Time when specimen was received for processing or testing.', + }, + collection: { + type: require('./specimencollection.schema.js'), + description: 'Details concerning the specimen collection.', + }, + treatment: { + type: new GraphQLList(require('./specimentreatment.schema.js')), + description: + 'Details concerning treatment and processing steps for the specimen.', + }, + container: { + type: new GraphQLList(require('./specimencontainer.schema.js')), + description: + 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/specimencollection.schema.js b/src/resources/1_0_2/schemas/specimencollection.schema.js index f934f7c1..893bde47 100644 --- a/src/resources/1_0_2/schemas/specimencollection.schema.js +++ b/src/resources/1_0_2/schemas/specimencollection.schema.js @@ -1,62 +1,94 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Specimen.collection Schema + * @summary Specimencollection Schema */ module.exports = new GraphQLObjectType({ - name: 'SpecimenCollection', - description: 'Details concerning the specimen collection.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - collector: { - type: require('./reference.schema'), + name: 'Specimencollection', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + collector: { + type: new GraphQLUnionType({ + name: 'Specimencollectioncollector_collector_Union', description: 'Person who collected the specimen.', - }, - comment: { - type: new GraphQLList(GraphQLString), - description: - 'To communicate any details or issues encountered during the specimen collection procedure.', - }, - _comment: { - type: require('./element.schema'), - description: - 'To communicate any details or issues encountered during the specimen collection procedure.', - }, - collectedDateTime: { - type: DateTimeScalar, - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - _collectedDateTime: { - type: require('./element.schema'), - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - collectedPeriod: { - type: require('./period.schema'), - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-collection-method - method: { - type: require('./codeableconcept.schema'), - description: - 'A coded value specifying the technique that is used to perform the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.schema'), - description: - 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'Person who collected the specimen.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'To communicate any details or issues encountered during the specimen collection procedure.', + }, + comment: { + type: new GraphQLList(GraphQLString), + description: + 'To communicate any details or issues encountered during the specimen collection procedure.', + }, + _collectedDateTime: { + type: require('./element.schema.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedDateTime: { + type: DateTimeScalar, + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedPeriod: { + type: require('./period.schema.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-collection-method + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value specifying the technique that is used to perform the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/specimencontainer.schema.js b/src/resources/1_0_2/schemas/specimencontainer.schema.js index 2b5d0146..3628ebfc 100644 --- a/src/resources/1_0_2/schemas/specimencontainer.schema.js +++ b/src/resources/1_0_2/schemas/specimencontainer.schema.js @@ -1,57 +1,89 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Specimen.container Schema + * @summary Specimencontainer Schema */ module.exports = new GraphQLObjectType({ - name: 'SpecimenContainer', - description: - 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", - }, - description: { - type: GraphQLString, - description: 'Textual description of the container.', - }, - _description: { - type: require('./element.schema'), - description: 'Textual description of the container.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-container-type - type: { - type: require('./codeableconcept.schema'), - description: - 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', - }, - capacity: { - type: require('./quantity.schema'), - description: - 'The capacity (volume or other measure) the container may contain.', - }, - specimenQuantity: { - type: require('./quantity.schema'), - description: - 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 - additiveCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 - additiveReference: { - type: require('./reference.schema'), + name: 'Specimencontainer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.schema.js')), + description: + "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", + }, + _description: { + type: require('./element.schema.js'), + description: 'Textual description of the container.', + }, + description: { + type: GraphQLString, + description: 'Textual description of the container.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-container-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', + }, + capacity: { + type: require('./quantity.schema.js'), + description: + 'The capacity (volume or other measure) the container may contain.', + }, + specimenQuantity: { + type: require('./quantity.schema.js'), + description: + 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 + additiveCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 + additiveReference: { + type: new GraphQLUnionType({ + name: 'SpecimencontaineradditiveReference_additiveReference_Union', description: 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', - }, - }), + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/specimentreatment.schema.js b/src/resources/1_0_2/schemas/specimentreatment.schema.js index 3fbcc93f..ae1437b9 100644 --- a/src/resources/1_0_2/schemas/specimentreatment.schema.js +++ b/src/resources/1_0_2/schemas/specimentreatment.schema.js @@ -1,34 +1,67 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Specimen.treatment Schema + * @summary Specimentreatment Schema */ module.exports = new GraphQLObjectType({ - name: 'SpecimenTreatment', - description: - 'Details concerning treatment and processing steps for the specimen.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: GraphQLString, - description: 'Textual description of procedure.', - }, - _description: { - type: require('./element.schema'), - description: 'Textual description of procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-treatment-procedure - procedure: { - type: require('./codeableconcept.schema'), - description: - 'A coded value specifying the procedure used to process the specimen.', - }, - additive: { - type: new GraphQLList(require('./reference.schema')), - description: 'Material used in the processing step.', - }, - }), + name: 'Specimentreatment', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Textual description of procedure.', + }, + description: { + type: GraphQLString, + description: 'Textual description of procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-treatment-procedure + procedure: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value specifying the procedure used to process the specimen.', + }, + additive: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Specimentreatmentadditive_additive_Union', + description: 'Material used in the processing step.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'Material used in the processing step.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/structuredefinition.schema.js b/src/resources/1_0_2/schemas/structuredefinition.schema.js index 35812be6..d81cf9a0 100644 --- a/src/resources/1_0_2/schemas/structuredefinition.schema.js +++ b/src/resources/1_0_2/schemas/structuredefinition.schema.js @@ -1,24 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let StructureDefinitionResourceType = new GraphQLEnumType({ - name: 'StructureDefinitionResourceType', - values: { - StructureDefinition: { value: 'StructureDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,230 +18,287 @@ let StructureDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'StructureDefinition', - description: 'Base StructureDefinition for StructureDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(StructureDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - "Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the StructureDefinition.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name identifying the StructureDefinition.', - }, - display: { - type: GraphQLString, - description: - 'Defined so that applications can use this name when displaying the value of the extension to the user.', - }, - _display: { - type: require('./element.schema'), - description: - 'Defined so that applications can use this name when displaying the value of the extension to the user.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the StructureDefinition.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the StructureDefinition.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the structure definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the structure definition.', - }, - contact: { - type: new GraphQLList(require('./structuredefinitioncontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the StructureDefinition and its use.', - }, - _description: { - type: require('./element.schema'), - description: - 'A free text natural language description of the StructureDefinition and its use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.', - }, - requirements: { - type: GraphQLString, - description: - "Explains why this structure definition is needed and why it's been constrained as it has.", - }, - _requirements: { - type: require('./element.schema'), - description: - "Explains why this structure definition is needed and why it's been constrained as it has.", - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/profile-code - code: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A set of terms from external terminologies that may be used to assist with indexing and searching of templates.', - }, - fhirVersion: { - type: IdScalar, - description: - 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', - }, - _fhirVersion: { - type: require('./element.schema'), - description: - 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', - }, - mapping: { - type: new GraphQLList(require('./structuredefinitionmapping.schema')), - description: 'An external specification that the content is mapped to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/structure-definition-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Defines the kind of structure that this definition is describing.', - }, - _kind: { - type: require('./element.schema'), - description: - 'Defines the kind of structure that this definition is describing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - constrainedType: { - type: CodeScalar, - description: - 'The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.', - }, - _constrainedType: { - type: require('./element.schema'), - description: - 'The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.', - }, - abstract: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.', - }, - _abstract: { - type: require('./element.schema'), - description: - 'Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/extension-context - contextType: { - type: CodeScalar, - description: - 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', - }, - _contextType: { - type: require('./element.schema'), - description: - 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', - }, - context: { - type: new GraphQLList(GraphQLString), - description: - 'Identifies the types of resource or data type elements to which the extension can be applied.', - }, - _context: { - type: require('./element.schema'), - description: - 'Identifies the types of resource or data type elements to which the extension can be applied.', - }, - base: { - type: UriScalar, - description: - 'An absolute URI that is the base structure from which this set of constraints is derived.', - }, - _base: { - type: require('./element.schema'), - description: - 'An absolute URI that is the base structure from which this set of constraints is derived.', - }, - snapshot: { - type: require('./structuredefinitionsnapshot.schema'), - description: - 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', - }, - differential: { - type: require('./structuredefinitiondifferential.schema'), - description: - 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', - }, - }), + description: 'Base StructureDefinition for StructureDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureDefinition_Enum_schema', + values: { StructureDefinition: { value: 'StructureDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + "Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name identifying the StructureDefinition.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the StructureDefinition.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'Defined so that applications can use this name when displaying the value of the extension to the user.', + }, + display: { + type: GraphQLString, + description: + 'Defined so that applications can use this name when displaying the value of the extension to the user.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the StructureDefinition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the StructureDefinition.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the structure definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the structure definition.', + }, + contact: { + type: new GraphQLList(require('./structuredefinitioncontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A free text natural language description of the StructureDefinition and its use.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the StructureDefinition and its use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + "Explains why this structure definition is needed and why it's been constrained as it has.", + }, + requirements: { + type: GraphQLString, + description: + "Explains why this structure definition is needed and why it's been constrained as it has.", + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/profile-code + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A set of terms from external terminologies that may be used to assist with indexing and searching of templates.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', + }, + fhirVersion: { + type: IdScalar, + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.0.2 for this version.', + }, + mapping: { + type: new GraphQLList(require('./structuredefinitionmapping.schema.js')), + description: 'An external specification that the content is mapped to.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'Defines the kind of structure that this definition is describing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/structure-definition-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines the kind of structure that this definition is describing.', + }, + _constrainedType: { + type: require('./element.schema.js'), + description: + 'The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + constrainedType: { + type: CodeScalar, + description: + 'The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.', + }, + _abstract: { + type: require('./element.schema.js'), + description: + 'Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.', + }, + abstract: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.', + }, + _contextType: { + type: require('./element.schema.js'), + description: + 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/extension-context + contextType: { + type: CodeScalar, + description: + 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', + }, + _context: { + type: require('./element.schema.js'), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + context: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + _base: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is the base structure from which this set of constraints is derived.', + }, + base: { + type: UriScalar, + description: + 'An absolute URI that is the base structure from which this set of constraints is derived.', + }, + snapshot: { + type: require('./structuredefinitionsnapshot.schema.js'), + description: + 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', + }, + differential: { + type: require('./structuredefinitiondifferential.schema.js'), + description: + 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/structuredefinitioncontact.schema.js b/src/resources/1_0_2/schemas/structuredefinitioncontact.schema.js index c2b02ecd..785a6900 100644 --- a/src/resources/1_0_2/schemas/structuredefinitioncontact.schema.js +++ b/src/resources/1_0_2/schemas/structuredefinitioncontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureDefinition.contact Schema + * @summary StructureDefinitioncontact Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureDefinitionContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the structure definition.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the structure definition.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'StructureDefinitioncontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the structure definition.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the structure definition.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/structuredefinitiondifferential.schema.js b/src/resources/1_0_2/schemas/structuredefinitiondifferential.schema.js index b15988d7..4d238450 100644 --- a/src/resources/1_0_2/schemas/structuredefinitiondifferential.schema.js +++ b/src/resources/1_0_2/schemas/structuredefinitiondifferential.schema.js @@ -1,23 +1,39 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureDefinition.differential Schema + * @summary StructureDefinitiondifferential Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureDefinitionDifferential', - description: - 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.schema')), - ), - description: - 'Captures constraints on each element within the resource.', - }, - }), + name: 'StructureDefinitiondifferential', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.schema.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/structuredefinitionmapping.schema.js b/src/resources/1_0_2/schemas/structuredefinitionmapping.schema.js index c3ed7bed..de4a8a77 100644 --- a/src/resources/1_0_2/schemas/structuredefinitionmapping.schema.js +++ b/src/resources/1_0_2/schemas/structuredefinitionmapping.schema.js @@ -1,55 +1,77 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary StructureDefinition.mapping Schema + * @summary StructureDefinitionmapping Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureDefinitionMapping', - description: 'An external specification that the content is mapped to.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: - 'An Internal id that is used to identify this mapping set when specific mappings are made.', - }, - _identity: { - type: require('./element.schema'), - description: - 'An Internal id that is used to identify this mapping set when specific mappings are made.', - }, - uri: { - type: UriScalar, - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - _uri: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - name: { - type: GraphQLString, - description: 'A name for the specification that is being mapped to.', - }, - _name: { - type: require('./element.schema'), - description: 'A name for the specification that is being mapped to.', - }, - comments: { - type: GraphQLString, - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - _comments: { - type: require('./element.schema'), - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - }), + name: 'StructureDefinitionmapping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _identity: { + type: require('./element.schema.js'), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comments: { + type: require('./element.schema.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comments: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/structuredefinitionsnapshot.schema.js b/src/resources/1_0_2/schemas/structuredefinitionsnapshot.schema.js index 907fa136..ec9943d0 100644 --- a/src/resources/1_0_2/schemas/structuredefinitionsnapshot.schema.js +++ b/src/resources/1_0_2/schemas/structuredefinitionsnapshot.schema.js @@ -1,23 +1,39 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureDefinition.snapshot Schema + * @summary StructureDefinitionsnapshot Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureDefinitionSnapshot', - description: - 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.schema')), - ), - description: - 'Captures constraints on each element within the resource.', - }, - }), + name: 'StructureDefinitionsnapshot', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.schema.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/subscription.schema.js b/src/resources/1_0_2/schemas/subscription.schema.js index 84ef85c9..c2912881 100644 --- a/src/resources/1_0_2/schemas/subscription.schema.js +++ b/src/resources/1_0_2/schemas/subscription.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SubscriptionResourceType = new GraphQLEnumType({ - name: 'SubscriptionResourceType', - values: { - Subscription: { value: 'Subscription' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,75 +17,132 @@ let SubscriptionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Subscription', - description: 'Base StructureDefinition for Subscription Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SubscriptionResourceType), - description: 'Type of this resource.', - }, - criteria: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The rules that the server should use to determine when to generate notifications for this subscription.', - }, - _criteria: { - type: require('./element.schema'), - description: - 'The rules that the server should use to determine when to generate notifications for this subscription.', - }, - contact: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', - }, - reason: { - type: new GraphQLNonNull(GraphQLString), - description: 'A description of why this subscription is defined.', - }, - _reason: { - type: require('./element.schema'), - description: 'A description of why this subscription is defined.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the subscription, which marks the server state for managing the subscription.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of the subscription, which marks the server state for managing the subscription.', - }, - error: { - type: GraphQLString, - description: - 'A record of the last error that occurred when the server processed a notification.', - }, - _error: { - type: require('./element.schema'), - description: - 'A record of the last error that occurred when the server processed a notification.', - }, - channel: { - type: new GraphQLNonNull(require('./subscriptionchannel.schema')), - description: - 'Details where to send notifications when resources are received that meet the criteria.', - }, - end: { - type: InstantScalar, - description: 'The time for the server to turn the subscription off.', - }, - _end: { - type: require('./element.schema'), - description: 'The time for the server to turn the subscription off.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-tag - tag: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A tag to add to any resource that matches the criteria, after the subscription is processed.', - }, - }), + description: 'Base StructureDefinition for Subscription Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Subscription_Enum_schema', + values: { Subscription: { value: 'Subscription' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _criteria: { + type: require('./element.schema.js'), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + criteria: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + _reason: { + type: require('./element.schema.js'), + description: 'A description of why this subscription is defined.', + }, + reason: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of why this subscription is defined.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + _error: { + type: require('./element.schema.js'), + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + error: { + type: GraphQLString, + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + channel: { + type: new GraphQLNonNull(require('./subscriptionchannel.schema.js')), + description: + 'Details where to send notifications when resources are received that meet the criteria.', + }, + _end: { + type: require('./element.schema.js'), + description: 'The time for the server to turn the subscription off.', + }, + end: { + type: InstantScalar, + description: 'The time for the server to turn the subscription off.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-tag + tag: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A tag to add to any resource that matches the criteria, after the subscription is processed.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/subscriptionchannel.schema.js b/src/resources/1_0_2/schemas/subscriptionchannel.schema.js index 42dee9d1..bb7c8f75 100644 --- a/src/resources/1_0_2/schemas/subscriptionchannel.schema.js +++ b/src/resources/1_0_2/schemas/subscriptionchannel.schema.js @@ -1,57 +1,79 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Subscription.channel Schema + * @summary Subscriptionchannel Schema */ module.exports = new GraphQLObjectType({ - name: 'SubscriptionChannel', - description: - 'Details where to send notifications when resources are received that meet the criteria.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-channel-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of channel to send notifications on.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of channel to send notifications on.', - }, - endpoint: { - type: UriScalar, - description: - 'The uri that describes the actual end-point to send messages to.', - }, - _endpoint: { - type: require('./element.schema'), - description: - 'The uri that describes the actual end-point to send messages to.', - }, - payload: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.', - }, - _payload: { - type: require('./element.schema'), - description: - 'The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.', - }, - header: { - type: GraphQLString, - description: - 'Additional headers / information to send as part of the notification.', - }, - _header: { - type: require('./element.schema'), - description: - 'Additional headers / information to send as part of the notification.', - }, - }), + name: 'Subscriptionchannel', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of channel to send notifications on.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-channel-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of channel to send notifications on.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: + 'The uri that describes the actual end-point to send messages to.', + }, + endpoint: { + type: UriScalar, + description: + 'The uri that describes the actual end-point to send messages to.', + }, + _payload: { + type: require('./element.schema.js'), + description: + 'The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.', + }, + payload: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification.', + }, + _header: { + type: require('./element.schema.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: GraphQLString, + description: + 'Additional headers / information to send as part of the notification.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/substance.schema.js b/src/resources/1_0_2/schemas/substance.schema.js index 63e31b60..fe0eba6c 100644 --- a/src/resources/1_0_2/schemas/substance.schema.js +++ b/src/resources/1_0_2/schemas/substance.schema.js @@ -1,19 +1,14 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SubstanceResourceType = new GraphQLEnumType({ - name: 'SubstanceResourceType', - values: { - Substance: { value: 'Substance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,46 +16,103 @@ let SubstanceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Substance', - description: 'Base StructureDefinition for Substance Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SubstanceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Unique identifier for the substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'A code (or set of codes) that identify this substance.', - }, - description: { - type: GraphQLString, - description: - 'A description of the substance - its appearance, handling requirements, and other usage notes.', - }, - _description: { - type: require('./element.schema'), - description: - 'A description of the substance - its appearance, handling requirements, and other usage notes.', - }, - instance: { - type: new GraphQLList(require('./substanceinstance.schema')), - description: - 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', - }, - ingredient: { - type: new GraphQLList(require('./substanceingredient.schema')), - description: 'A substance can be composed of other substances.', - }, - }), + description: 'Base StructureDefinition for Substance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Substance_Enum_schema', + values: { Substance: { value: 'Substance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Unique identifier for the substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code (or set of codes) that identify this substance.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + description: { + type: GraphQLString, + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + instance: { + type: new GraphQLList(require('./substanceinstance.schema.js')), + description: + 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', + }, + ingredient: { + type: new GraphQLList(require('./substanceingredient.schema.js')), + description: 'A substance can be composed of other substances.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/substanceingredient.schema.js b/src/resources/1_0_2/schemas/substanceingredient.schema.js index 3cf4a1df..b8a2b2e8 100644 --- a/src/resources/1_0_2/schemas/substanceingredient.schema.js +++ b/src/resources/1_0_2/schemas/substanceingredient.schema.js @@ -1,24 +1,59 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary Substance.ingredient Schema + * @summary Substanceingredient Schema */ module.exports = new GraphQLObjectType({ - name: 'SubstanceIngredient', - description: 'A substance can be composed of other substances.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - quantity: { - type: require('./ratio.schema'), - description: - 'The amount of the ingredient in the substance - a concentration ratio.', - }, - substance: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Another substance that is a component of this substance.', - }, - }), + name: 'Substanceingredient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + quantity: { + type: require('./ratio.schema.js'), + description: + 'The amount of the ingredient in the substance - a concentration ratio.', + }, + substance: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Substanceingredientsubstance_substance_Union', + description: + 'Another substance that is a component of this substance.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'Another substance that is a component of this substance.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/substanceinstance.schema.js b/src/resources/1_0_2/schemas/substanceinstance.schema.js index 4daf0d40..97d46d54 100644 --- a/src/resources/1_0_2/schemas/substanceinstance.schema.js +++ b/src/resources/1_0_2/schemas/substanceinstance.schema.js @@ -1,36 +1,53 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Substance.instance Schema + * @summary Substanceinstance Schema */ module.exports = new GraphQLObjectType({ - name: 'SubstanceInstance', - description: - 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Identifier associated with the package/container (usually a label affixed directly).', - }, - expiry: { - type: DateTimeScalar, - description: - 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', - }, - _expiry: { - type: require('./element.schema'), - description: - 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The amount of the substance.', - }, - }), + name: 'Substanceinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'Identifier associated with the package/container (usually a label affixed directly).', + }, + _expiry: { + type: require('./element.schema.js'), + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + expiry: { + type: DateTimeScalar, + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount of the substance.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/supplydelivery.schema.js b/src/resources/1_0_2/schemas/supplydelivery.schema.js index e171e299..56daa42f 100644 --- a/src/resources/1_0_2/schemas/supplydelivery.schema.js +++ b/src/resources/1_0_2/schemas/supplydelivery.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SupplyDeliveryResourceType = new GraphQLEnumType({ - name: 'SupplyDeliveryResourceType', - values: { - SupplyDelivery: { value: 'SupplyDelivery' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,75 +16,193 @@ let SupplyDeliveryResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'SupplyDelivery', - description: 'Base StructureDefinition for SupplyDelivery Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SupplyDeliveryResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Identifier assigned by the dispensing facility when the item(s) is dispensed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-status - status: { - type: CodeScalar, - description: 'A code specifying the state of the dispense event.', - }, - _status: { - type: require('./element.schema'), - description: 'A code specifying the state of the dispense event.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for SupplyDelivery Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyDelivery_Enum_schema', + values: { SupplyDelivery: { value: 'SupplyDelivery' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Identifier assigned by the dispensing facility when the item(s) is dispensed.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code specifying the state of the dispense event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-status + status: { + type: CodeScalar, + description: 'A code specifying the state of the dispense event.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverypatient_patient_Union', description: 'A link to a resource representing the person whom the delivered item is for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The amount of supply that has been dispensed. Includes unit of measure.', - }, - suppliedItem: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person whom the delivered item is for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of supply that has been dispensed. Includes unit of measure.', + }, + suppliedItem: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverysuppliedItem_suppliedItem_Union', description: 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.', - }, - supplier: { - type: require('./reference.schema'), + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a simple attribute carrying a code that identifies the item from a known list.', + }, + supplier: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverysupplier_supplier_Union', description: 'The individual responsible for dispensing the medication, supplier or device.', - }, - whenPrepared: { - type: require('./period.schema'), - description: 'The time the dispense event occurred.', - }, - time: { - type: DateTimeScalar, - description: - 'The time the dispensed item was sent or handed to the patient (or agent).', - }, - _time: { - type: require('./element.schema'), - description: - 'The time the dispensed item was sent or handed to the patient (or agent).', - }, - destination: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The individual responsible for dispensing the medication, supplier or device.', + }, + whenPrepared: { + type: require('./period.schema.js'), + description: 'The time the dispense event occurred.', + }, + _time: { + type: require('./element.schema.js'), + description: + 'The time the dispensed item was sent or handed to the patient (or agent).', + }, + time: { + type: DateTimeScalar, + description: + 'The time the dispensed item was sent or handed to the patient (or agent).', + }, + destination: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverydestination_destination_Union', description: 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', - }, - receiver: { - type: new GraphQLList(require('./reference.schema')), - description: 'Identifies the person who picked up the Supply.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyDeliveryreceiver_receiver_Union', + description: 'Identifies the person who picked up the Supply.', + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: 'Identifies the person who picked up the Supply.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/supplyrequest.schema.js b/src/resources/1_0_2/schemas/supplyrequest.schema.js index 7374cdeb..98561b42 100644 --- a/src/resources/1_0_2/schemas/supplyrequest.schema.js +++ b/src/resources/1_0_2/schemas/supplyrequest.schema.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SupplyRequestResourceType = new GraphQLEnumType({ - name: 'SupplyRequestResourceType', - values: { - SupplyRequest: { value: 'SupplyRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,71 +16,197 @@ let SupplyRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'SupplyRequest', - description: 'Base StructureDefinition for SupplyRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SupplyRequestResourceType), - description: 'Type of this resource.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for SupplyRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyRequest_Enum_schema', + values: { SupplyRequest: { value: 'SupplyRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'SupplyRequestpatient_patient_Union', description: 'A link to a resource representing the person whom the ordered item is for.', - }, - source: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person whom the ordered item is for.', + }, + source: { + type: new GraphQLUnionType({ + name: 'SupplyRequestsource_source_Union', description: 'The Practitioner , Organization or Patient who initiated this order for the supply.', - }, - date: { - type: DateTimeScalar, - description: 'When the request was made.', - }, - _date: { - type: require('./element.schema'), - description: 'When the request was made.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Unique identifier for this supply request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-status - status: { - type: CodeScalar, - description: 'Status of the supply request.', - }, - _status: { - type: require('./element.schema'), - description: 'Status of the supply request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-kind - kind: { - type: require('./codeableconcept.schema'), - description: - 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', - }, - orderedItem: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The Practitioner , Organization or Patient who initiated this order for the supply.', + }, + _date: { + type: require('./element.schema.js'), + description: 'When the request was made.', + }, + date: { + type: DateTimeScalar, + description: 'When the request was made.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Unique identifier for this supply request.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Status of the supply request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-status + status: { + type: CodeScalar, + description: 'Status of the supply request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-kind + kind: { + type: require('./codeableconcept.schema.js'), + description: + 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', + }, + orderedItem: { + type: new GraphQLUnionType({ + name: 'SupplyRequestorderedItem_orderedItem_Union', description: 'The item that is requested to be supplied.', - }, - supplier: { - type: new GraphQLList(require('./reference.schema')), - description: 'Who is intended to fulfill the request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'Why the supply item was requested.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason - reasonReference: { - type: require('./reference.schema'), + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: 'The item that is requested to be supplied.', + }, + supplier: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyRequestsupplier_supplier_Union', + description: 'Who is intended to fulfill the request.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Who is intended to fulfill the request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Why the supply item was requested.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason + reasonReference: { + type: new GraphQLUnionType({ + name: 'SupplyRequestreasonReference_reasonReference_Union', description: 'Why the supply item was requested.', - }, - when: { - type: require('./supplyrequestwhen.schema'), - description: 'When the request should be fulfilled.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Why the supply item was requested.', + }, + when: { + type: require('./supplyrequestwhen.schema.js'), + description: 'When the request should be fulfilled.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/supplyrequestwhen.schema.js b/src/resources/1_0_2/schemas/supplyrequestwhen.schema.js index a1d9a112..eb8a6e24 100644 --- a/src/resources/1_0_2/schemas/supplyrequestwhen.schema.js +++ b/src/resources/1_0_2/schemas/supplyrequestwhen.schema.js @@ -1,24 +1,42 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary SupplyRequest.when Schema + * @summary SupplyRequestwhen Schema */ module.exports = new GraphQLObjectType({ - name: 'SupplyRequestWhen', - description: 'When the request should be fulfilled.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-when - code: { - type: require('./codeableconcept.schema'), - description: 'Code indicating when the request should be fulfilled.', - }, - schedule: { - type: require('./timing.schema'), - description: 'Formal fulfillment schedule.', - }, - }), + name: 'SupplyRequestwhen', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-when + code: { + type: require('./codeableconcept.schema.js'), + description: 'Code indicating when the request should be fulfilled.', + }, + schedule: { + type: require('./timing.schema.js'), + description: 'Formal fulfillment schedule.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscript.schema.js b/src/resources/1_0_2/schemas/testscript.schema.js index d329e638..6f13f5e3 100644 --- a/src/resources/1_0_2/schemas/testscript.schema.js +++ b/src/resources/1_0_2/schemas/testscript.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let TestScriptResourceType = new GraphQLEnumType({ - name: 'TestScriptResourceType', - values: { - TestScript: { value: 'TestScript' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,170 +18,238 @@ let TestScriptResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'TestScript', - description: 'Base StructureDefinition for TestScript Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(TestScriptResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A free text natural language name identifying the TestScript.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name identifying the TestScript.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the TestScript.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the TestScript.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the Test Script.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the Test Script.', - }, - contact: { - type: new GraphQLList(require('./testscriptcontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - 'The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the TestScript and its use.', - }, - _description: { - type: require('./element.schema'), - description: - 'A free text natural language description of the TestScript and its use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.', - }, - requirements: { - type: GraphQLString, - description: - "Explains why this Test Script is needed and why it's been constrained as it has.", - }, - _requirements: { - type: require('./element.schema'), - description: - "Explains why this Test Script is needed and why it's been constrained as it has.", - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', - }, - metadata: { - type: require('./testscriptmetadata.schema'), - description: - 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', - }, - multiserver: { - type: GraphQLBoolean, - description: - 'If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.', - }, - _multiserver: { - type: require('./element.schema'), - description: - 'If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.', - }, - fixture: { - type: new GraphQLList(require('./testscriptfixture.schema')), - description: - 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', - }, - profile: { - type: new GraphQLList(require('./reference.schema')), - description: 'Reference to the profile to be used for validation.', - }, - variable: { - type: new GraphQLList(require('./testscriptvariable.schema')), - description: - 'Variable is set based either on element value in response body or on header field value in the response headers.', - }, - setup: { - type: require('./testscriptsetup.schema'), - description: - 'A series of required setup operations before tests are executed.', - }, - test: { - type: new GraphQLList(require('./testscripttest.schema')), - description: 'A test in this script.', - }, - teardown: { - type: require('./testscriptteardown.schema'), - description: - 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', - }, - }), + description: 'Base StructureDefinition for TestScript Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestScript_Enum_schema', + values: { TestScript: { value: 'TestScript' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name identifying the TestScript.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A free text natural language name identifying the TestScript.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the TestScript.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the TestScript.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the Test Script.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the Test Script.', + }, + contact: { + type: new GraphQLList(require('./testscriptcontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.', + }, + date: { + type: DateTimeScalar, + description: + 'The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A free text natural language description of the TestScript and its use.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the TestScript and its use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + "Explains why this Test Script is needed and why it's been constrained as it has.", + }, + requirements: { + type: GraphQLString, + description: + "Explains why this Test Script is needed and why it's been constrained as it has.", + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.', + }, + metadata: { + type: require('./testscriptmetadata.schema.js'), + description: + 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', + }, + _multiserver: { + type: require('./element.schema.js'), + description: + 'If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.', + }, + multiserver: { + type: GraphQLBoolean, + description: + 'If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.', + }, + fixture: { + type: new GraphQLList(require('./testscriptfixture.schema.js')), + description: + 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', + }, + profile: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TestScriptprofile_profile_Union', + description: 'Reference to the profile to be used for validation.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Reference to the profile to be used for validation.', + }, + variable: { + type: new GraphQLList(require('./testscriptvariable.schema.js')), + description: + 'Variable is set based either on element value in response body or on header field value in the response headers.', + }, + setup: { + type: require('./testscriptsetup.schema.js'), + description: + 'A series of required setup operations before tests are executed.', + }, + test: { + type: new GraphQLList(require('./testscripttest.schema.js')), + description: 'A test in this script.', + }, + teardown: { + type: require('./testscriptteardown.schema.js'), + description: + 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptcontact.schema.js b/src/resources/1_0_2/schemas/testscriptcontact.schema.js index 11d0bb38..64c5f372 100644 --- a/src/resources/1_0_2/schemas/testscriptcontact.schema.js +++ b/src/resources/1_0_2/schemas/testscriptcontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.contact Schema + * @summary TestScriptcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the Test Script.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the Test Script.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'TestScriptcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the Test Script.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the Test Script.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptfixture.schema.js b/src/resources/1_0_2/schemas/testscriptfixture.schema.js index fceadc15..541f92b6 100644 --- a/src/resources/1_0_2/schemas/testscriptfixture.schema.js +++ b/src/resources/1_0_2/schemas/testscriptfixture.schema.js @@ -1,41 +1,73 @@ -const { GraphQLObjectType, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.fixture Schema + * @summary TestScriptfixture Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptFixture', - description: - 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - autocreate: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', - }, - _autocreate: { - type: require('./element.schema'), - description: - 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', - }, - autodelete: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', - }, - _autodelete: { - type: require('./element.schema'), - description: - 'Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', - }, - resource: { - type: require('./reference.schema'), + name: 'TestScriptfixture', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _autocreate: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + autocreate: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + _autodelete: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + autodelete: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + resource: { + type: new GraphQLUnionType({ + name: 'TestScriptfixtureresource_resource_Union', description: 'Reference to the resource (containing the contents of the resource needed for operations).', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference to the resource (containing the contents of the resource needed for operations).', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptmetadata.schema.js b/src/resources/1_0_2/schemas/testscriptmetadata.schema.js index 1cfe3c3f..7bc7d6f7 100644 --- a/src/resources/1_0_2/schemas/testscriptmetadata.schema.js +++ b/src/resources/1_0_2/schemas/testscriptmetadata.schema.js @@ -1,28 +1,45 @@ -const { GraphQLObjectType, GraphQLList, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.metadata Schema + * @summary TestScriptmetadata Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptMetadata', - description: - 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - link: { - type: new GraphQLList(require('./testscriptmetadatalink.schema')), - description: - 'A link to the FHIR specification that this test is covering.', - }, - capability: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptmetadatacapability.schema')), - ), - description: - 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', - }, - }), + name: 'TestScriptmetadata', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + link: { + type: new GraphQLList(require('./testscriptmetadatalink.schema.js')), + description: + 'A link to the FHIR specification that this test is covering.', + }, + capability: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptmetadatacapability.schema.js')), + ), + description: + 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptmetadatacapability.schema.js b/src/resources/1_0_2/schemas/testscriptmetadatacapability.schema.js index b9db653e..b8dbf752 100644 --- a/src/resources/1_0_2/schemas/testscriptmetadatacapability.schema.js +++ b/src/resources/1_0_2/schemas/testscriptmetadatacapability.schema.js @@ -1,77 +1,107 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLBoolean, GraphQLString, GraphQLInt, - GraphQLList, GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestScript.metadata.capability Schema + * @summary TestScriptmetadatacapability Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptMetadataCapability', - description: - 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - required: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', - }, - _required: { - type: require('./element.schema'), - description: - 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', - }, - validated: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', - }, - _validated: { - type: require('./element.schema'), - description: - 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', - }, - description: { - type: GraphQLString, - description: - 'Description of the capabilities that this test script is requiring the server to support.', - }, - _description: { - type: require('./element.schema'), - description: - 'Description of the capabilities that this test script is requiring the server to support.', - }, - destination: { - type: GraphQLInt, - description: 'Which server these requirements apply to.', - }, - _destination: { - type: require('./element.schema'), - description: 'Which server these requirements apply to.', - }, - link: { - type: new GraphQLList(UriScalar), - description: - 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', - }, - _link: { - type: require('./element.schema'), - description: - 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', - }, - conformance: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.', - }, - }), + name: 'TestScriptmetadatacapability', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _required: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + required: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + _validated: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + validated: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + description: { + type: GraphQLString, + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + _destination: { + type: require('./element.schema.js'), + description: 'Which server these requirements apply to.', + }, + destination: { + type: GraphQLInt, + description: 'Which server these requirements apply to.', + }, + _link: { + type: require('./element.schema.js'), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + link: { + type: new GraphQLList(UriScalar), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + conformance: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'TestScriptmetadatacapabilityconformance_conformance_Union', + description: + 'Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.', + types: () => [require('./conformance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Conformance') { + return require('./conformance.schema.js'); + } + }, + }), + ), + description: + 'Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptmetadatalink.schema.js b/src/resources/1_0_2/schemas/testscriptmetadatalink.schema.js index 0a3c1367..4967d7d6 100644 --- a/src/resources/1_0_2/schemas/testscriptmetadatalink.schema.js +++ b/src/resources/1_0_2/schemas/testscriptmetadatalink.schema.js @@ -1,34 +1,57 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestScript.metadata.link Schema + * @summary TestScriptmetadatalink Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptMetadataLink', - description: 'A link to the FHIR specification that this test is covering.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'URL to a particular requirement or feature within the FHIR specification.', - }, - _url: { - type: require('./element.schema'), - description: - 'URL to a particular requirement or feature within the FHIR specification.', - }, - description: { - type: GraphQLString, - description: 'Short description of the link.', - }, - _description: { - type: require('./element.schema'), - description: 'Short description of the link.', - }, - }), + name: 'TestScriptmetadatalink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Short description of the link.', + }, + description: { + type: GraphQLString, + description: 'Short description of the link.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptsetup.schema.js b/src/resources/1_0_2/schemas/testscriptsetup.schema.js index 424e465b..683c062d 100644 --- a/src/resources/1_0_2/schemas/testscriptsetup.schema.js +++ b/src/resources/1_0_2/schemas/testscriptsetup.schema.js @@ -1,23 +1,39 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup Schema + * @summary TestScriptsetup Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetup', - description: - 'A series of required setup operations before tests are executed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptsetupaction.schema')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestScriptsetup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptsetupaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptsetupaction.schema.js b/src/resources/1_0_2/schemas/testscriptsetupaction.schema.js index 9ee1da90..a3d70555 100644 --- a/src/resources/1_0_2/schemas/testscriptsetupaction.schema.js +++ b/src/resources/1_0_2/schemas/testscriptsetupaction.schema.js @@ -1,24 +1,42 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action Schema + * @summary TestScriptsetupaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupAction', - description: 'Action would contain either an operation or an assertion.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - operation: { - type: require('./testscriptsetupactionoperation.schema'), - description: 'The operation to perform.', - }, - assert: { - type: require('./testscriptsetupactionassert.schema'), - description: - 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', - }, - }), + name: 'TestScriptsetupaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + operation: { + type: require('./testscriptsetupactionoperation.schema.js'), + description: 'The operation to perform.', + }, + assert: { + type: require('./testscriptsetupactionassert.schema.js'), + description: + 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptsetupactionassert.schema.js b/src/resources/1_0_2/schemas/testscriptsetupactionassert.schema.js index 68f279d2..f4c6e272 100644 --- a/src/resources/1_0_2/schemas/testscriptsetupactionassert.schema.js +++ b/src/resources/1_0_2/schemas/testscriptsetupactionassert.schema.js @@ -1,191 +1,212 @@ -const CodeScalar = require('../scalars/code.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert Schema + * @summary TestScriptsetupactionassert Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionAssert', - description: - 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - label: { - type: GraphQLString, - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - _label: { - type: require('./element.schema'), - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.schema'), - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-direction-codes - direction: { - type: CodeScalar, - description: 'The direction to use for the assertion.', - }, - _direction: { - type: require('./element.schema'), - description: 'The direction to use for the assertion.', - }, - compareToSourceId: { - type: GraphQLString, - description: - "Id of fixture used to compare the 'sourceId/path' evaluations to.", - }, - _compareToSourceId: { - type: require('./element.schema'), - description: - "Id of fixture used to compare the 'sourceId/path' evaluations to.", - }, - compareToSourcePath: { - type: GraphQLString, - description: - "XPath or JSONPath expression against fixture used to compare the 'sourceId/path' evaluations to.", - }, - _compareToSourcePath: { - type: require('./element.schema'), - description: - "XPath or JSONPath expression against fixture used to compare the 'sourceId/path' evaluations to.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - contentType: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - _contentType: { - type: require('./element.schema'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - headerField: { - type: GraphQLString, - description: "The HTTP header field name e.g. 'Location'.", - }, - _headerField: { - type: require('./element.schema'), - description: "The HTTP header field name e.g. 'Location'.", - }, - minimumId: { - type: GraphQLString, - description: - 'The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.', - }, - _minimumId: { - type: require('./element.schema'), - description: - 'The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.', - }, - navigationLinks: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution performs validation on the bundle navigation links.', - }, - _navigationLinks: { - type: require('./element.schema'), - description: - 'Whether or not the test execution performs validation on the bundle navigation links.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-operator-codes - operator: { - type: CodeScalar, - description: 'The operator type.', - }, - _operator: { - type: require('./element.schema'), - description: 'The operator type.', - }, - path: { - type: GraphQLString, - description: - 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', - }, - _path: { - type: require('./element.schema'), - description: - 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - resource: { - type: CodeScalar, - description: - 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', - }, - _resource: { - type: require('./element.schema'), - description: - 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-response-code-types - response: { - type: CodeScalar, - description: - 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', - }, - _response: { - type: require('./element.schema'), - description: - 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', - }, - responseCode: { - type: GraphQLString, - description: 'The value of the HTTP response code to be tested.', - }, - _responseCode: { - type: require('./element.schema'), - description: 'The value of the HTTP response code to be tested.', - }, - sourceId: { - type: IdScalar, - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', - }, - _sourceId: { - type: require('./element.schema'), - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', - }, - validateProfileId: { - type: IdScalar, - description: 'The ID of the Profile to validate against.', - }, - _validateProfileId: { - type: require('./element.schema'), - description: 'The ID of the Profile to validate against.', - }, - value: { - type: GraphQLString, - description: 'The value to compare to.', - }, - _value: { - type: require('./element.schema'), - description: 'The value to compare to.', - }, - warningOnly: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will produce a warning only on error for this assert.', - }, - _warningOnly: { - type: require('./element.schema'), - description: - 'Whether or not the test execution will produce a warning only on error for this assert.', - }, - }), + name: 'TestScriptsetupactionassert', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _direction: { + type: require('./element.schema.js'), + description: 'The direction to use for the assertion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-direction-codes + direction: { + type: CodeScalar, + description: 'The direction to use for the assertion.', + }, + _compareToSourceId: { + type: require('./element.schema.js'), + description: + "Id of fixture used to compare the 'sourceId/path' evaluations to.", + }, + compareToSourceId: { + type: GraphQLString, + description: + "Id of fixture used to compare the 'sourceId/path' evaluations to.", + }, + _compareToSourcePath: { + type: require('./element.schema.js'), + description: + "XPath or JSONPath expression against fixture used to compare the 'sourceId/path' evaluations to.", + }, + compareToSourcePath: { + type: GraphQLString, + description: + "XPath or JSONPath expression against fixture used to compare the 'sourceId/path' evaluations to.", + }, + _contentType: { + type: require('./element.schema.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + contentType: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _headerField: { + type: require('./element.schema.js'), + description: "The HTTP header field name e.g. 'Location'.", + }, + headerField: { + type: GraphQLString, + description: "The HTTP header field name e.g. 'Location'.", + }, + _minimumId: { + type: require('./element.schema.js'), + description: + 'The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.', + }, + minimumId: { + type: GraphQLString, + description: + 'The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.', + }, + _navigationLinks: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + navigationLinks: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + _operator: { + type: require('./element.schema.js'), + description: 'The operator type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-operator-codes + operator: { + type: CodeScalar, + description: 'The operator type.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + path: { + type: GraphQLString, + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + _resource: { + type: require('./element.schema.js'), + description: + 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', + }, + _response: { + type: require('./element.schema.js'), + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-response-code-types + response: { + type: CodeScalar, + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + _responseCode: { + type: require('./element.schema.js'), + description: 'The value of the HTTP response code to be tested.', + }, + responseCode: { + type: GraphQLString, + description: 'The value of the HTTP response code to be tested.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + _validateProfileId: { + type: require('./element.schema.js'), + description: 'The ID of the Profile to validate against.', + }, + validateProfileId: { + type: IdScalar, + description: 'The ID of the Profile to validate against.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The value to compare to.', + }, + value: { + type: GraphQLString, + description: 'The value to compare to.', + }, + _warningOnly: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + warningOnly: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptsetupactionoperation.schema.js b/src/resources/1_0_2/schemas/testscriptsetupactionoperation.schema.js index 68c93f06..ee71f958 100644 --- a/src/resources/1_0_2/schemas/testscriptsetupactionoperation.schema.js +++ b/src/resources/1_0_2/schemas/testscriptsetupactionoperation.schema.js @@ -1,151 +1,168 @@ -const CodeScalar = require('../scalars/code.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLString, GraphQLInt, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.operation Schema + * @summary TestScriptsetupactionoperation Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionOperation', - description: 'The operation to perform.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/testscript-operation-codes - type: { - type: require('./coding.schema'), - description: 'Server interaction or operation type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - resource: { - type: CodeScalar, - description: - 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', - }, - _resource: { - type: require('./element.schema'), - description: - 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', - }, - label: { - type: GraphQLString, - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - _label: { - type: require('./element.schema'), - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.schema'), - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - accept: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", - }, - _accept: { - type: require('./element.schema'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - contentType: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - _contentType: { - type: require('./element.schema'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - destination: { - type: GraphQLInt, - description: 'Which server to perform the operation on.', - }, - _destination: { - type: require('./element.schema'), - description: 'Which server to perform the operation on.', - }, - encodeRequestUrl: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', - }, - _encodeRequestUrl: { - type: require('./element.schema'), - description: - 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', - }, - params: { - type: GraphQLString, - description: - 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', - }, - _params: { - type: require('./element.schema'), - description: - 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', - }, - requestHeader: { - type: new GraphQLList( - require('./testscriptsetupactionoperationrequestheader.schema'), - ), - description: 'Header elements would be used to set HTTP headers.', - }, - responseId: { - type: IdScalar, - description: 'The fixture id (maybe new) to map to the response.', - }, - _responseId: { - type: require('./element.schema'), - description: 'The fixture id (maybe new) to map to the response.', - }, - sourceId: { - type: IdScalar, - description: - 'The id of the fixture used as the body of a PUT or POST request.', - }, - _sourceId: { - type: require('./element.schema'), - description: - 'The id of the fixture used as the body of a PUT or POST request.', - }, - targetId: { - type: IdScalar, - description: - 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', - }, - _targetId: { - type: require('./element.schema'), - description: - 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', - }, - url: { - type: GraphQLString, - description: 'Complete request URL.', - }, - _url: { - type: require('./element.schema'), - description: 'Complete request URL.', - }, - }), + name: 'TestScriptsetupactionoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/testscript-operation-codes + type: { + type: require('./coding.schema.js'), + description: 'Server interaction or operation type.', + }, + _resource: { + type: require('./element.schema.js'), + description: + 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _accept: { + type: require('./element.schema.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + accept: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", + }, + _contentType: { + type: require('./element.schema.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + contentType: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _destination: { + type: require('./element.schema.js'), + description: 'Which server to perform the operation on.', + }, + destination: { + type: GraphQLInt, + description: 'Which server to perform the operation on.', + }, + _encodeRequestUrl: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + encodeRequestUrl: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + _params: { + type: require('./element.schema.js'), + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + params: { + type: GraphQLString, + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + requestHeader: { + type: new GraphQLList( + require('./testscriptsetupactionoperationrequestheader.schema.js'), + ), + description: 'Header elements would be used to set HTTP headers.', + }, + _responseId: { + type: require('./element.schema.js'), + description: 'The fixture id (maybe new) to map to the response.', + }, + responseId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the response.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + sourceId: { + type: IdScalar, + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + _targetId: { + type: require('./element.schema.js'), + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + targetId: { + type: IdScalar, + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + _url: { + type: require('./element.schema.js'), + description: 'Complete request URL.', + }, + url: { + type: GraphQLString, + description: 'Complete request URL.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptsetupactionoperationrequestheader.schema.js b/src/resources/1_0_2/schemas/testscriptsetupactionoperationrequestheader.schema.js index 11581460..d063f5db 100644 --- a/src/resources/1_0_2/schemas/testscriptsetupactionoperationrequestheader.schema.js +++ b/src/resources/1_0_2/schemas/testscriptsetupactionoperationrequestheader.schema.js @@ -1,31 +1,54 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.operation.requestHeader Schema + * @summary TestScriptsetupactionoperationrequestHeader Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionOperationRequestHeader', - description: 'Header elements would be used to set HTTP headers.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - field: { - type: new GraphQLNonNull(GraphQLString), - description: "The HTTP header field e.g. 'Accept'.", - }, - _field: { - type: require('./element.schema'), - description: "The HTTP header field e.g. 'Accept'.", - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: "The value of the header e.g. 'application/xml'.", - }, - _value: { - type: require('./element.schema'), - description: "The value of the header e.g. 'application/xml'.", - }, - }), + name: 'TestScriptsetupactionoperationrequestHeader', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _field: { + type: require('./element.schema.js'), + description: "The HTTP header field e.g. 'Accept'.", + }, + field: { + type: new GraphQLNonNull(GraphQLString), + description: "The HTTP header field e.g. 'Accept'.", + }, + _value: { + type: require('./element.schema.js'), + description: "The value of the header e.g. 'application/xml'.", + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: "The value of the header e.g. 'application/xml'.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptteardown.schema.js b/src/resources/1_0_2/schemas/testscriptteardown.schema.js index 5c597ec7..94c9fa54 100644 --- a/src/resources/1_0_2/schemas/testscriptteardown.schema.js +++ b/src/resources/1_0_2/schemas/testscriptteardown.schema.js @@ -1,22 +1,39 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.teardown Schema + * @summary TestScriptteardown Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptTeardown', - description: - 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptteardownaction.schema')), - ), - description: 'The teardown action will only contain an operation.', - }, - }), + name: 'TestScriptteardown', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptteardownaction.schema.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptteardownaction.schema.js b/src/resources/1_0_2/schemas/testscriptteardownaction.schema.js index 4ec634c4..84fb7305 100644 --- a/src/resources/1_0_2/schemas/testscriptteardownaction.schema.js +++ b/src/resources/1_0_2/schemas/testscriptteardownaction.schema.js @@ -1,13 +1,33 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.teardown.action Schema + * @summary TestScriptteardownaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptTeardownAction', - description: 'The teardown action will only contain an operation.', - fields: () => extendSchema(require('./backboneelement.schema')), + name: 'TestScriptteardownaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscripttest.schema.js b/src/resources/1_0_2/schemas/testscripttest.schema.js index f7fe0166..fed7ea5f 100644 --- a/src/resources/1_0_2/schemas/testscripttest.schema.js +++ b/src/resources/1_0_2/schemas/testscripttest.schema.js @@ -1,47 +1,64 @@ const { - GraphQLObjectType, + GraphQLList, GraphQLString, GraphQLNonNull, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.test Schema + * @summary TestScripttest Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptTest', - description: 'A test in this script.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.schema'), - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscripttestaction.schema')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestScripttest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscripttestaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscripttestaction.schema.js b/src/resources/1_0_2/schemas/testscripttestaction.schema.js index 550e0373..17a9d21c 100644 --- a/src/resources/1_0_2/schemas/testscripttestaction.schema.js +++ b/src/resources/1_0_2/schemas/testscripttestaction.schema.js @@ -1,13 +1,33 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.test.action Schema + * @summary TestScripttestaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptTestAction', - description: 'Action would contain either an operation or an assertion.', - fields: () => extendSchema(require('./backboneelement.schema')), + name: 'TestScripttestaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/testscriptvariable.schema.js b/src/resources/1_0_2/schemas/testscriptvariable.schema.js index 4d8fada2..a1e8fd9d 100644 --- a/src/resources/1_0_2/schemas/testscriptvariable.schema.js +++ b/src/resources/1_0_2/schemas/testscriptvariable.schema.js @@ -1,55 +1,76 @@ -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.variable Schema + * @summary TestScriptvariable Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptVariable', - description: - 'Variable is set based either on element value in response body or on header field value in the response headers.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Descriptive name for this variable.', - }, - _name: { - type: require('./element.schema'), - description: 'Descriptive name for this variable.', - }, - headerField: { - type: GraphQLString, - description: - 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', - }, - _headerField: { - type: require('./element.schema'), - description: - 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', - }, - path: { - type: GraphQLString, - description: - 'XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.', - }, - _path: { - type: require('./element.schema'), - description: - 'XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.', - }, - sourceId: { - type: IdScalar, - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', - }, - _sourceId: { - type: require('./element.schema'), - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', - }, - }), + name: 'TestScriptvariable', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Descriptive name for this variable.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Descriptive name for this variable.', + }, + _headerField: { + type: require('./element.schema.js'), + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + headerField: { + type: GraphQLString, + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.', + }, + path: { + type: GraphQLString, + description: + 'XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/timing.schema.js b/src/resources/1_0_2/schemas/timing.schema.js index e7bc3381..41029629 100644 --- a/src/resources/1_0_2/schemas/timing.schema.js +++ b/src/resources/1_0_2/schemas/timing.schema.js @@ -1,7 +1,6 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -9,27 +8,40 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Timing', - description: 'Base StructureDefinition for Timing Type.', - fields: () => - extendSchema(require('./element.schema'), { - event: { - type: new GraphQLList(DateTimeScalar), - description: 'Identifies specific times when the event occurs.', - }, - _event: { - type: require('./element.schema'), - description: 'Identifies specific times when the event occurs.', - }, - repeat: { - type: require('./timingrepeat.schema'), - description: - 'A set of rules that describe when the event should occur.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/timing-abbreviation - code: { - type: require('./codeableconcept.schema'), - description: - 'A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.', - }, - }), + description: 'Base StructureDefinition for Timing Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _event: { + type: require('./element.schema.js'), + description: 'Identifies specific times when the event occurs.', + }, + event: { + type: new GraphQLList(DateTimeScalar), + description: 'Identifies specific times when the event occurs.', + }, + repeat: { + type: require('./element.schema.js'), + description: 'A set of rules that describe when the event should occur.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/timing-abbreviation + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/timingrepeat.schema.js b/src/resources/1_0_2/schemas/timingrepeat.schema.js index 77e2356e..46d9ee9f 100644 --- a/src/resources/1_0_2/schemas/timingrepeat.schema.js +++ b/src/resources/1_0_2/schemas/timingrepeat.schema.js @@ -1,126 +1,144 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLInt, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLInt, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Timing.repeat Schema + * @summary Timingrepeat Schema */ module.exports = new GraphQLObjectType({ - name: 'TimingRepeat', - description: 'A set of rules that describe when the event should occur.', - fields: () => - extendSchema(require('./element.schema'), { - boundsQuantity: { - type: require('./quantity.schema'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - boundsRange: { - type: require('./range.schema'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - boundsPeriod: { - type: require('./period.schema'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - count: { - type: GraphQLInt, - description: 'A total count of the desired number of repetitions.', - }, - _count: { - type: require('./element.schema'), - description: 'A total count of the desired number of repetitions.', - }, - duration: { - type: GraphQLFloat, - description: 'How long this thing happens for when it happens.', - }, - _duration: { - type: require('./element.schema'), - description: 'How long this thing happens for when it happens.', - }, - durationMax: { - type: GraphQLFloat, - description: - 'The upper limit of how long this thing happens for when it happens.', - }, - _durationMax: { - type: require('./element.schema'), - description: - 'The upper limit of how long this thing happens for when it happens.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/units-of-time - durationUnits: { - type: CodeScalar, - description: 'The units of time for the duration, in UCUM units.', - }, - _durationUnits: { - type: require('./element.schema'), - description: 'The units of time for the duration, in UCUM units.', - }, - frequency: { - type: GraphQLInt, - description: - 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', - }, - _frequency: { - type: require('./element.schema'), - description: - 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', - }, - frequencyMax: { - type: GraphQLInt, - description: - 'If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.', - }, - _frequencyMax: { - type: require('./element.schema'), - description: - 'If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.', - }, - period: { - type: GraphQLFloat, - description: - "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", - }, - _period: { - type: require('./element.schema'), - description: - "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", - }, - periodMax: { - type: GraphQLFloat, - description: - "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", - }, - _periodMax: { - type: require('./element.schema'), - description: - "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/units-of-time - periodUnits: { - type: CodeScalar, - description: 'The units of time for the period in UCUM units.', - }, - _periodUnits: { - type: require('./element.schema'), - description: 'The units of time for the period in UCUM units.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-timing - when: { - type: CodeScalar, - description: - 'A real world event that the occurrence of the event should be tied to.', - }, - _when: { - type: require('./element.schema'), - description: - 'A real world event that the occurrence of the event should be tied to.', - }, - }), + name: 'Timingrepeat', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + boundsQuantity: { + type: require('./quantity.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsRange: { + type: require('./range.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsPeriod: { + type: require('./period.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + _count: { + type: require('./element.schema.js'), + description: 'A total count of the desired number of repetitions.', + }, + count: { + type: GraphQLInt, + description: 'A total count of the desired number of repetitions.', + }, + _duration: { + type: require('./element.schema.js'), + description: 'How long this thing happens for when it happens.', + }, + duration: { + type: GraphQLFloat, + description: 'How long this thing happens for when it happens.', + }, + _durationMax: { + type: require('./element.schema.js'), + description: + 'The upper limit of how long this thing happens for when it happens.', + }, + durationMax: { + type: GraphQLFloat, + description: + 'The upper limit of how long this thing happens for when it happens.', + }, + _durationUnits: { + type: require('./element.schema.js'), + description: 'The units of time for the duration, in UCUM units.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/units-of-time + durationUnits: { + type: CodeScalar, + description: 'The units of time for the duration, in UCUM units.', + }, + _frequency: { + type: require('./element.schema.js'), + description: + 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', + }, + frequency: { + type: GraphQLInt, + description: + 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', + }, + _frequencyMax: { + type: require('./element.schema.js'), + description: + 'If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + frequencyMax: { + type: GraphQLInt, + description: + 'If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + _period: { + type: require('./element.schema.js'), + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", + }, + period: { + type: GraphQLFloat, + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", + }, + _periodMax: { + type: require('./element.schema.js'), + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + periodMax: { + type: GraphQLFloat, + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + _periodUnits: { + type: require('./element.schema.js'), + description: 'The units of time for the period in UCUM units.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/units-of-time + periodUnits: { + type: CodeScalar, + description: 'The units of time for the period in UCUM units.', + }, + _when: { + type: require('./element.schema.js'), + description: + 'A real world event that the occurrence of the event should be tied to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-timing + when: { + type: CodeScalar, + description: + 'A real world event that the occurrence of the event should be tied to.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valueset.schema.js b/src/resources/1_0_2/schemas/valueset.schema.js index 1c63f3fe..5d33f3dd 100644 --- a/src/resources/1_0_2/schemas/valueset.schema.js +++ b/src/resources/1_0_2/schemas/valueset.schema.js @@ -1,24 +1,17 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ValueSetResourceType = new GraphQLEnumType({ - name: 'ValueSetResourceType', - values: { - ValueSet: { value: 'ValueSet' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,172 +19,229 @@ let ValueSetResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ValueSet', - description: 'Base StructureDefinition for ValueSet Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ValueSetResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - _version: { - type: require('./element.schema'), - description: - 'Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', - }, - name: { - type: GraphQLString, - description: - 'A free text natural language name describing the value set.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name describing the value set.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the value set.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the value set.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the value set.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the value set.', - }, - contact: { - type: new GraphQLList(require('./valuesetcontact.schema')), - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - }, - date: { - type: DateTimeScalar, - description: - "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", - }, - _date: { - type: require('./element.schema'), - description: - "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", - }, - lockedDate: { - type: DateScalar, - description: - 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.', - }, - _lockedDate: { - type: require('./element.schema'), - description: - 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - useContext: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.', - }, - immutable: { - type: GraphQLBoolean, - description: - "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", - }, - _immutable: { - type: require('./element.schema'), - description: - "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", - }, - requirements: { - type: GraphQLString, - description: - 'Explains why this value set is needed and why it has been constrained as it has.', - }, - _requirements: { - type: require('./element.schema'), - description: - 'Explains why this value set is needed and why it has been constrained as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', - }, - extensible: { - type: GraphQLBoolean, - description: - 'Whether this is intended to be used with an extensible binding or not.', - }, - _extensible: { - type: require('./element.schema'), - description: - 'Whether this is intended to be used with an extensible binding or not.', - }, - codeSystem: { - type: require('./valuesetcodesystem.schema'), - description: - 'A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.', - }, - compose: { - type: require('./valuesetcompose.schema'), - description: - 'A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.', - }, - expansion: { - type: require('./valuesetexpansion.schema'), - description: - "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", - }, - }), + description: 'Base StructureDefinition for ValueSet Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ValueSet_Enum_schema', + values: { ValueSet: { value: 'ValueSet' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.', + }, + url: { + type: UriScalar, + description: + 'An absolute URL that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + version: { + type: GraphQLString, + description: + 'Used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name describing the value set.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name describing the value set.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the value set.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conformance-resource-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the value set.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the value set.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the value set.', + }, + contact: { + type: new GraphQLList(require('./valuesetcontact.schema.js')), + description: + 'Contacts to assist a user in finding and communicating with the publisher.', + }, + _date: { + type: require('./element.schema.js'), + description: + "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", + }, + date: { + type: DateTimeScalar, + description: + "The date that the value set status was last changed. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes (e.g. the 'content logical definition').", + }, + _lockedDate: { + type: require('./element.schema.js'), + description: + 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.', + }, + lockedDate: { + type: DateScalar, + description: + 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version of all referenced code system(s) and value set instances as of the locked date.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the use of the value set - reason for definition, 'the semantic space' to be included in the value set, conditions of use, etc. The description may include a list of expected usages for the value set and can also describe the approach taken to build the value set.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + useContext: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of value set definitions.', + }, + _immutable: { + type: require('./element.schema.js'), + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + immutable: { + type: GraphQLBoolean, + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'Explains why this value set is needed and why it has been constrained as it has.', + }, + requirements: { + type: GraphQLString, + description: + 'Explains why this value set is needed and why it has been constrained as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + _extensible: { + type: require('./element.schema.js'), + description: + 'Whether this is intended to be used with an extensible binding or not.', + }, + extensible: { + type: GraphQLBoolean, + description: + 'Whether this is intended to be used with an extensible binding or not.', + }, + codeSystem: { + type: require('./valuesetcodesystem.schema.js'), + description: + 'A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.', + }, + compose: { + type: require('./valuesetcompose.schema.js'), + description: + 'A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.', + }, + expansion: { + type: require('./valuesetexpansion.schema.js'), + description: + "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetcodesystem.schema.js b/src/resources/1_0_2/schemas/valuesetcodesystem.schema.js index f53a18be..31eca949 100644 --- a/src/resources/1_0_2/schemas/valuesetcodesystem.schema.js +++ b/src/resources/1_0_2/schemas/valuesetcodesystem.schema.js @@ -1,60 +1,77 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ValueSet.codeSystem Schema + * @summary ValueSetcodeSystem Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetCodeSystem', - description: - 'A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - system: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.', - }, - _system: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.', - }, - version: { - type: GraphQLString, - description: - 'The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.', - }, - caseSensitive: { - type: GraphQLBoolean, - description: - 'If code comparison is case sensitive when codes within this system are compared to each other.', - }, - _caseSensitive: { - type: require('./element.schema'), - description: - 'If code comparison is case sensitive when codes within this system are compared to each other.', - }, - concept: { - type: new GraphQLList( - new GraphQLNonNull(require('./valuesetcodesystemconcept.schema')), - ), - description: - 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', - }, - }), + name: 'ValueSetcodeSystem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.', + }, + system: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.', + }, + version: { + type: GraphQLString, + description: + 'The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.', + }, + _caseSensitive: { + type: require('./element.schema.js'), + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + caseSensitive: { + type: GraphQLBoolean, + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + concept: { + type: new GraphQLList( + new GraphQLNonNull(require('./valuesetcodesystemconcept.schema.js')), + ), + description: + 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetcodesystemconcept.schema.js b/src/resources/1_0_2/schemas/valuesetcodesystemconcept.schema.js index 6a2227df..dcec9adb 100644 --- a/src/resources/1_0_2/schemas/valuesetcodesystemconcept.schema.js +++ b/src/resources/1_0_2/schemas/valuesetcodesystemconcept.schema.js @@ -1,68 +1,85 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.codeSystem.concept Schema + * @summary ValueSetcodeSystemconcept Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetCodeSystemConcept', - description: - 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code - a text symbol - that uniquely identifies the concept within the code system.', - }, - _code: { - type: require('./element.schema'), - description: - 'A code - a text symbol - that uniquely identifies the concept within the code system.', - }, - abstract: { - type: GraphQLBoolean, - description: 'If this code is not for use as a real concept.', - }, - _abstract: { - type: require('./element.schema'), - description: 'If this code is not for use as a real concept.', - }, - display: { - type: GraphQLString, - description: - 'A human readable string that is the recommended default way to present this concept to a user.', - }, - _display: { - type: require('./element.schema'), - description: - 'A human readable string that is the recommended default way to present this concept to a user.', - }, - definition: { - type: GraphQLString, - description: - 'The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', - }, - _definition: { - type: require('./element.schema'), - description: - 'The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', - }, - designation: { - type: new GraphQLList( - require('./valuesetcodesystemconceptdesignation.schema'), - ), - description: - 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', - }, - }), + name: 'ValueSetcodeSystemconcept', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + _abstract: { + type: require('./element.schema.js'), + description: 'If this code is not for use as a real concept.', + }, + abstract: { + type: GraphQLBoolean, + description: 'If this code is not for use as a real concept.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + display: { + type: GraphQLString, + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + definition: { + type: GraphQLString, + description: + 'The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + designation: { + type: new GraphQLList( + require('./valuesetcodesystemconceptdesignation.schema.js'), + ), + description: + 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetcodesystemconceptdesignation.schema.js b/src/resources/1_0_2/schemas/valuesetcodesystemconceptdesignation.schema.js index 2c95f322..2594cbbb 100644 --- a/src/resources/1_0_2/schemas/valuesetcodesystemconceptdesignation.schema.js +++ b/src/resources/1_0_2/schemas/valuesetcodesystemconceptdesignation.schema.js @@ -1,38 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.codeSystem.concept.designation Schema + * @summary ValueSetcodeSystemconceptdesignation Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetCodeSystemConceptDesignation', - description: - 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.schema'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.schema'), - description: 'A code that details how this designation would be used.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text value for this designation.', - }, - _value: { - type: require('./element.schema'), - description: 'The text value for this designation.', - }, - }), + name: 'ValueSetcodeSystemconceptdesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The language this designation is defined for.', + }, + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.schema.js'), + description: 'A code that details how this designation would be used.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetcompose.schema.js b/src/resources/1_0_2/schemas/valuesetcompose.schema.js index 1afca2e9..d04cf55f 100644 --- a/src/resources/1_0_2/schemas/valuesetcompose.schema.js +++ b/src/resources/1_0_2/schemas/valuesetcompose.schema.js @@ -1,31 +1,48 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ValueSet.compose Schema + * @summary ValueSetcompose Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetCompose', - description: - 'A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - import: { - type: new GraphQLList(UriScalar), - description: - 'Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.', - }, - _import: { - type: require('./element.schema'), - description: - 'Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.', - }, - include: { - type: new GraphQLList(require('./valuesetcomposeinclude.schema')), - description: 'Include one or more codes from a code system.', - }, - }), + name: 'ValueSetcompose', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _import: { + type: require('./element.schema.js'), + description: + 'Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.', + }, + import: { + type: new GraphQLList(UriScalar), + description: + 'Includes the contents of the referenced value set as a part of the contents of this value set. This is an absolute URI that is a reference to ValueSet.uri.', + }, + include: { + type: new GraphQLList(require('./valuesetcomposeinclude.schema.js')), + description: 'Include one or more codes from a code system.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetcomposeinclude.schema.js b/src/resources/1_0_2/schemas/valuesetcomposeinclude.schema.js index db8a3dcb..89a09ec5 100644 --- a/src/resources/1_0_2/schemas/valuesetcomposeinclude.schema.js +++ b/src/resources/1_0_2/schemas/valuesetcomposeinclude.schema.js @@ -1,52 +1,72 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include Schema + * @summary ValueSetcomposeinclude Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetComposeInclude', - description: 'Include one or more codes from a code system.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - system: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI which is the code system from which the selected codes come from.', - }, - _system: { - type: require('./element.schema'), - description: - 'An absolute URI which is the code system from which the selected codes come from.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system that the codes are selected from.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of the code system that the codes are selected from.', - }, - concept: { - type: new GraphQLList( - require('./valuesetcomposeincludeconcept.schema'), - ), - description: 'Specifies a concept to be included or excluded.', - }, - filter: { - type: new GraphQLList(require('./valuesetcomposeincludefilter.schema')), - description: - 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', - }, - }), + name: 'ValueSetcomposeinclude', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + system: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the code system that the codes are selected from.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system that the codes are selected from.', + }, + concept: { + type: new GraphQLList( + require('./valuesetcomposeincludeconcept.schema.js'), + ), + description: 'Specifies a concept to be included or excluded.', + }, + filter: { + type: new GraphQLList( + require('./valuesetcomposeincludefilter.schema.js'), + ), + description: + 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetcomposeincludeconcept.schema.js b/src/resources/1_0_2/schemas/valuesetcomposeincludeconcept.schema.js index 6ec97ec0..bf2dbe00 100644 --- a/src/resources/1_0_2/schemas/valuesetcomposeincludeconcept.schema.js +++ b/src/resources/1_0_2/schemas/valuesetcomposeincludeconcept.schema.js @@ -1,36 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLNonNull, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.concept Schema + * @summary ValueSetcomposeincludeconcept Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetComposeIncludeConcept', - description: 'Specifies a concept to be included or excluded.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Specifies a code for the concept to be included or excluded.', - }, - _code: { - type: require('./element.schema'), - description: - 'Specifies a code for the concept to be included or excluded.', - }, - display: { - type: GraphQLString, - description: - 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', - }, - _display: { - type: require('./element.schema'), - description: - 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', - }, - }), + name: 'ValueSetcomposeincludeconcept', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + display: { + type: GraphQLString, + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetcomposeincludefilter.schema.js b/src/resources/1_0_2/schemas/valuesetcomposeincludefilter.schema.js index 00716689..0fa15893 100644 --- a/src/resources/1_0_2/schemas/valuesetcomposeincludefilter.schema.js +++ b/src/resources/1_0_2/schemas/valuesetcomposeincludefilter.schema.js @@ -1,48 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLNonNull, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.filter Schema + * @summary ValueSetcomposeincludefilter Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetComposeIncludeFilter', - description: - 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - property: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that identifies a property defined in the code system.', - }, - _property: { - type: require('./element.schema'), - description: - 'A code that identifies a property defined in the code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/filter-operator - op: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of operation to perform as a part of the filter criteria.', - }, - _op: { - type: require('./element.schema'), - description: - 'The kind of operation to perform as a part of the filter criteria.', - }, - value: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.', - }, - _value: { - type: require('./element.schema'), - description: - 'The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.', - }, - }), + name: 'ValueSetcomposeincludefilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _property: { + type: require('./element.schema.js'), + description: + 'A code that identifies a property defined in the code system.', + }, + property: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that identifies a property defined in the code system.', + }, + _op: { + type: require('./element.schema.js'), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/filter-operator + op: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.', + }, + value: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetcontact.schema.js b/src/resources/1_0_2/schemas/valuesetcontact.schema.js index 86eb0883..91cc1a14 100644 --- a/src/resources/1_0_2/schemas/valuesetcontact.schema.js +++ b/src/resources/1_0_2/schemas/valuesetcontact.schema.js @@ -1,31 +1,48 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLList, GraphQLString, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary ValueSet.contact Schema + * @summary ValueSetcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetContact', - description: - 'Contacts to assist a user in finding and communicating with the publisher.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of an individual to contact regarding the value set.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of an individual to contact regarding the value set.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for individual (if a name was provided) or the publisher.', - }, - }), + name: 'ValueSetcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of an individual to contact regarding the value set.', + }, + name: { + type: GraphQLString, + description: + 'The name of an individual to contact regarding the value set.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for individual (if a name was provided) or the publisher.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetexpansion.schema.js b/src/resources/1_0_2/schemas/valuesetexpansion.schema.js index 27d3e067..ed73da4c 100644 --- a/src/resources/1_0_2/schemas/valuesetexpansion.schema.js +++ b/src/resources/1_0_2/schemas/valuesetexpansion.schema.js @@ -1,72 +1,89 @@ -const UriScalar = require('../scalars/uri.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ValueSet.expansion Schema + * @summary ValueSetexpansion Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetExpansion', - description: - "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLNonNull(UriScalar), - description: - 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', - }, - _identifier: { - type: require('./element.schema'), - description: - 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', - }, - timestamp: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The time at which the expansion was produced by the expanding system.', - }, - _timestamp: { - type: require('./element.schema'), - description: - 'The time at which the expansion was produced by the expanding system.', - }, - total: { - type: GraphQLInt, - description: - 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', - }, - _total: { - type: require('./element.schema'), - description: - 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', - }, - offset: { - type: GraphQLInt, - description: - 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', - }, - _offset: { - type: require('./element.schema'), - description: - 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', - }, - parameter: { - type: new GraphQLList(require('./valuesetexpansionparameter.schema')), - description: - 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', - }, - contains: { - type: new GraphQLList(require('./valuesetexpansioncontains.schema')), - description: 'The codes that are contained in the value set expansion.', - }, - }), + name: 'ValueSetexpansion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./element.schema.js'), + description: + 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', + }, + identifier: { + type: new GraphQLNonNull(UriScalar), + description: + 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', + }, + _timestamp: { + type: require('./element.schema.js'), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + timestamp: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + _total: { + type: require('./element.schema.js'), + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + total: { + type: GraphQLInt, + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + _offset: { + type: require('./element.schema.js'), + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', + }, + offset: { + type: GraphQLInt, + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', + }, + parameter: { + type: new GraphQLList(require('./valuesetexpansionparameter.schema.js')), + description: + 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', + }, + contains: { + type: new GraphQLList(require('./valuesetexpansioncontains.schema.js')), + description: 'The codes that are contained in the value set expansion.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetexpansioncontains.schema.js b/src/resources/1_0_2/schemas/valuesetexpansioncontains.schema.js index fedc461d..b805b7da 100644 --- a/src/resources/1_0_2/schemas/valuesetexpansioncontains.schema.js +++ b/src/resources/1_0_2/schemas/valuesetexpansioncontains.schema.js @@ -1,65 +1,88 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLBoolean, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLList, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.expansion.contains Schema + * @summary ValueSetexpansioncontains Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetExpansionContains', - description: 'The codes that are contained in the value set expansion.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - system: { - type: UriScalar, - description: - 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', - }, - _system: { - type: require('./element.schema'), - description: - 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', - }, - abstract: { - type: GraphQLBoolean, - description: - 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', - }, - _abstract: { - type: require('./element.schema'), - description: - 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', - }, - version: { - type: GraphQLString, - description: - 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', - }, - code: { - type: CodeScalar, - description: - 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', - }, - _code: { - type: require('./element.schema'), - description: - 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', - }, - display: { - type: GraphQLString, - description: 'The recommended display for this item in the expansion.', - }, - _display: { - type: require('./element.schema'), - description: 'The recommended display for this item in the expansion.', - }, - }), + name: 'ValueSetexpansioncontains', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + _abstract: { + type: require('./element.schema.js'), + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + abstract: { + type: GraphQLBoolean, + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', + }, + version: { + type: GraphQLString, + description: + 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + code: { + type: CodeScalar, + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + _display: { + type: require('./element.schema.js'), + description: 'The recommended display for this item in the expansion.', + }, + display: { + type: GraphQLString, + description: 'The recommended display for this item in the expansion.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/valuesetexpansionparameter.schema.js b/src/resources/1_0_2/schemas/valuesetexpansionparameter.schema.js index 34f5cffc..5a82872f 100644 --- a/src/resources/1_0_2/schemas/valuesetexpansionparameter.schema.js +++ b/src/resources/1_0_2/schemas/valuesetexpansionparameter.schema.js @@ -1,81 +1,99 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLString, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.expansion.parameter Schema + * @summary ValueSetexpansionparameter Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetExpansionParameter', - description: - 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name of the parameter.', - }, - _name: { - type: require('./element.schema'), - description: 'The name of the parameter.', - }, - valueString: { - type: GraphQLString, - description: 'The value of the parameter.', - }, - _valueString: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: 'The value of the parameter.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueInteger: { - type: GraphQLInt, - description: 'The value of the parameter.', - }, - _valueInteger: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueDecimal: { - type: GraphQLFloat, - description: 'The value of the parameter.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueUri: { - type: UriScalar, - description: 'The value of the parameter.', - }, - _valueUri: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueCode: { - type: CodeScalar, - description: 'The value of the parameter.', - }, - _valueCode: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - }), + name: 'ValueSetexpansionparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of the parameter.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the parameter.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueString: { + type: GraphQLString, + description: 'The value of the parameter.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the parameter.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueInteger: { + type: GraphQLInt, + description: 'The value of the parameter.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'The value of the parameter.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueUri: { + type: UriScalar, + description: 'The value of the parameter.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueCode: { + type: CodeScalar, + description: 'The value of the parameter.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/visionprescription.schema.js b/src/resources/1_0_2/schemas/visionprescription.schema.js index d95bf70a..d9428b9e 100644 --- a/src/resources/1_0_2/schemas/visionprescription.schema.js +++ b/src/resources/1_0_2/schemas/visionprescription.schema.js @@ -1,20 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let VisionPrescriptionResourceType = new GraphQLEnumType({ - name: 'VisionPrescriptionResourceType', - values: { - VisionPrescription: { value: 'VisionPrescription' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,57 +16,154 @@ let VisionPrescriptionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'VisionPrescription', - description: 'Base StructureDefinition for VisionPrescription Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(VisionPrescriptionResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Business identifier which may be used by other parties to reference or identify the prescription.', - }, - dateWritten: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was written.', - }, - _dateWritten: { - type: require('./element.schema'), - description: - 'The date (and perhaps time) when the prescription was written.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for VisionPrescription Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'VisionPrescription_Enum_schema', + values: { VisionPrescription: { value: 'VisionPrescription' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.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.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Business identifier which may be used by other parties to reference or identify the prescription.', + }, + _dateWritten: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + dateWritten: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was written.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionpatient_patient_Union', description: 'A link to a resource representing the person to whom the vision products will be supplied.', - }, - prescriber: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person to whom the vision products will be supplied.', + }, + prescriber: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionprescriber_prescriber_Union', description: 'The healthcare professional responsible for authorizing the prescription.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The healthcare professional responsible for authorizing the prescription.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionencounter_encounter_Union', description: 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + reasonReference: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionreasonReference_reasonReference_Union', description: 'Can be the reason or the indication for writing the prescription.', - }, - reasonReference: { - type: require('./reference.schema'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - dispense: { - type: new GraphQLList(require('./visionprescriptiondispense.schema')), - description: - 'Deals with details of the dispense part of the supply specification.', - }, - }), + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + dispense: { + type: new GraphQLList(require('./visionprescriptiondispense.schema.js')), + description: + 'Deals with details of the dispense part of the supply specification.', + }, + }), }); diff --git a/src/resources/1_0_2/schemas/visionprescriptiondispense.schema.js b/src/resources/1_0_2/schemas/visionprescriptiondispense.schema.js index 3bede7f5..f54d706e 100644 --- a/src/resources/1_0_2/schemas/visionprescriptiondispense.schema.js +++ b/src/resources/1_0_2/schemas/visionprescriptiondispense.schema.js @@ -1,149 +1,165 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLList, GraphQLNonNull, GraphQLFloat, GraphQLInt, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary VisionPrescription.dispense Schema + * @summary VisionPrescriptiondispense Schema */ module.exports = new GraphQLObjectType({ - name: 'VisionPrescriptionDispense', - description: - 'Deals with details of the dispense part of the supply specification.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-product - product: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Identifies the type of vision correction product which is required for the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-eye-codes - eye: { - type: CodeScalar, - description: 'The eye for which the lens applies.', - }, - _eye: { - type: require('./element.schema'), - description: 'The eye for which the lens applies.', - }, - sphere: { - type: GraphQLFloat, - description: 'Lens power measured in diopters (0.25 units).', - }, - _sphere: { - type: require('./element.schema'), - description: 'Lens power measured in diopters (0.25 units).', - }, - cylinder: { - type: GraphQLFloat, - description: - 'Power adjustment for astigmatism measured in diopters (0.25 units).', - }, - _cylinder: { - type: require('./element.schema'), - description: - 'Power adjustment for astigmatism measured in diopters (0.25 units).', - }, - axis: { - type: GraphQLInt, - description: 'Adjustment for astigmatism measured in integer degrees.', - }, - _axis: { - type: require('./element.schema'), - description: 'Adjustment for astigmatism measured in integer degrees.', - }, - prism: { - type: GraphQLFloat, - description: - 'Amount of prism to compensate for eye alignment in fractional units.', - }, - _prism: { - type: require('./element.schema'), - description: - 'Amount of prism to compensate for eye alignment in fractional units.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-base-codes - base: { - type: CodeScalar, - description: - 'The relative base, or reference lens edge, for the prism.', - }, - _base: { - type: require('./element.schema'), - description: - 'The relative base, or reference lens edge, for the prism.', - }, - add: { - type: GraphQLFloat, - description: - 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', - }, - _add: { - type: require('./element.schema'), - description: - 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', - }, - power: { - type: GraphQLFloat, - description: 'Contact lens power measured in diopters (0.25 units).', - }, - _power: { - type: require('./element.schema'), - description: 'Contact lens power measured in diopters (0.25 units).', - }, - backCurve: { - type: GraphQLFloat, - description: 'Back curvature measured in millimeters.', - }, - _backCurve: { - type: require('./element.schema'), - description: 'Back curvature measured in millimeters.', - }, - diameter: { - type: GraphQLFloat, - description: 'Contact lens diameter measured in millimeters.', - }, - _diameter: { - type: require('./element.schema'), - description: 'Contact lens diameter measured in millimeters.', - }, - duration: { - type: require('./quantity.schema'), - description: 'The recommended maximum wear period for the lens.', - }, - color: { - type: GraphQLString, - description: 'Special color or pattern.', - }, - _color: { - type: require('./element.schema'), - description: 'Special color or pattern.', - }, - brand: { - type: GraphQLString, - description: 'Brand recommendations or restrictions.', - }, - _brand: { - type: require('./element.schema'), - description: 'Brand recommendations or restrictions.', - }, - notes: { - type: GraphQLString, - description: - 'Notes for special requirements such as coatings and lens materials.', - }, - _notes: { - type: require('./element.schema'), - description: - 'Notes for special requirements such as coatings and lens materials.', - }, - }), + name: 'VisionPrescriptiondispense', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references).', + }, + id: { + type: IdScalar, + description: + 'unique id for the element within a resource (for internal references).', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-product + product: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Identifies the type of vision correction product which is required for the patient.', + }, + _eye: { + type: require('./element.schema.js'), + description: 'The eye for which the lens applies.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-eye-codes + eye: { + type: CodeScalar, + description: 'The eye for which the lens applies.', + }, + _sphere: { + type: require('./element.schema.js'), + description: 'Lens power measured in diopters (0.25 units).', + }, + sphere: { + type: GraphQLFloat, + description: 'Lens power measured in diopters (0.25 units).', + }, + _cylinder: { + type: require('./element.schema.js'), + description: + 'Power adjustment for astigmatism measured in diopters (0.25 units).', + }, + cylinder: { + type: GraphQLFloat, + description: + 'Power adjustment for astigmatism measured in diopters (0.25 units).', + }, + _axis: { + type: require('./element.schema.js'), + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + axis: { + type: GraphQLInt, + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + _prism: { + type: require('./element.schema.js'), + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + prism: { + type: GraphQLFloat, + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + _base: { + type: require('./element.schema.js'), + description: 'The relative base, or reference lens edge, for the prism.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-base-codes + base: { + type: CodeScalar, + description: 'The relative base, or reference lens edge, for the prism.', + }, + _add: { + type: require('./element.schema.js'), + description: + 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', + }, + add: { + type: GraphQLFloat, + description: + 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', + }, + _power: { + type: require('./element.schema.js'), + description: 'Contact lens power measured in diopters (0.25 units).', + }, + power: { + type: GraphQLFloat, + description: 'Contact lens power measured in diopters (0.25 units).', + }, + _backCurve: { + type: require('./element.schema.js'), + description: 'Back curvature measured in millimeters.', + }, + backCurve: { + type: GraphQLFloat, + description: 'Back curvature measured in millimeters.', + }, + _diameter: { + type: require('./element.schema.js'), + description: 'Contact lens diameter measured in millimeters.', + }, + diameter: { + type: GraphQLFloat, + description: 'Contact lens diameter measured in millimeters.', + }, + duration: { + type: require('./quantity.schema.js'), + description: 'The recommended maximum wear period for the lens.', + }, + _color: { + type: require('./element.schema.js'), + description: 'Special color or pattern.', + }, + color: { + type: GraphQLString, + description: 'Special color or pattern.', + }, + _brand: { + type: require('./element.schema.js'), + description: 'Brand recommendations or restrictions.', + }, + brand: { + type: GraphQLString, + description: 'Brand recommendations or restrictions.', + }, + _notes: { + type: require('./element.schema.js'), + description: + 'Notes for special requirements such as coatings and lens materials.', + }, + notes: { + type: GraphQLString, + description: + 'Notes for special requirements such as coatings and lens materials.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/account.input.js b/src/resources/3_0_1/inputs/account.input.js index 910d88b5..8f17b383 100644 --- a/src/resources/3_0_1/inputs/account.input.js +++ b/src/resources/3_0_1/inputs/account.input.js @@ -1,21 +1,13 @@ -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 @@ -23,88 +15,146 @@ let AccountResourceInputType = new GraphQLEnumType({ */ 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).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/account-status - status: { - type: CodeScalar, - description: - 'Indicates whether the account is presently used/usable or not.', - }, - _status: { - type: require('./element.input'), - description: - 'Indicates whether the account is presently used/usable or not.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/account-type - type: { - type: require('./codeableconcept.input'), - description: - 'Categorizes the account for reporting and searching purposes.', - }, - 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.', - }, - subject: { - type: require('./reference.input'), - description: - 'Identifies the patient, device, practitioner, location or other object the account is associated with.', - }, - period: { - type: require('./period.input'), - description: - 'Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.', - }, - active: { - type: require('./period.input'), - description: - 'Indicates the period of time over which the account is allowed to have transactions posted to it. This period may be different to the coveragePeriod which is the duration of time that services may occur.', - }, - balance: { - type: require('./money.input'), - description: - 'Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.', - }, - coverage: { - type: new GraphQLList(require('./accountcoverage.input')), - description: - 'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.', - }, - 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.', - }, - guarantor: { - type: new GraphQLList(require('./accountguarantor.input')), - description: 'Parties financially responsible for the account.', - }, - }), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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).', + }, + _status: { + type: require('./element.input.js'), + description: + 'Indicates whether the account is presently used/usable or not.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/account-status + status: { + type: CodeScalar, + description: + 'Indicates whether the account is presently used/usable or not.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/account-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Categorizes the account for reporting and searching purposes.', + }, + _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.', + }, + subject: { + type: GraphQLString, + description: + 'Identifies the patient, device, practitioner, location or other object the account is associated with.', + }, + period: { + type: require('./period.input.js'), + description: + 'Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.', + }, + active: { + type: require('./period.input.js'), + description: + 'Indicates the period of time over which the account is allowed to have transactions posted to it. This period may be different to the coveragePeriod which is the duration of time that services may occur.', + }, + balance: { + type: require('./money.input.js'), + description: + 'Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.', + }, + coverage: { + type: new GraphQLList(require('./accountcoverage.input.js')), + description: + 'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.', + }, + 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.', + }, + guarantor: { + type: new GraphQLList(require('./accountguarantor.input.js')), + description: 'Parties financially responsible for the account.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/accountcoverage.input.js b/src/resources/3_0_1/inputs/accountcoverage.input.js index 405ebb2d..8eb93e70 100644 --- a/src/resources/3_0_1/inputs/accountcoverage.input.js +++ b/src/resources/3_0_1/inputs/accountcoverage.input.js @@ -1,33 +1,53 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Account.coverage Input Schema + * @summary Accountcoverage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AccountCoverage_Input', - description: - 'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.', - fields: () => - extendSchema(require('./backboneelement.input'), { - coverage: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The party(s) that are responsible for payment (or part of) of charges applied to this account (including self-pay). A coverage may only be resposible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.', - }, - priority: { - type: PositiveIntScalar, - description: - 'The priority of the coverage in the context of this account.', - }, - _priority: { - type: require('./element.input'), - description: - 'The priority of the coverage in the context of this account.', - }, - }), + name: 'Accountcoverage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party(s) that are responsible for payment (or part of) of charges applied to this account (including self-pay). A coverage may only be resposible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'The priority of the coverage in the context of this account.', + }, + priority: { + type: PositiveIntScalar, + description: + 'The priority of the coverage in the context of this account.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/accountguarantor.input.js b/src/resources/3_0_1/inputs/accountguarantor.input.js index 104c476b..e71944c1 100644 --- a/src/resources/3_0_1/inputs/accountguarantor.input.js +++ b/src/resources/3_0_1/inputs/accountguarantor.input.js @@ -1,39 +1,57 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Account.guarantor Input Schema + * @summary Accountguarantor Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AccountGuarantor_Input', - description: 'Parties financially responsible for the account.', - fields: () => - extendSchema(require('./backboneelement.input'), { - party: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The entity who is responsible.', - }, - onHold: { - type: GraphQLBoolean, - description: - 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', - }, - _onHold: { - type: require('./element.input'), - description: - 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', - }, - period: { - type: require('./period.input'), - description: - 'The timeframe during which the guarantor accepts responsibility for the account.', - }, - }), + name: 'Accountguarantor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + party: { + type: new GraphQLNonNull(GraphQLString), + description: 'The entity who is responsible.', + }, + _onHold: { + type: require('./element.input.js'), + description: + 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', + }, + onHold: { + type: GraphQLBoolean, + description: + 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', + }, + period: { + type: require('./period.input.js'), + description: + 'The timeframe during which the guarantor accepts responsibility for the account.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/activitydefinition.input.js b/src/resources/3_0_1/inputs/activitydefinition.input.js index 0cd7abd9..ac5b3a31 100644 --- a/src/resources/3_0_1/inputs/activitydefinition.input.js +++ b/src/resources/3_0_1/inputs/activitydefinition.input.js @@ -1,25 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ActivityDefinitionResourceInputType = new GraphQLEnumType({ - name: 'ActivityDefinitionResourceInputType', - values: { - ActivityDefinition: { value: 'ActivityDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -27,292 +18,352 @@ let ActivityDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ActivityDefinition_Input', - description: 'Base StructureDefinition for ActivityDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ActivityDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the activity definition.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the activity definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this activity definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this activity definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the activity definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the activity definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the activity definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the activity definition.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the activity definition from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the activity definition from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this activity definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this activity definition is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the asset is used from a clinical perspective.', - }, - _usage: { - type: require('./element.input'), - description: - 'A detailed description of how the asset is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.input'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.input'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The period during which the activity definition content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate activity definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the activity definition is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.input')), - description: - 'A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.input')), - description: - 'Related artifacts such as additional documentation, justification, or bibliographic references.', - }, - library: { - type: new GraphQLList(require('./reference.input')), - description: - 'A reference to a Library resource containing any formal logic used by the asset.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - kind: { - type: CodeScalar, - description: - 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', - }, - _kind: { - type: require('./element.input'), - description: - 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: require('./codeableconcept.input'), - description: - 'Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.', - }, - timingTiming: { - type: require('./timing.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - timingDateTime: { - type: DateTimeScalar, - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - _timingDateTime: { - type: require('./element.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - timingPeriod: { - type: require('./period.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - timingRange: { - type: require('./range.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - location: { - type: require('./reference.input'), - description: - 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', - }, - participant: { - type: new GraphQLList(require('./activitydefinitionparticipant.input')), - description: - 'Indicates who should participate in performing the action described.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productReference: { - type: require('./reference.input'), - description: - 'Identifies the food, drug or other product being consumed or supplied in the activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Identifies the food, drug or other product being consumed or supplied in the activity.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).', - }, - dosage: { - type: new GraphQLList(require('./dosage.input')), - description: - 'Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", - }, - transform: { - type: require('./reference.input'), - description: - 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', - }, - dynamicValue: { - type: new GraphQLList( - require('./activitydefinitiondynamicvalue.input'), - ), - description: - "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the intent resource that would contain the result.", - }, - }), + description: 'Base StructureDefinition for ActivityDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ActivityDefinition_Enum_input', + values: { ActivityDefinition: { value: 'ActivityDefinition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the activity definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the activity definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this activity definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this activity definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the activity definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the activity definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the activity definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the activity definition.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the activity definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the activity definition from a consumer's perspective.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this activity definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this activity definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the asset is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the asset is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the activity definition content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate activity definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the activity definition is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.input.js')), + description: + 'A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + library: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to a Library resource containing any formal logic used by the asset.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + kind: { + type: CodeScalar, + description: + 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: require('./codeableconcept.input.js'), + description: + 'Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _timingDateTime: { + type: require('./element.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingRange: { + type: require('./range.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: GraphQLString, + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + participant: { + type: new GraphQLList( + require('./activitydefinitionparticipant.input.js'), + ), + description: + 'Indicates who should participate in performing the action described.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productReference: { + type: GraphQLString, + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).', + }, + dosage: { + type: new GraphQLList(require('./dosage.input.js')), + description: + 'Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", + }, + transform: { + type: GraphQLString, + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + dynamicValue: { + type: new GraphQLList( + require('./activitydefinitiondynamicvalue.input.js'), + ), + description: + "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the intent resource that would contain the result.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/activitydefinitiondynamicvalue.input.js b/src/resources/3_0_1/inputs/activitydefinitiondynamicvalue.input.js index a20f0d2c..bc75caab 100644 --- a/src/resources/3_0_1/inputs/activitydefinitiondynamicvalue.input.js +++ b/src/resources/3_0_1/inputs/activitydefinitiondynamicvalue.input.js @@ -1,55 +1,74 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ActivityDefinition.dynamicValue Input Schema + * @summary ActivityDefinitiondynamicValue Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ActivityDefinitionDynamicValue_Input', - description: - "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the intent resource that would contain the result.", - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: GraphQLString, - description: - 'A brief, natural language description of the intended semantics of the dynamic value.', - }, - _description: { - type: require('./element.input'), - description: - 'A brief, natural language description of the intended semantics of the dynamic value.', - }, - path: { - type: GraphQLString, - description: - 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', - }, - _path: { - type: require('./element.input'), - description: - 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', - }, - language: { - type: GraphQLString, - description: 'The media type of the language for the expression.', - }, - _language: { - type: require('./element.input'), - description: 'The media type of the language for the expression.', - }, - expression: { - type: GraphQLString, - description: - 'An expression specifying the value of the customized element.', - }, - _expression: { - type: require('./element.input'), - description: - 'An expression specifying the value of the customized element.', - }, - }), + name: 'ActivityDefinitiondynamicValue_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A brief, natural language description of the intended semantics of the dynamic value.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the intended semantics of the dynamic value.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', + }, + path: { + type: GraphQLString, + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', + }, + _language: { + type: require('./element.input.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: GraphQLString, + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'An expression specifying the value of the customized element.', + }, + expression: { + type: GraphQLString, + description: + 'An expression specifying the value of the customized element.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/activitydefinitionparticipant.input.js b/src/resources/3_0_1/inputs/activitydefinitionparticipant.input.js index 92ed95c6..f9185a06 100644 --- a/src/resources/3_0_1/inputs/activitydefinitionparticipant.input.js +++ b/src/resources/3_0_1/inputs/activitydefinitionparticipant.input.js @@ -1,33 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ActivityDefinition.participant Input Schema + * @summary ActivityDefinitionparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ActivityDefinitionParticipant_Input', - description: - 'Indicates who should participate in performing the action described.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-participant-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of participant in the action.', - }, - _type: { - type: require('./element.input'), - description: 'The type of participant in the action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-participant-role - role: { - type: require('./codeableconcept.input'), - description: - 'The role the participant should play in performing the described action.', - }, - }), + name: 'ActivityDefinitionparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of participant in the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-participant-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant in the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-participant-role + role: { + type: require('./codeableconcept.input.js'), + description: + 'The role the participant should play in performing the described action.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/address.input.js b/src/resources/3_0_1/inputs/address.input.js index a2384852..79968f59 100644 --- a/src/resources/3_0_1/inputs/address.input.js +++ b/src/resources/3_0_1/inputs/address.input.js @@ -1,12 +1,9 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -14,98 +11,112 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Address_Input', - description: 'Base StructureDefinition for Address Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/address-use - use: { - type: CodeScalar, - description: 'The purpose of this address.', - }, - _use: { - type: require('./element.input'), - description: 'The purpose of this address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/address-type - type: { - type: CodeScalar, - description: - 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', - }, - _type: { - type: require('./element.input'), - description: - 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', - }, - text: { - type: GraphQLString, - description: 'A full text representation of the address.', - }, - _text: { - type: require('./element.input'), - description: 'A full text representation of the address.', - }, - line: { - type: new GraphQLList(GraphQLString), - description: - 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', - }, - _line: { - type: require('./element.input'), - description: - 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', - }, - city: { - type: GraphQLString, - description: - 'The name of the city, town, village or other community or delivery center.', - }, - _city: { - type: require('./element.input'), - description: - 'The name of the city, town, village or other community or delivery center.', - }, - district: { - type: GraphQLString, - description: 'The name of the administrative area (county).', - }, - _district: { - type: require('./element.input'), - description: 'The name of the administrative area (county).', - }, - state: { - type: GraphQLString, - description: - 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', - }, - _state: { - type: require('./element.input'), - description: - 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', - }, - postalCode: { - type: GraphQLString, - description: - 'A postal code designating a region defined by the postal service.', - }, - _postalCode: { - type: require('./element.input'), - description: - 'A postal code designating a region defined by the postal service.', - }, - country: { - type: GraphQLString, - description: - 'Country - a nation as commonly understood or generally accepted.', - }, - _country: { - type: require('./element.input'), - description: - 'Country - a nation as commonly understood or generally accepted.', - }, - period: { - type: require('./period.input'), - description: 'Time period when address was/is in use.', - }, - }), + description: 'Base StructureDefinition for Address Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _use: { + type: require('./element.input.js'), + description: 'The purpose of this address.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/address-use + use: { + type: CodeScalar, + description: 'The purpose of this address.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/address-type + type: { + type: CodeScalar, + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + _text: { + type: require('./element.input.js'), + description: 'A full text representation of the address.', + }, + text: { + type: GraphQLString, + description: 'A full text representation of the address.', + }, + _line: { + type: require('./element.input.js'), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + line: { + type: new GraphQLList(GraphQLString), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + _city: { + type: require('./element.input.js'), + description: + 'The name of the city, town, village or other community or delivery center.', + }, + city: { + type: GraphQLString, + description: + 'The name of the city, town, village or other community or delivery center.', + }, + _district: { + type: require('./element.input.js'), + description: 'The name of the administrative area (county).', + }, + district: { + type: GraphQLString, + description: 'The name of the administrative area (county).', + }, + _state: { + type: require('./element.input.js'), + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', + }, + state: { + type: GraphQLString, + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', + }, + _postalCode: { + type: require('./element.input.js'), + description: + 'A postal code designating a region defined by the postal service.', + }, + postalCode: { + type: GraphQLString, + description: + 'A postal code designating a region defined by the postal service.', + }, + _country: { + type: require('./element.input.js'), + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + country: { + type: GraphQLString, + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period when address was/is in use.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/adverseevent.input.js b/src/resources/3_0_1/inputs/adverseevent.input.js index 85871bf1..47d07cc0 100644 --- a/src/resources/3_0_1/inputs/adverseevent.input.js +++ b/src/resources/3_0_1/inputs/adverseevent.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 AdverseEventResourceInputType = new GraphQLEnumType({ - name: 'AdverseEventResourceInputType', - values: { - AdverseEvent: { value: 'AdverseEvent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,104 +16,162 @@ let AdverseEventResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'AdverseEvent_Input', - description: 'Base StructureDefinition for AdverseEvent Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AdverseEventResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'The identifier(s) of this adverse event that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itsefl is not appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-category - category: { - type: CodeScalar, - description: - 'The type of event which is important to characterize what occurred and caused harm to the subject, or had the potential to cause harm to the subject.', - }, - _category: { - type: require('./element.input'), - description: - 'The type of event which is important to characterize what occurred and caused harm to the subject, or had the potential to cause harm to the subject.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-type - type: { - type: require('./codeableconcept.input'), - description: - 'This element defines the specific type of event that occurred or that was prevented from occurring.', - }, - subject: { - type: require('./reference.input'), - description: - 'This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the adverse event occurred.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and perhaps time) when the adverse event occurred.', - }, - reaction: { - type: new GraphQLList(require('./reference.input')), - description: - 'Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).', - }, - location: { - type: require('./reference.input'), - description: 'The information about where the adverse event occurred.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-seriousness - seriousness: { - type: require('./codeableconcept.input'), - description: - 'Describes the seriousness or severity of the adverse event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-outcome - outcome: { - type: require('./codeableconcept.input'), - description: 'Describes the type of outcome from the adverse event.', - }, - recorder: { - type: require('./reference.input'), - description: - 'Information on who recorded the adverse event. May be the patient or a practitioner.', - }, - eventParticipant: { - type: require('./reference.input'), - description: - 'Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g. consultant), information that the Act itself seeks to reveal (e.g. informant of clinical history), or information about what Act was performed (e.g. informant witness).', - }, - description: { - type: GraphQLString, - description: 'Describes the adverse event in text.', - }, - _description: { - type: require('./element.input'), - description: 'Describes the adverse event in text.', - }, - suspectEntity: { - type: new GraphQLList(require('./adverseeventsuspectentity.input')), - description: - 'Describes the entity that is suspected to have caused the adverse event.', - }, - subjectMedicalHistory: { - type: new GraphQLList(require('./reference.input')), - description: 'AdverseEvent.subjectMedicalHistory.', - }, - referenceDocument: { - type: new GraphQLList(require('./reference.input')), - description: 'AdverseEvent.referenceDocument.', - }, - study: { - type: new GraphQLList(require('./reference.input')), - description: 'AdverseEvent.study.', - }, - }), + description: 'Base StructureDefinition for AdverseEvent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AdverseEvent_Enum_input', + values: { AdverseEvent: { value: 'AdverseEvent' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'The identifier(s) of this adverse event that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itsefl is not appropriate.', + }, + _category: { + type: require('./element.input.js'), + description: + 'The type of event which is important to characterize what occurred and caused harm to the subject, or had the potential to cause harm to the subject.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-category + category: { + type: CodeScalar, + description: + 'The type of event which is important to characterize what occurred and caused harm to the subject, or had the potential to cause harm to the subject.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'This element defines the specific type of event that occurred or that was prevented from occurring.', + }, + subject: { + type: GraphQLString, + description: + 'This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the adverse event occurred.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the adverse event occurred.', + }, + reaction: { + type: new GraphQLList(GraphQLString), + description: + 'Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).', + }, + location: { + type: GraphQLString, + description: 'The information about where the adverse event occurred.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-seriousness + seriousness: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the seriousness or severity of the adverse event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: 'Describes the type of outcome from the adverse event.', + }, + recorder: { + type: GraphQLString, + description: + 'Information on who recorded the adverse event. May be the patient or a practitioner.', + }, + eventParticipant: { + type: GraphQLString, + description: + 'Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g. consultant), information that the Act itself seeks to reveal (e.g. informant of clinical history), or information about what Act was performed (e.g. informant witness).', + }, + _description: { + type: require('./element.input.js'), + description: 'Describes the adverse event in text.', + }, + description: { + type: GraphQLString, + description: 'Describes the adverse event in text.', + }, + suspectEntity: { + type: new GraphQLList(require('./adverseeventsuspectentity.input.js')), + description: + 'Describes the entity that is suspected to have caused the adverse event.', + }, + subjectMedicalHistory: { + type: new GraphQLList(GraphQLString), + description: 'AdverseEvent.subjectMedicalHistory.', + }, + referenceDocument: { + type: new GraphQLList(GraphQLString), + description: 'AdverseEvent.referenceDocument.', + }, + study: { + type: new GraphQLList(GraphQLString), + description: 'AdverseEvent.study.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/adverseeventsuspectentity.input.js b/src/resources/3_0_1/inputs/adverseeventsuspectentity.input.js index 682b80c1..cc67ab35 100644 --- a/src/resources/3_0_1/inputs/adverseeventsuspectentity.input.js +++ b/src/resources/3_0_1/inputs/adverseeventsuspectentity.input.js @@ -1,63 +1,79 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary AdverseEvent.suspectEntity Input Schema + * @summary AdverseEventsuspectEntity Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AdverseEventSuspectEntity_Input', - description: - 'Describes the entity that is suspected to have caused the adverse event.', - fields: () => - extendSchema(require('./backboneelement.input'), { - instance: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality - causality: { - type: CodeScalar, - description: 'causality1 | causality2.', - }, - _causality: { - type: require('./element.input'), - description: 'causality1 | causality2.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-assess - causalityAssessment: { - type: require('./codeableconcept.input'), - description: 'assess1 | assess2.', - }, - causalityProductRelatedness: { - type: GraphQLString, - description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', - }, - _causalityProductRelatedness: { - type: require('./element.input'), - description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-method - causalityMethod: { - type: require('./codeableconcept.input'), - description: 'method1 | method2.', - }, - causalityAuthor: { - type: require('./reference.input'), - description: 'AdverseEvent.suspectEntity.causalityAuthor.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-result - causalityResult: { - type: require('./codeableconcept.input'), - description: 'result1 | result2.', - }, - }), + name: 'AdverseEventsuspectEntity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + instance: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device.', + }, + _causality: { + type: require('./element.input.js'), + description: 'causality1 | causality2.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality + causality: { + type: CodeScalar, + description: 'causality1 | causality2.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-assess + causalityAssessment: { + type: require('./codeableconcept.input.js'), + description: 'assess1 | assess2.', + }, + _causalityProductRelatedness: { + type: require('./element.input.js'), + description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', + }, + causalityProductRelatedness: { + type: GraphQLString, + description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-method + causalityMethod: { + type: require('./codeableconcept.input.js'), + description: 'method1 | method2.', + }, + causalityAuthor: { + type: GraphQLString, + description: 'AdverseEvent.suspectEntity.causalityAuthor.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-result + causalityResult: { + type: require('./codeableconcept.input.js'), + description: 'result1 | result2.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/age.input.js b/src/resources/3_0_1/inputs/age.input.js index d4e23873..d4ea8565 100644 --- a/src/resources/3_0_1/inputs/age.input.js +++ b/src/resources/3_0_1/inputs/age.input.js @@ -1,7 +1,11 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Age_Input', - description: 'Base StructureDefinition for Age Type.', - fields: () => extendSchema(require('./quantity.input')), + description: 'Base StructureDefinition for Age Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/allergyintolerance.input.js b/src/resources/3_0_1/inputs/allergyintolerance.input.js index 899190f9..2271f88c 100644 --- a/src/resources/3_0_1/inputs/allergyintolerance.input.js +++ b/src/resources/3_0_1/inputs/allergyintolerance.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 AllergyIntoleranceResourceInputType = new GraphQLEnumType({ - name: 'AllergyIntoleranceResourceInputType', - values: { - AllergyIntolerance: { value: 'AllergyIntolerance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,153 +16,211 @@ let AllergyIntoleranceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'AllergyIntolerance_Input', - description: 'Base StructureDefinition for AllergyIntolerance Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AllergyIntoleranceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-clinical-status - clinicalStatus: { - type: CodeScalar, - description: 'The clinical status of the allergy or intolerance.', - }, - _clinicalStatus: { - type: require('./element.input'), - description: 'The clinical status of the allergy or intolerance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-verification-status - verificationStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', - }, - _verificationStatus: { - type: require('./element.input'), - description: - 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-type - type: { - type: CodeScalar, - description: - 'Identification of the underlying physiological mechanism for the reaction risk.', - }, - _type: { - type: require('./element.input'), - description: - 'Identification of the underlying physiological mechanism for the reaction risk.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-category - category: { - type: new GraphQLList(CodeScalar), - description: 'Category of the identified substance.', - }, - _category: { - type: require('./element.input'), - description: 'Category of the identified substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality - criticality: { - type: CodeScalar, - description: - 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', - }, - _criticality: { - type: require('./element.input'), - description: - 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergyintolerance-code - code: { - type: require('./codeableconcept.input'), - description: - "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., 'Latex'), an allergy or intolerance condition (e.g., 'Latex allergy'), or a negated/excluded code for a specific substance or class (e.g., 'No latex allergy') or a general or categorical negated statement (e.g., 'No known allergy', 'No known drug allergies').", - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient who has the allergy or intolerance.', - }, - onsetDateTime: { - type: DateTimeScalar, - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - _onsetDateTime: { - type: require('./element.input'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - onsetAge: { - type: require('./age.input'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - onsetPeriod: { - type: require('./period.input'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - onsetRange: { - type: require('./range.input'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - onsetString: { - type: GraphQLString, - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - _onsetString: { - type: require('./element.input'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - assertedDate: { - type: DateTimeScalar, - description: - 'The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.', - }, - _assertedDate: { - type: require('./element.input'), - description: - 'The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.', - }, - recorder: { - type: require('./reference.input'), - description: - 'Individual who recorded the record and takes responsibility for its content.', - }, - asserter: { - type: require('./reference.input'), - description: - 'The source of the information about the allergy that is recorded.', - }, - lastOccurrence: { - type: DateTimeScalar, - description: - 'Represents the date and/or time of the last known occurrence of a reaction event.', - }, - _lastOccurrence: { - type: require('./element.input'), - description: - 'Represents the date and/or time of the last known occurrence of a reaction event.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', - }, - reaction: { - type: new GraphQLList(require('./allergyintolerancereaction.input')), - description: - 'Details about each adverse reaction event linked to exposure to the identified substance.', - }, - }), + description: 'Base StructureDefinition for AllergyIntolerance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AllergyIntolerance_Enum_input', + values: { AllergyIntolerance: { value: 'AllergyIntolerance' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _clinicalStatus: { + type: require('./element.input.js'), + description: 'The clinical status of the allergy or intolerance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-clinical-status + clinicalStatus: { + type: CodeScalar, + description: 'The clinical status of the allergy or intolerance.', + }, + _verificationStatus: { + type: require('./element.input.js'), + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-verification-status + verificationStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', + }, + _type: { + type: require('./element.input.js'), + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-type + type: { + type: CodeScalar, + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + _category: { + type: require('./element.input.js'), + description: 'Category of the identified substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-category + category: { + type: new GraphQLList(CodeScalar), + description: 'Category of the identified substance.', + }, + _criticality: { + type: require('./element.input.js'), + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality + criticality: { + type: CodeScalar, + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergyintolerance-code + code: { + type: require('./codeableconcept.input.js'), + description: + "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., 'Latex'), an allergy or intolerance condition (e.g., 'Latex allergy'), or a negated/excluded code for a specific substance or class (e.g., 'No latex allergy') or a general or categorical negated statement (e.g., 'No known allergy', 'No known drug allergies').", + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who has the allergy or intolerance.', + }, + _onsetDateTime: { + type: require('./element.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetAge: { + type: require('./age.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetPeriod: { + type: require('./period.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetRange: { + type: require('./range.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + _onsetString: { + type: require('./element.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + _assertedDate: { + type: require('./element.input.js'), + description: + 'The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.', + }, + assertedDate: { + type: DateTimeScalar, + description: + 'The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.', + }, + recorder: { + type: GraphQLString, + description: + 'Individual who recorded the record and takes responsibility for its content.', + }, + asserter: { + type: GraphQLString, + description: + 'The source of the information about the allergy that is recorded.', + }, + _lastOccurrence: { + type: require('./element.input.js'), + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + lastOccurrence: { + type: DateTimeScalar, + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', + }, + reaction: { + type: new GraphQLList(require('./allergyintolerancereaction.input.js')), + description: + 'Details about each adverse reaction event linked to exposure to the identified substance.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/allergyintolerancereaction.input.js b/src/resources/3_0_1/inputs/allergyintolerancereaction.input.js index bc5ceaba..e7902402 100644 --- a/src/resources/3_0_1/inputs/allergyintolerancereaction.input.js +++ b/src/resources/3_0_1/inputs/allergyintolerancereaction.input.js @@ -1,80 +1,95 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary AllergyIntolerance.reaction Input Schema + * @summary AllergyIntolerancereaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AllergyIntoleranceReaction_Input', - description: - 'Details about each adverse reaction event linked to exposure to the identified substance.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - substance: { - type: require('./codeableconcept.input'), - description: - "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - manifestation: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.input')), - ), - description: - 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', - }, - description: { - type: GraphQLString, - description: - 'Text description about the reaction as a whole, including details of the manifestation if required.', - }, - _description: { - type: require('./element.input'), - description: - 'Text description about the reaction as a whole, including details of the manifestation if required.', - }, - onset: { - type: DateTimeScalar, - description: - 'Record of the date and/or time of the onset of the Reaction.', - }, - _onset: { - type: require('./element.input'), - description: - 'Record of the date and/or time of the onset of the Reaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-severity - severity: { - type: CodeScalar, - description: - 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', - }, - _severity: { - type: require('./element.input'), - description: - 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - exposureRoute: { - type: require('./codeableconcept.input'), - description: - 'Identification of the route by which the subject was exposed to the substance.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Additional text about the adverse reaction event not captured in other fields.', - }, - }), + name: 'AllergyIntolerancereaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + substance: { + type: require('./codeableconcept.input.js'), + description: + "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + manifestation: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.input.js')), + ), + description: + 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + description: { + type: GraphQLString, + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + _onset: { + type: require('./element.input.js'), + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + onset: { + type: DateTimeScalar, + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-severity + severity: { + type: CodeScalar, + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + exposureRoute: { + type: require('./codeableconcept.input.js'), + description: + 'Identification of the route by which the subject was exposed to the substance.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Additional text about the adverse reaction event not captured in other fields.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/annotation.input.js b/src/resources/3_0_1/inputs/annotation.input.js index bd7a64d4..bf79a810 100644 --- a/src/resources/3_0_1/inputs/annotation.input.js +++ b/src/resources/3_0_1/inputs/annotation.input.js @@ -1,12 +1,10 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -14,36 +12,50 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Annotation_Input', - description: 'Base StructureDefinition for Annotation Type.', - fields: () => - extendSchema(require('./element.input'), { - authorReference: { - type: require('./reference.input'), - description: 'The individual responsible for making the annotation.', - }, - authorString: { - type: GraphQLString, - description: 'The individual responsible for making the annotation.', - }, - _authorString: { - type: require('./element.input'), - description: 'The individual responsible for making the annotation.', - }, - time: { - type: DateTimeScalar, - description: 'Indicates when this particular annotation was made.', - }, - _time: { - type: require('./element.input'), - description: 'Indicates when this particular annotation was made.', - }, - text: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text of the annotation.', - }, - _text: { - type: require('./element.input'), - description: 'The text of the annotation.', - }, - }), + description: 'Base StructureDefinition for Annotation Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + authorReference: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _authorString: { + type: require('./element.input.js'), + description: 'The individual responsible for making the annotation.', + }, + authorString: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _time: { + type: require('./element.input.js'), + description: 'Indicates when this particular annotation was made.', + }, + time: { + type: DateTimeScalar, + description: 'Indicates when this particular annotation was made.', + }, + _text: { + type: require('./element.input.js'), + description: 'The text of the annotation.', + }, + text: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text of the annotation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/appointment.input.js b/src/resources/3_0_1/inputs/appointment.input.js index ca1b837c..6691c429 100644 --- a/src/resources/3_0_1/inputs/appointment.input.js +++ b/src/resources/3_0_1/inputs/appointment.input.js @@ -1,25 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 AppointmentResourceInputType = new GraphQLEnumType({ - name: 'AppointmentResourceInputType', - values: { - Appointment: { value: 'Appointment' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,153 +19,211 @@ let AppointmentResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Appointment_Input', - description: 'Base StructureDefinition for Appointment Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AppointmentResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', - }, - _status: { - type: require('./element.input'), - description: - 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-category - serviceCategory: { - type: require('./codeableconcept.input'), - description: - 'A broad categorisation of the service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-type - serviceType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The specific service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0276 - appointmentType: { - type: require('./codeableconcept.input'), - description: - 'The style of appointment or patient that has been booked in the slot (not service type).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The reason that this appointment is being scheduled. This is more clinical than administrative.', - }, - indication: { - type: new GraphQLList(require('./reference.input')), - description: - 'Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', - }, - priority: { - type: UnsignedIntScalar, - description: - 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', - }, - _priority: { - type: require('./element.input'), - description: - 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', - }, - description: { - type: GraphQLString, - description: - 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', - }, - _description: { - type: require('./element.input'), - description: - 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Additional information to support the appointment provided when making the appointment.', - }, - start: { - type: InstantScalar, - description: 'Date/Time that the appointment is to take place.', - }, - _start: { - type: require('./element.input'), - description: 'Date/Time that the appointment is to take place.', - }, - end: { - type: InstantScalar, - description: 'Date/Time that the appointment is to conclude.', - }, - _end: { - type: require('./element.input'), - description: 'Date/Time that the appointment is to conclude.', - }, - minutesDuration: { - type: PositiveIntScalar, - description: - 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', - }, - _minutesDuration: { - type: require('./element.input'), - description: - 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', - }, - slot: { - type: new GraphQLList(require('./reference.input')), - description: - "The slots from the participants' schedules that will be filled by the appointment.", - }, - created: { - type: DateTimeScalar, - description: - 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', - }, - _created: { - type: require('./element.input'), - description: - 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the appointment.', - }, - _comment: { - type: require('./element.input'), - description: 'Additional comments about the appointment.', - }, - incomingReferral: { - type: new GraphQLList(require('./reference.input')), - description: - 'The referral request this appointment is allocated to assess (incoming referral).', - }, - participant: { - type: new GraphQLList( - new GraphQLNonNull(require('./appointmentparticipant.input')), - ), - description: 'List of participants involved in the appointment.', - }, - requestedPeriod: { - type: new GraphQLList(require('./period.input')), - description: - 'A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. When using these values, the minutes duration should be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time.', - }, - }), + description: 'Base StructureDefinition for Appointment Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Appointment_Enum_input', + values: { Appointment: { value: 'Appointment' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _status: { + type: require('./element.input.js'), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-category + serviceCategory: { + type: require('./codeableconcept.input.js'), + description: + 'A broad categorisation of the service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-type + serviceType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specific service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0276 + appointmentType: { + type: require('./codeableconcept.input.js'), + description: + 'The style of appointment or patient that has been booked in the slot (not service type).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The reason that this appointment is being scheduled. This is more clinical than administrative.', + }, + indication: { + type: new GraphQLList(GraphQLString), + description: + 'Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + priority: { + type: UnsignedIntScalar, + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + _description: { + type: require('./element.input.js'), + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + description: { + type: GraphQLString, + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Additional information to support the appointment provided when making the appointment.', + }, + _start: { + type: require('./element.input.js'), + description: 'Date/Time that the appointment is to take place.', + }, + start: { + type: InstantScalar, + description: 'Date/Time that the appointment is to take place.', + }, + _end: { + type: require('./element.input.js'), + description: 'Date/Time that the appointment is to conclude.', + }, + end: { + type: InstantScalar, + description: 'Date/Time that the appointment is to conclude.', + }, + _minutesDuration: { + type: require('./element.input.js'), + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', + }, + minutesDuration: { + type: PositiveIntScalar, + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', + }, + slot: { + type: new GraphQLList(GraphQLString), + description: + "The slots from the participants' schedules that will be filled by the appointment.", + }, + _created: { + type: require('./element.input.js'), + description: + 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', + }, + created: { + type: DateTimeScalar, + description: + 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + incomingReferral: { + type: new GraphQLList(GraphQLString), + description: + 'The referral request this appointment is allocated to assess (incoming referral).', + }, + participant: { + type: new GraphQLList( + new GraphQLNonNull(require('./appointmentparticipant.input.js')), + ), + description: 'List of participants involved in the appointment.', + }, + requestedPeriod: { + type: new GraphQLList(require('./period.input.js')), + description: + 'A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. When using these values, the minutes duration should be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/appointmentparticipant.input.js b/src/resources/3_0_1/inputs/appointmentparticipant.input.js index 49725545..4f609cf1 100644 --- a/src/resources/3_0_1/inputs/appointmentparticipant.input.js +++ b/src/resources/3_0_1/inputs/appointmentparticipant.input.js @@ -1,51 +1,68 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLString, GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Appointment.participant Input Schema + * @summary Appointmentparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AppointmentParticipant_Input', - description: 'List of participants involved in the appointment.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Role of participant in the appointment.', - }, - actor: { - type: require('./reference.input'), - description: - 'A Person, Location/HealthcareService or Device that is participating in the appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participantrequired - required: { - type: CodeScalar, - description: - 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', - }, - _required: { - type: require('./element.input'), - description: - 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participationstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Participation status of the actor.', - }, - _status: { - type: require('./element.input'), - description: 'Participation status of the actor.', - }, - }), + name: 'Appointmentparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: GraphQLString, + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _required: { + type: require('./element.input.js'), + description: + 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participantrequired + required: { + type: CodeScalar, + description: + 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + _status: { + type: require('./element.input.js'), + description: 'Participation status of the actor.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participationstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Participation status of the actor.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/appointmentresponse.input.js b/src/resources/3_0_1/inputs/appointmentresponse.input.js index 9471f090..be867475 100644 --- a/src/resources/3_0_1/inputs/appointmentresponse.input.js +++ b/src/resources/3_0_1/inputs/appointmentresponse.input.js @@ -1,22 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -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 AppointmentResponseResourceInputType = new GraphQLEnumType({ - name: 'AppointmentResponseResourceInputType', - values: { - AppointmentResponse: { value: 'AppointmentResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,70 +16,128 @@ let AppointmentResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'AppointmentResponse_Input', - description: 'Base StructureDefinition for AppointmentResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AppointmentResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', - }, - appointment: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Appointment that this response is replying to.', - }, - start: { - type: InstantScalar, - description: - 'Date/Time that the appointment is to take place, or requested new start time.', - }, - _start: { - type: require('./element.input'), - description: - 'Date/Time that the appointment is to take place, or requested new start time.', - }, - end: { - type: InstantScalar, - description: - 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', - }, - _end: { - type: require('./element.input'), - description: - 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - participantType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Role of participant in the appointment.', - }, - actor: { - type: require('./reference.input'), - description: - 'A Person, Location/HealthcareService or Device that is participating in the appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participationstatus - participantStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', - }, - _participantStatus: { - type: require('./element.input'), - description: - 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the appointment.', - }, - _comment: { - type: require('./element.input'), - description: 'Additional comments about the appointment.', - }, - }), + description: 'Base StructureDefinition for AppointmentResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AppointmentResponse_Enum_input', + values: { AppointmentResponse: { value: 'AppointmentResponse' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + appointment: { + type: new GraphQLNonNull(GraphQLString), + description: 'Appointment that this response is replying to.', + }, + _start: { + type: require('./element.input.js'), + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + start: { + type: InstantScalar, + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + _end: { + type: require('./element.input.js'), + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + end: { + type: InstantScalar, + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + participantType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: GraphQLString, + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _participantStatus: { + type: require('./element.input.js'), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participationstatus + participantStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/attachment.input.js b/src/resources/3_0_1/inputs/attachment.input.js index c0a5ff48..95119d7a 100644 --- a/src/resources/3_0_1/inputs/attachment.input.js +++ b/src/resources/3_0_1/inputs/attachment.input.js @@ -1,12 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -14,83 +15,97 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Attachment_Input', - description: 'Base StructureDefinition for Attachment Type.', - fields: () => - extendSchema(require('./element.input'), { - contentType: { - type: CodeScalar, - description: - 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', - }, - _contentType: { - type: require('./element.input'), - description: - 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: - 'The human language of the content. The value can be any valid value according to BCP 47.', - }, - _language: { - type: require('./element.input'), - description: - 'The human language of the content. The value can be any valid value according to BCP 47.', - }, - data: { - type: Base64BinaryScalar, - description: - 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', - }, - _data: { - type: require('./element.input'), - description: - 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', - }, - url: { - type: UriScalar, - description: 'An alternative location where the data can be accessed.', - }, - _url: { - type: require('./element.input'), - description: 'An alternative location where the data can be accessed.', - }, - size: { - type: UnsignedIntScalar, - description: - 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', - }, - _size: { - type: require('./element.input'), - description: - 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', - }, - hash: { - type: Base64BinaryScalar, - description: - 'The calculated hash of the data using SHA-1. Represented using base64.', - }, - _hash: { - type: require('./element.input'), - description: - 'The calculated hash of the data using SHA-1. Represented using base64.', - }, - title: { - type: GraphQLString, - description: 'A label or set of text to display in place of the data.', - }, - _title: { - type: require('./element.input'), - description: 'A label or set of text to display in place of the data.', - }, - creation: { - type: DateTimeScalar, - description: 'The date that the attachment was first created.', - }, - _creation: { - type: require('./element.input'), - description: 'The date that the attachment was first created.', - }, - }), + description: 'Base StructureDefinition for Attachment Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _contentType: { + type: require('./element.input.js'), + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + contentType: { + type: CodeScalar, + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + _language: { + type: require('./element.input.js'), + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + _data: { + type: require('./element.input.js'), + description: + 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', + }, + data: { + type: Base64BinaryScalar, + description: + 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', + }, + _url: { + type: require('./element.input.js'), + description: 'An alternative location where the data can be accessed.', + }, + url: { + type: UriScalar, + description: 'An alternative location where the data can be accessed.', + }, + _size: { + type: require('./element.input.js'), + description: + 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', + }, + size: { + type: UnsignedIntScalar, + description: + 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', + }, + _hash: { + type: require('./element.input.js'), + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + hash: { + type: Base64BinaryScalar, + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + _title: { + type: require('./element.input.js'), + description: 'A label or set of text to display in place of the data.', + }, + title: { + type: GraphQLString, + description: 'A label or set of text to display in place of the data.', + }, + _creation: { + type: require('./element.input.js'), + description: 'The date that the attachment was first created.', + }, + creation: { + type: DateTimeScalar, + description: 'The date that the attachment was first created.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/auditevent.input.js b/src/resources/3_0_1/inputs/auditevent.input.js index 1975ff43..07ea6b8d 100644 --- a/src/resources/3_0_1/inputs/auditevent.input.js +++ b/src/resources/3_0_1/inputs/auditevent.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.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 AuditEventResourceInputType = new GraphQLEnumType({ - name: 'AuditEventResourceInputType', - values: { - AuditEvent: { value: 'AuditEvent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,81 +16,139 @@ let AuditEventResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'AuditEvent_Input', - description: 'Base StructureDefinition for AuditEvent Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(AuditEventResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-type - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-sub-type - subtype: { - type: new GraphQLList(require('./coding.input')), - description: 'Identifier for the category of event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-action - action: { - type: CodeScalar, - description: - 'Indicator for type of action performed during the event that generated the audit.', - }, - _action: { - type: require('./element.input'), - description: - 'Indicator for type of action performed during the event that generated the audit.', - }, - recorded: { - type: new GraphQLNonNull(InstantScalar), - description: 'The time when the event occurred on the source.', - }, - _recorded: { - type: require('./element.input'), - description: 'The time when the event occurred on the source.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-outcome - outcome: { - type: CodeScalar, - description: 'Indicates whether the event succeeded or failed.', - }, - _outcome: { - type: require('./element.input'), - description: 'Indicates whether the event succeeded or failed.', - }, - outcomeDesc: { - type: GraphQLString, - description: 'A free text description of the outcome of the event.', - }, - _outcomeDesc: { - type: require('./element.input'), - description: 'A free text description of the outcome of the event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purposeOfEvent: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The purposeOfUse (reason) that was used during the event being recorded.', - }, - agent: { - type: new GraphQLList( - new GraphQLNonNull(require('./auditeventagent.input')), - ), - description: - 'An actor taking an active role in the event or activity that is logged.', - }, - source: { - type: new GraphQLNonNull(require('./auditeventsource.input')), - description: 'The system that is reporting the event.', - }, - entity: { - type: new GraphQLList(require('./auditevententity.input')), - description: - 'Specific instances of data or objects that have been accessed.', - }, - }), + description: 'Base StructureDefinition for AuditEvent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AuditEvent_Enum_input', + values: { AuditEvent: { value: 'AuditEvent' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-type + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-sub-type + subtype: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Identifier for the category of event.', + }, + _action: { + type: require('./element.input.js'), + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-action + action: { + type: CodeScalar, + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + _recorded: { + type: require('./element.input.js'), + description: 'The time when the event occurred on the source.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time when the event occurred on the source.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Indicates whether the event succeeded or failed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-outcome + outcome: { + type: CodeScalar, + description: 'Indicates whether the event succeeded or failed.', + }, + _outcomeDesc: { + type: require('./element.input.js'), + description: 'A free text description of the outcome of the event.', + }, + outcomeDesc: { + type: GraphQLString, + description: 'A free text description of the outcome of the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purposeOfEvent: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The purposeOfUse (reason) that was used during the event being recorded.', + }, + agent: { + type: new GraphQLList( + new GraphQLNonNull(require('./auditeventagent.input.js')), + ), + description: + 'An actor taking an active role in the event or activity that is logged.', + }, + source: { + type: new GraphQLNonNull(require('./auditeventsource.input.js')), + description: 'The system that is reporting the event.', + }, + entity: { + type: new GraphQLList(require('./auditevententity.input.js')), + description: + 'Specific instances of data or objects that have been accessed.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/auditeventagent.input.js b/src/resources/3_0_1/inputs/auditeventagent.input.js index 9aac4def..6611b84d 100644 --- a/src/resources/3_0_1/inputs/auditeventagent.input.js +++ b/src/resources/3_0_1/inputs/auditeventagent.input.js @@ -1,99 +1,113 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary AuditEvent.agent Input Schema + * @summary AuditEventagent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventAgent_Input', - description: - 'An actor taking an active role in the event or activity that is logged.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-role-type - role: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.', - }, - reference: { - type: require('./reference.input'), - description: - 'Direct reference to a resource that identifies the agent.', - }, - userId: { - type: require('./identifier.input'), - description: - 'Unique identifier for the user actively participating in the event.', - }, - altId: { - type: GraphQLString, - description: - 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', - }, - _altId: { - type: require('./element.input'), - description: - 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', - }, - name: { - type: GraphQLString, - description: 'Human-meaningful name for the agent.', - }, - _name: { - type: require('./element.input'), - description: 'Human-meaningful name for the agent.', - }, - requestor: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', - }, - _requestor: { - type: require('./element.input'), - description: - 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', - }, - location: { - type: require('./reference.input'), - description: 'Where the event occurred.', - }, - policy: { - type: new GraphQLList(UriScalar), - description: - 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', - }, - _policy: { - type: require('./element.input'), - description: - 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicm-405-mediatype - media: { - type: require('./coding.input'), - description: - 'Type of media involved. Used when the event is about exporting/importing onto media.', - }, - network: { - type: require('./auditeventagentnetwork.input'), - description: - 'Logical network location for application activity, if the activity has a network location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purposeOfUse: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The reason (purpose of use), specific to this agent, that was used during the event being recorded.', - }, - }), + name: 'AuditEventagent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-role-type + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.', + }, + reference: { + type: GraphQLString, + description: 'Direct reference to a resource that identifies the agent.', + }, + userId: { + type: require('./identifier.input.js'), + description: + 'Unique identifier for the user actively participating in the event.', + }, + _altId: { + type: require('./element.input.js'), + description: + 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + altId: { + type: GraphQLString, + description: + 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + _name: { + type: require('./element.input.js'), + description: 'Human-meaningful name for the agent.', + }, + name: { + type: GraphQLString, + description: 'Human-meaningful name for the agent.', + }, + _requestor: { + type: require('./element.input.js'), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + requestor: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + location: { + type: GraphQLString, + description: 'Where the event occurred.', + }, + _policy: { + type: require('./element.input.js'), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicm-405-mediatype + media: { + type: require('./coding.input.js'), + description: + 'Type of media involved. Used when the event is about exporting/importing onto media.', + }, + network: { + type: require('./auditeventagentnetwork.input.js'), + description: + 'Logical network location for application activity, if the activity has a network location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purposeOfUse: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The reason (purpose of use), specific to this agent, that was used during the event being recorded.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/auditeventagentnetwork.input.js b/src/resources/3_0_1/inputs/auditeventagentnetwork.input.js index 0925a100..c45f5499 100644 --- a/src/resources/3_0_1/inputs/auditeventagentnetwork.input.js +++ b/src/resources/3_0_1/inputs/auditeventagentnetwork.input.js @@ -1,39 +1,58 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary AuditEvent.agent.network Input Schema + * @summary AuditEventagentnetwork Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventAgentNetwork_Input', - description: - 'Logical network location for application activity, if the activity has a network location.', - fields: () => - extendSchema(require('./backboneelement.input'), { - address: { - type: GraphQLString, - description: - 'An identifier for the network access point of the user device for the audit event.', - }, - _address: { - type: require('./element.input'), - description: - 'An identifier for the network access point of the user device for the audit event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/network-type - type: { - type: CodeScalar, - description: - 'An identifier for the type of network access point that originated the audit event.', - }, - _type: { - type: require('./element.input'), - description: - 'An identifier for the type of network access point that originated the audit event.', - }, - }), + name: 'AuditEventagentnetwork_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _address: { + type: require('./element.input.js'), + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + address: { + type: GraphQLString, + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + _type: { + type: require('./element.input.js'), + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/network-type + type: { + type: CodeScalar, + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/auditevententity.input.js b/src/resources/3_0_1/inputs/auditevententity.input.js index d2baa37f..a8f12240 100644 --- a/src/resources/3_0_1/inputs/auditevententity.input.js +++ b/src/resources/3_0_1/inputs/auditevententity.input.js @@ -1,82 +1,98 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary AuditEvent.entity Input Schema + * @summary AuditEvententity Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventEntity_Input', - description: 'Specific instances of data or objects that have been accessed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Identifies a specific instance of the entity. The reference should always be version specific.', - }, - reference: { - type: require('./reference.input'), - description: - 'Identifies a specific instance of the entity. The reference should be version specific.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-entity-type - type: { - type: require('./coding.input'), - description: - 'The type of the object that was involved in this audit event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-role - role: { - type: require('./coding.input'), - description: - 'Code representing the role the entity played in the event being audited.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-lifecycle-events - lifecycle: { - type: require('./coding.input'), - description: 'Identifier for the data life-cycle stage for the entity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.input')), - description: 'Security labels for the identified entity.', - }, - name: { - type: GraphQLString, - description: 'A name of the entity in the audit event.', - }, - _name: { - type: require('./element.input'), - description: 'A name of the entity in the audit event.', - }, - description: { - type: GraphQLString, - description: 'Text that describes the entity in more detail.', - }, - _description: { - type: require('./element.input'), - description: 'Text that describes the entity in more detail.', - }, - query: { - type: Base64BinaryScalar, - description: 'The query parameters for a query-type entities.', - }, - _query: { - type: require('./element.input'), - description: 'The query parameters for a query-type entities.', - }, - detail: { - type: new GraphQLList(require('./auditevententitydetail.input')), - description: - 'Tagged value pairs for conveying additional information about the entity.', - }, - }), + name: 'AuditEvententity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'Identifies a specific instance of the entity. The reference should always be version specific.', + }, + reference: { + type: GraphQLString, + description: + 'Identifies a specific instance of the entity. The reference should be version specific.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-entity-type + type: { + type: require('./coding.input.js'), + description: + 'The type of the object that was involved in this audit event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-role + role: { + type: require('./coding.input.js'), + description: + 'Code representing the role the entity played in the event being audited.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-lifecycle-events + lifecycle: { + type: require('./coding.input.js'), + description: 'Identifier for the data life-cycle stage for the entity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Security labels for the identified entity.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name of the entity in the audit event.', + }, + name: { + type: GraphQLString, + description: 'A name of the entity in the audit event.', + }, + _description: { + type: require('./element.input.js'), + description: 'Text that describes the entity in more detail.', + }, + description: { + type: GraphQLString, + description: 'Text that describes the entity in more detail.', + }, + _query: { + type: require('./element.input.js'), + description: 'The query parameters for a query-type entities.', + }, + query: { + type: Base64BinaryScalar, + description: 'The query parameters for a query-type entities.', + }, + detail: { + type: new GraphQLList(require('./auditevententitydetail.input.js')), + description: + 'Tagged value pairs for conveying additional information about the entity.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/auditevententitydetail.input.js b/src/resources/3_0_1/inputs/auditevententitydetail.input.js index ef8841d6..350bee18 100644 --- a/src/resources/3_0_1/inputs/auditevententitydetail.input.js +++ b/src/resources/3_0_1/inputs/auditevententitydetail.input.js @@ -1,40 +1,56 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary AuditEvent.entity.detail Input Schema + * @summary AuditEvententitydetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventEntityDetail_Input', - description: - 'Tagged value pairs for conveying additional information about the entity.', - fields: () => - extendSchema(require('./backboneelement.input'), { - type: { - type: new GraphQLNonNull(GraphQLString), - description: 'The type of extra detail provided in the value.', - }, - _type: { - type: require('./element.input'), - description: 'The type of extra detail provided in the value.', - }, - value: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: - 'The details, base64 encoded. Used to carry bulk information.', - }, - _value: { - type: require('./element.input'), - description: - 'The details, base64 encoded. Used to carry bulk information.', - }, - }), + name: 'AuditEvententitydetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of extra detail provided in the value.', + }, + type: { + type: new GraphQLNonNull(GraphQLString), + description: 'The type of extra detail provided in the value.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The details, base64 encoded. Used to carry bulk information.', + }, + value: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: + 'The details, base64 encoded. Used to carry bulk information.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/auditeventsource.input.js b/src/resources/3_0_1/inputs/auditeventsource.input.js index b712c6d5..725b985e 100644 --- a/src/resources/3_0_1/inputs/auditeventsource.input.js +++ b/src/resources/3_0_1/inputs/auditeventsource.input.js @@ -1,41 +1,56 @@ const { - GraphQLInputObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary AuditEvent.source Input Schema + * @summary AuditEventsource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'AuditEventSource_Input', - description: 'The system that is reporting the event.', - fields: () => - extendSchema(require('./backboneelement.input'), { - site: { - type: GraphQLString, - description: - 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', - }, - _site: { - type: require('./element.input'), - description: - 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: 'Identifier of the source where the event was detected.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-source-type - type: { - type: new GraphQLList(require('./coding.input')), - description: - 'Code specifying the type of source where event originated.', - }, - }), + name: 'AuditEventsource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _site: { + type: require('./element.input.js'), + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + site: { + type: GraphQLString, + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + identifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: 'Identifier of the source where the event was detected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-source-type + type: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Code specifying the type of source where event originated.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/backboneelement.input.js b/src/resources/3_0_1/inputs/backboneelement.input.js index db4546e1..1283f95c 100644 --- a/src/resources/3_0_1/inputs/backboneelement.input.js +++ b/src/resources/3_0_1/inputs/backboneelement.input.js @@ -1,7 +1,8 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports @@ -9,13 +10,27 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'BackboneElement_Input', - description: 'Base StructureDefinition for BackboneElement Type.', - fields: () => - extendSchema(require('./element.input'), { - modifierExtension: { - type: new GraphQLList(require('./extension.input')), - description: - 'May be used to represent additional information that is not part of the basic definition of the element, 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.', - }, - }), + description: 'Base StructureDefinition for BackboneElement Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/basic.input.js b/src/resources/3_0_1/inputs/basic.input.js index 248df32b..bc8300a1 100644 --- a/src/resources/3_0_1/inputs/basic.input.js +++ b/src/resources/3_0_1/inputs/basic.input.js @@ -1,21 +1,14 @@ -const DateScalar = require('../scalars/date.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 BasicResourceInputType = new GraphQLEnumType({ - name: 'BasicResourceInputType', - values: { - Basic: { value: 'Basic' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -23,41 +16,99 @@ let BasicResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Basic_Input', - description: 'Base StructureDefinition for Basic Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(BasicResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/basic-resource-type - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Identifies the 'type' of resource - equivalent to the resource name for other resources.", - }, - subject: { - type: require('./reference.input'), - description: - "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", - }, - created: { - type: DateScalar, - description: 'Identifies when the resource was first created.', - }, - _created: { - type: require('./element.input'), - description: 'Identifies when the resource was first created.', - }, - author: { - type: require('./reference.input'), - description: - 'Indicates who was responsible for creating the resource instance.', - }, - }), + description: 'Base StructureDefinition for Basic Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Basic_Enum_input', + values: { Basic: { value: 'Basic' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/basic-resource-type + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Identifies the 'type' of resource - equivalent to the resource name for other resources.", + }, + subject: { + type: GraphQLString, + description: + "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", + }, + _created: { + type: require('./element.input.js'), + description: 'Identifies when the resource was first created.', + }, + created: { + type: DateScalar, + description: 'Identifies when the resource was first created.', + }, + author: { + type: GraphQLString, + description: + 'Indicates who was responsible for creating the resource instance.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/binary.input.js b/src/resources/3_0_1/inputs/binary.input.js index 40279539..8c41cc43 100644 --- a/src/resources/3_0_1/inputs/binary.input.js +++ b/src/resources/3_0_1/inputs/binary.input.js @@ -1,21 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BinaryResourceInputType = new GraphQLEnumType({ - name: 'BinaryResourceInputType', - values: { - Binary: { value: 'Binary' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports @@ -23,35 +15,73 @@ let BinaryResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Binary_Input', - description: 'Base StructureDefinition for Binary Resource.', - fields: () => - extendSchema(require('./resource.input'), { - resourceType: { - type: new GraphQLNonNull(BinaryResourceInputType), - description: 'Type of this resource.', - }, - contentType: { - type: new GraphQLNonNull(CodeScalar), - description: - 'MimeType of the binary content represented as a standard MimeType (BCP 13).', - }, - _contentType: { - type: require('./element.input'), - description: - 'MimeType of the binary content represented as a standard MimeType (BCP 13).', - }, - securityContext: { - type: require('./reference.input'), - description: - 'Treat this binary as if it was this other resource for access control purposes.', - }, - content: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The actual content, base64 encoded.', - }, - _content: { - type: require('./element.input'), - description: 'The actual content, base64 encoded.', - }, - }), + description: 'Base StructureDefinition for Binary Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Binary_Enum_input', + values: { Binary: { value: 'Binary' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + _contentType: { + type: require('./element.input.js'), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + contentType: { + type: new GraphQLNonNull(CodeScalar), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + securityContext: { + type: GraphQLString, + description: + 'Treat this binary as if it was this other resource for access control purposes.', + }, + _content: { + type: require('./element.input.js'), + description: 'The actual content, base64 encoded.', + }, + content: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The actual content, base64 encoded.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/bodysite.input.js b/src/resources/3_0_1/inputs/bodysite.input.js index e6747775..c96a4f87 100644 --- a/src/resources/3_0_1/inputs/bodysite.input.js +++ b/src/resources/3_0_1/inputs/bodysite.input.js @@ -1,21 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BodySiteResourceInputType = new GraphQLEnumType({ - name: 'BodySiteResourceInputType', - values: { - BodySite: { value: 'BodySite' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,54 +16,111 @@ let BodySiteResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'BodySite_Input', - description: 'Base StructureDefinition for BodySite Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(BodySiteResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier for this instance of the anatomical location.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this body site is in active use.', - }, - _active: { - type: require('./element.input'), - description: 'Whether this body site is in active use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - code: { - type: require('./codeableconcept.input'), - description: - 'Named anatomical location - ideally coded where possible.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bodysite-relative-location - qualifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.', - }, - description: { - type: GraphQLString, - description: - 'A summary, charactarization or explanation of the anatomic location.', - }, - _description: { - type: require('./element.input'), - description: - 'A summary, charactarization or explanation of the anatomic location.', - }, - image: { - type: new GraphQLList(require('./attachment.input')), - description: 'Image or images used to identify a location.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The person to which the body site belongs.', - }, - }), + description: 'Base StructureDefinition for BodySite Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'BodySite_Enum_input', + values: { BodySite: { value: 'BodySite' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'Identifier for this instance of the anatomical location.', + }, + _active: { + type: require('./element.input.js'), + description: 'Whether this body site is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this body site is in active use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + code: { + type: require('./codeableconcept.input.js'), + description: 'Named anatomical location - ideally coded where possible.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bodysite-relative-location + qualifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A summary, charactarization or explanation of the anatomic location.', + }, + description: { + type: GraphQLString, + description: + 'A summary, charactarization or explanation of the anatomic location.', + }, + image: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image or images used to identify a location.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person to which the body site belongs.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/bundle.input.js b/src/resources/3_0_1/inputs/bundle.input.js index 568f685c..26a39303 100644 --- a/src/resources/3_0_1/inputs/bundle.input.js +++ b/src/resources/3_0_1/inputs/bundle.input.js @@ -1,22 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BundleResourceInputType = new GraphQLEnumType({ - name: 'BundleResourceInputType', - values: { - Bundle: { value: 'Bundle' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -24,51 +15,89 @@ let BundleResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Bundle_Input', - description: 'Base StructureDefinition for Bundle Resource.', - fields: () => - extendSchema(require('./resource.input'), { - resourceType: { - type: new GraphQLNonNull(BundleResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - "A persistent identifier for the batch that won't change as a batch is copied from server to server.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bundle-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the purpose of this bundle - how it was intended to be used.', - }, - _type: { - type: require('./element.input'), - description: - 'Indicates the purpose of this bundle - how it was intended to be used.', - }, - total: { - type: UnsignedIntScalar, - description: - 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', - }, - _total: { - type: require('./element.input'), - description: - 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', - }, - link: { - type: new GraphQLList(require('./bundlelink.input')), - description: 'A series of links that provide context to this bundle.', - }, - entry: { - type: new GraphQLList(require('./bundleentry.input')), - description: - 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', - }, - signature: { - type: require('./signature.input'), - description: 'Digital Signature - base64 encoded. XML-DSIg or a JWT.', - }, - }), + description: 'Base StructureDefinition for Bundle Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Bundle_Enum_input', + values: { Bundle: { value: 'Bundle' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + "A persistent identifier for the batch that won't change as a batch is copied from server to server.", + }, + _type: { + type: require('./element.input.js'), + description: + 'Indicates the purpose of this bundle - how it was intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bundle-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose of this bundle - how it was intended to be used.', + }, + _total: { + type: require('./element.input.js'), + description: + 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', + }, + total: { + type: UnsignedIntScalar, + description: + 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', + }, + link: { + type: new GraphQLList(require('./bundlelink.input.js')), + description: 'A series of links that provide context to this bundle.', + }, + entry: { + type: new GraphQLList(require('./bundleentry.input.js')), + description: + 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', + }, + signature: { + type: require('./signature.input.js'), + description: 'Digital Signature - base64 encoded. XML-DSIg or a JWT.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/bundleentry.input.js b/src/resources/3_0_1/inputs/bundleentry.input.js index ea922cfc..2419bb75 100644 --- a/src/resources/3_0_1/inputs/bundleentry.input.js +++ b/src/resources/3_0_1/inputs/bundleentry.input.js @@ -1,47 +1,66 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Bundle.entry Input Schema + * @summary Bundleentry Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleEntry_Input', - description: - 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', - fields: () => - extendSchema(require('./backboneelement.input'), { - fullUrl: { - type: UriScalar, - description: - 'The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', - }, - _fullUrl: { - type: require('./element.input'), - description: - 'The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', - }, - resource: { - type: GraphQLString, - description: 'The Resources for the entry.', - }, - search: { - type: require('./bundleentrysearch.input'), - description: - 'Information about the search process that lead to the creation of this entry.', - }, - request: { - type: require('./bundleentryrequest.input'), - description: - 'Additional information about how this entry should be processed as part of a transaction.', - }, - response: { - type: require('./bundleentryresponse.input'), - description: - 'Additional information about how this entry should be processed as part of a transaction.', - }, - }), + name: 'Bundleentry_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _fullUrl: { + type: require('./element.input.js'), + description: + 'The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', + }, + fullUrl: { + type: UriScalar, + description: + 'The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', + }, + resource: { + type: GraphQLString, + description: 'The Resources for the entry.', + }, + search: { + type: require('./bundleentrysearch.input.js'), + description: + 'Information about the search process that lead to the creation of this entry.', + }, + request: { + type: require('./bundleentryrequest.input.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction.', + }, + response: { + type: require('./bundleentryresponse.input.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/bundleentryrequest.input.js b/src/resources/3_0_1/inputs/bundleentryrequest.input.js index 99ffc8aa..19877cf0 100644 --- a/src/resources/3_0_1/inputs/bundleentryrequest.input.js +++ b/src/resources/3_0_1/inputs/bundleentryrequest.input.js @@ -1,85 +1,101 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary Bundle.entry.request Input Schema + * @summary Bundleentryrequest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleEntryRequest_Input', - description: - 'Additional information about how this entry should be processed as part of a transaction.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/http-verb - method: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The HTTP verb for this entry in either a change history, or a transaction/ transaction response.', - }, - _method: { - type: require('./element.input'), - description: - 'The HTTP verb for this entry in either a change history, or a transaction/ transaction response.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'The URL for this entry, relative to the root (the address to which the request is posted).', - }, - _url: { - type: require('./element.input'), - description: - 'The URL for this entry, relative to the root (the address to which the request is posted).', - }, - ifNoneMatch: { - type: GraphQLString, - description: - "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - _ifNoneMatch: { - type: require('./element.input'), - description: - "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - ifModifiedSince: { - type: InstantScalar, - description: - "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - _ifModifiedSince: { - type: require('./element.input'), - description: - "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - ifMatch: { - type: GraphQLString, - description: - "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", - }, - _ifMatch: { - type: require('./element.input'), - description: - "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", - }, - ifNoneExist: { - type: GraphQLString, - description: - "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", - }, - _ifNoneExist: { - type: require('./element.input'), - description: - "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", - }, - }), + name: 'Bundleentryrequest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _method: { + type: require('./element.input.js'), + description: + 'The HTTP verb for this entry in either a change history, or a transaction/ transaction response.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/http-verb + method: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The HTTP verb for this entry in either a change history, or a transaction/ transaction response.', + }, + _url: { + type: require('./element.input.js'), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + _ifNoneMatch: { + type: require('./element.input.js'), + description: + "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifNoneMatch: { + type: GraphQLString, + description: + "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifModifiedSince: { + type: require('./element.input.js'), + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifModifiedSince: { + type: InstantScalar, + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifMatch: { + type: require('./element.input.js'), + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + ifMatch: { + type: GraphQLString, + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + _ifNoneExist: { + type: require('./element.input.js'), + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + ifNoneExist: { + type: GraphQLString, + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/bundleentryresponse.input.js b/src/resources/3_0_1/inputs/bundleentryresponse.input.js index 81972f2a..7b53a894 100644 --- a/src/resources/3_0_1/inputs/bundleentryresponse.input.js +++ b/src/resources/3_0_1/inputs/bundleentryresponse.input.js @@ -1,68 +1,82 @@ -const UriScalar = require('../scalars/uri.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary Bundle.entry.response Input Schema + * @summary Bundleentryresponse Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleEntryResponse_Input', - description: - 'Additional information about how this entry should be processed as part of a transaction.', - fields: () => - extendSchema(require('./backboneelement.input'), { - status: { - type: new GraphQLNonNull(GraphQLString), - description: - '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.', - }, - _status: { - type: require('./element.input'), - description: - '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.', - }, - location: { - type: UriScalar, - description: - 'The location header created by processing this operation.', - }, - _location: { - type: require('./element.input'), - description: - 'The location header created by processing this operation.', - }, - etag: { - type: GraphQLString, - description: - 'The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', - }, - _etag: { - type: require('./element.input'), - description: - 'The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', - }, - lastModified: { - type: InstantScalar, - description: - 'The date/time that the resource was modified on the server.', - }, - _lastModified: { - type: require('./element.input'), - description: - 'The date/time that the resource was modified on the server.', - }, - outcome: { - type: GraphQLString, - description: - 'An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.', - }, - }), + name: 'Bundleentryresponse_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _status: { + type: require('./element.input.js'), + description: + '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.', + }, + status: { + type: new GraphQLNonNull(GraphQLString), + description: + '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.', + }, + _location: { + type: require('./element.input.js'), + description: 'The location header created by processing this operation.', + }, + location: { + type: UriScalar, + description: 'The location header created by processing this operation.', + }, + _etag: { + type: require('./element.input.js'), + description: + 'The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', + }, + etag: { + type: GraphQLString, + description: + 'The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', + }, + _lastModified: { + type: require('./element.input.js'), + description: + 'The date/time that the resource was modified on the server.', + }, + lastModified: { + type: InstantScalar, + description: + 'The date/time that the resource was modified on the server.', + }, + outcome: { + type: GraphQLString, + description: + 'An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/bundleentrysearch.input.js b/src/resources/3_0_1/inputs/bundleentrysearch.input.js index 8691d4e8..50de59c9 100644 --- a/src/resources/3_0_1/inputs/bundleentrysearch.input.js +++ b/src/resources/3_0_1/inputs/bundleentrysearch.input.js @@ -1,39 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLFloat } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Bundle.entry.search Input Schema + * @summary Bundleentrysearch Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleEntrySearch_Input', - description: - 'Information about the search process that lead to the creation of this entry.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-entry-mode - mode: { - type: CodeScalar, - description: - "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", - }, - _mode: { - type: require('./element.input'), - description: - "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", - }, - score: { - type: GraphQLFloat, - description: - "When searching, the server's search ranking score for the entry.", - }, - _score: { - type: require('./element.input'), - description: - "When searching, the server's search ranking score for the entry.", - }, - }), + name: 'Bundleentrysearch_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-entry-mode + mode: { + type: CodeScalar, + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", + }, + _score: { + type: require('./element.input.js'), + description: + "When searching, the server's search ranking score for the entry.", + }, + score: { + type: GraphQLFloat, + description: + "When searching, the server's search ranking score for the entry.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/bundlelink.input.js b/src/resources/3_0_1/inputs/bundlelink.input.js index 259d4970..6fcda388 100644 --- a/src/resources/3_0_1/inputs/bundlelink.input.js +++ b/src/resources/3_0_1/inputs/bundlelink.input.js @@ -1,39 +1,56 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Bundle.link Input Schema + * @summary Bundlelink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'BundleLink_Input', - description: 'A series of links that provide context to this bundle.', - fields: () => - extendSchema(require('./backboneelement.input'), { - relation: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', - }, - _relation: { - type: require('./element.input'), - description: - 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: 'The reference details for the link.', - }, - _url: { - type: require('./element.input'), - description: 'The reference details for the link.', - }, - }), + name: 'Bundlelink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _relation: { + type: require('./element.input.js'), + description: + 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', + }, + relation: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', + }, + _url: { + type: require('./element.input.js'), + description: 'The reference details for the link.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'The reference details for the link.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatement.input.js b/src/resources/3_0_1/inputs/capabilitystatement.input.js index 5e9cda3d..334dad6d 100644 --- a/src/resources/3_0_1/inputs/capabilitystatement.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatement.input.js @@ -1,25 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CapabilityStatementResourceInputType = new GraphQLEnumType({ - name: 'CapabilityStatementResourceInputType', - values: { - CapabilityStatement: { value: 'CapabilityStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,240 +17,298 @@ let CapabilityStatementResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'CapabilityStatement_Input', - description: 'Base StructureDefinition for CapabilityStatement Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CapabilityStatementResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the capability statement.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the capability statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this capability statement. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this capability statement. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the capability statement was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the capability statement was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the capability statement.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the capability statement.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate capability statement instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the capability statement is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this capability statement is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this capability statement is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/capability-statement-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', - }, - _kind: { - type: require('./element.input'), - description: - 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', - }, - instantiates: { - type: new GraphQLList(UriScalar), - description: - 'Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.', - }, - _instantiates: { - type: require('./element.input'), - description: - 'Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.', - }, - software: { - type: require('./capabilitystatementsoftware.input'), - description: - 'Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.', - }, - implementation: { - type: require('./capabilitystatementimplementation.input'), - description: - 'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.', - }, - fhirVersion: { - type: new GraphQLNonNull(IdScalar), - description: - 'The version of the FHIR specification on which this capability statement is based.', - }, - _fhirVersion: { - type: require('./element.input'), - description: - 'The version of the FHIR specification on which this capability statement is based.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/unknown-content-code - acceptUnknown: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', - }, - _acceptUnknown: { - type: require('./element.input'), - description: - 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', - }, - format: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: - 'A list of the formats supported by this implementation using their content types.', - }, - _format: { - type: require('./element.input'), - description: - 'A list of the formats supported by this implementation using their content types.', - }, - patchFormat: { - type: new GraphQLList(CodeScalar), - description: - 'A list of the patch formats supported by this implementation using their content types.', - }, - _patchFormat: { - type: require('./element.input'), - description: - 'A list of the patch formats supported by this implementation using their content types.', - }, - implementationGuide: { - type: new GraphQLList(UriScalar), - description: - 'A list of implementation guides that the server does (or should) support in their entirety.', - }, - _implementationGuide: { - type: require('./element.input'), - description: - 'A list of implementation guides that the server does (or should) support in their entirety.', - }, - profile: { - type: new GraphQLList(require('./reference.input')), - description: - "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", - }, - rest: { - type: new GraphQLList(require('./capabilitystatementrest.input')), - description: - 'A definition of the restful capabilities of the solution, if any.', - }, - messaging: { - type: new GraphQLList(require('./capabilitystatementmessaging.input')), - description: - 'A description of the messaging capabilities of the solution.', - }, - document: { - type: new GraphQLList(require('./capabilitystatementdocument.input')), - description: 'A document definition.', - }, - }), + description: 'Base StructureDefinition for CapabilityStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CapabilityStatement_Enum_input', + values: { CapabilityStatement: { value: 'CapabilityStatement' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the capability statement.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the capability statement.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this capability statement. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this capability statement. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the capability statement was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the capability statement was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the capability statement.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the capability statement.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate capability statement instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the capability statement is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this capability statement is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this capability statement is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/capability-statement-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + _instantiates: { + type: require('./element.input.js'), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.', + }, + instantiates: { + type: new GraphQLList(UriScalar), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.', + }, + software: { + type: require('./capabilitystatementsoftware.input.js'), + description: + 'Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.', + }, + implementation: { + type: require('./capabilitystatementimplementation.input.js'), + description: + 'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version of the FHIR specification on which this capability statement is based.', + }, + fhirVersion: { + type: new GraphQLNonNull(IdScalar), + description: + 'The version of the FHIR specification on which this capability statement is based.', + }, + _acceptUnknown: { + type: require('./element.input.js'), + description: + 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/unknown-content-code + acceptUnknown: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', + }, + _format: { + type: require('./element.input.js'), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + format: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + _patchFormat: { + type: require('./element.input.js'), + description: + 'A list of the patch formats supported by this implementation using their content types.', + }, + patchFormat: { + type: new GraphQLList(CodeScalar), + description: + 'A list of the patch formats supported by this implementation using their content types.', + }, + _implementationGuide: { + type: require('./element.input.js'), + description: + 'A list of implementation guides that the server does (or should) support in their entirety.', + }, + implementationGuide: { + type: new GraphQLList(UriScalar), + description: + 'A list of implementation guides that the server does (or should) support in their entirety.', + }, + profile: { + type: new GraphQLList(GraphQLString), + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + rest: { + type: new GraphQLList(require('./capabilitystatementrest.input.js')), + description: + 'A definition of the restful capabilities of the solution, if any.', + }, + messaging: { + type: new GraphQLList(require('./capabilitystatementmessaging.input.js')), + description: + 'A description of the messaging capabilities of the solution.', + }, + document: { + type: new GraphQLList(require('./capabilitystatementdocument.input.js')), + description: 'A document definition.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementdocument.input.js b/src/resources/3_0_1/inputs/capabilitystatementdocument.input.js index e69828ed..2ba64e52 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementdocument.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementdocument.input.js @@ -1,46 +1,63 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.document Input Schema + * @summary CapabilityStatementdocument Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementDocument_Input', - description: 'A document definition.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Mode of this document declaration - whether an application is a producer or consumer.', - }, - _mode: { - type: require('./element.input'), - description: - 'Mode of this document declaration - whether an application is a producer or consumer.', - }, - documentation: { - type: GraphQLString, - description: - 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', - }, - _documentation: { - type: require('./element.input'), - description: - 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', - }, - profile: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'A constraint on a resource used in the document.', - }, - }), + name: 'CapabilityStatementdocument_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'Mode of this document declaration - whether an application is a producer or consumer.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Mode of this document declaration - whether an application is a producer or consumer.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', + }, + profile: { + type: new GraphQLNonNull(GraphQLString), + description: 'A constraint on a resource used in the document.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementimplementation.input.js b/src/resources/3_0_1/inputs/capabilitystatementimplementation.input.js index aaab3a36..fbe7da68 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementimplementation.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementimplementation.input.js @@ -1,42 +1,58 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary CapabilityStatement.implementation Input Schema + * @summary CapabilityStatementimplementation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementImplementation_Input', - description: - 'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.', - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Information about the specific installation that this capability statement relates to.', - }, - _description: { - type: require('./element.input'), - description: - 'Information about the specific installation that this capability statement relates to.', - }, - url: { - type: UriScalar, - description: - 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', - }, - }), + name: 'CapabilityStatementimplementation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Information about the specific installation that this capability statement relates to.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Information about the specific installation that this capability statement relates to.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + url: { + type: UriScalar, + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementmessaging.input.js b/src/resources/3_0_1/inputs/capabilitystatementmessaging.input.js index 9623b496..3d357929 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementmessaging.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementmessaging.input.js @@ -1,62 +1,78 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary CapabilityStatement.messaging Input Schema + * @summary CapabilityStatementmessaging Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementMessaging_Input', - description: 'A description of the messaging capabilities of the solution.', - fields: () => - extendSchema(require('./backboneelement.input'), { - endpoint: { - type: new GraphQLList( - require('./capabilitystatementmessagingendpoint.input'), - ), - description: - 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', - }, - reliableCache: { - type: UnsignedIntScalar, - description: - "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", - }, - _reliableCache: { - type: require('./element.input'), - description: - "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", - }, - documentation: { - type: GraphQLString, - description: - "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", - }, - _documentation: { - type: require('./element.input'), - description: - "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", - }, - supportedMessage: { - type: new GraphQLList( - require('./capabilitystatementmessagingsupportedmessage.input'), - ), - description: - 'References to message definitions for messages this system can send or receive.', - }, - event: { - type: new GraphQLList( - require('./capabilitystatementmessagingevent.input'), - ), - description: - "A description of the solution's support for an event at this end-point.", - }, - }), + name: 'CapabilityStatementmessaging_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + endpoint: { + type: new GraphQLList( + require('./capabilitystatementmessagingendpoint.input.js'), + ), + description: + 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', + }, + _reliableCache: { + type: require('./element.input.js'), + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + reliableCache: { + type: UnsignedIntScalar, + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + _documentation: { + type: require('./element.input.js'), + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", + }, + documentation: { + type: GraphQLString, + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", + }, + supportedMessage: { + type: new GraphQLList( + require('./capabilitystatementmessagingsupportedmessage.input.js'), + ), + description: + 'References to message definitions for messages this system can send or receive.', + }, + event: { + type: new GraphQLList( + require('./capabilitystatementmessagingevent.input.js'), + ), + description: + "A description of the solution's support for an event at this end-point.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementmessagingendpoint.input.js b/src/resources/3_0_1/inputs/capabilitystatementmessagingendpoint.input.js index 50b1cd76..aaf1e25b 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementmessagingendpoint.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementmessagingendpoint.input.js @@ -1,34 +1,54 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary CapabilityStatement.messaging.endpoint Input Schema + * @summary CapabilityStatementmessagingendpoint Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementMessagingEndpoint_Input', - description: - 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-transport - protocol: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', - }, - address: { - type: new GraphQLNonNull(UriScalar), - description: - 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', - }, - _address: { - type: require('./element.input'), - description: - 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', - }, - }), + name: 'CapabilityStatementmessagingendpoint_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-transport + protocol: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', + }, + _address: { + type: require('./element.input.js'), + description: + 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + address: { + type: new GraphQLNonNull(UriScalar), + description: + 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementmessagingevent.input.js b/src/resources/3_0_1/inputs/capabilitystatementmessagingevent.input.js index e58d7961..fb8339ca 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementmessagingevent.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementmessagingevent.input.js @@ -1,76 +1,92 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.messaging.event Input Schema + * @summary CapabilityStatementmessagingevent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementMessagingEvent_Input', - description: - "A description of the solution's support for an event at this end-point.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'A coded identifier of a supported messaging event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category - category: { - type: CodeScalar, - description: 'The impact of the content of the message.', - }, - _category: { - type: require('./element.input'), - description: 'The impact of the content of the message.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-capability-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The mode of this event declaration - whether an application is a sender or receiver.', - }, - _mode: { - type: require('./element.input'), - description: - 'The mode of this event declaration - whether an application is a sender or receiver.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - focus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A resource associated with the event. This is the resource that defines the event.', - }, - _focus: { - type: require('./element.input'), - description: - 'A resource associated with the event. This is the resource that defines the event.', - }, - request: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Information about the request for this event.', - }, - response: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Information about the response for this event.', - }, - documentation: { - type: GraphQLString, - description: - 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', - }, - _documentation: { - type: require('./element.input'), - description: - 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', - }, - }), + name: 'CapabilityStatementmessagingevent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'A coded identifier of a supported messaging event.', + }, + _category: { + type: require('./element.input.js'), + description: 'The impact of the content of the message.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category + category: { + type: CodeScalar, + description: 'The impact of the content of the message.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'The mode of this event declaration - whether an application is a sender or receiver.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-capability-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The mode of this event declaration - whether an application is a sender or receiver.', + }, + _focus: { + type: require('./element.input.js'), + description: + 'A resource associated with the event. This is the resource that defines the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + focus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A resource associated with the event. This is the resource that defines the event.', + }, + request: { + type: new GraphQLNonNull(GraphQLString), + description: 'Information about the request for this event.', + }, + response: { + type: new GraphQLNonNull(GraphQLString), + description: 'Information about the response for this event.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementmessagingsupportedmessage.input.js b/src/resources/3_0_1/inputs/capabilitystatementmessagingsupportedmessage.input.js index bfc2e168..92596169 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementmessagingsupportedmessage.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementmessagingsupportedmessage.input.js @@ -1,34 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.messaging.supportedMessage Input Schema + * @summary CapabilityStatementmessagingsupportedMessage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementMessagingSupportedMessage_Input', - description: - 'References to message definitions for messages this system can send or receive.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-capability-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The mode of this event declaration - whether application is sender or receiver.', - }, - _mode: { - type: require('./element.input'), - description: - 'The mode of this event declaration - whether application is sender or receiver.', - }, - definition: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', - }, - }), + name: 'CapabilityStatementmessagingsupportedMessage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-capability-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + definition: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementrest.input.js b/src/resources/3_0_1/inputs/capabilitystatementrest.input.js index e26dd32c..888ad56b 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementrest.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementrest.input.js @@ -1,81 +1,96 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest Input Schema + * @summary CapabilityStatementrest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementRest_Input', - description: - 'A definition of the restful capabilities of the solution, if any.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/restful-capability-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', - }, - _mode: { - type: require('./element.input'), - description: - 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', - }, - documentation: { - type: GraphQLString, - description: - "Information about the system's restful capabilities that apply across all applications, such as security.", - }, - _documentation: { - type: require('./element.input'), - description: - "Information about the system's restful capabilities that apply across all applications, such as security.", - }, - security: { - type: require('./capabilitystatementrestsecurity.input'), - description: - 'Information about security implementation from an interface perspective - what a client needs to know.', - }, - resource: { - type: new GraphQLList( - require('./capabilitystatementrestresource.input'), - ), - description: - 'A specification of the restful capabilities of the solution for a specific resource type.', - }, - interaction: { - type: new GraphQLList( - require('./capabilitystatementrestinteraction.input'), - ), - description: - 'A specification of restful operations supported by the system.', - }, - operation: { - type: new GraphQLList( - require('./capabilitystatementrestoperation.input'), - ), - description: - 'Definition of an operation or a named query together with its parameters and their meaning and type.', - }, - compartment: { - type: new GraphQLList(UriScalar), - description: - 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', - }, - _compartment: { - type: require('./element.input'), - description: - 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', - }, - }), + name: 'CapabilityStatementrest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/restful-capability-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', + }, + _documentation: { + type: require('./element.input.js'), + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + documentation: { + type: GraphQLString, + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + security: { + type: require('./capabilitystatementrestsecurity.input.js'), + description: + 'Information about security implementation from an interface perspective - what a client needs to know.', + }, + resource: { + type: new GraphQLList( + require('./capabilitystatementrestresource.input.js'), + ), + description: + 'A specification of the restful capabilities of the solution for a specific resource type.', + }, + interaction: { + type: new GraphQLList( + require('./capabilitystatementrestinteraction.input.js'), + ), + description: + 'A specification of restful operations supported by the system.', + }, + operation: { + type: new GraphQLList( + require('./capabilitystatementrestoperation.input.js'), + ), + description: + 'Definition of an operation or a named query together with its parameters and their meaning and type.', + }, + _compartment: { + type: require('./element.input.js'), + description: + 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', + }, + compartment: { + type: new GraphQLList(UriScalar), + description: + 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementrestinteraction.input.js b/src/resources/3_0_1/inputs/capabilitystatementrestinteraction.input.js index 666df86c..b194df3a 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementrestinteraction.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementrestinteraction.input.js @@ -1,42 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.interaction Input Schema + * @summary CapabilityStatementrestinteraction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementRestInteraction_Input', - description: 'A specification of restful operations supported by the system.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/system-restful-interaction - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A coded identifier of the operation, supported by the system.', - }, - _code: { - type: require('./element.input'), - description: - 'A coded identifier of the operation, supported by the system.', - }, - documentation: { - type: GraphQLString, - description: - 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', - }, - _documentation: { - type: require('./element.input'), - description: - 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', - }, - }), + name: 'CapabilityStatementrestinteraction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A coded identifier of the operation, supported by the system.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/system-restful-interaction + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A coded identifier of the operation, supported by the system.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementrestoperation.input.js b/src/resources/3_0_1/inputs/capabilitystatementrestoperation.input.js index 94881f36..4537e33a 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementrestoperation.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementrestoperation.input.js @@ -1,35 +1,51 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary CapabilityStatement.rest.operation Input Schema + * @summary CapabilityStatementrestoperation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementRestOperation_Input', - description: - 'Definition of an operation or a named query together with its parameters and their meaning and type.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', - }, - definition: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Where the formal definition can be found.', - }, - }), + name: 'CapabilityStatementrestoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', + }, + definition: { + type: new GraphQLNonNull(GraphQLString), + description: 'Where the formal definition can be found.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementrestresource.input.js b/src/resources/3_0_1/inputs/capabilitystatementrestresource.input.js index 17b45157..2ec351ff 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementrestresource.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementrestresource.input.js @@ -1,166 +1,178 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.resource Input Schema + * @summary CapabilityStatementrestresource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementRestResource_Input', - description: - 'A specification of the restful capabilities of the solution for a specific resource type.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'A type of resource exposed via the restful interface.', - }, - _type: { - type: require('./element.input'), - description: 'A type of resource exposed via the restful interface.', - }, - profile: { - type: require('./reference.input'), - description: - "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", - }, - documentation: { - type: GraphQLString, - description: - 'Additional information about the resource type used by the system.', - }, - _documentation: { - type: require('./element.input'), - description: - 'Additional information about the resource type used by the system.', - }, - interaction: { - type: new GraphQLList( - new GraphQLNonNull( - require('./capabilitystatementrestresourceinteraction.input'), - ), - ), - description: - 'Identifies a restful operation supported by the solution.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/versioning-policy - versioning: { - type: CodeScalar, - description: - "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", - }, - _versioning: { - type: require('./element.input'), - description: - "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", - }, - readHistory: { - type: GraphQLBoolean, - description: - 'A flag for whether the server is able to return past versions as part of the vRead operation.', - }, - _readHistory: { - type: require('./element.input'), - description: - 'A flag for whether the server is able to return past versions as part of the vRead operation.', - }, - updateCreate: { - type: GraphQLBoolean, - description: - 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', - }, - _updateCreate: { - type: require('./element.input'), - description: - 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', - }, - conditionalCreate: { - type: GraphQLBoolean, - description: - 'A flag that indicates that the server supports conditional create.', - }, - _conditionalCreate: { - type: require('./element.input'), - description: - 'A flag that indicates that the server supports conditional create.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conditional-read-status - conditionalRead: { - type: CodeScalar, - description: - 'A code that indicates how the server supports conditional read.', - }, - _conditionalRead: { - type: require('./element.input'), - description: - 'A code that indicates how the server supports conditional read.', - }, - conditionalUpdate: { - type: GraphQLBoolean, - description: - 'A flag that indicates that the server supports conditional update.', - }, - _conditionalUpdate: { - type: require('./element.input'), - description: - 'A flag that indicates that the server supports conditional update.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conditional-delete-status - conditionalDelete: { - type: CodeScalar, - description: - 'A code that indicates how the server supports conditional delete.', - }, - _conditionalDelete: { - type: require('./element.input'), - description: - 'A code that indicates how the server supports conditional delete.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reference-handling-policy - referencePolicy: { - type: new GraphQLList(CodeScalar), - description: - 'A set of flags that defines how references are supported.', - }, - _referencePolicy: { - type: require('./element.input'), - description: - 'A set of flags that defines how references are supported.', - }, - searchInclude: { - type: new GraphQLList(GraphQLString), - description: 'A list of _include values supported by the server.', - }, - _searchInclude: { - type: require('./element.input'), - description: 'A list of _include values supported by the server.', - }, - searchRevInclude: { - type: new GraphQLList(GraphQLString), - description: - 'A list of _revinclude (reverse include) values supported by the server.', - }, - _searchRevInclude: { - type: require('./element.input'), - description: - 'A list of _revinclude (reverse include) values supported by the server.', - }, - searchParam: { - type: new GraphQLList( - require('./capabilitystatementrestresourcesearchparam.input'), + name: 'CapabilityStatementrestresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'A type of resource exposed via the restful interface.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'A type of resource exposed via the restful interface.', + }, + profile: { + type: GraphQLString, + description: + "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Additional information about the resource type used by the system.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional information about the resource type used by the system.', + }, + interaction: { + type: new GraphQLList( + new GraphQLNonNull( + require('./capabilitystatementrestresourceinteraction.input.js'), ), - description: - 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', - }, - }), + ), + description: 'Identifies a restful operation supported by the solution.', + }, + _versioning: { + type: require('./element.input.js'), + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/versioning-policy + versioning: { + type: CodeScalar, + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + _readHistory: { + type: require('./element.input.js'), + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + readHistory: { + type: GraphQLBoolean, + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + _updateCreate: { + type: require('./element.input.js'), + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + updateCreate: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + _conditionalCreate: { + type: require('./element.input.js'), + description: + 'A flag that indicates that the server supports conditional create.', + }, + conditionalCreate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional create.', + }, + _conditionalRead: { + type: require('./element.input.js'), + description: + 'A code that indicates how the server supports conditional read.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conditional-read-status + conditionalRead: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional read.', + }, + _conditionalUpdate: { + type: require('./element.input.js'), + description: + 'A flag that indicates that the server supports conditional update.', + }, + conditionalUpdate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional update.', + }, + _conditionalDelete: { + type: require('./element.input.js'), + description: + 'A code that indicates how the server supports conditional delete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conditional-delete-status + conditionalDelete: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional delete.', + }, + _referencePolicy: { + type: require('./element.input.js'), + description: 'A set of flags that defines how references are supported.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reference-handling-policy + referencePolicy: { + type: new GraphQLList(CodeScalar), + description: 'A set of flags that defines how references are supported.', + }, + _searchInclude: { + type: require('./element.input.js'), + description: 'A list of _include values supported by the server.', + }, + searchInclude: { + type: new GraphQLList(GraphQLString), + description: 'A list of _include values supported by the server.', + }, + _searchRevInclude: { + type: require('./element.input.js'), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchRevInclude: { + type: new GraphQLList(GraphQLString), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchParam: { + type: new GraphQLList( + require('./capabilitystatementrestresourcesearchparam.input.js'), + ), + description: + 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementrestresourceinteraction.input.js b/src/resources/3_0_1/inputs/capabilitystatementrestresourceinteraction.input.js index 67ca5ebd..90ec30b7 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementrestresourceinteraction.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementrestresourceinteraction.input.js @@ -1,42 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.resource.interaction Input Schema + * @summary CapabilityStatementrestresourceinteraction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementRestResourceInteraction_Input', - description: 'Identifies a restful operation supported by the solution.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/type-restful-interaction - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Coded identifier of the operation, supported by the system resource.', - }, - _code: { - type: require('./element.input'), - description: - 'Coded identifier of the operation, supported by the system resource.', - }, - documentation: { - type: GraphQLString, - description: - "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", - }, - _documentation: { - type: require('./element.input'), - description: - "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", - }, - }), + name: 'CapabilityStatementrestresourceinteraction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/type-restful-interaction + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + _documentation: { + type: require('./element.input.js'), + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + documentation: { + type: GraphQLString, + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementrestresourcesearchparam.input.js b/src/resources/3_0_1/inputs/capabilitystatementrestresourcesearchparam.input.js index 9e082aee..fda06da4 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementrestresourcesearchparam.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementrestresourcesearchparam.input.js @@ -1,62 +1,78 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.resource.searchParam Input Schema + * @summary CapabilityStatementrestresourcesearchParam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementRestResourceSearchParam_Input', - description: - 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name of the search parameter used in the interface.', - }, - _name: { - type: require('./element.input'), - description: 'The name of the search parameter used in the interface.', - }, - definition: { - type: UriScalar, - description: - 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url]()).', - }, - _definition: { - type: require('./element.input'), - description: - 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url]()).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - _type: { - type: require('./element.input'), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - documentation: { - type: GraphQLString, - description: - 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', - }, - _documentation: { - type: require('./element.input'), - description: - 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', - }, - }), + name: 'CapabilityStatementrestresourcesearchParam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of the search parameter used in the interface.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the search parameter used in the interface.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url]()).', + }, + definition: { + type: UriScalar, + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url]()).', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + documentation: { + type: GraphQLString, + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementrestsecurity.input.js b/src/resources/3_0_1/inputs/capabilitystatementrestsecurity.input.js index 2d66f988..588bb614 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementrestsecurity.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementrestsecurity.input.js @@ -1,52 +1,67 @@ const { - GraphQLInputObjectType, - GraphQLBoolean, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary CapabilityStatement.rest.security Input Schema + * @summary CapabilityStatementrestsecurity Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementRestSecurity_Input', - description: - 'Information about security implementation from an interface perspective - what a client needs to know.', - fields: () => - extendSchema(require('./backboneelement.input'), { - cors: { - type: GraphQLBoolean, - description: - 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', - }, - _cors: { - type: require('./element.input'), - description: - 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/restful-security-service - service: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Types of security services that are supported/required by the system.', - }, - description: { - type: GraphQLString, - description: 'General description of how security works.', - }, - _description: { - type: require('./element.input'), - description: 'General description of how security works.', - }, - certificate: { - type: new GraphQLList( - require('./capabilitystatementrestsecuritycertificate.input'), - ), - description: 'Certificates associated with security profiles.', - }, - }), + name: 'CapabilityStatementrestsecurity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _cors: { + type: require('./element.input.js'), + description: + 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', + }, + cors: { + type: GraphQLBoolean, + description: + 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/restful-security-service + service: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Types of security services that are supported/required by the system.', + }, + _description: { + type: require('./element.input.js'), + description: 'General description of how security works.', + }, + description: { + type: GraphQLString, + description: 'General description of how security works.', + }, + certificate: { + type: new GraphQLList( + require('./capabilitystatementrestsecuritycertificate.input.js'), + ), + description: 'Certificates associated with security profiles.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementrestsecuritycertificate.input.js b/src/resources/3_0_1/inputs/capabilitystatementrestsecuritycertificate.input.js index 10629f65..a68c389a 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementrestsecuritycertificate.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementrestsecuritycertificate.input.js @@ -1,34 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.security.certificate Input Schema + * @summary CapabilityStatementrestsecuritycertificate Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementRestSecurityCertificate_Input', - description: 'Certificates associated with security profiles.', - fields: () => - extendSchema(require('./backboneelement.input'), { - type: { - type: CodeScalar, - description: 'Mime type for a certificate.', - }, - _type: { - type: require('./element.input'), - description: 'Mime type for a certificate.', - }, - blob: { - type: Base64BinaryScalar, - description: 'Actual certificate.', - }, - _blob: { - type: require('./element.input'), - description: 'Actual certificate.', - }, - }), + name: 'CapabilityStatementrestsecuritycertificate_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'Mime type for a certificate.', + }, + type: { + type: CodeScalar, + description: 'Mime type for a certificate.', + }, + _blob: { + type: require('./element.input.js'), + description: 'Actual certificate.', + }, + blob: { + type: Base64BinaryScalar, + description: 'Actual certificate.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/capabilitystatementsoftware.input.js b/src/resources/3_0_1/inputs/capabilitystatementsoftware.input.js index ac097ba5..9313afe0 100644 --- a/src/resources/3_0_1/inputs/capabilitystatementsoftware.input.js +++ b/src/resources/3_0_1/inputs/capabilitystatementsoftware.input.js @@ -1,48 +1,64 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary CapabilityStatement.software Input Schema + * @summary CapabilityStatementsoftware Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CapabilityStatementSoftware_Input', - description: - 'Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Name software is known by.', - }, - _name: { - type: require('./element.input'), - description: 'Name software is known by.', - }, - version: { - type: GraphQLString, - description: - 'The version identifier for the software covered by this statement.', - }, - _version: { - type: require('./element.input'), - description: - 'The version identifier for the software covered by this statement.', - }, - releaseDate: { - type: DateTimeScalar, - description: 'Date this version of the software was released.', - }, - _releaseDate: { - type: require('./element.input'), - description: 'Date this version of the software was released.', - }, - }), + name: 'CapabilityStatementsoftware_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Name software is known by.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name software is known by.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version identifier for the software covered by this statement.', + }, + version: { + type: GraphQLString, + description: + 'The version identifier for the software covered by this statement.', + }, + _releaseDate: { + type: require('./element.input.js'), + description: 'Date this version of the software was released.', + }, + releaseDate: { + type: DateTimeScalar, + description: 'Date this version of the software was released.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/careplan.input.js b/src/resources/3_0_1/inputs/careplan.input.js index 502b04b0..42aa30fd 100644 --- a/src/resources/3_0_1/inputs/careplan.input.js +++ b/src/resources/3_0_1/inputs/careplan.input.js @@ -1,21 +1,13 @@ -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 CarePlanResourceInputType = new GraphQLEnumType({ - name: 'CarePlanResourceInputType', - values: { - CarePlan: { value: 'CarePlan' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,130 +15,188 @@ let CarePlanResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'CarePlan_Input', - description: 'Base StructureDefinition for CarePlan Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CarePlanResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies the protocol, questionnaire, guideline or other specification the care plan should be conducted in accordance with.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A care plan that is fulfilled in whole or in part by this care plan.', - }, - replaces: { - type: new GraphQLList(require('./reference.input')), - description: - 'Completed or terminated care plan whose function is taken by this new care plan.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: - 'A larger care plan of which this particular care plan is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', - }, - _status: { - type: require('./element.input'), - description: - 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', - }, - _intent: { - type: require('./element.input'), - description: - 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", - }, - title: { - type: GraphQLString, - description: 'Human-friendly name for the CarePlan.', - }, - _title: { - type: require('./element.input'), - description: 'Human-friendly name for the CarePlan.', - }, - description: { - type: GraphQLString, - description: 'A description of the scope and nature of the plan.', - }, - _description: { - type: require('./element.input'), - description: 'A description of the scope and nature of the plan.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the patient or group whose intended care is described by the plan.', - }, - context: { - type: require('./reference.input'), - description: - 'Identifies the original context in which this particular CarePlan was created.', - }, - period: { - type: require('./period.input'), - description: - 'Indicates when the plan did (or is intended to) come into effect and end.', - }, - author: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', - }, - careTeam: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', - }, - addresses: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', - }, - supportingInfo: { - type: new GraphQLList(require('./reference.input')), - description: - "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", - }, - goal: { - type: new GraphQLList(require('./reference.input')), - description: - 'Describes the intended objective(s) of carrying out the care plan.', - }, - activity: { - type: new GraphQLList(require('./careplanactivity.input')), - description: - 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: 'General notes about the care plan not covered elsewhere.', - }, - }), + description: 'Base StructureDefinition for CarePlan Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CarePlan_Enum_input', + values: { CarePlan: { value: 'CarePlan' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the protocol, questionnaire, guideline or other specification the care plan should be conducted in accordance with.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A care plan that is fulfilled in whole or in part by this care plan.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'Completed or terminated care plan whose function is taken by this new care plan.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger care plan of which this particular care plan is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", + }, + _title: { + type: require('./element.input.js'), + description: 'Human-friendly name for the CarePlan.', + }, + title: { + type: GraphQLString, + description: 'Human-friendly name for the CarePlan.', + }, + _description: { + type: require('./element.input.js'), + description: 'A description of the scope and nature of the plan.', + }, + description: { + type: GraphQLString, + description: 'A description of the scope and nature of the plan.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the patient or group whose intended care is described by the plan.', + }, + context: { + type: GraphQLString, + description: + 'Identifies the original context in which this particular CarePlan was created.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates when the plan did (or is intended to) come into effect and end.', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', + }, + careTeam: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', + }, + addresses: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", + }, + goal: { + type: new GraphQLList(GraphQLString), + description: + 'Describes the intended objective(s) of carrying out the care plan.', + }, + activity: { + type: new GraphQLList(require('./careplanactivity.input.js')), + description: + 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'General notes about the care plan not covered elsewhere.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/careplanactivity.input.js b/src/resources/3_0_1/inputs/careplanactivity.input.js index 38d9a905..9eb22a9f 100644 --- a/src/resources/3_0_1/inputs/careplanactivity.input.js +++ b/src/resources/3_0_1/inputs/careplanactivity.input.js @@ -1,43 +1,61 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary CarePlan.activity Input Schema + * @summary CarePlanactivity Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CarePlanActivity_Input', - description: - 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-outcome - outcomeCodeableConcept: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).', - }, - outcomeReference: { - type: new GraphQLList(require('./reference.input')), - description: - "Details of the outcome or action resulting from the activity. The reference to an 'event' resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).", - }, - progress: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Notes about the adherence/status/progress of the activity.', - }, - reference: { - type: require('./reference.input'), - description: - 'The details of the proposed activity represented in a specific resource.', - }, - detail: { - type: require('./careplanactivitydetail.input'), - description: - "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", - }, - }), + name: 'CarePlanactivity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-outcome + outcomeCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).', + }, + outcomeReference: { + type: new GraphQLList(GraphQLString), + description: + "Details of the outcome or action resulting from the activity. The reference to an 'event' resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).", + }, + progress: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Notes about the adherence/status/progress of the activity.', + }, + reference: { + type: GraphQLString, + description: + 'The details of the proposed activity represented in a specific resource.', + }, + detail: { + type: require('./careplanactivitydetail.input.js'), + description: + "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/careplanactivitydetail.input.js b/src/resources/3_0_1/inputs/careplanactivitydetail.input.js index f5d2da8e..7b394821 100644 --- a/src/resources/3_0_1/inputs/careplanactivitydetail.input.js +++ b/src/resources/3_0_1/inputs/careplanactivitydetail.input.js @@ -1,150 +1,164 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLString, GraphQLList, GraphQLNonNull, - GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CarePlan.activity.detail Input Schema + * @summary CarePlanactivitydetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CarePlanActivityDetail_Input', - description: - "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-category - category: { - type: require('./codeableconcept.input'), - description: - 'High-level categorization of the type of activity in a care plan.', - }, - definition: { - type: require('./reference.input'), - description: - 'Identifies the protocol, questionnaire, guideline or other specification the planned activity should be conducted in accordance with.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity - code: { - type: require('./codeableconcept.input'), - description: - 'Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/activity-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', - }, - goal: { - type: new GraphQLList(require('./reference.input')), - description: - 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies what progress is being made for the specific activity.', - }, - _status: { - type: require('./element.input'), - description: - 'Identifies what progress is being made for the specific activity.', - }, - statusReason: { - type: GraphQLString, - description: - "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", - }, - _statusReason: { - type: require('./element.input'), - description: - "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", - }, - prohibited: { - type: GraphQLBoolean, - description: - 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, indicates that the described activity is one that should be engaged in when following the plan.', - }, - _prohibited: { - type: require('./element.input'), - description: - 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, indicates that the described activity is one that should be engaged in when following the plan.', - }, - scheduledTiming: { - type: require('./timing.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - scheduledPeriod: { - type: require('./period.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - scheduledString: { - type: GraphQLString, - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - _scheduledString: { - type: require('./element.input'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - location: { - type: require('./reference.input'), - description: - 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', - }, - performer: { - type: new GraphQLList(require('./reference.input')), - description: - "Identifies who's expected to be involved in the activity.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Identifies the food, drug or other product to be consumed or supplied in the activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productReference: { - type: require('./reference.input'), - description: - 'Identifies the food, drug or other product to be consumed or supplied in the activity.', - }, - dailyAmount: { - type: require('./quantity.input'), - description: - 'Identifies the quantity expected to be consumed in a given day.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', - }, - description: { - type: GraphQLString, - description: - 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', - }, - _description: { - type: require('./element.input'), - description: - 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', - }, - }), + name: 'CarePlanactivitydetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'High-level categorization of the type of activity in a care plan.', + }, + definition: { + type: GraphQLString, + description: + 'Identifies the protocol, questionnaire, guideline or other specification the planned activity should be conducted in accordance with.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity + code: { + type: require('./codeableconcept.input.js'), + description: + 'Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/activity-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', + }, + goal: { + type: new GraphQLList(GraphQLString), + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Identifies what progress is being made for the specific activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies what progress is being made for the specific activity.', + }, + _statusReason: { + type: require('./element.input.js'), + description: + "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", + }, + statusReason: { + type: GraphQLString, + description: + "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", + }, + _prohibited: { + type: require('./element.input.js'), + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, indicates that the described activity is one that should be engaged in when following the plan.', + }, + prohibited: { + type: GraphQLBoolean, + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, indicates that the described activity is one that should be engaged in when following the plan.', + }, + scheduledTiming: { + type: require('./timing.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledPeriod: { + type: require('./period.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _scheduledString: { + type: require('./element.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledString: { + type: GraphQLString, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: GraphQLString, + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: "Identifies who's expected to be involved in the activity.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productReference: { + type: GraphQLString, + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + dailyAmount: { + type: require('./quantity.input.js'), + description: + 'Identifies the quantity expected to be consumed in a given day.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', + }, + _description: { + type: require('./element.input.js'), + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + description: { + type: GraphQLString, + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/careteam.input.js b/src/resources/3_0_1/inputs/careteam.input.js index 1eb735bc..cbe3a163 100644 --- a/src/resources/3_0_1/inputs/careteam.input.js +++ b/src/resources/3_0_1/inputs/careteam.input.js @@ -1,21 +1,13 @@ -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 CareTeamResourceInputType = new GraphQLEnumType({ - name: 'CareTeamResourceInputType', - values: { - CareTeam: { value: 'CareTeam' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,79 +15,137 @@ let CareTeamResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'CareTeam_Input', - description: 'Base StructureDefinition for CareTeam Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CareTeamResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-team-status - status: { - type: CodeScalar, - description: 'Indicates the current state of the care team.', - }, - _status: { - type: require('./element.input'), - description: 'Indicates the current state of the care team.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-team-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.', - }, - name: { - type: GraphQLString, - description: - "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", - }, - _name: { - type: require('./element.input'), - description: - "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", - }, - subject: { - type: require('./reference.input'), - description: - 'Identifies the patient or group whose intended care is handled by the team.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode of care that establishes the context for this care team.', - }, - period: { - type: require('./period.input'), - description: - 'Indicates when the team did (or is intended to) come into effect and end.', - }, - participant: { - type: new GraphQLList(require('./careteamparticipant.input')), - description: - 'Identifies all people and organizations who are expected to be involved in the care team.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Describes why the care team exists.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: 'Condition(s) that this care team addresses.', - }, - managingOrganization: { - type: new GraphQLList(require('./reference.input')), - description: 'The organization responsible for the care team.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: 'Comments made about the CareTeam.', - }, - }), + description: 'Base StructureDefinition for CareTeam Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CareTeam_Enum_input', + values: { CareTeam: { value: 'CareTeam' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current state of the care team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-team-status + status: { + type: CodeScalar, + description: 'Indicates the current state of the care team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-team-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.', + }, + _name: { + type: require('./element.input.js'), + description: + "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", + }, + name: { + type: GraphQLString, + description: + "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", + }, + subject: { + type: GraphQLString, + description: + 'Identifies the patient or group whose intended care is handled by the team.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care that establishes the context for this care team.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates when the team did (or is intended to) come into effect and end.', + }, + participant: { + type: new GraphQLList(require('./careteamparticipant.input.js')), + description: + 'Identifies all people and organizations who are expected to be involved in the care team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Describes why the care team exists.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: 'Condition(s) that this care team addresses.', + }, + managingOrganization: { + type: new GraphQLList(GraphQLString), + description: 'The organization responsible for the care team.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Comments made about the CareTeam.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/careteamparticipant.input.js b/src/resources/3_0_1/inputs/careteamparticipant.input.js index 3d2d1a31..bd5b6746 100644 --- a/src/resources/3_0_1/inputs/careteamparticipant.input.js +++ b/src/resources/3_0_1/inputs/careteamparticipant.input.js @@ -1,37 +1,56 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary CareTeam.participant Input Schema + * @summary CareTeamparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CareTeamParticipant_Input', - description: - 'Identifies all people and organizations who are expected to be involved in the care team.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - role: { - type: require('./codeableconcept.input'), - description: - "Indicates specific responsibility of an individual within the care team, such as 'Primary care physician', 'Trained social worker counselor', 'Caregiver', etc.", - }, - member: { - type: require('./reference.input'), - description: - 'The specific person or organization who is participating/expected to participate in the care team.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: 'The organization of the practitioner.', - }, - period: { - type: require('./period.input'), - description: - 'Indicates when the specific member or organization did (or is intended to) come into effect and end.', - }, - }), + name: 'CareTeamparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + role: { + type: require('./codeableconcept.input.js'), + description: + "Indicates specific responsibility of an individual within the care team, such as 'Primary care physician', 'Trained social worker counselor', 'Caregiver', etc.", + }, + member: { + type: GraphQLString, + description: + 'The specific person or organization who is participating/expected to participate in the care team.', + }, + onBehalfOf: { + type: GraphQLString, + description: 'The organization of the practitioner.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates when the specific member or organization did (or is intended to) come into effect and end.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/chargeitem.input.js b/src/resources/3_0_1/inputs/chargeitem.input.js index fbce64f1..983890f1 100644 --- a/src/resources/3_0_1/inputs/chargeitem.input.js +++ b/src/resources/3_0_1/inputs/chargeitem.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ChargeItemResourceInputType = new GraphQLEnumType({ - name: 'ChargeItemResourceInputType', - values: { - ChargeItem: { value: 'ChargeItem' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,160 +17,217 @@ let ChargeItemResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ChargeItem_Input', - description: 'Base StructureDefinition for ChargeItem Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ChargeItemResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Identifiers assigned to this event performer or other systems.', - }, - definition: { - type: new GraphQLList(UriScalar), - description: - 'References the source of pricing information, rules of application for the code this ChargeItem uses.', - }, - _definition: { - type: require('./element.input'), - description: - 'References the source of pricing information, rules of application for the code this ChargeItem uses.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/chargeitem-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current state of the ChargeItem.', - }, - _status: { - type: require('./element.input'), - description: 'The current state of the ChargeItem.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: - 'ChargeItems can be grouped to larger ChargeItems covering the whole set.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/chargeitem-billingcodes - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'A code that identifies the charge, like a billing code.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The individual or set of individuals the action is being or was performed on.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode of care that establishes the context for this event.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - 'Date/time(s) or duration when the charged service was applied.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: - 'Date/time(s) or duration when the charged service was applied.', - }, - occurrencePeriod: { - type: require('./period.input'), - description: - 'Date/time(s) or duration when the charged service was applied.', - }, - occurrenceTiming: { - type: require('./timing.input'), - description: - 'Date/time(s) or duration when the charged service was applied.', - }, - participant: { - type: new GraphQLList(require('./chargeitemparticipant.input')), - description: - 'Indicates who or what performed or participated in the charged service.', - }, - performingOrganization: { - type: require('./reference.input'), - description: 'The organization requesting the service.', - }, - requestingOrganization: { - type: require('./reference.input'), - description: 'The organization performing the service.', - }, - quantity: { - type: require('./quantity.input'), - description: 'Quantity of which the charge item has been serviced.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodysite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The anatomical location where the related service has been applied.', - }, - factorOverride: { - type: GraphQLFloat, - description: - 'Factor overriding the factor determined by the rules associated with the code.', - }, - _factorOverride: { - type: require('./element.input'), - description: - 'Factor overriding the factor determined by the rules associated with the code.', - }, - priceOverride: { - type: require('./money.input'), - description: - 'Total price of the charge overriding the list price associated with the code.', - }, - overrideReason: { - type: GraphQLString, - description: - 'If the list price or the rule based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', - }, - _overrideReason: { - type: require('./element.input'), - description: - 'If the list price or the rule based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', - }, - enterer: { - type: require('./reference.input'), - description: - 'The device, practitioner, etc. who entered the charge item.', - }, - enteredDate: { - type: DateTimeScalar, - description: 'Date the charge item was entered.', - }, - _enteredDate: { - type: require('./element.input'), - description: 'Date the charge item was entered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Describes why the event occurred in coded or textual form.', - }, - service: { - type: new GraphQLList(require('./reference.input')), - description: 'Indicated the rendered service that caused this charge.', - }, - account: { - type: new GraphQLList(require('./reference.input')), - description: 'Account into which this ChargeItems belongs.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Comments made about the event by the performer, subject or other participants.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.input')), - description: 'Further information supporting the this charge.', - }, - }), + description: 'Base StructureDefinition for ChargeItem Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ChargeItem_Enum_input', + values: { ChargeItem: { value: 'ChargeItem' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'Identifiers assigned to this event performer or other systems.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'References the source of pricing information, rules of application for the code this ChargeItem uses.', + }, + definition: { + type: new GraphQLList(UriScalar), + description: + 'References the source of pricing information, rules of application for the code this ChargeItem uses.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the ChargeItem.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/chargeitem-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the ChargeItem.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'ChargeItems can be grouped to larger ChargeItems covering the whole set.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/chargeitem-billingcodes + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code that identifies the charge, like a billing code.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The individual or set of individuals the action is being or was performed on.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care that establishes the context for this event.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + participant: { + type: new GraphQLList(require('./chargeitemparticipant.input.js')), + description: + 'Indicates who or what performed or participated in the charged service.', + }, + performingOrganization: { + type: GraphQLString, + description: 'The organization requesting the service.', + }, + requestingOrganization: { + type: GraphQLString, + description: 'The organization performing the service.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'Quantity of which the charge item has been serviced.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodysite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The anatomical location where the related service has been applied.', + }, + _factorOverride: { + type: require('./element.input.js'), + description: + 'Factor overriding the factor determined by the rules associated with the code.', + }, + factorOverride: { + type: GraphQLFloat, + description: + 'Factor overriding the factor determined by the rules associated with the code.', + }, + priceOverride: { + type: require('./money.input.js'), + description: + 'Total price of the charge overriding the list price associated with the code.', + }, + _overrideReason: { + type: require('./element.input.js'), + description: + 'If the list price or the rule based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', + }, + overrideReason: { + type: GraphQLString, + description: + 'If the list price or the rule based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', + }, + enterer: { + type: GraphQLString, + description: + 'The device, practitioner, etc. who entered the charge item.', + }, + _enteredDate: { + type: require('./element.input.js'), + description: 'Date the charge item was entered.', + }, + enteredDate: { + type: DateTimeScalar, + description: 'Date the charge item was entered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Describes why the event occurred in coded or textual form.', + }, + service: { + type: new GraphQLList(GraphQLString), + description: 'Indicated the rendered service that caused this charge.', + }, + account: { + type: new GraphQLList(GraphQLString), + description: 'Account into which this ChargeItems belongs.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the event by the performer, subject or other participants.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: 'Further information supporting the this charge.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/chargeitemparticipant.input.js b/src/resources/3_0_1/inputs/chargeitemparticipant.input.js index 1bfb4a3c..b1fdb334 100644 --- a/src/resources/3_0_1/inputs/chargeitemparticipant.input.js +++ b/src/resources/3_0_1/inputs/chargeitemparticipant.input.js @@ -1,28 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ChargeItem.participant Input Schema + * @summary ChargeItemparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ChargeItemParticipant_Input', - description: - 'Indicates who or what performed or participated in the charged service.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/performer-role - role: { - type: require('./codeableconcept.input'), - description: - 'Describes the type of performance or participation(e.g. primary surgeon, anaesthesiologiest, etc.).', - }, - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device, practitioner, etc. who performed or participated in the service.', - }, - }), + name: 'ChargeItemparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/performer-role + role: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the type of performance or participation(e.g. primary surgeon, anaesthesiologiest, etc.).', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device, practitioner, etc. who performed or participated in the service.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claim.input.js b/src/resources/3_0_1/inputs/claim.input.js index ee22e619..72b4b8e4 100644 --- a/src/resources/3_0_1/inputs/claim.input.js +++ b/src/resources/3_0_1/inputs/claim.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ClaimResourceInputType = new GraphQLEnumType({ - name: 'ClaimResourceInputType', - values: { - Claim: { value: 'Claim' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,174 +16,230 @@ let ClaimResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Claim_Input', - description: 'Base StructureDefinition for Claim Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ClaimResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'The business identifier for the instance: claim number, pre-determination or pre-authorization number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-type - type: { - type: require('./codeableconcept.input'), - description: - 'The category of claim, eg, oral, pharmacy, vision, insitutional, professional.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-subtype - subType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-use - use: { - type: CodeScalar, - description: - 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', - }, - _use: { - type: require('./element.input'), - description: - 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', - }, - patient: { - type: require('./reference.input'), - description: 'Patient Resource.', - }, - billablePeriod: { - type: require('./period.input'), - description: - 'The billable period for which charges are being submitted.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - enterer: { - type: require('./reference.input'), - description: - 'Person who created the invoice/claim/pre-determination or pre-authorization.', - }, - insurer: { - type: require('./reference.input'), - description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.input'), - description: - 'The provider which is responsible for the bill, claim pre-determination, pre-authorization.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the bill, claim pre-determination, pre-authorization.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-priority - priority: { - type: require('./codeableconcept.input'), - description: - 'Immediate (STAT), best effort (NORMAL), deferred (DEFER).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve - fundsReserve: { - type: require('./codeableconcept.input'), - description: - "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", - }, - related: { - type: new GraphQLList(require('./claimrelated.input')), - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - }, - prescription: { - type: require('./reference.input'), - description: - 'Prescription to support the dispensing of Pharmacy or Vision products.', - }, - originalPrescription: { - type: require('./reference.input'), - description: - "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new precription for an alternate medication which has the same theraputic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", - }, - payee: { - type: require('./claimpayee.input'), - description: 'The party to be reimbursed for the services.', - }, - referral: { - type: require('./reference.input'), - description: - 'The referral resource which lists the date, practitioner, reason and other supporting information.', - }, - facility: { - type: require('./reference.input'), - description: 'Facility where the services were provided.', - }, - careTeam: { - type: new GraphQLList(require('./claimcareteam.input')), - description: - 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', - }, - information: { - type: new GraphQLList(require('./claiminformation.input')), - description: - 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', - }, - diagnosis: { - type: new GraphQLList(require('./claimdiagnosis.input')), - description: 'List of patient diagnosis for which care is sought.', - }, - procedure: { - type: new GraphQLList(require('./claimprocedure.input')), - description: - 'Ordered list of patient procedures performed to support the adjudication.', - }, - insurance: { - type: new GraphQLList(require('./claiminsurance.input')), - description: - 'Financial instrument by which payment information for health care.', - }, - accident: { - type: require('./claimaccident.input'), - description: - 'An accident which resulted in the need for healthcare services.', - }, - employmentImpacted: { - type: require('./period.input'), - description: - 'The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).', - }, - hospitalization: { - type: require('./period.input'), - description: - 'The start and optional end dates of when the patient was confined to a treatment center.', - }, - item: { - type: new GraphQLList(require('./claimitem.input')), - description: 'First tier of goods and services.', - }, - total: { - type: require('./money.input'), - description: 'The total value of the claim.', - }, - }), + description: 'Base StructureDefinition for Claim Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Claim_Enum_input', + values: { Claim: { value: 'Claim' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'The business identifier for the instance: claim number, pre-determination or pre-authorization number.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'The category of claim, eg, oral, pharmacy, vision, insitutional, professional.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-subtype + subType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.', + }, + _use: { + type: require('./element.input.js'), + description: + 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-use + use: { + type: CodeScalar, + description: + 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', + }, + patient: { + type: GraphQLString, + description: 'Patient Resource.', + }, + billablePeriod: { + type: require('./period.input.js'), + description: 'The billable period for which charges are being submitted.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + enterer: { + type: GraphQLString, + description: + 'Person who created the invoice/claim/pre-determination or pre-authorization.', + }, + insurer: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + provider: { + type: GraphQLString, + description: + 'The provider which is responsible for the bill, claim pre-determination, pre-authorization.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the bill, claim pre-determination, pre-authorization.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-priority + priority: { + type: require('./codeableconcept.input.js'), + description: 'Immediate (STAT), best effort (NORMAL), deferred (DEFER).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve + fundsReserve: { + type: require('./codeableconcept.input.js'), + description: + "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", + }, + related: { + type: new GraphQLList(require('./claimrelated.input.js')), + description: + 'Other claims which are related to this claim such as prior claim versions or for related services.', + }, + prescription: { + type: GraphQLString, + description: + 'Prescription to support the dispensing of Pharmacy or Vision products.', + }, + originalPrescription: { + type: GraphQLString, + description: + "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new precription for an alternate medication which has the same theraputic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", + }, + payee: { + type: require('./claimpayee.input.js'), + description: 'The party to be reimbursed for the services.', + }, + referral: { + type: GraphQLString, + description: + 'The referral resource which lists the date, practitioner, reason and other supporting information.', + }, + facility: { + type: GraphQLString, + description: 'Facility where the services were provided.', + }, + careTeam: { + type: new GraphQLList(require('./claimcareteam.input.js')), + description: + 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', + }, + information: { + type: new GraphQLList(require('./claiminformation.input.js')), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', + }, + diagnosis: { + type: new GraphQLList(require('./claimdiagnosis.input.js')), + description: 'List of patient diagnosis for which care is sought.', + }, + procedure: { + type: new GraphQLList(require('./claimprocedure.input.js')), + description: + 'Ordered list of patient procedures performed to support the adjudication.', + }, + insurance: { + type: new GraphQLList(require('./claiminsurance.input.js')), + description: + 'Financial instrument by which payment information for health care.', + }, + accident: { + type: require('./claimaccident.input.js'), + description: + 'An accident which resulted in the need for healthcare services.', + }, + employmentImpacted: { + type: require('./period.input.js'), + description: + 'The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).', + }, + hospitalization: { + type: require('./period.input.js'), + description: + 'The start and optional end dates of when the patient was confined to a treatment center.', + }, + item: { + type: new GraphQLList(require('./claimitem.input.js')), + description: 'First tier of goods and services.', + }, + total: { + type: require('./money.input.js'), + description: 'The total value of the claim.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimaccident.input.js b/src/resources/3_0_1/inputs/claimaccident.input.js index 27d845dd..832486d2 100644 --- a/src/resources/3_0_1/inputs/claimaccident.input.js +++ b/src/resources/3_0_1/inputs/claimaccident.input.js @@ -1,39 +1,59 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.accident Input Schema + * @summary Claimaccident Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimAccident_Input', - description: - 'An accident which resulted in the need for healthcare services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - date: { - type: new GraphQLNonNull(DateScalar), - description: 'Date of an accident which these services are addressing.', - }, - _date: { - type: require('./element.input'), - description: 'Date of an accident which these services are addressing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode - type: { - type: require('./codeableconcept.input'), - description: 'Type of accident: work, auto, etc.', - }, - locationAddress: { - type: require('./address.input'), - description: 'Accident Place.', - }, - locationReference: { - type: require('./reference.input'), - description: 'Accident Place.', - }, - }), + name: 'Claimaccident_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date of an accident which these services are addressing.', + }, + date: { + type: new GraphQLNonNull(DateScalar), + description: 'Date of an accident which these services are addressing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode + type: { + type: require('./codeableconcept.input.js'), + description: 'Type of accident: work, auto, etc.', + }, + locationAddress: { + type: require('./address.input.js'), + description: 'Accident Place.', + }, + locationReference: { + type: GraphQLString, + description: 'Accident Place.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimcareteam.input.js b/src/resources/3_0_1/inputs/claimcareteam.input.js index d4efc184..7833b64d 100644 --- a/src/resources/3_0_1/inputs/claimcareteam.input.js +++ b/src/resources/3_0_1/inputs/claimcareteam.input.js @@ -1,57 +1,74 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.careTeam Input Schema + * @summary ClaimcareTeam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimCareTeam_Input', - description: - 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of the careTeam which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Sequence of the careTeam which serves to order and provide a link.', - }, - provider: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Member of the team who provided the overall service.', - }, - responsible: { - type: GraphQLBoolean, - description: - 'The party who is billing and responsible for the claimed good or service rendered to the patient.', - }, - _responsible: { - type: require('./element.input'), - description: - 'The party who is billing and responsible for the claimed good or service rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-careteamrole - role: { - type: require('./codeableconcept.input'), - description: - 'The lead, assisting or supervising practitioner and their discipline if a multidisiplinary team.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/provider-qualification - qualification: { - type: require('./codeableconcept.input'), - description: 'The qualification which is applicable for this service.', - }, - }), + name: 'ClaimcareTeam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Sequence of the careTeam which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of the careTeam which serves to order and provide a link.', + }, + provider: { + type: new GraphQLNonNull(GraphQLString), + description: 'Member of the team who provided the overall service.', + }, + _responsible: { + type: require('./element.input.js'), + description: + 'The party who is billing and responsible for the claimed good or service rendered to the patient.', + }, + responsible: { + type: GraphQLBoolean, + description: + 'The party who is billing and responsible for the claimed good or service rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-careteamrole + role: { + type: require('./codeableconcept.input.js'), + description: + 'The lead, assisting or supervising practitioner and their discipline if a multidisiplinary team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provider-qualification + qualification: { + type: require('./codeableconcept.input.js'), + description: 'The qualification which is applicable for this service.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimdiagnosis.input.js b/src/resources/3_0_1/inputs/claimdiagnosis.input.js index 30d6338f..1c9e4573 100644 --- a/src/resources/3_0_1/inputs/claimdiagnosis.input.js +++ b/src/resources/3_0_1/inputs/claimdiagnosis.input.js @@ -1,51 +1,68 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.diagnosis Input Schema + * @summary Claimdiagnosis Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimDiagnosis_Input', - description: 'List of patient diagnosis for which care is sought.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'Sequence of diagnosis which serves to provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: 'Sequence of diagnosis which serves to provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosisCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosisReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosistype - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The type of the Diagnosis, for example: admitting, primary, secondary, discharge.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup - packageCode: { - type: require('./codeableconcept.input'), - description: - 'The package billing code, for example DRG, based on the assigned grouping code system.', - }, - }), + name: 'Claimdiagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'Sequence of diagnosis which serves to provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'Sequence of diagnosis which serves to provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosisCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosisReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosistype + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of the Diagnosis, for example: admitting, primary, secondary, discharge.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup + packageCode: { + type: require('./codeableconcept.input.js'), + description: + 'The package billing code, for example DRG, based on the assigned grouping code system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claiminformation.input.js b/src/resources/3_0_1/inputs/claiminformation.input.js index 44864e5b..5fb7721a 100644 --- a/src/resources/3_0_1/inputs/claiminformation.input.js +++ b/src/resources/3_0_1/inputs/claiminformation.input.js @@ -1,91 +1,104 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.information Input Schema + * @summary Claiminformation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimInformation_Input', - description: - 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of the information element which serves to provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Sequence of the information element which serves to provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-informationcategory - category: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-exception - code: { - type: require('./codeableconcept.input'), - description: - 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.', - }, - timingDate: { - type: DateScalar, - description: - 'The date when or period to which this information refers.', - }, - _timingDate: { - type: require('./element.input'), - description: - 'The date when or period to which this information refers.', - }, - timingPeriod: { - type: require('./period.input'), - description: - 'The date when or period to which this information refers.', - }, - valueString: { - type: GraphQLString, - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - _valueString: { - type: require('./element.input'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueReference: { - type: require('./reference.input'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason - reason: { - type: require('./codeableconcept.input'), - description: - 'For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.', - }, - }), + name: 'Claiminformation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Sequence of the information element which serves to provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of the information element which serves to provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-informationcategory + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-exception + code: { + type: require('./codeableconcept.input.js'), + description: + 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.', + }, + _timingDate: { + type: require('./element.input.js'), + description: 'The date when or period to which this information refers.', + }, + timingDate: { + type: DateScalar, + description: 'The date when or period to which this information refers.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: 'The date when or period to which this information refers.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueString: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueReference: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason + reason: { + type: require('./codeableconcept.input.js'), + description: + 'For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claiminsurance.input.js b/src/resources/3_0_1/inputs/claiminsurance.input.js index 20b8cfb2..8d343f49 100644 --- a/src/resources/3_0_1/inputs/claiminsurance.input.js +++ b/src/resources/3_0_1/inputs/claiminsurance.input.js @@ -1,73 +1,88 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.insurance Input Schema + * @summary Claiminsurance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimInsurance_Input', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of coverage which serves to provide a link and convey coordination of benefit order.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Sequence of coverage which serves to provide a link and convey coordination of benefit order.', - }, - focal: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - _focal: { - type: require('./element.input'), - description: - 'A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.input'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.input'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - claimResponse: { - type: require('./reference.input'), - description: 'The Coverages adjudication details.', - }, - }), + name: 'Claiminsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Sequence of coverage which serves to provide a link and convey coordination of benefit order.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of coverage which serves to provide a link and convey coordination of benefit order.', + }, + _focal: { + type: require('./element.input.js'), + description: + 'A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _businessArrangement: { + type: require('./element.input.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + claimResponse: { + type: GraphQLString, + description: 'The Coverages adjudication details.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimitem.input.js b/src/resources/3_0_1/inputs/claimitem.input.js index 32ea28f5..da6e9006 100644 --- a/src/resources/3_0_1/inputs/claimitem.input.js +++ b/src/resources/3_0_1/inputs/claimitem.input.js @@ -1,174 +1,191 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.item Input Schema + * @summary Claimitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimItem_Input', - description: 'First tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - careTeamLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'CareTeam applicable for this service or product line.', - }, - _careTeamLinkId: { - type: require('./element.input'), - description: 'CareTeam applicable for this service or product line.', - }, - diagnosisLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Diagnosis applicable for this service or product line.', - }, - _diagnosisLinkId: { - type: require('./element.input'), - description: 'Diagnosis applicable for this service or product line.', - }, - procedureLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Procedures applicable for this service or product line.', - }, - _procedureLinkId: { - type: require('./element.input'), - description: 'Procedures applicable for this service or product line.', - }, - informationLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'Exceptions, special conditions and supporting information pplicable for this service or product line.', - }, - _informationLinkId: { - type: require('./element.input'), - description: - 'Exceptions, special conditions and supporting information pplicable for this service or product line.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,RXNorm,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'For programs which require reason codes for the inclusion or covering of this billed item under the program or sub-program.', - }, - servicedDate: { - type: DateScalar, - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - _servicedDate: { - type: require('./element.input'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - servicedPeriod: { - type: require('./period.input'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'Where the service was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationAddress: { - type: require('./address.input'), - description: 'Where the service was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationReference: { - type: require('./reference.input'), - description: 'Where the service was provided.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.input'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.input'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.input')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/tooth - bodySite: { - type: require('./codeableconcept.input'), - description: 'Physical service site on the patient (limb, tooth, etc).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/surface - subSite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A region or surface of the site, eg. limb region or tooth surface(s).', - }, - encounter: { - type: new GraphQLList(require('./reference.input')), - description: - 'A billed item may include goods or services provided in multiple encounters.', - }, - detail: { - type: new GraphQLList(require('./claimitemdetail.input')), - description: 'Second tier of goods and services.', - }, - }), + name: 'Claimitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _careTeamLinkId: { + type: require('./element.input.js'), + description: 'CareTeam applicable for this service or product line.', + }, + careTeamLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'CareTeam applicable for this service or product line.', + }, + _diagnosisLinkId: { + type: require('./element.input.js'), + description: 'Diagnosis applicable for this service or product line.', + }, + diagnosisLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnosis applicable for this service or product line.', + }, + _procedureLinkId: { + type: require('./element.input.js'), + description: 'Procedures applicable for this service or product line.', + }, + procedureLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Procedures applicable for this service or product line.', + }, + _informationLinkId: { + type: require('./element.input.js'), + description: + 'Exceptions, special conditions and supporting information pplicable for this service or product line.', + }, + informationLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information pplicable for this service or product line.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,RXNorm,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'For programs which require reason codes for the inclusion or covering of this billed item under the program or sub-program.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Where the service was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationAddress: { + type: require('./address.input.js'), + description: 'Where the service was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationReference: { + type: GraphQLString, + description: 'Where the service was provided.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/tooth + bodySite: { + type: require('./codeableconcept.input.js'), + description: 'Physical service site on the patient (limb, tooth, etc).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/surface + subSite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A region or surface of the site, eg. limb region or tooth surface(s).', + }, + encounter: { + type: new GraphQLList(GraphQLString), + description: + 'A billed item may include goods or services provided in multiple encounters.', + }, + detail: { + type: new GraphQLList(require('./claimitemdetail.input.js')), + description: 'Second tier of goods and services.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimitemdetail.input.js b/src/resources/3_0_1/inputs/claimitemdetail.input.js index 33144ad2..255b3875 100644 --- a/src/resources/3_0_1/inputs/claimitemdetail.input.js +++ b/src/resources/3_0_1/inputs/claimitemdetail.input.js @@ -1,93 +1,110 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.item.detail Input Schema + * @summary Claimitemdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimItemDetail_Input', - description: 'Second tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.input'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.input'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.input')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - subDetail: { - type: new GraphQLList(require('./claimitemdetailsubdetail.input')), - description: 'Third tier of goods and services.', - }, - }), + name: 'Claimitemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + subDetail: { + type: new GraphQLList(require('./claimitemdetailsubdetail.input.js')), + description: 'Third tier of goods and services.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimitemdetailsubdetail.input.js b/src/resources/3_0_1/inputs/claimitemdetailsubdetail.input.js index e8c9b83f..6db28e2e 100644 --- a/src/resources/3_0_1/inputs/claimitemdetailsubdetail.input.js +++ b/src/resources/3_0_1/inputs/claimitemdetailsubdetail.input.js @@ -1,88 +1,105 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.item.detail.subDetail Input Schema + * @summary ClaimitemdetailsubDetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimItemDetailSubDetail_Input', - description: 'Third tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.input'), - description: 'The fee for an addittional service or product or charge.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.input'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.input')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - }), + name: 'ClaimitemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: 'The fee for an addittional service or product or charge.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimpayee.input.js b/src/resources/3_0_1/inputs/claimpayee.input.js index c68d89b5..3a0cab8d 100644 --- a/src/resources/3_0_1/inputs/claimpayee.input.js +++ b/src/resources/3_0_1/inputs/claimpayee.input.js @@ -1,31 +1,52 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Claim.payee Input Schema + * @summary Claimpayee Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimPayee_Input', - description: 'The party to be reimbursed for the services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Type of Party to be reimbursed: Subscriber, provider, other.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-payee-resource-type - resourceType: { - type: require('./coding.input'), - description: 'organization | patient | practitioner | relatedperson.', - }, - party: { - type: require('./reference.input'), - description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - }), + name: 'Claimpayee_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Type of Party to be reimbursed: Subscriber, provider, other.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-payee-resource-type + resourceType: { + type: require('./coding.input.js'), + description: 'organization | patient | practitioner | relatedperson.', + }, + party: { + type: GraphQLString, + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimprocedure.input.js b/src/resources/3_0_1/inputs/claimprocedure.input.js index 967d89e5..c1d5edaa 100644 --- a/src/resources/3_0_1/inputs/claimprocedure.input.js +++ b/src/resources/3_0_1/inputs/claimprocedure.input.js @@ -1,47 +1,67 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Claim.procedure Input Schema + * @summary Claimprocedure Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimProcedure_Input', - description: - 'Ordered list of patient procedures performed to support the adjudication.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of procedures which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Sequence of procedures which serves to order and provide a link.', - }, - date: { - type: DateTimeScalar, - description: 'Date and optionally time the procedure was performed .', - }, - _date: { - type: require('./element.input'), - description: 'Date and optionally time the procedure was performed .', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures - procedureCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The procedure code.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures - procedureReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The procedure code.', - }, - }), + name: 'Claimprocedure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Sequence of procedures which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of procedures which serves to order and provide a link.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date and optionally time the procedure was performed .', + }, + date: { + type: DateTimeScalar, + description: 'Date and optionally time the procedure was performed .', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures + procedureCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The procedure code.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures + procedureReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The procedure code.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimrelated.input.js b/src/resources/3_0_1/inputs/claimrelated.input.js index 8fb11cb6..ca102078 100644 --- a/src/resources/3_0_1/inputs/claimrelated.input.js +++ b/src/resources/3_0_1/inputs/claimrelated.input.js @@ -1,32 +1,51 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Claim.related Input Schema + * @summary Claimrelated Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimRelated_Input', - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - claim: { - type: require('./reference.input'), - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship - relationship: { - type: require('./codeableconcept.input'), - description: 'For example prior or umbrella.', - }, - reference: { - type: require('./identifier.input'), - description: - 'An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .', - }, - }), + name: 'Claimrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + claim: { + type: GraphQLString, + description: + 'Other claims which are related to this claim such as prior claim versions or for related services.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship + relationship: { + type: require('./codeableconcept.input.js'), + description: 'For example prior or umbrella.', + }, + reference: { + type: require('./identifier.input.js'), + description: + 'An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponse.input.js b/src/resources/3_0_1/inputs/claimresponse.input.js index 181e1bd9..b5caa76c 100644 --- a/src/resources/3_0_1/inputs/claimresponse.input.js +++ b/src/resources/3_0_1/inputs/claimresponse.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ClaimResponseResourceInputType = new GraphQLEnumType({ - name: 'ClaimResponseResourceInputType', - values: { - ClaimResponse: { value: 'ClaimResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,134 +16,190 @@ let ClaimResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ClaimResponse_Input', - description: 'Base StructureDefinition for ClaimResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ClaimResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - patient: { - type: require('./reference.input'), - description: 'Patient Resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - insurer: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource referrence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.input'), - description: - 'Processing outcome errror, partial or complete processing.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - payeeType: { - type: require('./codeableconcept.input'), - description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - item: { - type: new GraphQLList(require('./claimresponseitem.input')), - description: - 'The first tier service adjudications for submitted services.', - }, - addItem: { - type: new GraphQLList(require('./claimresponseadditem.input')), - description: - 'The first tier service adjudications for payor added services.', - }, - error: { - type: new GraphQLList(require('./claimresponseerror.input')), - description: 'Mutually exclusive with Services Provided (Item).', - }, - totalCost: { - type: require('./money.input'), - description: 'The total cost of the services reported.', - }, - unallocDeductable: { - type: require('./money.input'), - description: - 'The amount of deductible applied which was not allocated to any particular service line.', - }, - totalBenefit: { - type: require('./money.input'), - description: - 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).', - }, - payment: { - type: require('./claimresponsepayment.input'), - description: - 'Payment details for the claim if the claim has been paid.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve - reserved: { - type: require('./coding.input'), - description: - 'Status of funds reservation (For provider, for Patient, None).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.input'), - description: 'The form to be used for printing the content.', - }, - processNote: { - type: new GraphQLList(require('./claimresponseprocessnote.input')), - description: 'Note text.', - }, - communicationRequest: { - type: new GraphQLList(require('./reference.input')), - description: - 'Request for additional supporting or authorizing information, such as: documents, images or resources.', - }, - insurance: { - type: new GraphQLList(require('./claimresponseinsurance.input')), - description: - 'Financial instrument by which payment information for health care.', - }, - }), + description: 'Base StructureDefinition for ClaimResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClaimResponse_Enum_input', + values: { ClaimResponse: { value: 'ClaimResponse' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + patient: { + type: GraphQLString, + description: 'Patient Resource.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + insurer: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + request: { + type: GraphQLString, + description: 'Original request resource referrence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: 'Processing outcome errror, partial or complete processing.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + payeeType: { + type: require('./codeableconcept.input.js'), + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + item: { + type: new GraphQLList(require('./claimresponseitem.input.js')), + description: + 'The first tier service adjudications for submitted services.', + }, + addItem: { + type: new GraphQLList(require('./claimresponseadditem.input.js')), + description: + 'The first tier service adjudications for payor added services.', + }, + error: { + type: new GraphQLList(require('./claimresponseerror.input.js')), + description: 'Mutually exclusive with Services Provided (Item).', + }, + totalCost: { + type: require('./money.input.js'), + description: 'The total cost of the services reported.', + }, + unallocDeductable: { + type: require('./money.input.js'), + description: + 'The amount of deductible applied which was not allocated to any particular service line.', + }, + totalBenefit: { + type: require('./money.input.js'), + description: + 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).', + }, + payment: { + type: require('./claimresponsepayment.input.js'), + description: 'Payment details for the claim if the claim has been paid.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve + reserved: { + type: require('./coding.input.js'), + description: + 'Status of funds reservation (For provider, for Patient, None).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.input.js'), + description: 'The form to be used for printing the content.', + }, + processNote: { + type: new GraphQLList(require('./claimresponseprocessnote.input.js')), + description: 'Note text.', + }, + communicationRequest: { + type: new GraphQLList(GraphQLString), + description: + 'Request for additional supporting or authorizing information, such as: documents, images or resources.', + }, + insurance: { + type: new GraphQLList(require('./claimresponseinsurance.input.js')), + description: + 'Financial instrument by which payment information for health care.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseadditem.input.js b/src/resources/3_0_1/inputs/claimresponseadditem.input.js index 724ba720..367ac7d6 100644 --- a/src/resources/3_0_1/inputs/claimresponseadditem.input.js +++ b/src/resources/3_0_1/inputs/claimresponseadditem.input.js @@ -1,69 +1,88 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem Input Schema + * @summary ClaimResponseaddItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseAddItem_Input', - description: 'The first tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'List of input service items which this service line is intended to replace.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: - 'List of input service items which this service line is intended to replace.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - 'A code to indicate the Professional Service or Product supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - fee: { - type: require('./money.input'), - description: - 'The fee charged for the professional service or product..', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - detail: { - type: new GraphQLList(require('./claimresponseadditemdetail.input')), - description: - 'The second tier service adjudications for payor added services.', - }, - }), + name: 'ClaimResponseaddItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: + 'List of input service items which this service line is intended to replace.', + }, + sequenceLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'List of input service items which this service line is intended to replace.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + 'A code to indicate the Professional Service or Product supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + fee: { + type: require('./money.input.js'), + description: 'The fee charged for the professional service or product..', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + detail: { + type: new GraphQLList(require('./claimresponseadditemdetail.input.js')), + description: + 'The second tier service adjudications for payor added services.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseadditemdetail.input.js b/src/resources/3_0_1/inputs/claimresponseadditemdetail.input.js index acc61df9..e19012ef 100644 --- a/src/resources/3_0_1/inputs/claimresponseadditemdetail.input.js +++ b/src/resources/3_0_1/inputs/claimresponseadditemdetail.input.js @@ -1,55 +1,73 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem.detail Input Schema + * @summary ClaimResponseaddItemdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseAddItemDetail_Input', - description: - 'The second tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - 'A code to indicate the Professional Service or Product supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - fee: { - type: require('./money.input'), - description: - 'The fee charged for the professional service or product..', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - }), + name: 'ClaimResponseaddItemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + 'A code to indicate the Professional Service or Product supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + fee: { + type: require('./money.input.js'), + description: 'The fee charged for the professional service or product..', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseerror.input.js b/src/resources/3_0_1/inputs/claimresponseerror.input.js index b8119f78..8c0e0d1c 100644 --- a/src/resources/3_0_1/inputs/claimresponseerror.input.js +++ b/src/resources/3_0_1/inputs/claimresponseerror.input.js @@ -1,53 +1,74 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.error Input Schema + * @summary ClaimResponseerror Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseError_Input', - description: 'Mutually exclusive with Services Provided (Item).', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: - 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', - }, - detailSequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - _detailSequenceLinkId: { - type: require('./element.input'), - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - subdetailSequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - _subdetailSequenceLinkId: { - type: require('./element.input'), - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'An error code,from a specified code system, which details why the claim could not be adjudicated.', - }, - }), + name: 'ClaimResponseerror_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', + }, + sequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', + }, + _detailSequenceLinkId: { + type: require('./element.input.js'), + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + detailSequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + _subdetailSequenceLinkId: { + type: require('./element.input.js'), + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + subdetailSequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'An error code,from a specified code system, which details why the claim could not be adjudicated.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseinsurance.input.js b/src/resources/3_0_1/inputs/claimresponseinsurance.input.js index 95e93f3a..eea1f811 100644 --- a/src/resources/3_0_1/inputs/claimresponseinsurance.input.js +++ b/src/resources/3_0_1/inputs/claimresponseinsurance.input.js @@ -1,71 +1,86 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.insurance Input Schema + * @summary ClaimResponseinsurance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseInsurance_Input', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line item.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line item.', - }, - focal: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - _focal: { - type: require('./element.input'), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.input'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.input'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - claimResponse: { - type: require('./reference.input'), - description: 'The Coverages adjudication details.', - }, - }), + name: 'ClaimResponseinsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line item.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line item.', + }, + _focal: { + type: require('./element.input.js'), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _businessArrangement: { + type: require('./element.input.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + claimResponse: { + type: GraphQLString, + description: 'The Coverages adjudication details.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseitem.input.js b/src/resources/3_0_1/inputs/claimresponseitem.input.js index 7e27f6ba..d6135a4d 100644 --- a/src/resources/3_0_1/inputs/claimresponseitem.input.js +++ b/src/resources/3_0_1/inputs/claimresponseitem.input.js @@ -1,46 +1,65 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item Input Schema + * @summary ClaimResponseitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItem_Input', - description: 'The first tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: 'A service line number.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - adjudication: { - type: new GraphQLList(require('./claimresponseitemadjudication.input')), - description: 'The adjudication results.', - }, - detail: { - type: new GraphQLList(require('./claimresponseitemdetail.input')), - description: - 'The second tier service adjudications for submitted services.', - }, - }), + name: 'ClaimResponseitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseitemadjudication.input.js'), + ), + description: 'The adjudication results.', + }, + detail: { + type: new GraphQLList(require('./claimresponseitemdetail.input.js')), + description: + 'The second tier service adjudications for submitted services.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseitemadjudication.input.js b/src/resources/3_0_1/inputs/claimresponseitemadjudication.input.js index 3f582154..7f70471f 100644 --- a/src/resources/3_0_1/inputs/claimresponseitemadjudication.input.js +++ b/src/resources/3_0_1/inputs/claimresponseitemadjudication.input.js @@ -1,45 +1,63 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ClaimResponse.item.adjudication Input Schema + * @summary ClaimResponseitemadjudication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItemAdjudication_Input', - description: 'The adjudication results.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - category: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-reason - reason: { - type: require('./codeableconcept.input'), - description: 'Adjudication reason such as limit reached.', - }, - amount: { - type: require('./money.input'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.input'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseitemadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-reason + reason: { + type: require('./codeableconcept.input.js'), + description: 'Adjudication reason such as limit reached.', + }, + amount: { + type: require('./money.input.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseitemdetail.input.js b/src/resources/3_0_1/inputs/claimresponseitemdetail.input.js index a74fad7f..aa6689e6 100644 --- a/src/resources/3_0_1/inputs/claimresponseitemdetail.input.js +++ b/src/resources/3_0_1/inputs/claimresponseitemdetail.input.js @@ -1,44 +1,61 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail Input Schema + * @summary ClaimResponseitemdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItemDetail_Input', - description: 'The second tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: 'A service line number.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - subDetail: { - type: new GraphQLList( - require('./claimresponseitemdetailsubdetail.input'), - ), - description: - 'The third tier service adjudications for submitted services.', - }, - }), + name: 'ClaimResponseitemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + subDetail: { + type: new GraphQLList( + require('./claimresponseitemdetailsubdetail.input.js'), + ), + description: + 'The third tier service adjudications for submitted services.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseitemdetailsubdetail.input.js b/src/resources/3_0_1/inputs/claimresponseitemdetailsubdetail.input.js index d3921d50..5f1887d1 100644 --- a/src/resources/3_0_1/inputs/claimresponseitemdetailsubdetail.input.js +++ b/src/resources/3_0_1/inputs/claimresponseitemdetailsubdetail.input.js @@ -1,37 +1,54 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail.subDetail Input Schema + * @summary ClaimResponseitemdetailsubDetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseItemDetailSubDetail_Input', - description: 'The third tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: 'A service line number.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - }), + name: 'ClaimResponseitemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponsepayment.input.js b/src/resources/3_0_1/inputs/claimresponsepayment.input.js index 65a1152c..aa53e6c0 100644 --- a/src/resources/3_0_1/inputs/claimresponsepayment.input.js +++ b/src/resources/3_0_1/inputs/claimresponsepayment.input.js @@ -1,49 +1,69 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ClaimResponse.payment Input Schema + * @summary ClaimResponsepayment Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponsePayment_Input', - description: 'Payment details for the claim if the claim has been paid.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-paymenttype - type: { - type: require('./codeableconcept.input'), - description: - 'Whether this represents partial or complete payment of the claim.', - }, - adjustment: { - type: require('./money.input'), - description: - 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-adjustment-reason - adjustmentReason: { - type: require('./codeableconcept.input'), - description: 'Reason for the payment adjustment.', - }, - date: { - type: DateScalar, - description: 'Estimated payment data.', - }, - _date: { - type: require('./element.input'), - description: 'Estimated payment data.', - }, - amount: { - type: require('./money.input'), - description: 'Payable less any payment adjustment.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Payment identifier.', - }, - }), + name: 'ClaimResponsepayment_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-paymenttype + type: { + type: require('./codeableconcept.input.js'), + description: + 'Whether this represents partial or complete payment of the claim.', + }, + adjustment: { + type: require('./money.input.js'), + description: + 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-adjustment-reason + adjustmentReason: { + type: require('./codeableconcept.input.js'), + description: 'Reason for the payment adjustment.', + }, + _date: { + type: require('./element.input.js'), + description: 'Estimated payment data.', + }, + date: { + type: DateScalar, + description: 'Estimated payment data.', + }, + amount: { + type: require('./money.input.js'), + description: 'Payable less any payment adjustment.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Payment identifier.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/claimresponseprocessnote.input.js b/src/resources/3_0_1/inputs/claimresponseprocessnote.input.js index cfa05748..e8300999 100644 --- a/src/resources/3_0_1/inputs/claimresponseprocessnote.input.js +++ b/src/resources/3_0_1/inputs/claimresponseprocessnote.input.js @@ -1,46 +1,66 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.processNote Input Schema + * @summary ClaimResponseprocessNote Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClaimResponseProcessNote_Input', - description: 'Note text.', - fields: () => - extendSchema(require('./backboneelement.input'), { - number: { - type: PositiveIntScalar, - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - _number: { - type: require('./element.input'), - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./codeableconcept.input'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.input'), - description: 'The note text.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: require('./codeableconcept.input'), - description: - "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", - }, - }), + name: 'ClaimResponseprocessNote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _number: { + type: require('./element.input.js'), + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + number: { + type: PositiveIntScalar, + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./codeableconcept.input.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.input.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: require('./codeableconcept.input.js'), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/clinicalimpression.input.js b/src/resources/3_0_1/inputs/clinicalimpression.input.js index aa0a0413..0b468fc5 100644 --- a/src/resources/3_0_1/inputs/clinicalimpression.input.js +++ b/src/resources/3_0_1/inputs/clinicalimpression.input.js @@ -1,23 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.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 ClinicalImpressionResourceInputType = new GraphQLEnumType({ - name: 'ClinicalImpressionResourceInputType', - values: { - ClinicalImpression: { value: 'ClinicalImpression' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,137 +16,195 @@ let ClinicalImpressionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ClinicalImpression_Input', - description: 'Base StructureDefinition for ClinicalImpression Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ClinicalImpressionResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A unique identifier assigned to the clinical impression that remains consistent regardless of what server the impression is stored on.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-impression-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Identifies the workflow status of the assessment.', - }, - _status: { - type: require('./element.input'), - description: 'Identifies the workflow status of the assessment.', - }, - code: { - type: require('./codeableconcept.input'), - description: 'Categorizes the type of clinical assessment performed.', - }, - description: { - type: GraphQLString, - description: - 'A summary of the context and/or cause of the assessment - why / where was it performed, and what patient events/status prompted it.', - }, - _description: { - type: require('./element.input'), - description: - 'A summary of the context and/or cause of the assessment - why / where was it performed, and what patient events/status prompted it.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The patient or group of individuals assessed as part of this record.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode of care this impression was created as part of.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - 'The point in time or period over which the subject was assessed.', - }, - _effectiveDateTime: { - type: require('./element.input'), - description: - 'The point in time or period over which the subject was assessed.', - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The point in time or period over which the subject was assessed.', - }, - date: { - type: DateTimeScalar, - description: - 'Indicates when the documentation of the assessment was complete.', - }, - _date: { - type: require('./element.input'), - description: - 'Indicates when the documentation of the assessment was complete.', - }, - assessor: { - type: require('./reference.input'), - description: 'The clinician performing the assessment.', - }, - previous: { - type: require('./reference.input'), - description: - "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", - }, - problem: { - type: new GraphQLList(require('./reference.input')), - description: - 'This a list of the relevant problems/conditions for a patient.', - }, - investigation: { - type: new GraphQLList( - require('./clinicalimpressioninvestigation.input'), - ), - description: - 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', - }, - protocol: { - type: new GraphQLList(UriScalar), - description: - 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', - }, - _protocol: { - type: require('./element.input'), - description: - 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', - }, - summary: { - type: GraphQLString, - description: 'A text summary of the investigations and the diagnosis.', - }, - _summary: { - type: require('./element.input'), - description: 'A text summary of the investigations and the diagnosis.', - }, - finding: { - type: new GraphQLList(require('./clinicalimpressionfinding.input')), - description: - 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis - prognosisCodeableConcept: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Estimate of likely outcome.', - }, - prognosisReference: { - type: new GraphQLList(require('./reference.input')), - description: 'RiskAssessment expressing likely outcome.', - }, - action: { - type: new GraphQLList(require('./reference.input')), - description: 'Action taken as part of assessment procedure.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.', - }, - }), + description: 'Base StructureDefinition for ClinicalImpression Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClinicalImpression_Enum_input', + values: { ClinicalImpression: { value: 'ClinicalImpression' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'A unique identifier assigned to the clinical impression that remains consistent regardless of what server the impression is stored on.', + }, + _status: { + type: require('./element.input.js'), + description: 'Identifies the workflow status of the assessment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-impression-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the workflow status of the assessment.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'Categorizes the type of clinical assessment performed.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A summary of the context and/or cause of the assessment - why / where was it performed, and what patient events/status prompted it.', + }, + description: { + type: GraphQLString, + description: + 'A summary of the context and/or cause of the assessment - why / where was it performed, and what patient events/status prompted it.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient or group of individuals assessed as part of this record.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care this impression was created as part of.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + 'The point in time or period over which the subject was assessed.', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The point in time or period over which the subject was assessed.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The point in time or period over which the subject was assessed.', + }, + _date: { + type: require('./element.input.js'), + description: + 'Indicates when the documentation of the assessment was complete.', + }, + date: { + type: DateTimeScalar, + description: + 'Indicates when the documentation of the assessment was complete.', + }, + assessor: { + type: GraphQLString, + description: 'The clinician performing the assessment.', + }, + previous: { + type: GraphQLString, + description: + "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", + }, + problem: { + type: new GraphQLList(GraphQLString), + description: + 'This a list of the relevant problems/conditions for a patient.', + }, + investigation: { + type: new GraphQLList( + require('./clinicalimpressioninvestigation.input.js'), + ), + description: + 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', + }, + _protocol: { + type: require('./element.input.js'), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + protocol: { + type: new GraphQLList(UriScalar), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + _summary: { + type: require('./element.input.js'), + description: 'A text summary of the investigations and the diagnosis.', + }, + summary: { + type: GraphQLString, + description: 'A text summary of the investigations and the diagnosis.', + }, + finding: { + type: new GraphQLList(require('./clinicalimpressionfinding.input.js')), + description: + 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis + prognosisCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Estimate of likely outcome.', + }, + prognosisReference: { + type: new GraphQLList(GraphQLString), + description: 'RiskAssessment expressing likely outcome.', + }, + action: { + type: new GraphQLList(GraphQLString), + description: 'Action taken as part of assessment procedure.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/clinicalimpressionfinding.input.js b/src/resources/3_0_1/inputs/clinicalimpressionfinding.input.js index 8d2b25ad..0c00c14e 100644 --- a/src/resources/3_0_1/inputs/clinicalimpressionfinding.input.js +++ b/src/resources/3_0_1/inputs/clinicalimpressionfinding.input.js @@ -1,41 +1,57 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ClinicalImpression.finding Input Schema + * @summary ClinicalImpressionfinding Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClinicalImpressionFinding_Input', - description: - 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - itemCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - itemReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', - }, - basis: { - type: GraphQLString, - description: 'Which investigations support finding or diagnosis.', - }, - _basis: { - type: require('./element.input'), - description: 'Which investigations support finding or diagnosis.', - }, - }), + name: 'ClinicalImpressionfinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + itemReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', + }, + _basis: { + type: require('./element.input.js'), + description: 'Which investigations support finding or diagnosis.', + }, + basis: { + type: GraphQLString, + description: 'Which investigations support finding or diagnosis.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/clinicalimpressioninvestigation.input.js b/src/resources/3_0_1/inputs/clinicalimpressioninvestigation.input.js index 2fc83955..1aac6f39 100644 --- a/src/resources/3_0_1/inputs/clinicalimpressioninvestigation.input.js +++ b/src/resources/3_0_1/inputs/clinicalimpressioninvestigation.input.js @@ -1,32 +1,47 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ClinicalImpression.investigation Input Schema + * @summary ClinicalImpressioninvestigation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ClinicalImpressionInvestigation_Input', - description: - 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/investigation-sets - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", - }, - item: { - type: new GraphQLList(require('./reference.input')), - description: - 'A record of a specific investigation that was undertaken.', - }, - }), + name: 'ClinicalImpressioninvestigation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/investigation-sets + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", + }, + item: { + type: new GraphQLList(GraphQLString), + description: 'A record of a specific investigation that was undertaken.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/codeableconcept.input.js b/src/resources/3_0_1/inputs/codeableconcept.input.js index 652fb37e..c6dde2e6 100644 --- a/src/resources/3_0_1/inputs/codeableconcept.input.js +++ b/src/resources/3_0_1/inputs/codeableconcept.input.js @@ -1,34 +1,45 @@ const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary CodeableConcept Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'CodeableConcept_Input', - description: 'Base StructureDefinition for CodeableConcept Type.', - fields: () => - extendSchema(require('./element.input'), { - coding: { - type: new GraphQLList(require('./coding.input')), - description: 'A reference to a code defined by a terminology system.', - }, - text: { - type: GraphQLString, - description: - 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', - }, - _text: { - type: require('./element.input'), - description: - 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', - }, - }), + description: 'Base StructureDefinition for CodeableConcept Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + coding: { + type: new GraphQLList(require('./coding.input.js')), + description: 'A reference to a code defined by a terminology system.', + }, + _text: { + type: require('./element.input.js'), + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + text: { + type: GraphQLString, + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/codesystem.input.js b/src/resources/3_0_1/inputs/codesystem.input.js index 255452bd..55ee39c6 100644 --- a/src/resources/3_0_1/inputs/codesystem.input.js +++ b/src/resources/3_0_1/inputs/codesystem.input.js @@ -1,25 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CodeSystemResourceInputType = new GraphQLEnumType({ - name: 'CodeSystemResourceInputType', - values: { - CodeSystem: { value: 'CodeSystem' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -27,227 +18,285 @@ let CodeSystemResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'CodeSystem_Input', - description: 'Base StructureDefinition for CodeSystem Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CodeSystemResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. The URL SHOULD include the major version of the code system. For more information see [Technical and Business Versions](resource.html#versions). This is used in [Coding]{datatypes.html#Coding}.system.', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. The URL SHOULD include the major version of the code system. For more information see [Technical and Business Versions](resource.html#versions). This is used in [Coding]{datatypes.html#Coding}.system.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding]{datatypes.html#Coding}.version.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding]{datatypes.html#Coding}.version.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the code system.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this code system. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this code system. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the code system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the code system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the code system.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the code system.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the code system from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the code system from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate code system instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the code system is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this code system is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this code system is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', - }, - caseSensitive: { - type: GraphQLBoolean, - description: - 'If code comparison is case sensitive when codes within this system are compared to each other.', - }, - _caseSensitive: { - type: require('./element.input'), - description: - 'If code comparison is case sensitive when codes within this system are compared to each other.', - }, - valueSet: { - type: UriScalar, - description: - 'Canonical URL of value set that contains the entire code system.', - }, - _valueSet: { - type: require('./element.input'), - description: - 'Canonical URL of value set that contains the entire code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning - hierarchyMeaning: { - type: CodeScalar, - description: 'The meaning of the hierarchy of concepts.', - }, - _hierarchyMeaning: { - type: require('./element.input'), - description: 'The meaning of the hierarchy of concepts.', - }, - compositional: { - type: GraphQLBoolean, - description: 'True If code system defines a post-composition grammar.', - }, - _compositional: { - type: require('./element.input'), - description: 'True If code system defines a post-composition grammar.', - }, - versionNeeded: { - type: GraphQLBoolean, - description: - 'This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.', - }, - _versionNeeded: { - type: require('./element.input'), - description: - 'This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/codesystem-content-mode - content: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How much of the content of the code system - the concepts and codes it defines - are represented in this resource.', - }, - _content: { - type: require('./element.input'), - description: - 'How much of the content of the code system - the concepts and codes it defines - are represented in this resource.', - }, - count: { - type: UnsignedIntScalar, - description: - 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts.', - }, - _count: { - type: require('./element.input'), - description: - 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts.', - }, - filter: { - type: new GraphQLList(require('./codesystemfilter.input')), - description: - 'A filter that can be used in a value set compose statement when selecting concepts using a filter.', - }, - property: { - type: new GraphQLList(require('./codesystemproperty.input')), - description: - 'A property defines an additional slot through which additional information can be provided about a concept.', - }, - concept: { - type: new GraphQLList(require('./codesystemconcept.input')), - description: - 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', - }, - }), + description: 'Base StructureDefinition for CodeSystem Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CodeSystem_Enum_input', + values: { CodeSystem: { value: 'CodeSystem' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. The URL SHOULD include the major version of the code system. For more information see [Technical and Business Versions](resource.html#versions). This is used in [Coding]{datatypes.html#Coding}.system.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. The URL SHOULD include the major version of the code system. For more information see [Technical and Business Versions](resource.html#versions). This is used in [Coding]{datatypes.html#Coding}.system.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding]{datatypes.html#Coding}.version.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding]{datatypes.html#Coding}.version.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the code system.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the code system.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this code system. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this code system. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the code system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the code system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the code system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the code system.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the code system from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the code system from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate code system instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the code system is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this code system is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this code system is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', + }, + _caseSensitive: { + type: require('./element.input.js'), + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + caseSensitive: { + type: GraphQLBoolean, + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + _valueSet: { + type: require('./element.input.js'), + description: + 'Canonical URL of value set that contains the entire code system.', + }, + valueSet: { + type: UriScalar, + description: + 'Canonical URL of value set that contains the entire code system.', + }, + _hierarchyMeaning: { + type: require('./element.input.js'), + description: 'The meaning of the hierarchy of concepts.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning + hierarchyMeaning: { + type: CodeScalar, + description: 'The meaning of the hierarchy of concepts.', + }, + _compositional: { + type: require('./element.input.js'), + description: 'True If code system defines a post-composition grammar.', + }, + compositional: { + type: GraphQLBoolean, + description: 'True If code system defines a post-composition grammar.', + }, + _versionNeeded: { + type: require('./element.input.js'), + description: + 'This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.', + }, + versionNeeded: { + type: GraphQLBoolean, + description: + 'This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.', + }, + _content: { + type: require('./element.input.js'), + description: + 'How much of the content of the code system - the concepts and codes it defines - are represented in this resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/codesystem-content-mode + content: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How much of the content of the code system - the concepts and codes it defines - are represented in this resource.', + }, + _count: { + type: require('./element.input.js'), + description: + 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts.', + }, + count: { + type: UnsignedIntScalar, + description: + 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts.', + }, + filter: { + type: new GraphQLList(require('./codesystemfilter.input.js')), + description: + 'A filter that can be used in a value set compose statement when selecting concepts using a filter.', + }, + property: { + type: new GraphQLList(require('./codesystemproperty.input.js')), + description: + 'A property defines an additional slot through which additional information can be provided about a concept.', + }, + concept: { + type: new GraphQLList(require('./codesystemconcept.input.js')), + description: + 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/codesystemconcept.input.js b/src/resources/3_0_1/inputs/codesystemconcept.input.js index 49e42396..383183c5 100644 --- a/src/resources/3_0_1/inputs/codesystemconcept.input.js +++ b/src/resources/3_0_1/inputs/codesystemconcept.input.js @@ -1,62 +1,77 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CodeSystem.concept Input Schema + * @summary CodeSystemconcept Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CodeSystemConcept_Input', - description: - 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code - a text symbol - that uniquely identifies the concept within the code system.', - }, - _code: { - type: require('./element.input'), - description: - 'A code - a text symbol - that uniquely identifies the concept within the code system.', - }, - display: { - type: GraphQLString, - description: - 'A human readable string that is the recommended default way to present this concept to a user.', - }, - _display: { - type: require('./element.input'), - description: - 'A human readable string that is the recommended default way to present this concept to a user.', - }, - definition: { - type: GraphQLString, - description: - 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', - }, - _definition: { - type: require('./element.input'), - description: - 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', - }, - designation: { - type: new GraphQLList(require('./codesystemconceptdesignation.input')), - description: - 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', - }, - property: { - type: new GraphQLList(require('./codesystemconceptproperty.input')), - description: 'A property value for this concept.', - }, - }), + name: 'CodeSystemconcept_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + _display: { + type: require('./element.input.js'), + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + display: { + type: GraphQLString, + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + definition: { + type: GraphQLString, + description: + 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + designation: { + type: new GraphQLList(require('./codesystemconceptdesignation.input.js')), + description: + 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + property: { + type: new GraphQLList(require('./codesystemconceptproperty.input.js')), + description: 'A property value for this concept.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/codesystemconceptdesignation.input.js b/src/resources/3_0_1/inputs/codesystemconceptdesignation.input.js index 01e5dc55..c33835d6 100644 --- a/src/resources/3_0_1/inputs/codesystemconceptdesignation.input.js +++ b/src/resources/3_0_1/inputs/codesystemconceptdesignation.input.js @@ -1,44 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CodeSystem.concept.designation Input Schema + * @summary CodeSystemconceptdesignation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CodeSystemConceptDesignation_Input', - description: - 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.input'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.input'), - description: 'A code that details how this designation would be used.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text value for this designation.', - }, - _value: { - type: require('./element.input'), - description: 'The text value for this designation.', - }, - }), + name: 'CodeSystemconceptdesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _language: { + type: require('./element.input.js'), + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.input.js'), + description: 'A code that details how this designation would be used.', + }, + _value: { + type: require('./element.input.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/codesystemconceptproperty.input.js b/src/resources/3_0_1/inputs/codesystemconceptproperty.input.js index f089d02e..147b3992 100644 --- a/src/resources/3_0_1/inputs/codesystemconceptproperty.input.js +++ b/src/resources/3_0_1/inputs/codesystemconceptproperty.input.js @@ -1,76 +1,93 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLInt, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary CodeSystem.concept.property Input Schema + * @summary CodeSystemconceptproperty Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CodeSystemConceptProperty_Input', - description: 'A property value for this concept.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'A code that is a reference to CodeSystem.property.code.', - }, - _code: { - type: require('./element.input'), - description: 'A code that is a reference to CodeSystem.property.code.', - }, - valueCode: { - type: new GraphQLNonNull(CodeScalar), - description: 'The value of this property.', - }, - _valueCode: { - type: require('./element.input'), - description: 'The value of this property.', - }, - valueCoding: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The value of this property.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of this property.', - }, - _valueString: { - type: require('./element.input'), - description: 'The value of this property.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: 'The value of this property.', - }, - _valueInteger: { - type: require('./element.input'), - description: 'The value of this property.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'The value of this property.', - }, - _valueBoolean: { - type: require('./element.input'), - description: 'The value of this property.', - }, - valueDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The value of this property.', - }, - _valueDateTime: { - type: require('./element.input'), - description: 'The value of this property.', - }, - }), + name: 'CodeSystemconceptproperty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: 'A code that is a reference to CodeSystem.property.code.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'A code that is a reference to CodeSystem.property.code.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of this property.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The value of this property.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of this property.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of this property.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of this property.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of this property.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/codesystemfilter.input.js b/src/resources/3_0_1/inputs/codesystemfilter.input.js index e2228c5a..6f1cfc1d 100644 --- a/src/resources/3_0_1/inputs/codesystemfilter.input.js +++ b/src/resources/3_0_1/inputs/codesystemfilter.input.js @@ -1,60 +1,73 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CodeSystem.filter Input Schema + * @summary CodeSystemfilter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CodeSystemFilter_Input', - description: - 'A filter that can be used in a value set compose statement when selecting concepts using a filter.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The code that identifies this filter when it is used in the instance.', - }, - _code: { - type: require('./element.input'), - description: - 'The code that identifies this filter when it is used in the instance.', - }, - description: { - type: GraphQLString, - description: 'A description of how or why the filter is used.', - }, - _description: { - type: require('./element.input'), - description: 'A description of how or why the filter is used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/filter-operator - operator: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: 'A list of operators that can be used with the filter.', - }, - _operator: { - type: require('./element.input'), - description: 'A list of operators that can be used with the filter.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A description of what the value for the filter should be.', - }, - _value: { - type: require('./element.input'), - description: - 'A description of what the value for the filter should be.', - }, - }), + name: 'CodeSystemfilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The code that identifies this filter when it is used in the instance.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code that identifies this filter when it is used in the instance.', + }, + _description: { + type: require('./element.input.js'), + description: 'A description of how or why the filter is used.', + }, + description: { + type: GraphQLString, + description: 'A description of how or why the filter is used.', + }, + _operator: { + type: require('./element.input.js'), + description: 'A list of operators that can be used with the filter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/filter-operator + operator: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'A list of operators that can be used with the filter.', + }, + _value: { + type: require('./element.input.js'), + description: 'A description of what the value for the filter should be.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of what the value for the filter should be.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/codesystemproperty.input.js b/src/resources/3_0_1/inputs/codesystemproperty.input.js index 99e00aa3..86ec211b 100644 --- a/src/resources/3_0_1/inputs/codesystemproperty.input.js +++ b/src/resources/3_0_1/inputs/codesystemproperty.input.js @@ -1,64 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary CodeSystem.property Input Schema + * @summary CodeSystemproperty Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CodeSystemProperty_Input', - description: - 'A property defines an additional slot through which additional information can be provided about a concept.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', - }, - _code: { - type: require('./element.input'), - description: - 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', - }, - uri: { - type: UriScalar, - description: - 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', - }, - _uri: { - type: require('./element.input'), - description: - 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', - }, - description: { - type: GraphQLString, - description: - 'A description of the property- why it is defined, and how its value might be used.', - }, - _description: { - type: require('./element.input'), - description: - 'A description of the property- why it is defined, and how its value might be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/concept-property-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to anotherr defined concept).", - }, - _type: { - type: require('./element.input'), - description: - "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to anotherr defined concept).", - }, - }), + name: 'CodeSystemproperty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', + }, + uri: { + type: UriScalar, + description: + 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A description of the property- why it is defined, and how its value might be used.', + }, + description: { + type: GraphQLString, + description: + 'A description of the property- why it is defined, and how its value might be used.', + }, + _type: { + type: require('./element.input.js'), + description: + "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to anotherr defined concept).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/concept-property-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to anotherr defined concept).", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/coding.input.js b/src/resources/3_0_1/inputs/coding.input.js index fe6f1edd..04ce3f01 100644 --- a/src/resources/3_0_1/inputs/coding.input.js +++ b/src/resources/3_0_1/inputs/coding.input.js @@ -1,13 +1,11 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -15,58 +13,72 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Coding_Input', - description: 'Base StructureDefinition for Coding Type.', - fields: () => - extendSchema(require('./element.input'), { - system: { - type: UriScalar, - description: - 'The identification of the code system that defines the meaning of the symbol in the code.', - }, - _system: { - type: require('./element.input'), - description: - 'The identification of the code system that defines the meaning of the symbol in the code.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', - }, - code: { - type: CodeScalar, - description: - 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', - }, - _code: { - type: require('./element.input'), - description: - 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', - }, - display: { - type: GraphQLString, - description: - 'A representation of the meaning of the code in the system, following the rules of the system.', - }, - _display: { - type: require('./element.input'), - description: - 'A representation of the meaning of the code in the system, following the rules of the system.', - }, - userSelected: { - type: GraphQLBoolean, - description: - 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', - }, - _userSelected: { - type: require('./element.input'), - description: - 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', - }, - }), + description: 'Base StructureDefinition for Coding Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + system: { + type: UriScalar, + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + code: { + type: CodeScalar, + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + _display: { + type: require('./element.input.js'), + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + display: { + type: GraphQLString, + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + _userSelected: { + type: require('./element.input.js'), + description: + 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', + }, + userSelected: { + type: GraphQLBoolean, + description: + 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/communication.input.js b/src/resources/3_0_1/inputs/communication.input.js index c0d268bf..d7458af9 100644 --- a/src/resources/3_0_1/inputs/communication.input.js +++ b/src/resources/3_0_1/inputs/communication.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CommunicationResourceInputType = new GraphQLEnumType({ - name: 'CommunicationResourceInputType', - values: { - Communication: { value: 'Communication' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,130 +17,188 @@ let CommunicationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Communication_Input', - description: 'Base StructureDefinition for Communication Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CommunicationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: - 'A protocol, guideline, or other definition that was adhered to in whole or in part by this communication event.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'An order, proposal or plan fulfilled in whole or in part by this Communication.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: 'Part of this action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the transmission.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the transmission.', - }, - notDone: { - type: GraphQLBoolean, - description: - 'If true, indicates that the described communication event did not actually occur.', - }, - _notDone: { - type: require('./element.input'), - description: - 'If true, indicates that the described communication event did not actually occur.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-not-done-reason - notDoneReason: { - type: require('./codeableconcept.input'), - description: - 'Describes why the communication event did not occur in coded and/or textual form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode - medium: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A channel that was used for this communication (e.g. email, fax).', - }, - subject: { - type: require('./reference.input'), - description: - 'The patient or group that was the focus of this communication.', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', - }, - topic: { - type: new GraphQLList(require('./reference.input')), - description: - 'The resources which were responsible for or related to producing this communication.', - }, - context: { - type: require('./reference.input'), - description: 'The encounter within which the communication was sent.', - }, - sent: { - type: DateTimeScalar, - description: 'The time when this communication was sent.', - }, - _sent: { - type: require('./element.input'), - description: 'The time when this communication was sent.', - }, - received: { - type: DateTimeScalar, - description: - 'The time when this communication arrived at the destination.', - }, - _received: { - type: require('./element.input'), - description: - 'The time when this communication arrived at the destination.', - }, - sender: { - type: require('./reference.input'), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'The reason or justification for the communication.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates another resource whose existence justifies this communication.', - }, - payload: { - type: new GraphQLList(require('./communicationpayload.input')), - description: - 'Text, attachment(s), or resource(s) that was communicated to the recipient.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Additional notes or commentary about the communication by the sender, receiver or other interested parties.', - }, - }), + description: 'Base StructureDefinition for Communication Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Communication_Enum_input', + values: { Communication: { value: 'Communication' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'A protocol, guideline, or other definition that was adhered to in whole or in part by this communication event.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'An order, proposal or plan fulfilled in whole or in part by this Communication.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: 'Part of this action.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the transmission.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the transmission.', + }, + _notDone: { + type: require('./element.input.js'), + description: + 'If true, indicates that the described communication event did not actually occur.', + }, + notDone: { + type: GraphQLBoolean, + description: + 'If true, indicates that the described communication event did not actually occur.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-not-done-reason + notDoneReason: { + type: require('./codeableconcept.input.js'), + description: + 'Describes why the communication event did not occur in coded and/or textual form.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode + medium: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + subject: { + type: GraphQLString, + description: + 'The patient or group that was the focus of this communication.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', + }, + topic: { + type: new GraphQLList(GraphQLString), + description: + 'The resources which were responsible for or related to producing this communication.', + }, + context: { + type: GraphQLString, + description: 'The encounter within which the communication was sent.', + }, + _sent: { + type: require('./element.input.js'), + description: 'The time when this communication was sent.', + }, + sent: { + type: DateTimeScalar, + description: 'The time when this communication was sent.', + }, + _received: { + type: require('./element.input.js'), + description: + 'The time when this communication arrived at the destination.', + }, + received: { + type: DateTimeScalar, + description: + 'The time when this communication arrived at the destination.', + }, + sender: { + type: GraphQLString, + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason or justification for the communication.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies this communication.', + }, + payload: { + type: new GraphQLList(require('./communicationpayload.input.js')), + description: + 'Text, attachment(s), or resource(s) that was communicated to the recipient.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Additional notes or commentary about the communication by the sender, receiver or other interested parties.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/communicationpayload.input.js b/src/resources/3_0_1/inputs/communicationpayload.input.js index dd3d4084..b732159e 100644 --- a/src/resources/3_0_1/inputs/communicationpayload.input.js +++ b/src/resources/3_0_1/inputs/communicationpayload.input.js @@ -1,41 +1,57 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Communication.payload Input Schema + * @summary Communicationpayload Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CommunicationPayload_Input', - description: - 'Text, attachment(s), or resource(s) that was communicated to the recipient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - contentString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - _contentString: { - type: require('./element.input'), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - }), + name: 'Communicationpayload_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _contentString: { + type: require('./element.input.js'), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/communicationrequest.input.js b/src/resources/3_0_1/inputs/communicationrequest.input.js index 1c603359..7337fa2e 100644 --- a/src/resources/3_0_1/inputs/communicationrequest.input.js +++ b/src/resources/3_0_1/inputs/communicationrequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 CommunicationRequestResourceInputType = new GraphQLEnumType({ - name: 'CommunicationRequestResourceInputType', - values: { - CommunicationRequest: { value: 'CommunicationRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,137 +16,195 @@ let CommunicationRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'CommunicationRequest_Input', - description: 'Base StructureDefinition for CommunicationRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CommunicationRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A plan or proposal that is fulfilled in whole or in part by this request.', - }, - replaces: { - type: new GraphQLList(require('./reference.input')), - description: - 'Completed or terminated request(s) whose function is taken by this new request.', - }, - groupIdentifier: { - type: require('./identifier.input'), - description: - 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the proposal or order.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the proposal or order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', - }, - _priority: { - type: require('./element.input'), - description: - 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode - medium: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A channel that was used for this communication (e.g. email, fax).', - }, - subject: { - type: require('./reference.input'), - description: - 'The patient or group that is the focus of this communication request.', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.', - }, - topic: { - type: new GraphQLList(require('./reference.input')), - description: - 'The resources which were related to producing this communication request.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode of care within which the communication request was created.', - }, - payload: { - type: new GraphQLList(require('./communicationrequestpayload.input')), - description: - 'Text, attachment(s), or resource(s) to be communicated to the recipient.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'The time when this communication is to occur.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: 'The time when this communication is to occur.', - }, - occurrencePeriod: { - type: require('./period.input'), - description: 'The time when this communication is to occur.', - }, - authoredOn: { - type: DateTimeScalar, - description: - 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', - }, - _authoredOn: { - type: require('./element.input'), - description: - 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', - }, - sender: { - type: require('./reference.input'), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', - }, - requester: { - type: require('./communicationrequestrequester.input'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActReason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Describes why the request is being made in coded or textual form.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates another resource whose existence justifies this request.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Comments made about the request by the requester, sender, recipient, subject or other participants.', - }, - }), + description: 'Base StructureDefinition for CommunicationRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CommunicationRequest_Enum_input', + values: { CommunicationRequest: { value: 'CommunicationRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan or proposal that is fulfilled in whole or in part by this request.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the proposal or order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the proposal or order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode + medium: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + subject: { + type: GraphQLString, + description: + 'The patient or group that is the focus of this communication request.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.', + }, + topic: { + type: new GraphQLList(GraphQLString), + description: + 'The resources which were related to producing this communication request.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care within which the communication request was created.', + }, + payload: { + type: new GraphQLList(require('./communicationrequestpayload.input.js')), + description: + 'Text, attachment(s), or resource(s) to be communicated to the recipient.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'The time when this communication is to occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The time when this communication is to occur.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'The time when this communication is to occur.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: + 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', + }, + sender: { + type: GraphQLString, + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', + }, + requester: { + type: require('./communicationrequestrequester.input.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActReason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Describes why the request is being made in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies this request.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the request by the requester, sender, recipient, subject or other participants.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/communicationrequestpayload.input.js b/src/resources/3_0_1/inputs/communicationrequestpayload.input.js index ee8e779c..8c668926 100644 --- a/src/resources/3_0_1/inputs/communicationrequestpayload.input.js +++ b/src/resources/3_0_1/inputs/communicationrequestpayload.input.js @@ -1,41 +1,57 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary CommunicationRequest.payload Input Schema + * @summary CommunicationRequestpayload Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CommunicationRequestPayload_Input', - description: - 'Text, attachment(s), or resource(s) to be communicated to the recipient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - contentString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - _contentString: { - type: require('./element.input'), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - }), + name: 'CommunicationRequestpayload_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _contentString: { + type: require('./element.input.js'), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/communicationrequestrequester.input.js b/src/resources/3_0_1/inputs/communicationrequestrequester.input.js index 1e20112e..2c230e22 100644 --- a/src/resources/3_0_1/inputs/communicationrequestrequester.input.js +++ b/src/resources/3_0_1/inputs/communicationrequestrequester.input.js @@ -1,27 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary CommunicationRequest.requester Input Schema + * @summary CommunicationRequestrequester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CommunicationRequestRequester_Input', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - agent: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device, practitioner, etc. who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'CommunicationRequestrequester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + agent: { + type: new GraphQLNonNull(GraphQLString), + description: 'The device, practitioner, etc. who initiated the request.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/compartmentdefinition.input.js b/src/resources/3_0_1/inputs/compartmentdefinition.input.js index be7736d2..2624ecb4 100644 --- a/src/resources/3_0_1/inputs/compartmentdefinition.input.js +++ b/src/resources/3_0_1/inputs/compartmentdefinition.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CompartmentDefinitionResourceInputType = new GraphQLEnumType({ - name: 'CompartmentDefinitionResourceInputType', - values: { - CompartmentDefinition: { value: 'CompartmentDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,141 +17,201 @@ let CompartmentDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'CompartmentDefinition_Input', - description: 'Base StructureDefinition for CompartmentDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CompartmentDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. The URL SHOULD include the major version of the compartment definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. The URL SHOULD include the major version of the compartment definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the compartment definition.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the compartment definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this compartment definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this compartment definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the compartment definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the compartment definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the compartment definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the compartment definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the compartment definition from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the compartment definition from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this compartment definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this compartment definition is needed and why it has been designed as it has.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate compartment definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the compartment definition is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/compartment-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'Which compartment this definition describes.', - }, - _code: { - type: require('./element.input'), - description: 'Which compartment this definition describes.', - }, - search: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'Whether the search syntax is supported,.', - }, - _search: { - type: require('./element.input'), - description: 'Whether the search syntax is supported,.', - }, - resource: { - type: new GraphQLList(require('./compartmentdefinitionresource.input')), - description: - 'Information about how a resource is related to the compartment.', - }, - }), + description: 'Base StructureDefinition for CompartmentDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CompartmentDefinition_Enum_input', + values: { CompartmentDefinition: { value: 'CompartmentDefinition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. The URL SHOULD include the major version of the compartment definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. The URL SHOULD include the major version of the compartment definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the compartment definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the compartment definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this compartment definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this compartment definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the compartment definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the compartment definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the compartment definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the compartment definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the compartment definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the compartment definition from a consumer's perspective.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this compartment definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this compartment definition is needed and why it has been designed as it has.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate compartment definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the compartment definition is intended to be used.', + }, + _code: { + type: require('./element.input.js'), + description: 'Which compartment this definition describes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/compartment-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Which compartment this definition describes.', + }, + _search: { + type: require('./element.input.js'), + description: 'Whether the search syntax is supported,.', + }, + search: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether the search syntax is supported,.', + }, + resource: { + type: new GraphQLList( + require('./compartmentdefinitionresource.input.js'), + ), + description: + 'Information about how a resource is related to the compartment.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/compartmentdefinitionresource.input.js b/src/resources/3_0_1/inputs/compartmentdefinitionresource.input.js index 972447b7..407c2205 100644 --- a/src/resources/3_0_1/inputs/compartmentdefinitionresource.input.js +++ b/src/resources/3_0_1/inputs/compartmentdefinitionresource.input.js @@ -1,52 +1,67 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CompartmentDefinition.resource Input Schema + * @summary CompartmentDefinitionresource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CompartmentDefinitionResource_Input', - description: - 'Information about how a resource is related to the compartment.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name of a resource supported by the server.', - }, - _code: { - type: require('./element.input'), - description: 'The name of a resource supported by the server.', - }, - param: { - type: new GraphQLList(GraphQLString), - description: - 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', - }, - _param: { - type: require('./element.input'), - description: - 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', - }, - documentation: { - type: GraphQLString, - description: - 'Additional documentation about the resource and compartment.', - }, - _documentation: { - type: require('./element.input'), - description: - 'Additional documentation about the resource and compartment.', - }, - }), + name: 'CompartmentDefinitionresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: 'The name of a resource supported by the server.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of a resource supported by the server.', + }, + _param: { + type: require('./element.input.js'), + description: + 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', + }, + param: { + type: new GraphQLList(GraphQLString), + description: + 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Additional documentation about the resource and compartment.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional documentation about the resource and compartment.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/composition.input.js b/src/resources/3_0_1/inputs/composition.input.js index 94bd7de7..9c88adcd 100644 --- a/src/resources/3_0_1/inputs/composition.input.js +++ b/src/resources/3_0_1/inputs/composition.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 CompositionResourceInputType = new GraphQLEnumType({ - name: 'CompositionResourceInputType', - values: { - Composition: { value: 'Composition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,108 +16,166 @@ let CompositionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Composition_Input', - description: 'Base StructureDefinition for Composition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CompositionResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', - }, - _status: { - type: require('./element.input'), - description: - 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-typecodes - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-classcodes - class: { - type: require('./codeableconcept.input'), - description: - 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', - }, - encounter: { - type: require('./reference.input'), - description: - 'Describes the clinical encounter or type of care this documentation is associated with.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The composition editing time, when the composition was last logically changed by the author.', - }, - _date: { - type: require('./element.input'), - description: - 'The composition editing time, when the composition was last logically changed by the author.', - }, - author: { - type: new GraphQLList(new GraphQLNonNull(require('./reference.input'))), - description: - 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', - }, - title: { - type: new GraphQLNonNull(GraphQLString), - description: 'Official human-readable label for the composition.', - }, - _title: { - type: require('./element.input'), - description: 'Official human-readable label for the composition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ConfidentialityClassification - confidentiality: { - type: CodeScalar, - description: - 'The code specifying the level of confidentiality of the Composition.', - }, - _confidentiality: { - type: require('./element.input'), - description: - 'The code specifying the level of confidentiality of the Composition.', - }, - attester: { - type: new GraphQLList(require('./compositionattester.input')), - description: - 'A participant who has attested to the accuracy of the composition/document.', - }, - custodian: { - type: require('./reference.input'), - description: - 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', - }, - relatesTo: { - type: new GraphQLList(require('./compositionrelatesto.input')), - description: - 'Relationships that this composition has with other compositions or documents that already exist.', - }, - event: { - type: new GraphQLList(require('./compositionevent.input')), - description: - 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', - }, - section: { - type: new GraphQLList(require('./compositionsection.input')), - description: 'The root of the sections that make up the composition.', - }, - }), + description: 'Base StructureDefinition for Composition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Composition_Enum_input', + values: { Composition: { value: 'Composition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-typecodes + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-classcodes + class: { + type: require('./codeableconcept.input.js'), + description: + 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + }, + encounter: { + type: GraphQLString, + description: + 'Describes the clinical encounter or type of care this documentation is associated with.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + author: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + }, + _title: { + type: require('./element.input.js'), + description: 'Official human-readable label for the composition.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: 'Official human-readable label for the composition.', + }, + _confidentiality: { + type: require('./element.input.js'), + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ConfidentialityClassification + confidentiality: { + type: CodeScalar, + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + attester: { + type: new GraphQLList(require('./compositionattester.input.js')), + description: + 'A participant who has attested to the accuracy of the composition/document.', + }, + custodian: { + type: GraphQLString, + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', + }, + relatesTo: { + type: new GraphQLList(require('./compositionrelatesto.input.js')), + description: + 'Relationships that this composition has with other compositions or documents that already exist.', + }, + event: { + type: new GraphQLList(require('./compositionevent.input.js')), + description: + 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', + }, + section: { + type: new GraphQLList(require('./compositionsection.input.js')), + description: 'The root of the sections that make up the composition.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/compositionattester.input.js b/src/resources/3_0_1/inputs/compositionattester.input.js index 7fbff397..aab8d9af 100644 --- a/src/resources/3_0_1/inputs/compositionattester.input.js +++ b/src/resources/3_0_1/inputs/compositionattester.input.js @@ -1,44 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Composition.attester Input Schema + * @summary Compositionattester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CompositionAttester_Input', - description: - 'A participant who has attested to the accuracy of the composition/document.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-attestation-mode - mode: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: 'The type of attestation the authenticator offers.', - }, - _mode: { - type: require('./element.input'), - description: 'The type of attestation the authenticator offers.', - }, - time: { - type: DateTimeScalar, - description: 'When the composition was attested by the party.', - }, - _time: { - type: require('./element.input'), - description: 'When the composition was attested by the party.', - }, - party: { - type: require('./reference.input'), - description: 'Who attested the composition in the specified way.', - }, - }), + name: 'Compositionattester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: 'The type of attestation the authenticator offers.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-attestation-mode + mode: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'The type of attestation the authenticator offers.', + }, + _time: { + type: require('./element.input.js'), + description: 'When the composition was attested by the party.', + }, + time: { + type: DateTimeScalar, + description: 'When the composition was attested by the party.', + }, + party: { + type: GraphQLString, + description: 'Who attested the composition in the specified way.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/compositionevent.input.js b/src/resources/3_0_1/inputs/compositionevent.input.js index c53cf68e..52285da9 100644 --- a/src/resources/3_0_1/inputs/compositionevent.input.js +++ b/src/resources/3_0_1/inputs/compositionevent.input.js @@ -1,33 +1,52 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Composition.event Input Schema + * @summary Compositionevent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CompositionEvent_Input', - description: - 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode - code: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", - }, - period: { - type: require('./period.input'), - description: - 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', - }, - detail: { - type: new GraphQLList(require('./reference.input')), - description: - 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', - }, - }), + name: 'Compositionevent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', + }, + detail: { + type: new GraphQLList(GraphQLString), + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/compositionrelatesto.input.js b/src/resources/3_0_1/inputs/compositionrelatesto.input.js index 66f7c26a..43bf09fe 100644 --- a/src/resources/3_0_1/inputs/compositionrelatesto.input.js +++ b/src/resources/3_0_1/inputs/compositionrelatesto.input.js @@ -1,37 +1,57 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Composition.relatesTo Input Schema + * @summary CompositionrelatesTo Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CompositionRelatesTo_Input', - description: - 'Relationships that this composition has with other compositions or documents that already exist.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of relationship that this composition has with anther composition or document.', - }, - _code: { - type: require('./element.input'), - description: - 'The type of relationship that this composition has with anther composition or document.', - }, - targetIdentifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: 'The target composition/document of this relationship.', - }, - targetReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The target composition/document of this relationship.', - }, - }), + name: 'CompositionrelatesTo_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The type of relationship that this composition has with anther composition or document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this composition has with anther composition or document.', + }, + targetIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: 'The target composition/document of this relationship.', + }, + targetReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The target composition/document of this relationship.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/compositionsection.input.js b/src/resources/3_0_1/inputs/compositionsection.input.js index e6136803..0811aee2 100644 --- a/src/resources/3_0_1/inputs/compositionsection.input.js +++ b/src/resources/3_0_1/inputs/compositionsection.input.js @@ -1,70 +1,86 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Composition.section Input Schema + * @summary Compositionsection Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CompositionSection_Input', - description: 'The root of the sections that make up the composition.', - fields: () => - extendSchema(require('./backboneelement.input'), { - title: { - type: GraphQLString, - description: - 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', - }, - _title: { - type: require('./element.input'), - description: - 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-section-codes - code: { - type: require('./codeableconcept.input'), - description: - 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', - }, - text: { - type: require('./narrative.input'), - description: - "A human-readable narrative that contains the attested content of the section, 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.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-mode - mode: { - type: CodeScalar, - description: - 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - _mode: { - type: require('./element.input'), - description: - 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-order - orderedBy: { - type: require('./codeableconcept.input'), - description: - 'Specifies the order applied to the items in the section entries.', - }, - entry: { - type: new GraphQLList(require('./reference.input')), - description: - 'A reference to the actual resource from which the narrative in the section is derived.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason - emptyReason: { - type: require('./codeableconcept.input'), - description: - 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', - }, - }), + name: 'Compositionsection_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _title: { + type: require('./element.input.js'), + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + title: { + type: GraphQLString, + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-section-codes + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', + }, + text: { + type: require('./narrative.input.js'), + description: + "A human-readable narrative that contains the attested content of the section, 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.", + }, + _mode: { + type: require('./element.input.js'), + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-mode + mode: { + type: CodeScalar, + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-order + orderedBy: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies the order applied to the items in the section entries.', + }, + entry: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason + emptyReason: { + type: require('./codeableconcept.input.js'), + description: + 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/conceptmap.input.js b/src/resources/3_0_1/inputs/conceptmap.input.js index 961def59..9531cde5 100644 --- a/src/resources/3_0_1/inputs/conceptmap.input.js +++ b/src/resources/3_0_1/inputs/conceptmap.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConceptMapResourceInputType = new GraphQLEnumType({ - name: 'ConceptMapResourceInputType', - values: { - ConceptMap: { value: 'ConceptMap' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,179 +17,237 @@ let ConceptMapResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ConceptMap_Input', - description: 'Base StructureDefinition for ConceptMap Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ConceptMapResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. The URL SHOULD include the major version of the concept map. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. The URL SHOULD include the major version of the concept map. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: require('./identifier.input'), - description: - 'A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the concept map.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the concept map.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this concept map. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this concept map. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the concept map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the concept map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the concept map.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the concept map.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the concept map from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the concept map from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate concept map instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the concept map is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this concept map is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this concept map is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', - }, - sourceUri: { - type: UriScalar, - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - _sourceUri: { - type: require('./element.input'), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - sourceReference: { - type: require('./reference.input'), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - targetUri: { - type: UriScalar, - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - _targetUri: { - type: require('./element.input'), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - targetReference: { - type: require('./reference.input'), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - group: { - type: new GraphQLList(require('./conceptmapgroup.input')), - description: - 'A group of mappings that all have the same source and target system.', - }, - }), + description: 'Base StructureDefinition for ConceptMap Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ConceptMap_Enum_input', + values: { ConceptMap: { value: 'ConceptMap' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. The URL SHOULD include the major version of the concept map. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. The URL SHOULD include the major version of the concept map. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the concept map.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the concept map.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this concept map. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this concept map. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the concept map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the concept map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the concept map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the concept map.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the concept map from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the concept map from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate concept map instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the concept map is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this concept map is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this concept map is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', + }, + _sourceUri: { + type: require('./element.input.js'), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + sourceUri: { + type: UriScalar, + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + sourceReference: { + type: GraphQLString, + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + _targetUri: { + type: require('./element.input.js'), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetUri: { + type: UriScalar, + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetReference: { + type: GraphQLString, + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + group: { + type: new GraphQLList(require('./conceptmapgroup.input.js')), + description: + 'A group of mappings that all have the same source and target system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/conceptmapgroup.input.js b/src/resources/3_0_1/inputs/conceptmapgroup.input.js index 12c2076e..5a5a61eb 100644 --- a/src/resources/3_0_1/inputs/conceptmapgroup.input.js +++ b/src/resources/3_0_1/inputs/conceptmapgroup.input.js @@ -1,75 +1,90 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ConceptMap.group Input Schema + * @summary ConceptMapgroup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapGroup_Input', - description: - 'A group of mappings that all have the same source and target system.', - fields: () => - extendSchema(require('./backboneelement.input'), { - source: { - type: UriScalar, - description: - 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', - }, - _source: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', - }, - sourceVersion: { - type: GraphQLString, - description: - 'The specific version of the code system, as determined by the code system authority.', - }, - _sourceVersion: { - type: require('./element.input'), - description: - 'The specific version of the code system, as determined by the code system authority.', - }, - target: { - type: UriScalar, - description: - 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', - }, - _target: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', - }, - targetVersion: { - type: GraphQLString, - description: - 'The specific version of the code system, as determined by the code system authority.', - }, - _targetVersion: { - type: require('./element.input'), - description: - 'The specific version of the code system, as determined by the code system authority.', - }, - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./conceptmapgroupelement.input')), - ), - description: - 'Mappings for an individual concept in the source to one or more concepts in the target.', - }, - unmapped: { - type: require('./conceptmapgroupunmapped.input'), - description: - 'What to do when there is no match in the mappings in the group.', - }, - }), + name: 'ConceptMapgroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _source: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', + }, + source: { + type: UriScalar, + description: + 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', + }, + _sourceVersion: { + type: require('./element.input.js'), + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + sourceVersion: { + type: GraphQLString, + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + _target: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', + }, + target: { + type: UriScalar, + description: + 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', + }, + _targetVersion: { + type: require('./element.input.js'), + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + targetVersion: { + type: GraphQLString, + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./conceptmapgroupelement.input.js')), + ), + description: + 'Mappings for an individual concept in the source to one or more concepts in the target.', + }, + unmapped: { + type: require('./conceptmapgroupunmapped.input.js'), + description: + 'What to do when there is no match in the mappings in the group.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/conceptmapgroupelement.input.js b/src/resources/3_0_1/inputs/conceptmapgroupelement.input.js index 95afec4d..fe536397 100644 --- a/src/resources/3_0_1/inputs/conceptmapgroupelement.input.js +++ b/src/resources/3_0_1/inputs/conceptmapgroupelement.input.js @@ -1,47 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ConceptMap.group.element Input Schema + * @summary ConceptMapgroupelement Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapGroupElement_Input', - description: - 'Mappings for an individual concept in the source to one or more concepts in the target.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: CodeScalar, - description: - 'Identity (code or path) or the element/item being mapped.', - }, - _code: { - type: require('./element.input'), - description: - 'Identity (code or path) or the element/item being mapped.', - }, - display: { - type: GraphQLString, - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - _display: { - type: require('./element.input'), - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - target: { - type: new GraphQLList(require('./conceptmapgroupelementtarget.input')), - description: - 'A concept from the target value set that this concept maps to.', - }, - }), + name: 'ConceptMapgroupelement_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: 'Identity (code or path) or the element/item being mapped.', + }, + code: { + type: CodeScalar, + description: 'Identity (code or path) or the element/item being mapped.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + target: { + type: new GraphQLList(require('./conceptmapgroupelementtarget.input.js')), + description: + 'A concept from the target value set that this concept maps to.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/conceptmapgroupelementtarget.input.js b/src/resources/3_0_1/inputs/conceptmapgroupelementtarget.input.js index 55193594..1b1a61ad 100644 --- a/src/resources/3_0_1/inputs/conceptmapgroupelementtarget.input.js +++ b/src/resources/3_0_1/inputs/conceptmapgroupelementtarget.input.js @@ -1,69 +1,85 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ConceptMap.group.element.target Input Schema + * @summary ConceptMapgroupelementtarget Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapGroupElementTarget_Input', - description: 'A concept from the target value set that this concept maps to.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: CodeScalar, - description: - 'Identity (code or path) or the element/item that the map refers to.', - }, - _code: { - type: require('./element.input'), - description: - 'Identity (code or path) or the element/item that the map refers to.', - }, - display: { - type: GraphQLString, - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - _display: { - type: require('./element.input'), - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/concept-map-equivalence - equivalence: { - type: CodeScalar, - description: - "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", - }, - _equivalence: { - type: require('./element.input'), - description: - "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", - }, - comment: { - type: GraphQLString, - description: - 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', - }, - _comment: { - type: require('./element.input'), - description: - 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', - }, - dependsOn: { - type: new GraphQLList( - require('./conceptmapgroupelementtargetdependson.input'), - ), - description: - 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', - }, - }), + name: 'ConceptMapgroupelementtarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + code: { + type: CodeScalar, + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + _equivalence: { + type: require('./element.input.js'), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/concept-map-equivalence + equivalence: { + type: CodeScalar, + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + _comment: { + type: require('./element.input.js'), + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + comment: { + type: GraphQLString, + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + dependsOn: { + type: new GraphQLList( + require('./conceptmapgroupelementtargetdependson.input.js'), + ), + description: + 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/conceptmapgroupelementtargetdependson.input.js b/src/resources/3_0_1/inputs/conceptmapgroupelementtargetdependson.input.js index 75215b6a..b5e1fbda 100644 --- a/src/resources/3_0_1/inputs/conceptmapgroupelementtargetdependson.input.js +++ b/src/resources/3_0_1/inputs/conceptmapgroupelementtargetdependson.input.js @@ -1,62 +1,78 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ConceptMap.group.element.target.dependsOn Input Schema + * @summary ConceptMapgroupelementtargetdependsOn Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapGroupElementTargetDependsOn_Input', - description: - 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', - fields: () => - extendSchema(require('./backboneelement.input'), { - property: { - type: new GraphQLNonNull(UriScalar), - description: - 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.', - }, - _property: { - type: require('./element.input'), - description: - 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.', - }, - system: { - type: UriScalar, - description: - 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', - }, - _system: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', - }, - code: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', - }, - _code: { - type: require('./element.input'), - description: - 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', - }, - display: { - type: GraphQLString, - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - _display: { - type: require('./element.input'), - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - }), + name: 'ConceptMapgroupelementtargetdependsOn_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _property: { + type: require('./element.input.js'), + description: + 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.', + }, + property: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.', + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + system: { + type: UriScalar, + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + _code: { + type: require('./element.input.js'), + description: + 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', + }, + code: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/conceptmapgroupunmapped.input.js b/src/resources/3_0_1/inputs/conceptmapgroupunmapped.input.js index 09df7049..3a17f8f1 100644 --- a/src/resources/3_0_1/inputs/conceptmapgroupunmapped.input.js +++ b/src/resources/3_0_1/inputs/conceptmapgroupunmapped.input.js @@ -1,64 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ConceptMap.group.unmapped Input Schema + * @summary ConceptMapgroupunmapped Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConceptMapGroupUnmapped_Input', - description: - 'What to do when there is no match in the mappings in the group.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', - }, - _mode: { - type: require('./element.input'), - description: - 'Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', - }, - code: { - type: CodeScalar, - description: - "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", - }, - _code: { - type: require('./element.input'), - description: - "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", - }, - display: { - type: GraphQLString, - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - _display: { - type: require('./element.input'), - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - url: { - type: UriScalar, - description: - 'The canonical URL of the map to use if this map contains no mapping.', - }, - _url: { - type: require('./element.input'), - description: - 'The canonical URL of the map to use if this map contains no mapping.', - }, - }), + name: 'ConceptMapgroupunmapped_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', + }, + _code: { + type: require('./element.input.js'), + description: + "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", + }, + code: { + type: CodeScalar, + description: + "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", + }, + _display: { + type: require('./element.input.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + _url: { + type: require('./element.input.js'), + description: + 'The canonical URL of the map to use if this map contains no mapping.', + }, + url: { + type: UriScalar, + description: + 'The canonical URL of the map to use if this map contains no mapping.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/condition.input.js b/src/resources/3_0_1/inputs/condition.input.js index 109cf09b..c2ae5f24 100644 --- a/src/resources/3_0_1/inputs/condition.input.js +++ b/src/resources/3_0_1/inputs/condition.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConditionResourceInputType = new GraphQLEnumType({ - name: 'ConditionResourceInputType', - values: { - Condition: { value: 'Condition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,177 +17,235 @@ let ConditionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Condition_Input', - description: 'Base StructureDefinition for Condition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ConditionResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-clinical - clinicalStatus: { - type: CodeScalar, - description: 'The clinical status of the condition.', - }, - _clinicalStatus: { - type: require('./element.input'), - description: 'The clinical status of the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-ver-status - verificationStatus: { - type: CodeScalar, - description: - 'The verification status to support the clinical status of the condition.', - }, - _verificationStatus: { - type: require('./element.input'), - description: - 'The verification status to support the clinical status of the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'A category assigned to the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-severity - severity: { - type: require('./codeableconcept.input'), - description: - 'A subjective assessment of the severity of the condition as evaluated by the clinician.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - code: { - type: require('./codeableconcept.input'), - description: 'Identification of the condition, problem or diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The anatomical location where this condition manifests itself.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Indicates the patient or group who the condition record is associated with.', - }, - context: { - type: require('./reference.input'), - description: 'Encounter during which the condition was first asserted.', - }, - onsetDateTime: { - type: DateTimeScalar, - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - _onsetDateTime: { - type: require('./element.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetAge: { - type: require('./age.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetPeriod: { - type: require('./period.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetRange: { - type: require('./range.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetString: { - type: GraphQLString, - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - _onsetString: { - type: require('./element.input'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - abatementDateTime: { - type: DateTimeScalar, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementDateTime: { - type: require('./element.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementAge: { - type: require('./age.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementBoolean: { - type: GraphQLBoolean, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementBoolean: { - type: require('./element.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementPeriod: { - type: require('./period.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementRange: { - type: require('./range.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementString: { - type: GraphQLString, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementString: { - type: require('./element.input'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - assertedDate: { - type: DateTimeScalar, - description: - 'The date on which the existance of the Condition was first asserted or acknowledged.', - }, - _assertedDate: { - type: require('./element.input'), - description: - 'The date on which the existance of the Condition was first asserted or acknowledged.', - }, - asserter: { - type: require('./reference.input'), - description: 'Individual who is making the condition statement.', - }, - stage: { - type: require('./conditionstage.input'), - description: - 'Clinical stage or grade of a condition. May include formal severity assessments.', - }, - evidence: { - type: new GraphQLList(require('./conditionevidence.input')), - description: - 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', - }, - }), + description: 'Base StructureDefinition for Condition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Condition_Enum_input', + values: { Condition: { value: 'Condition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _clinicalStatus: { + type: require('./element.input.js'), + description: 'The clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-clinical + clinicalStatus: { + type: CodeScalar, + description: 'The clinical status of the condition.', + }, + _verificationStatus: { + type: require('./element.input.js'), + description: + 'The verification status to support the clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-ver-status + verificationStatus: { + type: CodeScalar, + description: + 'The verification status to support the clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A category assigned to the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-severity + severity: { + type: require('./codeableconcept.input.js'), + description: + 'A subjective assessment of the severity of the condition as evaluated by the clinician.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + code: { + type: require('./codeableconcept.input.js'), + description: 'Identification of the condition, problem or diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The anatomical location where this condition manifests itself.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Indicates the patient or group who the condition record is associated with.', + }, + context: { + type: GraphQLString, + description: 'Encounter during which the condition was first asserted.', + }, + _onsetDateTime: { + type: require('./element.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetAge: { + type: require('./age.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetPeriod: { + type: require('./period.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetRange: { + type: require('./range.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _onsetString: { + type: require('./element.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _abatementDateTime: { + type: require('./element.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementDateTime: { + type: DateTimeScalar, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementAge: { + type: require('./age.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementBoolean: { + type: require('./element.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementBoolean: { + type: GraphQLBoolean, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementPeriod: { + type: require('./period.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementRange: { + type: require('./range.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementString: { + type: require('./element.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementString: { + type: GraphQLString, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _assertedDate: { + type: require('./element.input.js'), + description: + 'The date on which the existance of the Condition was first asserted or acknowledged.', + }, + assertedDate: { + type: DateTimeScalar, + description: + 'The date on which the existance of the Condition was first asserted or acknowledged.', + }, + asserter: { + type: GraphQLString, + description: 'Individual who is making the condition statement.', + }, + stage: { + type: require('./conditionstage.input.js'), + description: + 'Clinical stage or grade of a condition. May include formal severity assessments.', + }, + evidence: { + type: new GraphQLList(require('./conditionevidence.input.js')), + description: + 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/conditionevidence.input.js b/src/resources/3_0_1/inputs/conditionevidence.input.js index a23745d4..0617c369 100644 --- a/src/resources/3_0_1/inputs/conditionevidence.input.js +++ b/src/resources/3_0_1/inputs/conditionevidence.input.js @@ -1,28 +1,47 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Condition.evidence Input Schema + * @summary Conditionevidence Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConditionEvidence_Input', - description: - 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/manifestation-or-symptom - code: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A manifestation or symptom that led to the recording of this condition.', - }, - detail: { - type: new GraphQLList(require('./reference.input')), - description: - 'Links to other relevant information, including pathology reports.', - }, - }), + name: 'Conditionevidence_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/manifestation-or-symptom + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A manifestation or symptom that led to the recording of this condition.', + }, + detail: { + type: new GraphQLList(GraphQLString), + description: + 'Links to other relevant information, including pathology reports.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/conditionstage.input.js b/src/resources/3_0_1/inputs/conditionstage.input.js index ade8ceed..b5e73f8f 100644 --- a/src/resources/3_0_1/inputs/conditionstage.input.js +++ b/src/resources/3_0_1/inputs/conditionstage.input.js @@ -1,28 +1,47 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Condition.stage Input Schema + * @summary Conditionstage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConditionStage_Input', - description: - 'Clinical stage or grade of a condition. May include formal severity assessments.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-stage - summary: { - type: require('./codeableconcept.input'), - description: - "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", - }, - assessment: { - type: new GraphQLList(require('./reference.input')), - description: - 'Reference to a formal record of the evidence on which the staging assessment is based.', - }, - }), + name: 'Conditionstage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-stage + summary: { + type: require('./codeableconcept.input.js'), + description: + "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", + }, + assessment: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/consent.input.js b/src/resources/3_0_1/inputs/consent.input.js index 01ebc787..b6edb405 100644 --- a/src/resources/3_0_1/inputs/consent.input.js +++ b/src/resources/3_0_1/inputs/consent.input.js @@ -1,23 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.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 ConsentResourceInputType = new GraphQLEnumType({ - name: 'ConsentResourceInputType', - values: { - Consent: { value: 'Consent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,125 +16,182 @@ let ConsentResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Consent_Input', - description: 'Base StructureDefinition for Consent Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ConsentResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Unique identifier for this copy of the Consent Statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-state-codes - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current state of this consent.', - }, - _status: { - type: require('./element.input'), - description: 'Indicates the current state of this consent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The patient/healthcare consumer to whom this consent applies.', - }, - period: { - type: require('./period.input'), - description: - 'Relevant time or time-period when this Consent is applicable.', - }, - dateTime: { - type: DateTimeScalar, - description: 'When this Consent was issued / created / indexed.', - }, - _dateTime: { - type: require('./element.input'), - description: 'When this Consent was issued / created / indexed.', - }, - consentingParty: { - type: new GraphQLList(require('./reference.input')), - description: - 'Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.', - }, - actor: { - type: new GraphQLList(require('./consentactor.input')), - description: - "Who or what is controlled by this consent. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-action - action: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Actions controlled by this consent.', - }, - organization: { - type: new GraphQLList(require('./reference.input')), - description: - 'The organization that manages the consent, and the framework within which it is executed.', - }, - sourceAttachment: { - type: require('./attachment.input'), - description: - 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', - }, - sourceIdentifier: { - type: require('./identifier.input'), - description: - 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', - }, - sourceReference: { - type: require('./reference.input'), - description: - 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', - }, - policy: { - type: new GraphQLList(require('./consentpolicy.input')), - description: - 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', - }, - policyRule: { - type: UriScalar, - description: 'A referece to the specific computable policy.', - }, - _policyRule: { - type: require('./element.input'), - description: 'A referece to the specific computable policy.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.input')), - description: - 'A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purpose: { - type: new GraphQLList(require('./coding.input')), - description: - 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this consent.', - }, - dataPeriod: { - type: require('./period.input'), - description: - 'Clinical or Operational Relevant period of time that bounds the data controlled by this consent.', - }, - data: { - type: new GraphQLList(require('./consentdata.input')), - description: - 'The resources controlled by this consent, if specific resources are referenced.', - }, - except: { - type: new GraphQLList(require('./consentexcept.input')), - description: - 'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.', - }, - }), + description: 'Base StructureDefinition for Consent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Consent_Enum_input', + values: { Consent: { value: 'Consent' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: 'Unique identifier for this copy of the Consent Statement.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current state of this consent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-state-codes + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this consent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient/healthcare consumer to whom this consent applies.', + }, + period: { + type: require('./period.input.js'), + description: + 'Relevant time or time-period when this Consent is applicable.', + }, + _dateTime: { + type: require('./element.input.js'), + description: 'When this Consent was issued / created / indexed.', + }, + dateTime: { + type: DateTimeScalar, + description: 'When this Consent was issued / created / indexed.', + }, + consentingParty: { + type: new GraphQLList(GraphQLString), + description: + 'Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.', + }, + actor: { + type: new GraphQLList(require('./consentactor.input.js')), + description: + "Who or what is controlled by this consent. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-action + action: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Actions controlled by this consent.', + }, + organization: { + type: new GraphQLList(GraphQLString), + description: + 'The organization that manages the consent, and the framework within which it is executed.', + }, + sourceAttachment: { + type: require('./attachment.input.js'), + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + sourceIdentifier: { + type: require('./identifier.input.js'), + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + sourceReference: { + type: GraphQLString, + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + policy: { + type: new GraphQLList(require('./consentpolicy.input.js')), + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + _policyRule: { + type: require('./element.input.js'), + description: 'A referece to the specific computable policy.', + }, + policyRule: { + type: UriScalar, + description: 'A referece to the specific computable policy.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purpose: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this consent.', + }, + dataPeriod: { + type: require('./period.input.js'), + description: + 'Clinical or Operational Relevant period of time that bounds the data controlled by this consent.', + }, + data: { + type: new GraphQLList(require('./consentdata.input.js')), + description: + 'The resources controlled by this consent, if specific resources are referenced.', + }, + except: { + type: new GraphQLList(require('./consentexcept.input.js')), + description: + 'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/consentactor.input.js b/src/resources/3_0_1/inputs/consentactor.input.js index 13070760..9371e6e9 100644 --- a/src/resources/3_0_1/inputs/consentactor.input.js +++ b/src/resources/3_0_1/inputs/consentactor.input.js @@ -1,28 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Consent.actor Input Schema + * @summary Consentactor Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConsentActor_Input', - description: - "Who or what is controlled by this consent. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-role-type - role: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'How the individual is involved in the resources content that is described in the consent.', - }, - reference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - }, - }), + name: 'Consentactor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-role-type + role: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'How the individual is involved in the resources content that is described in the consent.', + }, + reference: { + type: new GraphQLNonNull(GraphQLString), + description: + "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/consentdata.input.js b/src/resources/3_0_1/inputs/consentdata.input.js index aa61c08a..6957fa50 100644 --- a/src/resources/3_0_1/inputs/consentdata.input.js +++ b/src/resources/3_0_1/inputs/consentdata.input.js @@ -1,34 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Consent.data Input Schema + * @summary Consentdata Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConsentData_Input', - description: - 'The resources controlled by this consent, if specific resources are referenced.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-data-meaning - meaning: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the resource reference is interpreted when testing consent restrictions.', - }, - _meaning: { - type: require('./element.input'), - description: - 'How the resource reference is interpreted when testing consent restrictions.', - }, - reference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to a specific resource that defines which resources are covered by this consent.', - }, - }), + name: 'Consentdata_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _meaning: { + type: require('./element.input.js'), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-data-meaning + meaning: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + reference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/consentexcept.input.js b/src/resources/3_0_1/inputs/consentexcept.input.js index 361ecd38..e674ff6f 100644 --- a/src/resources/3_0_1/inputs/consentexcept.input.js +++ b/src/resources/3_0_1/inputs/consentexcept.input.js @@ -1,81 +1,97 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Consent.except Input Schema + * @summary Consentexcept Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConsentExcept_Input', - description: - 'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-except-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Action to take - permit or deny - when the exception conditions are met.', - }, - _type: { - type: require('./element.input'), - description: - 'Action to take - permit or deny - when the exception conditions are met.', - }, - period: { - type: require('./period.input'), - description: 'The timeframe in this exception is valid.', - }, - actor: { - type: new GraphQLList(require('./consentexceptactor.input')), - description: - "Who or what is controlled by this Exception. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-action - action: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Actions controlled by this Exception.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.input')), - description: - 'A set of security labels that define which resources are controlled by this exception. If more than one label is specified, all resources must have all the specified labels.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purpose: { - type: new GraphQLList(require('./coding.input')), - description: - 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this exception.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-content-class - class: { - type: new GraphQLList(require('./coding.input')), - description: - 'The class of information covered by this exception. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-content-code - code: { - type: new GraphQLList(require('./coding.input')), - description: - 'If this code is found in an instance, then the exception applies.', - }, - dataPeriod: { - type: require('./period.input'), - description: - 'Clinical or Operational Relevant period of time that bounds the data controlled by this exception.', - }, - data: { - type: new GraphQLList(require('./consentexceptdata.input')), - description: - 'The resources controlled by this exception, if specific resources are referenced.', - }, - }), + name: 'Consentexcept_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Action to take - permit or deny - when the exception conditions are met.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-except-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Action to take - permit or deny - when the exception conditions are met.', + }, + period: { + type: require('./period.input.js'), + description: 'The timeframe in this exception is valid.', + }, + actor: { + type: new GraphQLList(require('./consentexceptactor.input.js')), + description: + "Who or what is controlled by this Exception. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-action + action: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Actions controlled by this Exception.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A set of security labels that define which resources are controlled by this exception. If more than one label is specified, all resources must have all the specified labels.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purpose: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this exception.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-content-class + class: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The class of information covered by this exception. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-content-code + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'If this code is found in an instance, then the exception applies.', + }, + dataPeriod: { + type: require('./period.input.js'), + description: + 'Clinical or Operational Relevant period of time that bounds the data controlled by this exception.', + }, + data: { + type: new GraphQLList(require('./consentexceptdata.input.js')), + description: + 'The resources controlled by this exception, if specific resources are referenced.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/consentexceptactor.input.js b/src/resources/3_0_1/inputs/consentexceptactor.input.js index 11f15495..8ac6a0bd 100644 --- a/src/resources/3_0_1/inputs/consentexceptactor.input.js +++ b/src/resources/3_0_1/inputs/consentexceptactor.input.js @@ -1,28 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Consent.except.actor Input Schema + * @summary Consentexceptactor Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConsentExceptActor_Input', - description: - "Who or what is controlled by this Exception. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-role-type - role: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'How the individual is involved in the resources content that is described in the exception.', - }, - reference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - }, - }), + name: 'Consentexceptactor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-role-type + role: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'How the individual is involved in the resources content that is described in the exception.', + }, + reference: { + type: new GraphQLNonNull(GraphQLString), + description: + "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/consentexceptdata.input.js b/src/resources/3_0_1/inputs/consentexceptdata.input.js index 9f2dda77..7c9c1b58 100644 --- a/src/resources/3_0_1/inputs/consentexceptdata.input.js +++ b/src/resources/3_0_1/inputs/consentexceptdata.input.js @@ -1,34 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Consent.except.data Input Schema + * @summary Consentexceptdata Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConsentExceptData_Input', - description: - 'The resources controlled by this exception, if specific resources are referenced.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-data-meaning - meaning: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the resource reference is interpreted when testing consent restrictions.', - }, - _meaning: { - type: require('./element.input'), - description: - 'How the resource reference is interpreted when testing consent restrictions.', - }, - reference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to a specific resource that defines which resources are covered by this consent.', - }, - }), + name: 'Consentexceptdata_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _meaning: { + type: require('./element.input.js'), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-data-meaning + meaning: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + reference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/consentpolicy.input.js b/src/resources/3_0_1/inputs/consentpolicy.input.js index d4827483..5cbb8946 100644 --- a/src/resources/3_0_1/inputs/consentpolicy.input.js +++ b/src/resources/3_0_1/inputs/consentpolicy.input.js @@ -1,38 +1,57 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Consent.policy Input Schema + * @summary Consentpolicy Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ConsentPolicy_Input', - description: - 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', - fields: () => - extendSchema(require('./backboneelement.input'), { - authority: { - type: UriScalar, - description: - 'Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.', - }, - _authority: { - type: require('./element.input'), - description: - 'Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.', - }, - uri: { - type: UriScalar, - description: - 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', - }, - _uri: { - type: require('./element.input'), - description: - 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', - }, - }), + name: 'Consentpolicy_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _authority: { + type: require('./element.input.js'), + description: + 'Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.', + }, + authority: { + type: UriScalar, + description: + 'Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + uri: { + type: UriScalar, + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contactdetail.input.js b/src/resources/3_0_1/inputs/contactdetail.input.js index 1a85a309..2b5a3e59 100644 --- a/src/resources/3_0_1/inputs/contactdetail.input.js +++ b/src/resources/3_0_1/inputs/contactdetail.input.js @@ -1,33 +1,44 @@ const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary ContactDetail Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'ContactDetail_Input', - description: 'Base StructureDefinition for ContactDetail Type.', - fields: () => - extendSchema(require('./element.input'), { - name: { - type: GraphQLString, - description: 'The name of an individual to contact.', - }, - _name: { - type: require('./element.input'), - description: 'The name of an individual to contact.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'The contact details for the individual (if a name was provided) or the organization.', - }, - }), + description: 'Base StructureDefinition for ContactDetail Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of an individual to contact.', + }, + name: { + type: GraphQLString, + description: 'The name of an individual to contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'The contact details for the individual (if a name was provided) or the organization.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contactpoint.input.js b/src/resources/3_0_1/inputs/contactpoint.input.js index 2daa7e01..f28c9598 100644 --- a/src/resources/3_0_1/inputs/contactpoint.input.js +++ b/src/resources/3_0_1/inputs/contactpoint.input.js @@ -1,9 +1,10 @@ -const CodeScalar = require('../scalars/code.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -11,52 +12,66 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'ContactPoint_Input', - description: 'Base StructureDefinition for ContactPoint Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contact-point-system - system: { - type: CodeScalar, - description: - 'Telecommunications form for contact point - what communications system is required to make use of the contact.', - }, - _system: { - type: require('./element.input'), - description: - 'Telecommunications form for contact point - what communications system is required to make use of the contact.', - }, - value: { - type: GraphQLString, - description: - 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', - }, - _value: { - type: require('./element.input'), - description: - 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contact-point-use - use: { - type: CodeScalar, - description: 'Identifies the purpose for the contact point.', - }, - _use: { - type: require('./element.input'), - description: 'Identifies the purpose for the contact point.', - }, - rank: { - type: PositiveIntScalar, - description: - 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', - }, - _rank: { - type: require('./element.input'), - description: - 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', - }, - period: { - type: require('./period.input'), - description: 'Time period when the contact point was/is in use.', - }, - }), + description: 'Base StructureDefinition for ContactPoint Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contact-point-system + system: { + type: CodeScalar, + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + value: { + type: GraphQLString, + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + _use: { + type: require('./element.input.js'), + description: 'Identifies the purpose for the contact point.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contact-point-use + use: { + type: CodeScalar, + description: 'Identifies the purpose for the contact point.', + }, + _rank: { + type: require('./element.input.js'), + description: + 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', + }, + rank: { + type: PositiveIntScalar, + description: + 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period when the contact point was/is in use.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contract.input.js b/src/resources/3_0_1/inputs/contract.input.js index ece2bafd..be4dbcc6 100644 --- a/src/resources/3_0_1/inputs/contract.input.js +++ b/src/resources/3_0_1/inputs/contract.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ContractResourceInputType = new GraphQLEnumType({ - name: 'ContractResourceInputType', - values: { - Contract: { value: 'Contract' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,141 +16,199 @@ let ContractResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Contract_Input', - description: 'Base StructureDefinition for Contract Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ContractResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Unique identifier for this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - issued: { - type: DateTimeScalar, - description: 'When this Contract was issued.', - }, - _issued: { - type: require('./element.input'), - description: 'When this Contract was issued.', - }, - applies: { - type: require('./period.input'), - description: - 'Relevant time or time-period when this Contract is applicable.', - }, - subject: { - type: new GraphQLList(require('./reference.input')), - description: - 'The target entity impacted by or of interest to parties to the agreement.', - }, - topic: { - type: new GraphQLList(require('./reference.input')), - description: 'The matter of concern in the context of this agreement.', - }, - authority: { - type: new GraphQLList(require('./reference.input')), - description: - 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', - }, - domain: { - type: new GraphQLList(require('./reference.input')), - description: - 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-type - type: { - type: require('./codeableconcept.input'), - description: - 'Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-subtype - subType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-action - action: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Action stipulated by this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - actionReason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reason for action stipulated by this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActConsentDirective - decisionType: { - type: require('./codeableconcept.input'), - description: - 'The type of decision made by a grantor with respect to an offer made by a grantee.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-content-derivative - contentDerivative: { - type: require('./codeableconcept.input'), - description: - 'The minimal content derived from the basal information source at a specific stage in its lifecycle.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.input')), - description: - 'A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.', - }, - agent: { - type: new GraphQLList(require('./contractagent.input')), - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - }, - signer: { - type: new GraphQLList(require('./contractsigner.input')), - description: - 'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.', - }, - valuedItem: { - type: new GraphQLList(require('./contractvalueditem.input')), - description: 'Contract Valued Item List.', - }, - term: { - type: new GraphQLList(require('./contractterm.input')), - description: - 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', - }, - bindingAttachment: { - type: require('./attachment.input'), - description: - "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", - }, - bindingReference: { - type: require('./reference.input'), - description: - "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", - }, - friendly: { - type: new GraphQLList(require('./contractfriendly.input')), - description: - "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", - }, - legal: { - type: new GraphQLList(require('./contractlegal.input')), - description: - 'List of Legal expressions or representations of this Contract.', - }, - rule: { - type: new GraphQLList(require('./contractrule.input')), - description: - 'List of Computable Policy Rule Language Representations of this Contract.', - }, - }), + description: 'Base StructureDefinition for Contract Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Contract_Enum_input', + values: { Contract: { value: 'Contract' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: 'Unique identifier for this Contract.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _issued: { + type: require('./element.input.js'), + description: 'When this Contract was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract was issued.', + }, + applies: { + type: require('./period.input.js'), + description: + 'Relevant time or time-period when this Contract is applicable.', + }, + subject: { + type: new GraphQLList(GraphQLString), + description: + 'The target entity impacted by or of interest to parties to the agreement.', + }, + topic: { + type: new GraphQLList(GraphQLString), + description: 'The matter of concern in the context of this agreement.', + }, + authority: { + type: new GraphQLList(GraphQLString), + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + }, + domain: { + type: new GraphQLList(GraphQLString), + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-subtype + subType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-action + action: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Action stipulated by this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + actionReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason for action stipulated by this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActConsentDirective + decisionType: { + type: require('./codeableconcept.input.js'), + description: + 'The type of decision made by a grantor with respect to an offer made by a grantee.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-content-derivative + contentDerivative: { + type: require('./codeableconcept.input.js'), + description: + 'The minimal content derived from the basal information source at a specific stage in its lifecycle.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.', + }, + agent: { + type: new GraphQLList(require('./contractagent.input.js')), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + signer: { + type: new GraphQLList(require('./contractsigner.input.js')), + description: + 'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.', + }, + valuedItem: { + type: new GraphQLList(require('./contractvalueditem.input.js')), + description: 'Contract Valued Item List.', + }, + term: { + type: new GraphQLList(require('./contractterm.input.js')), + description: + 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', + }, + bindingAttachment: { + type: require('./attachment.input.js'), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + bindingReference: { + type: GraphQLString, + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + friendly: { + type: new GraphQLList(require('./contractfriendly.input.js')), + description: + "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", + }, + legal: { + type: new GraphQLList(require('./contractlegal.input.js')), + description: + 'List of Legal expressions or representations of this Contract.', + }, + rule: { + type: new GraphQLList(require('./contractrule.input.js')), + description: + 'List of Computable Policy Rule Language Representations of this Contract.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contractagent.input.js b/src/resources/3_0_1/inputs/contractagent.input.js index 2d97029a..122615b7 100644 --- a/src/resources/3_0_1/inputs/contractagent.input.js +++ b/src/resources/3_0_1/inputs/contractagent.input.js @@ -1,30 +1,46 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Contract.agent Input Schema + * @summary Contractagent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractAgent_Input', - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - fields: () => - extendSchema(require('./backboneelement.input'), { - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Who or what parties are assigned roles in this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole - role: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Role type of agent assigned roles in this Contract.', - }, - }), + name: 'Contractagent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: 'Who or what parties are assigned roles in this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role type of agent assigned roles in this Contract.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contractfriendly.input.js b/src/resources/3_0_1/inputs/contractfriendly.input.js index 535a67d0..7d6aa1e3 100644 --- a/src/resources/3_0_1/inputs/contractfriendly.input.js +++ b/src/resources/3_0_1/inputs/contractfriendly.input.js @@ -1,27 +1,47 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.friendly Input Schema + * @summary Contractfriendly Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractFriendly_Input', - description: - "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", - fields: () => - extendSchema(require('./backboneelement.input'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', - }, - }), + name: 'Contractfriendly_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contractlegal.input.js b/src/resources/3_0_1/inputs/contractlegal.input.js index 6985a094..274188c9 100644 --- a/src/resources/3_0_1/inputs/contractlegal.input.js +++ b/src/resources/3_0_1/inputs/contractlegal.input.js @@ -1,24 +1,45 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.legal Input Schema + * @summary Contractlegal Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractLegal_Input', - description: 'List of Legal expressions or representations of this Contract.', - fields: () => - extendSchema(require('./backboneelement.input'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: 'Contract legal text in human renderable form.', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Contract legal text in human renderable form.', - }, - }), + name: 'Contractlegal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: 'Contract legal text in human renderable form.', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Contract legal text in human renderable form.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contractrule.input.js b/src/resources/3_0_1/inputs/contractrule.input.js index c3c63094..45ac03bb 100644 --- a/src/resources/3_0_1/inputs/contractrule.input.js +++ b/src/resources/3_0_1/inputs/contractrule.input.js @@ -1,27 +1,47 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.rule Input Schema + * @summary Contractrule Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractRule_Input', - description: - 'List of Computable Policy Rule Language Representations of this Contract.', - fields: () => - extendSchema(require('./backboneelement.input'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', - }, - }), + name: 'Contractrule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contractsigner.input.js b/src/resources/3_0_1/inputs/contractsigner.input.js index 728f923f..d0e2cb3e 100644 --- a/src/resources/3_0_1/inputs/contractsigner.input.js +++ b/src/resources/3_0_1/inputs/contractsigner.input.js @@ -1,35 +1,53 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Contract.signer Input Schema + * @summary Contractsigner Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractSigner_Input', - description: - 'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-signer-type - type: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'Role of this Contract signer, e.g. notary, grantee.', - }, - party: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Party which is a signator to this Contract.', - }, - signature: { - type: new GraphQLList(new GraphQLNonNull(require('./signature.input'))), - description: - 'Legally binding Contract DSIG signature contents in Base64.', - }, - }), + name: 'Contractsigner_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-signer-type + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'Role of this Contract signer, e.g. notary, grantee.', + }, + party: { + type: new GraphQLNonNull(GraphQLString), + description: 'Party which is a signator to this Contract.', + }, + signature: { + type: new GraphQLList( + new GraphQLNonNull(require('./signature.input.js')), + ), + description: + 'Legally binding Contract DSIG signature contents in Base64.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contractterm.input.js b/src/resources/3_0_1/inputs/contractterm.input.js index e204e0aa..7331f083 100644 --- a/src/resources/3_0_1/inputs/contractterm.input.js +++ b/src/resources/3_0_1/inputs/contractterm.input.js @@ -1,91 +1,105 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.term Input Schema + * @summary Contractterm Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractTerm_Input', - description: - 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Unique identifier for this particular Contract Provision.', - }, - issued: { - type: DateTimeScalar, - description: 'When this Contract Provision was issued.', - }, - _issued: { - type: require('./element.input'), - description: 'When this Contract Provision was issued.', - }, - applies: { - type: require('./period.input'), - description: - 'Relevant time or time-period when this Contract Provision is applicable.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-term-type - type: { - type: require('./codeableconcept.input'), - description: - 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-term-subtype - subType: { - type: require('./codeableconcept.input'), - description: - 'Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.', - }, - topic: { - type: new GraphQLList(require('./reference.input')), - description: - 'The matter of concern in the context of this provision of the agrement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-action - action: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Action stipulated by this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - actionReason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Reason or purpose for the action stipulated by this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.input')), - description: - 'A set of security labels that define which terms are controlled by this condition.', - }, - agent: { - type: new GraphQLList(require('./contracttermagent.input')), - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - }, - text: { - type: GraphQLString, - description: 'Human readable form of this Contract Provision.', - }, - _text: { - type: require('./element.input'), - description: 'Human readable form of this Contract Provision.', - }, - valuedItem: { - type: new GraphQLList(require('./contracttermvalueditem.input')), - description: 'Contract Provision Valued Item List.', - }, - }), + name: 'Contractterm_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: 'Unique identifier for this particular Contract Provision.', + }, + _issued: { + type: require('./element.input.js'), + description: 'When this Contract Provision was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract Provision was issued.', + }, + applies: { + type: require('./period.input.js'), + description: + 'Relevant time or time-period when this Contract Provision is applicable.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-term-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-term-subtype + subType: { + type: require('./codeableconcept.input.js'), + description: + 'Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.', + }, + topic: { + type: new GraphQLList(GraphQLString), + description: + 'The matter of concern in the context of this provision of the agrement.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-action + action: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Action stipulated by this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + actionReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Reason or purpose for the action stipulated by this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A set of security labels that define which terms are controlled by this condition.', + }, + agent: { + type: new GraphQLList(require('./contracttermagent.input.js')), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + _text: { + type: require('./element.input.js'), + description: 'Human readable form of this Contract Provision.', + }, + text: { + type: GraphQLString, + description: 'Human readable form of this Contract Provision.', + }, + valuedItem: { + type: new GraphQLList(require('./contracttermvalueditem.input.js')), + description: 'Contract Provision Valued Item List.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contracttermagent.input.js b/src/resources/3_0_1/inputs/contracttermagent.input.js index a9d70c1d..06e76896 100644 --- a/src/resources/3_0_1/inputs/contracttermagent.input.js +++ b/src/resources/3_0_1/inputs/contracttermagent.input.js @@ -1,31 +1,47 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Contract.term.agent Input Schema + * @summary Contracttermagent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractTermAgent_Input', - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - fields: () => - extendSchema(require('./backboneelement.input'), { - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The agent assigned a role in this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole - role: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Role played by the agent assigned this role in the execution of this Contract Provision.', - }, - }), + name: 'Contracttermagent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: 'The agent assigned a role in this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Role played by the agent assigned this role in the execution of this Contract Provision.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contracttermvalueditem.input.js b/src/resources/3_0_1/inputs/contracttermvalueditem.input.js index 0b1d23fc..2503d324 100644 --- a/src/resources/3_0_1/inputs/contracttermvalueditem.input.js +++ b/src/resources/3_0_1/inputs/contracttermvalueditem.input.js @@ -1,75 +1,96 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLFloat } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.term.valuedItem Input Schema + * @summary ContracttermvaluedItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractTermValuedItem_Input', - description: 'Contract Provision Valued Item List.', - fields: () => - extendSchema(require('./backboneelement.input'), { - entityCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Specific type of Contract Provision Valued Item that may be priced.', - }, - entityReference: { - type: require('./reference.input'), - description: - 'Specific type of Contract Provision Valued Item that may be priced.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Identifies a Contract Provision Valued Item instance.', - }, - effectiveTime: { - type: DateTimeScalar, - description: - 'Indicates the time during which this Contract Term ValuedItem information is effective.', - }, - _effectiveTime: { - type: require('./element.input'), - description: - 'Indicates the time during which this Contract Term ValuedItem information is effective.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.', - }, - unitPrice: { - type: require('./money.input'), - description: 'A Contract Provision Valued Item unit valuation measure.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.input'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./money.input'), - description: - 'Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - }), + name: 'ContracttermvaluedItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + entityCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specific type of Contract Provision Valued Item that may be priced.', + }, + entityReference: { + type: GraphQLString, + description: + 'Specific type of Contract Provision Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Identifies a Contract Provision Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.input.js'), + description: + 'Indicates the time during which this Contract Term ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract Term ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.', + }, + unitPrice: { + type: require('./money.input.js'), + description: 'A Contract Provision Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.input.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./money.input.js'), + description: + 'Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contractvalueditem.input.js b/src/resources/3_0_1/inputs/contractvalueditem.input.js index b123e9d9..fb2721bd 100644 --- a/src/resources/3_0_1/inputs/contractvalueditem.input.js +++ b/src/resources/3_0_1/inputs/contractvalueditem.input.js @@ -1,75 +1,94 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLFloat } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.valuedItem Input Schema + * @summary ContractvaluedItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ContractValuedItem_Input', - description: 'Contract Valued Item List.', - fields: () => - extendSchema(require('./backboneelement.input'), { - entityCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Specific type of Contract Valued Item that may be priced.', - }, - entityReference: { - type: require('./reference.input'), - description: - 'Specific type of Contract Valued Item that may be priced.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Identifies a Contract Valued Item instance.', - }, - effectiveTime: { - type: DateTimeScalar, - description: - 'Indicates the time during which this Contract ValuedItem information is effective.', - }, - _effectiveTime: { - type: require('./element.input'), - description: - 'Indicates the time during which this Contract ValuedItem information is effective.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', - }, - unitPrice: { - type: require('./money.input'), - description: 'A Contract Valued Item unit valuation measure.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.input'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./money.input'), - description: - 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - }), + name: 'ContractvaluedItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + entityCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + entityReference: { + type: GraphQLString, + description: 'Specific type of Contract Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Identifies a Contract Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.input.js'), + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', + }, + unitPrice: { + type: require('./money.input.js'), + description: 'A Contract Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.input.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./money.input.js'), + description: + 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/contributor.input.js b/src/resources/3_0_1/inputs/contributor.input.js index 95f37233..cfebb4a1 100644 --- a/src/resources/3_0_1/inputs/contributor.input.js +++ b/src/resources/3_0_1/inputs/contributor.input.js @@ -1,13 +1,10 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -15,32 +12,46 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Contributor_Input', - description: 'Base StructureDefinition for Contributor Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contributor-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of contributor.', - }, - _type: { - type: require('./element.input'), - description: 'The type of contributor.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of the individual or organization responsible for the contribution.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of the individual or organization responsible for the contribution.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the contributor.', - }, - }), + description: 'Base StructureDefinition for Contributor Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of contributor.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contributor-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of contributor.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization responsible for the contribution.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the individual or organization responsible for the contribution.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the contributor.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/count.input.js b/src/resources/3_0_1/inputs/count.input.js index 6e847ad7..9e8ad8d7 100644 --- a/src/resources/3_0_1/inputs/count.input.js +++ b/src/resources/3_0_1/inputs/count.input.js @@ -1,7 +1,11 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Count_Input', - description: 'Base StructureDefinition for Count Type.', - fields: () => extendSchema(require('./quantity.input')), + description: 'Base StructureDefinition for Count Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/coverage.input.js b/src/resources/3_0_1/inputs/coverage.input.js index 141ba612..7ab04c4c 100644 --- a/src/resources/3_0_1/inputs/coverage.input.js +++ b/src/resources/3_0_1/inputs/coverage.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.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 CoverageResourceInputType = new GraphQLEnumType({ - name: 'CoverageResourceInputType', - values: { - Coverage: { value: 'Coverage' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -24,118 +16,176 @@ let CoverageResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Coverage_Input', - description: 'Base StructureDefinition for Coverage Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(CoverageResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Certificate number, Personal Health Number or Case ID. May be constructed as the concatination of the Coverage.SubscriberID and the Coverage.dependant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/coverage-type - type: { - type: require('./codeableconcept.input'), - description: - 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.', - }, - policyHolder: { - type: require('./reference.input'), - description: - "The party who 'owns' the insurance policy, may be an individual, corporation or the subscriber's employer.", - }, - subscriber: { - type: require('./reference.input'), - description: - "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", - }, - subscriberId: { - type: GraphQLString, - description: 'The insurer assigned ID for the Subscriber.', - }, - _subscriberId: { - type: require('./element.input'), - description: 'The insurer assigned ID for the Subscriber.', - }, - beneficiary: { - type: require('./reference.input'), - description: - 'The party who benefits from the insurance coverage., the patient when services are provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/policyholder-relationship - relationship: { - type: require('./codeableconcept.input'), - description: - 'The relationship of beneficiary (patient) to the subscriber.', - }, - period: { - type: require('./period.input'), - description: - "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", - }, - payor: { - type: new GraphQLList(require('./reference.input')), - description: - 'The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements. May provide multiple identifiers such as insurance company identifier or business identifier (BIN number).', - }, - grouping: { - type: require('./coveragegrouping.input'), - description: - 'A suite of underwrite specific classifiers, for example may be used to identify a class of coverage or employer group, Policy, Plan.', - }, - dependent: { - type: GraphQLString, - description: 'A unique identifier for a dependent under the coverage.', - }, - _dependent: { - type: require('./element.input'), - description: 'A unique identifier for a dependent under the coverage.', - }, - sequence: { - type: GraphQLString, - description: - 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', - }, - _sequence: { - type: require('./element.input'), - description: - 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', - }, - order: { - type: PositiveIntScalar, - description: - 'The order of applicability of this coverage relative to other coverages which are currently inforce. Note, there may be gaps in the numbering and this does not imply primary, secondard etc. as the specific positioning of coverages depends upon the episode of care.', - }, - _order: { - type: require('./element.input'), - description: - 'The order of applicability of this coverage relative to other coverages which are currently inforce. Note, there may be gaps in the numbering and this does not imply primary, secondard etc. as the specific positioning of coverages depends upon the episode of care.', - }, - network: { - type: GraphQLString, - description: - "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", - }, - _network: { - type: require('./element.input'), - description: - "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", - }, - contract: { - type: new GraphQLList(require('./reference.input')), - description: 'The policy(s) which constitute this insurance coverage.', - }, - }), + description: 'Base StructureDefinition for Coverage Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Coverage_Enum_input', + values: { Coverage: { value: 'Coverage' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Certificate number, Personal Health Number or Case ID. May be constructed as the concatination of the Coverage.SubscriberID and the Coverage.dependant.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/coverage-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.', + }, + policyHolder: { + type: GraphQLString, + description: + "The party who 'owns' the insurance policy, may be an individual, corporation or the subscriber's employer.", + }, + subscriber: { + type: GraphQLString, + description: + "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", + }, + _subscriberId: { + type: require('./element.input.js'), + description: 'The insurer assigned ID for the Subscriber.', + }, + subscriberId: { + type: GraphQLString, + description: 'The insurer assigned ID for the Subscriber.', + }, + beneficiary: { + type: GraphQLString, + description: + 'The party who benefits from the insurance coverage., the patient when services are provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/policyholder-relationship + relationship: { + type: require('./codeableconcept.input.js'), + description: + 'The relationship of beneficiary (patient) to the subscriber.', + }, + period: { + type: require('./period.input.js'), + description: + "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", + }, + payor: { + type: new GraphQLList(GraphQLString), + description: + 'The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements. May provide multiple identifiers such as insurance company identifier or business identifier (BIN number).', + }, + grouping: { + type: require('./coveragegrouping.input.js'), + description: + 'A suite of underwrite specific classifiers, for example may be used to identify a class of coverage or employer group, Policy, Plan.', + }, + _dependent: { + type: require('./element.input.js'), + description: 'A unique identifier for a dependent under the coverage.', + }, + dependent: { + type: GraphQLString, + description: 'A unique identifier for a dependent under the coverage.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', + }, + sequence: { + type: GraphQLString, + description: + 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', + }, + _order: { + type: require('./element.input.js'), + description: + 'The order of applicability of this coverage relative to other coverages which are currently inforce. Note, there may be gaps in the numbering and this does not imply primary, secondard etc. as the specific positioning of coverages depends upon the episode of care.', + }, + order: { + type: PositiveIntScalar, + description: + 'The order of applicability of this coverage relative to other coverages which are currently inforce. Note, there may be gaps in the numbering and this does not imply primary, secondard etc. as the specific positioning of coverages depends upon the episode of care.', + }, + _network: { + type: require('./element.input.js'), + description: + "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", + }, + network: { + type: GraphQLString, + description: + "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", + }, + contract: { + type: new GraphQLList(GraphQLString), + description: 'The policy(s) which constitute this insurance coverage.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/coveragegrouping.input.js b/src/resources/3_0_1/inputs/coveragegrouping.input.js index 23132133..c167f3ba 100644 --- a/src/resources/3_0_1/inputs/coveragegrouping.input.js +++ b/src/resources/3_0_1/inputs/coveragegrouping.input.js @@ -1,125 +1,144 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Coverage.grouping Input Schema + * @summary Coveragegrouping Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'CoverageGrouping_Input', - description: - 'A suite of underwrite specific classifiers, for example may be used to identify a class of coverage or employer group, Policy, Plan.', - fields: () => - extendSchema(require('./backboneelement.input'), { - group: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify an employer group. May also be referred to as a Policy or Group ID.', - }, - _group: { - type: require('./element.input'), - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify an employer group. May also be referred to as a Policy or Group ID.', - }, - groupDisplay: { - type: GraphQLString, - description: 'A short description for the group.', - }, - _groupDisplay: { - type: require('./element.input'), - description: 'A short description for the group.', - }, - subGroup: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a subset of an employer group.', - }, - _subGroup: { - type: require('./element.input'), - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a subset of an employer group.', - }, - subGroupDisplay: { - type: GraphQLString, - description: 'A short description for the subgroup.', - }, - _subGroupDisplay: { - type: require('./element.input'), - description: 'A short description for the subgroup.', - }, - plan: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a collection of benefits provided to employees. May be referred to as a Section or Division ID.', - }, - _plan: { - type: require('./element.input'), - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a collection of benefits provided to employees. May be referred to as a Section or Division ID.', - }, - planDisplay: { - type: GraphQLString, - description: 'A short description for the plan.', - }, - _planDisplay: { - type: require('./element.input'), - description: 'A short description for the plan.', - }, - subPlan: { - type: GraphQLString, - description: - 'Identifies a sub-style or sub-collective of coverage issued by the underwriter, for example may be used to identify a subset of a collection of benefits provided to employees.', - }, - _subPlan: { - type: require('./element.input'), - description: - 'Identifies a sub-style or sub-collective of coverage issued by the underwriter, for example may be used to identify a subset of a collection of benefits provided to employees.', - }, - subPlanDisplay: { - type: GraphQLString, - description: 'A short description for the subplan.', - }, - _subPlanDisplay: { - type: require('./element.input'), - description: 'A short description for the subplan.', - }, - class: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage such as a level of deductables or co-payment.', - }, - _class: { - type: require('./element.input'), - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage such as a level of deductables or co-payment.', - }, - classDisplay: { - type: GraphQLString, - description: 'A short description for the class.', - }, - _classDisplay: { - type: require('./element.input'), - description: 'A short description for the class.', - }, - subClass: { - type: GraphQLString, - description: - 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a subclass of coverage such as a sub-level of deductables or co-payment.', - }, - _subClass: { - type: require('./element.input'), - description: - 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a subclass of coverage such as a sub-level of deductables or co-payment.', - }, - subClassDisplay: { - type: GraphQLString, - description: 'A short description for the subclass.', - }, - _subClassDisplay: { - type: require('./element.input'), - description: 'A short description for the subclass.', - }, - }), + name: 'Coveragegrouping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _group: { + type: require('./element.input.js'), + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify an employer group. May also be referred to as a Policy or Group ID.', + }, + group: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify an employer group. May also be referred to as a Policy or Group ID.', + }, + _groupDisplay: { + type: require('./element.input.js'), + description: 'A short description for the group.', + }, + groupDisplay: { + type: GraphQLString, + description: 'A short description for the group.', + }, + _subGroup: { + type: require('./element.input.js'), + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a subset of an employer group.', + }, + subGroup: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a subset of an employer group.', + }, + _subGroupDisplay: { + type: require('./element.input.js'), + description: 'A short description for the subgroup.', + }, + subGroupDisplay: { + type: GraphQLString, + description: 'A short description for the subgroup.', + }, + _plan: { + type: require('./element.input.js'), + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a collection of benefits provided to employees. May be referred to as a Section or Division ID.', + }, + plan: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a collection of benefits provided to employees. May be referred to as a Section or Division ID.', + }, + _planDisplay: { + type: require('./element.input.js'), + description: 'A short description for the plan.', + }, + planDisplay: { + type: GraphQLString, + description: 'A short description for the plan.', + }, + _subPlan: { + type: require('./element.input.js'), + description: + 'Identifies a sub-style or sub-collective of coverage issued by the underwriter, for example may be used to identify a subset of a collection of benefits provided to employees.', + }, + subPlan: { + type: GraphQLString, + description: + 'Identifies a sub-style or sub-collective of coverage issued by the underwriter, for example may be used to identify a subset of a collection of benefits provided to employees.', + }, + _subPlanDisplay: { + type: require('./element.input.js'), + description: 'A short description for the subplan.', + }, + subPlanDisplay: { + type: GraphQLString, + description: 'A short description for the subplan.', + }, + _class: { + type: require('./element.input.js'), + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage such as a level of deductables or co-payment.', + }, + class: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage such as a level of deductables or co-payment.', + }, + _classDisplay: { + type: require('./element.input.js'), + description: 'A short description for the class.', + }, + classDisplay: { + type: GraphQLString, + description: 'A short description for the class.', + }, + _subClass: { + type: require('./element.input.js'), + description: + 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a subclass of coverage such as a sub-level of deductables or co-payment.', + }, + subClass: { + type: GraphQLString, + description: + 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a subclass of coverage such as a sub-level of deductables or co-payment.', + }, + _subClassDisplay: { + type: require('./element.input.js'), + description: 'A short description for the subclass.', + }, + subClassDisplay: { + type: GraphQLString, + description: 'A short description for the subclass.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/dataelement.input.js b/src/resources/3_0_1/inputs/dataelement.input.js index 885108e6..6865d55e 100644 --- a/src/resources/3_0_1/inputs/dataelement.input.js +++ b/src/resources/3_0_1/inputs/dataelement.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DataElementResourceInputType = new GraphQLEnumType({ - name: 'DataElementResourceInputType', - values: { - DataElement: { value: 'DataElement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,147 +17,205 @@ let DataElementResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DataElement_Input', - description: 'Base StructureDefinition for DataElement Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DataElementResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this data element. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this data element. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the data element.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the data element.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the data element.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the data element.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate data element instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the data element is intended to be used.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dataelement-stringency - stringency: { - type: CodeScalar, - description: - 'Identifies how precise the data element is in its definition.', - }, - _stringency: { - type: require('./element.input'), - description: - 'Identifies how precise the data element is in its definition.', - }, - mapping: { - type: new GraphQLList(require('./dataelementmapping.input')), - description: - 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', - }, - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.input')), - ), - description: - 'Defines the structure, type, allowed values and other constraining characteristics of the data element.', - }, - }), + description: 'Base StructureDefinition for DataElement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DataElement_Enum_input', + values: { DataElement: { value: 'DataElement' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this data element. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this data element. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the data element.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the data element.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the data element.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the data element.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate data element instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the data element is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.', + }, + _stringency: { + type: require('./element.input.js'), + description: + 'Identifies how precise the data element is in its definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dataelement-stringency + stringency: { + type: CodeScalar, + description: + 'Identifies how precise the data element is in its definition.', + }, + mapping: { + type: new GraphQLList(require('./dataelementmapping.input.js')), + description: + 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.input.js')), + ), + description: + 'Defines the structure, type, allowed values and other constraining characteristics of the data element.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/dataelementmapping.input.js b/src/resources/3_0_1/inputs/dataelementmapping.input.js index be2c589a..a88f73e4 100644 --- a/src/resources/3_0_1/inputs/dataelementmapping.input.js +++ b/src/resources/3_0_1/inputs/dataelementmapping.input.js @@ -1,61 +1,77 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary DataElement.mapping Input Schema + * @summary DataElementmapping Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DataElementMapping_Input', - description: - 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: - 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', - }, - _identity: { - type: require('./element.input'), - description: - 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', - }, - uri: { - type: UriScalar, - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - _uri: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - name: { - type: GraphQLString, - description: 'A name for the specification that is being mapped to.', - }, - _name: { - type: require('./element.input'), - description: 'A name for the specification that is being mapped to.', - }, - comment: { - type: GraphQLString, - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - _comment: { - type: require('./element.input'), - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - }), + name: 'DataElementmapping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _identity: { + type: require('./element.input.js'), + description: + 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comment: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/datarequirement.input.js b/src/resources/3_0_1/inputs/datarequirement.input.js index 9aecdc0f..94942ee3 100644 --- a/src/resources/3_0_1/inputs/datarequirement.input.js +++ b/src/resources/3_0_1/inputs/datarequirement.input.js @@ -1,14 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -16,49 +13,63 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'DataRequirement_Input', - description: 'Base StructureDefinition for DataRequirement Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/all-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', - }, - _type: { - type: require('./element.input'), - description: - 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', - }, - profile: { - type: new GraphQLList(UriScalar), - description: - 'The profile of the required data, specified as the uri of the profile definition.', - }, - _profile: { - type: require('./element.input'), - description: - 'The profile of the required data, specified as the uri of the profile definition.', - }, - mustSupport: { - type: new GraphQLList(GraphQLString), - description: - 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.', - }, - _mustSupport: { - type: require('./element.input'), - description: - 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.', - }, - codeFilter: { - type: new GraphQLList(require('./datarequirementcodefilter.input')), - description: - 'Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.', - }, - dateFilter: { - type: new GraphQLList(require('./datarequirementdatefilter.input')), - description: - 'Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.', - }, - }), + description: 'Base StructureDefinition for DataRequirement Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/all-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'The profile of the required data, specified as the uri of the profile definition.', + }, + profile: { + type: new GraphQLList(UriScalar), + description: + 'The profile of the required data, specified as the uri of the profile definition.', + }, + _mustSupport: { + type: require('./element.input.js'), + description: + 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.', + }, + mustSupport: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.', + }, + codeFilter: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.', + }, + dateFilter: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/datarequirementcodefilter.input.js b/src/resources/3_0_1/inputs/datarequirementcodefilter.input.js index 94336b0e..76e78a31 100644 --- a/src/resources/3_0_1/inputs/datarequirementcodefilter.input.js +++ b/src/resources/3_0_1/inputs/datarequirementcodefilter.input.js @@ -1,68 +1,78 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary DataRequirement.codeFilter Input Schema + * @summary DataRequirementcodeFilter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DataRequirementCodeFilter_Input', - description: - 'Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.', - fields: () => - extendSchema(require('./element.input'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', - }, - _path: { - type: require('./element.input'), - description: - 'The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', - }, - valueSetString: { - type: GraphQLString, - description: - 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', - }, - _valueSetString: { - type: require('./element.input'), - description: - 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', - }, - valueSetReference: { - type: require('./reference.input'), - description: - 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', - }, - valueCode: { - type: new GraphQLList(CodeScalar), - description: - 'The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.', - }, - _valueCode: { - type: require('./element.input'), - description: - 'The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.', - }, - valueCoding: { - type: new GraphQLList(require('./coding.input')), - description: - 'The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.', - }, - valueCodeableConcept: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.', - }, - }), + name: 'DataRequirementcodeFilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', + }, + _valueSetString: { + type: require('./element.input.js'), + description: + 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + valueSetString: { + type: GraphQLString, + description: + 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + valueSetReference: { + type: GraphQLString, + description: + 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + _valueCode: { + type: require('./element.input.js'), + description: + 'The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.', + }, + valueCode: { + type: new GraphQLList(CodeScalar), + description: + 'The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.', + }, + valueCoding: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.', + }, + valueCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/datarequirementdatefilter.input.js b/src/resources/3_0_1/inputs/datarequirementdatefilter.input.js index 65192d52..6c2939b8 100644 --- a/src/resources/3_0_1/inputs/datarequirementdatefilter.input.js +++ b/src/resources/3_0_1/inputs/datarequirementdatefilter.input.js @@ -1,52 +1,63 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary DataRequirement.dateFilter Input Schema + * @summary DataRequirementdateFilter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DataRequirementDateFilter_Input', - description: - 'Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.', - fields: () => - extendSchema(require('./element.input'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.', - }, - _path: { - type: require('./element.input'), - description: - 'The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', - }, - valuePeriod: { - type: require('./period.input'), - description: - 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', - }, - valueDuration: { - type: require('./duration.input'), - description: - 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', - }, - }), + name: 'DataRequirementdateFilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', + }, + valueDuration: { + type: require('./duration.input.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/detectedissue.input.js b/src/resources/3_0_1/inputs/detectedissue.input.js index 94692279..597dc456 100644 --- a/src/resources/3_0_1/inputs/detectedissue.input.js +++ b/src/resources/3_0_1/inputs/detectedissue.input.js @@ -1,23 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.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 DetectedIssueResourceInputType = new GraphQLEnumType({ - name: 'DetectedIssueResourceInputType', - values: { - DetectedIssue: { value: 'DetectedIssue' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,90 +16,148 @@ let DetectedIssueResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DetectedIssue_Input', - description: 'Base StructureDefinition for DetectedIssue Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DetectedIssueResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Business identifier associated with the detected issue record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the status of the detected issue.', - }, - _status: { - type: require('./element.input'), - description: 'Indicates the status of the detected issue.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-category - category: { - type: require('./codeableconcept.input'), - description: 'Identifies the general type of issue identified.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-severity - severity: { - type: CodeScalar, - description: - 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', - }, - _severity: { - type: require('./element.input'), - description: - 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', - }, - patient: { - type: require('./reference.input'), - description: - 'Indicates the patient whose record the detected issue is associated with.', - }, - date: { - type: DateTimeScalar, - description: - 'The date or date-time when the detected issue was initially identified.', - }, - _date: { - type: require('./element.input'), - description: - 'The date or date-time when the detected issue was initially identified.', - }, - author: { - type: require('./reference.input'), - description: - 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', - }, - implicated: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', - }, - detail: { - type: GraphQLString, - description: 'A textual explanation of the detected issue.', - }, - _detail: { - type: require('./element.input'), - description: 'A textual explanation of the detected issue.', - }, - reference: { - type: UriScalar, - description: - 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', - }, - _reference: { - type: require('./element.input'), - description: - 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', - }, - mitigation: { - type: new GraphQLList(require('./detectedissuemitigation.input')), - description: - 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', - }, - }), + description: 'Base StructureDefinition for DetectedIssue Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DetectedIssue_Enum_input', + values: { DetectedIssue: { value: 'DetectedIssue' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'Business identifier associated with the detected issue record.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the status of the detected issue.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the status of the detected issue.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-category + category: { + type: require('./codeableconcept.input.js'), + description: 'Identifies the general type of issue identified.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-severity + severity: { + type: CodeScalar, + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + patient: { + type: GraphQLString, + description: + 'Indicates the patient whose record the detected issue is associated with.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date or date-time when the detected issue was initially identified.', + }, + date: { + type: DateTimeScalar, + description: + 'The date or date-time when the detected issue was initially identified.', + }, + author: { + type: GraphQLString, + description: + 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', + }, + implicated: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + }, + _detail: { + type: require('./element.input.js'), + description: 'A textual explanation of the detected issue.', + }, + detail: { + type: GraphQLString, + description: 'A textual explanation of the detected issue.', + }, + _reference: { + type: require('./element.input.js'), + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + reference: { + type: UriScalar, + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + mitigation: { + type: new GraphQLList(require('./detectedissuemitigation.input.js')), + description: + 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/detectedissuemitigation.input.js b/src/resources/3_0_1/inputs/detectedissuemitigation.input.js index ea108eee..465a84d8 100644 --- a/src/resources/3_0_1/inputs/detectedissuemitigation.input.js +++ b/src/resources/3_0_1/inputs/detectedissuemitigation.input.js @@ -1,37 +1,57 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary DetectedIssue.mitigation Input Schema + * @summary DetectedIssuemitigation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DetectedIssueMitigation_Input', - description: - 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action - action: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', - }, - date: { - type: DateTimeScalar, - description: 'Indicates when the mitigating action was documented.', - }, - _date: { - type: require('./element.input'), - description: 'Indicates when the mitigating action was documented.', - }, - author: { - type: require('./reference.input'), - description: - 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', - }, - }), + name: 'DetectedIssuemitigation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action + action: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', + }, + _date: { + type: require('./element.input.js'), + description: 'Indicates when the mitigating action was documented.', + }, + date: { + type: DateTimeScalar, + description: 'Indicates when the mitigating action was documented.', + }, + author: { + type: GraphQLString, + description: + 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/device.input.js b/src/resources/3_0_1/inputs/device.input.js index 8205e9d7..e26b3031 100644 --- a/src/resources/3_0_1/inputs/device.input.js +++ b/src/resources/3_0_1/inputs/device.input.js @@ -1,23 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.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 DeviceResourceInputType = new GraphQLEnumType({ - name: 'DeviceResourceInputType', - values: { - Device: { value: 'Device' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,130 +16,187 @@ let DeviceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Device_Input', - description: 'Base StructureDefinition for Device Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Unique instance identifiers assigned to a device by manufacturers other organizations or owners.', - }, - udi: { - type: require('./deviceudi.input'), - description: - '[Unique device identifier (UDI)](device.html#5.11.3.2.2) assigned to device label or package.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-status - status: { - type: CodeScalar, - description: 'Status of the Device availability.', - }, - _status: { - type: require('./element.input'), - description: 'Status of the Device availability.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-kind - type: { - type: require('./codeableconcept.input'), - description: 'Code or identifier to identify a kind of device.', - }, - lotNumber: { - type: GraphQLString, - description: 'Lot number assigned by the manufacturer.', - }, - _lotNumber: { - type: require('./element.input'), - description: 'Lot number assigned by the manufacturer.', - }, - manufacturer: { - type: GraphQLString, - description: 'A name of the manufacturer.', - }, - _manufacturer: { - type: require('./element.input'), - description: 'A name of the manufacturer.', - }, - manufactureDate: { - type: DateTimeScalar, - description: 'The date and time when the device was manufactured.', - }, - _manufactureDate: { - type: require('./element.input'), - description: 'The date and time when the device was manufactured.', - }, - expirationDate: { - type: DateTimeScalar, - description: - 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', - }, - _expirationDate: { - type: require('./element.input'), - description: - 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', - }, - model: { - type: GraphQLString, - description: - "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", - }, - _model: { - type: require('./element.input'), - description: - "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", - }, - version: { - type: GraphQLString, - description: - 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', - }, - patient: { - type: require('./reference.input'), - description: - 'Patient information, If the device is affixed to a person.', - }, - owner: { - type: require('./reference.input'), - description: - 'An organization that is responsible for the provision and ongoing maintenance of the device.', - }, - contact: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for an organization or a particular human that is responsible for the device.', - }, - location: { - type: require('./reference.input'), - description: 'The place where the device can be found.', - }, - url: { - type: UriScalar, - description: - 'A network address on which the device may be contacted directly.', - }, - _url: { - type: require('./element.input'), - description: - 'A network address on which the device may be contacted directly.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Descriptive information, usage information or implantation information that is not captured in an existing element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-safety - safety: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Provides additional safety characteristics about a medical device. For example devices containing latex.', - }, - }), + description: 'Base StructureDefinition for Device Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Device_Enum_input', + values: { Device: { value: 'Device' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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 instance identifiers assigned to a device by manufacturers other organizations or owners.', + }, + udi: { + type: require('./deviceudi.input.js'), + description: + '[Unique device identifier (UDI)](device.html#5.11.3.2.2) assigned to device label or package.', + }, + _status: { + type: require('./element.input.js'), + description: 'Status of the Device availability.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-status + status: { + type: CodeScalar, + description: 'Status of the Device availability.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-kind + type: { + type: require('./codeableconcept.input.js'), + description: 'Code or identifier to identify a kind of device.', + }, + _lotNumber: { + type: require('./element.input.js'), + description: 'Lot number assigned by the manufacturer.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number assigned by the manufacturer.', + }, + _manufacturer: { + type: require('./element.input.js'), + description: 'A name of the manufacturer.', + }, + manufacturer: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + _manufactureDate: { + type: require('./element.input.js'), + description: 'The date and time when the device was manufactured.', + }, + manufactureDate: { + type: DateTimeScalar, + description: 'The date and time when the device was manufactured.', + }, + _expirationDate: { + type: require('./element.input.js'), + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + expirationDate: { + type: DateTimeScalar, + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + _model: { + type: require('./element.input.js'), + description: + "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", + }, + model: { + type: GraphQLString, + description: + "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', + }, + version: { + type: GraphQLString, + description: + 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', + }, + patient: { + type: GraphQLString, + description: 'Patient information, If the device is affixed to a person.', + }, + owner: { + type: GraphQLString, + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for an organization or a particular human that is responsible for the device.', + }, + location: { + type: GraphQLString, + description: 'The place where the device can be found.', + }, + _url: { + type: require('./element.input.js'), + description: + 'A network address on which the device may be contacted directly.', + }, + url: { + type: UriScalar, + description: + 'A network address on which the device may be contacted directly.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Descriptive information, usage information or implantation information that is not captured in an existing element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-safety + safety: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Provides additional safety characteristics about a medical device. For example devices containing latex.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/devicecomponent.input.js b/src/resources/3_0_1/inputs/devicecomponent.input.js index f7473aa2..5ce00623 100644 --- a/src/resources/3_0_1/inputs/devicecomponent.input.js +++ b/src/resources/3_0_1/inputs/devicecomponent.input.js @@ -1,22 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -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 DeviceComponentResourceInputType = new GraphQLEnumType({ - name: 'DeviceComponentResourceInputType', - values: { - DeviceComponent: { value: 'DeviceComponent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,78 +16,136 @@ let DeviceComponentResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DeviceComponent_Input', - description: 'Base StructureDefinition for DeviceComponent Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceComponentResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: - 'The locally assigned unique identification by the software. For example: handle ID.', - }, - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The component type as defined in the object-oriented or metric nomenclature partition.', - }, - lastSystemChange: { - type: InstantScalar, - description: - 'The timestamp for the most recent system change which includes device configuration or setting change.', - }, - _lastSystemChange: { - type: require('./element.input'), - description: - 'The timestamp for the most recent system change which includes device configuration or setting change.', - }, - source: { - type: require('./reference.input'), - description: - 'The link to the source Device that contains administrative device information such as manufacture, serial number, etc.', - }, - parent: { - type: require('./reference.input'), - description: - 'The link to the parent resource. For example: Channel is linked to its VMD parent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operational-status - operationalStatus: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The current operational status of the device. For example: On, Off, Standby, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/parameter-group - parameterGroup: { - type: require('./codeableconcept.input'), - description: - 'The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measurement-principle - measurementPrinciple: { - type: CodeScalar, - description: - 'The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', - }, - _measurementPrinciple: { - type: require('./element.input'), - description: - 'The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', - }, - productionSpecification: { - type: new GraphQLList( - require('./devicecomponentproductionspecification.input'), - ), - description: - 'The production specification such as component revision, serial number, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - languageCode: { - type: require('./codeableconcept.input'), - description: - 'The language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.', - }, - }), + description: 'Base StructureDefinition for DeviceComponent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceComponent_Enum_input', + values: { DeviceComponent: { value: 'DeviceComponent' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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 GraphQLNonNull(require('./identifier.input.js')), + description: + 'The locally assigned unique identification by the software. For example: handle ID.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The component type as defined in the object-oriented or metric nomenclature partition.', + }, + _lastSystemChange: { + type: require('./element.input.js'), + description: + 'The timestamp for the most recent system change which includes device configuration or setting change.', + }, + lastSystemChange: { + type: InstantScalar, + description: + 'The timestamp for the most recent system change which includes device configuration or setting change.', + }, + source: { + type: GraphQLString, + description: + 'The link to the source Device that contains administrative device information such as manufacture, serial number, etc.', + }, + parent: { + type: GraphQLString, + description: + 'The link to the parent resource. For example: Channel is linked to its VMD parent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operational-status + operationalStatus: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The current operational status of the device. For example: On, Off, Standby, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/parameter-group + parameterGroup: { + type: require('./codeableconcept.input.js'), + description: + 'The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.', + }, + _measurementPrinciple: { + type: require('./element.input.js'), + description: + 'The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measurement-principle + measurementPrinciple: { + type: CodeScalar, + description: + 'The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', + }, + productionSpecification: { + type: new GraphQLList( + require('./devicecomponentproductionspecification.input.js'), + ), + description: + 'The production specification such as component revision, serial number, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + languageCode: { + type: require('./codeableconcept.input.js'), + description: + 'The language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/devicecomponentproductionspecification.input.js b/src/resources/3_0_1/inputs/devicecomponentproductionspecification.input.js index 9d72b84d..a68b33f5 100644 --- a/src/resources/3_0_1/inputs/devicecomponentproductionspecification.input.js +++ b/src/resources/3_0_1/inputs/devicecomponentproductionspecification.input.js @@ -1,36 +1,55 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary DeviceComponent.productionSpecification Input Schema + * @summary DeviceComponentproductionSpecification Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DeviceComponentProductionSpecification_Input', - description: - 'The production specification such as component revision, serial number, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/specification-type - specType: { - type: require('./codeableconcept.input'), - description: - 'The specification type, such as, serial number, part number, hardware revision, software revision, etc.', - }, - componentId: { - type: require('./identifier.input'), - description: - 'The internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacturer can make use of.', - }, - productionSpec: { - type: GraphQLString, - description: 'The printable string defining the component.', - }, - _productionSpec: { - type: require('./element.input'), - description: 'The printable string defining the component.', - }, - }), + name: 'DeviceComponentproductionSpecification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specification-type + specType: { + type: require('./codeableconcept.input.js'), + description: + 'The specification type, such as, serial number, part number, hardware revision, software revision, etc.', + }, + componentId: { + type: require('./identifier.input.js'), + description: + 'The internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacturer can make use of.', + }, + _productionSpec: { + type: require('./element.input.js'), + description: 'The printable string defining the component.', + }, + productionSpec: { + type: GraphQLString, + description: 'The printable string defining the component.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/devicemetric.input.js b/src/resources/3_0_1/inputs/devicemetric.input.js index 5e8be1d8..7739aa29 100644 --- a/src/resources/3_0_1/inputs/devicemetric.input.js +++ b/src/resources/3_0_1/inputs/devicemetric.input.js @@ -1,21 +1,13 @@ -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 DeviceMetricResourceInputType = new GraphQLEnumType({ - name: 'DeviceMetricResourceInputType', - values: { - DeviceMetric: { value: 'DeviceMetric' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,82 +15,140 @@ let DeviceMetricResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DeviceMetric_Input', - description: 'Base StructureDefinition for DeviceMetric Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceMetricResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: - 'Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/devicemetric-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/devicemetric-type - unit: { - type: require('./codeableconcept.input'), - description: - 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', - }, - source: { - type: require('./reference.input'), - description: - 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.', - }, - parent: { - type: require('./reference.input'), - description: - 'Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-operational-status - operationalStatus: { - type: CodeScalar, - description: - 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', - }, - _operationalStatus: { - type: require('./element.input'), - description: - 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-color - color: { - type: CodeScalar, - description: - 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', - }, - _color: { - type: require('./element.input'), - description: - 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-category - category: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', - }, - _category: { - type: require('./element.input'), - description: - 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', - }, - measurementPeriod: { - type: require('./timing.input'), - description: - 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', - }, - calibration: { - type: new GraphQLList(require('./devicemetriccalibration.input')), - description: - 'Describes the calibrations that have been performed or that are required to be performed.', - }, - }), + description: 'Base StructureDefinition for DeviceMetric Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceMetric_Enum_input', + values: { DeviceMetric: { value: 'DeviceMetric' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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 GraphQLNonNull(require('./identifier.input.js')), + description: + 'Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/devicemetric-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/devicemetric-type + unit: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', + }, + source: { + type: GraphQLString, + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.', + }, + parent: { + type: GraphQLString, + description: + 'Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', + }, + _operationalStatus: { + type: require('./element.input.js'), + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-operational-status + operationalStatus: { + type: CodeScalar, + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + _color: { + type: require('./element.input.js'), + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-color + color: { + type: CodeScalar, + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + _category: { + type: require('./element.input.js'), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-category + category: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + measurementPeriod: { + type: require('./timing.input.js'), + description: + 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', + }, + calibration: { + type: new GraphQLList(require('./devicemetriccalibration.input.js')), + description: + 'Describes the calibrations that have been performed or that are required to be performed.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/devicemetriccalibration.input.js b/src/resources/3_0_1/inputs/devicemetriccalibration.input.js index 80a55ed8..4b12ce1f 100644 --- a/src/resources/3_0_1/inputs/devicemetriccalibration.input.js +++ b/src/resources/3_0_1/inputs/devicemetriccalibration.input.js @@ -1,45 +1,64 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary DeviceMetric.calibration Input Schema + * @summary DeviceMetriccalibration Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DeviceMetricCalibration_Input', - description: - 'Describes the calibrations that have been performed or that are required to be performed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-type - type: { - type: CodeScalar, - description: 'Describes the type of the calibration method.', - }, - _type: { - type: require('./element.input'), - description: 'Describes the type of the calibration method.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-state - state: { - type: CodeScalar, - description: 'Describes the state of the calibration.', - }, - _state: { - type: require('./element.input'), - description: 'Describes the state of the calibration.', - }, - time: { - type: InstantScalar, - description: 'Describes the time last calibration has been performed.', - }, - _time: { - type: require('./element.input'), - description: 'Describes the time last calibration has been performed.', - }, - }), + name: 'DeviceMetriccalibration_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'Describes the type of the calibration method.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-type + type: { + type: CodeScalar, + description: 'Describes the type of the calibration method.', + }, + _state: { + type: require('./element.input.js'), + description: 'Describes the state of the calibration.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-state + state: { + type: CodeScalar, + description: 'Describes the state of the calibration.', + }, + _time: { + type: require('./element.input.js'), + description: 'Describes the time last calibration has been performed.', + }, + time: { + type: InstantScalar, + description: 'Describes the time last calibration has been performed.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/devicerequest.input.js b/src/resources/3_0_1/inputs/devicerequest.input.js index 822c447f..c5fd28f2 100644 --- a/src/resources/3_0_1/inputs/devicerequest.input.js +++ b/src/resources/3_0_1/inputs/devicerequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 DeviceRequestResourceInputType = new GraphQLEnumType({ - name: 'DeviceRequestResourceInputType', - values: { - DeviceRequest: { value: 'DeviceRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,146 +16,204 @@ let DeviceRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DeviceRequest_Input', - description: 'Base StructureDefinition for DeviceRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order by the orderer or by the receiver.', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: - 'Protocol or definition followed by this request. For example: The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: 'Plan/proposal/order fulfilled by this request.', - }, - priorRequest: { - type: new GraphQLList(require('./reference.input')), - description: - 'The request takes the place of the referenced completed or terminated request(s).', - }, - groupIdentifier: { - type: require('./identifier.input'), - description: 'Composite request this is part of.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: CodeScalar, - description: 'The status of the request.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the request.', - }, - // ValueSetReference: http://build.fhir.org/valueset-request-intent.html - intent: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Whether the request is a proposal, plan, an original order or a reflex order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.input'), - description: - 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-kind - codeReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The details of the device to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-kind - codeCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The details of the device to be used.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient who will use the device.', - }, - context: { - type: require('./reference.input'), - description: - 'An encounter that provides additional context in which this request is made.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: - "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - occurrencePeriod: { - type: require('./period.input'), - description: - "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - occurrenceTiming: { - type: require('./timing.input'), - description: - "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - authoredOn: { - type: DateTimeScalar, - description: 'When the request transitioned to being actionable.', - }, - _authoredOn: { - type: require('./element.input'), - description: 'When the request transitioned to being actionable.', - }, - requester: { - type: require('./devicerequestrequester.input'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - performerType: { - type: require('./codeableconcept.input'), - description: - 'Desired type of performer for doing the diagnostic testing.', - }, - performer: { - type: require('./reference.input'), - description: 'The desired perfomer for doing the diagnostic testing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reason or justification for the use of this device.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: 'Reason or justification for the use of this device.', - }, - supportingInfo: { - type: new GraphQLList(require('./reference.input')), - description: - "Additional clinical information about the patient that may influence the request fulfilment. For example, this may includes body where on the subject's the device will be used ( i.e. the target site).", - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - relevantHistory: { - type: new GraphQLList(require('./reference.input')), - description: 'Key events in the history of the request.', - }, - }), + description: 'Base StructureDefinition for DeviceRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceRequest_Enum_input', + values: { DeviceRequest: { value: 'DeviceRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifiers assigned to this order by the orderer or by the receiver.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'Protocol or definition followed by this request. For example: The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: 'Plan/proposal/order fulfilled by this request.', + }, + priorRequest: { + type: new GraphQLList(GraphQLString), + description: + 'The request takes the place of the referenced completed or terminated request(s).', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: 'Composite request this is part of.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: CodeScalar, + description: 'The status of the request.', + }, + // valueSetReference: http://build.fhir.org/valueset-request-intent.html + intent: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-kind + codeReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The details of the device to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-kind + codeCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The details of the device to be used.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who will use the device.', + }, + context: { + type: GraphQLString, + description: + 'An encounter that provides additional context in which this request is made.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'When the request transitioned to being actionable.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request transitioned to being actionable.', + }, + requester: { + type: require('./devicerequestrequester.input.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + performerType: { + type: require('./codeableconcept.input.js'), + description: + 'Desired type of performer for doing the diagnostic testing.', + }, + performer: { + type: GraphQLString, + description: 'The desired perfomer for doing the diagnostic testing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason or justification for the use of this device.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: 'Reason or justification for the use of this device.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: + "Additional clinical information about the patient that may influence the request fulfilment. For example, this may includes body where on the subject's the device will be used ( i.e. the target site).", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + relevantHistory: { + type: new GraphQLList(GraphQLString), + description: 'Key events in the history of the request.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/devicerequestrequester.input.js b/src/resources/3_0_1/inputs/devicerequestrequester.input.js index f7d7d23d..b446871c 100644 --- a/src/resources/3_0_1/inputs/devicerequestrequester.input.js +++ b/src/resources/3_0_1/inputs/devicerequestrequester.input.js @@ -1,27 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary DeviceRequest.requester Input Schema + * @summary DeviceRequestrequester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DeviceRequestRequester_Input', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - agent: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device, practitioner, etc. who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'DeviceRequestrequester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + agent: { + type: new GraphQLNonNull(GraphQLString), + description: 'The device, practitioner, etc. who initiated the request.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/deviceudi.input.js b/src/resources/3_0_1/inputs/deviceudi.input.js index 3773de43..13f30804 100644 --- a/src/resources/3_0_1/inputs/deviceudi.input.js +++ b/src/resources/3_0_1/inputs/deviceudi.input.js @@ -1,87 +1,106 @@ -const UriScalar = require('../scalars/uri.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Device.udi Input Schema + * @summary Deviceudi Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DeviceUdi_Input', - description: - '[Unique device identifier (UDI)](device.html#5.11.3.2.2) assigned to device label or package.', - fields: () => - extendSchema(require('./backboneelement.input'), { - deviceIdentifier: { - type: GraphQLString, - description: - 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', - }, - _deviceIdentifier: { - type: require('./element.input'), - description: - 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', - }, - name: { - type: GraphQLString, - description: 'Name of device as used in labeling or catalog.', - }, - _name: { - type: require('./element.input'), - description: 'Name of device as used in labeling or catalog.', - }, - jurisdiction: { - type: UriScalar, - description: - 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', - }, - _jurisdiction: { - type: require('./element.input'), - description: - 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', - }, - carrierHRF: { - type: GraphQLString, - description: - 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', - }, - _carrierHRF: { - type: require('./element.input'), - description: - 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', - }, - carrierAIDC: { - type: Base64BinaryScalar, - description: - 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', - }, - _carrierAIDC: { - type: require('./element.input'), - description: - 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', - }, - issuer: { - type: UriScalar, - description: - 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', - }, - _issuer: { - type: require('./element.input'), - description: - 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/udi-entry-type - entryType: { - type: CodeScalar, - description: 'A coded entry to indicate how the data was entered.', - }, - _entryType: { - type: require('./element.input'), - description: 'A coded entry to indicate how the data was entered.', - }, - }), + name: 'Deviceudi_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _deviceIdentifier: { + type: require('./element.input.js'), + description: + 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', + }, + deviceIdentifier: { + type: GraphQLString, + description: + 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', + }, + _name: { + type: require('./element.input.js'), + description: 'Name of device as used in labeling or catalog.', + }, + name: { + type: GraphQLString, + description: 'Name of device as used in labeling or catalog.', + }, + _jurisdiction: { + type: require('./element.input.js'), + description: + 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', + }, + jurisdiction: { + type: UriScalar, + description: + 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', + }, + _carrierHRF: { + type: require('./element.input.js'), + description: + 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', + }, + carrierHRF: { + type: GraphQLString, + description: + 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', + }, + _carrierAIDC: { + type: require('./element.input.js'), + description: + 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', + }, + carrierAIDC: { + type: Base64BinaryScalar, + description: + 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', + }, + _issuer: { + type: require('./element.input.js'), + description: + 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', + }, + issuer: { + type: UriScalar, + description: + 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', + }, + _entryType: { + type: require('./element.input.js'), + description: 'A coded entry to indicate how the data was entered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/udi-entry-type + entryType: { + type: CodeScalar, + description: 'A coded entry to indicate how the data was entered.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/deviceusestatement.input.js b/src/resources/3_0_1/inputs/deviceusestatement.input.js index 07eef70b..25cf62b0 100644 --- a/src/resources/3_0_1/inputs/deviceusestatement.input.js +++ b/src/resources/3_0_1/inputs/deviceusestatement.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 DeviceUseStatementResourceInputType = new GraphQLEnumType({ - name: 'DeviceUseStatementResourceInputType', - values: { - DeviceUseStatement: { value: 'DeviceUseStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,83 +16,140 @@ let DeviceUseStatementResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DeviceUseStatement_Input', - description: 'Base StructureDefinition for DeviceUseStatement Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DeviceUseStatementResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'An external identifier for this statement such as an IRI.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-statement-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", - }, - _status: { - type: require('./element.input'), - description: - "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient who used the device.', - }, - whenUsed: { - type: require('./period.input'), - description: 'The time period over which the device was used.', - }, - timingTiming: { - type: require('./timing.input'), - description: 'How often the device was used.', - }, - timingPeriod: { - type: require('./period.input'), - description: 'How often the device was used.', - }, - timingDateTime: { - type: DateTimeScalar, - description: 'How often the device was used.', - }, - _timingDateTime: { - type: require('./element.input'), - description: 'How often the device was used.', - }, - recordedOn: { - type: DateTimeScalar, - description: 'The time at which the statement was made/recorded.', - }, - _recordedOn: { - type: require('./element.input'), - description: 'The time at which the statement was made/recorded.', - }, - source: { - type: require('./reference.input'), - description: 'Who reported the device was being used by the patient.', - }, - device: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The details of the device used.', - }, - indication: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reason or justification for the use of the device.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.input'), - description: - "Indicates the site on the subject's body where the device was used ( i.e. the target site).", - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - }), + description: 'Base StructureDefinition for DeviceUseStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceUseStatement_Enum_input', + values: { DeviceUseStatement: { value: 'DeviceUseStatement' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'An external identifier for this statement such as an IRI.', + }, + _status: { + type: require('./element.input.js'), + description: + "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-statement-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who used the device.', + }, + whenUsed: { + type: require('./period.input.js'), + description: 'The time period over which the device was used.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: 'How often the device was used.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: 'How often the device was used.', + }, + _timingDateTime: { + type: require('./element.input.js'), + description: 'How often the device was used.', + }, + timingDateTime: { + type: DateTimeScalar, + description: 'How often the device was used.', + }, + _recordedOn: { + type: require('./element.input.js'), + description: 'The time at which the statement was made/recorded.', + }, + recordedOn: { + type: DateTimeScalar, + description: 'The time at which the statement was made/recorded.', + }, + source: { + type: GraphQLString, + description: 'Who reported the device was being used by the patient.', + }, + device: { + type: new GraphQLNonNull(GraphQLString), + description: 'The details of the device used.', + }, + indication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason or justification for the use of the device.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the site on the subject's body where the device was used ( i.e. the target site).", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/diagnosticreport.input.js b/src/resources/3_0_1/inputs/diagnosticreport.input.js index f44f3da3..19a686ba 100644 --- a/src/resources/3_0_1/inputs/diagnosticreport.input.js +++ b/src/resources/3_0_1/inputs/diagnosticreport.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.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 DiagnosticReportResourceInputType = new GraphQLEnumType({ - name: 'DiagnosticReportResourceInputType', - values: { - DiagnosticReport: { value: 'DiagnosticReport' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -25,121 +17,179 @@ let DiagnosticReportResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DiagnosticReport_Input', - description: 'Base StructureDefinition for DiagnosticReport Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DiagnosticReportResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this report by the performer or other systems.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: 'Details concerning a test or procedure requested.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-report-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the diagnostic report as a whole.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the diagnostic report as a whole.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-service-sections - category: { - type: require('./codeableconcept.input'), - description: - 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'A code or name that describes this diagnostic report.', - }, - subject: { - type: require('./reference.input'), - description: - 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', - }, - context: { - type: require('./reference.input'), - description: - 'The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - _effectiveDateTime: { - type: require('./element.input'), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - issued: { - type: InstantScalar, - description: - 'The date and time that this version of the report was released from the source diagnostic service.', - }, - _issued: { - type: require('./element.input'), - description: - 'The date and time that this version of the report was released from the source diagnostic service.', - }, - performer: { - type: new GraphQLList(require('./diagnosticreportperformer.input')), - description: - 'Indicates who or what participated in producing the report.', - }, - specimen: { - type: new GraphQLList(require('./reference.input')), - description: - 'Details about the specimens on which this diagnostic report is based.', - }, - result: { - type: new GraphQLList(require('./reference.input')), - description: - "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", - }, - imagingStudy: { - type: new GraphQLList(require('./reference.input')), - description: - 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', - }, - image: { - type: new GraphQLList(require('./diagnosticreportimage.input')), - description: - 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', - }, - conclusion: { - type: GraphQLString, - description: - 'Concise and clinically contextualized impression / summary of the diagnostic report.', - }, - _conclusion: { - type: require('./element.input'), - description: - 'Concise and clinically contextualized impression / summary of the diagnostic report.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - codedDiagnosis: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Codes for the conclusion.', - }, - presentedForm: { - type: new GraphQLList(require('./attachment.input')), - description: - 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', - }, - }), + description: 'Base StructureDefinition for DiagnosticReport Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DiagnosticReport_Enum_input', + values: { DiagnosticReport: { value: 'DiagnosticReport' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifiers assigned to this report by the performer or other systems.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: 'Details concerning a test or procedure requested.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the diagnostic report as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-report-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the diagnostic report as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-service-sections + category: { + type: require('./codeableconcept.input.js'), + description: + 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code or name that describes this diagnostic report.', + }, + subject: { + type: GraphQLString, + description: + 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', + }, + context: { + type: GraphQLString, + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + _issued: { + type: require('./element.input.js'), + description: + 'The date and time that this version of the report was released from the source diagnostic service.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time that this version of the report was released from the source diagnostic service.', + }, + performer: { + type: new GraphQLList(require('./diagnosticreportperformer.input.js')), + description: + 'Indicates who or what participated in producing the report.', + }, + specimen: { + type: new GraphQLList(GraphQLString), + description: + 'Details about the specimens on which this diagnostic report is based.', + }, + result: { + type: new GraphQLList(GraphQLString), + description: + "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", + }, + imagingStudy: { + type: new GraphQLList(GraphQLString), + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + }, + image: { + type: new GraphQLList(require('./diagnosticreportimage.input.js')), + description: + 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', + }, + _conclusion: { + type: require('./element.input.js'), + description: + 'Concise and clinically contextualized impression / summary of the diagnostic report.', + }, + conclusion: { + type: GraphQLString, + description: + 'Concise and clinically contextualized impression / summary of the diagnostic report.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + codedDiagnosis: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Codes for the conclusion.', + }, + presentedForm: { + type: new GraphQLList(require('./attachment.input.js')), + description: + 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/diagnosticreportimage.input.js b/src/resources/3_0_1/inputs/diagnosticreportimage.input.js index 7ae10bcb..716ff958 100644 --- a/src/resources/3_0_1/inputs/diagnosticreportimage.input.js +++ b/src/resources/3_0_1/inputs/diagnosticreportimage.input.js @@ -1,35 +1,51 @@ const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary DiagnosticReport.image Input Schema + * @summary DiagnosticReportimage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DiagnosticReportImage_Input', - description: - 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', - fields: () => - extendSchema(require('./backboneelement.input'), { - comment: { - type: GraphQLString, - description: - "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", - }, - _comment: { - type: require('./element.input'), - description: - "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", - }, - link: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Reference to the image source.', - }, - }), + name: 'DiagnosticReportimage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _comment: { + type: require('./element.input.js'), + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + comment: { + type: GraphQLString, + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + link: { + type: new GraphQLNonNull(GraphQLString), + description: 'Reference to the image source.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/diagnosticreportperformer.input.js b/src/resources/3_0_1/inputs/diagnosticreportperformer.input.js index 4a4992a9..c04968b7 100644 --- a/src/resources/3_0_1/inputs/diagnosticreportperformer.input.js +++ b/src/resources/3_0_1/inputs/diagnosticreportperformer.input.js @@ -1,27 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary DiagnosticReport.performer Input Schema + * @summary DiagnosticReportperformer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DiagnosticReportPerformer_Input', - description: 'Indicates who or what participated in producing the report.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/performer-role - role: { - type: require('./codeableconcept.input'), - description: - 'Describes the type of participation (e.g. a responsible party, author, or verifier).', - }, - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.', - }, - }), + name: 'DiagnosticReportperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/performer-role + role: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the type of participation (e.g. a responsible party, author, or verifier).', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/distance.input.js b/src/resources/3_0_1/inputs/distance.input.js index e864bd35..5538497a 100644 --- a/src/resources/3_0_1/inputs/distance.input.js +++ b/src/resources/3_0_1/inputs/distance.input.js @@ -1,7 +1,11 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Distance_Input', - description: 'Base StructureDefinition for Distance Type.', - fields: () => extendSchema(require('./quantity.input')), + description: 'Base StructureDefinition for Distance Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/documentmanifest.input.js b/src/resources/3_0_1/inputs/documentmanifest.input.js index 6ab737de..b0119e8a 100644 --- a/src/resources/3_0_1/inputs/documentmanifest.input.js +++ b/src/resources/3_0_1/inputs/documentmanifest.input.js @@ -1,23 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.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 DocumentManifestResourceInputType = new GraphQLEnumType({ - name: 'DocumentManifestResourceInputType', - values: { - DocumentManifest: { value: 'DocumentManifest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,93 +16,151 @@ let DocumentManifestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DocumentManifest_Input', - description: 'Base StructureDefinition for DocumentManifest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DocumentManifestResourceInputType), - description: 'Type of this resource.', - }, - masterIdentifier: { - type: require('./identifier.input'), - description: - 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Other identifiers associated with the document manifest, including version independent identifiers.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of this document manifest.', - }, - _status: { - type: require('./element.input'), - description: 'The status of this document manifest.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - type: { - type: require('./codeableconcept.input'), - description: - 'Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.', - }, - subject: { - type: require('./reference.input'), - description: - 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', - }, - created: { - type: DateTimeScalar, - description: - 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', - }, - _created: { - type: require('./element.input'), - description: - 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', - }, - author: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies who is responsible for creating the manifest, and adding documents to it.', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'A patient, practitioner, or organization for which this set of documents is intended.', - }, - source: { - type: UriScalar, - description: - 'Identifies the source system, application, or software that produced the document manifest.', - }, - _source: { - type: require('./element.input'), - description: - 'Identifies the source system, application, or software that produced the document manifest.', - }, - description: { - type: GraphQLString, - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - _description: { - type: require('./element.input'), - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - content: { - type: new GraphQLList( - new GraphQLNonNull(require('./documentmanifestcontent.input')), - ), - description: 'The list of Documents included in the manifest.', - }, - related: { - type: new GraphQLList(require('./documentmanifestrelated.input')), - description: - 'Related identifiers or resources associated with the DocumentManifest.', - }, - }), + description: 'Base StructureDefinition for DocumentManifest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentManifest_Enum_input', + values: { DocumentManifest: { value: 'DocumentManifest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + masterIdentifier: { + type: require('./identifier.input.js'), + description: + 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Other identifiers associated with the document manifest, including version independent identifiers.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this document manifest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document manifest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + type: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.', + }, + subject: { + type: GraphQLString, + description: + 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', + }, + _created: { + type: require('./element.input.js'), + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + created: { + type: DateTimeScalar, + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies who is responsible for creating the manifest, and adding documents to it.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + }, + _source: { + type: require('./element.input.js'), + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + source: { + type: UriScalar, + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + _description: { + type: require('./element.input.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentmanifestcontent.input.js')), + ), + description: 'The list of Documents included in the manifest.', + }, + related: { + type: new GraphQLList(require('./documentmanifestrelated.input.js')), + description: + 'Related identifiers or resources associated with the DocumentManifest.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/documentmanifestcontent.input.js b/src/resources/3_0_1/inputs/documentmanifestcontent.input.js index cdb92836..6b2b48e0 100644 --- a/src/resources/3_0_1/inputs/documentmanifestcontent.input.js +++ b/src/resources/3_0_1/inputs/documentmanifestcontent.input.js @@ -1,26 +1,47 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentManifest.content Input Schema + * @summary DocumentManifestcontent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentManifestContent_Input', - description: 'The list of Documents included in the manifest.', - fields: () => - extendSchema(require('./backboneelement.input'), { - pAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', - }, - pReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', - }, - }), + name: 'DocumentManifestcontent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + pAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + }, + pReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/documentmanifestrelated.input.js b/src/resources/3_0_1/inputs/documentmanifestrelated.input.js index 17002764..def7dc2d 100644 --- a/src/resources/3_0_1/inputs/documentmanifestrelated.input.js +++ b/src/resources/3_0_1/inputs/documentmanifestrelated.input.js @@ -1,27 +1,46 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentManifest.related Input Schema + * @summary DocumentManifestrelated Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentManifestRelated_Input', - description: - 'Related identifiers or resources associated with the DocumentManifest.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', - }, - ref: { - type: require('./reference.input'), - description: - 'Related Resource to this DocumentManifest. For example, Order, ProcedureRequest, Procedure, EligibilityRequest, etc.', - }, - }), + name: 'DocumentManifestrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', + }, + ref: { + type: GraphQLString, + description: + 'Related Resource to this DocumentManifest. For example, Order, ProcedureRequest, Procedure, EligibilityRequest, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/documentreference.input.js b/src/resources/3_0_1/inputs/documentreference.input.js index 0cb846dc..1db92e51 100644 --- a/src/resources/3_0_1/inputs/documentreference.input.js +++ b/src/resources/3_0_1/inputs/documentreference.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.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 DocumentReferenceResourceInputType = new GraphQLEnumType({ - name: 'DocumentReferenceResourceInputType', - values: { - DocumentReference: { value: 'DocumentReference' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -25,120 +17,178 @@ let DocumentReferenceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DocumentReference_Input', - description: 'Base StructureDefinition for DocumentReference Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(DocumentReferenceResourceInputType), - description: 'Type of this resource.', - }, - masterIdentifier: { - type: require('./identifier.input'), - description: - 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Other identifiers associated with the document, including version independent identifiers.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of this document reference.', - }, - _status: { - type: require('./element.input'), - description: 'The status of this document reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-status - docStatus: { - type: CodeScalar, - description: 'The status of the underlying document.', - }, - _docStatus: { - type: require('./element.input'), - description: 'The status of the underlying document.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-classcodes - class: { - type: require('./codeableconcept.input'), - description: - 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', - }, - subject: { - type: require('./reference.input'), - description: - 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', - }, - created: { - type: DateTimeScalar, - description: 'When the document was created.', - }, - _created: { - type: require('./element.input'), - description: 'When the document was created.', - }, - indexed: { - type: new GraphQLNonNull(InstantScalar), - description: 'When the document reference was created.', - }, - _indexed: { - type: require('./element.input'), - description: 'When the document reference was created.', - }, - author: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies who is responsible for adding the information to the document.', - }, - authenticator: { - type: require('./reference.input'), - description: - 'Which person or organization authenticates that this document is valid.', - }, - custodian: { - type: require('./reference.input'), - description: - 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', - }, - relatesTo: { - type: new GraphQLList(require('./documentreferencerelatesto.input')), - description: - 'Relationships that this document has with other document references that already exist.', - }, - description: { - type: GraphQLString, - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - _description: { - type: require('./element.input'), - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", - }, - content: { - type: new GraphQLList( - new GraphQLNonNull(require('./documentreferencecontent.input')), - ), - description: - 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', - }, - context: { - type: require('./documentreferencecontext.input'), - description: 'The clinical context in which the document was prepared.', - }, - }), + description: 'Base StructureDefinition for DocumentReference Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentReference_Enum_input', + values: { DocumentReference: { value: 'DocumentReference' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + masterIdentifier: { + type: require('./identifier.input.js'), + description: + 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Other identifiers associated with the document, including version independent identifiers.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this document reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document reference.', + }, + _docStatus: { + type: require('./element.input.js'), + description: 'The status of the underlying document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-status + docStatus: { + type: CodeScalar, + description: 'The status of the underlying document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-classcodes + class: { + type: require('./codeableconcept.input.js'), + description: + 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', + }, + subject: { + type: GraphQLString, + description: + 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', + }, + _created: { + type: require('./element.input.js'), + description: 'When the document was created.', + }, + created: { + type: DateTimeScalar, + description: 'When the document was created.', + }, + _indexed: { + type: require('./element.input.js'), + description: 'When the document reference was created.', + }, + indexed: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the document reference was created.', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies who is responsible for adding the information to the document.', + }, + authenticator: { + type: GraphQLString, + description: + 'Which person or organization authenticates that this document is valid.', + }, + custodian: { + type: GraphQLString, + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', + }, + relatesTo: { + type: new GraphQLList(require('./documentreferencerelatesto.input.js')), + description: + 'Relationships that this document has with other document references that already exist.', + }, + _description: { + type: require('./element.input.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentreferencecontent.input.js')), + ), + description: + 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', + }, + context: { + type: require('./documentreferencecontext.input.js'), + description: 'The clinical context in which the document was prepared.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/documentreferencecontent.input.js b/src/resources/3_0_1/inputs/documentreferencecontent.input.js index 4dac274f..f058a90e 100644 --- a/src/resources/3_0_1/inputs/documentreferencecontent.input.js +++ b/src/resources/3_0_1/inputs/documentreferencecontent.input.js @@ -1,28 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentReference.content Input Schema + * @summary DocumentReferencecontent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentReferenceContent_Input', - description: - 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', - fields: () => - extendSchema(require('./backboneelement.input'), { - attachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The document or URL of the document along with critical metadata to prove content has integrity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/formatcodes - format: { - type: require('./coding.input'), - description: - 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', - }, - }), + name: 'DocumentReferencecontent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + attachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The document or URL of the document along with critical metadata to prove content has integrity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/formatcodes + format: { + type: require('./coding.input.js'), + description: + 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/documentreferencecontext.input.js b/src/resources/3_0_1/inputs/documentreferencecontext.input.js index 8ccf5415..dd776afc 100644 --- a/src/resources/3_0_1/inputs/documentreferencecontext.input.js +++ b/src/resources/3_0_1/inputs/documentreferencecontext.input.js @@ -1,55 +1,75 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentReference.context Input Schema + * @summary DocumentReferencecontext Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentReferenceContext_Input', - description: 'The clinical context in which the document was prepared.', - fields: () => - extendSchema(require('./backboneelement.input'), { - encounter: { - type: require('./reference.input'), - description: - 'Describes the clinical encounter or type of care that the document content is associated with.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode - event: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", - }, - period: { - type: require('./period.input'), - description: - 'The time period over which the service that is described by the document was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-facilitycodes - facilityType: { - type: require('./codeableconcept.input'), - description: 'The kind of facility where the patient was seen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - practiceSetting: { - type: require('./codeableconcept.input'), - description: - 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', - }, - sourcePatientInfo: { - type: require('./reference.input'), - description: - 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', - }, - related: { - type: new GraphQLList( - require('./documentreferencecontextrelated.input'), - ), - description: - 'Related identifiers or resources associated with the DocumentReference.', - }, - }), + name: 'DocumentReferencecontext_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + encounter: { + type: GraphQLString, + description: + 'Describes the clinical encounter or type of care that the document content is associated with.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode + event: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.input.js'), + description: + 'The time period over which the service that is described by the document was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-facilitycodes + facilityType: { + type: require('./codeableconcept.input.js'), + description: 'The kind of facility where the patient was seen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + practiceSetting: { + type: require('./codeableconcept.input.js'), + description: + 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', + }, + sourcePatientInfo: { + type: GraphQLString, + description: + 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', + }, + related: { + type: new GraphQLList( + require('./documentreferencecontextrelated.input.js'), + ), + description: + 'Related identifiers or resources associated with the DocumentReference.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/documentreferencecontextrelated.input.js b/src/resources/3_0_1/inputs/documentreferencecontextrelated.input.js index 656337cd..e66b190b 100644 --- a/src/resources/3_0_1/inputs/documentreferencecontextrelated.input.js +++ b/src/resources/3_0_1/inputs/documentreferencecontextrelated.input.js @@ -1,27 +1,46 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentReference.context.related Input Schema + * @summary DocumentReferencecontextrelated Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentReferenceContextRelated_Input', - description: - 'Related identifiers or resources associated with the DocumentReference.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.', - }, - ref: { - type: require('./reference.input'), - description: - 'Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.', - }, - }), + name: 'DocumentReferencecontextrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.', + }, + ref: { + type: GraphQLString, + description: + 'Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/documentreferencerelatesto.input.js b/src/resources/3_0_1/inputs/documentreferencerelatesto.input.js index d826ecb7..1d281b8f 100644 --- a/src/resources/3_0_1/inputs/documentreferencerelatesto.input.js +++ b/src/resources/3_0_1/inputs/documentreferencerelatesto.input.js @@ -1,33 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary DocumentReference.relatesTo Input Schema + * @summary DocumentReferencerelatesTo Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'DocumentReferenceRelatesTo_Input', - description: - 'Relationships that this document has with other document references that already exist.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of relationship that this document has with anther document.', - }, - _code: { - type: require('./element.input'), - description: - 'The type of relationship that this document has with anther document.', - }, - target: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The target document of this relationship.', - }, - }), + name: 'DocumentReferencerelatesTo_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The type of relationship that this document has with anther document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this document has with anther document.', + }, + target: { + type: new GraphQLNonNull(GraphQLString), + description: 'The target document of this relationship.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/domainresource.input.js b/src/resources/3_0_1/inputs/domainresource.input.js index 9e733bdc..03181ac0 100644 --- a/src/resources/3_0_1/inputs/domainresource.input.js +++ b/src/resources/3_0_1/inputs/domainresource.input.js @@ -1,20 +1,13 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, - GraphQLString, GraphQLNonNull, + GraphQLEnumType, GraphQLList, + GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DomainResourceResourceInputType = new GraphQLEnumType({ - name: 'DomainResourceResourceInputType', - values: { - DomainResource: { value: 'DomainResource' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,32 +15,70 @@ let DomainResourceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'DomainResource_Input', - description: 'Base StructureDefinition for DomainResource Resource.', - fields: () => - extendSchema(require('./resource.input'), { - resourceType: { - type: new GraphQLNonNull(DomainResourceResourceInputType), - description: 'Type of this resource.', - }, - text: { - type: require('./narrative.input'), - 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')), - 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')), - 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.', - }, - }), + description: 'Base StructureDefinition for DomainResource Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DomainResource_Enum_input', + values: { DomainResource: { value: 'DomainResource' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/dosage.input.js b/src/resources/3_0_1/inputs/dosage.input.js index aa303856..80ca209c 100644 --- a/src/resources/3_0_1/inputs/dosage.input.js +++ b/src/resources/3_0_1/inputs/dosage.input.js @@ -1,123 +1,134 @@ const { - GraphQLInputObjectType, - GraphQLInt, GraphQLString, GraphQLList, + GraphQLInt, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Dosage Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'Dosage_Input', - description: 'Base StructureDefinition for Dosage Type.', - fields: () => - extendSchema(require('./element.input'), { - sequence: { - type: GraphQLInt, - description: - 'Indicates the order in which the dosage instructions should be applied or interpreted.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Indicates the order in which the dosage instructions should be applied or interpreted.', - }, - text: { - type: GraphQLString, - description: 'Free text dosage instructions e.g. SIG.', - }, - _text: { - type: require('./element.input'), - description: 'Free text dosage instructions e.g. SIG.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/additional-instruction-codes - additionalInstruction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: "Supplemental instruction - e.g. 'with meals'.", - }, - patientInstruction: { - type: GraphQLString, - description: - 'Instructions in terms that are understood by the patient or consumer.', - }, - _patientInstruction: { - type: require('./element.input'), - description: - 'Instructions in terms that are understood by the patient or consumer.', - }, - timing: { - type: require('./timing.input'), - description: 'When medication should be administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason - asNeededBoolean: { - type: GraphQLBoolean, - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - _asNeededBoolean: { - type: require('./element.input'), - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason - asNeededCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - site: { - type: require('./codeableconcept.input'), - description: 'Body site to administer to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.input'), - description: 'How drug should enter body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administration-method-codes - method: { - type: require('./codeableconcept.input'), - description: 'Technique for administering medication.', - }, - doseRange: { - type: require('./range.input'), - description: 'Amount of medication per dose.', - }, - doseQuantity: { - type: require('./quantity.input'), - description: 'Amount of medication per dose.', - }, - maxDosePerPeriod: { - type: require('./ratio.input'), - description: 'Upper limit on medication per unit of time.', - }, - maxDosePerAdministration: { - type: require('./quantity.input'), - description: 'Upper limit on medication per administration.', - }, - maxDosePerLifetime: { - type: require('./quantity.input'), - description: 'Upper limit on medication per lifetime of the patient.', - }, - rateRatio: { - type: require('./ratio.input'), - description: 'Amount of medication per unit of time.', - }, - rateRange: { - type: require('./range.input'), - description: 'Amount of medication per unit of time.', - }, - rateQuantity: { - type: require('./quantity.input'), - description: 'Amount of medication per unit of time.', - }, - }), + description: 'Base StructureDefinition for Dosage Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Indicates the order in which the dosage instructions should be applied or interpreted.', + }, + sequence: { + type: GraphQLInt, + description: + 'Indicates the order in which the dosage instructions should be applied or interpreted.', + }, + _text: { + type: require('./element.input.js'), + description: 'Free text dosage instructions e.g. SIG.', + }, + text: { + type: GraphQLString, + description: 'Free text dosage instructions e.g. SIG.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/additional-instruction-codes + additionalInstruction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: "Supplemental instruction - e.g. 'with meals'.", + }, + _patientInstruction: { + type: require('./element.input.js'), + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + patientInstruction: { + type: GraphQLString, + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + timing: { + type: require('./timing.input.js'), + description: 'When medication should be administered.', + }, + _asNeededBoolean: { + type: require('./element.input.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + asNeededBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + asNeededCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + site: { + type: require('./codeableconcept.input.js'), + description: 'Body site to administer to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.input.js'), + description: 'How drug should enter body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administration-method-codes + method: { + type: require('./codeableconcept.input.js'), + description: 'Technique for administering medication.', + }, + doseRange: { + type: require('./range.input.js'), + description: 'Amount of medication per dose.', + }, + doseQuantity: { + type: require('./quantity.input.js'), + description: 'Amount of medication per dose.', + }, + maxDosePerPeriod: { + type: require('./ratio.input.js'), + description: 'Upper limit on medication per unit of time.', + }, + maxDosePerAdministration: { + type: require('./quantity.input.js'), + description: 'Upper limit on medication per administration.', + }, + maxDosePerLifetime: { + type: require('./quantity.input.js'), + description: 'Upper limit on medication per lifetime of the patient.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: 'Amount of medication per unit of time.', + }, + rateRange: { + type: require('./range.input.js'), + description: 'Amount of medication per unit of time.', + }, + rateQuantity: { + type: require('./quantity.input.js'), + description: 'Amount of medication per unit of time.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/duration.input.js b/src/resources/3_0_1/inputs/duration.input.js index 4a55e383..5ed89e2d 100644 --- a/src/resources/3_0_1/inputs/duration.input.js +++ b/src/resources/3_0_1/inputs/duration.input.js @@ -1,7 +1,11 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Duration_Input', - description: 'Base StructureDefinition for Duration Type.', - fields: () => extendSchema(require('./quantity.input')), + description: 'Base StructureDefinition for Duration Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/element.input.js b/src/resources/3_0_1/inputs/element.input.js index 05a52140..916fa617 100644 --- a/src/resources/3_0_1/inputs/element.input.js +++ b/src/resources/3_0_1/inputs/element.input.js @@ -1,35 +1,31 @@ const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Element Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'Element_Input', - description: 'Base StructureDefinition for Element Type.', - fields: () => - extendSchema({ - id: { - type: GraphQLString, - description: - 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', - }, - _id: { - type: require('./element.input'), - description: - 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', - }, - extension: { - type: new GraphQLList(require('./extension.input')), - description: - 'May be used to represent additional information that is not part of the basic definition of the element. 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.', - }, - }), + description: 'Base StructureDefinition for Element Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinition.input.js b/src/resources/3_0_1/inputs/elementdefinition.input.js index efea6f9f..df7b3c9d 100644 --- a/src/resources/3_0_1/inputs/elementdefinition.input.js +++ b/src/resources/3_0_1/inputs/elementdefinition.input.js @@ -1,26 +1,23 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports @@ -28,1220 +25,1234 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'ElementDefinition_Input', - description: 'Base StructureDefinition for ElementDefinition Type.', - fields: () => - extendSchema(require('./element.input'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", - }, - _path: { - type: require('./element.input'), - description: - "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/property-representation - representation: { - type: new GraphQLList(CodeScalar), - description: - 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', - }, - _representation: { - type: require('./element.input'), - description: - 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', - }, - sliceName: { - type: GraphQLString, - description: - 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', - }, - _sliceName: { - type: require('./element.input'), - description: - 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', - }, - label: { - type: GraphQLString, - description: - 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', - }, - _label: { - type: require('./element.input'), - description: - 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLList(require('./coding.input')), - description: - 'A code that has the same meaning as the element in a particular terminology.', - }, - slicing: { - type: require('./elementdefinitionslicing.input'), - description: - 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', - }, - short: { - type: GraphQLString, - description: - 'A concise description of what this element means (e.g. for use in autogenerated summaries).', - }, - _short: { - type: require('./element.input'), - description: - 'A concise description of what this element means (e.g. for use in autogenerated summaries).', - }, - definition: { - type: GraphQLString, - description: - 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', - }, - _definition: { - type: require('./element.input'), - description: - 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', - }, - comment: { - type: GraphQLString, - description: - 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', - }, - _comment: { - type: require('./element.input'), - description: - 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', - }, - requirements: { - type: GraphQLString, - description: - 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', - }, - _requirements: { - type: require('./element.input'), - description: - 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', - }, - alias: { - type: new GraphQLList(GraphQLString), - description: - 'Identifies additional names by which this element might also be known.', - }, - _alias: { - type: require('./element.input'), - description: - 'Identifies additional names by which this element might also be known.', - }, - min: { - type: UnsignedIntScalar, - description: - 'The minimum number of times this element SHALL appear in the instance.', - }, - _min: { - type: require('./element.input'), - description: - 'The minimum number of times this element SHALL appear in the instance.', - }, - max: { - type: GraphQLString, - description: - 'The maximum number of times this element is permitted to appear in the instance.', - }, - _max: { - type: require('./element.input'), - description: - 'The maximum number of times this element is permitted to appear in the instance.', - }, - base: { - type: require('./elementdefinitionbase.input'), - description: - 'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.', - }, - contentReference: { - type: UriScalar, - description: - 'Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.', - }, - _contentReference: { - type: require('./element.input'), - description: - 'Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.', - }, - type: { - type: new GraphQLList(require('./elementdefinitiontype.input')), - description: - 'The data type or resource that the value of this element is permitted to be.', - }, - defaultValueBase64Binary: { - type: Base64BinaryScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueBase64Binary: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueBoolean: { - type: GraphQLBoolean, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueBoolean: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCode: { - type: CodeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueCode: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDate: { - type: DateScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDate: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDateTime: { - type: DateTimeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDateTime: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDecimal: { - type: GraphQLFloat, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDecimal: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueId: { - type: IdScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueId: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueInstant: { - type: InstantScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueInstant: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueInteger: { - type: GraphQLInt, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueInteger: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMarkdown: { - type: GraphQLString, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueMarkdown: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueOid: { - type: OidScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueOid: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValuePositiveInt: { - type: PositiveIntScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValuePositiveInt: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueString: { - type: GraphQLString, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueString: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueTime: { - type: TimeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueTime: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueUnsignedInt: { - type: UnsignedIntScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueUnsignedInt: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueUri: { - type: UriScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueUri: { - type: require('./element.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAddress: { - type: require('./address.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAge: { - type: require('./age.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAnnotation: { - type: require('./annotation.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAttachment: { - type: require('./attachment.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCoding: { - type: require('./coding.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueContactPoint: { - type: require('./contactpoint.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCount: { - type: require('./count.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDistance: { - type: require('./distance.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDuration: { - type: require('./duration.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueHumanName: { - type: require('./humanname.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueIdentifier: { - type: require('./identifier.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMoney: { - type: require('./money.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValuePeriod: { - type: require('./period.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueQuantity: { - type: require('./quantity.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueRange: { - type: require('./range.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueRatio: { - type: require('./ratio.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueReference: { - type: require('./reference.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueSampledData: { - type: require('./sampleddata.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueSignature: { - type: require('./signature.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueTiming: { - type: require('./timing.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMeta: { - type: require('./meta.input'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - meaningWhenMissing: { - type: GraphQLString, - description: - "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", - }, - _meaningWhenMissing: { - type: require('./element.input'), - description: - "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", - }, - orderMeaning: { - type: GraphQLString, - description: - 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', - }, - _orderMeaning: { - type: require('./element.input'), - description: - 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', - }, - fixedBase64Binary: { - type: Base64BinaryScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedBase64Binary: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedBoolean: { - type: GraphQLBoolean, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedBoolean: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCode: { - type: CodeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedCode: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDate: { - type: DateScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDate: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDateTime: { - type: DateTimeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDateTime: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDecimal: { - type: GraphQLFloat, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDecimal: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedId: { - type: IdScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedId: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedInstant: { - type: InstantScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedInstant: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedInteger: { - type: GraphQLInt, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedInteger: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMarkdown: { - type: GraphQLString, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedMarkdown: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedOid: { - type: OidScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedOid: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedPositiveInt: { - type: PositiveIntScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedPositiveInt: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedString: { - type: GraphQLString, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedString: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedTime: { - type: TimeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedTime: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedUnsignedInt: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedUri: { - type: UriScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedUri: { - type: require('./element.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAddress: { - type: require('./address.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAge: { - type: require('./age.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAnnotation: { - type: require('./annotation.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAttachment: { - type: require('./attachment.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCoding: { - type: require('./coding.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedContactPoint: { - type: require('./contactpoint.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCount: { - type: require('./count.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDistance: { - type: require('./distance.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDuration: { - type: require('./duration.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedHumanName: { - type: require('./humanname.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedIdentifier: { - type: require('./identifier.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMoney: { - type: require('./money.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedPeriod: { - type: require('./period.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedQuantity: { - type: require('./quantity.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedRange: { - type: require('./range.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedRatio: { - type: require('./ratio.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedReference: { - type: require('./reference.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedSampledData: { - type: require('./sampleddata.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedSignature: { - type: require('./signature.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedTiming: { - type: require('./timing.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMeta: { - type: require('./meta.input'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - patternBase64Binary: { - type: Base64BinaryScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternBase64Binary: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternBoolean: { - type: GraphQLBoolean, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternBoolean: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCode: { - type: CodeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternCode: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDate: { - type: DateScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDate: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDateTime: { - type: DateTimeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDateTime: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDecimal: { - type: GraphQLFloat, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDecimal: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternId: { - type: IdScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternId: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternInstant: { - type: InstantScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternInstant: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternInteger: { - type: GraphQLInt, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternInteger: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMarkdown: { - type: GraphQLString, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternMarkdown: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternOid: { - type: OidScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternOid: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternPositiveInt: { - type: PositiveIntScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternPositiveInt: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternString: { - type: GraphQLString, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternString: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternTime: { - type: TimeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternTime: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternUnsignedInt: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternUri: { - type: UriScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternUri: { - type: require('./element.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAddress: { - type: require('./address.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAge: { - type: require('./age.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAnnotation: { - type: require('./annotation.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAttachment: { - type: require('./attachment.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCoding: { - type: require('./coding.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternContactPoint: { - type: require('./contactpoint.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCount: { - type: require('./count.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDistance: { - type: require('./distance.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDuration: { - type: require('./duration.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternHumanName: { - type: require('./humanname.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternIdentifier: { - type: require('./identifier.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMoney: { - type: require('./money.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternPeriod: { - type: require('./period.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternQuantity: { - type: require('./quantity.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternRange: { - type: require('./range.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternRatio: { - type: require('./ratio.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternReference: { - type: require('./reference.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternSampledData: { - type: require('./sampleddata.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternSignature: { - type: require('./signature.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternTiming: { - type: require('./timing.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMeta: { - type: require('./meta.input'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - example: { - type: new GraphQLList(require('./elementdefinitionexample.input')), - description: - 'A sample value for this element demonstrating the type of information that would typically be found in the element.', - }, - minValueDate: { - type: DateScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDate: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDateTime: { - type: DateTimeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDateTime: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueInstant: { - type: InstantScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueInstant: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueTime: { - type: TimeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueTime: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDecimal: { - type: GraphQLFloat, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDecimal: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueInteger: { - type: GraphQLInt, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueInteger: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValuePositiveInt: { - type: PositiveIntScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValuePositiveInt: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueUnsignedInt: { - type: require('./element.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueQuantity: { - type: require('./quantity.input'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDate: { - type: DateScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDate: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDateTime: { - type: DateTimeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDateTime: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueInstant: { - type: InstantScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueInstant: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueTime: { - type: TimeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueTime: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDecimal: { - type: GraphQLFloat, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDecimal: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueInteger: { - type: GraphQLInt, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueInteger: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValuePositiveInt: { - type: PositiveIntScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValuePositiveInt: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueUnsignedInt: { - type: require('./element.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueQuantity: { - type: require('./quantity.input'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxLength: { - type: GraphQLInt, - description: - 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', - }, - _maxLength: { - type: require('./element.input'), - description: - 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', - }, - condition: { - type: new GraphQLList(IdScalar), - description: - 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', - }, - _condition: { - type: require('./element.input'), - description: - 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', - }, - constraint: { - type: new GraphQLList(require('./elementdefinitionconstraint.input')), - description: - 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', - }, - mustSupport: { - type: GraphQLBoolean, - description: - "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", - }, - _mustSupport: { - type: require('./element.input'), - description: - "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", - }, - isModifier: { - type: GraphQLBoolean, - description: - 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', - }, - _isModifier: { - type: require('./element.input'), - description: - 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', - }, - isSummary: { - type: GraphQLBoolean, - description: - 'Whether the element should be included if a client requests a search with the parameter _summary=true.', - }, - _isSummary: { - type: require('./element.input'), - description: - 'Whether the element should be included if a client requests a search with the parameter _summary=true.', - }, - binding: { - type: require('./elementdefinitionbinding.input'), - description: - 'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).', - }, - mapping: { - type: new GraphQLList(require('./elementdefinitionmapping.input')), - description: - 'Identifies a concept from an external specification that roughly corresponds to this element.', - }, - }), + description: 'Base StructureDefinition for ElementDefinition Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _path: { + type: require('./element.input.js'), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + _representation: { + type: require('./element.input.js'), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/property-representation + representation: { + type: new GraphQLList(CodeScalar), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + _sliceName: { + type: require('./element.input.js'), + description: + 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', + }, + sliceName: { + type: GraphQLString, + description: + 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', + }, + _label: { + type: require('./element.input.js'), + description: + 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + label: { + type: GraphQLString, + description: + 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A code that has the same meaning as the element in a particular terminology.', + }, + slicing: { + type: require('./element.input.js'), + description: + 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', + }, + _short: { + type: require('./element.input.js'), + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + short: { + type: GraphQLString, + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + _definition: { + type: require('./element.input.js'), + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', + }, + definition: { + type: GraphQLString, + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', + }, + comment: { + type: GraphQLString, + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', + }, + _requirements: { + type: require('./element.input.js'), + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + requirements: { + type: GraphQLString, + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'Identifies additional names by which this element might also be known.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies additional names by which this element might also be known.', + }, + _min: { + type: require('./element.input.js'), + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + min: { + type: UnsignedIntScalar, + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + _max: { + type: require('./element.input.js'), + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + base: { + type: require('./element.input.js'), + description: + 'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.', + }, + _contentReference: { + type: require('./element.input.js'), + description: + 'Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.', + }, + contentReference: { + type: UriScalar, + description: + 'Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.', + }, + type: { + type: new GraphQLList(require('./element.input.js')), + description: + 'The data type or resource that the value of this element is permitted to be.', + }, + _defaultValueBase64Binary: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueBoolean: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueCode: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCode: { + type: CodeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDate: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDate: { + type: DateScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDateTime: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDecimal: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueId: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueId: { + type: IdScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInstant: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInstant: { + type: InstantScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInteger: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInteger: { + type: GraphQLInt, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueMarkdown: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueOid: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueOid: { + type: OidScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValuePositiveInt: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueString: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueString: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueTime: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTime: { + type: TimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUnsignedInt: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUri: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUri: { + type: UriScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAddress: { + type: require('./address.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAge: { + type: require('./age.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAnnotation: { + type: require('./annotation.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAttachment: { + type: require('./attachment.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCoding: { + type: require('./coding.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContactPoint: { + type: require('./contactpoint.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCount: { + type: require('./count.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDistance: { + type: require('./distance.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDuration: { + type: require('./duration.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueHumanName: { + type: require('./humanname.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueIdentifier: { + type: require('./identifier.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMoney: { + type: require('./money.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePeriod: { + type: require('./period.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueQuantity: { + type: require('./quantity.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRange: { + type: require('./range.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRatio: { + type: require('./ratio.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueReference: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSampledData: { + type: require('./sampleddata.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSignature: { + type: require('./signature.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTiming: { + type: require('./timing.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMeta: { + type: require('./meta.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _meaningWhenMissing: { + type: require('./element.input.js'), + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", + }, + meaningWhenMissing: { + type: GraphQLString, + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", + }, + _orderMeaning: { + type: require('./element.input.js'), + description: + 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', + }, + orderMeaning: { + type: GraphQLString, + description: + 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', + }, + _fixedBase64Binary: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedBoolean: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedCode: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCode: { + type: CodeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDate: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDate: { + type: DateScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDateTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDecimal: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedId: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedId: { + type: IdScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInstant: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInstant: { + type: InstantScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInteger: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInteger: { + type: GraphQLInt, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedMarkdown: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedOid: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedOid: { + type: OidScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedPositiveInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedString: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedString: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTime: { + type: TimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUnsignedInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUri: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUri: { + type: UriScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAddress: { + type: require('./address.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAge: { + type: require('./age.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAnnotation: { + type: require('./annotation.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAttachment: { + type: require('./attachment.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCoding: { + type: require('./coding.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCount: { + type: require('./count.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDistance: { + type: require('./distance.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDuration: { + type: require('./duration.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedHumanName: { + type: require('./humanname.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedIdentifier: { + type: require('./identifier.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMoney: { + type: require('./money.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPeriod: { + type: require('./period.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedQuantity: { + type: require('./quantity.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRange: { + type: require('./range.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRatio: { + type: require('./ratio.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedReference: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSignature: { + type: require('./signature.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTiming: { + type: require('./timing.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMeta: { + type: require('./meta.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _patternBase64Binary: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternBoolean: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternCode: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCode: { + type: CodeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDate: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDate: { + type: DateScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDateTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDecimal: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternId: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternId: { + type: IdScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternInstant: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternInstant: { + type: InstantScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternInteger: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternInteger: { + type: GraphQLInt, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternMarkdown: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternOid: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternOid: { + type: OidScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternPositiveInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternString: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternString: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternTime: { + type: TimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternUnsignedInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternUri: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternUri: { + type: UriScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAddress: { + type: require('./address.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAge: { + type: require('./age.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAnnotation: { + type: require('./annotation.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAttachment: { + type: require('./attachment.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCoding: { + type: require('./coding.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCount: { + type: require('./count.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDistance: { + type: require('./distance.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDuration: { + type: require('./duration.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternHumanName: { + type: require('./humanname.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternIdentifier: { + type: require('./identifier.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMoney: { + type: require('./money.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternPeriod: { + type: require('./period.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternQuantity: { + type: require('./quantity.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternRange: { + type: require('./range.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternRatio: { + type: require('./ratio.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternReference: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternSignature: { + type: require('./signature.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternTiming: { + type: require('./timing.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMeta: { + type: require('./meta.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + example: { + type: new GraphQLList(require('./element.input.js')), + description: + 'A sample value for this element demonstrating the type of information that would typically be found in the element.', + }, + _minValueDate: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDate: { + type: DateScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDateTime: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDateTime: { + type: DateTimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInstant: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInstant: { + type: InstantScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueTime: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueTime: { + type: TimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDecimal: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDecimal: { + type: GraphQLFloat, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInteger: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInteger: { + type: GraphQLInt, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValuePositiveInt: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueUnsignedInt: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueQuantity: { + type: require('./quantity.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDate: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDate: { + type: DateScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDateTime: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDateTime: { + type: DateTimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInstant: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInstant: { + type: InstantScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueTime: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueTime: { + type: TimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDecimal: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDecimal: { + type: GraphQLFloat, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInteger: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInteger: { + type: GraphQLInt, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValuePositiveInt: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueUnsignedInt: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueQuantity: { + type: require('./quantity.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxLength: { + type: require('./element.input.js'), + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + maxLength: { + type: GraphQLInt, + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + _condition: { + type: require('./element.input.js'), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + condition: { + type: new GraphQLList(IdScalar), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + constraint: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', + }, + _mustSupport: { + type: require('./element.input.js'), + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", + }, + mustSupport: { + type: GraphQLBoolean, + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", + }, + _isModifier: { + type: require('./element.input.js'), + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + isModifier: { + type: GraphQLBoolean, + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + _isSummary: { + type: require('./element.input.js'), + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + isSummary: { + type: GraphQLBoolean, + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + binding: { + type: require('./element.input.js'), + description: + 'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).', + }, + mapping: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Identifies a concept from an external specification that roughly corresponds to this element.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinitionbase.input.js b/src/resources/3_0_1/inputs/elementdefinitionbase.input.js index 130f588f..abe1a1d0 100644 --- a/src/resources/3_0_1/inputs/elementdefinitionbase.input.js +++ b/src/resources/3_0_1/inputs/elementdefinitionbase.input.js @@ -1,52 +1,63 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary ElementDefinition.base Input Schema + * @summary ElementDefinitionbase Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionBase_Input', - description: - 'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.', - fields: () => - extendSchema(require('./element.input'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', - }, - _path: { - type: require('./element.input'), - description: - 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', - }, - min: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: - 'Minimum cardinality of the base element identified by the path.', - }, - _min: { - type: require('./element.input'), - description: - 'Minimum cardinality of the base element identified by the path.', - }, - max: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Maximum cardinality of the base element identified by the path.', - }, - _max: { - type: require('./element.input'), - description: - 'Maximum cardinality of the base element identified by the path.', - }, - }), + name: 'ElementDefinitionbase_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', + }, + _min: { + type: require('./element.input.js'), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + min: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + _max: { + type: require('./element.input.js'), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinitionbinding.input.js b/src/resources/3_0_1/inputs/elementdefinitionbinding.input.js index 47807e2b..d0a25d7b 100644 --- a/src/resources/3_0_1/inputs/elementdefinitionbinding.input.js +++ b/src/resources/3_0_1/inputs/elementdefinitionbinding.input.js @@ -1,59 +1,70 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.binding Input Schema + * @summary ElementDefinitionbinding Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionBinding_Input', - description: - 'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/binding-strength - strength: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - _strength: { - type: require('./element.input'), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - description: { - type: GraphQLString, - description: - 'Describes the intended use of this particular set of codes.', - }, - _description: { - type: require('./element.input'), - description: - 'Describes the intended use of this particular set of codes.', - }, - valueSetUri: { - type: UriScalar, - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', - }, - _valueSetUri: { - type: require('./element.input'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', - }, - valueSetReference: { - type: require('./reference.input'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', - }, - }), + name: 'ElementDefinitionbinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _strength: { + type: require('./element.input.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/binding-strength + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Describes the intended use of this particular set of codes.', + }, + description: { + type: GraphQLString, + description: + 'Describes the intended use of this particular set of codes.', + }, + _valueSetUri: { + type: require('./element.input.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', + }, + valueSetUri: { + type: UriScalar, + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', + }, + valueSetReference: { + type: GraphQLString, + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinitionconstraint.input.js b/src/resources/3_0_1/inputs/elementdefinitionconstraint.input.js index 3785fa6d..20a988a7 100644 --- a/src/resources/3_0_1/inputs/elementdefinitionconstraint.input.js +++ b/src/resources/3_0_1/inputs/elementdefinitionconstraint.input.js @@ -1,95 +1,106 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.constraint Input Schema + * @summary ElementDefinitionconstraint Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionConstraint_Input', - description: - 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', - fields: () => - extendSchema(require('./element.input'), { - key: { - type: new GraphQLNonNull(IdScalar), - description: - 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', - }, - _key: { - type: require('./element.input'), - description: - 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', - }, - requirements: { - type: GraphQLString, - description: - 'Description of why this constraint is necessary or appropriate.', - }, - _requirements: { - type: require('./element.input'), - description: - 'Description of why this constraint is necessary or appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/constraint-severity - severity: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the impact constraint violation has on the conformance of the instance.', - }, - _severity: { - type: require('./element.input'), - description: - 'Identifies the impact constraint violation has on the conformance of the instance.', - }, - human: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', - }, - _human: { - type: require('./element.input'), - description: - 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', - }, - expression: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.', - }, - _expression: { - type: require('./element.input'), - description: - 'A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.', - }, - xpath: { - type: GraphQLString, - description: - 'An XPath expression of constraint that can be executed to see if this constraint is met.', - }, - _xpath: { - type: require('./element.input'), - description: - 'An XPath expression of constraint that can be executed to see if this constraint is met.', - }, - source: { - type: UriScalar, - description: - 'A reference to the original source of the constraint, for traceability purposes.', - }, - _source: { - type: require('./element.input'), - description: - 'A reference to the original source of the constraint, for traceability purposes.', - }, - }), + name: 'ElementDefinitionconstraint_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _key: { + type: require('./element.input.js'), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + key: { + type: new GraphQLNonNull(IdScalar), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + _requirements: { + type: require('./element.input.js'), + description: + 'Description of why this constraint is necessary or appropriate.', + }, + requirements: { + type: GraphQLString, + description: + 'Description of why this constraint is necessary or appropriate.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/constraint-severity + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + _human: { + type: require('./element.input.js'), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + human: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.', + }, + expression: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.', + }, + _xpath: { + type: require('./element.input.js'), + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + _source: { + type: require('./element.input.js'), + description: + 'A reference to the original source of the constraint, for traceability purposes.', + }, + source: { + type: UriScalar, + description: + 'A reference to the original source of the constraint, for traceability purposes.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinitionexample.input.js b/src/resources/3_0_1/inputs/elementdefinitionexample.input.js index dd77496d..d3a63a7d 100644 --- a/src/resources/3_0_1/inputs/elementdefinitionexample.input.js +++ b/src/resources/3_0_1/inputs/elementdefinitionexample.input.js @@ -1,315 +1,326 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.example Input Schema + * @summary ElementDefinitionexample Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionExample_Input', - description: - 'A sample value for this element demonstrating the type of information that would typically be found in the element.', - fields: () => - extendSchema(require('./element.input'), { - label: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Describes the purpose of this example amoung the set of examples.', - }, - _label: { - type: require('./element.input'), - description: - 'Describes the purpose of this example amoung the set of examples.', - }, - valueBase64Binary: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueBase64Binary: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueBoolean: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueCode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueCode: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDate: { - type: new GraphQLNonNull(DateScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueDate: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDecimal: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueDecimal: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueId: { - type: new GraphQLNonNull(IdScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueId: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueInstant: { - type: new GraphQLNonNull(InstantScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueInstant: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueInteger: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueMarkdown: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueMarkdown: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueOid: { - type: new GraphQLNonNull(OidScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueOid: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valuePositiveInt: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valuePositiveInt: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueString: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueTime: { - type: new GraphQLNonNull(TimeScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueTime: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueUnsignedInt: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueUnsignedInt: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueUri: { - type: require('./element.input'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueAddress: { - type: new GraphQLNonNull(require('./address.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueAge: { - type: new GraphQLNonNull(require('./age.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueAnnotation: { - type: new GraphQLNonNull(require('./annotation.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueCoding: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueContactPoint: { - type: new GraphQLNonNull(require('./contactpoint.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueCount: { - type: new GraphQLNonNull(require('./count.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDistance: { - type: new GraphQLNonNull(require('./distance.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDuration: { - type: new GraphQLNonNull(require('./duration.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueHumanName: { - type: new GraphQLNonNull(require('./humanname.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueIdentifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueMoney: { - type: new GraphQLNonNull(require('./money.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valuePeriod: { - type: new GraphQLNonNull(require('./period.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueRange: { - type: new GraphQLNonNull(require('./range.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueRatio: { - type: new GraphQLNonNull(require('./ratio.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueSampledData: { - type: new GraphQLNonNull(require('./sampleddata.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueSignature: { - type: new GraphQLNonNull(require('./signature.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueTiming: { - type: new GraphQLNonNull(require('./timing.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueMeta: { - type: new GraphQLNonNull(require('./meta.input')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - }), + name: 'ElementDefinitionexample_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _label: { + type: require('./element.input.js'), + description: + 'Describes the purpose of this example amoung the set of examples.', + }, + label: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Describes the purpose of this example amoung the set of examples.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueCode: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueId: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueOid: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMeta: { + type: new GraphQLNonNull(require('./meta.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinitionmapping.input.js b/src/resources/3_0_1/inputs/elementdefinitionmapping.input.js index 6d9f0d33..625ce32c 100644 --- a/src/resources/3_0_1/inputs/elementdefinitionmapping.input.js +++ b/src/resources/3_0_1/inputs/elementdefinitionmapping.input.js @@ -1,61 +1,72 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.mapping Input Schema + * @summary ElementDefinitionmapping Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionMapping_Input', - description: - 'Identifies a concept from an external specification that roughly corresponds to this element.', - fields: () => - extendSchema(require('./element.input'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: 'An internal reference to the definition of a mapping.', - }, - _identity: { - type: require('./element.input'), - description: 'An internal reference to the definition of a mapping.', - }, - language: { - type: CodeScalar, - description: - 'Identifies the computable language in which mapping.map is expressed.', - }, - _language: { - type: require('./element.input'), - description: - 'Identifies the computable language in which mapping.map is expressed.', - }, - map: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Expresses what part of the target specification corresponds to this element.', - }, - _map: { - type: require('./element.input'), - description: - 'Expresses what part of the target specification corresponds to this element.', - }, - comment: { - type: GraphQLString, - description: - 'Comments that provide information about the mapping or its use.', - }, - _comment: { - type: require('./element.input'), - description: - 'Comments that provide information about the mapping or its use.', - }, - }), + name: 'ElementDefinitionmapping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _identity: { + type: require('./element.input.js'), + description: 'An internal reference to the definition of a mapping.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: 'An internal reference to the definition of a mapping.', + }, + _language: { + type: require('./element.input.js'), + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + language: { + type: CodeScalar, + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + _map: { + type: require('./element.input.js'), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + map: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments that provide information about the mapping or its use.', + }, + comment: { + type: GraphQLString, + description: + 'Comments that provide information about the mapping or its use.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinitionslicing.input.js b/src/resources/3_0_1/inputs/elementdefinitionslicing.input.js index 42aabad4..bfb3ad74 100644 --- a/src/resources/3_0_1/inputs/elementdefinitionslicing.input.js +++ b/src/resources/3_0_1/inputs/elementdefinitionslicing.input.js @@ -1,62 +1,70 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, GraphQLBoolean, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.slicing Input Schema + * @summary ElementDefinitionslicing Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionSlicing_Input', - description: - 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', - fields: () => - extendSchema(require('./element.input'), { - discriminator: { - type: new GraphQLList( - require('./elementdefinitionslicingdiscriminator.input'), - ), - description: - 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', - }, - description: { - type: GraphQLString, - description: - 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', - }, - _description: { - type: require('./element.input'), - description: - 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', - }, - ordered: { - type: GraphQLBoolean, - description: - 'If the matching elements have to occur in the same order as defined in the profile.', - }, - _ordered: { - type: require('./element.input'), - description: - 'If the matching elements have to occur in the same order as defined in the profile.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-slicing-rules - rules: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', - }, - _rules: { - type: require('./element.input'), - description: - 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', - }, - }), + name: 'ElementDefinitionslicing_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + discriminator: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + description: { + type: GraphQLString, + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + _ordered: { + type: require('./element.input.js'), + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + ordered: { + type: GraphQLBoolean, + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + _rules: { + type: require('./element.input.js'), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-slicing-rules + rules: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinitionslicingdiscriminator.input.js b/src/resources/3_0_1/inputs/elementdefinitionslicingdiscriminator.input.js index 2d7e58c2..7ef8af99 100644 --- a/src/resources/3_0_1/inputs/elementdefinitionslicingdiscriminator.input.js +++ b/src/resources/3_0_1/inputs/elementdefinitionslicingdiscriminator.input.js @@ -1,43 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.slicing.discriminator Input Schema + * @summary ElementDefinitionslicingdiscriminator Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionSlicingDiscriminator_Input', - description: - 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/discriminator-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the element value is interpreted when discrimination is evaluated.', - }, - _type: { - type: require('./element.input'), - description: - 'How the element value is interpreted when discrimination is evaluated.', - }, - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.', - }, - _path: { - type: require('./element.input'), - description: - 'A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.', - }, - }), + name: 'ElementDefinitionslicingdiscriminator_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'How the element value is interpreted when discrimination is evaluated.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/discriminator-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the element value is interpreted when discrimination is evaluated.', + }, + _path: { + type: require('./element.input.js'), + description: + 'A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/elementdefinitiontype.input.js b/src/resources/3_0_1/inputs/elementdefinitiontype.input.js index dffbc14a..3829fd0c 100644 --- a/src/resources/3_0_1/inputs/elementdefinitiontype.input.js +++ b/src/resources/3_0_1/inputs/elementdefinitiontype.input.js @@ -1,76 +1,87 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.type Input Schema + * @summary ElementDefinitiontype Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ElementDefinitionType_Input', - description: - 'The data type or resource that the value of this element is permitted to be.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - code: { - type: new GraphQLNonNull(UriScalar), - description: - "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", - }, - _code: { - type: require('./element.input'), - description: - "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", - }, - profile: { - type: UriScalar, - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - _profile: { - type: require('./element.input'), - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - targetProfile: { - type: UriScalar, - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - _targetProfile: { - type: require('./element.input'), - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-aggregation-mode - aggregation: { - type: new GraphQLList(CodeScalar), - description: - 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', - }, - _aggregation: { - type: require('./element.input'), - description: - 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reference-version-rules - versioning: { - type: CodeScalar, - description: - 'Whether this reference needs to be version specific or version independent, or whether either can be used.', - }, - _versioning: { - type: require('./element.input'), - description: - 'Whether this reference needs to be version specific or version independent, or whether either can be used.', - }, - }), + name: 'ElementDefinitiontype_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _code: { + type: require('./element.input.js'), + description: + "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + code: { + type: new GraphQLNonNull(UriScalar), + description: + "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + _profile: { + type: require('./element.input.js'), + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + profile: { + type: UriScalar, + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + _targetProfile: { + type: require('./element.input.js'), + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + targetProfile: { + type: UriScalar, + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + _aggregation: { + type: require('./element.input.js'), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-aggregation-mode + aggregation: { + type: new GraphQLList(CodeScalar), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + _versioning: { + type: require('./element.input.js'), + description: + 'Whether this reference needs to be version specific or version independent, or whether either can be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reference-version-rules + versioning: { + type: CodeScalar, + description: + 'Whether this reference needs to be version specific or version independent, or whether either can be used.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/eligibilityrequest.input.js b/src/resources/3_0_1/inputs/eligibilityrequest.input.js index 0019e05a..b8463783 100644 --- a/src/resources/3_0_1/inputs/eligibilityrequest.input.js +++ b/src/resources/3_0_1/inputs/eligibilityrequest.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 EligibilityRequestResourceInputType = new GraphQLEnumType({ - name: 'EligibilityRequestResourceInputType', - values: { - EligibilityRequest: { value: 'EligibilityRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,107 +17,164 @@ let EligibilityRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EligibilityRequest_Input', - description: 'Base StructureDefinition for EligibilityRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EligibilityRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-priority - priority: { - type: require('./codeableconcept.input'), - description: - 'Immediate (STAT), best effort (NORMAL), deferred (DEFER).', - }, - patient: { - type: require('./reference.input'), - description: 'Patient Resource.', - }, - servicedDate: { - type: DateScalar, - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - _servicedDate: { - type: require('./element.input'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - servicedPeriod: { - type: require('./period.input'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when this resource was created.', - }, - enterer: { - type: require('./reference.input'), - description: - 'Person who created the invoice/claim/pre-determination or pre-authorization.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - insurer: { - type: require('./reference.input'), - description: 'The Insurer who is target of the request.', - }, - facility: { - type: require('./reference.input'), - description: 'Facility where the services were provided.', - }, - coverage: { - type: require('./reference.input'), - description: - 'Financial instrument by which payment information for health care.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.input'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-category - benefitCategory: { - type: require('./codeableconcept.input'), - description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - benefitSubCategory: { - type: require('./codeableconcept.input'), - description: - 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', - }, - }), + description: 'Base StructureDefinition for EligibilityRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EligibilityRequest_Enum_input', + values: { EligibilityRequest: { value: 'EligibilityRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-priority + priority: { + type: require('./codeableconcept.input.js'), + description: 'Immediate (STAT), best effort (NORMAL), deferred (DEFER).', + }, + patient: { + type: GraphQLString, + description: 'Patient Resource.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + enterer: { + type: GraphQLString, + description: + 'Person who created the invoice/claim/pre-determination or pre-authorization.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + insurer: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + facility: { + type: GraphQLString, + description: 'Facility where the services were provided.', + }, + coverage: { + type: GraphQLString, + description: + 'Financial instrument by which payment information for health care.', + }, + _businessArrangement: { + type: require('./element.input.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-category + benefitCategory: { + type: require('./codeableconcept.input.js'), + description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + benefitSubCategory: { + type: require('./codeableconcept.input.js'), + description: + 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/eligibilityresponse.input.js b/src/resources/3_0_1/inputs/eligibilityresponse.input.js index d14db5d2..3c3f91c2 100644 --- a/src/resources/3_0_1/inputs/eligibilityresponse.input.js +++ b/src/resources/3_0_1/inputs/eligibilityresponse.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EligibilityResponseResourceInputType = new GraphQLEnumType({ - name: 'EligibilityResponseResourceInputType', - values: { - EligibilityResponse: { value: 'EligibilityResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,90 +17,148 @@ let EligibilityResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EligibilityResponse_Input', - description: 'Base StructureDefinition for EligibilityResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EligibilityResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.input'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - insurer: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - inforce: { - type: GraphQLBoolean, - description: - 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', - }, - _inforce: { - type: require('./element.input'), - description: - 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', - }, - insurance: { - type: new GraphQLList(require('./eligibilityresponseinsurance.input')), - description: - 'The insurer may provide both the details for the requested coverage as well as details for additional coverages known to the insurer.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.input'), - description: 'The form to be used for printing the content.', - }, - error: { - type: new GraphQLList(require('./eligibilityresponseerror.input')), - description: 'Mutually exclusive with Services Provided (Item).', - }, - }), + description: 'Base StructureDefinition for EligibilityResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EligibilityResponse_Enum_input', + values: { EligibilityResponse: { value: 'EligibilityResponse' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + insurer: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + _inforce: { + type: require('./element.input.js'), + description: + 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', + }, + inforce: { + type: GraphQLBoolean, + description: + 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', + }, + insurance: { + type: new GraphQLList(require('./eligibilityresponseinsurance.input.js')), + description: + 'The insurer may provide both the details for the requested coverage as well as details for additional coverages known to the insurer.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.input.js'), + description: 'The form to be used for printing the content.', + }, + error: { + type: new GraphQLList(require('./eligibilityresponseerror.input.js')), + description: 'Mutually exclusive with Services Provided (Item).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/eligibilityresponseerror.input.js b/src/resources/3_0_1/inputs/eligibilityresponseerror.input.js index 67d8e3e4..f8ca4652 100644 --- a/src/resources/3_0_1/inputs/eligibilityresponseerror.input.js +++ b/src/resources/3_0_1/inputs/eligibilityresponseerror.input.js @@ -1,22 +1,43 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary EligibilityResponse.error Input Schema + * @summary EligibilityResponseerror Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EligibilityResponseError_Input', - description: 'Mutually exclusive with Services Provided (Item).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'An error code,from a specified code system, which details why the eligibility check could not be performed.', - }, - }), + name: 'EligibilityResponseerror_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'An error code,from a specified code system, which details why the eligibility check could not be performed.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/eligibilityresponseinsurance.input.js b/src/resources/3_0_1/inputs/eligibilityresponseinsurance.input.js index 55cd0582..4feef2ed 100644 --- a/src/resources/3_0_1/inputs/eligibilityresponseinsurance.input.js +++ b/src/resources/3_0_1/inputs/eligibilityresponseinsurance.input.js @@ -1,33 +1,52 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary EligibilityResponse.insurance Input Schema + * @summary EligibilityResponseinsurance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EligibilityResponseInsurance_Input', - description: - 'The insurer may provide both the details for the requested coverage as well as details for additional coverages known to the insurer.', - fields: () => - extendSchema(require('./backboneelement.input'), { - coverage: { - type: require('./reference.input'), - description: - 'A suite of updated or additional Coverages from the Insurer.', - }, - contract: { - type: require('./reference.input'), - description: - 'The contract resource which may provide more detailed information.', - }, - benefitBalance: { - type: new GraphQLList( - require('./eligibilityresponseinsurancebenefitbalance.input'), - ), - description: 'Benefits and optionally current balances by Category.', - }, - }), + name: 'EligibilityResponseinsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + coverage: { + type: GraphQLString, + description: + 'A suite of updated or additional Coverages from the Insurer.', + }, + contract: { + type: GraphQLString, + description: + 'The contract resource which may provide more detailed information.', + }, + benefitBalance: { + type: new GraphQLList( + require('./eligibilityresponseinsurancebenefitbalance.input.js'), + ), + description: 'Benefits and optionally current balances by Category.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/eligibilityresponseinsurancebenefitbalance.input.js b/src/resources/3_0_1/inputs/eligibilityresponseinsurancebenefitbalance.input.js index 9d593000..4f7f83c2 100644 --- a/src/resources/3_0_1/inputs/eligibilityresponseinsurancebenefitbalance.input.js +++ b/src/resources/3_0_1/inputs/eligibilityresponseinsurancebenefitbalance.input.js @@ -1,85 +1,101 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary EligibilityResponse.insurance.benefitBalance Input Schema + * @summary EligibilityResponseinsurancebenefitBalance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EligibilityResponseInsuranceBenefitBalance_Input', - description: 'Benefits and optionally current balances by Category.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-category - category: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - subCategory: { - type: require('./codeableconcept.input'), - description: - 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', - }, - excluded: { - type: GraphQLBoolean, - description: - 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', - }, - _excluded: { - type: require('./element.input'), - description: - 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', - }, - name: { - type: GraphQLString, - description: - 'A short name or tag for the benefit, for example MED01, or DENT2.', - }, - _name: { - type: require('./element.input'), - description: - 'A short name or tag for the benefit, for example MED01, or DENT2.', - }, - description: { - type: GraphQLString, - description: - "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", - }, - _description: { - type: require('./element.input'), - description: - "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-network - network: { - type: require('./codeableconcept.input'), - description: 'Network designation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-unit - unit: { - type: require('./codeableconcept.input'), - description: 'Unit designation: individual or family.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-term - term: { - type: require('./codeableconcept.input'), - description: - "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", - }, - financial: { - type: new GraphQLList( - require('./eligibilityresponseinsurancebenefitbalancefinancial.input'), - ), - description: 'Benefits Used to date.', - }, - }), + name: 'EligibilityResponseinsurancebenefitBalance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-category + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + subCategory: { + type: require('./codeableconcept.input.js'), + description: + 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', + }, + _excluded: { + type: require('./element.input.js'), + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', + }, + excluded: { + type: GraphQLBoolean, + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A short name or tag for the benefit, for example MED01, or DENT2.', + }, + name: { + type: GraphQLString, + description: + 'A short name or tag for the benefit, for example MED01, or DENT2.', + }, + _description: { + type: require('./element.input.js'), + description: + "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", + }, + description: { + type: GraphQLString, + description: + "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-network + network: { + type: require('./codeableconcept.input.js'), + description: 'Network designation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-unit + unit: { + type: require('./codeableconcept.input.js'), + description: 'Unit designation: individual or family.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-term + term: { + type: require('./codeableconcept.input.js'), + description: + "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", + }, + financial: { + type: new GraphQLList( + require('./eligibilityresponseinsurancebenefitbalancefinancial.input.js'), + ), + description: 'Benefits Used to date.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/eligibilityresponseinsurancebenefitbalancefinancial.input.js b/src/resources/3_0_1/inputs/eligibilityresponseinsurancebenefitbalancefinancial.input.js index e89f59b9..48f6112d 100644 --- a/src/resources/3_0_1/inputs/eligibilityresponseinsurancebenefitbalancefinancial.input.js +++ b/src/resources/3_0_1/inputs/eligibilityresponseinsurancebenefitbalancefinancial.input.js @@ -1,58 +1,75 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary EligibilityResponse.insurance.benefitBalance.financial Input Schema + * @summary EligibilityResponseinsurancebenefitBalancefinancial Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EligibilityResponseInsuranceBenefitBalanceFinancial_Input', - description: 'Benefits Used to date.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Deductable, visits, benefit amount.', - }, - allowedUnsignedInt: { - type: UnsignedIntScalar, - description: 'Benefits allowed.', - }, - _allowedUnsignedInt: { - type: require('./element.input'), - description: 'Benefits allowed.', - }, - allowedString: { - type: GraphQLString, - description: 'Benefits allowed.', - }, - _allowedString: { - type: require('./element.input'), - description: 'Benefits allowed.', - }, - allowedMoney: { - type: require('./money.input'), - description: 'Benefits allowed.', - }, - usedUnsignedInt: { - type: UnsignedIntScalar, - description: 'Benefits used.', - }, - _usedUnsignedInt: { - type: require('./element.input'), - description: 'Benefits used.', - }, - usedMoney: { - type: require('./money.input'), - description: 'Benefits used.', - }, - }), + name: 'EligibilityResponseinsurancebenefitBalancefinancial_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Deductable, visits, benefit amount.', + }, + _allowedUnsignedInt: { + type: require('./element.input.js'), + description: 'Benefits allowed.', + }, + allowedUnsignedInt: { + type: UnsignedIntScalar, + description: 'Benefits allowed.', + }, + _allowedString: { + type: require('./element.input.js'), + description: 'Benefits allowed.', + }, + allowedString: { + type: GraphQLString, + description: 'Benefits allowed.', + }, + allowedMoney: { + type: require('./money.input.js'), + description: 'Benefits allowed.', + }, + _usedUnsignedInt: { + type: require('./element.input.js'), + description: 'Benefits used.', + }, + usedUnsignedInt: { + type: UnsignedIntScalar, + description: 'Benefits used.', + }, + usedMoney: { + type: require('./money.input.js'), + description: 'Benefits used.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/encounter.input.js b/src/resources/3_0_1/inputs/encounter.input.js index 11cb3c7a..c15b3779 100644 --- a/src/resources/3_0_1/inputs/encounter.input.js +++ b/src/resources/3_0_1/inputs/encounter.input.js @@ -1,21 +1,13 @@ -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 EncounterResourceInputType = new GraphQLEnumType({ - name: 'EncounterResourceInputType', - values: { - Encounter: { value: 'Encounter' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,119 +15,176 @@ let EncounterResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Encounter_Input', - description: 'Base StructureDefinition for Encounter Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EncounterResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier(s) by which this encounter is known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', - }, - _status: { - type: require('./element.input'), - description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', - }, - statusHistory: { - type: new GraphQLList(require('./encounterstatushistory.input')), - description: - 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActEncounterCode - class: { - type: require('./coding.input'), - description: 'inpatient | outpatient | ambulatory | emergency +.', - }, - classHistory: { - type: new GraphQLList(require('./encounterclasshistory.input')), - description: - 'The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transisions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kindof discharge from emergency to inpatient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPriority - priority: { - type: require('./codeableconcept.input'), - description: 'Indicates the urgency of the encounter.', - }, - subject: { - type: require('./reference.input'), - description: 'The patient ro group present at the encounter.', - }, - episodeOfCare: { - type: new GraphQLList(require('./reference.input')), - description: - 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', - }, - incomingReferral: { - type: new GraphQLList(require('./reference.input')), - description: - 'The referral request this encounter satisfies (incoming referral).', - }, - participant: { - type: new GraphQLList(require('./encounterparticipant.input')), - description: - 'The list of people responsible for providing the service.', - }, - appointment: { - type: require('./reference.input'), - description: 'The appointment that scheduled this encounter.', - }, - period: { - type: require('./period.input'), - description: 'The start and end time of the encounter.', - }, - length: { - type: require('./duration.input'), - description: - 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', - }, - diagnosis: { - type: new GraphQLList(require('./encounterdiagnosis.input')), - description: 'The list of diagnosis relevant to this encounter.', - }, - account: { - type: new GraphQLList(require('./reference.input')), - description: - 'The set of accounts that may be used for billing for this Encounter.', - }, - hospitalization: { - type: require('./encounterhospitalization.input'), - description: 'Details about the admission to a healthcare service.', - }, - location: { - type: new GraphQLList(require('./encounterlocation.input')), - description: - 'List of locations where the patient has been during this encounter.', - }, - serviceProvider: { - type: require('./reference.input'), - description: - "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", - }, - partOf: { - type: require('./reference.input'), - description: - 'Another Encounter of which this encounter is a part of (administratively or in time).', - }, - }), + description: 'Base StructureDefinition for Encounter Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Encounter_Enum_input', + values: { Encounter: { value: 'Encounter' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'Identifier(s) by which this encounter is known.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + statusHistory: { + type: new GraphQLList(require('./encounterstatushistory.input.js')), + description: + 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActEncounterCode + class: { + type: require('./coding.input.js'), + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + classHistory: { + type: new GraphQLList(require('./encounterclasshistory.input.js')), + description: + 'The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transisions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kindof discharge from emergency to inpatient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPriority + priority: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the urgency of the encounter.', + }, + subject: { + type: GraphQLString, + description: 'The patient ro group present at the encounter.', + }, + episodeOfCare: { + type: new GraphQLList(GraphQLString), + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + }, + incomingReferral: { + type: new GraphQLList(GraphQLString), + description: + 'The referral request this encounter satisfies (incoming referral).', + }, + participant: { + type: new GraphQLList(require('./encounterparticipant.input.js')), + description: 'The list of people responsible for providing the service.', + }, + appointment: { + type: GraphQLString, + description: 'The appointment that scheduled this encounter.', + }, + period: { + type: require('./period.input.js'), + description: 'The start and end time of the encounter.', + }, + length: { + type: require('./duration.input.js'), + description: + 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + }, + diagnosis: { + type: new GraphQLList(require('./encounterdiagnosis.input.js')), + description: 'The list of diagnosis relevant to this encounter.', + }, + account: { + type: new GraphQLList(GraphQLString), + description: + 'The set of accounts that may be used for billing for this Encounter.', + }, + hospitalization: { + type: require('./encounterhospitalization.input.js'), + description: 'Details about the admission to a healthcare service.', + }, + location: { + type: new GraphQLList(require('./encounterlocation.input.js')), + description: + 'List of locations where the patient has been during this encounter.', + }, + serviceProvider: { + type: GraphQLString, + description: + "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", + }, + partOf: { + type: GraphQLString, + description: + 'Another Encounter of which this encounter is a part of (administratively or in time).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/encounterclasshistory.input.js b/src/resources/3_0_1/inputs/encounterclasshistory.input.js index fd3a099d..bb067b19 100644 --- a/src/resources/3_0_1/inputs/encounterclasshistory.input.js +++ b/src/resources/3_0_1/inputs/encounterclasshistory.input.js @@ -1,26 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Encounter.classHistory Input Schema + * @summary EncounterclassHistory Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterClassHistory_Input', - description: - 'The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transisions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kindof discharge from emergency to inpatient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActEncounterCode - class: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'inpatient | outpatient | ambulatory | emergency +.', - }, - period: { - type: new GraphQLNonNull(require('./period.input')), - description: 'The time that the episode was in the specified class.', - }, - }), + name: 'EncounterclassHistory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActEncounterCode + class: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The time that the episode was in the specified class.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/encounterdiagnosis.input.js b/src/resources/3_0_1/inputs/encounterdiagnosis.input.js index b2e6abf7..40e1d70c 100644 --- a/src/resources/3_0_1/inputs/encounterdiagnosis.input.js +++ b/src/resources/3_0_1/inputs/encounterdiagnosis.input.js @@ -1,36 +1,57 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Encounter.diagnosis Input Schema + * @summary Encounterdiagnosis Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterDiagnosis_Input', - description: 'The list of diagnosis relevant to this encounter.', - fields: () => - extendSchema(require('./backboneelement.input'), { - condition: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnosis-role - role: { - type: require('./codeableconcept.input'), - description: - 'Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).', - }, - rank: { - type: PositiveIntScalar, - description: 'Ranking of the diagnosis (for each role type).', - }, - _rank: { - type: require('./element.input'), - description: 'Ranking of the diagnosis (for each role type).', - }, - }), + name: 'Encounterdiagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + condition: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnosis-role + role: { + type: require('./codeableconcept.input.js'), + description: + 'Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).', + }, + _rank: { + type: require('./element.input.js'), + description: 'Ranking of the diagnosis (for each role type).', + }, + rank: { + type: PositiveIntScalar, + description: 'Ranking of the diagnosis (for each role type).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/encounterhospitalization.input.js b/src/resources/3_0_1/inputs/encounterhospitalization.input.js index 2d13064b..d3596914 100644 --- a/src/resources/3_0_1/inputs/encounterhospitalization.input.js +++ b/src/resources/3_0_1/inputs/encounterhospitalization.input.js @@ -1,62 +1,81 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Encounter.hospitalization Input Schema + * @summary Encounterhospitalization Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterHospitalization_Input', - description: 'Details about the admission to a healthcare service.', - fields: () => - extendSchema(require('./backboneelement.input'), { - preAdmissionIdentifier: { - type: require('./identifier.input'), - description: 'Pre-admission identifier.', - }, - origin: { - type: require('./reference.input'), - description: - 'The location from which the patient came before admission.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-admit-source - admitSource: { - type: require('./codeableconcept.input'), - description: - 'From where patient was admitted (physician referral, transfer).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0092 - reAdmission: { - type: require('./codeableconcept.input'), - description: - 'Whether this hospitalization is a readmission and why if known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet - dietPreference: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Diet preferences reported by the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-courtesy - specialCourtesy: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Special courtesies (VIP, board member).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-arrangements - specialArrangement: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.', - }, - destination: { - type: require('./reference.input'), - description: 'Location to which the patient is discharged.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition - dischargeDisposition: { - type: require('./codeableconcept.input'), - description: 'Category or kind of location after discharge.', - }, - }), + name: 'Encounterhospitalization_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + preAdmissionIdentifier: { + type: require('./identifier.input.js'), + description: 'Pre-admission identifier.', + }, + origin: { + type: GraphQLString, + description: 'The location from which the patient came before admission.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-admit-source + admitSource: { + type: require('./codeableconcept.input.js'), + description: + 'From where patient was admitted (physician referral, transfer).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0092 + reAdmission: { + type: require('./codeableconcept.input.js'), + description: + 'Whether this hospitalization is a readmission and why if known.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet + dietPreference: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Diet preferences reported by the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-courtesy + specialCourtesy: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Special courtesies (VIP, board member).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-arrangements + specialArrangement: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.', + }, + destination: { + type: GraphQLString, + description: 'Location to which the patient is discharged.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition + dischargeDisposition: { + type: require('./codeableconcept.input.js'), + description: 'Category or kind of location after discharge.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/encounterlocation.input.js b/src/resources/3_0_1/inputs/encounterlocation.input.js index 130d58e2..9c0a7f3a 100644 --- a/src/resources/3_0_1/inputs/encounterlocation.input.js +++ b/src/resources/3_0_1/inputs/encounterlocation.input.js @@ -1,38 +1,58 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Encounter.location Input Schema + * @summary Encounterlocation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterLocation_Input', - description: - 'List of locations where the patient has been during this encounter.', - fields: () => - extendSchema(require('./backboneelement.input'), { - location: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The location where the encounter takes place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-location-status - status: { - type: CodeScalar, - description: - "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", - }, - _status: { - type: require('./element.input'), - description: - "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", - }, - period: { - type: require('./period.input'), - description: - 'Time period during which the patient was present at the location.', - }, - }), + name: 'Encounterlocation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + location: { + type: new GraphQLNonNull(GraphQLString), + description: 'The location where the encounter takes place.', + }, + _status: { + type: require('./element.input.js'), + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-location-status + status: { + type: CodeScalar, + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", + }, + period: { + type: require('./period.input.js'), + description: + 'Time period during which the patient was present at the location.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/encounterparticipant.input.js b/src/resources/3_0_1/inputs/encounterparticipant.input.js index 7fa3978c..890e5d92 100644 --- a/src/resources/3_0_1/inputs/encounterparticipant.input.js +++ b/src/resources/3_0_1/inputs/encounterparticipant.input.js @@ -1,31 +1,50 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Encounter.participant Input Schema + * @summary Encounterparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterParticipant_Input', - description: 'The list of people responsible for providing the service.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Role of participant in encounter.', - }, - period: { - type: require('./period.input'), - description: - "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", - }, - individual: { - type: require('./reference.input'), - description: - 'Persons involved in the encounter other than the patient.', - }, - }), + name: 'Encounterparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in encounter.', + }, + period: { + type: require('./period.input.js'), + description: + "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", + }, + individual: { + type: GraphQLString, + description: 'Persons involved in the encounter other than the patient.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/encounterstatushistory.input.js b/src/resources/3_0_1/inputs/encounterstatushistory.input.js index 13dbcc1e..17dc8c31 100644 --- a/src/resources/3_0_1/inputs/encounterstatushistory.input.js +++ b/src/resources/3_0_1/inputs/encounterstatushistory.input.js @@ -1,33 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Encounter.statusHistory Input Schema + * @summary EncounterstatusHistory Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EncounterStatusHistory_Input', - description: - 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', - }, - _status: { - type: require('./element.input'), - description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', - }, - period: { - type: new GraphQLNonNull(require('./period.input')), - description: 'The time that the episode was in the specified status.', - }, - }), + name: 'EncounterstatusHistory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The time that the episode was in the specified status.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/endpoint.input.js b/src/resources/3_0_1/inputs/endpoint.input.js index f8be7c6f..1cb2c674 100644 --- a/src/resources/3_0_1/inputs/endpoint.input.js +++ b/src/resources/3_0_1/inputs/endpoint.input.js @@ -1,22 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.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 EndpointResourceInputType = new GraphQLEnumType({ - name: 'EndpointResourceInputType', - values: { - Endpoint: { value: 'Endpoint' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -24,95 +15,151 @@ let EndpointResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Endpoint_Input', - description: 'Base StructureDefinition for Endpoint Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EndpointResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier for the organization that is used to identify the endpoint across multiple disparate systems.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/endpoint-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'active | suspended | error | off | test.', - }, - _status: { - type: require('./element.input'), - description: 'active | suspended | error | off | test.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/endpoint-connection-type - connectionType: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).', - }, - name: { - type: GraphQLString, - description: - 'A friendly name that this endpoint can be referred to with.', - }, - _name: { - type: require('./element.input'), - description: - 'A friendly name that this endpoint can be referred to with.', - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'The organization that manages this endpoint (even if technically another organisation is hosting this in the cloud, it is the organisation associated with the data).', - }, - contact: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', - }, - period: { - type: require('./period.input'), - description: - 'The interval during which the endpoint is expected to be operational.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/endpoint-payload-type - payloadType: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.input')), - ), - description: - 'The payload type describes the acceptable content that can be communicated on the endpoint.', - }, - payloadMimeType: { - type: new GraphQLList(CodeScalar), - description: - 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', - }, - _payloadMimeType: { - type: require('./element.input'), - description: - 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', - }, - address: { - type: new GraphQLNonNull(UriScalar), - description: - 'The uri that describes the actual end-point to connect to.', - }, - _address: { - type: require('./element.input'), - description: - 'The uri that describes the actual end-point to connect to.', - }, - header: { - type: new GraphQLList(GraphQLString), - description: - 'Additional headers / information to send as part of the notification.', - }, - _header: { - type: require('./element.input'), - description: - 'Additional headers / information to send as part of the notification.', - }, - }), + description: 'Base StructureDefinition for Endpoint Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Endpoint_Enum_input', + values: { Endpoint: { value: 'Endpoint' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifier for the organization that is used to identify the endpoint across multiple disparate systems.', + }, + _status: { + type: require('./element.input.js'), + description: 'active | suspended | error | off | test.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/endpoint-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'active | suspended | error | off | test.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/endpoint-connection-type + connectionType: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).', + }, + _name: { + type: require('./element.input.js'), + description: + 'A friendly name that this endpoint can be referred to with.', + }, + name: { + type: GraphQLString, + description: + 'A friendly name that this endpoint can be referred to with.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization that manages this endpoint (even if technically another organisation is hosting this in the cloud, it is the organisation associated with the data).', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + period: { + type: require('./period.input.js'), + description: + 'The interval during which the endpoint is expected to be operational.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/endpoint-payload-type + payloadType: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.input.js')), + ), + description: + 'The payload type describes the acceptable content that can be communicated on the endpoint.', + }, + _payloadMimeType: { + type: require('./element.input.js'), + description: + 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', + }, + payloadMimeType: { + type: new GraphQLList(CodeScalar), + description: + 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', + }, + _address: { + type: require('./element.input.js'), + description: 'The uri that describes the actual end-point to connect to.', + }, + address: { + type: new GraphQLNonNull(UriScalar), + description: 'The uri that describes the actual end-point to connect to.', + }, + _header: { + type: require('./element.input.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: new GraphQLList(GraphQLString), + description: + 'Additional headers / information to send as part of the notification.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/enrollmentrequest.input.js b/src/resources/3_0_1/inputs/enrollmentrequest.input.js index 9499d1e2..438a453f 100644 --- a/src/resources/3_0_1/inputs/enrollmentrequest.input.js +++ b/src/resources/3_0_1/inputs/enrollmentrequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 EnrollmentRequestResourceInputType = new GraphQLEnumType({ - name: 'EnrollmentRequestResourceInputType', - values: { - EnrollmentRequest: { value: 'EnrollmentRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,56 +16,114 @@ let EnrollmentRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EnrollmentRequest_Input', - description: 'Base StructureDefinition for EnrollmentRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EnrollmentRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when this resource was created.', - }, - insurer: { - type: require('./reference.input'), - description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - subject: { - type: require('./reference.input'), - description: 'Patient Resource.', - }, - coverage: { - type: require('./reference.input'), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - }), + description: 'Base StructureDefinition for EnrollmentRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentRequest_Enum_input', + values: { EnrollmentRequest: { value: 'EnrollmentRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + insurer: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + subject: { + type: GraphQLString, + description: 'Patient Resource.', + }, + coverage: { + type: GraphQLString, + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/enrollmentresponse.input.js b/src/resources/3_0_1/inputs/enrollmentresponse.input.js index 4b8ca71b..63e4707c 100644 --- a/src/resources/3_0_1/inputs/enrollmentresponse.input.js +++ b/src/resources/3_0_1/inputs/enrollmentresponse.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 EnrollmentResponseResourceInputType = new GraphQLEnumType({ - name: 'EnrollmentResponseResourceInputType', - values: { - EnrollmentResponse: { value: 'EnrollmentResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,66 +16,124 @@ let EnrollmentResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EnrollmentResponse_Input', - description: 'Base StructureDefinition for EnrollmentResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EnrollmentResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.input'), - description: 'Processing status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - }), + description: 'Base StructureDefinition for EnrollmentResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentResponse_Enum_input', + values: { EnrollmentResponse: { value: 'EnrollmentResponse' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: 'Processing status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/episodeofcare.input.js b/src/resources/3_0_1/inputs/episodeofcare.input.js index f0b1ad30..6243a3d5 100644 --- a/src/resources/3_0_1/inputs/episodeofcare.input.js +++ b/src/resources/3_0_1/inputs/episodeofcare.input.js @@ -1,21 +1,13 @@ -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 EpisodeOfCareResourceInputType = new GraphQLEnumType({ - name: 'EpisodeOfCareResourceInputType', - values: { - EpisodeOfCare: { value: 'EpisodeOfCare' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,77 +15,135 @@ let EpisodeOfCareResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'EpisodeOfCare_Input', - description: 'Base StructureDefinition for EpisodeOfCare Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(EpisodeOfCareResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - _status: { - type: require('./element.input'), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - statusHistory: { - type: new GraphQLList(require('./episodeofcarestatushistory.input')), - description: - 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/episodeofcare-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.', - }, - diagnosis: { - type: new GraphQLList(require('./episodeofcarediagnosis.input')), - description: 'The list of diagnosis relevant to this episode of care.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient who is the focus of this episode of care.', - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'The organization that has assumed the specific responsibilities for the specified duration.', - }, - period: { - type: require('./period.input'), - description: - 'The interval during which the managing organization assumes the defined responsibility.', - }, - referralRequest: { - type: new GraphQLList(require('./reference.input')), - description: - 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', - }, - careManager: { - type: require('./reference.input'), - description: - 'The practitioner that is the care manager/care co-ordinator for this patient.', - }, - team: { - type: new GraphQLList(require('./reference.input')), - description: - 'The list of practitioners that may be facilitating this episode of care for specific purposes.', - }, - account: { - type: new GraphQLList(require('./reference.input')), - description: - 'The set of accounts that may be used for billing for this EpisodeOfCare.', - }, - }), + description: 'Base StructureDefinition for EpisodeOfCare Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EpisodeOfCare_Enum_input', + values: { EpisodeOfCare: { value: 'EpisodeOfCare' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + statusHistory: { + type: new GraphQLList(require('./episodeofcarestatushistory.input.js')), + description: + 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episodeofcare-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.', + }, + diagnosis: { + type: new GraphQLList(require('./episodeofcarediagnosis.input.js')), + description: 'The list of diagnosis relevant to this episode of care.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who is the focus of this episode of care.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization that has assumed the specific responsibilities for the specified duration.', + }, + period: { + type: require('./period.input.js'), + description: + 'The interval during which the managing organization assumes the defined responsibility.', + }, + referralRequest: { + type: new GraphQLList(GraphQLString), + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + }, + careManager: { + type: GraphQLString, + description: + 'The practitioner that is the care manager/care co-ordinator for this patient.', + }, + team: { + type: new GraphQLList(GraphQLString), + description: + 'The list of practitioners that may be facilitating this episode of care for specific purposes.', + }, + account: { + type: new GraphQLList(GraphQLString), + description: + 'The set of accounts that may be used for billing for this EpisodeOfCare.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/episodeofcarediagnosis.input.js b/src/resources/3_0_1/inputs/episodeofcarediagnosis.input.js index 61cd482b..7b2ac04e 100644 --- a/src/resources/3_0_1/inputs/episodeofcarediagnosis.input.js +++ b/src/resources/3_0_1/inputs/episodeofcarediagnosis.input.js @@ -1,36 +1,57 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary EpisodeOfCare.diagnosis Input Schema + * @summary EpisodeOfCarediagnosis Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EpisodeOfCareDiagnosis_Input', - description: 'The list of diagnosis relevant to this episode of care.', - fields: () => - extendSchema(require('./backboneelement.input'), { - condition: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnosis-role - role: { - type: require('./codeableconcept.input'), - description: - 'Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).', - }, - rank: { - type: PositiveIntScalar, - description: 'Ranking of the diagnosis (for each role type).', - }, - _rank: { - type: require('./element.input'), - description: 'Ranking of the diagnosis (for each role type).', - }, - }), + name: 'EpisodeOfCarediagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + condition: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnosis-role + role: { + type: require('./codeableconcept.input.js'), + description: + 'Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).', + }, + _rank: { + type: require('./element.input.js'), + description: 'Ranking of the diagnosis (for each role type).', + }, + rank: { + type: PositiveIntScalar, + description: 'Ranking of the diagnosis (for each role type).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/episodeofcarestatushistory.input.js b/src/resources/3_0_1/inputs/episodeofcarestatushistory.input.js index 92728e6f..ee48f0c1 100644 --- a/src/resources/3_0_1/inputs/episodeofcarestatushistory.input.js +++ b/src/resources/3_0_1/inputs/episodeofcarestatushistory.input.js @@ -1,34 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary EpisodeOfCare.statusHistory Input Schema + * @summary EpisodeOfCarestatusHistory Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'EpisodeOfCareStatusHistory_Input', - description: - 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - _status: { - type: require('./element.input'), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - period: { - type: new GraphQLNonNull(require('./period.input')), - description: - 'The period during this EpisodeOfCare that the specific status applied.', - }, - }), + name: 'EpisodeOfCarestatusHistory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + 'The period during this EpisodeOfCare that the specific status applied.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/expansionprofile.input.js b/src/resources/3_0_1/inputs/expansionprofile.input.js index fe528605..79d35f25 100644 --- a/src/resources/3_0_1/inputs/expansionprofile.input.js +++ b/src/resources/3_0_1/inputs/expansionprofile.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ExpansionProfileResourceInputType = new GraphQLEnumType({ - name: 'ExpansionProfileResourceInputType', - values: { - ExpansionProfile: { value: 'ExpansionProfile' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,210 +17,268 @@ let ExpansionProfileResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ExpansionProfile_Input', - description: 'Base StructureDefinition for ExpansionProfile Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ExpansionProfileResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. The URL SHOULD include the major version of the expansion profile. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. The URL SHOULD include the major version of the expansion profile. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: require('./identifier.input'), - description: - 'A formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the expansion profile author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the expansion profile author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the expansion profile. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the expansion profile. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this expansion profile. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this expansion profile. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this expansion profile is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this expansion profile is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the expansion profile was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the expansion profile changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the expansion profile was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the expansion profile changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the expansion profile.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the expansion profile.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the expansion profile from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the expansion profile from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate expansion profile instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the expansion profile is intended to be used.', - }, - fixedVersion: { - type: new GraphQLList(require('./expansionprofilefixedversion.input')), - description: - 'Fix use of a particular code system to a particular version.', - }, - excludedSystem: { - type: require('./expansionprofileexcludedsystem.input'), - description: - 'Code system, or a particular version of a code system to be excluded from value set expansions.', - }, - includeDesignations: { - type: GraphQLBoolean, - description: - 'Controls whether concept designations are to be included or excluded in value set expansions.', - }, - _includeDesignations: { - type: require('./element.input'), - description: - 'Controls whether concept designations are to be included or excluded in value set expansions.', - }, - designation: { - type: require('./expansionprofiledesignation.input'), - description: - 'A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.', - }, - includeDefinition: { - type: GraphQLBoolean, - description: - 'Controls whether the value set definition is included or excluded in value set expansions.', - }, - _includeDefinition: { - type: require('./element.input'), - description: - 'Controls whether the value set definition is included or excluded in value set expansions.', - }, - activeOnly: { - type: GraphQLBoolean, - description: - 'Controls whether inactive concepts are included or excluded in value set expansions.', - }, - _activeOnly: { - type: require('./element.input'), - description: - 'Controls whether inactive concepts are included or excluded in value set expansions.', - }, - excludeNested: { - type: GraphQLBoolean, - description: - 'Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains).', - }, - _excludeNested: { - type: require('./element.input'), - description: - 'Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains).', - }, - excludeNotForUI: { - type: GraphQLBoolean, - description: - 'Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.', - }, - _excludeNotForUI: { - type: require('./element.input'), - description: - 'Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.', - }, - excludePostCoordinated: { - type: GraphQLBoolean, - description: - 'Controls whether or not the value set expansion includes post coordinated codes.', - }, - _excludePostCoordinated: { - type: require('./element.input'), - description: - 'Controls whether or not the value set expansion includes post coordinated codes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - displayLanguage: { - type: CodeScalar, - description: - 'Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.', - }, - _displayLanguage: { - type: require('./element.input'), - description: - 'Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.', - }, - limitedExpansion: { - type: GraphQLBoolean, - description: - 'If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete, using the extension [http://hl7.org/fhir/StructureDefinition/valueset-toocostly](extension-valueset-toocostly.html).', - }, - _limitedExpansion: { - type: require('./element.input'), - description: - 'If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete, using the extension [http://hl7.org/fhir/StructureDefinition/valueset-toocostly](extension-valueset-toocostly.html).', - }, - }), + description: 'Base StructureDefinition for ExpansionProfile Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExpansionProfile_Enum_input', + values: { ExpansionProfile: { value: 'ExpansionProfile' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. The URL SHOULD include the major version of the expansion profile. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. The URL SHOULD include the major version of the expansion profile. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the expansion profile author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the expansion profile author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the expansion profile. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the expansion profile. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this expansion profile. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this expansion profile. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this expansion profile is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this expansion profile is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the expansion profile was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the expansion profile changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the expansion profile was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the expansion profile changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the expansion profile.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the expansion profile.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the expansion profile from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the expansion profile from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate expansion profile instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the expansion profile is intended to be used.', + }, + fixedVersion: { + type: new GraphQLList(require('./expansionprofilefixedversion.input.js')), + description: + 'Fix use of a particular code system to a particular version.', + }, + excludedSystem: { + type: require('./expansionprofileexcludedsystem.input.js'), + description: + 'Code system, or a particular version of a code system to be excluded from value set expansions.', + }, + _includeDesignations: { + type: require('./element.input.js'), + description: + 'Controls whether concept designations are to be included or excluded in value set expansions.', + }, + includeDesignations: { + type: GraphQLBoolean, + description: + 'Controls whether concept designations are to be included or excluded in value set expansions.', + }, + designation: { + type: require('./expansionprofiledesignation.input.js'), + description: + 'A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.', + }, + _includeDefinition: { + type: require('./element.input.js'), + description: + 'Controls whether the value set definition is included or excluded in value set expansions.', + }, + includeDefinition: { + type: GraphQLBoolean, + description: + 'Controls whether the value set definition is included or excluded in value set expansions.', + }, + _activeOnly: { + type: require('./element.input.js'), + description: + 'Controls whether inactive concepts are included or excluded in value set expansions.', + }, + activeOnly: { + type: GraphQLBoolean, + description: + 'Controls whether inactive concepts are included or excluded in value set expansions.', + }, + _excludeNested: { + type: require('./element.input.js'), + description: + 'Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains).', + }, + excludeNested: { + type: GraphQLBoolean, + description: + 'Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains).', + }, + _excludeNotForUI: { + type: require('./element.input.js'), + description: + 'Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.', + }, + excludeNotForUI: { + type: GraphQLBoolean, + description: + 'Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.', + }, + _excludePostCoordinated: { + type: require('./element.input.js'), + description: + 'Controls whether or not the value set expansion includes post coordinated codes.', + }, + excludePostCoordinated: { + type: GraphQLBoolean, + description: + 'Controls whether or not the value set expansion includes post coordinated codes.', + }, + _displayLanguage: { + type: require('./element.input.js'), + description: + 'Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + displayLanguage: { + type: CodeScalar, + description: + 'Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.', + }, + _limitedExpansion: { + type: require('./element.input.js'), + description: + 'If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete, using the extension [http://hl7.org/fhir/StructureDefinition/valueset-toocostly](extension-valueset-toocostly.html).', + }, + limitedExpansion: { + type: GraphQLBoolean, + description: + 'If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete, using the extension [http://hl7.org/fhir/StructureDefinition/valueset-toocostly](extension-valueset-toocostly.html).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/expansionprofiledesignation.input.js b/src/resources/3_0_1/inputs/expansionprofiledesignation.input.js index 94e107e0..f3956ca2 100644 --- a/src/resources/3_0_1/inputs/expansionprofiledesignation.input.js +++ b/src/resources/3_0_1/inputs/expansionprofiledesignation.input.js @@ -1,25 +1,44 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ExpansionProfile.designation Input Schema + * @summary ExpansionProfiledesignation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExpansionProfileDesignation_Input', - description: - 'A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.', - fields: () => - extendSchema(require('./backboneelement.input'), { - include: { - type: require('./expansionprofiledesignationinclude.input'), - description: 'Designations to be included.', - }, - exclude: { - type: require('./expansionprofiledesignationexclude.input'), - description: 'Designations to be excluded.', - }, - }), + name: 'ExpansionProfiledesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + include: { + type: require('./expansionprofiledesignationinclude.input.js'), + description: 'Designations to be included.', + }, + exclude: { + type: require('./expansionprofiledesignationexclude.input.js'), + description: 'Designations to be excluded.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/expansionprofiledesignationexclude.input.js b/src/resources/3_0_1/inputs/expansionprofiledesignationexclude.input.js index 23cc062e..6a9e1b4b 100644 --- a/src/resources/3_0_1/inputs/expansionprofiledesignationexclude.input.js +++ b/src/resources/3_0_1/inputs/expansionprofiledesignationexclude.input.js @@ -1,22 +1,42 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ExpansionProfile.designation.exclude Input Schema + * @summary ExpansionProfiledesignationexclude Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExpansionProfileDesignationExclude_Input', - description: 'Designations to be excluded.', - fields: () => - extendSchema(require('./backboneelement.input'), { - designation: { - type: new GraphQLList( - require('./expansionprofiledesignationexcludedesignation.input'), - ), - description: 'A data group for each designation to be excluded.', - }, - }), + name: 'ExpansionProfiledesignationexclude_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + designation: { + type: new GraphQLList( + require('./expansionprofiledesignationexcludedesignation.input.js'), + ), + description: 'A data group for each designation to be excluded.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/expansionprofiledesignationexcludedesignation.input.js b/src/resources/3_0_1/inputs/expansionprofiledesignationexcludedesignation.input.js index 305bbb90..29888671 100644 --- a/src/resources/3_0_1/inputs/expansionprofiledesignationexcludedesignation.input.js +++ b/src/resources/3_0_1/inputs/expansionprofiledesignationexcludedesignation.input.js @@ -1,32 +1,51 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ExpansionProfile.designation.exclude.designation Input Schema + * @summary ExpansionProfiledesignationexcludedesignation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExpansionProfileDesignationExcludeDesignation_Input', - description: 'A data group for each designation to be excluded.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.input'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.input'), - description: - 'Which kinds of designation to exclude from the expansion.', - }, - }), + name: 'ExpansionProfiledesignationexcludedesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _language: { + type: require('./element.input.js'), + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.input.js'), + description: 'Which kinds of designation to exclude from the expansion.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/expansionprofiledesignationinclude.input.js b/src/resources/3_0_1/inputs/expansionprofiledesignationinclude.input.js index 8f1b2379..2e1b8f5d 100644 --- a/src/resources/3_0_1/inputs/expansionprofiledesignationinclude.input.js +++ b/src/resources/3_0_1/inputs/expansionprofiledesignationinclude.input.js @@ -1,22 +1,42 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ExpansionProfile.designation.include Input Schema + * @summary ExpansionProfiledesignationinclude Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExpansionProfileDesignationInclude_Input', - description: 'Designations to be included.', - fields: () => - extendSchema(require('./backboneelement.input'), { - designation: { - type: new GraphQLList( - require('./expansionprofiledesignationincludedesignation.input'), - ), - description: 'A data group for each designation to be included.', - }, - }), + name: 'ExpansionProfiledesignationinclude_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + designation: { + type: new GraphQLList( + require('./expansionprofiledesignationincludedesignation.input.js'), + ), + description: 'A data group for each designation to be included.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/expansionprofiledesignationincludedesignation.input.js b/src/resources/3_0_1/inputs/expansionprofiledesignationincludedesignation.input.js index fdc8089e..378264ee 100644 --- a/src/resources/3_0_1/inputs/expansionprofiledesignationincludedesignation.input.js +++ b/src/resources/3_0_1/inputs/expansionprofiledesignationincludedesignation.input.js @@ -1,31 +1,51 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ExpansionProfile.designation.include.designation Input Schema + * @summary ExpansionProfiledesignationincludedesignation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExpansionProfileDesignationIncludeDesignation_Input', - description: 'A data group for each designation to be included.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.input'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.input'), - description: 'Which kinds of designation to include in the expansion.', - }, - }), + name: 'ExpansionProfiledesignationincludedesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _language: { + type: require('./element.input.js'), + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.input.js'), + description: 'Which kinds of designation to include in the expansion.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/expansionprofileexcludedsystem.input.js b/src/resources/3_0_1/inputs/expansionprofileexcludedsystem.input.js index ea6b1372..b0444462 100644 --- a/src/resources/3_0_1/inputs/expansionprofileexcludedsystem.input.js +++ b/src/resources/3_0_1/inputs/expansionprofileexcludedsystem.input.js @@ -1,40 +1,56 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ExpansionProfile.excludedSystem Input Schema + * @summary ExpansionProfileexcludedSystem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExpansionProfileExcludedSystem_Input', - description: - 'Code system, or a particular version of a code system to be excluded from value set expansions.', - fields: () => - extendSchema(require('./backboneelement.input'), { - system: { - type: new GraphQLNonNull(UriScalar), - description: 'An absolute URI which is the code system to be excluded.', - }, - _system: { - type: require('./element.input'), - description: 'An absolute URI which is the code system to be excluded.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system from which codes in the expansion should be excluded.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of the code system from which codes in the expansion should be excluded.', - }, - }), + name: 'ExpansionProfileexcludedSystem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _system: { + type: require('./element.input.js'), + description: 'An absolute URI which is the code system to be excluded.', + }, + system: { + type: new GraphQLNonNull(UriScalar), + description: 'An absolute URI which is the code system to be excluded.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the code system from which codes in the expansion should be excluded.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system from which codes in the expansion should be excluded.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/expansionprofilefixedversion.input.js b/src/resources/3_0_1/inputs/expansionprofilefixedversion.input.js index fa398c1e..5c1ed5ad 100644 --- a/src/resources/3_0_1/inputs/expansionprofilefixedversion.input.js +++ b/src/resources/3_0_1/inputs/expansionprofilefixedversion.input.js @@ -1,51 +1,68 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ExpansionProfile.fixedVersion Input Schema + * @summary ExpansionProfilefixedVersion Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExpansionProfileFixedVersion_Input', - description: 'Fix use of a particular code system to a particular version.', - fields: () => - extendSchema(require('./backboneelement.input'), { - system: { - type: new GraphQLNonNull(UriScalar), - description: 'The specific system for which to fix the version.', - }, - _system: { - type: require('./element.input'), - description: 'The specific system for which to fix the version.', - }, - version: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The version of the code system from which codes in the expansion should be included.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of the code system from which codes in the expansion should be included.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/system-version-processing-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How to manage the intersection between a fixed version in a value set, and this fixed version of the system in the expansion profile.', - }, - _mode: { - type: require('./element.input'), - description: - 'How to manage the intersection between a fixed version in a value set, and this fixed version of the system in the expansion profile.', - }, - }), + name: 'ExpansionProfilefixedVersion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _system: { + type: require('./element.input.js'), + description: 'The specific system for which to fix the version.', + }, + system: { + type: new GraphQLNonNull(UriScalar), + description: 'The specific system for which to fix the version.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the code system from which codes in the expansion should be included.', + }, + version: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The version of the code system from which codes in the expansion should be included.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'How to manage the intersection between a fixed version in a value set, and this fixed version of the system in the expansion profile.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/system-version-processing-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How to manage the intersection between a fixed version in a value set, and this fixed version of the system in the expansion profile.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefit.input.js b/src/resources/3_0_1/inputs/explanationofbenefit.input.js index 5f99764b..578a5758 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefit.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefit.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.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 ExplanationOfBenefitResourceInputType = new GraphQLEnumType({ - name: 'ExplanationOfBenefitResourceInputType', - values: { - ExplanationOfBenefit: { value: 'ExplanationOfBenefit' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -25,218 +17,277 @@ let ExplanationOfBenefitResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ExplanationOfBenefit_Input', - description: 'Base StructureDefinition for ExplanationOfBenefit Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ExplanationOfBenefitResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The EOB Business Identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/explanationofbenefit-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-type - type: { - type: require('./codeableconcept.input'), - description: - 'The category of claim, eg, oral, pharmacy, vision, insitutional, professional.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-subtype - subType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.', - }, - patient: { - type: require('./reference.input'), - description: 'Patient Resource.', - }, - billablePeriod: { - type: require('./period.input'), - description: - 'The billable period for which charges are being submitted.', - }, - created: { - type: DateTimeScalar, - description: 'The date when the EOB was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when the EOB was created.', - }, - enterer: { - type: require('./reference.input'), - description: 'The person who created the explanation of benefit.', - }, - insurer: { - type: require('./reference.input'), - description: - 'The insurer which is responsible for the explanation of benefit.', - }, - provider: { - type: require('./reference.input'), - description: 'The provider which is responsible for the claim.', - }, - organization: { - type: require('./reference.input'), - description: 'The provider which is responsible for the claim.', - }, - referral: { - type: require('./reference.input'), - description: - 'The referral resource which lists the date, practitioner, reason and other supporting information.', - }, - facility: { - type: require('./reference.input'), - description: 'Facility where the services were provided.', - }, - claim: { - type: require('./reference.input'), - description: - 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', - }, - claimResponse: { - type: require('./reference.input'), - description: - 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.input'), - description: - 'Processing outcome errror, partial or complete processing.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - related: { - type: new GraphQLList(require('./explanationofbenefitrelated.input')), - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - }, - prescription: { - type: require('./reference.input'), - description: - 'Prescription to support the dispensing of Pharmacy or Vision products.', - }, - originalPrescription: { - type: require('./reference.input'), - description: - "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new precription for an alternate medication which has the same theraputic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", - }, - payee: { - type: require('./explanationofbenefitpayee.input'), - description: 'The party to be reimbursed for the services.', - }, - information: { - type: new GraphQLList( - require('./explanationofbenefitinformation.input'), - ), - description: - 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', - }, - careTeam: { - type: new GraphQLList(require('./explanationofbenefitcareteam.input')), - description: - 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', - }, - diagnosis: { - type: new GraphQLList(require('./explanationofbenefitdiagnosis.input')), - description: - 'Ordered list of patient diagnosis for which care is sought.', - }, - procedure: { - type: new GraphQLList(require('./explanationofbenefitprocedure.input')), - description: - 'Ordered list of patient procedures performed to support the adjudication.', - }, - precedence: { - type: PositiveIntScalar, - description: 'Precedence (primary, secondary, etc.).', - }, - _precedence: { - type: require('./element.input'), - description: 'Precedence (primary, secondary, etc.).', - }, - insurance: { - type: require('./explanationofbenefitinsurance.input'), - description: - 'Financial instrument by which payment information for health care.', - }, - accident: { - type: require('./explanationofbenefitaccident.input'), - description: - 'An accident which resulted in the need for healthcare services.', - }, - employmentImpacted: { - type: require('./period.input'), - description: - 'The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).', - }, - hospitalization: { - type: require('./period.input'), - description: - 'The start and optional end dates of when the patient was confined to a treatment center.', - }, - item: { - type: new GraphQLList(require('./explanationofbenefititem.input')), - description: 'First tier of goods and services.', - }, - addItem: { - type: new GraphQLList(require('./explanationofbenefitadditem.input')), - description: - 'The first tier service adjudications for payor added services.', - }, - totalCost: { - type: require('./money.input'), - description: 'The total cost of the services reported.', - }, - unallocDeductable: { - type: require('./money.input'), - description: - 'The amount of deductable applied which was not allocated to any particular service line.', - }, - totalBenefit: { - type: require('./money.input'), - description: - 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable).', - }, - payment: { - type: require('./explanationofbenefitpayment.input'), - description: - 'Payment details for the claim if the claim has been paid.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.input'), - description: 'The form to be used for printing the content.', - }, - processNote: { - type: new GraphQLList( - require('./explanationofbenefitprocessnote.input'), - ), - description: 'Note text.', - }, - benefitBalance: { - type: new GraphQLList( - require('./explanationofbenefitbenefitbalance.input'), - ), - description: 'Balance by Benefit Category.', - }, - }), + description: 'Base StructureDefinition for ExplanationOfBenefit Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExplanationOfBenefit_Enum_input', + values: { ExplanationOfBenefit: { value: 'ExplanationOfBenefit' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The EOB Business Identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/explanationofbenefit-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'The category of claim, eg, oral, pharmacy, vision, insitutional, professional.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-subtype + subType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.', + }, + patient: { + type: GraphQLString, + description: 'Patient Resource.', + }, + billablePeriod: { + type: require('./period.input.js'), + description: 'The billable period for which charges are being submitted.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when the EOB was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when the EOB was created.', + }, + enterer: { + type: GraphQLString, + description: 'The person who created the explanation of benefit.', + }, + insurer: { + type: GraphQLString, + description: + 'The insurer which is responsible for the explanation of benefit.', + }, + provider: { + type: GraphQLString, + description: 'The provider which is responsible for the claim.', + }, + organization: { + type: GraphQLString, + description: 'The provider which is responsible for the claim.', + }, + referral: { + type: GraphQLString, + description: + 'The referral resource which lists the date, practitioner, reason and other supporting information.', + }, + facility: { + type: GraphQLString, + description: 'Facility where the services were provided.', + }, + claim: { + type: GraphQLString, + description: + 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', + }, + claimResponse: { + type: GraphQLString, + description: + 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: 'Processing outcome errror, partial or complete processing.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + related: { + type: new GraphQLList(require('./explanationofbenefitrelated.input.js')), + description: + 'Other claims which are related to this claim such as prior claim versions or for related services.', + }, + prescription: { + type: GraphQLString, + description: + 'Prescription to support the dispensing of Pharmacy or Vision products.', + }, + originalPrescription: { + type: GraphQLString, + description: + "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new precription for an alternate medication which has the same theraputic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", + }, + payee: { + type: require('./explanationofbenefitpayee.input.js'), + description: 'The party to be reimbursed for the services.', + }, + information: { + type: new GraphQLList( + require('./explanationofbenefitinformation.input.js'), + ), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', + }, + careTeam: { + type: new GraphQLList(require('./explanationofbenefitcareteam.input.js')), + description: + 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', + }, + diagnosis: { + type: new GraphQLList( + require('./explanationofbenefitdiagnosis.input.js'), + ), + description: + 'Ordered list of patient diagnosis for which care is sought.', + }, + procedure: { + type: new GraphQLList( + require('./explanationofbenefitprocedure.input.js'), + ), + description: + 'Ordered list of patient procedures performed to support the adjudication.', + }, + _precedence: { + type: require('./element.input.js'), + description: 'Precedence (primary, secondary, etc.).', + }, + precedence: { + type: PositiveIntScalar, + description: 'Precedence (primary, secondary, etc.).', + }, + insurance: { + type: require('./explanationofbenefitinsurance.input.js'), + description: + 'Financial instrument by which payment information for health care.', + }, + accident: { + type: require('./explanationofbenefitaccident.input.js'), + description: + 'An accident which resulted in the need for healthcare services.', + }, + employmentImpacted: { + type: require('./period.input.js'), + description: + 'The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).', + }, + hospitalization: { + type: require('./period.input.js'), + description: + 'The start and optional end dates of when the patient was confined to a treatment center.', + }, + item: { + type: new GraphQLList(require('./explanationofbenefititem.input.js')), + description: 'First tier of goods and services.', + }, + addItem: { + type: new GraphQLList(require('./explanationofbenefitadditem.input.js')), + description: + 'The first tier service adjudications for payor added services.', + }, + totalCost: { + type: require('./money.input.js'), + description: 'The total cost of the services reported.', + }, + unallocDeductable: { + type: require('./money.input.js'), + description: + 'The amount of deductable applied which was not allocated to any particular service line.', + }, + totalBenefit: { + type: require('./money.input.js'), + description: + 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable).', + }, + payment: { + type: require('./explanationofbenefitpayment.input.js'), + description: 'Payment details for the claim if the claim has been paid.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.input.js'), + description: 'The form to be used for printing the content.', + }, + processNote: { + type: new GraphQLList( + require('./explanationofbenefitprocessnote.input.js'), + ), + description: 'Note text.', + }, + benefitBalance: { + type: new GraphQLList( + require('./explanationofbenefitbenefitbalance.input.js'), + ), + description: 'Balance by Benefit Category.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitaccident.input.js b/src/resources/3_0_1/inputs/explanationofbenefitaccident.input.js index 924c7785..b098dbde 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitaccident.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitaccident.input.js @@ -1,39 +1,58 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.accident Input Schema + * @summary ExplanationOfBenefitaccident Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitAccident_Input', - description: - 'An accident which resulted in the need for healthcare services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - date: { - type: DateScalar, - description: 'Date of an accident which these services are addressing.', - }, - _date: { - type: require('./element.input'), - description: 'Date of an accident which these services are addressing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode - type: { - type: require('./codeableconcept.input'), - description: 'Type of accident: work, auto, etc.', - }, - locationAddress: { - type: require('./address.input'), - description: 'Where the accident occurred.', - }, - locationReference: { - type: require('./reference.input'), - description: 'Where the accident occurred.', - }, - }), + name: 'ExplanationOfBenefitaccident_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date of an accident which these services are addressing.', + }, + date: { + type: DateScalar, + description: 'Date of an accident which these services are addressing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode + type: { + type: require('./codeableconcept.input.js'), + description: 'Type of accident: work, auto, etc.', + }, + locationAddress: { + type: require('./address.input.js'), + description: 'Where the accident occurred.', + }, + locationReference: { + type: GraphQLString, + description: 'Where the accident occurred.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitadditem.input.js b/src/resources/3_0_1/inputs/explanationofbenefitadditem.input.js index 0cdc8669..178693ca 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitadditem.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitadditem.input.js @@ -1,70 +1,90 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.addItem Input Schema + * @summary ExplanationOfBenefitaddItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitAddItem_Input', - description: 'The first tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'List of input service items which this service line is intended to replace.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: - 'List of input service items which this service line is intended to replace.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - fee: { - type: require('./money.input'), - description: 'The fee charged for the professional service or product.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - detail: { - type: new GraphQLList( - require('./explanationofbenefitadditemdetail.input'), - ), - description: - 'The second tier service adjudications for payor added services.', - }, - }), + name: 'ExplanationOfBenefitaddItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: + 'List of input service items which this service line is intended to replace.', + }, + sequenceLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'List of input service items which this service line is intended to replace.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + fee: { + type: require('./money.input.js'), + description: 'The fee charged for the professional service or product.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + detail: { + type: new GraphQLList( + require('./explanationofbenefitadditemdetail.input.js'), + ), + description: + 'The second tier service adjudications for payor added services.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitadditemdetail.input.js b/src/resources/3_0_1/inputs/explanationofbenefitadditemdetail.input.js index 5ae13f33..aa7fbc4b 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitadditemdetail.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitadditemdetail.input.js @@ -1,54 +1,73 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.addItem.detail Input Schema + * @summary ExplanationOfBenefitaddItemdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitAddItemDetail_Input', - description: - 'The second tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - fee: { - type: require('./money.input'), - description: 'The fee charged for the professional service or product.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - }), + name: 'ExplanationOfBenefitaddItemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + fee: { + type: require('./money.input.js'), + description: 'The fee charged for the professional service or product.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitbenefitbalance.input.js b/src/resources/3_0_1/inputs/explanationofbenefitbenefitbalance.input.js index 0f69a8ed..690db915 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitbenefitbalance.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitbenefitbalance.input.js @@ -1,85 +1,101 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ExplanationOfBenefit.benefitBalance Input Schema + * @summary ExplanationOfBenefitbenefitBalance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitBenefitBalance_Input', - description: 'Balance by Benefit Category.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-category - category: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - subCategory: { - type: require('./codeableconcept.input'), - description: - 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', - }, - excluded: { - type: GraphQLBoolean, - description: - 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', - }, - _excluded: { - type: require('./element.input'), - description: - 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', - }, - name: { - type: GraphQLString, - description: - 'A short name or tag for the benefit, for example MED01, or DENT2.', - }, - _name: { - type: require('./element.input'), - description: - 'A short name or tag for the benefit, for example MED01, or DENT2.', - }, - description: { - type: GraphQLString, - description: - "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", - }, - _description: { - type: require('./element.input'), - description: - "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-network - network: { - type: require('./codeableconcept.input'), - description: 'Network designation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-unit - unit: { - type: require('./codeableconcept.input'), - description: 'Unit designation: individual or family.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-term - term: { - type: require('./codeableconcept.input'), - description: - "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", - }, - financial: { - type: new GraphQLList( - require('./explanationofbenefitbenefitbalancefinancial.input'), - ), - description: 'Benefits Used to date.', - }, - }), + name: 'ExplanationOfBenefitbenefitBalance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-category + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + subCategory: { + type: require('./codeableconcept.input.js'), + description: + 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', + }, + _excluded: { + type: require('./element.input.js'), + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', + }, + excluded: { + type: GraphQLBoolean, + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A short name or tag for the benefit, for example MED01, or DENT2.', + }, + name: { + type: GraphQLString, + description: + 'A short name or tag for the benefit, for example MED01, or DENT2.', + }, + _description: { + type: require('./element.input.js'), + description: + "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", + }, + description: { + type: GraphQLString, + description: + "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-network + network: { + type: require('./codeableconcept.input.js'), + description: 'Network designation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-unit + unit: { + type: require('./codeableconcept.input.js'), + description: 'Unit designation: individual or family.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-term + term: { + type: require('./codeableconcept.input.js'), + description: + "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", + }, + financial: { + type: new GraphQLList( + require('./explanationofbenefitbenefitbalancefinancial.input.js'), + ), + description: 'Benefits Used to date.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitbenefitbalancefinancial.input.js b/src/resources/3_0_1/inputs/explanationofbenefitbenefitbalancefinancial.input.js index 2536a11d..bba706cd 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitbenefitbalancefinancial.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitbenefitbalancefinancial.input.js @@ -1,58 +1,75 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.benefitBalance.financial Input Schema + * @summary ExplanationOfBenefitbenefitBalancefinancial Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitBenefitBalanceFinancial_Input', - description: 'Benefits Used to date.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Deductable, visits, benefit amount.', - }, - allowedUnsignedInt: { - type: UnsignedIntScalar, - description: 'Benefits allowed.', - }, - _allowedUnsignedInt: { - type: require('./element.input'), - description: 'Benefits allowed.', - }, - allowedString: { - type: GraphQLString, - description: 'Benefits allowed.', - }, - _allowedString: { - type: require('./element.input'), - description: 'Benefits allowed.', - }, - allowedMoney: { - type: require('./money.input'), - description: 'Benefits allowed.', - }, - usedUnsignedInt: { - type: UnsignedIntScalar, - description: 'Benefits used.', - }, - _usedUnsignedInt: { - type: require('./element.input'), - description: 'Benefits used.', - }, - usedMoney: { - type: require('./money.input'), - description: 'Benefits used.', - }, - }), + name: 'ExplanationOfBenefitbenefitBalancefinancial_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Deductable, visits, benefit amount.', + }, + _allowedUnsignedInt: { + type: require('./element.input.js'), + description: 'Benefits allowed.', + }, + allowedUnsignedInt: { + type: UnsignedIntScalar, + description: 'Benefits allowed.', + }, + _allowedString: { + type: require('./element.input.js'), + description: 'Benefits allowed.', + }, + allowedString: { + type: GraphQLString, + description: 'Benefits allowed.', + }, + allowedMoney: { + type: require('./money.input.js'), + description: 'Benefits allowed.', + }, + _usedUnsignedInt: { + type: require('./element.input.js'), + description: 'Benefits used.', + }, + usedUnsignedInt: { + type: UnsignedIntScalar, + description: 'Benefits used.', + }, + usedMoney: { + type: require('./money.input.js'), + description: 'Benefits used.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitcareteam.input.js b/src/resources/3_0_1/inputs/explanationofbenefitcareteam.input.js index 7dee9ab0..e61df363 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitcareteam.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitcareteam.input.js @@ -1,58 +1,74 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.careTeam Input Schema + * @summary ExplanationOfBenefitcareTeam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitCareTeam_Input', - description: - 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of careteam which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Sequence of careteam which serves to order and provide a link.', - }, - provider: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The members of the team who provided the overall service.', - }, - responsible: { - type: GraphQLBoolean, - description: - 'The practitioner who is billing and responsible for the claimed services rendered to the patient.', - }, - _responsible: { - type: require('./element.input'), - description: - 'The practitioner who is billing and responsible for the claimed services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-careteamrole - role: { - type: require('./codeableconcept.input'), - description: - 'The lead, assisting or supervising practitioner and their discipline if a multidisiplinary team.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/provider-qualification - qualification: { - type: require('./codeableconcept.input'), - description: 'The qualification which is applicable for this service.', - }, - }), + name: 'ExplanationOfBenefitcareTeam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Sequence of careteam which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of careteam which serves to order and provide a link.', + }, + provider: { + type: new GraphQLNonNull(GraphQLString), + description: 'The members of the team who provided the overall service.', + }, + _responsible: { + type: require('./element.input.js'), + description: + 'The practitioner who is billing and responsible for the claimed services rendered to the patient.', + }, + responsible: { + type: GraphQLBoolean, + description: + 'The practitioner who is billing and responsible for the claimed services rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-careteamrole + role: { + type: require('./codeableconcept.input.js'), + description: + 'The lead, assisting or supervising practitioner and their discipline if a multidisiplinary team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provider-qualification + qualification: { + type: require('./codeableconcept.input.js'), + description: 'The qualification which is applicable for this service.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitdiagnosis.input.js b/src/resources/3_0_1/inputs/explanationofbenefitdiagnosis.input.js index 79a5117a..a19ee6e4 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitdiagnosis.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitdiagnosis.input.js @@ -1,51 +1,68 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.diagnosis Input Schema + * @summary ExplanationOfBenefitdiagnosis Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitDiagnosis_Input', - description: 'Ordered list of patient diagnosis for which care is sought.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'Sequence of diagnosis which serves to provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: 'Sequence of diagnosis which serves to provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosisCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosisReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosistype - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The type of the Diagnosis, for example: admitting, primary, secondary, discharge.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup - packageCode: { - type: require('./codeableconcept.input'), - description: - 'The package billing code, for example DRG, based on the assigned grouping code system.', - }, - }), + name: 'ExplanationOfBenefitdiagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'Sequence of diagnosis which serves to provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'Sequence of diagnosis which serves to provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosisCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosisReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosistype + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of the Diagnosis, for example: admitting, primary, secondary, discharge.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup + packageCode: { + type: require('./codeableconcept.input.js'), + description: + 'The package billing code, for example DRG, based on the assigned grouping code system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitinformation.input.js b/src/resources/3_0_1/inputs/explanationofbenefitinformation.input.js index c54bf383..8daaabc0 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitinformation.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitinformation.input.js @@ -1,91 +1,104 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.information Input Schema + * @summary ExplanationOfBenefitinformation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitInformation_Input', - description: - 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of the information element which serves to provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Sequence of the information element which serves to provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-informationcategory - category: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-exception - code: { - type: require('./codeableconcept.input'), - description: - 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.', - }, - timingDate: { - type: DateScalar, - description: - 'The date when or period to which this information refers.', - }, - _timingDate: { - type: require('./element.input'), - description: - 'The date when or period to which this information refers.', - }, - timingPeriod: { - type: require('./period.input'), - description: - 'The date when or period to which this information refers.', - }, - valueString: { - type: GraphQLString, - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - _valueString: { - type: require('./element.input'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueReference: { - type: require('./reference.input'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason - reason: { - type: require('./coding.input'), - description: - 'For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.', - }, - }), + name: 'ExplanationOfBenefitinformation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Sequence of the information element which serves to provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of the information element which serves to provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-informationcategory + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-exception + code: { + type: require('./codeableconcept.input.js'), + description: + 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.', + }, + _timingDate: { + type: require('./element.input.js'), + description: 'The date when or period to which this information refers.', + }, + timingDate: { + type: DateScalar, + description: 'The date when or period to which this information refers.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: 'The date when or period to which this information refers.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueString: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueReference: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason + reason: { + type: require('./coding.input.js'), + description: + 'For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitinsurance.input.js b/src/resources/3_0_1/inputs/explanationofbenefitinsurance.input.js index d6ff786a..1993e9f8 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitinsurance.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitinsurance.input.js @@ -1,36 +1,51 @@ const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ExplanationOfBenefit.insurance Input Schema + * @summary ExplanationOfBenefitinsurance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitInsurance_Input', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.input'), { - coverage: { - type: require('./reference.input'), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.input'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - }), + name: 'ExplanationOfBenefitinsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + coverage: { + type: GraphQLString, + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefititem.input.js b/src/resources/3_0_1/inputs/explanationofbenefititem.input.js index aa67a007..e99c0498 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefititem.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefititem.input.js @@ -1,190 +1,207 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.item Input Schema + * @summary ExplanationOfBenefititem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitItem_Input', - description: 'First tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - careTeamLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Careteam applicable for this service or product line.', - }, - _careTeamLinkId: { - type: require('./element.input'), - description: 'Careteam applicable for this service or product line.', - }, - diagnosisLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Diagnosis applicable for this service or product line.', - }, - _diagnosisLinkId: { - type: require('./element.input'), - description: 'Diagnosis applicable for this service or product line.', - }, - procedureLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Procedures applicable for this service or product line.', - }, - _procedureLinkId: { - type: require('./element.input'), - description: 'Procedures applicable for this service or product line.', - }, - informationLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'Exceptions, special conditions and supporting information pplicable for this service or product line.', - }, - _informationLinkId: { - type: require('./element.input'), - description: - 'Exceptions, special conditions and supporting information pplicable for this service or product line.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - servicedDate: { - type: DateScalar, - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - _servicedDate: { - type: require('./element.input'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - servicedPeriod: { - type: require('./period.input'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'Where the service was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationAddress: { - type: require('./address.input'), - description: 'Where the service was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationReference: { - type: require('./reference.input'), - description: 'Where the service was provided.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.input'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.input'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.input')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/tooth - bodySite: { - type: require('./codeableconcept.input'), - description: 'Physical service site on the patient (limb, tooth, etc).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/surface - subSite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A region or surface of the site, eg. limb region or tooth surface(s).', - }, - encounter: { - type: new GraphQLList(require('./reference.input')), - description: - 'A billed item may include goods or services provided in multiple encounters.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - adjudication: { - type: new GraphQLList( - require('./explanationofbenefititemadjudication.input'), - ), - description: 'The adjudications results.', - }, - detail: { - type: new GraphQLList( - require('./explanationofbenefititemdetail.input'), - ), - description: 'Second tier of goods and services.', - }, - }), + name: 'ExplanationOfBenefititem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _careTeamLinkId: { + type: require('./element.input.js'), + description: 'Careteam applicable for this service or product line.', + }, + careTeamLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Careteam applicable for this service or product line.', + }, + _diagnosisLinkId: { + type: require('./element.input.js'), + description: 'Diagnosis applicable for this service or product line.', + }, + diagnosisLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnosis applicable for this service or product line.', + }, + _procedureLinkId: { + type: require('./element.input.js'), + description: 'Procedures applicable for this service or product line.', + }, + procedureLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Procedures applicable for this service or product line.', + }, + _informationLinkId: { + type: require('./element.input.js'), + description: + 'Exceptions, special conditions and supporting information pplicable for this service or product line.', + }, + informationLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information pplicable for this service or product line.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Where the service was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationAddress: { + type: require('./address.input.js'), + description: 'Where the service was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationReference: { + type: GraphQLString, + description: 'Where the service was provided.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/tooth + bodySite: { + type: require('./codeableconcept.input.js'), + description: 'Physical service site on the patient (limb, tooth, etc).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/surface + subSite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A region or surface of the site, eg. limb region or tooth surface(s).', + }, + encounter: { + type: new GraphQLList(GraphQLString), + description: + 'A billed item may include goods or services provided in multiple encounters.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + adjudication: { + type: new GraphQLList( + require('./explanationofbenefititemadjudication.input.js'), + ), + description: 'The adjudications results.', + }, + detail: { + type: new GraphQLList( + require('./explanationofbenefititemdetail.input.js'), + ), + description: 'Second tier of goods and services.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefititemadjudication.input.js b/src/resources/3_0_1/inputs/explanationofbenefititemadjudication.input.js index f21310df..f672de3e 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefititemadjudication.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefititemadjudication.input.js @@ -1,45 +1,63 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ExplanationOfBenefit.item.adjudication Input Schema + * @summary ExplanationOfBenefititemadjudication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitItemAdjudication_Input', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - category: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-reason - reason: { - type: require('./codeableconcept.input'), - description: 'Adjudication reason such as limit reached.', - }, - amount: { - type: require('./money.input'), - description: 'Monitory amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.input'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ExplanationOfBenefititemadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-reason + reason: { + type: require('./codeableconcept.input.js'), + description: 'Adjudication reason such as limit reached.', + }, + amount: { + type: require('./money.input.js'), + description: 'Monitory amount associated with the code.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefititemdetail.input.js b/src/resources/3_0_1/inputs/explanationofbenefititemdetail.input.js index f69d70d6..141782fd 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefititemdetail.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefititemdetail.input.js @@ -1,108 +1,125 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.item.detail Input Schema + * @summary ExplanationOfBenefititemdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitItemDetail_Input', - description: 'Second tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The type of product or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.input'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.input'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.input')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - subDetail: { - type: new GraphQLList( - require('./explanationofbenefititemdetailsubdetail.input'), - ), - description: 'Third tier of goods and services.', - }, - }), + name: 'ExplanationOfBenefititemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The type of product or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + subDetail: { + type: new GraphQLList( + require('./explanationofbenefititemdetailsubdetail.input.js'), + ), + description: 'Third tier of goods and services.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefititemdetailsubdetail.input.js b/src/resources/3_0_1/inputs/explanationofbenefititemdetailsubdetail.input.js index 804bb549..c7419d76 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefititemdetailsubdetail.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefititemdetailsubdetail.input.js @@ -1,101 +1,118 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.item.detail.subDetail Input Schema + * @summary ExplanationOfBenefititemdetailsubDetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitItemDetailSubDetail_Input', - description: 'Third tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.input'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The type of product or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.input'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.input'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.input'), - description: - 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.input'), - description: 'The fee for an addittional service or product or charge.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.input'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.input'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.input')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.input'), - description: 'A list of note references to the notes provided below.', - }, - }), + name: 'ExplanationOfBenefititemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The type of product or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.input.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.input.js'), + description: + 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: 'The fee for an addittional service or product or charge.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitpayee.input.js b/src/resources/3_0_1/inputs/explanationofbenefitpayee.input.js index 0495be6a..c5a64eb4 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitpayee.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitpayee.input.js @@ -1,31 +1,51 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ExplanationOfBenefit.payee Input Schema + * @summary ExplanationOfBenefitpayee Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitPayee_Input', - description: 'The party to be reimbursed for the services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - type: { - type: require('./codeableconcept.input'), - description: - 'Type of Party to be reimbursed: Subscriber, provider, other.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-type-link - resourceType: { - type: require('./codeableconcept.input'), - description: 'organization | patient | practitioner | relatedperson.', - }, - party: { - type: require('./reference.input'), - description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - }), + name: 'ExplanationOfBenefitpayee_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Party to be reimbursed: Subscriber, provider, other.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-type-link + resourceType: { + type: require('./codeableconcept.input.js'), + description: 'organization | patient | practitioner | relatedperson.', + }, + party: { + type: GraphQLString, + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitpayment.input.js b/src/resources/3_0_1/inputs/explanationofbenefitpayment.input.js index 781d6ec3..7d84a27e 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitpayment.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitpayment.input.js @@ -1,49 +1,69 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.payment Input Schema + * @summary ExplanationOfBenefitpayment Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitPayment_Input', - description: 'Payment details for the claim if the claim has been paid.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-paymenttype - type: { - type: require('./codeableconcept.input'), - description: - 'Whether this represents partial or complete payment of the claim.', - }, - adjustment: { - type: require('./money.input'), - description: - 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-adjustment-reason - adjustmentReason: { - type: require('./codeableconcept.input'), - description: 'Reason for the payment adjustment.', - }, - date: { - type: DateScalar, - description: 'Estimated payment date.', - }, - _date: { - type: require('./element.input'), - description: 'Estimated payment date.', - }, - amount: { - type: require('./money.input'), - description: 'Payable less any payment adjustment.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Payment identifer.', - }, - }), + name: 'ExplanationOfBenefitpayment_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-paymenttype + type: { + type: require('./codeableconcept.input.js'), + description: + 'Whether this represents partial or complete payment of the claim.', + }, + adjustment: { + type: require('./money.input.js'), + description: + 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-adjustment-reason + adjustmentReason: { + type: require('./codeableconcept.input.js'), + description: 'Reason for the payment adjustment.', + }, + _date: { + type: require('./element.input.js'), + description: 'Estimated payment date.', + }, + date: { + type: DateScalar, + description: 'Estimated payment date.', + }, + amount: { + type: require('./money.input.js'), + description: 'Payable less any payment adjustment.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Payment identifer.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitprocedure.input.js b/src/resources/3_0_1/inputs/explanationofbenefitprocedure.input.js index 1095237c..036c53cc 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitprocedure.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitprocedure.input.js @@ -1,47 +1,67 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.procedure Input Schema + * @summary ExplanationOfBenefitprocedure Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitProcedure_Input', - description: - 'Ordered list of patient procedures performed to support the adjudication.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of procedures which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.input'), - description: - 'Sequence of procedures which serves to order and provide a link.', - }, - date: { - type: DateTimeScalar, - description: 'Date and optionally time the procedure was performed .', - }, - _date: { - type: require('./element.input'), - description: 'Date and optionally time the procedure was performed .', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures - procedureCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The procedure code.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures - procedureReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The procedure code.', - }, - }), + name: 'ExplanationOfBenefitprocedure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Sequence of procedures which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of procedures which serves to order and provide a link.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date and optionally time the procedure was performed .', + }, + date: { + type: DateTimeScalar, + description: 'Date and optionally time the procedure was performed .', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures + procedureCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The procedure code.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures + procedureReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The procedure code.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitprocessnote.input.js b/src/resources/3_0_1/inputs/explanationofbenefitprocessnote.input.js index 8186a489..7741c422 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitprocessnote.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitprocessnote.input.js @@ -1,46 +1,66 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.processNote Input Schema + * @summary ExplanationOfBenefitprocessNote Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitProcessNote_Input', - description: 'Note text.', - fields: () => - extendSchema(require('./backboneelement.input'), { - number: { - type: PositiveIntScalar, - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - _number: { - type: require('./element.input'), - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./codeableconcept.input'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.input'), - description: 'The note text.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: require('./codeableconcept.input'), - description: - "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", - }, - }), + name: 'ExplanationOfBenefitprocessNote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _number: { + type: require('./element.input.js'), + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + number: { + type: PositiveIntScalar, + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./codeableconcept.input.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.input.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: require('./codeableconcept.input.js'), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/explanationofbenefitrelated.input.js b/src/resources/3_0_1/inputs/explanationofbenefitrelated.input.js index 52782c18..67964b61 100644 --- a/src/resources/3_0_1/inputs/explanationofbenefitrelated.input.js +++ b/src/resources/3_0_1/inputs/explanationofbenefitrelated.input.js @@ -1,32 +1,51 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ExplanationOfBenefit.related Input Schema + * @summary ExplanationOfBenefitrelated Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ExplanationOfBenefitRelated_Input', - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - fields: () => - extendSchema(require('./backboneelement.input'), { - claim: { - type: require('./reference.input'), - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship - relationship: { - type: require('./codeableconcept.input'), - description: 'For example prior or umbrella.', - }, - reference: { - type: require('./identifier.input'), - description: - 'An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .', - }, - }), + name: 'ExplanationOfBenefitrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + claim: { + type: GraphQLString, + description: + 'Other claims which are related to this claim such as prior claim versions or for related services.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship + relationship: { + type: require('./codeableconcept.input.js'), + description: 'For example prior or umbrella.', + }, + reference: { + type: require('./identifier.input.js'), + description: + 'An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/extension.input.js b/src/resources/3_0_1/inputs/extension.input.js index 3e389f9c..1cf19e0b 100644 --- a/src/resources/3_0_1/inputs/extension.input.js +++ b/src/resources/3_0_1/inputs/extension.input.js @@ -1,25 +1,23 @@ -const UriScalar = require('../scalars/uri.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -27,288 +25,302 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Extension_Input', - description: 'Base StructureDefinition for Extension Type.', - fields: () => - extendSchema(require('./element.input'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'Source of the definition for the extension code - a logical name or a URL.', - }, - _url: { - type: require('./element.input'), - description: - 'Source of the definition for the extension code - a logical name or a URL.', - }, - valueBase64Binary: { - type: Base64BinaryScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueBase64Binary: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueBoolean: { - type: GraphQLBoolean, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueBoolean: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCode: { - type: CodeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueCode: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDate: { - type: DateScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDate: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDecimal: { - type: GraphQLFloat, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDecimal: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueId: { - type: IdScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueId: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueInstant: { - type: InstantScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueInstant: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueInteger: { - type: GraphQLInt, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueInteger: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMarkdown: { - type: GraphQLString, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueMarkdown: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueOid: { - type: OidScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueOid: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valuePositiveInt: { - type: PositiveIntScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valuePositiveInt: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueString: { - type: GraphQLString, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueString: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueTime: { - type: TimeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueTime: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueUnsignedInt: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueUri: { - type: UriScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueUri: { - type: require('./element.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAddress: { - type: require('./address.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAge: { - type: require('./age.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAnnotation: { - type: require('./annotation.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCoding: { - type: require('./coding.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueContactPoint: { - type: require('./contactpoint.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCount: { - type: require('./count.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDistance: { - type: require('./distance.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDuration: { - type: require('./duration.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueHumanName: { - type: require('./humanname.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueIdentifier: { - type: require('./identifier.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMoney: { - type: require('./money.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valuePeriod: { - type: require('./period.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueRange: { - type: require('./range.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueRatio: { - type: require('./ratio.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueReference: { - type: require('./reference.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueSampledData: { - type: require('./sampleddata.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueSignature: { - type: require('./signature.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueTiming: { - type: require('./timing.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMeta: { - type: require('./meta.input'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - }), + description: 'Base StructureDefinition for Extension Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueCode: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCode: { + type: CodeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDate: { + type: DateScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueId: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueId: { + type: IdScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueInstant: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueInstant: { + type: InstantScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueInteger: { + type: GraphQLInt, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMarkdown: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueOid: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueOid: { + type: OidScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueString: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueTime: { + type: TimeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueUri: { + type: UriScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAddress: { + type: require('./address.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAge: { + type: require('./age.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAnnotation: { + type: require('./annotation.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCoding: { + type: require('./coding.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCount: { + type: require('./count.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDistance: { + type: require('./distance.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDuration: { + type: require('./duration.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueHumanName: { + type: require('./humanname.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueIdentifier: { + type: require('./identifier.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMoney: { + type: require('./money.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueReference: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueSignature: { + type: require('./signature.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueTiming: { + type: require('./timing.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMeta: { + type: require('./meta.input.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/familymemberhistory.input.js b/src/resources/3_0_1/inputs/familymemberhistory.input.js index c8d46c20..511bf006 100644 --- a/src/resources/3_0_1/inputs/familymemberhistory.input.js +++ b/src/resources/3_0_1/inputs/familymemberhistory.input.js @@ -1,24 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let FamilyMemberHistoryResourceInputType = new GraphQLEnumType({ - name: 'FamilyMemberHistoryResourceInputType', - values: { - FamilyMemberHistory: { value: 'FamilyMemberHistory' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,200 +18,258 @@ let FamilyMemberHistoryResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'FamilyMemberHistory_Input', - description: 'Base StructureDefinition for FamilyMemberHistory Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(FamilyMemberHistoryResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: - 'A protocol or questionnaire that was adhered to in whole or in part by this event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/history-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code specifying the status of the record of the family history of a specific family member.', - }, - _status: { - type: require('./element.input'), - description: - 'A code specifying the status of the record of the family history of a specific family member.', - }, - notDone: { - type: GraphQLBoolean, - description: - "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", - }, - _notDone: { - type: require('./element.input'), - description: - "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/history-not-done-reason - notDoneReason: { - type: require('./codeableconcept.input'), - description: "Describes why the family member's history is absent.", - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The person who this history concerns.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and possibly time) when the family member history was taken.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and possibly time) when the family member history was taken.', - }, - name: { - type: GraphQLString, - description: - "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", - }, - _name: { - type: require('./element.input'), - description: - "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-FamilyMember - relationship: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The type of relationship this person has to the patient (father, mother, brother etc.).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', - }, - bornPeriod: { - type: require('./period.input'), - description: 'The actual or approximate date of birth of the relative.', - }, - bornDate: { - type: DateScalar, - description: 'The actual or approximate date of birth of the relative.', - }, - _bornDate: { - type: require('./element.input'), - description: 'The actual or approximate date of birth of the relative.', - }, - bornString: { - type: GraphQLString, - description: 'The actual or approximate date of birth of the relative.', - }, - _bornString: { - type: require('./element.input'), - description: 'The actual or approximate date of birth of the relative.', - }, - ageAge: { - type: require('./age.input'), - description: - 'The age of the relative at the time the family member history is recorded.', - }, - ageRange: { - type: require('./range.input'), - description: - 'The age of the relative at the time the family member history is recorded.', - }, - ageString: { - type: GraphQLString, - description: - 'The age of the relative at the time the family member history is recorded.', - }, - _ageString: { - type: require('./element.input'), - description: - 'The age of the relative at the time the family member history is recorded.', - }, - estimatedAge: { - type: GraphQLBoolean, - description: - 'If true, indicates that the age value specified is an estimated value.', - }, - _estimatedAge: { - type: require('./element.input'), - description: - 'If true, indicates that the age value specified is an estimated value.', - }, - deceasedBoolean: { - type: GraphQLBoolean, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedBoolean: { - type: require('./element.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedAge: { - type: require('./age.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedRange: { - type: require('./range.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedDate: { - type: DateScalar, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedDate: { - type: require('./element.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedString: { - type: GraphQLString, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedString: { - type: require('./element.input'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Describes why the family member history occurred in coded or textual form.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', - }, - condition: { - type: new GraphQLList(require('./familymemberhistorycondition.input')), - description: - 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', - }, - }), + description: 'Base StructureDefinition for FamilyMemberHistory Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'FamilyMemberHistory_Enum_input', + values: { FamilyMemberHistory: { value: 'FamilyMemberHistory' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'A protocol or questionnaire that was adhered to in whole or in part by this event.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying the status of the record of the family history of a specific family member.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/history-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the status of the record of the family history of a specific family member.', + }, + _notDone: { + type: require('./element.input.js'), + description: + "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", + }, + notDone: { + type: GraphQLBoolean, + description: + "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/history-not-done-reason + notDoneReason: { + type: require('./codeableconcept.input.js'), + description: "Describes why the family member's history is absent.", + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person who this history concerns.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and possibly time) when the family member history was taken.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and possibly time) when the family member history was taken.', + }, + _name: { + type: require('./element.input.js'), + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + name: { + type: GraphQLString, + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-FamilyMember + relationship: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The type of relationship this person has to the patient (father, mother, brother etc.).', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', + }, + bornPeriod: { + type: require('./period.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + _bornDate: { + type: require('./element.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornDate: { + type: DateScalar, + description: 'The actual or approximate date of birth of the relative.', + }, + _bornString: { + type: require('./element.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornString: { + type: GraphQLString, + description: 'The actual or approximate date of birth of the relative.', + }, + ageAge: { + type: require('./age.input.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + ageRange: { + type: require('./range.input.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + _ageString: { + type: require('./element.input.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + ageString: { + type: GraphQLString, + description: + 'The age of the relative at the time the family member history is recorded.', + }, + _estimatedAge: { + type: require('./element.input.js'), + description: + 'If true, indicates that the age value specified is an estimated value.', + }, + estimatedAge: { + type: GraphQLBoolean, + description: + 'If true, indicates that the age value specified is an estimated value.', + }, + _deceasedBoolean: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedAge: { + type: require('./age.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedRange: { + type: require('./range.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedDate: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedDate: { + type: DateScalar, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedString: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedString: { + type: GraphQLString, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Describes why the family member history occurred in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', + }, + condition: { + type: new GraphQLList(require('./familymemberhistorycondition.input.js')), + description: + 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/familymemberhistorycondition.input.js b/src/resources/3_0_1/inputs/familymemberhistorycondition.input.js index 6b8a45cc..978e4416 100644 --- a/src/resources/3_0_1/inputs/familymemberhistorycondition.input.js +++ b/src/resources/3_0_1/inputs/familymemberhistorycondition.input.js @@ -1,64 +1,79 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary FamilyMemberHistory.condition Input Schema + * @summary FamilyMemberHistorycondition Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'FamilyMemberHistoryCondition_Input', - description: - 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-outcome - outcome: { - type: require('./codeableconcept.input'), - description: - 'Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.', - }, - onsetAge: { - type: require('./age.input'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetRange: { - type: require('./range.input'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetPeriod: { - type: require('./period.input'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetString: { - type: GraphQLString, - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - _onsetString: { - type: require('./element.input'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'An area where general notes can be placed about this specific condition.', - }, - }), + name: 'FamilyMemberHistorycondition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.', + }, + onsetAge: { + type: require('./age.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetRange: { + type: require('./range.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetPeriod: { + type: require('./period.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + _onsetString: { + type: require('./element.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetString: { + type: GraphQLString, + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'An area where general notes can be placed about this specific condition.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/flag.input.js b/src/resources/3_0_1/inputs/flag.input.js index 8359644b..6ff57cad 100644 --- a/src/resources/3_0_1/inputs/flag.input.js +++ b/src/resources/3_0_1/inputs/flag.input.js @@ -1,21 +1,13 @@ -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 FlagResourceInputType = new GraphQLEnumType({ - name: 'FlagResourceInputType', - values: { - Flag: { value: 'Flag' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,57 +15,114 @@ let FlagResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Flag_Input', - description: 'Base StructureDefinition for Flag Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(FlagResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier assigned to the flag for external use (outside the FHIR environment).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Supports basic workflow.', - }, - _status: { - type: require('./element.input'), - description: 'Supports basic workflow.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-category - category: { - type: require('./codeableconcept.input'), - description: - 'Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The coded value or textual component of the flag to display to the user.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The patient, location, group , organization , or practitioner, etc. this is about record this flag is associated with.', - }, - period: { - type: require('./period.input'), - description: - 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', - }, - encounter: { - type: require('./reference.input'), - description: 'This alert is only relevant during the encounter.', - }, - author: { - type: require('./reference.input'), - description: - 'The person, organization or device that created the flag.', - }, - }), + description: 'Base StructureDefinition for Flag Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Flag_Enum_input', + values: { Flag: { value: 'Flag' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifier assigned to the flag for external use (outside the FHIR environment).', + }, + _status: { + type: require('./element.input.js'), + description: 'Supports basic workflow.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Supports basic workflow.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The coded value or textual component of the flag to display to the user.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient, location, group , organization , or practitioner, etc. this is about record this flag is associated with.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', + }, + encounter: { + type: GraphQLString, + description: 'This alert is only relevant during the encounter.', + }, + author: { + type: GraphQLString, + description: 'The person, organization or device that created the flag.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/goal.input.js b/src/resources/3_0_1/inputs/goal.input.js index b0839e7f..a178e25d 100644 --- a/src/resources/3_0_1/inputs/goal.input.js +++ b/src/resources/3_0_1/inputs/goal.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.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 GoalResourceInputType = new GraphQLEnumType({ - name: 'GoalResourceInputType', - values: { - Goal: { value: 'Goal' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,113 +16,171 @@ let GoalResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Goal_Input', - description: 'Base StructureDefinition for Goal Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(GoalResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the goal has been reached and is still considered relevant.', - }, - _status: { - type: require('./element.input'), - description: - 'Indicates whether the goal has been reached and is still considered relevant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Indicates a category the goal falls within.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-priority - priority: { - type: require('./codeableconcept.input'), - description: - 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - description: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", - }, - subject: { - type: require('./reference.input'), - description: - 'Identifies the patient, group or organization for whom the goal is being established.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - startDate: { - type: DateScalar, - description: - 'The date or event after which the goal should begin being pursued.', - }, - _startDate: { - type: require('./element.input'), - description: - 'The date or event after which the goal should begin being pursued.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - startCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The date or event after which the goal should begin being pursued.', - }, - target: { - type: require('./goaltarget.input'), - description: 'Indicates what should be done by when.', - }, - statusDate: { - type: DateScalar, - description: - 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', - }, - _statusDate: { - type: require('./element.input'), - description: - 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', - }, - statusReason: { - type: GraphQLString, - description: 'Captures the reason for the current status.', - }, - _statusReason: { - type: require('./element.input'), - description: 'Captures the reason for the current status.', - }, - expressedBy: { - type: require('./reference.input'), - description: - 'Indicates whose goal this is - patient goal, practitioner goal, etc.', - }, - addresses: { - type: new GraphQLList(require('./reference.input')), - description: - 'The identified conditions and other health record elements that are intended to be addressed by the goal.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: 'Any comments related to the goal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - outcomeCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Identifies the change (or lack of change) at the point when the status of the goal is assessed.', - }, - outcomeReference: { - type: new GraphQLList(require('./reference.input')), - description: "Details of what's changed (or not changed).", - }, - }), + description: 'Base StructureDefinition for Goal Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Goal_Enum_input', + values: { Goal: { value: 'Goal' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _status: { + type: require('./element.input.js'), + description: + 'Indicates whether the goal has been reached and is still considered relevant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the goal has been reached and is still considered relevant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Indicates a category the goal falls within.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-priority + priority: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + description: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", + }, + subject: { + type: GraphQLString, + description: + 'Identifies the patient, group or organization for whom the goal is being established.', + }, + _startDate: { + type: require('./element.input.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + startDate: { + type: DateScalar, + description: + 'The date or event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + startCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + target: { + type: require('./goaltarget.input.js'), + description: 'Indicates what should be done by when.', + }, + _statusDate: { + type: require('./element.input.js'), + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + statusDate: { + type: DateScalar, + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + _statusReason: { + type: require('./element.input.js'), + description: 'Captures the reason for the current status.', + }, + statusReason: { + type: GraphQLString, + description: 'Captures the reason for the current status.', + }, + expressedBy: { + type: GraphQLString, + description: + 'Indicates whose goal this is - patient goal, practitioner goal, etc.', + }, + addresses: { + type: new GraphQLList(GraphQLString), + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Any comments related to the goal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + outcomeCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies the change (or lack of change) at the point when the status of the goal is assessed.', + }, + outcomeReference: { + type: new GraphQLList(GraphQLString), + description: "Details of what's changed (or not changed).", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/goaltarget.input.js b/src/resources/3_0_1/inputs/goaltarget.input.js index 45ce16ae..515d7591 100644 --- a/src/resources/3_0_1/inputs/goaltarget.input.js +++ b/src/resources/3_0_1/inputs/goaltarget.input.js @@ -1,53 +1,73 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Goal.target Input Schema + * @summary Goaltarget Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GoalTarget_Input', - description: 'Indicates what should be done by when.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - measure: { - type: require('./codeableconcept.input'), - description: - 'The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.', - }, - detailQuantity: { - type: require('./quantity.input'), - description: - 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', - }, - detailRange: { - type: require('./range.input'), - description: - 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', - }, - detailCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', - }, - dueDate: { - type: DateScalar, - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - _dueDate: { - type: require('./element.input'), - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - dueDuration: { - type: require('./duration.input'), - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - }), + name: 'Goaltarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + measure: { + type: require('./codeableconcept.input.js'), + description: + 'The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.', + }, + detailQuantity: { + type: require('./quantity.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailRange: { + type: require('./range.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _dueDate: { + type: require('./element.input.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + dueDate: { + type: DateScalar, + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + dueDuration: { + type: require('./duration.input.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/graphdefinition.input.js b/src/resources/3_0_1/inputs/graphdefinition.input.js index 8232aa45..9f887c2e 100644 --- a/src/resources/3_0_1/inputs/graphdefinition.input.js +++ b/src/resources/3_0_1/inputs/graphdefinition.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GraphDefinitionResourceInputType = new GraphQLEnumType({ - name: 'GraphDefinitionResourceInputType', - values: { - GraphDefinition: { value: 'GraphDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,142 +17,200 @@ let GraphDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'GraphDefinition_Input', - description: 'Base StructureDefinition for GraphDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(GraphDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this graph definition is (or will be) published. The URL SHOULD include the major version of the graph definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this graph definition is (or will be) published. The URL SHOULD include the major version of the graph definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this graph definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this graph definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the graph definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the graph definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the graph definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the graph definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the graph definition from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the graph definition from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate graph definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the graph definition is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this graph definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this graph definition is needed and why it has been designed as it has.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - start: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of FHIR resource at which instances of this graph start.', - }, - _start: { - type: require('./element.input'), - description: - 'The type of FHIR resource at which instances of this graph start.', - }, - profile: { - type: UriScalar, - description: 'The profile that describes the use of the base resource.', - }, - _profile: { - type: require('./element.input'), - description: 'The profile that describes the use of the base resource.', - }, - link: { - type: new GraphQLList(require('./graphdefinitionlink.input')), - description: 'Links this graph makes rules about.', - }, - }), + description: 'Base StructureDefinition for GraphDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'GraphDefinition_Enum_input', + values: { GraphDefinition: { value: 'GraphDefinition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this graph definition is (or will be) published. The URL SHOULD include the major version of the graph definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this graph definition is (or will be) published. The URL SHOULD include the major version of the graph definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this graph definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this graph definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the graph definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the graph definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the graph definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the graph definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the graph definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the graph definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate graph definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the graph definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this graph definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this graph definition is needed and why it has been designed as it has.', + }, + _start: { + type: require('./element.input.js'), + description: + 'The type of FHIR resource at which instances of this graph start.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + start: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of FHIR resource at which instances of this graph start.', + }, + _profile: { + type: require('./element.input.js'), + description: 'The profile that describes the use of the base resource.', + }, + profile: { + type: UriScalar, + description: 'The profile that describes the use of the base resource.', + }, + link: { + type: new GraphQLList(require('./graphdefinitionlink.input.js')), + description: 'Links this graph makes rules about.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/graphdefinitionlink.input.js b/src/resources/3_0_1/inputs/graphdefinitionlink.input.js index 4f189c5c..e792f64d 100644 --- a/src/resources/3_0_1/inputs/graphdefinitionlink.input.js +++ b/src/resources/3_0_1/inputs/graphdefinitionlink.input.js @@ -1,70 +1,86 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, - GraphQLInt, GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary GraphDefinition.link Input Schema + * @summary GraphDefinitionlink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GraphDefinitionLink_Input', - description: 'Links this graph makes rules about.', - fields: () => - extendSchema(require('./backboneelement.input'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: 'Path in the resource that contains the link.', - }, - _path: { - type: require('./element.input'), - description: 'Path in the resource that contains the link.', - }, - sliceName: { - type: GraphQLString, - description: 'Which slice (if profiled).', - }, - _sliceName: { - type: require('./element.input'), - description: 'Which slice (if profiled).', - }, - min: { - type: GraphQLInt, - description: 'Minimum occurrences for this link.', - }, - _min: { - type: require('./element.input'), - description: 'Minimum occurrences for this link.', - }, - max: { - type: GraphQLString, - description: 'Maximum occurrences for this link.', - }, - _max: { - type: require('./element.input'), - description: 'Maximum occurrences for this link.', - }, - description: { - type: GraphQLString, - description: - 'Information about why this link is of interest in this graph definition.', - }, - _description: { - type: require('./element.input'), - description: - 'Information about why this link is of interest in this graph definition.', - }, - target: { - type: new GraphQLList( - new GraphQLNonNull(require('./graphdefinitionlinktarget.input')), - ), - description: 'Potential target for the link.', - }, - }), + name: 'GraphDefinitionlink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _path: { + type: require('./element.input.js'), + description: 'Path in the resource that contains the link.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: 'Path in the resource that contains the link.', + }, + _sliceName: { + type: require('./element.input.js'), + description: 'Which slice (if profiled).', + }, + sliceName: { + type: GraphQLString, + description: 'Which slice (if profiled).', + }, + _min: { + type: require('./element.input.js'), + description: 'Minimum occurrences for this link.', + }, + min: { + type: GraphQLInt, + description: 'Minimum occurrences for this link.', + }, + _max: { + type: require('./element.input.js'), + description: 'Maximum occurrences for this link.', + }, + max: { + type: GraphQLString, + description: 'Maximum occurrences for this link.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Information about why this link is of interest in this graph definition.', + }, + description: { + type: GraphQLString, + description: + 'Information about why this link is of interest in this graph definition.', + }, + target: { + type: new GraphQLList( + new GraphQLNonNull(require('./graphdefinitionlinktarget.input.js')), + ), + description: 'Potential target for the link.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/graphdefinitionlinktarget.input.js b/src/resources/3_0_1/inputs/graphdefinitionlinktarget.input.js index 657e5162..b163574b 100644 --- a/src/resources/3_0_1/inputs/graphdefinitionlinktarget.input.js +++ b/src/resources/3_0_1/inputs/graphdefinitionlinktarget.input.js @@ -1,45 +1,62 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary GraphDefinition.link.target Input Schema + * @summary GraphDefinitionlinktarget Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GraphDefinitionLinkTarget_Input', - description: 'Potential target for the link.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'Type of resource this link refers to.', - }, - _type: { - type: require('./element.input'), - description: 'Type of resource this link refers to.', - }, - profile: { - type: UriScalar, - description: 'Profile for the target resource.', - }, - _profile: { - type: require('./element.input'), - description: 'Profile for the target resource.', - }, - compartment: { - type: new GraphQLList( - require('./graphdefinitionlinktargetcompartment.input'), - ), - description: 'Compartment Consistency Rules.', - }, - }), + name: 'GraphDefinitionlinktarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'Type of resource this link refers to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'Type of resource this link refers to.', + }, + _profile: { + type: require('./element.input.js'), + description: 'Profile for the target resource.', + }, + profile: { + type: UriScalar, + description: 'Profile for the target resource.', + }, + compartment: { + type: new GraphQLList( + require('./graphdefinitionlinktargetcompartment.input.js'), + ), + description: 'Compartment Consistency Rules.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/graphdefinitionlinktargetcompartment.input.js b/src/resources/3_0_1/inputs/graphdefinitionlinktargetcompartment.input.js index f22cb0f3..a1a6e263 100644 --- a/src/resources/3_0_1/inputs/graphdefinitionlinktargetcompartment.input.js +++ b/src/resources/3_0_1/inputs/graphdefinitionlinktargetcompartment.input.js @@ -1,55 +1,72 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary GraphDefinition.link.target.compartment Input Schema + * @summary GraphDefinitionlinktargetcompartment Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GraphDefinitionLinkTargetCompartment_Input', - description: 'Compartment Consistency Rules.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/compartment-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'Identifies the compartment.', - }, - _code: { - type: require('./element.input'), - description: 'Identifies the compartment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/graph-compartment-rule - rule: { - type: new GraphQLNonNull(CodeScalar), - description: 'identical | matching | different | no-rule | custom.', - }, - _rule: { - type: require('./element.input'), - description: 'identical | matching | different | no-rule | custom.', - }, - expression: { - type: GraphQLString, - description: 'Custom rule, as a FHIRPath expression.', - }, - _expression: { - type: require('./element.input'), - description: 'Custom rule, as a FHIRPath expression.', - }, - description: { - type: GraphQLString, - description: 'Documentation for FHIRPath expression.', - }, - _description: { - type: require('./element.input'), - description: 'Documentation for FHIRPath expression.', - }, - }), + name: 'GraphDefinitionlinktargetcompartment_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: 'Identifies the compartment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/compartment-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the compartment.', + }, + _rule: { + type: require('./element.input.js'), + description: 'identical | matching | different | no-rule | custom.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/graph-compartment-rule + rule: { + type: new GraphQLNonNull(CodeScalar), + description: 'identical | matching | different | no-rule | custom.', + }, + _expression: { + type: require('./element.input.js'), + description: 'Custom rule, as a FHIRPath expression.', + }, + expression: { + type: GraphQLString, + description: 'Custom rule, as a FHIRPath expression.', + }, + _description: { + type: require('./element.input.js'), + description: 'Documentation for FHIRPath expression.', + }, + description: { + type: GraphQLString, + description: 'Documentation for FHIRPath expression.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/group.input.js b/src/resources/3_0_1/inputs/group.input.js index 2cc8294a..e0cede9a 100644 --- a/src/resources/3_0_1/inputs/group.input.js +++ b/src/resources/3_0_1/inputs/group.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GroupResourceInputType = new GraphQLEnumType({ - name: 'GroupResourceInputType', - values: { - Group: { value: 'Group' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -25,81 +17,139 @@ let GroupResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Group_Input', - description: 'Base StructureDefinition for Group Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(GroupResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'A unique business identifier for this group.', - }, - active: { - type: GraphQLBoolean, - description: - 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', - }, - _active: { - type: require('./element.input'), - description: - 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/group-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the broad classification of the kind of resources the group includes.', - }, - _type: { - type: require('./element.input'), - description: - 'Identifies the broad classification of the kind of resources the group includes.', - }, - actual: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', - }, - _actual: { - type: require('./element.input'), - description: - 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', - }, - code: { - type: require('./codeableconcept.input'), - description: - "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", - }, - name: { - type: GraphQLString, - description: - 'A label assigned to the group for human identification and communication.', - }, - _name: { - type: require('./element.input'), - description: - 'A label assigned to the group for human identification and communication.', - }, - quantity: { - type: UnsignedIntScalar, - description: - 'A count of the number of resource instances that are part of the group.', - }, - _quantity: { - type: require('./element.input'), - description: - 'A count of the number of resource instances that are part of the group.', - }, - characteristic: { - type: new GraphQLList(require('./groupcharacteristic.input')), - description: 'Identifies the traits shared by members of the group.', - }, - member: { - type: new GraphQLList(require('./groupmember.input')), - description: - 'Identifies the resource instances that are members of the group.', - }, - }), + description: 'Base StructureDefinition for Group Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Group_Enum_input', + values: { Group: { value: 'Group' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'A unique business identifier for this group.', + }, + _active: { + type: require('./element.input.js'), + description: + 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', + }, + active: { + type: GraphQLBoolean, + description: + 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/group-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + _actual: { + type: require('./element.input.js'), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + actual: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", + }, + _name: { + type: require('./element.input.js'), + description: + 'A label assigned to the group for human identification and communication.', + }, + name: { + type: GraphQLString, + description: + 'A label assigned to the group for human identification and communication.', + }, + _quantity: { + type: require('./element.input.js'), + description: + 'A count of the number of resource instances that are part of the group.', + }, + quantity: { + type: UnsignedIntScalar, + description: + 'A count of the number of resource instances that are part of the group.', + }, + characteristic: { + type: new GraphQLList(require('./groupcharacteristic.input.js')), + description: 'Identifies the traits shared by members of the group.', + }, + member: { + type: new GraphQLList(require('./groupmember.input.js')), + description: + 'Identifies the resource instances that are members of the group.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/groupcharacteristic.input.js b/src/resources/3_0_1/inputs/groupcharacteristic.input.js index 23ad3322..5e598985 100644 --- a/src/resources/3_0_1/inputs/groupcharacteristic.input.js +++ b/src/resources/3_0_1/inputs/groupcharacteristic.input.js @@ -1,64 +1,82 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Group.characteristic Input Schema + * @summary Groupcharacteristic Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GroupCharacteristic_Input', - description: 'Identifies the traits shared by members of the group.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'A code that identifies the kind of trait being asserted.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - _valueBoolean: { - type: require('./element.input'), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.input')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueRange: { - type: new GraphQLNonNull(require('./range.input')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - exclude: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates the characteristic is one that is NOT held by members of the group.', - }, - _exclude: { - type: require('./element.input'), - description: - 'If true, indicates the characteristic is one that is NOT held by members of the group.', - }, - period: { - type: require('./period.input'), - description: - 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', - }, - }), + name: 'Groupcharacteristic_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code that identifies the kind of trait being asserted.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _exclude: { + type: require('./element.input.js'), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + exclude: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/groupmember.input.js b/src/resources/3_0_1/inputs/groupmember.input.js index 3ff54164..6ca94ed0 100644 --- a/src/resources/3_0_1/inputs/groupmember.input.js +++ b/src/resources/3_0_1/inputs/groupmember.input.js @@ -1,40 +1,57 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Group.member Input Schema + * @summary Groupmember Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'GroupMember_Input', - description: - 'Identifies the resource instances that are members of the group.', - fields: () => - extendSchema(require('./backboneelement.input'), { - entity: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', - }, - period: { - type: require('./period.input'), - description: 'The period that the member was in the group, if known.', - }, - inactive: { - type: GraphQLBoolean, - description: - 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', - }, - _inactive: { - type: require('./element.input'), - description: - 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', - }, - }), + name: 'Groupmember_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + entity: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', + }, + period: { + type: require('./period.input.js'), + description: 'The period that the member was in the group, if known.', + }, + _inactive: { + type: require('./element.input.js'), + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + inactive: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/guidanceresponse.input.js b/src/resources/3_0_1/inputs/guidanceresponse.input.js index 4559bcb9..63409df0 100644 --- a/src/resources/3_0_1/inputs/guidanceresponse.input.js +++ b/src/resources/3_0_1/inputs/guidanceresponse.input.js @@ -1,23 +1,14 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 GuidanceResponseResourceInputType = new GraphQLEnumType({ - name: 'GuidanceResponseResourceInputType', - values: { - GuidanceResponse: { value: 'GuidanceResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,99 +16,157 @@ let GuidanceResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'GuidanceResponse_Input', - description: 'Base StructureDefinition for GuidanceResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(GuidanceResponseResourceInputType), - description: 'Type of this resource.', - }, - requestId: { - type: IdScalar, - description: - 'The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', - }, - _requestId: { - type: require('./element.input'), - description: - 'The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Allows a service to provide a unique, business identifier for the response.', - }, - module: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'A reference to the knowledge module that was invoked.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/guidance-response-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', - }, - subject: { - type: require('./reference.input'), - description: 'The patient for which the request was processed.', - }, - context: { - type: require('./reference.input'), - description: - 'Allows the context of the guidance response to be provided if available. In a service context, this would likely be unavailable.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'Indicates when the guidance response was processed.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: 'Indicates when the guidance response was processed.', - }, - performer: { - type: require('./reference.input'), - description: - 'Provides a reference to the device that performed the guidance.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', - }, - reasonReference: { - type: require('./reference.input'), - description: - 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Provides a mechanism to communicate additional information about the response.', - }, - evaluationMessage: { - type: new GraphQLList(require('./reference.input')), - description: - 'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.', - }, - outputParameters: { - type: require('./reference.input'), - description: - 'The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.', - }, - result: { - type: require('./reference.input'), - description: - 'The actions, if any, produced by the evaluation of the artifact.', - }, - dataRequirement: { - type: new GraphQLList(require('./datarequirement.input')), - description: - 'If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.', - }, - }), + description: 'Base StructureDefinition for GuidanceResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'GuidanceResponse_Enum_input', + values: { GuidanceResponse: { value: 'GuidanceResponse' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _requestId: { + type: require('./element.input.js'), + description: + 'The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', + }, + requestId: { + type: IdScalar, + description: + 'The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Allows a service to provide a unique, business identifier for the response.', + }, + module: { + type: new GraphQLNonNull(GraphQLString), + description: 'A reference to the knowledge module that was invoked.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guidance-response-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', + }, + subject: { + type: GraphQLString, + description: 'The patient for which the request was processed.', + }, + context: { + type: GraphQLString, + description: + 'Allows the context of the guidance response to be provided if available. In a service context, this would likely be unavailable.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'Indicates when the guidance response was processed.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'Indicates when the guidance response was processed.', + }, + performer: { + type: GraphQLString, + description: + 'Provides a reference to the device that performed the guidance.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + reasonReference: { + type: GraphQLString, + description: + 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Provides a mechanism to communicate additional information about the response.', + }, + evaluationMessage: { + type: new GraphQLList(GraphQLString), + description: + 'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.', + }, + outputParameters: { + type: GraphQLString, + description: + 'The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.', + }, + result: { + type: GraphQLString, + description: + 'The actions, if any, produced by the evaluation of the artifact.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: + 'If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/healthcareservice.input.js b/src/resources/3_0_1/inputs/healthcareservice.input.js index 456ffb90..f4b25f23 100644 --- a/src/resources/3_0_1/inputs/healthcareservice.input.js +++ b/src/resources/3_0_1/inputs/healthcareservice.input.js @@ -1,21 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let HealthcareServiceResourceInputType = new GraphQLEnumType({ - name: 'HealthcareServiceResourceInputType', - values: { - HealthcareService: { value: 'HealthcareService' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,172 +16,229 @@ let HealthcareServiceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'HealthcareService_Input', - description: 'Base StructureDefinition for HealthcareService Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(HealthcareServiceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'External identifiers for this item.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this healthcareservice record is in active use.', - }, - _active: { - type: require('./element.input'), - description: 'Whether this healthcareservice record is in active use.', - }, - providedBy: { - type: require('./reference.input'), - description: 'The organization that provides this healthcare service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-category - category: { - type: require('./codeableconcept.input'), - description: - 'Identifies the broad category of service being performed or delivered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The specific type of service that may be delivered or performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Collection of specialties handled by the service site. This is more of a medical term.', - }, - location: { - type: new GraphQLList(require('./reference.input')), - description: - 'The location(s) where this healthcare service may be provided.', - }, - name: { - type: GraphQLString, - description: - 'Further description of the service as it would be presented to a consumer while searching.', - }, - _name: { - type: require('./element.input'), - description: - 'Further description of the service as it would be presented to a consumer while searching.', - }, - comment: { - type: GraphQLString, - description: - 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', - }, - _comment: { - type: require('./element.input'), - description: - 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', - }, - extraDetails: { - type: GraphQLString, - description: - "Extra details about the service that can't be placed in the other fields.", - }, - _extraDetails: { - type: require('./element.input'), - description: - "Extra details about the service that can't be placed in the other fields.", - }, - photo: { - type: require('./attachment.input'), - description: - 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'List of contacts related to this specific healthcare service.', - }, - coverageArea: { - type: new GraphQLList(require('./reference.input')), - description: - 'The location(s) that this service is available to (not where the service is provided).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-provision-conditions - serviceProvisionCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The code(s) that detail the conditions under which the healthcare service is available/offered.', - }, - eligibility: { - type: require('./codeableconcept.input'), - description: - 'Does this service have specific eligibility requirements that need to be met in order to use the service?.', - }, - eligibilityNote: { - type: GraphQLString, - description: 'Describes the eligibility conditions for the service.', - }, - _eligibilityNote: { - type: require('./element.input'), - description: 'Describes the eligibility conditions for the service.', - }, - programName: { - type: new GraphQLList(GraphQLString), - description: - 'Program Names that can be used to categorize the service.', - }, - _programName: { - type: require('./element.input'), - description: - 'Program Names that can be used to categorize the service.', - }, - characteristic: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Collection of characteristics (attributes).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-referral-method - referralMethod: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', - }, - appointmentRequired: { - type: GraphQLBoolean, - description: - 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', - }, - _appointmentRequired: { - type: require('./element.input'), - description: - 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', - }, - availableTime: { - type: new GraphQLList( - require('./healthcareserviceavailabletime.input'), - ), - description: - 'A collection of times that the Service Site is available.', - }, - notAvailable: { - type: new GraphQLList(require('./healthcareservicenotavailable.input')), - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - }, - availabilityExceptions: { - type: GraphQLString, - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - _availabilityExceptions: { - type: require('./element.input'), - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - endpoint: { - type: new GraphQLList(require('./reference.input')), - description: - 'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.', - }, - }), + description: 'Base StructureDefinition for HealthcareService Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'HealthcareService_Enum_input', + values: { HealthcareService: { value: 'HealthcareService' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'External identifiers for this item.', + }, + _active: { + type: require('./element.input.js'), + description: 'Whether this healthcareservice record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this healthcareservice record is in active use.', + }, + providedBy: { + type: GraphQLString, + description: 'The organization that provides this healthcare service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the broad category of service being performed or delivered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specific type of service that may be delivered or performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Collection of specialties handled by the service site. This is more of a medical term.', + }, + location: { + type: new GraphQLList(GraphQLString), + description: + 'The location(s) where this healthcare service may be provided.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + name: { + type: GraphQLString, + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + comment: { + type: GraphQLString, + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + _extraDetails: { + type: require('./element.input.js'), + description: + "Extra details about the service that can't be placed in the other fields.", + }, + extraDetails: { + type: GraphQLString, + description: + "Extra details about the service that can't be placed in the other fields.", + }, + photo: { + type: require('./attachment.input.js'), + description: + 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'List of contacts related to this specific healthcare service.', + }, + coverageArea: { + type: new GraphQLList(GraphQLString), + description: + 'The location(s) that this service is available to (not where the service is provided).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-provision-conditions + serviceProvisionCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The code(s) that detail the conditions under which the healthcare service is available/offered.', + }, + eligibility: { + type: require('./codeableconcept.input.js'), + description: + 'Does this service have specific eligibility requirements that need to be met in order to use the service?', + }, + _eligibilityNote: { + type: require('./element.input.js'), + description: 'Describes the eligibility conditions for the service.', + }, + eligibilityNote: { + type: GraphQLString, + description: 'Describes the eligibility conditions for the service.', + }, + _programName: { + type: require('./element.input.js'), + description: 'Program Names that can be used to categorize the service.', + }, + programName: { + type: new GraphQLList(GraphQLString), + description: 'Program Names that can be used to categorize the service.', + }, + characteristic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Collection of characteristics (attributes).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-referral-method + referralMethod: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', + }, + _appointmentRequired: { + type: require('./element.input.js'), + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + appointmentRequired: { + type: GraphQLBoolean, + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + availableTime: { + type: new GraphQLList( + require('./healthcareserviceavailabletime.input.js'), + ), + description: 'A collection of times that the Service Site is available.', + }, + notAvailable: { + type: new GraphQLList( + require('./healthcareservicenotavailable.input.js'), + ), + description: + 'The HealthcareService is not available during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.input.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/healthcareserviceavailabletime.input.js b/src/resources/3_0_1/inputs/healthcareserviceavailabletime.input.js index 98cafd9f..6b86ee59 100644 --- a/src/resources/3_0_1/inputs/healthcareserviceavailabletime.input.js +++ b/src/resources/3_0_1/inputs/healthcareserviceavailabletime.input.js @@ -1,63 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLInputObjectType, + GraphQLString, GraphQLList, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary HealthcareService.availableTime Input Schema + * @summary HealthcareServiceavailableTime Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'HealthcareServiceAvailableTime_Input', - description: 'A collection of times that the Service Site is available.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/days-of-week - daysOfWeek: { - type: new GraphQLList(CodeScalar), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - _daysOfWeek: { - type: require('./element.input'), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - allDay: { - type: GraphQLBoolean, - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - _allDay: { - type: require('./element.input'), - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - availableStartTime: { - type: TimeScalar, - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableStartTime: { - type: require('./element.input'), - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - availableEndTime: { - type: TimeScalar, - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableEndTime: { - type: require('./element.input'), - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - }), + name: 'HealthcareServiceavailableTime_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _daysOfWeek: { + type: require('./element.input.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/days-of-week + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.input.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.input.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.input.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/healthcareservicenotavailable.input.js b/src/resources/3_0_1/inputs/healthcareservicenotavailable.input.js index 34588c08..8c4010aa 100644 --- a/src/resources/3_0_1/inputs/healthcareservicenotavailable.input.js +++ b/src/resources/3_0_1/inputs/healthcareservicenotavailable.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary HealthcareService.notAvailable Input Schema + * @summary HealthcareServicenotAvailable Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'HealthcareServiceNotAvailable_Input', - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - _description: { - type: require('./element.input'), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - during: { - type: require('./period.input'), - description: - 'Service is not available (seasonally or for a public holiday) from this date.', - }, - }), + name: 'HealthcareServicenotAvailable_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.input.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/humanname.input.js b/src/resources/3_0_1/inputs/humanname.input.js index cc068322..a3da0fd6 100644 --- a/src/resources/3_0_1/inputs/humanname.input.js +++ b/src/resources/3_0_1/inputs/humanname.input.js @@ -1,12 +1,9 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -14,68 +11,82 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'HumanName_Input', - description: 'Base StructureDefinition for HumanName Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/name-use - use: { - type: CodeScalar, - description: 'Identifies the purpose for this name.', - }, - _use: { - type: require('./element.input'), - description: 'Identifies the purpose for this name.', - }, - text: { - type: GraphQLString, - description: 'A full text representation of the name.', - }, - _text: { - type: require('./element.input'), - description: 'A full text representation of the name.', - }, - family: { - type: GraphQLString, - description: - 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', - }, - _family: { - type: require('./element.input'), - description: - 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', - }, - given: { - type: new GraphQLList(GraphQLString), - description: 'Given name.', - }, - _given: { - type: require('./element.input'), - description: 'Given name.', - }, - prefix: { - type: new GraphQLList(GraphQLString), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', - }, - _prefix: { - type: require('./element.input'), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', - }, - suffix: { - type: new GraphQLList(GraphQLString), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', - }, - _suffix: { - type: require('./element.input'), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', - }, - period: { - type: require('./period.input'), - description: - 'Indicates the period of time when this name was valid for the named person.', - }, - }), + description: 'Base StructureDefinition for HumanName Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _use: { + type: require('./element.input.js'), + description: 'Identifies the purpose for this name.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/name-use + use: { + type: CodeScalar, + description: 'Identifies the purpose for this name.', + }, + _text: { + type: require('./element.input.js'), + description: 'A full text representation of the name.', + }, + text: { + type: GraphQLString, + description: 'A full text representation of the name.', + }, + _family: { + type: require('./element.input.js'), + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + family: { + type: GraphQLString, + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + _given: { + type: require('./element.input.js'), + description: 'Given name.', + }, + given: { + type: new GraphQLList(GraphQLString), + description: 'Given name.', + }, + _prefix: { + type: require('./element.input.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + prefix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + _suffix: { + type: require('./element.input.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + suffix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates the period of time when this name was valid for the named person.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/identifier.input.js b/src/resources/3_0_1/inputs/identifier.input.js index 73c879a0..00c5d81c 100644 --- a/src/resources/3_0_1/inputs/identifier.input.js +++ b/src/resources/3_0_1/inputs/identifier.input.js @@ -1,9 +1,10 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -11,52 +12,65 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Identifier_Input', - description: 'Base StructureDefinition for Identifier Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-use - use: { - type: CodeScalar, - description: 'The purpose of this identifier.', - }, - _use: { - type: require('./element.input'), - description: 'The purpose of this identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-type - type: { - type: require('./codeableconcept.input'), - description: - 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', - }, - system: { - type: UriScalar, - description: - 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', - }, - _system: { - type: require('./element.input'), - description: - 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', - }, - value: { - type: GraphQLString, - description: - 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', - }, - _value: { - type: require('./element.input'), - description: - 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', - }, - period: { - type: require('./period.input'), - description: - 'Time period during which identifier is/was valid for use.', - }, - assigner: { - type: require('./reference.input'), - description: 'Organization that issued/manages the identifier.', - }, - }), + description: 'Base StructureDefinition for Identifier Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _use: { + type: require('./element.input.js'), + description: 'The purpose of this identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-use + use: { + type: CodeScalar, + description: 'The purpose of this identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', + }, + system: { + type: UriScalar, + description: + 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', + }, + value: { + type: GraphQLString, + description: + 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period during which identifier is/was valid for use.', + }, + assigner: { + type: GraphQLString, + description: 'Organization that issued/manages the identifier.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/imagingmanifest.input.js b/src/resources/3_0_1/inputs/imagingmanifest.input.js index 439b97f5..d24fe884 100644 --- a/src/resources/3_0_1/inputs/imagingmanifest.input.js +++ b/src/resources/3_0_1/inputs/imagingmanifest.input.js @@ -1,21 +1,14 @@ -const DateTimeScalar = require('../scalars/datetime.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 ImagingManifestResourceInputType = new GraphQLEnumType({ - name: 'ImagingManifestResourceInputType', - values: { - ImagingManifest: { value: 'ImagingManifest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,54 +16,112 @@ let ImagingManifestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ImagingManifest_Input', - description: 'Base StructureDefinition for ImagingManifest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImagingManifestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Unique identifier of the DICOM Key Object Selection (KOS) that this resource represents.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingManifest.', - }, - authoringTime: { - type: DateTimeScalar, - description: - 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', - }, - _authoringTime: { - type: require('./element.input'), - description: - 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', - }, - author: { - type: require('./reference.input'), - description: - 'Author of ImagingManifest. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.', - }, - description: { - type: GraphQLString, - description: - 'Free text narrative description of the ImagingManifest. The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions (e.g. Best in Set, Complete Study Content). Note that those values cover the wide range of uses of the DICOM Key Object Selection object, several of which are not supported by ImagingManifest. Specifically, there is no expected behavior associated with descriptions that suggest referenced images be removed or not used.', - }, - _description: { - type: require('./element.input'), - description: - 'Free text narrative description of the ImagingManifest. The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions (e.g. Best in Set, Complete Study Content). Note that those values cover the wide range of uses of the DICOM Key Object Selection object, several of which are not supported by ImagingManifest. Specifically, there is no expected behavior associated with descriptions that suggest referenced images be removed or not used.', - }, - study: { - type: new GraphQLList( - new GraphQLNonNull(require('./imagingmanifeststudy.input')), - ), - description: - 'Study identity and locating information of the DICOM SOP instances in the selection.', - }, - }), + description: 'Base StructureDefinition for ImagingManifest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingManifest_Enum_input', + values: { ImagingManifest: { value: 'ImagingManifest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'Unique identifier of the DICOM Key Object Selection (KOS) that this resource represents.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingManifest.', + }, + _authoringTime: { + type: require('./element.input.js'), + description: + 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', + }, + authoringTime: { + type: DateTimeScalar, + description: + 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', + }, + author: { + type: GraphQLString, + description: + 'Author of ImagingManifest. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Free text narrative description of the ImagingManifest. The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions (e.g. Best in Set, Complete Study Content). Note that those values cover the wide range of uses of the DICOM Key Object Selection object, several of which are not supported by ImagingManifest. Specifically, there is no expected behavior associated with descriptions that suggest referenced images be removed or not used.', + }, + description: { + type: GraphQLString, + description: + 'Free text narrative description of the ImagingManifest. The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions (e.g. Best in Set, Complete Study Content). Note that those values cover the wide range of uses of the DICOM Key Object Selection object, several of which are not supported by ImagingManifest. Specifically, there is no expected behavior associated with descriptions that suggest referenced images be removed or not used.', + }, + study: { + type: new GraphQLList( + new GraphQLNonNull(require('./imagingmanifeststudy.input.js')), + ), + description: + 'Study identity and locating information of the DICOM SOP instances in the selection.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/imagingmanifeststudy.input.js b/src/resources/3_0_1/inputs/imagingmanifeststudy.input.js index 097323b1..c2ef76aa 100644 --- a/src/resources/3_0_1/inputs/imagingmanifeststudy.input.js +++ b/src/resources/3_0_1/inputs/imagingmanifeststudy.input.js @@ -1,48 +1,62 @@ -const OidScalar = require('../scalars/oid.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const OidScalar = require('../scalars/oid.scalar.js'); /** * @name exports - * @summary ImagingManifest.study Input Schema + * @summary ImagingManifeststudy Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingManifestStudy_Input', - description: - 'Study identity and locating information of the DICOM SOP instances in the selection.', - fields: () => - extendSchema(require('./backboneelement.input'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: - 'Study instance UID of the SOP instances in the selection.', - }, - _uid: { - type: require('./element.input'), - description: - 'Study instance UID of the SOP instances in the selection.', - }, - imagingStudy: { - type: require('./reference.input'), - description: 'Reference to the Imaging Study in FHIR form.', - }, - endpoint: { - type: new GraphQLList(require('./reference.input')), - description: - 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', - }, - series: { - type: new GraphQLList( - new GraphQLNonNull(require('./imagingmanifeststudyseries.input')), - ), - description: - 'Series identity and locating information of the DICOM SOP instances in the selection.', - }, - }), + name: 'ImagingManifeststudy_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Study instance UID of the SOP instances in the selection.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Study instance UID of the SOP instances in the selection.', + }, + imagingStudy: { + type: GraphQLString, + description: 'Reference to the Imaging Study in FHIR form.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', + }, + series: { + type: new GraphQLList( + new GraphQLNonNull(require('./imagingmanifeststudyseries.input.js')), + ), + description: + 'Series identity and locating information of the DICOM SOP instances in the selection.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/imagingmanifeststudyseries.input.js b/src/resources/3_0_1/inputs/imagingmanifeststudyseries.input.js index dac090dc..d019a8a2 100644 --- a/src/resources/3_0_1/inputs/imagingmanifeststudyseries.input.js +++ b/src/resources/3_0_1/inputs/imagingmanifeststudyseries.input.js @@ -1,46 +1,60 @@ -const OidScalar = require('../scalars/oid.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const OidScalar = require('../scalars/oid.scalar.js'); /** * @name exports - * @summary ImagingManifest.study.series Input Schema + * @summary ImagingManifeststudyseries Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingManifestStudySeries_Input', - description: - 'Series identity and locating information of the DICOM SOP instances in the selection.', - fields: () => - extendSchema(require('./backboneelement.input'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: - 'Series instance UID of the SOP instances in the selection.', - }, - _uid: { - type: require('./element.input'), - description: - 'Series instance UID of the SOP instances in the selection.', - }, - endpoint: { - type: new GraphQLList(require('./reference.input')), - description: - 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', - }, - instance: { - type: new GraphQLList( - new GraphQLNonNull( - require('./imagingmanifeststudyseriesinstance.input'), - ), + name: 'ImagingManifeststudyseries_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Series instance UID of the SOP instances in the selection.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Series instance UID of the SOP instances in the selection.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', + }, + instance: { + type: new GraphQLList( + new GraphQLNonNull( + require('./imagingmanifeststudyseriesinstance.input.js'), ), - description: - 'Identity and locating information of the selected DICOM SOP instances.', - }, - }), + ), + description: + 'Identity and locating information of the selected DICOM SOP instances.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/imagingmanifeststudyseriesinstance.input.js b/src/resources/3_0_1/inputs/imagingmanifeststudyseriesinstance.input.js index 43c7fac7..6fc4a042 100644 --- a/src/resources/3_0_1/inputs/imagingmanifeststudyseriesinstance.input.js +++ b/src/resources/3_0_1/inputs/imagingmanifeststudyseriesinstance.input.js @@ -1,34 +1,54 @@ -const OidScalar = require('../scalars/oid.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const OidScalar = require('../scalars/oid.scalar.js'); /** * @name exports - * @summary ImagingManifest.study.series.instance Input Schema + * @summary ImagingManifeststudyseriesinstance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingManifestStudySeriesInstance_Input', - description: - 'Identity and locating information of the selected DICOM SOP instances.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sopClass: { - type: new GraphQLNonNull(OidScalar), - description: 'SOP class UID of the selected instance.', - }, - _sopClass: { - type: require('./element.input'), - description: 'SOP class UID of the selected instance.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'SOP Instance UID of the selected instance.', - }, - _uid: { - type: require('./element.input'), - description: 'SOP Instance UID of the selected instance.', - }, - }), + name: 'ImagingManifeststudyseriesinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sopClass: { + type: require('./element.input.js'), + description: 'SOP class UID of the selected instance.', + }, + sopClass: { + type: new GraphQLNonNull(OidScalar), + description: 'SOP class UID of the selected instance.', + }, + _uid: { + type: require('./element.input.js'), + description: 'SOP Instance UID of the selected instance.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'SOP Instance UID of the selected instance.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/imagingstudy.input.js b/src/resources/3_0_1/inputs/imagingstudy.input.js index 59d6b717..436adf03 100644 --- a/src/resources/3_0_1/inputs/imagingstudy.input.js +++ b/src/resources/3_0_1/inputs/imagingstudy.input.js @@ -1,24 +1,16 @@ -const OidScalar = require('../scalars/oid.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.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 ImagingStudyResourceInputType = new GraphQLEnumType({ - name: 'ImagingStudyResourceInputType', - values: { - ImagingStudy: { value: 'ImagingStudy' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -26,130 +18,188 @@ let ImagingStudyResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ImagingStudy_Input', - description: 'Base StructureDefinition for ImagingStudy Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImagingStudyResourceInputType), - description: 'Type of this resource.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for the study.', - }, - _uid: { - type: require('./element.input'), - description: 'Formal identifier for the study.', - }, - accession: { - type: require('./identifier.input'), - description: - 'Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Other identifiers for the study.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/instance-availability - availability: { - type: CodeScalar, - description: 'Availability of study (online, offline, or nearline).', - }, - _availability: { - type: require('./element.input'), - description: 'Availability of study (online, offline, or nearline).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 - modalityList: { - type: new GraphQLList(require('./coding.input')), - description: - 'A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient imaged in the study.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode at which the request is initiated.', - }, - started: { - type: DateTimeScalar, - description: 'Date and time the study started.', - }, - _started: { - type: require('./element.input'), - description: 'Date and time the study started.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A list of the diagnostic requests that resulted in this imaging study being performed.', - }, - referrer: { - type: require('./reference.input'), - description: 'The requesting/referring physician.', - }, - interpreter: { - type: new GraphQLList(require('./reference.input')), - description: - 'Who read the study and interpreted the images or other content.', - }, - endpoint: { - type: new GraphQLList(require('./reference.input')), - description: - 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', - }, - numberOfSeries: { - type: UnsignedIntScalar, - description: - 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', - }, - _numberOfSeries: { - type: require('./element.input'), - description: - 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', - }, - numberOfInstances: { - type: UnsignedIntScalar, - description: - 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', - }, - _numberOfInstances: { - type: require('./element.input'), - description: - 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', - }, - procedureReference: { - type: new GraphQLList(require('./reference.input')), - description: 'A reference to the performed Procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - procedureCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'The code for the performed procedure type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reason: { - type: require('./codeableconcept.input'), - description: - 'Description of clinical condition indicating why the ImagingStudy was requested.', - }, - description: { - type: GraphQLString, - description: - 'Institution-generated description or classification of the Study performed.', - }, - _description: { - type: require('./element.input'), - description: - 'Institution-generated description or classification of the Study performed.', - }, - series: { - type: new GraphQLList(require('./imagingstudyseries.input')), - description: - 'Each study has one or more series of images or other content.', - }, - }), + description: 'Base StructureDefinition for ImagingStudy Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingStudy_Enum_input', + values: { ImagingStudy: { value: 'ImagingStudy' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Formal identifier for the study.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for the study.', + }, + accession: { + type: require('./identifier.input.js'), + description: + 'Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Other identifiers for the study.', + }, + _availability: { + type: require('./element.input.js'), + description: 'Availability of study (online, offline, or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/instance-availability + availability: { + type: CodeScalar, + description: 'Availability of study (online, offline, or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 + modalityList: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient imaged in the study.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode at which the request is initiated.', + }, + _started: { + type: require('./element.input.js'), + description: 'Date and time the study started.', + }, + started: { + type: DateTimeScalar, + description: 'Date and time the study started.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A list of the diagnostic requests that resulted in this imaging study being performed.', + }, + referrer: { + type: GraphQLString, + description: 'The requesting/referring physician.', + }, + interpreter: { + type: new GraphQLList(GraphQLString), + description: + 'Who read the study and interpreted the images or other content.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', + }, + _numberOfSeries: { + type: require('./element.input.js'), + description: + 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', + }, + numberOfSeries: { + type: UnsignedIntScalar, + description: + 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', + }, + _numberOfInstances: { + type: require('./element.input.js'), + description: + 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + numberOfInstances: { + type: UnsignedIntScalar, + description: + 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + procedureReference: { + type: new GraphQLList(GraphQLString), + description: 'A reference to the performed Procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + procedureCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The code for the performed procedure type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Description of clinical condition indicating why the ImagingStudy was requested.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Institution-generated description or classification of the Study performed.', + }, + description: { + type: GraphQLString, + description: + 'Institution-generated description or classification of the Study performed.', + }, + series: { + type: new GraphQLList(require('./imagingstudyseries.input.js')), + description: + 'Each study has one or more series of images or other content.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/imagingstudyseries.input.js b/src/resources/3_0_1/inputs/imagingstudyseries.input.js index 53070509..f5e711a0 100644 --- a/src/resources/3_0_1/inputs/imagingstudyseries.input.js +++ b/src/resources/3_0_1/inputs/imagingstudyseries.input.js @@ -1,108 +1,124 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ImagingStudy.series Input Schema + * @summary ImagingStudyseries Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingStudySeries_Input', - description: 'Each study has one or more series of images or other content.', - fields: () => - extendSchema(require('./backboneelement.input'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for this series.', - }, - _uid: { - type: require('./element.input'), - description: 'Formal identifier for this series.', - }, - number: { - type: UnsignedIntScalar, - description: 'The numeric identifier of this series in the study.', - }, - _number: { - type: require('./element.input'), - description: 'The numeric identifier of this series in the study.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 - modality: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The modality of this series sequence.', - }, - description: { - type: GraphQLString, - description: 'A description of the series.', - }, - _description: { - type: require('./element.input'), - description: 'A description of the series.', - }, - numberOfInstances: { - type: UnsignedIntScalar, - description: - 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', - }, - _numberOfInstances: { - type: require('./element.input'), - description: - 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/instance-availability - availability: { - type: CodeScalar, - description: 'Availability of series (online, offline or nearline).', - }, - _availability: { - type: require('./element.input'), - description: 'Availability of series (online, offline or nearline).', - }, - endpoint: { - type: new GraphQLList(require('./reference.input')), - description: - 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./coding.input'), - description: - 'The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bodysite-laterality - laterality: { - type: require('./coding.input'), - description: - 'The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.', - }, - started: { - type: DateTimeScalar, - description: 'The date and time the series was started.', - }, - _started: { - type: require('./element.input'), - description: 'The date and time the series was started.', - }, - performer: { - type: new GraphQLList(require('./reference.input')), - description: - 'The physician or operator (often the radiology technician) who performed the series. The performer is recorded at the series level, since each series in a study may be performed by a different practitioner, at different times, and using different devices. A series may be performed by multiple practitioners.', - }, - instance: { - type: new GraphQLList(require('./imagingstudyseriesinstance.input')), - description: - 'A single SOP instance within the series, e.g. an image, or presentation state.', - }, - }), + name: 'ImagingStudyseries_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Formal identifier for this series.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for this series.', + }, + _number: { + type: require('./element.input.js'), + description: 'The numeric identifier of this series in the study.', + }, + number: { + type: UnsignedIntScalar, + description: 'The numeric identifier of this series in the study.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 + modality: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The modality of this series sequence.', + }, + _description: { + type: require('./element.input.js'), + description: 'A description of the series.', + }, + description: { + type: GraphQLString, + description: 'A description of the series.', + }, + _numberOfInstances: { + type: require('./element.input.js'), + description: + 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + numberOfInstances: { + type: UnsignedIntScalar, + description: + 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + _availability: { + type: require('./element.input.js'), + description: 'Availability of series (online, offline or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/instance-availability + availability: { + type: CodeScalar, + description: 'Availability of series (online, offline or nearline).', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./coding.input.js'), + description: + 'The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bodysite-laterality + laterality: { + type: require('./coding.input.js'), + description: + 'The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.', + }, + _started: { + type: require('./element.input.js'), + description: 'The date and time the series was started.', + }, + started: { + type: DateTimeScalar, + description: 'The date and time the series was started.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: + 'The physician or operator (often the radiology technician) who performed the series. The performer is recorded at the series level, since each series in a study may be performed by a different practitioner, at different times, and using different devices. A series may be performed by multiple practitioners.', + }, + instance: { + type: new GraphQLList(require('./imagingstudyseriesinstance.input.js')), + description: + 'A single SOP instance within the series, e.g. an image, or presentation state.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/imagingstudyseriesinstance.input.js b/src/resources/3_0_1/inputs/imagingstudyseriesinstance.input.js index 69e1ac67..c0801ba8 100644 --- a/src/resources/3_0_1/inputs/imagingstudyseriesinstance.input.js +++ b/src/resources/3_0_1/inputs/imagingstudyseriesinstance.input.js @@ -1,55 +1,71 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary ImagingStudy.series.instance Input Schema + * @summary ImagingStudyseriesinstance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImagingStudySeriesInstance_Input', - description: - 'A single SOP instance within the series, e.g. an image, or presentation state.', - fields: () => - extendSchema(require('./backboneelement.input'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for this image or other content.', - }, - _uid: { - type: require('./element.input'), - description: 'Formal identifier for this image or other content.', - }, - number: { - type: UnsignedIntScalar, - description: 'The number of instance in the series.', - }, - _number: { - type: require('./element.input'), - description: 'The number of instance in the series.', - }, - sopClass: { - type: new GraphQLNonNull(OidScalar), - description: 'DICOM instance type.', - }, - _sopClass: { - type: require('./element.input'), - description: 'DICOM instance type.', - }, - title: { - type: GraphQLString, - description: 'The description of the instance.', - }, - _title: { - type: require('./element.input'), - description: 'The description of the instance.', - }, - }), + name: 'ImagingStudyseriesinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _uid: { + type: require('./element.input.js'), + description: 'Formal identifier for this image or other content.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for this image or other content.', + }, + _number: { + type: require('./element.input.js'), + description: 'The number of instance in the series.', + }, + number: { + type: UnsignedIntScalar, + description: 'The number of instance in the series.', + }, + _sopClass: { + type: require('./element.input.js'), + description: 'DICOM instance type.', + }, + sopClass: { + type: new GraphQLNonNull(OidScalar), + description: 'DICOM instance type.', + }, + _title: { + type: require('./element.input.js'), + description: 'The description of the instance.', + }, + title: { + type: GraphQLString, + description: 'The description of the instance.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunization.input.js b/src/resources/3_0_1/inputs/immunization.input.js index 0b972278..3437f7f5 100644 --- a/src/resources/3_0_1/inputs/immunization.input.js +++ b/src/resources/3_0_1/inputs/immunization.input.js @@ -1,24 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImmunizationResourceInputType = new GraphQLEnumType({ - name: 'ImmunizationResourceInputType', - values: { - Immunization: { value: 'Immunization' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,138 +18,195 @@ let ImmunizationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Immunization_Input', - description: 'Base StructureDefinition for Immunization Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImmunizationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A unique identifier assigned to this immunization record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current status of the vaccination event.', - }, - _status: { - type: require('./element.input'), - description: 'Indicates the current status of the vaccination event.', - }, - notGiven: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'Indicates if the vaccination was or was not given.', - }, - _notGiven: { - type: require('./element.input'), - description: 'Indicates if the vaccination was or was not given.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code - vaccineCode: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Vaccine that was administered or was to be administered.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The patient who either received or did not receive the immunization.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', - }, - date: { - type: DateTimeScalar, - description: 'Date vaccine administered or was to be administered.', - }, - _date: { - type: require('./element.input'), - description: 'Date vaccine administered or was to be administered.', - }, - primarySource: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', - }, - _primarySource: { - type: require('./element.input'), - description: - 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-origin - reportOrigin: { - type: require('./codeableconcept.input'), - description: - 'The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.', - }, - location: { - type: require('./reference.input'), - description: - 'The service delivery location where the vaccine administration occurred.', - }, - manufacturer: { - type: require('./reference.input'), - description: 'Name of vaccine manufacturer.', - }, - lotNumber: { - type: GraphQLString, - description: 'Lot number of the vaccine product.', - }, - _lotNumber: { - type: require('./element.input'), - description: 'Lot number of the vaccine product.', - }, - expirationDate: { - type: DateScalar, - description: 'Date vaccine batch expires.', - }, - _expirationDate: { - type: require('./element.input'), - description: 'Date vaccine batch expires.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-site - site: { - type: require('./codeableconcept.input'), - description: 'Body site where vaccine was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-route - route: { - type: require('./codeableconcept.input'), - description: - 'The path by which the vaccine product is taken into the body.', - }, - doseQuantity: { - type: require('./quantity.input'), - description: 'The quantity of vaccine product that was administered.', - }, - practitioner: { - type: new GraphQLList(require('./immunizationpractitioner.input')), - description: 'Indicates who or what performed the event.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Extra information about the immunization that is not conveyed by the other attributes.', - }, - explanation: { - type: require('./immunizationexplanation.input'), - description: 'Reasons why a vaccine was or was not administered.', - }, - reaction: { - type: new GraphQLList(require('./immunizationreaction.input')), - description: - 'Categorical data indicating that an adverse event is associated in time to an immunization.', - }, - vaccinationProtocol: { - type: new GraphQLList( - require('./immunizationvaccinationprotocol.input'), - ), - description: - 'Contains information about the protocol(s) under which the vaccine was administered.', - }, - }), + description: 'Base StructureDefinition for Immunization Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Immunization_Enum_input', + values: { Immunization: { value: 'Immunization' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'A unique identifier assigned to this immunization record.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current status of the vaccination event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current status of the vaccination event.', + }, + _notGiven: { + type: require('./element.input.js'), + description: 'Indicates if the vaccination was or was not given.', + }, + notGiven: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Indicates if the vaccination was or was not given.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code + vaccineCode: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Vaccine that was administered or was to be administered.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient who either received or did not receive the immunization.', + }, + encounter: { + type: GraphQLString, + description: + 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date vaccine administered or was to be administered.', + }, + date: { + type: DateTimeScalar, + description: 'Date vaccine administered or was to be administered.', + }, + _primarySource: { + type: require('./element.input.js'), + description: + 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', + }, + primarySource: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-origin + reportOrigin: { + type: require('./codeableconcept.input.js'), + description: + 'The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.', + }, + location: { + type: GraphQLString, + description: + 'The service delivery location where the vaccine administration occurred.', + }, + manufacturer: { + type: GraphQLString, + description: 'Name of vaccine manufacturer.', + }, + _lotNumber: { + type: require('./element.input.js'), + description: 'Lot number of the vaccine product.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number of the vaccine product.', + }, + _expirationDate: { + type: require('./element.input.js'), + description: 'Date vaccine batch expires.', + }, + expirationDate: { + type: DateScalar, + description: 'Date vaccine batch expires.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-site + site: { + type: require('./codeableconcept.input.js'), + description: 'Body site where vaccine was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-route + route: { + type: require('./codeableconcept.input.js'), + description: + 'The path by which the vaccine product is taken into the body.', + }, + doseQuantity: { + type: require('./quantity.input.js'), + description: 'The quantity of vaccine product that was administered.', + }, + practitioner: { + type: new GraphQLList(require('./immunizationpractitioner.input.js')), + description: 'Indicates who or what performed the event.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the immunization that is not conveyed by the other attributes.', + }, + explanation: { + type: require('./immunizationexplanation.input.js'), + description: 'Reasons why a vaccine was or was not administered.', + }, + reaction: { + type: new GraphQLList(require('./immunizationreaction.input.js')), + description: + 'Categorical data indicating that an adverse event is associated in time to an immunization.', + }, + vaccinationProtocol: { + type: new GraphQLList( + require('./immunizationvaccinationprotocol.input.js'), + ), + description: + 'Contains information about the protocol(s) under which the vaccine was administered.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunizationexplanation.input.js b/src/resources/3_0_1/inputs/immunizationexplanation.input.js index 8e08d8b4..fb38e2ee 100644 --- a/src/resources/3_0_1/inputs/immunizationexplanation.input.js +++ b/src/resources/3_0_1/inputs/immunizationexplanation.input.js @@ -1,26 +1,46 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Immunization.explanation Input Schema + * @summary Immunizationexplanation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationExplanation_Input', - description: 'Reasons why a vaccine was or was not administered.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-reason - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reasons why a vaccine was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/no-immunization-reason - reasonNotGiven: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Reason why a vaccine was not administered.', - }, - }), + name: 'Immunizationexplanation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-reason + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reasons why a vaccine was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/no-immunization-reason + reasonNotGiven: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason why a vaccine was not administered.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunizationpractitioner.input.js b/src/resources/3_0_1/inputs/immunizationpractitioner.input.js index a23c3dfa..de05cbc9 100644 --- a/src/resources/3_0_1/inputs/immunizationpractitioner.input.js +++ b/src/resources/3_0_1/inputs/immunizationpractitioner.input.js @@ -1,26 +1,47 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Immunization.practitioner Input Schema + * @summary Immunizationpractitioner Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationPractitioner_Input', - description: 'Indicates who or what performed the event.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-role - role: { - type: require('./codeableconcept.input'), - description: - 'Describes the type of performance (e.g. ordering provider, administering provider, etc.).', - }, - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The device, practitioner, etc. who performed the action.', - }, - }), + name: 'Immunizationpractitioner_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-role + role: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the type of performance (e.g. ordering provider, administering provider, etc.).', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: 'The device, practitioner, etc. who performed the action.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunizationreaction.input.js b/src/resources/3_0_1/inputs/immunizationreaction.input.js index 63cde9ba..a4893fde 100644 --- a/src/resources/3_0_1/inputs/immunizationreaction.input.js +++ b/src/resources/3_0_1/inputs/immunizationreaction.input.js @@ -1,38 +1,58 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLBoolean } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Immunization.reaction Input Schema + * @summary Immunizationreaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationReaction_Input', - description: - 'Categorical data indicating that an adverse event is associated in time to an immunization.', - fields: () => - extendSchema(require('./backboneelement.input'), { - date: { - type: DateTimeScalar, - description: 'Date of reaction to the immunization.', - }, - _date: { - type: require('./element.input'), - description: 'Date of reaction to the immunization.', - }, - detail: { - type: require('./reference.input'), - description: 'Details of the reaction.', - }, - reported: { - type: GraphQLBoolean, - description: 'Self-reported indicator.', - }, - _reported: { - type: require('./element.input'), - description: 'Self-reported indicator.', - }, - }), + name: 'Immunizationreaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date of reaction to the immunization.', + }, + date: { + type: DateTimeScalar, + description: 'Date of reaction to the immunization.', + }, + detail: { + type: GraphQLString, + description: 'Details of the reaction.', + }, + _reported: { + type: require('./element.input.js'), + description: 'Self-reported indicator.', + }, + reported: { + type: GraphQLBoolean, + description: 'Self-reported indicator.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunizationrecommendation.input.js b/src/resources/3_0_1/inputs/immunizationrecommendation.input.js index 07784f75..d9aa2787 100644 --- a/src/resources/3_0_1/inputs/immunizationrecommendation.input.js +++ b/src/resources/3_0_1/inputs/immunizationrecommendation.input.js @@ -1,20 +1,13 @@ 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 ImmunizationRecommendationResourceInputType = new GraphQLEnumType({ - name: 'ImmunizationRecommendationResourceInputType', - values: { - ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,29 +16,89 @@ let ImmunizationRecommendationResourceInputType = new GraphQLEnumType({ module.exports = new GraphQLInputObjectType({ name: 'ImmunizationRecommendation_Input', description: - 'Base StructureDefinition for ImmunizationRecommendation Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImmunizationRecommendationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A unique identifier assigned to this particular recommendation record.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient the recommendations are for.', - }, - recommendation: { - type: new GraphQLList( - new GraphQLNonNull( - require('./immunizationrecommendationrecommendation.input'), - ), + 'Base StructureDefinition for ImmunizationRecommendation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImmunizationRecommendation_Enum_input', + values: { + ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, + }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'A unique identifier assigned to this particular recommendation record.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient the recommendations are for.', + }, + recommendation: { + type: new GraphQLList( + new GraphQLNonNull( + require('./immunizationrecommendationrecommendation.input.js'), ), - description: 'Vaccine administration recommendations.', - }, - }), + ), + description: 'Vaccine administration recommendations.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunizationrecommendationrecommendation.input.js b/src/resources/3_0_1/inputs/immunizationrecommendationrecommendation.input.js index 38407242..f3efe7ae 100644 --- a/src/resources/3_0_1/inputs/immunizationrecommendationrecommendation.input.js +++ b/src/resources/3_0_1/inputs/immunizationrecommendationrecommendation.input.js @@ -1,77 +1,94 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation Input Schema + * @summary ImmunizationRecommendationrecommendation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationRecommendationRecommendation_Input', - description: 'Vaccine administration recommendations.', - fields: () => - extendSchema(require('./backboneelement.input'), { - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The date the immunization recommendation was created.', - }, - _date: { - type: require('./element.input'), - description: 'The date the immunization recommendation was created.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code - vaccineCode: { - type: require('./codeableconcept.input'), - description: 'Vaccine that pertains to the recommendation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-target-disease - targetDisease: { - type: require('./codeableconcept.input'), - description: 'The targeted disease for the recommendation.', - }, - doseNumber: { - type: PositiveIntScalar, - description: - 'The next recommended dose number (e.g. dose 2 is the next recommended dose).', - }, - _doseNumber: { - type: require('./element.input'), - description: - 'The next recommended dose number (e.g. dose 2 is the next recommended dose).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-status - forecastStatus: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Vaccine administration status.', - }, - dateCriterion: { - type: new GraphQLList( - require('./immunizationrecommendationrecommendationdatecriterion.input'), - ), - description: - 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', - }, - protocol: { - type: require('./immunizationrecommendationrecommendationprotocol.input'), - description: - 'Contains information about the protocol under which the vaccine was administered.', - }, - supportingImmunization: { - type: new GraphQLList(require('./reference.input')), - description: - 'Immunization event history that supports the status and recommendation.', - }, - supportingPatientInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', - }, - }), + name: 'ImmunizationRecommendationrecommendation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date the immunization recommendation was created.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date the immunization recommendation was created.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code + vaccineCode: { + type: require('./codeableconcept.input.js'), + description: 'Vaccine that pertains to the recommendation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-target-disease + targetDisease: { + type: require('./codeableconcept.input.js'), + description: 'The targeted disease for the recommendation.', + }, + _doseNumber: { + type: require('./element.input.js'), + description: + 'The next recommended dose number (e.g. dose 2 is the next recommended dose).', + }, + doseNumber: { + type: PositiveIntScalar, + description: + 'The next recommended dose number (e.g. dose 2 is the next recommended dose).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-status + forecastStatus: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Vaccine administration status.', + }, + dateCriterion: { + type: new GraphQLList( + require('./immunizationrecommendationrecommendationdatecriterion.input.js'), + ), + description: + 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', + }, + protocol: { + type: require('./immunizationrecommendationrecommendationprotocol.input.js'), + description: + 'Contains information about the protocol under which the vaccine was administered.', + }, + supportingImmunization: { + type: new GraphQLList(GraphQLString), + description: + 'Immunization event history that supports the status and recommendation.', + }, + supportingPatientInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunizationrecommendationrecommendationdatecriterion.input.js b/src/resources/3_0_1/inputs/immunizationrecommendationrecommendationdatecriterion.input.js index fb5c1c87..b7c50894 100644 --- a/src/resources/3_0_1/inputs/immunizationrecommendationrecommendationdatecriterion.input.js +++ b/src/resources/3_0_1/inputs/immunizationrecommendationrecommendationdatecriterion.input.js @@ -1,34 +1,52 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation.dateCriterion Input Schema + * @summary ImmunizationRecommendationrecommendationdateCriterion Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationRecommendationRecommendationDateCriterion_Input', - description: - 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', - }, - value: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date whose meaning is specified by dateCriterion.code.', - }, - _value: { - type: require('./element.input'), - description: - 'The date whose meaning is specified by dateCriterion.code.', - }, - }), + name: 'ImmunizationRecommendationrecommendationdateCriterion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', + }, + _value: { + type: require('./element.input.js'), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + value: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunizationrecommendationrecommendationprotocol.input.js b/src/resources/3_0_1/inputs/immunizationrecommendationrecommendationprotocol.input.js index a0f6dc8a..08e92d37 100644 --- a/src/resources/3_0_1/inputs/immunizationrecommendationrecommendationprotocol.input.js +++ b/src/resources/3_0_1/inputs/immunizationrecommendationrecommendationprotocol.input.js @@ -1,53 +1,72 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation.protocol Input Schema + * @summary ImmunizationRecommendationrecommendationprotocol Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationRecommendationRecommendationProtocol_Input', - description: - 'Contains information about the protocol under which the vaccine was administered.', - fields: () => - extendSchema(require('./backboneelement.input'), { - doseSequence: { - type: PositiveIntScalar, - description: - 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', - }, - _doseSequence: { - type: require('./element.input'), - description: - 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', - }, - description: { - type: GraphQLString, - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - _description: { - type: require('./element.input'), - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - authority: { - type: require('./reference.input'), - description: - 'Indicates the authority who published the protocol. For example, ACIP.', - }, - series: { - type: GraphQLString, - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - _series: { - type: require('./element.input'), - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - }), + name: 'ImmunizationRecommendationrecommendationprotocol_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _doseSequence: { + type: require('./element.input.js'), + description: + 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', + }, + doseSequence: { + type: PositiveIntScalar, + description: + 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + authority: { + type: GraphQLString, + description: + 'Indicates the authority who published the protocol. For example, ACIP.', + }, + _series: { + type: require('./element.input.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/immunizationvaccinationprotocol.input.js b/src/resources/3_0_1/inputs/immunizationvaccinationprotocol.input.js index ea824887..88ce9456 100644 --- a/src/resources/3_0_1/inputs/immunizationvaccinationprotocol.input.js +++ b/src/resources/3_0_1/inputs/immunizationvaccinationprotocol.input.js @@ -1,83 +1,98 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Immunization.vaccinationProtocol Input Schema + * @summary ImmunizationvaccinationProtocol Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImmunizationVaccinationProtocol_Input', - description: - 'Contains information about the protocol(s) under which the vaccine was administered.', - fields: () => - extendSchema(require('./backboneelement.input'), { - doseSequence: { - type: PositiveIntScalar, - description: 'Nominal position in a series.', - }, - _doseSequence: { - type: require('./element.input'), - description: 'Nominal position in a series.', - }, - description: { - type: GraphQLString, - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - _description: { - type: require('./element.input'), - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - authority: { - type: require('./reference.input'), - description: - 'Indicates the authority who published the protocol. E.g. ACIP.', - }, - series: { - type: GraphQLString, - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - _series: { - type: require('./element.input'), - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - seriesDoses: { - type: PositiveIntScalar, - description: 'The recommended number of doses to achieve immunity.', - }, - _seriesDoses: { - type: require('./element.input'), - description: 'The recommended number of doses to achieve immunity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-target - targetDisease: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.input')), - ), - description: 'The targeted disease.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status - doseStatus: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Indicates if the immunization event should 'count' against the protocol.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status-reason - doseStatusReason: { - type: require('./codeableconcept.input'), - description: - 'Provides an explanation as to why an immunization event should or should not count against the protocol.', - }, - }), + name: 'ImmunizationvaccinationProtocol_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _doseSequence: { + type: require('./element.input.js'), + description: 'Nominal position in a series.', + }, + doseSequence: { + type: PositiveIntScalar, + description: 'Nominal position in a series.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + authority: { + type: GraphQLString, + description: + 'Indicates the authority who published the protocol. E.g. ACIP.', + }, + _series: { + type: require('./element.input.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + _seriesDoses: { + type: require('./element.input.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDoses: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-target + targetDisease: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.input.js')), + ), + description: 'The targeted disease.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status + doseStatus: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Indicates if the immunization event should 'count' against the protocol.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status-reason + doseStatusReason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides an explanation as to why an immunization event should or should not count against the protocol.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/implementationguide.input.js b/src/resources/3_0_1/inputs/implementationguide.input.js index 7fbaac65..61534a29 100644 --- a/src/resources/3_0_1/inputs/implementationguide.input.js +++ b/src/resources/3_0_1/inputs/implementationguide.input.js @@ -1,25 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImplementationGuideResourceInputType = new GraphQLEnumType({ - name: 'ImplementationGuideResourceInputType', - values: { - ImplementationGuide: { value: 'ImplementationGuide' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,159 +17,219 @@ let ImplementationGuideResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ImplementationGuide_Input', - description: 'Base StructureDefinition for ImplementationGuide Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ImplementationGuideResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this implementation guide. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this implementation guide. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the implementation guide.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the implementation guide.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the implementation guide from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the implementation guide from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate implementation guide instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the implementation guide is intended to be used.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', - }, - fhirVersion: { - type: IdScalar, - description: - 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', - }, - _fhirVersion: { - type: require('./element.input'), - description: - 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', - }, - dependency: { - type: new GraphQLList(require('./implementationguidedependency.input')), - description: - 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', - }, - package: { - type: new GraphQLList(require('./implementationguidepackage.input')), - description: - 'A logical group of resources. Logical groups can be used when building pages.', - }, - global: { - type: new GraphQLList(require('./implementationguideglobal.input')), - description: - 'A set of profiles that all resources covered by this implementation guide must conform to.', - }, - binary: { - type: new GraphQLList(UriScalar), - description: - 'A binary file that is included in the implementation guide when it is published.', - }, - _binary: { - type: require('./element.input'), - description: - 'A binary file that is included in the implementation guide when it is published.', - }, - page: { - type: require('./implementationguidepage.input'), - description: - 'A page / section in the implementation guide. The root page is the implementation guide home page.', - }, - }), + description: 'Base StructureDefinition for ImplementationGuide Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImplementationGuide_Enum_input', + values: { ImplementationGuide: { value: 'ImplementationGuide' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this implementation guide. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this implementation guide. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the implementation guide.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the implementation guide.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the implementation guide from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the implementation guide from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate implementation guide instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the implementation guide is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', + }, + fhirVersion: { + type: IdScalar, + description: + 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', + }, + dependency: { + type: new GraphQLList( + require('./implementationguidedependency.input.js'), + ), + description: + 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', + }, + package: { + type: new GraphQLList(require('./implementationguidepackage.input.js')), + description: + 'A logical group of resources. Logical groups can be used when building pages.', + }, + global: { + type: new GraphQLList(require('./implementationguideglobal.input.js')), + description: + 'A set of profiles that all resources covered by this implementation guide must conform to.', + }, + _binary: { + type: require('./element.input.js'), + description: + 'A binary file that is included in the implementation guide when it is published.', + }, + binary: { + type: new GraphQLList(UriScalar), + description: + 'A binary file that is included in the implementation guide when it is published.', + }, + page: { + type: require('./implementationguidepage.input.js'), + description: + 'A page / section in the implementation guide. The root page is the implementation guide home page.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/implementationguidedependency.input.js b/src/resources/3_0_1/inputs/implementationguidedependency.input.js index a2834741..c5697203 100644 --- a/src/resources/3_0_1/inputs/implementationguidedependency.input.js +++ b/src/resources/3_0_1/inputs/implementationguidedependency.input.js @@ -1,38 +1,58 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImplementationGuide.dependency Input Schema + * @summary ImplementationGuidedependency Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuideDependency_Input', - description: - 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-dependency-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the dependency is represented when the guide is published.', - }, - _type: { - type: require('./element.input'), - description: - 'How the dependency is represented when the guide is published.', - }, - uri: { - type: new GraphQLNonNull(UriScalar), - description: 'Where the dependency is located.', - }, - _uri: { - type: require('./element.input'), - description: 'Where the dependency is located.', - }, - }), + name: 'ImplementationGuidedependency_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'How the dependency is represented when the guide is published.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-dependency-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the dependency is represented when the guide is published.', + }, + _uri: { + type: require('./element.input.js'), + description: 'Where the dependency is located.', + }, + uri: { + type: new GraphQLNonNull(UriScalar), + description: 'Where the dependency is located.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/implementationguideglobal.input.js b/src/resources/3_0_1/inputs/implementationguideglobal.input.js index 8add6503..50de16b9 100644 --- a/src/resources/3_0_1/inputs/implementationguideglobal.input.js +++ b/src/resources/3_0_1/inputs/implementationguideglobal.input.js @@ -1,32 +1,52 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ImplementationGuide.global Input Schema + * @summary ImplementationGuideglobal Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuideGlobal_Input', - description: - 'A set of profiles that all resources covered by this implementation guide must conform to.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of resource that all instances must conform to.', - }, - _type: { - type: require('./element.input'), - description: 'The type of resource that all instances must conform to.', - }, - profile: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the profile that all instances must conform to.', - }, - }), + name: 'ImplementationGuideglobal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of resource that all instances must conform to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of resource that all instances must conform to.', + }, + profile: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the profile that all instances must conform to.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/implementationguidepackage.input.js b/src/resources/3_0_1/inputs/implementationguidepackage.input.js index ef97babf..4fee4042 100644 --- a/src/resources/3_0_1/inputs/implementationguidepackage.input.js +++ b/src/resources/3_0_1/inputs/implementationguidepackage.input.js @@ -1,47 +1,62 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ImplementationGuide.package Input Schema + * @summary ImplementationGuidepackage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuidePackage_Input', - description: - 'A logical group of resources. Logical groups can be used when building pages.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name for the group, as used in page.package.', - }, - _name: { - type: require('./element.input'), - description: 'The name for the group, as used in page.package.', - }, - description: { - type: GraphQLString, - description: 'Human readable text describing the package.', - }, - _description: { - type: require('./element.input'), - description: 'Human readable text describing the package.', - }, - resource: { - type: new GraphQLList( - new GraphQLNonNull( - require('./implementationguidepackageresource.input'), - ), + name: 'ImplementationGuidepackage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name for the group, as used in page.package.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name for the group, as used in page.package.', + }, + _description: { + type: require('./element.input.js'), + description: 'Human readable text describing the package.', + }, + description: { + type: GraphQLString, + description: 'Human readable text describing the package.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull( + require('./implementationguidepackageresource.input.js'), ), - description: - 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', - }, - }), + ), + description: + 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/implementationguidepackageresource.input.js b/src/resources/3_0_1/inputs/implementationguidepackageresource.input.js index 780eb311..75955fff 100644 --- a/src/resources/3_0_1/inputs/implementationguidepackageresource.input.js +++ b/src/resources/3_0_1/inputs/implementationguidepackageresource.input.js @@ -1,80 +1,96 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImplementationGuide.package.resource Input Schema + * @summary ImplementationGuidepackageresource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuidePackageResource_Input', - description: - 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', - fields: () => - extendSchema(require('./backboneelement.input'), { - example: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.', - }, - _example: { - type: require('./element.input'), - description: - 'Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.', - }, - name: { - type: GraphQLString, - description: - 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', - }, - _name: { - type: require('./element.input'), - description: - 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', - }, - description: { - type: GraphQLString, - description: - 'A description of the reason that a resource has been included in the implementation guide.', - }, - _description: { - type: require('./element.input'), - description: - 'A description of the reason that a resource has been included in the implementation guide.', - }, - acronym: { - type: GraphQLString, - description: - 'A short code that may be used to identify the resource throughout the implementation guide.', - }, - _acronym: { - type: require('./element.input'), - description: - 'A short code that may be used to identify the resource throughout the implementation guide.', - }, - sourceUri: { - type: new GraphQLNonNull(UriScalar), - description: 'Where this resource is found.', - }, - _sourceUri: { - type: require('./element.input'), - description: 'Where this resource is found.', - }, - sourceReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Where this resource is found.', - }, - exampleFor: { - type: require('./reference.input'), - description: - 'Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.', - }, - }), + name: 'ImplementationGuidepackageresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _example: { + type: require('./element.input.js'), + description: + 'Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.', + }, + example: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + name: { + type: GraphQLString, + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + _description: { + type: require('./element.input.js'), + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + description: { + type: GraphQLString, + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + _acronym: { + type: require('./element.input.js'), + description: + 'A short code that may be used to identify the resource throughout the implementation guide.', + }, + acronym: { + type: GraphQLString, + description: + 'A short code that may be used to identify the resource throughout the implementation guide.', + }, + _sourceUri: { + type: require('./element.input.js'), + description: 'Where this resource is found.', + }, + sourceUri: { + type: new GraphQLNonNull(UriScalar), + description: 'Where this resource is found.', + }, + sourceReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Where this resource is found.', + }, + exampleFor: { + type: GraphQLString, + description: + 'Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/implementationguidepage.input.js b/src/resources/3_0_1/inputs/implementationguidepage.input.js index 0c1d1bfb..9f20bd7e 100644 --- a/src/resources/3_0_1/inputs/implementationguidepage.input.js +++ b/src/resources/3_0_1/inputs/implementationguidepage.input.js @@ -1,82 +1,97 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ImplementationGuide.page Input Schema + * @summary ImplementationGuidepage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ImplementationGuidePage_Input', - description: - 'A page / section in the implementation guide. The root page is the implementation guide home page.', - fields: () => - extendSchema(require('./backboneelement.input'), { - source: { - type: new GraphQLNonNull(UriScalar), - description: 'The source address for the page.', - }, - _source: { - type: require('./element.input'), - description: 'The source address for the page.', - }, - title: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', - }, - _title: { - type: require('./element.input'), - description: - 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-page-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', - }, - _kind: { - type: require('./element.input'), - description: - 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLList(CodeScalar), - description: - 'For constructed pages, what kind of resources to include in the list.', - }, - _type: { - type: require('./element.input'), - description: - 'For constructed pages, what kind of resources to include in the list.', - }, - package: { - type: new GraphQLList(GraphQLString), - description: - 'For constructed pages, a list of packages to include in the page (or else empty for everything).', - }, - _package: { - type: require('./element.input'), - description: - 'For constructed pages, a list of packages to include in the page (or else empty for everything).', - }, - format: { - type: CodeScalar, - description: 'The format of the page.', - }, - _format: { - type: require('./element.input'), - description: 'The format of the page.', - }, - }), + name: 'ImplementationGuidepage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _source: { + type: require('./element.input.js'), + description: 'The source address for the page.', + }, + source: { + type: new GraphQLNonNull(UriScalar), + description: 'The source address for the page.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-page-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', + }, + _type: { + type: require('./element.input.js'), + description: + 'For constructed pages, what kind of resources to include in the list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLList(CodeScalar), + description: + 'For constructed pages, what kind of resources to include in the list.', + }, + _package: { + type: require('./element.input.js'), + description: + 'For constructed pages, a list of packages to include in the page (or else empty for everything).', + }, + package: { + type: new GraphQLList(GraphQLString), + description: + 'For constructed pages, a list of packages to include in the page (or else empty for everything).', + }, + _format: { + type: require('./element.input.js'), + description: 'The format of the page.', + }, + format: { + type: CodeScalar, + description: 'The format of the page.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/library.input.js b/src/resources/3_0_1/inputs/library.input.js index 802634d8..c65d2944 100644 --- a/src/resources/3_0_1/inputs/library.input.js +++ b/src/resources/3_0_1/inputs/library.input.js @@ -1,25 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let LibraryResourceInputType = new GraphQLEnumType({ - name: 'LibraryResourceInputType', - values: { - Library: { value: 'Library' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -27,216 +18,272 @@ let LibraryResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Library_Input', - description: 'Base StructureDefinition for Library Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(LibraryResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the library.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the library.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this library. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this library. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/library-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the library.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the library.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the library from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the library from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this library is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this library is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the library is used from a clinical perspective.', - }, - _usage: { - type: require('./element.input'), - description: - 'A detailed description of how the library is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.input'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.input'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The period during which the library content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate library instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the library is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.input')), - description: - 'A contributor to the content of the library, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.input')), - description: - 'Related artifacts such as additional documentation, justification, or bibliographic references.', - }, - parameter: { - type: new GraphQLList(require('./parameterdefinition.input')), - description: - 'The parameter element defines parameters used by the library.', - }, - dataRequirement: { - type: new GraphQLList(require('./datarequirement.input')), - description: - 'Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.', - }, - content: { - type: new GraphQLList(require('./attachment.input')), - description: - 'The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.', - }, - }), + description: 'Base StructureDefinition for Library Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Library_Enum_input', + values: { Library: { value: 'Library' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: 'A short, descriptive, user-friendly title for the library.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive, user-friendly title for the library.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this library. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this library. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/library-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the library.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the library.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the library from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the library from a consumer's perspective.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this library is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this library is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the library is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the library is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the library content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate library instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the library is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.input.js')), + description: + 'A contributor to the content of the library, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + parameter: { + type: new GraphQLList(require('./parameterdefinition.input.js')), + description: + 'The parameter element defines parameters used by the library.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: + 'Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.', + }, + content: { + type: new GraphQLList(require('./attachment.input.js')), + description: + 'The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/linkage.input.js b/src/resources/3_0_1/inputs/linkage.input.js index 92206c52..61f1dd23 100644 --- a/src/resources/3_0_1/inputs/linkage.input.js +++ b/src/resources/3_0_1/inputs/linkage.input.js @@ -1,21 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let LinkageResourceInputType = new GraphQLEnumType({ - name: 'LinkageResourceInputType', - values: { - Linkage: { value: 'Linkage' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,34 +16,92 @@ let LinkageResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Linkage_Input', - description: 'Base StructureDefinition for Linkage Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(LinkageResourceInputType), - description: 'Type of this resource.', - }, - active: { - type: GraphQLBoolean, - description: - "Indicates whether the asserted set of linkages are considered to be 'in effect'.", - }, - _active: { - type: require('./element.input'), - description: - "Indicates whether the asserted set of linkages are considered to be 'in effect'.", - }, - author: { - type: require('./reference.input'), - description: - 'Identifies the user or organization responsible for asserting the linkages and who establishes the context for evaluating the nature of each linkage.', - }, - item: { - type: new GraphQLList( - new GraphQLNonNull(require('./linkageitem.input')), - ), - description: - 'Identifies one of the records that is considered to refer to the same real-world occurrence as well as how the items hould be evaluated within the collection of linked items.', - }, - }), + description: 'Base StructureDefinition for Linkage Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Linkage_Enum_input', + values: { Linkage: { value: 'Linkage' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _active: { + type: require('./element.input.js'), + description: + "Indicates whether the asserted set of linkages are considered to be 'in effect'.", + }, + active: { + type: GraphQLBoolean, + description: + "Indicates whether the asserted set of linkages are considered to be 'in effect'.", + }, + author: { + type: GraphQLString, + description: + 'Identifies the user or organization responsible for asserting the linkages and who establishes the context for evaluating the nature of each linkage.', + }, + item: { + type: new GraphQLList( + new GraphQLNonNull(require('./linkageitem.input.js')), + ), + description: + 'Identifies one of the records that is considered to refer to the same real-world occurrence as well as how the items hould be evaluated within the collection of linked items.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/linkageitem.input.js b/src/resources/3_0_1/inputs/linkageitem.input.js index 2813111b..8a17d82c 100644 --- a/src/resources/3_0_1/inputs/linkageitem.input.js +++ b/src/resources/3_0_1/inputs/linkageitem.input.js @@ -1,33 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Linkage.item Input Schema + * @summary Linkageitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'LinkageItem_Input', - description: - 'Identifies one of the records that is considered to refer to the same real-world occurrence as well as how the items hould be evaluated within the collection of linked items.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/linkage-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", - }, - _type: { - type: require('./element.input'), - description: - "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", - }, - resource: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The resource instance being linked as part of the group.', - }, - }), + name: 'Linkageitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/linkage-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", + }, + resource: { + type: new GraphQLNonNull(GraphQLString), + description: 'The resource instance being linked as part of the group.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/list.input.js b/src/resources/3_0_1/inputs/list.input.js index 1c9fc3fb..f62cbd44 100644 --- a/src/resources/3_0_1/inputs/list.input.js +++ b/src/resources/3_0_1/inputs/list.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ListResourceInputType = new GraphQLEnumType({ - name: 'ListResourceInputType', - values: { - List: { value: 'List' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,92 +16,150 @@ let ListResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'List_Input', - description: 'Base StructureDefinition for List Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ListResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier for the List assigned for business purposes outside the context of FHIR.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current state of this list.', - }, - _status: { - type: require('./element.input'), - description: 'Indicates the current state of this list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - _mode: { - type: require('./element.input'), - description: - 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - title: { - type: GraphQLString, - description: 'A label for the list assigned by the author.', - }, - _title: { - type: require('./element.input'), - description: 'A label for the list assigned by the author.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-example-codes - code: { - type: require('./codeableconcept.input'), - description: - 'This code defines the purpose of the list - why it was created.', - }, - subject: { - type: require('./reference.input'), - description: - 'The common subject (or patient) of the resources that are in the list, if there is one.', - }, - encounter: { - type: require('./reference.input'), - description: - 'The encounter that is the context in which this list was created.', - }, - date: { - type: DateTimeScalar, - description: 'The date that the list was prepared.', - }, - _date: { - type: require('./element.input'), - description: 'The date that the list was prepared.', - }, - source: { - type: require('./reference.input'), - description: - 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-order - orderedBy: { - type: require('./codeableconcept.input'), - description: 'What order applies to the items in the list.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: 'Comments that apply to the overall list.', - }, - entry: { - type: new GraphQLList(require('./listentry.input')), - description: 'Entries in this list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason - emptyReason: { - type: require('./codeableconcept.input'), - description: 'If the list is empty, why the list is empty.', - }, - }), + description: 'Base StructureDefinition for List Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'List_Enum_input', + values: { List: { value: 'List' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifier for the List assigned for business purposes outside the context of FHIR.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current state of this list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this list.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + _title: { + type: require('./element.input.js'), + description: 'A label for the list assigned by the author.', + }, + title: { + type: GraphQLString, + description: 'A label for the list assigned by the author.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-example-codes + code: { + type: require('./codeableconcept.input.js'), + description: + 'This code defines the purpose of the list - why it was created.', + }, + subject: { + type: GraphQLString, + description: + 'The common subject (or patient) of the resources that are in the list, if there is one.', + }, + encounter: { + type: GraphQLString, + description: + 'The encounter that is the context in which this list was created.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date that the list was prepared.', + }, + date: { + type: DateTimeScalar, + description: 'The date that the list was prepared.', + }, + source: { + type: GraphQLString, + description: + 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-order + orderedBy: { + type: require('./codeableconcept.input.js'), + description: 'What order applies to the items in the list.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Comments that apply to the overall list.', + }, + entry: { + type: new GraphQLList(require('./listentry.input.js')), + description: 'Entries in this list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason + emptyReason: { + type: require('./codeableconcept.input.js'), + description: 'If the list is empty, why the list is empty.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/listentry.input.js b/src/resources/3_0_1/inputs/listentry.input.js index 36b241ad..9c01a610 100644 --- a/src/resources/3_0_1/inputs/listentry.input.js +++ b/src/resources/3_0_1/inputs/listentry.input.js @@ -1,48 +1,66 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLBoolean, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary List.entry Input Schema + * @summary Listentry Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ListEntry_Input', - description: 'Entries in this list.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-item-flag - flag: { - type: require('./codeableconcept.input'), - description: - 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', - }, - deleted: { - type: GraphQLBoolean, - description: 'True if this item is marked as deleted in the list.', - }, - _deleted: { - type: require('./element.input'), - description: 'True if this item is marked as deleted in the list.', - }, - date: { - type: DateTimeScalar, - description: 'When this item was added to the list.', - }, - _date: { - type: require('./element.input'), - description: 'When this item was added to the list.', - }, - item: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the actual resource from which data was derived.', - }, - }), + name: 'Listentry_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-item-flag + flag: { + type: require('./codeableconcept.input.js'), + description: + 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', + }, + _deleted: { + type: require('./element.input.js'), + description: 'True if this item is marked as deleted in the list.', + }, + deleted: { + type: GraphQLBoolean, + description: 'True if this item is marked as deleted in the list.', + }, + _date: { + type: require('./element.input.js'), + description: 'When this item was added to the list.', + }, + date: { + type: DateTimeScalar, + description: 'When this item was added to the list.', + }, + item: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the actual resource from which data was derived.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/location.input.js b/src/resources/3_0_1/inputs/location.input.js index be8c6e01..324f0cec 100644 --- a/src/resources/3_0_1/inputs/location.input.js +++ b/src/resources/3_0_1/inputs/location.input.js @@ -1,21 +1,13 @@ -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 LocationResourceInputType = new GraphQLEnumType({ - name: 'LocationResourceInputType', - values: { - Location: { value: 'Location' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,116 +15,173 @@ let LocationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Location_Input', - description: 'Base StructureDefinition for Location Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(LocationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Unique code or number identifying the location to its users.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-status - status: { - type: CodeScalar, - description: - 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', - }, - _status: { - type: require('./element.input'), - description: - 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0116 - operationalStatus: { - type: require('./coding.input'), - description: - 'The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.', - }, - name: { - type: GraphQLString, - description: - 'Name of the location as used by humans. Does not need to be unique.', - }, - _name: { - type: require('./element.input'), - description: - 'Name of the location as used by humans. Does not need to be unique.', - }, - alias: { - type: new GraphQLList(GraphQLString), - description: - 'A list of alternate names that the location is known as, or was known as in the past.', - }, - _alias: { - type: require('./element.input'), - description: - 'A list of alternate names that the location is known as, or was known as in the past.', - }, - description: { - type: GraphQLString, - description: - 'Description of the Location, which helps in finding or referencing the place.', - }, - _description: { - type: require('./element.input'), - description: - 'Description of the Location, which helps in finding or referencing the place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-mode - mode: { - type: CodeScalar, - description: - 'Indicates whether a resource instance represents a specific location or a class of locations.', - }, - _mode: { - type: require('./element.input'), - description: - 'Indicates whether a resource instance represents a specific location or a class of locations.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType - type: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of function performed at the location.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', - }, - address: { - type: require('./address.input'), - description: 'Physical location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-physical-type - physicalType: { - type: require('./codeableconcept.input'), - description: - 'Physical form of the location, e.g. building, room, vehicle, road.', - }, - position: { - type: require('./locationposition.input'), - description: - 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'The organization responsible for the provisioning and upkeep of the location.', - }, - partOf: { - type: require('./reference.input'), - description: - 'Another Location which this Location is physically part of.', - }, - endpoint: { - type: new GraphQLList(require('./reference.input')), - description: - 'Technical endpoints providing access to services operated for the location.', - }, - }), + description: 'Base StructureDefinition for Location Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Location_Enum_input', + values: { Location: { value: 'Location' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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 code or number identifying the location to its users.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-status + status: { + type: CodeScalar, + description: + 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0116 + operationalStatus: { + type: require('./coding.input.js'), + description: + 'The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + name: { + type: GraphQLString, + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'A list of alternate names that the location is known as, or was known as in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the location is known as, or was known as in the past.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + description: { + type: GraphQLString, + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-mode + mode: { + type: CodeScalar, + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType + type: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the type of function performed at the location.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', + }, + address: { + type: require('./address.input.js'), + description: 'Physical location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-physical-type + physicalType: { + type: require('./codeableconcept.input.js'), + description: + 'Physical form of the location, e.g. building, room, vehicle, road.', + }, + position: { + type: require('./locationposition.input.js'), + description: + 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization responsible for the provisioning and upkeep of the location.', + }, + partOf: { + type: GraphQLString, + description: + 'Another Location which this Location is physically part of.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for the location.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/locationposition.input.js b/src/resources/3_0_1/inputs/locationposition.input.js index ffc12ac0..2a19171c 100644 --- a/src/resources/3_0_1/inputs/locationposition.input.js +++ b/src/resources/3_0_1/inputs/locationposition.input.js @@ -1,51 +1,68 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Location.position Input Schema + * @summary Locationposition Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'LocationPosition_Input', - description: - 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', - fields: () => - extendSchema(require('./backboneelement.input'), { - longitude: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', - }, - _longitude: { - type: require('./element.input'), - description: - 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', - }, - latitude: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', - }, - _latitude: { - type: require('./element.input'), - description: - 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', - }, - altitude: { - type: GraphQLFloat, - description: - 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', - }, - _altitude: { - type: require('./element.input'), - description: - 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', - }, - }), + name: 'Locationposition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _longitude: { + type: require('./element.input.js'), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + longitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + _latitude: { + type: require('./element.input.js'), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + latitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + _altitude: { + type: require('./element.input.js'), + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + altitude: { + type: GraphQLFloat, + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measure.input.js b/src/resources/3_0_1/inputs/measure.input.js index 8f8502f3..b7e2cd6e 100644 --- a/src/resources/3_0_1/inputs/measure.input.js +++ b/src/resources/3_0_1/inputs/measure.input.js @@ -1,25 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MeasureResourceInputType = new GraphQLEnumType({ - name: 'MeasureResourceInputType', - values: { - Measure: { value: 'Measure' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -27,315 +18,371 @@ let MeasureResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Measure_Input', - description: 'Base StructureDefinition for Measure Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MeasureResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this measure is (or will be) published. The URL SHOULD include the major version of the measure. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this measure is (or will be) published. The URL SHOULD include the major version of the measure. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the measure.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the measure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this measure. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this measure. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the measure was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the measure was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the measure.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the measure.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the measure from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the measure from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this measure is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this measure is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the measure is used from a clinical perspective.', - }, - _usage: { - type: require('./element.input'), - description: - 'A detailed description of how the measure is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.input'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.input'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The period during which the measure content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate measure instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the measure is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Descriptive topics related to the content of the measure. Topics provide a high-level categorization of the type of the measure that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.input')), - description: - 'A contributor to the content of the measure, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.input')), - description: - 'Related artifacts such as additional documentation, justification, or bibliographic references.', - }, - library: { - type: new GraphQLList(require('./reference.input')), - description: - 'A reference to a Library resource containing the formal logic used by the measure.', - }, - disclaimer: { - type: GraphQLString, - description: - 'Notices and disclaimers regarding the use of the measure, or related to intellectual property (such as code systems) referenced by the measure.', - }, - _disclaimer: { - type: require('./element.input'), - description: - 'Notices and disclaimers regarding the use of the measure, or related to intellectual property (such as code systems) referenced by the measure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-scoring - scoring: { - type: require('./codeableconcept.input'), - description: - 'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composite-measure-scoring - compositeScoring: { - type: require('./codeableconcept.input'), - description: - 'If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.', - }, - riskAdjustment: { - type: GraphQLString, - description: - 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', - }, - _riskAdjustment: { - type: require('./element.input'), - description: - 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', - }, - rateAggregation: { - type: GraphQLString, - description: - 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', - }, - _rateAggregation: { - type: require('./element.input'), - description: - 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', - }, - rationale: { - type: GraphQLString, - description: - 'Provides a succint statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', - }, - _rationale: { - type: require('./element.input'), - description: - 'Provides a succint statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', - }, - clinicalRecommendationStatement: { - type: GraphQLString, - description: - 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', - }, - _clinicalRecommendationStatement: { - type: require('./element.input'), - description: - 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', - }, - improvementNotation: { - type: GraphQLString, - description: - 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is whthin a range).', - }, - _improvementNotation: { - type: require('./element.input'), - description: - 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is whthin a range).', - }, - definition: { - type: new GraphQLList(GraphQLString), - description: - 'Provides a description of an individual term used within the measure.', - }, - _definition: { - type: require('./element.input'), - description: - 'Provides a description of an individual term used within the measure.', - }, - guidance: { - type: GraphQLString, - description: - 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', - }, - _guidance: { - type: require('./element.input'), - description: - 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', - }, - set: { - type: GraphQLString, - description: 'The measure set, e.g. Preventive Care and Screening.', - }, - _set: { - type: require('./element.input'), - description: 'The measure set, e.g. Preventive Care and Screening.', - }, - group: { - type: new GraphQLList(require('./measuregroup.input')), - description: 'A group of population criteria for the measure.', - }, - supplementalData: { - type: new GraphQLList(require('./measuresupplementaldata.input')), - description: - 'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.', - }, - }), + description: 'Base StructureDefinition for Measure Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Measure_Enum_input', + values: { Measure: { value: 'Measure' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this measure is (or will be) published. The URL SHOULD include the major version of the measure. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this measure is (or will be) published. The URL SHOULD include the major version of the measure. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: 'A short, descriptive, user-friendly title for the measure.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive, user-friendly title for the measure.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this measure. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this measure. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the measure was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the measure was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the measure.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the measure.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the measure from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the measure from a consumer's perspective.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this measure is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this measure is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the measure is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the measure is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the measure content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate measure instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the measure is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the measure. Topics provide a high-level categorization of the type of the measure that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.input.js')), + description: + 'A contributor to the content of the measure, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + library: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to a Library resource containing the formal logic used by the measure.', + }, + _disclaimer: { + type: require('./element.input.js'), + description: + 'Notices and disclaimers regarding the use of the measure, or related to intellectual property (such as code systems) referenced by the measure.', + }, + disclaimer: { + type: GraphQLString, + description: + 'Notices and disclaimers regarding the use of the measure, or related to intellectual property (such as code systems) referenced by the measure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-scoring + scoring: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composite-measure-scoring + compositeScoring: { + type: require('./codeableconcept.input.js'), + description: + 'If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.', + }, + _riskAdjustment: { + type: require('./element.input.js'), + description: + 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', + }, + riskAdjustment: { + type: GraphQLString, + description: + 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', + }, + _rateAggregation: { + type: require('./element.input.js'), + description: + 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', + }, + rateAggregation: { + type: GraphQLString, + description: + 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', + }, + _rationale: { + type: require('./element.input.js'), + description: + 'Provides a succint statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', + }, + rationale: { + type: GraphQLString, + description: + 'Provides a succint statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', + }, + _clinicalRecommendationStatement: { + type: require('./element.input.js'), + description: + 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', + }, + clinicalRecommendationStatement: { + type: GraphQLString, + description: + 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', + }, + _improvementNotation: { + type: require('./element.input.js'), + description: + 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is whthin a range).', + }, + improvementNotation: { + type: GraphQLString, + description: + 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is whthin a range).', + }, + _definition: { + type: require('./element.input.js'), + description: + 'Provides a description of an individual term used within the measure.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'Provides a description of an individual term used within the measure.', + }, + _guidance: { + type: require('./element.input.js'), + description: + 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', + }, + guidance: { + type: GraphQLString, + description: + 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', + }, + _set: { + type: require('./element.input.js'), + description: 'The measure set, e.g. Preventive Care and Screening.', + }, + set: { + type: GraphQLString, + description: 'The measure set, e.g. Preventive Care and Screening.', + }, + group: { + type: new GraphQLList(require('./measuregroup.input.js')), + description: 'A group of population criteria for the measure.', + }, + supplementalData: { + type: new GraphQLList(require('./measuresupplementaldata.input.js')), + description: + 'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measuregroup.input.js b/src/resources/3_0_1/inputs/measuregroup.input.js index 7906fd1e..82d2feb7 100644 --- a/src/resources/3_0_1/inputs/measuregroup.input.js +++ b/src/resources/3_0_1/inputs/measuregroup.input.js @@ -1,51 +1,67 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Measure.group Input Schema + * @summary Measuregroup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureGroup_Input', - description: 'A group of population criteria for the measure.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: - 'A unique identifier for the group. This identifier will used to report data for the group in the measure report.', - }, - name: { - type: GraphQLString, - description: 'Optional name or short description of this group.', - }, - _name: { - type: require('./element.input'), - description: 'Optional name or short description of this group.', - }, - description: { - type: GraphQLString, - description: 'The human readable description of this population group.', - }, - _description: { - type: require('./element.input'), - description: 'The human readable description of this population group.', - }, - population: { - type: new GraphQLList(require('./measuregrouppopulation.input')), - description: 'A population criteria for the measure.', - }, - stratifier: { - type: new GraphQLList(require('./measuregroupstratifier.input')), - description: - 'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.', - }, - }), + name: 'Measuregroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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 GraphQLNonNull(require('./identifier.input.js')), + description: + 'A unique identifier for the group. This identifier will used to report data for the group in the measure report.', + }, + _name: { + type: require('./element.input.js'), + description: 'Optional name or short description of this group.', + }, + name: { + type: GraphQLString, + description: 'Optional name or short description of this group.', + }, + _description: { + type: require('./element.input.js'), + description: 'The human readable description of this population group.', + }, + description: { + type: GraphQLString, + description: 'The human readable description of this population group.', + }, + population: { + type: new GraphQLList(require('./measuregrouppopulation.input.js')), + description: 'A population criteria for the measure.', + }, + stratifier: { + type: new GraphQLList(require('./measuregroupstratifier.input.js')), + description: + 'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measuregrouppopulation.input.js b/src/resources/3_0_1/inputs/measuregrouppopulation.input.js index b9db2dd0..b8735ef1 100644 --- a/src/resources/3_0_1/inputs/measuregrouppopulation.input.js +++ b/src/resources/3_0_1/inputs/measuregrouppopulation.input.js @@ -1,58 +1,75 @@ const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Measure.group.population Input Schema + * @summary Measuregrouppopulation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureGroupPopulation_Input', - description: 'A population criteria for the measure.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-population - code: { - type: require('./codeableconcept.input'), - description: 'The type of population criteria.', - }, - name: { - type: GraphQLString, - description: 'Optional name or short description of this population.', - }, - _name: { - type: require('./element.input'), - description: 'Optional name or short description of this population.', - }, - description: { - type: GraphQLString, - description: - 'The human readable description of this population criteria.', - }, - _description: { - type: require('./element.input'), - description: - 'The human readable description of this population criteria.', - }, - criteria: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.', - }, - _criteria: { - type: require('./element.input'), - description: - 'The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.', - }, - }), + name: 'Measuregrouppopulation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-population + code: { + type: require('./codeableconcept.input.js'), + description: 'The type of population criteria.', + }, + _name: { + type: require('./element.input.js'), + description: 'Optional name or short description of this population.', + }, + name: { + type: GraphQLString, + description: 'Optional name or short description of this population.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The human readable description of this population criteria.', + }, + description: { + type: GraphQLString, + description: + 'The human readable description of this population criteria.', + }, + _criteria: { + type: require('./element.input.js'), + description: + 'The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.', + }, + criteria: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measuregroupstratifier.input.js b/src/resources/3_0_1/inputs/measuregroupstratifier.input.js index d902589c..4fb8fca8 100644 --- a/src/resources/3_0_1/inputs/measuregroupstratifier.input.js +++ b/src/resources/3_0_1/inputs/measuregroupstratifier.input.js @@ -1,42 +1,61 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Measure.group.stratifier Input Schema + * @summary Measuregroupstratifier Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureGroupStratifier_Input', - description: - 'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'The identifier for the stratifier used to coordinate the reported data back to this stratifier.', - }, - criteria: { - type: GraphQLString, - description: - 'The criteria for the stratifier. This must be the name of an expression defined within a referenced library.', - }, - _criteria: { - type: require('./element.input'), - description: - 'The criteria for the stratifier. This must be the name of an expression defined within a referenced library.', - }, - path: { - type: GraphQLString, - description: - 'The path to an element that defines the stratifier, specified as a valid FHIR resource path.', - }, - _path: { - type: require('./element.input'), - description: - 'The path to an element that defines the stratifier, specified as a valid FHIR resource path.', - }, - }), + name: 'Measuregroupstratifier_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'The identifier for the stratifier used to coordinate the reported data back to this stratifier.', + }, + _criteria: { + type: require('./element.input.js'), + description: + 'The criteria for the stratifier. This must be the name of an expression defined within a referenced library.', + }, + criteria: { + type: GraphQLString, + description: + 'The criteria for the stratifier. This must be the name of an expression defined within a referenced library.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The path to an element that defines the stratifier, specified as a valid FHIR resource path.', + }, + path: { + type: GraphQLString, + description: + 'The path to an element that defines the stratifier, specified as a valid FHIR resource path.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measurereport.input.js b/src/resources/3_0_1/inputs/measurereport.input.js index c8e29df2..82e42105 100644 --- a/src/resources/3_0_1/inputs/measurereport.input.js +++ b/src/resources/3_0_1/inputs/measurereport.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 MeasureReportResourceInputType = new GraphQLEnumType({ - name: 'MeasureReportResourceInputType', - values: { - MeasureReport: { value: 'MeasureReport' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,76 +16,133 @@ let MeasureReportResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MeasureReport_Input', - description: 'Base StructureDefinition for MeasureReport Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MeasureReportResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'A formal identifier that is used to identify this report when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-report-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The report status. No data will be available until the report status is complete.', - }, - _status: { - type: require('./element.input'), - description: - 'The report status. No data will be available until the report status is complete.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-report-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - "The type of measure report. This may be an individual report, which provides a single patient's score for the measure; a patient listing, which returns the list of patients that meet the various criteria in the measure; or a summary report, which returns a population count for each of the criteria in the measure.", - }, - _type: { - type: require('./element.input'), - description: - "The type of measure report. This may be an individual report, which provides a single patient's score for the measure; a patient listing, which returns the list of patients that meet the various criteria in the measure; or a summary report, which returns a population count for each of the criteria in the measure.", - }, - measure: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the Measure that was evaluated to produce this report.', - }, - patient: { - type: require('./reference.input'), - description: - 'Optional Patient if the report was requested for a single patient.', - }, - date: { - type: DateTimeScalar, - description: 'The date this measure report was generated.', - }, - _date: { - type: require('./element.input'), - description: 'The date this measure report was generated.', - }, - reportingOrganization: { - type: require('./reference.input'), - description: 'Reporting Organization.', - }, - period: { - type: new GraphQLNonNull(require('./period.input')), - description: - 'The reporting period for which the report was calculated.', - }, - group: { - type: new GraphQLList(require('./measurereportgroup.input')), - description: - 'The results of the calculation, one for each population group in the measure.', - }, - evaluatedResources: { - type: require('./reference.input'), - description: - 'A reference to a Bundle containing the Resources that were used in the evaluation of this report.', - }, - }), + description: 'Base StructureDefinition for MeasureReport Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MeasureReport_Enum_input', + values: { MeasureReport: { value: 'MeasureReport' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'A formal identifier that is used to identify this report when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The report status. No data will be available until the report status is complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-report-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The report status. No data will be available until the report status is complete.', + }, + _type: { + type: require('./element.input.js'), + description: + "The type of measure report. This may be an individual report, which provides a single patient's score for the measure; a patient listing, which returns the list of patients that meet the various criteria in the measure; or a summary report, which returns a population count for each of the criteria in the measure.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-report-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "The type of measure report. This may be an individual report, which provides a single patient's score for the measure; a patient listing, which returns the list of patients that meet the various criteria in the measure; or a summary report, which returns a population count for each of the criteria in the measure.", + }, + measure: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the Measure that was evaluated to produce this report.', + }, + patient: { + type: GraphQLString, + description: + 'Optional Patient if the report was requested for a single patient.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date this measure report was generated.', + }, + date: { + type: DateTimeScalar, + description: 'The date this measure report was generated.', + }, + reportingOrganization: { + type: GraphQLString, + description: 'Reporting Organization.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The reporting period for which the report was calculated.', + }, + group: { + type: new GraphQLList(require('./measurereportgroup.input.js')), + description: + 'The results of the calculation, one for each population group in the measure.', + }, + evaluatedResources: { + type: GraphQLString, + description: + 'A reference to a Bundle containing the Resources that were used in the evaluation of this report.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measurereportgroup.input.js b/src/resources/3_0_1/inputs/measurereportgroup.input.js index 8a714deb..16b644bd 100644 --- a/src/resources/3_0_1/inputs/measurereportgroup.input.js +++ b/src/resources/3_0_1/inputs/measurereportgroup.input.js @@ -1,47 +1,63 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MeasureReport.group Input Schema + * @summary MeasureReportgroup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureReportGroup_Input', - description: - 'The results of the calculation, one for each population group in the measure.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: - 'The identifier of the population group as defined in the measure definition.', - }, - population: { - type: new GraphQLList(require('./measurereportgrouppopulation.input')), - description: - 'The populations that make up the population group, one for each type of population appropriate for the measure.', - }, - measureScore: { - type: GraphQLFloat, - description: - 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', - }, - _measureScore: { - type: require('./element.input'), - description: - 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', - }, - stratifier: { - type: new GraphQLList(require('./measurereportgroupstratifier.input')), - description: - 'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.', - }, - }), + name: 'MeasureReportgroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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 GraphQLNonNull(require('./identifier.input.js')), + description: + 'The identifier of the population group as defined in the measure definition.', + }, + population: { + type: new GraphQLList(require('./measurereportgrouppopulation.input.js')), + description: + 'The populations that make up the population group, one for each type of population appropriate for the measure.', + }, + _measureScore: { + type: require('./element.input.js'), + description: + 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', + }, + measureScore: { + type: GraphQLFloat, + description: + 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', + }, + stratifier: { + type: new GraphQLList(require('./measurereportgroupstratifier.input.js')), + description: + 'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measurereportgrouppopulation.input.js b/src/resources/3_0_1/inputs/measurereportgrouppopulation.input.js index 57e1b250..ef3f5066 100644 --- a/src/resources/3_0_1/inputs/measurereportgrouppopulation.input.js +++ b/src/resources/3_0_1/inputs/measurereportgrouppopulation.input.js @@ -1,39 +1,59 @@ -const { GraphQLInputObjectType, GraphQLInt } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary MeasureReport.group.population Input Schema + * @summary MeasureReportgrouppopulation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureReportGroupPopulation_Input', - description: - 'The populations that make up the population group, one for each type of population appropriate for the measure.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'The identifier of the population being reported, as defined by the population element of the measure.', - }, - code: { - type: require('./codeableconcept.input'), - description: 'The type of the population.', - }, - count: { - type: GraphQLInt, - description: 'The number of members of the population.', - }, - _count: { - type: require('./element.input'), - description: 'The number of members of the population.', - }, - patients: { - type: require('./reference.input'), - description: - 'This element refers to a List of patient level MeasureReport resources, one for each patient in this population.', - }, - }), + name: 'MeasureReportgrouppopulation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'The identifier of the population being reported, as defined by the population element of the measure.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The type of the population.', + }, + _count: { + type: require('./element.input.js'), + description: 'The number of members of the population.', + }, + count: { + type: GraphQLInt, + description: 'The number of members of the population.', + }, + patients: { + type: GraphQLString, + description: + 'This element refers to a List of patient level MeasureReport resources, one for each patient in this population.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measurereportgroupstratifier.input.js b/src/resources/3_0_1/inputs/measurereportgroupstratifier.input.js index efb780ca..d00c66d3 100644 --- a/src/resources/3_0_1/inputs/measurereportgroupstratifier.input.js +++ b/src/resources/3_0_1/inputs/measurereportgroupstratifier.input.js @@ -1,29 +1,48 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary MeasureReport.group.stratifier Input Schema + * @summary MeasureReportgroupstratifier Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureReportGroupStratifier_Input', - description: - 'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'The identifier of this stratifier, as defined in the measure definition.', - }, - stratum: { - type: new GraphQLList( - require('./measurereportgroupstratifierstratum.input'), - ), - description: - 'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.', - }, - }), + name: 'MeasureReportgroupstratifier_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'The identifier of this stratifier, as defined in the measure definition.', + }, + stratum: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratum.input.js'), + ), + description: + 'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measurereportgroupstratifierstratum.input.js b/src/resources/3_0_1/inputs/measurereportgroupstratifierstratum.input.js index 24189e19..58ec0c66 100644 --- a/src/resources/3_0_1/inputs/measurereportgroupstratifierstratum.input.js +++ b/src/resources/3_0_1/inputs/measurereportgroupstratifierstratum.input.js @@ -1,50 +1,65 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MeasureReport.group.stratifier.stratum Input Schema + * @summary MeasureReportgroupstratifierstratum Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureReportGroupStratifierStratum_Input', - description: - 'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.', - fields: () => - extendSchema(require('./backboneelement.input'), { - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', - }, - _value: { - type: require('./element.input'), - description: - 'The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', - }, - population: { - type: new GraphQLList( - require('./measurereportgroupstratifierstratumpopulation.input'), - ), - description: - 'The populations that make up the stratum, one for each type of population appropriate to the measure.', - }, - measureScore: { - type: GraphQLFloat, - description: - 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', - }, - _measureScore: { - type: require('./element.input'), - description: - 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', - }, - }), + name: 'MeasureReportgroupstratifierstratum_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', + }, + population: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratumpopulation.input.js'), + ), + description: + 'The populations that make up the stratum, one for each type of population appropriate to the measure.', + }, + _measureScore: { + type: require('./element.input.js'), + description: + 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', + }, + measureScore: { + type: GraphQLFloat, + description: + 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measurereportgroupstratifierstratumpopulation.input.js b/src/resources/3_0_1/inputs/measurereportgroupstratifierstratumpopulation.input.js index d94ff3c5..05b55e70 100644 --- a/src/resources/3_0_1/inputs/measurereportgroupstratifierstratumpopulation.input.js +++ b/src/resources/3_0_1/inputs/measurereportgroupstratifierstratumpopulation.input.js @@ -1,39 +1,59 @@ -const { GraphQLInputObjectType, GraphQLInt } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary MeasureReport.group.stratifier.stratum.population Input Schema + * @summary MeasureReportgroupstratifierstratumpopulation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureReportGroupStratifierStratumPopulation_Input', - description: - 'The populations that make up the stratum, one for each type of population appropriate to the measure.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'The identifier of the population being reported, as defined by the population element of the measure.', - }, - code: { - type: require('./codeableconcept.input'), - description: 'The type of the population.', - }, - count: { - type: GraphQLInt, - description: 'The number of members of the population in this stratum.', - }, - _count: { - type: require('./element.input'), - description: 'The number of members of the population in this stratum.', - }, - patients: { - type: require('./reference.input'), - description: - 'This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.', - }, - }), + name: 'MeasureReportgroupstratifierstratumpopulation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'The identifier of the population being reported, as defined by the population element of the measure.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The type of the population.', + }, + _count: { + type: require('./element.input.js'), + description: 'The number of members of the population in this stratum.', + }, + count: { + type: GraphQLInt, + description: 'The number of members of the population in this stratum.', + }, + patients: { + type: GraphQLString, + description: + 'This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/measuresupplementaldata.input.js b/src/resources/3_0_1/inputs/measuresupplementaldata.input.js index 5cee009b..d0a6430c 100644 --- a/src/resources/3_0_1/inputs/measuresupplementaldata.input.js +++ b/src/resources/3_0_1/inputs/measuresupplementaldata.input.js @@ -1,51 +1,66 @@ const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Measure.supplementalData Input Schema + * @summary MeasuresupplementalData Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MeasureSupplementalData_Input', - description: - 'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: 'An identifier for the supplemental data.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-data-usage - usage: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.', - }, - criteria: { - type: GraphQLString, - description: - 'The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.', - }, - _criteria: { - type: require('./element.input'), - description: - 'The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.', - }, - path: { - type: GraphQLString, - description: - 'The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.', - }, - _path: { - type: require('./element.input'), - description: - 'The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.', - }, - }), + name: 'MeasuresupplementalData_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: 'An identifier for the supplemental data.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-data-usage + usage: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.', + }, + _criteria: { + type: require('./element.input.js'), + description: + 'The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.', + }, + criteria: { + type: GraphQLString, + description: + 'The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.', + }, + path: { + type: GraphQLString, + description: + 'The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/media.input.js b/src/resources/3_0_1/inputs/media.input.js index 104db787..b62e8dad 100644 --- a/src/resources/3_0_1/inputs/media.input.js +++ b/src/resources/3_0_1/inputs/media.input.js @@ -1,24 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.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 MediaResourceInputType = new GraphQLEnumType({ - name: 'MediaResourceInputType', - values: { - Media: { value: 'Media' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -26,132 +18,189 @@ let MediaResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Media_Input', - description: 'Base StructureDefinition for Media Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MediaResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A procedure that is fulfilled in whole or in part by the creation of this media.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/digital-media-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether the media is a photo (still image), an audio recording, or a video recording.', - }, - _type: { - type: require('./element.input'), - description: - 'Whether the media is a photo (still image), an audio recording, or a video recording.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/digital-media-subtype - subtype: { - type: require('./codeableconcept.input'), - description: - 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/media-view - view: { - type: require('./codeableconcept.input'), - description: - 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', - }, - subject: { - type: require('./reference.input'), - description: 'Who/What this Media is a record of.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode of care that establishes the context for this media.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'The date and time(s) at which the media was collected.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: 'The date and time(s) at which the media was collected.', - }, - occurrencePeriod: { - type: require('./period.input'), - description: 'The date and time(s) at which the media was collected.', - }, - operator: { - type: require('./reference.input'), - description: 'The person who administered the collection of the image.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Describes why the event occurred in coded or textual form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.input'), - description: - "Indicates the site on the subject's body where the media was collected (i.e. the target site).", - }, - device: { - type: require('./reference.input'), - description: 'The device used to collect the media.', - }, - height: { - type: PositiveIntScalar, - description: 'Height of the image in pixels (photo/video).', - }, - _height: { - type: require('./element.input'), - description: 'Height of the image in pixels (photo/video).', - }, - width: { - type: PositiveIntScalar, - description: 'Width of the image in pixels (photo/video).', - }, - _width: { - type: require('./element.input'), - description: 'Width of the image in pixels (photo/video).', - }, - frames: { - type: PositiveIntScalar, - description: - 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', - }, - _frames: { - type: require('./element.input'), - description: - 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', - }, - duration: { - type: UnsignedIntScalar, - description: - 'The duration of the recording in seconds - for audio and video.', - }, - _duration: { - type: require('./element.input'), - description: - 'The duration of the recording in seconds - for audio and video.', - }, - content: { - type: new GraphQLNonNull(require('./attachment.input')), - description: - 'The actual content of the media - inline or by direct reference to the media source file.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Comments made about the media by the performer, subject or other participants.', - }, - }), + description: 'Base StructureDefinition for Media Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Media_Enum_input', + values: { Media: { value: 'Media' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A procedure that is fulfilled in whole or in part by the creation of this media.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Whether the media is a photo (still image), an audio recording, or a video recording.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/digital-media-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the media is a photo (still image), an audio recording, or a video recording.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/digital-media-subtype + subtype: { + type: require('./codeableconcept.input.js'), + description: + 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/media-view + view: { + type: require('./codeableconcept.input.js'), + description: + 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', + }, + subject: { + type: GraphQLString, + description: 'Who/What this Media is a record of.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care that establishes the context for this media.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'The date and time(s) at which the media was collected.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The date and time(s) at which the media was collected.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'The date and time(s) at which the media was collected.', + }, + operator: { + type: GraphQLString, + description: 'The person who administered the collection of the image.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Describes why the event occurred in coded or textual form.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the site on the subject's body where the media was collected (i.e. the target site).", + }, + device: { + type: GraphQLString, + description: 'The device used to collect the media.', + }, + _height: { + type: require('./element.input.js'), + description: 'Height of the image in pixels (photo/video).', + }, + height: { + type: PositiveIntScalar, + description: 'Height of the image in pixels (photo/video).', + }, + _width: { + type: require('./element.input.js'), + description: 'Width of the image in pixels (photo/video).', + }, + width: { + type: PositiveIntScalar, + description: 'Width of the image in pixels (photo/video).', + }, + _frames: { + type: require('./element.input.js'), + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + frames: { + type: PositiveIntScalar, + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + _duration: { + type: require('./element.input.js'), + description: + 'The duration of the recording in seconds - for audio and video.', + }, + duration: { + type: UnsignedIntScalar, + description: + 'The duration of the recording in seconds - for audio and video.', + }, + content: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The actual content of the media - inline or by direct reference to the media source file.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the media by the performer, subject or other participants.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medication.input.js b/src/resources/3_0_1/inputs/medication.input.js index 39940682..eaccd9b9 100644 --- a/src/resources/3_0_1/inputs/medication.input.js +++ b/src/resources/3_0_1/inputs/medication.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationResourceInputType = new GraphQLEnumType({ - name: 'MedicationResourceInputType', - values: { - Medication: { value: 'Medication' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -24,72 +16,128 @@ let MedicationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Medication_Input', - description: 'Base StructureDefinition for Medication Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - code: { - type: require('./codeableconcept.input'), - description: - 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-status - status: { - type: CodeScalar, - description: 'A code to indicate if the medication is in active use.', - }, - _status: { - type: require('./element.input'), - description: 'A code to indicate if the medication is in active use.', - }, - isBrand: { - type: GraphQLBoolean, - description: - 'Set to true if the item is attributable to a specific manufacturer.', - }, - _isBrand: { - type: require('./element.input'), - description: - 'Set to true if the item is attributable to a specific manufacturer.', - }, - isOverTheCounter: { - type: GraphQLBoolean, - description: - 'Set to true if the medication can be obtained without an order from a prescriber.', - }, - _isOverTheCounter: { - type: require('./element.input'), - description: - 'Set to true if the medication can be obtained without an order from a prescriber.', - }, - manufacturer: { - type: require('./reference.input'), - description: - 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-form-codes - form: { - type: require('./codeableconcept.input'), - description: - 'Describes the form of the item. Powder; tablets; capsule.', - }, - ingredient: { - type: new GraphQLList(require('./medicationingredient.input')), - description: - 'Identifies a particular constituent of interest in the product.', - }, - package: { - type: require('./medicationpackage.input'), - description: - 'Information that only applies to packages (not products).', - }, - image: { - type: new GraphQLList(require('./attachment.input')), - description: 'Photo(s) or graphic representation(s) of the medication.', - }, - }), + description: 'Base StructureDefinition for Medication Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Medication_Enum_input', + values: { Medication: { value: 'Medication' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code to indicate if the medication is in active use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-status + status: { + type: CodeScalar, + description: 'A code to indicate if the medication is in active use.', + }, + _isBrand: { + type: require('./element.input.js'), + description: + 'Set to true if the item is attributable to a specific manufacturer.', + }, + isBrand: { + type: GraphQLBoolean, + description: + 'Set to true if the item is attributable to a specific manufacturer.', + }, + _isOverTheCounter: { + type: require('./element.input.js'), + description: + 'Set to true if the medication can be obtained without an order from a prescriber.', + }, + isOverTheCounter: { + type: GraphQLBoolean, + description: + 'Set to true if the medication can be obtained without an order from a prescriber.', + }, + manufacturer: { + type: GraphQLString, + description: + 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-form-codes + form: { + type: require('./codeableconcept.input.js'), + description: 'Describes the form of the item. Powder; tablets; capsule.', + }, + ingredient: { + type: new GraphQLList(require('./medicationingredient.input.js')), + description: + 'Identifies a particular constituent of interest in the product.', + }, + package: { + type: require('./medicationpackage.input.js'), + description: 'Information that only applies to packages (not products).', + }, + image: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Photo(s) or graphic representation(s) of the medication.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationadministration.input.js b/src/resources/3_0_1/inputs/medicationadministration.input.js index f7126164..2c911840 100644 --- a/src/resources/3_0_1/inputs/medicationadministration.input.js +++ b/src/resources/3_0_1/inputs/medicationadministration.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationAdministrationResourceInputType = new GraphQLEnumType({ - name: 'MedicationAdministrationResourceInputType', - values: { - MedicationAdministration: { value: 'MedicationAdministration' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,144 +17,203 @@ let MedicationAdministrationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MedicationAdministration_Input', - description: - 'Base StructureDefinition for MedicationAdministration Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationAdministrationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: - 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this event.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: - 'A larger event of which this particular event is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', - }, - _status: { - type: require('./element.input'), - description: - 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-category - category: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of medication administration and where the medication is expected to be consumed or administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The person or animal or group receiving the medication.', - }, - context: { - type: require('./reference.input'), - description: - 'The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Additional information (for example, patient height and weight) that supports the administration of the medication.', - }, - effectiveDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - _effectiveDateTime: { - type: require('./element.input'), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - effectivePeriod: { - type: new GraphQLNonNull(require('./period.input')), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - performer: { - type: new GraphQLList( - require('./medicationadministrationperformer.input'), - ), - description: - 'The individual who was responsible for giving the medication to the patient.', - }, - notGiven: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the medication was NOT administered.', - }, - _notGiven: { - type: require('./element.input'), - description: - 'Set this to true if the record is saying that the medication was NOT administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes - reasonNotGiven: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A code indicating why the administration was not performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-given-codes - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'A code indicating why the medication was given.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Condition or observation that supports why the medication was administered.', - }, - prescription: { - type: require('./reference.input'), - description: - 'The original request, instruction or authority to perform the administration.', - }, - device: { - type: new GraphQLList(require('./reference.input')), - description: - 'The device used in administering the medication to the patient. For example, a particular infusion pump.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Extra information about the medication administration that is not conveyed by the other attributes.', - }, - dosage: { - type: require('./medicationadministrationdosage.input'), - description: - 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', - }, - eventHistory: { - type: new GraphQLList(require('./reference.input')), - description: - 'A summary of the events of interest that have occurred, such as when the administration was verified.', - }, - }), + description: 'Base StructureDefinition for MedicationAdministration Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationAdministration_Enum_input', + values: { + MedicationAdministration: { value: 'MedicationAdministration' }, + }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of medication administration and where the medication is expected to be consumed or administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person or animal or group receiving the medication.', + }, + context: { + type: GraphQLString, + description: + 'The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Additional information (for example, patient height and weight) that supports the administration of the medication.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectiveDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectivePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + performer: { + type: new GraphQLList( + require('./medicationadministrationperformer.input.js'), + ), + description: + 'The individual who was responsible for giving the medication to the patient.', + }, + _notGiven: { + type: require('./element.input.js'), + description: + 'Set this to true if the record is saying that the medication was NOT administered.', + }, + notGiven: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the medication was NOT administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes + reasonNotGiven: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code indicating why the administration was not performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-given-codes + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A code indicating why the medication was given.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Condition or observation that supports why the medication was administered.', + }, + prescription: { + type: GraphQLString, + description: + 'The original request, instruction or authority to perform the administration.', + }, + device: { + type: new GraphQLList(GraphQLString), + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the medication administration that is not conveyed by the other attributes.', + }, + dosage: { + type: require('./medicationadministrationdosage.input.js'), + description: + 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', + }, + eventHistory: { + type: new GraphQLList(GraphQLString), + description: + 'A summary of the events of interest that have occurred, such as when the administration was verified.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationadministrationdosage.input.js b/src/resources/3_0_1/inputs/medicationadministrationdosage.input.js index 0c4e89e5..8f8d5a50 100644 --- a/src/resources/3_0_1/inputs/medicationadministrationdosage.input.js +++ b/src/resources/3_0_1/inputs/medicationadministrationdosage.input.js @@ -1,60 +1,79 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary MedicationAdministration.dosage Input Schema + * @summary MedicationAdministrationdosage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationAdministrationDosage_Input', - description: - 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - text: { - type: GraphQLString, - description: - 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', - }, - _text: { - type: require('./element.input'), - description: - 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - site: { - type: require('./codeableconcept.input'), - description: - "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.input'), - description: - 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administration-method-codes - method: { - type: require('./codeableconcept.input'), - description: - 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', - }, - dose: { - type: require('./quantity.input'), - description: - 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', - }, - rateRatio: { - type: require('./ratio.input'), - description: - 'Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', - }, - rateQuantity: { - type: require('./quantity.input'), - description: - 'Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', - }, - }), + name: 'MedicationAdministrationdosage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + site: { + type: require('./codeableconcept.input.js'), + description: + "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.input.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administration-method-codes + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', + }, + dose: { + type: require('./quantity.input.js'), + description: + 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + 'Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', + }, + rateQuantity: { + type: require('./quantity.input.js'), + description: + 'Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationadministrationperformer.input.js b/src/resources/3_0_1/inputs/medicationadministrationperformer.input.js index 1b9e7ae0..4aa1cbf1 100644 --- a/src/resources/3_0_1/inputs/medicationadministrationperformer.input.js +++ b/src/resources/3_0_1/inputs/medicationadministrationperformer.input.js @@ -1,26 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary MedicationAdministration.performer Input Schema + * @summary MedicationAdministrationperformer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationAdministrationPerformer_Input', - description: - 'The individual who was responsible for giving the medication to the patient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The device, practitioner, etc. who performed the action.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'MedicationAdministrationperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: 'The device, practitioner, etc. who performed the action.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationdispense.input.js b/src/resources/3_0_1/inputs/medicationdispense.input.js index c6b7f619..477f476b 100644 --- a/src/resources/3_0_1/inputs/medicationdispense.input.js +++ b/src/resources/3_0_1/inputs/medicationdispense.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationDispenseResourceInputType = new GraphQLEnumType({ - name: 'MedicationDispenseResourceInputType', - values: { - MedicationDispense: { value: 'MedicationDispense' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,161 +17,216 @@ let MedicationDispenseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MedicationDispense_Input', - description: 'Base StructureDefinition for MedicationDispense Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationDispenseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: 'The procedure that the dispense is done because of.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-status - status: { - type: CodeScalar, - description: - 'A code specifying the state of the set of dispense events.', - }, - _status: { - type: require('./element.input'), - description: - 'A code specifying the state of the set of dispense events.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-category - category: { - type: require('./codeableconcept.input'), - description: - 'Indicates type of medication dispense and where the medication is expected to be consumed or administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - subject: { - type: require('./reference.input'), - description: - 'A link to a resource representing the person or the group to whom the medication will be given.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode of care that establishes the context for this event.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Additional information that supports the medication being dispensed.', - }, - performer: { - type: new GraphQLList(require('./medicationdispenseperformer.input')), - description: - 'Indicates who or what performed the event. It should be assumed that the performer is the dispenser of the medication.', - }, - authorizingPrescription: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates the medication order that is being dispensed against.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType - type: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The amount of medication that has been dispensed. Includes unit of measure.', - }, - daysSupply: { - type: require('./quantity.input'), - description: 'The amount of medication expressed as a timing amount.', - }, - whenPrepared: { - type: DateTimeScalar, - description: - 'The time when the dispensed product was packaged and reviewed.', - }, - _whenPrepared: { - type: require('./element.input'), - description: - 'The time when the dispensed product was packaged and reviewed.', - }, - whenHandedOver: { - type: DateTimeScalar, - description: - 'The time the dispensed product was provided to the patient or their representative.', - }, - _whenHandedOver: { - type: require('./element.input'), - description: - 'The time the dispensed product was provided to the patient or their representative.', - }, - destination: { - type: require('./reference.input'), - description: - 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', - }, - receiver: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Extra information about the dispense that could not be conveyed in the other attributes.', - }, - dosageInstruction: { - type: new GraphQLList(require('./dosage.input')), - description: - 'Indicates how the medication is to be used by the patient.', - }, - substitution: { - type: require('./medicationdispensesubstitution.input'), - description: - 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.', - }, - detectedIssue: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', - }, - notDone: { - type: GraphQLBoolean, - description: 'True if the dispense was not performed for some reason.', - }, - _notDone: { - type: require('./element.input'), - description: 'True if the dispense was not performed for some reason.', - }, - notDoneReasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'Indicates the reason why a dispense was not performed.', - }, - notDoneReasonReference: { - type: require('./reference.input'), - description: 'Indicates the reason why a dispense was not performed.', - }, - eventHistory: { - type: new GraphQLList(require('./reference.input')), - description: - 'A summary of the events of interest that have occurred, such as when the dispense was verified.', - }, - }), + description: 'Base StructureDefinition for MedicationDispense Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationDispense_Enum_input', + values: { MedicationDispense: { value: 'MedicationDispense' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: 'The procedure that the dispense is done because of.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code specifying the state of the set of dispense events.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-status + status: { + type: CodeScalar, + description: 'A code specifying the state of the set of dispense events.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates type of medication dispense and where the medication is expected to be consumed or administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: GraphQLString, + description: + 'A link to a resource representing the person or the group to whom the medication will be given.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care that establishes the context for this event.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Additional information that supports the medication being dispensed.', + }, + performer: { + type: new GraphQLList(require('./medicationdispenseperformer.input.js')), + description: + 'Indicates who or what performed the event. It should be assumed that the performer is the dispenser of the medication.', + }, + authorizingPrescription: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the medication order that is being dispensed against.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType + type: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The amount of medication that has been dispensed. Includes unit of measure.', + }, + daysSupply: { + type: require('./quantity.input.js'), + description: 'The amount of medication expressed as a timing amount.', + }, + _whenPrepared: { + type: require('./element.input.js'), + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + whenPrepared: { + type: DateTimeScalar, + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + _whenHandedOver: { + type: require('./element.input.js'), + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + whenHandedOver: { + type: DateTimeScalar, + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + destination: { + type: GraphQLString, + description: + 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the dispense that could not be conveyed in the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList(require('./dosage.input.js')), + description: 'Indicates how the medication is to be used by the patient.', + }, + substitution: { + type: require('./medicationdispensesubstitution.input.js'), + description: + 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.', + }, + detectedIssue: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + }, + _notDone: { + type: require('./element.input.js'), + description: 'True if the dispense was not performed for some reason.', + }, + notDone: { + type: GraphQLBoolean, + description: 'True if the dispense was not performed for some reason.', + }, + notDoneReasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the reason why a dispense was not performed.', + }, + notDoneReasonReference: { + type: GraphQLString, + description: 'Indicates the reason why a dispense was not performed.', + }, + eventHistory: { + type: new GraphQLList(GraphQLString), + description: + 'A summary of the events of interest that have occurred, such as when the dispense was verified.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationdispenseperformer.input.js b/src/resources/3_0_1/inputs/medicationdispenseperformer.input.js index 706a5e6c..89c35522 100644 --- a/src/resources/3_0_1/inputs/medicationdispenseperformer.input.js +++ b/src/resources/3_0_1/inputs/medicationdispenseperformer.input.js @@ -1,27 +1,47 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary MedicationDispense.performer Input Schema + * @summary MedicationDispenseperformer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationDispensePerformer_Input', - description: - 'Indicates who or what performed the event. It should be assumed that the performer is the dispenser of the medication.', - fields: () => - extendSchema(require('./backboneelement.input'), { - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'MedicationDispenseperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationdispensesubstitution.input.js b/src/resources/3_0_1/inputs/medicationdispensesubstitution.input.js index fbe4d9e5..cbcb54b9 100644 --- a/src/resources/3_0_1/inputs/medicationdispensesubstitution.input.js +++ b/src/resources/3_0_1/inputs/medicationdispensesubstitution.input.js @@ -1,49 +1,65 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MedicationDispense.substitution Input Schema + * @summary MedicationDispensesubstitution Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationDispenseSubstitution_Input', - description: - 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.', - fields: () => - extendSchema(require('./backboneelement.input'), { - wasSubstituted: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'True if the dispenser dispensed a different drug or product from what was prescribed.', - }, - _wasSubstituted: { - type: require('./element.input'), - description: - 'True if the dispenser dispensed a different drug or product from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode - type: { - type: require('./codeableconcept.input'), - description: - 'A code signifying whether a different drug was dispensed from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.', - }, - responsibleParty: { - type: new GraphQLList(require('./reference.input')), - description: - 'The person or organization that has primary responsibility for the substitution.', - }, - }), + name: 'MedicationDispensesubstitution_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _wasSubstituted: { + type: require('./element.input.js'), + description: + 'True if the dispenser dispensed a different drug or product from what was prescribed.', + }, + wasSubstituted: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if the dispenser dispensed a different drug or product from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode + type: { + type: require('./codeableconcept.input.js'), + description: + 'A code signifying whether a different drug was dispensed from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.', + }, + responsibleParty: { + type: new GraphQLList(GraphQLString), + description: + 'The person or organization that has primary responsibility for the substitution.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationingredient.input.js b/src/resources/3_0_1/inputs/medicationingredient.input.js index 346fb8a2..1ed460d1 100644 --- a/src/resources/3_0_1/inputs/medicationingredient.input.js +++ b/src/resources/3_0_1/inputs/medicationingredient.input.js @@ -1,46 +1,63 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Medication.ingredient Input Schema + * @summary Medicationingredient Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationIngredient_Input', - description: - 'Identifies a particular constituent of interest in the product.', - fields: () => - extendSchema(require('./backboneelement.input'), { - itemCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'The actual ingredient - either a substance (simple ingredient) or another medication.', - }, - itemReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The actual ingredient - either a substance (simple ingredient) or another medication.', - }, - isActive: { - type: GraphQLBoolean, - description: - 'Indication of whether this ingredient affects the therapeutic action of the drug.', - }, - _isActive: { - type: require('./element.input'), - description: - 'Indication of whether this ingredient affects the therapeutic action of the drug.', - }, - amount: { - type: require('./ratio.input'), - description: - 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.', - }, - }), + name: 'Medicationingredient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + itemReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + _isActive: { + type: require('./element.input.js'), + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + isActive: { + type: GraphQLBoolean, + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + amount: { + type: require('./ratio.input.js'), + description: + 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationpackage.input.js b/src/resources/3_0_1/inputs/medicationpackage.input.js index faea5f53..60faa9f2 100644 --- a/src/resources/3_0_1/inputs/medicationpackage.input.js +++ b/src/resources/3_0_1/inputs/medicationpackage.input.js @@ -1,31 +1,50 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Medication.package Input Schema + * @summary Medicationpackage Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationPackage_Input', - description: 'Information that only applies to packages (not products).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-package-form - container: { - type: require('./codeableconcept.input'), - description: 'The kind of container that this package comes as.', - }, - content: { - type: new GraphQLList(require('./medicationpackagecontent.input')), - description: - 'A set of components that go to make up the described item.', - }, - batch: { - type: new GraphQLList(require('./medicationpackagebatch.input')), - description: - 'Information about a group of medication produced or packaged from one production run.', - }, - }), + name: 'Medicationpackage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-package-form + container: { + type: require('./codeableconcept.input.js'), + description: 'The kind of container that this package comes as.', + }, + content: { + type: new GraphQLList(require('./medicationpackagecontent.input.js')), + description: 'A set of components that go to make up the described item.', + }, + batch: { + type: new GraphQLList(require('./medicationpackagebatch.input.js')), + description: + 'Information about a group of medication produced or packaged from one production run.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationpackagebatch.input.js b/src/resources/3_0_1/inputs/medicationpackagebatch.input.js index a3e09a67..692dc02e 100644 --- a/src/resources/3_0_1/inputs/medicationpackagebatch.input.js +++ b/src/resources/3_0_1/inputs/medicationpackagebatch.input.js @@ -1,36 +1,55 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Medication.package.batch Input Schema + * @summary Medicationpackagebatch Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationPackageBatch_Input', - description: - 'Information about a group of medication produced or packaged from one production run.', - fields: () => - extendSchema(require('./backboneelement.input'), { - lotNumber: { - type: GraphQLString, - description: - 'The assigned lot number of a batch of the specified product.', - }, - _lotNumber: { - type: require('./element.input'), - description: - 'The assigned lot number of a batch of the specified product.', - }, - expirationDate: { - type: DateTimeScalar, - description: 'When this specific batch of product will expire.', - }, - _expirationDate: { - type: require('./element.input'), - description: 'When this specific batch of product will expire.', - }, - }), + name: 'Medicationpackagebatch_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _lotNumber: { + type: require('./element.input.js'), + description: + 'The assigned lot number of a batch of the specified product.', + }, + lotNumber: { + type: GraphQLString, + description: + 'The assigned lot number of a batch of the specified product.', + }, + _expirationDate: { + type: require('./element.input.js'), + description: 'When this specific batch of product will expire.', + }, + expirationDate: { + type: DateTimeScalar, + description: 'When this specific batch of product will expire.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationpackagecontent.input.js b/src/resources/3_0_1/inputs/medicationpackagecontent.input.js index 1df96da8..1f9f2fa6 100644 --- a/src/resources/3_0_1/inputs/medicationpackagecontent.input.js +++ b/src/resources/3_0_1/inputs/medicationpackagecontent.input.js @@ -1,28 +1,49 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Medication.package.content Input Schema + * @summary Medicationpackagecontent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationPackageContent_Input', - description: 'A set of components that go to make up the described item.', - fields: () => - extendSchema(require('./backboneelement.input'), { - itemCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Identifies one of the items in the package.', - }, - itemReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Identifies one of the items in the package.', - }, - amount: { - type: require('./quantity.input'), - description: 'The amount of the product that is in the package.', - }, - }), + name: 'Medicationpackagecontent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Identifies one of the items in the package.', + }, + itemReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Identifies one of the items in the package.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'The amount of the product that is in the package.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationrequest.input.js b/src/resources/3_0_1/inputs/medicationrequest.input.js index 1ad41722..97754417 100644 --- a/src/resources/3_0_1/inputs/medicationrequest.input.js +++ b/src/resources/3_0_1/inputs/medicationrequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 MedicationRequestResourceInputType = new GraphQLEnumType({ - name: 'MedicationRequestResourceInputType', - values: { - MedicationRequest: { value: 'MedicationRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,163 +16,219 @@ let MedicationRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MedicationRequest_Input', - description: 'Base StructureDefinition for MedicationRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. For example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records must be tracked through an entire system.', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: 'Protocol or definition followed by this request.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A plan or request that is fulfilled in whole or in part by this medication request.', - }, - groupIdentifier: { - type: require('./identifier.input'), - description: - 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-request-status - status: { - type: CodeScalar, - description: - 'A code specifying the current state of the order. Generally this will be active or completed state.', - }, - _status: { - type: require('./element.input'), - description: - 'A code specifying the current state of the order. Generally this will be active or completed state.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether the request is a proposal, plan, or an original order.', - }, - _intent: { - type: require('./element.input'), - description: - 'Whether the request is a proposal, plan, or an original order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-request-category - category: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of medication order and where the medication is expected to be consumed or administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.input'), - description: - 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A link to a resource representing the person or set of individuals to whom the medication will be given.', - }, - context: { - type: require('./reference.input'), - description: - 'A link to an encounter, or episode of care, that identifies the particular occurrence or set occurrences of contact between patient and health care provider.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.input')), - description: - 'Include additional information (for example, patient height and weight) that supports the ordering of the medication.', - }, - authoredOn: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was initially written or authored on.', - }, - _authoredOn: { - type: require('./element.input'), - description: - 'The date (and perhaps time) when the prescription was initially written or authored on.', - }, - requester: { - type: require('./medicationrequestrequester.input'), - description: - 'The individual, organization or device that initiated the request and has responsibility for its activation.', - }, - recorder: { - type: require('./reference.input'), - description: - 'The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The reason or the indication for ordering the medication.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Condition or observation that supports why the medication was ordered.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Extra information about the prescription that could not be conveyed by the other attributes.', - }, - dosageInstruction: { - type: new GraphQLList(require('./dosage.input')), - description: - 'Indicates how the medication is to be used by the patient.', - }, - dispenseRequest: { - type: require('./medicationrequestdispenserequest.input'), - description: - 'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', - }, - substitution: { - type: require('./medicationrequestsubstitution.input'), - description: - "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", - }, - priorPrescription: { - type: require('./reference.input'), - description: - 'A link to a resource representing an earlier order related order or prescription.', - }, - detectedIssue: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', - }, - eventHistory: { - type: new GraphQLList(require('./reference.input')), - description: - 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', - }, - }), + description: 'Base StructureDefinition for MedicationRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationRequest_Enum_input', + values: { MedicationRequest: { value: 'MedicationRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. For example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records must be tracked through an entire system.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: 'Protocol or definition followed by this request.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan or request that is fulfilled in whole or in part by this medication request.', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying the current state of the order. Generally this will be active or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-request-status + status: { + type: CodeScalar, + description: + 'A code specifying the current state of the order. Generally this will be active or completed state.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Whether the request is a proposal, plan, or an original order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, or an original order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-request-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of medication order and where the medication is expected to be consumed or administered.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A link to a resource representing the person or set of individuals to whom the medication will be given.', + }, + context: { + type: GraphQLString, + description: + 'A link to an encounter, or episode of care, that identifies the particular occurrence or set occurrences of contact between patient and health care provider.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Include additional information (for example, patient height and weight) that supports the ordering of the medication.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the prescription was initially written or authored on.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was initially written or authored on.', + }, + requester: { + type: require('./medicationrequestrequester.input.js'), + description: + 'The individual, organization or device that initiated the request and has responsibility for its activation.', + }, + recorder: { + type: GraphQLString, + description: + 'The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason or the indication for ordering the medication.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Condition or observation that supports why the medication was ordered.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the prescription that could not be conveyed by the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList(require('./dosage.input.js')), + description: 'Indicates how the medication is to be used by the patient.', + }, + dispenseRequest: { + type: require('./medicationrequestdispenserequest.input.js'), + description: + 'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', + }, + substitution: { + type: require('./medicationrequestsubstitution.input.js'), + description: + "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", + }, + priorPrescription: { + type: GraphQLString, + description: + 'A link to a resource representing an earlier order related order or prescription.', + }, + detectedIssue: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + }, + eventHistory: { + type: new GraphQLList(GraphQLString), + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationrequestdispenserequest.input.js b/src/resources/3_0_1/inputs/medicationrequestdispenserequest.input.js index 40a4ac7f..69ee0e35 100644 --- a/src/resources/3_0_1/inputs/medicationrequestdispenserequest.input.js +++ b/src/resources/3_0_1/inputs/medicationrequestdispenserequest.input.js @@ -1,47 +1,66 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary MedicationRequest.dispenseRequest Input Schema + * @summary MedicationRequestdispenseRequest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationRequestDispenseRequest_Input', - description: - 'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', - fields: () => - extendSchema(require('./backboneelement.input'), { - validityPeriod: { - type: require('./period.input'), - description: - 'This indicates the validity period of a prescription (stale dating the Prescription).', - }, - numberOfRepeatsAllowed: { - type: PositiveIntScalar, - description: - "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", - }, - _numberOfRepeatsAllowed: { - type: require('./element.input'), - description: - "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", - }, - quantity: { - type: require('./quantity.input'), - description: 'The amount that is to be dispensed for one fill.', - }, - expectedSupplyDuration: { - type: require('./duration.input'), - description: - 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', - }, - performer: { - type: require('./reference.input'), - description: - 'Indicates the intended dispensing Organization specified by the prescriber.', - }, - }), + name: 'MedicationRequestdispenseRequest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + validityPeriod: { + type: require('./period.input.js'), + description: + 'This indicates the validity period of a prescription (stale dating the Prescription).', + }, + _numberOfRepeatsAllowed: { + type: require('./element.input.js'), + description: + "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", + }, + numberOfRepeatsAllowed: { + type: PositiveIntScalar, + description: + "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount that is to be dispensed for one fill.', + }, + expectedSupplyDuration: { + type: require('./duration.input.js'), + description: + 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', + }, + performer: { + type: GraphQLString, + description: + 'Indicates the intended dispensing Organization specified by the prescriber.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationrequestrequester.input.js b/src/resources/3_0_1/inputs/medicationrequestrequester.input.js index 897d6fbe..d6bfa1f2 100644 --- a/src/resources/3_0_1/inputs/medicationrequestrequester.input.js +++ b/src/resources/3_0_1/inputs/medicationrequestrequester.input.js @@ -1,27 +1,47 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary MedicationRequest.requester Input Schema + * @summary MedicationRequestrequester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationRequestRequester_Input', - description: - 'The individual, organization or device that initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - agent: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The healthcare professional responsible for authorizing the initial prescription.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'MedicationRequestrequester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + agent: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The healthcare professional responsible for authorizing the initial prescription.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationrequestsubstitution.input.js b/src/resources/3_0_1/inputs/medicationrequestsubstitution.input.js index c8c90a1f..4472ef7a 100644 --- a/src/resources/3_0_1/inputs/medicationrequestsubstitution.input.js +++ b/src/resources/3_0_1/inputs/medicationrequestsubstitution.input.js @@ -1,37 +1,54 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MedicationRequest.substitution Input Schema + * @summary MedicationRequestsubstitution Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MedicationRequestSubstitution_Input', - description: - "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", - fields: () => - extendSchema(require('./backboneelement.input'), { - allowed: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', - }, - _allowed: { - type: require('./element.input'), - description: - 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason - reason: { - type: require('./codeableconcept.input'), - description: - 'Indicates the reason for the substitution, or why substitution must or must not be performed.', - }, - }), + name: 'MedicationRequestsubstitution_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _allowed: { + type: require('./element.input.js'), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + allowed: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the reason for the substitution, or why substitution must or must not be performed.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/medicationstatement.input.js b/src/resources/3_0_1/inputs/medicationstatement.input.js index 72798116..9c913ba1 100644 --- a/src/resources/3_0_1/inputs/medicationstatement.input.js +++ b/src/resources/3_0_1/inputs/medicationstatement.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 MedicationStatementResourceInputType = new GraphQLEnumType({ - name: 'MedicationStatementResourceInputType', - values: { - MedicationStatement: { value: 'MedicationStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,137 +16,195 @@ let MedicationStatementResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MedicationStatement_Input', - description: 'Base StructureDefinition for MedicationStatement Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MedicationStatementResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A plan, proposal or order that is fulfilled in whole or in part by this event.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: - 'A larger event of which this particular event is a component or step.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode of care that establishes the context for this MedicationStatement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", - }, - _status: { - type: require('./element.input'), - description: - "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-category - category: { - type: require('./codeableconcept.input'), - description: - 'Indicates where type of medication statement and where the medication is expected to be consumed or administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - _effectiveDateTime: { - type: require('./element.input'), - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - dateAsserted: { - type: DateTimeScalar, - description: - 'The date when the medication statement was asserted by the information source.', - }, - _dateAsserted: { - type: require('./element.input'), - description: - 'The date when the medication statement was asserted by the information source.', - }, - informationSource: { - type: require('./reference.input'), - description: - 'The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g Claim or MedicationRequest.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The person, animal or group who is/was taking the medication.', - }, - derivedFrom: { - type: new GraphQLList(require('./reference.input')), - description: - 'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-taken - taken: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicator of the certainty of whether the medication was taken by the patient.', - }, - _taken: { - type: require('./element.input'), - description: - 'Indicator of the certainty of whether the medication was taken by the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-taken-codes - reasonNotTaken: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'A code indicating why the medication was not taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'A reason for why the medication is being/was taken.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Condition or observation that supports why the medication is being/was taken.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Provides extra information about the medication statement that is not conveyed by the other attributes.', - }, - dosage: { - type: new GraphQLList(require('./dosage.input')), - description: - 'Indicates how the medication is/was or should be taken by the patient.', - }, - }), + description: 'Base StructureDefinition for MedicationStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationStatement_Enum_input', + values: { MedicationStatement: { value: 'MedicationStatement' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular event is a component or step.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care that establishes the context for this MedicationStatement.', + }, + _status: { + type: require('./element.input.js'), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-category + category: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates where type of medication statement and where the medication is expected to be consumed or administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + _dateAsserted: { + type: require('./element.input.js'), + description: + 'The date when the medication statement was asserted by the information source.', + }, + dateAsserted: { + type: DateTimeScalar, + description: + 'The date when the medication statement was asserted by the information source.', + }, + informationSource: { + type: GraphQLString, + description: + 'The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g Claim or MedicationRequest.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person, animal or group who is/was taking the medication.', + }, + derivedFrom: { + type: new GraphQLList(GraphQLString), + description: + 'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.', + }, + _taken: { + type: require('./element.input.js'), + description: + 'Indicator of the certainty of whether the medication was taken by the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-taken + taken: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicator of the certainty of whether the medication was taken by the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-taken-codes + reasonNotTaken: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A code indicating why the medication was not taken.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A reason for why the medication is being/was taken.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Condition or observation that supports why the medication is being/was taken.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Provides extra information about the medication statement that is not conveyed by the other attributes.', + }, + dosage: { + type: new GraphQLList(require('./dosage.input.js')), + description: + 'Indicates how the medication is/was or should be taken by the patient.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/messagedefinition.input.js b/src/resources/3_0_1/inputs/messagedefinition.input.js index f18d83d8..06294461 100644 --- a/src/resources/3_0_1/inputs/messagedefinition.input.js +++ b/src/resources/3_0_1/inputs/messagedefinition.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MessageDefinitionResourceInputType = new GraphQLEnumType({ - name: 'MessageDefinitionResourceInputType', - values: { - MessageDefinition: { value: 'MessageDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,195 +17,250 @@ let MessageDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MessageDefinition_Input', - description: 'Base StructureDefinition for MessageDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MessageDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of the message definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of the message definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: require('./identifier.input'), - description: - 'A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the message definition.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the message definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this message definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this message definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the message definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the message definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the message definition from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the message definition from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate message definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the message definition is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this message definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this message definition is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', - }, - base: { - type: require('./reference.input'), - description: - 'The MessageDefinition that is the basis for the contents of this resource.', - }, - parent: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', - }, - replaces: { - type: new GraphQLList(require('./reference.input')), - description: - 'A MessageDefinition that is superseded by this definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - event: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'A coded identifier of a supported messaging event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category - category: { - type: CodeScalar, - description: 'The impact of the content of the message.', - }, - _category: { - type: require('./element.input'), - description: 'The impact of the content of the message.', - }, - focus: { - type: new GraphQLList(require('./messagedefinitionfocus.input')), - description: - 'Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.', - }, - responseRequired: { - type: GraphQLBoolean, - description: - 'Indicates whether a response is required for this message.', - }, - _responseRequired: { - type: require('./element.input'), - description: - 'Indicates whether a response is required for this message.', - }, - allowedResponse: { - type: new GraphQLList( - require('./messagedefinitionallowedresponse.input'), - ), - description: - 'Indicates what types of messages may be sent as an application-level response to this message.', - }, - }), + description: 'Base StructureDefinition for MessageDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageDefinition_Enum_input', + values: { MessageDefinition: { value: 'MessageDefinition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of the message definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of the message definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the message definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the message definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this message definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this message definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the message definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the message definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the message definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the message definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate message definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the message definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this message definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this message definition is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', + }, + base: { + type: GraphQLString, + description: + 'The MessageDefinition that is the basis for the contents of this resource.', + }, + parent: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: 'A MessageDefinition that is superseded by this definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + event: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'A coded identifier of a supported messaging event.', + }, + _category: { + type: require('./element.input.js'), + description: 'The impact of the content of the message.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category + category: { + type: CodeScalar, + description: 'The impact of the content of the message.', + }, + focus: { + type: new GraphQLList(require('./messagedefinitionfocus.input.js')), + description: + 'Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.', + }, + _responseRequired: { + type: require('./element.input.js'), + description: 'Indicates whether a response is required for this message.', + }, + responseRequired: { + type: GraphQLBoolean, + description: 'Indicates whether a response is required for this message.', + }, + allowedResponse: { + type: new GraphQLList( + require('./messagedefinitionallowedresponse.input.js'), + ), + description: + 'Indicates what types of messages may be sent as an application-level response to this message.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/messagedefinitionallowedresponse.input.js b/src/resources/3_0_1/inputs/messagedefinitionallowedresponse.input.js index 0bbbaef9..624e70c0 100644 --- a/src/resources/3_0_1/inputs/messagedefinitionallowedresponse.input.js +++ b/src/resources/3_0_1/inputs/messagedefinitionallowedresponse.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MessageDefinition.allowedResponse Input Schema + * @summary MessageDefinitionallowedResponse Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MessageDefinitionAllowedResponse_Input', - description: - 'Indicates what types of messages may be sent as an application-level response to this message.', - fields: () => - extendSchema(require('./backboneelement.input'), { - message: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the message definition that must be adhered to by this supported response.', - }, - situation: { - type: GraphQLString, - description: - 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', - }, - _situation: { - type: require('./element.input'), - description: - 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', - }, - }), + name: 'MessageDefinitionallowedResponse_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + message: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the message definition that must be adhered to by this supported response.', + }, + _situation: { + type: require('./element.input.js'), + description: + 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', + }, + situation: { + type: GraphQLString, + description: + 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/messagedefinitionfocus.input.js b/src/resources/3_0_1/inputs/messagedefinitionfocus.input.js index 09f82b39..6c7f3083 100644 --- a/src/resources/3_0_1/inputs/messagedefinitionfocus.input.js +++ b/src/resources/3_0_1/inputs/messagedefinitionfocus.input.js @@ -1,59 +1,75 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary MessageDefinition.focus Input Schema + * @summary MessageDefinitionfocus Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MessageDefinitionFocus_Input', - description: - 'Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of resource that must be the focus for this message.', - }, - _code: { - type: require('./element.input'), - description: - 'The kind of resource that must be the focus for this message.', - }, - profile: { - type: require('./reference.input'), - description: - 'A profile that reflects constraints for the focal resource (and potentially for related resources).', - }, - min: { - type: UnsignedIntScalar, - description: - 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', - }, - _min: { - type: require('./element.input'), - description: - 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', - }, - max: { - type: GraphQLString, - description: - 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', - }, - _max: { - type: require('./element.input'), - description: - 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', - }, - }), + name: 'MessageDefinitionfocus_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The kind of resource that must be the focus for this message.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of resource that must be the focus for this message.', + }, + profile: { + type: GraphQLString, + description: + 'A profile that reflects constraints for the focal resource (and potentially for related resources).', + }, + _min: { + type: require('./element.input.js'), + description: + 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + min: { + type: UnsignedIntScalar, + description: + 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + _max: { + type: require('./element.input.js'), + description: + 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + max: { + type: GraphQLString, + description: + 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/messageheader.input.js b/src/resources/3_0_1/inputs/messageheader.input.js index cabba162..425e89f6 100644 --- a/src/resources/3_0_1/inputs/messageheader.input.js +++ b/src/resources/3_0_1/inputs/messageheader.input.js @@ -1,21 +1,14 @@ -const InstantScalar = require('../scalars/instant.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 MessageHeaderResourceInputType = new GraphQLEnumType({ - name: 'MessageHeaderResourceInputType', - values: { - MessageHeader: { value: 'MessageHeader' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,77 +16,134 @@ let MessageHeaderResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'MessageHeader_Input', - description: 'Base StructureDefinition for MessageHeader Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(MessageHeaderResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - event: { - type: new GraphQLNonNull(require('./coding.input')), - description: - "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-events'.", - }, - destination: { - type: new GraphQLList(require('./messageheaderdestination.input')), - description: - 'The destination application which the message is intended for.', - }, - receiver: { - type: require('./reference.input'), - description: - "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", - }, - sender: { - type: require('./reference.input'), - description: - 'Identifies the sending system to allow the use of a trust relationship.', - }, - timestamp: { - type: new GraphQLNonNull(InstantScalar), - description: 'The time that the message was sent.', - }, - _timestamp: { - type: require('./element.input'), - description: 'The time that the message was sent.', - }, - enterer: { - type: require('./reference.input'), - description: - 'The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', - }, - author: { - type: require('./reference.input'), - description: - 'The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', - }, - source: { - type: new GraphQLNonNull(require('./messageheadersource.input')), - description: - 'The source application from which this message originated.', - }, - responsible: { - type: require('./reference.input'), - description: - 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-reason-encounter - reason: { - type: require('./codeableconcept.input'), - description: - 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', - }, - response: { - type: require('./messageheaderresponse.input'), - description: - 'Information about the message that this message is a response to. Only present if this message is a response.', - }, - focus: { - type: new GraphQLList(require('./reference.input')), - description: - 'The actual data of the message - a reference to the root/focus class of the event.', - }, - }), + description: 'Base StructureDefinition for MessageHeader Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageHeader_Enum_input', + values: { MessageHeader: { value: 'MessageHeader' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + event: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-events'.", + }, + destination: { + type: new GraphQLList(require('./messageheaderdestination.input.js')), + description: + 'The destination application which the message is intended for.', + }, + receiver: { + type: GraphQLString, + description: + "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", + }, + sender: { + type: GraphQLString, + description: + 'Identifies the sending system to allow the use of a trust relationship.', + }, + _timestamp: { + type: require('./element.input.js'), + description: 'The time that the message was sent.', + }, + timestamp: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time that the message was sent.', + }, + enterer: { + type: GraphQLString, + description: + 'The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', + }, + author: { + type: GraphQLString, + description: + 'The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', + }, + source: { + type: new GraphQLNonNull(require('./messageheadersource.input.js')), + description: 'The source application from which this message originated.', + }, + responsible: { + type: GraphQLString, + description: + 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-reason-encounter + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', + }, + response: { + type: require('./messageheaderresponse.input.js'), + description: + 'Information about the message that this message is a response to. Only present if this message is a response.', + }, + focus: { + type: new GraphQLList(GraphQLString), + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/messageheaderdestination.input.js b/src/resources/3_0_1/inputs/messageheaderdestination.input.js index 42855bb7..920c7a02 100644 --- a/src/resources/3_0_1/inputs/messageheaderdestination.input.js +++ b/src/resources/3_0_1/inputs/messageheaderdestination.input.js @@ -1,42 +1,59 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary MessageHeader.destination Input Schema + * @summary MessageHeaderdestination Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MessageHeaderDestination_Input', - description: 'The destination application which the message is intended for.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: 'Human-readable name for the target system.', - }, - _name: { - type: require('./element.input'), - description: 'Human-readable name for the target system.', - }, - target: { - type: require('./reference.input'), - description: - 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', - }, - endpoint: { - type: new GraphQLNonNull(UriScalar), - description: 'Indicates where the message should be routed to.', - }, - _endpoint: { - type: require('./element.input'), - description: 'Indicates where the message should be routed to.', - }, - }), + name: 'MessageHeaderdestination_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Human-readable name for the target system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the target system.', + }, + target: { + type: GraphQLString, + description: + 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', + }, + _endpoint: { + type: require('./element.input.js'), + description: 'Indicates where the message should be routed to.', + }, + endpoint: { + type: new GraphQLNonNull(UriScalar), + description: 'Indicates where the message should be routed to.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/messageheaderresponse.input.js b/src/resources/3_0_1/inputs/messageheaderresponse.input.js index e3b99727..98eb90d5 100644 --- a/src/resources/3_0_1/inputs/messageheaderresponse.input.js +++ b/src/resources/3_0_1/inputs/messageheaderresponse.input.js @@ -1,44 +1,64 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary MessageHeader.response Input Schema + * @summary MessageHeaderresponse Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MessageHeaderResponse_Input', - description: - 'Information about the message that this message is a response to. Only present if this message is a response.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLNonNull(IdScalar), - description: - 'The MessageHeader.id of the message to which this message is a response.', - }, - _identifier: { - type: require('./element.input'), - description: - 'The MessageHeader.id of the message to which this message is a response.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/response-code - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', - }, - _code: { - type: require('./element.input'), - description: - 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', - }, - details: { - type: require('./reference.input'), - description: 'Full details of any issues found in the message.', - }, - }), + name: 'MessageHeaderresponse_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./element.input.js'), + description: + 'The MessageHeader.id of the message to which this message is a response.', + }, + identifier: { + type: new GraphQLNonNull(IdScalar), + description: + 'The MessageHeader.id of the message to which this message is a response.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/response-code + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + details: { + type: GraphQLString, + description: 'Full details of any issues found in the message.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/messageheadersource.input.js b/src/resources/3_0_1/inputs/messageheadersource.input.js index 5f31bceb..cbb0ca97 100644 --- a/src/resources/3_0_1/inputs/messageheadersource.input.js +++ b/src/resources/3_0_1/inputs/messageheadersource.input.js @@ -1,64 +1,79 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary MessageHeader.source Input Schema + * @summary MessageHeadersource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'MessageHeaderSource_Input', - description: 'The source application from which this message originated.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: 'Human-readable name for the source system.', - }, - _name: { - type: require('./element.input'), - description: 'Human-readable name for the source system.', - }, - software: { - type: GraphQLString, - description: - 'May include configuration or other information useful in debugging.', - }, - _software: { - type: require('./element.input'), - description: - 'May include configuration or other information useful in debugging.', - }, - version: { - type: GraphQLString, - description: - 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', - }, - _version: { - type: require('./element.input'), - description: - 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', - }, - contact: { - type: require('./contactpoint.input'), - description: - 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', - }, - endpoint: { - type: new GraphQLNonNull(UriScalar), - description: - 'Identifies the routing target to send acknowledgements to.', - }, - _endpoint: { - type: require('./element.input'), - description: - 'Identifies the routing target to send acknowledgements to.', - }, - }), + name: 'MessageHeadersource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Human-readable name for the source system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the source system.', + }, + _software: { + type: require('./element.input.js'), + description: + 'May include configuration or other information useful in debugging.', + }, + software: { + type: GraphQLString, + description: + 'May include configuration or other information useful in debugging.', + }, + _version: { + type: require('./element.input.js'), + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + version: { + type: GraphQLString, + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + contact: { + type: require('./contactpoint.input.js'), + description: + 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', + }, + _endpoint: { + type: require('./element.input.js'), + description: 'Identifies the routing target to send acknowledgements to.', + }, + endpoint: { + type: new GraphQLNonNull(UriScalar), + description: 'Identifies the routing target to send acknowledgements to.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/meta.input.js b/src/resources/3_0_1/inputs/meta.input.js index b40004de..0160a547 100644 --- a/src/resources/3_0_1/inputs/meta.input.js +++ b/src/resources/3_0_1/inputs/meta.input.js @@ -1,10 +1,11 @@ -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -12,50 +13,64 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Meta_Input', - description: 'Base StructureDefinition for Meta Type.', - fields: () => - extendSchema(require('./element.input'), { - versionId: { - type: IdScalar, - description: - 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', - }, - _versionId: { - type: require('./element.input'), - description: - 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', - }, - lastUpdated: { - type: InstantScalar, - description: - 'When the resource last changed - e.g. when the version changed.', - }, - _lastUpdated: { - type: require('./element.input'), - description: - 'When the resource last changed - e.g. when the version changed.', - }, - profile: { - type: new GraphQLList(UriScalar), - description: - 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().', - }, - _profile: { - type: require('./element.input'), - description: - 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - security: { - type: new GraphQLList(require('./coding.input')), - description: - 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/common-tags - tag: { - type: new GraphQLList(require('./coding.input')), - description: - 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', - }, - }), + description: 'Base StructureDefinition for Meta Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _versionId: { + type: require('./element.input.js'), + description: + 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', + }, + versionId: { + type: IdScalar, + description: + 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', + }, + _lastUpdated: { + type: require('./element.input.js'), + description: + 'When the resource last changed - e.g. when the version changed.', + }, + lastUpdated: { + type: InstantScalar, + description: + 'When the resource last changed - e.g. when the version changed.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().', + }, + profile: { + type: new GraphQLList(UriScalar), + description: + 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + security: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/common-tags + tag: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/metadataresource.input.js b/src/resources/3_0_1/inputs/metadataresource.input.js new file mode 100644 index 00000000..f3c3023a --- /dev/null +++ b/src/resources/3_0_1/inputs/metadataresource.input.js @@ -0,0 +1,183 @@ +const { + GraphQLList, + GraphQLString, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MetadataResource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MetadataResource_Input', + description: 'Base StructureDefinition for MetadataResource Resource', + fields: () => ({ + _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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this metadata resource is (or will be) published. The URL SHOULD include the major version of the metadata resource. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this metadata resource is (or will be) published. The URL SHOULD include the major version of the metadata resource. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the metadata resource.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the metadata resource.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this metadata resource. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this metadata resource. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the metadata resource was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the metadata resource was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the metadata resource.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the metadata resource.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate metadata resource instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the metadata resource is intended to be used.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the metadata resource from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the metadata resource from a consumer's perspective.", + }, + }), +}); diff --git a/src/resources/3_0_1/inputs/money.input.js b/src/resources/3_0_1/inputs/money.input.js index 1bdda695..c50b4095 100644 --- a/src/resources/3_0_1/inputs/money.input.js +++ b/src/resources/3_0_1/inputs/money.input.js @@ -1,7 +1,11 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Money_Input', - description: 'Base StructureDefinition for Money Type.', - fields: () => extendSchema(require('./quantity.input')), + description: 'Base StructureDefinition for Money Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/namingsystem.input.js b/src/resources/3_0_1/inputs/namingsystem.input.js index d71fde38..5b1684d5 100644 --- a/src/resources/3_0_1/inputs/namingsystem.input.js +++ b/src/resources/3_0_1/inputs/namingsystem.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 NamingSystemResourceInputType = new GraphQLEnumType({ - name: 'NamingSystemResourceInputType', - values: { - NamingSystem: { value: 'NamingSystem' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,128 +16,186 @@ let NamingSystemResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'NamingSystem_Input', - description: 'Base StructureDefinition for NamingSystem Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(NamingSystemResourceInputType), - description: 'Type of this resource.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this naming system. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this naming system. Enables tracking the life-cycle of the content.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-type - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the purpose for the naming system - what kinds of things does it make unique?.', - }, - _kind: { - type: require('./element.input'), - description: - 'Indicates the purpose for the naming system - what kinds of things does it make unique?.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the naming system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the naming system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the naming system.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the naming system.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - responsible: { - type: GraphQLString, - description: - 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', - }, - _responsible: { - type: require('./element.input'), - description: - 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-type - type: { - type: require('./codeableconcept.input'), - description: - 'Categorizes a naming system for easier search by grouping related naming systems.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate naming system instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the naming system is intended to be used.', - }, - usage: { - type: GraphQLString, - description: - 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', - }, - _usage: { - type: require('./element.input'), - description: - 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', - }, - uniqueId: { - type: new GraphQLList( - new GraphQLNonNull(require('./namingsystemuniqueid.input')), - ), - description: - 'Indicates how the system may be identified when referenced in electronic exchange.', - }, - replacedBy: { - type: require('./reference.input'), - description: - 'For naming systems that are retired, indicates the naming system that should be used in their place (if any).', - }, - }), + description: 'Base StructureDefinition for NamingSystem Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NamingSystem_Enum_input', + values: { NamingSystem: { value: 'NamingSystem' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this naming system. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this naming system. Enables tracking the life-cycle of the content.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-type + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the naming system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the naming system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the naming system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the naming system.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _responsible: { + type: require('./element.input.js'), + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + responsible: { + type: GraphQLString, + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Categorizes a naming system for easier search by grouping related naming systems.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate naming system instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the naming system is intended to be used.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + usage: { + type: GraphQLString, + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + uniqueId: { + type: new GraphQLList( + new GraphQLNonNull(require('./namingsystemuniqueid.input.js')), + ), + description: + 'Indicates how the system may be identified when referenced in electronic exchange.', + }, + replacedBy: { + type: GraphQLString, + description: + 'For naming systems that are retired, indicates the naming system that should be used in their place (if any).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/namingsystemuniqueid.input.js b/src/resources/3_0_1/inputs/namingsystemuniqueid.input.js index fcf2fa0f..540e8f3c 100644 --- a/src/resources/3_0_1/inputs/namingsystemuniqueid.input.js +++ b/src/resources/3_0_1/inputs/namingsystemuniqueid.input.js @@ -1,69 +1,83 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary NamingSystem.uniqueId Input Schema + * @summary NamingSystemuniqueId Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NamingSystemUniqueId_Input', - description: - 'Indicates how the system may be identified when referenced in electronic exchange.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-identifier-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the unique identifier scheme used for this particular identifier.', - }, - _type: { - type: require('./element.input'), - description: - 'Identifies the unique identifier scheme used for this particular identifier.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The string that should be sent over the wire to identify the code system or identifier system.', - }, - _value: { - type: require('./element.input'), - description: - 'The string that should be sent over the wire to identify the code system or identifier system.', - }, - preferred: { - type: GraphQLBoolean, - description: - "Indicates whether this identifier is the 'preferred' identifier of this type.", - }, - _preferred: { - type: require('./element.input'), - description: - "Indicates whether this identifier is the 'preferred' identifier of this type.", - }, - comment: { - type: GraphQLString, - description: - 'Notes about the past or intended usage of this identifier.', - }, - _comment: { - type: require('./element.input'), - description: - 'Notes about the past or intended usage of this identifier.', - }, - period: { - type: require('./period.input'), - description: - 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', - }, - }), + name: 'NamingSystemuniqueId_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-identifier-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + _preferred: { + type: require('./element.input.js'), + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + preferred: { + type: GraphQLBoolean, + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + _comment: { + type: require('./element.input.js'), + description: 'Notes about the past or intended usage of this identifier.', + }, + comment: { + type: GraphQLString, + description: 'Notes about the past or intended usage of this identifier.', + }, + period: { + type: require('./period.input.js'), + description: + 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/narrative.input.js b/src/resources/3_0_1/inputs/narrative.input.js index 0f3757f6..24a79e7f 100644 --- a/src/resources/3_0_1/inputs/narrative.input.js +++ b/src/resources/3_0_1/inputs/narrative.input.js @@ -1,9 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const XhtmlScalar = require('../scalars/xhtml.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const XhtmlScalar = require('../scalars/xhtml.scalar.js'); /** * @name exports @@ -11,29 +13,43 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Narrative_Input', - description: 'Base StructureDefinition for Narrative Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/narrative-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", - }, - _status: { - type: require('./element.input'), - description: - "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", - }, - div: { - type: new GraphQLNonNull(XhtmlScalar), - description: - 'The actual narrative content, a stripped down version of XHTML.', - }, - _div: { - type: require('./element.input'), - description: - 'The actual narrative content, a stripped down version of XHTML.', - }, - }), + description: 'Base StructureDefinition for Narrative Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _status: { + type: require('./element.input.js'), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/narrative-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + _div: { + type: require('./element.input.js'), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + div: { + type: new GraphQLNonNull(XhtmlScalar), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/nutritionorder.input.js b/src/resources/3_0_1/inputs/nutritionorder.input.js index 59048b87..377c8af0 100644 --- a/src/resources/3_0_1/inputs/nutritionorder.input.js +++ b/src/resources/3_0_1/inputs/nutritionorder.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 NutritionOrderResourceInputType = new GraphQLEnumType({ - name: 'NutritionOrderResourceInputType', - values: { - NutritionOrder: { value: 'NutritionOrder' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,82 +16,138 @@ let NutritionOrderResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'NutritionOrder_Input', - description: 'Base StructureDefinition for NutritionOrder Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(NutritionOrderResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order by the order sender or by the order receiver.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/nutrition-request-status - status: { - type: CodeScalar, - description: 'The workflow status of the nutrition order/request.', - }, - _status: { - type: require('./element.input'), - description: 'The workflow status of the nutrition order/request.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', - }, - encounter: { - type: require('./reference.input'), - description: - 'An encounter that provides additional information about the healthcare context in which this request is made.', - }, - dateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date and time that this nutrition order was requested.', - }, - _dateTime: { - type: require('./element.input'), - description: - 'The date and time that this nutrition order was requested.', - }, - orderer: { - type: require('./reference.input'), - description: - 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', - }, - allergyIntolerance: { - type: new GraphQLList(require('./reference.input')), - description: - 'A link to a record of allergies or intolerances which should be included in the nutrition order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet - foodPreferenceModifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/food-type - excludeFoodModifier: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', - }, - oralDiet: { - type: require('./nutritionorderoraldiet.input'), - description: 'Diet given orally in contrast to enteral (tube) feeding.', - }, - supplement: { - type: new GraphQLList(require('./nutritionordersupplement.input')), - description: - "Oral nutritional products given in order to add further nutritional value to the patient's diet.", - }, - enteralFormula: { - type: require('./nutritionorderenteralformula.input'), - description: - 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', - }, - }), + description: 'Base StructureDefinition for NutritionOrder Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NutritionOrder_Enum_input', + values: { NutritionOrder: { value: 'NutritionOrder' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifiers assigned to this order by the order sender or by the order receiver.', + }, + _status: { + type: require('./element.input.js'), + description: 'The workflow status of the nutrition order/request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/nutrition-request-status + status: { + type: CodeScalar, + description: 'The workflow status of the nutrition order/request.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + }, + encounter: { + type: GraphQLString, + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + _dateTime: { + type: require('./element.input.js'), + description: 'The date and time that this nutrition order was requested.', + }, + dateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date and time that this nutrition order was requested.', + }, + orderer: { + type: GraphQLString, + description: + 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', + }, + allergyIntolerance: { + type: new GraphQLList(GraphQLString), + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet + foodPreferenceModifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/food-type + excludeFoodModifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + oralDiet: { + type: require('./nutritionorderoraldiet.input.js'), + description: 'Diet given orally in contrast to enteral (tube) feeding.', + }, + supplement: { + type: new GraphQLList(require('./nutritionordersupplement.input.js')), + description: + "Oral nutritional products given in order to add further nutritional value to the patient's diet.", + }, + enteralFormula: { + type: require('./nutritionorderenteralformula.input.js'), + description: + 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/nutritionorderenteralformula.input.js b/src/resources/3_0_1/inputs/nutritionorderenteralformula.input.js index ba206bb0..a60c411b 100644 --- a/src/resources/3_0_1/inputs/nutritionorderenteralformula.input.js +++ b/src/resources/3_0_1/inputs/nutritionorderenteralformula.input.js @@ -1,86 +1,101 @@ const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary NutritionOrder.enteralFormula Input Schema + * @summary NutritionOrderenteralFormula Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderEnteralFormula_Input', - description: - 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/entformula-type - baseFormulaType: { - type: require('./codeableconcept.input'), - description: - 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', - }, - baseFormulaProductName: { - type: GraphQLString, - description: - "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", - }, - _baseFormulaProductName: { - type: require('./element.input'), - description: - "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/entformula-additive - additiveType: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', - }, - additiveProductName: { - type: GraphQLString, - description: - 'The product or brand name of the type of modular component to be added to the formula.', - }, - _additiveProductName: { - type: require('./element.input'), - description: - 'The product or brand name of the type of modular component to be added to the formula.', - }, - caloricDensity: { - type: require('./quantity.input'), - description: - 'The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/enteral-route - routeofAdministration: { - type: require('./codeableconcept.input'), - description: - "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", - }, - administration: { - type: new GraphQLList( - require('./nutritionorderenteralformulaadministration.input'), - ), - description: - 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', - }, - maxVolumeToDeliver: { - type: require('./quantity.input'), - description: - 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', - }, - administrationInstruction: { - type: GraphQLString, - description: - 'Free text formula administration, feeding instructions or additional instructions or information.', - }, - _administrationInstruction: { - type: require('./element.input'), - description: - 'Free text formula administration, feeding instructions or additional instructions or information.', - }, - }), + name: 'NutritionOrderenteralFormula_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/entformula-type + baseFormulaType: { + type: require('./codeableconcept.input.js'), + description: + 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', + }, + _baseFormulaProductName: { + type: require('./element.input.js'), + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + baseFormulaProductName: { + type: GraphQLString, + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/entformula-additive + additiveType: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', + }, + _additiveProductName: { + type: require('./element.input.js'), + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + additiveProductName: { + type: GraphQLString, + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + caloricDensity: { + type: require('./quantity.input.js'), + description: + 'The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/enteral-route + routeofAdministration: { + type: require('./codeableconcept.input.js'), + description: + "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", + }, + administration: { + type: new GraphQLList( + require('./nutritionorderenteralformulaadministration.input.js'), + ), + description: + 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', + }, + maxVolumeToDeliver: { + type: require('./quantity.input.js'), + description: + 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', + }, + _administrationInstruction: { + type: require('./element.input.js'), + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + administrationInstruction: { + type: GraphQLString, + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/nutritionorderenteralformulaadministration.input.js b/src/resources/3_0_1/inputs/nutritionorderenteralformulaadministration.input.js index 0d500a97..9e10ca86 100644 --- a/src/resources/3_0_1/inputs/nutritionorderenteralformulaadministration.input.js +++ b/src/resources/3_0_1/inputs/nutritionorderenteralformulaadministration.input.js @@ -1,37 +1,56 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary NutritionOrder.enteralFormula.administration Input Schema + * @summary NutritionOrderenteralFormulaadministration Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderEnteralFormulaAdministration_Input', - description: - 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', - fields: () => - extendSchema(require('./backboneelement.input'), { - schedule: { - type: require('./timing.input'), - description: - 'The time period and frequency at which the enteral formula should be delivered to the patient.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The volume of formula to provide to the patient per the specified administration schedule.', - }, - rateQuantity: { - type: require('./quantity.input'), - description: - 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', - }, - rateRatio: { - type: require('./ratio.input'), - description: - 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', - }, - }), + name: 'NutritionOrderenteralFormulaadministration_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + schedule: { + type: require('./timing.input.js'), + description: + 'The time period and frequency at which the enteral formula should be delivered to the patient.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The volume of formula to provide to the patient per the specified administration schedule.', + }, + rateQuantity: { + type: require('./quantity.input.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/nutritionorderoraldiet.input.js b/src/resources/3_0_1/inputs/nutritionorderoraldiet.input.js index fe258892..fd51f369 100644 --- a/src/resources/3_0_1/inputs/nutritionorderoraldiet.input.js +++ b/src/resources/3_0_1/inputs/nutritionorderoraldiet.input.js @@ -1,59 +1,77 @@ const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary NutritionOrder.oralDiet Input Schema + * @summary NutritionOrderoralDiet Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderOralDiet_Input', - description: 'Diet given orally in contrast to enteral (tube) feeding.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/diet-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', - }, - schedule: { - type: new GraphQLList(require('./timing.input')), - description: - 'The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.', - }, - nutrient: { - type: new GraphQLList( - require('./nutritionorderoraldietnutrient.input'), - ), - description: - 'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.', - }, - texture: { - type: new GraphQLList(require('./nutritionorderoraldiettexture.input')), - description: - 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consistency-type - fluidConsistencyType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', - }, - instruction: { - type: GraphQLString, - description: - 'Free text or additional instructions or information pertaining to the oral diet.', - }, - _instruction: { - type: require('./element.input'), - description: - 'Free text or additional instructions or information pertaining to the oral diet.', - }, - }), + name: 'NutritionOrderoralDiet_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diet-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', + }, + schedule: { + type: new GraphQLList(require('./timing.input.js')), + description: + 'The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.', + }, + nutrient: { + type: new GraphQLList( + require('./nutritionorderoraldietnutrient.input.js'), + ), + description: + 'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.', + }, + texture: { + type: new GraphQLList( + require('./nutritionorderoraldiettexture.input.js'), + ), + description: + 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consistency-type + fluidConsistencyType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', + }, + _instruction: { + type: require('./element.input.js'), + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/nutritionorderoraldietnutrient.input.js b/src/resources/3_0_1/inputs/nutritionorderoraldietnutrient.input.js index 6ba56097..664aa36c 100644 --- a/src/resources/3_0_1/inputs/nutritionorderoraldietnutrient.input.js +++ b/src/resources/3_0_1/inputs/nutritionorderoraldietnutrient.input.js @@ -1,28 +1,46 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary NutritionOrder.oralDiet.nutrient Input Schema + * @summary NutritionOrderoralDietnutrient Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderOralDietNutrient_Input', - description: - 'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/nutrient-code - modifier: { - type: require('./codeableconcept.input'), - description: - 'The nutrient that is being modified such as carbohydrate or sodium.', - }, - amount: { - type: require('./quantity.input'), - description: - 'The quantity of the specified nutrient to include in diet.', - }, - }), + name: 'NutritionOrderoralDietnutrient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/nutrient-code + modifier: { + type: require('./codeableconcept.input.js'), + description: + 'The nutrient that is being modified such as carbohydrate or sodium.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'The quantity of the specified nutrient to include in diet.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/nutritionorderoraldiettexture.input.js b/src/resources/3_0_1/inputs/nutritionorderoraldiettexture.input.js index 3f17b2c5..531a3051 100644 --- a/src/resources/3_0_1/inputs/nutritionorderoraldiettexture.input.js +++ b/src/resources/3_0_1/inputs/nutritionorderoraldiettexture.input.js @@ -1,29 +1,48 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary NutritionOrder.oralDiet.texture Input Schema + * @summary NutritionOrderoralDiettexture Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderOralDietTexture_Input', - description: - 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/texture-code - modifier: { - type: require('./codeableconcept.input'), - description: - 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/modified-foodtype - foodType: { - type: require('./codeableconcept.input'), - description: - 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', - }, - }), + name: 'NutritionOrderoralDiettexture_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/texture-code + modifier: { + type: require('./codeableconcept.input.js'), + description: + 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/modified-foodtype + foodType: { + type: require('./codeableconcept.input.js'), + description: + 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/nutritionordersupplement.input.js b/src/resources/3_0_1/inputs/nutritionordersupplement.input.js index 5a6fbcd7..6d909e9a 100644 --- a/src/resources/3_0_1/inputs/nutritionordersupplement.input.js +++ b/src/resources/3_0_1/inputs/nutritionordersupplement.input.js @@ -1,56 +1,71 @@ const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary NutritionOrder.supplement Input Schema + * @summary NutritionOrdersupplement Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'NutritionOrderSupplement_Input', - description: - "Oral nutritional products given in order to add further nutritional value to the patient's diet.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplement-type - type: { - type: require('./codeableconcept.input'), - description: - 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', - }, - productName: { - type: GraphQLString, - description: - "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", - }, - _productName: { - type: require('./element.input'), - description: - "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", - }, - schedule: { - type: new GraphQLList(require('./timing.input')), - description: - 'The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The amount of the nutritional supplement to be given.', - }, - instruction: { - type: GraphQLString, - description: - 'Free text or additional instructions or information pertaining to the oral supplement.', - }, - _instruction: { - type: require('./element.input'), - description: - 'Free text or additional instructions or information pertaining to the oral supplement.', - }, - }), + name: 'NutritionOrdersupplement_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplement-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', + }, + _productName: { + type: require('./element.input.js'), + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + productName: { + type: GraphQLString, + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + schedule: { + type: new GraphQLList(require('./timing.input.js')), + description: + 'The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount of the nutritional supplement to be given.', + }, + _instruction: { + type: require('./element.input.js'), + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/observation.input.js b/src/resources/3_0_1/inputs/observation.input.js index f05417c0..2694a5dc 100644 --- a/src/resources/3_0_1/inputs/observation.input.js +++ b/src/resources/3_0_1/inputs/observation.input.js @@ -1,25 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ObservationResourceInputType = new GraphQLEnumType({ - name: 'ObservationResourceInputType', - values: { - Observation: { value: 'Observation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports @@ -27,214 +19,271 @@ let ObservationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Observation_Input', - description: 'Base StructureDefinition for Observation Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ObservationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'A unique identifier assigned to this observation.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A plan, proposal or order that is fulfilled in whole or in part by this event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the result value.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the result value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A code that classifies the general type of observation being made.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Describes what was observed. Sometimes this is called the observation 'name'.", - }, - subject: { - type: require('./reference.input'), - description: - 'The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.', - }, - context: { - type: require('./reference.input'), - description: - 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - _effectiveDateTime: { - type: require('./element.input'), - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - effectivePeriod: { - type: require('./period.input'), - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - issued: { - type: InstantScalar, - description: - 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', - }, - _issued: { - type: require('./element.input'), - description: - 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', - }, - performer: { - type: new GraphQLList(require('./reference.input')), - description: - "Who was responsible for asserting the observed value as 'true'.", - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueString: { - type: GraphQLString, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueString: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueBoolean: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRange: { - type: require('./range.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRatio: { - type: require('./ratio.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueSampledData: { - type: require('./sampleddata.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueTime: { - type: TimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueTime: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valuePeriod: { - type: require('./period.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason - dataAbsentReason: { - type: require('./codeableconcept.input'), - description: - 'Provides a reason why the expected value in the element Observation.value[x] is missing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation - interpretation: { - type: require('./codeableconcept.input'), - description: - 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', - }, - comment: { - type: GraphQLString, - description: - 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', - }, - _comment: { - type: require('./element.input'), - description: - 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.input'), - description: - "Indicates the site on the subject's body where the observation was made (i.e. the target site).", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-methods - method: { - type: require('./codeableconcept.input'), - description: 'Indicates the mechanism used to perform the observation.', - }, - specimen: { - type: require('./reference.input'), - description: - 'The specimen that was used when this observation was made.', - }, - device: { - type: require('./reference.input'), - description: 'The device used to generate the observation data.', - }, - referenceRange: { - type: new GraphQLList(require('./observationreferencerange.input')), - description: - 'Guidance on how to interpret the value by comparison to a normal or recommended range.', - }, - related: { - type: new GraphQLList(require('./observationrelated.input')), - description: - 'A reference to another resource (usually another Observation) whose relationship is defined by the relationship type code.', - }, - component: { - type: new GraphQLList(require('./observationcomponent.input')), - description: - 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', - }, - }), + description: 'Base StructureDefinition for Observation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Observation_Enum_input', + values: { Observation: { value: 'Observation' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'A unique identifier assigned to this observation.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the result value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the result value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that classifies the general type of observation being made.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'name'.", + }, + subject: { + type: GraphQLString, + description: + 'The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.', + }, + context: { + type: GraphQLString, + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + _issued: { + type: require('./element.input.js'), + description: + 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: + "Who was responsible for asserting the observed value as 'true'.", + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason + dataAbsentReason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation + interpretation: { + type: require('./codeableconcept.input.js'), + description: + 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', + }, + comment: { + type: GraphQLString, + description: + 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-methods + method: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the mechanism used to perform the observation.', + }, + specimen: { + type: GraphQLString, + description: 'The specimen that was used when this observation was made.', + }, + device: { + type: GraphQLString, + description: 'The device used to generate the observation data.', + }, + referenceRange: { + type: new GraphQLList(require('./observationreferencerange.input.js')), + description: + 'Guidance on how to interpret the value by comparison to a normal or recommended range.', + }, + related: { + type: new GraphQLList(require('./observationrelated.input.js')), + description: + 'A reference to another resource (usually another Observation) whose relationship is defined by the relationship type code.', + }, + component: { + type: new GraphQLList(require('./observationcomponent.input.js')), + description: + 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/observationcomponent.input.js b/src/resources/3_0_1/inputs/observationcomponent.input.js index c46e1f69..0f405d04 100644 --- a/src/resources/3_0_1/inputs/observationcomponent.input.js +++ b/src/resources/3_0_1/inputs/observationcomponent.input.js @@ -1,106 +1,122 @@ -const TimeScalar = require('../scalars/time.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const TimeScalar = require('../scalars/time.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Observation.component Input Schema + * @summary Observationcomponent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ObservationComponent_Input', - description: - 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Describes what was observed. Sometimes this is called the observation 'code'.", - }, - valueQuantity: { - type: require('./quantity.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueString: { - type: GraphQLString, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueString: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRange: { - type: require('./range.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRatio: { - type: require('./ratio.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueSampledData: { - type: require('./sampleddata.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueTime: { - type: TimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueTime: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valuePeriod: { - type: require('./period.input'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason - dataAbsentReason: { - type: require('./codeableconcept.input'), - description: - 'Provides a reason why the expected value in the element Observation.value[x] is missing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation - interpretation: { - type: require('./codeableconcept.input'), - description: - 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', - }, - }), + name: 'Observationcomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'code'.", + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason + dataAbsentReason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation + interpretation: { + type: require('./codeableconcept.input.js'), + description: + 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/observationreferencerange.input.js b/src/resources/3_0_1/inputs/observationreferencerange.input.js index 96836fa5..890a96f7 100644 --- a/src/resources/3_0_1/inputs/observationreferencerange.input.js +++ b/src/resources/3_0_1/inputs/observationreferencerange.input.js @@ -1,58 +1,73 @@ const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Observation.referenceRange Input Schema + * @summary ObservationreferenceRange Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ObservationReferenceRange_Input', - description: - 'Guidance on how to interpret the value by comparison to a normal or recommended range.', - fields: () => - extendSchema(require('./backboneelement.input'), { - low: { - type: require('./quantity.input'), - description: - 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', - }, - high: { - type: require('./quantity.input'), - description: - 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referencerange-meaning - type: { - type: require('./codeableconcept.input'), - description: - 'Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referencerange-appliesto - appliesTo: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race.', - }, - age: { - type: require('./range.input'), - description: - 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', - }, - text: { - type: GraphQLString, - description: - "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", - }, - _text: { - type: require('./element.input'), - description: - "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", - }, - }), + name: 'ObservationreferenceRange_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + low: { + type: require('./quantity.input.js'), + description: + 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', + }, + high: { + type: require('./quantity.input.js'), + description: + 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referencerange-meaning + type: { + type: require('./codeableconcept.input.js'), + description: + 'Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referencerange-appliesto + appliesTo: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race.', + }, + age: { + type: require('./range.input.js'), + description: + 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', + }, + _text: { + type: require('./element.input.js'), + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + text: { + type: GraphQLString, + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/observationrelated.input.js b/src/resources/3_0_1/inputs/observationrelated.input.js index a04716d2..5b891d90 100644 --- a/src/resources/3_0_1/inputs/observationrelated.input.js +++ b/src/resources/3_0_1/inputs/observationrelated.input.js @@ -1,34 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Observation.related Input Schema + * @summary Observationrelated Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ObservationRelated_Input', - description: - 'A reference to another resource (usually another Observation) whose relationship is defined by the relationship type code.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-relationshiptypes - type: { - type: CodeScalar, - description: - 'A code specifying the kind of relationship that exists with the target resource.', - }, - _type: { - type: require('./element.input'), - description: - 'A code specifying the kind of relationship that exists with the target resource.', - }, - target: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to the observation or [QuestionnaireResponse](questionnaireresponse.html#) resource that is related to this observation.', - }, - }), + name: 'Observationrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'A code specifying the kind of relationship that exists with the target resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-relationshiptypes + type: { + type: CodeScalar, + description: + 'A code specifying the kind of relationship that exists with the target resource.', + }, + target: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the observation or [QuestionnaireResponse](questionnaireresponse.html#) resource that is related to this observation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/operationdefinition.input.js b/src/resources/3_0_1/inputs/operationdefinition.input.js index 37db272b..63148cee 100644 --- a/src/resources/3_0_1/inputs/operationdefinition.input.js +++ b/src/resources/3_0_1/inputs/operationdefinition.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OperationDefinitionResourceInputType = new GraphQLEnumType({ - name: 'OperationDefinitionResourceInputType', - values: { - OperationDefinition: { value: 'OperationDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,209 +17,267 @@ let OperationDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'OperationDefinition_Input', - description: 'Base StructureDefinition for OperationDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(OperationDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this operation definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this operation definition. Enables tracking the life-cycle of the content.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether this is an operation or a named query.', - }, - _kind: { - type: require('./element.input'), - description: 'Whether this is an operation or a named query.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the operation definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the operation definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the operation definition from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the operation definition from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the operation definition is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this operation definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this operation definition is needed and why it has been designed as it has.', - }, - idempotent: { - type: GraphQLBoolean, - description: - 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', - }, - _idempotent: { - type: require('./element.input'), - description: - 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', - }, - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name used to invoke the operation.', - }, - _code: { - type: require('./element.input'), - description: 'The name used to invoke the operation.', - }, - comment: { - type: GraphQLString, - description: - 'Additional information about how to use this operation or named query.', - }, - _comment: { - type: require('./element.input'), - description: - 'Additional information about how to use this operation or named query.', - }, - base: { - type: require('./reference.input'), - description: - 'Indicates that this operation definition is a constraining profile on the base.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - resource: { - type: new GraphQLList(CodeScalar), - description: 'The types on which this operation can be executed.', - }, - _resource: { - type: require('./element.input'), - description: 'The types on which this operation can be executed.', - }, - system: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', - }, - _system: { - type: require('./element.input'), - description: - 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', - }, - type: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', - }, - _type: { - type: require('./element.input'), - description: - 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', - }, - instance: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', - }, - _instance: { - type: require('./element.input'), - description: - 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', - }, - parameter: { - type: new GraphQLList(require('./operationdefinitionparameter.input')), - description: 'The parameters for the operation/query.', - }, - overload: { - type: new GraphQLList(require('./operationdefinitionoverload.input')), - description: - 'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.', - }, - }), + description: 'Base StructureDefinition for OperationDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationDefinition_Enum_input', + values: { OperationDefinition: { value: 'OperationDefinition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this operation definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this operation definition. Enables tracking the life-cycle of the content.', + }, + _kind: { + type: require('./element.input.js'), + description: 'Whether this is an operation or a named query.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an operation or a named query.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the operation definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the operation definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the operation definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the operation definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the operation definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this operation definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this operation definition is needed and why it has been designed as it has.', + }, + _idempotent: { + type: require('./element.input.js'), + description: + 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', + }, + idempotent: { + type: GraphQLBoolean, + description: + 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', + }, + _code: { + type: require('./element.input.js'), + description: 'The name used to invoke the operation.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name used to invoke the operation.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Additional information about how to use this operation or named query.', + }, + comment: { + type: GraphQLString, + description: + 'Additional information about how to use this operation or named query.', + }, + base: { + type: GraphQLString, + description: + 'Indicates that this operation definition is a constraining profile on the base.', + }, + _resource: { + type: require('./element.input.js'), + description: 'The types on which this operation can be executed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + resource: { + type: new GraphQLList(CodeScalar), + description: 'The types on which this operation can be executed.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + system: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + _type: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', + }, + type: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', + }, + _instance: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + instance: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + parameter: { + type: new GraphQLList(require('./operationdefinitionparameter.input.js')), + description: 'The parameters for the operation/query.', + }, + overload: { + type: new GraphQLList(require('./operationdefinitionoverload.input.js')), + description: + 'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/operationdefinitionoverload.input.js b/src/resources/3_0_1/inputs/operationdefinitionoverload.input.js index 3659fbe8..1d9c6040 100644 --- a/src/resources/3_0_1/inputs/operationdefinitionoverload.input.js +++ b/src/resources/3_0_1/inputs/operationdefinitionoverload.input.js @@ -1,37 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary OperationDefinition.overload Input Schema + * @summary OperationDefinitionoverload Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OperationDefinitionOverload_Input', - description: - 'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - parameterName: { - type: new GraphQLList(GraphQLString), - description: 'Name of parameter to include in overload.', - }, - _parameterName: { - type: require('./element.input'), - description: 'Name of parameter to include in overload.', - }, - comment: { - type: GraphQLString, - description: 'Comments to go on overload.', - }, - _comment: { - type: require('./element.input'), - description: 'Comments to go on overload.', - }, - }), + name: 'OperationDefinitionoverload_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _parameterName: { + type: require('./element.input.js'), + description: 'Name of parameter to include in overload.', + }, + parameterName: { + type: new GraphQLList(GraphQLString), + description: 'Name of parameter to include in overload.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Comments to go on overload.', + }, + comment: { + type: GraphQLString, + description: 'Comments to go on overload.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/operationdefinitionparameter.input.js b/src/resources/3_0_1/inputs/operationdefinitionparameter.input.js index b8160e61..a20d03e2 100644 --- a/src/resources/3_0_1/inputs/operationdefinitionparameter.input.js +++ b/src/resources/3_0_1/inputs/operationdefinitionparameter.input.js @@ -1,97 +1,114 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary OperationDefinition.parameter Input Schema + * @summary OperationDefinitionparameter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OperationDefinitionParameter_Input', - description: 'The parameters for the operation/query.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name of used to identify the parameter.', - }, - _name: { - type: require('./element.input'), - description: 'The name of used to identify the parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use - use: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether this is an input or an output parameter.', - }, - _use: { - type: require('./element.input'), - description: 'Whether this is an input or an output parameter.', - }, - min: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - _min: { - type: require('./element.input'), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - max: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - _max: { - type: require('./element.input'), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - documentation: { - type: GraphQLString, - description: 'Describes the meaning or use of this parameter.', - }, - _documentation: { - type: require('./element.input'), - description: 'Describes the meaning or use of this parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/all-types - type: { - type: CodeScalar, - description: 'The type for this parameter.', - }, - _type: { - type: require('./element.input'), - description: 'The type for this parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - searchType: { - type: CodeScalar, - description: - "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", - }, - _searchType: { - type: require('./element.input'), - description: - "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", - }, - profile: { - type: require('./reference.input'), - description: - 'A profile the specifies the rules that this parameter must conform to.', - }, - binding: { - type: require('./operationdefinitionparameterbinding.input'), - description: - 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', - }, - }), + name: 'OperationDefinitionparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of used to identify the parameter.', + }, + name: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of used to identify the parameter.', + }, + _use: { + type: require('./element.input.js'), + description: 'Whether this is an input or an output parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an input or an output parameter.', + }, + _min: { + type: require('./element.input.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.input.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.input.js'), + description: 'Describes the meaning or use of this parameter.', + }, + documentation: { + type: GraphQLString, + description: 'Describes the meaning or use of this parameter.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type for this parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/all-types + type: { + type: CodeScalar, + description: 'The type for this parameter.', + }, + _searchType: { + type: require('./element.input.js'), + description: + "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + searchType: { + type: CodeScalar, + description: + "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", + }, + profile: { + type: GraphQLString, + description: + 'A profile the specifies the rules that this parameter must conform to.', + }, + binding: { + type: require('./operationdefinitionparameterbinding.input.js'), + description: + 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/operationdefinitionparameterbinding.input.js b/src/resources/3_0_1/inputs/operationdefinitionparameterbinding.input.js index fc83c70a..98772db7 100644 --- a/src/resources/3_0_1/inputs/operationdefinitionparameterbinding.input.js +++ b/src/resources/3_0_1/inputs/operationdefinitionparameterbinding.input.js @@ -1,45 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary OperationDefinition.parameter.binding Input Schema + * @summary OperationDefinitionparameterbinding Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OperationDefinitionParameterBinding_Input', - description: - 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/binding-strength - strength: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - _strength: { - type: require('./element.input'), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - valueSetUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - _valueSetUri: { - type: require('./element.input'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - valueSetReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - }), + name: 'OperationDefinitionparameterbinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _strength: { + type: require('./element.input.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/binding-strength + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _valueSetUri: { + type: require('./element.input.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/operationoutcome.input.js b/src/resources/3_0_1/inputs/operationoutcome.input.js index 21bc0525..dac2fa94 100644 --- a/src/resources/3_0_1/inputs/operationoutcome.input.js +++ b/src/resources/3_0_1/inputs/operationoutcome.input.js @@ -1,20 +1,13 @@ 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 OperationOutcomeResourceInputType = new GraphQLEnumType({ - name: 'OperationOutcomeResourceInputType', - values: { - OperationOutcome: { value: 'OperationOutcome' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,19 +15,77 @@ let OperationOutcomeResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'OperationOutcome_Input', - description: 'Base StructureDefinition for OperationOutcome Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(OperationOutcomeResourceInputType), - description: 'Type of this resource.', - }, - issue: { - type: new GraphQLList( - new GraphQLNonNull(require('./operationoutcomeissue.input')), - ), - description: - 'An error, warning or information message that results from a system action.', - }, - }), + description: 'Base StructureDefinition for OperationOutcome Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationOutcome_Enum_input', + values: { OperationOutcome: { value: 'OperationOutcome' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + issue: { + type: new GraphQLList( + new GraphQLNonNull(require('./operationoutcomeissue.input.js')), + ), + description: + 'An error, warning or information message that results from a system action.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/operationoutcomeissue.input.js b/src/resources/3_0_1/inputs/operationoutcomeissue.input.js index f7251328..4f9fb99e 100644 --- a/src/resources/3_0_1/inputs/operationoutcomeissue.input.js +++ b/src/resources/3_0_1/inputs/operationoutcomeissue.input.js @@ -1,81 +1,96 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary OperationOutcome.issue Input Schema + * @summary OperationOutcomeissue Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OperationOutcomeIssue_Input', - description: - 'An error, warning or information message that results from a system action.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/issue-severity - severity: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the issue indicates a variation from successful processing.', - }, - _severity: { - type: require('./element.input'), - description: - 'Indicates whether the issue indicates a variation from successful processing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/issue-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', - }, - _code: { - type: require('./element.input'), - description: - 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-outcome - details: { - type: require('./codeableconcept.input'), - description: - 'Additional details about the error. This may be a text description of the error, or a system code that identifies the error.', - }, - diagnostics: { - type: GraphQLString, - description: - 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', - }, - _diagnostics: { - type: require('./element.input'), - description: - 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', - }, - location: { - type: new GraphQLList(GraphQLString), - description: - "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", - }, - _location: { - type: require('./element.input'), - description: - "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", - }, - expression: { - type: new GraphQLList(GraphQLString), - description: - 'A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', - }, - _expression: { - type: require('./element.input'), - description: - 'A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', - }, - }), + name: 'OperationOutcomeissue_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/issue-severity + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/issue-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-outcome + details: { + type: require('./codeableconcept.input.js'), + description: + 'Additional details about the error. This may be a text description of the error, or a system code that identifies the error.', + }, + _diagnostics: { + type: require('./element.input.js'), + description: + 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', + }, + diagnostics: { + type: GraphQLString, + description: + 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', + }, + _location: { + type: require('./element.input.js'), + description: + "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", + }, + location: { + type: new GraphQLList(GraphQLString), + description: + "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", + }, + _expression: { + type: require('./element.input.js'), + description: + 'A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', + }, + expression: { + type: new GraphQLList(GraphQLString), + description: + 'A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/organization.input.js b/src/resources/3_0_1/inputs/organization.input.js index 607ecbd6..13d38770 100644 --- a/src/resources/3_0_1/inputs/organization.input.js +++ b/src/resources/3_0_1/inputs/organization.input.js @@ -1,21 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OrganizationResourceInputType = new GraphQLEnumType({ - name: 'OrganizationResourceInputType', - values: { - Organization: { value: 'Organization' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,72 +16,127 @@ let OrganizationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Organization_Input', - description: 'Base StructureDefinition for Organization Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(OrganizationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', - }, - active: { - type: GraphQLBoolean, - description: - "Whether the organization's record is still in active use.", - }, - _active: { - type: require('./element.input'), - description: - "Whether the organization's record is still in active use.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/organization-type - type: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'The kind(s) of organization that this is.', - }, - name: { - type: GraphQLString, - description: 'A name associated with the organization.', - }, - _name: { - type: require('./element.input'), - description: 'A name associated with the organization.', - }, - alias: { - type: new GraphQLList(GraphQLString), - description: - 'A list of alternate names that the organization is known as, or was known as in the past.', - }, - _alias: { - type: require('./element.input'), - description: - 'A list of alternate names that the organization is known as, or was known as in the past.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: 'A contact detail for the organization.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: 'An address for the organization.', - }, - partOf: { - type: require('./reference.input'), - description: - 'The organization of which this organization forms a part.', - }, - contact: { - type: new GraphQLList(require('./organizationcontact.input')), - description: 'Contact for the organization for a certain purpose.', - }, - endpoint: { - type: new GraphQLList(require('./reference.input')), - description: - 'Technical endpoints providing access to services operated for the organization.', - }, - }), + description: 'Base StructureDefinition for Organization Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Organization_Enum_input', + values: { Organization: { value: 'Organization' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether the organization's record is still in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether the organization's record is still in active use.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/organization-type + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The kind(s) of organization that this is.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name associated with the organization.', + }, + name: { + type: GraphQLString, + description: 'A name associated with the organization.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'A list of alternate names that the organization is known as, or was known as in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the organization is known as, or was known as in the past.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: 'A contact detail for the organization.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'An address for the organization.', + }, + partOf: { + type: GraphQLString, + description: 'The organization of which this organization forms a part.', + }, + contact: { + type: new GraphQLList(require('./organizationcontact.input.js')), + description: 'Contact for the organization for a certain purpose.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for the organization.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/organizationcontact.input.js b/src/resources/3_0_1/inputs/organizationcontact.input.js index fa2f03e1..e6749401 100644 --- a/src/resources/3_0_1/inputs/organizationcontact.input.js +++ b/src/resources/3_0_1/inputs/organizationcontact.input.js @@ -1,35 +1,54 @@ -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Organization.contact Input Schema + * @summary Organizationcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'OrganizationContact_Input', - description: 'Contact for the organization for a certain purpose.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contactentity-type - purpose: { - type: require('./codeableconcept.input'), - description: - 'Indicates a purpose for which the contact can be reached.', - }, - name: { - type: require('./humanname.input'), - description: 'A name associated with the contact.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', - }, - address: { - type: require('./address.input'), - description: 'Visiting or postal addresses for the contact.', - }, - }), + name: 'Organizationcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contactentity-type + purpose: { + type: require('./codeableconcept.input.js'), + description: 'Indicates a purpose for which the contact can be reached.', + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', + }, + address: { + type: require('./address.input.js'), + description: 'Visiting or postal addresses for the contact.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/parameterdefinition.input.js b/src/resources/3_0_1/inputs/parameterdefinition.input.js index 8d24f70f..4cc150b8 100644 --- a/src/resources/3_0_1/inputs/parameterdefinition.input.js +++ b/src/resources/3_0_1/inputs/parameterdefinition.input.js @@ -1,13 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -15,71 +13,85 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'ParameterDefinition_Input', - description: 'Base StructureDefinition for ParameterDefinition Type.', - fields: () => - extendSchema(require('./element.input'), { - name: { - type: CodeScalar, - description: - 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use - use: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether the parameter is input or output for the module.', - }, - _use: { - type: require('./element.input'), - description: 'Whether the parameter is input or output for the module.', - }, - min: { - type: GraphQLInt, - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - _min: { - type: require('./element.input'), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - max: { - type: GraphQLString, - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - _max: { - type: require('./element.input'), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - documentation: { - type: GraphQLString, - description: - 'A brief discussion of what the parameter is for and how it is used by the module.', - }, - _documentation: { - type: require('./element.input'), - description: - 'A brief discussion of what the parameter is for and how it is used by the module.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/all-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of the parameter.', - }, - _type: { - type: require('./element.input'), - description: 'The type of the parameter.', - }, - profile: { - type: require('./reference.input'), - description: - 'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.', - }, - }), + description: 'Base StructureDefinition for ParameterDefinition Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', + }, + name: { + type: CodeScalar, + description: + 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', + }, + _use: { + type: require('./element.input.js'), + description: 'Whether the parameter is input or output for the module.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether the parameter is input or output for the module.', + }, + _min: { + type: require('./element.input.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: GraphQLInt, + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.input.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'A brief discussion of what the parameter is for and how it is used by the module.', + }, + documentation: { + type: GraphQLString, + description: + 'A brief discussion of what the parameter is for and how it is used by the module.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of the parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/all-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of the parameter.', + }, + profile: { + type: GraphQLString, + description: + 'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/parameters.input.js b/src/resources/3_0_1/inputs/parameters.input.js index 79311667..acf32744 100644 --- a/src/resources/3_0_1/inputs/parameters.input.js +++ b/src/resources/3_0_1/inputs/parameters.input.js @@ -1,20 +1,12 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ParametersResourceInputType = new GraphQLEnumType({ - name: 'ParametersResourceInputType', - values: { - Parameters: { value: 'Parameters' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,16 +14,54 @@ let ParametersResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Parameters_Input', - description: 'Base StructureDefinition for Parameters Resource.', - fields: () => - extendSchema(require('./resource.input'), { - resourceType: { - type: new GraphQLNonNull(ParametersResourceInputType), - description: 'Type of this resource.', - }, - parameter: { - type: new GraphQLList(require('./parametersparameter.input')), - description: 'A parameter passed to or received from the operation.', - }, - }), + description: 'Base StructureDefinition for Parameters Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Parameters_Enum_input', + values: { Parameters: { value: 'Parameters' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + parameter: { + type: new GraphQLList(require('./parametersparameter.input.js')), + description: 'A parameter passed to or received from the operation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/parametersparameter.input.js b/src/resources/3_0_1/inputs/parametersparameter.input.js index 221f4481..b64e3a13 100644 --- a/src/resources/3_0_1/inputs/parametersparameter.input.js +++ b/src/resources/3_0_1/inputs/parametersparameter.input.js @@ -1,264 +1,281 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Parameters.parameter Input Schema + * @summary Parametersparameter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ParametersParameter_Input', - description: 'A parameter passed to or received from the operation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of the parameter (reference to the operation definition).', - }, - _name: { - type: require('./element.input'), - description: - 'The name of the parameter (reference to the operation definition).', - }, - valueBase64Binary: { - type: Base64BinaryScalar, - description: 'If the parameter is a data type.', - }, - _valueBase64Binary: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: 'If the parameter is a data type.', - }, - _valueBoolean: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueCode: { - type: CodeScalar, - description: 'If the parameter is a data type.', - }, - _valueCode: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueDate: { - type: DateScalar, - description: 'If the parameter is a data type.', - }, - _valueDate: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueDateTime: { - type: DateTimeScalar, - description: 'If the parameter is a data type.', - }, - _valueDateTime: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueDecimal: { - type: GraphQLFloat, - description: 'If the parameter is a data type.', - }, - _valueDecimal: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueId: { - type: IdScalar, - description: 'If the parameter is a data type.', - }, - _valueId: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueInstant: { - type: InstantScalar, - description: 'If the parameter is a data type.', - }, - _valueInstant: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueInteger: { - type: GraphQLInt, - description: 'If the parameter is a data type.', - }, - _valueInteger: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueMarkdown: { - type: GraphQLString, - description: 'If the parameter is a data type.', - }, - _valueMarkdown: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueOid: { - type: OidScalar, - description: 'If the parameter is a data type.', - }, - _valueOid: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valuePositiveInt: { - type: PositiveIntScalar, - description: 'If the parameter is a data type.', - }, - _valuePositiveInt: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueString: { - type: GraphQLString, - description: 'If the parameter is a data type.', - }, - _valueString: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueTime: { - type: TimeScalar, - description: 'If the parameter is a data type.', - }, - _valueTime: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueUnsignedInt: { - type: UnsignedIntScalar, - description: 'If the parameter is a data type.', - }, - _valueUnsignedInt: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueUri: { - type: UriScalar, - description: 'If the parameter is a data type.', - }, - _valueUri: { - type: require('./element.input'), - description: 'If the parameter is a data type.', - }, - valueAddress: { - type: require('./address.input'), - description: 'If the parameter is a data type.', - }, - valueAge: { - type: require('./age.input'), - description: 'If the parameter is a data type.', - }, - valueAnnotation: { - type: require('./annotation.input'), - description: 'If the parameter is a data type.', - }, - valueAttachment: { - type: require('./attachment.input'), - description: 'If the parameter is a data type.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'If the parameter is a data type.', - }, - valueCoding: { - type: require('./coding.input'), - description: 'If the parameter is a data type.', - }, - valueContactPoint: { - type: require('./contactpoint.input'), - description: 'If the parameter is a data type.', - }, - valueCount: { - type: require('./count.input'), - description: 'If the parameter is a data type.', - }, - valueDistance: { - type: require('./distance.input'), - description: 'If the parameter is a data type.', - }, - valueDuration: { - type: require('./duration.input'), - description: 'If the parameter is a data type.', - }, - valueHumanName: { - type: require('./humanname.input'), - description: 'If the parameter is a data type.', - }, - valueIdentifier: { - type: require('./identifier.input'), - description: 'If the parameter is a data type.', - }, - valueMoney: { - type: require('./money.input'), - description: 'If the parameter is a data type.', - }, - valuePeriod: { - type: require('./period.input'), - description: 'If the parameter is a data type.', - }, - valueQuantity: { - type: require('./quantity.input'), - description: 'If the parameter is a data type.', - }, - valueRange: { - type: require('./range.input'), - description: 'If the parameter is a data type.', - }, - valueRatio: { - type: require('./ratio.input'), - description: 'If the parameter is a data type.', - }, - valueReference: { - type: require('./reference.input'), - description: 'If the parameter is a data type.', - }, - valueSampledData: { - type: require('./sampleddata.input'), - description: 'If the parameter is a data type.', - }, - valueSignature: { - type: require('./signature.input'), - description: 'If the parameter is a data type.', - }, - valueTiming: { - type: require('./timing.input'), - description: 'If the parameter is a data type.', - }, - valueMeta: { - type: require('./meta.input'), - description: 'If the parameter is a data type.', - }, - resource: { - type: GraphQLString, - description: 'If the parameter is a whole resource.', - }, - }), + name: 'Parametersparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the parameter (reference to the operation definition).', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the parameter (reference to the operation definition).', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: 'If the parameter is a data type.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'If the parameter is a data type.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueCode: { + type: CodeScalar, + description: 'If the parameter is a data type.', + }, + _valueDate: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDate: { + type: DateScalar, + description: 'If the parameter is a data type.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDateTime: { + type: DateTimeScalar, + description: 'If the parameter is a data type.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'If the parameter is a data type.', + }, + _valueId: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueId: { + type: IdScalar, + description: 'If the parameter is a data type.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueInstant: { + type: InstantScalar, + description: 'If the parameter is a data type.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueInteger: { + type: GraphQLInt, + description: 'If the parameter is a data type.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueMarkdown: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueOid: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueOid: { + type: OidScalar, + description: 'If the parameter is a data type.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: 'If the parameter is a data type.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueString: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueTime: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueTime: { + type: TimeScalar, + description: 'If the parameter is a data type.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: 'If the parameter is a data type.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueUri: { + type: UriScalar, + description: 'If the parameter is a data type.', + }, + valueAddress: { + type: require('./address.input.js'), + description: 'If the parameter is a data type.', + }, + valueAge: { + type: require('./age.input.js'), + description: 'If the parameter is a data type.', + }, + valueAnnotation: { + type: require('./annotation.input.js'), + description: 'If the parameter is a data type.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: 'If the parameter is a data type.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'If the parameter is a data type.', + }, + valueCoding: { + type: require('./coding.input.js'), + description: 'If the parameter is a data type.', + }, + valueContactPoint: { + type: require('./contactpoint.input.js'), + description: 'If the parameter is a data type.', + }, + valueCount: { + type: require('./count.input.js'), + description: 'If the parameter is a data type.', + }, + valueDistance: { + type: require('./distance.input.js'), + description: 'If the parameter is a data type.', + }, + valueDuration: { + type: require('./duration.input.js'), + description: 'If the parameter is a data type.', + }, + valueHumanName: { + type: require('./humanname.input.js'), + description: 'If the parameter is a data type.', + }, + valueIdentifier: { + type: require('./identifier.input.js'), + description: 'If the parameter is a data type.', + }, + valueMoney: { + type: require('./money.input.js'), + description: 'If the parameter is a data type.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: 'If the parameter is a data type.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: 'If the parameter is a data type.', + }, + valueRange: { + type: require('./range.input.js'), + description: 'If the parameter is a data type.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: 'If the parameter is a data type.', + }, + valueReference: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: 'If the parameter is a data type.', + }, + valueSignature: { + type: require('./signature.input.js'), + description: 'If the parameter is a data type.', + }, + valueTiming: { + type: require('./timing.input.js'), + description: 'If the parameter is a data type.', + }, + valueMeta: { + type: require('./meta.input.js'), + description: 'If the parameter is a data type.', + }, + resource: { + type: GraphQLString, + description: 'If the parameter is a whole resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/patient.input.js b/src/resources/3_0_1/inputs/patient.input.js index 43a5fa32..6c34c361 100644 --- a/src/resources/3_0_1/inputs/patient.input.js +++ b/src/resources/3_0_1/inputs/patient.input.js @@ -1,25 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PatientResourceInputType = new GraphQLEnumType({ - name: 'PatientResourceInputType', - values: { - Patient: { value: 'Patient' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,130 +19,187 @@ let PatientResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Patient_Input', - description: 'Base StructureDefinition for Patient Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PatientResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'An identifier for this patient.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this patient record is in active use.', - }, - _active: { - type: require('./element.input'), - description: 'Whether this patient record is in active use.', - }, - name: { - type: new GraphQLList(require('./humanname.input')), - description: 'A name associated with the individual.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date of birth for the individual.', - }, - _birthDate: { - type: require('./element.input'), - description: 'The date of birth for the individual.', - }, - deceasedBoolean: { - type: GraphQLBoolean, - description: 'Indicates if the individual is deceased or not.', - }, - _deceasedBoolean: { - type: require('./element.input'), - description: 'Indicates if the individual is deceased or not.', - }, - deceasedDateTime: { - type: DateTimeScalar, - description: 'Indicates if the individual is deceased or not.', - }, - _deceasedDateTime: { - type: require('./element.input'), - description: 'Indicates if the individual is deceased or not.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: 'Addresses for the individual.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/marital-status - maritalStatus: { - type: require('./codeableconcept.input'), - description: - "This field contains a patient's most recent marital (civil) status.", - }, - multipleBirthBoolean: { - type: GraphQLBoolean, - description: - 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', - }, - _multipleBirthBoolean: { - type: require('./element.input'), - description: - 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', - }, - multipleBirthInteger: { - type: GraphQLInt, - description: - 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', - }, - _multipleBirthInteger: { - type: require('./element.input'), - description: - 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', - }, - photo: { - type: new GraphQLList(require('./attachment.input')), - description: 'Image of the patient.', - }, - contact: { - type: new GraphQLList(require('./patientcontact.input')), - description: - 'A contact party (e.g. guardian, partner, friend) for the patient.', - }, - animal: { - type: require('./patientanimal.input'), - description: 'This patient is known to be an animal.', - }, - communication: { - type: new GraphQLList(require('./patientcommunication.input')), - description: - 'Languages which may be used to communicate with the patient about his or her health.', - }, - generalPractitioner: { - type: new GraphQLList(require('./reference.input')), - description: "Patient's nominated care provider.", - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'Organization that is the custodian of the patient record.', - }, - link: { - type: new GraphQLList(require('./patientlink.input')), - description: - 'Link to another patient resource that concerns the same actual patient.', - }, - }), + description: 'Base StructureDefinition for Patient Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Patient_Enum_input', + values: { Patient: { value: 'Patient' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'An identifier for this patient.', + }, + _active: { + type: require('./element.input.js'), + description: 'Whether this patient record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this patient record is in active use.', + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'A name associated with the individual.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date of birth for the individual.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the individual.', + }, + _deceasedBoolean: { + type: require('./element.input.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: 'Indicates if the individual is deceased or not.', + }, + _deceasedDateTime: { + type: require('./element.input.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedDateTime: { + type: DateTimeScalar, + description: 'Indicates if the individual is deceased or not.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'Addresses for the individual.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/marital-status + maritalStatus: { + type: require('./codeableconcept.input.js'), + description: + "This field contains a patient's most recent marital (civil) status.", + }, + _multipleBirthBoolean: { + type: require('./element.input.js'), + description: + 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', + }, + multipleBirthBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', + }, + _multipleBirthInteger: { + type: require('./element.input.js'), + description: + 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', + }, + multipleBirthInteger: { + type: GraphQLInt, + description: + 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the patient.', + }, + contact: { + type: new GraphQLList(require('./patientcontact.input.js')), + description: + 'A contact party (e.g. guardian, partner, friend) for the patient.', + }, + animal: { + type: require('./patientanimal.input.js'), + description: 'This patient is known to be an animal.', + }, + communication: { + type: new GraphQLList(require('./patientcommunication.input.js')), + description: + 'Languages which may be used to communicate with the patient about his or her health.', + }, + generalPractitioner: { + type: new GraphQLList(GraphQLString), + description: "Patient's nominated care provider.", + }, + managingOrganization: { + type: GraphQLString, + description: 'Organization that is the custodian of the patient record.', + }, + link: { + type: new GraphQLList(require('./patientlink.input.js')), + description: + 'Link to another patient resource that concerns the same actual patient.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/patientanimal.input.js b/src/resources/3_0_1/inputs/patientanimal.input.js index e4291251..6af91523 100644 --- a/src/resources/3_0_1/inputs/patientanimal.input.js +++ b/src/resources/3_0_1/inputs/patientanimal.input.js @@ -1,34 +1,55 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Patient.animal Input Schema + * @summary Patientanimal Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PatientAnimal_Input', - description: 'This patient is known to be an animal.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-species - species: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Identifies the high level taxonomic categorization of the kind of animal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-breeds - breed: { - type: require('./codeableconcept.input'), - description: - 'Identifies the detailed categorization of the kind of animal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-genderstatus - genderStatus: { - type: require('./codeableconcept.input'), - description: - "Indicates the current state of the animal's reproductive organs.", - }, - }), + name: 'Patientanimal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-species + species: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the high level taxonomic categorization of the kind of animal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-breeds + breed: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the detailed categorization of the kind of animal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-genderstatus + genderStatus: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the current state of the animal's reproductive organs.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/patientcommunication.input.js b/src/resources/3_0_1/inputs/patientcommunication.input.js index fa2c186c..83f6f03d 100644 --- a/src/resources/3_0_1/inputs/patientcommunication.input.js +++ b/src/resources/3_0_1/inputs/patientcommunication.input.js @@ -1,37 +1,54 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Patient.communication Input Schema + * @summary Patientcommunication Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PatientCommunication_Input', - description: - 'Languages which may be used to communicate with the patient about his or her health.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", - }, - preferred: { - type: GraphQLBoolean, - description: - 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', - }, - _preferred: { - type: require('./element.input'), - description: - 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', - }, - }), + name: 'Patientcommunication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + _preferred: { + type: require('./element.input.js'), + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + preferred: { + type: GraphQLBoolean, + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/patientcontact.input.js b/src/resources/3_0_1/inputs/patientcontact.input.js index 39d1d73b..08d7a418 100644 --- a/src/resources/3_0_1/inputs/patientcontact.input.js +++ b/src/resources/3_0_1/inputs/patientcontact.input.js @@ -1,58 +1,77 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Patient.contact Input Schema + * @summary Patientcontact Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PatientContact_Input', - description: - 'A contact party (e.g. guardian, partner, friend) for the patient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0131 - relationship: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The nature of the relationship between the patient and the contact person.', - }, - name: { - type: require('./humanname.input'), - description: 'A name associated with the contact person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - address: { - type: require('./address.input'), - description: 'Address for the contact person.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', - }, - organization: { - type: require('./reference.input'), - description: - 'Organization on behalf of which the contact is acting or for which the contact is working.', - }, - period: { - type: require('./period.input'), - description: - 'The period during which this contact person or organization is valid to be contacted relating to this patient.', - }, - }), + name: 'Patientcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0131 + relationship: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The nature of the relationship between the patient and the contact person.', + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the contact person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + address: { + type: require('./address.input.js'), + description: 'Address for the contact person.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + organization: { + type: GraphQLString, + description: + 'Organization on behalf of which the contact is acting or for which the contact is working.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period during which this contact person or organization is valid to be contacted relating to this patient.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/patientlink.input.js b/src/resources/3_0_1/inputs/patientlink.input.js index fe119f77..b0a4ccc7 100644 --- a/src/resources/3_0_1/inputs/patientlink.input.js +++ b/src/resources/3_0_1/inputs/patientlink.input.js @@ -1,33 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Patient.link Input Schema + * @summary Patientlink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PatientLink_Input', - description: - 'Link to another patient resource that concerns the same actual patient.', - fields: () => - extendSchema(require('./backboneelement.input'), { - other: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The other patient resource that the link refers to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/link-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of link between this patient resource and another patient resource.', - }, - _type: { - type: require('./element.input'), - description: - 'The type of link between this patient resource and another patient resource.', - }, - }), + name: 'Patientlink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + other: { + type: new GraphQLNonNull(GraphQLString), + description: 'The other patient resource that the link refers to.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of link between this patient resource and another patient resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/link-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of link between this patient resource and another patient resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/paymentnotice.input.js b/src/resources/3_0_1/inputs/paymentnotice.input.js index a140b137..7bb8050c 100644 --- a/src/resources/3_0_1/inputs/paymentnotice.input.js +++ b/src/resources/3_0_1/inputs/paymentnotice.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 PaymentNoticeResourceInputType = new GraphQLEnumType({ - name: 'PaymentNoticeResourceInputType', - values: { - PaymentNotice: { value: 'PaymentNotice' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,70 +17,128 @@ let PaymentNoticeResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'PaymentNotice_Input', - description: 'Base StructureDefinition for PaymentNotice Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PaymentNoticeResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The notice business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - request: { - type: require('./reference.input'), - description: 'Reference of resource for which payment is being made.', - }, - response: { - type: require('./reference.input'), - description: - 'Reference of response to resource for which payment is being made.', - }, - statusDate: { - type: DateScalar, - description: 'The date when the above payment action occurrred.', - }, - _statusDate: { - type: require('./element.input'), - description: 'The date when the above payment action occurrred.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.input'), - description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-status - paymentStatus: { - type: require('./codeableconcept.input'), - description: - 'The payment status, typically paid: payment sent, cleared: payment received.', - }, - }), + description: 'Base StructureDefinition for PaymentNotice Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentNotice_Enum_input', + values: { PaymentNotice: { value: 'PaymentNotice' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The notice business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + request: { + type: GraphQLString, + description: 'Reference of resource for which payment is being made.', + }, + response: { + type: GraphQLString, + description: + 'Reference of response to resource for which payment is being made.', + }, + _statusDate: { + type: require('./element.input.js'), + description: 'The date when the above payment action occurrred.', + }, + statusDate: { + type: DateScalar, + description: 'The date when the above payment action occurrred.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-status + paymentStatus: { + type: require('./codeableconcept.input.js'), + description: + 'The payment status, typically paid: payment sent, cleared: payment received.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/paymentreconciliation.input.js b/src/resources/3_0_1/inputs/paymentreconciliation.input.js index 19d8c283..857945a9 100644 --- a/src/resources/3_0_1/inputs/paymentreconciliation.input.js +++ b/src/resources/3_0_1/inputs/paymentreconciliation.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 PaymentReconciliationResourceInputType = new GraphQLEnumType({ - name: 'PaymentReconciliationResourceInputType', - values: { - PaymentReconciliation: { value: 'PaymentReconciliation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,91 +16,149 @@ let PaymentReconciliationResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'PaymentReconciliation_Input', - description: 'Base StructureDefinition for PaymentReconciliation Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PaymentReconciliationResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - period: { - type: require('./period.input'), - description: - 'The period of time for which payments have been gathered into this bulk payment for settlement.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.input'), - description: 'The Insurer who produced this adjudicated response.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.input'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.input'), - description: 'A description of the status of the adjudication.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - detail: { - type: new GraphQLList(require('./paymentreconciliationdetail.input')), - description: - 'List of individual settlement amounts and the corresponding transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.input'), - description: 'The form to be used for printing the content.', - }, - total: { - type: require('./money.input'), - description: 'Total payment amount.', - }, - processNote: { - type: new GraphQLList( - require('./paymentreconciliationprocessnote.input'), - ), - description: 'Suite of notes.', - }, - }), + description: 'Base StructureDefinition for PaymentReconciliation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentReconciliation_Enum_input', + values: { PaymentReconciliation: { value: 'PaymentReconciliation' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time for which payments have been gathered into this bulk payment for settlement.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + detail: { + type: new GraphQLList(require('./paymentreconciliationdetail.input.js')), + description: + 'List of individual settlement amounts and the corresponding transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.input.js'), + description: 'The form to be used for printing the content.', + }, + total: { + type: require('./money.input.js'), + description: 'Total payment amount.', + }, + processNote: { + type: new GraphQLList( + require('./paymentreconciliationprocessnote.input.js'), + ), + description: 'Suite of notes.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/paymentreconciliationdetail.input.js b/src/resources/3_0_1/inputs/paymentreconciliationdetail.input.js index 139dc28f..259bac4a 100644 --- a/src/resources/3_0_1/inputs/paymentreconciliationdetail.input.js +++ b/src/resources/3_0_1/inputs/paymentreconciliationdetail.input.js @@ -1,53 +1,73 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary PaymentReconciliation.detail Input Schema + * @summary PaymentReconciliationdetail Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PaymentReconciliationDetail_Input', - description: - 'List of individual settlement amounts and the corresponding transaction.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'Code to indicate the nature of the payment, adjustment, funds advance, etc.', - }, - request: { - type: require('./reference.input'), - description: 'The claim or financial resource.', - }, - response: { - type: require('./reference.input'), - description: 'The claim response resource.', - }, - submitter: { - type: require('./reference.input'), - description: - 'The Organization which submitted the claim or financial transaction.', - }, - payee: { - type: require('./reference.input'), - description: 'The organization which is receiving the payment.', - }, - date: { - type: DateScalar, - description: 'The date of the invoice or financial resource.', - }, - _date: { - type: require('./element.input'), - description: 'The date of the invoice or financial resource.', - }, - amount: { - type: require('./money.input'), - description: 'Amount paid for this detail.', - }, - }), + name: 'PaymentReconciliationdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Code to indicate the nature of the payment, adjustment, funds advance, etc.', + }, + request: { + type: GraphQLString, + description: 'The claim or financial resource.', + }, + response: { + type: GraphQLString, + description: 'The claim response resource.', + }, + submitter: { + type: GraphQLString, + description: + 'The Organization which submitted the claim or financial transaction.', + }, + payee: { + type: GraphQLString, + description: 'The organization which is receiving the payment.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date of the invoice or financial resource.', + }, + date: { + type: DateScalar, + description: 'The date of the invoice or financial resource.', + }, + amount: { + type: require('./money.input.js'), + description: 'Amount paid for this detail.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/paymentreconciliationprocessnote.input.js b/src/resources/3_0_1/inputs/paymentreconciliationprocessnote.input.js index b4f77ee7..3b98475f 100644 --- a/src/resources/3_0_1/inputs/paymentreconciliationprocessnote.input.js +++ b/src/resources/3_0_1/inputs/paymentreconciliationprocessnote.input.js @@ -1,29 +1,49 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary PaymentReconciliation.processNote Input Schema + * @summary PaymentReconciliationprocessNote Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PaymentReconciliationProcessNote_Input', - description: 'Suite of notes.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./codeableconcept.input'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.input'), - description: 'The note text.', - }, - }), + name: 'PaymentReconciliationprocessNote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./codeableconcept.input.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.input.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/period.input.js b/src/resources/3_0_1/inputs/period.input.js index db7c74be..654a6f85 100644 --- a/src/resources/3_0_1/inputs/period.input.js +++ b/src/resources/3_0_1/inputs/period.input.js @@ -1,8 +1,9 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -10,26 +11,40 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Period_Input', - description: 'Base StructureDefinition for Period Type.', - fields: () => - extendSchema(require('./element.input'), { - start: { - type: DateTimeScalar, - description: 'The start of the period. The boundary is inclusive.', - }, - _start: { - type: require('./element.input'), - description: 'The start of the period. The boundary is inclusive.', - }, - end: { - type: DateTimeScalar, - description: - 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', - }, - _end: { - type: require('./element.input'), - description: - 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', - }, - }), + description: 'Base StructureDefinition for Period Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _start: { + type: require('./element.input.js'), + description: 'The start of the period. The boundary is inclusive.', + }, + start: { + type: DateTimeScalar, + description: 'The start of the period. The boundary is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + end: { + type: DateTimeScalar, + description: + 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/person.input.js b/src/resources/3_0_1/inputs/person.input.js index 0a282c3f..1d3146cb 100644 --- a/src/resources/3_0_1/inputs/person.input.js +++ b/src/resources/3_0_1/inputs/person.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PersonResourceInputType = new GraphQLEnumType({ - name: 'PersonResourceInputType', - values: { - Person: { value: 'Person' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,68 +17,126 @@ let PersonResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Person_Input', - description: 'Base StructureDefinition for Person Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PersonResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier for a person within a particular scope.', - }, - name: { - type: new GraphQLList(require('./humanname.input')), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: 'Administrative Gender.', - }, - _gender: { - type: require('./element.input'), - description: 'Administrative Gender.', - }, - birthDate: { - type: DateScalar, - description: 'The birth date for the person.', - }, - _birthDate: { - type: require('./element.input'), - description: 'The birth date for the person.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: 'One or more addresses for the person.', - }, - photo: { - type: require('./attachment.input'), - description: - 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', - }, - managingOrganization: { - type: require('./reference.input'), - description: - 'The organization that is the custodian of the person record.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this person's record is in active use.", - }, - _active: { - type: require('./element.input'), - description: "Whether this person's record is in active use.", - }, - link: { - type: new GraphQLList(require('./personlink.input')), - description: 'Link to a resource that concerns the same actual person.', - }, - }), + description: 'Base StructureDefinition for Person Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Person_Enum_input', + values: { Person: { value: 'Person' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'Identifier for a person within a particular scope.', + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.input.js'), + description: 'Administrative Gender.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: 'Administrative Gender.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The birth date for the person.', + }, + birthDate: { + type: DateScalar, + description: 'The birth date for the person.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'One or more addresses for the person.', + }, + photo: { + type: require('./attachment.input.js'), + description: + 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization that is the custodian of the person record.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether this person's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this person's record is in active use.", + }, + link: { + type: new GraphQLList(require('./personlink.input.js')), + description: 'Link to a resource that concerns the same actual person.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/personlink.input.js b/src/resources/3_0_1/inputs/personlink.input.js index fea2cbf8..9b6bd31c 100644 --- a/src/resources/3_0_1/inputs/personlink.input.js +++ b/src/resources/3_0_1/inputs/personlink.input.js @@ -1,32 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Person.link Input Schema + * @summary Personlink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PersonLink_Input', - description: 'Link to a resource that concerns the same actual person.', - fields: () => - extendSchema(require('./backboneelement.input'), { - target: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The resource to which this actual person is associated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identity-assuranceLevel - assurance: { - type: CodeScalar, - description: - 'Level of assurance that this link is actually associated with the target resource.', - }, - _assurance: { - type: require('./element.input'), - description: - 'Level of assurance that this link is actually associated with the target resource.', - }, - }), + name: 'Personlink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + target: { + type: new GraphQLNonNull(GraphQLString), + description: 'The resource to which this actual person is associated.', + }, + _assurance: { + type: require('./element.input.js'), + description: + 'Level of assurance that this link is actually associated with the target resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identity-assuranceLevel + assurance: { + type: CodeScalar, + description: + 'Level of assurance that this link is actually associated with the target resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/plandefinition.input.js b/src/resources/3_0_1/inputs/plandefinition.input.js index d06b79ee..94211df3 100644 --- a/src/resources/3_0_1/inputs/plandefinition.input.js +++ b/src/resources/3_0_1/inputs/plandefinition.input.js @@ -1,25 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PlanDefinitionResourceInputType = new GraphQLEnumType({ - name: 'PlanDefinitionResourceInputType', - values: { - PlanDefinition: { value: 'PlanDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -27,215 +18,273 @@ let PlanDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'PlanDefinition_Input', - description: 'Base StructureDefinition for PlanDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PlanDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the plan definition.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the plan definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/plan-definition-type - type: { - type: require('./codeableconcept.input'), - description: - 'The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this plan definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this plan definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the plan definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the plan definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the plan definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the plan definition.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the plan definition from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the plan definition from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this plan definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this plan definition is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the asset is used from a clinical perspective.', - }, - _usage: { - type: require('./element.input'), - description: - 'A detailed description of how the asset is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.input'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.input'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The period during which the plan definition content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate plan definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the plan definition is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.input')), - description: - 'A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.input')), - description: - 'Related artifacts such as additional documentation, justification, or bibliographic references.', - }, - library: { - type: new GraphQLList(require('./reference.input')), - description: - 'A reference to a Library resource containing any formal logic used by the plan definition.', - }, - goal: { - type: new GraphQLList(require('./plandefinitiongoal.input')), - description: - 'Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', - }, - action: { - type: new GraphQLList(require('./plandefinitionaction.input')), - description: 'An action to be taken as part of the plan.', - }, - }), + description: 'Base StructureDefinition for PlanDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PlanDefinition_Enum_input', + values: { PlanDefinition: { value: 'PlanDefinition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the plan definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the plan definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/plan-definition-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this plan definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this plan definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the plan definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the plan definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the plan definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the plan definition.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the plan definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the plan definition from a consumer's perspective.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this plan definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this plan definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the asset is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the asset is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the plan definition content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate plan definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the plan definition is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.input.js')), + description: + 'A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + library: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to a Library resource containing any formal logic used by the plan definition.', + }, + goal: { + type: new GraphQLList(require('./plandefinitiongoal.input.js')), + description: + 'Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', + }, + action: { + type: new GraphQLList(require('./plandefinitionaction.input.js')), + description: 'An action to be taken as part of the plan.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/plandefinitionaction.input.js b/src/resources/3_0_1/inputs/plandefinitionaction.input.js index 787fce47..9ec91241 100644 --- a/src/resources/3_0_1/inputs/plandefinitionaction.input.js +++ b/src/resources/3_0_1/inputs/plandefinitionaction.input.js @@ -1,220 +1,234 @@ -const IdScalar = require('../scalars/id.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary PlanDefinition.action Input Schema + * @summary PlanDefinitionaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PlanDefinitionAction_Input', - description: 'An action to be taken as part of the plan.', - fields: () => - extendSchema(require('./backboneelement.input'), { - label: { - type: GraphQLString, - description: 'A user-visible label for the action.', - }, - _label: { - type: require('./element.input'), - description: 'A user-visible label for the action.', - }, - title: { - type: GraphQLString, - description: 'The title of the action displayed to a user.', - }, - _title: { - type: require('./element.input'), - description: 'The title of the action displayed to a user.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the action used to provide a summary to display to the user.', - }, - _description: { - type: require('./element.input'), - description: - 'A short description of the action used to provide a summary to display to the user.', - }, - textEquivalent: { - type: GraphQLString, - description: - 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', - }, - _textEquivalent: { - type: require('./element.input'), - description: - 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', - }, - code: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.', - }, - reason: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A description of why this action is necessary or appropriate.', - }, - documentation: { - type: new GraphQLList(require('./relatedartifact.input')), - description: - 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', - }, - goalId: { - type: new GraphQLList(IdScalar), - description: - 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', - }, - _goalId: { - type: require('./element.input'), - description: - 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', - }, - triggerDefinition: { - type: new GraphQLList(require('./triggerdefinition.input')), - description: 'A description of when the action should be triggered.', - }, - condition: { - type: new GraphQLList(require('./plandefinitionactioncondition.input')), - description: - 'An expression that describes applicability criteria, or start/stop conditions for the action.', - }, - input: { - type: new GraphQLList(require('./datarequirement.input')), - description: 'Defines input data requirements for the action.', - }, - output: { - type: new GraphQLList(require('./datarequirement.input')), - description: 'Defines the outputs of the action, if any.', - }, - relatedAction: { - type: new GraphQLList( - require('./plandefinitionactionrelatedaction.input'), - ), - description: - "A relationship to another action such as 'before' or '30-60 minutes after start of'.", - }, - timingDateTime: { - type: DateTimeScalar, - description: - 'An optional value describing when the action should be performed.', - }, - _timingDateTime: { - type: require('./element.input'), - description: - 'An optional value describing when the action should be performed.', - }, - timingPeriod: { - type: require('./period.input'), - description: - 'An optional value describing when the action should be performed.', - }, - timingDuration: { - type: require('./duration.input'), - description: - 'An optional value describing when the action should be performed.', - }, - timingRange: { - type: require('./range.input'), - description: - 'An optional value describing when the action should be performed.', - }, - timingTiming: { - type: require('./timing.input'), - description: - 'An optional value describing when the action should be performed.', - }, - participant: { - type: new GraphQLList( - require('./plandefinitionactionparticipant.input'), - ), - description: - 'Indicates who should participate in performing the action described.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-type - type: { - type: require('./coding.input'), - description: 'The type of action to perform (create, update, remove).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-grouping-behavior - groupingBehavior: { - type: CodeScalar, - description: - 'Defines the grouping behavior for the action and its children.', - }, - _groupingBehavior: { - type: require('./element.input'), - description: - 'Defines the grouping behavior for the action and its children.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-selection-behavior - selectionBehavior: { - type: CodeScalar, - description: - 'Defines the selection behavior for the action and its children.', - }, - _selectionBehavior: { - type: require('./element.input'), - description: - 'Defines the selection behavior for the action and its children.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-required-behavior - requiredBehavior: { - type: CodeScalar, - description: 'Defines the requiredness behavior for the action.', - }, - _requiredBehavior: { - type: require('./element.input'), - description: 'Defines the requiredness behavior for the action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-precheck-behavior - precheckBehavior: { - type: CodeScalar, - description: - 'Defines whether the action should usually be preselected.', - }, - _precheckBehavior: { - type: require('./element.input'), - description: - 'Defines whether the action should usually be preselected.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-cardinality-behavior - cardinalityBehavior: { - type: CodeScalar, - description: - 'Defines whether the action can be selected multiple times.', - }, - _cardinalityBehavior: { - type: require('./element.input'), - description: - 'Defines whether the action can be selected multiple times.', - }, - definition: { - type: require('./reference.input'), - description: - 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', - }, - transform: { - type: require('./reference.input'), - description: - 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', - }, - dynamicValue: { - type: new GraphQLList( - require('./plandefinitionactiondynamicvalue.input'), - ), - description: - "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", - }, - }), + name: 'PlanDefinitionaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _label: { + type: require('./element.input.js'), + description: 'A user-visible label for the action.', + }, + label: { + type: GraphQLString, + description: 'A user-visible label for the action.', + }, + _title: { + type: require('./element.input.js'), + description: 'The title of the action displayed to a user.', + }, + title: { + type: GraphQLString, + description: 'The title of the action displayed to a user.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + _textEquivalent: { + type: require('./element.input.js'), + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', + }, + textEquivalent: { + type: GraphQLString, + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A description of why this action is necessary or appropriate.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', + }, + _goalId: { + type: require('./element.input.js'), + description: + 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', + }, + goalId: { + type: new GraphQLList(IdScalar), + description: + 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', + }, + triggerDefinition: { + type: new GraphQLList(require('./triggerdefinition.input.js')), + description: 'A description of when the action should be triggered.', + }, + condition: { + type: new GraphQLList( + require('./plandefinitionactioncondition.input.js'), + ), + description: + 'An expression that describes applicability criteria, or start/stop conditions for the action.', + }, + input: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: 'Defines input data requirements for the action.', + }, + output: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: 'Defines the outputs of the action, if any.', + }, + relatedAction: { + type: new GraphQLList( + require('./plandefinitionactionrelatedaction.input.js'), + ), + description: + "A relationship to another action such as 'before' or '30-60 minutes after start of'.", + }, + _timingDateTime: { + type: require('./element.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'An optional value describing when the action should be performed.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDuration: { + type: require('./duration.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingRange: { + type: require('./range.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + participant: { + type: new GraphQLList( + require('./plandefinitionactionparticipant.input.js'), + ), + description: + 'Indicates who should participate in performing the action described.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-type + type: { + type: require('./coding.input.js'), + description: 'The type of action to perform (create, update, remove).', + }, + _groupingBehavior: { + type: require('./element.input.js'), + description: + 'Defines the grouping behavior for the action and its children.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-grouping-behavior + groupingBehavior: { + type: CodeScalar, + description: + 'Defines the grouping behavior for the action and its children.', + }, + _selectionBehavior: { + type: require('./element.input.js'), + description: + 'Defines the selection behavior for the action and its children.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-selection-behavior + selectionBehavior: { + type: CodeScalar, + description: + 'Defines the selection behavior for the action and its children.', + }, + _requiredBehavior: { + type: require('./element.input.js'), + description: 'Defines the requiredness behavior for the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-required-behavior + requiredBehavior: { + type: CodeScalar, + description: 'Defines the requiredness behavior for the action.', + }, + _precheckBehavior: { + type: require('./element.input.js'), + description: 'Defines whether the action should usually be preselected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-precheck-behavior + precheckBehavior: { + type: CodeScalar, + description: 'Defines whether the action should usually be preselected.', + }, + _cardinalityBehavior: { + type: require('./element.input.js'), + description: 'Defines whether the action can be selected multiple times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-cardinality-behavior + cardinalityBehavior: { + type: CodeScalar, + description: 'Defines whether the action can be selected multiple times.', + }, + definition: { + type: GraphQLString, + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + transform: { + type: GraphQLString, + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + dynamicValue: { + type: new GraphQLList( + require('./plandefinitionactiondynamicvalue.input.js'), + ), + description: + "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/plandefinitionactioncondition.input.js b/src/resources/3_0_1/inputs/plandefinitionactioncondition.input.js index 9f36906f..87aafb81 100644 --- a/src/resources/3_0_1/inputs/plandefinitionactioncondition.input.js +++ b/src/resources/3_0_1/inputs/plandefinitionactioncondition.input.js @@ -1,59 +1,75 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary PlanDefinition.action.condition Input Schema + * @summary PlanDefinitionactioncondition Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PlanDefinitionActionCondition_Input', - description: - 'An expression that describes applicability criteria, or start/stop conditions for the action.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-condition-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: 'The kind of condition.', - }, - _kind: { - type: require('./element.input'), - description: 'The kind of condition.', - }, - description: { - type: GraphQLString, - description: - 'A brief, natural language description of the condition that effectively communicates the intended semantics.', - }, - _description: { - type: require('./element.input'), - description: - 'A brief, natural language description of the condition that effectively communicates the intended semantics.', - }, - language: { - type: GraphQLString, - description: 'The media type of the language for the expression.', - }, - _language: { - type: require('./element.input'), - description: 'The media type of the language for the expression.', - }, - expression: { - type: GraphQLString, - description: - 'An expression that returns true or false, indicating whether or not the condition is satisfied.', - }, - _expression: { - type: require('./element.input'), - description: - 'An expression that returns true or false, indicating whether or not the condition is satisfied.', - }, - }), + name: 'PlanDefinitionactioncondition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _kind: { + type: require('./element.input.js'), + description: 'The kind of condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-condition-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'The kind of condition.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + _language: { + type: require('./element.input.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: GraphQLString, + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + expression: { + type: GraphQLString, + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/plandefinitionactiondynamicvalue.input.js b/src/resources/3_0_1/inputs/plandefinitionactiondynamicvalue.input.js index 426b9bfd..a47e31e3 100644 --- a/src/resources/3_0_1/inputs/plandefinitionactiondynamicvalue.input.js +++ b/src/resources/3_0_1/inputs/plandefinitionactiondynamicvalue.input.js @@ -1,55 +1,74 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary PlanDefinition.action.dynamicValue Input Schema + * @summary PlanDefinitionactiondynamicValue Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PlanDefinitionActionDynamicValue_Input', - description: - "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: GraphQLString, - description: - 'A brief, natural language description of the intended semantics of the dynamic value.', - }, - _description: { - type: require('./element.input'), - description: - 'A brief, natural language description of the intended semantics of the dynamic value.', - }, - path: { - type: GraphQLString, - description: - 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', - }, - _path: { - type: require('./element.input'), - description: - 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', - }, - language: { - type: GraphQLString, - description: 'The media type of the language for the expression.', - }, - _language: { - type: require('./element.input'), - description: 'The media type of the language for the expression.', - }, - expression: { - type: GraphQLString, - description: - 'An expression specifying the value of the customized element.', - }, - _expression: { - type: require('./element.input'), - description: - 'An expression specifying the value of the customized element.', - }, - }), + name: 'PlanDefinitionactiondynamicValue_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A brief, natural language description of the intended semantics of the dynamic value.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the intended semantics of the dynamic value.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', + }, + path: { + type: GraphQLString, + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', + }, + _language: { + type: require('./element.input.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: GraphQLString, + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'An expression specifying the value of the customized element.', + }, + expression: { + type: GraphQLString, + description: + 'An expression specifying the value of the customized element.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/plandefinitionactionparticipant.input.js b/src/resources/3_0_1/inputs/plandefinitionactionparticipant.input.js index a9b79c8e..4cc2a1f1 100644 --- a/src/resources/3_0_1/inputs/plandefinitionactionparticipant.input.js +++ b/src/resources/3_0_1/inputs/plandefinitionactionparticipant.input.js @@ -1,33 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary PlanDefinition.action.participant Input Schema + * @summary PlanDefinitionactionparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PlanDefinitionActionParticipant_Input', - description: - 'Indicates who should participate in performing the action described.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-participant-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of participant in the action.', - }, - _type: { - type: require('./element.input'), - description: 'The type of participant in the action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-participant-role - role: { - type: require('./codeableconcept.input'), - description: - 'The role the participant should play in performing the described action.', - }, - }), + name: 'PlanDefinitionactionparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of participant in the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-participant-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant in the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-participant-role + role: { + type: require('./codeableconcept.input.js'), + description: + 'The role the participant should play in performing the described action.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/plandefinitionactionrelatedaction.input.js b/src/resources/3_0_1/inputs/plandefinitionactionrelatedaction.input.js index 4ca5545d..037648e5 100644 --- a/src/resources/3_0_1/inputs/plandefinitionactionrelatedaction.input.js +++ b/src/resources/3_0_1/inputs/plandefinitionactionrelatedaction.input.js @@ -1,46 +1,66 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary PlanDefinition.action.relatedAction Input Schema + * @summary PlanDefinitionactionrelatedAction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PlanDefinitionActionRelatedAction_Input', - description: - "A relationship to another action such as 'before' or '30-60 minutes after start of'.", - fields: () => - extendSchema(require('./backboneelement.input'), { - actionId: { - type: new GraphQLNonNull(IdScalar), - description: 'The element id of the related action.', - }, - _actionId: { - type: require('./element.input'), - description: 'The element id of the related action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-relationship-type - relationship: { - type: new GraphQLNonNull(CodeScalar), - description: 'The relationship of this action to the related action.', - }, - _relationship: { - type: require('./element.input'), - description: 'The relationship of this action to the related action.', - }, - offsetDuration: { - type: require('./duration.input'), - description: - 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', - }, - offsetRange: { - type: require('./range.input'), - description: - 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', - }, - }), + name: 'PlanDefinitionactionrelatedAction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _actionId: { + type: require('./element.input.js'), + description: 'The element id of the related action.', + }, + actionId: { + type: new GraphQLNonNull(IdScalar), + description: 'The element id of the related action.', + }, + _relationship: { + type: require('./element.input.js'), + description: 'The relationship of this action to the related action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-relationship-type + relationship: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relationship of this action to the related action.', + }, + offsetDuration: { + type: require('./duration.input.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + offsetRange: { + type: require('./range.input.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/plandefinitiongoal.input.js b/src/resources/3_0_1/inputs/plandefinitiongoal.input.js index 7b136758..5a0425a5 100644 --- a/src/resources/3_0_1/inputs/plandefinitiongoal.input.js +++ b/src/resources/3_0_1/inputs/plandefinitiongoal.input.js @@ -1,59 +1,74 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary PlanDefinition.goal Input Schema + * @summary PlanDefinitiongoal Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PlanDefinitionGoal_Input', - description: - 'Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-category - category: { - type: require('./codeableconcept.input'), - description: 'Indicates a category the goal falls within.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - description: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-priority - priority: { - type: require('./codeableconcept.input'), - description: - 'Identifies the expected level of importance associated with reaching/sustaining the defined goal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - start: { - type: require('./codeableconcept.input'), - description: - 'The event after which the goal should begin being pursued.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - addresses: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Identifies problems, conditions, issues, or concerns the goal is intended to address.', - }, - documentation: { - type: new GraphQLList(require('./relatedartifact.input')), - description: - 'Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.', - }, - target: { - type: new GraphQLList(require('./plandefinitiongoaltarget.input')), - description: 'Indicates what should be done and within what timeframe.', - }, - }), + name: 'PlanDefinitiongoal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-category + category: { + type: require('./codeableconcept.input.js'), + description: 'Indicates a category the goal falls within.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + description: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-priority + priority: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the expected level of importance associated with reaching/sustaining the defined goal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + start: { + type: require('./codeableconcept.input.js'), + description: 'The event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + addresses: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies problems, conditions, issues, or concerns the goal is intended to address.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.', + }, + target: { + type: new GraphQLList(require('./plandefinitiongoaltarget.input.js')), + description: 'Indicates what should be done and within what timeframe.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/plandefinitiongoaltarget.input.js b/src/resources/3_0_1/inputs/plandefinitiongoaltarget.input.js index fa3851de..87a5b634 100644 --- a/src/resources/3_0_1/inputs/plandefinitiongoaltarget.input.js +++ b/src/resources/3_0_1/inputs/plandefinitiongoaltarget.input.js @@ -1,42 +1,62 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary PlanDefinition.goal.target Input Schema + * @summary PlanDefinitiongoaltarget Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PlanDefinitionGoalTarget_Input', - description: 'Indicates what should be done and within what timeframe.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - measure: { - type: require('./codeableconcept.input'), - description: - 'The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.', - }, - detailQuantity: { - type: require('./quantity.input'), - description: - 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', - }, - detailRange: { - type: require('./range.input'), - description: - 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', - }, - detailCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', - }, - due: { - type: require('./duration.input'), - description: - 'Indicates the timeframe after the start of the goal in which the goal should be met.', - }, - }), + name: 'PlanDefinitiongoaltarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + measure: { + type: require('./codeableconcept.input.js'), + description: + 'The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.', + }, + detailQuantity: { + type: require('./quantity.input.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + detailRange: { + type: require('./range.input.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + detailCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + due: { + type: require('./duration.input.js'), + description: + 'Indicates the timeframe after the start of the goal in which the goal should be met.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/practitioner.input.js b/src/resources/3_0_1/inputs/practitioner.input.js index e61b2bbc..074bfd49 100644 --- a/src/resources/3_0_1/inputs/practitioner.input.js +++ b/src/resources/3_0_1/inputs/practitioner.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PractitionerResourceInputType = new GraphQLEnumType({ - name: 'PractitionerResourceInputType', - values: { - Practitioner: { value: 'Practitioner' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,71 +17,129 @@ let PractitionerResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Practitioner_Input', - description: 'Base StructureDefinition for Practitioner Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PractitionerResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'An identifier that applies to this person in this role.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this practitioner's record is in active use.", - }, - _active: { - type: require('./element.input'), - description: "Whether this practitioner's record is in active use.", - }, - name: { - type: new GraphQLList(require('./humanname.input')), - description: 'The name(s) associated with the practitioner.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail for the practitioner, e.g. a telephone number or an email address.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: - 'Address(es) of the practitioner that are not role specific (typically home address). Work addresses are not typically entered in this property as they are usually role dependent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date of birth for the practitioner.', - }, - _birthDate: { - type: require('./element.input'), - description: 'The date of birth for the practitioner.', - }, - photo: { - type: new GraphQLList(require('./attachment.input')), - description: 'Image of the person.', - }, - qualification: { - type: new GraphQLList(require('./practitionerqualification.input')), - description: 'Qualifications obtained by training and certification.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - communication: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A language the practitioner is able to use in patient communication.', - }, - }), + description: 'Base StructureDefinition for Practitioner Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Practitioner_Enum_input', + values: { Practitioner: { value: 'Practitioner' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'An identifier that applies to this person in this role.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether this practitioner's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this practitioner's record is in active use.", + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'The name(s) associated with the practitioner.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the practitioner, e.g. a telephone number or an email address.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: + 'Address(es) of the practitioner that are not role specific (typically home address). Work addresses are not typically entered in this property as they are usually role dependent.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date of birth for the practitioner.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the practitioner.', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the person.', + }, + qualification: { + type: new GraphQLList(require('./practitionerqualification.input.js')), + description: 'Qualifications obtained by training and certification.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + communication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A language the practitioner is able to use in patient communication.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/practitionerqualification.input.js b/src/resources/3_0_1/inputs/practitionerqualification.input.js index 4bd541aa..a7b6e7e5 100644 --- a/src/resources/3_0_1/inputs/practitionerqualification.input.js +++ b/src/resources/3_0_1/inputs/practitionerqualification.input.js @@ -1,39 +1,55 @@ const { - GraphQLInputObjectType, + GraphQLString, GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Practitioner.qualification Input Schema + * @summary Practitionerqualification Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PractitionerQualification_Input', - description: 'Qualifications obtained by training and certification.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - "An identifier that applies to this person's qualification in this role.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-2.7-0360 - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Coded representation of the qualification.', - }, - period: { - type: require('./period.input'), - description: 'Period during which the qualification is valid.', - }, - issuer: { - type: require('./reference.input'), - description: - 'Organization that regulates and issues the qualification.', - }, - }), + name: 'Practitionerqualification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: + "An identifier that applies to this person's qualification in this role.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-2.7-0360 + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Coded representation of the qualification.', + }, + period: { + type: require('./period.input.js'), + description: 'Period during which the qualification is valid.', + }, + issuer: { + type: GraphQLString, + description: 'Organization that regulates and issues the qualification.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/practitionerrole.input.js b/src/resources/3_0_1/inputs/practitionerrole.input.js index 439277f5..4a10e47d 100644 --- a/src/resources/3_0_1/inputs/practitionerrole.input.js +++ b/src/resources/3_0_1/inputs/practitionerrole.input.js @@ -1,21 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PractitionerRoleResourceInputType = new GraphQLEnumType({ - name: 'PractitionerRoleResourceInputType', - values: { - PractitionerRole: { value: 'PractitionerRole' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,91 +16,148 @@ let PractitionerRoleResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'PractitionerRole_Input', - description: 'Base StructureDefinition for PractitionerRole Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(PractitionerRoleResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Business Identifiers that are specific to a role/location.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this practitioner's record is in active use.", - }, - _active: { - type: require('./element.input'), - description: "Whether this practitioner's record is in active use.", - }, - period: { - type: require('./period.input'), - description: - 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', - }, - practitioner: { - type: require('./reference.input'), - description: - 'Practitioner that is able to provide the defined services for the organation.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization where the Practitioner performs the roles associated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-role - code: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Roles which this practitioner is authorized to perform for the organization.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Specific specialty of the practitioner.', - }, - location: { - type: new GraphQLList(require('./reference.input')), - description: - 'The location(s) at which this practitioner provides care.', - }, - healthcareService: { - type: new GraphQLList(require('./reference.input')), - description: - "The list of healthcare services that this worker provides for this role's Organization/Location(s).", - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details that are specific to the role/location/service.', - }, - availableTime: { - type: new GraphQLList(require('./practitionerroleavailabletime.input')), - description: - 'A collection of times that the Service Site is available.', - }, - notAvailable: { - type: new GraphQLList(require('./practitionerrolenotavailable.input')), - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - }, - availabilityExceptions: { - type: GraphQLString, - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - _availabilityExceptions: { - type: require('./element.input'), - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - endpoint: { - type: new GraphQLList(require('./reference.input')), - description: - 'Technical endpoints providing access to services operated for the practitioner with this role.', - }, - }), + description: 'Base StructureDefinition for PractitionerRole Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PractitionerRole_Enum_input', + values: { PractitionerRole: { value: 'PractitionerRole' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'Business Identifiers that are specific to a role/location.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether this practitioner's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this practitioner's record is in active use.", + }, + period: { + type: require('./period.input.js'), + description: + 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', + }, + practitioner: { + type: GraphQLString, + description: + 'Practitioner that is able to provide the defined services for the organation.', + }, + organization: { + type: GraphQLString, + description: + 'The organization where the Practitioner performs the roles associated.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-role + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Roles which this practitioner is authorized to perform for the organization.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Specific specialty of the practitioner.', + }, + location: { + type: new GraphQLList(GraphQLString), + description: 'The location(s) at which this practitioner provides care.', + }, + healthcareService: { + type: new GraphQLList(GraphQLString), + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details that are specific to the role/location/service.', + }, + availableTime: { + type: new GraphQLList( + require('./practitionerroleavailabletime.input.js'), + ), + description: 'A collection of times that the Service Site is available.', + }, + notAvailable: { + type: new GraphQLList(require('./practitionerrolenotavailable.input.js')), + description: + 'The HealthcareService is not available during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.input.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for the practitioner with this role.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/practitionerroleavailabletime.input.js b/src/resources/3_0_1/inputs/practitionerroleavailabletime.input.js index bb6e6594..e6c48efe 100644 --- a/src/resources/3_0_1/inputs/practitionerroleavailabletime.input.js +++ b/src/resources/3_0_1/inputs/practitionerroleavailabletime.input.js @@ -1,63 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLInputObjectType, + GraphQLString, GraphQLList, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary PractitionerRole.availableTime Input Schema + * @summary PractitionerRoleavailableTime Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PractitionerRoleAvailableTime_Input', - description: 'A collection of times that the Service Site is available.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/days-of-week - daysOfWeek: { - type: new GraphQLList(CodeScalar), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - _daysOfWeek: { - type: require('./element.input'), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - allDay: { - type: GraphQLBoolean, - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - _allDay: { - type: require('./element.input'), - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - availableStartTime: { - type: TimeScalar, - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableStartTime: { - type: require('./element.input'), - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - availableEndTime: { - type: TimeScalar, - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableEndTime: { - type: require('./element.input'), - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - }), + name: 'PractitionerRoleavailableTime_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _daysOfWeek: { + type: require('./element.input.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/days-of-week + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.input.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.input.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.input.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/practitionerrolenotavailable.input.js b/src/resources/3_0_1/inputs/practitionerrolenotavailable.input.js index c10f5b9d..2235106e 100644 --- a/src/resources/3_0_1/inputs/practitionerrolenotavailable.input.js +++ b/src/resources/3_0_1/inputs/practitionerrolenotavailable.input.js @@ -1,36 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary PractitionerRole.notAvailable Input Schema + * @summary PractitionerRolenotAvailable Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'PractitionerRoleNotAvailable_Input', - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - _description: { - type: require('./element.input'), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - during: { - type: require('./period.input'), - description: - 'Service is not available (seasonally or for a public holiday) from this date.', - }, - }), + name: 'PractitionerRolenotAvailable_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.input.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/procedure.input.js b/src/resources/3_0_1/inputs/procedure.input.js index a32d0fab..b64c7339 100644 --- a/src/resources/3_0_1/inputs/procedure.input.js +++ b/src/resources/3_0_1/inputs/procedure.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcedureResourceInputType = new GraphQLEnumType({ - name: 'ProcedureResourceInputType', - values: { - Procedure: { value: 'Procedure' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,169 +17,227 @@ let ProcedureResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Procedure_Input', - description: 'Base StructureDefinition for Procedure Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProcedureResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: - 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this procedure.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A reference to a resource that contains details of the request for this procedure.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: - 'A larger event of which this particular procedure is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', - }, - _status: { - type: require('./element.input'), - description: - 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', - }, - notDone: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the procedure was NOT performed.', - }, - _notDone: { - type: require('./element.input'), - description: - 'Set this to true if the record is saying that the procedure was NOT performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-not-performed-reason - notDoneReason: { - type: require('./codeableconcept.input'), - description: 'A code indicating why the procedure was not performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-category - category: { - type: require('./codeableconcept.input'), - description: - "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: require('./codeableconcept.input'), - description: - "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The person, animal or group on which the procedure was performed.', - }, - context: { - type: require('./reference.input'), - description: 'The encounter during which the procedure was performed.', - }, - performedDateTime: { - type: DateTimeScalar, - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - _performedDateTime: { - type: require('./element.input'), - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - performedPeriod: { - type: require('./period.input'), - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - performer: { - type: new GraphQLList(require('./procedureperformer.input')), - description: "Limited to 'real' people rather than equipment.", - }, - location: { - type: require('./reference.input'), - description: - 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The coded reason why the procedure was performed. This may be coded entity of some type, or may simply be present as text.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'The condition that is the reason why the procedure was performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-outcome - outcome: { - type: require('./codeableconcept.input'), - description: - 'The outcome of the procedure - did it resolve reasons for the procedure being performed?.', - }, - report: { - type: new GraphQLList(require('./reference.input')), - description: - 'This could be a histology result, pathology report, surgical report, etc..', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - complication: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", - }, - complicationDetail: { - type: new GraphQLList(require('./reference.input')), - description: - 'Any complications that occurred during the procedure, or in the immediate post-performance period.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-followup - followUp: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Any other notes about the procedure. E.g. the operative notes.', - }, - focalDevice: { - type: new GraphQLList(require('./procedurefocaldevice.input')), - description: - 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', - }, - usedReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Identifies medications, devices and any other substance used as part of the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-kind - usedCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Identifies coded items that were used as part of the procedure.', - }, - }), + description: 'Base StructureDefinition for Procedure Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Procedure_Enum_input', + values: { Procedure: { value: 'Procedure' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this procedure.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to a resource that contains details of the request for this procedure.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular procedure is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', + }, + _notDone: { + type: require('./element.input.js'), + description: + 'Set this to true if the record is saying that the procedure was NOT performed.', + }, + notDone: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the procedure was NOT performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-not-performed-reason + notDoneReason: { + type: require('./codeableconcept.input.js'), + description: 'A code indicating why the procedure was not performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-category + category: { + type: require('./codeableconcept.input.js'), + description: + "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: require('./codeableconcept.input.js'), + description: + "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person, animal or group on which the procedure was performed.', + }, + context: { + type: GraphQLString, + description: 'The encounter during which the procedure was performed.', + }, + _performedDateTime: { + type: require('./element.input.js'), + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedDateTime: { + type: DateTimeScalar, + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedPeriod: { + type: require('./period.input.js'), + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performer: { + type: new GraphQLList(require('./procedureperformer.input.js')), + description: "Limited to 'real' people rather than equipment.", + }, + location: { + type: GraphQLString, + description: + 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The coded reason why the procedure was performed. This may be coded entity of some type, or may simply be present as text.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'The condition that is the reason why the procedure was performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: + 'The outcome of the procedure - did it resolve reasons for the procedure being performed?', + }, + report: { + type: new GraphQLList(GraphQLString), + description: + 'This could be a histology result, pathology report, surgical report, etc..', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + complication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", + }, + complicationDetail: { + type: new GraphQLList(GraphQLString), + description: + 'Any complications that occurred during the procedure, or in the immediate post-performance period.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-followup + followUp: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Any other notes about the procedure. E.g. the operative notes.', + }, + focalDevice: { + type: new GraphQLList(require('./procedurefocaldevice.input.js')), + description: + 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', + }, + usedReference: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-kind + usedCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies coded items that were used as part of the procedure.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/procedurefocaldevice.input.js b/src/resources/3_0_1/inputs/procedurefocaldevice.input.js index 0080fb78..eb375f9e 100644 --- a/src/resources/3_0_1/inputs/procedurefocaldevice.input.js +++ b/src/resources/3_0_1/inputs/procedurefocaldevice.input.js @@ -1,28 +1,48 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Procedure.focalDevice Input Schema + * @summary ProcedurefocalDevice Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcedureFocalDevice_Input', - description: - 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-action - action: { - type: require('./codeableconcept.input'), - description: - 'The kind of change that happened to the device during the procedure.', - }, - manipulated: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device that was manipulated (changed) during the procedure.', - }, - }), + name: 'ProcedurefocalDevice_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-action + action: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of change that happened to the device during the procedure.', + }, + manipulated: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device that was manipulated (changed) during the procedure.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/procedureperformer.input.js b/src/resources/3_0_1/inputs/procedureperformer.input.js index 88e21996..aded7974 100644 --- a/src/resources/3_0_1/inputs/procedureperformer.input.js +++ b/src/resources/3_0_1/inputs/procedureperformer.input.js @@ -1,30 +1,51 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Procedure.performer Input Schema + * @summary Procedureperformer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcedurePerformer_Input', - description: "Limited to 'real' people rather than equipment.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/performer-role - role: { - type: require('./codeableconcept.input'), - description: 'For example: surgeon, anaethetist, endoscopist.', - }, - actor: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The practitioner who was involved in the procedure.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'Procedureperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/performer-role + role: { + type: require('./codeableconcept.input.js'), + description: 'For example: surgeon, anaethetist, endoscopist.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: 'The practitioner who was involved in the procedure.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/procedurerequest.input.js b/src/resources/3_0_1/inputs/procedurerequest.input.js index 67feaa24..8b59ed98 100644 --- a/src/resources/3_0_1/inputs/procedurerequest.input.js +++ b/src/resources/3_0_1/inputs/procedurerequest.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcedureRequestResourceInputType = new GraphQLEnumType({ - name: 'ProcedureRequestResourceInputType', - values: { - ProcedureRequest: { value: 'ProcedureRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,195 +17,253 @@ let ProcedureRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ProcedureRequest_Input', - description: 'Base StructureDefinition for ProcedureRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProcedureRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: 'Protocol or definition followed by this request.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: 'Plan/proposal/order fulfilled by this request.', - }, - replaces: { - type: new GraphQLList(require('./reference.input')), - description: - 'The request takes the place of the referenced completed or terminated request(s).', - }, - requisition: { - type: require('./identifier.input'), - description: - 'A shared identifier common to all procedure or diagnostic requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the order.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether the request is a proposal, plan, an original order or a reflex order.', - }, - _intent: { - type: require('./element.input'), - description: - 'Whether the request is a proposal, plan, an original order or a reflex order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the ProcedureRequest should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.input'), - description: - 'Indicates how quickly the ProcedureRequest should be addressed with respect to other requests.', - }, - doNotPerform: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the procedure should NOT be performed.', - }, - _doNotPerform: { - type: require('./element.input'), - description: - 'Set this to true if the record is saying that the procedure should NOT be performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'A code that identifies a particular procedure, diagnostic investigation, or panel of investigations, that have been requested.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'On whom or what the procedure or diagnostic is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', - }, - context: { - type: require('./reference.input'), - description: - 'An encounter or episode of care that provides additional information about the healthcare context in which this request is made.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - 'The date/time at which the diagnostic testing should occur.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: - 'The date/time at which the diagnostic testing should occur.', - }, - occurrencePeriod: { - type: require('./period.input'), - description: - 'The date/time at which the diagnostic testing should occur.', - }, - occurrenceTiming: { - type: require('./timing.input'), - description: - 'The date/time at which the diagnostic testing should occur.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason - asNeededBoolean: { - type: GraphQLBoolean, - description: - "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", - }, - _asNeededBoolean: { - type: require('./element.input'), - description: - "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason - asNeededCodeableConcept: { - type: require('./codeableconcept.input'), - description: - "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", - }, - authoredOn: { - type: DateTimeScalar, - description: 'When the request transitioned to being actionable.', - }, - _authoredOn: { - type: require('./element.input'), - description: 'When the request transitioned to being actionable.', - }, - requester: { - type: require('./procedurerequestrequester.input'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - performerType: { - type: require('./codeableconcept.input'), - description: - 'Desired type of performer for doing the diagnostic testing.', - }, - performer: { - type: require('./reference.input'), - description: - 'The desired perfomer for doing the diagnostic testing. For example, the surgeon, dermatopathologist, endoscopist, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'An explanation or justification for why this diagnostic investigation is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates another resource that provides a justification for why this diagnostic investigation is being requested. May relate to the resources referred to in supportingInformation.', - }, - supportingInfo: { - type: new GraphQLList(require('./reference.input')), - description: - "Additional clinical information about the patient or specimen that may influence the procedure or diagnostics or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", - }, - specimen: { - type: new GraphQLList(require('./reference.input')), - description: - 'One or more specimens that the laboratory procedure will use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Anatomic location where the procedure should be performed. This is the target site.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - "Any other notes and comments made about the service request. For example, letting provider know that 'patient hates needles' or other provider instructions.", - }, - relevantHistory: { - type: new GraphQLList(require('./reference.input')), - description: 'Key events in the history of the request.', - }, - }), + description: 'Base StructureDefinition for ProcedureRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcedureRequest_Enum_input', + values: { ProcedureRequest: { value: 'ProcedureRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: 'Protocol or definition followed by this request.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: 'Plan/proposal/order fulfilled by this request.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'The request takes the place of the referenced completed or terminated request(s).', + }, + requisition: { + type: require('./identifier.input.js'), + description: + 'A shared identifier common to all procedure or diagnostic requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the order.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the ProcedureRequest should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the ProcedureRequest should be addressed with respect to other requests.', + }, + _doNotPerform: { + type: require('./element.input.js'), + description: + 'Set this to true if the record is saying that the procedure should NOT be performed.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the procedure should NOT be performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code that identifies a particular procedure, diagnostic investigation, or panel of investigations, that have been requested.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'On whom or what the procedure or diagnostic is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + }, + context: { + type: GraphQLString, + description: + 'An encounter or episode of care that provides additional information about the healthcare context in which this request is made.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: + 'The date/time at which the diagnostic testing should occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'The date/time at which the diagnostic testing should occur.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: + 'The date/time at which the diagnostic testing should occur.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: + 'The date/time at which the diagnostic testing should occur.', + }, + _asNeededBoolean: { + type: require('./element.input.js'), + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + asNeededBoolean: { + type: GraphQLBoolean, + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + asNeededCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'When the request transitioned to being actionable.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request transitioned to being actionable.', + }, + requester: { + type: require('./procedurerequestrequester.input.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + performerType: { + type: require('./codeableconcept.input.js'), + description: + 'Desired type of performer for doing the diagnostic testing.', + }, + performer: { + type: GraphQLString, + description: + 'The desired perfomer for doing the diagnostic testing. For example, the surgeon, dermatopathologist, endoscopist, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'An explanation or justification for why this diagnostic investigation is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource that provides a justification for why this diagnostic investigation is being requested. May relate to the resources referred to in supportingInformation.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: + "Additional clinical information about the patient or specimen that may influence the procedure or diagnostics or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", + }, + specimen: { + type: new GraphQLList(GraphQLString), + description: + 'One or more specimens that the laboratory procedure will use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Anatomic location where the procedure should be performed. This is the target site.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + "Any other notes and comments made about the service request. For example, letting provider know that 'patient hates needles' or other provider instructions.", + }, + relevantHistory: { + type: new GraphQLList(GraphQLString), + description: 'Key events in the history of the request.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/procedurerequestrequester.input.js b/src/resources/3_0_1/inputs/procedurerequestrequester.input.js index 5bb1e3f4..4913aaab 100644 --- a/src/resources/3_0_1/inputs/procedurerequestrequester.input.js +++ b/src/resources/3_0_1/inputs/procedurerequestrequester.input.js @@ -1,27 +1,47 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ProcedureRequest.requester Input Schema + * @summary ProcedureRequestrequester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcedureRequestRequester_Input', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - agent: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device, practitioner or organization who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'ProcedureRequestrequester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + agent: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device, practitioner or organization who initiated the request.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/processrequest.input.js b/src/resources/3_0_1/inputs/processrequest.input.js index f5a1d9a1..0cf7e6d5 100644 --- a/src/resources/3_0_1/inputs/processrequest.input.js +++ b/src/resources/3_0_1/inputs/processrequest.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcessRequestResourceInputType = new GraphQLEnumType({ - name: 'ProcessRequestResourceInputType', - values: { - ProcessRequest: { value: 'ProcessRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,110 +17,168 @@ let ProcessRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ProcessRequest_Input', - description: 'Base StructureDefinition for ProcessRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProcessRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The ProcessRequest business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/actionlist - action: { - type: CodeScalar, - description: - 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', - }, - _action: { - type: require('./element.input'), - description: - 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', - }, - target: { - type: require('./reference.input'), - description: 'The organization which is the target of the request.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.input'), - description: 'The date when this resource was created.', - }, - provider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the action specified in this request.', - }, - organization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the action speccified in this request.', - }, - request: { - type: require('./reference.input'), - description: - 'Reference of resource which is the target or subject of this action.', - }, - response: { - type: require('./reference.input'), - description: - 'Reference of a prior response to resource which is the target or subject of this action.', - }, - nullify: { - type: GraphQLBoolean, - description: 'If true remove all history excluding audit.', - }, - _nullify: { - type: require('./element.input'), - description: 'If true remove all history excluding audit.', - }, - reference: { - type: GraphQLString, - description: 'A reference to supply which authenticates the process.', - }, - _reference: { - type: require('./element.input'), - description: 'A reference to supply which authenticates the process.', - }, - item: { - type: new GraphQLList(require('./processrequestitem.input')), - description: - 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', - }, - include: { - type: new GraphQLList(GraphQLString), - description: 'Names of resource types to include.', - }, - _include: { - type: require('./element.input'), - description: 'Names of resource types to include.', - }, - exclude: { - type: new GraphQLList(GraphQLString), - description: 'Names of resource types to exclude.', - }, - _exclude: { - type: require('./element.input'), - description: 'Names of resource types to exclude.', - }, - period: { - type: require('./period.input'), - description: - 'A period of time during which the fulfilling resources would have been created.', - }, - }), + description: 'Base StructureDefinition for ProcessRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcessRequest_Enum_input', + values: { ProcessRequest: { value: 'ProcessRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The ProcessRequest business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _action: { + type: require('./element.input.js'), + description: + 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/actionlist + action: { + type: CodeScalar, + description: + 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', + }, + target: { + type: GraphQLString, + description: 'The organization which is the target of the request.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the action specified in this request.', + }, + organization: { + type: GraphQLString, + description: + 'The organization which is responsible for the action speccified in this request.', + }, + request: { + type: GraphQLString, + description: + 'Reference of resource which is the target or subject of this action.', + }, + response: { + type: GraphQLString, + description: + 'Reference of a prior response to resource which is the target or subject of this action.', + }, + _nullify: { + type: require('./element.input.js'), + description: 'If true remove all history excluding audit.', + }, + nullify: { + type: GraphQLBoolean, + description: 'If true remove all history excluding audit.', + }, + _reference: { + type: require('./element.input.js'), + description: 'A reference to supply which authenticates the process.', + }, + reference: { + type: GraphQLString, + description: 'A reference to supply which authenticates the process.', + }, + item: { + type: new GraphQLList(require('./processrequestitem.input.js')), + description: + 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', + }, + _include: { + type: require('./element.input.js'), + description: 'Names of resource types to include.', + }, + include: { + type: new GraphQLList(GraphQLString), + description: 'Names of resource types to include.', + }, + _exclude: { + type: require('./element.input.js'), + description: 'Names of resource types to exclude.', + }, + exclude: { + type: new GraphQLList(GraphQLString), + description: 'Names of resource types to exclude.', + }, + period: { + type: require('./period.input.js'), + description: + 'A period of time during which the fulfilling resources would have been created.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/processrequestitem.input.js b/src/resources/3_0_1/inputs/processrequestitem.input.js index db67b8f0..71c24c5e 100644 --- a/src/resources/3_0_1/inputs/processrequestitem.input.js +++ b/src/resources/3_0_1/inputs/processrequestitem.input.js @@ -1,29 +1,46 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ProcessRequest.item Input Schema + * @summary ProcessRequestitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcessRequestItem_Input', - description: - 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', - fields: () => - extendSchema(require('./backboneelement.input'), { - sequenceLinkId: { - type: new GraphQLNonNull(GraphQLInt), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.input'), - description: 'A service line number.', - }, - }), + name: 'ProcessRequestitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _sequenceLinkId: { + type: require('./element.input.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(GraphQLInt), + description: 'A service line number.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/processresponse.input.js b/src/resources/3_0_1/inputs/processresponse.input.js index adddafcf..3ea80304 100644 --- a/src/resources/3_0_1/inputs/processresponse.input.js +++ b/src/resources/3_0_1/inputs/processresponse.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ProcessResponseResourceInputType = new GraphQLEnumType({ - name: 'ProcessResponseResourceInputType', - values: { - ProcessResponse: { value: 'ProcessResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,88 +16,146 @@ let ProcessResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ProcessResponse_Input', - description: 'Base StructureDefinition for ProcessResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProcessResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.input'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.input'), - description: 'The organization who produced this adjudicated response.', - }, - request: { - type: require('./reference.input'), - description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-outcome - outcome: { - type: require('./codeableconcept.input'), - description: 'Transaction status: error, complete, held.', - }, - disposition: { - type: GraphQLString, - description: - 'A description of the status of the adjudication or processing.', - }, - _disposition: { - type: require('./element.input'), - description: - 'A description of the status of the adjudication or processing.', - }, - requestProvider: { - type: require('./reference.input'), - description: - 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.input'), - description: - 'The organization which is responsible for the services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.input'), - description: 'The form to be used for printing the content.', - }, - processNote: { - type: new GraphQLList(require('./processresponseprocessnote.input')), - description: - 'Suite of processing notes or additional requirements if the processing has been held.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - error: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'Processing errors.', - }, - communicationRequest: { - type: new GraphQLList(require('./reference.input')), - description: - 'Request for additional supporting or authorizing information, such as: documents, images or resources.', - }, - }), + description: 'Base StructureDefinition for ProcessResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcessResponse_Enum_input', + values: { ProcessResponse: { value: 'ProcessResponse' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The organization who produced this adjudicated response.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-outcome + outcome: { + type: require('./codeableconcept.input.js'), + description: 'Transaction status: error, complete, held.', + }, + _disposition: { + type: require('./element.input.js'), + description: + 'A description of the status of the adjudication or processing.', + }, + disposition: { + type: GraphQLString, + description: + 'A description of the status of the adjudication or processing.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: GraphQLString, + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.input.js'), + description: 'The form to be used for printing the content.', + }, + processNote: { + type: new GraphQLList(require('./processresponseprocessnote.input.js')), + description: + 'Suite of processing notes or additional requirements if the processing has been held.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + error: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Processing errors.', + }, + communicationRequest: { + type: new GraphQLList(GraphQLString), + description: + 'Request for additional supporting or authorizing information, such as: documents, images or resources.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/processresponseprocessnote.input.js b/src/resources/3_0_1/inputs/processresponseprocessnote.input.js index 44ec6af0..3cfa95fc 100644 --- a/src/resources/3_0_1/inputs/processresponseprocessnote.input.js +++ b/src/resources/3_0_1/inputs/processresponseprocessnote.input.js @@ -1,30 +1,49 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ProcessResponse.processNote Input Schema + * @summary ProcessResponseprocessNote Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProcessResponseProcessNote_Input', - description: - 'Suite of processing notes or additional requirements if the processing has been held.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./codeableconcept.input'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.input'), - description: 'The note text.', - }, - }), + name: 'ProcessResponseprocessNote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./codeableconcept.input.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.input.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/provenance.input.js b/src/resources/3_0_1/inputs/provenance.input.js index fc42d619..7bfcdf60 100644 --- a/src/resources/3_0_1/inputs/provenance.input.js +++ b/src/resources/3_0_1/inputs/provenance.input.js @@ -1,22 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.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 ProvenanceResourceInputType = new GraphQLEnumType({ - name: 'ProvenanceResourceInputType', - values: { - Provenance: { value: 'Provenance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,70 +16,128 @@ let ProvenanceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Provenance_Input', - description: 'Base StructureDefinition for Provenance Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ProvenanceResourceInputType), - description: 'Type of this resource.', - }, - target: { - type: new GraphQLList(new GraphQLNonNull(require('./reference.input'))), - description: - 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', - }, - period: { - type: require('./period.input'), - description: 'The period during which the activity occurred.', - }, - recorded: { - type: new GraphQLNonNull(InstantScalar), - description: 'The instant of time at which the activity was recorded.', - }, - _recorded: { - type: require('./element.input'), - description: 'The instant of time at which the activity was recorded.', - }, - policy: { - type: new GraphQLList(UriScalar), - description: - 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', - }, - _policy: { - type: require('./element.input'), - description: - 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', - }, - location: { - type: require('./reference.input'), - description: 'Where the activity occurred, if relevant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - reason: { - type: new GraphQLList(require('./coding.input')), - description: 'The reason that the activity was taking place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/provenance-activity-type - activity: { - type: require('./coding.input'), - description: - 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', - }, - agent: { - type: new GraphQLList( - new GraphQLNonNull(require('./provenanceagent.input')), - ), - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - }, - entity: { - type: new GraphQLList(require('./provenanceentity.input')), - description: 'An entity used in this activity.', - }, - signature: { - type: new GraphQLList(require('./signature.input')), - description: - 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', - }, - }), + description: 'Base StructureDefinition for Provenance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Provenance_Enum_input', + values: { Provenance: { value: 'Provenance' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + target: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + }, + period: { + type: require('./period.input.js'), + description: 'The period during which the activity occurred.', + }, + _recorded: { + type: require('./element.input.js'), + description: 'The instant of time at which the activity was recorded.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The instant of time at which the activity was recorded.', + }, + _policy: { + type: require('./element.input.js'), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + location: { + type: GraphQLString, + description: 'Where the activity occurred, if relevant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + reason: { + type: new GraphQLList(require('./coding.input.js')), + description: 'The reason that the activity was taking place.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provenance-activity-type + activity: { + type: require('./coding.input.js'), + description: + 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', + }, + agent: { + type: new GraphQLList( + new GraphQLNonNull(require('./provenanceagent.input.js')), + ), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + entity: { + type: new GraphQLList(require('./provenanceentity.input.js')), + description: 'An entity used in this activity.', + }, + signature: { + type: new GraphQLList(require('./signature.input.js')), + description: + 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/provenanceagent.input.js b/src/resources/3_0_1/inputs/provenanceagent.input.js index 0bfe07da..030a547b 100644 --- a/src/resources/3_0_1/inputs/provenanceagent.input.js +++ b/src/resources/3_0_1/inputs/provenanceagent.input.js @@ -1,63 +1,79 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLString, GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Provenance.agent Input Schema + * @summary Provenanceagent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProvenanceAgent_Input', - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-role-type - role: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.', - }, - whoUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The individual, device or organization that participated in the event.', - }, - _whoUri: { - type: require('./element.input'), - description: - 'The individual, device or organization that participated in the event.', - }, - whoReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The individual, device or organization that participated in the event.', - }, - onBehalfOfUri: { - type: UriScalar, - description: - 'The individual, device, or organization for whom the change was made.', - }, - _onBehalfOfUri: { - type: require('./element.input'), - description: - 'The individual, device, or organization for whom the change was made.', - }, - onBehalfOfReference: { - type: require('./reference.input'), - description: - 'The individual, device, or organization for whom the change was made.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-RoleLinkType - relatedAgentType: { - type: require('./codeableconcept.input'), - description: 'The type of relationship between agents.', - }, - }), + name: 'Provenanceagent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-role-type + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.', + }, + _whoUri: { + type: require('./element.input.js'), + description: + 'The individual, device or organization that participated in the event.', + }, + whoUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The individual, device or organization that participated in the event.', + }, + whoReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The individual, device or organization that participated in the event.', + }, + _onBehalfOfUri: { + type: require('./element.input.js'), + description: + 'The individual, device, or organization for whom the change was made.', + }, + onBehalfOfUri: { + type: UriScalar, + description: + 'The individual, device, or organization for whom the change was made.', + }, + onBehalfOfReference: { + type: GraphQLString, + description: + 'The individual, device, or organization for whom the change was made.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-RoleLinkType + relatedAgentType: { + type: require('./codeableconcept.input.js'), + description: 'The type of relationship between agents.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/provenanceentity.input.js b/src/resources/3_0_1/inputs/provenanceentity.input.js index 1577736d..f28a0f16 100644 --- a/src/resources/3_0_1/inputs/provenanceentity.input.js +++ b/src/resources/3_0_1/inputs/provenanceentity.input.js @@ -1,47 +1,68 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Provenance.entity Input Schema + * @summary Provenanceentity Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ProvenanceEntity_Input', - description: 'An entity used in this activity.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/provenance-entity-role - role: { - type: new GraphQLNonNull(CodeScalar), - description: 'How the entity was used during the activity.', - }, - _role: { - type: require('./element.input'), - description: 'How the entity was used during the activity.', - }, - whatUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - _whatUri: { - type: require('./element.input'), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - whatReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - whatIdentifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - }), + name: 'Provenanceentity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _role: { + type: require('./element.input.js'), + description: 'How the entity was used during the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provenance-entity-role + role: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the entity was used during the activity.', + }, + _whatUri: { + type: require('./element.input.js'), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + whatUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + whatReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + whatIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/quantity.input.js b/src/resources/3_0_1/inputs/quantity.input.js index b628dfc2..0f9fe3d7 100644 --- a/src/resources/3_0_1/inputs/quantity.input.js +++ b/src/resources/3_0_1/inputs/quantity.input.js @@ -1,13 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLFloat, GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -15,57 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Quantity_Input', - description: 'Base StructureDefinition for Quantity Type.', - fields: () => - extendSchema(require('./element.input'), { - value: { - type: GraphQLFloat, - description: - 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', - }, - _value: { - type: require('./element.input'), - description: - 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator - comparator: { - type: CodeScalar, - description: - "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", - }, - _comparator: { - type: require('./element.input'), - description: - "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", - }, - unit: { - type: GraphQLString, - description: 'A human-readable form of the unit.', - }, - _unit: { - type: require('./element.input'), - description: 'A human-readable form of the unit.', - }, - system: { - type: UriScalar, - description: - 'The identification of the system that provides the coded form of the unit.', - }, - _system: { - type: require('./element.input'), - description: - 'The identification of the system that provides the coded form of the unit.', - }, - code: { - type: CodeScalar, - description: - 'A computer processable form of the unit in some unit representation system.', - }, - _code: { - type: require('./element.input'), - description: - 'A computer processable form of the unit in some unit representation system.', - }, - }), + description: 'Base StructureDefinition for Quantity Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/questionnaire.input.js b/src/resources/3_0_1/inputs/questionnaire.input.js index d4aad3eb..ade41966 100644 --- a/src/resources/3_0_1/inputs/questionnaire.input.js +++ b/src/resources/3_0_1/inputs/questionnaire.input.js @@ -1,25 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let QuestionnaireResourceInputType = new GraphQLEnumType({ - name: 'QuestionnaireResourceInputType', - values: { - Questionnaire: { value: 'Questionnaire' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -27,191 +18,249 @@ let QuestionnaireResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Questionnaire_Input', - description: 'Base StructureDefinition for Questionnaire Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(QuestionnaireResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the questionnaire.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the questionnaire.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this questionnaire. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this questionnaire. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the questionnaire.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the questionnaire.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the questionnaire from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the questionnaire from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this questionnaire is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this questionnaire is needed and why it has been designed as it has.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.input'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.input'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The period during which the questionnaire content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the questionnaire is intended to be used.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions - code: { - type: new GraphQLList(require('./coding.input')), - description: - 'An identifier for this question or group of questions in a particular terminology such as LOINC.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - subjectType: { - type: new GraphQLList(CodeScalar), - description: - 'The types of subjects that can be the subject of responses created for the questionnaire.', - }, - _subjectType: { - type: require('./element.input'), - description: - 'The types of subjects that can be the subject of responses created for the questionnaire.', - }, - item: { - type: new GraphQLList(require('./questionnaireitem.input')), - description: - 'A particular question, question grouping or display text that is part of the questionnaire.', - }, - }), + description: 'Base StructureDefinition for Questionnaire Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Questionnaire_Enum_input', + values: { Questionnaire: { value: 'Questionnaire' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the questionnaire.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the questionnaire.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this questionnaire. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this questionnaire. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the questionnaire.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the questionnaire.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the questionnaire from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the questionnaire from a consumer's perspective.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this questionnaire is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this questionnaire is needed and why it has been designed as it has.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the questionnaire content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the questionnaire is intended to be used.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'An identifier for this question or group of questions in a particular terminology such as LOINC.', + }, + _subjectType: { + type: require('./element.input.js'), + description: + 'The types of subjects that can be the subject of responses created for the questionnaire.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + subjectType: { + type: new GraphQLList(CodeScalar), + description: + 'The types of subjects that can be the subject of responses created for the questionnaire.', + }, + item: { + type: new GraphQLList(require('./questionnaireitem.input.js')), + description: + 'A particular question, question grouping or display text that is part of the questionnaire.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/questionnaireitem.input.js b/src/resources/3_0_1/inputs/questionnaireitem.input.js index 9d32a1ca..ed5eb3fa 100644 --- a/src/resources/3_0_1/inputs/questionnaireitem.input.js +++ b/src/resources/3_0_1/inputs/questionnaireitem.input.js @@ -1,254 +1,269 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary Questionnaire.item Input Schema + * @summary Questionnaireitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireItem_Input', - description: - 'A particular question, question grouping or display text that is part of the questionnaire.', - fields: () => - extendSchema(require('./backboneelement.input'), { - linkId: { - type: new GraphQLNonNull(GraphQLString), - description: - 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.input'), - description: - 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', - }, - definition: { - type: UriScalar, - description: - 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition.', - }, - _definition: { - type: require('./element.input'), - description: - 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions - code: { - type: new GraphQLList(require('./coding.input')), - description: - 'A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).', - }, - prefix: { - type: GraphQLString, - description: - 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', - }, - _prefix: { - type: require('./element.input'), - description: - 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', - }, - text: { - type: GraphQLString, - description: - 'The name of a section, the text of a question or text content for a display item.', - }, - _text: { - type: require('./element.input'), - description: - 'The name of a section, the text of a question or text content for a display item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/item-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', - }, - _type: { - type: require('./element.input'), - description: - 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', - }, - enableWhen: { - type: new GraphQLList(require('./questionnaireitemenablewhen.input')), - description: - 'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.', - }, - required: { - type: GraphQLBoolean, - description: - "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", - }, - _required: { - type: require('./element.input'), - description: - "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", - }, - repeats: { - type: GraphQLBoolean, - description: - 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.', - }, - _repeats: { - type: require('./element.input'), - description: - 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.', - }, - readOnly: { - type: GraphQLBoolean, - description: - 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', - }, - _readOnly: { - type: require('./element.input'), - description: - 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', - }, - maxLength: { - type: GraphQLInt, - description: - "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", - }, - _maxLength: { - type: require('./element.input'), - description: - "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", - }, - options: { - type: require('./reference.input'), - description: - "A reference to a value set containing a list of codes representing permitted answers for a 'choice' or 'open-choice' question.", - }, - option: { - type: new GraphQLList(require('./questionnaireitemoption.input')), - description: - "One of the permitted answers for a 'choice' or 'open-choice' question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialBoolean: { - type: GraphQLBoolean, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialBoolean: { - type: require('./element.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialDecimal: { - type: GraphQLFloat, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialDecimal: { - type: require('./element.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialInteger: { - type: GraphQLInt, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialInteger: { - type: require('./element.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialDate: { - type: DateScalar, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialDate: { - type: require('./element.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialDateTime: { - type: DateTimeScalar, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialDateTime: { - type: require('./element.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialTime: { - type: TimeScalar, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialTime: { - type: require('./element.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialString: { - type: GraphQLString, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialString: { - type: require('./element.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialUri: { - type: UriScalar, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialUri: { - type: require('./element.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialAttachment: { - type: require('./attachment.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialCoding: { - type: require('./coding.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialQuantity: { - type: require('./quantity.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialReference: { - type: require('./reference.input'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - }), + name: 'Questionnaireitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', + }, + linkId: { + type: new GraphQLNonNull(GraphQLString), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition.', + }, + definition: { + type: UriScalar, + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).', + }, + _prefix: { + type: require('./element.input.js'), + description: + 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', + }, + prefix: { + type: GraphQLString, + description: + 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', + }, + _text: { + type: require('./element.input.js'), + description: + 'The name of a section, the text of a question or text content for a display item.', + }, + text: { + type: GraphQLString, + description: + 'The name of a section, the text of a question or text content for a display item.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/item-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', + }, + enableWhen: { + type: new GraphQLList(require('./questionnaireitemenablewhen.input.js')), + description: + 'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.', + }, + _required: { + type: require('./element.input.js'), + description: + "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", + }, + required: { + type: GraphQLBoolean, + description: + "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", + }, + _repeats: { + type: require('./element.input.js'), + description: + 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.', + }, + repeats: { + type: GraphQLBoolean, + description: + 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.', + }, + _readOnly: { + type: require('./element.input.js'), + description: + 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', + }, + readOnly: { + type: GraphQLBoolean, + description: + 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', + }, + _maxLength: { + type: require('./element.input.js'), + description: + "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", + }, + maxLength: { + type: GraphQLInt, + description: + "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", + }, + options: { + type: GraphQLString, + description: + "A reference to a value set containing a list of codes representing permitted answers for a 'choice' or 'open-choice' question.", + }, + option: { + type: new GraphQLList(require('./questionnaireitemoption.input.js')), + description: + "One of the permitted answers for a 'choice' or 'open-choice' question.", + }, + _initialBoolean: { + type: require('./element.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialBoolean: { + type: GraphQLBoolean, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialDecimal: { + type: require('./element.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialDecimal: { + type: GraphQLFloat, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialInteger: { + type: require('./element.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialInteger: { + type: GraphQLInt, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialDate: { + type: require('./element.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialDate: { + type: DateScalar, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialDateTime: { + type: require('./element.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialDateTime: { + type: DateTimeScalar, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialTime: { + type: require('./element.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialTime: { + type: TimeScalar, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialString: { + type: require('./element.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialString: { + type: GraphQLString, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialUri: { + type: require('./element.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialUri: { + type: UriScalar, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialAttachment: { + type: require('./attachment.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialCoding: { + type: require('./coding.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialQuantity: { + type: require('./quantity.input.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialReference: { + type: GraphQLString, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/questionnaireitemenablewhen.input.js b/src/resources/3_0_1/inputs/questionnaireitemenablewhen.input.js index 360ec76a..7764cb95 100644 --- a/src/resources/3_0_1/inputs/questionnaireitemenablewhen.input.js +++ b/src/resources/3_0_1/inputs/questionnaireitemenablewhen.input.js @@ -1,160 +1,176 @@ -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Questionnaire.item.enableWhen Input Schema + * @summary QuestionnaireitemenableWhen Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireItemEnableWhen_Input', - description: - 'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.', - fields: () => - extendSchema(require('./backboneelement.input'), { - question: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', - }, - _question: { - type: require('./element.input'), - description: - 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', - }, - hasAnswer: { - type: GraphQLBoolean, - description: - 'An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).', - }, - _hasAnswer: { - type: require('./element.input'), - description: - 'An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerBoolean: { - type: GraphQLBoolean, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerBoolean: { - type: require('./element.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerDecimal: { - type: GraphQLFloat, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerDecimal: { - type: require('./element.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerInteger: { - type: GraphQLInt, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerInteger: { - type: require('./element.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerDate: { - type: DateScalar, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerDate: { - type: require('./element.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerDateTime: { - type: DateTimeScalar, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerDateTime: { - type: require('./element.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerTime: { - type: TimeScalar, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerTime: { - type: require('./element.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerString: { - type: GraphQLString, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerString: { - type: require('./element.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerUri: { - type: UriScalar, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerUri: { - type: require('./element.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerAttachment: { - type: require('./attachment.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerCoding: { - type: require('./coding.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerQuantity: { - type: require('./quantity.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerReference: { - type: require('./reference.input'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - }), + name: 'QuestionnaireitemenableWhen_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _question: { + type: require('./element.input.js'), + description: + 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', + }, + question: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', + }, + _hasAnswer: { + type: require('./element.input.js'), + description: + 'An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).', + }, + hasAnswer: { + type: GraphQLBoolean, + description: + 'An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).', + }, + _answerBoolean: { + type: require('./element.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerBoolean: { + type: GraphQLBoolean, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerDecimal: { + type: require('./element.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerDecimal: { + type: GraphQLFloat, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerInteger: { + type: require('./element.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerInteger: { + type: GraphQLInt, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerDate: { + type: require('./element.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerDate: { + type: DateScalar, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerDateTime: { + type: require('./element.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerDateTime: { + type: DateTimeScalar, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerTime: { + type: require('./element.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerTime: { + type: TimeScalar, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerString: { + type: require('./element.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerString: { + type: GraphQLString, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerUri: { + type: require('./element.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerUri: { + type: UriScalar, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerAttachment: { + type: require('./attachment.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerCoding: { + type: require('./coding.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerQuantity: { + type: require('./quantity.input.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerReference: { + type: GraphQLString, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/questionnaireitemoption.input.js b/src/resources/3_0_1/inputs/questionnaireitemoption.input.js index b9035ee4..c6e84309 100644 --- a/src/resources/3_0_1/inputs/questionnaireitemoption.input.js +++ b/src/resources/3_0_1/inputs/questionnaireitemoption.input.js @@ -1,74 +1,90 @@ -const DateScalar = require('../scalars/date.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateScalar = require('../scalars/date.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary Questionnaire.item.option Input Schema + * @summary Questionnaireitemoption Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireItemOption_Input', - description: - "One of the permitted answers for a 'choice' or 'open-choice' question.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: - "A potential answer that's allowed as the answer to this question.", - }, - _valueInteger: { - type: require('./element.input'), - description: - "A potential answer that's allowed as the answer to this question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueDate: { - type: new GraphQLNonNull(DateScalar), - description: - "A potential answer that's allowed as the answer to this question.", - }, - _valueDate: { - type: require('./element.input'), - description: - "A potential answer that's allowed as the answer to this question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueTime: { - type: new GraphQLNonNull(TimeScalar), - description: - "A potential answer that's allowed as the answer to this question.", - }, - _valueTime: { - type: require('./element.input'), - description: - "A potential answer that's allowed as the answer to this question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: - "A potential answer that's allowed as the answer to this question.", - }, - _valueString: { - type: require('./element.input'), - description: - "A potential answer that's allowed as the answer to this question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueCoding: { - type: new GraphQLNonNull(require('./coding.input')), - description: - "A potential answer that's allowed as the answer to this question.", - }, - }), + name: 'Questionnaireitemoption_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueDate: { + type: require('./element.input.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueTime: { + type: require('./element.input.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueString: { + type: require('./element.input.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + "A potential answer that's allowed as the answer to this question.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/questionnaireresponse.input.js b/src/resources/3_0_1/inputs/questionnaireresponse.input.js index a8cd0e4a..f1381d5d 100644 --- a/src/resources/3_0_1/inputs/questionnaireresponse.input.js +++ b/src/resources/3_0_1/inputs/questionnaireresponse.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 QuestionnaireResponseResourceInputType = new GraphQLEnumType({ - name: 'QuestionnaireResponseResourceInputType', - values: { - QuestionnaireResponse: { value: 'QuestionnaireResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,77 +16,135 @@ let QuestionnaireResponseResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'QuestionnaireResponse_Input', - description: 'Base StructureDefinition for QuestionnaireResponse Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(QuestionnaireResponseResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.', - }, - parent: { - type: new GraphQLList(require('./reference.input')), - description: - 'A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.', - }, - questionnaire: { - type: require('./reference.input'), - description: - 'The Questionnaire that defines and organizes the questions for which answers are being provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The position of the questionnaire response within its overall lifecycle.', - }, - _status: { - type: require('./element.input'), - description: - 'The position of the questionnaire response within its overall lifecycle.', - }, - subject: { - type: require('./reference.input'), - description: - 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter or episode of care with primary association to the questionnaire response.', - }, - authored: { - type: DateTimeScalar, - description: - 'The date and/or time that this set of answers were last changed.', - }, - _authored: { - type: require('./element.input'), - description: - 'The date and/or time that this set of answers were last changed.', - }, - author: { - type: require('./reference.input'), - description: - 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', - }, - source: { - type: require('./reference.input'), - description: 'The person who answered the questions about the subject.', - }, - item: { - type: new GraphQLList(require('./questionnaireresponseitem.input')), - description: - 'A group or question item from the original questionnaire for which answers are provided.', - }, - }), + description: 'Base StructureDefinition for QuestionnaireResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'QuestionnaireResponse_Enum_input', + values: { QuestionnaireResponse: { value: 'QuestionnaireResponse' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.', + }, + parent: { + type: new GraphQLList(GraphQLString), + description: + 'A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.', + }, + questionnaire: { + type: GraphQLString, + description: + 'The Questionnaire that defines and organizes the questions for which answers are being provided.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The position of the questionnaire response within its overall lifecycle.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The position of the questionnaire response within its overall lifecycle.', + }, + subject: { + type: GraphQLString, + description: + 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care with primary association to the questionnaire response.', + }, + _authored: { + type: require('./element.input.js'), + description: + 'The date and/or time that this set of answers were last changed.', + }, + authored: { + type: DateTimeScalar, + description: + 'The date and/or time that this set of answers were last changed.', + }, + author: { + type: GraphQLString, + description: + 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', + }, + source: { + type: GraphQLString, + description: 'The person who answered the questions about the subject.', + }, + item: { + type: new GraphQLList(require('./questionnaireresponseitem.input.js')), + description: + 'A group or question item from the original questionnaire for which answers are provided.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/questionnaireresponseitem.input.js b/src/resources/3_0_1/inputs/questionnaireresponseitem.input.js index ec2f4510..9872d7b1 100644 --- a/src/resources/3_0_1/inputs/questionnaireresponseitem.input.js +++ b/src/resources/3_0_1/inputs/questionnaireresponseitem.input.js @@ -1,64 +1,79 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.item Input Schema + * @summary QuestionnaireResponseitem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireResponseItem_Input', - description: - 'A group or question item from the original questionnaire for which answers are provided.', - fields: () => - extendSchema(require('./backboneelement.input'), { - linkId: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.input'), - description: - 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', - }, - definition: { - type: UriScalar, - description: - 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', - }, - _definition: { - type: require('./element.input'), - description: - 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', - }, - text: { - type: GraphQLString, - description: - 'Text that is displayed above the contents of the group or as the text of the question being answered.', - }, - _text: { - type: require('./element.input'), - description: - 'Text that is displayed above the contents of the group or as the text of the question being answered.', - }, - subject: { - type: require('./reference.input'), - description: - "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", - }, - answer: { - type: new GraphQLList( - require('./questionnaireresponseitemanswer.input'), - ), - description: "The respondent's answer(s) to the question.", - }, - }), + name: 'QuestionnaireResponseitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', + }, + linkId: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', + }, + definition: { + type: UriScalar, + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Text that is displayed above the contents of the group or as the text of the question being answered.', + }, + text: { + type: GraphQLString, + description: + 'Text that is displayed above the contents of the group or as the text of the question being answered.', + }, + subject: { + type: GraphQLString, + description: + "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", + }, + answer: { + type: new GraphQLList( + require('./questionnaireresponseitemanswer.input.js'), + ), + description: "The respondent's answer(s) to the question.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/questionnaireresponseitemanswer.input.js b/src/resources/3_0_1/inputs/questionnaireresponseitemanswer.input.js index d008523c..87d3a1e7 100644 --- a/src/resources/3_0_1/inputs/questionnaireresponseitemanswer.input.js +++ b/src/resources/3_0_1/inputs/questionnaireresponseitemanswer.input.js @@ -1,138 +1,155 @@ -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLBoolean, GraphQLFloat, GraphQLInt, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.item.answer Input Schema + * @summary QuestionnaireResponseitemanswer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'QuestionnaireResponseItemAnswer_Input', - description: "The respondent's answer(s) to the question.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueBoolean: { - type: GraphQLBoolean, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueBoolean: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueDecimal: { - type: GraphQLFloat, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDecimal: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueInteger: { - type: GraphQLInt, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueInteger: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueDate: { - type: DateScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDate: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueDateTime: { - type: DateTimeScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDateTime: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueTime: { - type: TimeScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueTime: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueString: { - type: GraphQLString, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueString: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueUri: { - type: UriScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueUri: { - type: require('./element.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueAttachment: { - type: require('./attachment.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueCoding: { - type: require('./coding.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueQuantity: { - type: require('./quantity.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueReference: { - type: require('./reference.input'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - }), + name: 'QuestionnaireResponseitemanswer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueBoolean: { + type: GraphQLBoolean, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueDecimal: { + type: GraphQLFloat, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueInteger: { + type: GraphQLInt, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueDate: { + type: DateScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueDateTime: { + type: DateTimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueTime: { + type: TimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueString: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueUri: { + type: UriScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueCoding: { + type: require('./coding.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueReference: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/range.input.js b/src/resources/3_0_1/inputs/range.input.js index 5c15cf9c..0f204f2f 100644 --- a/src/resources/3_0_1/inputs/range.input.js +++ b/src/resources/3_0_1/inputs/range.input.js @@ -1,7 +1,8 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports @@ -9,16 +10,30 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Range_Input', - description: 'Base StructureDefinition for Range Type.', - fields: () => - extendSchema(require('./element.input'), { - low: { - type: require('./quantity.input'), - description: 'The low limit. The boundary is inclusive.', - }, - high: { - type: require('./quantity.input'), - description: 'The high limit. The boundary is inclusive.', - }, - }), + description: 'Base StructureDefinition for Range Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + low: { + type: require('./quantity.input.js'), + description: 'The low limit. The boundary is inclusive.', + }, + high: { + type: require('./quantity.input.js'), + description: 'The high limit. The boundary is inclusive.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/ratio.input.js b/src/resources/3_0_1/inputs/ratio.input.js index 2698a2c1..481d770e 100644 --- a/src/resources/3_0_1/inputs/ratio.input.js +++ b/src/resources/3_0_1/inputs/ratio.input.js @@ -1,7 +1,8 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports @@ -9,16 +10,30 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Ratio_Input', - description: 'Base StructureDefinition for Ratio Type.', - fields: () => - extendSchema(require('./element.input'), { - numerator: { - type: require('./quantity.input'), - description: 'The value of the numerator.', - }, - denominator: { - type: require('./quantity.input'), - description: 'The value of the denominator.', - }, - }), + description: 'Base StructureDefinition for Ratio Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + numerator: { + type: require('./quantity.input.js'), + description: 'The value of the numerator.', + }, + denominator: { + type: require('./quantity.input.js'), + description: 'The value of the denominator.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/reference.input.js b/src/resources/3_0_1/inputs/reference.input.js index a2689b58..936a6d83 100644 --- a/src/resources/3_0_1/inputs/reference.input.js +++ b/src/resources/3_0_1/inputs/reference.input.js @@ -1,7 +1,8 @@ -const { GraphQLInputObjectType, GraphQLString } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports @@ -9,33 +10,47 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Reference_Input', - description: 'Base StructureDefinition for Reference Type.', - fields: () => - extendSchema(require('./element.input'), { - reference: { - type: GraphQLString, - description: - "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", - }, - _reference: { - type: require('./element.input'), - description: - "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", - }, - identifier: { - type: require('./identifier.input'), - description: - 'An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.', - }, - display: { - type: GraphQLString, - description: - 'Plain text narrative that identifies the resource in addition to the resource reference.', - }, - _display: { - type: require('./element.input'), - description: - 'Plain text narrative that identifies the resource in addition to the resource reference.', - }, - }), + description: 'Base StructureDefinition for Reference Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _reference: { + type: require('./element.input.js'), + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + reference: { + type: GraphQLString, + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.', + }, + _display: { + type: require('./element.input.js'), + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + display: { + type: GraphQLString, + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/referralrequest.input.js b/src/resources/3_0_1/inputs/referralrequest.input.js index ede31722..90e2f1bb 100644 --- a/src/resources/3_0_1/inputs/referralrequest.input.js +++ b/src/resources/3_0_1/inputs/referralrequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 ReferralRequestResourceInputType = new GraphQLEnumType({ - name: 'ReferralRequestResourceInputType', - values: { - ReferralRequest: { value: 'ReferralRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,169 +16,227 @@ let ReferralRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ReferralRequest_Input', - description: 'Base StructureDefinition for ReferralRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ReferralRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Business identifier that uniquely identifies the referral/care transfer request instance.', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: - 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.', - }, - replaces: { - type: new GraphQLList(require('./reference.input')), - description: - 'Completed or terminated request(s) whose function is taken by this new request.', - }, - groupIdentifier: { - type: require('./identifier.input'), - description: - "The business identifier of the logical 'grouping' request/order that this referral is a part of.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the authorization/intention reflected by the referral request record.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of the authorization/intention reflected by the referral request record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - "Distinguishes the 'level' of authorization/demand implicit in this request.", - }, - _intent: { - type: require('./element.input'), - description: - "Distinguishes the 'level' of authorization/demand implicit in this request.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referral-type - type: { - type: require('./codeableconcept.input'), - description: - 'An indication of the type of referral (or where applicable the type of transfer of care) request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', - }, - _priority: { - type: require('./element.input'), - description: - 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - serviceRequested: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The patient who is the subject of a referral or transfer of care request.', - }, - context: { - type: require('./reference.input'), - description: - 'The encounter at which the request for referral or transfer of care is initiated.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: - 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', - }, - occurrencePeriod: { - type: require('./period.input'), - description: - 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', - }, - authoredOn: { - type: DateTimeScalar, - description: - 'Date/DateTime of creation for draft requests and date of activation for active requests.', - }, - _authoredOn: { - type: require('./element.input'), - description: - 'Date/DateTime of creation for draft requests and date of activation for active requests.', - }, - requester: { - type: require('./referralrequestrequester.input'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty - specialty: { - type: require('./codeableconcept.input'), - description: - 'Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - reasonCode: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates another resource whose existence justifies this request.', - }, - description: { - type: GraphQLString, - description: - 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', - }, - _description: { - type: require('./element.input'), - description: - 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', - }, - supportingInfo: { - type: new GraphQLList(require('./reference.input')), - description: - 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Comments made about the referral request by any of the participants.', - }, - relevantHistory: { - type: new GraphQLList(require('./reference.input')), - description: - 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', - }, - }), + description: 'Base StructureDefinition for ReferralRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ReferralRequest_Enum_input', + values: { ReferralRequest: { value: 'ReferralRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Business identifier that uniquely identifies the referral/care transfer request instance.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + "The business identifier of the logical 'grouping' request/order that this referral is a part of.", + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of the authorization/intention reflected by the referral request record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the authorization/intention reflected by the referral request record.', + }, + _intent: { + type: require('./element.input.js'), + description: + "Distinguishes the 'level' of authorization/demand implicit in this request.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + "Distinguishes the 'level' of authorization/demand implicit in this request.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referral-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'An indication of the type of referral (or where applicable the type of transfer of care) request.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + serviceRequested: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient who is the subject of a referral or transfer of care request.', + }, + context: { + type: GraphQLString, + description: + 'The encounter at which the request for referral or transfer of care is initiated.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: + 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: + 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: + 'Date/DateTime of creation for draft requests and date of activation for active requests.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'Date/DateTime of creation for draft requests and date of activation for active requests.', + }, + requester: { + type: require('./referralrequestrequester.input.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty + specialty: { + type: require('./codeableconcept.input.js'), + description: + 'Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies this request.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', + }, + description: { + type: GraphQLString, + description: + 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: + 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the referral request by any of the participants.', + }, + relevantHistory: { + type: new GraphQLList(GraphQLString), + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/referralrequestrequester.input.js b/src/resources/3_0_1/inputs/referralrequestrequester.input.js index e6ac11b6..d310fed6 100644 --- a/src/resources/3_0_1/inputs/referralrequestrequester.input.js +++ b/src/resources/3_0_1/inputs/referralrequestrequester.input.js @@ -1,27 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary ReferralRequest.requester Input Schema + * @summary ReferralRequestrequester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ReferralRequestRequester_Input', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - agent: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device, practitioner, etc. who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'ReferralRequestrequester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + agent: { + type: new GraphQLNonNull(GraphQLString), + description: 'The device, practitioner, etc. who initiated the request.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/relatedartifact.input.js b/src/resources/3_0_1/inputs/relatedartifact.input.js index 51b06311..9d955060 100644 --- a/src/resources/3_0_1/inputs/relatedartifact.input.js +++ b/src/resources/3_0_1/inputs/relatedartifact.input.js @@ -1,13 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -15,57 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'RelatedArtifact_Input', - description: 'Base StructureDefinition for RelatedArtifact Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/related-artifact-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of relationship to the related artifact.', - }, - _type: { - type: require('./element.input'), - description: 'The type of relationship to the related artifact.', - }, - display: { - type: GraphQLString, - description: - 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', - }, - _display: { - type: require('./element.input'), - description: - 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', - }, - citation: { - type: GraphQLString, - description: - 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', - }, - _citation: { - type: require('./element.input'), - description: - 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', - }, - url: { - type: UriScalar, - description: - 'A url for the artifact that can be followed to access the actual content.', - }, - _url: { - type: require('./element.input'), - description: - 'A url for the artifact that can be followed to access the actual content.', - }, - document: { - type: require('./attachment.input'), - description: - 'The document being referenced, represented as an attachment. This is exclusive with the resource element.', - }, - resource: { - type: require('./reference.input'), - description: - 'The related resource, such as a library, value set, profile, or other knowledge resource.', - }, - }), + description: 'Base StructureDefinition for RelatedArtifact Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of relationship to the related artifact.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/related-artifact-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of relationship to the related artifact.', + }, + _display: { + type: require('./element.input.js'), + description: + 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', + }, + display: { + type: GraphQLString, + description: + 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', + }, + _citation: { + type: require('./element.input.js'), + description: + 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', + }, + citation: { + type: GraphQLString, + description: + 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', + }, + _url: { + type: require('./element.input.js'), + description: + 'A url for the artifact that can be followed to access the actual content.', + }, + url: { + type: UriScalar, + description: + 'A url for the artifact that can be followed to access the actual content.', + }, + document: { + type: require('./attachment.input.js'), + description: + 'The document being referenced, represented as an attachment. This is exclusive with the resource element.', + }, + resource: { + type: GraphQLString, + description: + 'The related resource, such as a library, value set, profile, or other knowledge resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/relatedperson.input.js b/src/resources/3_0_1/inputs/relatedperson.input.js index eaf1f274..da06af56 100644 --- a/src/resources/3_0_1/inputs/relatedperson.input.js +++ b/src/resources/3_0_1/inputs/relatedperson.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let RelatedPersonResourceInputType = new GraphQLEnumType({ - name: 'RelatedPersonResourceInputType', - values: { - RelatedPerson: { value: 'RelatedPerson' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,76 +17,134 @@ let RelatedPersonResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'RelatedPerson_Input', - description: 'Base StructureDefinition for RelatedPerson Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(RelatedPersonResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Identifier for a person within a particular scope.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this related person record is in active use.', - }, - _active: { - type: require('./element.input'), - description: 'Whether this related person record is in active use.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The patient this person is related to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype - relationship: { - type: require('./codeableconcept.input'), - description: - 'The nature of the relationship between a patient and the related person.', - }, - name: { - type: new GraphQLList(require('./humanname.input')), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.input'), - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date on which the related person was born.', - }, - _birthDate: { - type: require('./element.input'), - description: 'The date on which the related person was born.', - }, - address: { - type: new GraphQLList(require('./address.input')), - description: - 'Address where the related person can be contacted or visited.', - }, - photo: { - type: new GraphQLList(require('./attachment.input')), - description: 'Image of the person.', - }, - period: { - type: require('./period.input'), - description: - 'The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.', - }, - }), + description: 'Base StructureDefinition for RelatedPerson Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RelatedPerson_Enum_input', + values: { RelatedPerson: { value: 'RelatedPerson' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'Identifier for a person within a particular scope.', + }, + _active: { + type: require('./element.input.js'), + description: 'Whether this related person record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this related person record is in active use.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient this person is related to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype + relationship: { + type: require('./codeableconcept.input.js'), + description: + 'The nature of the relationship between a patient and the related person.', + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date on which the related person was born.', + }, + birthDate: { + type: DateScalar, + description: 'The date on which the related person was born.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: + 'Address where the related person can be contacted or visited.', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the person.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/requestgroup.input.js b/src/resources/3_0_1/inputs/requestgroup.input.js index 8fdfc7d5..c1631a51 100644 --- a/src/resources/3_0_1/inputs/requestgroup.input.js +++ b/src/resources/3_0_1/inputs/requestgroup.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 RequestGroupResourceInputType = new GraphQLEnumType({ - name: 'RequestGroupResourceInputType', - values: { - RequestGroup: { value: 'RequestGroup' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,110 +16,168 @@ let RequestGroupResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'RequestGroup_Input', - description: 'Base StructureDefinition for RequestGroup Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(RequestGroupResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Allows a service to provide a unique, business identifier for the request.', - }, - definition: { - type: new GraphQLList(require('./reference.input')), - description: - 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A plan, proposal or order that is fulfilled in whole or in part by this request.', - }, - replaces: { - type: new GraphQLList(require('./reference.input')), - description: - 'Completed or terminated request(s) whose function is taken by this new request.', - }, - groupIdentifier: { - type: require('./identifier.input'), - description: - 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', - }, - _status: { - type: require('./element.input'), - description: - 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', - }, - _intent: { - type: require('./element.input'), - description: - 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the request should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.input'), - description: - 'Indicates how quickly the request should be addressed with respect to other requests.', - }, - subject: { - type: require('./reference.input'), - description: 'The subject for which the request group was created.', - }, - context: { - type: require('./reference.input'), - description: 'Describes the context of the request group, if any.', - }, - authoredOn: { - type: DateTimeScalar, - description: 'Indicates when the request group was created.', - }, - _authoredOn: { - type: require('./element.input'), - description: 'Indicates when the request group was created.', - }, - author: { - type: require('./reference.input'), - description: 'Provides a reference to the author of the request group.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', - }, - reasonReference: { - type: require('./reference.input'), - description: - 'Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Provides a mechanism to communicate additional information about the response.', - }, - action: { - type: new GraphQLList(require('./requestgroupaction.input')), - description: - 'The actions, if any, produced by the evaluation of the artifact.', - }, - }), + description: 'Base StructureDefinition for RequestGroup Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RequestGroup_Enum_input', + values: { RequestGroup: { value: 'RequestGroup' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Allows a service to provide a unique, business identifier for the request.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this request.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the request should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the request should be addressed with respect to other requests.', + }, + subject: { + type: GraphQLString, + description: 'The subject for which the request group was created.', + }, + context: { + type: GraphQLString, + description: 'Describes the context of the request group, if any.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'Indicates when the request group was created.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'Indicates when the request group was created.', + }, + author: { + type: GraphQLString, + description: 'Provides a reference to the author of the request group.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + reasonReference: { + type: GraphQLString, + description: + 'Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Provides a mechanism to communicate additional information about the response.', + }, + action: { + type: new GraphQLList(require('./requestgroupaction.input.js')), + description: + 'The actions, if any, produced by the evaluation of the artifact.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/requestgroupaction.input.js b/src/resources/3_0_1/inputs/requestgroupaction.input.js index bf11cb36..e90af835 100644 --- a/src/resources/3_0_1/inputs/requestgroupaction.input.js +++ b/src/resources/3_0_1/inputs/requestgroupaction.input.js @@ -1,179 +1,190 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary RequestGroup.action Input Schema + * @summary RequestGroupaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'RequestGroupAction_Input', - description: - 'The actions, if any, produced by the evaluation of the artifact.', - fields: () => - extendSchema(require('./backboneelement.input'), { - label: { - type: GraphQLString, - description: 'A user-visible label for the action.', - }, - _label: { - type: require('./element.input'), - description: 'A user-visible label for the action.', - }, - title: { - type: GraphQLString, - description: 'The title of the action displayed to a user.', - }, - _title: { - type: require('./element.input'), - description: 'The title of the action displayed to a user.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the action used to provide a summary to display to the user.', - }, - _description: { - type: require('./element.input'), - description: - 'A short description of the action used to provide a summary to display to the user.', - }, - textEquivalent: { - type: GraphQLString, - description: - 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', - }, - _textEquivalent: { - type: require('./element.input'), - description: - 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', - }, - code: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.', - }, - documentation: { - type: new GraphQLList(require('./relatedartifact.input')), - description: - 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', - }, - condition: { - type: new GraphQLList(require('./requestgroupactioncondition.input')), - description: - 'An expression that describes applicability criteria, or start/stop conditions for the action.', - }, - relatedAction: { - type: new GraphQLList( - require('./requestgroupactionrelatedaction.input'), - ), - description: - "A relationship to another action such as 'before' or '30-60 minutes after start of'.", - }, - timingDateTime: { - type: DateTimeScalar, - description: - 'An optional value describing when the action should be performed.', - }, - _timingDateTime: { - type: require('./element.input'), - description: - 'An optional value describing when the action should be performed.', - }, - timingPeriod: { - type: require('./period.input'), - description: - 'An optional value describing when the action should be performed.', - }, - timingDuration: { - type: require('./duration.input'), - description: - 'An optional value describing when the action should be performed.', - }, - timingRange: { - type: require('./range.input'), - description: - 'An optional value describing when the action should be performed.', - }, - timingTiming: { - type: require('./timing.input'), - description: - 'An optional value describing when the action should be performed.', - }, - participant: { - type: new GraphQLList(require('./reference.input')), - description: - 'The participant that should perform or be responsible for this action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-type - type: { - type: require('./coding.input'), - description: 'The type of action to perform (create, update, remove).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-grouping-behavior - groupingBehavior: { - type: CodeScalar, - description: - 'Defines the grouping behavior for the action and its children.', - }, - _groupingBehavior: { - type: require('./element.input'), - description: - 'Defines the grouping behavior for the action and its children.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-selection-behavior - selectionBehavior: { - type: CodeScalar, - description: - 'Defines the selection behavior for the action and its children.', - }, - _selectionBehavior: { - type: require('./element.input'), - description: - 'Defines the selection behavior for the action and its children.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-required-behavior - requiredBehavior: { - type: CodeScalar, - description: 'Defines the requiredness behavior for the action.', - }, - _requiredBehavior: { - type: require('./element.input'), - description: 'Defines the requiredness behavior for the action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-precheck-behavior - precheckBehavior: { - type: CodeScalar, - description: - 'Defines whether the action should usually be preselected.', - }, - _precheckBehavior: { - type: require('./element.input'), - description: - 'Defines whether the action should usually be preselected.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-cardinality-behavior - cardinalityBehavior: { - type: CodeScalar, - description: - 'Defines whether the action can be selected multiple times.', - }, - _cardinalityBehavior: { - type: require('./element.input'), - description: - 'Defines whether the action can be selected multiple times.', - }, - resource: { - type: require('./reference.input'), - description: - 'The resource that is the target of the action (e.g. CommunicationRequest).', - }, - }), + name: 'RequestGroupaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _label: { + type: require('./element.input.js'), + description: 'A user-visible label for the action.', + }, + label: { + type: GraphQLString, + description: 'A user-visible label for the action.', + }, + _title: { + type: require('./element.input.js'), + description: 'The title of the action displayed to a user.', + }, + title: { + type: GraphQLString, + description: 'The title of the action displayed to a user.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + _textEquivalent: { + type: require('./element.input.js'), + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', + }, + textEquivalent: { + type: GraphQLString, + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', + }, + condition: { + type: new GraphQLList(require('./requestgroupactioncondition.input.js')), + description: + 'An expression that describes applicability criteria, or start/stop conditions for the action.', + }, + relatedAction: { + type: new GraphQLList( + require('./requestgroupactionrelatedaction.input.js'), + ), + description: + "A relationship to another action such as 'before' or '30-60 minutes after start of'.", + }, + _timingDateTime: { + type: require('./element.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'An optional value describing when the action should be performed.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDuration: { + type: require('./duration.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingRange: { + type: require('./range.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + participant: { + type: new GraphQLList(GraphQLString), + description: + 'The participant that should perform or be responsible for this action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-type + type: { + type: require('./coding.input.js'), + description: 'The type of action to perform (create, update, remove).', + }, + _groupingBehavior: { + type: require('./element.input.js'), + description: + 'Defines the grouping behavior for the action and its children.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-grouping-behavior + groupingBehavior: { + type: CodeScalar, + description: + 'Defines the grouping behavior for the action and its children.', + }, + _selectionBehavior: { + type: require('./element.input.js'), + description: + 'Defines the selection behavior for the action and its children.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-selection-behavior + selectionBehavior: { + type: CodeScalar, + description: + 'Defines the selection behavior for the action and its children.', + }, + _requiredBehavior: { + type: require('./element.input.js'), + description: 'Defines the requiredness behavior for the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-required-behavior + requiredBehavior: { + type: CodeScalar, + description: 'Defines the requiredness behavior for the action.', + }, + _precheckBehavior: { + type: require('./element.input.js'), + description: 'Defines whether the action should usually be preselected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-precheck-behavior + precheckBehavior: { + type: CodeScalar, + description: 'Defines whether the action should usually be preselected.', + }, + _cardinalityBehavior: { + type: require('./element.input.js'), + description: 'Defines whether the action can be selected multiple times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-cardinality-behavior + cardinalityBehavior: { + type: CodeScalar, + description: 'Defines whether the action can be selected multiple times.', + }, + resource: { + type: GraphQLString, + description: + 'The resource that is the target of the action (e.g. CommunicationRequest).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/requestgroupactioncondition.input.js b/src/resources/3_0_1/inputs/requestgroupactioncondition.input.js index 300fda6e..fbf39f2a 100644 --- a/src/resources/3_0_1/inputs/requestgroupactioncondition.input.js +++ b/src/resources/3_0_1/inputs/requestgroupactioncondition.input.js @@ -1,59 +1,75 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary RequestGroup.action.condition Input Schema + * @summary RequestGroupactioncondition Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'RequestGroupActionCondition_Input', - description: - 'An expression that describes applicability criteria, or start/stop conditions for the action.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-condition-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: 'The kind of condition.', - }, - _kind: { - type: require('./element.input'), - description: 'The kind of condition.', - }, - description: { - type: GraphQLString, - description: - 'A brief, natural language description of the condition that effectively communicates the intended semantics.', - }, - _description: { - type: require('./element.input'), - description: - 'A brief, natural language description of the condition that effectively communicates the intended semantics.', - }, - language: { - type: GraphQLString, - description: 'The media type of the language for the expression.', - }, - _language: { - type: require('./element.input'), - description: 'The media type of the language for the expression.', - }, - expression: { - type: GraphQLString, - description: - 'An expression that returns true or false, indicating whether or not the condition is satisfied.', - }, - _expression: { - type: require('./element.input'), - description: - 'An expression that returns true or false, indicating whether or not the condition is satisfied.', - }, - }), + name: 'RequestGroupactioncondition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _kind: { + type: require('./element.input.js'), + description: 'The kind of condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-condition-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'The kind of condition.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + _language: { + type: require('./element.input.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: GraphQLString, + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + expression: { + type: GraphQLString, + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/requestgroupactionrelatedaction.input.js b/src/resources/3_0_1/inputs/requestgroupactionrelatedaction.input.js index 82ad761b..e7b318bd 100644 --- a/src/resources/3_0_1/inputs/requestgroupactionrelatedaction.input.js +++ b/src/resources/3_0_1/inputs/requestgroupactionrelatedaction.input.js @@ -1,46 +1,66 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary RequestGroup.action.relatedAction Input Schema + * @summary RequestGroupactionrelatedAction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'RequestGroupActionRelatedAction_Input', - description: - "A relationship to another action such as 'before' or '30-60 minutes after start of'.", - fields: () => - extendSchema(require('./backboneelement.input'), { - actionId: { - type: new GraphQLNonNull(IdScalar), - description: 'The element id of the action this is related to.', - }, - _actionId: { - type: require('./element.input'), - description: 'The element id of the action this is related to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-relationship-type - relationship: { - type: new GraphQLNonNull(CodeScalar), - description: 'The relationship of this action to the related action.', - }, - _relationship: { - type: require('./element.input'), - description: 'The relationship of this action to the related action.', - }, - offsetDuration: { - type: require('./duration.input'), - description: - 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', - }, - offsetRange: { - type: require('./range.input'), - description: - 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', - }, - }), + name: 'RequestGroupactionrelatedAction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _actionId: { + type: require('./element.input.js'), + description: 'The element id of the action this is related to.', + }, + actionId: { + type: new GraphQLNonNull(IdScalar), + description: 'The element id of the action this is related to.', + }, + _relationship: { + type: require('./element.input.js'), + description: 'The relationship of this action to the related action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-relationship-type + relationship: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relationship of this action to the related action.', + }, + offsetDuration: { + type: require('./duration.input.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + offsetRange: { + type: require('./range.input.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/researchstudy.input.js b/src/resources/3_0_1/inputs/researchstudy.input.js index 7b829566..ef3cfced 100644 --- a/src/resources/3_0_1/inputs/researchstudy.input.js +++ b/src/resources/3_0_1/inputs/researchstudy.input.js @@ -1,21 +1,13 @@ -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 ResearchStudyResourceInputType = new GraphQLEnumType({ - name: 'ResearchStudyResourceInputType', - values: { - ResearchStudy: { value: 'ResearchStudy' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,122 +15,179 @@ let ResearchStudyResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ResearchStudy_Input', - description: 'Base StructureDefinition for ResearchStudy Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ResearchStudyResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Identifiers assigned to this research study by the sponsor or other systems.', - }, - title: { - type: GraphQLString, - description: 'A short, descriptive user-friendly label for the study.', - }, - _title: { - type: require('./element.input'), - description: 'A short, descriptive user-friendly label for the study.', - }, - protocol: { - type: new GraphQLList(require('./reference.input')), - description: - 'The set of steps expected to be performed as part of the execution of the study.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: - 'A larger research study of which this particular study is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/research-study-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current state of the study.', - }, - _status: { - type: require('./element.input'), - description: 'The current state of the study.', - }, - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.', - }, - focus: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The condition(s), medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in learning more about or engaging with the study.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.input')), - description: 'Citations, references and other related documents.', - }, - keyword: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Key terms to aid in searching for or filtering the study.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Indicates a country, state or other region where the study is taking place.', - }, - description: { - type: GraphQLString, - description: 'A full description of how the study is being conducted.', - }, - _description: { - type: require('./element.input'), - description: 'A full description of how the study is being conducted.', - }, - enrollment: { - type: new GraphQLList(require('./reference.input')), - description: - "Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. ' 200 female Europeans between the ages of 20 and 45 with early onset diabetes'.", - }, - period: { - type: require('./period.input'), - description: - 'Identifies the start date and the expected (or actual, depending on status) end date for the study.', - }, - sponsor: { - type: require('./reference.input'), - description: - 'The organization responsible for the execution of the study.', - }, - principalInvestigator: { - type: require('./reference.input'), - description: - 'Indicates the individual who has primary oversite of the execution of the study.', - }, - site: { - type: new GraphQLList(require('./reference.input')), - description: - 'Clinic, hospital or other healthcare location that is participating in the study.', - }, - reasonStopped: { - type: require('./codeableconcept.input'), - description: - 'A description and/or code explaining the premature termination of the study.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Comments made about the event by the performer, subject or other participants.', - }, - arm: { - type: new GraphQLList(require('./researchstudyarm.input')), - description: - 'Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.', - }, - }), + description: 'Base StructureDefinition for ResearchStudy Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchStudy_Enum_input', + values: { ResearchStudy: { value: 'ResearchStudy' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Identifiers assigned to this research study by the sponsor or other systems.', + }, + _title: { + type: require('./element.input.js'), + description: 'A short, descriptive user-friendly label for the study.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive user-friendly label for the study.', + }, + protocol: { + type: new GraphQLList(GraphQLString), + description: + 'The set of steps expected to be performed as part of the execution of the study.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger research study of which this particular study is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the study.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/research-study-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the study.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.', + }, + focus: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The condition(s), medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in learning more about or engaging with the study.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: 'Citations, references and other related documents.', + }, + keyword: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Key terms to aid in searching for or filtering the study.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates a country, state or other region where the study is taking place.', + }, + _description: { + type: require('./element.input.js'), + description: 'A full description of how the study is being conducted.', + }, + description: { + type: GraphQLString, + description: 'A full description of how the study is being conducted.', + }, + enrollment: { + type: new GraphQLList(GraphQLString), + description: + "Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. ' 200 female Europeans between the ages of 20 and 45 with early onset diabetes'.", + }, + period: { + type: require('./period.input.js'), + description: + 'Identifies the start date and the expected (or actual, depending on status) end date for the study.', + }, + sponsor: { + type: GraphQLString, + description: + 'The organization responsible for the execution of the study.', + }, + principalInvestigator: { + type: GraphQLString, + description: + 'Indicates the individual who has primary oversite of the execution of the study.', + }, + site: { + type: new GraphQLList(GraphQLString), + description: + 'Clinic, hospital or other healthcare location that is participating in the study.', + }, + reasonStopped: { + type: require('./codeableconcept.input.js'), + description: + 'A description and/or code explaining the premature termination of the study.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the event by the performer, subject or other participants.', + }, + arm: { + type: new GraphQLList(require('./researchstudyarm.input.js')), + description: + 'Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/researchstudyarm.input.js b/src/resources/3_0_1/inputs/researchstudyarm.input.js index c5cd4075..fa0e7b1b 100644 --- a/src/resources/3_0_1/inputs/researchstudyarm.input.js +++ b/src/resources/3_0_1/inputs/researchstudyarm.input.js @@ -1,44 +1,60 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ResearchStudy.arm Input Schema + * @summary ResearchStudyarm Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ResearchStudyArm_Input', - description: - 'Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Unique, human-readable label for this arm of the study.', - }, - _name: { - type: require('./element.input'), - description: 'Unique, human-readable label for this arm of the study.', - }, - code: { - type: require('./codeableconcept.input'), - description: - 'Categorization of study arm, e.g. experimental, active comparator, placebo comparater.', - }, - description: { - type: GraphQLString, - description: - 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', - }, - _description: { - type: require('./element.input'), - description: - 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', - }, - }), + name: 'ResearchStudyarm_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Unique, human-readable label for this arm of the study.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Unique, human-readable label for this arm of the study.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'Categorization of study arm, e.g. experimental, active comparator, placebo comparater.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', + }, + description: { + type: GraphQLString, + description: + 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/researchsubject.input.js b/src/resources/3_0_1/inputs/researchsubject.input.js index 549fc5d2..d40d27f1 100644 --- a/src/resources/3_0_1/inputs/researchsubject.input.js +++ b/src/resources/3_0_1/inputs/researchsubject.input.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ResearchSubjectResourceInputType = new GraphQLEnumType({ - name: 'ResearchSubjectResourceInputType', - values: { - ResearchSubject: { value: 'ResearchSubject' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,65 +15,123 @@ let ResearchSubjectResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ResearchSubject_Input', - description: 'Base StructureDefinition for ResearchSubject Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ResearchSubjectResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Identifiers assigned to this research study by the sponsor or other systems.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/research-subject-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current state of the subject.', - }, - _status: { - type: require('./element.input'), - description: 'The current state of the subject.', - }, - period: { - type: require('./period.input'), - description: - 'The dates the subject began and ended their participation in the study.', - }, - study: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Reference to the study the subject is participating in.', - }, - individual: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The record of the person or animal who is involved in the study.', - }, - assignedArm: { - type: GraphQLString, - description: - 'The name of the arm in the study the subject is expected to follow as part of this study.', - }, - _assignedArm: { - type: require('./element.input'), - description: - 'The name of the arm in the study the subject is expected to follow as part of this study.', - }, - actualArm: { - type: GraphQLString, - description: - 'The name of the arm in the study the subject actually followed as part of this study.', - }, - _actualArm: { - type: require('./element.input'), - description: - 'The name of the arm in the study the subject actually followed as part of this study.', - }, - consent: { - type: require('./reference.input'), - description: - "A record of the patient's informed agreement to participate in the study.", - }, - }), + description: 'Base StructureDefinition for ResearchSubject Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchSubject_Enum_input', + values: { ResearchSubject: { value: 'ResearchSubject' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'Identifiers assigned to this research study by the sponsor or other systems.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the subject.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/research-subject-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the subject.', + }, + period: { + type: require('./period.input.js'), + description: + 'The dates the subject began and ended their participation in the study.', + }, + study: { + type: new GraphQLNonNull(GraphQLString), + description: 'Reference to the study the subject is participating in.', + }, + individual: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The record of the person or animal who is involved in the study.', + }, + _assignedArm: { + type: require('./element.input.js'), + description: + 'The name of the arm in the study the subject is expected to follow as part of this study.', + }, + assignedArm: { + type: GraphQLString, + description: + 'The name of the arm in the study the subject is expected to follow as part of this study.', + }, + _actualArm: { + type: require('./element.input.js'), + description: + 'The name of the arm in the study the subject actually followed as part of this study.', + }, + actualArm: { + type: GraphQLString, + description: + 'The name of the arm in the study the subject actually followed as part of this study.', + }, + consent: { + type: GraphQLString, + description: + "A record of the patient's informed agreement to participate in the study.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/resource.input.js b/src/resources/3_0_1/inputs/resource.input.js index a770e9d9..34ba7d2d 100644 --- a/src/resources/3_0_1/inputs/resource.input.js +++ b/src/resources/3_0_1/inputs/resource.input.js @@ -1,22 +1,11 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ResourceResourceInputType = new GraphQLEnumType({ - name: 'ResourceResourceInputType', - values: { - Resource: { value: 'Resource' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -24,46 +13,50 @@ let ResourceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Resource_Input', - description: 'Base StructureDefinition for Resource Resource.', - fields: () => - extendSchema({ - resourceType: { - type: new GraphQLNonNull(ResourceResourceInputType), - description: 'Type of this resource.', - }, - id: { - type: IdScalar, - description: - 'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.', - }, - _id: { - type: require('./element.input'), - 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'), - 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: 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.', - }, - _implicitRules: { - type: require('./element.input'), - 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.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The base language in which the resource is written.', - }, - _language: { - type: require('./element.input'), - description: 'The base language in which the resource is written.', - }, - }), + description: 'Base StructureDefinition for Resource Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Resource_Enum_input', + values: { Resource: { value: 'Resource' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/riskassessment.input.js b/src/resources/3_0_1/inputs/riskassessment.input.js index 6328fdb8..57fd2091 100644 --- a/src/resources/3_0_1/inputs/riskassessment.input.js +++ b/src/resources/3_0_1/inputs/riskassessment.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 RiskAssessmentResourceInputType = new GraphQLEnumType({ - name: 'RiskAssessmentResourceInputType', - values: { - RiskAssessment: { value: 'RiskAssessment' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,114 +16,172 @@ let RiskAssessmentResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'RiskAssessment_Input', - description: 'Base StructureDefinition for RiskAssessment Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(RiskAssessmentResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Business identifier assigned to the risk assessment.', - }, - basedOn: { - type: require('./reference.input'), - description: - 'A reference to the request that is fulfilled by this risk assessment.', - }, - parent: { - type: require('./reference.input'), - description: - 'A reference to a resource that this risk assessment is part of, such as a Procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the RiskAssessment, using the same statuses as an Observation.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of the RiskAssessment, using the same statuses as an Observation.', - }, - method: { - type: require('./codeableconcept.input'), - description: - 'The algorithm, process or mechanism used to evaluate the risk.', - }, - code: { - type: require('./codeableconcept.input'), - description: 'The type of the risk assessment performed.', - }, - subject: { - type: require('./reference.input'), - description: 'The patient or group the risk assessment applies to.', - }, - context: { - type: require('./reference.input'), - description: 'The encounter where the assessment was performed.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - occurrencePeriod: { - type: require('./period.input'), - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - condition: { - type: require('./reference.input'), - description: - 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', - }, - performer: { - type: require('./reference.input'), - description: - 'The provider or software application that performed the assessment.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'The reason the risk assessment was performed.', - }, - reasonReference: { - type: require('./reference.input'), - description: 'The reason the risk assessment was performed.', - }, - basis: { - type: new GraphQLList(require('./reference.input')), - description: - 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', - }, - prediction: { - type: new GraphQLList(require('./riskassessmentprediction.input')), - description: 'Describes the expected outcome for the subject.', - }, - mitigation: { - type: GraphQLString, - description: - 'A description of the steps that might be taken to reduce the identified risk(s).', - }, - _mitigation: { - type: require('./element.input'), - description: - 'A description of the steps that might be taken to reduce the identified risk(s).', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the risk assessment.', - }, - _comment: { - type: require('./element.input'), - description: 'Additional comments about the risk assessment.', - }, - }), + description: 'Base StructureDefinition for RiskAssessment Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RiskAssessment_Enum_input', + values: { RiskAssessment: { value: 'RiskAssessment' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: 'Business identifier assigned to the risk assessment.', + }, + basedOn: { + type: GraphQLString, + description: + 'A reference to the request that is fulfilled by this risk assessment.', + }, + parent: { + type: GraphQLString, + description: + 'A reference to a resource that this risk assessment is part of, such as a Procedure.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of the RiskAssessment, using the same statuses as an Observation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the RiskAssessment, using the same statuses as an Observation.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'The algorithm, process or mechanism used to evaluate the risk.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The type of the risk assessment performed.', + }, + subject: { + type: GraphQLString, + description: 'The patient or group the risk assessment applies to.', + }, + context: { + type: GraphQLString, + description: 'The encounter where the assessment was performed.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + condition: { + type: GraphQLString, + description: + 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', + }, + performer: { + type: GraphQLString, + description: + 'The provider or software application that performed the assessment.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'The reason the risk assessment was performed.', + }, + reasonReference: { + type: GraphQLString, + description: 'The reason the risk assessment was performed.', + }, + basis: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', + }, + prediction: { + type: new GraphQLList(require('./riskassessmentprediction.input.js')), + description: 'Describes the expected outcome for the subject.', + }, + _mitigation: { + type: require('./element.input.js'), + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + mitigation: { + type: GraphQLString, + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + _comment: { + type: require('./element.input.js'), + description: 'Additional comments about the risk assessment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the risk assessment.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/riskassessmentprediction.input.js b/src/resources/3_0_1/inputs/riskassessmentprediction.input.js index 87da11ed..2786bd32 100644 --- a/src/resources/3_0_1/inputs/riskassessmentprediction.input.js +++ b/src/resources/3_0_1/inputs/riskassessmentprediction.input.js @@ -1,74 +1,91 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLFloat, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary RiskAssessment.prediction Input Schema + * @summary RiskAssessmentprediction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'RiskAssessmentPrediction_Input', - description: 'Describes the expected outcome for the subject.', - fields: () => - extendSchema(require('./backboneelement.input'), { - outcome: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', - }, - probabilityDecimal: { - type: GraphQLFloat, - description: 'How likely is the outcome (in the specified timeframe).', - }, - _probabilityDecimal: { - type: require('./element.input'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - probabilityRange: { - type: require('./range.input'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/risk-probability - qualitativeRisk: { - type: require('./codeableconcept.input'), - description: - 'How likely is the outcome (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, high).', - }, - relativeRisk: { - type: GraphQLFloat, - description: - 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', - }, - _relativeRisk: { - type: require('./element.input'), - description: - 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', - }, - whenPeriod: { - type: require('./period.input'), - description: - 'Indicates the period of time or age range of the subject to which the specified probability applies.', - }, - whenRange: { - type: require('./range.input'), - description: - 'Indicates the period of time or age range of the subject to which the specified probability applies.', - }, - rationale: { - type: GraphQLString, - description: - 'Additional information explaining the basis for the prediction.', - }, - _rationale: { - type: require('./element.input'), - description: - 'Additional information explaining the basis for the prediction.', - }, - }), + name: 'RiskAssessmentprediction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + outcome: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', + }, + _probabilityDecimal: { + type: require('./element.input.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + probabilityDecimal: { + type: GraphQLFloat, + description: 'How likely is the outcome (in the specified timeframe).', + }, + probabilityRange: { + type: require('./range.input.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/risk-probability + qualitativeRisk: { + type: require('./codeableconcept.input.js'), + description: + 'How likely is the outcome (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, high).', + }, + _relativeRisk: { + type: require('./element.input.js'), + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + relativeRisk: { + type: GraphQLFloat, + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + whenPeriod: { + type: require('./period.input.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + whenRange: { + type: require('./range.input.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + _rationale: { + type: require('./element.input.js'), + description: + 'Additional information explaining the basis for the prediction.', + }, + rationale: { + type: GraphQLString, + description: + 'Additional information explaining the basis for the prediction.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/sampleddata.input.js b/src/resources/3_0_1/inputs/sampleddata.input.js index 0d4096a3..9b3b4c1a 100644 --- a/src/resources/3_0_1/inputs/sampleddata.input.js +++ b/src/resources/3_0_1/inputs/sampleddata.input.js @@ -1,13 +1,11 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLFloat, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -15,73 +13,87 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'SampledData_Input', - description: 'Base StructureDefinition for SampledData Type.', - fields: () => - extendSchema(require('./element.input'), { - origin: { - type: new GraphQLNonNull(require('./quantity.input')), - description: - 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', - }, - period: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'The length of time between sampling times, measured in milliseconds.', - }, - _period: { - type: require('./element.input'), - description: - 'The length of time between sampling times, measured in milliseconds.', - }, - factor: { - type: GraphQLFloat, - description: - 'A correction factor that is applied to the sampled data points before they are added to the origin.', - }, - _factor: { - type: require('./element.input'), - description: - 'A correction factor that is applied to the sampled data points before they are added to the origin.', - }, - lowerLimit: { - type: GraphQLFloat, - description: - "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", - }, - _lowerLimit: { - type: require('./element.input'), - description: - "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", - }, - upperLimit: { - type: GraphQLFloat, - description: - "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", - }, - _upperLimit: { - type: require('./element.input'), - description: - "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", - }, - dimensions: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', - }, - _dimensions: { - type: require('./element.input'), - description: - 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', - }, - data: { - type: new GraphQLNonNull(GraphQLString), - description: - "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", - }, - _data: { - type: require('./element.input'), - description: - "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", - }, - }), + description: 'Base StructureDefinition for SampledData Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + origin: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', + }, + _period: { + type: require('./element.input.js'), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + period: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + factor: { + type: GraphQLFloat, + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + _lowerLimit: { + type: require('./element.input.js'), + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + lowerLimit: { + type: GraphQLFloat, + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + _upperLimit: { + type: require('./element.input.js'), + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + upperLimit: { + type: GraphQLFloat, + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + _dimensions: { + type: require('./element.input.js'), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + dimensions: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + _data: { + type: require('./element.input.js'), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + data: { + type: new GraphQLNonNull(GraphQLString), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/schedule.input.js b/src/resources/3_0_1/inputs/schedule.input.js index a04e39f3..ae8aa1da 100644 --- a/src/resources/3_0_1/inputs/schedule.input.js +++ b/src/resources/3_0_1/inputs/schedule.input.js @@ -1,21 +1,14 @@ const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ScheduleResourceInputType = new GraphQLEnumType({ - name: 'ScheduleResourceInputType', - values: { - Schedule: { value: 'Schedule' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,64 +16,122 @@ let ScheduleResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Schedule_Input', - description: 'Base StructureDefinition for Schedule Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ScheduleResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'External Ids for this item.', - }, - active: { - type: GraphQLBoolean, - description: - 'Whether this schedule record is in active use, or should not be used (such as was entered in error).', - }, - _active: { - type: require('./element.input'), - description: - 'Whether this schedule record is in active use, or should not be used (such as was entered in error).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-category - serviceCategory: { - type: require('./codeableconcept.input'), - description: - 'A broad categorisation of the service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-type - serviceType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The specific service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', - }, - actor: { - type: new GraphQLList(new GraphQLNonNull(require('./reference.input'))), - description: - 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, PractitionerRole, Device, Patient or RelatedPerson.', - }, - planningHorizon: { - type: require('./period.input'), - description: - "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", - }, - comment: { - type: GraphQLString, - description: - 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', - }, - _comment: { - type: require('./element.input'), - description: - 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', - }, - }), + description: 'Base StructureDefinition for Schedule Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Schedule_Enum_input', + values: { Schedule: { value: 'Schedule' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'External Ids for this item.', + }, + _active: { + type: require('./element.input.js'), + description: + 'Whether this schedule record is in active use, or should not be used (such as was entered in error).', + }, + active: { + type: GraphQLBoolean, + description: + 'Whether this schedule record is in active use, or should not be used (such as was entered in error).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-category + serviceCategory: { + type: require('./codeableconcept.input.js'), + description: + 'A broad categorisation of the service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-type + serviceType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specific service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + actor: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, PractitionerRole, Device, Patient or RelatedPerson.', + }, + planningHorizon: { + type: require('./period.input.js'), + description: + "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/searchparameter.input.js b/src/resources/3_0_1/inputs/searchparameter.input.js index 723b62b0..5ab1c569 100644 --- a/src/resources/3_0_1/inputs/searchparameter.input.js +++ b/src/resources/3_0_1/inputs/searchparameter.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SearchParameterResourceInputType = new GraphQLEnumType({ - name: 'SearchParameterResourceInputType', - values: { - SearchParameter: { value: 'SearchParameter' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,234 +17,291 @@ let SearchParameterResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'SearchParameter_Input', - description: 'Base StructureDefinition for SearchParameter Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SearchParameterResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this search parameter. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this search parameter. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the search parameter was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the search parameter was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the search parameter.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the search parameter.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate search parameter instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the search parameter is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this search parameter is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this search parameter is needed and why it has been designed as it has.', - }, - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', - }, - _code: { - type: require('./element.input'), - description: - 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - base: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: - 'The base resource type(s) that this search parameter can be used against.', - }, - _base: { - type: require('./element.input'), - description: - 'The base resource type(s) that this search parameter can be used against.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - _type: { - type: require('./element.input'), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - derivedFrom: { - type: UriScalar, - description: - 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. I.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', - }, - _derivedFrom: { - type: require('./element.input'), - description: - 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. I.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', - }, - description: { - type: new GraphQLNonNull(GraphQLString), - description: - "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", - }, - expression: { - type: GraphQLString, - description: - 'A FHIRPath expression that returns a set of elements for the search parameter.', - }, - _expression: { - type: require('./element.input'), - description: - 'A FHIRPath expression that returns a set of elements for the search parameter.', - }, - xpath: { - type: GraphQLString, - description: - 'An XPath expression that returns a set of elements for the search parameter.', - }, - _xpath: { - type: require('./element.input'), - description: - 'An XPath expression that returns a set of elements for the search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-xpath-usage - xpathUsage: { - type: CodeScalar, - description: - 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', - }, - _xpathUsage: { - type: require('./element.input'), - description: - 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - target: { - type: new GraphQLList(CodeScalar), - description: 'Types of resource (if a resource is referenced).', - }, - _target: { - type: require('./element.input'), - description: 'Types of resource (if a resource is referenced).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-comparator - comparator: { - type: new GraphQLList(CodeScalar), - description: 'Comparators supported for the search parameter.', - }, - _comparator: { - type: require('./element.input'), - description: 'Comparators supported for the search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-modifier-code - modifier: { - type: new GraphQLList(CodeScalar), - description: 'A modifier supported for the search parameter.', - }, - _modifier: { - type: require('./element.input'), - description: 'A modifier supported for the search parameter.', - }, - chain: { - type: new GraphQLList(GraphQLString), - description: - 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', - }, - _chain: { - type: require('./element.input'), - description: - 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', - }, - component: { - type: new GraphQLList(require('./searchparametercomponent.input')), - description: - 'Used to define the parts of a composite search parameter.', - }, - }), + description: 'Base StructureDefinition for SearchParameter Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SearchParameter_Enum_input', + values: { SearchParameter: { value: 'SearchParameter' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this search parameter. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this search parameter. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the search parameter was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the search parameter was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the search parameter.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the search parameter.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate search parameter instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the search parameter is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this search parameter is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this search parameter is needed and why it has been designed as it has.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + _base: { + type: require('./element.input.js'), + description: + 'The base resource type(s) that this search parameter can be used against.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + base: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'The base resource type(s) that this search parameter can be used against.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _derivedFrom: { + type: require('./element.input.js'), + description: + 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. I.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', + }, + derivedFrom: { + type: UriScalar, + description: + 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. I.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", + }, + _expression: { + type: require('./element.input.js'), + description: + 'A FHIRPath expression that returns a set of elements for the search parameter.', + }, + expression: { + type: GraphQLString, + description: + 'A FHIRPath expression that returns a set of elements for the search parameter.', + }, + _xpath: { + type: require('./element.input.js'), + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + _xpathUsage: { + type: require('./element.input.js'), + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-xpath-usage + xpathUsage: { + type: CodeScalar, + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + _target: { + type: require('./element.input.js'), + description: 'Types of resource (if a resource is referenced).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + target: { + type: new GraphQLList(CodeScalar), + description: 'Types of resource (if a resource is referenced).', + }, + _comparator: { + type: require('./element.input.js'), + description: 'Comparators supported for the search parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-comparator + comparator: { + type: new GraphQLList(CodeScalar), + description: 'Comparators supported for the search parameter.', + }, + _modifier: { + type: require('./element.input.js'), + description: 'A modifier supported for the search parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-modifier-code + modifier: { + type: new GraphQLList(CodeScalar), + description: 'A modifier supported for the search parameter.', + }, + _chain: { + type: require('./element.input.js'), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', + }, + chain: { + type: new GraphQLList(GraphQLString), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', + }, + component: { + type: new GraphQLList(require('./searchparametercomponent.input.js')), + description: 'Used to define the parts of a composite search parameter.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/searchparametercomponent.input.js b/src/resources/3_0_1/inputs/searchparametercomponent.input.js index 876103d1..456fce46 100644 --- a/src/resources/3_0_1/inputs/searchparametercomponent.input.js +++ b/src/resources/3_0_1/inputs/searchparametercomponent.input.js @@ -1,35 +1,52 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary SearchParameter.component Input Schema + * @summary SearchParametercomponent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SearchParameterComponent_Input', - description: 'Used to define the parts of a composite search parameter.', - fields: () => - extendSchema(require('./backboneelement.input'), { - definition: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The definition of the search parameter that describes this part.', - }, - expression: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', - }, - _expression: { - type: require('./element.input'), - description: - 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', - }, - }), + name: 'SearchParametercomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + definition: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The definition of the search parameter that describes this part.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', + }, + expression: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/sequence.input.js b/src/resources/3_0_1/inputs/sequence.input.js index 03e46e11..65228d1d 100644 --- a/src/resources/3_0_1/inputs/sequence.input.js +++ b/src/resources/3_0_1/inputs/sequence.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SequenceResourceInputType = new GraphQLEnumType({ - name: 'SequenceResourceInputType', - values: { - Sequence: { value: 'Sequence' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -24,105 +16,162 @@ let SequenceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Sequence_Input', - description: 'Base StructureDefinition for Sequence Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SequenceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A unique identifier for this particular sequence instance. This is a FHIR-defined id.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/sequence-type - type: { - type: CodeScalar, - description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', - }, - _type: { - type: require('./element.input'), - description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', - }, - coordinateSystem: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', - }, - _coordinateSystem: { - type: require('./element.input'), - description: - 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', - }, - patient: { - type: require('./reference.input'), - description: - 'The patient whose sequencing results are described by this resource.', - }, - specimen: { - type: require('./reference.input'), - description: 'Specimen used for sequencing.', - }, - device: { - type: require('./reference.input'), - description: - 'The method for sequencing, for example, chip information.', - }, - performer: { - type: require('./reference.input'), - description: - 'The organization or lab that should be responsible for this result.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The number of copies of the seqeunce of interest. (RNASeq).', - }, - referenceSeq: { - type: require('./sequencereferenceseq.input'), - description: - 'A sequence that is used as a reference to describe variants that are present in a sequence analyzed.', - }, - variant: { - type: new GraphQLList(require('./sequencevariant.input')), - description: - 'The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.', - }, - observedSeq: { - type: GraphQLString, - description: - 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.', - }, - _observedSeq: { - type: require('./element.input'), - description: - 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.', - }, - quality: { - type: new GraphQLList(require('./sequencequality.input')), - description: - 'An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).', - }, - readCoverage: { - type: GraphQLInt, - description: - 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', - }, - _readCoverage: { - type: require('./element.input'), - description: - 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', - }, - repository: { - type: new GraphQLList(require('./sequencerepository.input')), - description: - "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", - }, - pointer: { - type: new GraphQLList(require('./reference.input')), - description: - 'Pointer to next atomic sequence which at most contains one variant.', - }, - }), + description: 'Base StructureDefinition for Sequence Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Sequence_Enum_input', + values: { Sequence: { value: 'Sequence' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'A unique identifier for this particular sequence instance. This is a FHIR-defined id.', + }, + _type: { + type: require('./element.input.js'), + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/sequence-type + type: { + type: CodeScalar, + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', + }, + _coordinateSystem: { + type: require('./element.input.js'), + description: + 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', + }, + coordinateSystem: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', + }, + patient: { + type: GraphQLString, + description: + 'The patient whose sequencing results are described by this resource.', + }, + specimen: { + type: GraphQLString, + description: 'Specimen used for sequencing.', + }, + device: { + type: GraphQLString, + description: 'The method for sequencing, for example, chip information.', + }, + performer: { + type: GraphQLString, + description: + 'The organization or lab that should be responsible for this result.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The number of copies of the seqeunce of interest. (RNASeq).', + }, + referenceSeq: { + type: require('./sequencereferenceseq.input.js'), + description: + 'A sequence that is used as a reference to describe variants that are present in a sequence analyzed.', + }, + variant: { + type: new GraphQLList(require('./sequencevariant.input.js')), + description: + 'The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.', + }, + _observedSeq: { + type: require('./element.input.js'), + description: + 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.', + }, + observedSeq: { + type: GraphQLString, + description: + 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.', + }, + quality: { + type: new GraphQLList(require('./sequencequality.input.js')), + description: + 'An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).', + }, + _readCoverage: { + type: require('./element.input.js'), + description: + 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', + }, + readCoverage: { + type: GraphQLInt, + description: + 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', + }, + repository: { + type: new GraphQLList(require('./sequencerepository.input.js')), + description: + "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", + }, + pointer: { + type: new GraphQLList(GraphQLString), + description: + 'Pointer to next atomic sequence which at most contains one variant.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/sequencequality.input.js b/src/resources/3_0_1/inputs/sequencequality.input.js index 77f3ba84..bd1167ee 100644 --- a/src/resources/3_0_1/inputs/sequencequality.input.js +++ b/src/resources/3_0_1/inputs/sequencequality.input.js @@ -1,143 +1,160 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Sequence.quality Input Schema + * @summary Sequencequality Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SequenceQuality_Input', - description: - 'An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/quality-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'INDEL / SNP / Undefined variant.', - }, - _type: { - type: require('./element.input'), - description: 'INDEL / SNP / Undefined variant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence - standardSequence: { - type: require('./codeableconcept.input'), - description: 'Gold standard sequence used for comparing against.', - }, - start: { - type: GraphQLInt, - description: - 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - _start: { - type: require('./element.input'), - description: - 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - end: { - type: GraphQLInt, - description: - 'End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - _end: { - type: require('./element.input'), - description: - 'End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - score: { - type: require('./quantity.input'), - description: - 'The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/sequence-quality-method - method: { - type: require('./codeableconcept.input'), - description: 'Which method is used to get sequence quality.', - }, - truthTP: { - type: GraphQLFloat, - description: - 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', - }, - _truthTP: { - type: require('./element.input'), - description: - 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', - }, - queryTP: { - type: GraphQLFloat, - description: - 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', - }, - _queryTP: { - type: require('./element.input'), - description: - 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', - }, - truthFN: { - type: GraphQLFloat, - description: - 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', - }, - _truthFN: { - type: require('./element.input'), - description: - 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', - }, - queryFP: { - type: GraphQLFloat, - description: - 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', - }, - _queryFP: { - type: require('./element.input'), - description: - 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', - }, - gtFP: { - type: GraphQLFloat, - description: - 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', - }, - _gtFP: { - type: require('./element.input'), - description: - 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', - }, - precision: { - type: GraphQLFloat, - description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', - }, - _precision: { - type: require('./element.input'), - description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', - }, - recall: { - type: GraphQLFloat, - description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', - }, - _recall: { - type: require('./element.input'), - description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', - }, - fScore: { - type: GraphQLFloat, - description: - 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', - }, - _fScore: { - type: require('./element.input'), - description: - 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', - }, - }), + name: 'Sequencequality_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'INDEL / SNP / Undefined variant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quality-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'INDEL / SNP / Undefined variant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence + standardSequence: { + type: require('./codeableconcept.input.js'), + description: 'Gold standard sequence used for comparing against.', + }, + _start: { + type: require('./element.input.js'), + description: + 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + score: { + type: require('./quantity.input.js'), + description: + 'The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/sequence-quality-method + method: { + type: require('./codeableconcept.input.js'), + description: 'Which method is used to get sequence quality.', + }, + _truthTP: { + type: require('./element.input.js'), + description: + 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + truthTP: { + type: GraphQLFloat, + description: + 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + _queryTP: { + type: require('./element.input.js'), + description: + 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + queryTP: { + type: GraphQLFloat, + description: + 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + _truthFN: { + type: require('./element.input.js'), + description: + 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', + }, + truthFN: { + type: GraphQLFloat, + description: + 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', + }, + _queryFP: { + type: require('./element.input.js'), + description: + 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', + }, + queryFP: { + type: GraphQLFloat, + description: + 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', + }, + _gtFP: { + type: require('./element.input.js'), + description: + 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', + }, + gtFP: { + type: GraphQLFloat, + description: + 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', + }, + _precision: { + type: require('./element.input.js'), + description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', + }, + precision: { + type: GraphQLFloat, + description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', + }, + _recall: { + type: require('./element.input.js'), + description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', + }, + recall: { + type: GraphQLFloat, + description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', + }, + _fScore: { + type: require('./element.input.js'), + description: + 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', + }, + fScore: { + type: GraphQLFloat, + description: + 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/sequencereferenceseq.input.js b/src/resources/3_0_1/inputs/sequencereferenceseq.input.js index f11fa196..4ff9ed2f 100644 --- a/src/resources/3_0_1/inputs/sequencereferenceseq.input.js +++ b/src/resources/3_0_1/inputs/sequencereferenceseq.input.js @@ -1,87 +1,103 @@ const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLInt, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Sequence.referenceSeq Input Schema + * @summary SequencereferenceSeq Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SequenceReferenceSeq_Input', - description: - 'A sequence that is used as a reference to describe variants that are present in a sequence analyzed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/chromosome-human - chromosome: { - type: require('./codeableconcept.input'), - description: - 'Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).', - }, - genomeBuild: { - type: GraphQLString, - description: - "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", - }, - _genomeBuild: { - type: require('./element.input'), - description: - "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/sequence-referenceSeq - referenceSeqId: { - type: require('./codeableconcept.input'), - description: - 'Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.', - }, - referenceSeqPointer: { - type: require('./reference.input'), - description: - 'A Pointer to another Sequence entity as reference sequence.', - }, - referenceSeqString: { - type: GraphQLString, - description: "A string like 'ACGT'.", - }, - _referenceSeqString: { - type: require('./element.input'), - description: "A string like 'ACGT'.", - }, - strand: { - type: GraphQLInt, - description: - "Directionality of DNA sequence. Available values are '1' for the plus strand (5' to 3')/Watson/Sense/positive and '-1' for the minus strand(3' to 5')/Crick/Antisense/negative.", - }, - _strand: { - type: require('./element.input'), - description: - "Directionality of DNA sequence. Available values are '1' for the plus strand (5' to 3')/Watson/Sense/positive and '-1' for the minus strand(3' to 5')/Crick/Antisense/negative.", - }, - windowStart: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - _windowStart: { - type: require('./element.input'), - description: - 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - windowEnd: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - _windowEnd: { - type: require('./element.input'), - description: - 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - }), + name: 'SequencereferenceSeq_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/chromosome-human + chromosome: { + type: require('./codeableconcept.input.js'), + description: + 'Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).', + }, + _genomeBuild: { + type: require('./element.input.js'), + description: + "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", + }, + genomeBuild: { + type: GraphQLString, + description: + "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/sequence-referenceSeq + referenceSeqId: { + type: require('./codeableconcept.input.js'), + description: + 'Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.', + }, + referenceSeqPointer: { + type: GraphQLString, + description: + 'A Pointer to another Sequence entity as reference sequence.', + }, + _referenceSeqString: { + type: require('./element.input.js'), + description: "A string like 'ACGT'.", + }, + referenceSeqString: { + type: GraphQLString, + description: "A string like 'ACGT'.", + }, + _strand: { + type: require('./element.input.js'), + description: + "Directionality of DNA sequence. Available values are '1' for the plus strand (5' to 3')/Watson/Sense/positive and '-1' for the minus strand(3' to 5')/Crick/Antisense/negative.", + }, + strand: { + type: GraphQLInt, + description: + "Directionality of DNA sequence. Available values are '1' for the plus strand (5' to 3')/Watson/Sense/positive and '-1' for the minus strand(3' to 5')/Crick/Antisense/negative.", + }, + _windowStart: { + type: require('./element.input.js'), + description: + 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + windowStart: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _windowEnd: { + type: require('./element.input.js'), + description: + 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + windowEnd: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/sequencerepository.input.js b/src/resources/3_0_1/inputs/sequencerepository.input.js index b9b0e007..79339d4c 100644 --- a/src/resources/3_0_1/inputs/sequencerepository.input.js +++ b/src/resources/3_0_1/inputs/sequencerepository.input.js @@ -1,82 +1,98 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Sequence.repository Input Schema + * @summary Sequencerepository Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SequenceRepository_Input', - description: - "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/repository-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', - }, - _type: { - type: require('./element.input'), - description: - 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', - }, - url: { - type: UriScalar, - description: - 'URI of an external repository which contains further details about the genetics data.', - }, - _url: { - type: require('./element.input'), - description: - 'URI of an external repository which contains further details about the genetics data.', - }, - name: { - type: GraphQLString, - description: - 'URI of an external repository which contains further details about the genetics data.', - }, - _name: { - type: require('./element.input'), - description: - 'URI of an external repository which contains further details about the genetics data.', - }, - datasetId: { - type: GraphQLString, - description: - 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', - }, - _datasetId: { - type: require('./element.input'), - description: - 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', - }, - variantsetId: { - type: GraphQLString, - description: - 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', - }, - _variantsetId: { - type: require('./element.input'), - description: - 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', - }, - readsetId: { - type: GraphQLString, - description: 'Id of the read in this external repository.', - }, - _readsetId: { - type: require('./element.input'), - description: 'Id of the read in this external repository.', - }, - }), + name: 'Sequencerepository_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/repository-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', + }, + _url: { + type: require('./element.input.js'), + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + url: { + type: UriScalar, + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + _name: { + type: require('./element.input.js'), + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + name: { + type: GraphQLString, + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + _datasetId: { + type: require('./element.input.js'), + description: + 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', + }, + datasetId: { + type: GraphQLString, + description: + 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', + }, + _variantsetId: { + type: require('./element.input.js'), + description: + 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', + }, + variantsetId: { + type: GraphQLString, + description: + 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', + }, + _readsetId: { + type: require('./element.input.js'), + description: 'Id of the read in this external repository.', + }, + readsetId: { + type: GraphQLString, + description: 'Id of the read in this external repository.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/sequencevariant.input.js b/src/resources/3_0_1/inputs/sequencevariant.input.js index 0acba819..5fe04b73 100644 --- a/src/resources/3_0_1/inputs/sequencevariant.input.js +++ b/src/resources/3_0_1/inputs/sequencevariant.input.js @@ -1,76 +1,92 @@ const { - GraphQLInputObjectType, - GraphQLInt, GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Sequence.variant Input Schema + * @summary Sequencevariant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SequenceVariant_Input', - description: - 'The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.', - fields: () => - extendSchema(require('./backboneelement.input'), { - start: { - type: GraphQLInt, - description: - 'Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - _start: { - type: require('./element.input'), - description: - 'Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - end: { - type: GraphQLInt, - description: - 'End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - _end: { - type: require('./element.input'), - description: - 'End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - observedAllele: { - type: GraphQLString, - description: - 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', - }, - _observedAllele: { - type: require('./element.input'), - description: - 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', - }, - referenceAllele: { - type: GraphQLString, - description: - 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', - }, - _referenceAllele: { - type: require('./element.input'), - description: - 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', - }, - cigar: { - type: GraphQLString, - description: - 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', - }, - _cigar: { - type: require('./element.input'), - description: - 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', - }, - variantPointer: { - type: require('./reference.input'), - description: - 'A pointer to an Observation containing variant information.', - }, - }), + name: 'Sequencevariant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _start: { + type: require('./element.input.js'), + description: + 'Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + _observedAllele: { + type: require('./element.input.js'), + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + observedAllele: { + type: GraphQLString, + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + _referenceAllele: { + type: require('./element.input.js'), + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + referenceAllele: { + type: GraphQLString, + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + _cigar: { + type: require('./element.input.js'), + description: + 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', + }, + cigar: { + type: GraphQLString, + description: + 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', + }, + variantPointer: { + type: GraphQLString, + description: + 'A pointer to an Observation containing variant information.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/servicedefinition.input.js b/src/resources/3_0_1/inputs/servicedefinition.input.js index e2d70812..64b7a538 100644 --- a/src/resources/3_0_1/inputs/servicedefinition.input.js +++ b/src/resources/3_0_1/inputs/servicedefinition.input.js @@ -1,25 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ServiceDefinitionResourceInputType = new GraphQLEnumType({ - name: 'ServiceDefinitionResourceInputType', - values: { - ServiceDefinition: { value: 'ServiceDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -27,210 +18,268 @@ let ServiceDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ServiceDefinition_Input', - description: 'Base StructureDefinition for ServiceDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ServiceDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the service definition.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the service definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this service definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this service definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the service definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the service definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the service definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the service definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the service definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the service definition.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the service definition from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the service definition from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this service definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this service definition is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the module is used from a clinical perspective.', - }, - _usage: { - type: require('./element.input'), - description: - 'A detailed description of how the module is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.input'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.input'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.input'), - description: - 'The period during which the service definition content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate service definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the service definition is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.input')), - description: - 'A contributor to the content of the module, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.input')), - description: - 'Related resources such as additional documentation, justification, or bibliographic references.', - }, - trigger: { - type: new GraphQLList(require('./triggerdefinition.input')), - description: - 'The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.', - }, - dataRequirement: { - type: new GraphQLList(require('./datarequirement.input')), - description: - 'Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.', - }, - operationDefinition: { - type: require('./reference.input'), - description: - 'A reference to the operation that is used to invoke this service.', - }, - }), + description: 'Base StructureDefinition for ServiceDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ServiceDefinition_Enum_input', + values: { ServiceDefinition: { value: 'ServiceDefinition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the service definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the service definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this service definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this service definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the service definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the service definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the service definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the service definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the service definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the service definition.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the service definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the service definition from a consumer's perspective.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this service definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this service definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the module is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the module is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the service definition content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate service definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the service definition is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.input.js')), + description: + 'A contributor to the content of the module, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related resources such as additional documentation, justification, or bibliographic references.', + }, + trigger: { + type: new GraphQLList(require('./triggerdefinition.input.js')), + description: + 'The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: + 'Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.', + }, + operationDefinition: { + type: GraphQLString, + description: + 'A reference to the operation that is used to invoke this service.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/signature.input.js b/src/resources/3_0_1/inputs/signature.input.js index 782e76fa..9ca70cc5 100644 --- a/src/resources/3_0_1/inputs/signature.input.js +++ b/src/resources/3_0_1/inputs/signature.input.js @@ -1,15 +1,13 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports @@ -17,72 +15,86 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Signature_Input', - description: 'Base StructureDefinition for Signature Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/signature-type - type: { - type: new GraphQLList(new GraphQLNonNull(require('./coding.input'))), - description: - 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', - }, - when: { - type: new GraphQLNonNull(InstantScalar), - description: 'When the digital signature was signed.', - }, - _when: { - type: require('./element.input'), - description: 'When the digital signature was signed.', - }, - whoUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', - }, - _whoUri: { - type: require('./element.input'), - description: - 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', - }, - whoReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', - }, - onBehalfOfUri: { - type: UriScalar, - description: - 'A reference to an application-usable description of the identity that is represented by the signature.', - }, - _onBehalfOfUri: { - type: require('./element.input'), - description: - 'A reference to an application-usable description of the identity that is represented by the signature.', - }, - onBehalfOfReference: { - type: require('./reference.input'), - description: - 'A reference to an application-usable description of the identity that is represented by the signature.', - }, - contentType: { - type: CodeScalar, - description: - 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.', - }, - _contentType: { - type: require('./element.input'), - description: - 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.', - }, - blob: { - type: Base64BinaryScalar, - description: - 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', - }, - _blob: { - type: require('./element.input'), - description: - 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', - }, - }), + description: 'Base StructureDefinition for Signature Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/signature-type + type: { + type: new GraphQLList(new GraphQLNonNull(require('./coding.input.js'))), + description: + 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', + }, + _when: { + type: require('./element.input.js'), + description: 'When the digital signature was signed.', + }, + when: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the digital signature was signed.', + }, + _whoUri: { + type: require('./element.input.js'), + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + }, + whoUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + }, + whoReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + }, + _onBehalfOfUri: { + type: require('./element.input.js'), + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + }, + onBehalfOfUri: { + type: UriScalar, + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + }, + onBehalfOfReference: { + type: GraphQLString, + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + }, + _contentType: { + type: require('./element.input.js'), + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.', + }, + contentType: { + type: CodeScalar, + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.', + }, + _blob: { + type: require('./element.input.js'), + description: + 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', + }, + blob: { + type: Base64BinaryScalar, + description: + 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/simplequantity.input.js b/src/resources/3_0_1/inputs/simplequantity.input.js index 48024b08..844250ef 100644 --- a/src/resources/3_0_1/inputs/simplequantity.input.js +++ b/src/resources/3_0_1/inputs/simplequantity.input.js @@ -1,14 +1,11 @@ const { GraphQLInputObjectType } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary SimpleQuantity Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'SimpleQuantity_Input', - description: 'A fixed quantity (no comparator).', - fields: () => extendSchema(require('./quantity.input')), + description: 'A fixed quantity (no comparator)', + fields: () => ({}), }); diff --git a/src/resources/3_0_1/inputs/slot.input.js b/src/resources/3_0_1/inputs/slot.input.js index 054faa1d..8bc8bb63 100644 --- a/src/resources/3_0_1/inputs/slot.input.js +++ b/src/resources/3_0_1/inputs/slot.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SlotResourceInputType = new GraphQLEnumType({ - name: 'SlotResourceInputType', - values: { - Slot: { value: 'Slot' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -25,92 +17,150 @@ let SlotResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Slot_Input', - description: 'Base StructureDefinition for Slot Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SlotResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'External Ids for this item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-category - serviceCategory: { - type: require('./codeableconcept.input'), - description: - 'A broad categorisation of the service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-type - serviceType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0276 - appointmentType: { - type: require('./codeableconcept.input'), - description: - 'The style of appointment or patient that may be booked in the slot (not service type).', - }, - schedule: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The schedule resource that this slot defines an interval of status information.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/slotstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', - }, - _status: { - type: require('./element.input'), - description: - 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', - }, - start: { - type: new GraphQLNonNull(InstantScalar), - description: 'Date/Time that the slot is to begin.', - }, - _start: { - type: require('./element.input'), - description: 'Date/Time that the slot is to begin.', - }, - end: { - type: new GraphQLNonNull(InstantScalar), - description: 'Date/Time that the slot is to conclude.', - }, - _end: { - type: require('./element.input'), - description: 'Date/Time that the slot is to conclude.', - }, - overbooked: { - type: GraphQLBoolean, - description: - 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', - }, - _overbooked: { - type: require('./element.input'), - description: - 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', - }, - comment: { - type: GraphQLString, - description: - 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', - }, - _comment: { - type: require('./element.input'), - description: - 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', - }, - }), + description: 'Base StructureDefinition for Slot Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Slot_Enum_input', + values: { Slot: { value: 'Slot' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'External Ids for this item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-category + serviceCategory: { + type: require('./codeableconcept.input.js'), + description: + 'A broad categorisation of the service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-type + serviceType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0276 + appointmentType: { + type: require('./codeableconcept.input.js'), + description: + 'The style of appointment or patient that may be booked in the slot (not service type).', + }, + schedule: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The schedule resource that this slot defines an interval of status information.', + }, + _status: { + type: require('./element.input.js'), + description: + 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/slotstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', + }, + _start: { + type: require('./element.input.js'), + description: 'Date/Time that the slot is to begin.', + }, + start: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to begin.', + }, + _end: { + type: require('./element.input.js'), + description: 'Date/Time that the slot is to conclude.', + }, + end: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to conclude.', + }, + _overbooked: { + type: require('./element.input.js'), + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + overbooked: { + type: GraphQLBoolean, + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/specimen.input.js b/src/resources/3_0_1/inputs/specimen.input.js index dbe829ea..53d10736 100644 --- a/src/resources/3_0_1/inputs/specimen.input.js +++ b/src/resources/3_0_1/inputs/specimen.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 SpecimenResourceInputType = new GraphQLEnumType({ - name: 'SpecimenResourceInputType', - values: { - Specimen: { value: 'Specimen' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,79 +16,135 @@ let SpecimenResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Specimen_Input', - description: 'Base StructureDefinition for Specimen Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SpecimenResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Id for specimen.', - }, - accessionIdentifier: { - type: require('./identifier.input'), - description: - 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-status - status: { - type: CodeScalar, - description: 'The availability of the specimen.', - }, - _status: { - type: require('./element.input'), - description: 'The availability of the specimen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0487 - type: { - type: require('./codeableconcept.input'), - description: 'The kind of material that forms the specimen.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', - }, - receivedTime: { - type: DateTimeScalar, - description: - 'Time when specimen was received for processing or testing.', - }, - _receivedTime: { - type: require('./element.input'), - description: - 'Time when specimen was received for processing or testing.', - }, - parent: { - type: new GraphQLList(require('./reference.input')), - description: - 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', - }, - request: { - type: new GraphQLList(require('./reference.input')), - description: - 'Details concerning a test or procedure request that required a specimen to be collected.', - }, - collection: { - type: require('./specimencollection.input'), - description: 'Details concerning the specimen collection.', - }, - processing: { - type: new GraphQLList(require('./specimenprocessing.input')), - description: - 'Details concerning processing and processing steps for the specimen.', - }, - container: { - type: new GraphQLList(require('./specimencontainer.input')), - description: - 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).', - }, - }), + description: 'Base StructureDefinition for Specimen Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Specimen_Enum_input', + values: { Specimen: { value: 'Specimen' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'Id for specimen.', + }, + accessionIdentifier: { + type: require('./identifier.input.js'), + description: + 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', + }, + _status: { + type: require('./element.input.js'), + description: 'The availability of the specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-status + status: { + type: CodeScalar, + description: 'The availability of the specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0487 + type: { + type: require('./codeableconcept.input.js'), + description: 'The kind of material that forms the specimen.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', + }, + _receivedTime: { + type: require('./element.input.js'), + description: 'Time when specimen was received for processing or testing.', + }, + receivedTime: { + type: DateTimeScalar, + description: 'Time when specimen was received for processing or testing.', + }, + parent: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + }, + request: { + type: new GraphQLList(GraphQLString), + description: + 'Details concerning a test or procedure request that required a specimen to be collected.', + }, + collection: { + type: require('./specimencollection.input.js'), + description: 'Details concerning the specimen collection.', + }, + processing: { + type: new GraphQLList(require('./specimenprocessing.input.js')), + description: + 'Details concerning processing and processing steps for the specimen.', + }, + container: { + type: new GraphQLList(require('./specimencontainer.input.js')), + description: + 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/specimencollection.input.js b/src/resources/3_0_1/inputs/specimencollection.input.js index 98b82f64..670d6aab 100644 --- a/src/resources/3_0_1/inputs/specimencollection.input.js +++ b/src/resources/3_0_1/inputs/specimencollection.input.js @@ -1,53 +1,73 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Specimen.collection Input Schema + * @summary Specimencollection Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SpecimenCollection_Input', - description: 'Details concerning the specimen collection.', - fields: () => - extendSchema(require('./backboneelement.input'), { - collector: { - type: require('./reference.input'), - description: 'Person who collected the specimen.', - }, - collectedDateTime: { - type: DateTimeScalar, - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - _collectedDateTime: { - type: require('./element.input'), - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - collectedPeriod: { - type: require('./period.input'), - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - quantity: { - type: require('./quantity.input'), - description: - 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-collection-method - method: { - type: require('./codeableconcept.input'), - description: - 'A coded value specifying the technique that is used to perform the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.input'), - description: - 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', - }, - }), + name: 'Specimencollection_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + collector: { + type: GraphQLString, + description: 'Person who collected the specimen.', + }, + _collectedDateTime: { + type: require('./element.input.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedDateTime: { + type: DateTimeScalar, + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedPeriod: { + type: require('./period.input.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-collection-method + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value specifying the technique that is used to perform the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.input.js'), + description: + 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/specimencontainer.input.js b/src/resources/3_0_1/inputs/specimencontainer.input.js index 1fa84663..5cfb14d9 100644 --- a/src/resources/3_0_1/inputs/specimencontainer.input.js +++ b/src/resources/3_0_1/inputs/specimencontainer.input.js @@ -1,62 +1,77 @@ const { - GraphQLInputObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Specimen.container Input Schema + * @summary Specimencontainer Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SpecimenContainer_Input', - description: - 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", - }, - description: { - type: GraphQLString, - description: 'Textual description of the container.', - }, - _description: { - type: require('./element.input'), - description: 'Textual description of the container.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-container-type - type: { - type: require('./codeableconcept.input'), - description: - 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', - }, - capacity: { - type: require('./quantity.input'), - description: - 'The capacity (volume or other measure) the container may contain.', - }, - specimenQuantity: { - type: require('./quantity.input'), - description: - 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 - additiveCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 - additiveReference: { - type: require('./reference.input'), - description: - 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', - }, - }), + name: 'Specimencontainer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: + "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", + }, + _description: { + type: require('./element.input.js'), + description: 'Textual description of the container.', + }, + description: { + type: GraphQLString, + description: 'Textual description of the container.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-container-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', + }, + capacity: { + type: require('./quantity.input.js'), + description: + 'The capacity (volume or other measure) the container may contain.', + }, + specimenQuantity: { + type: require('./quantity.input.js'), + description: + 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 + additiveCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 + additiveReference: { + type: GraphQLString, + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/specimenprocessing.input.js b/src/resources/3_0_1/inputs/specimenprocessing.input.js index b9903aee..a59a8797 100644 --- a/src/resources/3_0_1/inputs/specimenprocessing.input.js +++ b/src/resources/3_0_1/inputs/specimenprocessing.input.js @@ -1,55 +1,70 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Specimen.processing Input Schema + * @summary Specimenprocessing Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SpecimenProcessing_Input', - description: - 'Details concerning processing and processing steps for the specimen.', - fields: () => - extendSchema(require('./backboneelement.input'), { - description: { - type: GraphQLString, - description: 'Textual description of procedure.', - }, - _description: { - type: require('./element.input'), - description: 'Textual description of procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-processing-procedure - procedure: { - type: require('./codeableconcept.input'), - description: - 'A coded value specifying the procedure used to process the specimen.', - }, - additive: { - type: new GraphQLList(require('./reference.input')), - description: 'Material used in the processing step.', - }, - timeDateTime: { - type: DateTimeScalar, - description: - 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', - }, - _timeDateTime: { - type: require('./element.input'), - description: - 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', - }, - timePeriod: { - type: require('./period.input'), - description: - 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', - }, - }), + name: 'Specimenprocessing_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _description: { + type: require('./element.input.js'), + description: 'Textual description of procedure.', + }, + description: { + type: GraphQLString, + description: 'Textual description of procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-processing-procedure + procedure: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value specifying the procedure used to process the specimen.', + }, + additive: { + type: new GraphQLList(GraphQLString), + description: 'Material used in the processing step.', + }, + _timeDateTime: { + type: require('./element.input.js'), + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + timeDateTime: { + type: DateTimeScalar, + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + timePeriod: { + type: require('./period.input.js'), + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuredefinition.input.js b/src/resources/3_0_1/inputs/structuredefinition.input.js index d7c7239b..71b7b28e 100644 --- a/src/resources/3_0_1/inputs/structuredefinition.input.js +++ b/src/resources/3_0_1/inputs/structuredefinition.input.js @@ -1,25 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let StructureDefinitionResourceInputType = new GraphQLEnumType({ - name: 'StructureDefinitionResourceInputType', - values: { - StructureDefinition: { value: 'StructureDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -27,256 +17,314 @@ let StructureDefinitionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'StructureDefinition_Input', - description: 'Base StructureDefinition for StructureDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(StructureDefinitionResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. The URL SHOULD include the major version of the structure definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. The URL SHOULD include the major version of the structure definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the structure definition.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the structure definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this structure definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this structure definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the structure definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the structure definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the structure definition.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the structure definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the structure definition from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the structure definition from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate structure definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the structure definition is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this structure definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this structure definition is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/profile-code - keyword: { - type: new GraphQLList(require('./coding.input')), - description: - 'A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates.', - }, - fhirVersion: { - type: IdScalar, - description: - 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', - }, - _fhirVersion: { - type: require('./element.input'), - description: - 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', - }, - mapping: { - type: new GraphQLList(require('./structuredefinitionmapping.input')), - description: 'An external specification that the content is mapped to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/structure-definition-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Defines the kind of structure that this definition is describing.', - }, - _kind: { - type: require('./element.input'), - description: - 'Defines the kind of structure that this definition is describing.', - }, - abstract: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', - }, - _abstract: { - type: require('./element.input'), - description: - 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/extension-context - contextType: { - type: CodeScalar, - description: - 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', - }, - _contextType: { - type: require('./element.input'), - description: - 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', - }, - context: { - type: new GraphQLList(GraphQLString), - description: - 'Identifies the types of resource or data type elements to which the extension can be applied.', - }, - _context: { - type: require('./element.input'), - description: - 'Identifies the types of resource or data type elements to which the extension can be applied.', - }, - contextInvariant: { - type: new GraphQLList(GraphQLString), - description: - 'A set of rules as Fluent Invariants about when the extension can be used (e.g. co-occurrence variants for the extension).', - }, - _contextInvariant: { - type: require('./element.input'), - description: - 'A set of rules as Fluent Invariants about when the extension can be used (e.g. co-occurrence variants for the extension).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: - "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).", - }, - _type: { - type: require('./element.input'), - description: - "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).", - }, - baseDefinition: { - type: UriScalar, - description: - 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', - }, - _baseDefinition: { - type: require('./element.input'), - description: - 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/type-derivation-rule - derivation: { - type: CodeScalar, - description: 'How the type relates to the baseDefinition.', - }, - _derivation: { - type: require('./element.input'), - description: 'How the type relates to the baseDefinition.', - }, - snapshot: { - type: require('./structuredefinitionsnapshot.input'), - description: - 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', - }, - differential: { - type: require('./structuredefinitiondifferential.input'), - description: - 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', - }, - }), + description: 'Base StructureDefinition for StructureDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureDefinition_Enum_input', + values: { StructureDefinition: { value: 'StructureDefinition' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. The URL SHOULD include the major version of the structure definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. The URL SHOULD include the major version of the structure definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the structure definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the structure definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this structure definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this structure definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the structure definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the structure definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the structure definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the structure definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the structure definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the structure definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate structure definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the structure definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this structure definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this structure definition is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/profile-code + keyword: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', + }, + fhirVersion: { + type: IdScalar, + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', + }, + mapping: { + type: new GraphQLList(require('./structuredefinitionmapping.input.js')), + description: 'An external specification that the content is mapped to.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'Defines the kind of structure that this definition is describing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/structure-definition-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines the kind of structure that this definition is describing.', + }, + _abstract: { + type: require('./element.input.js'), + description: + 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', + }, + abstract: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', + }, + _contextType: { + type: require('./element.input.js'), + description: + 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/extension-context + contextType: { + type: CodeScalar, + description: + 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', + }, + _context: { + type: require('./element.input.js'), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + context: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + _contextInvariant: { + type: require('./element.input.js'), + description: + 'A set of rules as Fluent Invariants about when the extension can be used (e.g. co-occurrence variants for the extension).', + }, + contextInvariant: { + type: new GraphQLList(GraphQLString), + description: + 'A set of rules as Fluent Invariants about when the extension can be used (e.g. co-occurrence variants for the extension).', + }, + _type: { + type: require('./element.input.js'), + description: + "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).", + }, + _baseDefinition: { + type: require('./element.input.js'), + description: + 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', + }, + baseDefinition: { + type: UriScalar, + description: + 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', + }, + _derivation: { + type: require('./element.input.js'), + description: 'How the type relates to the baseDefinition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/type-derivation-rule + derivation: { + type: CodeScalar, + description: 'How the type relates to the baseDefinition.', + }, + snapshot: { + type: require('./structuredefinitionsnapshot.input.js'), + description: + 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', + }, + differential: { + type: require('./structuredefinitiondifferential.input.js'), + description: + 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuredefinitiondifferential.input.js b/src/resources/3_0_1/inputs/structuredefinitiondifferential.input.js index 306f2cf7..943b0b0f 100644 --- a/src/resources/3_0_1/inputs/structuredefinitiondifferential.input.js +++ b/src/resources/3_0_1/inputs/structuredefinitiondifferential.input.js @@ -1,28 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary StructureDefinition.differential Input Schema + * @summary StructureDefinitiondifferential Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureDefinitionDifferential_Input', - description: - 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', - fields: () => - extendSchema(require('./backboneelement.input'), { - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.input')), - ), - description: - 'Captures constraints on each element within the resource.', - }, - }), + name: 'StructureDefinitiondifferential_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.input.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuredefinitionmapping.input.js b/src/resources/3_0_1/inputs/structuredefinitionmapping.input.js index cb2590a2..d612197a 100644 --- a/src/resources/3_0_1/inputs/structuredefinitionmapping.input.js +++ b/src/resources/3_0_1/inputs/structuredefinitionmapping.input.js @@ -1,60 +1,77 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary StructureDefinition.mapping Input Schema + * @summary StructureDefinitionmapping Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureDefinitionMapping_Input', - description: 'An external specification that the content is mapped to.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: - 'An Internal id that is used to identify this mapping set when specific mappings are made.', - }, - _identity: { - type: require('./element.input'), - description: - 'An Internal id that is used to identify this mapping set when specific mappings are made.', - }, - uri: { - type: UriScalar, - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - _uri: { - type: require('./element.input'), - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - name: { - type: GraphQLString, - description: 'A name for the specification that is being mapped to.', - }, - _name: { - type: require('./element.input'), - description: 'A name for the specification that is being mapped to.', - }, - comment: { - type: GraphQLString, - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - _comment: { - type: require('./element.input'), - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - }), + name: 'StructureDefinitionmapping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _identity: { + type: require('./element.input.js'), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comment: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuredefinitionsnapshot.input.js b/src/resources/3_0_1/inputs/structuredefinitionsnapshot.input.js index 111edb05..ce5f1ad1 100644 --- a/src/resources/3_0_1/inputs/structuredefinitionsnapshot.input.js +++ b/src/resources/3_0_1/inputs/structuredefinitionsnapshot.input.js @@ -1,28 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary StructureDefinition.snapshot Input Schema + * @summary StructureDefinitionsnapshot Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureDefinitionSnapshot_Input', - description: - 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', - fields: () => - extendSchema(require('./backboneelement.input'), { - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.input')), - ), - description: - 'Captures constraints on each element within the resource.', - }, - }), + name: 'StructureDefinitionsnapshot_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.input.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremap.input.js b/src/resources/3_0_1/inputs/structuremap.input.js index a0d99f03..9461081d 100644 --- a/src/resources/3_0_1/inputs/structuremap.input.js +++ b/src/resources/3_0_1/inputs/structuremap.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let StructureMapResourceInputType = new GraphQLEnumType({ - name: 'StructureMapResourceInputType', - values: { - StructureMap: { value: 'StructureMap' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,164 +17,222 @@ let StructureMapResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'StructureMap_Input', - description: 'Base StructureDefinition for StructureMap Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(StructureMapResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the structure map.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the structure map.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this structure map. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this structure map. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the structure map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the structure map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the structure map.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the structure map.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the structure map from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the structure map from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate structure map instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the structure map is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this structure map is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this structure map is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', - }, - structure: { - type: new GraphQLList(require('./structuremapstructure.input')), - description: - 'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.', - }, - import: { - type: new GraphQLList(UriScalar), - description: 'Other maps used by this map (canonical URLs).', - }, - _import: { - type: require('./element.input'), - description: 'Other maps used by this map (canonical URLs).', - }, - group: { - type: new GraphQLList( - new GraphQLNonNull(require('./structuremapgroup.input')), - ), - description: - 'Organizes the mapping into managable chunks for human review/ease of maintenance.', - }, - }), + description: 'Base StructureDefinition for StructureMap Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureMap_Enum_input', + values: { StructureMap: { value: 'StructureMap' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the structure map.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the structure map.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this structure map. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this structure map. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the structure map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the structure map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the structure map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the structure map.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the structure map from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the structure map from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate structure map instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the structure map is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this structure map is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this structure map is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', + }, + structure: { + type: new GraphQLList(require('./structuremapstructure.input.js')), + description: + 'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.', + }, + _import: { + type: require('./element.input.js'), + description: 'Other maps used by this map (canonical URLs).', + }, + import: { + type: new GraphQLList(UriScalar), + description: 'Other maps used by this map (canonical URLs).', + }, + group: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgroup.input.js')), + ), + description: + 'Organizes the mapping into managable chunks for human review/ease of maintenance.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremapgroup.input.js b/src/resources/3_0_1/inputs/structuremapgroup.input.js index c172a097..842bc7ca 100644 --- a/src/resources/3_0_1/inputs/structuremapgroup.input.js +++ b/src/resources/3_0_1/inputs/structuremapgroup.input.js @@ -1,76 +1,91 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary StructureMap.group Input Schema + * @summary StructureMapgroup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureMapGroup_Input', - description: - 'Organizes the mapping into managable chunks for human review/ease of maintenance.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(IdScalar), - description: - 'A unique name for the group for the convenience of human readers.', - }, - _name: { - type: require('./element.input'), - description: - 'A unique name for the group for the convenience of human readers.', - }, - extends: { - type: IdScalar, - description: 'Another group that this group adds rules to.', - }, - _extends: { - type: require('./element.input'), - description: 'Another group that this group adds rules to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-group-type-mode - typeMode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'If this is the default rule set to apply for thie source type, or this combination of types.', - }, - _typeMode: { - type: require('./element.input'), - description: - 'If this is the default rule set to apply for thie source type, or this combination of types.', - }, - documentation: { - type: GraphQLString, - description: - 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', - }, - _documentation: { - type: require('./element.input'), - description: - 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', - }, - input: { - type: new GraphQLList( - new GraphQLNonNull(require('./structuremapgroupinput.input')), - ), - description: - 'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.', - }, - rule: { - type: new GraphQLList( - new GraphQLNonNull(require('./structuremapgrouprule.input')), - ), - description: 'Transform Rule from source to target.', - }, - }), + name: 'StructureMapgroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A unique name for the group for the convenience of human readers.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: + 'A unique name for the group for the convenience of human readers.', + }, + _extends: { + type: require('./element.input.js'), + description: 'Another group that this group adds rules to.', + }, + extends: { + type: IdScalar, + description: 'Another group that this group adds rules to.', + }, + _typeMode: { + type: require('./element.input.js'), + description: + 'If this is the default rule set to apply for thie source type, or this combination of types.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-group-type-mode + typeMode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'If this is the default rule set to apply for thie source type, or this combination of types.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', + }, + input: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgroupinput.input.js')), + ), + description: + 'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.', + }, + rule: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgrouprule.input.js')), + ), + description: 'Transform Rule from source to target.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremapgroupinput.input.js b/src/resources/3_0_1/inputs/structuremapgroupinput.input.js index 11d01e09..0a55223c 100644 --- a/src/resources/3_0_1/inputs/structuremapgroupinput.input.js +++ b/src/resources/3_0_1/inputs/structuremapgroupinput.input.js @@ -1,56 +1,72 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary StructureMap.group.input Input Schema + * @summary StructureMapgroupinput Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureMapGroupInput_Input', - description: - 'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(IdScalar), - description: 'Name for this instance of data.', - }, - _name: { - type: require('./element.input'), - description: 'Name for this instance of data.', - }, - type: { - type: GraphQLString, - description: 'Type for this instance of data.', - }, - _type: { - type: require('./element.input'), - description: 'Type for this instance of data.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-input-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: 'Mode for this instance of data.', - }, - _mode: { - type: require('./element.input'), - description: 'Mode for this instance of data.', - }, - documentation: { - type: GraphQLString, - description: 'Documentation for this instance of data.', - }, - _documentation: { - type: require('./element.input'), - description: 'Documentation for this instance of data.', - }, - }), + name: 'StructureMapgroupinput_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Name for this instance of data.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name for this instance of data.', + }, + _type: { + type: require('./element.input.js'), + description: 'Type for this instance of data.', + }, + type: { + type: GraphQLString, + description: 'Type for this instance of data.', + }, + _mode: { + type: require('./element.input.js'), + description: 'Mode for this instance of data.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-input-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'Mode for this instance of data.', + }, + _documentation: { + type: require('./element.input.js'), + description: 'Documentation for this instance of data.', + }, + documentation: { + type: GraphQLString, + description: 'Documentation for this instance of data.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremapgrouprule.input.js b/src/resources/3_0_1/inputs/structuremapgrouprule.input.js index 9f43b5ec..9b742181 100644 --- a/src/resources/3_0_1/inputs/structuremapgrouprule.input.js +++ b/src/resources/3_0_1/inputs/structuremapgrouprule.input.js @@ -1,54 +1,70 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule Input Schema + * @summary StructureMapgrouprule Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureMapGroupRule_Input', - description: 'Transform Rule from source to target.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(IdScalar), - description: 'Name of the rule for internal references.', - }, - _name: { - type: require('./element.input'), - description: 'Name of the rule for internal references.', - }, - source: { - type: new GraphQLList( - new GraphQLNonNull(require('./structuremapgrouprulesource.input')), - ), - description: 'Source inputs to the mapping.', - }, - target: { - type: new GraphQLList(require('./structuremapgroupruletarget.input')), - description: 'Content to create because of this mapping rule.', - }, - dependent: { - type: new GraphQLList( - require('./structuremapgroupruledependent.input'), - ), - description: 'Which other rules to apply in the context of this rule.', - }, - documentation: { - type: GraphQLString, - description: 'Documentation for this instance of data.', - }, - _documentation: { - type: require('./element.input'), - description: 'Documentation for this instance of data.', - }, - }), + name: 'StructureMapgrouprule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Name of the rule for internal references.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name of the rule for internal references.', + }, + source: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgrouprulesource.input.js')), + ), + description: 'Source inputs to the mapping.', + }, + target: { + type: new GraphQLList(require('./structuremapgroupruletarget.input.js')), + description: 'Content to create because of this mapping rule.', + }, + dependent: { + type: new GraphQLList( + require('./structuremapgroupruledependent.input.js'), + ), + description: 'Which other rules to apply in the context of this rule.', + }, + _documentation: { + type: require('./element.input.js'), + description: 'Documentation for this instance of data.', + }, + documentation: { + type: GraphQLString, + description: 'Documentation for this instance of data.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremapgroupruledependent.input.js b/src/resources/3_0_1/inputs/structuremapgroupruledependent.input.js index d67a6c44..c907325a 100644 --- a/src/resources/3_0_1/inputs/structuremapgroupruledependent.input.js +++ b/src/resources/3_0_1/inputs/structuremapgroupruledependent.input.js @@ -1,38 +1,54 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule.dependent Input Schema + * @summary StructureMapgroupruledependent Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureMapGroupRuleDependent_Input', - description: 'Which other rules to apply in the context of this rule.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(IdScalar), - description: 'Name of a rule or group to apply.', - }, - _name: { - type: require('./element.input'), - description: 'Name of a rule or group to apply.', - }, - variable: { - type: new GraphQLList(new GraphQLNonNull(GraphQLString)), - description: 'Variable to pass to the rule or group.', - }, - _variable: { - type: require('./element.input'), - description: 'Variable to pass to the rule or group.', - }, - }), + name: 'StructureMapgroupruledependent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Name of a rule or group to apply.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name of a rule or group to apply.', + }, + _variable: { + type: require('./element.input.js'), + description: 'Variable to pass to the rule or group.', + }, + variable: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: 'Variable to pass to the rule or group.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremapgrouprulesource.input.js b/src/resources/3_0_1/inputs/structuremapgrouprulesource.input.js index 8f2dd085..72320817 100644 --- a/src/resources/3_0_1/inputs/structuremapgrouprulesource.input.js +++ b/src/resources/3_0_1/inputs/structuremapgrouprulesource.input.js @@ -1,387 +1,404 @@ -const IdScalar = require('../scalars/id.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLString, GraphQLBoolean, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule.source Input Schema + * @summary StructureMapgrouprulesource Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureMapGroupRuleSource_Input', - description: 'Source inputs to the mapping.', - fields: () => - extendSchema(require('./backboneelement.input'), { - context: { - type: new GraphQLNonNull(IdScalar), - description: 'Type or variable this rule applies to.', - }, - _context: { - type: require('./element.input'), - description: 'Type or variable this rule applies to.', - }, - min: { - type: GraphQLInt, - description: - 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', - }, - _min: { - type: require('./element.input'), - description: - 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', - }, - max: { - type: GraphQLString, - description: - "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", - }, - _max: { - type: require('./element.input'), - description: - "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", - }, - type: { - type: GraphQLString, - description: - 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', - }, - _type: { - type: require('./element.input'), - description: - 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', - }, - defaultValueBase64Binary: { - type: Base64BinaryScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueBase64Binary: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueBoolean: { - type: GraphQLBoolean, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueBoolean: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueCode: { - type: CodeScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueCode: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDate: { - type: DateScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueDate: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDateTime: { - type: DateTimeScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueDateTime: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDecimal: { - type: GraphQLFloat, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueDecimal: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueId: { - type: IdScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueId: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueInstant: { - type: InstantScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueInstant: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueInteger: { - type: GraphQLInt, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueInteger: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueMarkdown: { - type: GraphQLString, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueMarkdown: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueOid: { - type: OidScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueOid: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValuePositiveInt: { - type: PositiveIntScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValuePositiveInt: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueString: { - type: GraphQLString, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueString: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueTime: { - type: TimeScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueTime: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueUnsignedInt: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueUri: { - type: UriScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueUri: { - type: require('./element.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueAddress: { - type: require('./address.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueAge: { - type: require('./age.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueAnnotation: { - type: require('./annotation.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueAttachment: { - type: require('./attachment.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueCoding: { - type: require('./coding.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueContactPoint: { - type: require('./contactpoint.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueCount: { - type: require('./count.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDistance: { - type: require('./distance.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDuration: { - type: require('./duration.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueHumanName: { - type: require('./humanname.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueIdentifier: { - type: require('./identifier.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueMoney: { - type: require('./money.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValuePeriod: { - type: require('./period.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueQuantity: { - type: require('./quantity.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueRange: { - type: require('./range.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueRatio: { - type: require('./ratio.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueReference: { - type: require('./reference.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueSampledData: { - type: require('./sampleddata.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueSignature: { - type: require('./signature.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueTiming: { - type: require('./timing.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueMeta: { - type: require('./meta.input'), - description: - 'A value to use if there is no existing value in the source object.', - }, - element: { - type: GraphQLString, - description: 'Optional field for this source.', - }, - _element: { - type: require('./element.input'), - description: 'Optional field for this source.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-source-list-mode - listMode: { - type: CodeScalar, - description: 'How to handle the list mode for this element.', - }, - _listMode: { - type: require('./element.input'), - description: 'How to handle the list mode for this element.', - }, - variable: { - type: IdScalar, - description: 'Named context for field, if a field is specified.', - }, - _variable: { - type: require('./element.input'), - description: 'Named context for field, if a field is specified.', - }, - condition: { - type: GraphQLString, - description: - 'FHIRPath expression - must be true or the rule does not apply.', - }, - _condition: { - type: require('./element.input'), - description: - 'FHIRPath expression - must be true or the rule does not apply.', - }, - check: { - type: GraphQLString, - description: - 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', - }, - _check: { - type: require('./element.input'), - description: - 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', - }, - }), + name: 'StructureMapgrouprulesource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _context: { + type: require('./element.input.js'), + description: 'Type or variable this rule applies to.', + }, + context: { + type: new GraphQLNonNull(IdScalar), + description: 'Type or variable this rule applies to.', + }, + _min: { + type: require('./element.input.js'), + description: + 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', + }, + min: { + type: GraphQLInt, + description: + 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', + }, + _max: { + type: require('./element.input.js'), + description: + "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", + }, + max: { + type: GraphQLString, + description: + "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", + }, + _type: { + type: require('./element.input.js'), + description: + 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', + }, + type: { + type: GraphQLString, + description: + 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', + }, + _defaultValueBase64Binary: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueBoolean: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueCode: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCode: { + type: CodeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDate: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDate: { + type: DateScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDateTime: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDecimal: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueId: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueId: { + type: IdScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueInstant: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueInstant: { + type: InstantScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueInteger: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueInteger: { + type: GraphQLInt, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueMarkdown: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueOid: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueOid: { + type: OidScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValuePositiveInt: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueString: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueString: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueTime: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTime: { + type: TimeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUnsignedInt: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUri: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUri: { + type: UriScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAddress: { + type: require('./address.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAge: { + type: require('./age.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAnnotation: { + type: require('./annotation.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAttachment: { + type: require('./attachment.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCoding: { + type: require('./coding.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCount: { + type: require('./count.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDistance: { + type: require('./distance.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDuration: { + type: require('./duration.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueHumanName: { + type: require('./humanname.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueIdentifier: { + type: require('./identifier.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMoney: { + type: require('./money.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValuePeriod: { + type: require('./period.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueQuantity: { + type: require('./quantity.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRange: { + type: require('./range.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRatio: { + type: require('./ratio.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueReference: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueSignature: { + type: require('./signature.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTiming: { + type: require('./timing.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMeta: { + type: require('./meta.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + _element: { + type: require('./element.input.js'), + description: 'Optional field for this source.', + }, + element: { + type: GraphQLString, + description: 'Optional field for this source.', + }, + _listMode: { + type: require('./element.input.js'), + description: 'How to handle the list mode for this element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-source-list-mode + listMode: { + type: CodeScalar, + description: 'How to handle the list mode for this element.', + }, + _variable: { + type: require('./element.input.js'), + description: 'Named context for field, if a field is specified.', + }, + variable: { + type: IdScalar, + description: 'Named context for field, if a field is specified.', + }, + _condition: { + type: require('./element.input.js'), + description: + 'FHIRPath expression - must be true or the rule does not apply.', + }, + condition: { + type: GraphQLString, + description: + 'FHIRPath expression - must be true or the rule does not apply.', + }, + _check: { + type: require('./element.input.js'), + description: + 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', + }, + check: { + type: GraphQLString, + description: + 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremapgroupruletarget.input.js b/src/resources/3_0_1/inputs/structuremapgroupruletarget.input.js index fe6a9b0d..b8ee978f 100644 --- a/src/resources/3_0_1/inputs/structuremapgroupruletarget.input.js +++ b/src/resources/3_0_1/inputs/structuremapgroupruletarget.input.js @@ -1,89 +1,105 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule.target Input Schema + * @summary StructureMapgroupruletarget Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureMapGroupRuleTarget_Input', - description: 'Content to create because of this mapping rule.', - fields: () => - extendSchema(require('./backboneelement.input'), { - context: { - type: IdScalar, - description: 'Type or variable this rule applies to.', - }, - _context: { - type: require('./element.input'), - description: 'Type or variable this rule applies to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-context-type - contextType: { - type: CodeScalar, - description: 'How to interpret the context.', - }, - _contextType: { - type: require('./element.input'), - description: 'How to interpret the context.', - }, - element: { - type: GraphQLString, - description: 'Field to create in the context.', - }, - _element: { - type: require('./element.input'), - description: 'Field to create in the context.', - }, - variable: { - type: IdScalar, - description: - 'Named context for field, if desired, and a field is specified.', - }, - _variable: { - type: require('./element.input'), - description: - 'Named context for field, if desired, and a field is specified.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-target-list-mode - listMode: { - type: new GraphQLList(CodeScalar), - description: 'If field is a list, how to manage the list.', - }, - _listMode: { - type: require('./element.input'), - description: 'If field is a list, how to manage the list.', - }, - listRuleId: { - type: IdScalar, - description: 'Internal rule reference for shared list items.', - }, - _listRuleId: { - type: require('./element.input'), - description: 'Internal rule reference for shared list items.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-transform - transform: { - type: CodeScalar, - description: 'How the data is copied / created.', - }, - _transform: { - type: require('./element.input'), - description: 'How the data is copied / created.', - }, - parameter: { - type: new GraphQLList( - require('./structuremapgroupruletargetparameter.input'), - ), - description: 'Parameters to the transform.', - }, - }), + name: 'StructureMapgroupruletarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _context: { + type: require('./element.input.js'), + description: 'Type or variable this rule applies to.', + }, + context: { + type: IdScalar, + description: 'Type or variable this rule applies to.', + }, + _contextType: { + type: require('./element.input.js'), + description: 'How to interpret the context.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-context-type + contextType: { + type: CodeScalar, + description: 'How to interpret the context.', + }, + _element: { + type: require('./element.input.js'), + description: 'Field to create in the context.', + }, + element: { + type: GraphQLString, + description: 'Field to create in the context.', + }, + _variable: { + type: require('./element.input.js'), + description: + 'Named context for field, if desired, and a field is specified.', + }, + variable: { + type: IdScalar, + description: + 'Named context for field, if desired, and a field is specified.', + }, + _listMode: { + type: require('./element.input.js'), + description: 'If field is a list, how to manage the list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-target-list-mode + listMode: { + type: new GraphQLList(CodeScalar), + description: 'If field is a list, how to manage the list.', + }, + _listRuleId: { + type: require('./element.input.js'), + description: 'Internal rule reference for shared list items.', + }, + listRuleId: { + type: IdScalar, + description: 'Internal rule reference for shared list items.', + }, + _transform: { + type: require('./element.input.js'), + description: 'How the data is copied / created.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-transform + transform: { + type: CodeScalar, + description: 'How the data is copied / created.', + }, + parameter: { + type: new GraphQLList( + require('./structuremapgroupruletargetparameter.input.js'), + ), + description: 'Parameters to the transform.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremapgroupruletargetparameter.input.js b/src/resources/3_0_1/inputs/structuremapgroupruletargetparameter.input.js index 41efb0b5..70deac01 100644 --- a/src/resources/3_0_1/inputs/structuremapgroupruletargetparameter.input.js +++ b/src/resources/3_0_1/inputs/structuremapgroupruletargetparameter.input.js @@ -1,64 +1,81 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule.target.parameter Input Schema + * @summary StructureMapgroupruletargetparameter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureMapGroupRuleTargetParameter_Input', - description: 'Parameters to the transform.', - fields: () => - extendSchema(require('./backboneelement.input'), { - valueId: { - type: new GraphQLNonNull(IdScalar), - description: 'Parameter value - variable or literal.', - }, - _valueId: { - type: require('./element.input'), - description: 'Parameter value - variable or literal.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: 'Parameter value - variable or literal.', - }, - _valueString: { - type: require('./element.input'), - description: 'Parameter value - variable or literal.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'Parameter value - variable or literal.', - }, - _valueBoolean: { - type: require('./element.input'), - description: 'Parameter value - variable or literal.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: 'Parameter value - variable or literal.', - }, - _valueInteger: { - type: require('./element.input'), - description: 'Parameter value - variable or literal.', - }, - valueDecimal: { - type: new GraphQLNonNull(GraphQLFloat), - description: 'Parameter value - variable or literal.', - }, - _valueDecimal: { - type: require('./element.input'), - description: 'Parameter value - variable or literal.', - }, - }), + name: 'StructureMapgroupruletargetparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _valueId: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'Parameter value - variable or literal.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'Parameter value - variable or literal.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Parameter value - variable or literal.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'Parameter value - variable or literal.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'Parameter value - variable or literal.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/structuremapstructure.input.js b/src/resources/3_0_1/inputs/structuremapstructure.input.js index 43352504..0d91e2f2 100644 --- a/src/resources/3_0_1/inputs/structuremapstructure.input.js +++ b/src/resources/3_0_1/inputs/structuremapstructure.input.js @@ -1,58 +1,74 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary StructureMap.structure Input Schema + * @summary StructureMapstructure Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'StructureMapStructure_Input', - description: - 'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.', - fields: () => - extendSchema(require('./backboneelement.input'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: 'The canonical URL that identifies the structure.', - }, - _url: { - type: require('./element.input'), - description: 'The canonical URL that identifies the structure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-model-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: 'How the referenced structure is used in this mapping.', - }, - _mode: { - type: require('./element.input'), - description: 'How the referenced structure is used in this mapping.', - }, - alias: { - type: GraphQLString, - description: 'The name used for this type in the map.', - }, - _alias: { - type: require('./element.input'), - description: 'The name used for this type in the map.', - }, - documentation: { - type: GraphQLString, - description: - 'Documentation that describes how the structure is used in the mapping.', - }, - _documentation: { - type: require('./element.input'), - description: - 'Documentation that describes how the structure is used in the mapping.', - }, - }), + name: 'StructureMapstructure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _url: { + type: require('./element.input.js'), + description: 'The canonical URL that identifies the structure.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'The canonical URL that identifies the structure.', + }, + _mode: { + type: require('./element.input.js'), + description: 'How the referenced structure is used in this mapping.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-model-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the referenced structure is used in this mapping.', + }, + _alias: { + type: require('./element.input.js'), + description: 'The name used for this type in the map.', + }, + alias: { + type: GraphQLString, + description: 'The name used for this type in the map.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Documentation that describes how the structure is used in the mapping.', + }, + documentation: { + type: GraphQLString, + description: + 'Documentation that describes how the structure is used in the mapping.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/subscription.input.js b/src/resources/3_0_1/inputs/subscription.input.js index dc50d19f..460ebfc9 100644 --- a/src/resources/3_0_1/inputs/subscription.input.js +++ b/src/resources/3_0_1/inputs/subscription.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.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 SubscriptionResourceInputType = new GraphQLEnumType({ - name: 'SubscriptionResourceInputType', - values: { - Subscription: { value: 'Subscription' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,75 +16,133 @@ let SubscriptionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Subscription_Input', - description: 'Base StructureDefinition for Subscription Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SubscriptionResourceInputType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the subscription, which marks the server state for managing the subscription.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of the subscription, which marks the server state for managing the subscription.', - }, - contact: { - type: new GraphQLList(require('./contactpoint.input')), - description: - 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', - }, - end: { - type: InstantScalar, - description: 'The time for the server to turn the subscription off.', - }, - _end: { - type: require('./element.input'), - description: 'The time for the server to turn the subscription off.', - }, - reason: { - type: new GraphQLNonNull(GraphQLString), - description: 'A description of why this subscription is defined.', - }, - _reason: { - type: require('./element.input'), - description: 'A description of why this subscription is defined.', - }, - criteria: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The rules that the server should use to determine when to generate notifications for this subscription.', - }, - _criteria: { - type: require('./element.input'), - description: - 'The rules that the server should use to determine when to generate notifications for this subscription.', - }, - error: { - type: GraphQLString, - description: - 'A record of the last error that occurred when the server processed a notification.', - }, - _error: { - type: require('./element.input'), - description: - 'A record of the last error that occurred when the server processed a notification.', - }, - channel: { - type: new GraphQLNonNull(require('./subscriptionchannel.input')), - description: - 'Details where to send notifications when resources are received that meet the criteria.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-tag - tag: { - type: new GraphQLList(require('./coding.input')), - description: - 'A tag to add to any resource that matches the criteria, after the subscription is processed.', - }, - }), + description: 'Base StructureDefinition for Subscription Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Subscription_Enum_input', + values: { Subscription: { value: 'Subscription' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + _end: { + type: require('./element.input.js'), + description: 'The time for the server to turn the subscription off.', + }, + end: { + type: InstantScalar, + description: 'The time for the server to turn the subscription off.', + }, + _reason: { + type: require('./element.input.js'), + description: 'A description of why this subscription is defined.', + }, + reason: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of why this subscription is defined.', + }, + _criteria: { + type: require('./element.input.js'), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + criteria: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + _error: { + type: require('./element.input.js'), + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + error: { + type: GraphQLString, + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + channel: { + type: new GraphQLNonNull(require('./subscriptionchannel.input.js')), + description: + 'Details where to send notifications when resources are received that meet the criteria.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-tag + tag: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A tag to add to any resource that matches the criteria, after the subscription is processed.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/subscriptionchannel.input.js b/src/resources/3_0_1/inputs/subscriptionchannel.input.js index 10409ba9..79439cfd 100644 --- a/src/resources/3_0_1/inputs/subscriptionchannel.input.js +++ b/src/resources/3_0_1/inputs/subscriptionchannel.input.js @@ -1,63 +1,78 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Subscription.channel Input Schema + * @summary Subscriptionchannel Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SubscriptionChannel_Input', - description: - 'Details where to send notifications when resources are received that meet the criteria.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-channel-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of channel to send notifications on.', - }, - _type: { - type: require('./element.input'), - description: 'The type of channel to send notifications on.', - }, - endpoint: { - type: UriScalar, - description: - 'The uri that describes the actual end-point to send messages to.', - }, - _endpoint: { - type: require('./element.input'), - description: - 'The uri that describes the actual end-point to send messages to.', - }, - payload: { - type: GraphQLString, - description: - 'The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification.', - }, - _payload: { - type: require('./element.input'), - description: - 'The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification.', - }, - header: { - type: new GraphQLList(GraphQLString), - description: - 'Additional headers / information to send as part of the notification.', - }, - _header: { - type: require('./element.input'), - description: - 'Additional headers / information to send as part of the notification.', - }, - }), + name: 'Subscriptionchannel_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of channel to send notifications on.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-channel-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of channel to send notifications on.', + }, + _endpoint: { + type: require('./element.input.js'), + description: + 'The uri that describes the actual end-point to send messages to.', + }, + endpoint: { + type: UriScalar, + description: + 'The uri that describes the actual end-point to send messages to.', + }, + _payload: { + type: require('./element.input.js'), + description: + 'The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification.', + }, + payload: { + type: GraphQLString, + description: + 'The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification.', + }, + _header: { + type: require('./element.input.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: new GraphQLList(GraphQLString), + description: + 'Additional headers / information to send as part of the notification.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/substance.input.js b/src/resources/3_0_1/inputs/substance.input.js index bd8c95e0..8b56f46c 100644 --- a/src/resources/3_0_1/inputs/substance.input.js +++ b/src/resources/3_0_1/inputs/substance.input.js @@ -1,21 +1,13 @@ -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 SubstanceResourceInputType = new GraphQLEnumType({ - name: 'SubstanceResourceInputType', - values: { - Substance: { value: 'Substance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,55 +15,113 @@ let SubstanceResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Substance_Input', - description: 'Base StructureDefinition for Substance Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SubstanceResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'Unique identifier for the substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-status - status: { - type: CodeScalar, - description: 'A code to indicate if the substance is actively used.', - }, - _status: { - type: require('./element.input'), - description: 'A code to indicate if the substance is actively used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-category - category: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'A code (or set of codes) that identify this substance.', - }, - description: { - type: GraphQLString, - description: - 'A description of the substance - its appearance, handling requirements, and other usage notes.', - }, - _description: { - type: require('./element.input'), - description: - 'A description of the substance - its appearance, handling requirements, and other usage notes.', - }, - instance: { - type: new GraphQLList(require('./substanceinstance.input')), - description: - 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', - }, - ingredient: { - type: new GraphQLList(require('./substanceingredient.input')), - description: 'A substance can be composed of other substances.', - }, - }), + description: 'Base StructureDefinition for Substance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Substance_Enum_input', + values: { Substance: { value: 'Substance' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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 for the substance.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code to indicate if the substance is actively used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-status + status: { + type: CodeScalar, + description: 'A code to indicate if the substance is actively used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-category + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code (or set of codes) that identify this substance.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + description: { + type: GraphQLString, + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + instance: { + type: new GraphQLList(require('./substanceinstance.input.js')), + description: + 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', + }, + ingredient: { + type: new GraphQLList(require('./substanceingredient.input.js')), + description: 'A substance can be composed of other substances.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/substanceingredient.input.js b/src/resources/3_0_1/inputs/substanceingredient.input.js index 26d6f5aa..3005591a 100644 --- a/src/resources/3_0_1/inputs/substanceingredient.input.js +++ b/src/resources/3_0_1/inputs/substanceingredient.input.js @@ -1,31 +1,52 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Substance.ingredient Input Schema + * @summary Substanceingredient Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SubstanceIngredient_Input', - description: 'A substance can be composed of other substances.', - fields: () => - extendSchema(require('./backboneelement.input'), { - quantity: { - type: require('./ratio.input'), - description: - 'The amount of the ingredient in the substance - a concentration ratio.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - substanceCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'Another substance that is a component of this substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - substanceReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'Another substance that is a component of this substance.', - }, - }), + name: 'Substanceingredient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + quantity: { + type: require('./ratio.input.js'), + description: + 'The amount of the ingredient in the substance - a concentration ratio.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + substanceCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Another substance that is a component of this substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + substanceReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Another substance that is a component of this substance.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/substanceinstance.input.js b/src/resources/3_0_1/inputs/substanceinstance.input.js index 4efecac1..18af5edf 100644 --- a/src/resources/3_0_1/inputs/substanceinstance.input.js +++ b/src/resources/3_0_1/inputs/substanceinstance.input.js @@ -1,37 +1,56 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Substance.instance Input Schema + * @summary Substanceinstance Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SubstanceInstance_Input', - description: - 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: require('./identifier.input'), - description: - 'Identifier associated with the package/container (usually a label affixed directly).', - }, - expiry: { - type: DateTimeScalar, - description: - 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', - }, - _expiry: { - type: require('./element.input'), - description: - 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', - }, - quantity: { - type: require('./quantity.input'), - description: 'The amount of the substance.', - }, - }), + name: 'Substanceinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./identifier.input.js'), + description: + 'Identifier associated with the package/container (usually a label affixed directly).', + }, + _expiry: { + type: require('./element.input.js'), + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + expiry: { + type: DateTimeScalar, + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount of the substance.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/supplydelivery.input.js b/src/resources/3_0_1/inputs/supplydelivery.input.js index 7ba785e0..18916c78 100644 --- a/src/resources/3_0_1/inputs/supplydelivery.input.js +++ b/src/resources/3_0_1/inputs/supplydelivery.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 SupplyDeliveryResourceInputType = new GraphQLEnumType({ - name: 'SupplyDeliveryResourceInputType', - values: { - SupplyDelivery: { value: 'SupplyDelivery' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,81 +16,139 @@ let SupplyDeliveryResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'SupplyDelivery_Input', - description: 'Base StructureDefinition for SupplyDelivery Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SupplyDeliveryResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Identifier assigned by the dispensing facility when the item(s) is dispensed.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - 'A plan, proposal or order that is fulfilled in whole or in part by this event.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: - 'A larger event of which this particular event is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-status - status: { - type: CodeScalar, - description: 'A code specifying the state of the dispense event.', - }, - _status: { - type: require('./element.input'), - description: 'A code specifying the state of the dispense event.', - }, - patient: { - type: require('./reference.input'), - description: - 'A link to a resource representing the person whom the delivered item is for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-type - type: { - type: require('./codeableconcept.input'), - description: - 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', - }, - suppliedItem: { - type: require('./supplydeliverysupplieditem.input'), - description: 'The item that is being delivered or has been supplied.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'The date or time(s) the activity occurred.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: 'The date or time(s) the activity occurred.', - }, - occurrencePeriod: { - type: require('./period.input'), - description: 'The date or time(s) the activity occurred.', - }, - occurrenceTiming: { - type: require('./timing.input'), - description: 'The date or time(s) the activity occurred.', - }, - supplier: { - type: require('./reference.input'), - description: - 'The individual responsible for dispensing the medication, supplier or device.', - }, - destination: { - type: require('./reference.input'), - description: - 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', - }, - receiver: { - type: new GraphQLList(require('./reference.input')), - description: 'Identifies the person who picked up the Supply.', - }, - }), + description: 'Base StructureDefinition for SupplyDelivery Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyDelivery_Enum_input', + values: { SupplyDelivery: { value: 'SupplyDelivery' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'Identifier assigned by the dispensing facility when the item(s) is dispensed.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code specifying the state of the dispense event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-status + status: { + type: CodeScalar, + description: 'A code specifying the state of the dispense event.', + }, + patient: { + type: GraphQLString, + description: + 'A link to a resource representing the person whom the delivered item is for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-type + type: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + suppliedItem: { + type: require('./supplydeliverysupplieditem.input.js'), + description: 'The item that is being delivered or has been supplied.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'The date or time(s) the activity occurred.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The date or time(s) the activity occurred.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'The date or time(s) the activity occurred.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: 'The date or time(s) the activity occurred.', + }, + supplier: { + type: GraphQLString, + description: + 'The individual responsible for dispensing the medication, supplier or device.', + }, + destination: { + type: GraphQLString, + description: + 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList(GraphQLString), + description: 'Identifies the person who picked up the Supply.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/supplydeliverysupplieditem.input.js b/src/resources/3_0_1/inputs/supplydeliverysupplieditem.input.js index ce7e159b..9e6df32b 100644 --- a/src/resources/3_0_1/inputs/supplydeliverysupplieditem.input.js +++ b/src/resources/3_0_1/inputs/supplydeliverysupplieditem.input.js @@ -1,33 +1,53 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary SupplyDelivery.suppliedItem Input Schema + * @summary SupplyDeliverysuppliedItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SupplyDeliverySuppliedItem_Input', - description: 'The item that is being delivered or has been supplied.', - fields: () => - extendSchema(require('./backboneelement.input'), { - quantity: { - type: require('./quantity.input'), - description: - 'The amount of supply that has been dispensed. Includes unit of measure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supply-item - itemCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supply-item - itemReference: { - type: require('./reference.input'), - description: - 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', - }, - }), + name: 'SupplyDeliverysuppliedItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The amount of supply that has been dispensed. Includes unit of measure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supply-item + itemCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supply-item + itemReference: { + type: GraphQLString, + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/supplyrequest.input.js b/src/resources/3_0_1/inputs/supplyrequest.input.js index 01f4a943..946e67a4 100644 --- a/src/resources/3_0_1/inputs/supplyrequest.input.js +++ b/src/resources/3_0_1/inputs/supplyrequest.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 SupplyRequestResourceInputType = new GraphQLEnumType({ - name: 'SupplyRequestResourceInputType', - values: { - SupplyRequest: { value: 'SupplyRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,97 +16,155 @@ let SupplyRequestResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'SupplyRequest_Input', - description: 'Base StructureDefinition for SupplyRequest Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(SupplyRequestResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: 'Unique identifier for this supply request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-status - status: { - type: CodeScalar, - description: 'Status of the supply request.', - }, - _status: { - type: require('./element.input'), - description: 'Status of the supply request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-kind - category: { - type: require('./codeableconcept.input'), - description: - 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.input'), - description: - 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', - }, - orderedItem: { - type: require('./supplyrequestordereditem.input'), - description: 'The item being requested.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'When the request should be fulfilled.', - }, - _occurrenceDateTime: { - type: require('./element.input'), - description: 'When the request should be fulfilled.', - }, - occurrencePeriod: { - type: require('./period.input'), - description: 'When the request should be fulfilled.', - }, - occurrenceTiming: { - type: require('./timing.input'), - description: 'When the request should be fulfilled.', - }, - authoredOn: { - type: DateTimeScalar, - description: 'When the request was made.', - }, - _authoredOn: { - type: require('./element.input'), - description: 'When the request was made.', - }, - requester: { - type: require('./supplyrequestrequester.input'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - supplier: { - type: new GraphQLList(require('./reference.input')), - description: 'Who is intended to fulfill the request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: 'Why the supply item was requested.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason - reasonReference: { - type: require('./reference.input'), - description: 'Why the supply item was requested.', - }, - deliverFrom: { - type: require('./reference.input'), - description: 'Where the supply is expected to come from.', - }, - deliverTo: { - type: require('./reference.input'), - description: 'Where the supply is destined to go.', - }, - }), + description: 'Base StructureDefinition for SupplyRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyRequest_Enum_input', + values: { SupplyRequest: { value: 'SupplyRequest' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: 'Unique identifier for this supply request.', + }, + _status: { + type: require('./element.input.js'), + description: 'Status of the supply request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-status + status: { + type: CodeScalar, + description: 'Status of the supply request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-kind + category: { + type: require('./codeableconcept.input.js'), + description: + 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', + }, + orderedItem: { + type: require('./supplyrequestordereditem.input.js'), + description: 'The item being requested.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'When the request should be fulfilled.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'When the request should be fulfilled.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'When the request should be fulfilled.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: 'When the request should be fulfilled.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'When the request was made.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request was made.', + }, + requester: { + type: require('./supplyrequestrequester.input.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + supplier: { + type: new GraphQLList(GraphQLString), + description: 'Who is intended to fulfill the request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Why the supply item was requested.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason + reasonReference: { + type: GraphQLString, + description: 'Why the supply item was requested.', + }, + deliverFrom: { + type: GraphQLString, + description: 'Where the supply is expected to come from.', + }, + deliverTo: { + type: GraphQLString, + description: 'Where the supply is destined to go.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/supplyrequestordereditem.input.js b/src/resources/3_0_1/inputs/supplyrequestordereditem.input.js index 60cac997..31bbafdd 100644 --- a/src/resources/3_0_1/inputs/supplyrequestordereditem.input.js +++ b/src/resources/3_0_1/inputs/supplyrequestordereditem.input.js @@ -1,32 +1,53 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary SupplyRequest.orderedItem Input Schema + * @summary SupplyRequestorderedItem Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SupplyRequestOrderedItem_Input', - description: 'The item being requested.', - fields: () => - extendSchema(require('./backboneelement.input'), { - quantity: { - type: new GraphQLNonNull(require('./quantity.input')), - description: 'The amount that is being ordered of the indicated item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supply-item - itemCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supply-item - itemReference: { - type: require('./reference.input'), - description: - 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', - }, - }), + name: 'SupplyRequestorderedItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'The amount that is being ordered of the indicated item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supply-item + itemCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supply-item + itemReference: { + type: GraphQLString, + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/supplyrequestrequester.input.js b/src/resources/3_0_1/inputs/supplyrequestrequester.input.js index 9280b690..f7e15b6a 100644 --- a/src/resources/3_0_1/inputs/supplyrequestrequester.input.js +++ b/src/resources/3_0_1/inputs/supplyrequestrequester.input.js @@ -1,27 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary SupplyRequest.requester Input Schema + * @summary SupplyRequestrequester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'SupplyRequestRequester_Input', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - agent: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'The device, practitioner, etc. who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of.', - }, - }), + name: 'SupplyRequestrequester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + agent: { + type: new GraphQLNonNull(GraphQLString), + description: 'The device, practitioner, etc. who initiated the request.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/task.input.js b/src/resources/3_0_1/inputs/task.input.js index b91cdefd..99383d6d 100644 --- a/src/resources/3_0_1/inputs/task.input.js +++ b/src/resources/3_0_1/inputs/task.input.js @@ -1,23 +1,14 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 TaskResourceInputType = new GraphQLEnumType({ - name: 'TaskResourceInputType', - values: { - Task: { value: 'Task' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,178 +16,235 @@ let TaskResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'Task_Input', - description: 'Base StructureDefinition for Task Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(TaskResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: 'The business identifier for this task.', - }, - definitionUri: { - type: UriScalar, - description: - 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', - }, - _definitionUri: { - type: require('./element.input'), - description: - 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', - }, - definitionReference: { - type: require('./reference.input'), - description: - 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', - }, - basedOn: { - type: new GraphQLList(require('./reference.input')), - description: - "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a 'request' resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the 'request' resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", - }, - groupIdentifier: { - type: require('./identifier.input'), - description: - 'An identifier that links together multiple tasks and other requests that were created in the same context.', - }, - partOf: { - type: new GraphQLList(require('./reference.input')), - description: 'Task that this particular task is part of.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/task-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current status of the task.', - }, - _status: { - type: require('./element.input'), - description: 'The current status of the task.', - }, - statusReason: { - type: require('./codeableconcept.input'), - description: - 'An explanation as to why this task is held, failed, was refused, etc.', - }, - businessStatus: { - type: require('./codeableconcept.input'), - description: - 'Contains business-specific nuances of the business state.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - "Indicates the 'level' of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", - }, - _intent: { - type: require('./element.input'), - description: - "Indicates the 'level' of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the Task should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.input'), - description: - 'Indicates how quickly the Task should be addressed with respect to other requests.', - }, - code: { - type: require('./codeableconcept.input'), - description: - 'A name or code (or both) briefly describing what the task involves.', - }, - description: { - type: GraphQLString, - description: 'A free-text description of what is to be performed.', - }, - _description: { - type: require('./element.input'), - description: 'A free-text description of what is to be performed.', - }, - focus: { - type: require('./reference.input'), - description: - 'The request being actioned or the resource being manipulated by this task.', - }, - for: { - type: require('./reference.input'), - description: - 'The entity who benefits from the performance of the service specified in the task (e.g., the patient).', - }, - context: { - type: require('./reference.input'), - description: - 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.', - }, - executionPeriod: { - type: require('./period.input'), - description: - 'Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).', - }, - authoredOn: { - type: DateTimeScalar, - description: 'The date and time this task was created.', - }, - _authoredOn: { - type: require('./element.input'), - description: 'The date and time this task was created.', - }, - lastModified: { - type: DateTimeScalar, - description: 'The date and time of last modification to this task.', - }, - _lastModified: { - type: require('./element.input'), - description: 'The date and time of last modification to this task.', - }, - requester: { - type: require('./taskrequester.input'), - description: 'The creator of the task.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/task-performer-type - performerType: { - type: new GraphQLList(require('./codeableconcept.input')), - description: 'The type of participant that can execute the task.', - }, - owner: { - type: require('./reference.input'), - description: - 'Individual organization or Device currently responsible for task execution.', - }, - reason: { - type: require('./codeableconcept.input'), - description: - 'A description or code indicating why this task needs to be performed.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Free-text information captured about the task as it progresses.', - }, - relevantHistory: { - type: new GraphQLList(require('./reference.input')), - description: - 'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.', - }, - restriction: { - type: require('./taskrestriction.input'), - description: - 'If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.', - }, - input: { - type: new GraphQLList(require('./taskinput.input')), - description: - 'Additional information that may be needed in the execution of the task.', - }, - output: { - type: new GraphQLList(require('./taskoutput.input')), - description: 'Outputs produced by the Task.', - }, - }), + description: 'Base StructureDefinition for Task Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Task_Enum_input', + values: { Task: { value: 'Task' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: 'The business identifier for this task.', + }, + _definitionUri: { + type: require('./element.input.js'), + description: + 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', + }, + definitionUri: { + type: UriScalar, + description: + 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', + }, + definitionReference: { + type: GraphQLString, + description: + 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a 'request' resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the 'request' resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + 'An identifier that links together multiple tasks and other requests that were created in the same context.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: 'Task that this particular task is part of.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current status of the task.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/task-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current status of the task.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + 'An explanation as to why this task is held, failed, was refused, etc.', + }, + businessStatus: { + type: require('./codeableconcept.input.js'), + description: 'Contains business-specific nuances of the business state.', + }, + _intent: { + type: require('./element.input.js'), + description: + "Indicates the 'level' of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + "Indicates the 'level' of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the Task should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the Task should be addressed with respect to other requests.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A name or code (or both) briefly describing what the task involves.', + }, + _description: { + type: require('./element.input.js'), + description: 'A free-text description of what is to be performed.', + }, + description: { + type: GraphQLString, + description: 'A free-text description of what is to be performed.', + }, + focus: { + type: GraphQLString, + description: + 'The request being actioned or the resource being manipulated by this task.', + }, + for: { + type: GraphQLString, + description: + 'The entity who benefits from the performance of the service specified in the task (e.g., the patient).', + }, + context: { + type: GraphQLString, + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.', + }, + executionPeriod: { + type: require('./period.input.js'), + description: + 'Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).', + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'The date and time this task was created.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'The date and time this task was created.', + }, + _lastModified: { + type: require('./element.input.js'), + description: 'The date and time of last modification to this task.', + }, + lastModified: { + type: DateTimeScalar, + description: 'The date and time of last modification to this task.', + }, + requester: { + type: require('./taskrequester.input.js'), + description: 'The creator of the task.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/task-performer-type + performerType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The type of participant that can execute the task.', + }, + owner: { + type: GraphQLString, + description: + 'Individual organization or Device currently responsible for task execution.', + }, + reason: { + type: require('./codeableconcept.input.js'), + description: + 'A description or code indicating why this task needs to be performed.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Free-text information captured about the task as it progresses.', + }, + relevantHistory: { + type: new GraphQLList(GraphQLString), + description: + 'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.', + }, + restriction: { + type: require('./taskrestriction.input.js'), + description: + 'If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.', + }, + input: { + type: new GraphQLList(require('./taskinput.input.js')), + description: + 'Additional information that may be needed in the execution of the task.', + }, + output: { + type: new GraphQLList(require('./taskoutput.input.js')), + description: 'Outputs produced by the Task.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/taskinput.input.js b/src/resources/3_0_1/inputs/taskinput.input.js index 22cf4232..700211ec 100644 --- a/src/resources/3_0_1/inputs/taskinput.input.js +++ b/src/resources/3_0_1/inputs/taskinput.input.js @@ -1,256 +1,272 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Task.input Input Schema + * @summary Taskinput Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TaskInput_Input', - description: - 'Additional information that may be needed in the execution of the task.', - fields: () => - extendSchema(require('./backboneelement.input'), { - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'A code or description indicating how the input is intended to be used as part of the task execution.', - }, - valueBase64Binary: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueBase64Binary: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'The value of the input parameter as a basic type.', - }, - _valueBoolean: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueCode: { - type: new GraphQLNonNull(CodeScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueCode: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueDate: { - type: new GraphQLNonNull(DateScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueDate: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueDateTime: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueDecimal: { - type: new GraphQLNonNull(GraphQLFloat), - description: 'The value of the input parameter as a basic type.', - }, - _valueDecimal: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueId: { - type: new GraphQLNonNull(IdScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueId: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueInstant: { - type: new GraphQLNonNull(InstantScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueInstant: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: 'The value of the input parameter as a basic type.', - }, - _valueInteger: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueMarkdown: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of the input parameter as a basic type.', - }, - _valueMarkdown: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueOid: { - type: new GraphQLNonNull(OidScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueOid: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valuePositiveInt: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valuePositiveInt: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of the input parameter as a basic type.', - }, - _valueString: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueTime: { - type: new GraphQLNonNull(TimeScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueTime: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueUnsignedInt: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueUnsignedInt: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueUri: { - type: new GraphQLNonNull(UriScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueUri: { - type: require('./element.input'), - description: 'The value of the input parameter as a basic type.', - }, - valueAddress: { - type: new GraphQLNonNull(require('./address.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueAge: { - type: new GraphQLNonNull(require('./age.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueAnnotation: { - type: new GraphQLNonNull(require('./annotation.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueCoding: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueContactPoint: { - type: new GraphQLNonNull(require('./contactpoint.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueCount: { - type: new GraphQLNonNull(require('./count.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueDistance: { - type: new GraphQLNonNull(require('./distance.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueDuration: { - type: new GraphQLNonNull(require('./duration.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueHumanName: { - type: new GraphQLNonNull(require('./humanname.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueIdentifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueMoney: { - type: new GraphQLNonNull(require('./money.input')), - description: 'The value of the input parameter as a basic type.', - }, - valuePeriod: { - type: new GraphQLNonNull(require('./period.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueRange: { - type: new GraphQLNonNull(require('./range.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueRatio: { - type: new GraphQLNonNull(require('./ratio.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueSampledData: { - type: new GraphQLNonNull(require('./sampleddata.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueSignature: { - type: new GraphQLNonNull(require('./signature.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueTiming: { - type: new GraphQLNonNull(require('./timing.input')), - description: 'The value of the input parameter as a basic type.', - }, - valueMeta: { - type: new GraphQLNonNull(require('./meta.input')), - description: 'The value of the input parameter as a basic type.', - }, - }), + name: 'Taskinput_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code or description indicating how the input is intended to be used as part of the task execution.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of the input parameter as a basic type.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDate: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of the input parameter as a basic type.', + }, + _valueId: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of the input parameter as a basic type.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + _valueOid: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + _valueTime: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The value of the input parameter as a basic type.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueMeta: { + type: new GraphQLNonNull(require('./meta.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/taskoutput.input.js b/src/resources/3_0_1/inputs/taskoutput.input.js index 0bca47b4..bb15be40 100644 --- a/src/resources/3_0_1/inputs/taskoutput.input.js +++ b/src/resources/3_0_1/inputs/taskoutput.input.js @@ -1,254 +1,271 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, - GraphQLString, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Task.output Input Schema + * @summary Taskoutput Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TaskOutput_Input', - description: 'Outputs produced by the Task.', - fields: () => - extendSchema(require('./backboneelement.input'), { - type: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The name of the Output parameter.', - }, - valueBase64Binary: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueBase64Binary: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'The value of the Output parameter as a basic type.', - }, - _valueBoolean: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueCode: { - type: new GraphQLNonNull(CodeScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueCode: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueDate: { - type: new GraphQLNonNull(DateScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueDate: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueDateTime: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueDecimal: { - type: new GraphQLNonNull(GraphQLFloat), - description: 'The value of the Output parameter as a basic type.', - }, - _valueDecimal: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueId: { - type: new GraphQLNonNull(IdScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueId: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueInstant: { - type: new GraphQLNonNull(InstantScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueInstant: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: 'The value of the Output parameter as a basic type.', - }, - _valueInteger: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueMarkdown: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of the Output parameter as a basic type.', - }, - _valueMarkdown: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueOid: { - type: new GraphQLNonNull(OidScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueOid: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valuePositiveInt: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valuePositiveInt: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of the Output parameter as a basic type.', - }, - _valueString: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueTime: { - type: new GraphQLNonNull(TimeScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueTime: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueUnsignedInt: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueUnsignedInt: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueUri: { - type: new GraphQLNonNull(UriScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueUri: { - type: require('./element.input'), - description: 'The value of the Output parameter as a basic type.', - }, - valueAddress: { - type: new GraphQLNonNull(require('./address.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueAge: { - type: new GraphQLNonNull(require('./age.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueAnnotation: { - type: new GraphQLNonNull(require('./annotation.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueAttachment: { - type: new GraphQLNonNull(require('./attachment.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueCoding: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueContactPoint: { - type: new GraphQLNonNull(require('./contactpoint.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueCount: { - type: new GraphQLNonNull(require('./count.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueDistance: { - type: new GraphQLNonNull(require('./distance.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueDuration: { - type: new GraphQLNonNull(require('./duration.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueHumanName: { - type: new GraphQLNonNull(require('./humanname.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueIdentifier: { - type: new GraphQLNonNull(require('./identifier.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueMoney: { - type: new GraphQLNonNull(require('./money.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valuePeriod: { - type: new GraphQLNonNull(require('./period.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueRange: { - type: new GraphQLNonNull(require('./range.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueRatio: { - type: new GraphQLNonNull(require('./ratio.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueReference: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueSampledData: { - type: new GraphQLNonNull(require('./sampleddata.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueSignature: { - type: new GraphQLNonNull(require('./signature.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueTiming: { - type: new GraphQLNonNull(require('./timing.input')), - description: 'The value of the Output parameter as a basic type.', - }, - valueMeta: { - type: new GraphQLNonNull(require('./meta.input')), - description: 'The value of the Output parameter as a basic type.', - }, - }), + name: 'Taskoutput_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The name of the Output parameter.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of the Output parameter as a basic type.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDate: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of the Output parameter as a basic type.', + }, + _valueId: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of the Output parameter as a basic type.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + _valueOid: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + _valueTime: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The value of the Output parameter as a basic type.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueMeta: { + type: new GraphQLNonNull(require('./meta.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/taskrequester.input.js b/src/resources/3_0_1/inputs/taskrequester.input.js index 1c5fe9c8..f42a0ada 100644 --- a/src/resources/3_0_1/inputs/taskrequester.input.js +++ b/src/resources/3_0_1/inputs/taskrequester.input.js @@ -1,25 +1,46 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary Task.requester Input Schema + * @summary Taskrequester Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TaskRequester_Input', - description: 'The creator of the task.', - fields: () => - extendSchema(require('./backboneelement.input'), { - agent: { - type: new GraphQLNonNull(require('./reference.input')), - description: 'The device, practitioner, etc. who initiated the task.', - }, - onBehalfOf: { - type: require('./reference.input'), - description: - 'The organization the device or practitioner was acting on behalf of when they initiated the task.', - }, - }), + name: 'Taskrequester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + agent: { + type: new GraphQLNonNull(GraphQLString), + description: 'The device, practitioner, etc. who initiated the task.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of when they initiated the task.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/taskrestriction.input.js b/src/resources/3_0_1/inputs/taskrestriction.input.js index e69ad2f1..7bd08061 100644 --- a/src/resources/3_0_1/inputs/taskrestriction.input.js +++ b/src/resources/3_0_1/inputs/taskrestriction.input.js @@ -1,37 +1,56 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Task.restriction Input Schema + * @summary Taskrestriction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TaskRestriction_Input', - description: - 'If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.', - fields: () => - extendSchema(require('./backboneelement.input'), { - repetitions: { - type: PositiveIntScalar, - description: - 'Indicates the number of times the requested action should occur.', - }, - _repetitions: { - type: require('./element.input'), - description: - 'Indicates the number of times the requested action should occur.', - }, - period: { - type: require('./period.input'), - description: 'Over what time-period is fulfillment sought.', - }, - recipient: { - type: new GraphQLList(require('./reference.input')), - description: - 'For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?.', - }, - }), + name: 'Taskrestriction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _repetitions: { + type: require('./element.input.js'), + description: + 'Indicates the number of times the requested action should occur.', + }, + repetitions: { + type: PositiveIntScalar, + description: + 'Indicates the number of times the requested action should occur.', + }, + period: { + type: require('./period.input.js'), + description: 'Over what time-period is fulfillment sought.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreport.input.js b/src/resources/3_0_1/inputs/testreport.input.js index aa018beb..8aa44069 100644 --- a/src/resources/3_0_1/inputs/testreport.input.js +++ b/src/resources/3_0_1/inputs/testreport.input.js @@ -1,23 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLFloat, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let TestReportResourceInputType = new GraphQLEnumType({ - name: 'TestReportResourceInputType', - values: { - TestReport: { value: 'TestReport' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,99 +17,157 @@ let TestReportResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'TestReport_Input', - description: 'Base StructureDefinition for TestReport Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(TestReportResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.input'), - description: - 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', - }, - name: { - type: GraphQLString, - description: - 'A free text natural language name identifying the executed TestScript.', - }, - _name: { - type: require('./element.input'), - description: - 'A free text natural language name identifying the executed TestScript.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-status-codes - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current state of this test report.', - }, - _status: { - type: require('./element.input'), - description: 'The current state of this test report.', - }, - testScript: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-result-codes - result: { - type: new GraphQLNonNull(CodeScalar), - description: 'The overall result from the execution of the TestScript.', - }, - _result: { - type: require('./element.input'), - description: 'The overall result from the execution of the TestScript.', - }, - score: { - type: GraphQLFloat, - description: - 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', - }, - _score: { - type: require('./element.input'), - description: - 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', - }, - tester: { - type: GraphQLString, - description: - 'Name of the tester producing this report (Organization or individual).', - }, - _tester: { - type: require('./element.input'), - description: - 'Name of the tester producing this report (Organization or individual).', - }, - issued: { - type: DateTimeScalar, - description: - 'When the TestScript was executed and this TestReport was generated.', - }, - _issued: { - type: require('./element.input'), - description: - 'When the TestScript was executed and this TestReport was generated.', - }, - participant: { - type: new GraphQLList(require('./testreportparticipant.input')), - description: - 'A participant in the test execution, either the execution engine, a client, or a server.', - }, - setup: { - type: require('./testreportsetup.input'), - description: - 'The results of the series of required setup operations before the tests were executed.', - }, - test: { - type: new GraphQLList(require('./testreporttest.input')), - description: 'A test executed from the test script.', - }, - teardown: { - type: require('./testreportteardown.input'), - description: - 'The results of the series of operations required to clean up after the all the tests were executed (successfully or otherwise).', - }, - }), + description: 'Base StructureDefinition for TestReport Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestReport_Enum_input', + values: { TestReport: { value: 'TestReport' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: require('./identifier.input.js'), + description: + 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name identifying the executed TestScript.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name identifying the executed TestScript.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of this test report.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-status-codes + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of this test report.', + }, + testScript: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.', + }, + _result: { + type: require('./element.input.js'), + description: 'The overall result from the execution of the TestScript.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-result-codes + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The overall result from the execution of the TestScript.', + }, + _score: { + type: require('./element.input.js'), + description: + 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', + }, + score: { + type: GraphQLFloat, + description: + 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', + }, + _tester: { + type: require('./element.input.js'), + description: + 'Name of the tester producing this report (Organization or individual).', + }, + tester: { + type: GraphQLString, + description: + 'Name of the tester producing this report (Organization or individual).', + }, + _issued: { + type: require('./element.input.js'), + description: + 'When the TestScript was executed and this TestReport was generated.', + }, + issued: { + type: DateTimeScalar, + description: + 'When the TestScript was executed and this TestReport was generated.', + }, + participant: { + type: new GraphQLList(require('./testreportparticipant.input.js')), + description: + 'A participant in the test execution, either the execution engine, a client, or a server.', + }, + setup: { + type: require('./testreportsetup.input.js'), + description: + 'The results of the series of required setup operations before the tests were executed.', + }, + test: { + type: new GraphQLList(require('./testreporttest.input.js')), + description: 'A test executed from the test script.', + }, + teardown: { + type: require('./testreportteardown.input.js'), + description: + 'The results of the series of operations required to clean up after the all the tests were executed (successfully or otherwise).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreportparticipant.input.js b/src/resources/3_0_1/inputs/testreportparticipant.input.js index 0fd3b70e..e10a0314 100644 --- a/src/resources/3_0_1/inputs/testreportparticipant.input.js +++ b/src/resources/3_0_1/inputs/testreportparticipant.input.js @@ -1,50 +1,64 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestReport.participant Input Schema + * @summary TestReportparticipant Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportParticipant_Input', - description: - 'A participant in the test execution, either the execution engine, a client, or a server.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-participant-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of participant.', - }, - _type: { - type: require('./element.input'), - description: 'The type of participant.', - }, - uri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The uri of the participant. An absolute URL is preferred.', - }, - _uri: { - type: require('./element.input'), - description: - 'The uri of the participant. An absolute URL is preferred.', - }, - display: { - type: GraphQLString, - description: 'The display name of the participant.', - }, - _display: { - type: require('./element.input'), - description: 'The display name of the participant.', - }, - }), + name: 'TestReportparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of participant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-participant-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant.', + }, + _uri: { + type: require('./element.input.js'), + description: 'The uri of the participant. An absolute URL is preferred.', + }, + uri: { + type: new GraphQLNonNull(UriScalar), + description: 'The uri of the participant. An absolute URL is preferred.', + }, + _display: { + type: require('./element.input.js'), + description: 'The display name of the participant.', + }, + display: { + type: GraphQLString, + description: 'The display name of the participant.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreportsetup.input.js b/src/resources/3_0_1/inputs/testreportsetup.input.js index 8d5c8e95..9b62668f 100644 --- a/src/resources/3_0_1/inputs/testreportsetup.input.js +++ b/src/resources/3_0_1/inputs/testreportsetup.input.js @@ -1,28 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestReport.setup Input Schema + * @summary TestReportsetup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportSetup_Input', - description: - 'The results of the series of required setup operations before the tests were executed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testreportsetupaction.input')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestReportsetup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreportsetupaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreportsetupaction.input.js b/src/resources/3_0_1/inputs/testreportsetupaction.input.js index 3e37e09b..3e49e18d 100644 --- a/src/resources/3_0_1/inputs/testreportsetupaction.input.js +++ b/src/resources/3_0_1/inputs/testreportsetupaction.input.js @@ -1,25 +1,45 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary TestReport.setup.action Input Schema + * @summary TestReportsetupaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportSetupAction_Input', - description: 'Action would contain either an operation or an assertion.', - fields: () => - extendSchema(require('./backboneelement.input'), { - operation: { - type: require('./testreportsetupactionoperation.input'), - description: 'The operation performed.', - }, - assert: { - type: require('./testreportsetupactionassert.input'), - description: - 'The results of the assertion performed on the previous operations.', - }, - }), + name: 'TestReportsetupaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + operation: { + type: require('./testreportsetupactionoperation.input.js'), + description: 'The operation performed.', + }, + assert: { + type: require('./testreportsetupactionassert.input.js'), + description: + 'The results of the assertion performed on the previous operations.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreportsetupactionassert.input.js b/src/resources/3_0_1/inputs/testreportsetupactionassert.input.js index dbc85b7b..6157f4d4 100644 --- a/src/resources/3_0_1/inputs/testreportsetupactionassert.input.js +++ b/src/resources/3_0_1/inputs/testreportsetupactionassert.input.js @@ -1,47 +1,63 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary TestReport.setup.action.assert Input Schema + * @summary TestReportsetupactionassert Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportSetupActionAssert_Input', - description: - 'The results of the assertion performed on the previous operations.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-action-result-codes - result: { - type: new GraphQLNonNull(CodeScalar), - description: 'The result of this assertion.', - }, - _result: { - type: require('./element.input'), - description: 'The result of this assertion.', - }, - message: { - type: GraphQLString, - description: 'An explanatory message associated with the result.', - }, - _message: { - type: require('./element.input'), - description: 'An explanatory message associated with the result.', - }, - detail: { - type: GraphQLString, - description: 'A link to further details on the result.', - }, - _detail: { - type: require('./element.input'), - description: 'A link to further details on the result.', - }, - }), + name: 'TestReportsetupactionassert_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _result: { + type: require('./element.input.js'), + description: 'The result of this assertion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-action-result-codes + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The result of this assertion.', + }, + _message: { + type: require('./element.input.js'), + description: 'An explanatory message associated with the result.', + }, + message: { + type: GraphQLString, + description: 'An explanatory message associated with the result.', + }, + _detail: { + type: require('./element.input.js'), + description: 'A link to further details on the result.', + }, + detail: { + type: GraphQLString, + description: 'A link to further details on the result.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreportsetupactionoperation.input.js b/src/resources/3_0_1/inputs/testreportsetupactionoperation.input.js index b0c18ca2..0526b708 100644 --- a/src/resources/3_0_1/inputs/testreportsetupactionoperation.input.js +++ b/src/resources/3_0_1/inputs/testreportsetupactionoperation.input.js @@ -1,47 +1,64 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestReport.setup.action.operation Input Schema + * @summary TestReportsetupactionoperation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportSetupActionOperation_Input', - description: 'The operation performed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-action-result-codes - result: { - type: new GraphQLNonNull(CodeScalar), - description: 'The result of this operation.', - }, - _result: { - type: require('./element.input'), - description: 'The result of this operation.', - }, - message: { - type: GraphQLString, - description: 'An explanatory message associated with the result.', - }, - _message: { - type: require('./element.input'), - description: 'An explanatory message associated with the result.', - }, - detail: { - type: UriScalar, - description: 'A link to further details on the result.', - }, - _detail: { - type: require('./element.input'), - description: 'A link to further details on the result.', - }, - }), + name: 'TestReportsetupactionoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _result: { + type: require('./element.input.js'), + description: 'The result of this operation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-action-result-codes + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The result of this operation.', + }, + _message: { + type: require('./element.input.js'), + description: 'An explanatory message associated with the result.', + }, + message: { + type: GraphQLString, + description: 'An explanatory message associated with the result.', + }, + _detail: { + type: require('./element.input.js'), + description: 'A link to further details on the result.', + }, + detail: { + type: UriScalar, + description: 'A link to further details on the result.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreportteardown.input.js b/src/resources/3_0_1/inputs/testreportteardown.input.js index e7ad9d6e..8f48b691 100644 --- a/src/resources/3_0_1/inputs/testreportteardown.input.js +++ b/src/resources/3_0_1/inputs/testreportteardown.input.js @@ -1,27 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestReport.teardown Input Schema + * @summary TestReportteardown Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportTeardown_Input', - description: - 'The results of the series of operations required to clean up after the all the tests were executed (successfully or otherwise).', - fields: () => - extendSchema(require('./backboneelement.input'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testreportteardownaction.input')), - ), - description: 'The teardown action will only contain an operation.', - }, - }), + name: 'TestReportteardown_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreportteardownaction.input.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreportteardownaction.input.js b/src/resources/3_0_1/inputs/testreportteardownaction.input.js index 7f34f7cd..0fb0d941 100644 --- a/src/resources/3_0_1/inputs/testreportteardownaction.input.js +++ b/src/resources/3_0_1/inputs/testreportteardownaction.input.js @@ -1,14 +1,36 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary TestReport.teardown.action Input Schema + * @summary TestReportteardownaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportTeardownAction_Input', - description: 'The teardown action will only contain an operation.', - fields: () => extendSchema(require('./backboneelement.input')), + name: 'TestReportteardownaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreporttest.input.js b/src/resources/3_0_1/inputs/testreporttest.input.js index 91f26215..16dd73bb 100644 --- a/src/resources/3_0_1/inputs/testreporttest.input.js +++ b/src/resources/3_0_1/inputs/testreporttest.input.js @@ -1,48 +1,63 @@ const { - GraphQLInputObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestReport.test Input Schema + * @summary TestReporttest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportTest_Input', - description: 'A test executed from the test script.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.input'), - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testreporttestaction.input')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestReporttest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreporttestaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testreporttestaction.input.js b/src/resources/3_0_1/inputs/testreporttestaction.input.js index 6d38b0be..42a8b1f3 100644 --- a/src/resources/3_0_1/inputs/testreporttestaction.input.js +++ b/src/resources/3_0_1/inputs/testreporttestaction.input.js @@ -1,14 +1,36 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary TestReport.test.action Input Schema + * @summary TestReporttestaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestReportTestAction_Input', - description: 'Action would contain either an operation or an assertion.', - fields: () => extendSchema(require('./backboneelement.input')), + name: 'TestReporttestaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscript.input.js b/src/resources/3_0_1/inputs/testscript.input.js index f308ae1c..08412d89 100644 --- a/src/resources/3_0_1/inputs/testscript.input.js +++ b/src/resources/3_0_1/inputs/testscript.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let TestScriptResourceInputType = new GraphQLEnumType({ - name: 'TestScriptResourceInputType', - values: { - TestScript: { value: 'TestScript' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,197 +17,255 @@ let TestScriptResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'TestScript_Input', - description: 'Base StructureDefinition for TestScript Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(TestScriptResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: require('./identifier.input'), - description: - 'A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the test script.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the test script.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this test script. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this test script. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', - }, - _date: { - type: require('./element.input'), - description: - 'The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the test script.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the test script.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the test script from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the test script from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the test script is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this test script is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this test script is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', - }, - origin: { - type: new GraphQLList(require('./testscriptorigin.input')), - description: - 'An abstract server used in operations within this test script in the origin element.', - }, - destination: { - type: new GraphQLList(require('./testscriptdestination.input')), - description: - 'An abstract server used in operations within this test script in the destination element.', - }, - metadata: { - type: require('./testscriptmetadata.input'), - description: - 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', - }, - fixture: { - type: new GraphQLList(require('./testscriptfixture.input')), - description: - 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', - }, - profile: { - type: new GraphQLList(require('./reference.input')), - description: 'Reference to the profile to be used for validation.', - }, - variable: { - type: new GraphQLList(require('./testscriptvariable.input')), - description: - 'Variable is set based either on element value in response body or on header field value in the response headers.', - }, - rule: { - type: new GraphQLList(require('./testscriptrule.input')), - description: - 'Assert rule to be used in one or more asserts within the test script.', - }, - ruleset: { - type: new GraphQLList(require('./testscriptruleset.input')), - description: - 'Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.', - }, - setup: { - type: require('./testscriptsetup.input'), - description: - 'A series of required setup operations before tests are executed.', - }, - test: { - type: new GraphQLList(require('./testscripttest.input')), - description: 'A test in this script.', - }, - teardown: { - type: require('./testscriptteardown.input'), - description: - 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', - }, - }), + description: 'Base StructureDefinition for TestScript Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestScript_Enum_input', + values: { TestScript: { value: 'TestScript' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the test script.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the test script.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this test script. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this test script. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the test script.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the test script.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the test script from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the test script from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the test script is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this test script is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this test script is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', + }, + origin: { + type: new GraphQLList(require('./testscriptorigin.input.js')), + description: + 'An abstract server used in operations within this test script in the origin element.', + }, + destination: { + type: new GraphQLList(require('./testscriptdestination.input.js')), + description: + 'An abstract server used in operations within this test script in the destination element.', + }, + metadata: { + type: require('./testscriptmetadata.input.js'), + description: + 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', + }, + fixture: { + type: new GraphQLList(require('./testscriptfixture.input.js')), + description: + 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', + }, + profile: { + type: new GraphQLList(GraphQLString), + description: 'Reference to the profile to be used for validation.', + }, + variable: { + type: new GraphQLList(require('./testscriptvariable.input.js')), + description: + 'Variable is set based either on element value in response body or on header field value in the response headers.', + }, + rule: { + type: new GraphQLList(require('./testscriptrule.input.js')), + description: + 'Assert rule to be used in one or more asserts within the test script.', + }, + ruleset: { + type: new GraphQLList(require('./testscriptruleset.input.js')), + description: + 'Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.', + }, + setup: { + type: require('./testscriptsetup.input.js'), + description: + 'A series of required setup operations before tests are executed.', + }, + test: { + type: new GraphQLList(require('./testscripttest.input.js')), + description: 'A test in this script.', + }, + teardown: { + type: require('./testscriptteardown.input.js'), + description: + 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptdestination.input.js b/src/resources/3_0_1/inputs/testscriptdestination.input.js index 722065ff..eaa34699 100644 --- a/src/resources/3_0_1/inputs/testscriptdestination.input.js +++ b/src/resources/3_0_1/inputs/testscriptdestination.input.js @@ -1,37 +1,53 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.destination Input Schema + * @summary TestScriptdestination Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptDestination_Input', - description: - 'An abstract server used in operations within this test script in the destination element.', - fields: () => - extendSchema(require('./backboneelement.input'), { - index: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', - }, - _index: { - type: require('./element.input'), - description: - 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/testscript-profile-destination-types - profile: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'The type of destination profile the test system supports.', - }, - }), + name: 'TestScriptdestination_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _index: { + type: require('./element.input.js'), + description: + 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', + }, + index: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/testscript-profile-destination-types + profile: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The type of destination profile the test system supports.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptfixture.input.js b/src/resources/3_0_1/inputs/testscriptfixture.input.js index 8c22bbee..0dd6e41b 100644 --- a/src/resources/3_0_1/inputs/testscriptfixture.input.js +++ b/src/resources/3_0_1/inputs/testscriptfixture.input.js @@ -1,42 +1,62 @@ -const { GraphQLInputObjectType, GraphQLBoolean } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.fixture Input Schema + * @summary TestScriptfixture Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptFixture_Input', - description: - 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', - fields: () => - extendSchema(require('./backboneelement.input'), { - autocreate: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', - }, - _autocreate: { - type: require('./element.input'), - description: - 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', - }, - autodelete: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', - }, - _autodelete: { - type: require('./element.input'), - description: - 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', - }, - resource: { - type: require('./reference.input'), - description: - 'Reference to the resource (containing the contents of the resource needed for operations).', - }, - }), + name: 'TestScriptfixture_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _autocreate: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + autocreate: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + _autodelete: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + autodelete: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + resource: { + type: GraphQLString, + description: + 'Reference to the resource (containing the contents of the resource needed for operations).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptmetadata.input.js b/src/resources/3_0_1/inputs/testscriptmetadata.input.js index 98149d45..e67de5e9 100644 --- a/src/resources/3_0_1/inputs/testscriptmetadata.input.js +++ b/src/resources/3_0_1/inputs/testscriptmetadata.input.js @@ -1,33 +1,49 @@ const { - GraphQLInputObjectType, + GraphQLString, GraphQLList, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.metadata Input Schema + * @summary TestScriptmetadata Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptMetadata_Input', - description: - 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', - fields: () => - extendSchema(require('./backboneelement.input'), { - link: { - type: new GraphQLList(require('./testscriptmetadatalink.input')), - description: - 'A link to the FHIR specification that this test is covering.', - }, - capability: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptmetadatacapability.input')), - ), - description: - 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', - }, - }), + name: 'TestScriptmetadata_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + link: { + type: new GraphQLList(require('./testscriptmetadatalink.input.js')), + description: + 'A link to the FHIR specification that this test is covering.', + }, + capability: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptmetadatacapability.input.js')), + ), + description: + 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptmetadatacapability.input.js b/src/resources/3_0_1/inputs/testscriptmetadatacapability.input.js index 141ae5af..4a208fce 100644 --- a/src/resources/3_0_1/inputs/testscriptmetadatacapability.input.js +++ b/src/resources/3_0_1/inputs/testscriptmetadatacapability.input.js @@ -1,86 +1,101 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLBoolean, GraphQLInt, GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestScript.metadata.capability Input Schema + * @summary TestScriptmetadatacapability Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptMetadataCapability_Input', - description: - 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', - fields: () => - extendSchema(require('./backboneelement.input'), { - required: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', - }, - _required: { - type: require('./element.input'), - description: - 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', - }, - validated: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', - }, - _validated: { - type: require('./element.input'), - description: - 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', - }, - description: { - type: GraphQLString, - description: - 'Description of the capabilities that this test script is requiring the server to support.', - }, - _description: { - type: require('./element.input'), - description: - 'Description of the capabilities that this test script is requiring the server to support.', - }, - origin: { - type: new GraphQLList(GraphQLInt), - description: 'Which origin server these requirements apply to.', - }, - _origin: { - type: require('./element.input'), - description: 'Which origin server these requirements apply to.', - }, - destination: { - type: GraphQLInt, - description: 'Which server these requirements apply to.', - }, - _destination: { - type: require('./element.input'), - description: 'Which server these requirements apply to.', - }, - link: { - type: new GraphQLList(UriScalar), - description: - 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', - }, - _link: { - type: require('./element.input'), - description: - 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', - }, - capabilities: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', - }, - }), + name: 'TestScriptmetadatacapability_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _required: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + required: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + _validated: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + validated: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + description: { + type: GraphQLString, + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + _origin: { + type: require('./element.input.js'), + description: 'Which origin server these requirements apply to.', + }, + origin: { + type: new GraphQLList(GraphQLInt), + description: 'Which origin server these requirements apply to.', + }, + _destination: { + type: require('./element.input.js'), + description: 'Which server these requirements apply to.', + }, + destination: { + type: GraphQLInt, + description: 'Which server these requirements apply to.', + }, + _link: { + type: require('./element.input.js'), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + link: { + type: new GraphQLList(UriScalar), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + capabilities: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptmetadatalink.input.js b/src/resources/3_0_1/inputs/testscriptmetadatalink.input.js index 6e88d8a8..96c0e66e 100644 --- a/src/resources/3_0_1/inputs/testscriptmetadatalink.input.js +++ b/src/resources/3_0_1/inputs/testscriptmetadatalink.input.js @@ -1,39 +1,56 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestScript.metadata.link Input Schema + * @summary TestScriptmetadatalink Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptMetadataLink_Input', - description: 'A link to the FHIR specification that this test is covering.', - fields: () => - extendSchema(require('./backboneelement.input'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'URL to a particular requirement or feature within the FHIR specification.', - }, - _url: { - type: require('./element.input'), - description: - 'URL to a particular requirement or feature within the FHIR specification.', - }, - description: { - type: GraphQLString, - description: 'Short description of the link.', - }, - _description: { - type: require('./element.input'), - description: 'Short description of the link.', - }, - }), + name: 'TestScriptmetadatalink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + _description: { + type: require('./element.input.js'), + description: 'Short description of the link.', + }, + description: { + type: GraphQLString, + description: 'Short description of the link.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptorigin.input.js b/src/resources/3_0_1/inputs/testscriptorigin.input.js index 5685bcdb..d5a1d211 100644 --- a/src/resources/3_0_1/inputs/testscriptorigin.input.js +++ b/src/resources/3_0_1/inputs/testscriptorigin.input.js @@ -1,36 +1,53 @@ const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.origin Input Schema + * @summary TestScriptorigin Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptOrigin_Input', - description: - 'An abstract server used in operations within this test script in the origin element.', - fields: () => - extendSchema(require('./backboneelement.input'), { - index: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', - }, - _index: { - type: require('./element.input'), - description: - 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/testscript-profile-origin-types - profile: { - type: new GraphQLNonNull(require('./coding.input')), - description: 'The type of origin profile the test system supports.', - }, - }), + name: 'TestScriptorigin_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _index: { + type: require('./element.input.js'), + description: + 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', + }, + index: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/testscript-profile-origin-types + profile: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The type of origin profile the test system supports.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptrule.input.js b/src/resources/3_0_1/inputs/testscriptrule.input.js index 06c933b9..bb1525a7 100644 --- a/src/resources/3_0_1/inputs/testscriptrule.input.js +++ b/src/resources/3_0_1/inputs/testscriptrule.input.js @@ -1,31 +1,47 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.rule Input Schema + * @summary TestScriptrule Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptRule_Input', - description: - 'Assert rule to be used in one or more asserts within the test script.', - fields: () => - extendSchema(require('./backboneelement.input'), { - resource: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Reference to the resource (containing the contents of the rule needed for assertions).', - }, - param: { - type: new GraphQLList(require('./testscriptruleparam.input')), - description: - 'Each rule template can take one or more parameters for rule evaluation.', - }, - }), + name: 'TestScriptrule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + resource: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to the resource (containing the contents of the rule needed for assertions).', + }, + param: { + type: new GraphQLList(require('./testscriptruleparam.input.js')), + description: + 'Each rule template can take one or more parameters for rule evaluation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptruleparam.input.js b/src/resources/3_0_1/inputs/testscriptruleparam.input.js index 855975e9..20155eec 100644 --- a/src/resources/3_0_1/inputs/testscriptruleparam.input.js +++ b/src/resources/3_0_1/inputs/testscriptruleparam.input.js @@ -1,41 +1,57 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.rule.param Input Schema + * @summary TestScriptruleparam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptRuleParam_Input', - description: - 'Each rule template can take one or more parameters for rule evaluation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Descriptive name for this parameter that matches the external assert rule parameter name.', - }, - _name: { - type: require('./element.input'), - description: - 'Descriptive name for this parameter that matches the external assert rule parameter name.', - }, - value: { - type: GraphQLString, - description: - 'The explicit or dynamic value for the parameter that will be passed on to the external rule template.', - }, - _value: { - type: require('./element.input'), - description: - 'The explicit or dynamic value for the parameter that will be passed on to the external rule template.', - }, - }), + name: 'TestScriptruleparam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Descriptive name for this parameter that matches the external assert rule parameter name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Descriptive name for this parameter that matches the external assert rule parameter name.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The explicit or dynamic value for the parameter that will be passed on to the external rule template.', + }, + value: { + type: GraphQLString, + description: + 'The explicit or dynamic value for the parameter that will be passed on to the external rule template.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptruleset.input.js b/src/resources/3_0_1/inputs/testscriptruleset.input.js index dffcbc49..1fe2b41f 100644 --- a/src/resources/3_0_1/inputs/testscriptruleset.input.js +++ b/src/resources/3_0_1/inputs/testscriptruleset.input.js @@ -1,33 +1,48 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.ruleset Input Schema + * @summary TestScriptruleset Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptRuleset_Input', - description: - 'Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.', - fields: () => - extendSchema(require('./backboneelement.input'), { - resource: { - type: new GraphQLNonNull(require('./reference.input')), - description: - 'Reference to the resource (containing the contents of the ruleset needed for assertions).', - }, - rule: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptrulesetrule.input')), - ), - description: - 'The referenced rule within the external ruleset template.', - }, - }), + name: 'TestScriptruleset_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + resource: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to the resource (containing the contents of the ruleset needed for assertions).', + }, + rule: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptrulesetrule.input.js')), + ), + description: 'The referenced rule within the external ruleset template.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptrulesetrule.input.js b/src/resources/3_0_1/inputs/testscriptrulesetrule.input.js index e9de951c..7bc91cfb 100644 --- a/src/resources/3_0_1/inputs/testscriptrulesetrule.input.js +++ b/src/resources/3_0_1/inputs/testscriptrulesetrule.input.js @@ -1,36 +1,53 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.ruleset.rule Input Schema + * @summary TestScriptrulesetrule Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptRulesetRule_Input', - description: 'The referenced rule within the external ruleset template.', - fields: () => - extendSchema(require('./backboneelement.input'), { - ruleId: { - type: new GraphQLNonNull(IdScalar), - description: - 'Id of the referenced rule within the external ruleset template.', - }, - _ruleId: { - type: require('./element.input'), - description: - 'Id of the referenced rule within the external ruleset template.', - }, - param: { - type: new GraphQLList(require('./testscriptrulesetruleparam.input')), - description: - 'Each rule template can take one or more parameters for rule evaluation.', - }, - }), + name: 'TestScriptrulesetrule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _ruleId: { + type: require('./element.input.js'), + description: + 'Id of the referenced rule within the external ruleset template.', + }, + ruleId: { + type: new GraphQLNonNull(IdScalar), + description: + 'Id of the referenced rule within the external ruleset template.', + }, + param: { + type: new GraphQLList(require('./testscriptrulesetruleparam.input.js')), + description: + 'Each rule template can take one or more parameters for rule evaluation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptrulesetruleparam.input.js b/src/resources/3_0_1/inputs/testscriptrulesetruleparam.input.js index 36394139..08ed85af 100644 --- a/src/resources/3_0_1/inputs/testscriptrulesetruleparam.input.js +++ b/src/resources/3_0_1/inputs/testscriptrulesetruleparam.input.js @@ -1,41 +1,57 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.ruleset.rule.param Input Schema + * @summary TestScriptrulesetruleparam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptRulesetRuleParam_Input', - description: - 'Each rule template can take one or more parameters for rule evaluation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', - }, - _name: { - type: require('./element.input'), - description: - 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', - }, - value: { - type: GraphQLString, - description: - 'The value for the parameter that will be passed on to the external ruleset rule template.', - }, - _value: { - type: require('./element.input'), - description: - 'The value for the parameter that will be passed on to the external ruleset rule template.', - }, - }), + name: 'TestScriptrulesetruleparam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value for the parameter that will be passed on to the external ruleset rule template.', + }, + value: { + type: GraphQLString, + description: + 'The value for the parameter that will be passed on to the external ruleset rule template.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetup.input.js b/src/resources/3_0_1/inputs/testscriptsetup.input.js index f3bacf9f..b0d1f278 100644 --- a/src/resources/3_0_1/inputs/testscriptsetup.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetup.input.js @@ -1,28 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.setup Input Schema + * @summary TestScriptsetup Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetup_Input', - description: - 'A series of required setup operations before tests are executed.', - fields: () => - extendSchema(require('./backboneelement.input'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptsetupaction.input')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestScriptsetup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptsetupaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupaction.input.js b/src/resources/3_0_1/inputs/testscriptsetupaction.input.js index 71dc28c5..bc994f14 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupaction.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupaction.input.js @@ -1,25 +1,45 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.setup.action Input Schema + * @summary TestScriptsetupaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupAction_Input', - description: 'Action would contain either an operation or an assertion.', - fields: () => - extendSchema(require('./backboneelement.input'), { - operation: { - type: require('./testscriptsetupactionoperation.input'), - description: 'The operation to perform.', - }, - assert: { - type: require('./testscriptsetupactionassert.input'), - description: - 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', - }, - }), + name: 'TestScriptsetupaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + operation: { + type: require('./testscriptsetupactionoperation.input.js'), + description: 'The operation to perform.', + }, + assert: { + type: require('./testscriptsetupactionassert.input.js'), + description: + 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupactionassert.input.js b/src/resources/3_0_1/inputs/testscriptsetupactionassert.input.js index 519ae516..d20fb360 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupactionassert.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupactionassert.input.js @@ -1,247 +1,263 @@ -const CodeScalar = require('../scalars/code.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert Input Schema + * @summary TestScriptsetupactionassert Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionAssert_Input', - description: - 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', - fields: () => - extendSchema(require('./backboneelement.input'), { - label: { - type: GraphQLString, - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - _label: { - type: require('./element.input'), - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.input'), - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-direction-codes - direction: { - type: CodeScalar, - description: 'The direction to use for the assertion.', - }, - _direction: { - type: require('./element.input'), - description: 'The direction to use for the assertion.', - }, - compareToSourceId: { - type: GraphQLString, - description: - "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", - }, - _compareToSourceId: { - type: require('./element.input'), - description: - "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", - }, - compareToSourceExpression: { - type: GraphQLString, - description: - 'The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', - }, - _compareToSourceExpression: { - type: require('./element.input'), - description: - 'The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', - }, - compareToSourcePath: { - type: GraphQLString, - description: - 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', - }, - _compareToSourcePath: { - type: require('./element.input'), - description: - 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - contentType: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - _contentType: { - type: require('./element.input'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - expression: { - type: GraphQLString, - description: - 'The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.', - }, - _expression: { - type: require('./element.input'), - description: - 'The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.', - }, - headerField: { - type: GraphQLString, - description: "The HTTP header field name e.g. 'Location'.", - }, - _headerField: { - type: require('./element.input'), - description: "The HTTP header field name e.g. 'Location'.", - }, - minimumId: { - type: GraphQLString, - description: - 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', - }, - _minimumId: { - type: require('./element.input'), - description: - 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', - }, - navigationLinks: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution performs validation on the bundle navigation links.', - }, - _navigationLinks: { - type: require('./element.input'), - description: - 'Whether or not the test execution performs validation on the bundle navigation links.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-operator-codes - operator: { - type: CodeScalar, - description: - 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', - }, - _operator: { - type: require('./element.input'), - description: - 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', - }, - path: { - type: GraphQLString, - description: - 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', - }, - _path: { - type: require('./element.input'), - description: - 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/http-operations - requestMethod: { - type: CodeScalar, - description: - 'The request method or HTTP operation code to compare against that used by the client system under test.', - }, - _requestMethod: { - type: require('./element.input'), - description: - 'The request method or HTTP operation code to compare against that used by the client system under test.', - }, - requestURL: { - type: GraphQLString, - description: - 'The value to use in a comparison against the request URL path string.', - }, - _requestURL: { - type: require('./element.input'), - description: - 'The value to use in a comparison against the request URL path string.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - resource: { - type: CodeScalar, - description: - 'The type of the resource. See http://build.fhir.org/resourcelist.html.', - }, - _resource: { - type: require('./element.input'), - description: - 'The type of the resource. See http://build.fhir.org/resourcelist.html.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-response-code-types - response: { - type: CodeScalar, - description: - 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', - }, - _response: { - type: require('./element.input'), - description: - 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', - }, - responseCode: { - type: GraphQLString, - description: 'The value of the HTTP response code to be tested.', - }, - _responseCode: { - type: require('./element.input'), - description: 'The value of the HTTP response code to be tested.', - }, - rule: { - type: require('./testscriptsetupactionassertrule.input'), - description: 'The TestScript.rule this assert will evaluate.', - }, - ruleset: { - type: require('./testscriptsetupactionassertruleset.input'), - description: 'The TestScript.ruleset this assert will evaluate.', - }, - sourceId: { - type: IdScalar, - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', - }, - _sourceId: { - type: require('./element.input'), - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', - }, - validateProfileId: { - type: IdScalar, - description: 'The ID of the Profile to validate against.', - }, - _validateProfileId: { - type: require('./element.input'), - description: 'The ID of the Profile to validate against.', - }, - value: { - type: GraphQLString, - description: 'The value to compare to.', - }, - _value: { - type: require('./element.input'), - description: 'The value to compare to.', - }, - warningOnly: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will produce a warning only on error for this assert.', - }, - _warningOnly: { - type: require('./element.input'), - description: - 'Whether or not the test execution will produce a warning only on error for this assert.', - }, - }), + name: 'TestScriptsetupactionassert_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _label: { + type: require('./element.input.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _direction: { + type: require('./element.input.js'), + description: 'The direction to use for the assertion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-direction-codes + direction: { + type: CodeScalar, + description: 'The direction to use for the assertion.', + }, + _compareToSourceId: { + type: require('./element.input.js'), + description: + "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", + }, + compareToSourceId: { + type: GraphQLString, + description: + "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", + }, + _compareToSourceExpression: { + type: require('./element.input.js'), + description: + 'The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + compareToSourceExpression: { + type: GraphQLString, + description: + 'The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + _compareToSourcePath: { + type: require('./element.input.js'), + description: + 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + compareToSourcePath: { + type: GraphQLString, + description: + 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + _contentType: { + type: require('./element.input.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + contentType: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _expression: { + type: require('./element.input.js'), + description: + 'The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.', + }, + expression: { + type: GraphQLString, + description: + 'The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.', + }, + _headerField: { + type: require('./element.input.js'), + description: "The HTTP header field name e.g. 'Location'.", + }, + headerField: { + type: GraphQLString, + description: "The HTTP header field name e.g. 'Location'.", + }, + _minimumId: { + type: require('./element.input.js'), + description: + 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', + }, + minimumId: { + type: GraphQLString, + description: + 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', + }, + _navigationLinks: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + navigationLinks: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + _operator: { + type: require('./element.input.js'), + description: + 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-operator-codes + operator: { + type: CodeScalar, + description: + 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + path: { + type: GraphQLString, + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + _requestMethod: { + type: require('./element.input.js'), + description: + 'The request method or HTTP operation code to compare against that used by the client system under test.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/http-operations + requestMethod: { + type: CodeScalar, + description: + 'The request method or HTTP operation code to compare against that used by the client system under test.', + }, + _requestURL: { + type: require('./element.input.js'), + description: + 'The value to use in a comparison against the request URL path string.', + }, + requestURL: { + type: GraphQLString, + description: + 'The value to use in a comparison against the request URL path string.', + }, + _resource: { + type: require('./element.input.js'), + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + _response: { + type: require('./element.input.js'), + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-response-code-types + response: { + type: CodeScalar, + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + _responseCode: { + type: require('./element.input.js'), + description: 'The value of the HTTP response code to be tested.', + }, + responseCode: { + type: GraphQLString, + description: 'The value of the HTTP response code to be tested.', + }, + rule: { + type: require('./testscriptsetupactionassertrule.input.js'), + description: 'The TestScript.rule this assert will evaluate.', + }, + ruleset: { + type: require('./testscriptsetupactionassertruleset.input.js'), + description: 'The TestScript.ruleset this assert will evaluate.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + _validateProfileId: { + type: require('./element.input.js'), + description: 'The ID of the Profile to validate against.', + }, + validateProfileId: { + type: IdScalar, + description: 'The ID of the Profile to validate against.', + }, + _value: { + type: require('./element.input.js'), + description: 'The value to compare to.', + }, + value: { + type: GraphQLString, + description: 'The value to compare to.', + }, + _warningOnly: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + warningOnly: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupactionassertrule.input.js b/src/resources/3_0_1/inputs/testscriptsetupactionassertrule.input.js index fcb1f46c..ff239658 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupactionassertrule.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupactionassertrule.input.js @@ -1,36 +1,53 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert.rule Input Schema + * @summary TestScriptsetupactionassertrule Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionAssertRule_Input', - description: 'The TestScript.rule this assert will evaluate.', - fields: () => - extendSchema(require('./backboneelement.input'), { - ruleId: { - type: new GraphQLNonNull(IdScalar), - description: 'The TestScript.rule id value this assert will evaluate.', - }, - _ruleId: { - type: require('./element.input'), - description: 'The TestScript.rule id value this assert will evaluate.', - }, - param: { - type: new GraphQLList( - require('./testscriptsetupactionassertruleparam.input'), - ), - description: - 'Each rule template can take one or more parameters for rule evaluation.', - }, - }), + name: 'TestScriptsetupactionassertrule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _ruleId: { + type: require('./element.input.js'), + description: 'The TestScript.rule id value this assert will evaluate.', + }, + ruleId: { + type: new GraphQLNonNull(IdScalar), + description: 'The TestScript.rule id value this assert will evaluate.', + }, + param: { + type: new GraphQLList( + require('./testscriptsetupactionassertruleparam.input.js'), + ), + description: + 'Each rule template can take one or more parameters for rule evaluation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupactionassertruleparam.input.js b/src/resources/3_0_1/inputs/testscriptsetupactionassertruleparam.input.js index 1ad0e663..d365fccd 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupactionassertruleparam.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupactionassertruleparam.input.js @@ -1,41 +1,57 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.setup.action.assert.rule.param Input Schema + * @summary TestScriptsetupactionassertruleparam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionAssertRuleParam_Input', - description: - 'Each rule template can take one or more parameters for rule evaluation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Descriptive name for this parameter that matches the external assert rule parameter name.', - }, - _name: { - type: require('./element.input'), - description: - 'Descriptive name for this parameter that matches the external assert rule parameter name.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The value for the parameter that will be passed on to the external rule template.', - }, - _value: { - type: require('./element.input'), - description: - 'The value for the parameter that will be passed on to the external rule template.', - }, - }), + name: 'TestScriptsetupactionassertruleparam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Descriptive name for this parameter that matches the external assert rule parameter name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Descriptive name for this parameter that matches the external assert rule parameter name.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value for the parameter that will be passed on to the external rule template.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The value for the parameter that will be passed on to the external rule template.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupactionassertruleset.input.js b/src/resources/3_0_1/inputs/testscriptsetupactionassertruleset.input.js index 7e5a12db..e8c46f01 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupactionassertruleset.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupactionassertruleset.input.js @@ -1,38 +1,52 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert.ruleset Input Schema + * @summary TestScriptsetupactionassertruleset Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionAssertRuleset_Input', - description: 'The TestScript.ruleset this assert will evaluate.', - fields: () => - extendSchema(require('./backboneelement.input'), { - rulesetId: { - type: new GraphQLNonNull(IdScalar), - description: - 'The TestScript.ruleset id value this assert will evaluate.', - }, - _rulesetId: { - type: require('./element.input'), - description: - 'The TestScript.ruleset id value this assert will evaluate.', - }, - rule: { - type: new GraphQLList( - require('./testscriptsetupactionassertrulesetrule.input'), - ), - description: - 'The referenced rule within the external ruleset template.', - }, - }), + name: 'TestScriptsetupactionassertruleset_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _rulesetId: { + type: require('./element.input.js'), + description: 'The TestScript.ruleset id value this assert will evaluate.', + }, + rulesetId: { + type: new GraphQLNonNull(IdScalar), + description: 'The TestScript.ruleset id value this assert will evaluate.', + }, + rule: { + type: new GraphQLList( + require('./testscriptsetupactionassertrulesetrule.input.js'), + ), + description: 'The referenced rule within the external ruleset template.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupactionassertrulesetrule.input.js b/src/resources/3_0_1/inputs/testscriptsetupactionassertrulesetrule.input.js index 2fae623c..0d69c9c6 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupactionassertrulesetrule.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupactionassertrulesetrule.input.js @@ -1,38 +1,55 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert.ruleset.rule Input Schema + * @summary TestScriptsetupactionassertrulesetrule Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionAssertRulesetRule_Input', - description: 'The referenced rule within the external ruleset template.', - fields: () => - extendSchema(require('./backboneelement.input'), { - ruleId: { - type: new GraphQLNonNull(IdScalar), - description: - 'Id of the referenced rule within the external ruleset template.', - }, - _ruleId: { - type: require('./element.input'), - description: - 'Id of the referenced rule within the external ruleset template.', - }, - param: { - type: new GraphQLList( - require('./testscriptsetupactionassertrulesetruleparam.input'), - ), - description: - 'Each rule template can take one or more parameters for rule evaluation.', - }, - }), + name: 'TestScriptsetupactionassertrulesetrule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _ruleId: { + type: require('./element.input.js'), + description: + 'Id of the referenced rule within the external ruleset template.', + }, + ruleId: { + type: new GraphQLNonNull(IdScalar), + description: + 'Id of the referenced rule within the external ruleset template.', + }, + param: { + type: new GraphQLList( + require('./testscriptsetupactionassertrulesetruleparam.input.js'), + ), + description: + 'Each rule template can take one or more parameters for rule evaluation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupactionassertrulesetruleparam.input.js b/src/resources/3_0_1/inputs/testscriptsetupactionassertrulesetruleparam.input.js index 2c616f80..0abfd6be 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupactionassertrulesetruleparam.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupactionassertrulesetruleparam.input.js @@ -1,41 +1,57 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.setup.action.assert.ruleset.rule.param Input Schema + * @summary TestScriptsetupactionassertrulesetruleparam Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionAssertRulesetRuleParam_Input', - description: - 'Each rule template can take one or more parameters for rule evaluation.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', - }, - _name: { - type: require('./element.input'), - description: - 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The value for the parameter that will be passed on to the external ruleset rule template.', - }, - _value: { - type: require('./element.input'), - description: - 'The value for the parameter that will be passed on to the external ruleset rule template.', - }, - }), + name: 'TestScriptsetupactionassertrulesetruleparam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value for the parameter that will be passed on to the external ruleset rule template.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The value for the parameter that will be passed on to the external ruleset rule template.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupactionoperation.input.js b/src/resources/3_0_1/inputs/testscriptsetupactionoperation.input.js index f3924963..f8e1a903 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupactionoperation.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupactionoperation.input.js @@ -1,172 +1,188 @@ -const CodeScalar = require('../scalars/code.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, GraphQLString, + GraphQLList, GraphQLInt, GraphQLBoolean, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.operation Input Schema + * @summary TestScriptsetupactionoperation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionOperation_Input', - description: 'The operation to perform.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/testscript-operation-codes - type: { - type: require('./coding.input'), - description: 'Server interaction or operation type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - resource: { - type: CodeScalar, - description: - 'The type of the resource. See http://build.fhir.org/resourcelist.html.', - }, - _resource: { - type: require('./element.input'), - description: - 'The type of the resource. See http://build.fhir.org/resourcelist.html.', - }, - label: { - type: GraphQLString, - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - _label: { - type: require('./element.input'), - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.input'), - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - accept: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", - }, - _accept: { - type: require('./element.input'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - contentType: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - _contentType: { - type: require('./element.input'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - destination: { - type: GraphQLInt, - description: - 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', - }, - _destination: { - type: require('./element.input'), - description: - 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', - }, - encodeRequestUrl: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', - }, - _encodeRequestUrl: { - type: require('./element.input'), - description: - 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', - }, - origin: { - type: GraphQLInt, - description: - 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', - }, - _origin: { - type: require('./element.input'), - description: - 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', - }, - params: { - type: GraphQLString, - description: - 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', - }, - _params: { - type: require('./element.input'), - description: - 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', - }, - requestHeader: { - type: new GraphQLList( - require('./testscriptsetupactionoperationrequestheader.input'), - ), - description: 'Header elements would be used to set HTTP headers.', - }, - requestId: { - type: IdScalar, - description: 'The fixture id (maybe new) to map to the request.', - }, - _requestId: { - type: require('./element.input'), - description: 'The fixture id (maybe new) to map to the request.', - }, - responseId: { - type: IdScalar, - description: 'The fixture id (maybe new) to map to the response.', - }, - _responseId: { - type: require('./element.input'), - description: 'The fixture id (maybe new) to map to the response.', - }, - sourceId: { - type: IdScalar, - description: - 'The id of the fixture used as the body of a PUT or POST request.', - }, - _sourceId: { - type: require('./element.input'), - description: - 'The id of the fixture used as the body of a PUT or POST request.', - }, - targetId: { - type: IdScalar, - description: - 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', - }, - _targetId: { - type: require('./element.input'), - description: - 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', - }, - url: { - type: GraphQLString, - description: 'Complete request URL.', - }, - _url: { - type: require('./element.input'), - description: 'Complete request URL.', - }, - }), + name: 'TestScriptsetupactionoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/testscript-operation-codes + type: { + type: require('./coding.input.js'), + description: 'Server interaction or operation type.', + }, + _resource: { + type: require('./element.input.js'), + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + _label: { + type: require('./element.input.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _accept: { + type: require('./element.input.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + accept: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", + }, + _contentType: { + type: require('./element.input.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + contentType: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _destination: { + type: require('./element.input.js'), + description: + 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', + }, + destination: { + type: GraphQLInt, + description: + 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', + }, + _encodeRequestUrl: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + encodeRequestUrl: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + _origin: { + type: require('./element.input.js'), + description: + 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', + }, + origin: { + type: GraphQLInt, + description: + 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', + }, + _params: { + type: require('./element.input.js'), + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + params: { + type: GraphQLString, + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + requestHeader: { + type: new GraphQLList( + require('./testscriptsetupactionoperationrequestheader.input.js'), + ), + description: 'Header elements would be used to set HTTP headers.', + }, + _requestId: { + type: require('./element.input.js'), + description: 'The fixture id (maybe new) to map to the request.', + }, + requestId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the request.', + }, + _responseId: { + type: require('./element.input.js'), + description: 'The fixture id (maybe new) to map to the response.', + }, + responseId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the response.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + sourceId: { + type: IdScalar, + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + _targetId: { + type: require('./element.input.js'), + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + targetId: { + type: IdScalar, + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + _url: { + type: require('./element.input.js'), + description: 'Complete request URL.', + }, + url: { + type: GraphQLString, + description: 'Complete request URL.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptsetupactionoperationrequestheader.input.js b/src/resources/3_0_1/inputs/testscriptsetupactionoperationrequestheader.input.js index a6a60815..bd1bae27 100644 --- a/src/resources/3_0_1/inputs/testscriptsetupactionoperationrequestheader.input.js +++ b/src/resources/3_0_1/inputs/testscriptsetupactionoperationrequestheader.input.js @@ -1,36 +1,53 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.setup.action.operation.requestHeader Input Schema + * @summary TestScriptsetupactionoperationrequestHeader Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptSetupActionOperationRequestHeader_Input', - description: 'Header elements would be used to set HTTP headers.', - fields: () => - extendSchema(require('./backboneelement.input'), { - field: { - type: new GraphQLNonNull(GraphQLString), - description: "The HTTP header field e.g. 'Accept'.", - }, - _field: { - type: require('./element.input'), - description: "The HTTP header field e.g. 'Accept'.", - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: "The value of the header e.g. 'application/fhir+xml'.", - }, - _value: { - type: require('./element.input'), - description: "The value of the header e.g. 'application/fhir+xml'.", - }, - }), + name: 'TestScriptsetupactionoperationrequestHeader_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _field: { + type: require('./element.input.js'), + description: "The HTTP header field e.g. 'Accept'.", + }, + field: { + type: new GraphQLNonNull(GraphQLString), + description: "The HTTP header field e.g. 'Accept'.", + }, + _value: { + type: require('./element.input.js'), + description: "The value of the header e.g. 'application/fhir+xml'.", + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: "The value of the header e.g. 'application/fhir+xml'.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptteardown.input.js b/src/resources/3_0_1/inputs/testscriptteardown.input.js index 2cbc6e3e..d3ca99b5 100644 --- a/src/resources/3_0_1/inputs/testscriptteardown.input.js +++ b/src/resources/3_0_1/inputs/testscriptteardown.input.js @@ -1,27 +1,43 @@ const { - GraphQLInputObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.teardown Input Schema + * @summary TestScriptteardown Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptTeardown_Input', - description: - 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', - fields: () => - extendSchema(require('./backboneelement.input'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptteardownaction.input')), - ), - description: 'The teardown action will only contain an operation.', - }, - }), + name: 'TestScriptteardown_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptteardownaction.input.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptteardownaction.input.js b/src/resources/3_0_1/inputs/testscriptteardownaction.input.js index 2001ad64..26f8d4c9 100644 --- a/src/resources/3_0_1/inputs/testscriptteardownaction.input.js +++ b/src/resources/3_0_1/inputs/testscriptteardownaction.input.js @@ -1,14 +1,36 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.teardown.action Input Schema + * @summary TestScriptteardownaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptTeardownAction_Input', - description: 'The teardown action will only contain an operation.', - fields: () => extendSchema(require('./backboneelement.input')), + name: 'TestScriptteardownaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscripttest.input.js b/src/resources/3_0_1/inputs/testscripttest.input.js index 99950f2e..7a5565be 100644 --- a/src/resources/3_0_1/inputs/testscripttest.input.js +++ b/src/resources/3_0_1/inputs/testscripttest.input.js @@ -1,48 +1,63 @@ const { - GraphQLInputObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.test Input Schema + * @summary TestScripttest Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptTest_Input', - description: 'A test in this script.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: GraphQLString, - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - _name: { - type: require('./element.input'), - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.input'), - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscripttestaction.input')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestScripttest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscripttestaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscripttestaction.input.js b/src/resources/3_0_1/inputs/testscripttestaction.input.js index c39d3bf0..74a20c11 100644 --- a/src/resources/3_0_1/inputs/testscripttestaction.input.js +++ b/src/resources/3_0_1/inputs/testscripttestaction.input.js @@ -1,14 +1,36 @@ -const { GraphQLInputObjectType } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.test.action Input Schema + * @summary TestScripttestaction Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptTestAction_Input', - description: 'Action would contain either an operation or an assertion.', - fields: () => extendSchema(require('./backboneelement.input')), + name: 'TestScripttestaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/testscriptvariable.input.js b/src/resources/3_0_1/inputs/testscriptvariable.input.js index 1e81c801..c5fc200c 100644 --- a/src/resources/3_0_1/inputs/testscriptvariable.input.js +++ b/src/resources/3_0_1/inputs/testscriptvariable.input.js @@ -1,100 +1,116 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.variable Input Schema + * @summary TestScriptvariable Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TestScriptVariable_Input', - description: - 'Variable is set based either on element value in response body or on header field value in the response headers.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Descriptive name for this variable.', - }, - _name: { - type: require('./element.input'), - description: 'Descriptive name for this variable.', - }, - defaultValue: { - type: GraphQLString, - description: - 'A default, hard-coded, or user-defined value for this variable.', - }, - _defaultValue: { - type: require('./element.input'), - description: - 'A default, hard-coded, or user-defined value for this variable.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the variable and its purpose.', - }, - _description: { - type: require('./element.input'), - description: - 'A free text natural language description of the variable and its purpose.', - }, - expression: { - type: GraphQLString, - description: - 'The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', - }, - _expression: { - type: require('./element.input'), - description: - 'The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', - }, - headerField: { - type: GraphQLString, - description: - 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', - }, - _headerField: { - type: require('./element.input'), - description: - 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', - }, - hint: { - type: GraphQLString, - description: - 'Displayable text string with hint help information to the user when entering a default value.', - }, - _hint: { - type: require('./element.input'), - description: - 'Displayable text string with hint help information to the user when entering a default value.', - }, - path: { - type: GraphQLString, - description: - 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', - }, - _path: { - type: require('./element.input'), - description: - 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', - }, - sourceId: { - type: IdScalar, - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', - }, - _sourceId: { - type: require('./element.input'), - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', - }, - }), + name: 'TestScriptvariable_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'Descriptive name for this variable.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Descriptive name for this variable.', + }, + _defaultValue: { + type: require('./element.input.js'), + description: + 'A default, hard-coded, or user-defined value for this variable.', + }, + defaultValue: { + type: GraphQLString, + description: + 'A default, hard-coded, or user-defined value for this variable.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A free text natural language description of the variable and its purpose.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the variable and its purpose.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + expression: { + type: GraphQLString, + description: + 'The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + _headerField: { + type: require('./element.input.js'), + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + headerField: { + type: GraphQLString, + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + _hint: { + type: require('./element.input.js'), + description: + 'Displayable text string with hint help information to the user when entering a default value.', + }, + hint: { + type: GraphQLString, + description: + 'Displayable text string with hint help information to the user when entering a default value.', + }, + _path: { + type: require('./element.input.js'), + description: + 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + path: { + type: GraphQLString, + description: + 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/timing.input.js b/src/resources/3_0_1/inputs/timing.input.js index 0dd556b8..69fb2d0d 100644 --- a/src/resources/3_0_1/inputs/timing.input.js +++ b/src/resources/3_0_1/inputs/timing.input.js @@ -1,8 +1,9 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLInputObjectType, GraphQLList } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -10,27 +11,40 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'Timing_Input', - description: 'Base StructureDefinition for Timing Type.', - fields: () => - extendSchema(require('./element.input'), { - event: { - type: new GraphQLList(DateTimeScalar), - description: 'Identifies specific times when the event occurs.', - }, - _event: { - type: require('./element.input'), - description: 'Identifies specific times when the event occurs.', - }, - repeat: { - type: require('./timingrepeat.input'), - description: - 'A set of rules that describe when the event is scheduled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/timing-abbreviation - code: { - type: require('./codeableconcept.input'), - description: - 'A code for the timing schedule. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).', - }, - }), + description: 'Base StructureDefinition for Timing Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _event: { + type: require('./element.input.js'), + description: 'Identifies specific times when the event occurs.', + }, + event: { + type: new GraphQLList(DateTimeScalar), + description: 'Identifies specific times when the event occurs.', + }, + repeat: { + type: require('./element.input.js'), + description: 'A set of rules that describe when the event is scheduled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/timing-abbreviation + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code for the timing schedule. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/timingrepeat.input.js b/src/resources/3_0_1/inputs/timingrepeat.input.js index 8031ec73..25f47758 100644 --- a/src/resources/3_0_1/inputs/timingrepeat.input.js +++ b/src/resources/3_0_1/inputs/timingrepeat.input.js @@ -1,173 +1,185 @@ -const CodeScalar = require('../scalars/code.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLInt, GraphQLFloat, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary Timing.repeat Input Schema + * @summary Timingrepeat Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'TimingRepeat_Input', - description: 'A set of rules that describe when the event is scheduled.', - fields: () => - extendSchema(require('./element.input'), { - boundsDuration: { - type: require('./duration.input'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - boundsRange: { - type: require('./range.input'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - boundsPeriod: { - type: require('./period.input'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - count: { - type: GraphQLInt, - description: 'A total count of the desired number of repetitions.', - }, - _count: { - type: require('./element.input'), - description: 'A total count of the desired number of repetitions.', - }, - countMax: { - type: GraphQLInt, - description: - 'A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).', - }, - _countMax: { - type: require('./element.input'), - description: - 'A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).', - }, - duration: { - type: GraphQLFloat, - description: 'How long this thing happens for when it happens.', - }, - _duration: { - type: require('./element.input'), - description: 'How long this thing happens for when it happens.', - }, - durationMax: { - type: GraphQLFloat, - description: - 'The upper limit of how long this thing happens for when it happens.', - }, - _durationMax: { - type: require('./element.input'), - description: - 'The upper limit of how long this thing happens for when it happens.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/units-of-time - durationUnit: { - type: CodeScalar, - description: 'The units of time for the duration, in UCUM units.', - }, - _durationUnit: { - type: require('./element.input'), - description: 'The units of time for the duration, in UCUM units.', - }, - frequency: { - type: GraphQLInt, - description: - 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', - }, - _frequency: { - type: require('./element.input'), - description: - 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', - }, - frequencyMax: { - type: GraphQLInt, - description: - 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', - }, - _frequencyMax: { - type: require('./element.input'), - description: - 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', - }, - period: { - type: GraphQLFloat, - description: - "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", - }, - _period: { - type: require('./element.input'), - description: - "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", - }, - periodMax: { - type: GraphQLFloat, - description: - "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", - }, - _periodMax: { - type: require('./element.input'), - description: - "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/units-of-time - periodUnit: { - type: CodeScalar, - description: 'The units of time for the period in UCUM units.', - }, - _periodUnit: { - type: require('./element.input'), - description: 'The units of time for the period in UCUM units.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/days-of-week - dayOfWeek: { - type: new GraphQLList(CodeScalar), - description: - 'If one or more days of week is provided, then the action happens only on the specified day(s).', - }, - _dayOfWeek: { - type: require('./element.input'), - description: - 'If one or more days of week is provided, then the action happens only on the specified day(s).', - }, - timeOfDay: { - type: new GraphQLList(TimeScalar), - description: 'Specified time of day for action to take place.', - }, - _timeOfDay: { - type: require('./element.input'), - description: 'Specified time of day for action to take place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-timing - when: { - type: new GraphQLList(CodeScalar), - description: - 'Real world events that the occurrence of the event should be tied to.', - }, - _when: { - type: require('./element.input'), - description: - 'Real world events that the occurrence of the event should be tied to.', - }, - offset: { - type: UnsignedIntScalar, - description: - 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', - }, - _offset: { - type: require('./element.input'), - description: - 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', - }, - }), + name: 'Timingrepeat_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + boundsDuration: { + type: require('./duration.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsRange: { + type: require('./range.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsPeriod: { + type: require('./period.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + _count: { + type: require('./element.input.js'), + description: 'A total count of the desired number of repetitions.', + }, + count: { + type: GraphQLInt, + description: 'A total count of the desired number of repetitions.', + }, + _countMax: { + type: require('./element.input.js'), + description: + 'A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).', + }, + countMax: { + type: GraphQLInt, + description: + 'A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).', + }, + _duration: { + type: require('./element.input.js'), + description: 'How long this thing happens for when it happens.', + }, + duration: { + type: GraphQLFloat, + description: 'How long this thing happens for when it happens.', + }, + _durationMax: { + type: require('./element.input.js'), + description: + 'The upper limit of how long this thing happens for when it happens.', + }, + durationMax: { + type: GraphQLFloat, + description: + 'The upper limit of how long this thing happens for when it happens.', + }, + _durationUnit: { + type: require('./element.input.js'), + description: 'The units of time for the duration, in UCUM units.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/units-of-time + durationUnit: { + type: CodeScalar, + description: 'The units of time for the duration, in UCUM units.', + }, + _frequency: { + type: require('./element.input.js'), + description: + 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', + }, + frequency: { + type: GraphQLInt, + description: + 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', + }, + _frequencyMax: { + type: require('./element.input.js'), + description: + 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + frequencyMax: { + type: GraphQLInt, + description: + 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + _period: { + type: require('./element.input.js'), + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", + }, + period: { + type: GraphQLFloat, + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", + }, + _periodMax: { + type: require('./element.input.js'), + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + periodMax: { + type: GraphQLFloat, + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + _periodUnit: { + type: require('./element.input.js'), + description: 'The units of time for the period in UCUM units.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/units-of-time + periodUnit: { + type: CodeScalar, + description: 'The units of time for the period in UCUM units.', + }, + _dayOfWeek: { + type: require('./element.input.js'), + description: + 'If one or more days of week is provided, then the action happens only on the specified day(s).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/days-of-week + dayOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'If one or more days of week is provided, then the action happens only on the specified day(s).', + }, + _timeOfDay: { + type: require('./element.input.js'), + description: 'Specified time of day for action to take place.', + }, + timeOfDay: { + type: new GraphQLList(TimeScalar), + description: 'Specified time of day for action to take place.', + }, + _when: { + type: require('./element.input.js'), + description: + 'Real world events that the occurrence of the event should be tied to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-timing + when: { + type: new GraphQLList(CodeScalar), + description: + 'Real world events that the occurrence of the event should be tied to.', + }, + _offset: { + type: require('./element.input.js'), + description: + 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', + }, + offset: { + type: UnsignedIntScalar, + description: + 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/triggerdefinition.input.js b/src/resources/3_0_1/inputs/triggerdefinition.input.js index ed6b236e..afd566e5 100644 --- a/src/resources/3_0_1/inputs/triggerdefinition.input.js +++ b/src/resources/3_0_1/inputs/triggerdefinition.input.js @@ -1,14 +1,12 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -16,56 +14,68 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'TriggerDefinition_Input', - description: 'Base StructureDefinition for TriggerDefinition Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/trigger-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of triggering event.', - }, - _type: { - type: require('./element.input'), - description: 'The type of triggering event.', - }, - eventName: { - type: GraphQLString, - description: - 'The name of the event (if this is a named-event trigger).', - }, - _eventName: { - type: require('./element.input'), - description: - 'The name of the event (if this is a named-event trigger).', - }, - eventTimingTiming: { - type: require('./timing.input'), - description: 'The timing of the event (if this is a period trigger).', - }, - eventTimingReference: { - type: require('./reference.input'), - description: 'The timing of the event (if this is a period trigger).', - }, - eventTimingDate: { - type: DateScalar, - description: 'The timing of the event (if this is a period trigger).', - }, - _eventTimingDate: { - type: require('./element.input'), - description: 'The timing of the event (if this is a period trigger).', - }, - eventTimingDateTime: { - type: DateTimeScalar, - description: 'The timing of the event (if this is a period trigger).', - }, - _eventTimingDateTime: { - type: require('./element.input'), - description: 'The timing of the event (if this is a period trigger).', - }, - eventData: { - type: require('./datarequirement.input'), - description: - 'The triggering data of the event (if this is a data trigger).', - }, - }), + description: 'Base StructureDefinition for TriggerDefinition Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of triggering event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/trigger-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of triggering event.', + }, + _eventName: { + type: require('./element.input.js'), + description: 'The name of the event (if this is a named-event trigger).', + }, + eventName: { + type: GraphQLString, + description: 'The name of the event (if this is a named-event trigger).', + }, + eventTimingTiming: { + type: require('./timing.input.js'), + description: 'The timing of the event (if this is a period trigger).', + }, + eventTimingReference: { + type: GraphQLString, + description: 'The timing of the event (if this is a period trigger).', + }, + _eventTimingDate: { + type: require('./element.input.js'), + description: 'The timing of the event (if this is a period trigger).', + }, + eventTimingDate: { + type: DateScalar, + description: 'The timing of the event (if this is a period trigger).', + }, + _eventTimingDateTime: { + type: require('./element.input.js'), + description: 'The timing of the event (if this is a period trigger).', + }, + eventTimingDateTime: { + type: DateTimeScalar, + description: 'The timing of the event (if this is a period trigger).', + }, + eventData: { + type: require('./datarequirement.input.js'), + description: + 'The triggering data of the event (if this is a data trigger).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/usagecontext.input.js b/src/resources/3_0_1/inputs/usagecontext.input.js index fa33f166..7daf23ec 100644 --- a/src/resources/3_0_1/inputs/usagecontext.input.js +++ b/src/resources/3_0_1/inputs/usagecontext.input.js @@ -1,7 +1,9 @@ -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); /** * @name exports @@ -9,32 +11,46 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLInputObjectType({ name: 'UsageContext_Input', - description: 'Base StructureDefinition for UsageContext Type.', - fields: () => - extendSchema(require('./element.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/usage-context-type - code: { - type: new GraphQLNonNull(require('./coding.input')), - description: - 'A code that identifies the type of context being specified by this usage context.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.input')), - description: - 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.input')), - description: - 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - valueRange: { - type: new GraphQLNonNull(require('./range.input')), - description: - 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', - }, - }), + description: 'Base StructureDefinition for UsageContext Type', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/usage-context-type + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A code that identifies the type of context being specified by this usage context.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valueset.input.js b/src/resources/3_0_1/inputs/valueset.input.js index 278b9bc7..36bb7431 100644 --- a/src/resources/3_0_1/inputs/valueset.input.js +++ b/src/resources/3_0_1/inputs/valueset.input.js @@ -1,24 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLString, GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ValueSetResourceInputType = new GraphQLEnumType({ - name: 'ValueSetResourceInputType', - values: { - ValueSet: { value: 'ValueSet' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,174 +17,232 @@ let ValueSetResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'ValueSet_Input', - description: 'Base StructureDefinition for ValueSet Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(ValueSetResourceInputType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. The URL SHOULD include the major version of the value set. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.input'), - description: - 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. The URL SHOULD include the major version of the value set. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.input'), - description: - 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.input'), - description: - 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the value set.', - }, - _title: { - type: require('./element.input'), - description: - 'A short, descriptive, user-friendly title for the value set.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this value set. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.input'), - description: - 'The status of this value set. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.input'), - description: - 'A boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - "The date (and optionally time) when the value set was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the value set changes. (e.g. the 'content logical definition').", - }, - _date: { - type: require('./element.input'), - description: - "The date (and optionally time) when the value set was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the value set changes. (e.g. the 'content logical definition').", - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the value set.', - }, - _publisher: { - type: require('./element.input'), - description: - 'The name of the individual or organization that published the value set.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.input')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the value set from a consumer's perspective.", - }, - _description: { - type: require('./element.input'), - description: - "A free text natural language description of the value set from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.input')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate value set instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.input')), - description: - 'A legal or geographic region in which the value set is intended to be used.', - }, - immutable: { - type: GraphQLBoolean, - description: - "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", - }, - _immutable: { - type: require('./element.input'), - description: - "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this value set is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.input'), - description: - 'Explaination of why this value set is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', - }, - _copyright: { - type: require('./element.input'), - description: - 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', - }, - extensible: { - type: GraphQLBoolean, - description: - 'Whether this is intended to be used with an extensible binding or not.', - }, - _extensible: { - type: require('./element.input'), - description: - 'Whether this is intended to be used with an extensible binding or not.', - }, - compose: { - type: require('./valuesetcompose.input'), - description: - "A set of criteria that define the content logical definition of the value set by including or excluding codes from outside this value set. This I also known as the 'Content Logical Definition' (CLD).", - }, - expansion: { - type: require('./valuesetexpansion.input'), - description: - "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", - }, - }), + description: 'Base StructureDefinition for ValueSet Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ValueSet_Enum_input', + values: { ValueSet: { value: 'ValueSet' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. The URL SHOULD include the major version of the value set. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. The URL SHOULD include the major version of the value set. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the value set.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the value set.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this value set. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this value set. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + "The date (and optionally time) when the value set was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the value set changes. (e.g. the 'content logical definition').", + }, + date: { + type: DateTimeScalar, + description: + "The date (and optionally time) when the value set was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the value set changes. (e.g. the 'content logical definition').", + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization that published the value set.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the value set.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the value set from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the value set from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate value set instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the value set is intended to be used.', + }, + _immutable: { + type: require('./element.input.js'), + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + immutable: { + type: GraphQLBoolean, + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explaination of why this value set is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this value set is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + _extensible: { + type: require('./element.input.js'), + description: + 'Whether this is intended to be used with an extensible binding or not.', + }, + extensible: { + type: GraphQLBoolean, + description: + 'Whether this is intended to be used with an extensible binding or not.', + }, + compose: { + type: require('./valuesetcompose.input.js'), + description: + "A set of criteria that define the content logical definition of the value set by including or excluding codes from outside this value set. This I also known as the 'Content Logical Definition' (CLD).", + }, + expansion: { + type: require('./valuesetexpansion.input.js'), + description: + "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valuesetcompose.input.js b/src/resources/3_0_1/inputs/valuesetcompose.input.js index a1555072..d773800b 100644 --- a/src/resources/3_0_1/inputs/valuesetcompose.input.js +++ b/src/resources/3_0_1/inputs/valuesetcompose.input.js @@ -1,50 +1,66 @@ -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLBoolean, GraphQLNonNull, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ValueSet.compose Input Schema + * @summary ValueSetcompose Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetCompose_Input', - description: - "A set of criteria that define the content logical definition of the value set by including or excluding codes from outside this value set. This I also known as the 'Content Logical Definition' (CLD).", - fields: () => - extendSchema(require('./backboneelement.input'), { - lockedDate: { - type: DateScalar, - description: - 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version as of the locked date for referenced code system(s) and value set instances where ValueSet.compose.include.version is not defined.', - }, - _lockedDate: { - type: require('./element.input'), - description: - 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version as of the locked date for referenced code system(s) and value set instances where ValueSet.compose.include.version is not defined.', - }, - inactive: { - type: GraphQLBoolean, - description: - 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable ExpansionProfile (but generally, inactive codes would be expected to be included).', - }, - _inactive: { - type: require('./element.input'), - description: - 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable ExpansionProfile (but generally, inactive codes would be expected to be included).', - }, - include: { - type: new GraphQLList( - new GraphQLNonNull(require('./valuesetcomposeinclude.input')), - ), - description: - 'Include one or more codes from a code system or other value set(s).', - }, - }), + name: 'ValueSetcompose_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _lockedDate: { + type: require('./element.input.js'), + description: + 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version as of the locked date for referenced code system(s) and value set instances where ValueSet.compose.include.version is not defined.', + }, + lockedDate: { + type: DateScalar, + description: + 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version as of the locked date for referenced code system(s) and value set instances where ValueSet.compose.include.version is not defined.', + }, + _inactive: { + type: require('./element.input.js'), + description: + 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable ExpansionProfile (but generally, inactive codes would be expected to be included).', + }, + inactive: { + type: GraphQLBoolean, + description: + 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable ExpansionProfile (but generally, inactive codes would be expected to be included).', + }, + include: { + type: new GraphQLList( + new GraphQLNonNull(require('./valuesetcomposeinclude.input.js')), + ), + description: + 'Include one or more codes from a code system or other value set(s).', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valuesetcomposeinclude.input.js b/src/resources/3_0_1/inputs/valuesetcomposeinclude.input.js index 3773702d..82c366d1 100644 --- a/src/resources/3_0_1/inputs/valuesetcomposeinclude.input.js +++ b/src/resources/3_0_1/inputs/valuesetcomposeinclude.input.js @@ -1,61 +1,78 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLInputObjectType, GraphQLString, GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include Input Schema + * @summary ValueSetcomposeinclude Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetComposeInclude_Input', - description: - 'Include one or more codes from a code system or other value set(s).', - fields: () => - extendSchema(require('./backboneelement.input'), { - system: { - type: UriScalar, - description: - 'An absolute URI which is the code system from which the selected codes come from.', - }, - _system: { - type: require('./element.input'), - description: - 'An absolute URI which is the code system from which the selected codes come from.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system that the codes are selected from.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of the code system that the codes are selected from.', - }, - concept: { - type: new GraphQLList(require('./valuesetcomposeincludeconcept.input')), - description: 'Specifies a concept to be included or excluded.', - }, - filter: { - type: new GraphQLList(require('./valuesetcomposeincludefilter.input')), - description: - 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', - }, - valueSet: { - type: new GraphQLList(UriScalar), - description: - 'Selects concepts found in this value set. This is an absolute URI that is a reference to ValueSet.url.', - }, - _valueSet: { - type: require('./element.input'), - description: - 'Selects concepts found in this value set. This is an absolute URI that is a reference to ValueSet.url.', - }, - }), + name: 'ValueSetcomposeinclude_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the code system that the codes are selected from.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system that the codes are selected from.', + }, + concept: { + type: new GraphQLList( + require('./valuesetcomposeincludeconcept.input.js'), + ), + description: 'Specifies a concept to be included or excluded.', + }, + filter: { + type: new GraphQLList(require('./valuesetcomposeincludefilter.input.js')), + description: + 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', + }, + _valueSet: { + type: require('./element.input.js'), + description: + 'Selects concepts found in this value set. This is an absolute URI that is a reference to ValueSet.url.', + }, + valueSet: { + type: new GraphQLList(UriScalar), + description: + 'Selects concepts found in this value set. This is an absolute URI that is a reference to ValueSet.url.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valuesetcomposeincludeconcept.input.js b/src/resources/3_0_1/inputs/valuesetcomposeincludeconcept.input.js index fe37b715..a8d68325 100644 --- a/src/resources/3_0_1/inputs/valuesetcomposeincludeconcept.input.js +++ b/src/resources/3_0_1/inputs/valuesetcomposeincludeconcept.input.js @@ -1,49 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.concept Input Schema + * @summary ValueSetcomposeincludeconcept Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetComposeIncludeConcept_Input', - description: 'Specifies a concept to be included or excluded.', - fields: () => - extendSchema(require('./backboneelement.input'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Specifies a code for the concept to be included or excluded.', - }, - _code: { - type: require('./element.input'), - description: - 'Specifies a code for the concept to be included or excluded.', - }, - display: { - type: GraphQLString, - description: - 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', - }, - _display: { - type: require('./element.input'), - description: - 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', - }, - designation: { - type: new GraphQLList( - require('./valuesetcomposeincludeconceptdesignation.input'), - ), - description: - 'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.', - }, - }), + name: 'ValueSetcomposeincludeconcept_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + display: { + type: GraphQLString, + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + designation: { + type: new GraphQLList( + require('./valuesetcomposeincludeconceptdesignation.input.js'), + ), + description: + 'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valuesetcomposeincludeconceptdesignation.input.js b/src/resources/3_0_1/inputs/valuesetcomposeincludeconceptdesignation.input.js index aef50530..e164ceea 100644 --- a/src/resources/3_0_1/inputs/valuesetcomposeincludeconceptdesignation.input.js +++ b/src/resources/3_0_1/inputs/valuesetcomposeincludeconceptdesignation.input.js @@ -1,44 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.concept.designation Input Schema + * @summary ValueSetcomposeincludeconceptdesignation Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetComposeIncludeConceptDesignation_Input', - description: - 'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.input'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.input'), - description: 'A code that details how this designation would be used.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text value for this designation.', - }, - _value: { - type: require('./element.input'), - description: 'The text value for this designation.', - }, - }), + name: 'ValueSetcomposeincludeconceptdesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _language: { + type: require('./element.input.js'), + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.input.js'), + description: 'A code that details how this designation would be used.', + }, + _value: { + type: require('./element.input.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valuesetcomposeincludefilter.input.js b/src/resources/3_0_1/inputs/valuesetcomposeincludefilter.input.js index 850387cb..ec358a2d 100644 --- a/src/resources/3_0_1/inputs/valuesetcomposeincludefilter.input.js +++ b/src/resources/3_0_1/inputs/valuesetcomposeincludefilter.input.js @@ -1,49 +1,69 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLInputObjectType, GraphQLNonNull } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.filter Input Schema + * @summary ValueSetcomposeincludefilter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetComposeIncludeFilter_Input', - description: - 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', - fields: () => - extendSchema(require('./backboneelement.input'), { - property: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that identifies a property defined in the code system.', - }, - _property: { - type: require('./element.input'), - description: - 'A code that identifies a property defined in the code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/filter-operator - op: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of operation to perform as a part of the filter criteria.', - }, - _op: { - type: require('./element.input'), - description: - 'The kind of operation to perform as a part of the filter criteria.', - }, - value: { - type: new GraphQLNonNull(CodeScalar), - description: - "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", - }, - _value: { - type: require('./element.input'), - description: - "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", - }, - }), + name: 'ValueSetcomposeincludefilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _property: { + type: require('./element.input.js'), + description: + 'A code that identifies a property defined in the code system.', + }, + property: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that identifies a property defined in the code system.', + }, + _op: { + type: require('./element.input.js'), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/filter-operator + op: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + _value: { + type: require('./element.input.js'), + description: + "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", + }, + value: { + type: new GraphQLNonNull(CodeScalar), + description: + "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valuesetexpansion.input.js b/src/resources/3_0_1/inputs/valuesetexpansion.input.js index b5f7b5e9..eb624c2e 100644 --- a/src/resources/3_0_1/inputs/valuesetexpansion.input.js +++ b/src/resources/3_0_1/inputs/valuesetexpansion.input.js @@ -1,73 +1,89 @@ -const UriScalar = require('../scalars/uri.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLInputObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLList, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ValueSet.expansion Input Schema + * @summary ValueSetexpansion Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetExpansion_Input', - description: - "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", - fields: () => - extendSchema(require('./backboneelement.input'), { - identifier: { - type: new GraphQLNonNull(UriScalar), - description: - 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', - }, - _identifier: { - type: require('./element.input'), - description: - 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', - }, - timestamp: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The time at which the expansion was produced by the expanding system.', - }, - _timestamp: { - type: require('./element.input'), - description: - 'The time at which the expansion was produced by the expanding system.', - }, - total: { - type: GraphQLInt, - description: - 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', - }, - _total: { - type: require('./element.input'), - description: - 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', - }, - offset: { - type: GraphQLInt, - description: - 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', - }, - _offset: { - type: require('./element.input'), - description: - 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', - }, - parameter: { - type: new GraphQLList(require('./valuesetexpansionparameter.input')), - description: - 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', - }, - contains: { - type: new GraphQLList(require('./valuesetexpansioncontains.input')), - description: 'The codes that are contained in the value set expansion.', - }, - }), + name: 'ValueSetexpansion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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: require('./element.input.js'), + description: + 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', + }, + identifier: { + type: new GraphQLNonNull(UriScalar), + description: + 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', + }, + _timestamp: { + type: require('./element.input.js'), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + timestamp: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + _total: { + type: require('./element.input.js'), + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + total: { + type: GraphQLInt, + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + _offset: { + type: require('./element.input.js'), + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', + }, + offset: { + type: GraphQLInt, + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', + }, + parameter: { + type: new GraphQLList(require('./valuesetexpansionparameter.input.js')), + description: + 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', + }, + contains: { + type: new GraphQLList(require('./valuesetexpansioncontains.input.js')), + description: 'The codes that are contained in the value set expansion.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valuesetexpansioncontains.input.js b/src/resources/3_0_1/inputs/valuesetexpansioncontains.input.js index c88b2725..06838b76 100644 --- a/src/resources/3_0_1/inputs/valuesetexpansioncontains.input.js +++ b/src/resources/3_0_1/inputs/valuesetexpansioncontains.input.js @@ -1,80 +1,97 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLBoolean, GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.expansion.contains Input Schema + * @summary ValueSetexpansioncontains Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetExpansionContains_Input', - description: 'The codes that are contained in the value set expansion.', - fields: () => - extendSchema(require('./backboneelement.input'), { - system: { - type: UriScalar, - description: - 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', - }, - _system: { - type: require('./element.input'), - description: - 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', - }, - abstract: { - type: GraphQLBoolean, - description: - 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', - }, - _abstract: { - type: require('./element.input'), - description: - 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', - }, - inactive: { - type: GraphQLBoolean, - description: - 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data.', - }, - _inactive: { - type: require('./element.input'), - description: - 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data.', - }, - version: { - type: GraphQLString, - description: - 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', - }, - _version: { - type: require('./element.input'), - description: - 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', - }, - code: { - type: CodeScalar, - description: - 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', - }, - _code: { - type: require('./element.input'), - description: - 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', - }, - display: { - type: GraphQLString, - description: 'The recommended display for this item in the expansion.', - }, - _display: { - type: require('./element.input'), - description: 'The recommended display for this item in the expansion.', - }, - }), + name: 'ValueSetexpansioncontains_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + _abstract: { + type: require('./element.input.js'), + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + abstract: { + type: GraphQLBoolean, + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + _inactive: { + type: require('./element.input.js'), + description: + 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data.', + }, + inactive: { + type: GraphQLBoolean, + description: + 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', + }, + version: { + type: GraphQLString, + description: + 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + code: { + type: CodeScalar, + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + _display: { + type: require('./element.input.js'), + description: 'The recommended display for this item in the expansion.', + }, + display: { + type: GraphQLString, + description: 'The recommended display for this item in the expansion.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/valuesetexpansionparameter.input.js b/src/resources/3_0_1/inputs/valuesetexpansionparameter.input.js index 53a6d927..4a05c68e 100644 --- a/src/resources/3_0_1/inputs/valuesetexpansionparameter.input.js +++ b/src/resources/3_0_1/inputs/valuesetexpansionparameter.input.js @@ -1,82 +1,98 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.expansion.parameter Input Schema + * @summary ValueSetexpansionparameter Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'ValueSetExpansionParameter_Input', - description: - 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', - fields: () => - extendSchema(require('./backboneelement.input'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name of the parameter.', - }, - _name: { - type: require('./element.input'), - description: 'The name of the parameter.', - }, - valueString: { - type: GraphQLString, - description: 'The value of the parameter.', - }, - _valueString: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: 'The value of the parameter.', - }, - _valueBoolean: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueInteger: { - type: GraphQLInt, - description: 'The value of the parameter.', - }, - _valueInteger: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueDecimal: { - type: GraphQLFloat, - description: 'The value of the parameter.', - }, - _valueDecimal: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueUri: { - type: UriScalar, - description: 'The value of the parameter.', - }, - _valueUri: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - valueCode: { - type: CodeScalar, - description: 'The value of the parameter.', - }, - _valueCode: { - type: require('./element.input'), - description: 'The value of the parameter.', - }, - }), + name: 'ValueSetexpansionparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of the parameter.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the parameter.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueString: { + type: GraphQLString, + description: 'The value of the parameter.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the parameter.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueInteger: { + type: GraphQLInt, + description: 'The value of the parameter.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'The value of the parameter.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueUri: { + type: UriScalar, + description: 'The value of the parameter.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueCode: { + type: CodeScalar, + description: 'The value of the parameter.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/visionprescription.input.js b/src/resources/3_0_1/inputs/visionprescription.input.js index 497b7346..56ea8283 100644 --- a/src/resources/3_0_1/inputs/visionprescription.input.js +++ b/src/resources/3_0_1/inputs/visionprescription.input.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.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 VisionPrescriptionResourceInputType = new GraphQLEnumType({ - name: 'VisionPrescriptionResourceInputType', - values: { - VisionPrescription: { value: 'VisionPrescription' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,66 +16,124 @@ let VisionPrescriptionResourceInputType = new GraphQLEnumType({ */ module.exports = new GraphQLInputObjectType({ name: 'VisionPrescription_Input', - description: 'Base StructureDefinition for VisionPrescription Resource.', - fields: () => - extendSchema(require('./domainresource.input'), { - resourceType: { - type: new GraphQLNonNull(VisionPrescriptionResourceInputType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.input')), - description: - 'Business identifier which may be used by other parties to reference or identify the prescription.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.input'), - description: 'The status of the resource instance.', - }, - patient: { - type: require('./reference.input'), - description: - 'A link to a resource representing the person to whom the vision products will be supplied.', - }, - encounter: { - type: require('./reference.input'), - description: - 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', - }, - dateWritten: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was written.', - }, - _dateWritten: { - type: require('./element.input'), - description: - 'The date (and perhaps time) when the prescription was written.', - }, - prescriber: { - type: require('./reference.input'), - description: - 'The healthcare professional responsible for authorizing the prescription.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.input'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - reasonReference: { - type: require('./reference.input'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - dispense: { - type: new GraphQLList(require('./visionprescriptiondispense.input')), - description: - 'Deals with details of the dispense part of the supply specification.', - }, - }), + description: 'Base StructureDefinition for VisionPrescription Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'VisionPrescription_Enum_input', + values: { VisionPrescription: { value: 'VisionPrescription' } }, + }), + ), + 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + 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: + 'Business identifier which may be used by other parties to reference or identify the prescription.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + patient: { + type: GraphQLString, + description: + 'A link to a resource representing the person to whom the vision products will be supplied.', + }, + encounter: { + type: GraphQLString, + description: + 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', + }, + _dateWritten: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + dateWritten: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was written.', + }, + prescriber: { + type: GraphQLString, + description: + 'The healthcare professional responsible for authorizing the prescription.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + reasonReference: { + type: GraphQLString, + description: + 'Can be the reason or the indication for writing the prescription.', + }, + dispense: { + type: new GraphQLList(require('./visionprescriptiondispense.input.js')), + description: + 'Deals with details of the dispense part of the supply specification.', + }, + }), }); diff --git a/src/resources/3_0_1/inputs/visionprescriptiondispense.input.js b/src/resources/3_0_1/inputs/visionprescriptiondispense.input.js index d2d21d98..31bdcb1b 100644 --- a/src/resources/3_0_1/inputs/visionprescriptiondispense.input.js +++ b/src/resources/3_0_1/inputs/visionprescriptiondispense.input.js @@ -1,145 +1,158 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLInputObjectType, - GraphQLFloat, - GraphQLInt, GraphQLString, GraphQLList, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, } = require('graphql'); - -// Util for extending gql objects -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary VisionPrescription.dispense Input Schema + * @summary VisionPrescriptiondispense Input Schema */ module.exports = new GraphQLInputObjectType({ - name: 'VisionPrescriptionDispense_Input', - description: - 'Deals with details of the dispense part of the supply specification.', - fields: () => - extendSchema(require('./backboneelement.input'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-product - product: { - type: require('./codeableconcept.input'), - description: - 'Identifies the type of vision correction product which is required for the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-eye-codes - eye: { - type: CodeScalar, - description: 'The eye for which the lens applies.', - }, - _eye: { - type: require('./element.input'), - description: 'The eye for which the lens applies.', - }, - sphere: { - type: GraphQLFloat, - description: 'Lens power measured in diopters (0.25 units).', - }, - _sphere: { - type: require('./element.input'), - description: 'Lens power measured in diopters (0.25 units).', - }, - cylinder: { - type: GraphQLFloat, - description: - 'Power adjustment for astigmatism measured in diopters (0.25 units).', - }, - _cylinder: { - type: require('./element.input'), - description: - 'Power adjustment for astigmatism measured in diopters (0.25 units).', - }, - axis: { - type: GraphQLInt, - description: 'Adjustment for astigmatism measured in integer degrees.', - }, - _axis: { - type: require('./element.input'), - description: 'Adjustment for astigmatism measured in integer degrees.', - }, - prism: { - type: GraphQLFloat, - description: - 'Amount of prism to compensate for eye alignment in fractional units.', - }, - _prism: { - type: require('./element.input'), - description: - 'Amount of prism to compensate for eye alignment in fractional units.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-base-codes - base: { - type: CodeScalar, - description: - 'The relative base, or reference lens edge, for the prism.', - }, - _base: { - type: require('./element.input'), - description: - 'The relative base, or reference lens edge, for the prism.', - }, - add: { - type: GraphQLFloat, - description: - 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', - }, - _add: { - type: require('./element.input'), - description: - 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', - }, - power: { - type: GraphQLFloat, - description: 'Contact lens power measured in diopters (0.25 units).', - }, - _power: { - type: require('./element.input'), - description: 'Contact lens power measured in diopters (0.25 units).', - }, - backCurve: { - type: GraphQLFloat, - description: 'Back curvature measured in millimeters.', - }, - _backCurve: { - type: require('./element.input'), - description: 'Back curvature measured in millimeters.', - }, - diameter: { - type: GraphQLFloat, - description: 'Contact lens diameter measured in millimeters.', - }, - _diameter: { - type: require('./element.input'), - description: 'Contact lens diameter measured in millimeters.', - }, - duration: { - type: require('./quantity.input'), - description: 'The recommended maximum wear period for the lens.', - }, - color: { - type: GraphQLString, - description: 'Special color or pattern.', - }, - _color: { - type: require('./element.input'), - description: 'Special color or pattern.', - }, - brand: { - type: GraphQLString, - description: 'Brand recommendations or restrictions.', - }, - _brand: { - type: require('./element.input'), - description: 'Brand recommendations or restrictions.', - }, - note: { - type: new GraphQLList(require('./annotation.input')), - description: - 'Notes for special requirements such as coatings and lens materials.', - }, - }), + name: 'VisionPrescriptiondispense_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-product + product: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the type of vision correction product which is required for the patient.', + }, + _eye: { + type: require('./element.input.js'), + description: 'The eye for which the lens applies.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-eye-codes + eye: { + type: CodeScalar, + description: 'The eye for which the lens applies.', + }, + _sphere: { + type: require('./element.input.js'), + description: 'Lens power measured in diopters (0.25 units).', + }, + sphere: { + type: GraphQLFloat, + description: 'Lens power measured in diopters (0.25 units).', + }, + _cylinder: { + type: require('./element.input.js'), + description: + 'Power adjustment for astigmatism measured in diopters (0.25 units).', + }, + cylinder: { + type: GraphQLFloat, + description: + 'Power adjustment for astigmatism measured in diopters (0.25 units).', + }, + _axis: { + type: require('./element.input.js'), + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + axis: { + type: GraphQLInt, + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + _prism: { + type: require('./element.input.js'), + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + prism: { + type: GraphQLFloat, + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + _base: { + type: require('./element.input.js'), + description: 'The relative base, or reference lens edge, for the prism.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-base-codes + base: { + type: CodeScalar, + description: 'The relative base, or reference lens edge, for the prism.', + }, + _add: { + type: require('./element.input.js'), + description: + 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', + }, + add: { + type: GraphQLFloat, + description: + 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', + }, + _power: { + type: require('./element.input.js'), + description: 'Contact lens power measured in diopters (0.25 units).', + }, + power: { + type: GraphQLFloat, + description: 'Contact lens power measured in diopters (0.25 units).', + }, + _backCurve: { + type: require('./element.input.js'), + description: 'Back curvature measured in millimeters.', + }, + backCurve: { + type: GraphQLFloat, + description: 'Back curvature measured in millimeters.', + }, + _diameter: { + type: require('./element.input.js'), + description: 'Contact lens diameter measured in millimeters.', + }, + diameter: { + type: GraphQLFloat, + description: 'Contact lens diameter measured in millimeters.', + }, + duration: { + type: require('./quantity.input.js'), + description: 'The recommended maximum wear period for the lens.', + }, + _color: { + type: require('./element.input.js'), + description: 'Special color or pattern.', + }, + color: { + type: GraphQLString, + description: 'Special color or pattern.', + }, + _brand: { + type: require('./element.input.js'), + description: 'Brand recommendations or restrictions.', + }, + brand: { + type: GraphQLString, + description: 'Brand recommendations or restrictions.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Notes for special requirements such as coatings and lens materials.', + }, + }), }); diff --git a/src/resources/3_0_1/parameters/account.parameters.js b/src/resources/3_0_1/parameters/account.parameters.js index c939b571..fa1b2833 100644 --- a/src/resources/3_0_1/parameters/account.parameters.js +++ b/src/resources/3_0_1/parameters/account.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,49 +8,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the account query */ module.exports = { - owner: { + // http://hl7.org/fhir/SearchParameter/Account-balance + balance: { type: GraphQLString, - description: - 'Who is responsible? (See http://hl7.org/fhir/SearchParameter/Account-owner).', + fhirtype: 'quantity', + xpath: 'Account.balance', + description: 'How much is in account?', }, + // http://hl7.org/fhir/SearchParameter/Account-identifier identifier: { type: TokenScalar, - description: - 'Account number (See http://hl7.org/fhir/SearchParameter/Account-identifier).', - }, - period: { - type: DateScalar, - description: - 'Transaction window (See http://hl7.org/fhir/SearchParameter/Account-period).', + fhirtype: 'token', + xpath: 'Account.identifier', + description: 'Account number', }, - balance: { + // http://hl7.org/fhir/SearchParameter/Account-name + name: { type: GraphQLString, - description: - 'How much is in account? (See http://hl7.org/fhir/SearchParameter/Account-balance).', + fhirtype: 'string', + xpath: 'Account.name', + description: 'Human-readable label', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Account-owner + owner: { type: GraphQLString, - description: - 'What is account tied to? (See http://hl7.org/fhir/SearchParameter/Account-subject).', + fhirtype: 'reference', + xpath: 'Account.owner', + description: 'Who is responsible?', }, + // http://hl7.org/fhir/SearchParameter/Account-patient patient: { type: GraphQLString, - description: - 'What is account tied to? (See http://hl7.org/fhir/SearchParameter/Account-patient).', + fhirtype: 'reference', + xpath: 'Account.subject', + description: 'What is account tied to?', }, - name: { - type: GraphQLString, - description: - 'Human-readable label (See http://hl7.org/fhir/SearchParameter/Account-name).', + // http://hl7.org/fhir/SearchParameter/Account-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Account.period', + description: 'Transaction window', }, - type: { + // http://hl7.org/fhir/SearchParameter/Account-status + status: { type: TokenScalar, - description: - 'E.g. patient, expense, depreciation (See http://hl7.org/fhir/SearchParameter/Account-type).', + fhirtype: 'token', + xpath: 'Account.status', + description: 'active | inactive | entered-in-error', }, - status: { + // http://hl7.org/fhir/SearchParameter/Account-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Account.subject', + description: 'What is account tied to?', + }, + // http://hl7.org/fhir/SearchParameter/Account-type + type: { type: TokenScalar, - description: - 'active | inactive | entered-in-error (See http://hl7.org/fhir/SearchParameter/Account-status).', + fhirtype: 'token', + xpath: 'Account.type', + description: 'E.g. patient, expense, depreciation', }, }; diff --git a/src/resources/3_0_1/parameters/activitydefinition.parameters.js b/src/resources/3_0_1/parameters/activitydefinition.parameters.js index 573dddda..eca757c0 100644 --- a/src/resources/3_0_1/parameters/activitydefinition.parameters.js +++ b/src/resources/3_0_1/parameters/activitydefinition.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,89 +9,129 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the activitydefinition query */ module.exports = { - date: { - type: DateScalar, - description: - 'The activity definition publication date (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-date).', - }, - identifier: { - type: TokenScalar, - description: - 'External identifier for the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-identifier).', - }, - successor: { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-composed-of + composed_of: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-successor).', + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-jurisdiction).', + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ActivityDefinition.date', + description: 'The activity definition publication date', }, - description: { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-depends-on + depends_on: { type: GraphQLString, - description: - 'The description of the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-description).', + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-derived-from derived_from: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-derived-from).', + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', }, - predecessor: { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-description + description: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-predecessor).', + fhirtype: 'string', + xpath: 'ActivityDefinition.description', + description: 'The description of the activity definition', }, - title: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ActivityDefinition.effectivePeriod', description: - 'The human-friendly name of the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-title).', + 'The time during which the activity definition is intended to be in use', }, - composed_of: { - type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-composed-of).', + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.identifier', + description: 'External identifier for the activity definition', }, - version: { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'The business version of the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-version).', + fhirtype: 'token', + xpath: 'ActivityDefinition.jurisdiction', + description: 'Intended jurisdiction for the activity definition', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-url).', + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ActivityDefinition.name', + description: 'Computationally friendly name of the activity definition', }, - effective: { - type: DateScalar, - description: - 'The time during which the activity definition is intended to be in use (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-effective).', + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', }, - depends_on: { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-publisher + publisher: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-depends-on).', + fhirtype: 'string', + xpath: 'ActivityDefinition.publisher', + description: 'Name of the publisher of the activity definition', }, - name: { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.status', + description: 'The current status of the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-successor + successor: { type: GraphQLString, - description: - 'Computationally friendly name of the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-name).', + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-title + title: { type: GraphQLString, - description: - 'Name of the publisher of the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-publisher).', + fhirtype: 'string', + xpath: 'ActivityDefinition.title', + description: 'The human-friendly name of the activity definition', }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-topic topic: { type: TokenScalar, - description: - 'Topics associated with the module (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-topic).', + fhirtype: 'token', + xpath: 'ActivityDefinition.topic', + description: 'Topics associated with the module', }, - status: { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ActivityDefinition.url', + description: 'The uri that identifies the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-version + version: { type: TokenScalar, - description: - 'The current status of the activity definition (See http://hl7.org/fhir/SearchParameter/ActivityDefinition-status).', + fhirtype: 'token', + xpath: 'ActivityDefinition.version', + description: 'The business version of the activity definition', }, }; diff --git a/src/resources/3_0_1/parameters/adverseevent.parameters.js b/src/resources/3_0_1/parameters/adverseevent.parameters.js index 113b72e4..1033ccf2 100644 --- a/src/resources/3_0_1/parameters/adverseevent.parameters.js +++ b/src/resources/3_0_1/parameters/adverseevent.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,54 +8,75 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the adverseevent query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/AdverseEvent-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AdverseEvent.category', + description: + 'AE | PAE An adverse event is an event that caused harm to a patient, an adverse reaction is a something that is a subject-specific event that is a result of an exposure to a medication, food, device or environmental substance, a potential adverse event is something that occurred and that could have caused harm to a patient but did not', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-date date: { type: DateScalar, - description: - 'When the event occurred (See http://hl7.org/fhir/SearchParameter/AdverseEvent-date).', + fhirtype: 'date', + xpath: 'AdverseEvent.date', + description: 'When the event occurred', }, - recorder: { + // http://hl7.org/fhir/SearchParameter/AdverseEvent-location + location: { type: GraphQLString, - description: - 'Who recorded the adverse event (See http://hl7.org/fhir/SearchParameter/AdverseEvent-recorder).', + fhirtype: 'reference', + xpath: 'AdverseEvent.location', + description: 'Location where adverse event occurred', }, - study: { + // http://hl7.org/fhir/SearchParameter/AdverseEvent-reaction + reaction: { type: GraphQLString, - description: - 'AdverseEvent.study (See http://hl7.org/fhir/SearchParameter/AdverseEvent-study).', + fhirtype: 'reference', + xpath: 'AdverseEvent.reaction', + description: 'Adverse Reaction Events linked to exposure to substance', }, - reaction: { + // http://hl7.org/fhir/SearchParameter/AdverseEvent-recorder + recorder: { type: GraphQLString, - description: - 'Adverse Reaction Events linked to exposure to substance (See http://hl7.org/fhir/SearchParameter/AdverseEvent-reaction).', + fhirtype: 'reference', + xpath: 'AdverseEvent.recorder', + description: 'Who recorded the adverse event', }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-seriousness seriousness: { type: TokenScalar, - description: - 'Mild | Moderate | Severe (See http://hl7.org/fhir/SearchParameter/AdverseEvent-seriousness).', + fhirtype: 'token', + xpath: 'AdverseEvent.seriousness', + description: 'Mild | Moderate | Severe', }, - subject: { + // http://hl7.org/fhir/SearchParameter/AdverseEvent-study + study: { type: GraphQLString, - description: - 'Subject or group impacted by event (See http://hl7.org/fhir/SearchParameter/AdverseEvent-subject).', + fhirtype: 'reference', + xpath: 'AdverseEvent.study', + description: 'AdverseEvent.study', }, - substance: { + // http://hl7.org/fhir/SearchParameter/AdverseEvent-subject + subject: { type: GraphQLString, - description: - 'Refers to the specific entity that caused the adverse event (See http://hl7.org/fhir/SearchParameter/AdverseEvent-substance).', + fhirtype: 'reference', + xpath: 'AdverseEvent.subject', + description: 'Subject or group impacted by event', }, - location: { + // http://hl7.org/fhir/SearchParameter/AdverseEvent-substance + substance: { type: GraphQLString, - description: - 'Location where adverse event occurred (See http://hl7.org/fhir/SearchParameter/AdverseEvent-location).', - }, - category: { - type: TokenScalar, - description: - 'AE | PAE An adverse event is an event that caused harm to a patient, an adverse reaction is a something that is a subject-specific event that is a result of an exposure to a medication, food, device or environmental substance, a potential adverse event is something that occurred and that could have caused harm to a patient but did not (See http://hl7.org/fhir/SearchParameter/AdverseEvent-category).', + fhirtype: 'reference', + xpath: 'AdverseEvent.suspectEntity.instance', + description: 'Refers to the specific entity that caused the adverse event', }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-type type: { type: TokenScalar, - description: - 'actual | potential (See http://hl7.org/fhir/SearchParameter/AdverseEvent-type).', + fhirtype: 'token', + xpath: 'AdverseEvent.type', + description: 'actual | potential', }, }; diff --git a/src/resources/3_0_1/parameters/allergyintolerance.parameters.js b/src/resources/3_0_1/parameters/allergyintolerance.parameters.js index d7ae5a47..4f2f73f3 100644 --- a/src/resources/3_0_1/parameters/allergyintolerance.parameters.js +++ b/src/resources/3_0_1/parameters/allergyintolerance.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,84 +8,121 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the allergyintolerance query */ module.exports = { - severity: { - type: TokenScalar, - description: - 'mild | moderate | severe (of event as a whole) (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-severity).', - }, - date: { - type: DateScalar, - description: - 'Date record was believed accurate (See http://hl7.org/fhir/SearchParameter/clinical-date).', + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-asserter + asserter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AllergyIntolerance.asserter', + description: 'Source of the information about the allergy', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-category + category: { type: TokenScalar, - description: - 'External ids for this item (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.category', + description: 'food | medication | environment | biologic', }, - manifestation: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-clinical-status + clinical_status: { type: TokenScalar, - description: - 'Clinical symptoms/signs associated with the Event (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-manifestation).', - }, - recorder: { - type: GraphQLString, - description: - 'Who recorded the sensitivity (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-recorder).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.clinicalStatus', + description: 'active | inactive | resolved', }, + // http://hl7.org/fhir/SearchParameter/clinical-code code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.code', description: - 'Code that identifies the allergy or intolerance (See http://hl7.org/fhir/SearchParameter/clinical-code).', - }, - verification_status: { - type: TokenScalar, - description: - 'unconfirmed | confirmed | refuted | entered-in-error (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-verification-status).', + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-criticality criticality: { type: TokenScalar, - description: - 'low | high | unable-to-assess (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-criticality).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.criticality', + description: 'low | high | unable-to-assess', }, - clinical_status: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AllergyIntolerance.assertedDate', description: - 'active | inactive | resolved (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-clinical-status).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, - type: { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.identifier', description: - 'allergy | intolerance - Underlying mechanism (if known) (See http://hl7.org/fhir/SearchParameter/clinical-type).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - onset: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-last-date + last_date: { type: DateScalar, - description: - 'Date(/time) when manifestations showed (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-onset).', + fhirtype: 'date', + xpath: 'AllergyIntolerance.lastOccurrence', + description: 'Date(/time) of last known occurrence of a reaction', }, - route: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-manifestation + manifestation: { type: TokenScalar, - description: - 'How the subject was exposed to the substance (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-route).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.manifestation', + description: 'Clinical symptoms/signs associated with the Event', }, - asserter: { - type: GraphQLString, - description: - 'Source of the information about the allergy (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-asserter).', + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-onset + onset: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AllergyIntolerance.reaction.onset', + description: 'Date(/time) when manifestations showed', }, + // http://hl7.org/fhir/SearchParameter/clinical-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'AllergyIntolerance.patient', description: - 'Who the sensitivity is for (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - category: { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-recorder + recorder: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AllergyIntolerance.recorder', + description: 'Who recorded the sensitivity', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-route + route: { type: TokenScalar, - description: - 'food | medication | environment | biologic (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-category).', + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.exposureRoute', + description: 'How the subject was exposed to the substance', }, - last_date: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-severity + severity: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.severity', + description: 'mild | moderate | severe (of event as a whole)', + }, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.type', description: - 'Date(/time) of last known occurrence of a reaction (See http://hl7.org/fhir/SearchParameter/AllergyIntolerance-last-date).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): The type of the referral * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management * [Composition](composition.html): Kind of composition (LOINC if possible) ', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-verification-status + verification_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.verificationStatus', + description: 'unconfirmed | confirmed | refuted | entered-in-error', }, }; diff --git a/src/resources/3_0_1/parameters/appointment.parameters.js b/src/resources/3_0_1/parameters/appointment.parameters.js index d74570f8..157a37da 100644 --- a/src/resources/3_0_1/parameters/appointment.parameters.js +++ b/src/resources/3_0_1/parameters/appointment.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,59 +8,87 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the appointment query */ module.exports = { - date: { - type: DateScalar, - description: - 'Appointment date/time. (See http://hl7.org/fhir/SearchParameter/Appointment-date).', - }, + // http://hl7.org/fhir/SearchParameter/Appointment-actor actor: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', + description: 'Any one of the individuals participating in the appointment', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-appointment-type + appointment_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.appointmentType', description: - 'Any one of the individuals participating in the appointment (See http://hl7.org/fhir/SearchParameter/Appointment-actor).', + 'The style of appointment or patient that has been booked in the slot (not service type)', }, + // http://hl7.org/fhir/SearchParameter/Appointment-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Appointment.start', + description: 'Appointment date/time.', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-identifier identifier: { type: TokenScalar, - description: - 'An Identifier of the Appointment (See http://hl7.org/fhir/SearchParameter/Appointment-identifier).', + fhirtype: 'token', + xpath: 'Appointment.identifier', + description: 'An Identifier of the Appointment', }, - practitioner: { + // http://hl7.org/fhir/SearchParameter/Appointment-incomingreferral + incomingreferral: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.incomingReferral', description: - 'One of the individuals of the appointment is this practitioner (See http://hl7.org/fhir/SearchParameter/Appointment-practitioner).', + 'The ReferralRequest provided as information to allocate to the Encounter', }, - incomingreferral: { + // http://hl7.org/fhir/SearchParameter/Appointment-location + location: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', description: - 'The ReferralRequest provided as information to allocate to the Encounter (See http://hl7.org/fhir/SearchParameter/Appointment-incomingreferral).', + 'This location is listed in the participants of the appointment', }, + // http://hl7.org/fhir/SearchParameter/Appointment-part-status part_status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.participant.status', description: - 'The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests. (See http://hl7.org/fhir/SearchParameter/Appointment-part-status).', + 'The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.', }, + // http://hl7.org/fhir/SearchParameter/Appointment-patient patient: { type: GraphQLString, - description: - 'One of the individuals of the appointment is this patient (See http://hl7.org/fhir/SearchParameter/Appointment-patient).', + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', + description: 'One of the individuals of the appointment is this patient', }, - appointment_type: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Appointment-practitioner + practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', description: - 'The style of appointment or patient that has been booked in the slot (not service type) (See http://hl7.org/fhir/SearchParameter/Appointment-appointment-type).', + 'One of the individuals of the appointment is this practitioner', }, + // http://hl7.org/fhir/SearchParameter/Appointment-service-type service_type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.serviceType', description: - 'The specific service that is to be performed during this appointment (See http://hl7.org/fhir/SearchParameter/Appointment-service-type).', - }, - location: { - type: GraphQLString, - description: - 'This location is listed in the participants of the appointment (See http://hl7.org/fhir/SearchParameter/Appointment-location).', + 'The specific service that is to be performed during this appointment', }, + // http://hl7.org/fhir/SearchParameter/Appointment-status status: { type: TokenScalar, - description: - 'The overall status of the appointment (See http://hl7.org/fhir/SearchParameter/Appointment-status).', + fhirtype: 'token', + xpath: 'Appointment.status', + description: 'The overall status of the appointment', }, }; diff --git a/src/resources/3_0_1/parameters/appointmentresponse.parameters.js b/src/resources/3_0_1/parameters/appointmentresponse.parameters.js index 3ba907c9..1f48a738 100644 --- a/src/resources/3_0_1/parameters/appointmentresponse.parameters.js +++ b/src/resources/3_0_1/parameters/appointmentresponse.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,39 +7,54 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the appointmentresponse query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-actor actor: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', description: - 'The Person, Location/HealthcareService or Device that this appointment response replies for (See http://hl7.org/fhir/SearchParameter/AppointmentResponse-actor).', + 'The Person, Location/HealthcareService or Device that this appointment response replies for', }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-appointment + appointment: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AppointmentResponse.appointment', + description: 'The appointment that the response is attached to', + }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-identifier identifier: { type: TokenScalar, - description: - 'An Identifier in this appointment response (See http://hl7.org/fhir/SearchParameter/AppointmentResponse-identifier).', + fhirtype: 'token', + xpath: 'AppointmentResponse.identifier', + description: 'An Identifier in this appointment response', }, - practitioner: { + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-location + location: { type: GraphQLString, - description: - 'This Response is for this Practitioner (See http://hl7.org/fhir/SearchParameter/AppointmentResponse-practitioner).', + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Location', }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-part-status part_status: { type: TokenScalar, - description: - 'The participants acceptance status for this appointment (See http://hl7.org/fhir/SearchParameter/AppointmentResponse-part-status).', + fhirtype: 'token', + xpath: 'AppointmentResponse.participantStatus', + description: 'The participants acceptance status for this appointment', }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-patient patient: { type: GraphQLString, - description: - 'This Response is for this Patient (See http://hl7.org/fhir/SearchParameter/AppointmentResponse-patient).', - }, - appointment: { - type: GraphQLString, - description: - 'The appointment that the response is attached to (See http://hl7.org/fhir/SearchParameter/AppointmentResponse-appointment).', + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Patient', }, - location: { + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-practitioner + practitioner: { type: GraphQLString, - description: - 'This Response is for this Location (See http://hl7.org/fhir/SearchParameter/AppointmentResponse-location).', + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Practitioner', }, }; diff --git a/src/resources/3_0_1/parameters/auditevent.parameters.js b/src/resources/3_0_1/parameters/auditevent.parameters.js index 86c870d9..4010b0d5 100644 --- a/src/resources/3_0_1/parameters/auditevent.parameters.js +++ b/src/resources/3_0_1/parameters/auditevent.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,104 +9,144 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the auditevent query */ module.exports = { - date: { - type: DateScalar, - description: - 'Time when the event occurred on source (See http://hl7.org/fhir/SearchParameter/AuditEvent-date).', - }, - entity_type: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-action + action: { type: TokenScalar, - description: - 'Type of entity involved (See http://hl7.org/fhir/SearchParameter/AuditEvent-entity-type).', - }, - agent: { - type: GraphQLString, - description: - 'Direct reference to resource (See http://hl7.org/fhir/SearchParameter/AuditEvent-agent).', + fhirtype: 'token', + xpath: 'AuditEvent.action', + description: 'Type of action performed during the event', }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-address address: { type: GraphQLString, - description: - 'Identifier for the network access point of the user device (See http://hl7.org/fhir/SearchParameter/AuditEvent-address).', + fhirtype: 'string', + xpath: 'AuditEvent.agent.network.address', + description: 'Identifier for the network access point of the user device', }, - entity_role: { - type: TokenScalar, - description: - 'What role the entity played (See http://hl7.org/fhir/SearchParameter/AuditEvent-entity-role).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-agent + agent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AuditEvent.agent.reference', + description: 'Direct reference to resource', }, - source: { - type: TokenScalar, - description: - 'The identity of source detecting the event (See http://hl7.org/fhir/SearchParameter/AuditEvent-source).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-agent-name + agent_name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'AuditEvent.agent.name', + description: 'Human-meaningful name for the agent', }, - type: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-agent-role + agent_role: { type: TokenScalar, - description: - 'Type/identifier of event (See http://hl7.org/fhir/SearchParameter/AuditEvent-type).', + fhirtype: 'token', + xpath: 'AuditEvent.agent.role', + description: 'Agent role in the event', }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-altid altid: { type: TokenScalar, - description: - 'Alternative User id e.g. authentication (See http://hl7.org/fhir/SearchParameter/AuditEvent-altid).', + fhirtype: 'token', + xpath: 'AuditEvent.agent.altId', + description: 'Alternative User id e.g. authentication', }, - site: { - type: TokenScalar, - description: - 'Logical source location within the enterprise (See http://hl7.org/fhir/SearchParameter/AuditEvent-site).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AuditEvent.recorded', + description: 'Time when the event occurred on source', }, - agent_name: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity + entity: { type: GraphQLString, - description: - 'Human-meaningful name for the agent (See http://hl7.org/fhir/SearchParameter/AuditEvent-agent-name).', + fhirtype: 'reference', + xpath: 'AuditEvent.entity.reference', + description: 'Specific instance of resource', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity-id + entity_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.entity.identifier', + description: 'Specific instance of object', }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity-name entity_name: { type: GraphQLString, - description: - 'Descriptor for entity (See http://hl7.org/fhir/SearchParameter/AuditEvent-entity-name).', + fhirtype: 'string', + xpath: 'AuditEvent.entity.name', + description: 'Descriptor for entity', }, - subtype: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity-role + entity_role: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.entity.role', + description: 'What role the entity played', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity-type + entity_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.entity.type', + description: 'Type of entity involved', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-outcome + outcome: { type: TokenScalar, - description: - 'More specific type/id for the event (See http://hl7.org/fhir/SearchParameter/AuditEvent-subtype).', + fhirtype: 'token', + xpath: 'AuditEvent.outcome', + description: 'Whether the event succeeded or failed', }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-patient patient: { type: GraphQLString, - description: - 'Direct reference to resource (See http://hl7.org/fhir/SearchParameter/AuditEvent-patient).', + fhirtype: 'reference', + xpath: 'AuditEvent.agent.reference', + description: 'Direct reference to resource', }, - action: { - type: TokenScalar, - description: - 'Type of action performed during the event (See http://hl7.org/fhir/SearchParameter/AuditEvent-action).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-policy + policy: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'AuditEvent.agent.policy', + description: 'Policy that authorized event', }, - agent_role: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-site + site: { type: TokenScalar, - description: - 'Agent role in the event (See http://hl7.org/fhir/SearchParameter/AuditEvent-agent-role).', + fhirtype: 'token', + xpath: 'AuditEvent.source.site', + description: 'Logical source location within the enterprise', }, - user: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-source + source: { type: TokenScalar, - description: - 'Unique identifier for the user (See http://hl7.org/fhir/SearchParameter/AuditEvent-user).', + fhirtype: 'token', + xpath: 'AuditEvent.source.identifier', + description: 'The identity of source detecting the event', }, - entity: { - type: GraphQLString, - description: - 'Specific instance of resource (See http://hl7.org/fhir/SearchParameter/AuditEvent-entity).', - }, - entity_id: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-subtype + subtype: { type: TokenScalar, - description: - 'Specific instance of object (See http://hl7.org/fhir/SearchParameter/AuditEvent-entity-id).', + fhirtype: 'token', + xpath: 'AuditEvent.subtype', + description: 'More specific type/id for the event', }, - outcome: { + // http://hl7.org/fhir/SearchParameter/AuditEvent-type + type: { type: TokenScalar, - description: - 'Whether the event succeeded or failed (See http://hl7.org/fhir/SearchParameter/AuditEvent-outcome).', + fhirtype: 'token', + xpath: 'AuditEvent.type', + description: 'Type/identifier of event', }, - policy: { - type: UriScalar, - description: - 'Policy that authorized event (See http://hl7.org/fhir/SearchParameter/AuditEvent-policy).', + // http://hl7.org/fhir/SearchParameter/AuditEvent-user + user: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.agent.userId', + description: 'Unique identifier for the user', }, }; diff --git a/src/resources/3_0_1/parameters/basic.parameters.js b/src/resources/3_0_1/parameters/basic.parameters.js index e608c901..1fd7d63a 100644 --- a/src/resources/3_0_1/parameters/basic.parameters.js +++ b/src/resources/3_0_1/parameters/basic.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,34 +8,46 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the basic query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/Basic-identifier).', + // http://hl7.org/fhir/SearchParameter/Basic-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Basic.author', + description: 'Who created', }, + // http://hl7.org/fhir/SearchParameter/Basic-code code: { type: TokenScalar, - description: - 'Kind of Resource (See http://hl7.org/fhir/SearchParameter/Basic-code).', - }, - subject: { - type: GraphQLString, - description: - 'Identifies the focus of this resource (See http://hl7.org/fhir/SearchParameter/Basic-subject).', + fhirtype: 'token', + xpath: 'Basic.code', + description: 'Kind of Resource', }, + // http://hl7.org/fhir/SearchParameter/Basic-created created: { type: DateScalar, - description: - 'When created (See http://hl7.org/fhir/SearchParameter/Basic-created).', + fhirtype: 'date', + xpath: 'Basic.created', + description: 'When created', + }, + // http://hl7.org/fhir/SearchParameter/Basic-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Basic.identifier', + description: 'Business identifier', }, + // http://hl7.org/fhir/SearchParameter/Basic-patient patient: { type: GraphQLString, - description: - 'Identifies the focus of this resource (See http://hl7.org/fhir/SearchParameter/Basic-patient).', + fhirtype: 'reference', + xpath: 'Basic.subject', + description: 'Identifies the focus of this resource', }, - author: { + // http://hl7.org/fhir/SearchParameter/Basic-subject + subject: { type: GraphQLString, - description: - 'Who created (See http://hl7.org/fhir/SearchParameter/Basic-author).', + fhirtype: 'reference', + xpath: 'Basic.subject', + description: 'Identifies the focus of this resource', }, }; diff --git a/src/resources/3_0_1/parameters/binary.parameters.js b/src/resources/3_0_1/parameters/binary.parameters.js index 6ffbb64e..bf27d128 100644 --- a/src/resources/3_0_1/parameters/binary.parameters.js +++ b/src/resources/3_0_1/parameters/binary.parameters.js @@ -1,4 +1,4 @@ -const TokenScalar = require('../scalars/token.scalar'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -6,9 +6,11 @@ const TokenScalar = require('../scalars/token.scalar'); * @summary Arguments for the binary query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Binary-contenttype contenttype: { type: TokenScalar, - description: - 'MimeType of the binary content (See http://hl7.org/fhir/SearchParameter/Binary-contenttype).', + fhirtype: 'token', + xpath: 'Binary.contentType', + description: 'MimeType of the binary content', }, }; diff --git a/src/resources/3_0_1/parameters/bodysite.parameters.js b/src/resources/3_0_1/parameters/bodysite.parameters.js index 16af1f5f..1475c1cf 100644 --- a/src/resources/3_0_1/parameters/bodysite.parameters.js +++ b/src/resources/3_0_1/parameters/bodysite.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,19 +7,25 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the bodysite query */ module.exports = { - identifier: { + // http://hl7.org/fhir/SearchParameter/BodySite-code + code: { type: TokenScalar, - description: - 'Identifier for this instance of the anatomical location (See http://hl7.org/fhir/SearchParameter/BodySite-identifier).', + fhirtype: 'token', + xpath: 'BodySite.code', + description: 'Named anatomical location', }, - code: { + // http://hl7.org/fhir/SearchParameter/BodySite-identifier + identifier: { type: TokenScalar, - description: - 'Named anatomical location (See http://hl7.org/fhir/SearchParameter/BodySite-code).', + fhirtype: 'token', + xpath: 'BodySite.identifier', + description: 'Identifier for this instance of the anatomical location', }, + // http://hl7.org/fhir/SearchParameter/BodySite-patient patient: { type: GraphQLString, - description: - 'Patient to whom bodysite belongs (See http://hl7.org/fhir/SearchParameter/BodySite-patient).', + fhirtype: 'reference', + xpath: 'BodySite.patient', + description: 'Patient to whom bodysite belongs', }, }; diff --git a/src/resources/3_0_1/parameters/bundle.parameters.js b/src/resources/3_0_1/parameters/bundle.parameters.js index b862f565..7be2e2f9 100644 --- a/src/resources/3_0_1/parameters/bundle.parameters.js +++ b/src/resources/3_0_1/parameters/bundle.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,24 +7,35 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the bundle query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'Persistent identifier for the bundle (See http://hl7.org/fhir/SearchParameter/Bundle-identifier).', - }, + // http://hl7.org/fhir/SearchParameter/Bundle-composition composition: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Bundle.entry[0].resource', description: - "The first resource in the bundle, if the bundle type is 'document' - this is a composition, and this parameter provides access to searches its contents (See http://hl7.org/fhir/SearchParameter/Bundle-composition).", + "The first resource in the bundle, if the bundle type is 'document' - this is a composition, and this parameter provides access to searches its contents", }, - type: { + // http://hl7.org/fhir/SearchParameter/Bundle-identifier + identifier: { type: TokenScalar, - description: - 'document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection (See http://hl7.org/fhir/SearchParameter/Bundle-type).', + fhirtype: 'token', + xpath: 'Bundle.identifier', + description: 'Persistent identifier for the bundle', }, + // http://hl7.org/fhir/SearchParameter/Bundle-message message: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Bundle.entry[0].resource', + description: + "The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search its contents", + }, + // http://hl7.org/fhir/SearchParameter/Bundle-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Bundle.type', description: - "The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search its contents (See http://hl7.org/fhir/SearchParameter/Bundle-message).", + 'document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection', }, }; diff --git a/src/resources/3_0_1/parameters/capabilitystatement.parameters.js b/src/resources/3_0_1/parameters/capabilitystatement.parameters.js index 8c8f7c3c..2d589005 100644 --- a/src/resources/3_0_1/parameters/capabilitystatement.parameters.js +++ b/src/resources/3_0_1/parameters/capabilitystatement.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,99 +9,139 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the capabilitystatement query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-date date: { type: DateScalar, - description: - 'The capability statement publication date (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-date).', - }, - resource_profile: { - type: GraphQLString, - description: - 'A profile id invoked in a capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource-profile).', + fhirtype: 'date', + xpath: 'CapabilityStatement.date', + description: 'The capability statement publication date', }, - software: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-description + description: { type: GraphQLString, - description: - 'Part of a the name of a software application (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-software).', + fhirtype: 'string', + xpath: 'CapabilityStatement.description', + description: 'The description of the capability statement', }, - resource: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-event + event: { type: TokenScalar, - description: - 'Name of a resource mentioned in a capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource).', + fhirtype: 'token', + xpath: 'CapabilityStatement.messaging.event.code', + description: 'Event code in a capability statement', }, - jurisdiction: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-fhirversion + fhirversion: { type: TokenScalar, - description: - 'Intended jurisdiction for the capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-jurisdiction).', + fhirtype: 'token', + xpath: 'CapabilityStatement.version', + description: 'The version of FHIR', }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-format format: { type: TokenScalar, - description: - 'formats supported (xml | json | ttl | mime type) (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-format).', - }, - description: { - type: GraphQLString, - description: - 'The description of the capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-description).', + fhirtype: 'token', + xpath: 'CapabilityStatement.format', + description: 'formats supported (xml | json | ttl | mime type)', }, - title: { - type: GraphQLString, - description: - 'The human-friendly name of the capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-title).', + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-guide + guide: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'CapabilityStatement.implementationGuide', + description: 'Implementation guides supported', }, - fhirversion: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'The version of FHIR (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-fhirversion).', + fhirtype: 'token', + xpath: 'CapabilityStatement.jurisdiction', + description: 'Intended jurisdiction for the capability statement', }, - version: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-mode + mode: { type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.rest.mode', description: - 'The business version of the capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-version).', + 'Mode - restful (server/client) or messaging (sender/receiver)', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-url).', + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CapabilityStatement.name', + description: 'Computationally friendly name of the capability statement', }, - supported_profile: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-publisher + publisher: { type: GraphQLString, - description: - 'Profiles for use cases supported (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-supported-profile).', + fhirtype: 'string', + xpath: 'CapabilityStatement.publisher', + description: 'Name of the publisher of the capability statement', }, - mode: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource + resource: { type: TokenScalar, - description: - 'Mode - restful (server/client) or messaging (sender/receiver) (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-mode).', + fhirtype: 'token', + xpath: 'CapabilityStatement.rest.resource.type', + description: 'Name of a resource mentioned in a capability statement', }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource-profile + resource_profile: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CapabilityStatement.rest.resource.profile', + description: 'A profile id invoked in a capability statement', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-security-service security_service: { type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.rest.security.service', description: - 'OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-security-service).', + 'OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates', }, - name: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-software + software: { type: GraphQLString, - description: - 'Computationally friendly name of the capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-name).', + fhirtype: 'string', + xpath: 'CapabilityStatement.software.name', + description: 'Part of a the name of a software application', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.status', + description: 'The current status of the capability statement', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-supported-profile + supported_profile: { type: GraphQLString, - description: - 'Name of the publisher of the capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-publisher).', + fhirtype: 'reference', + xpath: 'CapabilityStatement.profile', + description: 'Profiles for use cases supported', }, - event: { - type: TokenScalar, - description: - 'Event code in a capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-event).', + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CapabilityStatement.title', + description: 'The human-friendly name of the capability statement', }, - guide: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-url + url: { type: UriScalar, - description: - 'Implementation guides supported (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-guide).', + fhirtype: 'uri', + xpath: 'CapabilityStatement.url', + description: 'The uri that identifies the capability statement', }, - status: { + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-version + version: { type: TokenScalar, - description: - 'The current status of the capability statement (See http://hl7.org/fhir/SearchParameter/CapabilityStatement-status).', + fhirtype: 'token', + xpath: 'CapabilityStatement.version', + description: 'The business version of the capability statement', }, }; diff --git a/src/resources/3_0_1/parameters/careplan.parameters.js b/src/resources/3_0_1/parameters/careplan.parameters.js index d41fc25a..2a0a4c26 100644 --- a/src/resources/3_0_1/parameters/careplan.parameters.js +++ b/src/resources/3_0_1/parameters/careplan.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,104 +8,150 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the careplan query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'CarePlan.period', description: - 'Time period plan covers (See http://hl7.org/fhir/SearchParameter/clinical-date).', - }, - care_team: { - type: GraphQLString, - description: - "Who's involved in plan? (See http://hl7.org/fhir/SearchParameter/CarePlan-care-team).", + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.identifier', description: - 'External Ids for this plan (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - performer: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.subject', description: - "Matches if the practitioner is listed as a performer in any of the 'simple' activities. (For performers of the detailed activities, chain through the activitydetail search parameter.) (See http://hl7.org/fhir/SearchParameter/CarePlan-performer).", + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - goal: { - type: GraphQLString, - description: - 'Desired outcome of plan (See http://hl7.org/fhir/SearchParameter/CarePlan-goal).', + // http://hl7.org/fhir/SearchParameter/CarePlan-activity-code + activity_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.activity.detail.code', + description: 'Detail type of activity', }, - subject: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/CarePlan-activity-date + activity_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CarePlan.activity.detail.scheduledTiming', description: - 'Who care plan is for (See http://hl7.org/fhir/SearchParameter/CarePlan-subject).', + 'Specified date occurs within period specified by CarePlan.activity.timingSchedule', }, - replaces: { + // http://hl7.org/fhir/SearchParameter/CarePlan-activity-reference + activity_reference: { type: GraphQLString, - description: - 'CarePlan replaced by this CarePlan (See http://hl7.org/fhir/SearchParameter/CarePlan-replaces).', + fhirtype: 'reference', + xpath: 'CarePlan.activity.reference', + description: 'Activity details defined in specific resource', }, - part_of: { + // http://hl7.org/fhir/SearchParameter/CarePlan-based-on + based_on: { type: GraphQLString, - description: - 'Part of referenced CarePlan (See http://hl7.org/fhir/SearchParameter/CarePlan-part-of).', + fhirtype: 'reference', + xpath: 'CarePlan.basedOn', + description: 'Fulfills care plan', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/CarePlan-care-team + care_team: { type: GraphQLString, - description: - 'Created in context of (See http://hl7.org/fhir/SearchParameter/CarePlan-encounter).', + fhirtype: 'reference', + xpath: 'CarePlan.careTeam', + description: "Who's involved in plan?", }, - intent: { + // http://hl7.org/fhir/SearchParameter/CarePlan-category + category: { type: TokenScalar, - description: - 'proposal | plan | order | option (See http://hl7.org/fhir/SearchParameter/CarePlan-intent).', + fhirtype: 'token', + xpath: 'CarePlan.category', + description: 'Type of plan', }, - activity_reference: { + // http://hl7.org/fhir/SearchParameter/CarePlan-condition + condition: { type: GraphQLString, - description: - 'Activity details defined in specific resource (See http://hl7.org/fhir/SearchParameter/CarePlan-activity-reference).', + fhirtype: 'reference', + xpath: 'CarePlan.addresses', + description: 'Health issues this plan addresses', }, - condition: { + // http://hl7.org/fhir/SearchParameter/CarePlan-context + context: { type: GraphQLString, - description: - 'Health issues this plan addresses (See http://hl7.org/fhir/SearchParameter/CarePlan-condition).', + fhirtype: 'reference', + xpath: 'CarePlan.context', + description: 'Created in context of', }, - based_on: { + // http://hl7.org/fhir/SearchParameter/CarePlan-definition + definition: { type: GraphQLString, - description: - 'Fulfills care plan (See http://hl7.org/fhir/SearchParameter/CarePlan-based-on).', + fhirtype: 'reference', + xpath: 'CarePlan.definition', + description: 'Protocol or definition', }, - patient: { + // http://hl7.org/fhir/SearchParameter/CarePlan-encounter + encounter: { type: GraphQLString, - description: - 'Who care plan is for (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'CarePlan.context', + description: 'Created in context of', }, - context: { + // http://hl7.org/fhir/SearchParameter/CarePlan-goal + goal: { type: GraphQLString, - description: - 'Created in context of (See http://hl7.org/fhir/SearchParameter/CarePlan-context).', + fhirtype: 'reference', + xpath: 'CarePlan.goal', + description: 'Desired outcome of plan', }, - activity_date: { - type: DateScalar, - description: - 'Specified date occurs within period specified by CarePlan.activity.timingSchedule (See http://hl7.org/fhir/SearchParameter/CarePlan-activity-date).', + // http://hl7.org/fhir/SearchParameter/CarePlan-intent + intent: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.intent', + description: 'proposal | plan | order | option', }, - definition: { + // http://hl7.org/fhir/SearchParameter/CarePlan-part-of + part_of: { type: GraphQLString, - description: - 'Protocol or definition (See http://hl7.org/fhir/SearchParameter/CarePlan-definition).', + fhirtype: 'reference', + xpath: 'CarePlan.partOf', + description: 'Part of referenced CarePlan', }, - category: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/CarePlan-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.activity.detail.performer', description: - 'Type of plan (See http://hl7.org/fhir/SearchParameter/CarePlan-category).', + "Matches if the practitioner is listed as a performer in any of the 'simple' activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", }, - activity_code: { - type: TokenScalar, - description: - 'Detail type of activity (See http://hl7.org/fhir/SearchParameter/CarePlan-activity-code).', + // http://hl7.org/fhir/SearchParameter/CarePlan-replaces + replaces: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.replaces', + description: 'CarePlan replaced by this CarePlan', }, + // http://hl7.org/fhir/SearchParameter/CarePlan-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.status', description: - 'draft | active | suspended | completed | entered-in-error | cancelled | unknown (See http://hl7.org/fhir/SearchParameter/CarePlan-status).', + 'draft | active | suspended | completed | entered-in-error | cancelled | unknown', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.subject', + description: 'Who care plan is for', }, }; diff --git a/src/resources/3_0_1/parameters/careteam.parameters.js b/src/resources/3_0_1/parameters/careteam.parameters.js index 34030b5f..a043324d 100644 --- a/src/resources/3_0_1/parameters/careteam.parameters.js +++ b/src/resources/3_0_1/parameters/careteam.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,49 +8,70 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the careteam query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'CareTeam.period', description: - 'Time period team covers (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'CareTeam.identifier', description: - 'External Ids for this team (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, + // http://hl7.org/fhir/SearchParameter/clinical-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'CareTeam.subject', description: - 'Who care team is for (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - subject: { - type: GraphQLString, - description: - 'Who care team is for (See http://hl7.org/fhir/SearchParameter/CareTeam-subject).', + // http://hl7.org/fhir/SearchParameter/CareTeam-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CareTeam.category', + description: 'Type of team', }, + // http://hl7.org/fhir/SearchParameter/CareTeam-context context: { type: GraphQLString, - description: - 'Encounter or episode associated with CareTeam (See http://hl7.org/fhir/SearchParameter/CareTeam-context).', + fhirtype: 'reference', + xpath: 'CareTeam.context', + description: 'Encounter or episode associated with CareTeam', }, + // http://hl7.org/fhir/SearchParameter/CareTeam-encounter encounter: { type: GraphQLString, - description: - 'Encounter or episode associated with CareTeam (See http://hl7.org/fhir/SearchParameter/CareTeam-encounter).', - }, - category: { - type: TokenScalar, - description: - 'Type of team (See http://hl7.org/fhir/SearchParameter/CareTeam-category).', + fhirtype: 'reference', + xpath: 'CareTeam.context', + description: 'Encounter or episode associated with CareTeam', }, + // http://hl7.org/fhir/SearchParameter/CareTeam-participant participant: { type: GraphQLString, - description: - 'Who is involved (See http://hl7.org/fhir/SearchParameter/CareTeam-participant).', + fhirtype: 'reference', + xpath: 'CareTeam.participant.member', + description: 'Who is involved', }, + // http://hl7.org/fhir/SearchParameter/CareTeam-status status: { type: TokenScalar, - description: - 'proposed | active | suspended | inactive | entered-in-error (See http://hl7.org/fhir/SearchParameter/CareTeam-status).', + fhirtype: 'token', + xpath: 'CareTeam.status', + description: 'proposed | active | suspended | inactive | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/CareTeam-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CareTeam.subject', + description: 'Who care team is for', }, }; diff --git a/src/resources/3_0_1/parameters/chargeitem.parameters.js b/src/resources/3_0_1/parameters/chargeitem.parameters.js index 08287d72..30f8aa0b 100644 --- a/src/resources/3_0_1/parameters/chargeitem.parameters.js +++ b/src/resources/3_0_1/parameters/chargeitem.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,89 +8,123 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the chargeitem query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'Business Identifier for item (See http://hl7.org/fhir/SearchParameter/ChargeItem-identifier).', - }, - performing_organization: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-account + account: { type: GraphQLString, - description: - 'Organization providing the charged sevice (See http://hl7.org/fhir/SearchParameter/ChargeItem-performing-organization).', + fhirtype: 'reference', + xpath: 'ChargeItem.account', + description: 'Account to place this charge', }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-code code: { type: TokenScalar, - description: - 'A code that identifies the charge, like a billing code (See http://hl7.org/fhir/SearchParameter/ChargeItem-code).', + fhirtype: 'token', + xpath: 'ChargeItem.code', + description: 'A code that identifies the charge, like a billing code', }, - quantity: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-context + context: { type: GraphQLString, - description: - 'Quantity of which the charge item has been serviced (See http://hl7.org/fhir/SearchParameter/ChargeItem-quantity).', + fhirtype: 'reference', + xpath: 'ChargeItem.context', + description: 'Encounter / Episode associated with event', }, - subject: { - type: GraphQLString, - description: - 'Individual service was done for/to (See http://hl7.org/fhir/SearchParameter/ChargeItem-subject).', + // http://hl7.org/fhir/SearchParameter/ChargeItem-entered-date + entered_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ChargeItem.enteredDate', + description: 'Date the charge item was entered', }, - participant_role: { - type: TokenScalar, - description: - 'What type of performance was done (See http://hl7.org/fhir/SearchParameter/ChargeItem-participant-role).', + // http://hl7.org/fhir/SearchParameter/ChargeItem-enterer + enterer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.enterer', + description: 'Individual who was entering', }, - participant_actor: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-factor-override + factor_override: { type: GraphQLString, - description: - 'Individual who was performing (See http://hl7.org/fhir/SearchParameter/ChargeItem-participant-actor).', + fhirtype: 'number', + xpath: 'ChargeItem.factorOverride', + description: 'Factor overriding the associated rules', }, - occurrence: { - type: DateScalar, - description: - 'When the charged service was applied (See http://hl7.org/fhir/SearchParameter/ChargeItem-occurrence).', + // http://hl7.org/fhir/SearchParameter/ChargeItem-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItem.identifier', + description: 'Business Identifier for item', }, - entered_date: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-occurrence + occurrence: { type: DateScalar, - description: - 'Date the charge item was entered (See http://hl7.org/fhir/SearchParameter/ChargeItem-entered-date).', + fhirtype: 'date', + xpath: 'ChargeItem.occurrenceDateTime', + description: 'When the charged service was applied', }, - patient: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-participant-actor + participant_actor: { type: GraphQLString, - description: - 'Individual service was done for/to (See http://hl7.org/fhir/SearchParameter/ChargeItem-patient).', + fhirtype: 'reference', + xpath: 'ChargeItem.participant.actor', + description: 'Individual who was performing', }, - factor_override: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-participant-role + participant_role: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItem.participant.role', + description: 'What type of performance was done', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-patient + patient: { type: GraphQLString, - description: - 'Factor overriding the associated rules (See http://hl7.org/fhir/SearchParameter/ChargeItem-factor-override).', + fhirtype: 'reference', + xpath: 'ChargeItem.subject', + description: 'Individual service was done for/to', }, - service: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-performing-organization + performing_organization: { type: GraphQLString, - description: - 'Which rendered service is being charged? (See http://hl7.org/fhir/SearchParameter/ChargeItem-service).', + fhirtype: 'reference', + xpath: 'ChargeItem.performingOrganization', + description: 'Organization providing the charged sevice', }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-price-override price_override: { type: GraphQLString, - description: - 'Price overriding the associated rules (See http://hl7.org/fhir/SearchParameter/ChargeItem-price-override).', + fhirtype: 'quantity', + xpath: 'ChargeItem.priceOverride', + description: 'Price overriding the associated rules', }, - context: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-quantity + quantity: { type: GraphQLString, - description: - 'Encounter / Episode associated with event (See http://hl7.org/fhir/SearchParameter/ChargeItem-context).', + fhirtype: 'quantity', + xpath: 'ChargeItem.quantity', + description: 'Quantity of which the charge item has been serviced', }, - enterer: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-requesting-organization + requesting_organization: { type: GraphQLString, - description: - 'Individual who was entering (See http://hl7.org/fhir/SearchParameter/ChargeItem-enterer).', + fhirtype: 'reference', + xpath: 'ChargeItem.requestingOrganization', + description: 'Organization requesting the charged service', }, - account: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-service + service: { type: GraphQLString, - description: - 'Account to place this charge (See http://hl7.org/fhir/SearchParameter/ChargeItem-account).', + fhirtype: 'reference', + xpath: 'ChargeItem.service', + description: 'Which rendered service is being charged?', }, - requesting_organization: { + // http://hl7.org/fhir/SearchParameter/ChargeItem-subject + subject: { type: GraphQLString, - description: - 'Organization requesting the charged service (See http://hl7.org/fhir/SearchParameter/ChargeItem-requesting-organization).', + fhirtype: 'reference', + xpath: 'ChargeItem.subject', + description: 'Individual service was done for/to', }, }; diff --git a/src/resources/3_0_1/parameters/claim.parameters.js b/src/resources/3_0_1/parameters/claim.parameters.js index 53f060ba..b4b77d22 100644 --- a/src/resources/3_0_1/parameters/claim.parameters.js +++ b/src/resources/3_0_1/parameters/claim.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,69 +8,95 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the claim query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Claim-care-team care_team: { type: GraphQLString, - description: - 'Member of the CareTeam (See http://hl7.org/fhir/SearchParameter/Claim-care-team).', - }, - identifier: { - type: TokenScalar, - description: - 'The primary identifier of the financial resource (See http://hl7.org/fhir/SearchParameter/Claim-identifier).', - }, - use: { - type: TokenScalar, - description: - 'The kind of financial resource (See http://hl7.org/fhir/SearchParameter/Claim-use).', + fhirtype: 'reference', + xpath: 'Claim.careTeam.provider', + description: 'Member of the CareTeam', }, + // http://hl7.org/fhir/SearchParameter/Claim-created created: { type: DateScalar, - description: - 'The creation date for the Claim (See http://hl7.org/fhir/SearchParameter/Claim-created).', + fhirtype: 'date', + xpath: 'Claim.created', + description: 'The creation date for the Claim', }, + // http://hl7.org/fhir/SearchParameter/Claim-encounter encounter: { type: GraphQLString, - description: - 'Encounters associated with a billed line item (See http://hl7.org/fhir/SearchParameter/Claim-encounter).', + fhirtype: 'reference', + xpath: 'Claim.item.encounter', + description: 'Encounters associated with a billed line item', }, - priority: { - type: TokenScalar, - description: - 'Processing priority requested (See http://hl7.org/fhir/SearchParameter/Claim-priority).', - }, - payee: { + // http://hl7.org/fhir/SearchParameter/Claim-enterer + enterer: { type: GraphQLString, - description: - 'The party receiving any payment for the Claim (See http://hl7.org/fhir/SearchParameter/Claim-payee).', + fhirtype: 'reference', + xpath: 'Claim.enterer', + description: 'The party responsible for the entry of the Claim', }, - provider: { + // http://hl7.org/fhir/SearchParameter/Claim-facility + facility: { type: GraphQLString, - description: - 'Provider responsible for the Claim (See http://hl7.org/fhir/SearchParameter/Claim-provider).', + fhirtype: 'reference', + xpath: 'Claim.facility', + description: 'Facility responsible for the goods and services', }, - patient: { - type: GraphQLString, - description: - 'Patient receiving the services (See http://hl7.org/fhir/SearchParameter/Claim-patient).', + // http://hl7.org/fhir/SearchParameter/Claim-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Claim.identifier', + description: 'The primary identifier of the financial resource', }, + // http://hl7.org/fhir/SearchParameter/Claim-insurer insurer: { type: GraphQLString, - description: - 'The target payor/insurer for the Claim (See http://hl7.org/fhir/SearchParameter/Claim-insurer).', + fhirtype: 'reference', + xpath: 'Claim.insurer', + description: 'The target payor/insurer for the Claim', }, + // http://hl7.org/fhir/SearchParameter/Claim-organization organization: { type: GraphQLString, - description: - 'The reference to the providing organization (See http://hl7.org/fhir/SearchParameter/Claim-organization).', + fhirtype: 'reference', + xpath: 'Claim.organization', + description: 'The reference to the providing organization', }, - enterer: { + // http://hl7.org/fhir/SearchParameter/Claim-patient + patient: { type: GraphQLString, - description: - 'The party responsible for the entry of the Claim (See http://hl7.org/fhir/SearchParameter/Claim-enterer).', + fhirtype: 'reference', + xpath: 'Claim.patient', + description: 'Patient receiving the services', }, - facility: { + // http://hl7.org/fhir/SearchParameter/Claim-payee + payee: { type: GraphQLString, - description: - 'Facility responsible for the goods and services (See http://hl7.org/fhir/SearchParameter/Claim-facility).', + fhirtype: 'reference', + xpath: 'Claim.payee.party', + description: 'The party receiving any payment for the Claim', + }, + // http://hl7.org/fhir/SearchParameter/Claim-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Claim.priority', + description: 'Processing priority requested', + }, + // http://hl7.org/fhir/SearchParameter/Claim-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.provider', + description: 'Provider responsible for the Claim', + }, + // http://hl7.org/fhir/SearchParameter/Claim-use + use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Claim.use', + description: 'The kind of financial resource', }, }; diff --git a/src/resources/3_0_1/parameters/claimresponse.parameters.js b/src/resources/3_0_1/parameters/claimresponse.parameters.js index 9de5576f..db0d5048 100644 --- a/src/resources/3_0_1/parameters/claimresponse.parameters.js +++ b/src/resources/3_0_1/parameters/claimresponse.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,49 +8,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the claimresponse query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'The identity of the claimresponse (See http://hl7.org/fhir/SearchParameter/ClaimResponse-identifier).', - }, - request: { - type: GraphQLString, - description: - 'The claim reference (See http://hl7.org/fhir/SearchParameter/ClaimResponse-request).', + // http://hl7.org/fhir/SearchParameter/ClaimResponse-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ClaimResponse.created', + description: 'The creation date', }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-disposition disposition: { type: GraphQLString, - description: - 'The contents of the disposition message (See http://hl7.org/fhir/SearchParameter/ClaimResponse-disposition).', + fhirtype: 'string', + xpath: 'ClaimResponse.disposition', + description: 'The contents of the disposition message', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClaimResponse.identifier', + description: 'The identity of the claimresponse', }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-insurer insurer: { type: GraphQLString, - description: - 'The organization who generated this resource (See http://hl7.org/fhir/SearchParameter/ClaimResponse-insurer).', + fhirtype: 'reference', + xpath: 'ClaimResponse.insurer', + description: 'The organization who generated this resource', }, - created: { - type: DateScalar, - description: - 'The creation date (See http://hl7.org/fhir/SearchParameter/ClaimResponse-created).', + // http://hl7.org/fhir/SearchParameter/ClaimResponse-outcome + outcome: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClaimResponse.outcome', + description: 'The processing outcome', }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-patient patient: { type: GraphQLString, - description: - 'The subject of care. (See http://hl7.org/fhir/SearchParameter/ClaimResponse-patient).', + fhirtype: 'reference', + xpath: 'ClaimResponse.patient', + description: 'The subject of care.', }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-payment-date payment_date: { type: DateScalar, - description: - 'The expected paymentDate (See http://hl7.org/fhir/SearchParameter/ClaimResponse-payment-date).', + fhirtype: 'date', + xpath: 'ClaimResponse.payment.date', + description: 'The expected paymentDate', }, - request_provider: { + // http://hl7.org/fhir/SearchParameter/ClaimResponse-request + request: { type: GraphQLString, - description: - 'The Provider of the claim (See http://hl7.org/fhir/SearchParameter/ClaimResponse-request-provider).', + fhirtype: 'reference', + xpath: 'ClaimResponse.request', + description: 'The claim reference', }, - outcome: { - type: TokenScalar, - description: - 'The processing outcome (See http://hl7.org/fhir/SearchParameter/ClaimResponse-outcome).', + // http://hl7.org/fhir/SearchParameter/ClaimResponse-request-provider + request_provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClaimResponse.requestProvider', + description: 'The Provider of the claim', }, }; diff --git a/src/resources/3_0_1/parameters/clinicalimpression.parameters.js b/src/resources/3_0_1/parameters/clinicalimpression.parameters.js index 26bdcec9..c51d21b0 100644 --- a/src/resources/3_0_1/parameters/clinicalimpression.parameters.js +++ b/src/resources/3_0_1/parameters/clinicalimpression.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,69 +8,97 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the clinicalimpression query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'ClinicalImpression.date', description: - 'When the assessment was documented (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, - identifier: { - type: TokenScalar, - description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-identifier).', - }, - previous: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.subject', description: - 'Reference to last assessment (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-previous).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - finding_code: { - type: TokenScalar, - description: - 'What was found (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-code).', + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-action + action: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.action', + description: 'Action taken as part of assessment procedure', }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-assessor assessor: { type: GraphQLString, - description: - 'The clinician performing the assessment (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-assessor).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.assessor', + description: 'The clinician performing the assessment', }, - subject: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-context + context: { type: GraphQLString, - description: - 'Patient or group assessed (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-subject).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.context', + description: 'Encounter or Episode created from', }, - finding_ref: { - type: GraphQLString, - description: - 'What was found (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-ref).', + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-code + finding_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClinicalImpression.finding.itemCodeableConcept', + description: 'What was found', }, - problem: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-ref + finding_ref: { type: GraphQLString, - description: - 'Relevant impressions of patient state (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-problem).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.finding.itemReference', + description: 'What was found', }, - patient: { - type: GraphQLString, - description: - 'Patient or group assessed (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClinicalImpression.identifier', + description: 'Business identifier', }, - context: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-investigation + investigation: { type: GraphQLString, - description: - 'Encounter or Episode created from (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-context).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.investigation.item', + description: 'Record of a specific investigation', }, - investigation: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-previous + previous: { type: GraphQLString, - description: - 'Record of a specific investigation (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-investigation).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.previous', + description: 'Reference to last assessment', }, - action: { + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-problem + problem: { type: GraphQLString, - description: - 'Action taken as part of assessment procedure (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-action).', + fhirtype: 'reference', + xpath: 'ClinicalImpression.problem', + description: 'Relevant impressions of patient state', }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-status status: { type: TokenScalar, - description: - 'draft | completed | entered-in-error (See http://hl7.org/fhir/SearchParameter/ClinicalImpression-status).', + fhirtype: 'token', + xpath: 'ClinicalImpression.status', + description: 'draft | completed | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.subject', + description: 'Patient or group assessed', }, }; diff --git a/src/resources/3_0_1/parameters/codesystem.parameters.js b/src/resources/3_0_1/parameters/codesystem.parameters.js index 3506d819..9bd96ede 100644 --- a/src/resources/3_0_1/parameters/codesystem.parameters.js +++ b/src/resources/3_0_1/parameters/codesystem.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,74 +9,103 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the codesystem query */ module.exports = { - date: { - type: DateScalar, - description: - 'The code system publication date (See http://hl7.org/fhir/SearchParameter/CodeSystem-date).', - }, - identifier: { - type: TokenScalar, - description: - 'External identifier for the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-identifier).', - }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-code code: { type: TokenScalar, - description: - 'A code defined in the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-code).', + fhirtype: 'token', + xpath: 'CodeSystem.concept.code', + description: 'A code defined in the code system', }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-content-mode content_mode: { type: TokenScalar, - description: - 'not-present | example | fragment | complete (See http://hl7.org/fhir/SearchParameter/CodeSystem-content-mode).', + fhirtype: 'token', + xpath: 'CodeSystem.content', + description: 'not-present | example | fragment | complete', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-jurisdiction).', + // http://hl7.org/fhir/SearchParameter/CodeSystem-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CodeSystem.date', + description: 'The code system publication date', }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-description description: { type: GraphQLString, - description: - 'The description of the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-description).', + fhirtype: 'string', + xpath: 'CodeSystem.description', + description: 'The description of the code system', + }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.identifier', + description: 'External identifier for the code system', + }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.jurisdiction', + description: 'Intended jurisdiction for the code system', }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-language language: { type: TokenScalar, - description: - 'A language in which a designation is provided (See http://hl7.org/fhir/SearchParameter/CodeSystem-language).', + fhirtype: 'token', + xpath: 'CodeSystem.concept.designation.language', + description: 'A language in which a designation is provided', }, - title: { + // http://hl7.org/fhir/SearchParameter/CodeSystem-name + name: { type: GraphQLString, - description: - 'The human-friendly name of the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-title).', + fhirtype: 'string', + xpath: 'CodeSystem.name', + description: 'Computationally friendly name of the code system', }, - version: { - type: TokenScalar, - description: - 'The business version of the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-version).', + // http://hl7.org/fhir/SearchParameter/CodeSystem-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CodeSystem.publisher', + description: 'Name of the publisher of the code system', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-url).', + // http://hl7.org/fhir/SearchParameter/CodeSystem-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.status', + description: 'The current status of the code system', }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-system system: { type: UriScalar, + fhirtype: 'uri', + xpath: 'CodeSystem.url', description: - "The system for any codes defined by this code system (same as 'url') (See http://hl7.org/fhir/SearchParameter/CodeSystem-system).", + "The system for any codes defined by this code system (same as 'url')", }, - name: { + // http://hl7.org/fhir/SearchParameter/CodeSystem-title + title: { type: GraphQLString, - description: - 'Computationally friendly name of the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-name).', + fhirtype: 'string', + xpath: 'CodeSystem.title', + description: 'The human-friendly name of the code system', }, - publisher: { - type: GraphQLString, - description: - 'Name of the publisher of the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-publisher).', + // http://hl7.org/fhir/SearchParameter/CodeSystem-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'CodeSystem.url', + description: 'The uri that identifies the code system', }, - status: { + // http://hl7.org/fhir/SearchParameter/CodeSystem-version + version: { type: TokenScalar, - description: - 'The current status of the code system (See http://hl7.org/fhir/SearchParameter/CodeSystem-status).', + fhirtype: 'token', + xpath: 'CodeSystem.version', + description: 'The business version of the code system', }, }; diff --git a/src/resources/3_0_1/parameters/common.parameters.js b/src/resources/3_0_1/parameters/common.parameters.js deleted file mode 100644 index 076aa57e..00000000 --- a/src/resources/3_0_1/parameters/common.parameters.js +++ /dev/null @@ -1,52 +0,0 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLString } = require('graphql'); - -/** - * @name exports - * @static - * @summary Arguments for the common query - */ -module.exports = { - _text: { - type: GraphQLString, - description: - 'Search on the narrative of the resource (See http://hl7.org/fhir/SearchParameter/DomainResource-text).', - }, - _query: { - type: TokenScalar, - description: - 'A custom search profile that describes a specific defined query operation (See http://hl7.org/fhir/SearchParameter/Resource-query).', - }, - _profile: { - type: UriScalar, - description: - 'Profiles this resource claims to conform to (See http://hl7.org/fhir/SearchParameter/Resource-profile).', - }, - _lastUpdated: { - type: DateScalar, - description: - 'When the resource version last changed (See http://hl7.org/fhir/SearchParameter/Resource-lastUpdated).', - }, - _tag: { - type: TokenScalar, - description: - 'Tags applied to this resource (See http://hl7.org/fhir/SearchParameter/Resource-tag).', - }, - _security: { - type: TokenScalar, - description: - 'Security Labels applied to this resource (See http://hl7.org/fhir/SearchParameter/Resource-security).', - }, - _id: { - type: TokenScalar, - description: - 'Logical id of this artifact (See http://hl7.org/fhir/SearchParameter/Resource-id).', - }, - _content: { - type: GraphQLString, - description: - 'Search on the entire content of the resource (See http://hl7.org/fhir/SearchParameter/Resource-content).', - }, -}; diff --git a/src/resources/3_0_1/parameters/communication.parameters.js b/src/resources/3_0_1/parameters/communication.parameters.js index 1a4e9dc8..229ba46c 100644 --- a/src/resources/3_0_1/parameters/communication.parameters.js +++ b/src/resources/3_0_1/parameters/communication.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,79 +8,110 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the communication query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'Unique identifier (See http://hl7.org/fhir/SearchParameter/Communication-identifier).', - }, - subject: { + // http://hl7.org/fhir/SearchParameter/Communication-based-on + based_on: { type: GraphQLString, - description: - 'Focus of message (See http://hl7.org/fhir/SearchParameter/Communication-subject).', + fhirtype: 'reference', + xpath: 'Communication.basedOn', + description: 'Request fulfilled by this communication', }, - received: { - type: DateScalar, - description: - 'When received (See http://hl7.org/fhir/SearchParameter/Communication-received).', + // http://hl7.org/fhir/SearchParameter/Communication-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.category', + description: 'Message category', }, - part_of: { + // http://hl7.org/fhir/SearchParameter/Communication-context + context: { type: GraphQLString, - description: - 'Part of this action (See http://hl7.org/fhir/SearchParameter/Communication-part-of).', + fhirtype: 'reference', + xpath: 'Communication.context', + description: 'Encounter or episode leading to message', }, - medium: { - type: TokenScalar, - description: - 'A channel of communication (See http://hl7.org/fhir/SearchParameter/Communication-medium).', + // http://hl7.org/fhir/SearchParameter/Communication-definition + definition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.definition', + description: 'Instantiates protocol or definition', }, + // http://hl7.org/fhir/SearchParameter/Communication-encounter encounter: { type: GraphQLString, - description: - 'Encounter leading to message (See http://hl7.org/fhir/SearchParameter/Communication-encounter).', + fhirtype: 'reference', + xpath: 'Communication.context', + description: 'Encounter leading to message', }, - sent: { - type: DateScalar, - description: - 'When sent (See http://hl7.org/fhir/SearchParameter/Communication-sent).', + // http://hl7.org/fhir/SearchParameter/Communication-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.identifier', + description: 'Unique identifier', }, - based_on: { - type: GraphQLString, - description: - 'Request fulfilled by this communication (See http://hl7.org/fhir/SearchParameter/Communication-based-on).', + // http://hl7.org/fhir/SearchParameter/Communication-medium + medium: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.medium', + description: 'A channel of communication', }, - sender: { + // http://hl7.org/fhir/SearchParameter/Communication-part-of + part_of: { type: GraphQLString, - description: - 'Message sender (See http://hl7.org/fhir/SearchParameter/Communication-sender).', + fhirtype: 'reference', + xpath: 'Communication.partOf', + description: 'Part of this action', }, + // http://hl7.org/fhir/SearchParameter/Communication-patient patient: { type: GraphQLString, - description: - 'Focus of message (See http://hl7.org/fhir/SearchParameter/Communication-patient).', + fhirtype: 'reference', + xpath: 'Communication.subject', + description: 'Focus of message', }, - recipient: { - type: GraphQLString, - description: - 'Message recipient (See http://hl7.org/fhir/SearchParameter/Communication-recipient).', + // http://hl7.org/fhir/SearchParameter/Communication-received + received: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Communication.received', + description: 'When received', }, - context: { + // http://hl7.org/fhir/SearchParameter/Communication-recipient + recipient: { type: GraphQLString, - description: - 'Encounter or episode leading to message (See http://hl7.org/fhir/SearchParameter/Communication-context).', + fhirtype: 'reference', + xpath: 'Communication.recipient', + description: 'Message recipient', }, - definition: { + // http://hl7.org/fhir/SearchParameter/Communication-sender + sender: { type: GraphQLString, - description: - 'Instantiates protocol or definition (See http://hl7.org/fhir/SearchParameter/Communication-definition).', + fhirtype: 'reference', + xpath: 'Communication.sender', + description: 'Message sender', }, - category: { - type: TokenScalar, - description: - 'Message category (See http://hl7.org/fhir/SearchParameter/Communication-category).', + // http://hl7.org/fhir/SearchParameter/Communication-sent + sent: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Communication.sent', + description: 'When sent', }, + // http://hl7.org/fhir/SearchParameter/Communication-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.status', description: - 'preparation | in-progress | suspended | aborted | completed | entered-in-error (See http://hl7.org/fhir/SearchParameter/Communication-status).', + 'preparation | in-progress | suspended | aborted | completed | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/Communication-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.subject', + description: 'Focus of message', }, }; diff --git a/src/resources/3_0_1/parameters/communicationrequest.parameters.js b/src/resources/3_0_1/parameters/communicationrequest.parameters.js index bf6d5ca1..0e4ea4f2 100644 --- a/src/resources/3_0_1/parameters/communicationrequest.parameters.js +++ b/src/resources/3_0_1/parameters/communicationrequest.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,89 +8,124 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the communicationrequest query */ module.exports = { - requester: { - type: GraphQLString, - description: - 'Individual making the request (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-requester).', - }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-authored authored: { type: DateScalar, - description: - 'When request transitioned to being actionable (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-authored).', + fhirtype: 'date', + xpath: 'CommunicationRequest.authoredOn', + description: 'When request transitioned to being actionable', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.basedOn', + description: 'Fulfills plan or proposal', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-category + category: { type: TokenScalar, - description: - 'Unique identifier (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-identifier).', + fhirtype: 'token', + xpath: 'CommunicationRequest.category', + description: 'Message category', }, - subject: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-context + context: { type: GraphQLString, - description: - 'Focus of message (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-subject).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.context', + description: 'Encounter or episode leading to message', }, - replaces: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-encounter + encounter: { type: GraphQLString, - description: - 'Request(s) replaced by this request (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-replaces).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.context', + description: 'Encounter leading to message', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-group-identifier + group_identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.groupIdentifier', + description: 'Composite request this is part of', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.identifier', + description: 'Unique identifier', }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-medium medium: { type: TokenScalar, - description: - 'A channel of communication (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-medium).', + fhirtype: 'token', + xpath: 'CommunicationRequest.medium', + description: 'A channel of communication', }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-occurrence occurrence: { type: DateScalar, - description: - 'When scheduled (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-occurrence).', + fhirtype: 'date', + xpath: 'CommunicationRequest.occurrenceDateTime', + description: 'When scheduled', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-patient + patient: { type: GraphQLString, - description: - 'Encounter leading to message (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-encounter).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.subject', + description: 'Focus of message', }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-priority priority: { type: TokenScalar, - description: - 'Message urgency (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-priority).', - }, - group_identifier: { - type: TokenScalar, - description: - 'Composite request this is part of (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-group-identifier).', - }, - based_on: { - type: GraphQLString, - description: - 'Fulfills plan or proposal (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-based-on).', + fhirtype: 'token', + xpath: 'CommunicationRequest.priority', + description: 'Message urgency', }, - sender: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-recipient + recipient: { type: GraphQLString, - description: - 'Message sender (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-sender).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.recipient', + description: 'Message recipient', }, - patient: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-replaces + replaces: { type: GraphQLString, - description: - 'Focus of message (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-patient).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.replaces', + description: 'Request(s) replaced by this request', }, - recipient: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-requester + requester: { type: GraphQLString, - description: - 'Message recipient (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-recipient).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.requester.agent', + description: 'Individual making the request', }, - context: { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-sender + sender: { type: GraphQLString, - description: - 'Encounter or episode leading to message (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-context).', - }, - category: { - type: TokenScalar, - description: - 'Message category (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-category).', + fhirtype: 'reference', + xpath: 'CommunicationRequest.sender', + description: 'Message sender', }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.status', description: - 'draft | active | suspended | cancelled | completed | entered-in-error | unknown (See http://hl7.org/fhir/SearchParameter/CommunicationRequest-status).', + 'draft | active | suspended | cancelled | completed | entered-in-error | unknown', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.subject', + description: 'Focus of message', }, }; diff --git a/src/resources/3_0_1/parameters/compartmentdefinition.parameters.js b/src/resources/3_0_1/parameters/compartmentdefinition.parameters.js index af073bf4..cb087039 100644 --- a/src/resources/3_0_1/parameters/compartmentdefinition.parameters.js +++ b/src/resources/3_0_1/parameters/compartmentdefinition.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,54 +9,74 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the compartmentdefinition query */ module.exports = { - date: { - type: DateScalar, - description: - 'The compartment definition publication date (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-date).', - }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-code code: { type: TokenScalar, - description: - 'Patient | Encounter | RelatedPerson | Practitioner | Device (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-code).', + fhirtype: 'token', + xpath: 'CompartmentDefinition.code', + description: 'Patient | Encounter | RelatedPerson | Practitioner | Device', }, - resource: { - type: TokenScalar, - description: - 'Name of resource type (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-resource).', + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CompartmentDefinition.date', + description: 'The compartment definition publication date', }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CompartmentDefinition.description', + description: 'The description of the compartment definition', + }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the compartment definition (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-jurisdiction).', + fhirtype: 'token', + xpath: 'CompartmentDefinition.jurisdiction', + description: 'Intended jurisdiction for the compartment definition', }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the compartment definition (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-name).', - }, - description: { - type: GraphQLString, - description: - 'The description of the compartment definition (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-description).', + fhirtype: 'string', + xpath: 'CompartmentDefinition.name', + description: 'Computationally friendly name of the compartment definition', }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the compartment definition (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-publisher).', + fhirtype: 'string', + xpath: 'CompartmentDefinition.publisher', + description: 'Name of the publisher of the compartment definition', + }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-resource + resource: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CompartmentDefinition.resource.code', + description: 'Name of resource type', }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CompartmentDefinition.status', + description: 'The current status of the compartment definition', + }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-title title: { type: GraphQLString, - description: - 'The human-friendly name of the compartment definition (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-title).', + fhirtype: 'string', + xpath: 'CompartmentDefinition.title', + description: 'The human-friendly name of the compartment definition', }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-url url: { type: UriScalar, - description: - 'The uri that identifies the compartment definition (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-url).', - }, - status: { - type: TokenScalar, - description: - 'The current status of the compartment definition (See http://hl7.org/fhir/SearchParameter/CompartmentDefinition-status).', + fhirtype: 'uri', + xpath: 'CompartmentDefinition.url', + description: 'The uri that identifies the compartment definition', }, }; diff --git a/src/resources/3_0_1/parameters/composition.parameters.js b/src/resources/3_0_1/parameters/composition.parameters.js index b330993b..401c36f5 100644 --- a/src/resources/3_0_1/parameters/composition.parameters.js +++ b/src/resources/3_0_1/parameters/composition.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,94 +8,135 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the composition query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'Composition.date', description: - 'Composition editing time (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.identifier', description: - 'Logical identifier of composition (version-independent) (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - period: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.subject', description: - 'The period covered by the documentation (See http://hl7.org/fhir/SearchParameter/Composition-period).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - related_id: { + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.type', description: - 'Target of the relationship (See http://hl7.org/fhir/SearchParameter/Composition-related-id).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): The type of the referral * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management * [Composition](composition.html): Kind of composition (LOINC if possible) ', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Composition-attester + attester: { type: GraphQLString, - description: - 'Who and/or what the composition is about (See http://hl7.org/fhir/SearchParameter/Composition-subject).', + fhirtype: 'reference', + xpath: 'Composition.attester.party', + description: 'Who attested the composition', }, + // http://hl7.org/fhir/SearchParameter/Composition-author author: { type: GraphQLString, - description: - 'Who and/or what authored the composition (See http://hl7.org/fhir/SearchParameter/Composition-author).', + fhirtype: 'reference', + xpath: 'Composition.author', + description: 'Who and/or what authored the composition', }, + // http://hl7.org/fhir/SearchParameter/Composition-class + class: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.class', + description: 'Categorization of Composition', + }, + // http://hl7.org/fhir/SearchParameter/Composition-confidentiality confidentiality: { type: TokenScalar, - description: - 'As defined by affinity domain (See http://hl7.org/fhir/SearchParameter/Composition-confidentiality).', + fhirtype: 'token', + xpath: 'Composition.confidentiality', + description: 'As defined by affinity domain', }, - section: { + // http://hl7.org/fhir/SearchParameter/Composition-context + context: { type: TokenScalar, - description: - 'Classification of section (recommended) (See http://hl7.org/fhir/SearchParameter/Composition-section).', + fhirtype: 'token', + xpath: 'Composition.event.code', + description: 'Code(s) that apply to the event being documented', }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.encounter', description: - 'Context of the Composition (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', - }, - type: { - type: TokenScalar, - description: - 'Kind of composition (LOINC if possible) (See http://hl7.org/fhir/SearchParameter/clinical-type).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, - title: { + // http://hl7.org/fhir/SearchParameter/Composition-entry + entry: { type: GraphQLString, - description: - 'Human Readable name/title (See http://hl7.org/fhir/SearchParameter/Composition-title).', + fhirtype: 'reference', + xpath: 'Composition.section.entry', + description: 'A reference to data that supports this section', }, - attester: { - type: GraphQLString, - description: - 'Who attested the composition (See http://hl7.org/fhir/SearchParameter/Composition-attester).', + // http://hl7.org/fhir/SearchParameter/Composition-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Composition.event.period', + description: 'The period covered by the documentation', }, - entry: { - type: GraphQLString, - description: - 'A reference to data that supports this section (See http://hl7.org/fhir/SearchParameter/Composition-entry).', + // http://hl7.org/fhir/SearchParameter/Composition-related-id + related_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.relatesTo.targetIdentifier', + description: 'Target of the relationship', }, + // http://hl7.org/fhir/SearchParameter/Composition-related-ref related_ref: { type: GraphQLString, - description: - 'Target of the relationship (See http://hl7.org/fhir/SearchParameter/Composition-related-ref).', - }, - patient: { - type: GraphQLString, - description: - 'Who and/or what the composition is about (See http://hl7.org/fhir/SearchParameter/clinical-patient).', - }, - context: { - type: TokenScalar, - description: - 'Code(s) that apply to the event being documented (See http://hl7.org/fhir/SearchParameter/Composition-context).', + fhirtype: 'reference', + xpath: 'Composition.relatesTo.targetReference', + description: 'Target of the relationship', }, - class: { + // http://hl7.org/fhir/SearchParameter/Composition-section + section: { type: TokenScalar, - description: - 'Categorization of Composition (See http://hl7.org/fhir/SearchParameter/Composition-class).', + fhirtype: 'token', + xpath: 'Composition.section.code', + description: 'Classification of section (recommended)', }, + // http://hl7.org/fhir/SearchParameter/Composition-status status: { type: TokenScalar, - description: - 'preliminary | final | amended | entered-in-error (See http://hl7.org/fhir/SearchParameter/Composition-status).', + fhirtype: 'token', + xpath: 'Composition.status', + description: 'preliminary | final | amended | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/Composition-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.subject', + description: 'Who and/or what the composition is about', + }, + // http://hl7.org/fhir/SearchParameter/Composition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Composition.title', + description: 'Human Readable name/title', }, }; diff --git a/src/resources/3_0_1/parameters/conceptmap.parameters.js b/src/resources/3_0_1/parameters/conceptmap.parameters.js index ac27f68e..6dae335c 100644 --- a/src/resources/3_0_1/parameters/conceptmap.parameters.js +++ b/src/resources/3_0_1/parameters/conceptmap.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -9,109 +9,151 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the conceptmap query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ConceptMap-date date: { type: DateScalar, - description: - 'The concept map publication date (See http://hl7.org/fhir/SearchParameter/ConceptMap-date).', + fhirtype: 'date', + xpath: 'ConceptMap.date', + description: 'The concept map publication date', }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-dependson + dependson: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.group.element.target.dependsOn.property', + description: 'Reference to property mapping depends on', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ConceptMap.description', + description: 'The description of the concept map', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-identifier identifier: { type: TokenScalar, - description: - 'External identifier for the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-identifier).', + fhirtype: 'token', + xpath: 'ConceptMap.identifier', + description: 'External identifier for the concept map', }, - product: { - type: UriScalar, - description: - 'Reference to property mapping depends on (See http://hl7.org/fhir/SearchParameter/ConceptMap-product).', + // http://hl7.org/fhir/SearchParameter/ConceptMap-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.jurisdiction', + description: 'Intended jurisdiction for the concept map', }, - other: { - type: UriScalar, - description: - 'Canonical URL for other concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-other).', + // http://hl7.org/fhir/SearchParameter/ConceptMap-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ConceptMap.name', + description: 'Computationally friendly name of the concept map', }, - target_system: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-other + other: { type: UriScalar, - description: - 'System of the target (if necessary) (See http://hl7.org/fhir/SearchParameter/ConceptMap-target-system).', + fhirtype: 'uri', + xpath: 'ConceptMap.group.unmapped.url', + description: 'Canonical URL for other concept map', }, - dependson: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-product + product: { type: UriScalar, - description: - 'Reference to property mapping depends on (See http://hl7.org/fhir/SearchParameter/ConceptMap-dependson).', - }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-jurisdiction).', + fhirtype: 'uri', + xpath: 'ConceptMap.group.element.target.product.property', + description: 'Reference to property mapping depends on', }, - description: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-publisher + publisher: { type: GraphQLString, - description: - 'The description of the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-description).', + fhirtype: 'string', + xpath: 'ConceptMap.publisher', + description: 'Name of the publisher of the concept map', }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-source source: { type: GraphQLString, - description: - 'Identifies the source of the concepts which are being mapped (See http://hl7.org/fhir/SearchParameter/ConceptMap-source).', + fhirtype: 'reference', + xpath: 'ConceptMap.sourceReference', + description: 'Identifies the source of the concepts which are being mapped', }, - title: { - type: GraphQLString, - description: - 'The human-friendly name of the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-title).', - }, - version: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-source-code + source_code: { type: TokenScalar, - description: - 'The business version of the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-version).', + fhirtype: 'token', + xpath: 'ConceptMap.group.element.code', + description: 'Identifies element being mapped', }, - url: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-source-system + source_system: { type: UriScalar, - description: - 'The uri that identifies the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-url).', + fhirtype: 'uri', + xpath: 'ConceptMap.group.source', + description: 'Code System (if value set crosses code systems)', }, - target: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-source-uri + source_uri: { type: GraphQLString, - description: - 'Provides context to the mappings (See http://hl7.org/fhir/SearchParameter/ConceptMap-target).', + fhirtype: 'reference', + xpath: 'ConceptMap.sourceUri', + description: 'Identifies the source of the concepts which are being mapped', }, - source_code: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-status + status: { type: TokenScalar, - description: - 'Identifies element being mapped (See http://hl7.org/fhir/SearchParameter/ConceptMap-source-code).', + fhirtype: 'token', + xpath: 'ConceptMap.status', + description: 'The current status of the concept map', }, - source_uri: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-target + target: { type: GraphQLString, - description: - 'Identifies the source of the concepts which are being mapped (See http://hl7.org/fhir/SearchParameter/ConceptMap-source-uri).', + fhirtype: 'reference', + xpath: 'ConceptMap.targetReference', + description: 'Provides context to the mappings', }, - name: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-target-code + target_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.group.element.target.code', + description: 'Code that identifies the target element', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-target-system + target_system: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.group.target', + description: 'System of the target (if necessary)', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-target-uri + target_uri: { type: GraphQLString, - description: - 'Computationally friendly name of the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-name).', + fhirtype: 'reference', + xpath: 'ConceptMap.targetUri', + description: 'Provides context to the mappings', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-title + title: { type: GraphQLString, - description: - 'Name of the publisher of the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-publisher).', + fhirtype: 'string', + xpath: 'ConceptMap.title', + description: 'The human-friendly name of the concept map', }, - source_system: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-url + url: { type: UriScalar, - description: - 'Code System (if value set crosses code systems) (See http://hl7.org/fhir/SearchParameter/ConceptMap-source-system).', - }, - target_code: { - type: TokenScalar, - description: - 'Code that identifies the target element (See http://hl7.org/fhir/SearchParameter/ConceptMap-target-code).', + fhirtype: 'uri', + xpath: 'ConceptMap.url', + description: 'The uri that identifies the concept map', }, - status: { + // http://hl7.org/fhir/SearchParameter/ConceptMap-version + version: { type: TokenScalar, - description: - 'The current status of the concept map (See http://hl7.org/fhir/SearchParameter/ConceptMap-status).', - }, - target_uri: { - type: GraphQLString, - description: - 'Provides context to the mappings (See http://hl7.org/fhir/SearchParameter/ConceptMap-target-uri).', + fhirtype: 'token', + xpath: 'ConceptMap.version', + description: 'The business version of the concept map', }, }; diff --git a/src/resources/3_0_1/parameters/condition.parameters.js b/src/resources/3_0_1/parameters/condition.parameters.js index 9341c644..f9210670 100644 --- a/src/resources/3_0_1/parameters/condition.parameters.js +++ b/src/resources/3_0_1/parameters/condition.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,119 +8,170 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the condition query */ module.exports = { - severity: { - type: TokenScalar, - description: - 'The severity of the condition (See http://hl7.org/fhir/SearchParameter/Condition-severity).', - }, - evidence_detail: { - type: GraphQLString, - description: - 'Supporting information found elsewhere (See http://hl7.org/fhir/SearchParameter/Condition-evidence-detail).', - }, - identifier: { - type: TokenScalar, - description: - 'A unique identifier of the condition record (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', - }, - onset_info: { - type: GraphQLString, - description: - 'Onsets as a string (See http://hl7.org/fhir/SearchParameter/Condition-onset-info).', - }, + // http://hl7.org/fhir/SearchParameter/clinical-code code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.code', description: - 'Code for the condition (See http://hl7.org/fhir/SearchParameter/clinical-code).', + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', }, - evidence: { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.identifier', description: - 'Manifestation/symptom (See http://hl7.org/fhir/SearchParameter/Condition-evidence).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - subject: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Condition.subject', description: - 'Who has the condition? (See http://hl7.org/fhir/SearchParameter/Condition-subject).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - verification_status: { - type: TokenScalar, - description: - 'provisional | differential | confirmed | refuted | entered-in-error | unknown (See http://hl7.org/fhir/SearchParameter/Condition-verification-status).', - }, - clinical_status: { - type: TokenScalar, - description: - 'The clinical status of the condition (See http://hl7.org/fhir/SearchParameter/Condition-clinical-status).', - }, - encounter: { + // http://hl7.org/fhir/SearchParameter/Condition-abatement-age + abatement_age: { type: GraphQLString, - description: - 'Encounter when condition first asserted (See http://hl7.org/fhir/SearchParameter/Condition-encounter).', + fhirtype: 'quantity', + xpath: 'Condition.abatementAge', + description: 'Abatement as age or age range', }, + // http://hl7.org/fhir/SearchParameter/Condition-abatement-boolean abatement_boolean: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.abatementDateTime', description: - 'Abatement boolean (boolean is true or non-boolean values are present) (See http://hl7.org/fhir/SearchParameter/Condition-abatement-boolean).', + 'Abatement boolean (boolean is true or non-boolean values are present)', }, - onset_date: { + // http://hl7.org/fhir/SearchParameter/Condition-abatement-date + abatement_date: { type: DateScalar, - description: - 'Date related onsets (dateTime and Period) (See http://hl7.org/fhir/SearchParameter/Condition-onset-date).', + fhirtype: 'date', + xpath: 'Condition.abatementDateTime', + description: 'Date-related abatements (dateTime and period)', }, - abatement_date: { + // http://hl7.org/fhir/SearchParameter/Condition-abatement-string + abatement_string: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Condition.abatementString', + description: 'Abatement as a string', + }, + // http://hl7.org/fhir/SearchParameter/Condition-asserted-date + asserted_date: { type: DateScalar, - description: - 'Date-related abatements (dateTime and period) (See http://hl7.org/fhir/SearchParameter/Condition-abatement-date).', + fhirtype: 'date', + xpath: 'Condition.assertedDate', + description: 'Date record was believed accurate', }, + // http://hl7.org/fhir/SearchParameter/Condition-asserter asserter: { type: GraphQLString, - description: - 'Person who asserts this condition (See http://hl7.org/fhir/SearchParameter/Condition-asserter).', + fhirtype: 'reference', + xpath: 'Condition.asserter', + description: 'Person who asserts this condition', }, - stage: { + // http://hl7.org/fhir/SearchParameter/Condition-body-site + body_site: { type: TokenScalar, - description: - 'Simple summary (disease specific) (See http://hl7.org/fhir/SearchParameter/Condition-stage).', + fhirtype: 'token', + xpath: 'Condition.bodySite', + description: 'Anatomical location, if relevant', }, - abatement_string: { + // http://hl7.org/fhir/SearchParameter/Condition-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.category', + description: 'The category of the condition', + }, + // http://hl7.org/fhir/SearchParameter/Condition-clinical-status + clinical_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.clinicalStatus', + description: 'The clinical status of the condition', + }, + // http://hl7.org/fhir/SearchParameter/Condition-context + context: { type: GraphQLString, - description: - 'Abatement as a string (See http://hl7.org/fhir/SearchParameter/Condition-abatement-string).', + fhirtype: 'reference', + xpath: 'Condition.context', + description: 'Encounter or episode when condition first asserted', }, - patient: { + // http://hl7.org/fhir/SearchParameter/Condition-encounter + encounter: { type: GraphQLString, - description: - 'Who has the condition? (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'Condition.context', + description: 'Encounter when condition first asserted', }, - context: { + // http://hl7.org/fhir/SearchParameter/Condition-evidence + evidence: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.evidence.code', + description: 'Manifestation/symptom', + }, + // http://hl7.org/fhir/SearchParameter/Condition-evidence-detail + evidence_detail: { type: GraphQLString, - description: - 'Encounter or episode when condition first asserted (See http://hl7.org/fhir/SearchParameter/Condition-context).', + fhirtype: 'reference', + xpath: 'Condition.evidence.detail', + description: 'Supporting information found elsewhere', }, + // http://hl7.org/fhir/SearchParameter/Condition-onset-age onset_age: { type: GraphQLString, - description: - 'Onsets as age or age range (See http://hl7.org/fhir/SearchParameter/Condition-onset-age).', + fhirtype: 'quantity', + xpath: 'Condition.onsetAge', + description: 'Onsets as age or age range', }, - abatement_age: { + // http://hl7.org/fhir/SearchParameter/Condition-onset-date + onset_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Condition.onsetDateTime', + description: 'Date related onsets (dateTime and Period)', + }, + // http://hl7.org/fhir/SearchParameter/Condition-onset-info + onset_info: { type: GraphQLString, - description: - 'Abatement as age or age range (See http://hl7.org/fhir/SearchParameter/Condition-abatement-age).', + fhirtype: 'string', + xpath: 'Condition.onsetString', + description: 'Onsets as a string', }, - asserted_date: { - type: DateScalar, - description: - 'Date record was believed accurate (See http://hl7.org/fhir/SearchParameter/Condition-asserted-date).', + // http://hl7.org/fhir/SearchParameter/Condition-severity + severity: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.severity', + description: 'The severity of the condition', }, - category: { + // http://hl7.org/fhir/SearchParameter/Condition-stage + stage: { type: TokenScalar, - description: - 'The category of the condition (See http://hl7.org/fhir/SearchParameter/Condition-category).', + fhirtype: 'token', + xpath: 'Condition.stage.summary', + description: 'Simple summary (disease specific)', }, - body_site: { + // http://hl7.org/fhir/SearchParameter/Condition-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Condition.subject', + description: 'Who has the condition?', + }, + // http://hl7.org/fhir/SearchParameter/Condition-verification-status + verification_status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.verificationStatus', description: - 'Anatomical location, if relevant (See http://hl7.org/fhir/SearchParameter/Condition-body-site).', + 'provisional | differential | confirmed | refuted | entered-in-error | unknown', }, }; diff --git a/src/resources/3_0_1/parameters/consent.parameters.js b/src/resources/3_0_1/parameters/consent.parameters.js index 0bb083aa..bfa5f870 100644 --- a/src/resources/3_0_1/parameters/consent.parameters.js +++ b/src/resources/3_0_1/parameters/consent.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,74 +8,107 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the consent query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'Consent.dateTime', description: - 'When this Consent was created or indexed (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.identifier', description: - 'Identifier for this record (external references) (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - securitylabel: { - type: TokenScalar, - description: - 'Security Labels that define affected resources (See http://hl7.org/fhir/SearchParameter/Consent-securitylabel).', - }, - period: { - type: DateScalar, - description: - 'Period that this consent applies (See http://hl7.org/fhir/SearchParameter/Consent-period).', - }, - data: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.patient', description: - 'The actual data reference (See http://hl7.org/fhir/SearchParameter/Consent-data).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - purpose: { + // http://hl7.org/fhir/SearchParameter/Consent-action + action: { type: TokenScalar, - description: - 'Context of activities for which the agreement is made (See http://hl7.org/fhir/SearchParameter/Consent-purpose).', + fhirtype: 'token', + xpath: 'Consent.action', + description: 'Actions controlled by this consent', }, - source: { + // http://hl7.org/fhir/SearchParameter/Consent-actor + actor: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.actor.reference', + description: 'Resource for the actor (or group, by role)', + }, + // http://hl7.org/fhir/SearchParameter/Consent-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.category', description: - 'Source from which this consent is taken (See http://hl7.org/fhir/SearchParameter/Consent-source).', + 'Classification of the consent statement - for indexing/retrieval', }, - actor: { + // http://hl7.org/fhir/SearchParameter/Consent-consentor + consentor: { type: GraphQLString, - description: - 'Resource for the actor (or group, by role) (See http://hl7.org/fhir/SearchParameter/Consent-actor).', + fhirtype: 'reference', + xpath: 'Consent.consentingParty', + description: 'Who is agreeing to the policy and exceptions', }, - patient: { + // http://hl7.org/fhir/SearchParameter/Consent-data + data: { type: GraphQLString, - description: - 'Who the consent applies to (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'Consent.data.reference', + description: 'The actual data reference', }, + // http://hl7.org/fhir/SearchParameter/Consent-organization organization: { type: GraphQLString, - description: - 'Custodian of the consent (See http://hl7.org/fhir/SearchParameter/Consent-organization).', + fhirtype: 'reference', + xpath: 'Consent.organization', + description: 'Custodian of the consent', }, - action: { - type: TokenScalar, - description: - 'Actions controlled by this consent (See http://hl7.org/fhir/SearchParameter/Consent-action).', + // http://hl7.org/fhir/SearchParameter/Consent-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Consent.period', + description: 'Period that this consent applies', }, - consentor: { - type: GraphQLString, - description: - 'Who is agreeing to the policy and exceptions (See http://hl7.org/fhir/SearchParameter/Consent-consentor).', + // http://hl7.org/fhir/SearchParameter/Consent-purpose + purpose: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.purpose', + description: 'Context of activities for which the agreement is made', }, - category: { + // http://hl7.org/fhir/SearchParameter/Consent-securitylabel + securitylabel: { type: TokenScalar, - description: - 'Classification of the consent statement - for indexing/retrieval (See http://hl7.org/fhir/SearchParameter/Consent-category).', + fhirtype: 'token', + xpath: 'Consent.securityLabel', + description: 'Security Labels that define affected resources', + }, + // http://hl7.org/fhir/SearchParameter/Consent-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.sourceAttachment', + description: 'Source from which this consent is taken', }, + // http://hl7.org/fhir/SearchParameter/Consent-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.status', description: - 'draft | proposed | active | rejected | inactive | entered-in-error (See http://hl7.org/fhir/SearchParameter/Consent-status).', + 'draft | proposed | active | rejected | inactive | entered-in-error', }, }; diff --git a/src/resources/3_0_1/parameters/contract.parameters.js b/src/resources/3_0_1/parameters/contract.parameters.js index b64e4c77..e53062b2 100644 --- a/src/resources/3_0_1/parameters/contract.parameters.js +++ b/src/resources/3_0_1/parameters/contract.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,49 +8,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the contract query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'The identity of the contract (See http://hl7.org/fhir/SearchParameter/Contract-identifier).', - }, + // http://hl7.org/fhir/SearchParameter/Contract-agent agent: { type: GraphQLString, - description: - 'Agent to the Contact (See http://hl7.org/fhir/SearchParameter/Contract-agent).', - }, - patient: { - type: GraphQLString, - description: - 'The identity of the subject of the contract (if a patient) (See http://hl7.org/fhir/SearchParameter/Contract-patient).', - }, - subject: { - type: GraphQLString, - description: - 'The identity of the subject of the contract (See http://hl7.org/fhir/SearchParameter/Contract-subject).', + fhirtype: 'reference', + xpath: 'Contract.agent.actor', + description: 'Agent to the Contact', }, + // http://hl7.org/fhir/SearchParameter/Contract-authority authority: { type: GraphQLString, - description: - 'The authority of the contract (See http://hl7.org/fhir/SearchParameter/Contract-authority).', + fhirtype: 'reference', + xpath: 'Contract.authority', + description: 'The authority of the contract', }, + // http://hl7.org/fhir/SearchParameter/Contract-domain domain: { type: GraphQLString, - description: - 'The domain of the contract (See http://hl7.org/fhir/SearchParameter/Contract-domain).', + fhirtype: 'reference', + xpath: 'Contract.domain', + description: 'The domain of the contract', }, - term_topic: { - type: GraphQLString, - description: - 'The identity of the topic of the contract terms (See http://hl7.org/fhir/SearchParameter/Contract-term-topic).', + // http://hl7.org/fhir/SearchParameter/Contract-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Contract.identifier', + description: 'The identity of the contract', }, + // http://hl7.org/fhir/SearchParameter/Contract-issued issued: { type: DateScalar, - description: - 'The date/time the contract was issued (See http://hl7.org/fhir/SearchParameter/Contract-issued).', + fhirtype: 'date', + xpath: 'Contract.issued', + description: 'The date/time the contract was issued', + }, + // http://hl7.org/fhir/SearchParameter/Contract-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Contract.subject', + description: 'The identity of the subject of the contract (if a patient)', }, + // http://hl7.org/fhir/SearchParameter/Contract-signer signer: { type: GraphQLString, - description: - 'Contract Signatory Party (See http://hl7.org/fhir/SearchParameter/Contract-signer).', + fhirtype: 'reference', + xpath: 'Contract.signer.party', + description: 'Contract Signatory Party', + }, + // http://hl7.org/fhir/SearchParameter/Contract-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Contract.subject', + description: 'The identity of the subject of the contract', + }, + // http://hl7.org/fhir/SearchParameter/Contract-term-topic + term_topic: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Contract.term.topic', + description: 'The identity of the topic of the contract terms', }, }; diff --git a/src/resources/3_0_1/parameters/coverage.parameters.js b/src/resources/3_0_1/parameters/coverage.parameters.js index 52b0cb75..14620649 100644 --- a/src/resources/3_0_1/parameters/coverage.parameters.js +++ b/src/resources/3_0_1/parameters/coverage.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,74 +7,103 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the coverage query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'The primary identifier of the insured and the coverage (See http://hl7.org/fhir/SearchParameter/Coverage-identifier).', + // http://hl7.org/fhir/SearchParameter/Coverage-beneficiary + beneficiary: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Coverage.beneficiary', + description: 'Covered party', }, - subgroup: { + // http://hl7.org/fhir/SearchParameter/Coverage-class + class: { type: GraphQLString, - description: - 'Sub-group identifier (See http://hl7.org/fhir/SearchParameter/Coverage-subgroup).', + fhirtype: 'string', + xpath: 'Coverage.grouping.class', + description: 'Class identifier', }, - subscriber: { + // http://hl7.org/fhir/SearchParameter/Coverage-dependent + dependent: { type: GraphQLString, - description: - 'Reference to the subscriber (See http://hl7.org/fhir/SearchParameter/Coverage-subscriber).', + fhirtype: 'string', + xpath: 'Coverage.dependent', + description: 'Dependent number', }, - subplan: { + // http://hl7.org/fhir/SearchParameter/Coverage-group + group: { type: GraphQLString, - description: - 'Sub-plan identifier (See http://hl7.org/fhir/SearchParameter/Coverage-subplan).', + fhirtype: 'string', + xpath: 'Coverage.grouping.group', + description: 'Group identifier', }, - type: { + // http://hl7.org/fhir/SearchParameter/Coverage-identifier + identifier: { type: TokenScalar, - description: - 'The kind of coverage (health plan, auto, Workers Compensation) (See http://hl7.org/fhir/SearchParameter/Coverage-type).', - }, - sequence: { - type: GraphQLString, - description: - 'Sequence number (See http://hl7.org/fhir/SearchParameter/Coverage-sequence).', + fhirtype: 'token', + xpath: 'Coverage.identifier', + description: 'The primary identifier of the insured and the coverage', }, + // http://hl7.org/fhir/SearchParameter/Coverage-payor payor: { type: GraphQLString, - description: - 'The identity of the insurer or party paying for services (See http://hl7.org/fhir/SearchParameter/Coverage-payor).', + fhirtype: 'reference', + xpath: 'Coverage.payor', + description: 'The identity of the insurer or party paying for services', }, - beneficiary: { + // http://hl7.org/fhir/SearchParameter/Coverage-plan + plan: { type: GraphQLString, - description: - 'Covered party (See http://hl7.org/fhir/SearchParameter/Coverage-beneficiary).', + fhirtype: 'string', + xpath: 'Coverage.grouping.plan', + description: 'A plan or policy identifier', }, - subclass: { + // http://hl7.org/fhir/SearchParameter/Coverage-policy-holder + policy_holder: { type: GraphQLString, - description: - 'Sub-class identifier (See http://hl7.org/fhir/SearchParameter/Coverage-subclass).', + fhirtype: 'reference', + xpath: 'Coverage.policyHolder', + description: 'Reference to the policyholder', }, - plan: { + // http://hl7.org/fhir/SearchParameter/Coverage-sequence + sequence: { type: GraphQLString, - description: - 'A plan or policy identifier (See http://hl7.org/fhir/SearchParameter/Coverage-plan).', + fhirtype: 'string', + xpath: 'Coverage.sequence', + description: 'Sequence number', }, - class: { + // http://hl7.org/fhir/SearchParameter/Coverage-subclass + subclass: { type: GraphQLString, - description: - 'Class identifier (See http://hl7.org/fhir/SearchParameter/Coverage-class).', + fhirtype: 'string', + xpath: 'Coverage.grouping.subClass', + description: 'Sub-class identifier', }, - dependent: { + // http://hl7.org/fhir/SearchParameter/Coverage-subgroup + subgroup: { type: GraphQLString, - description: - 'Dependent number (See http://hl7.org/fhir/SearchParameter/Coverage-dependent).', + fhirtype: 'string', + xpath: 'Coverage.grouping.subGroup', + description: 'Sub-group identifier', }, - group: { + // http://hl7.org/fhir/SearchParameter/Coverage-subplan + subplan: { type: GraphQLString, - description: - 'Group identifier (See http://hl7.org/fhir/SearchParameter/Coverage-group).', + fhirtype: 'string', + xpath: 'Coverage.grouping.subPlan', + description: 'Sub-plan identifier', }, - policy_holder: { + // http://hl7.org/fhir/SearchParameter/Coverage-subscriber + subscriber: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Coverage.subscriber', + description: 'Reference to the subscriber', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Coverage.type', description: - 'Reference to the policyholder (See http://hl7.org/fhir/SearchParameter/Coverage-policy-holder).', + 'The kind of coverage (health plan, auto, Workers Compensation)', }, }; diff --git a/src/resources/3_0_1/parameters/dataelement.parameters.js b/src/resources/3_0_1/parameters/dataelement.parameters.js index 32652c85..2904dc4e 100644 --- a/src/resources/3_0_1/parameters/dataelement.parameters.js +++ b/src/resources/3_0_1/parameters/dataelement.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,64 +9,106 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the dataelement query */ module.exports = { - date: { - type: DateScalar, - description: - 'The data element publication date (See http://hl7.org/fhir/SearchParameter/DataElement-date).', - }, - identifier: { + // http://hl7.org/fhir/SearchParameter/DataElement-code + code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DataElement.element.code', description: - 'External identifier for the data element (See http://hl7.org/fhir/SearchParameter/DataElement-identifier).', + 'A code for the data element (server may choose to do subsumption)', }, - code: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/DataElement-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DataElement.date', + description: 'The data element publication date', + }, + // http://hl7.org/fhir/SearchParameter/DataElement-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'DataElement.element.definition', description: - 'A code for the data element (server may choose to do subsumption) (See http://hl7.org/fhir/SearchParameter/DataElement-code).', + 'Text search in the description of the data element. This corresponds to the definition of the first DataElement.element.', }, - stringency: { + // http://hl7.org/fhir/SearchParameter/DataElement-identifier + identifier: { type: TokenScalar, - description: - 'The stringency of the data element definition (See http://hl7.org/fhir/SearchParameter/DataElement-stringency).', + fhirtype: 'token', + xpath: 'DataElement.identifier', + description: 'External identifier for the data element', }, + // http://hl7.org/fhir/SearchParameter/DataElement-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the data element (See http://hl7.org/fhir/SearchParameter/DataElement-jurisdiction).', + fhirtype: 'token', + xpath: 'DataElement.jurisdiction', + description: 'Intended jurisdiction for the data element', }, + // http://hl7.org/fhir/SearchParameter/DataElement-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the data element (See http://hl7.org/fhir/SearchParameter/DataElement-name).', + fhirtype: 'string', + xpath: 'DataElement.name', + description: 'Computationally friendly name of the data element', }, + // http://hl7.org/fhir/SearchParameter/DataElement-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the data element (See http://hl7.org/fhir/SearchParameter/DataElement-publisher).', + fhirtype: 'string', + xpath: 'DataElement.publisher', + description: 'Name of the publisher of the data element', }, - description: { - type: GraphQLString, - description: - 'Text search in the description of the data element. This corresponds to the definition of the first DataElement.element. (See http://hl7.org/fhir/SearchParameter/DataElement-description).', + // http://hl7.org/fhir/SearchParameter/DataElement-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DataElement.status', + description: 'The current status of the data element', }, + // http://hl7.org/fhir/SearchParameter/DataElement-stringency + stringency: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DataElement.stringency', + description: 'The stringency of the data element definition', + }, + // http://hl7.org/fhir/SearchParameter/DataElement-title title: { type: GraphQLString, - description: - 'The human-friendly name of the data element (See http://hl7.org/fhir/SearchParameter/DataElement-title).', + fhirtype: 'string', + xpath: 'DataElement.title', + description: 'The human-friendly name of the data element', }, + // http://hl7.org/fhir/SearchParameter/DataElement-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'DataElement.url', + description: 'The uri that identifies the data element', + }, + // http://hl7.org/fhir/SearchParameter/DataElement-version version: { type: TokenScalar, - description: - 'The business version of the data element (See http://hl7.org/fhir/SearchParameter/DataElement-version).', + fhirtype: 'token', + xpath: 'DataElement.version', + description: 'The business version of the data element', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the data element (See http://hl7.org/fhir/SearchParameter/DataElement-url).', + // http://hl7.org/fhir/SearchParameter/elementdefinition-11179-DataElement-objectClass + objectClass: { + type: TokenScalar, + fhirtype: 'token', + xpath: + "DataElement.element.mapping.extension[@url='http://hl7.org/fhir/StructureDefinition/11179-objectClass']", + description: 'Matches on the 11179-objectClass extension value', }, - status: { + // http://hl7.org/fhir/SearchParameter/elementdefinition-11179-DataElement-objectClassProperty + objectClassProperty: { type: TokenScalar, - description: - 'The current status of the data element (See http://hl7.org/fhir/SearchParameter/DataElement-status).', + fhirtype: 'token', + xpath: + "DataElement.element.mapping.extension[@url='http://hl7.org/fhir/StructureDefinition/11179-objectClassProperty']", + description: 'Matches on the 11179-objectClassProperty extension value', }, }; diff --git a/src/resources/3_0_1/parameters/detectedissue.parameters.js b/src/resources/3_0_1/parameters/detectedissue.parameters.js index f8bf64d1..f3637c9f 100644 --- a/src/resources/3_0_1/parameters/detectedissue.parameters.js +++ b/src/resources/3_0_1/parameters/detectedissue.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,34 +8,49 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the detectedissue query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'DetectedIssue.date', description: - 'When identified (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DetectedIssue.identifier', description: - 'Unique id for the detected issue (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, + // http://hl7.org/fhir/SearchParameter/clinical-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DetectedIssue.patient', description: - 'Associated patient (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-author author: { type: GraphQLString, - description: - 'The provider or device that identified the issue (See http://hl7.org/fhir/SearchParameter/DetectedIssue-author).', - }, - implicated: { - type: GraphQLString, - description: - 'Problem resource (See http://hl7.org/fhir/SearchParameter/DetectedIssue-implicated).', + fhirtype: 'reference', + xpath: 'DetectedIssue.author', + description: 'The provider or device that identified the issue', }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-category category: { type: TokenScalar, - description: - 'Issue Category, e.g. drug-drug, duplicate therapy, etc. (See http://hl7.org/fhir/SearchParameter/DetectedIssue-category).', + fhirtype: 'token', + xpath: 'DetectedIssue.category', + description: 'Issue Category, e.g. drug-drug, duplicate therapy, etc.', + }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-implicated + implicated: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DetectedIssue.implicated', + description: 'Problem resource', }, }; diff --git a/src/resources/3_0_1/parameters/device.parameters.js b/src/resources/3_0_1/parameters/device.parameters.js index c72289b2..620101c2 100644 --- a/src/resources/3_0_1/parameters/device.parameters.js +++ b/src/resources/3_0_1/parameters/device.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,64 +8,90 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the device query */ module.exports = { - udi_di: { + // http://hl7.org/fhir/SearchParameter/Device-device-name + device_name: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Device.udi.name', description: - 'The udi Device Identifier (DI) (See http://hl7.org/fhir/SearchParameter/Device-udi-di).', + 'A server defined search that may match any of the string fields in the Device.udi.name or Device.type.coding.display or Device.type.text', }, + // http://hl7.org/fhir/SearchParameter/Device-identifier identifier: { type: TokenScalar, - description: - 'Instance id from manufacturer, owner, and others (See http://hl7.org/fhir/SearchParameter/Device-identifier).', + fhirtype: 'token', + xpath: 'Device.identifier', + description: 'Instance id from manufacturer, owner, and others', }, - udi_carrier: { + // http://hl7.org/fhir/SearchParameter/Device-location + location: { type: GraphQLString, - description: - 'UDI Barcode (RFID or other technology) string either in HRF format or AIDC format converted to base64 string. (See http://hl7.org/fhir/SearchParameter/Device-udi-carrier).', + fhirtype: 'reference', + xpath: 'Device.location', + description: 'A location, where the resource is found', }, - device_name: { + // http://hl7.org/fhir/SearchParameter/Device-manufacturer + manufacturer: { type: GraphQLString, - description: - 'A server defined search that may match any of the string fields in the Device.udi.name or Device.type.coding.display or Device.type.text (See http://hl7.org/fhir/SearchParameter/Device-device-name).', + fhirtype: 'string', + xpath: 'Device.manufacturer', + description: 'The manufacturer of the device', }, - patient: { + // http://hl7.org/fhir/SearchParameter/Device-model + model: { type: GraphQLString, - description: - 'Patient information, if the resource is affixed to a person (See http://hl7.org/fhir/SearchParameter/Device-patient).', + fhirtype: 'string', + xpath: 'Device.model', + description: 'The model of the device', }, + // http://hl7.org/fhir/SearchParameter/Device-organization organization: { type: GraphQLString, - description: - 'The organization responsible for the device (See http://hl7.org/fhir/SearchParameter/Device-organization).', + fhirtype: 'reference', + xpath: 'Device.owner', + description: 'The organization responsible for the device', }, - model: { + // http://hl7.org/fhir/SearchParameter/Device-patient + patient: { type: GraphQLString, - description: - 'The model of the device (See http://hl7.org/fhir/SearchParameter/Device-model).', + fhirtype: 'reference', + xpath: 'Device.patient', + description: 'Patient information, if the resource is affixed to a person', }, - location: { - type: GraphQLString, - description: - 'A location, where the resource is found (See http://hl7.org/fhir/SearchParameter/Device-location).', + // http://hl7.org/fhir/SearchParameter/Device-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Device.status', + description: 'active | inactive | entered-in-error | unknown', }, + // http://hl7.org/fhir/SearchParameter/Device-type type: { type: TokenScalar, - description: - 'The type of the device (See http://hl7.org/fhir/SearchParameter/Device-type).', + fhirtype: 'token', + xpath: 'Device.type', + description: 'The type of the device', }, - url: { - type: UriScalar, + // http://hl7.org/fhir/SearchParameter/Device-udi-carrier + udi_carrier: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Device.udi.carrierHRF', description: - 'Network address to contact device (See http://hl7.org/fhir/SearchParameter/Device-url).', + 'UDI Barcode (RFID or other technology) string either in HRF format or AIDC format converted to base64 string.', }, - manufacturer: { + // http://hl7.org/fhir/SearchParameter/Device-udi-di + udi_di: { type: GraphQLString, - description: - 'The manufacturer of the device (See http://hl7.org/fhir/SearchParameter/Device-manufacturer).', + fhirtype: 'string', + xpath: 'Device.udi.deviceIdentifier', + description: 'The udi Device Identifier (DI)', }, - status: { - type: TokenScalar, - description: - 'active | inactive | entered-in-error | unknown (See http://hl7.org/fhir/SearchParameter/Device-status).', + // http://hl7.org/fhir/SearchParameter/Device-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Device.url', + description: 'Network address to contact device', }, }; diff --git a/src/resources/3_0_1/parameters/devicecomponent.parameters.js b/src/resources/3_0_1/parameters/devicecomponent.parameters.js index 179f1dfa..61581ccc 100644 --- a/src/resources/3_0_1/parameters/devicecomponent.parameters.js +++ b/src/resources/3_0_1/parameters/devicecomponent.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,24 +7,32 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the devicecomponent query */ module.exports = { - parent: { - type: GraphQLString, - description: - 'The parent DeviceComponent resource (See http://hl7.org/fhir/SearchParameter/DeviceComponent-parent).', - }, + // http://hl7.org/fhir/SearchParameter/DeviceComponent-identifier identifier: { type: TokenScalar, - description: - 'The identifier of the component (See http://hl7.org/fhir/SearchParameter/DeviceComponent-identifier).', + fhirtype: 'token', + xpath: 'DeviceComponent.identifier', + description: 'The identifier of the component', + }, + // http://hl7.org/fhir/SearchParameter/DeviceComponent-parent + parent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceComponent.parent', + description: 'The parent DeviceComponent resource', }, + // http://hl7.org/fhir/SearchParameter/DeviceComponent-source source: { type: GraphQLString, - description: - 'The device source (See http://hl7.org/fhir/SearchParameter/DeviceComponent-source).', + fhirtype: 'reference', + xpath: 'DeviceComponent.source', + description: 'The device source', }, + // http://hl7.org/fhir/SearchParameter/DeviceComponent-type type: { type: TokenScalar, - description: - 'The device component type (See http://hl7.org/fhir/SearchParameter/DeviceComponent-type).', + fhirtype: 'token', + xpath: 'DeviceComponent.type', + description: 'The device component type', }, }; diff --git a/src/resources/3_0_1/parameters/devicemetric.parameters.js b/src/resources/3_0_1/parameters/devicemetric.parameters.js index a1a8ac82..c1037bfc 100644 --- a/src/resources/3_0_1/parameters/devicemetric.parameters.js +++ b/src/resources/3_0_1/parameters/devicemetric.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,29 +7,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the devicemetric query */ module.exports = { - parent: { - type: GraphQLString, - description: - 'The parent DeviceMetric resource (See http://hl7.org/fhir/SearchParameter/DeviceMetric-parent).', + // http://hl7.org/fhir/SearchParameter/DeviceMetric-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceMetric.category', + description: 'The category of the metric', }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-identifier identifier: { type: TokenScalar, - description: - 'The identifier of the metric (See http://hl7.org/fhir/SearchParameter/DeviceMetric-identifier).', + fhirtype: 'token', + xpath: 'DeviceMetric.identifier', + description: 'The identifier of the metric', + }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-parent + parent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceMetric.parent', + description: 'The parent DeviceMetric resource', }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-source source: { type: GraphQLString, - description: - 'The device resource (See http://hl7.org/fhir/SearchParameter/DeviceMetric-source).', + fhirtype: 'reference', + xpath: 'DeviceMetric.source', + description: 'The device resource', }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-type type: { type: TokenScalar, - description: - 'The component type (See http://hl7.org/fhir/SearchParameter/DeviceMetric-type).', - }, - category: { - type: TokenScalar, - description: - 'The category of the metric (See http://hl7.org/fhir/SearchParameter/DeviceMetric-category).', + fhirtype: 'token', + xpath: 'DeviceMetric.type', + description: 'The component type', }, }; diff --git a/src/resources/3_0_1/parameters/devicerequest.parameters.js b/src/resources/3_0_1/parameters/devicerequest.parameters.js index 72253036..3bf34a58 100644 --- a/src/resources/3_0_1/parameters/devicerequest.parameters.js +++ b/src/resources/3_0_1/parameters/devicerequest.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,84 +8,121 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the devicerequest query */ module.exports = { - requester: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceRequest.codeCodeableConcept', description: - 'Who/what is requesting service  (See http://hl7.org/fhir/SearchParameter/DeviceRequest-requester).', + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceRequest.identifier', description: - 'Business identifier for request/order (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - code: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.subject', description: - 'Code for what is being requested/ordered (See http://hl7.org/fhir/SearchParameter/clinical-code).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - performer: { + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.context', description: - 'Desired performer for service (See http://hl7.org/fhir/SearchParameter/DeviceRequest-performer).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, - event_date: { + // http://hl7.org/fhir/SearchParameter/DeviceRequest-authored-on + authored_on: { type: DateScalar, - description: - 'When service should occur (See http://hl7.org/fhir/SearchParameter/DeviceRequest-event-date).', + fhirtype: 'date', + xpath: 'DeviceRequest.authoredOn', + description: 'When the request transitioned to being actionable', }, - subject: { + // http://hl7.org/fhir/SearchParameter/DeviceRequest-based-on + based_on: { type: GraphQLString, - description: - 'Individual the service is ordered for (See http://hl7.org/fhir/SearchParameter/DeviceRequest-subject).', + fhirtype: 'reference', + xpath: 'DeviceRequest.basedOn', + description: 'Plan/proposal/order fulfilled by this request', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/DeviceRequest-definition + definition: { type: GraphQLString, - description: - 'Encounter or Episode during which request was created (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'DeviceRequest.definition', + description: 'Protocol or definition followed by this request', }, - authored_on: { + // http://hl7.org/fhir/SearchParameter/DeviceRequest-device + device: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.codeReference', + description: 'Reference to resource that is being requested/ordered', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-event-date + event_date: { type: DateScalar, - description: - 'When the request transitioned to being actionable (See http://hl7.org/fhir/SearchParameter/DeviceRequest-authored-on).', + fhirtype: 'date', + xpath: 'DeviceRequest.occurrenceDateTime', + description: 'When service should occur', }, - intent: { + // http://hl7.org/fhir/SearchParameter/DeviceRequest-group-identifier + group_identifier: { type: TokenScalar, - description: - 'proposal | plan | original-order |reflex-order (See http://hl7.org/fhir/SearchParameter/DeviceRequest-intent).', + fhirtype: 'token', + xpath: 'DeviceRequest.groupIdentifier', + description: 'Composite request this is part of', }, - group_identifier: { + // http://hl7.org/fhir/SearchParameter/DeviceRequest-intent + intent: { type: TokenScalar, - description: - 'Composite request this is part of (See http://hl7.org/fhir/SearchParameter/DeviceRequest-group-identifier).', + fhirtype: 'token', + xpath: 'DeviceRequest.intent', + description: 'proposal | plan | original-order |reflex-order', }, - based_on: { + // http://hl7.org/fhir/SearchParameter/DeviceRequest-performer + performer: { type: GraphQLString, - description: - 'Plan/proposal/order fulfilled by this request (See http://hl7.org/fhir/SearchParameter/DeviceRequest-based-on).', + fhirtype: 'reference', + xpath: 'DeviceRequest.performer', + description: 'Desired performer for service', }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-priorrequest priorrequest: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.priorRequest', description: - 'Request takes the place of referenced completed or terminated requests (See http://hl7.org/fhir/SearchParameter/DeviceRequest-priorrequest).', - }, - patient: { - type: GraphQLString, - description: - 'Individual the service is ordered for (See http://hl7.org/fhir/SearchParameter/clinical-patient).', - }, - definition: { - type: GraphQLString, - description: - 'Protocol or definition followed by this request (See http://hl7.org/fhir/SearchParameter/DeviceRequest-definition).', + 'Request takes the place of referenced completed or terminated requests', }, - device: { + // http://hl7.org/fhir/SearchParameter/DeviceRequest-requester + requester: { type: GraphQLString, - description: - 'Reference to resource that is being requested/ordered (See http://hl7.org/fhir/SearchParameter/DeviceRequest-device).', + fhirtype: 'reference', + xpath: 'DeviceRequest.requester.agent', + description: 'Who/what is requesting service ', }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-status status: { type: TokenScalar, - description: - 'entered-in-error | draft | active |suspended | completed  (See http://hl7.org/fhir/SearchParameter/DeviceRequest-status).', + fhirtype: 'token', + xpath: 'DeviceRequest.status', + description: 'entered-in-error | draft | active |suspended | completed ', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.subject', + description: 'Individual the service is ordered for', }, }; diff --git a/src/resources/3_0_1/parameters/deviceusestatement.parameters.js b/src/resources/3_0_1/parameters/deviceusestatement.parameters.js index 802804f0..03bb5e55 100644 --- a/src/resources/3_0_1/parameters/deviceusestatement.parameters.js +++ b/src/resources/3_0_1/parameters/deviceusestatement.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,24 +7,33 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the deviceusestatement query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'Search by identifier (See http://hl7.org/fhir/SearchParameter/DeviceUseStatement-identifier).', - }, - subject: { - type: GraphQLString, - description: - 'Search by subject (See http://hl7.org/fhir/SearchParameter/DeviceUseStatement-subject).', - }, + // http://hl7.org/fhir/SearchParameter/clinical-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceUseStatement.subject', description: - 'Search by subject - a patient (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-device device: { type: GraphQLString, - description: - 'Search by device (See http://hl7.org/fhir/SearchParameter/DeviceUseStatement-device).', + fhirtype: 'reference', + xpath: 'DeviceUseStatement.device', + description: 'Search by device', + }, + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceUseStatement.identifier', + description: 'Search by identifier', + }, + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceUseStatement.subject', + description: 'Search by subject', }, }; diff --git a/src/resources/3_0_1/parameters/diagnosticreport.parameters.js b/src/resources/3_0_1/parameters/diagnosticreport.parameters.js index 4a4d0356..c8e19e6f 100644 --- a/src/resources/3_0_1/parameters/diagnosticreport.parameters.js +++ b/src/resources/3_0_1/parameters/diagnosticreport.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,84 +8,122 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the diagnosticreport query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticReport.code', + description: + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'DiagnosticReport.effectiveDateTime', description: - 'The clinically relevant time of the report (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticReport.identifier', description: - 'An identifier for the report (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - image: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.subject', description: - 'A reference to the image source. (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-image).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - performer: { + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.context', description: - 'Who was the source of the report (organization) (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-performer).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, - code: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.basedOn', + description: 'Reference to the procedure request.', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-category + category: { type: TokenScalar, - description: - 'The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result (See http://hl7.org/fhir/SearchParameter/clinical-code).', + fhirtype: 'token', + xpath: 'DiagnosticReport.category', + description: 'Which diagnostic discipline/department created the report', }, - subject: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-context + context: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.context', description: - 'The subject of the report (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-subject).', + 'Healthcare event (Episode of Care or Encounter) related to the report', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-diagnosis diagnosis: { type: TokenScalar, - description: - 'A coded diagnosis on the report (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-diagnosis).', + fhirtype: 'token', + xpath: 'DiagnosticReport.codedDiagnosis', + description: 'A coded diagnosis on the report', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-image + image: { type: GraphQLString, - description: - 'The Encounter when the order was made (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.image.link', + description: 'A reference to the image source.', }, - result: { - type: GraphQLString, - description: - 'Link to an atomic result (observation resource) (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-result).', + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-issued + issued: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DiagnosticReport.issued', + description: 'When the report was issued', }, - based_on: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-performer + performer: { type: GraphQLString, - description: - 'Reference to the procedure request. (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-based-on).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.performer.actor', + description: 'Who was the source of the report (organization)', }, - patient: { + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-result + result: { type: GraphQLString, - description: - 'The subject of the report if a patient (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.result', + description: 'Link to an atomic result (observation resource)', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-specimen specimen: { type: GraphQLString, - description: - 'The specimen details (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-specimen).', - }, - context: { - type: GraphQLString, - description: - 'Healthcare event (Episode of Care or Encounter) related to the report (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-context).', - }, - issued: { - type: DateScalar, - description: - 'When the report was issued (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-issued).', - }, - category: { - type: TokenScalar, - description: - 'Which diagnostic discipline/department created the report (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-category).', + fhirtype: 'reference', + xpath: 'DiagnosticReport.specimen', + description: 'The specimen details', }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-status status: { type: TokenScalar, - description: - 'The status of the report (See http://hl7.org/fhir/SearchParameter/DiagnosticReport-status).', + fhirtype: 'token', + xpath: 'DiagnosticReport.status', + description: 'The status of the report', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.subject', + description: 'The subject of the report', }, }; diff --git a/src/resources/3_0_1/parameters/documentmanifest.parameters.js b/src/resources/3_0_1/parameters/documentmanifest.parameters.js index bf3cde8b..52398d9f 100644 --- a/src/resources/3_0_1/parameters/documentmanifest.parameters.js +++ b/src/resources/3_0_1/parameters/documentmanifest.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,69 +9,98 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the documentmanifest query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentManifest.masterIdentifier', description: - 'Unique Identifier for the set of documents (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - related_id: { - type: TokenScalar, - description: - 'Identifiers of things that are related (See http://hl7.org/fhir/SearchParameter/DocumentManifest-related-id).', - }, - content_ref: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.subject', description: - 'Contents of this set of documents (See http://hl7.org/fhir/SearchParameter/DocumentManifest-content-ref).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - subject: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentManifest.type', description: - 'The subject of the set of documents (See http://hl7.org/fhir/SearchParameter/DocumentManifest-subject).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): The type of the referral * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management * [Composition](composition.html): Kind of composition (LOINC if possible) ', }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-author author: { type: GraphQLString, - description: - 'Who and/or what authored the manifest (See http://hl7.org/fhir/SearchParameter/DocumentManifest-author).', + fhirtype: 'reference', + xpath: 'DocumentManifest.author', + description: 'Who and/or what authored the manifest', }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-content-ref + content_ref: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.content.pReference', + description: 'Contents of this set of documents', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-created created: { type: DateScalar, - description: - 'When this document manifest created (See http://hl7.org/fhir/SearchParameter/DocumentManifest-created).', + fhirtype: 'date', + xpath: 'DocumentManifest.created', + description: 'When this document manifest created', }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-description description: { type: GraphQLString, - description: - 'Human-readable description (title) (See http://hl7.org/fhir/SearchParameter/DocumentManifest-description).', + fhirtype: 'string', + xpath: 'DocumentManifest.description', + description: 'Human-readable description (title)', }, - source: { - type: UriScalar, - description: - 'The source system/application/software (See http://hl7.org/fhir/SearchParameter/DocumentManifest-source).', + // http://hl7.org/fhir/SearchParameter/DocumentManifest-recipient + recipient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.recipient', + description: 'Intended to get notified about this set of documents', }, - type: { + // http://hl7.org/fhir/SearchParameter/DocumentManifest-related-id + related_id: { type: TokenScalar, - description: - 'Kind of document set (See http://hl7.org/fhir/SearchParameter/clinical-type).', + fhirtype: 'token', + xpath: 'DocumentManifest.related.identifier', + description: 'Identifiers of things that are related', }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-related-ref related_ref: { type: GraphQLString, - description: - 'Related Resource (See http://hl7.org/fhir/SearchParameter/DocumentManifest-related-ref).', - }, - patient: { - type: GraphQLString, - description: - 'The subject of the set of documents (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'DocumentManifest.related.ref', + description: 'Related Resource', }, - recipient: { - type: GraphQLString, - description: - 'Intended to get notified about this set of documents (See http://hl7.org/fhir/SearchParameter/DocumentManifest-recipient).', + // http://hl7.org/fhir/SearchParameter/DocumentManifest-source + source: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'DocumentManifest.source', + description: 'The source system/application/software', }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-status status: { type: TokenScalar, - description: - 'current | superseded | entered-in-error (See http://hl7.org/fhir/SearchParameter/DocumentManifest-status).', + fhirtype: 'token', + xpath: 'DocumentManifest.status', + description: 'current | superseded | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.subject', + description: 'The subject of the set of documents', }, }; diff --git a/src/resources/3_0_1/parameters/documentreference.parameters.js b/src/resources/3_0_1/parameters/documentreference.parameters.js index 14f94df1..b02c1565 100644 --- a/src/resources/3_0_1/parameters/documentreference.parameters.js +++ b/src/resources/3_0_1/parameters/documentreference.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,134 +9,191 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the documentreference query */ module.exports = { - securitylabel: { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.masterIdentifier', description: - 'Document security-tags (See http://hl7.org/fhir/SearchParameter/DocumentReference-securitylabel).', - }, - subject: { - type: GraphQLString, - description: - 'Who/what is the subject of the document (See http://hl7.org/fhir/SearchParameter/DocumentReference-subject).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - description: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.subject', description: - 'Human-readable description (title) (See http://hl7.org/fhir/SearchParameter/DocumentReference-description).', - }, - language: { - type: TokenScalar, - description: - 'Human language of the content (BCP-47) (See http://hl7.org/fhir/SearchParameter/DocumentReference-language).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, + // http://hl7.org/fhir/SearchParameter/clinical-type type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.type', description: - 'Kind of document (LOINC if possible) (See http://hl7.org/fhir/SearchParameter/clinical-type).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): The type of the referral * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management * [Composition](composition.html): Kind of composition (LOINC if possible) ', }, - relation: { - type: TokenScalar, - description: - 'replaces | transforms | signs | appends (See http://hl7.org/fhir/SearchParameter/DocumentReference-relation).', - }, - setting: { - type: TokenScalar, - description: - 'Additional details about where the content was created (e.g. clinical specialty) (See http://hl7.org/fhir/SearchParameter/DocumentReference-setting).', - }, - patient: { + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.context.encounter', description: - 'Who/what is the subject of the document (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, - relationship: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-authenticator + authenticator: { type: GraphQLString, - description: - 'Combination of relation and relatesTo (See http://hl7.org/fhir/SearchParameter/DocumentReference-relationship).', + fhirtype: 'reference', + xpath: 'DocumentReference.authenticator', + description: 'Who/what authenticated the document', }, - event: { - type: TokenScalar, - description: - 'Main clinical acts documented (See http://hl7.org/fhir/SearchParameter/DocumentReference-event).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.author', + description: 'Who and/or what authored the document', }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-class class: { type: TokenScalar, - description: - 'Categorization of document (See http://hl7.org/fhir/SearchParameter/DocumentReference-class).', + fhirtype: 'token', + xpath: 'DocumentReference.class', + description: 'Categorization of document', }, - authenticator: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DocumentReference.created', + description: 'Document creation time', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-custodian + custodian: { type: GraphQLString, - description: - 'Who/what authenticated the document (See http://hl7.org/fhir/SearchParameter/DocumentReference-authenticator).', + fhirtype: 'reference', + xpath: 'DocumentReference.custodian', + description: 'Organization which maintains the document', }, - identifier: { - type: TokenScalar, - description: - 'Master Version Specific Identifier (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'DocumentReference.description', + description: 'Human-readable description (title)', }, - period: { - type: DateScalar, - description: - 'Time of service that is being documented (See http://hl7.org/fhir/SearchParameter/DocumentReference-period).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-event + event: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.context.event', + description: 'Main clinical acts documented', }, - related_id: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-facility + facility: { type: TokenScalar, - description: - 'Identifier of related objects or events (See http://hl7.org/fhir/SearchParameter/DocumentReference-related-id).', + fhirtype: 'token', + xpath: 'DocumentReference.context.facilityType', + description: 'Kind of facility where patient was seen', }, - custodian: { - type: GraphQLString, - description: - 'Organization which maintains the document (See http://hl7.org/fhir/SearchParameter/DocumentReference-custodian).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-format + format: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.content.format', + description: 'Format/content rules for the document', }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-indexed indexed: { type: DateScalar, - description: - 'When this document reference was created (See http://hl7.org/fhir/SearchParameter/DocumentReference-indexed).', + fhirtype: 'date', + xpath: 'DocumentReference.indexed', + description: 'When this document reference was created', }, - author: { - type: GraphQLString, - description: - 'Who and/or what authored the document (See http://hl7.org/fhir/SearchParameter/DocumentReference-author).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-language + language: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.content.attachment.language', + description: 'Human language of the content (BCP-47)', }, - created: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-location + location: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'DocumentReference.content.attachment.url', + description: 'Uri where the data can be found', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-period + period: { type: DateScalar, - description: - 'Document creation time (See http://hl7.org/fhir/SearchParameter/DocumentReference-created).', + fhirtype: 'date', + xpath: 'DocumentReference.context.period', + description: 'Time of service that is being documented', }, - format: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-related-id + related_id: { type: TokenScalar, - description: - 'Format/content rules for the document (See http://hl7.org/fhir/SearchParameter/DocumentReference-format).', + fhirtype: 'token', + xpath: 'DocumentReference.context.related.identifier', + description: 'Identifier of related objects or events', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-related-ref + related_ref: { type: GraphQLString, - description: - 'Context of the document content (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'DocumentReference.context.related.ref', + description: 'Related Resource', }, - related_ref: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-relatesto + relatesto: { type: GraphQLString, - description: - 'Related Resource (See http://hl7.org/fhir/SearchParameter/DocumentReference-related-ref).', + fhirtype: 'reference', + xpath: 'DocumentReference.relatesTo.target', + description: 'Target of the relationship', }, - location: { - type: UriScalar, - description: - 'Uri where the data can be found (See http://hl7.org/fhir/SearchParameter/DocumentReference-location).', + // http://hl7.org/fhir/SearchParameter/DocumentReference-relation + relation: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.relatesTo.code', + description: 'replaces | transforms | signs | appends', }, - relatesto: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-relationship + relationship: { type: GraphQLString, - description: - 'Target of the relationship (See http://hl7.org/fhir/SearchParameter/DocumentReference-relatesto).', + fhirtype: 'composite', + xpath: '', + description: 'Combination of relation and relatesTo', }, - facility: { + // http://hl7.org/fhir/SearchParameter/DocumentReference-securitylabel + securitylabel: { type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.securityLabel', + description: 'Document security-tags', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-setting + setting: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.context.practiceSetting', description: - 'Kind of facility where patient was seen (See http://hl7.org/fhir/SearchParameter/DocumentReference-facility).', + 'Additional details about where the content was created (e.g. clinical specialty)', }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-status status: { type: TokenScalar, - description: - 'current | superseded | entered-in-error (See http://hl7.org/fhir/SearchParameter/DocumentReference-status).', + fhirtype: 'token', + xpath: 'DocumentReference.status', + description: 'current | superseded | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.subject', + description: 'Who/what is the subject of the document', }, }; diff --git a/src/resources/3_0_1/parameters/domainresource.parameters.js b/src/resources/3_0_1/parameters/domainresource.parameters.js new file mode 100644 index 00000000..2476b42a --- /dev/null +++ b/src/resources/3_0_1/parameters/domainresource.parameters.js @@ -0,0 +1,16 @@ +const { GraphQLString } = require('graphql'); + +/** + * @name exports + * @static + * @summary Arguments for the domainresource query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/DomainResource-text + _text: { + type: GraphQLString, + fhirtype: 'string', + xpath: '', + description: 'Search on the narrative of the resource', + }, +}; diff --git a/src/resources/3_0_1/parameters/eligibilityrequest.parameters.js b/src/resources/3_0_1/parameters/eligibilityrequest.parameters.js index 8588af16..639792cb 100644 --- a/src/resources/3_0_1/parameters/eligibilityrequest.parameters.js +++ b/src/resources/3_0_1/parameters/eligibilityrequest.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,39 +8,53 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the eligibilityrequest query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'The business identifier of the Eligibility (See http://hl7.org/fhir/SearchParameter/EligibilityRequest-identifier).', + // http://hl7.org/fhir/SearchParameter/EligibilityRequest-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EligibilityRequest.created', + description: 'The creation date for the EOB', }, - provider: { + // http://hl7.org/fhir/SearchParameter/EligibilityRequest-enterer + enterer: { type: GraphQLString, - description: - 'The reference to the provider (See http://hl7.org/fhir/SearchParameter/EligibilityRequest-provider).', + fhirtype: 'reference', + xpath: 'EligibilityRequest.enterer', + description: 'The party who is responsible for the request', }, - patient: { + // http://hl7.org/fhir/SearchParameter/EligibilityRequest-facility + facility: { type: GraphQLString, - description: - 'The reference to the patient (See http://hl7.org/fhir/SearchParameter/EligibilityRequest-patient).', + fhirtype: 'reference', + xpath: 'EligibilityRequest.facility', + description: 'Facility responsible for the goods and services', }, - created: { - type: DateScalar, - description: - 'The creation date for the EOB (See http://hl7.org/fhir/SearchParameter/EligibilityRequest-created).', + // http://hl7.org/fhir/SearchParameter/EligibilityRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EligibilityRequest.identifier', + description: 'The business identifier of the Eligibility', }, + // http://hl7.org/fhir/SearchParameter/EligibilityRequest-organization organization: { type: GraphQLString, - description: - 'The reference to the providing organization (See http://hl7.org/fhir/SearchParameter/EligibilityRequest-organization).', + fhirtype: 'reference', + xpath: 'EligibilityRequest.organization', + description: 'The reference to the providing organization', }, - enterer: { + // http://hl7.org/fhir/SearchParameter/EligibilityRequest-patient + patient: { type: GraphQLString, - description: - 'The party who is responsible for the request (See http://hl7.org/fhir/SearchParameter/EligibilityRequest-enterer).', + fhirtype: 'reference', + xpath: 'EligibilityRequest.patient', + description: 'The reference to the patient', }, - facility: { + // http://hl7.org/fhir/SearchParameter/EligibilityRequest-provider + provider: { type: GraphQLString, - description: - 'Facility responsible for the goods and services (See http://hl7.org/fhir/SearchParameter/EligibilityRequest-facility).', + fhirtype: 'reference', + xpath: 'EligibilityRequest.provider', + description: 'The reference to the provider', }, }; diff --git a/src/resources/3_0_1/parameters/eligibilityresponse.parameters.js b/src/resources/3_0_1/parameters/eligibilityresponse.parameters.js index 3859f897..5525df1e 100644 --- a/src/resources/3_0_1/parameters/eligibilityresponse.parameters.js +++ b/src/resources/3_0_1/parameters/eligibilityresponse.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the eligibilityresponse query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'The business identifier (See http://hl7.org/fhir/SearchParameter/EligibilityResponse-identifier).', - }, - request: { - type: GraphQLString, - description: - 'The EligibilityRequest reference (See http://hl7.org/fhir/SearchParameter/EligibilityResponse-request).', + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EligibilityResponse.created', + description: 'The creation date', }, + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-disposition disposition: { type: GraphQLString, - description: - 'The contents of the disposition message (See http://hl7.org/fhir/SearchParameter/EligibilityResponse-disposition).', + fhirtype: 'string', + xpath: 'EligibilityResponse.disposition', + description: 'The contents of the disposition message', + }, + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EligibilityResponse.identifier', + description: 'The business identifier', }, + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-insurer insurer: { type: GraphQLString, - description: - 'The organization which generated this resource (See http://hl7.org/fhir/SearchParameter/EligibilityResponse-insurer).', + fhirtype: 'reference', + xpath: 'EligibilityResponse.insurer', + description: 'The organization which generated this resource', }, - created: { - type: DateScalar, - description: - 'The creation date (See http://hl7.org/fhir/SearchParameter/EligibilityResponse-created).', + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-outcome + outcome: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EligibilityResponse.outcome', + description: 'The processing outcome', + }, + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EligibilityResponse.request', + description: 'The EligibilityRequest reference', }, + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-request-organization request_organization: { type: GraphQLString, - description: - 'The EligibilityRequest organization (See http://hl7.org/fhir/SearchParameter/EligibilityResponse-request-organization).', + fhirtype: 'reference', + xpath: 'EligibilityResponse.requestOrganization', + description: 'The EligibilityRequest organization', }, + // http://hl7.org/fhir/SearchParameter/EligibilityResponse-request-provider request_provider: { type: GraphQLString, - description: - 'The EligibilityRequest provider (See http://hl7.org/fhir/SearchParameter/EligibilityResponse-request-provider).', - }, - outcome: { - type: TokenScalar, - description: - 'The processing outcome (See http://hl7.org/fhir/SearchParameter/EligibilityResponse-outcome).', + fhirtype: 'reference', + xpath: 'EligibilityResponse.requestProvider', + description: 'The EligibilityRequest provider', }, }; diff --git a/src/resources/3_0_1/parameters/encounter.parameters.js b/src/resources/3_0_1/parameters/encounter.parameters.js index 466ccf1a..0f7cff78 100644 --- a/src/resources/3_0_1/parameters/encounter.parameters.js +++ b/src/resources/3_0_1/parameters/encounter.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,109 +8,158 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the encounter query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'Encounter.period', description: - 'A date within the period the Encounter lasted (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.identifier', description: - 'Identifier(s) by which this encounter is known (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - reason: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.subject', + description: + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.type', description: - 'Reason the encounter takes place (code) (See http://hl7.org/fhir/SearchParameter/Encounter-reason).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): The type of the referral * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management * [Composition](composition.html): Kind of composition (LOINC if possible) ', }, - episodeofcare: { + // http://hl7.org/fhir/SearchParameter/Encounter-appointment + appointment: { type: GraphQLString, - description: - 'Episode(s) of care that this encounter should be recorded against (See http://hl7.org/fhir/SearchParameter/Encounter-episodeofcare).', + fhirtype: 'reference', + xpath: 'Encounter.appointment', + description: 'The appointment that scheduled this encounter', }, - participant_type: { + // http://hl7.org/fhir/SearchParameter/Encounter-class + class: { type: TokenScalar, - description: - 'Role of participant in encounter (See http://hl7.org/fhir/SearchParameter/Encounter-participant-type).', + fhirtype: 'token', + xpath: 'Encounter.class', + description: 'inpatient | outpatient | ambulatory | emergency +', }, - incomingreferral: { + // http://hl7.org/fhir/SearchParameter/Encounter-diagnosis + diagnosis: { type: GraphQLString, - description: - 'The ReferralRequest that initiated this encounter (See http://hl7.org/fhir/SearchParameter/Encounter-incomingreferral).', + fhirtype: 'reference', + xpath: 'Encounter.diagnosis.condition', + description: 'Reason the encounter takes place (resource)', }, - practitioner: { + // http://hl7.org/fhir/SearchParameter/Encounter-episodeofcare + episodeofcare: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.episodeOfCare', description: - 'Persons involved in the encounter other than the patient (See http://hl7.org/fhir/SearchParameter/Encounter-practitioner).', + 'Episode(s) of care that this encounter should be recorded against', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Encounter-incomingreferral + incomingreferral: { type: GraphQLString, - description: - 'The patient ro group present at the encounter (See http://hl7.org/fhir/SearchParameter/Encounter-subject).', + fhirtype: 'reference', + xpath: 'Encounter.incomingReferral', + description: 'The ReferralRequest that initiated this encounter', }, + // http://hl7.org/fhir/SearchParameter/Encounter-length length: { type: GraphQLString, - description: - 'Length of encounter in days (See http://hl7.org/fhir/SearchParameter/Encounter-length).', + fhirtype: 'number', + xpath: 'Encounter.length', + description: 'Length of encounter in days', }, - diagnosis: { + // http://hl7.org/fhir/SearchParameter/Encounter-location + location: { type: GraphQLString, - description: - 'Reason the encounter takes place (resource) (See http://hl7.org/fhir/SearchParameter/Encounter-diagnosis).', + fhirtype: 'reference', + xpath: 'Encounter.location.location', + description: 'Location the encounter takes place', }, - appointment: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Encounter-location-period + location_period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Encounter.location.period', description: - 'The appointment that scheduled this encounter (See http://hl7.org/fhir/SearchParameter/Encounter-appointment).', + 'Time period during which the patient was present at the location', }, + // http://hl7.org/fhir/SearchParameter/Encounter-part-of part_of: { type: GraphQLString, - description: - 'Another Encounter this encounter is part of (See http://hl7.org/fhir/SearchParameter/Encounter-part-of).', - }, - type: { - type: TokenScalar, - description: - 'Specific type of encounter (See http://hl7.org/fhir/SearchParameter/clinical-type).', + fhirtype: 'reference', + xpath: 'Encounter.partOf', + description: 'Another Encounter this encounter is part of', }, + // http://hl7.org/fhir/SearchParameter/Encounter-participant participant: { type: GraphQLString, - description: - 'Persons involved in the encounter other than the patient (See http://hl7.org/fhir/SearchParameter/Encounter-participant).', + fhirtype: 'reference', + xpath: 'Encounter.participant.individual', + description: 'Persons involved in the encounter other than the patient', }, - patient: { - type: GraphQLString, - description: - 'The patient ro group present at the encounter (See http://hl7.org/fhir/SearchParameter/clinical-patient).', - }, - location_period: { - type: DateScalar, - description: - 'Time period during which the patient was present at the location (See http://hl7.org/fhir/SearchParameter/Encounter-location-period).', + // http://hl7.org/fhir/SearchParameter/Encounter-participant-type + participant_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.participant.type', + description: 'Role of participant in encounter', }, - location: { + // http://hl7.org/fhir/SearchParameter/Encounter-practitioner + practitioner: { type: GraphQLString, - description: - 'Location the encounter takes place (See http://hl7.org/fhir/SearchParameter/Encounter-location).', + fhirtype: 'reference', + xpath: 'Encounter.participant.individual', + description: 'Persons involved in the encounter other than the patient', }, + // http://hl7.org/fhir/SearchParameter/Encounter-reason + reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.reason', + description: 'Reason the encounter takes place (code)', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-service-provider service_provider: { type: GraphQLString, - description: - 'The custodian organization of this Encounter record (See http://hl7.org/fhir/SearchParameter/Encounter-service-provider).', + fhirtype: 'reference', + xpath: 'Encounter.serviceProvider', + description: 'The custodian organization of this Encounter record', }, + // http://hl7.org/fhir/SearchParameter/Encounter-special-arrangement special_arrangement: { type: TokenScalar, - description: - 'Wheelchair, translator, stretcher, etc. (See http://hl7.org/fhir/SearchParameter/Encounter-special-arrangement).', - }, - class: { - type: TokenScalar, - description: - 'inpatient | outpatient | ambulatory | emergency + (See http://hl7.org/fhir/SearchParameter/Encounter-class).', + fhirtype: 'token', + xpath: 'Encounter.hospitalization.specialArrangement', + description: 'Wheelchair, translator, stretcher, etc.', }, + // http://hl7.org/fhir/SearchParameter/Encounter-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.status', description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled + (See http://hl7.org/fhir/SearchParameter/Encounter-status).', + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.subject', + description: 'The patient ro group present at the encounter', }, }; diff --git a/src/resources/3_0_1/parameters/endpoint.parameters.js b/src/resources/3_0_1/parameters/endpoint.parameters.js index 2941e6cb..84bae9f8 100644 --- a/src/resources/3_0_1/parameters/endpoint.parameters.js +++ b/src/resources/3_0_1/parameters/endpoint.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,34 +7,49 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the endpoint query */ module.exports = { - payload_type: { + // http://hl7.org/fhir/SearchParameter/Endpoint-connection-type + connection_type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Endpoint.connectionType', description: - 'The type of content that may be used at this endpoint (e.g. XDS Discharge summaries) (See http://hl7.org/fhir/SearchParameter/Endpoint-payload-type).', + 'Protocol/Profile/Standard to be used with this endpoint connection', }, + // http://hl7.org/fhir/SearchParameter/Endpoint-identifier identifier: { type: TokenScalar, - description: - 'Identifies this endpoint across multiple systems (See http://hl7.org/fhir/SearchParameter/Endpoint-identifier).', + fhirtype: 'token', + xpath: 'Endpoint.identifier', + description: 'Identifies this endpoint across multiple systems', }, + // http://hl7.org/fhir/SearchParameter/Endpoint-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Endpoint.name', + description: 'A name that this endpoint can be identified by', + }, + // http://hl7.org/fhir/SearchParameter/Endpoint-organization organization: { type: GraphQLString, - description: - 'The organization that is managing the endpoint (See http://hl7.org/fhir/SearchParameter/Endpoint-organization).', + fhirtype: 'reference', + xpath: 'Endpoint.managingOrganization', + description: 'The organization that is managing the endpoint', }, - connection_type: { + // http://hl7.org/fhir/SearchParameter/Endpoint-payload-type + payload_type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Endpoint.payloadType', description: - 'Protocol/Profile/Standard to be used with this endpoint connection (See http://hl7.org/fhir/SearchParameter/Endpoint-connection-type).', - }, - name: { - type: GraphQLString, - description: - 'A name that this endpoint can be identified by (See http://hl7.org/fhir/SearchParameter/Endpoint-name).', + 'The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)', }, + // http://hl7.org/fhir/SearchParameter/Endpoint-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Endpoint.status', description: - 'The current status of the Endpoint (usually expected to be active) (See http://hl7.org/fhir/SearchParameter/Endpoint-status).', + 'The current status of the Endpoint (usually expected to be active)', }, }; diff --git a/src/resources/3_0_1/parameters/enrollmentrequest.parameters.js b/src/resources/3_0_1/parameters/enrollmentrequest.parameters.js index 99f601d4..0fa84c49 100644 --- a/src/resources/3_0_1/parameters/enrollmentrequest.parameters.js +++ b/src/resources/3_0_1/parameters/enrollmentrequest.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,24 +7,32 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the enrollmentrequest query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the Enrollment (See http://hl7.org/fhir/SearchParameter/EnrollmentRequest-identifier).', + fhirtype: 'token', + xpath: 'EnrollmentRequest.identifier', + description: 'The business identifier of the Enrollment', }, - subject: { + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-organization + organization: { type: GraphQLString, - description: - 'The party to be enrolled (See http://hl7.org/fhir/SearchParameter/EnrollmentRequest-subject).', + fhirtype: 'reference', + xpath: 'EnrollmentRequest.organization', + description: 'The organization who generated this resource', }, + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-patient patient: { type: GraphQLString, - description: - 'The party to be enrolled (See http://hl7.org/fhir/SearchParameter/EnrollmentRequest-patient).', + fhirtype: 'reference', + xpath: 'EnrollmentRequest.subject', + description: 'The party to be enrolled', }, - organization: { + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-subject + subject: { type: GraphQLString, - description: - 'The organization who generated this resource (See http://hl7.org/fhir/SearchParameter/EnrollmentRequest-organization).', + fhirtype: 'reference', + xpath: 'EnrollmentRequest.subject', + description: 'The party to be enrolled', }, }; diff --git a/src/resources/3_0_1/parameters/enrollmentresponse.parameters.js b/src/resources/3_0_1/parameters/enrollmentresponse.parameters.js index 8d09ae15..28fc90f1 100644 --- a/src/resources/3_0_1/parameters/enrollmentresponse.parameters.js +++ b/src/resources/3_0_1/parameters/enrollmentresponse.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,19 +7,25 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the enrollmentresponse query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/EnrollmentResponse-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the EnrollmentResponse (See http://hl7.org/fhir/SearchParameter/EnrollmentResponse-identifier).', + fhirtype: 'token', + xpath: 'EnrollmentResponse.identifier', + description: 'The business identifier of the EnrollmentResponse', }, - request: { + // http://hl7.org/fhir/SearchParameter/EnrollmentResponse-organization + organization: { type: GraphQLString, - description: - 'The reference to the claim (See http://hl7.org/fhir/SearchParameter/EnrollmentResponse-request).', + fhirtype: 'reference', + xpath: 'EnrollmentResponse.organization', + description: 'The organization who generated this resource', }, - organization: { + // http://hl7.org/fhir/SearchParameter/EnrollmentResponse-request + request: { type: GraphQLString, - description: - 'The organization who generated this resource (See http://hl7.org/fhir/SearchParameter/EnrollmentResponse-organization).', + fhirtype: 'reference', + xpath: 'EnrollmentResponse.request', + description: 'The reference to the claim', }, }; diff --git a/src/resources/3_0_1/parameters/episodeofcare.parameters.js b/src/resources/3_0_1/parameters/episodeofcare.parameters.js index ae2f8ab3..8d9e0a70 100644 --- a/src/resources/3_0_1/parameters/episodeofcare.parameters.js +++ b/src/resources/3_0_1/parameters/episodeofcare.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,49 +8,73 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the episodeofcare query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'EpisodeOfCare.period', description: - "The provided date search value falls within the episode of care's period (See http://hl7.org/fhir/SearchParameter/clinical-date).", + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'EpisodeOfCare.identifier', description: - 'Business Identifier(s) relevant for this EpisodeOfCare (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - condition: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.patient', description: - 'Conditions/problems/diagnoses this episode of care is for (See http://hl7.org/fhir/SearchParameter/EpisodeOfCare-condition).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - incomingreferral: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EpisodeOfCare.type', description: - 'Incoming Referral Request (See http://hl7.org/fhir/SearchParameter/EpisodeOfCare-incomingreferral).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): The type of the referral * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management * [Composition](composition.html): Kind of composition (LOINC if possible) ', }, - patient: { + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-care-manager + care_manager: { type: GraphQLString, - description: - 'The patient who is the focus of this episode of care (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'EpisodeOfCare.careManager', + description: 'Care manager/care co-ordinator for the patient', }, - organization: { + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-condition + condition: { type: GraphQLString, - description: - 'The organization that has assumed the specific responsibilities of this EpisodeOfCare (See http://hl7.org/fhir/SearchParameter/EpisodeOfCare-organization).', + fhirtype: 'reference', + xpath: 'EpisodeOfCare.diagnosis.condition', + description: 'Conditions/problems/diagnoses this episode of care is for', }, - type: { - type: TokenScalar, - description: - 'Type/class - e.g. specialist referral, disease management (See http://hl7.org/fhir/SearchParameter/clinical-type).', + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-incomingreferral + incomingreferral: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.referralRequest', + description: 'Incoming Referral Request', }, - care_manager: { + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-organization + organization: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.managingOrganization', description: - 'Care manager/care co-ordinator for the patient (See http://hl7.org/fhir/SearchParameter/EpisodeOfCare-care-manager).', + 'The organization that has assumed the specific responsibilities of this EpisodeOfCare', }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'EpisodeOfCare.status', description: - 'The current status of the Episode of Care as provided (does not check the status history collection) (See http://hl7.org/fhir/SearchParameter/EpisodeOfCare-status).', + 'The current status of the Episode of Care as provided (does not check the status history collection)', }, }; diff --git a/src/resources/3_0_1/parameters/expansionprofile.parameters.js b/src/resources/3_0_1/parameters/expansionprofile.parameters.js index b88863c5..398aa8aa 100644 --- a/src/resources/3_0_1/parameters/expansionprofile.parameters.js +++ b/src/resources/3_0_1/parameters/expansionprofile.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,49 +9,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the expansionprofile query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-date date: { type: DateScalar, - description: - 'The expansion profile publication date (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-date).', + fhirtype: 'date', + xpath: 'ExpansionProfile.date', + description: 'The expansion profile publication date', }, + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ExpansionProfile.description', + description: 'The description of the expansion profile', + }, + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-identifier identifier: { type: TokenScalar, - description: - 'External identifier for the expansion profile (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-identifier).', + fhirtype: 'token', + xpath: 'ExpansionProfile.identifier', + description: 'External identifier for the expansion profile', }, + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the expansion profile (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-jurisdiction).', + fhirtype: 'token', + xpath: 'ExpansionProfile.jurisdiction', + description: 'Intended jurisdiction for the expansion profile', }, + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the expansion profile (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-name).', - }, - description: { - type: GraphQLString, - description: - 'The description of the expansion profile (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-description).', + fhirtype: 'string', + xpath: 'ExpansionProfile.name', + description: 'Computationally friendly name of the expansion profile', }, + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the expansion profile (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-publisher).', + fhirtype: 'string', + xpath: 'ExpansionProfile.publisher', + description: 'Name of the publisher of the expansion profile', }, - version: { + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-status + status: { type: TokenScalar, - description: - 'The business version of the expansion profile (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-version).', + fhirtype: 'token', + xpath: 'ExpansionProfile.status', + description: 'The current status of the expansion profile', }, + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-url url: { type: UriScalar, - description: - 'The uri that identifies the expansion profile (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-url).', + fhirtype: 'uri', + xpath: 'ExpansionProfile.url', + description: 'The uri that identifies the expansion profile', }, - status: { + // http://hl7.org/fhir/SearchParameter/ExpansionProfile-version + version: { type: TokenScalar, - description: - 'The current status of the expansion profile (See http://hl7.org/fhir/SearchParameter/ExpansionProfile-status).', + fhirtype: 'token', + xpath: 'ExpansionProfile.version', + description: 'The business version of the expansion profile', }, }; diff --git a/src/resources/3_0_1/parameters/explanationofbenefit.parameters.js b/src/resources/3_0_1/parameters/explanationofbenefit.parameters.js index fcb934df..fb54af9e 100644 --- a/src/resources/3_0_1/parameters/explanationofbenefit.parameters.js +++ b/src/resources/3_0_1/parameters/explanationofbenefit.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,69 +8,95 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the explanationofbenefit query */ module.exports = { - coverage: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-care-team + care_team: { type: GraphQLString, - description: - 'The plan under which the claim was adjudicated (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-coverage).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.careTeam.provider', + description: 'Member of the CareTeam', }, - care_team: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-claim + claim: { type: GraphQLString, - description: - 'Member of the CareTeam (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-care-team).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.claim', + description: 'The reference to the claim', }, - identifier: { - type: TokenScalar, - description: - 'The business identifier of the Explanation of Benefit (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-identifier).', + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-coverage + coverage: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.insurance.coverage', + description: 'The plan under which the claim was adjudicated', }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-created created: { type: DateScalar, - description: - 'The creation date for the EOB (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-created).', + fhirtype: 'date', + xpath: 'ExplanationOfBenefit.created', + description: 'The creation date for the EOB', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-disposition + disposition: { type: GraphQLString, - description: - 'Encounters associated with a billed line item (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-encounter).', + fhirtype: 'string', + xpath: 'ExplanationOfBenefit.disposition', + description: 'The contents of the disposition message', }, - payee: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-encounter + encounter: { type: GraphQLString, - description: - 'The party receiving any payment for the Claim (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-payee).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.item.encounter', + description: 'Encounters associated with a billed line item', }, - disposition: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-enterer + enterer: { type: GraphQLString, - description: - 'The contents of the disposition message (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-disposition).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.enterer', + description: 'The party responsible for the entry of the Claim', }, - provider: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-facility + facility: { type: GraphQLString, - description: - 'The reference to the provider (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-provider).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.facility', + description: 'Facility responsible for the goods and services', }, - patient: { - type: GraphQLString, - description: - 'The reference to the patient (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-patient).', + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExplanationOfBenefit.identifier', + description: 'The business identifier of the Explanation of Benefit', }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-organization organization: { type: GraphQLString, - description: - 'The reference to the providing organization (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-organization).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.organization', + description: 'The reference to the providing organization', }, - claim: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-patient + patient: { type: GraphQLString, - description: - 'The reference to the claim (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-claim).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.patient', + description: 'The reference to the patient', }, - enterer: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-payee + payee: { type: GraphQLString, - description: - 'The party responsible for the entry of the Claim (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-enterer).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.payee.party', + description: 'The party receiving any payment for the Claim', }, - facility: { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-provider + provider: { type: GraphQLString, - description: - 'Facility responsible for the goods and services (See http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-facility).', + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.provider', + description: 'The reference to the provider', }, }; diff --git a/src/resources/3_0_1/parameters/familymemberhistory.parameters.js b/src/resources/3_0_1/parameters/familymemberhistory.parameters.js index 05668d0a..115708b9 100644 --- a/src/resources/3_0_1/parameters/familymemberhistory.parameters.js +++ b/src/resources/3_0_1/parameters/familymemberhistory.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,44 +8,64 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the familymemberhistory query */ module.exports = { - date: { - type: DateScalar, - description: - 'When history was captured/updated (See http://hl7.org/fhir/SearchParameter/clinical-date).', - }, - identifier: { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.condition.code', description: - 'A search by a record identifier (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', }, - code: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'FamilyMemberHistory.date', description: - 'A search by a condition code (See http://hl7.org/fhir/SearchParameter/clinical-code).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, - gender: { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.identifier', description: - 'A search by a gender code of a family member (See http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-gender).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, + // http://hl7.org/fhir/SearchParameter/clinical-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'FamilyMemberHistory.patient', description: - 'The identity of a subject to list family member history items for (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-definition definition: { type: GraphQLString, - description: - 'Instantiates protocol or definition (See http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-definition).', + fhirtype: 'reference', + xpath: 'FamilyMemberHistory.definition', + description: 'Instantiates protocol or definition', }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.gender', + description: 'A search by a gender code of a family member', + }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-relationship relationship: { type: TokenScalar, - description: - 'A search by a relationship type (See http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-relationship).', + fhirtype: 'token', + xpath: 'FamilyMemberHistory.relationship', + description: 'A search by a relationship type', }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-status status: { type: TokenScalar, - description: - 'partial | completed | entered-in-error | health-unknown (See http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-status).', + fhirtype: 'token', + xpath: 'FamilyMemberHistory.status', + description: 'partial | completed | entered-in-error | health-unknown', }, }; diff --git a/src/resources/3_0_1/parameters/flag.parameters.js b/src/resources/3_0_1/parameters/flag.parameters.js index a98d63fe..2c9c2fee 100644 --- a/src/resources/3_0_1/parameters/flag.parameters.js +++ b/src/resources/3_0_1/parameters/flag.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,34 +8,49 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the flag query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'Flag.period', description: - 'Time period when flag is active (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, - identifier: { - type: TokenScalar, - description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/Flag-identifier).', - }, - subject: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Flag.subject', description: - 'The identity of a subject to list flags for (See http://hl7.org/fhir/SearchParameter/Flag-subject).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - patient: { + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Flag.encounter', description: - 'The identity of a subject to list flags for (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, + // http://hl7.org/fhir/SearchParameter/Flag-author author: { type: GraphQLString, - description: - 'Flag creator (See http://hl7.org/fhir/SearchParameter/Flag-author).', + fhirtype: 'reference', + xpath: 'Flag.author', + description: 'Flag creator', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/Flag-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Flag.identifier', + description: 'Business identifier', + }, + // http://hl7.org/fhir/SearchParameter/Flag-subject + subject: { type: GraphQLString, - description: - 'Alert relevant during encounter (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'Flag.subject', + description: 'The identity of a subject to list flags for', }, }; diff --git a/src/resources/3_0_1/parameters/goal.parameters.js b/src/resources/3_0_1/parameters/goal.parameters.js index 9e1d638c..c4053ca2 100644 --- a/src/resources/3_0_1/parameters/goal.parameters.js +++ b/src/resources/3_0_1/parameters/goal.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,39 +8,56 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the goal query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.identifier', description: - 'External Ids for this goal (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, + // http://hl7.org/fhir/SearchParameter/clinical-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Goal.subject', description: - 'Who this goal is intended for (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - subject: { - type: GraphQLString, - description: - 'Who this goal is intended for (See http://hl7.org/fhir/SearchParameter/Goal-subject).', + // http://hl7.org/fhir/SearchParameter/Goal-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.category', + description: 'E.g. Treatment, dietary, behavioral, etc.', }, + // http://hl7.org/fhir/SearchParameter/Goal-start-date start_date: { type: DateScalar, - description: - 'When goal pursuit begins (See http://hl7.org/fhir/SearchParameter/Goal-start-date).', + fhirtype: 'date', + xpath: 'Goal.startDate', + description: 'When goal pursuit begins', }, - category: { + // http://hl7.org/fhir/SearchParameter/Goal-status + status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.status', description: - 'E.g. Treatment, dietary, behavioral, etc. (See http://hl7.org/fhir/SearchParameter/Goal-category).', + 'proposed | accepted | planned | in-progress | on-target | ahead-of-target | behind-target | sustaining | achieved | on-hold | cancelled | entered-in-error | rejected', }, + // http://hl7.org/fhir/SearchParameter/Goal-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Goal.subject', + description: 'Who this goal is intended for', + }, + // http://hl7.org/fhir/SearchParameter/Goal-target-date target_date: { type: DateScalar, - description: - 'Reach goal on or before (See http://hl7.org/fhir/SearchParameter/Goal-target-date).', - }, - status: { - type: TokenScalar, - description: - 'proposed | accepted | planned | in-progress | on-target | ahead-of-target | behind-target | sustaining | achieved | on-hold | cancelled | entered-in-error | rejected (See http://hl7.org/fhir/SearchParameter/Goal-status).', + fhirtype: 'date', + xpath: 'Goal.target.dueDate', + description: 'Reach goal on or before', }, }; diff --git a/src/resources/3_0_1/parameters/graphdefinition.parameters.js b/src/resources/3_0_1/parameters/graphdefinition.parameters.js index 467cf0be..7e813f77 100644 --- a/src/resources/3_0_1/parameters/graphdefinition.parameters.js +++ b/src/resources/3_0_1/parameters/graphdefinition.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,49 +9,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the graphdefinition query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/GraphDefinition-date date: { type: DateScalar, - description: - 'The graph definition publication date (See http://hl7.org/fhir/SearchParameter/GraphDefinition-date).', + fhirtype: 'date', + xpath: 'GraphDefinition.date', + description: 'The graph definition publication date', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the graph definition (See http://hl7.org/fhir/SearchParameter/GraphDefinition-jurisdiction).', - }, - name: { + // http://hl7.org/fhir/SearchParameter/GraphDefinition-description + description: { type: GraphQLString, - description: - 'Computationally friendly name of the graph definition (See http://hl7.org/fhir/SearchParameter/GraphDefinition-name).', + fhirtype: 'string', + xpath: 'GraphDefinition.description', + description: 'The description of the graph definition', }, - start: { + // http://hl7.org/fhir/SearchParameter/GraphDefinition-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'Type of resource at which the graph starts (See http://hl7.org/fhir/SearchParameter/GraphDefinition-start).', + fhirtype: 'token', + xpath: 'GraphDefinition.jurisdiction', + description: 'Intended jurisdiction for the graph definition', }, - description: { + // http://hl7.org/fhir/SearchParameter/GraphDefinition-name + name: { type: GraphQLString, - description: - 'The description of the graph definition (See http://hl7.org/fhir/SearchParameter/GraphDefinition-description).', + fhirtype: 'string', + xpath: 'GraphDefinition.name', + description: 'Computationally friendly name of the graph definition', }, + // http://hl7.org/fhir/SearchParameter/GraphDefinition-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the graph definition (See http://hl7.org/fhir/SearchParameter/GraphDefinition-publisher).', + fhirtype: 'string', + xpath: 'GraphDefinition.publisher', + description: 'Name of the publisher of the graph definition', }, - version: { + // http://hl7.org/fhir/SearchParameter/GraphDefinition-start + start: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GraphDefinition.start', + description: 'Type of resource at which the graph starts', + }, + // http://hl7.org/fhir/SearchParameter/GraphDefinition-status + status: { type: TokenScalar, - description: - 'The business version of the graph definition (See http://hl7.org/fhir/SearchParameter/GraphDefinition-version).', + fhirtype: 'token', + xpath: 'GraphDefinition.status', + description: 'The current status of the graph definition', }, + // http://hl7.org/fhir/SearchParameter/GraphDefinition-url url: { type: UriScalar, - description: - 'The uri that identifies the graph definition (See http://hl7.org/fhir/SearchParameter/GraphDefinition-url).', + fhirtype: 'uri', + xpath: 'GraphDefinition.url', + description: 'The uri that identifies the graph definition', }, - status: { + // http://hl7.org/fhir/SearchParameter/GraphDefinition-version + version: { type: TokenScalar, - description: - 'The current status of the graph definition (See http://hl7.org/fhir/SearchParameter/GraphDefinition-status).', + fhirtype: 'token', + xpath: 'GraphDefinition.version', + description: 'The business version of the graph definition', }, }; diff --git a/src/resources/3_0_1/parameters/group.parameters.js b/src/resources/3_0_1/parameters/group.parameters.js index 90f76a6a..13dd56cd 100644 --- a/src/resources/3_0_1/parameters/group.parameters.js +++ b/src/resources/3_0_1/parameters/group.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,49 +7,67 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the group query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Group-actual actual: { type: TokenScalar, - description: - 'Descriptive or actual (See http://hl7.org/fhir/SearchParameter/Group-actual).', + fhirtype: 'token', + xpath: 'Group.actual', + description: 'Descriptive or actual', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Group-characteristic + characteristic: { type: TokenScalar, - description: - 'Unique id (See http://hl7.org/fhir/SearchParameter/Group-identifier).', + fhirtype: 'token', + xpath: 'Group.characteristic.code', + description: 'Kind of characteristic', }, + // http://hl7.org/fhir/SearchParameter/Group-characteristic-value characteristic_value: { type: GraphQLString, - description: - 'A composite of both characteristic and value (See http://hl7.org/fhir/SearchParameter/Group-characteristic-value).', + fhirtype: 'composite', + xpath: '', + description: 'A composite of both characteristic and value', }, + // http://hl7.org/fhir/SearchParameter/Group-code code: { type: TokenScalar, - description: - 'The kind of resources contained (See http://hl7.org/fhir/SearchParameter/Group-code).', - }, - member: { - type: GraphQLString, - description: - 'Reference to the group member (See http://hl7.org/fhir/SearchParameter/Group-member).', + fhirtype: 'token', + xpath: 'Group.code', + description: 'The kind of resources contained', }, + // http://hl7.org/fhir/SearchParameter/Group-exclude exclude: { type: TokenScalar, - description: - 'Group includes or excludes (See http://hl7.org/fhir/SearchParameter/Group-exclude).', + fhirtype: 'token', + xpath: 'Group.characteristic.exclude', + description: 'Group includes or excludes', }, - type: { + // http://hl7.org/fhir/SearchParameter/Group-identifier + identifier: { type: TokenScalar, - description: - 'The type of resources the group contains (See http://hl7.org/fhir/SearchParameter/Group-type).', + fhirtype: 'token', + xpath: 'Group.identifier', + description: 'Unique id', }, - value: { + // http://hl7.org/fhir/SearchParameter/Group-member + member: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Group.member.entity', + description: 'Reference to the group member', + }, + // http://hl7.org/fhir/SearchParameter/Group-type + type: { type: TokenScalar, - description: - 'Value held by characteristic (See http://hl7.org/fhir/SearchParameter/Group-value).', + fhirtype: 'token', + xpath: 'Group.type', + description: 'The type of resources the group contains', }, - characteristic: { + // http://hl7.org/fhir/SearchParameter/Group-value + value: { type: TokenScalar, - description: - 'Kind of characteristic (See http://hl7.org/fhir/SearchParameter/Group-characteristic).', + fhirtype: 'token', + xpath: 'Group.characteristic.valueCodeableConcept', + description: 'Value held by characteristic', }, }; diff --git a/src/resources/3_0_1/parameters/guidanceresponse.parameters.js b/src/resources/3_0_1/parameters/guidanceresponse.parameters.js index 8362eea4..308962cf 100644 --- a/src/resources/3_0_1/parameters/guidanceresponse.parameters.js +++ b/src/resources/3_0_1/parameters/guidanceresponse.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,24 +7,33 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the guidanceresponse query */ module.exports = { - request: { - type: TokenScalar, - description: - 'The identifier of the request associated with the response (See http://hl7.org/fhir/SearchParameter/GuidanceResponse-request).', - }, + // http://hl7.org/fhir/SearchParameter/GuidanceResponse-identifier identifier: { type: TokenScalar, - description: - 'The identifier of the guidance response (See http://hl7.org/fhir/SearchParameter/GuidanceResponse-identifier).', + fhirtype: 'token', + xpath: 'GuidanceResponse.identifier', + description: 'The identifier of the guidance response', }, + // http://hl7.org/fhir/SearchParameter/GuidanceResponse-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'GuidanceResponse.subject', description: - 'The identity of a patient to search for guidance response results (See http://hl7.org/fhir/SearchParameter/GuidanceResponse-patient).', + 'The identity of a patient to search for guidance response results', }, + // http://hl7.org/fhir/SearchParameter/GuidanceResponse-request + request: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GuidanceResponse.requestId', + description: 'The identifier of the request associated with the response', + }, + // http://hl7.org/fhir/SearchParameter/GuidanceResponse-subject subject: { type: GraphQLString, - description: - 'The subject that the guidance response is about (See http://hl7.org/fhir/SearchParameter/GuidanceResponse-subject).', + fhirtype: 'reference', + xpath: 'GuidanceResponse.subject', + description: 'The subject that the guidance response is about', }, }; diff --git a/src/resources/3_0_1/parameters/healthcareservice.parameters.js b/src/resources/3_0_1/parameters/healthcareservice.parameters.js index 132fe6ee..48edfaff 100644 --- a/src/resources/3_0_1/parameters/healthcareservice.parameters.js +++ b/src/resources/3_0_1/parameters/healthcareservice.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,54 +7,75 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the healthcareservice query */ module.exports = { - identifier: { + // http://hl7.org/fhir/SearchParameter/HealthcareService-active + active: { type: TokenScalar, - description: - 'External identifiers for this item (See http://hl7.org/fhir/SearchParameter/HealthcareService-identifier).', + fhirtype: 'token', + xpath: 'HealthcareService.active', + description: 'The Healthcare Service is currently marked as active', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.category', + description: 'Service Category of the Healthcare Service', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-characteristic + characteristic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.characteristic', + description: "One of the HealthcareService's characteristics", }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-endpoint endpoint: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'HealthcareService.endpoint', description: - 'Technical endpoints providing access to services operated for the location (See http://hl7.org/fhir/SearchParameter/HealthcareService-endpoint).', + 'Technical endpoints providing access to services operated for the location', }, - organization: { + // http://hl7.org/fhir/SearchParameter/HealthcareService-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.identifier', + description: 'External identifiers for this item', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-location + location: { type: GraphQLString, - description: - 'The organization that provides this Healthcare Service (See http://hl7.org/fhir/SearchParameter/HealthcareService-organization).', + fhirtype: 'reference', + xpath: 'HealthcareService.location', + description: 'The location of the Healthcare Service', }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-name name: { type: GraphQLString, - description: - 'A portion of the Healthcare service name (See http://hl7.org/fhir/SearchParameter/HealthcareService-name).', + fhirtype: 'string', + xpath: 'HealthcareService.name', + description: 'A portion of the Healthcare service name', }, - programname: { + // http://hl7.org/fhir/SearchParameter/HealthcareService-organization + organization: { type: GraphQLString, - description: - 'One of the Program Names serviced by this HealthcareService (See http://hl7.org/fhir/SearchParameter/HealthcareService-programname).', - }, - active: { - type: TokenScalar, - description: - 'The Healthcare Service is currently marked as active (See http://hl7.org/fhir/SearchParameter/HealthcareService-active).', + fhirtype: 'reference', + xpath: 'HealthcareService.providedBy', + description: 'The organization that provides this Healthcare Service', }, - location: { + // http://hl7.org/fhir/SearchParameter/HealthcareService-programname + programname: { type: GraphQLString, - description: - 'The location of the Healthcare Service (See http://hl7.org/fhir/SearchParameter/HealthcareService-location).', - }, - category: { - type: TokenScalar, - description: - 'Service Category of the Healthcare Service (See http://hl7.org/fhir/SearchParameter/HealthcareService-category).', + fhirtype: 'string', + xpath: 'HealthcareService.programName', + description: 'One of the Program Names serviced by this HealthcareService', }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-type type: { type: TokenScalar, - description: - 'The type of service provided by this healthcare service (See http://hl7.org/fhir/SearchParameter/HealthcareService-type).', - }, - characteristic: { - type: TokenScalar, - description: - "One of the HealthcareService's characteristics (See http://hl7.org/fhir/SearchParameter/HealthcareService-characteristic).", + fhirtype: 'token', + xpath: 'HealthcareService.type', + description: 'The type of service provided by this healthcare service', }, }; diff --git a/src/resources/3_0_1/parameters/imagingmanifest.parameters.js b/src/resources/3_0_1/parameters/imagingmanifest.parameters.js index 60a9e748..7e93bb44 100644 --- a/src/resources/3_0_1/parameters/imagingmanifest.parameters.js +++ b/src/resources/3_0_1/parameters/imagingmanifest.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,39 +9,59 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the imagingmanifest query */ module.exports = { - identifier: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingManifest.patient', description: - 'UID of the ImagingManifest (or a DICOM Key Object Selection which it represents) (See http://hl7.org/fhir/SearchParameter/ImagingManifest-identifier).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - endpoint: { + // http://hl7.org/fhir/SearchParameter/ImagingManifest-author + author: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingManifest.author', description: - 'The endpoint for the study or series (See http://hl7.org/fhir/SearchParameter/ImagingManifest-endpoint).', + 'Author of the ImagingManifest (or a DICOM Key Object Selection which it represents)', }, + // http://hl7.org/fhir/SearchParameter/ImagingManifest-authoring-time authoring_time: { type: DateScalar, + fhirtype: 'date', + xpath: 'ImagingManifest.authoringTime', description: - 'Time of the ImagingManifest (or a DICOM Key Object Selection which it represents) authoring (See http://hl7.org/fhir/SearchParameter/ImagingManifest-authoring-time).', + 'Time of the ImagingManifest (or a DICOM Key Object Selection which it represents) authoring', }, - selected_study: { - type: UriScalar, - description: - 'Study selected in the ImagingManifest (or a DICOM Key Object Selection which it represents) (See http://hl7.org/fhir/SearchParameter/ImagingManifest-selected-study).', - }, - author: { + // http://hl7.org/fhir/SearchParameter/ImagingManifest-endpoint + endpoint: { type: GraphQLString, - description: - 'Author of the ImagingManifest (or a DICOM Key Object Selection which it represents) (See http://hl7.org/fhir/SearchParameter/ImagingManifest-author).', + fhirtype: 'reference', + xpath: 'ImagingManifest.study.endpoint', + description: 'The endpoint for the study or series', }, - patient: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/ImagingManifest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingManifest.identifier', description: - 'Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'UID of the ImagingManifest (or a DICOM Key Object Selection which it represents)', }, + // http://hl7.org/fhir/SearchParameter/ImagingManifest-imaging-study imaging_study: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingManifest.study.imagingStudy', + description: + 'ImagingStudy resource selected in the ImagingManifest (or a DICOM Key Object Selection which it represents)', + }, + // http://hl7.org/fhir/SearchParameter/ImagingManifest-selected-study + selected_study: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ImagingManifest.study.uid', description: - 'ImagingStudy resource selected in the ImagingManifest (or a DICOM Key Object Selection which it represents) (See http://hl7.org/fhir/SearchParameter/ImagingManifest-imaging-study).', + 'Study selected in the ImagingManifest (or a DICOM Key Object Selection which it represents)', }, }; diff --git a/src/resources/3_0_1/parameters/imagingstudy.parameters.js b/src/resources/3_0_1/parameters/imagingstudy.parameters.js index ad69d40e..e5c9d9d2 100644 --- a/src/resources/3_0_1/parameters/imagingstudy.parameters.js +++ b/src/resources/3_0_1/parameters/imagingstudy.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -9,79 +9,111 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the imagingstudy query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.identifier', description: - 'Other identifiers for the Study (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - reason: { - type: TokenScalar, - description: - 'The reason for the study (See http://hl7.org/fhir/SearchParameter/ImagingStudy-reason).', - }, - study: { - type: UriScalar, - description: - 'The study identifier for the image (See http://hl7.org/fhir/SearchParameter/ImagingStudy-study).', - }, - dicom_class: { - type: UriScalar, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.patient', description: - 'The type of the instance (See http://hl7.org/fhir/SearchParameter/ImagingStudy-dicom-class).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - modality: { + // http://hl7.org/fhir/SearchParameter/ImagingStudy-accession + accession: { type: TokenScalar, - description: - 'The modality of the series (See http://hl7.org/fhir/SearchParameter/ImagingStudy-modality).', + fhirtype: 'token', + xpath: 'ImagingStudy.accession', + description: 'The accession identifier for the study', }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-basedon + basedon: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.basedOn', + description: 'The order for the image', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-bodysite bodysite: { type: TokenScalar, - description: - 'The body site studied (See http://hl7.org/fhir/SearchParameter/ImagingStudy-bodysite).', + fhirtype: 'token', + xpath: 'ImagingStudy.series.bodySite', + description: 'The body site studied', }, - performer: { + // http://hl7.org/fhir/SearchParameter/ImagingStudy-context + context: { type: GraphQLString, - description: - 'The person who performed the study (See http://hl7.org/fhir/SearchParameter/ImagingStudy-performer).', + fhirtype: 'reference', + xpath: 'ImagingStudy.context', + description: 'The context of the study', }, - started: { - type: DateScalar, - description: - 'When the study was started (See http://hl7.org/fhir/SearchParameter/ImagingStudy-started).', - }, - accession: { - type: TokenScalar, - description: - 'The accession identifier for the study (See http://hl7.org/fhir/SearchParameter/ImagingStudy-accession).', - }, - uid: { + // http://hl7.org/fhir/SearchParameter/ImagingStudy-dicom-class + dicom_class: { type: UriScalar, - description: - 'The instance unique identifier (See http://hl7.org/fhir/SearchParameter/ImagingStudy-uid).', + fhirtype: 'uri', + xpath: 'ImagingStudy.series.instance.sopClass', + description: 'The type of the instance', }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-endpoint endpoint: { type: GraphQLString, - description: - 'The endpoint for te study or series (See http://hl7.org/fhir/SearchParameter/ImagingStudy-endpoint).', + fhirtype: 'reference', + xpath: 'ImagingStudy.endpoint', + description: 'The endpoint for te study or series', }, - patient: { + // http://hl7.org/fhir/SearchParameter/ImagingStudy-modality + modality: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.series.modality', + description: 'The modality of the series', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-performer + performer: { type: GraphQLString, - description: - 'Who the study is about (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'ImagingStudy.series.performer', + description: 'The person who performed the study', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-reason + reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.reason', + description: 'The reason for the study', }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-series series: { type: UriScalar, - description: - 'The identifier of the series of images (See http://hl7.org/fhir/SearchParameter/ImagingStudy-series).', + fhirtype: 'uri', + xpath: 'ImagingStudy.series.uid', + description: 'The identifier of the series of images', }, - context: { - type: GraphQLString, - description: - 'The context of the study (See http://hl7.org/fhir/SearchParameter/ImagingStudy-context).', + // http://hl7.org/fhir/SearchParameter/ImagingStudy-started + started: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ImagingStudy.started', + description: 'When the study was started', }, - basedon: { - type: GraphQLString, - description: - 'The order for the image (See http://hl7.org/fhir/SearchParameter/ImagingStudy-basedon).', + // http://hl7.org/fhir/SearchParameter/ImagingStudy-study + study: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ImagingStudy.uid', + description: 'The study identifier for the image', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-uid + uid: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ImagingStudy.series.instance.uid', + description: 'The instance unique identifier', }, }; diff --git a/src/resources/3_0_1/parameters/immunization.parameters.js b/src/resources/3_0_1/parameters/immunization.parameters.js index 138aab53..da919b4a 100644 --- a/src/resources/3_0_1/parameters/immunization.parameters.js +++ b/src/resources/3_0_1/parameters/immunization.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,79 +8,113 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the immunization query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'Immunization.date', description: - 'Vaccination (non)-Administration Date (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.identifier', description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - reason: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.patient', description: - 'Why immunization occurred (See http://hl7.org/fhir/SearchParameter/Immunization-reason).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - reaction: { + // http://hl7.org/fhir/SearchParameter/Immunization-dose-sequence + dose_sequence: { type: GraphQLString, + fhirtype: 'number', + xpath: 'Immunization.vaccinationProtocol.doseSequence', + description: 'Dose number within series', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.location', description: - 'Additional information on reaction (See http://hl7.org/fhir/SearchParameter/Immunization-reaction).', + 'The service delivery location or facility in which the vaccine was / was to be administered', }, + // http://hl7.org/fhir/SearchParameter/Immunization-lot-number lot_number: { type: GraphQLString, - description: - 'Vaccine Lot Number (See http://hl7.org/fhir/SearchParameter/Immunization-lot-number).', + fhirtype: 'string', + xpath: 'Immunization.lotNumber', + description: 'Vaccine Lot Number', }, - practitioner: { + // http://hl7.org/fhir/SearchParameter/Immunization-manufacturer + manufacturer: { type: GraphQLString, - description: - 'The practitioner who played a role in the vaccination (See http://hl7.org/fhir/SearchParameter/Immunization-practitioner).', + fhirtype: 'reference', + xpath: 'Immunization.manufacturer', + description: 'Vaccine Manufacturer', }, + // http://hl7.org/fhir/SearchParameter/Immunization-notgiven notgiven: { type: TokenScalar, - description: - 'Administrations which were not given (See http://hl7.org/fhir/SearchParameter/Immunization-notgiven).', + fhirtype: 'token', + xpath: 'Immunization.notGiven', + description: 'Administrations which were not given', }, - manufacturer: { + // http://hl7.org/fhir/SearchParameter/Immunization-practitioner + practitioner: { type: GraphQLString, - description: - 'Vaccine Manufacturer (See http://hl7.org/fhir/SearchParameter/Immunization-manufacturer).', + fhirtype: 'reference', + xpath: 'Immunization.practitioner.actor', + description: 'The practitioner who played a role in the vaccination', }, - dose_sequence: { + // http://hl7.org/fhir/SearchParameter/Immunization-reaction + reaction: { type: GraphQLString, - description: - 'Dose number within series (See http://hl7.org/fhir/SearchParameter/Immunization-dose-sequence).', + fhirtype: 'reference', + xpath: 'Immunization.reaction.detail', + description: 'Additional information on reaction', }, - patient: { - type: GraphQLString, - description: - 'The patient for the vaccination record (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + // http://hl7.org/fhir/SearchParameter/Immunization-reaction-date + reaction_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Immunization.reaction.date', + description: 'When reaction started', }, - vaccine_code: { + // http://hl7.org/fhir/SearchParameter/Immunization-reason + reason: { type: TokenScalar, - description: - 'Vaccine Product Administered (See http://hl7.org/fhir/SearchParameter/Immunization-vaccine-code).', + fhirtype: 'token', + xpath: 'Immunization.explanation.reason', + description: 'Why immunization occurred', }, + // http://hl7.org/fhir/SearchParameter/Immunization-reason-not-given reason_not_given: { type: TokenScalar, - description: - 'Explanation of reason vaccination was not administered (See http://hl7.org/fhir/SearchParameter/Immunization-reason-not-given).', - }, - location: { - type: GraphQLString, - description: - 'The service delivery location or facility in which the vaccine was / was to be administered (See http://hl7.org/fhir/SearchParameter/Immunization-location).', - }, - reaction_date: { - type: DateScalar, - description: - 'When reaction started (See http://hl7.org/fhir/SearchParameter/Immunization-reaction-date).', + fhirtype: 'token', + xpath: 'Immunization.explanation.reasonNotGiven', + description: 'Explanation of reason vaccination was not administered', }, + // http://hl7.org/fhir/SearchParameter/Immunization-status status: { type: TokenScalar, - description: - 'Immunization event status (See http://hl7.org/fhir/SearchParameter/Immunization-status).', + fhirtype: 'token', + xpath: 'Immunization.status', + description: 'Immunization event status', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-vaccine-code + vaccine_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.vaccineCode', + description: 'Vaccine Product Administered', }, }; diff --git a/src/resources/3_0_1/parameters/immunizationrecommendation.parameters.js b/src/resources/3_0_1/parameters/immunizationrecommendation.parameters.js index e593c744..b9ae1386 100644 --- a/src/resources/3_0_1/parameters/immunizationrecommendation.parameters.js +++ b/src/resources/3_0_1/parameters/immunizationrecommendation.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,54 +8,75 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the immunizationrecommendation query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-date date: { type: DateScalar, - description: - 'Date recommendation created (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-date).', + fhirtype: 'date', + xpath: 'ImmunizationRecommendation.recommendation.date', + description: 'Date recommendation created', }, - identifier: { - type: TokenScalar, - description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-identifier).', + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-dose-number + dose_number: { + type: GraphQLString, + fhirtype: 'number', + xpath: 'ImmunizationRecommendation.recommendation.doseNumber', + description: 'Recommended dose number', }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-dose-sequence dose_sequence: { type: GraphQLString, - description: - 'Dose number within sequence (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-dose-sequence).', + fhirtype: 'number', + xpath: 'ImmunizationRecommendation.recommendation.protocol.doseSequence', + description: 'Dose number within sequence', }, - target_disease: { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-identifier + identifier: { type: TokenScalar, - description: - 'Disease to be immunized against (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-target-disease).', + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.identifier', + description: 'Business identifier', }, - patient: { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-information + information: { type: GraphQLString, - description: - 'Who this profile is for (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-patient).', - }, - vaccine_type: { - type: TokenScalar, - description: - 'Vaccine recommendation applies to (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-vaccine-type).', + fhirtype: 'reference', + xpath: + 'ImmunizationRecommendation.recommendation.supportingPatientInformation', + description: 'Patient observations supporting recommendation', }, - dose_number: { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-patient + patient: { type: GraphQLString, - description: - 'Recommended dose number (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-dose-number).', + fhirtype: 'reference', + xpath: 'ImmunizationRecommendation.patient', + description: 'Who this profile is for', }, - information: { - type: GraphQLString, - description: - 'Patient observations supporting recommendation (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-information).', + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.recommendation.forecastStatus', + description: 'Vaccine administration status', }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-support support: { type: GraphQLString, - description: - 'Past immunizations supporting recommendation (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-support).', + fhirtype: 'reference', + xpath: 'ImmunizationRecommendation.recommendation.supportingImmunization', + description: 'Past immunizations supporting recommendation', }, - status: { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-target-disease + target_disease: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.recommendation.targetDisease', + description: 'Disease to be immunized against', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-vaccine-type + vaccine_type: { type: TokenScalar, - description: - 'Vaccine administration status (See http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-status).', + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.recommendation.vaccineCode', + description: 'Vaccine recommendation applies to', }, }; diff --git a/src/resources/3_0_1/parameters/implementationguide.parameters.js b/src/resources/3_0_1/parameters/implementationguide.parameters.js index d5c3b71d..70b86b02 100644 --- a/src/resources/3_0_1/parameters/implementationguide.parameters.js +++ b/src/resources/3_0_1/parameters/implementationguide.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -9,59 +9,81 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the implementationguide query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-date date: { type: DateScalar, - description: - 'The implementation guide publication date (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-date).', + fhirtype: 'date', + xpath: 'ImplementationGuide.date', + description: 'The implementation guide publication date', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-dependency dependency: { type: UriScalar, - description: - 'Where to find dependency (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-dependency).', + fhirtype: 'uri', + xpath: 'ImplementationGuide.dependency.uri', + description: 'Where to find dependency', }, - resource: { + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-description + description: { type: GraphQLString, - description: - 'Location of the resource (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-resource).', + fhirtype: 'string', + xpath: 'ImplementationGuide.description', + description: 'The description of the implementation guide', + }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-experimental + experimental: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.experimental', + description: 'For testing purposes, not real usage', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the implementation guide (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-jurisdiction).', + fhirtype: 'token', + xpath: 'ImplementationGuide.jurisdiction', + description: 'Intended jurisdiction for the implementation guide', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the implementation guide (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-name).', - }, - description: { - type: GraphQLString, - description: - 'The description of the implementation guide (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-description).', + fhirtype: 'string', + xpath: 'ImplementationGuide.name', + description: 'Computationally friendly name of the implementation guide', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the implementation guide (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-publisher).', + fhirtype: 'string', + xpath: 'ImplementationGuide.publisher', + description: 'Name of the publisher of the implementation guide', }, - experimental: { - type: TokenScalar, - description: - 'For testing purposes, not real usage (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-experimental).', + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-resource + resource: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImplementationGuide.package.resource.sourceUri', + description: 'Location of the resource', }, - version: { + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-status + status: { type: TokenScalar, - description: - 'The business version of the implementation guide (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-version).', + fhirtype: 'token', + xpath: 'ImplementationGuide.status', + description: 'The current status of the implementation guide', }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-url url: { type: UriScalar, - description: - 'The uri that identifies the implementation guide (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-url).', + fhirtype: 'uri', + xpath: 'ImplementationGuide.url', + description: 'The uri that identifies the implementation guide', }, - status: { + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-version + version: { type: TokenScalar, - description: - 'The current status of the implementation guide (See http://hl7.org/fhir/SearchParameter/ImplementationGuide-status).', + fhirtype: 'token', + xpath: 'ImplementationGuide.version', + description: 'The business version of the implementation guide', }, }; diff --git a/src/resources/3_0_1/parameters/library.parameters.js b/src/resources/3_0_1/parameters/library.parameters.js index dd6897f6..b6d5eb0a 100644 --- a/src/resources/3_0_1/parameters/library.parameters.js +++ b/src/resources/3_0_1/parameters/library.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,89 +9,123 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the library query */ module.exports = { - date: { - type: DateScalar, - description: - 'The library publication date (See http://hl7.org/fhir/SearchParameter/Library-date).', - }, - identifier: { - type: TokenScalar, - description: - 'External identifier for the library (See http://hl7.org/fhir/SearchParameter/Library-identifier).', - }, - successor: { + // http://hl7.org/fhir/SearchParameter/Library-composed-of + composed_of: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Library-successor).', + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the library (See http://hl7.org/fhir/SearchParameter/Library-jurisdiction).', + // http://hl7.org/fhir/SearchParameter/Library-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Library.date', + description: 'The library publication date', }, - description: { + // http://hl7.org/fhir/SearchParameter/Library-depends-on + depends_on: { type: GraphQLString, - description: - 'The description of the library (See http://hl7.org/fhir/SearchParameter/Library-description).', + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', }, + // http://hl7.org/fhir/SearchParameter/Library-derived-from derived_from: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Library-derived-from).', + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', }, - predecessor: { + // http://hl7.org/fhir/SearchParameter/Library-description + description: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Library-predecessor).', + fhirtype: 'string', + xpath: 'Library.description', + description: 'The description of the library', }, - title: { - type: GraphQLString, - description: - 'The human-friendly name of the library (See http://hl7.org/fhir/SearchParameter/Library-title).', + // http://hl7.org/fhir/SearchParameter/Library-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Library.effectivePeriod', + description: 'The time during which the library is intended to be in use', }, - composed_of: { - type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Library-composed-of).', + // http://hl7.org/fhir/SearchParameter/Library-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.identifier', + description: 'External identifier for the library', }, - version: { + // http://hl7.org/fhir/SearchParameter/Library-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'The business version of the library (See http://hl7.org/fhir/SearchParameter/Library-version).', + fhirtype: 'token', + xpath: 'Library.jurisdiction', + description: 'Intended jurisdiction for the library', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the library (See http://hl7.org/fhir/SearchParameter/Library-url).', + // http://hl7.org/fhir/SearchParameter/Library-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Library.name', + description: 'Computationally friendly name of the library', }, - effective: { - type: DateScalar, - description: - 'The time during which the library is intended to be in use (See http://hl7.org/fhir/SearchParameter/Library-effective).', + // http://hl7.org/fhir/SearchParameter/Library-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', }, - depends_on: { + // http://hl7.org/fhir/SearchParameter/Library-publisher + publisher: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Library-depends-on).', + fhirtype: 'string', + xpath: 'Library.publisher', + description: 'Name of the publisher of the library', }, - name: { + // http://hl7.org/fhir/SearchParameter/Library-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.status', + description: 'The current status of the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-successor + successor: { type: GraphQLString, - description: - 'Computationally friendly name of the library (See http://hl7.org/fhir/SearchParameter/Library-name).', + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/Library-title + title: { type: GraphQLString, - description: - 'Name of the publisher of the library (See http://hl7.org/fhir/SearchParameter/Library-publisher).', + fhirtype: 'string', + xpath: 'Library.title', + description: 'The human-friendly name of the library', }, + // http://hl7.org/fhir/SearchParameter/Library-topic topic: { type: TokenScalar, - description: - 'Topics associated with the module (See http://hl7.org/fhir/SearchParameter/Library-topic).', + fhirtype: 'token', + xpath: 'Library.topic', + description: 'Topics associated with the module', }, - status: { + // http://hl7.org/fhir/SearchParameter/Library-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Library.url', + description: 'The uri that identifies the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-version + version: { type: TokenScalar, - description: - 'The current status of the library (See http://hl7.org/fhir/SearchParameter/Library-status).', + fhirtype: 'token', + xpath: 'Library.version', + description: 'The business version of the library', }, }; diff --git a/src/resources/3_0_1/parameters/linkage.parameters.js b/src/resources/3_0_1/parameters/linkage.parameters.js index f8ba9f9a..154f390a 100644 --- a/src/resources/3_0_1/parameters/linkage.parameters.js +++ b/src/resources/3_0_1/parameters/linkage.parameters.js @@ -6,19 +6,25 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the linkage query */ module.exports = { - item: { + // http://hl7.org/fhir/SearchParameter/Linkage-author + author: { type: GraphQLString, - description: - 'Matches on any item in the Linkage (See http://hl7.org/fhir/SearchParameter/Linkage-item).', + fhirtype: 'reference', + xpath: 'Linkage.author', + description: 'Author of the Linkage', }, - author: { + // http://hl7.org/fhir/SearchParameter/Linkage-item + item: { type: GraphQLString, - description: - 'Author of the Linkage (See http://hl7.org/fhir/SearchParameter/Linkage-author).', + fhirtype: 'reference', + xpath: 'Linkage.item.resource', + description: 'Matches on any item in the Linkage', }, + // http://hl7.org/fhir/SearchParameter/Linkage-source source: { type: GraphQLString, - description: - "Matches on any item in the Linkage with a type of 'source' (See http://hl7.org/fhir/SearchParameter/Linkage-source).", + fhirtype: 'reference', + xpath: 'Linkage.item.resource', + description: "Matches on any item in the Linkage with a type of 'source'", }, }; diff --git a/src/resources/3_0_1/parameters/list.parameters.js b/src/resources/3_0_1/parameters/list.parameters.js index 9b212e94..9a826ac8 100644 --- a/src/resources/3_0_1/parameters/list.parameters.js +++ b/src/resources/3_0_1/parameters/list.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,64 +8,93 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the list query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'List.code', + description: + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'List.date', description: - 'When the list was prepared (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'List.identifier', description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - item: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.subject', description: - 'Actual entry (See http://hl7.org/fhir/SearchParameter/List-item).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - empty_reason: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.encounter', description: - 'Why list is empty (See http://hl7.org/fhir/SearchParameter/List-empty-reason).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, - code: { + // http://hl7.org/fhir/SearchParameter/List-empty-reason + empty_reason: { type: TokenScalar, - description: - 'What the purpose of this list is (See http://hl7.org/fhir/SearchParameter/clinical-code).', + fhirtype: 'token', + xpath: 'List.emptyReason', + description: 'Why list is empty', }, - notes: { - type: GraphQLString, - description: - 'The annotation - text content (See http://hl7.org/fhir/SearchParameter/List-notes).', - }, - subject: { + // http://hl7.org/fhir/SearchParameter/List-item + item: { type: GraphQLString, - description: - 'If all resources have the same subject (See http://hl7.org/fhir/SearchParameter/List-subject).', + fhirtype: 'reference', + xpath: 'List.entry.item', + description: 'Actual entry', }, - patient: { + // http://hl7.org/fhir/SearchParameter/List-notes + notes: { type: GraphQLString, - description: - 'If all resources have the same subject (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'string', + xpath: 'List.note.text', + description: 'The annotation - text content', }, + // http://hl7.org/fhir/SearchParameter/List-source source: { type: GraphQLString, - description: - 'Who and/or what defined the list contents (aka Author) (See http://hl7.org/fhir/SearchParameter/List-source).', + fhirtype: 'reference', + xpath: 'List.source', + description: 'Who and/or what defined the list contents (aka Author)', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/List-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'List.status', + description: 'current | retired | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/List-subject + subject: { type: GraphQLString, - description: - 'Context in which list created (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'List.subject', + description: 'If all resources have the same subject', }, + // http://hl7.org/fhir/SearchParameter/List-title title: { type: GraphQLString, - description: - 'Descriptive name for the list (See http://hl7.org/fhir/SearchParameter/List-title).', - }, - status: { - type: TokenScalar, - description: - 'current | retired | entered-in-error (See http://hl7.org/fhir/SearchParameter/List-status).', + fhirtype: 'string', + xpath: 'List.title', + description: 'Descriptive name for the list', }, }; diff --git a/src/resources/3_0_1/parameters/location.parameters.js b/src/resources/3_0_1/parameters/location.parameters.js index 5f74d765..d206ca0d 100644 --- a/src/resources/3_0_1/parameters/location.parameters.js +++ b/src/resources/3_0_1/parameters/location.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,84 +7,121 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the location query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'An identifier for the location (See http://hl7.org/fhir/SearchParameter/Location-identifier).', + // http://hl7.org/fhir/SearchParameter/Location-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Location.address', + description: 'A (part of the) address of the location', }, - partof: { + // http://hl7.org/fhir/SearchParameter/Location-address-city + address_city: { type: GraphQLString, - description: - 'A location of which this location is a part (See http://hl7.org/fhir/SearchParameter/Location-partof).', + fhirtype: 'string', + xpath: 'Location.address.city', + description: 'A city specified in an address', }, - near_distance: { + // http://hl7.org/fhir/SearchParameter/Location-address-country + address_country: { type: GraphQLString, - description: - 'A distance quantity to limit the near search to locations within a specific distance Requires the near parameter to also be included (See http://hl7.org/fhir/SearchParameter/Location-near-distance).', + fhirtype: 'string', + xpath: 'Location.address.country', + description: 'A country specified in an address', }, - address: { + // http://hl7.org/fhir/SearchParameter/Location-address-postalcode + address_postalcode: { type: GraphQLString, - description: - 'A (part of the) address of the location (See http://hl7.org/fhir/SearchParameter/Location-address).', + fhirtype: 'string', + xpath: 'Location.address.postalCode', + description: 'A postal code specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Location-address-state address_state: { type: GraphQLString, - description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/Location-address-state).', + fhirtype: 'string', + xpath: 'Location.address.state', + description: 'A state specified in an address', }, - operational_status: { - type: TokenScalar, - description: - 'Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping) (See http://hl7.org/fhir/SearchParameter/Location-operational-status).', - }, - type: { + // http://hl7.org/fhir/SearchParameter/Location-address-use + address_use: { type: TokenScalar, - description: - 'A code for the type of location (See http://hl7.org/fhir/SearchParameter/Location-type).', + fhirtype: 'token', + xpath: 'Location.address.use', + description: 'A use code specified in an address', }, - address_postalcode: { + // http://hl7.org/fhir/SearchParameter/Location-endpoint + endpoint: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Location.endpoint', description: - 'A postal code specified in an address (See http://hl7.org/fhir/SearchParameter/Location-address-postalcode).', + 'Technical endpoints providing access to services operated for the location', }, - address_country: { - type: GraphQLString, - description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/Location-address-country).', + // http://hl7.org/fhir/SearchParameter/Location-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.identifier', + description: 'An identifier for the location', }, - endpoint: { + // http://hl7.org/fhir/SearchParameter/Location-name + name: { type: GraphQLString, - description: - 'Technical endpoints providing access to services operated for the location (See http://hl7.org/fhir/SearchParameter/Location-endpoint).', + fhirtype: 'string', + xpath: 'Location.name', + description: "A portion of the location's name or alias", }, - organization: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Location-near + near: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.position', description: - 'Searches for locations that are managed by the provided organization (See http://hl7.org/fhir/SearchParameter/Location-organization).', + 'The coordinates expressed as [latitude]:[longitude] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency) Requires the near-distance parameter to be provided also', }, - name: { + // http://hl7.org/fhir/SearchParameter/Location-near-distance + near_distance: { type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Location.position', description: - "A portion of the location's name or alias (See http://hl7.org/fhir/SearchParameter/Location-name).", + 'A distance quantity to limit the near search to locations within a specific distance Requires the near parameter to also be included', }, - address_use: { + // http://hl7.org/fhir/SearchParameter/Location-operational-status + operational_status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.operationalStatus', description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/Location-address-use).', + 'Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)', }, - near: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Location-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Location.managingOrganization', description: - 'The coordinates expressed as [latitude]:[longitude] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency) Requires the near-distance parameter to be provided also (See http://hl7.org/fhir/SearchParameter/Location-near).', + 'Searches for locations that are managed by the provided organization', }, - address_city: { + // http://hl7.org/fhir/SearchParameter/Location-partof + partof: { type: GraphQLString, - description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/Location-address-city).', + fhirtype: 'reference', + xpath: 'Location.partOf', + description: 'A location of which this location is a part', }, + // http://hl7.org/fhir/SearchParameter/Location-status status: { type: TokenScalar, - description: - 'Searches for locations with a specific kind of status (See http://hl7.org/fhir/SearchParameter/Location-status).', + fhirtype: 'token', + xpath: 'Location.status', + description: 'Searches for locations with a specific kind of status', + }, + // http://hl7.org/fhir/SearchParameter/Location-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.type', + description: 'A code for the type of location', }, }; diff --git a/src/resources/3_0_1/parameters/measure.parameters.js b/src/resources/3_0_1/parameters/measure.parameters.js index a607b7ff..d8e30fbc 100644 --- a/src/resources/3_0_1/parameters/measure.parameters.js +++ b/src/resources/3_0_1/parameters/measure.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,89 +9,123 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the measure query */ module.exports = { - date: { - type: DateScalar, - description: - 'The measure publication date (See http://hl7.org/fhir/SearchParameter/Measure-date).', - }, - identifier: { - type: TokenScalar, - description: - 'External identifier for the measure (See http://hl7.org/fhir/SearchParameter/Measure-identifier).', - }, - successor: { + // http://hl7.org/fhir/SearchParameter/Measure-composed-of + composed_of: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Measure-successor).', + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the measure (See http://hl7.org/fhir/SearchParameter/Measure-jurisdiction).', + // http://hl7.org/fhir/SearchParameter/Measure-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Measure.date', + description: 'The measure publication date', }, - description: { + // http://hl7.org/fhir/SearchParameter/Measure-depends-on + depends_on: { type: GraphQLString, - description: - 'The description of the measure (See http://hl7.org/fhir/SearchParameter/Measure-description).', + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', }, + // http://hl7.org/fhir/SearchParameter/Measure-derived-from derived_from: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Measure-derived-from).', + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', }, - predecessor: { + // http://hl7.org/fhir/SearchParameter/Measure-description + description: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Measure-predecessor).', + fhirtype: 'string', + xpath: 'Measure.description', + description: 'The description of the measure', }, - title: { - type: GraphQLString, - description: - 'The human-friendly name of the measure (See http://hl7.org/fhir/SearchParameter/Measure-title).', + // http://hl7.org/fhir/SearchParameter/Measure-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Measure.effectivePeriod', + description: 'The time during which the measure is intended to be in use', }, - composed_of: { - type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Measure-composed-of).', + // http://hl7.org/fhir/SearchParameter/Measure-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.identifier', + description: 'External identifier for the measure', }, - version: { + // http://hl7.org/fhir/SearchParameter/Measure-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'The business version of the measure (See http://hl7.org/fhir/SearchParameter/Measure-version).', + fhirtype: 'token', + xpath: 'Measure.jurisdiction', + description: 'Intended jurisdiction for the measure', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the measure (See http://hl7.org/fhir/SearchParameter/Measure-url).', + // http://hl7.org/fhir/SearchParameter/Measure-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Measure.name', + description: 'Computationally friendly name of the measure', }, - effective: { - type: DateScalar, - description: - 'The time during which the measure is intended to be in use (See http://hl7.org/fhir/SearchParameter/Measure-effective).', + // http://hl7.org/fhir/SearchParameter/Measure-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', }, - depends_on: { + // http://hl7.org/fhir/SearchParameter/Measure-publisher + publisher: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/Measure-depends-on).', + fhirtype: 'string', + xpath: 'Measure.publisher', + description: 'Name of the publisher of the measure', }, - name: { + // http://hl7.org/fhir/SearchParameter/Measure-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.status', + description: 'The current status of the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-successor + successor: { type: GraphQLString, - description: - 'Computationally friendly name of the measure (See http://hl7.org/fhir/SearchParameter/Measure-name).', + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/Measure-title + title: { type: GraphQLString, - description: - 'Name of the publisher of the measure (See http://hl7.org/fhir/SearchParameter/Measure-publisher).', + fhirtype: 'string', + xpath: 'Measure.title', + description: 'The human-friendly name of the measure', }, + // http://hl7.org/fhir/SearchParameter/Measure-topic topic: { type: TokenScalar, - description: - 'Topics associated with the module (See http://hl7.org/fhir/SearchParameter/Measure-topic).', + fhirtype: 'token', + xpath: 'Measure.topic', + description: 'Topics associated with the module', }, - status: { + // http://hl7.org/fhir/SearchParameter/Measure-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Measure.url', + description: 'The uri that identifies the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-version + version: { type: TokenScalar, - description: - 'The current status of the measure (See http://hl7.org/fhir/SearchParameter/Measure-status).', + fhirtype: 'token', + xpath: 'Measure.version', + description: 'The business version of the measure', }, }; diff --git a/src/resources/3_0_1/parameters/measurereport.parameters.js b/src/resources/3_0_1/parameters/measurereport.parameters.js index cc0d0a96..4202a635 100644 --- a/src/resources/3_0_1/parameters/measurereport.parameters.js +++ b/src/resources/3_0_1/parameters/measurereport.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,19 +7,26 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the measurereport query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/MeasureReport-identifier identifier: { type: TokenScalar, - description: - 'External identifier of the measure report to be returned (See http://hl7.org/fhir/SearchParameter/MeasureReport-identifier).', + fhirtype: 'token', + xpath: 'MeasureReport.identifier', + description: 'External identifier of the measure report to be returned', }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MeasureReport.patient', description: - 'The identity of a patient to search for individual measure report results for (See http://hl7.org/fhir/SearchParameter/MeasureReport-patient).', + 'The identity of a patient to search for individual measure report results for', }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-status status: { type: TokenScalar, - description: - 'The status of the measure report (See http://hl7.org/fhir/SearchParameter/MeasureReport-status).', + fhirtype: 'token', + xpath: 'MeasureReport.status', + description: 'The status of the measure report', }, }; diff --git a/src/resources/3_0_1/parameters/media.parameters.js b/src/resources/3_0_1/parameters/media.parameters.js index a652d731..2d490a8c 100644 --- a/src/resources/3_0_1/parameters/media.parameters.js +++ b/src/resources/3_0_1/parameters/media.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,69 +8,95 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the media query */ module.exports = { - date: { - type: DateScalar, - description: - 'When Media was collected (See http://hl7.org/fhir/SearchParameter/Media-date).', + // http://hl7.org/fhir/SearchParameter/Media-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.basedOn', + description: 'Procedure that caused this media to be created', }, - identifier: { - type: TokenScalar, - description: - 'Identifier(s) for the image (See http://hl7.org/fhir/SearchParameter/Media-identifier).', + // http://hl7.org/fhir/SearchParameter/Media-context + context: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.context', + description: 'Encounter / Episode associated with media', }, + // http://hl7.org/fhir/SearchParameter/Media-created created: { type: DateScalar, - description: - 'Date attachment was first created (See http://hl7.org/fhir/SearchParameter/Media-created).', + fhirtype: 'date', + xpath: 'Media.content.creation', + description: 'Date attachment was first created', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Media-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Media.occurrenceDateTime', + description: 'When Media was collected', + }, + // http://hl7.org/fhir/SearchParameter/Media-device + device: { type: GraphQLString, - description: - 'Who/What this Media is a record of (See http://hl7.org/fhir/SearchParameter/Media-subject).', + fhirtype: 'reference', + xpath: 'Media.device', + description: 'Observing Device', }, - type: { + // http://hl7.org/fhir/SearchParameter/Media-identifier + identifier: { type: TokenScalar, - description: - 'photo | video | audio (See http://hl7.org/fhir/SearchParameter/Media-type).', + fhirtype: 'token', + xpath: 'Media.identifier', + description: 'Identifier(s) for the image', }, + // http://hl7.org/fhir/SearchParameter/Media-operator operator: { type: GraphQLString, - description: - 'The person who generated the image (See http://hl7.org/fhir/SearchParameter/Media-operator).', + fhirtype: 'reference', + xpath: 'Media.operator', + description: 'The person who generated the image', }, - view: { - type: TokenScalar, - description: - 'Imaging view, e.g. Lateral or Antero-posterior (See http://hl7.org/fhir/SearchParameter/Media-view).', + // http://hl7.org/fhir/SearchParameter/Media-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.subject', + description: 'Who/What this Media is a record of', }, + // http://hl7.org/fhir/SearchParameter/Media-site site: { type: TokenScalar, - description: - 'Body part in media (See http://hl7.org/fhir/SearchParameter/Media-site).', + fhirtype: 'token', + xpath: 'Media.bodySite', + description: 'Body part in media', }, - based_on: { + // http://hl7.org/fhir/SearchParameter/Media-subject + subject: { type: GraphQLString, - description: - 'Procedure that caused this media to be created (See http://hl7.org/fhir/SearchParameter/Media-based-on).', + fhirtype: 'reference', + xpath: 'Media.subject', + description: 'Who/What this Media is a record of', }, + // http://hl7.org/fhir/SearchParameter/Media-subtype subtype: { type: TokenScalar, - description: - 'The type of acquisition equipment/process (See http://hl7.org/fhir/SearchParameter/Media-subtype).', - }, - patient: { - type: GraphQLString, - description: - 'Who/What this Media is a record of (See http://hl7.org/fhir/SearchParameter/Media-patient).', + fhirtype: 'token', + xpath: 'Media.subtype', + description: 'The type of acquisition equipment/process', }, - context: { - type: GraphQLString, - description: - 'Encounter / Episode associated with media (See http://hl7.org/fhir/SearchParameter/Media-context).', + // http://hl7.org/fhir/SearchParameter/Media-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.type', + description: 'photo | video | audio', }, - device: { - type: GraphQLString, - description: - 'Observing Device (See http://hl7.org/fhir/SearchParameter/Media-device).', + // http://hl7.org/fhir/SearchParameter/Media-view + view: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.view', + description: 'Imaging view, e.g. Lateral or Antero-posterior', }, }; diff --git a/src/resources/3_0_1/parameters/medication.parameters.js b/src/resources/3_0_1/parameters/medication.parameters.js index 4c6cfb90..a24cd0d9 100644 --- a/src/resources/3_0_1/parameters/medication.parameters.js +++ b/src/resources/3_0_1/parameters/medication.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,54 +7,75 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medication query */ module.exports = { - ingredient_code: { + // http://hl7.org/fhir/SearchParameter/medications-code + code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.code', description: - 'The product contained (See http://hl7.org/fhir/SearchParameter/Medication-ingredient-code).', + 'Multiple Resources: * [Medication](medication.html): Codes that identify this medication * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine code ', }, + // http://hl7.org/fhir/SearchParameter/Medication-container container: { type: TokenScalar, - description: - 'E.g. box, vial, blister-pack (See http://hl7.org/fhir/SearchParameter/Medication-container).', - }, - package_item: { - type: GraphQLString, - description: - 'The item in the package (See http://hl7.org/fhir/SearchParameter/Medication-package-item).', + fhirtype: 'token', + xpath: 'Medication.package.container', + description: 'E.g. box, vial, blister-pack', }, - code: { + // http://hl7.org/fhir/SearchParameter/Medication-form + form: { type: TokenScalar, - description: - 'Codes that identify this medication (See http://hl7.org/fhir/SearchParameter/medications-code).', + fhirtype: 'token', + xpath: 'Medication.form', + description: 'powder | tablets | capsule +', }, + // http://hl7.org/fhir/SearchParameter/Medication-ingredient ingredient: { type: GraphQLString, - description: - 'The product contained (See http://hl7.org/fhir/SearchParameter/Medication-ingredient).', + fhirtype: 'reference', + xpath: 'Medication.ingredient.itemReference', + description: 'The product contained', }, - form: { - type: TokenScalar, - description: - 'powder | tablets | capsule + (See http://hl7.org/fhir/SearchParameter/Medication-form).', - }, - package_item_code: { + // http://hl7.org/fhir/SearchParameter/Medication-ingredient-code + ingredient_code: { type: TokenScalar, - description: - 'The item in the package (See http://hl7.org/fhir/SearchParameter/Medication-package-item-code).', + fhirtype: 'token', + xpath: 'Medication.ingredient.itemCodeableConcept', + description: 'The product contained', }, + // http://hl7.org/fhir/SearchParameter/Medication-manufacturer manufacturer: { type: GraphQLString, - description: - 'Manufacturer of the item (See http://hl7.org/fhir/SearchParameter/Medication-manufacturer).', + fhirtype: 'reference', + xpath: 'Medication.manufacturer', + description: 'Manufacturer of the item', }, + // http://hl7.org/fhir/SearchParameter/Medication-over-the-counter over_the_counter: { type: TokenScalar, - description: - 'True if medication does not require a prescription (See http://hl7.org/fhir/SearchParameter/Medication-over-the-counter).', + fhirtype: 'token', + xpath: 'Medication.isOverTheCounter', + description: 'True if medication does not require a prescription', }, + // http://hl7.org/fhir/SearchParameter/Medication-package-item + package_item: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Medication.package.content.itemReference', + description: 'The item in the package', + }, + // http://hl7.org/fhir/SearchParameter/Medication-package-item-code + package_item_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.package.content.itemCodeableConcept', + description: 'The item in the package', + }, + // http://hl7.org/fhir/SearchParameter/Medication-status status: { type: TokenScalar, - description: - 'active | inactive | entered-in-error (See http://hl7.org/fhir/SearchParameter/Medication-status).', + fhirtype: 'token', + xpath: 'Medication.status', + description: 'active | inactive | entered-in-error', }, }; diff --git a/src/resources/3_0_1/parameters/medicationadministration.parameters.js b/src/resources/3_0_1/parameters/medicationadministration.parameters.js index 6de8090d..1b218a08 100644 --- a/src/resources/3_0_1/parameters/medicationadministration.parameters.js +++ b/src/resources/3_0_1/parameters/medicationadministration.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,74 +8,112 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medicationadministration query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'Return administrations with this external identifier (See http://hl7.org/fhir/SearchParameter/medications-identifier).', - }, + // http://hl7.org/fhir/SearchParameter/medications-code code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.medicationCodeableConcept', description: - 'Return administrations of this medication code (See http://hl7.org/fhir/SearchParameter/medications-code).', + 'Multiple Resources: * [Medication](medication.html): Codes that identify this medication * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine code ', }, - performer: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-context + context: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.context', description: - 'The identify of the individual who administered the medication (See http://hl7.org/fhir/SearchParameter/MedicationAdministration-performer).', + 'Return administrations that share this encounter or episode of care', }, - subject: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-device + device: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.device', description: - 'The identify of the individual or group to list administrations for (See http://hl7.org/fhir/SearchParameter/MedicationAdministration-subject).', + 'Return administrations with this administration device identity', }, - not_given: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-effective-time + effective_time: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationAdministration.effectiveDateTime', + description: 'Date administration happened (or did not happen)', + }, + // http://hl7.org/fhir/SearchParameter/medications-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.identifier', description: - 'Administrations that were not made (See http://hl7.org/fhir/SearchParameter/MedicationAdministration-not-given).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [MedicationDispense](medicationdispense.html): Return dispenses with this external identifier ', }, + // http://hl7.org/fhir/SearchParameter/medications-medication medication: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.medicationReference', description: - 'Return administrations of this medication resource (See http://hl7.org/fhir/SearchParameter/medications-medication).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication reference * [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource * [MedicationStatement](medicationstatement.html): Return statements of this medication reference * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine resource ', }, - reason_given: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-not-given + not_given: { type: TokenScalar, - description: - 'Reasons for administering the medication (See http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-given).', - }, - prescription: { - type: GraphQLString, - description: - 'The identity of a prescription to list administrations from (See http://hl7.org/fhir/SearchParameter/medications-prescription).', + fhirtype: 'token', + xpath: 'MedicationAdministration.notGiven', + description: 'Administrations that were not made', }, + // http://hl7.org/fhir/SearchParameter/medications-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.subject', description: - 'The identity of a patient to list administrations for (See http://hl7.org/fhir/SearchParameter/medications-patient).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for ', }, - effective_time: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.performer.actor', description: - 'Date administration happened (or did not happen) (See http://hl7.org/fhir/SearchParameter/MedicationAdministration-effective-time).', + 'The identify of the individual who administered the medication', }, - context: { + // http://hl7.org/fhir/SearchParameter/medications-prescription + prescription: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.prescription', description: - 'Return administrations that share this encounter or episode of care (See http://hl7.org/fhir/SearchParameter/MedicationAdministration-context).', + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): The identity of a prescription to list administrations from * [MedicationDispense](medicationdispense.html): The identity of a prescription to list dispenses from ', }, - reason_not_given: { + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-given + reason_given: { type: TokenScalar, - description: - 'Reasons for not administering the medication (See http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-not-given).', + fhirtype: 'token', + xpath: 'MedicationAdministration.reasonCode', + description: 'Reasons for administering the medication', }, - device: { - type: GraphQLString, - description: - 'Return administrations with this administration device identity (See http://hl7.org/fhir/SearchParameter/MedicationAdministration-device).', + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-not-given + reason_not_given: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.reasonNotGiven', + description: 'Reasons for not administering the medication', }, + // http://hl7.org/fhir/SearchParameter/medications-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.status', + description: + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Status of the prescription * [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) * [MedicationStatement](medicationstatement.html): Return statements that match the given status * [MedicationDispense](medicationdispense.html): Return dispenses with a specified dispense status ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.subject', description: - 'MedicationAdministration event status (for example one of active/paused/completed/nullified) (See http://hl7.org/fhir/SearchParameter/medications-status).', + 'The identify of the individual or group to list administrations for', }, }; diff --git a/src/resources/3_0_1/parameters/medicationdispense.parameters.js b/src/resources/3_0_1/parameters/medicationdispense.parameters.js index cef99250..a363f1fd 100644 --- a/src/resources/3_0_1/parameters/medicationdispense.parameters.js +++ b/src/resources/3_0_1/parameters/medicationdispense.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,79 +8,117 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medicationdispense query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/medications-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationDispense.medicationCodeableConcept', + description: + 'Multiple Resources: * [Medication](medication.html): Codes that identify this medication * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine code ', + }, + // http://hl7.org/fhir/SearchParameter/medications-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationDispense.identifier', description: - 'Return dispenses with this external identifier (See http://hl7.org/fhir/SearchParameter/medications-identifier).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [MedicationDispense](medicationdispense.html): Return dispenses with this external identifier ', }, - performer: { + // http://hl7.org/fhir/SearchParameter/medications-medication + medication: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.medicationReference', description: - 'Return dispenses performed by a specific individual (See http://hl7.org/fhir/SearchParameter/MedicationDispense-performer).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication reference * [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource * [MedicationStatement](medicationstatement.html): Return statements of this medication reference * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine resource ', }, - code: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/medications-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.subject', description: - 'Return dispenses of this medicine code (See http://hl7.org/fhir/SearchParameter/medications-code).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for ', }, - receiver: { + // http://hl7.org/fhir/SearchParameter/medications-prescription + prescription: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.authorizingPrescription', description: - 'The identity of a receiver to list dispenses for (See http://hl7.org/fhir/SearchParameter/MedicationDispense-receiver).', + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): The identity of a prescription to list administrations from * [MedicationDispense](medicationdispense.html): The identity of a prescription to list dispenses from ', }, - subject: { + // http://hl7.org/fhir/SearchParameter/medications-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationDispense.status', + description: + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Status of the prescription * [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) * [MedicationStatement](medicationstatement.html): Return statements that match the given status * [MedicationDispense](medicationdispense.html): Return dispenses with a specified dispense status ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-context + context: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.context', description: - 'The identity of a patient to list dispenses for (See http://hl7.org/fhir/SearchParameter/MedicationDispense-subject).', + 'Returns dispenses with a specific context (episode or episode of care)', }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-destination destination: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.destination', description: - 'Return dispenses that should be sent to a specific destination (See http://hl7.org/fhir/SearchParameter/MedicationDispense-destination).', + 'Return dispenses that should be sent to a specific destination', }, - medication: { + // http://hl7.org/fhir/SearchParameter/MedicationDispense-performer + performer: { type: GraphQLString, - description: - 'Return dispenses of this medicine resource (See http://hl7.org/fhir/SearchParameter/medications-medication).', + fhirtype: 'reference', + xpath: 'MedicationDispense.performer.actor', + description: 'Return dispenses performed by a specific individual', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-receiver + receiver: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.receiver', + description: 'The identity of a receiver to list dispenses for', }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-responsibleparty responsibleparty: { type: GraphQLString, - description: - 'Return dispenses with the specified responsible party (See http://hl7.org/fhir/SearchParameter/MedicationDispense-responsibleparty).', + fhirtype: 'reference', + xpath: 'MedicationDispense.substitution.responsibleParty', + description: 'Return dispenses with the specified responsible party', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.subject', + description: 'The identity of a patient to list dispenses for', }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-type type: { type: TokenScalar, - description: - 'Return dispenses of a specific type (See http://hl7.org/fhir/SearchParameter/MedicationDispense-type).', + fhirtype: 'token', + xpath: 'MedicationDispense.type', + description: 'Return dispenses of a specific type', }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-whenhandedover whenhandedover: { type: DateScalar, - description: - 'Returns dispenses handed over on this date (See http://hl7.org/fhir/SearchParameter/MedicationDispense-whenhandedover).', + fhirtype: 'date', + xpath: 'MedicationDispense.whenHandedOver', + description: 'Returns dispenses handed over on this date', }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-whenprepared whenprepared: { type: DateScalar, - description: - 'Returns dispenses prepared on this date (See http://hl7.org/fhir/SearchParameter/MedicationDispense-whenprepared).', - }, - prescription: { - type: GraphQLString, - description: - 'The identity of a prescription to list dispenses from (See http://hl7.org/fhir/SearchParameter/medications-prescription).', - }, - patient: { - type: GraphQLString, - description: - 'The identity of a patient to list dispenses for (See http://hl7.org/fhir/SearchParameter/medications-patient).', - }, - context: { - type: GraphQLString, - description: - 'Returns dispenses with a specific context (episode or episode of care) (See http://hl7.org/fhir/SearchParameter/MedicationDispense-context).', - }, - status: { - type: TokenScalar, - description: - 'Return dispenses with a specified dispense status (See http://hl7.org/fhir/SearchParameter/medications-status).', + fhirtype: 'date', + xpath: 'MedicationDispense.whenPrepared', + description: 'Returns dispenses prepared on this date', }, }; diff --git a/src/resources/3_0_1/parameters/medicationrequest.parameters.js b/src/resources/3_0_1/parameters/medicationrequest.parameters.js index 82f44ca2..8cfcc13c 100644 --- a/src/resources/3_0_1/parameters/medicationrequest.parameters.js +++ b/src/resources/3_0_1/parameters/medicationrequest.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,74 +8,110 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medicationrequest query */ module.exports = { - requester: { - type: GraphQLString, - description: - 'Returns prescriptions prescribed by this prescriber (See http://hl7.org/fhir/SearchParameter/MedicationRequest-requester).', - }, - date: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/medications-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.medicationCodeableConcept', description: - 'Returns medication request to be administered on a specific date (See http://hl7.org/fhir/SearchParameter/medications-date).', + 'Multiple Resources: * [Medication](medication.html): Codes that identify this medication * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine code ', }, + // http://hl7.org/fhir/SearchParameter/medications-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.identifier', description: - 'Return prescriptions with this external identifier (See http://hl7.org/fhir/SearchParameter/medications-identifier).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [MedicationDispense](medicationdispense.html): Return dispenses with this external identifier ', }, - intended_dispenser: { + // http://hl7.org/fhir/SearchParameter/medications-medication + medication: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.medicationReference', description: - 'Returns prescriptions intended to be dispensed by this Organization (See http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-dispenser).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication reference * [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource * [MedicationStatement](medicationstatement.html): Return statements of this medication reference * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine resource ', }, - authoredon: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/medications-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.subject', description: - 'Return prescriptions written on this date (See http://hl7.org/fhir/SearchParameter/MedicationRequest-authoredon).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for ', }, - code: { + // http://hl7.org/fhir/SearchParameter/medications-status + status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.status', description: - 'Return prescriptions of this medication code (See http://hl7.org/fhir/SearchParameter/medications-code).', - }, - subject: { - type: GraphQLString, - description: - 'The identity of a patient to list orders for (See http://hl7.org/fhir/SearchParameter/MedicationRequest-subject).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Status of the prescription * [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) * [MedicationStatement](medicationstatement.html): Return statements that match the given status * [MedicationDispense](medicationdispense.html): Return dispenses with a specified dispense status ', }, - medication: { - type: GraphQLString, - description: - 'Return prescriptions of this medication reference (See http://hl7.org/fhir/SearchParameter/medications-medication).', + // http://hl7.org/fhir/SearchParameter/MedicationRequest-authoredon + authoredon: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationRequest.authoredOn', + description: 'Return prescriptions written on this date', }, - priority: { + // http://hl7.org/fhir/SearchParameter/MedicationRequest-category + category: { type: TokenScalar, - description: - 'Returns prescriptions with different priorities (See http://hl7.org/fhir/SearchParameter/MedicationRequest-priority).', + fhirtype: 'token', + xpath: 'MedicationRequest.category', + description: 'Returns prescriptions with different categories', }, - intent: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-context + context: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.context', description: - 'Returns prescriptions with different intents (See http://hl7.org/fhir/SearchParameter/MedicationRequest-intent).', + 'Return prescriptions with this encounter or episode of care identifier', }, - patient: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/medications-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationRequest.dosageInstruction.timing.event', description: - 'Returns prescriptions for a specific patient (See http://hl7.org/fhir/SearchParameter/medications-patient).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Returns medication request to be administered on a specific date ', }, - context: { + // http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-dispenser + intended_dispenser: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.dispenseRequest.performer', description: - 'Return prescriptions with this encounter or episode of care identifier (See http://hl7.org/fhir/SearchParameter/MedicationRequest-context).', + 'Returns prescriptions intended to be dispensed by this Organization', }, - category: { + // http://hl7.org/fhir/SearchParameter/MedicationRequest-intent + intent: { type: TokenScalar, - description: - 'Returns prescriptions with different categories (See http://hl7.org/fhir/SearchParameter/MedicationRequest-category).', + fhirtype: 'token', + xpath: 'MedicationRequest.intent', + description: 'Returns prescriptions with different intents', }, - status: { + // http://hl7.org/fhir/SearchParameter/MedicationRequest-priority + priority: { type: TokenScalar, - description: - 'Status of the prescription (See http://hl7.org/fhir/SearchParameter/medications-status).', + fhirtype: 'token', + xpath: 'MedicationRequest.priority', + description: 'Returns prescriptions with different priorities', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.requester.agent', + description: 'Returns prescriptions prescribed by this prescriber', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.subject', + description: 'The identity of a patient to list orders for', }, }; diff --git a/src/resources/3_0_1/parameters/medicationstatement.parameters.js b/src/resources/3_0_1/parameters/medicationstatement.parameters.js index a3c6b001..22b20ce0 100644 --- a/src/resources/3_0_1/parameters/medicationstatement.parameters.js +++ b/src/resources/3_0_1/parameters/medicationstatement.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,59 +8,88 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the medicationstatement query */ module.exports = { - identifier: { + // http://hl7.org/fhir/SearchParameter/medications-code + code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.medicationCodeableConcept', description: - 'Return statements with this external identifier (See http://hl7.org/fhir/SearchParameter/medications-identifier).', - }, - effective: { - type: DateScalar, - description: - 'Date when patient was taking (or not taking) the medication (See http://hl7.org/fhir/SearchParameter/MedicationStatement-effective).', + 'Multiple Resources: * [Medication](medication.html): Codes that identify this medication * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine code ', }, - code: { + // http://hl7.org/fhir/SearchParameter/medications-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.identifier', description: - 'Return statements of this medication code (See http://hl7.org/fhir/SearchParameter/medications-code).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [MedicationDispense](medicationdispense.html): Return dispenses with this external identifier ', }, - subject: { + // http://hl7.org/fhir/SearchParameter/medications-medication + medication: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.medicationReference', description: - 'The identity of a patient, animal or group to list statements for (See http://hl7.org/fhir/SearchParameter/MedicationStatement-subject).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication reference * [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource * [MedicationStatement](medicationstatement.html): Return statements of this medication reference * [MedicationDispense](medicationdispense.html): Return dispenses of this medicine resource ', }, + // http://hl7.org/fhir/SearchParameter/medications-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.subject', description: - 'Returns statements for a specific patient. (See http://hl7.org/fhir/SearchParameter/medications-patient).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for ', }, - context: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/medications-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.status', description: - 'Returns statements for a specific context (episode or episode of Care). (See http://hl7.org/fhir/SearchParameter/MedicationStatement-context).', + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Status of the prescription * [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) * [MedicationStatement](medicationstatement.html): Return statements that match the given status * [MedicationDispense](medicationdispense.html): Return dispenses with a specified dispense status ', }, - medication: { + // http://hl7.org/fhir/SearchParameter/MedicationStatement-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.category', + description: 'Returns statements of this category of medicationstatement', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-context + context: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.context', description: - 'Return statements of this medication reference (See http://hl7.org/fhir/SearchParameter/medications-medication).', + 'Returns statements for a specific context (episode or episode of Care).', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationStatement.effectiveDateTime', + description: 'Date when patient was taking (or not taking) the medication', }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-part-of part_of: { type: GraphQLString, - description: - 'Returns statements that are part of another event. (See http://hl7.org/fhir/SearchParameter/MedicationStatement-part-of).', + fhirtype: 'reference', + xpath: 'MedicationStatement.partOf', + description: 'Returns statements that are part of another event.', }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-source source: { type: GraphQLString, - description: - 'Who or where the information in the statement came from (See http://hl7.org/fhir/SearchParameter/MedicationStatement-source).', + fhirtype: 'reference', + xpath: 'MedicationStatement.informationSource', + description: 'Who or where the information in the statement came from', }, - category: { - type: TokenScalar, - description: - 'Returns statements of this category of medicationstatement (See http://hl7.org/fhir/SearchParameter/MedicationStatement-category).', - }, - status: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.subject', description: - 'Return statements that match the given status (See http://hl7.org/fhir/SearchParameter/medications-status).', + 'The identity of a patient, animal or group to list statements for', }, }; diff --git a/src/resources/3_0_1/parameters/messagedefinition.parameters.js b/src/resources/3_0_1/parameters/messagedefinition.parameters.js index c59cec58..78ffcac6 100644 --- a/src/resources/3_0_1/parameters/messagedefinition.parameters.js +++ b/src/resources/3_0_1/parameters/messagedefinition.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,69 +9,95 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the messagedefinition query */ module.exports = { - date: { - type: DateScalar, - description: - 'The message definition publication date (See http://hl7.org/fhir/SearchParameter/MessageDefinition-date).', - }, - identifier: { + // http://hl7.org/fhir/SearchParameter/MessageDefinition-category + category: { type: TokenScalar, - description: - 'External identifier for the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-identifier).', + fhirtype: 'token', + xpath: 'MessageDefinition.category', + description: 'The behavior associated with the message', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-jurisdiction).', + // http://hl7.org/fhir/SearchParameter/MessageDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MessageDefinition.date', + description: 'The message definition publication date', }, + // http://hl7.org/fhir/SearchParameter/MessageDefinition-description description: { type: GraphQLString, - description: - 'The description of the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-description).', + fhirtype: 'string', + xpath: 'MessageDefinition.description', + description: 'The description of the message definition', }, - focus: { + // http://hl7.org/fhir/SearchParameter/MessageDefinition-event + event: { type: TokenScalar, - description: - 'A resource that is a permitted focus of the message (See http://hl7.org/fhir/SearchParameter/MessageDefinition-focus).', + fhirtype: 'token', + xpath: 'MessageDefinition.event', + description: 'The event that triggers the message', }, - title: { - type: GraphQLString, - description: - 'The human-friendly name of the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-title).', + // http://hl7.org/fhir/SearchParameter/MessageDefinition-focus + focus: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.focus.code', + description: 'A resource that is a permitted focus of the message', }, - version: { + // http://hl7.org/fhir/SearchParameter/MessageDefinition-identifier + identifier: { type: TokenScalar, - description: - 'The business version of the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-version).', + fhirtype: 'token', + xpath: 'MessageDefinition.identifier', + description: 'External identifier for the message definition', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-url).', + // http://hl7.org/fhir/SearchParameter/MessageDefinition-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.jurisdiction', + description: 'Intended jurisdiction for the message definition', }, + // http://hl7.org/fhir/SearchParameter/MessageDefinition-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-name).', + fhirtype: 'string', + xpath: 'MessageDefinition.name', + description: 'Computationally friendly name of the message definition', }, + // http://hl7.org/fhir/SearchParameter/MessageDefinition-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-publisher).', + fhirtype: 'string', + xpath: 'MessageDefinition.publisher', + description: 'Name of the publisher of the message definition', }, - event: { + // http://hl7.org/fhir/SearchParameter/MessageDefinition-status + status: { type: TokenScalar, - description: - 'The event that triggers the message (See http://hl7.org/fhir/SearchParameter/MessageDefinition-event).', + fhirtype: 'token', + xpath: 'MessageDefinition.status', + description: 'The current status of the message definition', }, - category: { - type: TokenScalar, - description: - 'The behavior associated with the message (See http://hl7.org/fhir/SearchParameter/MessageDefinition-category).', + // http://hl7.org/fhir/SearchParameter/MessageDefinition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MessageDefinition.title', + description: 'The human-friendly name of the message definition', }, - status: { + // http://hl7.org/fhir/SearchParameter/MessageDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'MessageDefinition.url', + description: 'The uri that identifies the message definition', + }, + // http://hl7.org/fhir/SearchParameter/MessageDefinition-version + version: { type: TokenScalar, - description: - 'The current status of the message definition (See http://hl7.org/fhir/SearchParameter/MessageDefinition-status).', + fhirtype: 'token', + xpath: 'MessageDefinition.version', + description: 'The business version of the message definition', }, }; diff --git a/src/resources/3_0_1/parameters/messageheader.parameters.js b/src/resources/3_0_1/parameters/messageheader.parameters.js index 9b93ffe4..64b8761d 100644 --- a/src/resources/3_0_1/parameters/messageheader.parameters.js +++ b/src/resources/3_0_1/parameters/messageheader.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -9,79 +9,109 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the messageheader query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/MessageHeader-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.author', + description: 'The source of the decision', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-code code: { type: TokenScalar, - description: - 'ok | transient-error | fatal-error (See http://hl7.org/fhir/SearchParameter/MessageHeader-code).', + fhirtype: 'token', + xpath: 'MessageHeader.response.code', + description: 'ok | transient-error | fatal-error', }, - receiver: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-destination + destination: { type: GraphQLString, - description: - "Intended 'real-world' recipient for the data (See http://hl7.org/fhir/SearchParameter/MessageHeader-receiver).", + fhirtype: 'string', + xpath: 'MessageHeader.destination.name', + description: 'Name of system', }, - author: { - type: GraphQLString, - description: - 'The source of the decision (See http://hl7.org/fhir/SearchParameter/MessageHeader-author).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-destination-uri + destination_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'MessageHeader.destination.endpoint', + description: 'Actual destination address or id', }, - destination: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-enterer + enterer: { type: GraphQLString, - description: - 'Name of system (See http://hl7.org/fhir/SearchParameter/MessageHeader-destination).', + fhirtype: 'reference', + xpath: 'MessageHeader.enterer', + description: 'The source of the data entry', }, - focus: { - type: GraphQLString, - description: - 'The actual content of the message (See http://hl7.org/fhir/SearchParameter/MessageHeader-focus).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-event + event: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageHeader.event', + description: 'Code for the event this message represents', }, - source: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-focus + focus: { type: GraphQLString, - description: - 'Name of system (See http://hl7.org/fhir/SearchParameter/MessageHeader-source).', + fhirtype: 'reference', + xpath: 'MessageHeader.focus', + description: 'The actual content of the message', }, - target: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-receiver + receiver: { type: GraphQLString, - description: - 'Particular delivery destination within the destination (See http://hl7.org/fhir/SearchParameter/MessageHeader-target).', - }, - destination_uri: { - type: UriScalar, - description: - 'Actual destination address or id (See http://hl7.org/fhir/SearchParameter/MessageHeader-destination-uri).', + fhirtype: 'reference', + xpath: 'MessageHeader.receiver', + description: "Intended 'real-world' recipient for the data", }, - source_uri: { - type: UriScalar, - description: - 'Actual message source address or id (See http://hl7.org/fhir/SearchParameter/MessageHeader-source-uri).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-response-id + response_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageHeader.response.identifier', + description: 'Id of original message', }, - sender: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-responsible + responsible: { type: GraphQLString, - description: - 'Real world sender of the message (See http://hl7.org/fhir/SearchParameter/MessageHeader-sender).', + fhirtype: 'reference', + xpath: 'MessageHeader.responsible', + description: 'Final responsibility for event', }, - responsible: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-sender + sender: { type: GraphQLString, - description: - 'Final responsibility for event (See http://hl7.org/fhir/SearchParameter/MessageHeader-responsible).', + fhirtype: 'reference', + xpath: 'MessageHeader.sender', + description: 'Real world sender of the message', }, - enterer: { + // http://hl7.org/fhir/SearchParameter/MessageHeader-source + source: { type: GraphQLString, - description: - 'The source of the data entry (See http://hl7.org/fhir/SearchParameter/MessageHeader-enterer).', + fhirtype: 'string', + xpath: 'MessageHeader.source.name', + description: 'Name of system', }, - response_id: { - type: TokenScalar, - description: - 'Id of original message (See http://hl7.org/fhir/SearchParameter/MessageHeader-response-id).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-source-uri + source_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'MessageHeader.source.endpoint', + description: 'Actual message source address or id', }, - event: { - type: TokenScalar, - description: - 'Code for the event this message represents (See http://hl7.org/fhir/SearchParameter/MessageHeader-event).', + // http://hl7.org/fhir/SearchParameter/MessageHeader-target + target: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.destination.target', + description: 'Particular delivery destination within the destination', }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-timestamp timestamp: { type: DateScalar, - description: - 'Time that the message was sent (See http://hl7.org/fhir/SearchParameter/MessageHeader-timestamp).', + fhirtype: 'date', + xpath: 'MessageHeader.timestamp', + description: 'Time that the message was sent', }, }; diff --git a/src/resources/3_0_1/parameters/namingsystem.parameters.js b/src/resources/3_0_1/parameters/namingsystem.parameters.js index ab32c70d..adbb19fe 100644 --- a/src/resources/3_0_1/parameters/namingsystem.parameters.js +++ b/src/resources/3_0_1/parameters/namingsystem.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,79 +8,109 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the namingsystem query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/NamingSystem-contact + contact: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'NamingSystem.contact.name', + description: 'Name of an individual to contact', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-date date: { type: DateScalar, - description: - 'The naming system publication date (See http://hl7.org/fhir/SearchParameter/NamingSystem-date).', + fhirtype: 'date', + xpath: 'NamingSystem.date', + description: 'The naming system publication date', }, - period: { - type: DateScalar, - description: - 'When is identifier valid? (See http://hl7.org/fhir/SearchParameter/NamingSystem-period).', + // http://hl7.org/fhir/SearchParameter/NamingSystem-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'NamingSystem.description', + description: 'The description of the naming system', }, - kind: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-id-type + id_type: { type: TokenScalar, - description: - 'codesystem | identifier | root (See http://hl7.org/fhir/SearchParameter/NamingSystem-kind).', + fhirtype: 'token', + xpath: 'NamingSystem.uniqueId.type', + description: 'oid | uuid | uri | other', }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the naming system (See http://hl7.org/fhir/SearchParameter/NamingSystem-jurisdiction).', - }, - description: { - type: GraphQLString, - description: - 'The description of the naming system (See http://hl7.org/fhir/SearchParameter/NamingSystem-description).', - }, - type: { - type: TokenScalar, - description: - 'e.g. driver, provider, patient, bank etc. (See http://hl7.org/fhir/SearchParameter/NamingSystem-type).', + fhirtype: 'token', + xpath: 'NamingSystem.jurisdiction', + description: 'Intended jurisdiction for the naming system', }, - id_type: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-kind + kind: { type: TokenScalar, - description: - 'oid | uuid | uri | other (See http://hl7.org/fhir/SearchParameter/NamingSystem-id-type).', + fhirtype: 'token', + xpath: 'NamingSystem.kind', + description: 'codesystem | identifier | root', }, - responsible: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-name + name: { type: GraphQLString, - description: - 'Who maintains system namespace? (See http://hl7.org/fhir/SearchParameter/NamingSystem-responsible).', + fhirtype: 'string', + xpath: 'NamingSystem.name', + description: 'Computationally friendly name of the naming system', }, - contact: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'NamingSystem.uniqueId.period', + description: 'When is identifier valid?', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-publisher + publisher: { type: GraphQLString, - description: - 'Name of an individual to contact (See http://hl7.org/fhir/SearchParameter/NamingSystem-contact).', + fhirtype: 'string', + xpath: 'NamingSystem.publisher', + description: 'Name of the publisher of the naming system', }, - name: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-replaced-by + replaced_by: { type: GraphQLString, - description: - 'Computationally friendly name of the naming system (See http://hl7.org/fhir/SearchParameter/NamingSystem-name).', + fhirtype: 'reference', + xpath: 'NamingSystem.replacedBy', + description: 'Use this instead', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-responsible + responsible: { type: GraphQLString, - description: - 'Name of the publisher of the naming system (See http://hl7.org/fhir/SearchParameter/NamingSystem-publisher).', + fhirtype: 'string', + xpath: 'NamingSystem.responsible', + description: 'Who maintains system namespace?', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.status', + description: 'The current status of the naming system', }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-telecom telecom: { type: TokenScalar, - description: - 'Contact details for individual or organization (See http://hl7.org/fhir/SearchParameter/NamingSystem-telecom).', + fhirtype: 'token', + xpath: 'NamingSystem.contact.telecom', + description: 'Contact details for individual or organization', }, - value: { - type: GraphQLString, - description: - 'The unique identifier (See http://hl7.org/fhir/SearchParameter/NamingSystem-value).', + // http://hl7.org/fhir/SearchParameter/NamingSystem-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.type', + description: 'e.g. driver, provider, patient, bank etc.', }, - replaced_by: { + // http://hl7.org/fhir/SearchParameter/NamingSystem-value + value: { type: GraphQLString, - description: - 'Use this instead (See http://hl7.org/fhir/SearchParameter/NamingSystem-replaced-by).', - }, - status: { - type: TokenScalar, - description: - 'The current status of the naming system (See http://hl7.org/fhir/SearchParameter/NamingSystem-status).', + fhirtype: 'string', + xpath: 'NamingSystem.uniqueId.value', + description: 'The unique identifier', }, }; diff --git a/src/resources/3_0_1/parameters/nutritionorder.parameters.js b/src/resources/3_0_1/parameters/nutritionorder.parameters.js index 11c2e95d..c2ec688e 100644 --- a/src/resources/3_0_1/parameters/nutritionorder.parameters.js +++ b/src/resources/3_0_1/parameters/nutritionorder.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,54 +8,78 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the nutritionorder query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.identifier', description: - 'Return nutrition orders with this external identifier (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - datetime: { - type: DateScalar, - description: - 'Return nutrition orders requested on this date (See http://hl7.org/fhir/SearchParameter/NutritionOrder-datetime).', - }, - provider: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'NutritionOrder.patient', description: - 'The identify of the provider who placed the nutrition order (See http://hl7.org/fhir/SearchParameter/NutritionOrder-provider).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - patient: { + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'NutritionOrder.encounter', description: - 'The identity of the person who requires the diet, formula or nutritional supplement (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, - supplement: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-additive + additive: { type: TokenScalar, - description: - 'Type of supplement product requested (See http://hl7.org/fhir/SearchParameter/NutritionOrder-supplement).', + fhirtype: 'token', + xpath: 'NutritionOrder.enteralFormula.additiveType', + description: 'Type of module component to add to the feeding', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-datetime + datetime: { + type: DateScalar, + fhirtype: 'date', + xpath: 'NutritionOrder.dateTime', + description: 'Return nutrition orders requested on this date', }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-formula formula: { type: TokenScalar, - description: - 'Type of enteral or infant formula (See http://hl7.org/fhir/SearchParameter/NutritionOrder-formula).', - }, - encounter: { - type: GraphQLString, - description: - 'Return nutrition orders with this encounter identifier (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'token', + xpath: 'NutritionOrder.enteralFormula.baseFormulaType', + description: 'Type of enteral or infant formula', }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-oraldiet oraldiet: { type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.oralDiet.type', description: - 'Type of diet that can be consumed orally (i.e., take via the mouth). (See http://hl7.org/fhir/SearchParameter/NutritionOrder-oraldiet).', + 'Type of diet that can be consumed orally (i.e., take via the mouth).', }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'NutritionOrder.orderer', + description: 'The identify of the provider who placed the nutrition order', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-status status: { type: TokenScalar, - description: - 'Status of the nutrition order. (See http://hl7.org/fhir/SearchParameter/NutritionOrder-status).', + fhirtype: 'token', + xpath: 'NutritionOrder.status', + description: 'Status of the nutrition order.', }, - additive: { + // http://hl7.org/fhir/SearchParameter/NutritionOrder-supplement + supplement: { type: TokenScalar, - description: - 'Type of module component to add to the feeding (See http://hl7.org/fhir/SearchParameter/NutritionOrder-additive).', + fhirtype: 'token', + xpath: 'NutritionOrder.supplement.type', + description: 'Type of supplement product requested', }, }; diff --git a/src/resources/3_0_1/parameters/observation.parameters.js b/src/resources/3_0_1/parameters/observation.parameters.js index 739074e4..149901b4 100644 --- a/src/resources/3_0_1/parameters/observation.parameters.js +++ b/src/resources/3_0_1/parameters/observation.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,194 +8,290 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the observation query */ module.exports = { - date: { - type: DateScalar, - description: - 'Obtained date/time. If the obtained element is a period, a date that falls in the period (See http://hl7.org/fhir/SearchParameter/clinical-date).', - }, - combo_data_absent_reason: { - type: TokenScalar, - description: - 'The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing. (See http://hl7.org/fhir/SearchParameter/Observation-combo-data-absent-reason).', - }, + // http://hl7.org/fhir/SearchParameter/clinical-code code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.code', description: - 'The code of the observation type (See http://hl7.org/fhir/SearchParameter/clinical-code).', - }, - combo_code_value_quantity: { - type: GraphQLString, - description: - 'Code and quantity value parameter pair, including in components (See http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-quantity).', - }, - subject: { - type: GraphQLString, - description: - 'The subject that the observation is about (See http://hl7.org/fhir/SearchParameter/Observation-subject).', + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', }, - component_data_absent_reason: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Observation.effectiveDateTime', description: - 'The reason why the expected value in the element Observation.component.value[x] is missing. (See http://hl7.org/fhir/SearchParameter/Observation-component-data-absent-reason).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, - value_concept: { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.identifier', description: - 'The value of the observation, if the value is a CodeableConcept (See http://hl7.org/fhir/SearchParameter/Observation-value-concept).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - value_date: { - type: DateScalar, - description: - 'The value of the observation, if the value is a date or period of time (See http://hl7.org/fhir/SearchParameter/Observation-value-date).', - }, - code_value_string: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.subject', description: - 'Code and string value parameter pair (See http://hl7.org/fhir/SearchParameter/Observation-code-value-string).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - component_code_value_quantity: { + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.context', description: - 'Component code and component quantity value parameter pair (See http://hl7.org/fhir/SearchParameter/Observation-component-code-value-quantity).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, + // http://hl7.org/fhir/SearchParameter/Observation-based-on based_on: { type: GraphQLString, - description: - 'Reference to the test or procedure request. (See http://hl7.org/fhir/SearchParameter/Observation-based-on).', + fhirtype: 'reference', + xpath: 'Observation.basedOn', + description: 'Reference to the test or procedure request.', }, - related: { + // http://hl7.org/fhir/SearchParameter/Observation-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.category', + description: 'The classification of the type of observation', + }, + // http://hl7.org/fhir/SearchParameter/Observation-code-value-concept + code_value_concept: { type: GraphQLString, - description: - 'Related Observations - search on related-type and related-target together (See http://hl7.org/fhir/SearchParameter/Observation-related).', + fhirtype: 'composite', + xpath: '', + description: 'Code and coded value parameter pair', }, + // http://hl7.org/fhir/SearchParameter/Observation-code-value-date code_value_date: { type: GraphQLString, - description: - 'Code and date/time value parameter pair (See http://hl7.org/fhir/SearchParameter/Observation-code-value-date).', + fhirtype: 'composite', + xpath: '', + description: 'Code and date/time value parameter pair', }, - patient: { + // http://hl7.org/fhir/SearchParameter/Observation-code-value-quantity + code_value_quantity: { type: GraphQLString, - description: - 'The subject that the observation is about (if patient) (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'composite', + xpath: '', + description: 'Code and quantity value parameter pair', }, - specimen: { + // http://hl7.org/fhir/SearchParameter/Observation-code-value-string + code_value_string: { type: GraphQLString, - description: - 'Specimen used for this observation (See http://hl7.org/fhir/SearchParameter/Observation-specimen).', + fhirtype: 'composite', + xpath: '', + description: 'Code and string value parameter pair', }, - component_code: { + // http://hl7.org/fhir/SearchParameter/Observation-combo-code + combo_code: { type: TokenScalar, - description: - 'The component code of the observation type (See http://hl7.org/fhir/SearchParameter/Observation-component-code).', + fhirtype: 'token', + xpath: 'Observation.code', + description: 'The code of the observation type or component type', }, - code_value_quantity: { + // http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-concept + combo_code_value_concept: { type: GraphQLString, - description: - 'Code and quantity value parameter pair (See http://hl7.org/fhir/SearchParameter/Observation-code-value-quantity).', + fhirtype: 'composite', + xpath: '', + description: 'Code and coded value parameter pair, including in components', }, - context: { + // http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-quantity + combo_code_value_quantity: { type: GraphQLString, + fhirtype: 'composite', + xpath: '', description: - 'Healthcare event (Episode-of-care or Encounter) related to the observation (See http://hl7.org/fhir/SearchParameter/Observation-context).', + 'Code and quantity value parameter pair, including in components', }, - combo_code_value_concept: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Observation-combo-data-absent-reason + combo_data_absent_reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.dataAbsentReason', description: - 'Code and coded value parameter pair, including in components (See http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-concept).', + 'The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.', }, - value_string: { + // http://hl7.org/fhir/SearchParameter/Observation-combo-value-concept + combo_value_concept: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.valueCodeableConcept', + description: + 'The value or component value of the observation, if the value is a CodeableConcept', + }, + // http://hl7.org/fhir/SearchParameter/Observation-combo-value-quantity + combo_value_quantity: { type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Observation.valueQuantity', description: - 'The value of the observation, if the value is a string, and also searches in CodeableConcept.text (See http://hl7.org/fhir/SearchParameter/Observation-value-string).', + 'The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Observation-component-code + component_code: { type: TokenScalar, - description: - 'The unique id for a particular observation (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + fhirtype: 'token', + xpath: 'Observation.component.code', + description: 'The component code of the observation type', }, - performer: { + // http://hl7.org/fhir/SearchParameter/Observation-component-code-value-concept + component_code_value_concept: { type: GraphQLString, - description: - 'Who performed the observation (See http://hl7.org/fhir/SearchParameter/Observation-performer).', + fhirtype: 'composite', + xpath: '', + description: 'Component code and component coded value parameter pair', }, - combo_code: { + // http://hl7.org/fhir/SearchParameter/Observation-component-code-value-quantity + component_code_value_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Component code and component quantity value parameter pair', + }, + // http://hl7.org/fhir/SearchParameter/Observation-component-data-absent-reason + component_data_absent_reason: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.component.dataAbsentReason', description: - 'The code of the observation type or component type (See http://hl7.org/fhir/SearchParameter/Observation-combo-code).', + 'The reason why the expected value in the element Observation.component.value[x] is missing.', }, - method: { + // http://hl7.org/fhir/SearchParameter/Observation-component-value-concept + component_value_concept: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.component.valueCodeableConcept', description: - 'The method used for the observation (See http://hl7.org/fhir/SearchParameter/Observation-method).', + 'The value of the component observation, if the value is a CodeableConcept', }, - value_quantity: { + // http://hl7.org/fhir/SearchParameter/Observation-component-value-quantity + component_value_quantity: { type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Observation.component.valueQuantity', description: - 'The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data) (See http://hl7.org/fhir/SearchParameter/Observation-value-quantity).', + 'The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)', }, - component_value_quantity: { + // http://hl7.org/fhir/SearchParameter/Observation-context + context: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.context', description: - 'The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data) (See http://hl7.org/fhir/SearchParameter/Observation-component-value-quantity).', + 'Healthcare event (Episode-of-care or Encounter) related to the observation', }, + // http://hl7.org/fhir/SearchParameter/Observation-data-absent-reason data_absent_reason: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.dataAbsentReason', description: - 'The reason why the expected value in the element Observation.value[x] is missing. (See http://hl7.org/fhir/SearchParameter/Observation-data-absent-reason).', + 'The reason why the expected value in the element Observation.value[x] is missing.', }, - combo_value_quantity: { + // http://hl7.org/fhir/SearchParameter/Observation-device + device: { type: GraphQLString, - description: - 'The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data) (See http://hl7.org/fhir/SearchParameter/Observation-combo-value-quantity).', + fhirtype: 'reference', + xpath: 'Observation.device', + description: 'The Device that generated the observation data.', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/Observation-method + method: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.method', + description: 'The method used for the observation', + }, + // http://hl7.org/fhir/SearchParameter/Observation-performer + performer: { type: GraphQLString, - description: - 'Encounter related to the observation (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'Observation.performer', + description: 'Who performed the observation', }, - related_type: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Observation-related + related: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', description: - 'has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by (See http://hl7.org/fhir/SearchParameter/Observation-related-type).', + 'Related Observations - search on related-type and related-target together', }, + // http://hl7.org/fhir/SearchParameter/Observation-related-target related_target: { type: GraphQLString, - description: - 'Resource that is related to this one (See http://hl7.org/fhir/SearchParameter/Observation-related-target).', + fhirtype: 'reference', + xpath: 'Observation.related.target', + description: 'Resource that is related to this one', }, - code_value_concept: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Observation-related-type + related_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.related.type', description: - 'Code and coded value parameter pair (See http://hl7.org/fhir/SearchParameter/Observation-code-value-concept).', + 'has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by', }, - component_code_value_concept: { + // http://hl7.org/fhir/SearchParameter/Observation-specimen + specimen: { type: GraphQLString, - description: - 'Component code and component coded value parameter pair (See http://hl7.org/fhir/SearchParameter/Observation-component-code-value-concept).', + fhirtype: 'reference', + xpath: 'Observation.specimen', + description: 'Specimen used for this observation', }, - component_value_concept: { + // http://hl7.org/fhir/SearchParameter/Observation-status + status: { type: TokenScalar, - description: - 'The value of the component observation, if the value is a CodeableConcept (See http://hl7.org/fhir/SearchParameter/Observation-component-value-concept).', + fhirtype: 'token', + xpath: 'Observation.status', + description: 'The status of the observation', }, - category: { + // http://hl7.org/fhir/SearchParameter/Observation-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.subject', + description: 'The subject that the observation is about', + }, + // http://hl7.org/fhir/SearchParameter/Observation-value-concept + value_concept: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.valueCodeableConcept', description: - 'The classification of the type of observation (See http://hl7.org/fhir/SearchParameter/Observation-category).', + 'The value of the observation, if the value is a CodeableConcept', }, - device: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Observation-value-date + value_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Observation.valueDateTime', description: - 'The Device that generated the observation data. (See http://hl7.org/fhir/SearchParameter/Observation-device).', + 'The value of the observation, if the value is a date or period of time', }, - combo_value_concept: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Observation-value-quantity + value_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Observation.valueQuantity', description: - 'The value or component value of the observation, if the value is a CodeableConcept (See http://hl7.org/fhir/SearchParameter/Observation-combo-value-concept).', + 'The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)', }, - status: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Observation-value-string + value_string: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Observation.valueString', description: - 'The status of the observation (See http://hl7.org/fhir/SearchParameter/Observation-status).', + 'The value of the observation, if the value is a string, and also searches in CodeableConcept.text', }, }; diff --git a/src/resources/3_0_1/parameters/operationdefinition.parameters.js b/src/resources/3_0_1/parameters/operationdefinition.parameters.js index f7f2f823..ea9181f1 100644 --- a/src/resources/3_0_1/parameters/operationdefinition.parameters.js +++ b/src/resources/3_0_1/parameters/operationdefinition.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,79 +9,109 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the operationdefinition query */ module.exports = { - date: { - type: DateScalar, - description: - 'The operation definition publication date (See http://hl7.org/fhir/SearchParameter/OperationDefinition-date).', + // http://hl7.org/fhir/SearchParameter/OperationDefinition-base + base: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OperationDefinition.base', + description: 'Marks this as a profile of the base', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-code code: { type: TokenScalar, - description: - 'Name used to invoke the operation (See http://hl7.org/fhir/SearchParameter/OperationDefinition-code).', - }, - instance: { - type: TokenScalar, - description: - 'Invoke on an instance? (See http://hl7.org/fhir/SearchParameter/OperationDefinition-instance).', - }, - kind: { - type: TokenScalar, - description: - 'operation | query (See http://hl7.org/fhir/SearchParameter/OperationDefinition-kind).', + fhirtype: 'token', + xpath: 'OperationDefinition.code', + description: 'Name used to invoke the operation', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the operation definition (See http://hl7.org/fhir/SearchParameter/OperationDefinition-jurisdiction).', + // http://hl7.org/fhir/SearchParameter/OperationDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'OperationDefinition.date', + description: 'The operation definition publication date', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-description description: { type: GraphQLString, - description: - 'The description of the operation definition (See http://hl7.org/fhir/SearchParameter/OperationDefinition-description).', + fhirtype: 'string', + xpath: 'OperationDefinition.description', + description: 'The description of the operation definition', }, - type: { + // http://hl7.org/fhir/SearchParameter/OperationDefinition-instance + instance: { type: TokenScalar, - description: - 'Invole at the type level? (See http://hl7.org/fhir/SearchParameter/OperationDefinition-type).', + fhirtype: 'token', + xpath: 'OperationDefinition.instance', + description: 'Invoke on an instance?', }, - version: { + // http://hl7.org/fhir/SearchParameter/OperationDefinition-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'The business version of the operation definition (See http://hl7.org/fhir/SearchParameter/OperationDefinition-version).', - }, - url: { - type: UriScalar, - description: - 'The uri that identifies the operation definition (See http://hl7.org/fhir/SearchParameter/OperationDefinition-url).', + fhirtype: 'token', + xpath: 'OperationDefinition.jurisdiction', + description: 'Intended jurisdiction for the operation definition', }, - system: { + // http://hl7.org/fhir/SearchParameter/OperationDefinition-kind + kind: { type: TokenScalar, - description: - 'Invoke at the system level? (See http://hl7.org/fhir/SearchParameter/OperationDefinition-system).', + fhirtype: 'token', + xpath: 'OperationDefinition.kind', + description: 'operation | query', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the operation definition (See http://hl7.org/fhir/SearchParameter/OperationDefinition-name).', + fhirtype: 'string', + xpath: 'OperationDefinition.name', + description: 'Computationally friendly name of the operation definition', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/OperationDefinition-param-profile + param_profile: { type: GraphQLString, - description: - 'Name of the publisher of the operation definition (See http://hl7.org/fhir/SearchParameter/OperationDefinition-publisher).', + fhirtype: 'reference', + xpath: 'OperationDefinition.parameter.profile', + description: 'Profile on the type', }, - param_profile: { + // http://hl7.org/fhir/SearchParameter/OperationDefinition-publisher + publisher: { type: GraphQLString, - description: - 'Profile on the type (See http://hl7.org/fhir/SearchParameter/OperationDefinition-param-profile).', + fhirtype: 'string', + xpath: 'OperationDefinition.publisher', + description: 'Name of the publisher of the operation definition', }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-status status: { type: TokenScalar, - description: - 'The current status of the operation definition (See http://hl7.org/fhir/SearchParameter/OperationDefinition-status).', + fhirtype: 'token', + xpath: 'OperationDefinition.status', + description: 'The current status of the operation definition', }, - base: { - type: GraphQLString, - description: - 'Marks this as a profile of the base (See http://hl7.org/fhir/SearchParameter/OperationDefinition-base).', + // http://hl7.org/fhir/SearchParameter/OperationDefinition-system + system: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.system', + description: 'Invoke at the system level?', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.type', + description: 'Invole at the type level?', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'OperationDefinition.url', + description: 'The uri that identifies the operation definition', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.version', + description: 'The business version of the operation definition', }, }; diff --git a/src/resources/3_0_1/parameters/organization.parameters.js b/src/resources/3_0_1/parameters/organization.parameters.js index c3356b64..c9e9d8b2 100644 --- a/src/resources/3_0_1/parameters/organization.parameters.js +++ b/src/resources/3_0_1/parameters/organization.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,69 +7,99 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the organization query */ module.exports = { - identifier: { + // http://hl7.org/fhir/SearchParameter/Organization-active + active: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.active', description: - "Any identifier for the organization (not the accreditation issuer's identifier) (See http://hl7.org/fhir/SearchParameter/Organization-identifier).", - }, - partof: { - type: GraphQLString, - description: - 'An organization of which this organization forms a part (See http://hl7.org/fhir/SearchParameter/Organization-partof).', + 'A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text', }, + // http://hl7.org/fhir/SearchParameter/Organization-address address: { type: GraphQLString, - description: - 'A (part of the) address of the organization (See http://hl7.org/fhir/SearchParameter/Organization-address).', + fhirtype: 'string', + xpath: 'Organization.address', + description: 'A (part of the) address of the organization', }, - address_state: { + // http://hl7.org/fhir/SearchParameter/Organization-address-city + address_city: { type: GraphQLString, - description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/Organization-address-state).', + fhirtype: 'string', + xpath: 'Organization.address.city', + description: 'A city specified in an address', }, - active: { - type: TokenScalar, - description: - 'A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text (See http://hl7.org/fhir/SearchParameter/Organization-active).', - }, - type: { - type: TokenScalar, - description: - 'A code for the type of organization (See http://hl7.org/fhir/SearchParameter/Organization-type).', + // http://hl7.org/fhir/SearchParameter/Organization-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.address.country', + description: 'A country specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Organization-address-postalcode address_postalcode: { type: GraphQLString, - description: - 'A postal code specified in an address (See http://hl7.org/fhir/SearchParameter/Organization-address-postalcode).', + fhirtype: 'string', + xpath: 'Organization.address.postalCode', + description: 'A postal code specified in an address', }, - address_country: { + // http://hl7.org/fhir/SearchParameter/Organization-address-state + address_state: { type: GraphQLString, - description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/Organization-address-country).', + fhirtype: 'string', + xpath: 'Organization.address.state', + description: 'A state specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Organization-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.address.use', + description: 'A use code specified in an address', }, + // http://hl7.org/fhir/SearchParameter/Organization-endpoint endpoint: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Organization.endpoint', description: - 'Technical endpoints providing access to services operated for the organization (See http://hl7.org/fhir/SearchParameter/Organization-endpoint).', + 'Technical endpoints providing access to services operated for the organization', }, - phonetic: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Organization-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.identifier', description: - "A portion of the organization's name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/Organization-phonetic).", + "Any identifier for the organization (not the accreditation issuer's identifier)", }, + // http://hl7.org/fhir/SearchParameter/Organization-name name: { type: GraphQLString, - description: - "A portion of the organization's name or alias (See http://hl7.org/fhir/SearchParameter/Organization-name).", + fhirtype: 'string', + xpath: 'Organization.name', + description: "A portion of the organization's name or alias", }, - address_use: { - type: TokenScalar, - description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/Organization-address-use).', + // http://hl7.org/fhir/SearchParameter/Organization-partof + partof: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Organization.partOf', + description: 'An organization of which this organization forms a part', }, - address_city: { + // http://hl7.org/fhir/SearchParameter/Organization-phonetic + phonetic: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.name', description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/Organization-address-city).', + "A portion of the organization's name using some kind of phonetic matching algorithm", + }, + // http://hl7.org/fhir/SearchParameter/Organization-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.type', + description: 'A code for the type of organization', }, }; diff --git a/src/resources/3_0_1/parameters/patient.parameters.js b/src/resources/3_0_1/parameters/patient.parameters.js index 2812b818..2d48f4e0 100644 --- a/src/resources/3_0_1/parameters/patient.parameters.js +++ b/src/resources/3_0_1/parameters/patient.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,129 +8,197 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the patient query */ module.exports = { - birthdate: { - type: DateScalar, - description: - "The patient's date of birth (See http://hl7.org/fhir/SearchParameter/individual-birthdate).", - }, - deceased: { + // http://hl7.org/fhir/SearchParameter/Patient-active + active: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.active', + description: 'Whether the patient record is active', + }, + // http://hl7.org/fhir/SearchParameter/individual-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address', description: - 'This patient has been marked as deceased, or as a death date entered (See http://hl7.org/fhir/SearchParameter/Patient-deceased).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text ', }, - address_state: { + // http://hl7.org/fhir/SearchParameter/individual-address-city + address_city: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.city', description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-state).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A city specified in an address * [Practitioner](practitioner.html): A city specified in an address * [Person](person.html): A city specified in an address * [Patient](patient.html): A city specified in an address ', }, - gender: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/individual-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.country', description: - 'Gender of the patient (See http://hl7.org/fhir/SearchParameter/individual-gender).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A country specified in an address * [Practitioner](practitioner.html): A country specified in an address * [Person](person.html): A country specified in an address * [Patient](patient.html): A country specified in an address ', }, - animal_species: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/individual-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.postalCode', description: - 'The species for animal patients (See http://hl7.org/fhir/SearchParameter/Patient-animal-species).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A postal code specified in an address * [Practitioner](practitioner.html): A postalCode specified in an address * [Person](person.html): A postal code specified in an address * [Patient](patient.html): A postalCode specified in an address ', }, - link: { + // http://hl7.org/fhir/SearchParameter/individual-address-state + address_state: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.state', description: - 'All patients linked to the given patient (See http://hl7.org/fhir/SearchParameter/Patient-link).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A state specified in an address * [Practitioner](practitioner.html): A state specified in an address * [Person](person.html): A state specified in an address * [Patient](patient.html): A state specified in an address ', }, - language: { + // http://hl7.org/fhir/SearchParameter/individual-address-use + address_use: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.address.use', description: - 'Language code (irrespective of use value) (See http://hl7.org/fhir/SearchParameter/Patient-language).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A use code specified in an address * [Practitioner](practitioner.html): A use code specified in an address * [Person](person.html): A use code specified in an address * [Patient](patient.html): A use code specified in an address ', }, + // http://hl7.org/fhir/SearchParameter/Patient-animal-breed animal_breed: { type: TokenScalar, - description: - 'The breed for animal patients (See http://hl7.org/fhir/SearchParameter/Patient-animal-breed).', + fhirtype: 'token', + xpath: 'Patient.animal.breed', + description: 'The breed for animal patients', }, - address_country: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Patient-animal-species + animal_species: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.animal.species', + description: 'The species for animal patients', + }, + // http://hl7.org/fhir/SearchParameter/individual-birthdate + birthdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Patient.birthDate', description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-country).', + "Multiple Resources: * [RelatedPerson](relatedperson.html): The Related Person's date of birth * [Person](person.html): The person's date of birth * [Patient](patient.html): The patient's date of birth ", }, + // http://hl7.org/fhir/SearchParameter/Patient-death-date death_date: { type: DateScalar, + fhirtype: 'date', + xpath: 'Patient.deceasedDateTime', description: - 'The date of death has been provided and satisfies this search value (See http://hl7.org/fhir/SearchParameter/Patient-death-date).', + 'The date of death has been provided and satisfies this search value', }, - phonetic: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/Patient-deceased + deceased: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.deceasedBoolean', description: - 'A portion of either family or given name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/individual-phonetic).', + 'This patient has been marked as deceased, or as a death date entered', }, - telecom: { + // http://hl7.org/fhir/SearchParameter/individual-email + email: { type: TokenScalar, + fhirtype: 'token', + xpath: "Patient.telecom[system/@value='email']", description: - 'The value in any kind of telecom details of the patient (See http://hl7.org/fhir/SearchParameter/individual-telecom).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [Person](person.html): A value in an email contact * [Patient](patient.html): A value in an email contact ', }, - address_city: { + // http://hl7.org/fhir/SearchParameter/individual-family + family: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name.family', description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-city).', - }, - email: { - type: TokenScalar, - description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/individual-email).', + 'Multiple Resources: * [Practitioner](practitioner.html): A portion of the family name * [Patient](patient.html): A portion of the family name of the patient ', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/individual-gender + gender: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.gender', description: - 'A patient identifier (See http://hl7.org/fhir/SearchParameter/Patient-identifier).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): Gender of the related person * [Practitioner](practitioner.html): Gender of the practitioner * [Person](person.html): The gender of the person * [Patient](patient.html): Gender of the patient ', }, - given: { + // http://hl7.org/fhir/SearchParameter/Patient-general-practitioner + general_practitioner: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Patient.generalPractitioner', description: - 'A portion of the given name of the patient (See http://hl7.org/fhir/SearchParameter/individual-given).', + "Patient's nominated general practitioner, not the organization that manages the record", }, - address: { + // http://hl7.org/fhir/SearchParameter/individual-given + given: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name.given', description: - 'A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text (See http://hl7.org/fhir/SearchParameter/individual-address).', + 'Multiple Resources: * [Practitioner](practitioner.html): A portion of the given name * [Patient](patient.html): A portion of the given name of the patient ', }, - general_practitioner: { - type: GraphQLString, - description: - "Patient's nominated general practitioner, not the organization that manages the record (See http://hl7.org/fhir/SearchParameter/Patient-general-practitioner).", + // http://hl7.org/fhir/SearchParameter/Patient-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.identifier', + description: 'A patient identifier', }, - active: { + // http://hl7.org/fhir/SearchParameter/Patient-language + language: { type: TokenScalar, - description: - 'Whether the patient record is active (See http://hl7.org/fhir/SearchParameter/Patient-active).', + fhirtype: 'token', + xpath: 'Patient.communication.language', + description: 'Language code (irrespective of use value)', }, - address_postalcode: { + // http://hl7.org/fhir/SearchParameter/Patient-link + link: { type: GraphQLString, - description: - 'A postalCode specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-postalcode).', + fhirtype: 'reference', + xpath: 'Patient.link.other', + description: 'All patients linked to the given patient', }, - phone: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Patient-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name', description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/individual-phone).', + 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text', }, + // http://hl7.org/fhir/SearchParameter/Patient-organization organization: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Patient.managingOrganization', + description: 'The organization at which this person is a patient', + }, + // http://hl7.org/fhir/SearchParameter/individual-phone + phone: { + type: TokenScalar, + fhirtype: 'token', + xpath: "Patient.telecom[system/@value='phone']", description: - 'The organization at which this person is a patient (See http://hl7.org/fhir/SearchParameter/Patient-organization).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Patient](patient.html): A value in a phone contact ', }, - name: { + // http://hl7.org/fhir/SearchParameter/individual-phonetic + phonetic: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name', description: - 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text (See http://hl7.org/fhir/SearchParameter/Patient-name).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm * [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm * [Person](person.html): A portion of name using some kind of phonetic matching algorithm * [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm ', }, - address_use: { + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.telecom', description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-use).', - }, - family: { - type: GraphQLString, - description: - 'A portion of the family name of the patient (See http://hl7.org/fhir/SearchParameter/individual-family).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [Person](person.html): The value in any kind of contact * [Patient](patient.html): The value in any kind of telecom details of the patient ', }, }; diff --git a/src/resources/3_0_1/parameters/paymentnotice.parameters.js b/src/resources/3_0_1/parameters/paymentnotice.parameters.js index e9818711..d44f4353 100644 --- a/src/resources/3_0_1/parameters/paymentnotice.parameters.js +++ b/src/resources/3_0_1/parameters/paymentnotice.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the paymentnotice query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/PaymentNotice-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PaymentNotice.created', + description: 'Creation date fro the notice', + }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the notice (See http://hl7.org/fhir/SearchParameter/PaymentNotice-identifier).', + fhirtype: 'token', + xpath: 'PaymentNotice.identifier', + description: 'The business identifier of the notice', }, - request: { + // http://hl7.org/fhir/SearchParameter/PaymentNotice-organization + organization: { type: GraphQLString, - description: - 'The Claim (See http://hl7.org/fhir/SearchParameter/PaymentNotice-request).', + fhirtype: 'reference', + xpath: 'PaymentNotice.organization', + description: 'The organization who generated this resource', }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-payment-status + payment_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentNotice.paymentStatus', + description: 'The type of payment notice', + }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-provider provider: { type: GraphQLString, - description: - 'The reference to the provider (See http://hl7.org/fhir/SearchParameter/PaymentNotice-provider).', - }, - created: { - type: DateScalar, - description: - 'Creation date fro the notice (See http://hl7.org/fhir/SearchParameter/PaymentNotice-created).', + fhirtype: 'reference', + xpath: 'PaymentNotice.provider', + description: 'The reference to the provider', }, - response: { + // http://hl7.org/fhir/SearchParameter/PaymentNotice-request + request: { type: GraphQLString, - description: - 'The ClaimResponse (See http://hl7.org/fhir/SearchParameter/PaymentNotice-response).', + fhirtype: 'reference', + xpath: 'PaymentNotice.request', + description: 'The Claim', }, - organization: { + // http://hl7.org/fhir/SearchParameter/PaymentNotice-response + response: { type: GraphQLString, - description: - 'The organization who generated this resource (See http://hl7.org/fhir/SearchParameter/PaymentNotice-organization).', - }, - payment_status: { - type: TokenScalar, - description: - 'The type of payment notice (See http://hl7.org/fhir/SearchParameter/PaymentNotice-payment-status).', + fhirtype: 'reference', + xpath: 'PaymentNotice.response', + description: 'The ClaimResponse', }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-statusdate statusdate: { type: DateScalar, - description: - 'The date of the payment action (See http://hl7.org/fhir/SearchParameter/PaymentNotice-statusdate).', + fhirtype: 'date', + xpath: 'PaymentNotice.statusDate', + description: 'The date of the payment action', }, }; diff --git a/src/resources/3_0_1/parameters/paymentreconciliation.parameters.js b/src/resources/3_0_1/parameters/paymentreconciliation.parameters.js index 6b70e645..e7dd701b 100644 --- a/src/resources/3_0_1/parameters/paymentreconciliation.parameters.js +++ b/src/resources/3_0_1/parameters/paymentreconciliation.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the paymentreconciliation query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'The business identifier of the Explanation of Benefit (See http://hl7.org/fhir/SearchParameter/PaymentReconciliation-identifier).', - }, - request: { - type: GraphQLString, - description: - 'The reference to the claim (See http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request).', + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PaymentReconciliation.created', + description: 'The creation date', }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-disposition disposition: { type: GraphQLString, - description: - 'The contents of the disposition message (See http://hl7.org/fhir/SearchParameter/PaymentReconciliation-disposition).', + fhirtype: 'string', + xpath: 'PaymentReconciliation.disposition', + description: 'The contents of the disposition message', }, - created: { - type: DateScalar, - description: - 'The creation date (See http://hl7.org/fhir/SearchParameter/PaymentReconciliation-created).', + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentReconciliation.identifier', + description: 'The business identifier of the Explanation of Benefit', }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-organization organization: { type: GraphQLString, - description: - 'The organization who generated this resource (See http://hl7.org/fhir/SearchParameter/PaymentReconciliation-organization).', + fhirtype: 'reference', + xpath: 'PaymentReconciliation.organization', + description: 'The organization who generated this resource', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-outcome + outcome: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentReconciliation.outcome', + description: 'The processing outcome', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PaymentReconciliation.request', + description: 'The reference to the claim', }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request-organization request_organization: { type: GraphQLString, - description: - 'The organization who generated this resource (See http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request-organization).', + fhirtype: 'reference', + xpath: 'PaymentReconciliation.requestOrganization', + description: 'The organization who generated this resource', }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request-provider request_provider: { type: GraphQLString, - description: - 'The reference to the provider who sumbitted the claim (See http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request-provider).', - }, - outcome: { - type: TokenScalar, - description: - 'The processing outcome (See http://hl7.org/fhir/SearchParameter/PaymentReconciliation-outcome).', + fhirtype: 'reference', + xpath: 'PaymentReconciliation.requestProvider', + description: 'The reference to the provider who sumbitted the claim', }, }; diff --git a/src/resources/3_0_1/parameters/person.parameters.js b/src/resources/3_0_1/parameters/person.parameters.js index 2bfd8dd1..b7c5ecd1 100644 --- a/src/resources/3_0_1/parameters/person.parameters.js +++ b/src/resources/3_0_1/parameters/person.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,99 +8,152 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the person query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'A person Identifier (See http://hl7.org/fhir/SearchParameter/Person-identifier).', - }, + // http://hl7.org/fhir/SearchParameter/individual-address address: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address', description: - 'A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text (See http://hl7.org/fhir/SearchParameter/individual-address).', - }, - birthdate: { - type: DateScalar, - description: - "The person's date of birth (See http://hl7.org/fhir/SearchParameter/individual-birthdate).", + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text ', }, - address_state: { + // http://hl7.org/fhir/SearchParameter/individual-address-city + address_city: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.city', description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-state).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A city specified in an address * [Practitioner](practitioner.html): A city specified in an address * [Person](person.html): A city specified in an address * [Patient](patient.html): A city specified in an address ', }, - gender: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/individual-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.country', description: - 'The gender of the person (See http://hl7.org/fhir/SearchParameter/individual-gender).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A country specified in an address * [Practitioner](practitioner.html): A country specified in an address * [Person](person.html): A country specified in an address * [Patient](patient.html): A country specified in an address ', }, - practitioner: { + // http://hl7.org/fhir/SearchParameter/individual-address-postalcode + address_postalcode: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.postalCode', description: - 'The Person links to this Practitioner (See http://hl7.org/fhir/SearchParameter/Person-practitioner).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A postal code specified in an address * [Practitioner](practitioner.html): A postalCode specified in an address * [Person](person.html): A postal code specified in an address * [Patient](patient.html): A postalCode specified in an address ', }, - link: { + // http://hl7.org/fhir/SearchParameter/individual-address-state + address_state: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.state', description: - 'Any link has this Patient, Person, RelatedPerson or Practitioner reference (See http://hl7.org/fhir/SearchParameter/Person-link).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A state specified in an address * [Practitioner](practitioner.html): A state specified in an address * [Person](person.html): A state specified in an address * [Patient](patient.html): A state specified in an address ', }, - relatedperson: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.address.use', description: - 'The Person links to this RelatedPerson (See http://hl7.org/fhir/SearchParameter/Person-relatedperson).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A use code specified in an address * [Practitioner](practitioner.html): A use code specified in an address * [Person](person.html): A use code specified in an address * [Patient](patient.html): A use code specified in an address ', }, - address_postalcode: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-birthdate + birthdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'RelatedPerson.birthDate', description: - 'A postal code specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-postalcode).', + "Multiple Resources: * [RelatedPerson](relatedperson.html): The Related Person's date of birth * [Person](person.html): The person's date of birth * [Patient](patient.html): The patient's date of birth ", }, - address_country: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "RelatedPerson.telecom[system/@value='email']", description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-country).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [Person](person.html): A value in an email contact * [Patient](patient.html): A value in an email contact ', }, - phonetic: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.gender', description: - 'A portion of name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/individual-phonetic).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): Gender of the related person * [Practitioner](practitioner.html): Gender of the practitioner * [Person](person.html): The gender of the person * [Patient](patient.html): Gender of the patient ', }, + // http://hl7.org/fhir/SearchParameter/individual-phone phone: { type: TokenScalar, + fhirtype: 'token', + xpath: "RelatedPerson.telecom[system/@value='phone']", description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/individual-phone).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Patient](patient.html): A value in a phone contact ', }, - patient: { + // http://hl7.org/fhir/SearchParameter/individual-phonetic + phonetic: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.name', description: - 'The Person links to this Patient (See http://hl7.org/fhir/SearchParameter/Person-patient).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm * [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm * [Person](person.html): A portion of name using some kind of phonetic matching algorithm * [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm ', }, - organization: { + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.telecom', + description: + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [Person](person.html): The value in any kind of contact * [Patient](patient.html): The value in any kind of telecom details of the patient ', + }, + // http://hl7.org/fhir/SearchParameter/Person-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.identifier', + description: 'A person Identifier', + }, + // http://hl7.org/fhir/SearchParameter/Person-link + link: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', description: - 'The organization at which this person record is being managed (See http://hl7.org/fhir/SearchParameter/Person-organization).', + 'Any link has this Patient, Person, RelatedPerson or Practitioner reference', }, + // http://hl7.org/fhir/SearchParameter/Person-name name: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.name', description: - 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text (See http://hl7.org/fhir/SearchParameter/Person-name).', + 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text', }, - address_use: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/Person-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.managingOrganization', description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-use).', + 'The organization at which this person record is being managed', }, - telecom: { - type: TokenScalar, - description: - 'The value in any kind of contact (See http://hl7.org/fhir/SearchParameter/individual-telecom).', + // http://hl7.org/fhir/SearchParameter/Person-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this Patient', }, - address_city: { + // http://hl7.org/fhir/SearchParameter/Person-practitioner + practitioner: { type: GraphQLString, - description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-city).', + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this Practitioner', }, - email: { - type: TokenScalar, - description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/individual-email).', + // http://hl7.org/fhir/SearchParameter/Person-relatedperson + relatedperson: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this RelatedPerson', }, }; diff --git a/src/resources/3_0_1/parameters/plandefinition.parameters.js b/src/resources/3_0_1/parameters/plandefinition.parameters.js index 28eedc28..4bff966f 100644 --- a/src/resources/3_0_1/parameters/plandefinition.parameters.js +++ b/src/resources/3_0_1/parameters/plandefinition.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,89 +9,125 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the plandefinition query */ module.exports = { - date: { - type: DateScalar, - description: - 'The plan definition publication date (See http://hl7.org/fhir/SearchParameter/PlanDefinition-date).', - }, - identifier: { - type: TokenScalar, - description: - 'External identifier for the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-identifier).', - }, - successor: { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-composed-of + composed_of: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/PlanDefinition-successor).', + fhirtype: 'reference', + xpath: "PlanDefinition.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-jurisdiction).', + // http://hl7.org/fhir/SearchParameter/PlanDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PlanDefinition.date', + description: 'The plan definition publication date', }, - description: { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-depends-on + depends_on: { type: GraphQLString, - description: - 'The description of the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-description).', + fhirtype: 'reference', + xpath: "PlanDefinition.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-derived-from derived_from: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/PlanDefinition-derived-from).', + fhirtype: 'reference', + xpath: + "PlanDefinition.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', }, - predecessor: { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-description + description: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/PlanDefinition-predecessor).', + fhirtype: 'string', + xpath: 'PlanDefinition.description', + description: 'The description of the plan definition', }, - title: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PlanDefinition.effectivePeriod', description: - 'The human-friendly name of the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-title).', + 'The time during which the plan definition is intended to be in use', }, - composed_of: { - type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/PlanDefinition-composed-of).', + // http://hl7.org/fhir/SearchParameter/PlanDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.identifier', + description: 'External identifier for the plan definition', }, - version: { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'The business version of the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-version).', + fhirtype: 'token', + xpath: 'PlanDefinition.jurisdiction', + description: 'Intended jurisdiction for the plan definition', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-url).', + // http://hl7.org/fhir/SearchParameter/PlanDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'PlanDefinition.name', + description: 'Computationally friendly name of the plan definition', }, - effective: { - type: DateScalar, - description: - 'The time during which the plan definition is intended to be in use (See http://hl7.org/fhir/SearchParameter/PlanDefinition-effective).', + // http://hl7.org/fhir/SearchParameter/PlanDefinition-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "PlanDefinition.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', }, - depends_on: { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-publisher + publisher: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/PlanDefinition-depends-on).', + fhirtype: 'string', + xpath: 'PlanDefinition.publisher', + description: 'Name of the publisher of the plan definition', }, - name: { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.status', + description: 'The current status of the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-successor + successor: { type: GraphQLString, - description: - 'Computationally friendly name of the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-name).', + fhirtype: 'reference', + xpath: "PlanDefinition.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-title + title: { type: GraphQLString, - description: - 'Name of the publisher of the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-publisher).', + fhirtype: 'string', + xpath: 'PlanDefinition.title', + description: 'The human-friendly name of the plan definition', }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-topic topic: { type: TokenScalar, - description: - 'Topics associated with the module (See http://hl7.org/fhir/SearchParameter/PlanDefinition-topic).', + fhirtype: 'token', + xpath: 'PlanDefinition.topic', + description: 'Topics associated with the module', }, - status: { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'PlanDefinition.url', + description: 'The uri that identifies the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-version + version: { type: TokenScalar, - description: - 'The current status of the plan definition (See http://hl7.org/fhir/SearchParameter/PlanDefinition-status).', + fhirtype: 'token', + xpath: 'PlanDefinition.version', + description: 'The business version of the plan definition', }, }; diff --git a/src/resources/3_0_1/parameters/practitioner.parameters.js b/src/resources/3_0_1/parameters/practitioner.parameters.js index 500c13b1..c2f50928 100644 --- a/src/resources/3_0_1/parameters/practitioner.parameters.js +++ b/src/resources/3_0_1/parameters/practitioner.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,89 +7,138 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the practitioner query */ module.exports = { - identifier: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/individual-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address', description: - "A practitioner's Identifier (See http://hl7.org/fhir/SearchParameter/Practitioner-identifier).", + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text ', }, - given: { + // http://hl7.org/fhir/SearchParameter/individual-address-city + address_city: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address.city', description: - 'A portion of the given name (See http://hl7.org/fhir/SearchParameter/individual-given).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A city specified in an address * [Practitioner](practitioner.html): A city specified in an address * [Person](person.html): A city specified in an address * [Patient](patient.html): A city specified in an address ', }, - address: { + // http://hl7.org/fhir/SearchParameter/individual-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address.country', + description: + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A country specified in an address * [Practitioner](practitioner.html): A country specified in an address * [Person](person.html): A country specified in an address * [Patient](patient.html): A country specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-postalcode + address_postalcode: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address.postalCode', description: - 'A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text (See http://hl7.org/fhir/SearchParameter/individual-address).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A postal code specified in an address * [Practitioner](practitioner.html): A postalCode specified in an address * [Person](person.html): A postal code specified in an address * [Patient](patient.html): A postalCode specified in an address ', }, + // http://hl7.org/fhir/SearchParameter/individual-address-state address_state: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address.state', description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-state).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A state specified in an address * [Practitioner](practitioner.html): A state specified in an address * [Person](person.html): A state specified in an address * [Patient](patient.html): A state specified in an address ', }, - gender: { + // http://hl7.org/fhir/SearchParameter/individual-address-use + address_use: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.address.use', description: - 'Gender of the practitioner (See http://hl7.org/fhir/SearchParameter/individual-gender).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A use code specified in an address * [Practitioner](practitioner.html): A use code specified in an address * [Person](person.html): A use code specified in an address * [Patient](patient.html): A use code specified in an address ', }, - active: { + // http://hl7.org/fhir/SearchParameter/individual-email + email: { type: TokenScalar, + fhirtype: 'token', + xpath: "PractitionerRole.telecom[system/@value='email']", description: - 'Whether the practitioner record is active (See http://hl7.org/fhir/SearchParameter/Practitioner-active).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [Person](person.html): A value in an email contact * [Patient](patient.html): A value in an email contact ', }, - address_postalcode: { + // http://hl7.org/fhir/SearchParameter/individual-family + family: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name.family', description: - 'A postalCode specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-postalcode).', + 'Multiple Resources: * [Practitioner](practitioner.html): A portion of the family name * [Patient](patient.html): A portion of the family name of the patient ', }, - address_country: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.gender', description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-country).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): Gender of the related person * [Practitioner](practitioner.html): Gender of the practitioner * [Person](person.html): The gender of the person * [Patient](patient.html): Gender of the patient ', }, - phonetic: { + // http://hl7.org/fhir/SearchParameter/individual-given + given: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name.given', description: - 'A portion of either family or given name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/individual-phonetic).', + 'Multiple Resources: * [Practitioner](practitioner.html): A portion of the given name * [Patient](patient.html): A portion of the given name of the patient ', }, + // http://hl7.org/fhir/SearchParameter/individual-phone phone: { type: TokenScalar, + fhirtype: 'token', + xpath: "PractitionerRole.telecom[system/@value='phone']", description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/individual-phone).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Patient](patient.html): A value in a phone contact ', }, - name: { + // http://hl7.org/fhir/SearchParameter/individual-phonetic + phonetic: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name', description: - 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text (See http://hl7.org/fhir/SearchParameter/Practitioner-name).', - }, - address_use: { - type: TokenScalar, - description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-use).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm * [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm * [Person](person.html): A portion of name using some kind of phonetic matching algorithm * [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm ', }, + // http://hl7.org/fhir/SearchParameter/individual-telecom telecom: { type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.telecom', description: - 'The value in any kind of contact (See http://hl7.org/fhir/SearchParameter/individual-telecom).', - }, - family: { - type: GraphQLString, - description: - 'A portion of the family name (See http://hl7.org/fhir/SearchParameter/individual-family).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [Person](person.html): The value in any kind of contact * [Patient](patient.html): The value in any kind of telecom details of the patient ', }, - address_city: { - type: GraphQLString, - description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-city).', + // http://hl7.org/fhir/SearchParameter/Practitioner-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.active', + description: 'Whether the practitioner record is active', }, + // http://hl7.org/fhir/SearchParameter/Practitioner-communication communication: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.communication', description: - 'One of the languages that the practitioner can communicate with (See http://hl7.org/fhir/SearchParameter/Practitioner-communication).', + 'One of the languages that the practitioner can communicate with', }, - email: { + // http://hl7.org/fhir/SearchParameter/Practitioner-identifier + identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.identifier', + description: "A practitioner's Identifier", + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name', description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/individual-email).', + 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text', }, }; diff --git a/src/resources/3_0_1/parameters/practitionerrole.parameters.js b/src/resources/3_0_1/parameters/practitionerrole.parameters.js index fde7c9e3..b3d523f5 100644 --- a/src/resources/3_0_1/parameters/practitionerrole.parameters.js +++ b/src/resources/3_0_1/parameters/practitionerrole.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,69 +8,105 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the practitionerrole query */ module.exports = { - date: { - type: DateScalar, - description: - 'The period during which the practitioner is authorized to perform in these role(s) (See http://hl7.org/fhir/SearchParameter/PractitionerRole-date).', - }, - identifier: { + // http://hl7.org/fhir/SearchParameter/individual-email + email: { type: TokenScalar, + fhirtype: 'token', + xpath: "PractitionerRole.telecom[system/@value='email']", description: - "A practitioner's Identifier (See http://hl7.org/fhir/SearchParameter/PractitionerRole-identifier).", + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [Person](person.html): A value in an email contact * [Patient](patient.html): A value in an email contact ', }, - specialty: { + // http://hl7.org/fhir/SearchParameter/individual-phone + phone: { type: TokenScalar, + fhirtype: 'token', + xpath: "PractitionerRole.telecom[system/@value='phone']", description: - 'The practitioner has this specialty at an organization (See http://hl7.org/fhir/SearchParameter/PractitionerRole-specialty).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Patient](patient.html): A value in a phone contact ', }, - role: { + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.telecom', description: - 'The practitioner can perform this role at for the organization (See http://hl7.org/fhir/SearchParameter/PractitionerRole-role).', - }, - practitioner: { - type: GraphQLString, - description: - 'Practitioner that is able to provide the defined services for the organation (See http://hl7.org/fhir/SearchParameter/PractitionerRole-practitioner).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [Person](person.html): The value in any kind of contact * [Patient](patient.html): The value in any kind of telecom details of the patient ', }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-active active: { type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.active', + description: "Whether this practitioner's record is in active use", + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PractitionerRole.period', description: - "Whether this practitioner's record is in active use (See http://hl7.org/fhir/SearchParameter/PractitionerRole-active).", + 'The period during which the practitioner is authorized to perform in these role(s)', }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-endpoint endpoint: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.endpoint', description: - 'Technical endpoints providing access to services operated for the practitioner with this role (See http://hl7.org/fhir/SearchParameter/PractitionerRole-endpoint).', + 'Technical endpoints providing access to services operated for the practitioner with this role', }, - phone: { + // http://hl7.org/fhir/SearchParameter/PractitionerRole-identifier + identifier: { type: TokenScalar, - description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/individual-phone).', + fhirtype: 'token', + xpath: 'PractitionerRole.identifier', + description: "A practitioner's Identifier", }, - service: { + // http://hl7.org/fhir/SearchParameter/PractitionerRole-location + location: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.location', description: - "The list of healthcare services that this worker provides for this role's Organization/Location(s) (See http://hl7.org/fhir/SearchParameter/PractitionerRole-service).", + 'One of the locations at which this practitioner provides care', }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-organization organization: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.organization', description: - 'The identity of the organization the practitioner represents / acts on behalf of (See http://hl7.org/fhir/SearchParameter/PractitionerRole-organization).', + 'The identity of the organization the practitioner represents / acts on behalf of', }, - telecom: { + // http://hl7.org/fhir/SearchParameter/PractitionerRole-practitioner + practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.practitioner', + description: + 'Practitioner that is able to provide the defined services for the organation', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-role + role: { type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.code', description: - 'The value in any kind of contact (See http://hl7.org/fhir/SearchParameter/individual-telecom).', + 'The practitioner can perform this role at for the organization', }, - location: { + // http://hl7.org/fhir/SearchParameter/PractitionerRole-service + service: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.healthcareService', description: - 'One of the locations at which this practitioner provides care (See http://hl7.org/fhir/SearchParameter/PractitionerRole-location).', + "The list of healthcare services that this worker provides for this role's Organization/Location(s)", }, - email: { + // http://hl7.org/fhir/SearchParameter/PractitionerRole-specialty + specialty: { type: TokenScalar, - description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/individual-email).', + fhirtype: 'token', + xpath: 'PractitionerRole.specialty', + description: 'The practitioner has this specialty at an organization', }, }; diff --git a/src/resources/3_0_1/parameters/procedure.parameters.js b/src/resources/3_0_1/parameters/procedure.parameters.js index a67d8f36..5e5fdb56 100644 --- a/src/resources/3_0_1/parameters/procedure.parameters.js +++ b/src/resources/3_0_1/parameters/procedure.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,74 +8,108 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the procedure query */ module.exports = { - date: { - type: DateScalar, - description: - 'Date/Period the procedure was performed (See http://hl7.org/fhir/SearchParameter/clinical-date).', - }, - identifier: { - type: TokenScalar, - description: - 'A unique identifier for a procedure (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', - }, + // http://hl7.org/fhir/SearchParameter/clinical-code code: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.code', description: - 'A code to identify a procedure (See http://hl7.org/fhir/SearchParameter/clinical-code).', + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', }, - performer: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Procedure.performedDateTime', description: - 'The reference to the practitioner (See http://hl7.org/fhir/SearchParameter/Procedure-performer).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, - subject: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.identifier', description: - 'Search by subject (See http://hl7.org/fhir/SearchParameter/Procedure-subject).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - part_of: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.subject', description: - 'Part of referenced event (See http://hl7.org/fhir/SearchParameter/Procedure-part-of).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.context', description: - 'Search by encounter (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, + // http://hl7.org/fhir/SearchParameter/Procedure-based-on based_on: { type: GraphQLString, - description: - 'A request for this procedure (See http://hl7.org/fhir/SearchParameter/Procedure-based-on).', + fhirtype: 'reference', + xpath: 'Procedure.basedOn', + description: 'A request for this procedure', }, - patient: { - type: GraphQLString, - description: - 'Search by subject - a patient (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + // http://hl7.org/fhir/SearchParameter/Procedure-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.category', + description: 'Classification of the procedure', }, + // http://hl7.org/fhir/SearchParameter/Procedure-context context: { type: GraphQLString, - description: - 'Encounter or episode associated with the procedure (See http://hl7.org/fhir/SearchParameter/Procedure-context).', + fhirtype: 'reference', + xpath: 'Procedure.context', + description: 'Encounter or episode associated with the procedure', }, + // http://hl7.org/fhir/SearchParameter/Procedure-definition + definition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.definition', + description: 'Instantiates protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-location location: { type: GraphQLString, - description: - 'Where the procedure happened (See http://hl7.org/fhir/SearchParameter/Procedure-location).', + fhirtype: 'reference', + xpath: 'Procedure.location', + description: 'Where the procedure happened', }, - definition: { + // http://hl7.org/fhir/SearchParameter/Procedure-part-of + part_of: { type: GraphQLString, - description: - 'Instantiates protocol or definition (See http://hl7.org/fhir/SearchParameter/Procedure-definition).', + fhirtype: 'reference', + xpath: 'Procedure.partOf', + description: 'Part of referenced event', }, - category: { - type: TokenScalar, - description: - 'Classification of the procedure (See http://hl7.org/fhir/SearchParameter/Procedure-category).', + // http://hl7.org/fhir/SearchParameter/Procedure-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.performer.actor', + description: 'The reference to the practitioner', }, + // http://hl7.org/fhir/SearchParameter/Procedure-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.status', description: - 'preparation | in-progress | suspended | aborted | completed | entered-in-error | unknown (See http://hl7.org/fhir/SearchParameter/Procedure-status).', + 'preparation | in-progress | suspended | aborted | completed | entered-in-error | unknown', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.subject', + description: 'Search by subject', }, }; diff --git a/src/resources/3_0_1/parameters/procedurerequest.parameters.js b/src/resources/3_0_1/parameters/procedurerequest.parameters.js index 39c55098..dcd4d06e 100644 --- a/src/resources/3_0_1/parameters/procedurerequest.parameters.js +++ b/src/resources/3_0_1/parameters/procedurerequest.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,104 +8,149 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the procedurerequest query */ module.exports = { - authored: { - type: DateScalar, - description: - 'Date request signed (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-authored).', - }, - requester: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcedureRequest.code', description: - 'Individual making the request (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-requester).', + 'Multiple Resources: * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Procedure](procedure.html): A code to identify a procedure * [List](list.html): What the purpose of this list is * [ProcedureRequest](procedurerequest.html): What is being requested/ordered * [Observation](observation.html): The code of the observation type * [DiagnosticReport](diagnosticreport.html): The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [Condition](condition.html): Code for the condition ', }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcedureRequest.identifier', description: - 'Identifiers assigned to this order (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - code: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ProcedureRequest.subject', description: - 'What is being requested/ordered (See http://hl7.org/fhir/SearchParameter/clinical-code).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - performer: { + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'ProcedureRequest.context', description: - 'Requested perfomer (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-performer).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, - requisition: { - type: TokenScalar, - description: - 'Composite Request ID (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-requisition).', + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-authored + authored: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ProcedureRequest.authoredOn', + description: 'Date request signed', }, - replaces: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-based-on + based_on: { type: GraphQLString, - description: - 'What request replaces (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-replaces).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.basedOn', + description: 'What request fulfills', }, - subject: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-body-site + body_site: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcedureRequest.bodySite', + description: 'Where procedure is going to be done', + }, + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-context + context: { type: GraphQLString, - description: - 'Search by subject (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-subject).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.context', + description: 'Encounter or Episode during which request was created', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-definition + definition: { type: GraphQLString, - description: - 'An encounter in which this request is made (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.definition', + description: 'Protocol or definition', }, + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-intent + intent: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcedureRequest.intent', + description: 'proposal | plan | order +', + }, + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-occurrence occurrence: { type: DateScalar, - description: - 'When procedure should occur (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-occurrence).', + fhirtype: 'date', + xpath: 'ProcedureRequest.occurrenceDateTime', + description: 'When procedure should occur', }, - priority: { - type: TokenScalar, - description: - 'routine | urgent | asap | stat (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-priority).', - }, - intent: { - type: TokenScalar, - description: - 'proposal | plan | order + (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-intent).', + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ProcedureRequest.performer', + description: 'Requested perfomer', }, + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-performer-type performer_type: { type: TokenScalar, - description: - 'Performer role (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-performer-type).', + fhirtype: 'token', + xpath: 'ProcedureRequest.performerType', + description: 'Performer role', }, - based_on: { - type: GraphQLString, - description: - 'What request fulfills (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-based-on).', + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcedureRequest.priority', + description: 'routine | urgent | asap | stat', }, - patient: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-replaces + replaces: { type: GraphQLString, - description: - 'Search by subject - a patient (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.replaces', + description: 'What request replaces', }, - specimen: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-requester + requester: { type: GraphQLString, - description: - 'Specimen to be tested (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-specimen).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.requester.agent', + description: 'Individual making the request', }, - context: { - type: GraphQLString, - description: - 'Encounter or Episode during which request was created (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-context).', + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-requisition + requisition: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcedureRequest.requisition', + description: 'Composite Request ID', }, - definition: { + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-specimen + specimen: { type: GraphQLString, - description: - 'Protocol or definition (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-definition).', - }, - body_site: { - type: TokenScalar, - description: - 'Where procedure is going to be done (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-body-site).', + fhirtype: 'reference', + xpath: 'ProcedureRequest.specimen', + description: 'Specimen to be tested', }, + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcedureRequest.status', description: - 'draft | active | suspended | completed | entered-in-error | cancelled (See http://hl7.org/fhir/SearchParameter/ProcedureRequest-status).', + 'draft | active | suspended | completed | entered-in-error | cancelled', + }, + // http://hl7.org/fhir/SearchParameter/ProcedureRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ProcedureRequest.subject', + description: 'Search by subject', }, }; diff --git a/src/resources/3_0_1/parameters/processrequest.parameters.js b/src/resources/3_0_1/parameters/processrequest.parameters.js index 5581acbf..b66e8c77 100644 --- a/src/resources/3_0_1/parameters/processrequest.parameters.js +++ b/src/resources/3_0_1/parameters/processrequest.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,24 +7,32 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the processrequest query */ module.exports = { - identifier: { + // http://hl7.org/fhir/SearchParameter/ProcessRequest-action + action: { type: TokenScalar, - description: - 'The business identifier of the ProcessRequest (See http://hl7.org/fhir/SearchParameter/ProcessRequest-identifier).', + fhirtype: 'token', + xpath: 'ProcessRequest.action', + description: 'The action requested by this resource', }, - provider: { - type: GraphQLString, - description: - 'The provider who regenerated this request (See http://hl7.org/fhir/SearchParameter/ProcessRequest-provider).', + // http://hl7.org/fhir/SearchParameter/ProcessRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ProcessRequest.identifier', + description: 'The business identifier of the ProcessRequest', }, + // http://hl7.org/fhir/SearchParameter/ProcessRequest-organization organization: { type: GraphQLString, - description: - 'The organization who generated this request (See http://hl7.org/fhir/SearchParameter/ProcessRequest-organization).', + fhirtype: 'reference', + xpath: 'ProcessRequest.organization', + description: 'The organization who generated this request', }, - action: { - type: TokenScalar, - description: - 'The action requested by this resource (See http://hl7.org/fhir/SearchParameter/ProcessRequest-action).', + // http://hl7.org/fhir/SearchParameter/ProcessRequest-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ProcessRequest.provider', + description: 'The provider who regenerated this request', }, }; diff --git a/src/resources/3_0_1/parameters/processresponse.parameters.js b/src/resources/3_0_1/parameters/processresponse.parameters.js index 6ccdafe5..9509337c 100644 --- a/src/resources/3_0_1/parameters/processresponse.parameters.js +++ b/src/resources/3_0_1/parameters/processresponse.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,29 +7,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the processresponse query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ProcessResponse-identifier identifier: { type: TokenScalar, - description: - 'The business identifier of the Explanation of Benefit (See http://hl7.org/fhir/SearchParameter/ProcessResponse-identifier).', + fhirtype: 'token', + xpath: 'ProcessResponse.identifier', + description: 'The business identifier of the Explanation of Benefit', }, - request: { + // http://hl7.org/fhir/SearchParameter/ProcessResponse-organization + organization: { type: GraphQLString, - description: - 'The reference to the claim (See http://hl7.org/fhir/SearchParameter/ProcessResponse-request).', + fhirtype: 'reference', + xpath: 'ProcessResponse.organization', + description: 'The organization who generated this resource', }, - organization: { + // http://hl7.org/fhir/SearchParameter/ProcessResponse-request + request: { type: GraphQLString, - description: - 'The organization who generated this resource (See http://hl7.org/fhir/SearchParameter/ProcessResponse-organization).', + fhirtype: 'reference', + xpath: 'ProcessResponse.request', + description: 'The reference to the claim', }, + // http://hl7.org/fhir/SearchParameter/ProcessResponse-request-organization request_organization: { type: GraphQLString, - description: - 'The Organization who is responsible the request transaction (See http://hl7.org/fhir/SearchParameter/ProcessResponse-request-organization).', + fhirtype: 'reference', + xpath: 'ProcessResponse.requestOrganization', + description: 'The Organization who is responsible the request transaction', }, + // http://hl7.org/fhir/SearchParameter/ProcessResponse-request-provider request_provider: { type: GraphQLString, - description: - 'The Provider who is responsible the request transaction (See http://hl7.org/fhir/SearchParameter/ProcessResponse-request-provider).', + fhirtype: 'reference', + xpath: 'ProcessResponse.requestProvider', + description: 'The Provider who is responsible the request transaction', }, }; diff --git a/src/resources/3_0_1/parameters/provenance.parameters.js b/src/resources/3_0_1/parameters/provenance.parameters.js index 90197b66..ed72b7a5 100644 --- a/src/resources/3_0_1/parameters/provenance.parameters.js +++ b/src/resources/3_0_1/parameters/provenance.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,59 +8,81 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the provenance query */ module.exports = { - entity_ref: { - type: GraphQLString, - description: - 'Identity of entity (See http://hl7.org/fhir/SearchParameter/Provenance-entity-ref).', - }, + // http://hl7.org/fhir/SearchParameter/Provenance-agent agent: { type: GraphQLString, - description: - 'Who participated (See http://hl7.org/fhir/SearchParameter/Provenance-agent).', + fhirtype: 'reference', + xpath: 'Provenance.agent.whoUri', + description: 'Who participated', }, - signature_type: { + // http://hl7.org/fhir/SearchParameter/Provenance-agent-role + agent_role: { type: TokenScalar, - description: - 'Indication of the reason the entity signed the object(s) (See http://hl7.org/fhir/SearchParameter/Provenance-signature-type).', - }, - patient: { - type: GraphQLString, - description: - 'Target Reference(s) (usually version specific) (See http://hl7.org/fhir/SearchParameter/Provenance-patient).', - }, - start: { - type: DateScalar, - description: - 'Starting time with inclusive boundary (See http://hl7.org/fhir/SearchParameter/Provenance-start).', + fhirtype: 'token', + xpath: 'Provenance.agent.role', + description: 'What the agents role was', }, + // http://hl7.org/fhir/SearchParameter/Provenance-end end: { type: DateScalar, - description: - 'End time with inclusive boundary, if not ongoing (See http://hl7.org/fhir/SearchParameter/Provenance-end).', + fhirtype: 'date', + xpath: 'Provenance.period.end', + description: 'End time with inclusive boundary, if not ongoing', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-entity-id + entity_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Provenance.entity.whatIdentifier', + description: 'Identity of entity', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-entity-ref + entity_ref: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Provenance.entity.whatReference', + description: 'Identity of entity', }, + // http://hl7.org/fhir/SearchParameter/Provenance-location location: { type: GraphQLString, - description: - 'Where the activity occurred, if relevant (See http://hl7.org/fhir/SearchParameter/Provenance-location).', + fhirtype: 'reference', + xpath: 'Provenance.location', + description: 'Where the activity occurred, if relevant', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Provenance.target', + description: 'Target Reference(s) (usually version specific)', }, + // http://hl7.org/fhir/SearchParameter/Provenance-recorded recorded: { type: DateScalar, - description: - 'When the activity was recorded / updated (See http://hl7.org/fhir/SearchParameter/Provenance-recorded).', + fhirtype: 'date', + xpath: 'Provenance.recorded', + description: 'When the activity was recorded / updated', }, - agent_role: { + // http://hl7.org/fhir/SearchParameter/Provenance-signature-type + signature_type: { type: TokenScalar, - description: - 'What the agents role was (See http://hl7.org/fhir/SearchParameter/Provenance-agent-role).', + fhirtype: 'token', + xpath: 'Provenance.signature.type', + description: 'Indication of the reason the entity signed the object(s)', }, - entity_id: { - type: TokenScalar, - description: - 'Identity of entity (See http://hl7.org/fhir/SearchParameter/Provenance-entity-id).', + // http://hl7.org/fhir/SearchParameter/Provenance-start + start: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Provenance.period.start', + description: 'Starting time with inclusive boundary', }, + // http://hl7.org/fhir/SearchParameter/Provenance-target target: { type: GraphQLString, - description: - 'Target Reference(s) (usually version specific) (See http://hl7.org/fhir/SearchParameter/Provenance-target).', + fhirtype: 'reference', + xpath: 'Provenance.target', + description: 'Target Reference(s) (usually version specific)', }, }; diff --git a/src/resources/3_0_1/parameters/questionnaire.parameters.js b/src/resources/3_0_1/parameters/questionnaire.parameters.js index c16ae758..d7147a16 100644 --- a/src/resources/3_0_1/parameters/questionnaire.parameters.js +++ b/src/resources/3_0_1/parameters/questionnaire.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,64 +9,90 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the questionnaire query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Questionnaire-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.item.code', + description: + 'A code that corresponds to one of its items in the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-date date: { type: DateScalar, - description: - 'The questionnaire publication date (See http://hl7.org/fhir/SearchParameter/Questionnaire-date).', + fhirtype: 'date', + xpath: 'Questionnaire.date', + description: 'The questionnaire publication date', }, - identifier: { - type: TokenScalar, - description: - 'External identifier for the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-identifier).', + // http://hl7.org/fhir/SearchParameter/Questionnaire-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Questionnaire.description', + description: 'The description of the questionnaire', }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-effective effective: { type: DateScalar, + fhirtype: 'date', + xpath: 'Questionnaire.effectivePeriod', description: - 'The time during which the questionnaire is intended to be in use (See http://hl7.org/fhir/SearchParameter/Questionnaire-effective).', + 'The time during which the questionnaire is intended to be in use', }, - code: { + // http://hl7.org/fhir/SearchParameter/Questionnaire-identifier + identifier: { type: TokenScalar, - description: - 'A code that corresponds to one of its items in the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-code).', + fhirtype: 'token', + xpath: 'Questionnaire.identifier', + description: 'External identifier for the questionnaire', }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-jurisdiction).', + fhirtype: 'token', + xpath: 'Questionnaire.jurisdiction', + description: 'Intended jurisdiction for the questionnaire', }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-name).', - }, - description: { - type: GraphQLString, - description: - 'The description of the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-description).', + fhirtype: 'string', + xpath: 'Questionnaire.name', + description: 'Computationally friendly name of the questionnaire', }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-publisher).', + fhirtype: 'string', + xpath: 'Questionnaire.publisher', + description: 'Name of the publisher of the questionnaire', }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.status', + description: 'The current status of the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-title title: { type: GraphQLString, - description: - 'The human-friendly name of the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-title).', - }, - version: { - type: TokenScalar, - description: - 'The business version of the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-version).', + fhirtype: 'string', + xpath: 'Questionnaire.title', + description: 'The human-friendly name of the questionnaire', }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-url url: { type: UriScalar, - description: - 'The uri that identifies the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-url).', + fhirtype: 'uri', + xpath: 'Questionnaire.url', + description: 'The uri that identifies the questionnaire', }, - status: { + // http://hl7.org/fhir/SearchParameter/Questionnaire-version + version: { type: TokenScalar, - description: - 'The current status of the questionnaire (See http://hl7.org/fhir/SearchParameter/Questionnaire-status).', + fhirtype: 'token', + xpath: 'Questionnaire.version', + description: 'The business version of the questionnaire', }, }; diff --git a/src/resources/3_0_1/parameters/questionnaireresponse.parameters.js b/src/resources/3_0_1/parameters/questionnaireresponse.parameters.js index 31342d1d..a6a16608 100644 --- a/src/resources/3_0_1/parameters/questionnaireresponse.parameters.js +++ b/src/resources/3_0_1/parameters/questionnaireresponse.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,59 +8,85 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the questionnaireresponse query */ module.exports = { - authored: { - type: DateScalar, - description: - 'When the questionnaire response was last changed (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-authored).', - }, - identifier: { - type: TokenScalar, - description: - 'The unique identifier for the questionnaire response (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-identifier).', - }, - parent: { + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-author + author: { type: GraphQLString, - description: - 'Procedure or observation this questionnaire response was performed as a part of (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-parent).', + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.author', + description: 'The author of the questionnaire response', }, - questionnaire: { - type: GraphQLString, - description: - 'The questionnaire the answers are provided for (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-questionnaire).', + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-authored + authored: { + type: DateScalar, + fhirtype: 'date', + xpath: 'QuestionnaireResponse.authored', + description: 'When the questionnaire response was last changed', }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-based-on based_on: { type: GraphQLString, - description: - 'Plan/proposal/order fulfilled by this questionnaire response (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-based-on).', + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.basedOn', + description: 'Plan/proposal/order fulfilled by this questionnaire response', }, - subject: { + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-context + context: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.context', description: - 'The subject of the questionnaire response (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-subject).', + 'Encounter or episode associated with the questionnaire response', }, - author: { + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'QuestionnaireResponse.identifier', + description: 'The unique identifier for the questionnaire response', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-parent + parent: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.parent', description: - 'The author of the questionnaire response (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-author).', + 'Procedure or observation this questionnaire response was performed as a part of', }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.subject', description: - 'The patient that is the subject of the questionnaire response (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-patient).', + 'The patient that is the subject of the questionnaire response', }, - context: { + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-questionnaire + questionnaire: { type: GraphQLString, - description: - 'Encounter or episode associated with the questionnaire response (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-context).', + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.questionnaire', + description: 'The questionnaire the answers are provided for', }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-source source: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.source', description: - 'The individual providing the information reflected in the questionnaire respose (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-source).', + 'The individual providing the information reflected in the questionnaire respose', }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-status status: { type: TokenScalar, - description: - 'The status of the questionnaire response (See http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-status).', + fhirtype: 'token', + xpath: 'QuestionnaireResponse.status', + description: 'The status of the questionnaire response', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.subject', + description: 'The subject of the questionnaire response', }, }; diff --git a/src/resources/3_0_1/parameters/referralrequest.parameters.js b/src/resources/3_0_1/parameters/referralrequest.parameters.js index df3b1399..9ab65e3f 100644 --- a/src/resources/3_0_1/parameters/referralrequest.parameters.js +++ b/src/resources/3_0_1/parameters/referralrequest.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,99 +8,139 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the referralrequest query */ module.exports = { - requester: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'ReferralRequest.subject', description: - 'Individual making the request (See http://hl7.org/fhir/SearchParameter/ReferralRequest-requester).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'ReferralRequest.type', description: - 'Business identifier (See http://hl7.org/fhir/SearchParameter/ReferralRequest-identifier).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): The type of the referral * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management * [Composition](composition.html): Kind of composition (LOINC if possible) ', }, - specialty: { - type: TokenScalar, - description: - 'The specialty that the referral is for (See http://hl7.org/fhir/SearchParameter/ReferralRequest-specialty).', + // http://hl7.org/fhir/SearchParameter/ReferralRequest-authored-on + authored_on: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ReferralRequest.authoredOn', + description: 'Creation or activation date', }, - replaces: { + // http://hl7.org/fhir/SearchParameter/ReferralRequest-based-on + based_on: { type: GraphQLString, - description: - 'Request(s) replaced by this request (See http://hl7.org/fhir/SearchParameter/ReferralRequest-replaces).', + fhirtype: 'reference', + xpath: 'ReferralRequest.basedOn', + description: 'Request being fulfilled', }, - subject: { + // http://hl7.org/fhir/SearchParameter/ReferralRequest-context + context: { type: GraphQLString, - description: - 'Patient referred to care or transfer (See http://hl7.org/fhir/SearchParameter/ReferralRequest-subject).', + fhirtype: 'reference', + xpath: 'ReferralRequest.context', + description: 'Part of encounter or episode of care', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/ReferralRequest-definition + definition: { type: GraphQLString, - description: - 'Originating encounter (See http://hl7.org/fhir/SearchParameter/ReferralRequest-encounter).', + fhirtype: 'reference', + xpath: 'ReferralRequest.definition', + description: 'Instantiates protocol or definition', }, - authored_on: { - type: DateScalar, - description: - 'Creation or activation date (See http://hl7.org/fhir/SearchParameter/ReferralRequest-authored-on).', + // http://hl7.org/fhir/SearchParameter/ReferralRequest-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ReferralRequest.context', + description: 'Originating encounter', }, - type: { + // http://hl7.org/fhir/SearchParameter/ReferralRequest-group-identifier + group_identifier: { type: TokenScalar, - description: - 'The type of the referral (See http://hl7.org/fhir/SearchParameter/clinical-type).', + fhirtype: 'token', + xpath: 'ReferralRequest.groupIdentifier', + description: 'Part of common request', }, - priority: { + // http://hl7.org/fhir/SearchParameter/ReferralRequest-identifier + identifier: { type: TokenScalar, - description: - 'The priority assigned to the referral (See http://hl7.org/fhir/SearchParameter/ReferralRequest-priority).', + fhirtype: 'token', + xpath: 'ReferralRequest.identifier', + description: 'Business identifier', }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-intent intent: { type: TokenScalar, - description: - 'Proposal, plan or order (See http://hl7.org/fhir/SearchParameter/ReferralRequest-intent).', - }, - group_identifier: { - type: TokenScalar, - description: - 'Part of common request (See http://hl7.org/fhir/SearchParameter/ReferralRequest-group-identifier).', - }, - based_on: { - type: GraphQLString, - description: - 'Request being fulfilled (See http://hl7.org/fhir/SearchParameter/ReferralRequest-based-on).', - }, - patient: { - type: GraphQLString, - description: - 'Who the referral is about (See http://hl7.org/fhir/SearchParameter/clinical-patient).', - }, - service: { - type: TokenScalar, - description: - 'Actions requested as part of the referral (See http://hl7.org/fhir/SearchParameter/ReferralRequest-service).', + fhirtype: 'token', + xpath: 'ReferralRequest.intent', + description: 'Proposal, plan or order', }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-occurrence-date occurrence_date: { type: DateScalar, - description: - 'When the service(s) requested in the referral should occur (See http://hl7.org/fhir/SearchParameter/ReferralRequest-occurrence-date).', + fhirtype: 'date', + xpath: 'ReferralRequest.occurrenceDateTime', + description: 'When the service(s) requested in the referral should occur', }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ReferralRequest.priority', + description: 'The priority assigned to the referral', + }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-recipient recipient: { type: GraphQLString, - description: - 'The person that the referral was sent to (See http://hl7.org/fhir/SearchParameter/ReferralRequest-recipient).', + fhirtype: 'reference', + xpath: 'ReferralRequest.recipient', + description: 'The person that the referral was sent to', }, - context: { + // http://hl7.org/fhir/SearchParameter/ReferralRequest-replaces + replaces: { type: GraphQLString, - description: - 'Part of encounter or episode of care (See http://hl7.org/fhir/SearchParameter/ReferralRequest-context).', + fhirtype: 'reference', + xpath: 'ReferralRequest.replaces', + description: 'Request(s) replaced by this request', }, - definition: { + // http://hl7.org/fhir/SearchParameter/ReferralRequest-requester + requester: { type: GraphQLString, - description: - 'Instantiates protocol or definition (See http://hl7.org/fhir/SearchParameter/ReferralRequest-definition).', + fhirtype: 'reference', + xpath: 'ReferralRequest.requester.agent', + description: 'Individual making the request', + }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-service + service: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ReferralRequest.serviceRequested', + description: 'Actions requested as part of the referral', + }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-specialty + specialty: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ReferralRequest.specialty', + description: 'The specialty that the referral is for', }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-status status: { type: TokenScalar, - description: - 'The status of the referral (See http://hl7.org/fhir/SearchParameter/ReferralRequest-status).', + fhirtype: 'token', + xpath: 'ReferralRequest.status', + description: 'The status of the referral', + }, + // http://hl7.org/fhir/SearchParameter/ReferralRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ReferralRequest.subject', + description: 'Patient referred to care or transfer', }, }; diff --git a/src/resources/3_0_1/parameters/relatedperson.parameters.js b/src/resources/3_0_1/parameters/relatedperson.parameters.js index f1a4f2c8..f1f3d103 100644 --- a/src/resources/3_0_1/parameters/relatedperson.parameters.js +++ b/src/resources/3_0_1/parameters/relatedperson.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,84 +8,129 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the relatedperson query */ module.exports = { - identifier: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/individual-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address', description: - 'An Identifier of the RelatedPerson (See http://hl7.org/fhir/SearchParameter/RelatedPerson-identifier).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text * [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text ', }, - address: { + // http://hl7.org/fhir/SearchParameter/individual-address-city + address_city: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.city', description: - 'A server defined search that may match any of the string fields in the Address, including line, city, state, country, postalCode, and/or text (See http://hl7.org/fhir/SearchParameter/individual-address).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A city specified in an address * [Practitioner](practitioner.html): A city specified in an address * [Person](person.html): A city specified in an address * [Patient](patient.html): A city specified in an address ', }, - birthdate: { - type: DateScalar, + // http://hl7.org/fhir/SearchParameter/individual-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.country', description: - "The Related Person's date of birth (See http://hl7.org/fhir/SearchParameter/individual-birthdate).", + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A country specified in an address * [Practitioner](practitioner.html): A country specified in an address * [Person](person.html): A country specified in an address * [Patient](patient.html): A country specified in an address ', }, - address_state: { + // http://hl7.org/fhir/SearchParameter/individual-address-postalcode + address_postalcode: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.postalCode', description: - 'A state specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-state).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A postal code specified in an address * [Practitioner](practitioner.html): A postalCode specified in an address * [Person](person.html): A postal code specified in an address * [Patient](patient.html): A postalCode specified in an address ', }, - gender: { - type: TokenScalar, + // http://hl7.org/fhir/SearchParameter/individual-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.state', description: - 'Gender of the related person (See http://hl7.org/fhir/SearchParameter/individual-gender).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A state specified in an address * [Practitioner](practitioner.html): A state specified in an address * [Person](person.html): A state specified in an address * [Patient](patient.html): A state specified in an address ', }, - active: { + // http://hl7.org/fhir/SearchParameter/individual-address-use + address_use: { type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.address.use', description: - 'Indicates if the related person record is active (See http://hl7.org/fhir/SearchParameter/RelatedPerson-active).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A use code specified in an address * [Practitioner](practitioner.html): A use code specified in an address * [Person](person.html): A use code specified in an address * [Patient](patient.html): A use code specified in an address ', }, - address_postalcode: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-birthdate + birthdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'RelatedPerson.birthDate', description: - 'A postal code specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-postalcode).', + "Multiple Resources: * [RelatedPerson](relatedperson.html): The Related Person's date of birth * [Person](person.html): The person's date of birth * [Patient](patient.html): The patient's date of birth ", }, - address_country: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "RelatedPerson.telecom[system/@value='email']", description: - 'A country specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-country).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [Person](person.html): A value in an email contact * [Patient](patient.html): A value in an email contact ', }, - phonetic: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.gender', description: - 'A portion of name using some kind of phonetic matching algorithm (See http://hl7.org/fhir/SearchParameter/individual-phonetic).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): Gender of the related person * [Practitioner](practitioner.html): Gender of the practitioner * [Person](person.html): The gender of the person * [Patient](patient.html): Gender of the patient ', }, + // http://hl7.org/fhir/SearchParameter/individual-phone phone: { type: TokenScalar, + fhirtype: 'token', + xpath: "RelatedPerson.telecom[system/@value='phone']", description: - 'A value in a phone contact (See http://hl7.org/fhir/SearchParameter/individual-phone).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Patient](patient.html): A value in a phone contact ', }, - patient: { + // http://hl7.org/fhir/SearchParameter/individual-phonetic + phonetic: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.name', description: - 'The patient this related person is related to (See http://hl7.org/fhir/SearchParameter/RelatedPerson-patient).', + 'Multiple Resources: * [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm * [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm * [Person](person.html): A portion of name using some kind of phonetic matching algorithm * [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm ', }, - name: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.telecom', description: - 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text (See http://hl7.org/fhir/SearchParameter/RelatedPerson-name).', + 'Multiple Resources: * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [Person](person.html): The value in any kind of contact * [Patient](patient.html): The value in any kind of telecom details of the patient ', }, - address_use: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-active + active: { type: TokenScalar, - description: - 'A use code specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-use).', + fhirtype: 'token', + xpath: 'RelatedPerson.active', + description: 'Indicates if the related person record is active', }, - telecom: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-identifier + identifier: { type: TokenScalar, - description: - 'The value in any kind of contact (See http://hl7.org/fhir/SearchParameter/individual-telecom).', + fhirtype: 'token', + xpath: 'RelatedPerson.identifier', + description: 'An Identifier of the RelatedPerson', }, - address_city: { + // http://hl7.org/fhir/SearchParameter/RelatedPerson-name + name: { type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.name', description: - 'A city specified in an address (See http://hl7.org/fhir/SearchParameter/individual-address-city).', + 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text', }, - email: { - type: TokenScalar, - description: - 'A value in an email contact (See http://hl7.org/fhir/SearchParameter/individual-email).', + // http://hl7.org/fhir/SearchParameter/RelatedPerson-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RelatedPerson.patient', + description: 'The patient this related person is related to', }, }; diff --git a/src/resources/3_0_1/parameters/requestgroup.parameters.js b/src/resources/3_0_1/parameters/requestgroup.parameters.js index 4f32a0e1..bb8d3ad5 100644 --- a/src/resources/3_0_1/parameters/requestgroup.parameters.js +++ b/src/resources/3_0_1/parameters/requestgroup.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,69 +8,95 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the requestgroup query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/RequestGroup-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RequestGroup.author', + description: 'The author of the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-authored authored: { type: DateScalar, - description: - 'The date the request group was authored (See http://hl7.org/fhir/SearchParameter/RequestGroup-authored).', + fhirtype: 'date', + xpath: 'RequestGroup.authoredOn', + description: 'The date the request group was authored', }, - identifier: { - type: TokenScalar, - description: - 'External identifiers for the request group (See http://hl7.org/fhir/SearchParameter/RequestGroup-identifier).', - }, - subject: { + // http://hl7.org/fhir/SearchParameter/RequestGroup-context + context: { type: GraphQLString, - description: - 'The subject that the request group is about (See http://hl7.org/fhir/SearchParameter/RequestGroup-subject).', + fhirtype: 'reference', + xpath: 'RequestGroup.context', + description: 'The context the request group applies to', }, - author: { + // http://hl7.org/fhir/SearchParameter/RequestGroup-definition + definition: { type: GraphQLString, - description: - 'The author of the request group (See http://hl7.org/fhir/SearchParameter/RequestGroup-author).', + fhirtype: 'reference', + xpath: 'RequestGroup.definition', + description: 'The definition from which the request group is realized', }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-encounter encounter: { type: GraphQLString, - description: - 'The encounter the request group applies to (See http://hl7.org/fhir/SearchParameter/RequestGroup-encounter).', + fhirtype: 'reference', + xpath: 'RequestGroup.context', + description: 'The encounter the request group applies to', }, - priority: { + // http://hl7.org/fhir/SearchParameter/RequestGroup-group-identifier + group_identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RequestGroup.groupIdentifier', + description: 'The group identifier for the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-identifier + identifier: { type: TokenScalar, - description: - 'The priority of the request group (See http://hl7.org/fhir/SearchParameter/RequestGroup-priority).', + fhirtype: 'token', + xpath: 'RequestGroup.identifier', + description: 'External identifiers for the request group', }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-intent intent: { type: TokenScalar, - description: - 'The intent of the request group (See http://hl7.org/fhir/SearchParameter/RequestGroup-intent).', + fhirtype: 'token', + xpath: 'RequestGroup.intent', + description: 'The intent of the request group', }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-participant participant: { type: GraphQLString, - description: - 'The participant in the requests in the group (See http://hl7.org/fhir/SearchParameter/RequestGroup-participant).', - }, - group_identifier: { - type: TokenScalar, - description: - 'The group identifier for the request group (See http://hl7.org/fhir/SearchParameter/RequestGroup-group-identifier).', + fhirtype: 'reference', + xpath: 'RequestGroup.action.participant', + description: 'The participant in the requests in the group', }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-patient patient: { type: GraphQLString, - description: - 'The identity of a patient to search for request groups (See http://hl7.org/fhir/SearchParameter/RequestGroup-patient).', - }, - context: { - type: GraphQLString, - description: - 'The context the request group applies to (See http://hl7.org/fhir/SearchParameter/RequestGroup-context).', + fhirtype: 'reference', + xpath: 'RequestGroup.subject', + description: 'The identity of a patient to search for request groups', }, - definition: { - type: GraphQLString, - description: - 'The definition from which the request group is realized (See http://hl7.org/fhir/SearchParameter/RequestGroup-definition).', + // http://hl7.org/fhir/SearchParameter/RequestGroup-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RequestGroup.priority', + description: 'The priority of the request group', }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-status status: { type: TokenScalar, - description: - 'The status of the request group (See http://hl7.org/fhir/SearchParameter/RequestGroup-status).', + fhirtype: 'token', + xpath: 'RequestGroup.status', + description: 'The status of the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RequestGroup.subject', + description: 'The subject that the request group is about', }, }; diff --git a/src/resources/3_0_1/parameters/researchstudy.parameters.js b/src/resources/3_0_1/parameters/researchstudy.parameters.js index 41cfd81e..d3432640 100644 --- a/src/resources/3_0_1/parameters/researchstudy.parameters.js +++ b/src/resources/3_0_1/parameters/researchstudy.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,69 +8,96 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the researchstudy query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ResearchStudy-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.category', + description: 'Classifications for the study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-date date: { type: DateScalar, - description: - 'When the study began and ended (See http://hl7.org/fhir/SearchParameter/ResearchStudy-date).', + fhirtype: 'date', + xpath: 'ResearchStudy.period', + description: 'When the study began and ended', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/ResearchStudy-focus + focus: { type: TokenScalar, - description: - 'Business Identifier for study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-identifier).', - }, - partof: { - type: GraphQLString, - description: - 'Part of larger study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-partof).', + fhirtype: 'token', + xpath: 'ResearchStudy.focus', + description: 'Drugs, devices, conditions, etc. under study', }, - sponsor: { - type: GraphQLString, - description: - 'Organization responsible for the study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-sponsor).', + // http://hl7.org/fhir/SearchParameter/ResearchStudy-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.identifier', + description: 'Business Identifier for study', }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Geographic region(s) for study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-jurisdiction).', + fhirtype: 'token', + xpath: 'ResearchStudy.jurisdiction', + description: 'Geographic region(s) for study', }, - focus: { + // http://hl7.org/fhir/SearchParameter/ResearchStudy-keyword + keyword: { type: TokenScalar, - description: - 'Drugs, devices, conditions, etc. under study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-focus).', + fhirtype: 'token', + xpath: 'ResearchStudy.keyword', + description: 'Used to search for the study', }, - principalinvestigator: { + // http://hl7.org/fhir/SearchParameter/ResearchStudy-partof + partof: { type: GraphQLString, - description: - 'The individual responsible for the study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-principalinvestigator).', + fhirtype: 'reference', + xpath: 'ResearchStudy.partOf', + description: 'Part of larger study', }, - title: { + // http://hl7.org/fhir/SearchParameter/ResearchStudy-principalinvestigator + principalinvestigator: { type: GraphQLString, - description: - 'Name for this study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-title).', + fhirtype: 'reference', + xpath: 'ResearchStudy.principalInvestigator', + description: 'The individual responsible for the study', }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-protocol protocol: { type: GraphQLString, - description: - 'Steps followed in executing study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-protocol).', + fhirtype: 'reference', + xpath: 'ResearchStudy.protocol', + description: 'Steps followed in executing study', }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-site site: { type: GraphQLString, - description: - 'Location involved in study execution (See http://hl7.org/fhir/SearchParameter/ResearchStudy-site).', - }, - category: { - type: TokenScalar, - description: - 'Classifications for the study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-category).', + fhirtype: 'reference', + xpath: 'ResearchStudy.site', + description: 'Location involved in study execution', }, - keyword: { - type: TokenScalar, - description: - 'Used to search for the study (See http://hl7.org/fhir/SearchParameter/ResearchStudy-keyword).', + // http://hl7.org/fhir/SearchParameter/ResearchStudy-sponsor + sponsor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchStudy.sponsor', + description: 'Organization responsible for the study', }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.status', description: - 'draft | in-progress | suspended | stopped | completed | entered-in-error (See http://hl7.org/fhir/SearchParameter/ResearchStudy-status).', + 'draft | in-progress | suspended | stopped | completed | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchStudy.title', + description: 'Name for this study', }, }; diff --git a/src/resources/3_0_1/parameters/researchsubject.parameters.js b/src/resources/3_0_1/parameters/researchsubject.parameters.js index 55df2d31..ef76630c 100644 --- a/src/resources/3_0_1/parameters/researchsubject.parameters.js +++ b/src/resources/3_0_1/parameters/researchsubject.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,29 +8,40 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the researchsubject query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ResearchSubject-date date: { type: DateScalar, - description: - 'Start and end of participation (See http://hl7.org/fhir/SearchParameter/ResearchSubject-date).', + fhirtype: 'date', + xpath: 'ResearchSubject.period', + description: 'Start and end of participation', }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-identifier identifier: { type: TokenScalar, - description: - 'Business Identifier for research subject (See http://hl7.org/fhir/SearchParameter/ResearchSubject-identifier).', + fhirtype: 'token', + xpath: 'ResearchSubject.identifier', + description: 'Business Identifier for research subject', }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-individual individual: { type: GraphQLString, - description: - 'Who is part of study (See http://hl7.org/fhir/SearchParameter/ResearchSubject-individual).', + fhirtype: 'reference', + xpath: 'ResearchSubject.individual', + description: 'Who is part of study', }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-patient patient: { type: GraphQLString, - description: - 'Who is part of study (See http://hl7.org/fhir/SearchParameter/ResearchSubject-patient).', + fhirtype: 'reference', + xpath: 'ResearchSubject.individual', + description: 'Who is part of study', }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-status status: { type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchSubject.status', description: - 'candidate | enrolled | active | suspended | withdrawn | completed (See http://hl7.org/fhir/SearchParameter/ResearchSubject-status).', + 'candidate | enrolled | active | suspended | withdrawn | completed', }, }; diff --git a/src/resources/3_0_1/parameters/resource.parameters.js b/src/resources/3_0_1/parameters/resource.parameters.js new file mode 100644 index 00000000..140844fc --- /dev/null +++ b/src/resources/3_0_1/parameters/resource.parameters.js @@ -0,0 +1,62 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the resource query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Resource-content + _content: { + type: GraphQLString, + fhirtype: 'string', + xpath: '', + description: 'Search on the entire content of the resource', + }, + // http://hl7.org/fhir/SearchParameter/Resource-id + _id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.id', + description: 'Logical id of this artifact', + }, + // http://hl7.org/fhir/SearchParameter/Resource-lastUpdated + _lastUpdated: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Resource.meta.lastUpdated', + description: 'When the resource version last changed', + }, + // http://hl7.org/fhir/SearchParameter/Resource-profile + _profile: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Resource.meta.profile', + description: 'Profiles this resource claims to conform to', + }, + // http://hl7.org/fhir/SearchParameter/Resource-query + _query: { + type: TokenScalar, + fhirtype: 'token', + xpath: '', + description: + 'A custom search profile that describes a specific defined query operation', + }, + // http://hl7.org/fhir/SearchParameter/Resource-security + _security: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.meta.security', + description: 'Security Labels applied to this resource', + }, + // http://hl7.org/fhir/SearchParameter/Resource-tag + _tag: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.meta.tag', + description: 'Tags applied to this resource', + }, +}; diff --git a/src/resources/3_0_1/parameters/riskassessment.parameters.js b/src/resources/3_0_1/parameters/riskassessment.parameters.js index d81328bf..a31d28c4 100644 --- a/src/resources/3_0_1/parameters/riskassessment.parameters.js +++ b/src/resources/3_0_1/parameters/riskassessment.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,54 +8,78 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the riskassessment query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'RiskAssessment.occurrenceDateTime', description: - 'When was assessment made? (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskAssessment.identifier', description: - 'Unique identifier for the assessment (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, - condition: { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.subject', description: - 'Condition assessed (See http://hl7.org/fhir/SearchParameter/RiskAssessment-condition).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - performer: { + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.context', description: - 'Who did assessment? (See http://hl7.org/fhir/SearchParameter/RiskAssessment-performer).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', + }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-condition + condition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.condition', + description: 'Condition assessed', }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-method method: { type: TokenScalar, - description: - 'Evaluation mechanism (See http://hl7.org/fhir/SearchParameter/RiskAssessment-method).', - }, - subject: { - type: GraphQLString, - description: - 'Who/what does assessment apply to? (See http://hl7.org/fhir/SearchParameter/RiskAssessment-subject).', + fhirtype: 'token', + xpath: 'RiskAssessment.method', + description: 'Evaluation mechanism', }, - patient: { + // http://hl7.org/fhir/SearchParameter/RiskAssessment-performer + performer: { type: GraphQLString, - description: - 'Who/what does assessment apply to? (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + fhirtype: 'reference', + xpath: 'RiskAssessment.performer', + description: 'Who did assessment?', }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-probability probability: { type: GraphQLString, - description: - 'Likelihood of specified outcome (See http://hl7.org/fhir/SearchParameter/RiskAssessment-probability).', + fhirtype: 'number', + xpath: 'RiskAssessment.prediction.probabilityDecimal', + description: 'Likelihood of specified outcome', }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-risk risk: { type: TokenScalar, - description: - 'Likelihood of specified outcome as a qualitative value (See http://hl7.org/fhir/SearchParameter/RiskAssessment-risk).', + fhirtype: 'token', + xpath: 'RiskAssessment.prediction.qualitativeRisk', + description: 'Likelihood of specified outcome as a qualitative value', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/RiskAssessment-subject + subject: { type: GraphQLString, - description: - 'Where was assessment performed? (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'RiskAssessment.subject', + description: 'Who/what does assessment apply to?', }, }; diff --git a/src/resources/3_0_1/parameters/schedule.parameters.js b/src/resources/3_0_1/parameters/schedule.parameters.js index 1dbeeadc..d45f1d63 100644 --- a/src/resources/3_0_1/parameters/schedule.parameters.js +++ b/src/resources/3_0_1/parameters/schedule.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,29 +8,42 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the schedule query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Schedule-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Schedule.active', + description: 'Is the schedule in active use', + }, + // http://hl7.org/fhir/SearchParameter/Schedule-actor actor: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Schedule.actor', description: - 'The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for (See http://hl7.org/fhir/SearchParameter/Schedule-actor).', + 'The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for', }, + // http://hl7.org/fhir/SearchParameter/Schedule-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'Schedule.planningHorizon', description: - 'Search for Schedule resources that have a period that contains this date specified (See http://hl7.org/fhir/SearchParameter/Schedule-date).', + 'Search for Schedule resources that have a period that contains this date specified', }, + // http://hl7.org/fhir/SearchParameter/Schedule-identifier identifier: { type: TokenScalar, - description: - 'A Schedule Identifier (See http://hl7.org/fhir/SearchParameter/Schedule-identifier).', - }, - active: { - type: TokenScalar, - description: - 'Is the schedule in active use (See http://hl7.org/fhir/SearchParameter/Schedule-active).', + fhirtype: 'token', + xpath: 'Schedule.identifier', + description: 'A Schedule Identifier', }, + // http://hl7.org/fhir/SearchParameter/Schedule-type type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Schedule.serviceType', description: - 'The type of appointments that can be booked into associated slot(s) (See http://hl7.org/fhir/SearchParameter/Schedule-type).', + 'The type of appointments that can be booked into associated slot(s)', }, }; diff --git a/src/resources/3_0_1/parameters/searchparameter.parameters.js b/src/resources/3_0_1/parameters/searchparameter.parameters.js index eda29816..6f0c930e 100644 --- a/src/resources/3_0_1/parameters/searchparameter.parameters.js +++ b/src/resources/3_0_1/parameters/searchparameter.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,74 +9,103 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the searchparameter query */ module.exports = { - date: { - type: DateScalar, - description: - 'The search parameter publication date (See http://hl7.org/fhir/SearchParameter/SearchParameter-date).', - }, - code: { + // http://hl7.org/fhir/SearchParameter/SearchParameter-base + base: { type: TokenScalar, - description: - 'Code used in URL (See http://hl7.org/fhir/SearchParameter/SearchParameter-code).', + fhirtype: 'token', + xpath: 'SearchParameter.base', + description: 'The resource type(s) this search parameter applies to', }, - jurisdiction: { + // http://hl7.org/fhir/SearchParameter/SearchParameter-code + code: { type: TokenScalar, - description: - 'Intended jurisdiction for the search parameter (See http://hl7.org/fhir/SearchParameter/SearchParameter-jurisdiction).', + fhirtype: 'token', + xpath: 'SearchParameter.code', + description: 'Code used in URL', }, - description: { + // http://hl7.org/fhir/SearchParameter/SearchParameter-component + component: { type: GraphQLString, - description: - 'The description of the search parameter (See http://hl7.org/fhir/SearchParameter/SearchParameter-description).', + fhirtype: 'reference', + xpath: 'SearchParameter.component.definition', + description: 'Defines how the part works', }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'SearchParameter.date', + description: 'The search parameter publication date', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-derived-from derived_from: { type: UriScalar, - description: - 'Original Definition for the search parameter (See http://hl7.org/fhir/SearchParameter/SearchParameter-derived-from).', + fhirtype: 'uri', + xpath: 'SearchParameter.derivedFrom', + description: 'Original Definition for the search parameter', }, - type: { - type: TokenScalar, - description: - 'number | date | string | token | reference | composite | quantity | uri (See http://hl7.org/fhir/SearchParameter/SearchParameter-type).', - }, - version: { - type: TokenScalar, - description: - 'The business version of the search parameter (See http://hl7.org/fhir/SearchParameter/SearchParameter-version).', - }, - url: { - type: UriScalar, - description: - 'The uri that identifies the search parameter (See http://hl7.org/fhir/SearchParameter/SearchParameter-url).', + // http://hl7.org/fhir/SearchParameter/SearchParameter-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'SearchParameter.description', + description: 'The description of the search parameter', }, - target: { + // http://hl7.org/fhir/SearchParameter/SearchParameter-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'Types of resource (if a resource reference) (See http://hl7.org/fhir/SearchParameter/SearchParameter-target).', - }, - component: { - type: GraphQLString, - description: - 'Defines how the part works (See http://hl7.org/fhir/SearchParameter/SearchParameter-component).', + fhirtype: 'token', + xpath: 'SearchParameter.jurisdiction', + description: 'Intended jurisdiction for the search parameter', }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the search parameter (See http://hl7.org/fhir/SearchParameter/SearchParameter-name).', + fhirtype: 'string', + xpath: 'SearchParameter.name', + description: 'Computationally friendly name of the search parameter', }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the search parameter (See http://hl7.org/fhir/SearchParameter/SearchParameter-publisher).', + fhirtype: 'string', + xpath: 'SearchParameter.publisher', + description: 'Name of the publisher of the search parameter', }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-status status: { type: TokenScalar, - description: - 'The current status of the search parameter (See http://hl7.org/fhir/SearchParameter/SearchParameter-status).', + fhirtype: 'token', + xpath: 'SearchParameter.status', + description: 'The current status of the search parameter', }, - base: { + // http://hl7.org/fhir/SearchParameter/SearchParameter-target + target: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.target', + description: 'Types of resource (if a resource reference)', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-type + type: { type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.type', description: - 'The resource type(s) this search parameter applies to (See http://hl7.org/fhir/SearchParameter/SearchParameter-base).', + 'number | date | string | token | reference | composite | quantity | uri', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'SearchParameter.url', + description: 'The uri that identifies the search parameter', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.version', + description: 'The business version of the search parameter', }, }; diff --git a/src/resources/3_0_1/parameters/sequence.parameters.js b/src/resources/3_0_1/parameters/sequence.parameters.js index 1bd6fe30..ee27f4cc 100644 --- a/src/resources/3_0_1/parameters/sequence.parameters.js +++ b/src/resources/3_0_1/parameters/sequence.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,39 +7,56 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the sequence query */ module.exports = { - identifier: { + // http://hl7.org/fhir/SearchParameter/Sequence-chromosome + chromosome: { type: TokenScalar, - description: - 'The unique identity for a particular sequence (See http://hl7.org/fhir/SearchParameter/Sequence-identifier).', + fhirtype: 'token', + xpath: 'Sequence.referenceSeq.chromosome', + description: 'Chromosome number of the reference sequence', }, + // http://hl7.org/fhir/SearchParameter/Sequence-coordinate coordinate: { type: GraphQLString, + fhirtype: 'composite', + xpath: '', description: - 'Search parameter for region of the reference DNA sequence string. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `coordinate=1$lt345$gt123`, this means it will search for the Sequence resource on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above. (See http://hl7.org/fhir/SearchParameter/Sequence-coordinate).', + 'Search parameter for region of the reference DNA sequence string. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `coordinate=1$lt345$gt123`, this means it will search for the Sequence resource on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.', }, - patient: { + // http://hl7.org/fhir/SearchParameter/Sequence-end + end: { type: GraphQLString, + fhirtype: 'number', + xpath: 'Sequence.referenceSeq.windowEnd', description: - 'The subject that the observation is about (See http://hl7.org/fhir/SearchParameter/Sequence-patient).', + 'End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the reference sequence.', }, - chromosome: { + // http://hl7.org/fhir/SearchParameter/Sequence-identifier + identifier: { type: TokenScalar, - description: - 'Chromosome number of the reference sequence (See http://hl7.org/fhir/SearchParameter/Sequence-chromosome).', + fhirtype: 'token', + xpath: 'Sequence.identifier', + description: 'The unique identity for a particular sequence', }, - start: { + // http://hl7.org/fhir/SearchParameter/Sequence-patient + patient: { type: GraphQLString, - description: - 'Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the reference sequence. (See http://hl7.org/fhir/SearchParameter/Sequence-start).', + fhirtype: 'reference', + xpath: 'Sequence.patient', + description: 'The subject that the observation is about', }, - end: { + // http://hl7.org/fhir/SearchParameter/Sequence-start + start: { type: GraphQLString, + fhirtype: 'number', + xpath: 'Sequence.referenceSeq.windowStart', description: - 'End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the reference sequence. (See http://hl7.org/fhir/SearchParameter/Sequence-end).', + 'Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the reference sequence.', }, + // http://hl7.org/fhir/SearchParameter/Sequence-type type: { type: TokenScalar, - description: - 'Amino Acid Sequence/ DNA Sequence / RNA Sequence (See http://hl7.org/fhir/SearchParameter/Sequence-type).', + fhirtype: 'token', + xpath: 'Sequence.type', + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence', }, }; diff --git a/src/resources/3_0_1/parameters/servicedefinition.parameters.js b/src/resources/3_0_1/parameters/servicedefinition.parameters.js index eda885e8..2036f777 100644 --- a/src/resources/3_0_1/parameters/servicedefinition.parameters.js +++ b/src/resources/3_0_1/parameters/servicedefinition.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,89 +9,129 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the servicedefinition query */ module.exports = { - date: { - type: DateScalar, - description: - 'The service definition publication date (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-date).', - }, - identifier: { - type: TokenScalar, - description: - 'External identifier for the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-identifier).', - }, - successor: { + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-composed-of + composed_of: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-successor).', + fhirtype: 'reference', + xpath: + "ServiceDefinition.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', }, - jurisdiction: { - type: TokenScalar, - description: - 'Intended jurisdiction for the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-jurisdiction).', + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ServiceDefinition.date', + description: 'The service definition publication date', }, - description: { + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-depends-on + depends_on: { type: GraphQLString, - description: - 'The description of the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-description).', + fhirtype: 'reference', + xpath: + "ServiceDefinition.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', }, + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-derived-from derived_from: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-derived-from).', + fhirtype: 'reference', + xpath: + "ServiceDefinition.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', }, - predecessor: { + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-description + description: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-predecessor).', + fhirtype: 'string', + xpath: 'ServiceDefinition.description', + description: 'The description of the service definition', }, - title: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ServiceDefinition.effectivePeriod', description: - 'The human-friendly name of the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-title).', + 'The time during which the service definition is intended to be in use', }, - composed_of: { - type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-composed-of).', + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceDefinition.identifier', + description: 'External identifier for the service definition', }, - version: { + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'The business version of the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-version).', + fhirtype: 'token', + xpath: 'ServiceDefinition.jurisdiction', + description: 'Intended jurisdiction for the service definition', }, - url: { - type: UriScalar, - description: - 'The uri that identifies the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-url).', + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ServiceDefinition.name', + description: 'Computationally friendly name of the service definition', }, - effective: { - type: DateScalar, - description: - 'The time during which the service definition is intended to be in use (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-effective).', + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ServiceDefinition.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', }, - depends_on: { + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-publisher + publisher: { type: GraphQLString, - description: - 'What resource is being referenced (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-depends-on).', + fhirtype: 'string', + xpath: 'ServiceDefinition.publisher', + description: 'Name of the publisher of the service definition', }, - name: { + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceDefinition.status', + description: 'The current status of the service definition', + }, + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-successor + successor: { type: GraphQLString, - description: - 'Computationally friendly name of the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-name).', + fhirtype: 'reference', + xpath: + "ServiceDefinition.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', }, - publisher: { + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-title + title: { type: GraphQLString, - description: - 'Name of the publisher of the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-publisher).', + fhirtype: 'string', + xpath: 'ServiceDefinition.title', + description: 'The human-friendly name of the service definition', }, + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-topic topic: { type: TokenScalar, - description: - 'Topics associated with the module (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-topic).', + fhirtype: 'token', + xpath: 'ServiceDefinition.topic', + description: 'Topics associated with the module', }, - status: { + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ServiceDefinition.url', + description: 'The uri that identifies the service definition', + }, + // http://hl7.org/fhir/SearchParameter/ServiceDefinition-version + version: { type: TokenScalar, - description: - 'The current status of the service definition (See http://hl7.org/fhir/SearchParameter/ServiceDefinition-status).', + fhirtype: 'token', + xpath: 'ServiceDefinition.version', + description: 'The business version of the service definition', }, }; diff --git a/src/resources/3_0_1/parameters/slot.parameters.js b/src/resources/3_0_1/parameters/slot.parameters.js index 42309f00..778b0f00 100644 --- a/src/resources/3_0_1/parameters/slot.parameters.js +++ b/src/resources/3_0_1/parameters/slot.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,29 +8,39 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the slot query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/Slot-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Slot.identifier', + description: 'A Slot Identifier', + }, + // http://hl7.org/fhir/SearchParameter/Slot-schedule schedule: { type: GraphQLString, - description: - 'The Schedule Resource that we are seeking a slot within (See http://hl7.org/fhir/SearchParameter/Slot-schedule).', + fhirtype: 'reference', + xpath: 'Slot.schedule', + description: 'The Schedule Resource that we are seeking a slot within', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Slot-slot-type + slot_type: { type: TokenScalar, - description: - 'A Slot Identifier (See http://hl7.org/fhir/SearchParameter/Slot-identifier).', + fhirtype: 'token', + xpath: 'Slot.serviceType', + description: 'The type of appointments that can be booked into the slot', }, + // http://hl7.org/fhir/SearchParameter/Slot-start start: { type: DateScalar, - description: - 'Appointment date/time. (See http://hl7.org/fhir/SearchParameter/Slot-start).', - }, - slot_type: { - type: TokenScalar, - description: - 'The type of appointments that can be booked into the slot (See http://hl7.org/fhir/SearchParameter/Slot-slot-type).', + fhirtype: 'date', + xpath: 'Slot.start', + description: 'Appointment date/time.', }, + // http://hl7.org/fhir/SearchParameter/Slot-status status: { type: TokenScalar, - description: - 'The free/busy status of the appointment (See http://hl7.org/fhir/SearchParameter/Slot-status).', + fhirtype: 'token', + xpath: 'Slot.status', + description: 'The free/busy status of the appointment', }, }; diff --git a/src/resources/3_0_1/parameters/specimen.parameters.js b/src/resources/3_0_1/parameters/specimen.parameters.js index 4c52d9a4..3742764c 100644 --- a/src/resources/3_0_1/parameters/specimen.parameters.js +++ b/src/resources/3_0_1/parameters/specimen.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,64 +8,89 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the specimen query */ module.exports = { - container: { + // http://hl7.org/fhir/SearchParameter/Specimen-accession + accession: { type: TokenScalar, - description: - 'The kind of specimen container (See http://hl7.org/fhir/SearchParameter/Specimen-container).', + fhirtype: 'token', + xpath: 'Specimen.accessionIdentifier', + description: 'The accession number associated with the specimen', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/Specimen-bodysite + bodysite: { type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.collection.bodySite', description: - 'The unique identifier associated with the specimen (See http://hl7.org/fhir/SearchParameter/Specimen-identifier).', + 'The code for the body site from where the specimen originated', }, - parent: { + // http://hl7.org/fhir/SearchParameter/Specimen-collected + collected: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Specimen.collection.collectedDateTime', + description: 'The date the specimen was collected', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-collector + collector: { type: GraphQLString, - description: - 'The parent of the specimen (See http://hl7.org/fhir/SearchParameter/Specimen-parent).', + fhirtype: 'reference', + xpath: 'Specimen.collection.collector', + description: 'Who collected the specimen', }, + // http://hl7.org/fhir/SearchParameter/Specimen-container + container: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.container.type', + description: 'The kind of specimen container', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-container-id container_id: { type: TokenScalar, - description: - 'The unique identifier associated with the specimen container (See http://hl7.org/fhir/SearchParameter/Specimen-container-id).', + fhirtype: 'token', + xpath: 'Specimen.container.identifier', + description: 'The unique identifier associated with the specimen container', }, - bodysite: { + // http://hl7.org/fhir/SearchParameter/Specimen-identifier + identifier: { type: TokenScalar, - description: - 'The code for the body site from where the specimen originated (See http://hl7.org/fhir/SearchParameter/Specimen-bodysite).', + fhirtype: 'token', + xpath: 'Specimen.identifier', + description: 'The unique identifier associated with the specimen', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Specimen-parent + parent: { type: GraphQLString, - description: - 'The subject of the specimen (See http://hl7.org/fhir/SearchParameter/Specimen-subject).', + fhirtype: 'reference', + xpath: 'Specimen.parent', + description: 'The parent of the specimen', }, + // http://hl7.org/fhir/SearchParameter/Specimen-patient patient: { type: GraphQLString, - description: - 'The patient the specimen comes from (See http://hl7.org/fhir/SearchParameter/Specimen-patient).', - }, - collected: { - type: DateScalar, - description: - 'The date the specimen was collected (See http://hl7.org/fhir/SearchParameter/Specimen-collected).', - }, - accession: { - type: TokenScalar, - description: - 'The accession number associated with the specimen (See http://hl7.org/fhir/SearchParameter/Specimen-accession).', + fhirtype: 'reference', + xpath: 'Specimen.subject', + description: 'The patient the specimen comes from', }, - type: { + // http://hl7.org/fhir/SearchParameter/Specimen-status + status: { type: TokenScalar, - description: - 'The specimen type (See http://hl7.org/fhir/SearchParameter/Specimen-type).', + fhirtype: 'token', + xpath: 'Specimen.status', + description: 'available | unavailable | unsatisfactory | entered-in-error', }, - collector: { + // http://hl7.org/fhir/SearchParameter/Specimen-subject + subject: { type: GraphQLString, - description: - 'Who collected the specimen (See http://hl7.org/fhir/SearchParameter/Specimen-collector).', + fhirtype: 'reference', + xpath: 'Specimen.subject', + description: 'The subject of the specimen', }, - status: { + // http://hl7.org/fhir/SearchParameter/Specimen-type + type: { type: TokenScalar, - description: - 'available | unavailable | unsatisfactory | entered-in-error (See http://hl7.org/fhir/SearchParameter/Specimen-status).', + fhirtype: 'token', + xpath: 'Specimen.type', + description: 'The specimen type', }, }; diff --git a/src/resources/3_0_1/parameters/structuredefinition.parameters.js b/src/resources/3_0_1/parameters/structuredefinition.parameters.js index daf38816..4b160e12 100644 --- a/src/resources/3_0_1/parameters/structuredefinition.parameters.js +++ b/src/resources/3_0_1/parameters/structuredefinition.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -9,114 +9,158 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the structuredefinition query */ module.exports = { - date: { - type: DateScalar, - description: - 'The structure definition publication date (See http://hl7.org/fhir/SearchParameter/StructureDefinition-date).', - }, - identifier: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-abstract + abstract: { type: TokenScalar, - description: - 'External identifier for the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-identifier).', + fhirtype: 'token', + xpath: 'StructureDefinition.abstract', + description: 'Whether the structure is abstract', }, - valueset: { - type: GraphQLString, - description: - 'A vocabulary binding reference (See http://hl7.org/fhir/SearchParameter/StructureDefinition-valueset).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-base + base: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'StructureDefinition.baseDefinition', + description: 'Definition that this type is constrained/specialized from', }, - kind: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-base-path + base_path: { type: TokenScalar, - description: - 'primitive-type | complex-type | resource | logical (See http://hl7.org/fhir/SearchParameter/StructureDefinition-kind).', + fhirtype: 'token', + xpath: 'StructureDefinition.snapshot.element.base.path', + description: 'Path that identifies the base element', }, - jurisdiction: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-context-type + context_type: { type: TokenScalar, - description: - 'Intended jurisdiction for the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-jurisdiction).', + fhirtype: 'token', + xpath: 'StructureDefinition.contextType', + description: 'resource | datatype | extension', }, - description: { - type: GraphQLString, - description: - 'The description of the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-description).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'StructureDefinition.date', + description: 'The structure definition publication date', }, - experimental: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-derivation + derivation: { type: TokenScalar, - description: - 'For testing purposes, not real usage (See http://hl7.org/fhir/SearchParameter/StructureDefinition-experimental).', + fhirtype: 'token', + xpath: 'StructureDefinition.derivation', + description: 'specialization | constraint - How relates to base definition', }, - context_type: { - type: TokenScalar, - description: - 'resource | datatype | extension (See http://hl7.org/fhir/SearchParameter/StructureDefinition-context-type).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.description', + description: 'The description of the structure definition', }, - abstract: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-experimental + experimental: { type: TokenScalar, - description: - 'Whether the structure is abstract (See http://hl7.org/fhir/SearchParameter/StructureDefinition-abstract).', + fhirtype: 'token', + xpath: 'StructureDefinition.experimental', + description: 'For testing purposes, not real usage', }, - title: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-ext-context + ext_context: { type: GraphQLString, - description: - 'The human-friendly name of the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-title).', + fhirtype: 'string', + xpath: 'StructureDefinition.context', + description: 'Where the extension can be used in instances', }, - type: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-identifier + identifier: { type: TokenScalar, - description: - 'Type defined or constrained by this structure (See http://hl7.org/fhir/SearchParameter/StructureDefinition-type).', + fhirtype: 'token', + xpath: 'StructureDefinition.identifier', + description: 'External identifier for the structure definition', }, - version: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-jurisdiction + jurisdiction: { type: TokenScalar, - description: - 'The business version of the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-version).', - }, - url: { - type: UriScalar, - description: - 'The uri that identifies the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-url).', + fhirtype: 'token', + xpath: 'StructureDefinition.jurisdiction', + description: 'Intended jurisdiction for the structure definition', }, - path: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-keyword + keyword: { type: TokenScalar, - description: - 'A path that is constrained in the profile (See http://hl7.org/fhir/SearchParameter/StructureDefinition-path).', + fhirtype: 'token', + xpath: 'StructureDefinition.keyword', + description: 'A code for the profile', }, - ext_context: { - type: GraphQLString, - description: - 'Where the extension can be used in instances (See http://hl7.org/fhir/SearchParameter/StructureDefinition-ext-context).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-kind + kind: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.kind', + description: 'primitive-type | complex-type | resource | logical', }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-name).', + fhirtype: 'string', + xpath: 'StructureDefinition.name', + description: 'Computationally friendly name of the structure definition', }, - base_path: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-path + path: { type: TokenScalar, - description: - 'Path that identifies the base element (See http://hl7.org/fhir/SearchParameter/StructureDefinition-base-path).', + fhirtype: 'token', + xpath: 'StructureDefinition.snapshot.element.path', + description: 'A path that is constrained in the profile', }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-publisher).', + fhirtype: 'string', + xpath: 'StructureDefinition.publisher', + description: 'Name of the publisher of the structure definition', }, - derivation: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-status + status: { type: TokenScalar, - description: - 'specialization | constraint - How relates to base definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-derivation).', + fhirtype: 'token', + xpath: 'StructureDefinition.status', + description: 'The current status of the structure definition', }, - keyword: { - type: TokenScalar, - description: - 'A code for the profile (See http://hl7.org/fhir/SearchParameter/StructureDefinition-keyword).', + // http://hl7.org/fhir/SearchParameter/StructureDefinition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.title', + description: 'The human-friendly name of the structure definition', }, - status: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-type + type: { type: TokenScalar, - description: - 'The current status of the structure definition (See http://hl7.org/fhir/SearchParameter/StructureDefinition-status).', + fhirtype: 'token', + xpath: 'StructureDefinition.type', + description: 'Type defined or constrained by this structure', }, - base: { + // http://hl7.org/fhir/SearchParameter/StructureDefinition-url + url: { type: UriScalar, - description: - 'Definition that this type is constrained/specialized from (See http://hl7.org/fhir/SearchParameter/StructureDefinition-base).', + fhirtype: 'uri', + xpath: 'StructureDefinition.url', + description: 'The uri that identifies the structure definition', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-valueset + valueset: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'StructureDefinition.snapshot.element.binding.valueSetUri', + description: 'A vocabulary binding reference', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.version', + description: 'The business version of the structure definition', }, }; diff --git a/src/resources/3_0_1/parameters/structuremap.parameters.js b/src/resources/3_0_1/parameters/structuremap.parameters.js index 7191dab2..46a12678 100644 --- a/src/resources/3_0_1/parameters/structuremap.parameters.js +++ b/src/resources/3_0_1/parameters/structuremap.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,54 +9,74 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the structuremap query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/StructureMap-date date: { type: DateScalar, - description: - 'The structure map publication date (See http://hl7.org/fhir/SearchParameter/StructureMap-date).', + fhirtype: 'date', + xpath: 'StructureMap.date', + description: 'The structure map publication date', }, + // http://hl7.org/fhir/SearchParameter/StructureMap-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureMap.description', + description: 'The description of the structure map', + }, + // http://hl7.org/fhir/SearchParameter/StructureMap-identifier identifier: { type: TokenScalar, - description: - 'External identifier for the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-identifier).', + fhirtype: 'token', + xpath: 'StructureMap.identifier', + description: 'External identifier for the structure map', }, + // http://hl7.org/fhir/SearchParameter/StructureMap-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-jurisdiction).', + fhirtype: 'token', + xpath: 'StructureMap.jurisdiction', + description: 'Intended jurisdiction for the structure map', }, + // http://hl7.org/fhir/SearchParameter/StructureMap-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-name).', - }, - description: { - type: GraphQLString, - description: - 'The description of the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-description).', + fhirtype: 'string', + xpath: 'StructureMap.name', + description: 'Computationally friendly name of the structure map', }, + // http://hl7.org/fhir/SearchParameter/StructureMap-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-publisher).', + fhirtype: 'string', + xpath: 'StructureMap.publisher', + description: 'Name of the publisher of the structure map', + }, + // http://hl7.org/fhir/SearchParameter/StructureMap-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureMap.status', + description: 'The current status of the structure map', }, + // http://hl7.org/fhir/SearchParameter/StructureMap-title title: { type: GraphQLString, - description: - 'The human-friendly name of the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-title).', - }, - version: { - type: TokenScalar, - description: - 'The business version of the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-version).', + fhirtype: 'string', + xpath: 'StructureMap.title', + description: 'The human-friendly name of the structure map', }, + // http://hl7.org/fhir/SearchParameter/StructureMap-url url: { type: UriScalar, - description: - 'The uri that identifies the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-url).', + fhirtype: 'uri', + xpath: 'StructureMap.url', + description: 'The uri that identifies the structure map', }, - status: { + // http://hl7.org/fhir/SearchParameter/StructureMap-version + version: { type: TokenScalar, - description: - 'The current status of the structure map (See http://hl7.org/fhir/SearchParameter/StructureMap-status).', + fhirtype: 'token', + xpath: 'StructureMap.version', + description: 'The business version of the structure map', }, }; diff --git a/src/resources/3_0_1/parameters/subscription.parameters.js b/src/resources/3_0_1/parameters/subscription.parameters.js index c89fcae8..ce466c0e 100644 --- a/src/resources/3_0_1/parameters/subscription.parameters.js +++ b/src/resources/3_0_1/parameters/subscription.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,39 +8,54 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the subscription query */ module.exports = { - payload: { - type: GraphQLString, - description: - 'The mime-type of the notification payload (See http://hl7.org/fhir/SearchParameter/Subscription-payload).', + // http://hl7.org/fhir/SearchParameter/Subscription-add-tag + add_tag: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Subscription.tag', + description: 'A tag to be added to the resource matching the criteria', }, + // http://hl7.org/fhir/SearchParameter/Subscription-contact + contact: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Subscription.contact', + description: 'Contact details for the subscription', + }, + // http://hl7.org/fhir/SearchParameter/Subscription-criteria criteria: { type: GraphQLString, + fhirtype: 'string', + xpath: 'Subscription.criteria', description: - 'The search rules used to determine when to send a notification (See http://hl7.org/fhir/SearchParameter/Subscription-criteria).', + 'The search rules used to determine when to send a notification', }, - add_tag: { - type: TokenScalar, - description: - 'A tag to be added to the resource matching the criteria (See http://hl7.org/fhir/SearchParameter/Subscription-add-tag).', + // http://hl7.org/fhir/SearchParameter/Subscription-payload + payload: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Subscription.channel.payload', + description: 'The mime-type of the notification payload', }, - contact: { + // http://hl7.org/fhir/SearchParameter/Subscription-status + status: { type: TokenScalar, - description: - 'Contact details for the subscription (See http://hl7.org/fhir/SearchParameter/Subscription-contact).', + fhirtype: 'token', + xpath: 'Subscription.status', + description: 'The current state of the subscription', }, + // http://hl7.org/fhir/SearchParameter/Subscription-type type: { type: TokenScalar, - description: - 'The type of channel for the sent notifications (See http://hl7.org/fhir/SearchParameter/Subscription-type).', + fhirtype: 'token', + xpath: 'Subscription.channel.type', + description: 'The type of channel for the sent notifications', }, + // http://hl7.org/fhir/SearchParameter/Subscription-url url: { type: UriScalar, - description: - 'The uri that will receive the notifications (See http://hl7.org/fhir/SearchParameter/Subscription-url).', - }, - status: { - type: TokenScalar, - description: - 'The current state of the subscription (See http://hl7.org/fhir/SearchParameter/Subscription-status).', + fhirtype: 'uri', + xpath: 'Subscription.channel.endpoint', + description: 'The uri that will receive the notifications', }, }; diff --git a/src/resources/3_0_1/parameters/substance.parameters.js b/src/resources/3_0_1/parameters/substance.parameters.js index c807adb3..b007e015 100644 --- a/src/resources/3_0_1/parameters/substance.parameters.js +++ b/src/resources/3_0_1/parameters/substance.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,44 +8,60 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the substance query */ module.exports = { - identifier: { - type: TokenScalar, - description: - 'Unique identifier for the substance (See http://hl7.org/fhir/SearchParameter/Substance-identifier).', - }, - container_identifier: { + // http://hl7.org/fhir/SearchParameter/Substance-category + category: { type: TokenScalar, - description: - 'Identifier of the package/container (See http://hl7.org/fhir/SearchParameter/Substance-container-identifier).', + fhirtype: 'token', + xpath: 'Substance.category', + description: 'The category of the substance', }, + // http://hl7.org/fhir/SearchParameter/Substance-code code: { type: TokenScalar, - description: - 'The code of the substance or ingredient (See http://hl7.org/fhir/SearchParameter/Substance-code).', + fhirtype: 'token', + xpath: 'Substance.code', + description: 'The code of the substance or ingredient', }, - quantity: { - type: GraphQLString, - description: - 'Amount of substance in the package (See http://hl7.org/fhir/SearchParameter/Substance-quantity).', - }, - substance_reference: { - type: GraphQLString, - description: - 'A component of the substance (See http://hl7.org/fhir/SearchParameter/Substance-substance-reference).', + // http://hl7.org/fhir/SearchParameter/Substance-container-identifier + container_identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Substance.instance.identifier', + description: 'Identifier of the package/container', }, + // http://hl7.org/fhir/SearchParameter/Substance-expiry expiry: { type: DateScalar, - description: - 'Expiry date of package or container of substance (See http://hl7.org/fhir/SearchParameter/Substance-expiry).', + fhirtype: 'date', + xpath: 'Substance.instance.expiry', + description: 'Expiry date of package or container of substance', }, - category: { + // http://hl7.org/fhir/SearchParameter/Substance-identifier + identifier: { type: TokenScalar, - description: - 'The category of the substance (See http://hl7.org/fhir/SearchParameter/Substance-category).', + fhirtype: 'token', + xpath: 'Substance.identifier', + description: 'Unique identifier for the substance', + }, + // http://hl7.org/fhir/SearchParameter/Substance-quantity + quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Substance.instance.quantity', + description: 'Amount of substance in the package', }, + // http://hl7.org/fhir/SearchParameter/Substance-status status: { type: TokenScalar, - description: - 'active | inactive | entered-in-error (See http://hl7.org/fhir/SearchParameter/Substance-status).', + fhirtype: 'token', + xpath: 'Substance.status', + description: 'active | inactive | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/Substance-substance-reference + substance_reference: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Substance.ingredient.substanceReference', + description: 'A component of the substance', }, }; diff --git a/src/resources/3_0_1/parameters/supplydelivery.parameters.js b/src/resources/3_0_1/parameters/supplydelivery.parameters.js index 39a52ca2..68a6cfcf 100644 --- a/src/resources/3_0_1/parameters/supplydelivery.parameters.js +++ b/src/resources/3_0_1/parameters/supplydelivery.parameters.js @@ -1,5 +1,5 @@ -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -7,29 +7,41 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the supplydelivery query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyDelivery.identifier', description: - 'External identifier (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', - }, - receiver: { - type: GraphQLString, - description: - 'Who collected the Supply (See http://hl7.org/fhir/SearchParameter/SupplyDelivery-receiver).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, + // http://hl7.org/fhir/SearchParameter/clinical-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyDelivery.patient', description: - 'Patient for whom the item is supplied (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', }, - supplier: { + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-receiver + receiver: { type: GraphQLString, - description: - 'Dispenser (See http://hl7.org/fhir/SearchParameter/SupplyDelivery-supplier).', + fhirtype: 'reference', + xpath: 'SupplyDelivery.receiver', + description: 'Who collected the Supply', }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-status status: { type: TokenScalar, - description: - 'in-progress | completed | abandoned | entered-in-error (See http://hl7.org/fhir/SearchParameter/SupplyDelivery-status).', + fhirtype: 'token', + xpath: 'SupplyDelivery.status', + description: 'in-progress | completed | abandoned | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-supplier + supplier: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyDelivery.supplier', + description: 'Dispenser', }, }; diff --git a/src/resources/3_0_1/parameters/supplyrequest.parameters.js b/src/resources/3_0_1/parameters/supplyrequest.parameters.js index 7ee63c7b..846c0c43 100644 --- a/src/resources/3_0_1/parameters/supplyrequest.parameters.js +++ b/src/resources/3_0_1/parameters/supplyrequest.parameters.js @@ -1,6 +1,6 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,34 +8,48 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the supplyrequest query */ module.exports = { - requester: { - type: GraphQLString, - description: - 'Individual making the request (See http://hl7.org/fhir/SearchParameter/SupplyRequest-requester).', - }, + // http://hl7.org/fhir/SearchParameter/clinical-date date: { type: DateScalar, + fhirtype: 'date', + xpath: 'SupplyRequest.authoredOn', description: - 'When the request was made (See http://hl7.org/fhir/SearchParameter/clinical-date).', + "Multiple Resources: * [Consent](consent.html): When this Consent was created or indexed * [SupplyRequest](supplyrequest.html): When the request was made * [RiskAssessment](riskassessment.html): When was assessment made? * [CareTeam](careteam.html): Time period team covers * [FamilyMemberHistory](familymemberhistory.html): When history was captured/updated * [Encounter](encounter.html): A date within the period the Encounter lasted * [AllergyIntolerance](allergyintolerance.html): Date record was believed accurate * [CarePlan](careplan.html): Time period plan covers * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [Procedure](procedure.html): Date/Period the procedure was performed * [List](list.html): When the list was prepared * [Immunization](immunization.html): Vaccination (non)-Administration Date * [Flag](flag.html): Time period when flag is active * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Composition](composition.html): Composition editing time * [DetectedIssue](detectedissue.html): When identified * [ClinicalImpression](clinicalimpression.html): When the assessment was documented ", }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyRequest.identifier', description: - 'Unique identifier (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', - }, - supplier: { - type: GraphQLString, - description: - 'Who is intended to fulfill the request (See http://hl7.org/fhir/SearchParameter/SupplyRequest-supplier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-category category: { type: TokenScalar, - description: - 'The kind of supply (central, non-stock, etc.) (See http://hl7.org/fhir/SearchParameter/SupplyRequest-category).', + fhirtype: 'token', + xpath: 'SupplyRequest.category', + description: 'The kind of supply (central, non-stock, etc.)', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyRequest.requester.agent', + description: 'Individual making the request', }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-status status: { type: TokenScalar, - description: - 'draft | active | suspended + (See http://hl7.org/fhir/SearchParameter/SupplyRequest-status).', + fhirtype: 'token', + xpath: 'SupplyRequest.status', + description: 'draft | active | suspended +', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-supplier + supplier: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyRequest.supplier', + description: 'Who is intended to fulfill the request', }, }; diff --git a/src/resources/3_0_1/parameters/task.parameters.js b/src/resources/3_0_1/parameters/task.parameters.js index 2b817ba3..07a42701 100644 --- a/src/resources/3_0_1/parameters/task.parameters.js +++ b/src/resources/3_0_1/parameters/task.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -8,104 +8,145 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the task query */ module.exports = { - owner: { - type: GraphQLString, - description: - 'Search by task owner (See http://hl7.org/fhir/SearchParameter/Task-owner).', + // http://hl7.org/fhir/SearchParameter/Task-authored-on + authored_on: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Task.authoredOn', + description: 'Search by creation date', }, - requester: { + // http://hl7.org/fhir/SearchParameter/Task-based-on + based_on: { type: GraphQLString, - description: - 'Search by task requester (See http://hl7.org/fhir/SearchParameter/Task-requester).', - }, - identifier: { - type: TokenScalar, - description: - 'Search for a task instance by its business identifier (See http://hl7.org/fhir/SearchParameter/Task-identifier).', + fhirtype: 'reference', + xpath: 'Task.basedOn', + description: 'Search by requests this task is based on', }, + // http://hl7.org/fhir/SearchParameter/Task-business-status business_status: { type: TokenScalar, - description: - 'Search by business status (See http://hl7.org/fhir/SearchParameter/Task-business-status).', - }, - period: { - type: DateScalar, - description: - 'Search by period Task is/was underway (See http://hl7.org/fhir/SearchParameter/Task-period).', + fhirtype: 'token', + xpath: 'Task.businessStatus', + description: 'Search by business status', }, + // http://hl7.org/fhir/SearchParameter/Task-code code: { type: TokenScalar, - description: - 'Search by task code (See http://hl7.org/fhir/SearchParameter/Task-code).', - }, - performer: { - type: TokenScalar, - description: - 'Search by recommended type of performer (e.g., Requester, Performer, Scheduler). (See http://hl7.org/fhir/SearchParameter/Task-performer).', + fhirtype: 'token', + xpath: 'Task.code', + description: 'Search by task code', }, - subject: { + // http://hl7.org/fhir/SearchParameter/Task-context + context: { type: GraphQLString, - description: - 'Search by subject (See http://hl7.org/fhir/SearchParameter/Task-subject).', + fhirtype: 'reference', + xpath: 'Task.context', + description: 'Search by encounter or episode', }, + // http://hl7.org/fhir/SearchParameter/Task-focus focus: { type: GraphQLString, - description: - 'Search by task focus (See http://hl7.org/fhir/SearchParameter/Task-focus).', - }, - part_of: { - type: GraphQLString, - description: - 'Search by task this task is part of (See http://hl7.org/fhir/SearchParameter/Task-part-of).', + fhirtype: 'reference', + xpath: 'Task.focus', + description: 'Search by task focus', }, - priority: { + // http://hl7.org/fhir/SearchParameter/Task-group-identifier + group_identifier: { type: TokenScalar, - description: - 'Search by task priority (See http://hl7.org/fhir/SearchParameter/Task-priority).', + fhirtype: 'token', + xpath: 'Task.groupIdentifier', + description: 'Search by group identifier', }, - authored_on: { - type: DateScalar, - description: - 'Search by creation date (See http://hl7.org/fhir/SearchParameter/Task-authored-on).', + // http://hl7.org/fhir/SearchParameter/Task-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.identifier', + description: 'Search for a task instance by its business identifier', }, + // http://hl7.org/fhir/SearchParameter/Task-intent intent: { type: TokenScalar, - description: - 'Search by task intent (See http://hl7.org/fhir/SearchParameter/Task-intent).', + fhirtype: 'token', + xpath: 'Task.intent', + description: 'Search by task intent', }, - group_identifier: { - type: TokenScalar, - description: - 'Search by group identifier (See http://hl7.org/fhir/SearchParameter/Task-group-identifier).', + // http://hl7.org/fhir/SearchParameter/Task-modified + modified: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Task.lastModified', + description: 'Search by last modification date', }, - based_on: { + // http://hl7.org/fhir/SearchParameter/Task-organization + organization: { type: GraphQLString, - description: - 'Search by requests this task is based on (See http://hl7.org/fhir/SearchParameter/Task-based-on).', + fhirtype: 'reference', + xpath: 'Task.requester.onBehalfOf', + description: 'Search by responsible organization', }, - patient: { + // http://hl7.org/fhir/SearchParameter/Task-owner + owner: { type: GraphQLString, - description: - 'Search by patient (See http://hl7.org/fhir/SearchParameter/Task-patient).', + fhirtype: 'reference', + xpath: 'Task.owner', + description: 'Search by task owner', }, - organization: { + // http://hl7.org/fhir/SearchParameter/Task-part-of + part_of: { type: GraphQLString, - description: - 'Search by responsible organization (See http://hl7.org/fhir/SearchParameter/Task-organization).', + fhirtype: 'reference', + xpath: 'Task.partOf', + description: 'Search by task this task is part of', }, - context: { + // http://hl7.org/fhir/SearchParameter/Task-patient + patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.for', + description: 'Search by patient', + }, + // http://hl7.org/fhir/SearchParameter/Task-performer + performer: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.performerType', description: - 'Search by encounter or episode (See http://hl7.org/fhir/SearchParameter/Task-context).', + 'Search by recommended type of performer (e.g., Requester, Performer, Scheduler).', }, - modified: { + // http://hl7.org/fhir/SearchParameter/Task-period + period: { type: DateScalar, - description: - 'Search by last modification date (See http://hl7.org/fhir/SearchParameter/Task-modified).', + fhirtype: 'date', + xpath: 'Task.executionPeriod', + description: 'Search by period Task is/was underway', }, + // http://hl7.org/fhir/SearchParameter/Task-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.priority', + description: 'Search by task priority', + }, + // http://hl7.org/fhir/SearchParameter/Task-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.requester.agent', + description: 'Search by task requester', + }, + // http://hl7.org/fhir/SearchParameter/Task-status status: { type: TokenScalar, - description: - 'Search by task status (See http://hl7.org/fhir/SearchParameter/Task-status).', + fhirtype: 'token', + xpath: 'Task.status', + description: 'Search by task status', + }, + // http://hl7.org/fhir/SearchParameter/Task-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.for', + description: 'Search by subject', }, }; diff --git a/src/resources/3_0_1/parameters/testreport.parameters.js b/src/resources/3_0_1/parameters/testreport.parameters.js index 31c1c7da..2795e35f 100644 --- a/src/resources/3_0_1/parameters/testreport.parameters.js +++ b/src/resources/3_0_1/parameters/testreport.parameters.js @@ -1,7 +1,7 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,34 +9,46 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the testreport query */ module.exports = { - result: { + // http://hl7.org/fhir/SearchParameter/TestReport-identifier + identifier: { type: TokenScalar, - description: - 'The result disposition of the test execution (See http://hl7.org/fhir/SearchParameter/TestReport-result).', + fhirtype: 'token', + xpath: 'TestReport.identifier', + description: 'An external identifier for the test report', }, - identifier: { + // http://hl7.org/fhir/SearchParameter/TestReport-issued + issued: { + type: DateScalar, + fhirtype: 'date', + xpath: 'TestReport.issued', + description: 'The test report generation date', + }, + // http://hl7.org/fhir/SearchParameter/TestReport-participant + participant: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'TestReport.participant.uri', + description: 'The reference to a participant in the test execution', + }, + // http://hl7.org/fhir/SearchParameter/TestReport-result + result: { type: TokenScalar, - description: - 'An external identifier for the test report (See http://hl7.org/fhir/SearchParameter/TestReport-identifier).', + fhirtype: 'token', + xpath: 'TestReport.result', + description: 'The result disposition of the test execution', }, + // http://hl7.org/fhir/SearchParameter/TestReport-tester tester: { type: GraphQLString, - description: - 'The name of the testing organization (See http://hl7.org/fhir/SearchParameter/TestReport-tester).', + fhirtype: 'string', + xpath: 'TestReport.tester', + description: 'The name of the testing organization', }, + // http://hl7.org/fhir/SearchParameter/TestReport-testscript testscript: { type: GraphQLString, - description: - 'The test script executed to produce this report (See http://hl7.org/fhir/SearchParameter/TestReport-testscript).', - }, - issued: { - type: DateScalar, - description: - 'The test report generation date (See http://hl7.org/fhir/SearchParameter/TestReport-issued).', - }, - participant: { - type: UriScalar, - description: - 'The reference to a participant in the test execution (See http://hl7.org/fhir/SearchParameter/TestReport-participant).', + fhirtype: 'reference', + xpath: 'TestReport.testScript', + description: 'The test script executed to produce this report', }, }; diff --git a/src/resources/3_0_1/parameters/testscript.parameters.js b/src/resources/3_0_1/parameters/testscript.parameters.js index 0db4e776..2ec03acf 100644 --- a/src/resources/3_0_1/parameters/testscript.parameters.js +++ b/src/resources/3_0_1/parameters/testscript.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const TokenScalar = require('../scalars/token.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -9,59 +9,81 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the testscript query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/TestScript-date date: { type: DateScalar, - description: - 'The test script publication date (See http://hl7.org/fhir/SearchParameter/TestScript-date).', + fhirtype: 'date', + xpath: 'TestScript.date', + description: 'The test script publication date', }, + // http://hl7.org/fhir/SearchParameter/TestScript-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestScript.description', + description: 'The description of the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-identifier identifier: { type: TokenScalar, - description: - 'External identifier for the test script (See http://hl7.org/fhir/SearchParameter/TestScript-identifier).', + fhirtype: 'token', + xpath: 'TestScript.identifier', + description: 'External identifier for the test script', }, + // http://hl7.org/fhir/SearchParameter/TestScript-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the test script (See http://hl7.org/fhir/SearchParameter/TestScript-jurisdiction).', + fhirtype: 'token', + xpath: 'TestScript.jurisdiction', + description: 'Intended jurisdiction for the test script', }, + // http://hl7.org/fhir/SearchParameter/TestScript-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the test script (See http://hl7.org/fhir/SearchParameter/TestScript-name).', - }, - description: { - type: GraphQLString, - description: - 'The description of the test script (See http://hl7.org/fhir/SearchParameter/TestScript-description).', + fhirtype: 'string', + xpath: 'TestScript.name', + description: 'Computationally friendly name of the test script', }, + // http://hl7.org/fhir/SearchParameter/TestScript-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the test script (See http://hl7.org/fhir/SearchParameter/TestScript-publisher).', + fhirtype: 'string', + xpath: 'TestScript.publisher', + description: 'Name of the publisher of the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestScript.status', + description: 'The current status of the test script', }, + // http://hl7.org/fhir/SearchParameter/TestScript-testscript-capability testscript_capability: { type: GraphQLString, - description: - 'TestScript required and validated capability (See http://hl7.org/fhir/SearchParameter/TestScript-testscript-capability).', + fhirtype: 'string', + xpath: 'TestScript.metadata.capability.description', + description: 'TestScript required and validated capability', }, + // http://hl7.org/fhir/SearchParameter/TestScript-title title: { type: GraphQLString, - description: - 'The human-friendly name of the test script (See http://hl7.org/fhir/SearchParameter/TestScript-title).', - }, - version: { - type: TokenScalar, - description: - 'The business version of the test script (See http://hl7.org/fhir/SearchParameter/TestScript-version).', + fhirtype: 'string', + xpath: 'TestScript.title', + description: 'The human-friendly name of the test script', }, + // http://hl7.org/fhir/SearchParameter/TestScript-url url: { type: UriScalar, - description: - 'The uri that identifies the test script (See http://hl7.org/fhir/SearchParameter/TestScript-url).', + fhirtype: 'uri', + xpath: 'TestScript.url', + description: 'The uri that identifies the test script', }, - status: { + // http://hl7.org/fhir/SearchParameter/TestScript-version + version: { type: TokenScalar, - description: - 'The current status of the test script (See http://hl7.org/fhir/SearchParameter/TestScript-status).', + fhirtype: 'token', + xpath: 'TestScript.version', + description: 'The business version of the test script', }, }; diff --git a/src/resources/3_0_1/parameters/valueset.parameters.js b/src/resources/3_0_1/parameters/valueset.parameters.js index 12c0ba8c..218a1739 100644 --- a/src/resources/3_0_1/parameters/valueset.parameters.js +++ b/src/resources/3_0_1/parameters/valueset.parameters.js @@ -1,7 +1,7 @@ -const DateScalar = require('../scalars/date.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const TokenScalar = require('../scalars/token.scalar'); const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); /** * @name exports @@ -9,64 +9,89 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the valueset query */ module.exports = { + // http://hl7.org/fhir/SearchParameter/ValueSet-date date: { type: DateScalar, - description: - 'The value set publication date (See http://hl7.org/fhir/SearchParameter/ValueSet-date).', + fhirtype: 'date', + xpath: 'ValueSet.date', + description: 'The value set publication date', }, - reference: { + // http://hl7.org/fhir/SearchParameter/ValueSet-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ValueSet.description', + description: 'The description of the value set', + }, + // http://hl7.org/fhir/SearchParameter/ValueSet-expansion + expansion: { type: UriScalar, - description: - 'A code system included or excluded in the value set or an imported value set (See http://hl7.org/fhir/SearchParameter/ValueSet-reference).', + fhirtype: 'uri', + xpath: 'ValueSet.expansion.identifier', + description: 'Uniquely identifies this expansion', }, + // http://hl7.org/fhir/SearchParameter/ValueSet-identifier identifier: { type: TokenScalar, - description: - 'External identifier for the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-identifier).', + fhirtype: 'token', + xpath: 'ValueSet.identifier', + description: 'External identifier for the value set', }, + // http://hl7.org/fhir/SearchParameter/ValueSet-jurisdiction jurisdiction: { type: TokenScalar, - description: - 'Intended jurisdiction for the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-jurisdiction).', + fhirtype: 'token', + xpath: 'ValueSet.jurisdiction', + description: 'Intended jurisdiction for the value set', }, + // http://hl7.org/fhir/SearchParameter/ValueSet-name name: { type: GraphQLString, - description: - 'Computationally friendly name of the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-name).', - }, - description: { - type: GraphQLString, - description: - 'The description of the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-description).', + fhirtype: 'string', + xpath: 'ValueSet.name', + description: 'Computationally friendly name of the value set', }, + // http://hl7.org/fhir/SearchParameter/ValueSet-publisher publisher: { type: GraphQLString, - description: - 'Name of the publisher of the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-publisher).', + fhirtype: 'string', + xpath: 'ValueSet.publisher', + description: 'Name of the publisher of the value set', }, - title: { - type: GraphQLString, + // http://hl7.org/fhir/SearchParameter/ValueSet-reference + reference: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ValueSet.compose.include.system', description: - 'The human-friendly name of the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-title).', + 'A code system included or excluded in the value set or an imported value set', }, - version: { + // http://hl7.org/fhir/SearchParameter/ValueSet-status + status: { type: TokenScalar, - description: - 'The business version of the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-version).', + fhirtype: 'token', + xpath: 'ValueSet.status', + description: 'The current status of the value set', + }, + // http://hl7.org/fhir/SearchParameter/ValueSet-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ValueSet.title', + description: 'The human-friendly name of the value set', }, + // http://hl7.org/fhir/SearchParameter/ValueSet-url url: { type: UriScalar, - description: - 'The uri that identifies the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-url).', + fhirtype: 'uri', + xpath: 'ValueSet.url', + description: 'The uri that identifies the value set', }, - status: { + // http://hl7.org/fhir/SearchParameter/ValueSet-version + version: { type: TokenScalar, - description: - 'The current status of the value set (See http://hl7.org/fhir/SearchParameter/ValueSet-status).', - }, - expansion: { - type: UriScalar, - description: - 'Uniquely identifies this expansion (See http://hl7.org/fhir/SearchParameter/ValueSet-expansion).', + fhirtype: 'token', + xpath: 'ValueSet.version', + description: 'The business version of the value set', }, }; diff --git a/src/resources/3_0_1/parameters/visionprescription.parameters.js b/src/resources/3_0_1/parameters/visionprescription.parameters.js index e163b886..e405df53 100644 --- a/src/resources/3_0_1/parameters/visionprescription.parameters.js +++ b/src/resources/3_0_1/parameters/visionprescription.parameters.js @@ -1,6 +1,6 @@ -const TokenScalar = require('../scalars/token.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -8,29 +8,42 @@ const { GraphQLString } = require('graphql'); * @summary Arguments for the visionprescription query */ module.exports = { - prescriber: { - type: GraphQLString, - description: - 'Who authorizes the vision product (See http://hl7.org/fhir/SearchParameter/VisionPrescription-prescriber).', - }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier identifier: { type: TokenScalar, + fhirtype: 'token', + xpath: 'VisionPrescription.identifier', description: - 'Return prescriptions with this external identifier (See http://hl7.org/fhir/SearchParameter/clinical-identifier).', + 'Multiple Resources: * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [Goal](goal.html): External Ids for this goal * [Consent](consent.html): Identifier for this record (external references) * [DocumentReference](documentreference.html): Master Version Specific Identifier * [SupplyRequest](supplyrequest.html): Unique identifier * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [CareTeam](careteam.html): External Ids for this team * [ImagingStudy](imagingstudy.html): Other identifiers for the Study * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [DeviceRequest](devicerequest.html): Business identifier for request/order * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [Procedure](procedure.html): A unique identifier for a procedure * [List](list.html): Business identifier * [Immunization](immunization.html): Business identifier * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier * [ProcedureRequest](procedurerequest.html): Identifiers assigned to this order * [Observation](observation.html): The unique id for a particular observation * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Condition](condition.html): A unique identifier of the condition record * [Composition](composition.html): Logical identifier of composition (version-independent) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [SupplyDelivery](supplydelivery.html): External identifier ', }, + // http://hl7.org/fhir/SearchParameter/clinical-patient patient: { type: GraphQLString, + fhirtype: 'reference', + xpath: 'VisionPrescription.patient', + description: + 'Multiple Resources: * [ReferralRequest](referralrequest.html): Who the referral is about * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [Goal](goal.html): Who this goal is intended for * [Consent](consent.html): Who the consent applies to * [DocumentReference](documentreference.html): Who/what is the subject of the document * [ImagingManifest](imagingmanifest.html): Subject of the ImagingManifest (or a DICOM Key Object Selection which it represents) * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [CareTeam](careteam.html): Who care team is for * [ImagingStudy](imagingstudy.html): Who the study is about * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Encounter](encounter.html): The patient ro group present at the encounter * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who care plan is for * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [Procedure](procedure.html): Search by subject - a patient * [List](list.html): If all resources have the same subject * [Immunization](immunization.html): The patient for the vaccination record * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for * [ProcedureRequest](procedurerequest.html): Search by subject - a patient * [Flag](flag.html): The identity of a subject to list flags for * [Observation](observation.html): The subject that the observation is about (if patient) * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Condition](condition.html): Who has the condition? * [Composition](composition.html): Who and/or what the composition is about * [DetectedIssue](detectedissue.html): Associated patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [ClinicalImpression](clinicalimpression.html): Patient or group assessed ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'VisionPrescription.encounter', description: - 'The identity of a patient to list dispenses for (See http://hl7.org/fhir/SearchParameter/clinical-patient).', + 'Multiple Resources: * [DocumentReference](documentreference.html): Context of the document content * [RiskAssessment](riskassessment.html): Where was assessment performed? * [DeviceRequest](devicerequest.html): Encounter or Episode during which request was created * [Procedure](procedure.html): Search by encounter * [List](list.html): Context in which list created * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier * [ProcedureRequest](procedurerequest.html): An encounter in which this request is made * [Flag](flag.html): Alert relevant during encounter * [Observation](observation.html): Encounter related to the observation * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Composition](composition.html): Context of the Composition ', }, + // http://hl7.org/fhir/SearchParameter/VisionPrescription-datewritten datewritten: { type: DateScalar, - description: - 'Return prescriptions written on this date (See http://hl7.org/fhir/SearchParameter/VisionPrescription-datewritten).', + fhirtype: 'date', + xpath: 'VisionPrescription.dateWritten', + description: 'Return prescriptions written on this date', }, - encounter: { + // http://hl7.org/fhir/SearchParameter/VisionPrescription-prescriber + prescriber: { type: GraphQLString, - description: - 'Return prescriptions with this encounter identifier (See http://hl7.org/fhir/SearchParameter/clinical-encounter).', + fhirtype: 'reference', + xpath: 'VisionPrescription.prescriber', + description: 'Who authorizes the vision product', }, }; diff --git a/src/resources/3_0_1/profiles/__mocks__/undefined.export.js b/src/resources/3_0_1/profiles/__mocks__/undefined.export.js deleted file mode 100644 index d0f5f3a7..00000000 --- a/src/resources/3_0_1/profiles/__mocks__/undefined.export.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = undefined; diff --git a/src/resources/3_0_1/profiles/account/mutation.js b/src/resources/3_0_1/profiles/account/mutation.js index c7442c7f..cee43075 100644 --- a/src/resources/3_0_1/profiles/account/mutation.js +++ b/src/resources/3_0_1/profiles/account/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AccountSchema = require('../../schemas/account.schema'); +const AccountSchema = require('../../schemas/account.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AccountInput = require('../../inputs/account.input'); +const AccountInput = require('../../inputs/account.input.js'); -// Resolvers -const { - accountCreateResolver, - accountUpdateResolver, - accountDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createAccount, updateAccount, removeAccount } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Account', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Account record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Account record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.AccountCreateMutation - * @summary AccountCreate Mutation. + * @summary AccountCreate mutation. */ module.exports.AccountCreateMutation = { - args: WriteArgs, - description: 'Create a Account', - resolve: scopeInvariant(scopeOptions, accountCreateResolver), + description: 'Create a Account record', + resolve: scopeInvariant(scopeOptions, createAccount), type: AccountSchema, + args: WriteArgs, }; /** * @name exports.AccountUpdateMutation - * @summary AccountUpdate Mutation. + * @summary AccountUpdate mutation. */ module.exports.AccountUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Accounts', - resolve: scopeInvariant(scopeOptions, accountUpdateResolver), + description: 'Update a Account record', + resolve: scopeInvariant(scopeOptions, updateAccount), type: AccountSchema, + args: WriteArgs, }; /** - * @name exports.AccountDeleteMutation - * @summary AccountDelete Mutation. + * @name exports.AccountRemoveMutation + * @summary AccountRemove mutation. */ -module.exports.AccountDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Account', - resolve: scopeInvariant(scopeOptions, accountDeleteResolver), +module.exports.AccountRemoveMutation = { + description: 'Remove a Account record', + resolve: scopeInvariant(scopeOptions, removeAccount), type: AccountSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/account/query.js b/src/resources/3_0_1/profiles/account/query.js index c6bbbb83..123ad19d 100644 --- a/src/resources/3_0_1/profiles/account/query.js +++ b/src/resources/3_0_1/profiles/account/query.js @@ -1,55 +1,60 @@ // Schemas -const AccountSchema = require('../../schemas/account.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AccountSchema = require('../../schemas/account.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AccountArgs = require('../../parameters/account.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AccountArgs = require('../../parameters/account.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, AccountArgs); // Resolvers const { - accountResolver, - accountListResolver, - accountInstanceResolver, + getAccount, + getAccountList, + getAccountInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Account', action: 'read', - version: '3_0_1', }; /** * @name exports.AccountQuery - * @summary Account Query. + * @summary Account query. */ module.exports.AccountQuery = { - args: Object.assign({}, CommonArgs, AccountArgs), description: 'Query for a single Account', - resolve: scopeInvariant(scopeOptions, accountResolver), + resolve: scopeInvariant(scopeOptions, getAccount), type: AccountSchema, + args: args, }; /** * @name exports.AccountListQuery - * @summary AccountList Query. + * @summary Account query. */ module.exports.AccountListQuery = { - args: Object.assign({}, CommonArgs, AccountArgs), - description: 'Query for multiple Accounts', - resolve: scopeInvariant(scopeOptions, accountListResolver), + description: 'Query for a more than or just one Account', + resolve: scopeInvariant(scopeOptions, getAccountList), type: BundleSchema, + args: args, }; /** * @name exports.AccountInstanceQuery - * @summary AccountInstance Query. + * @summary Account query. */ module.exports.AccountInstanceQuery = { - description: 'Get information about a single Account', - resolve: scopeInvariant(scopeOptions, accountInstanceResolver), + description: 'Access information about a single Account', + resolve: scopeInvariant(scopeOptions, getAccountInstance), type: AccountSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/account/index.js b/src/resources/3_0_1/profiles/account/register.js similarity index 92% rename from src/resources/3_0_1/profiles/account/index.js rename to src/resources/3_0_1/profiles/account/register.js index 1c36158c..980e833e 100644 --- a/src/resources/3_0_1/profiles/account/index.js +++ b/src/resources/3_0_1/profiles/account/register.js @@ -1,15 +1,15 @@ +const { + AccountCreateMutation, + AccountUpdateMutation, + AccountRemoveMutation, +} = require('./mutation'); + const { AccountQuery, AccountListQuery, AccountInstanceQuery, } = require('./query'); -const { - AccountCreateMutation, - AccountUpdateMutation, - AccountDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AccountCreate: AccountCreateMutation, AccountUpdate: AccountUpdateMutation, - AccountDelete: AccountDeleteMutation, + AccountRemove: AccountRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Account', path: '/3_0_1/Account/:id', query: AccountInstanceQuery, diff --git a/src/resources/3_0_1/profiles/account/resolver.js b/src/resources/3_0_1/profiles/account/resolver.js index 76b5cb0c..ba0c56d2 100644 --- a/src/resources/3_0_1/profiles/account/resolver.js +++ b/src/resources/3_0_1/profiles/account/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.accountResolver + * @name exports.getAccount * @static - * @summary Account Resolver. + * @summary Account resolver. */ -module.exports.accountResolver = function accountResolver( +module.exports.getAccount = function getAccount( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountListResolver + * @name exports.getAccountList * @static - * @summary Account List Resolver. + * @summary Account list resolver. */ -module.exports.accountListResolver = function accountListResolver( +module.exports.getAccountList = function getAccountList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountInstanceResolver + * @name exports.getAccountInstance * @static - * @summary Account Instance Resolver. + * @summary Account instance resolver. */ -module.exports.accountInstanceResolver = function accountInstanceResolver( +module.exports.getAccountInstance = function getAccountInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountCreateResolver + * @name exports.createAccount * @static - * @summary Account Create Resolver. + * @summary Create Account resolver. */ -module.exports.accountCreateResolver = function accountCreateResolver( +module.exports.createAccount = function createAccount( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountUpdateResolver + * @name exports.updateAccount * @static - * @summary Account Update Resolver. + * @summary Update Account resolver. */ -module.exports.accountUpdateResolver = function accountUpdateResolver( +module.exports.updateAccount = function updateAccount( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.accountDeleteResolver + * @name exports.removeAccount * @static - * @summary Account Delete Resolver. + * @summary Remove Account resolver. */ -module.exports.accountDeleteResolver = function accountDeleteResolver( +module.exports.removeAccount = function removeAccount( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/activitydefinition/mutation.js b/src/resources/3_0_1/profiles/activitydefinition/mutation.js index 2d423183..87d1e943 100644 --- a/src/resources/3_0_1/profiles/activitydefinition/mutation.js +++ b/src/resources/3_0_1/profiles/activitydefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ActivityDefinitionSchema = require('../../schemas/activitydefinition.schema'); +const ActivityDefinitionSchema = require('../../schemas/activitydefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ActivityDefinitionInput = require('../../inputs/activitydefinition.input'); +const ActivityDefinitionInput = require('../../inputs/activitydefinition.input.js'); -// Resolvers -const { - activitydefinitionCreateResolver, - activitydefinitionUpdateResolver, - activitydefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createActivityDefinition, + updateActivityDefinition, + removeActivityDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ActivityDefinition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ActivityDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ActivityDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ActivityDefinitionCreateMutation - * @summary ActivityDefinitionCreate Mutation. + * @summary ActivityDefinitionCreate mutation. */ module.exports.ActivityDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a ActivityDefinition', - resolve: scopeInvariant(scopeOptions, activitydefinitionCreateResolver), + description: 'Create a ActivityDefinition record', + resolve: scopeInvariant(scopeOptions, createActivityDefinition), type: ActivityDefinitionSchema, + args: WriteArgs, }; /** * @name exports.ActivityDefinitionUpdateMutation - * @summary ActivityDefinitionUpdate Mutation. + * @summary ActivityDefinitionUpdate mutation. */ module.exports.ActivityDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ActivityDefinitions', - resolve: scopeInvariant(scopeOptions, activitydefinitionUpdateResolver), + description: 'Update a ActivityDefinition record', + resolve: scopeInvariant(scopeOptions, updateActivityDefinition), type: ActivityDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.ActivityDefinitionDeleteMutation - * @summary ActivityDefinitionDelete Mutation. + * @name exports.ActivityDefinitionRemoveMutation + * @summary ActivityDefinitionRemove mutation. */ -module.exports.ActivityDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ActivityDefinition', - resolve: scopeInvariant(scopeOptions, activitydefinitionDeleteResolver), +module.exports.ActivityDefinitionRemoveMutation = { + description: 'Remove a ActivityDefinition record', + resolve: scopeInvariant(scopeOptions, removeActivityDefinition), type: ActivityDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/activitydefinition/query.js b/src/resources/3_0_1/profiles/activitydefinition/query.js index 6ac713b3..db0b1360 100644 --- a/src/resources/3_0_1/profiles/activitydefinition/query.js +++ b/src/resources/3_0_1/profiles/activitydefinition/query.js @@ -1,55 +1,65 @@ // Schemas -const ActivityDefinitionSchema = require('../../schemas/activitydefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ActivityDefinitionSchema = require('../../schemas/activitydefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ActivityDefinitionArgs = require('../../parameters/activitydefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ActivityDefinitionArgs = require('../../parameters/activitydefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ActivityDefinitionArgs, +); // Resolvers const { - activitydefinitionResolver, - activitydefinitionListResolver, - activitydefinitionInstanceResolver, + getActivityDefinition, + getActivityDefinitionList, + getActivityDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ActivityDefinition', action: 'read', - version: '3_0_1', }; /** * @name exports.ActivityDefinitionQuery - * @summary ActivityDefinition Query. + * @summary ActivityDefinition query. */ module.exports.ActivityDefinitionQuery = { - args: Object.assign({}, CommonArgs, ActivityDefinitionArgs), description: 'Query for a single ActivityDefinition', - resolve: scopeInvariant(scopeOptions, activitydefinitionResolver), + resolve: scopeInvariant(scopeOptions, getActivityDefinition), type: ActivityDefinitionSchema, + args: args, }; /** * @name exports.ActivityDefinitionListQuery - * @summary ActivityDefinitionList Query. + * @summary ActivityDefinition query. */ module.exports.ActivityDefinitionListQuery = { - args: Object.assign({}, CommonArgs, ActivityDefinitionArgs), - description: 'Query for multiple ActivityDefinitions', - resolve: scopeInvariant(scopeOptions, activitydefinitionListResolver), + description: 'Query for a more than or just one ActivityDefinition', + resolve: scopeInvariant(scopeOptions, getActivityDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.ActivityDefinitionInstanceQuery - * @summary ActivityDefinitionInstance Query. + * @summary ActivityDefinition query. */ module.exports.ActivityDefinitionInstanceQuery = { - description: 'Get information about a single ActivityDefinition', - resolve: scopeInvariant(scopeOptions, activitydefinitionInstanceResolver), + description: 'Access information about a single ActivityDefinition', + resolve: scopeInvariant(scopeOptions, getActivityDefinitionInstance), type: ActivityDefinitionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/activitydefinition/index.js b/src/resources/3_0_1/profiles/activitydefinition/register.js similarity index 91% rename from src/resources/3_0_1/profiles/activitydefinition/index.js rename to src/resources/3_0_1/profiles/activitydefinition/register.js index e0fb7880..8f78a2b3 100644 --- a/src/resources/3_0_1/profiles/activitydefinition/index.js +++ b/src/resources/3_0_1/profiles/activitydefinition/register.js @@ -1,15 +1,15 @@ +const { + ActivityDefinitionCreateMutation, + ActivityDefinitionUpdateMutation, + ActivityDefinitionRemoveMutation, +} = require('./mutation'); + const { ActivityDefinitionQuery, ActivityDefinitionListQuery, ActivityDefinitionInstanceQuery, } = require('./query'); -const { - ActivityDefinitionCreateMutation, - ActivityDefinitionUpdateMutation, - ActivityDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ActivityDefinitionCreate: ActivityDefinitionCreateMutation, ActivityDefinitionUpdate: ActivityDefinitionUpdateMutation, - ActivityDefinitionDelete: ActivityDefinitionDeleteMutation, + ActivityDefinitionRemove: ActivityDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ActivityDefinition', path: '/3_0_1/ActivityDefinition/:id', query: ActivityDefinitionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/activitydefinition/resolver.js b/src/resources/3_0_1/profiles/activitydefinition/resolver.js index 0b78cdeb..2ef5dc3c 100644 --- a/src/resources/3_0_1/profiles/activitydefinition/resolver.js +++ b/src/resources/3_0_1/profiles/activitydefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.activitydefinitionResolver + * @name exports.getActivityDefinition * @static - * @summary ActivityDefinition Resolver. + * @summary ActivityDefinition resolver. */ -module.exports.activitydefinitionResolver = function activitydefinitionResolver( +module.exports.getActivityDefinition = function getActivityDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.activitydefinitionListResolver + * @name exports.getActivityDefinitionList * @static - * @summary ActivityDefinition List Resolver. + * @summary ActivityDefinition list resolver. */ -module.exports.activitydefinitionListResolver = function activitydefinitionListResolver( +module.exports.getActivityDefinitionList = function getActivityDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.activitydefinitionInstanceResolver + * @name exports.getActivityDefinitionInstance * @static - * @summary ActivityDefinition Instance Resolver. + * @summary ActivityDefinition instance resolver. */ -module.exports.activitydefinitionInstanceResolver = function activitydefinitionInstanceResolver( +module.exports.getActivityDefinitionInstance = function getActivityDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.activitydefinitionCreateResolver + * @name exports.createActivityDefinition * @static - * @summary ActivityDefinition Create Resolver. + * @summary Create ActivityDefinition resolver. */ -module.exports.activitydefinitionCreateResolver = function activitydefinitionCreateResolver( +module.exports.createActivityDefinition = function createActivityDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.activitydefinitionUpdateResolver + * @name exports.updateActivityDefinition * @static - * @summary ActivityDefinition Update Resolver. + * @summary Update ActivityDefinition resolver. */ -module.exports.activitydefinitionUpdateResolver = function activitydefinitionUpdateResolver( +module.exports.updateActivityDefinition = function updateActivityDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.activitydefinitionDeleteResolver + * @name exports.removeActivityDefinition * @static - * @summary ActivityDefinition Delete Resolver. + * @summary Remove ActivityDefinition resolver. */ -module.exports.activitydefinitionDeleteResolver = function activitydefinitionDeleteResolver( +module.exports.removeActivityDefinition = function removeActivityDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/adverseevent/mutation.js b/src/resources/3_0_1/profiles/adverseevent/mutation.js index 43e00791..78090b09 100644 --- a/src/resources/3_0_1/profiles/adverseevent/mutation.js +++ b/src/resources/3_0_1/profiles/adverseevent/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AdverseEventSchema = require('../../schemas/adverseevent.schema'); +const AdverseEventSchema = require('../../schemas/adverseevent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AdverseEventInput = require('../../inputs/adverseevent.input'); +const AdverseEventInput = require('../../inputs/adverseevent.input.js'); -// Resolvers -const { - adverseeventCreateResolver, - adverseeventUpdateResolver, - adverseeventDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAdverseEvent, + updateAdverseEvent, + removeAdverseEvent, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AdverseEvent', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a AdverseEvent record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a AdverseEvent record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.AdverseEventCreateMutation - * @summary AdverseEventCreate Mutation. + * @summary AdverseEventCreate mutation. */ module.exports.AdverseEventCreateMutation = { - args: WriteArgs, - description: 'Create a AdverseEvent', - resolve: scopeInvariant(scopeOptions, adverseeventCreateResolver), + description: 'Create a AdverseEvent record', + resolve: scopeInvariant(scopeOptions, createAdverseEvent), type: AdverseEventSchema, + args: WriteArgs, }; /** * @name exports.AdverseEventUpdateMutation - * @summary AdverseEventUpdate Mutation. + * @summary AdverseEventUpdate mutation. */ module.exports.AdverseEventUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple AdverseEvents', - resolve: scopeInvariant(scopeOptions, adverseeventUpdateResolver), + description: 'Update a AdverseEvent record', + resolve: scopeInvariant(scopeOptions, updateAdverseEvent), type: AdverseEventSchema, + args: WriteArgs, }; /** - * @name exports.AdverseEventDeleteMutation - * @summary AdverseEventDelete Mutation. + * @name exports.AdverseEventRemoveMutation + * @summary AdverseEventRemove mutation. */ -module.exports.AdverseEventDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single AdverseEvent', - resolve: scopeInvariant(scopeOptions, adverseeventDeleteResolver), +module.exports.AdverseEventRemoveMutation = { + description: 'Remove a AdverseEvent record', + resolve: scopeInvariant(scopeOptions, removeAdverseEvent), type: AdverseEventSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/adverseevent/query.js b/src/resources/3_0_1/profiles/adverseevent/query.js index 07860f33..14830f33 100644 --- a/src/resources/3_0_1/profiles/adverseevent/query.js +++ b/src/resources/3_0_1/profiles/adverseevent/query.js @@ -1,55 +1,65 @@ // Schemas -const AdverseEventSchema = require('../../schemas/adverseevent.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AdverseEventSchema = require('../../schemas/adverseevent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AdverseEventArgs = require('../../parameters/adverseevent.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AdverseEventArgs = require('../../parameters/adverseevent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + AdverseEventArgs, +); // Resolvers const { - adverseeventResolver, - adverseeventListResolver, - adverseeventInstanceResolver, + getAdverseEvent, + getAdverseEventList, + getAdverseEventInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AdverseEvent', action: 'read', - version: '3_0_1', }; /** * @name exports.AdverseEventQuery - * @summary AdverseEvent Query. + * @summary AdverseEvent query. */ module.exports.AdverseEventQuery = { - args: Object.assign({}, CommonArgs, AdverseEventArgs), description: 'Query for a single AdverseEvent', - resolve: scopeInvariant(scopeOptions, adverseeventResolver), + resolve: scopeInvariant(scopeOptions, getAdverseEvent), type: AdverseEventSchema, + args: args, }; /** * @name exports.AdverseEventListQuery - * @summary AdverseEventList Query. + * @summary AdverseEvent query. */ module.exports.AdverseEventListQuery = { - args: Object.assign({}, CommonArgs, AdverseEventArgs), - description: 'Query for multiple AdverseEvents', - resolve: scopeInvariant(scopeOptions, adverseeventListResolver), + description: 'Query for a more than or just one AdverseEvent', + resolve: scopeInvariant(scopeOptions, getAdverseEventList), type: BundleSchema, + args: args, }; /** * @name exports.AdverseEventInstanceQuery - * @summary AdverseEventInstance Query. + * @summary AdverseEvent query. */ module.exports.AdverseEventInstanceQuery = { - description: 'Get information about a single AdverseEvent', - resolve: scopeInvariant(scopeOptions, adverseeventInstanceResolver), + description: 'Access information about a single AdverseEvent', + resolve: scopeInvariant(scopeOptions, getAdverseEventInstance), type: AdverseEventSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/adverseevent/index.js b/src/resources/3_0_1/profiles/adverseevent/register.js similarity index 92% rename from src/resources/3_0_1/profiles/adverseevent/index.js rename to src/resources/3_0_1/profiles/adverseevent/register.js index 854d90a0..4bfb0131 100644 --- a/src/resources/3_0_1/profiles/adverseevent/index.js +++ b/src/resources/3_0_1/profiles/adverseevent/register.js @@ -1,15 +1,15 @@ +const { + AdverseEventCreateMutation, + AdverseEventUpdateMutation, + AdverseEventRemoveMutation, +} = require('./mutation'); + const { AdverseEventQuery, AdverseEventListQuery, AdverseEventInstanceQuery, } = require('./query'); -const { - AdverseEventCreateMutation, - AdverseEventUpdateMutation, - AdverseEventDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AdverseEventCreate: AdverseEventCreateMutation, AdverseEventUpdate: AdverseEventUpdateMutation, - AdverseEventDelete: AdverseEventDeleteMutation, + AdverseEventRemove: AdverseEventRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'AdverseEvent', path: '/3_0_1/AdverseEvent/:id', query: AdverseEventInstanceQuery, diff --git a/src/resources/3_0_1/profiles/adverseevent/resolver.js b/src/resources/3_0_1/profiles/adverseevent/resolver.js index 55ca25ea..90c2a45e 100644 --- a/src/resources/3_0_1/profiles/adverseevent/resolver.js +++ b/src/resources/3_0_1/profiles/adverseevent/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.adverseeventResolver + * @name exports.getAdverseEvent * @static - * @summary AdverseEvent Resolver. + * @summary AdverseEvent resolver. */ -module.exports.adverseeventResolver = function adverseeventResolver( +module.exports.getAdverseEvent = function getAdverseEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.adverseeventListResolver + * @name exports.getAdverseEventList * @static - * @summary AdverseEvent List Resolver. + * @summary AdverseEvent list resolver. */ -module.exports.adverseeventListResolver = function adverseeventListResolver( +module.exports.getAdverseEventList = function getAdverseEventList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.adverseeventInstanceResolver + * @name exports.getAdverseEventInstance * @static - * @summary AdverseEvent Instance Resolver. + * @summary AdverseEvent instance resolver. */ -module.exports.adverseeventInstanceResolver = function adverseeventInstanceResolver( +module.exports.getAdverseEventInstance = function getAdverseEventInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.adverseeventCreateResolver + * @name exports.createAdverseEvent * @static - * @summary AdverseEvent Create Resolver. + * @summary Create AdverseEvent resolver. */ -module.exports.adverseeventCreateResolver = function adverseeventCreateResolver( +module.exports.createAdverseEvent = function createAdverseEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.adverseeventUpdateResolver + * @name exports.updateAdverseEvent * @static - * @summary AdverseEvent Update Resolver. + * @summary Update AdverseEvent resolver. */ -module.exports.adverseeventUpdateResolver = function adverseeventUpdateResolver( +module.exports.updateAdverseEvent = function updateAdverseEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.adverseeventDeleteResolver + * @name exports.removeAdverseEvent * @static - * @summary AdverseEvent Delete Resolver. + * @summary Remove AdverseEvent resolver. */ -module.exports.adverseeventDeleteResolver = function adverseeventDeleteResolver( +module.exports.removeAdverseEvent = function removeAdverseEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/allergyintolerance/mutation.js b/src/resources/3_0_1/profiles/allergyintolerance/mutation.js index 69404016..5ea39a12 100644 --- a/src/resources/3_0_1/profiles/allergyintolerance/mutation.js +++ b/src/resources/3_0_1/profiles/allergyintolerance/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema'); +const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AllergyIntoleranceInput = require('../../inputs/allergyintolerance.input'); +const AllergyIntoleranceInput = require('../../inputs/allergyintolerance.input.js'); -// Resolvers -const { - allergyintoleranceCreateResolver, - allergyintoleranceUpdateResolver, - allergyintoleranceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAllergyIntolerance, + updateAllergyIntolerance, + removeAllergyIntolerance, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AllergyIntolerance', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a AllergyIntolerance record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a AllergyIntolerance record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.AllergyIntoleranceCreateMutation - * @summary AllergyIntoleranceCreate Mutation. + * @summary AllergyIntoleranceCreate mutation. */ module.exports.AllergyIntoleranceCreateMutation = { - args: WriteArgs, - description: 'Create a AllergyIntolerance', - resolve: scopeInvariant(scopeOptions, allergyintoleranceCreateResolver), + description: 'Create a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, createAllergyIntolerance), type: AllergyIntoleranceSchema, + args: WriteArgs, }; /** * @name exports.AllergyIntoleranceUpdateMutation - * @summary AllergyIntoleranceUpdate Mutation. + * @summary AllergyIntoleranceUpdate mutation. */ module.exports.AllergyIntoleranceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple AllergyIntolerances', - resolve: scopeInvariant(scopeOptions, allergyintoleranceUpdateResolver), + description: 'Update a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, updateAllergyIntolerance), type: AllergyIntoleranceSchema, + args: WriteArgs, }; /** - * @name exports.AllergyIntoleranceDeleteMutation - * @summary AllergyIntoleranceDelete Mutation. + * @name exports.AllergyIntoleranceRemoveMutation + * @summary AllergyIntoleranceRemove mutation. */ -module.exports.AllergyIntoleranceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single AllergyIntolerance', - resolve: scopeInvariant(scopeOptions, allergyintoleranceDeleteResolver), +module.exports.AllergyIntoleranceRemoveMutation = { + description: 'Remove a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, removeAllergyIntolerance), type: AllergyIntoleranceSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/allergyintolerance/query.js b/src/resources/3_0_1/profiles/allergyintolerance/query.js index 7420566e..ef3028ed 100644 --- a/src/resources/3_0_1/profiles/allergyintolerance/query.js +++ b/src/resources/3_0_1/profiles/allergyintolerance/query.js @@ -1,55 +1,65 @@ // Schemas -const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AllergyIntoleranceArgs = require('../../parameters/allergyintolerance.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AllergyIntoleranceArgs = require('../../parameters/allergyintolerance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + AllergyIntoleranceArgs, +); // Resolvers const { - allergyintoleranceResolver, - allergyintoleranceListResolver, - allergyintoleranceInstanceResolver, + getAllergyIntolerance, + getAllergyIntoleranceList, + getAllergyIntoleranceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AllergyIntolerance', action: 'read', - version: '3_0_1', }; /** * @name exports.AllergyIntoleranceQuery - * @summary AllergyIntolerance Query. + * @summary AllergyIntolerance query. */ module.exports.AllergyIntoleranceQuery = { - args: Object.assign({}, CommonArgs, AllergyIntoleranceArgs), description: 'Query for a single AllergyIntolerance', - resolve: scopeInvariant(scopeOptions, allergyintoleranceResolver), + resolve: scopeInvariant(scopeOptions, getAllergyIntolerance), type: AllergyIntoleranceSchema, + args: args, }; /** * @name exports.AllergyIntoleranceListQuery - * @summary AllergyIntoleranceList Query. + * @summary AllergyIntolerance query. */ module.exports.AllergyIntoleranceListQuery = { - args: Object.assign({}, CommonArgs, AllergyIntoleranceArgs), - description: 'Query for multiple AllergyIntolerances', - resolve: scopeInvariant(scopeOptions, allergyintoleranceListResolver), + description: 'Query for a more than or just one AllergyIntolerance', + resolve: scopeInvariant(scopeOptions, getAllergyIntoleranceList), type: BundleSchema, + args: args, }; /** * @name exports.AllergyIntoleranceInstanceQuery - * @summary AllergyIntoleranceInstance Query. + * @summary AllergyIntolerance query. */ module.exports.AllergyIntoleranceInstanceQuery = { - description: 'Get information about a single AllergyIntolerance', - resolve: scopeInvariant(scopeOptions, allergyintoleranceInstanceResolver), + description: 'Access information about a single AllergyIntolerance', + resolve: scopeInvariant(scopeOptions, getAllergyIntoleranceInstance), type: AllergyIntoleranceSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/allergyintolerance/index.js b/src/resources/3_0_1/profiles/allergyintolerance/register.js similarity index 91% rename from src/resources/3_0_1/profiles/allergyintolerance/index.js rename to src/resources/3_0_1/profiles/allergyintolerance/register.js index c4f767c7..4581bfc7 100644 --- a/src/resources/3_0_1/profiles/allergyintolerance/index.js +++ b/src/resources/3_0_1/profiles/allergyintolerance/register.js @@ -1,15 +1,15 @@ +const { + AllergyIntoleranceCreateMutation, + AllergyIntoleranceUpdateMutation, + AllergyIntoleranceRemoveMutation, +} = require('./mutation'); + const { AllergyIntoleranceQuery, AllergyIntoleranceListQuery, AllergyIntoleranceInstanceQuery, } = require('./query'); -const { - AllergyIntoleranceCreateMutation, - AllergyIntoleranceUpdateMutation, - AllergyIntoleranceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AllergyIntoleranceCreate: AllergyIntoleranceCreateMutation, AllergyIntoleranceUpdate: AllergyIntoleranceUpdateMutation, - AllergyIntoleranceDelete: AllergyIntoleranceDeleteMutation, + AllergyIntoleranceRemove: AllergyIntoleranceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'AllergyIntolerance', path: '/3_0_1/AllergyIntolerance/:id', query: AllergyIntoleranceInstanceQuery, diff --git a/src/resources/3_0_1/profiles/allergyintolerance/resolver.js b/src/resources/3_0_1/profiles/allergyintolerance/resolver.js index 6365ad4c..31499802 100644 --- a/src/resources/3_0_1/profiles/allergyintolerance/resolver.js +++ b/src/resources/3_0_1/profiles/allergyintolerance/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.allergyintoleranceResolver + * @name exports.getAllergyIntolerance * @static - * @summary AllergyIntolerance Resolver. + * @summary AllergyIntolerance resolver. */ -module.exports.allergyintoleranceResolver = function allergyintoleranceResolver( +module.exports.getAllergyIntolerance = function getAllergyIntolerance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceListResolver + * @name exports.getAllergyIntoleranceList * @static - * @summary AllergyIntolerance List Resolver. + * @summary AllergyIntolerance list resolver. */ -module.exports.allergyintoleranceListResolver = function allergyintoleranceListResolver( +module.exports.getAllergyIntoleranceList = function getAllergyIntoleranceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceInstanceResolver + * @name exports.getAllergyIntoleranceInstance * @static - * @summary AllergyIntolerance Instance Resolver. + * @summary AllergyIntolerance instance resolver. */ -module.exports.allergyintoleranceInstanceResolver = function allergyintoleranceInstanceResolver( +module.exports.getAllergyIntoleranceInstance = function getAllergyIntoleranceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceCreateResolver + * @name exports.createAllergyIntolerance * @static - * @summary AllergyIntolerance Create Resolver. + * @summary Create AllergyIntolerance resolver. */ -module.exports.allergyintoleranceCreateResolver = function allergyintoleranceCreateResolver( +module.exports.createAllergyIntolerance = function createAllergyIntolerance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceUpdateResolver + * @name exports.updateAllergyIntolerance * @static - * @summary AllergyIntolerance Update Resolver. + * @summary Update AllergyIntolerance resolver. */ -module.exports.allergyintoleranceUpdateResolver = function allergyintoleranceUpdateResolver( +module.exports.updateAllergyIntolerance = function updateAllergyIntolerance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.allergyintoleranceDeleteResolver + * @name exports.removeAllergyIntolerance * @static - * @summary AllergyIntolerance Delete Resolver. + * @summary Remove AllergyIntolerance resolver. */ -module.exports.allergyintoleranceDeleteResolver = function allergyintoleranceDeleteResolver( +module.exports.removeAllergyIntolerance = function removeAllergyIntolerance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/appointment/mutation.js b/src/resources/3_0_1/profiles/appointment/mutation.js index 29523325..0c00949c 100644 --- a/src/resources/3_0_1/profiles/appointment/mutation.js +++ b/src/resources/3_0_1/profiles/appointment/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AppointmentSchema = require('../../schemas/appointment.schema'); +const AppointmentSchema = require('../../schemas/appointment.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AppointmentInput = require('../../inputs/appointment.input'); +const AppointmentInput = require('../../inputs/appointment.input.js'); -// Resolvers -const { - appointmentCreateResolver, - appointmentUpdateResolver, - appointmentDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAppointment, + updateAppointment, + removeAppointment, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Appointment', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Appointment record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Appointment record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.AppointmentCreateMutation - * @summary AppointmentCreate Mutation. + * @summary AppointmentCreate mutation. */ module.exports.AppointmentCreateMutation = { - args: WriteArgs, - description: 'Create a Appointment', - resolve: scopeInvariant(scopeOptions, appointmentCreateResolver), + description: 'Create a Appointment record', + resolve: scopeInvariant(scopeOptions, createAppointment), type: AppointmentSchema, + args: WriteArgs, }; /** * @name exports.AppointmentUpdateMutation - * @summary AppointmentUpdate Mutation. + * @summary AppointmentUpdate mutation. */ module.exports.AppointmentUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Appointments', - resolve: scopeInvariant(scopeOptions, appointmentUpdateResolver), + description: 'Update a Appointment record', + resolve: scopeInvariant(scopeOptions, updateAppointment), type: AppointmentSchema, + args: WriteArgs, }; /** - * @name exports.AppointmentDeleteMutation - * @summary AppointmentDelete Mutation. + * @name exports.AppointmentRemoveMutation + * @summary AppointmentRemove mutation. */ -module.exports.AppointmentDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Appointment', - resolve: scopeInvariant(scopeOptions, appointmentDeleteResolver), +module.exports.AppointmentRemoveMutation = { + description: 'Remove a Appointment record', + resolve: scopeInvariant(scopeOptions, removeAppointment), type: AppointmentSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/appointment/query.js b/src/resources/3_0_1/profiles/appointment/query.js index 0ee1939d..4d899029 100644 --- a/src/resources/3_0_1/profiles/appointment/query.js +++ b/src/resources/3_0_1/profiles/appointment/query.js @@ -1,55 +1,60 @@ // Schemas -const AppointmentSchema = require('../../schemas/appointment.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AppointmentSchema = require('../../schemas/appointment.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AppointmentArgs = require('../../parameters/appointment.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AppointmentArgs = require('../../parameters/appointment.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, AppointmentArgs); // Resolvers const { - appointmentResolver, - appointmentListResolver, - appointmentInstanceResolver, + getAppointment, + getAppointmentList, + getAppointmentInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Appointment', action: 'read', - version: '3_0_1', }; /** * @name exports.AppointmentQuery - * @summary Appointment Query. + * @summary Appointment query. */ module.exports.AppointmentQuery = { - args: Object.assign({}, CommonArgs, AppointmentArgs), description: 'Query for a single Appointment', - resolve: scopeInvariant(scopeOptions, appointmentResolver), + resolve: scopeInvariant(scopeOptions, getAppointment), type: AppointmentSchema, + args: args, }; /** * @name exports.AppointmentListQuery - * @summary AppointmentList Query. + * @summary Appointment query. */ module.exports.AppointmentListQuery = { - args: Object.assign({}, CommonArgs, AppointmentArgs), - description: 'Query for multiple Appointments', - resolve: scopeInvariant(scopeOptions, appointmentListResolver), + description: 'Query for a more than or just one Appointment', + resolve: scopeInvariant(scopeOptions, getAppointmentList), type: BundleSchema, + args: args, }; /** * @name exports.AppointmentInstanceQuery - * @summary AppointmentInstance Query. + * @summary Appointment query. */ module.exports.AppointmentInstanceQuery = { - description: 'Get information about a single Appointment', - resolve: scopeInvariant(scopeOptions, appointmentInstanceResolver), + description: 'Access information about a single Appointment', + resolve: scopeInvariant(scopeOptions, getAppointmentInstance), type: AppointmentSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/appointment/index.js b/src/resources/3_0_1/profiles/appointment/register.js similarity index 92% rename from src/resources/3_0_1/profiles/appointment/index.js rename to src/resources/3_0_1/profiles/appointment/register.js index 567456b4..d8f45242 100644 --- a/src/resources/3_0_1/profiles/appointment/index.js +++ b/src/resources/3_0_1/profiles/appointment/register.js @@ -1,15 +1,15 @@ +const { + AppointmentCreateMutation, + AppointmentUpdateMutation, + AppointmentRemoveMutation, +} = require('./mutation'); + const { AppointmentQuery, AppointmentListQuery, AppointmentInstanceQuery, } = require('./query'); -const { - AppointmentCreateMutation, - AppointmentUpdateMutation, - AppointmentDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AppointmentCreate: AppointmentCreateMutation, AppointmentUpdate: AppointmentUpdateMutation, - AppointmentDelete: AppointmentDeleteMutation, + AppointmentRemove: AppointmentRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Appointment', path: '/3_0_1/Appointment/:id', query: AppointmentInstanceQuery, diff --git a/src/resources/3_0_1/profiles/appointment/resolver.js b/src/resources/3_0_1/profiles/appointment/resolver.js index 1c36bb22..421196d5 100644 --- a/src/resources/3_0_1/profiles/appointment/resolver.js +++ b/src/resources/3_0_1/profiles/appointment/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.appointmentResolver + * @name exports.getAppointment * @static - * @summary Appointment Resolver. + * @summary Appointment resolver. */ -module.exports.appointmentResolver = function appointmentResolver( +module.exports.getAppointment = function getAppointment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentListResolver + * @name exports.getAppointmentList * @static - * @summary Appointment List Resolver. + * @summary Appointment list resolver. */ -module.exports.appointmentListResolver = function appointmentListResolver( +module.exports.getAppointmentList = function getAppointmentList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentInstanceResolver + * @name exports.getAppointmentInstance * @static - * @summary Appointment Instance Resolver. + * @summary Appointment instance resolver. */ -module.exports.appointmentInstanceResolver = function appointmentInstanceResolver( +module.exports.getAppointmentInstance = function getAppointmentInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentCreateResolver + * @name exports.createAppointment * @static - * @summary Appointment Create Resolver. + * @summary Create Appointment resolver. */ -module.exports.appointmentCreateResolver = function appointmentCreateResolver( +module.exports.createAppointment = function createAppointment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentUpdateResolver + * @name exports.updateAppointment * @static - * @summary Appointment Update Resolver. + * @summary Update Appointment resolver. */ -module.exports.appointmentUpdateResolver = function appointmentUpdateResolver( +module.exports.updateAppointment = function updateAppointment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentDeleteResolver + * @name exports.removeAppointment * @static - * @summary Appointment Delete Resolver. + * @summary Remove Appointment resolver. */ -module.exports.appointmentDeleteResolver = function appointmentDeleteResolver( +module.exports.removeAppointment = function removeAppointment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/appointmentresponse/mutation.js b/src/resources/3_0_1/profiles/appointmentresponse/mutation.js index 58993f78..4194d1d9 100644 --- a/src/resources/3_0_1/profiles/appointmentresponse/mutation.js +++ b/src/resources/3_0_1/profiles/appointmentresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema'); +const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AppointmentResponseInput = require('../../inputs/appointmentresponse.input'); +const AppointmentResponseInput = require('../../inputs/appointmentresponse.input.js'); -// Resolvers -const { - appointmentresponseCreateResolver, - appointmentresponseUpdateResolver, - appointmentresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAppointmentResponse, + updateAppointmentResponse, + removeAppointmentResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AppointmentResponse', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a AppointmentResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a AppointmentResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.AppointmentResponseCreateMutation - * @summary AppointmentResponseCreate Mutation. + * @summary AppointmentResponseCreate mutation. */ module.exports.AppointmentResponseCreateMutation = { - args: WriteArgs, - description: 'Create a AppointmentResponse', - resolve: scopeInvariant(scopeOptions, appointmentresponseCreateResolver), + description: 'Create a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, createAppointmentResponse), type: AppointmentResponseSchema, + args: WriteArgs, }; /** * @name exports.AppointmentResponseUpdateMutation - * @summary AppointmentResponseUpdate Mutation. + * @summary AppointmentResponseUpdate mutation. */ module.exports.AppointmentResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple AppointmentResponses', - resolve: scopeInvariant(scopeOptions, appointmentresponseUpdateResolver), + description: 'Update a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, updateAppointmentResponse), type: AppointmentResponseSchema, + args: WriteArgs, }; /** - * @name exports.AppointmentResponseDeleteMutation - * @summary AppointmentResponseDelete Mutation. + * @name exports.AppointmentResponseRemoveMutation + * @summary AppointmentResponseRemove mutation. */ -module.exports.AppointmentResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single AppointmentResponse', - resolve: scopeInvariant(scopeOptions, appointmentresponseDeleteResolver), +module.exports.AppointmentResponseRemoveMutation = { + description: 'Remove a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, removeAppointmentResponse), type: AppointmentResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/appointmentresponse/query.js b/src/resources/3_0_1/profiles/appointmentresponse/query.js index 21fa74a4..5ebd7bf4 100644 --- a/src/resources/3_0_1/profiles/appointmentresponse/query.js +++ b/src/resources/3_0_1/profiles/appointmentresponse/query.js @@ -1,55 +1,65 @@ // Schemas -const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AppointmentResponseArgs = require('../../parameters/appointmentresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AppointmentResponseArgs = require('../../parameters/appointmentresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + AppointmentResponseArgs, +); // Resolvers const { - appointmentresponseResolver, - appointmentresponseListResolver, - appointmentresponseInstanceResolver, + getAppointmentResponse, + getAppointmentResponseList, + getAppointmentResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AppointmentResponse', action: 'read', - version: '3_0_1', }; /** * @name exports.AppointmentResponseQuery - * @summary AppointmentResponse Query. + * @summary AppointmentResponse query. */ module.exports.AppointmentResponseQuery = { - args: Object.assign({}, CommonArgs, AppointmentResponseArgs), description: 'Query for a single AppointmentResponse', - resolve: scopeInvariant(scopeOptions, appointmentresponseResolver), + resolve: scopeInvariant(scopeOptions, getAppointmentResponse), type: AppointmentResponseSchema, + args: args, }; /** * @name exports.AppointmentResponseListQuery - * @summary AppointmentResponseList Query. + * @summary AppointmentResponse query. */ module.exports.AppointmentResponseListQuery = { - args: Object.assign({}, CommonArgs, AppointmentResponseArgs), - description: 'Query for multiple AppointmentResponses', - resolve: scopeInvariant(scopeOptions, appointmentresponseListResolver), + description: 'Query for a more than or just one AppointmentResponse', + resolve: scopeInvariant(scopeOptions, getAppointmentResponseList), type: BundleSchema, + args: args, }; /** * @name exports.AppointmentResponseInstanceQuery - * @summary AppointmentResponseInstance Query. + * @summary AppointmentResponse query. */ module.exports.AppointmentResponseInstanceQuery = { - description: 'Get information about a single AppointmentResponse', - resolve: scopeInvariant(scopeOptions, appointmentresponseInstanceResolver), + description: 'Access information about a single AppointmentResponse', + resolve: scopeInvariant(scopeOptions, getAppointmentResponseInstance), type: AppointmentResponseSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/appointmentresponse/index.js b/src/resources/3_0_1/profiles/appointmentresponse/register.js similarity index 91% rename from src/resources/3_0_1/profiles/appointmentresponse/index.js rename to src/resources/3_0_1/profiles/appointmentresponse/register.js index 9f755f88..c5f536c5 100644 --- a/src/resources/3_0_1/profiles/appointmentresponse/index.js +++ b/src/resources/3_0_1/profiles/appointmentresponse/register.js @@ -1,15 +1,15 @@ +const { + AppointmentResponseCreateMutation, + AppointmentResponseUpdateMutation, + AppointmentResponseRemoveMutation, +} = require('./mutation'); + const { AppointmentResponseQuery, AppointmentResponseListQuery, AppointmentResponseInstanceQuery, } = require('./query'); -const { - AppointmentResponseCreateMutation, - AppointmentResponseUpdateMutation, - AppointmentResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AppointmentResponseCreate: AppointmentResponseCreateMutation, AppointmentResponseUpdate: AppointmentResponseUpdateMutation, - AppointmentResponseDelete: AppointmentResponseDeleteMutation, + AppointmentResponseRemove: AppointmentResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'AppointmentResponse', path: '/3_0_1/AppointmentResponse/:id', query: AppointmentResponseInstanceQuery, diff --git a/src/resources/3_0_1/profiles/appointmentresponse/resolver.js b/src/resources/3_0_1/profiles/appointmentresponse/resolver.js index bd4a5968..d8f3c115 100644 --- a/src/resources/3_0_1/profiles/appointmentresponse/resolver.js +++ b/src/resources/3_0_1/profiles/appointmentresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.appointmentresponseResolver + * @name exports.getAppointmentResponse * @static - * @summary AppointmentResponse Resolver. + * @summary AppointmentResponse resolver. */ -module.exports.appointmentresponseResolver = function appointmentresponseResolver( +module.exports.getAppointmentResponse = function getAppointmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseListResolver + * @name exports.getAppointmentResponseList * @static - * @summary AppointmentResponse List Resolver. + * @summary AppointmentResponse list resolver. */ -module.exports.appointmentresponseListResolver = function appointmentresponseListResolver( +module.exports.getAppointmentResponseList = function getAppointmentResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseInstanceResolver + * @name exports.getAppointmentResponseInstance * @static - * @summary AppointmentResponse Instance Resolver. + * @summary AppointmentResponse instance resolver. */ -module.exports.appointmentresponseInstanceResolver = function appointmentresponseInstanceResolver( +module.exports.getAppointmentResponseInstance = function getAppointmentResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseCreateResolver + * @name exports.createAppointmentResponse * @static - * @summary AppointmentResponse Create Resolver. + * @summary Create AppointmentResponse resolver. */ -module.exports.appointmentresponseCreateResolver = function appointmentresponseCreateResolver( +module.exports.createAppointmentResponse = function createAppointmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseUpdateResolver + * @name exports.updateAppointmentResponse * @static - * @summary AppointmentResponse Update Resolver. + * @summary Update AppointmentResponse resolver. */ -module.exports.appointmentresponseUpdateResolver = function appointmentresponseUpdateResolver( +module.exports.updateAppointmentResponse = function updateAppointmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.appointmentresponseDeleteResolver + * @name exports.removeAppointmentResponse * @static - * @summary AppointmentResponse Delete Resolver. + * @summary Remove AppointmentResponse resolver. */ -module.exports.appointmentresponseDeleteResolver = function appointmentresponseDeleteResolver( +module.exports.removeAppointmentResponse = function removeAppointmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/auditevent/mutation.js b/src/resources/3_0_1/profiles/auditevent/mutation.js index 7f7f6d92..5f7fb6bb 100644 --- a/src/resources/3_0_1/profiles/auditevent/mutation.js +++ b/src/resources/3_0_1/profiles/auditevent/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const AuditEventSchema = require('../../schemas/auditevent.schema'); +const AuditEventSchema = require('../../schemas/auditevent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const AuditEventInput = require('../../inputs/auditevent.input'); +const AuditEventInput = require('../../inputs/auditevent.input.js'); -// Resolvers -const { - auditeventCreateResolver, - auditeventUpdateResolver, - auditeventDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createAuditEvent, + updateAuditEvent, + removeAuditEvent, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AuditEvent', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a AuditEvent record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a AuditEvent record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.AuditEventCreateMutation - * @summary AuditEventCreate Mutation. + * @summary AuditEventCreate mutation. */ module.exports.AuditEventCreateMutation = { - args: WriteArgs, - description: 'Create a AuditEvent', - resolve: scopeInvariant(scopeOptions, auditeventCreateResolver), + description: 'Create a AuditEvent record', + resolve: scopeInvariant(scopeOptions, createAuditEvent), type: AuditEventSchema, + args: WriteArgs, }; /** * @name exports.AuditEventUpdateMutation - * @summary AuditEventUpdate Mutation. + * @summary AuditEventUpdate mutation. */ module.exports.AuditEventUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple AuditEvents', - resolve: scopeInvariant(scopeOptions, auditeventUpdateResolver), + description: 'Update a AuditEvent record', + resolve: scopeInvariant(scopeOptions, updateAuditEvent), type: AuditEventSchema, + args: WriteArgs, }; /** - * @name exports.AuditEventDeleteMutation - * @summary AuditEventDelete Mutation. + * @name exports.AuditEventRemoveMutation + * @summary AuditEventRemove mutation. */ -module.exports.AuditEventDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single AuditEvent', - resolve: scopeInvariant(scopeOptions, auditeventDeleteResolver), +module.exports.AuditEventRemoveMutation = { + description: 'Remove a AuditEvent record', + resolve: scopeInvariant(scopeOptions, removeAuditEvent), type: AuditEventSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/auditevent/query.js b/src/resources/3_0_1/profiles/auditevent/query.js index 0139a7e4..a0090a1c 100644 --- a/src/resources/3_0_1/profiles/auditevent/query.js +++ b/src/resources/3_0_1/profiles/auditevent/query.js @@ -1,55 +1,60 @@ // Schemas -const AuditEventSchema = require('../../schemas/auditevent.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AuditEventSchema = require('../../schemas/auditevent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const AuditEventArgs = require('../../parameters/auditevent.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const AuditEventArgs = require('../../parameters/auditevent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, AuditEventArgs); // Resolvers const { - auditeventResolver, - auditeventListResolver, - auditeventInstanceResolver, + getAuditEvent, + getAuditEventList, + getAuditEventInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'AuditEvent', action: 'read', - version: '3_0_1', }; /** * @name exports.AuditEventQuery - * @summary AuditEvent Query. + * @summary AuditEvent query. */ module.exports.AuditEventQuery = { - args: Object.assign({}, CommonArgs, AuditEventArgs), description: 'Query for a single AuditEvent', - resolve: scopeInvariant(scopeOptions, auditeventResolver), + resolve: scopeInvariant(scopeOptions, getAuditEvent), type: AuditEventSchema, + args: args, }; /** * @name exports.AuditEventListQuery - * @summary AuditEventList Query. + * @summary AuditEvent query. */ module.exports.AuditEventListQuery = { - args: Object.assign({}, CommonArgs, AuditEventArgs), - description: 'Query for multiple AuditEvents', - resolve: scopeInvariant(scopeOptions, auditeventListResolver), + description: 'Query for a more than or just one AuditEvent', + resolve: scopeInvariant(scopeOptions, getAuditEventList), type: BundleSchema, + args: args, }; /** * @name exports.AuditEventInstanceQuery - * @summary AuditEventInstance Query. + * @summary AuditEvent query. */ module.exports.AuditEventInstanceQuery = { - description: 'Get information about a single AuditEvent', - resolve: scopeInvariant(scopeOptions, auditeventInstanceResolver), + description: 'Access information about a single AuditEvent', + resolve: scopeInvariant(scopeOptions, getAuditEventInstance), type: AuditEventSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/auditevent/index.js b/src/resources/3_0_1/profiles/auditevent/register.js similarity index 92% rename from src/resources/3_0_1/profiles/auditevent/index.js rename to src/resources/3_0_1/profiles/auditevent/register.js index c313507b..8d39f040 100644 --- a/src/resources/3_0_1/profiles/auditevent/index.js +++ b/src/resources/3_0_1/profiles/auditevent/register.js @@ -1,15 +1,15 @@ +const { + AuditEventCreateMutation, + AuditEventUpdateMutation, + AuditEventRemoveMutation, +} = require('./mutation'); + const { AuditEventQuery, AuditEventListQuery, AuditEventInstanceQuery, } = require('./query'); -const { - AuditEventCreateMutation, - AuditEventUpdateMutation, - AuditEventDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { AuditEventCreate: AuditEventCreateMutation, AuditEventUpdate: AuditEventUpdateMutation, - AuditEventDelete: AuditEventDeleteMutation, + AuditEventRemove: AuditEventRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'AuditEvent', path: '/3_0_1/AuditEvent/:id', query: AuditEventInstanceQuery, diff --git a/src/resources/3_0_1/profiles/auditevent/resolver.js b/src/resources/3_0_1/profiles/auditevent/resolver.js index 14223de0..aa8a0228 100644 --- a/src/resources/3_0_1/profiles/auditevent/resolver.js +++ b/src/resources/3_0_1/profiles/auditevent/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.auditeventResolver + * @name exports.getAuditEvent * @static - * @summary AuditEvent Resolver. + * @summary AuditEvent resolver. */ -module.exports.auditeventResolver = function auditeventResolver( +module.exports.getAuditEvent = function getAuditEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventListResolver + * @name exports.getAuditEventList * @static - * @summary AuditEvent List Resolver. + * @summary AuditEvent list resolver. */ -module.exports.auditeventListResolver = function auditeventListResolver( +module.exports.getAuditEventList = function getAuditEventList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventInstanceResolver + * @name exports.getAuditEventInstance * @static - * @summary AuditEvent Instance Resolver. + * @summary AuditEvent instance resolver. */ -module.exports.auditeventInstanceResolver = function auditeventInstanceResolver( +module.exports.getAuditEventInstance = function getAuditEventInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventCreateResolver + * @name exports.createAuditEvent * @static - * @summary AuditEvent Create Resolver. + * @summary Create AuditEvent resolver. */ -module.exports.auditeventCreateResolver = function auditeventCreateResolver( +module.exports.createAuditEvent = function createAuditEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventUpdateResolver + * @name exports.updateAuditEvent * @static - * @summary AuditEvent Update Resolver. + * @summary Update AuditEvent resolver. */ -module.exports.auditeventUpdateResolver = function auditeventUpdateResolver( +module.exports.updateAuditEvent = function updateAuditEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.auditeventDeleteResolver + * @name exports.removeAuditEvent * @static - * @summary AuditEvent Delete Resolver. + * @summary Remove AuditEvent resolver. */ -module.exports.auditeventDeleteResolver = function auditeventDeleteResolver( +module.exports.removeAuditEvent = function removeAuditEvent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/basic/mutation.js b/src/resources/3_0_1/profiles/basic/mutation.js index 38245c03..b2e687bc 100644 --- a/src/resources/3_0_1/profiles/basic/mutation.js +++ b/src/resources/3_0_1/profiles/basic/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const BasicSchema = require('../../schemas/basic.schema'); +const BasicSchema = require('../../schemas/basic.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const BasicInput = require('../../inputs/basic.input'); +const BasicInput = require('../../inputs/basic.input.js'); -// Resolvers -const { - basicCreateResolver, - basicUpdateResolver, - basicDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createBasic, updateBasic, removeBasic } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Basic', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Basic record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Basic record for deletion.', }, }; /** * @name exports.BasicCreateMutation - * @summary BasicCreate Mutation. + * @summary BasicCreate mutation. */ module.exports.BasicCreateMutation = { - args: WriteArgs, - description: 'Create a Basic', - resolve: scopeInvariant(scopeOptions, basicCreateResolver), + description: 'Create a Basic record', + resolve: scopeInvariant(scopeOptions, createBasic), type: BasicSchema, + args: WriteArgs, }; /** * @name exports.BasicUpdateMutation - * @summary BasicUpdate Mutation. + * @summary BasicUpdate mutation. */ module.exports.BasicUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Basics', - resolve: scopeInvariant(scopeOptions, basicUpdateResolver), + description: 'Update a Basic record', + resolve: scopeInvariant(scopeOptions, updateBasic), type: BasicSchema, + args: WriteArgs, }; /** - * @name exports.BasicDeleteMutation - * @summary BasicDelete Mutation. + * @name exports.BasicRemoveMutation + * @summary BasicRemove mutation. */ -module.exports.BasicDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Basic', - resolve: scopeInvariant(scopeOptions, basicDeleteResolver), +module.exports.BasicRemoveMutation = { + description: 'Remove a Basic record', + resolve: scopeInvariant(scopeOptions, removeBasic), type: BasicSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/basic/query.js b/src/resources/3_0_1/profiles/basic/query.js index fefa2f56..00181274 100644 --- a/src/resources/3_0_1/profiles/basic/query.js +++ b/src/resources/3_0_1/profiles/basic/query.js @@ -1,55 +1,56 @@ // Schemas -const BasicSchema = require('../../schemas/basic.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BasicSchema = require('../../schemas/basic.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const BasicArgs = require('../../parameters/basic.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const BasicArgs = require('../../parameters/basic.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, BasicArgs); // Resolvers -const { - basicResolver, - basicListResolver, - basicInstanceResolver, -} = require('./resolver'); +const { getBasic, getBasicList, getBasicInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Basic', action: 'read', - version: '3_0_1', }; /** * @name exports.BasicQuery - * @summary Basic Query. + * @summary Basic query. */ module.exports.BasicQuery = { - args: Object.assign({}, CommonArgs, BasicArgs), description: 'Query for a single Basic', - resolve: scopeInvariant(scopeOptions, basicResolver), + resolve: scopeInvariant(scopeOptions, getBasic), type: BasicSchema, + args: args, }; /** * @name exports.BasicListQuery - * @summary BasicList Query. + * @summary Basic query. */ module.exports.BasicListQuery = { - args: Object.assign({}, CommonArgs, BasicArgs), - description: 'Query for multiple Basics', - resolve: scopeInvariant(scopeOptions, basicListResolver), + description: 'Query for a more than or just one Basic', + resolve: scopeInvariant(scopeOptions, getBasicList), type: BundleSchema, + args: args, }; /** * @name exports.BasicInstanceQuery - * @summary BasicInstance Query. + * @summary Basic query. */ module.exports.BasicInstanceQuery = { - description: 'Get information about a single Basic', - resolve: scopeInvariant(scopeOptions, basicInstanceResolver), + description: 'Access information about a single Basic', + resolve: scopeInvariant(scopeOptions, getBasicInstance), type: BasicSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/basic/index.js b/src/resources/3_0_1/profiles/basic/register.js similarity index 93% rename from src/resources/3_0_1/profiles/basic/index.js rename to src/resources/3_0_1/profiles/basic/register.js index 6cc19e16..2b4a58de 100644 --- a/src/resources/3_0_1/profiles/basic/index.js +++ b/src/resources/3_0_1/profiles/basic/register.js @@ -1,11 +1,11 @@ -const { BasicQuery, BasicListQuery, BasicInstanceQuery } = require('./query'); - const { BasicCreateMutation, BasicUpdateMutation, - BasicDeleteMutation, + BasicRemoveMutation, } = require('./mutation'); +const { BasicQuery, BasicListQuery, BasicInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { BasicCreate: BasicCreateMutation, BasicUpdate: BasicUpdateMutation, - BasicDelete: BasicDeleteMutation, + BasicRemove: BasicRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Basic', path: '/3_0_1/Basic/:id', query: BasicInstanceQuery, diff --git a/src/resources/3_0_1/profiles/basic/resolver.js b/src/resources/3_0_1/profiles/basic/resolver.js index 99430d90..6b622b01 100644 --- a/src/resources/3_0_1/profiles/basic/resolver.js +++ b/src/resources/3_0_1/profiles/basic/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.basicResolver + * @name exports.getBasic * @static - * @summary Basic Resolver. + * @summary Basic resolver. */ -module.exports.basicResolver = function basicResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getBasic = function getBasic(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicListResolver + * @name exports.getBasicList * @static - * @summary Basic List Resolver. + * @summary Basic list resolver. */ -module.exports.basicListResolver = function basicListResolver( +module.exports.getBasicList = function getBasicList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicInstanceResolver + * @name exports.getBasicInstance * @static - * @summary Basic Instance Resolver. + * @summary Basic instance resolver. */ -module.exports.basicInstanceResolver = function basicInstanceResolver( +module.exports.getBasicInstance = function getBasicInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicCreateResolver + * @name exports.createBasic * @static - * @summary Basic Create Resolver. + * @summary Create Basic resolver. */ -module.exports.basicCreateResolver = function basicCreateResolver( +module.exports.createBasic = function createBasic( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicUpdateResolver + * @name exports.updateBasic * @static - * @summary Basic Update Resolver. + * @summary Update Basic resolver. */ -module.exports.basicUpdateResolver = function basicUpdateResolver( +module.exports.updateBasic = function updateBasic( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.basicDeleteResolver + * @name exports.removeBasic * @static - * @summary Basic Delete Resolver. + * @summary Remove Basic resolver. */ -module.exports.basicDeleteResolver = function basicDeleteResolver( +module.exports.removeBasic = function removeBasic( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/binary/mutation.js b/src/resources/3_0_1/profiles/binary/mutation.js index c47e8571..e4e75b38 100644 --- a/src/resources/3_0_1/profiles/binary/mutation.js +++ b/src/resources/3_0_1/profiles/binary/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const BinarySchema = require('../../schemas/binary.schema'); +const BinarySchema = require('../../schemas/binary.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const BinaryInput = require('../../inputs/binary.input'); +const BinaryInput = require('../../inputs/binary.input.js'); -// Resolvers -const { - binaryCreateResolver, - binaryUpdateResolver, - binaryDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createBinary, updateBinary, removeBinary } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Binary', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Binary record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Binary record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.BinaryCreateMutation - * @summary BinaryCreate Mutation. + * @summary BinaryCreate mutation. */ module.exports.BinaryCreateMutation = { - args: WriteArgs, - description: 'Create a Binary', - resolve: scopeInvariant(scopeOptions, binaryCreateResolver), + description: 'Create a Binary record', + resolve: scopeInvariant(scopeOptions, createBinary), type: BinarySchema, + args: WriteArgs, }; /** * @name exports.BinaryUpdateMutation - * @summary BinaryUpdate Mutation. + * @summary BinaryUpdate mutation. */ module.exports.BinaryUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Binarys', - resolve: scopeInvariant(scopeOptions, binaryUpdateResolver), + description: 'Update a Binary record', + resolve: scopeInvariant(scopeOptions, updateBinary), type: BinarySchema, + args: WriteArgs, }; /** - * @name exports.BinaryDeleteMutation - * @summary BinaryDelete Mutation. + * @name exports.BinaryRemoveMutation + * @summary BinaryRemove mutation. */ -module.exports.BinaryDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Binary', - resolve: scopeInvariant(scopeOptions, binaryDeleteResolver), +module.exports.BinaryRemoveMutation = { + description: 'Remove a Binary record', + resolve: scopeInvariant(scopeOptions, removeBinary), type: BinarySchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/binary/query.js b/src/resources/3_0_1/profiles/binary/query.js index b11d2730..8a564e70 100644 --- a/src/resources/3_0_1/profiles/binary/query.js +++ b/src/resources/3_0_1/profiles/binary/query.js @@ -1,55 +1,56 @@ // Schemas -const BinarySchema = require('../../schemas/binary.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BinarySchema = require('../../schemas/binary.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const BinaryArgs = require('../../parameters/binary.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const BinaryArgs = require('../../parameters/binary.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, BinaryArgs); // Resolvers -const { - binaryResolver, - binaryListResolver, - binaryInstanceResolver, -} = require('./resolver'); +const { getBinary, getBinaryList, getBinaryInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Binary', action: 'read', - version: '3_0_1', }; /** * @name exports.BinaryQuery - * @summary Binary Query. + * @summary Binary query. */ module.exports.BinaryQuery = { - args: Object.assign({}, CommonArgs, BinaryArgs), description: 'Query for a single Binary', - resolve: scopeInvariant(scopeOptions, binaryResolver), + resolve: scopeInvariant(scopeOptions, getBinary), type: BinarySchema, + args: args, }; /** * @name exports.BinaryListQuery - * @summary BinaryList Query. + * @summary Binary query. */ module.exports.BinaryListQuery = { - args: Object.assign({}, CommonArgs, BinaryArgs), - description: 'Query for multiple Binarys', - resolve: scopeInvariant(scopeOptions, binaryListResolver), + description: 'Query for a more than or just one Binary', + resolve: scopeInvariant(scopeOptions, getBinaryList), type: BundleSchema, + args: args, }; /** * @name exports.BinaryInstanceQuery - * @summary BinaryInstance Query. + * @summary Binary query. */ module.exports.BinaryInstanceQuery = { - description: 'Get information about a single Binary', - resolve: scopeInvariant(scopeOptions, binaryInstanceResolver), + description: 'Access information about a single Binary', + resolve: scopeInvariant(scopeOptions, getBinaryInstance), type: BinarySchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/binary/index.js b/src/resources/3_0_1/profiles/binary/register.js similarity index 93% rename from src/resources/3_0_1/profiles/binary/index.js rename to src/resources/3_0_1/profiles/binary/register.js index 6cace969..c91c85f2 100644 --- a/src/resources/3_0_1/profiles/binary/index.js +++ b/src/resources/3_0_1/profiles/binary/register.js @@ -1,15 +1,15 @@ +const { + BinaryCreateMutation, + BinaryUpdateMutation, + BinaryRemoveMutation, +} = require('./mutation'); + const { BinaryQuery, BinaryListQuery, BinaryInstanceQuery, } = require('./query'); -const { - BinaryCreateMutation, - BinaryUpdateMutation, - BinaryDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { BinaryCreate: BinaryCreateMutation, BinaryUpdate: BinaryUpdateMutation, - BinaryDelete: BinaryDeleteMutation, + BinaryRemove: BinaryRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Binary', path: '/3_0_1/Binary/:id', query: BinaryInstanceQuery, diff --git a/src/resources/3_0_1/profiles/binary/resolver.js b/src/resources/3_0_1/profiles/binary/resolver.js index 7a6df632..a06b6760 100644 --- a/src/resources/3_0_1/profiles/binary/resolver.js +++ b/src/resources/3_0_1/profiles/binary/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.binaryResolver + * @name exports.getBinary * @static - * @summary Binary Resolver. + * @summary Binary resolver. */ -module.exports.binaryResolver = function binaryResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getBinary = function getBinary(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryListResolver + * @name exports.getBinaryList * @static - * @summary Binary List Resolver. + * @summary Binary list resolver. */ -module.exports.binaryListResolver = function binaryListResolver( +module.exports.getBinaryList = function getBinaryList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryInstanceResolver + * @name exports.getBinaryInstance * @static - * @summary Binary Instance Resolver. + * @summary Binary instance resolver. */ -module.exports.binaryInstanceResolver = function binaryInstanceResolver( +module.exports.getBinaryInstance = function getBinaryInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryCreateResolver + * @name exports.createBinary * @static - * @summary Binary Create Resolver. + * @summary Create Binary resolver. */ -module.exports.binaryCreateResolver = function binaryCreateResolver( +module.exports.createBinary = function createBinary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryUpdateResolver + * @name exports.updateBinary * @static - * @summary Binary Update Resolver. + * @summary Update Binary resolver. */ -module.exports.binaryUpdateResolver = function binaryUpdateResolver( +module.exports.updateBinary = function updateBinary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.binaryDeleteResolver + * @name exports.removeBinary * @static - * @summary Binary Delete Resolver. + * @summary Remove Binary resolver. */ -module.exports.binaryDeleteResolver = function binaryDeleteResolver( +module.exports.removeBinary = function removeBinary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/bodysite/mutation.js b/src/resources/3_0_1/profiles/bodysite/mutation.js index cd19eb76..6c38f180 100644 --- a/src/resources/3_0_1/profiles/bodysite/mutation.js +++ b/src/resources/3_0_1/profiles/bodysite/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const BodySiteSchema = require('../../schemas/bodysite.schema'); +const BodySiteSchema = require('../../schemas/bodysite.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const BodySiteInput = require('../../inputs/bodysite.input'); +const BodySiteInput = require('../../inputs/bodysite.input.js'); -// Resolvers -const { - bodysiteCreateResolver, - bodysiteUpdateResolver, - bodysiteDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createBodySite, + updateBodySite, + removeBodySite, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'BodySite', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a BodySite record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a BodySite record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.BodySiteCreateMutation - * @summary BodySiteCreate Mutation. + * @summary BodySiteCreate mutation. */ module.exports.BodySiteCreateMutation = { - args: WriteArgs, - description: 'Create a BodySite', - resolve: scopeInvariant(scopeOptions, bodysiteCreateResolver), + description: 'Create a BodySite record', + resolve: scopeInvariant(scopeOptions, createBodySite), type: BodySiteSchema, + args: WriteArgs, }; /** * @name exports.BodySiteUpdateMutation - * @summary BodySiteUpdate Mutation. + * @summary BodySiteUpdate mutation. */ module.exports.BodySiteUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple BodySites', - resolve: scopeInvariant(scopeOptions, bodysiteUpdateResolver), + description: 'Update a BodySite record', + resolve: scopeInvariant(scopeOptions, updateBodySite), type: BodySiteSchema, + args: WriteArgs, }; /** - * @name exports.BodySiteDeleteMutation - * @summary BodySiteDelete Mutation. + * @name exports.BodySiteRemoveMutation + * @summary BodySiteRemove mutation. */ -module.exports.BodySiteDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single BodySite', - resolve: scopeInvariant(scopeOptions, bodysiteDeleteResolver), +module.exports.BodySiteRemoveMutation = { + description: 'Remove a BodySite record', + resolve: scopeInvariant(scopeOptions, removeBodySite), type: BodySiteSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/bodysite/query.js b/src/resources/3_0_1/profiles/bodysite/query.js index 7cf21bea..a8e3c522 100644 --- a/src/resources/3_0_1/profiles/bodysite/query.js +++ b/src/resources/3_0_1/profiles/bodysite/query.js @@ -1,55 +1,60 @@ // Schemas -const BodySiteSchema = require('../../schemas/bodysite.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BodySiteSchema = require('../../schemas/bodysite.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const BodySiteArgs = require('../../parameters/bodysite.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const BodySiteArgs = require('../../parameters/bodysite.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, BodySiteArgs); // Resolvers const { - bodysiteResolver, - bodysiteListResolver, - bodysiteInstanceResolver, + getBodySite, + getBodySiteList, + getBodySiteInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'BodySite', action: 'read', - version: '3_0_1', }; /** * @name exports.BodySiteQuery - * @summary BodySite Query. + * @summary BodySite query. */ module.exports.BodySiteQuery = { - args: Object.assign({}, CommonArgs, BodySiteArgs), description: 'Query for a single BodySite', - resolve: scopeInvariant(scopeOptions, bodysiteResolver), + resolve: scopeInvariant(scopeOptions, getBodySite), type: BodySiteSchema, + args: args, }; /** * @name exports.BodySiteListQuery - * @summary BodySiteList Query. + * @summary BodySite query. */ module.exports.BodySiteListQuery = { - args: Object.assign({}, CommonArgs, BodySiteArgs), - description: 'Query for multiple BodySites', - resolve: scopeInvariant(scopeOptions, bodysiteListResolver), + description: 'Query for a more than or just one BodySite', + resolve: scopeInvariant(scopeOptions, getBodySiteList), type: BundleSchema, + args: args, }; /** * @name exports.BodySiteInstanceQuery - * @summary BodySiteInstance Query. + * @summary BodySite query. */ module.exports.BodySiteInstanceQuery = { - description: 'Get information about a single BodySite', - resolve: scopeInvariant(scopeOptions, bodysiteInstanceResolver), + description: 'Access information about a single BodySite', + resolve: scopeInvariant(scopeOptions, getBodySiteInstance), type: BodySiteSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/bodysite/index.js b/src/resources/3_0_1/profiles/bodysite/register.js similarity index 92% rename from src/resources/3_0_1/profiles/bodysite/index.js rename to src/resources/3_0_1/profiles/bodysite/register.js index f7c574cf..aa85cd48 100644 --- a/src/resources/3_0_1/profiles/bodysite/index.js +++ b/src/resources/3_0_1/profiles/bodysite/register.js @@ -1,15 +1,15 @@ +const { + BodySiteCreateMutation, + BodySiteUpdateMutation, + BodySiteRemoveMutation, +} = require('./mutation'); + const { BodySiteQuery, BodySiteListQuery, BodySiteInstanceQuery, } = require('./query'); -const { - BodySiteCreateMutation, - BodySiteUpdateMutation, - BodySiteDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { BodySiteCreate: BodySiteCreateMutation, BodySiteUpdate: BodySiteUpdateMutation, - BodySiteDelete: BodySiteDeleteMutation, + BodySiteRemove: BodySiteRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'BodySite', path: '/3_0_1/BodySite/:id', query: BodySiteInstanceQuery, diff --git a/src/resources/3_0_1/profiles/bodysite/resolver.js b/src/resources/3_0_1/profiles/bodysite/resolver.js index 5d38a656..85ad0f6b 100644 --- a/src/resources/3_0_1/profiles/bodysite/resolver.js +++ b/src/resources/3_0_1/profiles/bodysite/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.bodysiteResolver + * @name exports.getBodySite * @static - * @summary BodySite Resolver. + * @summary BodySite resolver. */ -module.exports.bodysiteResolver = function bodysiteResolver( +module.exports.getBodySite = function getBodySite( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteListResolver + * @name exports.getBodySiteList * @static - * @summary BodySite List Resolver. + * @summary BodySite list resolver. */ -module.exports.bodysiteListResolver = function bodysiteListResolver( +module.exports.getBodySiteList = function getBodySiteList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteInstanceResolver + * @name exports.getBodySiteInstance * @static - * @summary BodySite Instance Resolver. + * @summary BodySite instance resolver. */ -module.exports.bodysiteInstanceResolver = function bodysiteInstanceResolver( +module.exports.getBodySiteInstance = function getBodySiteInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteCreateResolver + * @name exports.createBodySite * @static - * @summary BodySite Create Resolver. + * @summary Create BodySite resolver. */ -module.exports.bodysiteCreateResolver = function bodysiteCreateResolver( +module.exports.createBodySite = function createBodySite( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteUpdateResolver + * @name exports.updateBodySite * @static - * @summary BodySite Update Resolver. + * @summary Update BodySite resolver. */ -module.exports.bodysiteUpdateResolver = function bodysiteUpdateResolver( +module.exports.updateBodySite = function updateBodySite( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bodysiteDeleteResolver + * @name exports.removeBodySite * @static - * @summary BodySite Delete Resolver. + * @summary Remove BodySite resolver. */ -module.exports.bodysiteDeleteResolver = function bodysiteDeleteResolver( +module.exports.removeBodySite = function removeBodySite( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/bundle/mutation.js b/src/resources/3_0_1/profiles/bundle/mutation.js index 02a547a3..c63b03c6 100644 --- a/src/resources/3_0_1/profiles/bundle/mutation.js +++ b/src/resources/3_0_1/profiles/bundle/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const BundleSchema = require('../../schemas/bundle.schema'); +const BundleSchema = require('../../schemas/bundle.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const BundleInput = require('../../inputs/bundle.input'); +const BundleInput = require('../../inputs/bundle.input.js'); -// Resolvers -const { - bundleCreateResolver, - bundleUpdateResolver, - bundleDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createBundle, updateBundle, removeBundle } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Bundle', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Bundle record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Bundle record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.BundleCreateMutation - * @summary BundleCreate Mutation. + * @summary BundleCreate mutation. */ module.exports.BundleCreateMutation = { - args: WriteArgs, - description: 'Create a Bundle', - resolve: scopeInvariant(scopeOptions, bundleCreateResolver), + description: 'Create a Bundle record', + resolve: scopeInvariant(scopeOptions, createBundle), type: BundleSchema, + args: WriteArgs, }; /** * @name exports.BundleUpdateMutation - * @summary BundleUpdate Mutation. + * @summary BundleUpdate mutation. */ module.exports.BundleUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Bundles', - resolve: scopeInvariant(scopeOptions, bundleUpdateResolver), + description: 'Update a Bundle record', + resolve: scopeInvariant(scopeOptions, updateBundle), type: BundleSchema, + args: WriteArgs, }; /** - * @name exports.BundleDeleteMutation - * @summary BundleDelete Mutation. + * @name exports.BundleRemoveMutation + * @summary BundleRemove mutation. */ -module.exports.BundleDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Bundle', - resolve: scopeInvariant(scopeOptions, bundleDeleteResolver), +module.exports.BundleRemoveMutation = { + description: 'Remove a Bundle record', + resolve: scopeInvariant(scopeOptions, removeBundle), type: BundleSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/bundle/query.js b/src/resources/3_0_1/profiles/bundle/query.js index d6d2cea0..86d986dd 100644 --- a/src/resources/3_0_1/profiles/bundle/query.js +++ b/src/resources/3_0_1/profiles/bundle/query.js @@ -1,54 +1,55 @@ // Schemas -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const BundleArgs = require('../../parameters/bundle.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const BundleArgs = require('../../parameters/bundle.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, BundleArgs); // Resolvers -const { - bundleResolver, - bundleListResolver, - bundleInstanceResolver, -} = require('./resolver'); +const { getBundle, getBundleList, getBundleInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Bundle', action: 'read', - version: '3_0_1', }; /** * @name exports.BundleQuery - * @summary Bundle Query. + * @summary Bundle query. */ module.exports.BundleQuery = { - args: Object.assign({}, CommonArgs, BundleArgs), description: 'Query for a single Bundle', - resolve: scopeInvariant(scopeOptions, bundleResolver), + resolve: scopeInvariant(scopeOptions, getBundle), type: BundleSchema, + args: args, }; /** * @name exports.BundleListQuery - * @summary BundleList Query. + * @summary Bundle query. */ module.exports.BundleListQuery = { - args: Object.assign({}, CommonArgs, BundleArgs), - description: 'Query for multiple Bundles', - resolve: scopeInvariant(scopeOptions, bundleListResolver), + description: 'Query for a more than or just one Bundle', + resolve: scopeInvariant(scopeOptions, getBundleList), type: BundleSchema, + args: args, }; /** * @name exports.BundleInstanceQuery - * @summary BundleInstance Query. + * @summary Bundle query. */ module.exports.BundleInstanceQuery = { - description: 'Get information about a single Bundle', - resolve: scopeInvariant(scopeOptions, bundleInstanceResolver), + description: 'Access information about a single Bundle', + resolve: scopeInvariant(scopeOptions, getBundleInstance), type: BundleSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/bundle/index.js b/src/resources/3_0_1/profiles/bundle/register.js similarity index 93% rename from src/resources/3_0_1/profiles/bundle/index.js rename to src/resources/3_0_1/profiles/bundle/register.js index f6aa77ee..7c5246d4 100644 --- a/src/resources/3_0_1/profiles/bundle/index.js +++ b/src/resources/3_0_1/profiles/bundle/register.js @@ -1,15 +1,15 @@ +const { + BundleCreateMutation, + BundleUpdateMutation, + BundleRemoveMutation, +} = require('./mutation'); + const { BundleQuery, BundleListQuery, BundleInstanceQuery, } = require('./query'); -const { - BundleCreateMutation, - BundleUpdateMutation, - BundleDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { BundleCreate: BundleCreateMutation, BundleUpdate: BundleUpdateMutation, - BundleDelete: BundleDeleteMutation, + BundleRemove: BundleRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Bundle', path: '/3_0_1/Bundle/:id', query: BundleInstanceQuery, diff --git a/src/resources/3_0_1/profiles/bundle/resolver.js b/src/resources/3_0_1/profiles/bundle/resolver.js index a7862fba..b2e60890 100644 --- a/src/resources/3_0_1/profiles/bundle/resolver.js +++ b/src/resources/3_0_1/profiles/bundle/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.bundleResolver + * @name exports.getBundle * @static - * @summary Bundle Resolver. + * @summary Bundle resolver. */ -module.exports.bundleResolver = function bundleResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getBundle = function getBundle(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleListResolver + * @name exports.getBundleList * @static - * @summary Bundle List Resolver. + * @summary Bundle list resolver. */ -module.exports.bundleListResolver = function bundleListResolver( +module.exports.getBundleList = function getBundleList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleInstanceResolver + * @name exports.getBundleInstance * @static - * @summary Bundle Instance Resolver. + * @summary Bundle instance resolver. */ -module.exports.bundleInstanceResolver = function bundleInstanceResolver( +module.exports.getBundleInstance = function getBundleInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleCreateResolver + * @name exports.createBundle * @static - * @summary Bundle Create Resolver. + * @summary Create Bundle resolver. */ -module.exports.bundleCreateResolver = function bundleCreateResolver( +module.exports.createBundle = function createBundle( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleUpdateResolver + * @name exports.updateBundle * @static - * @summary Bundle Update Resolver. + * @summary Update Bundle resolver. */ -module.exports.bundleUpdateResolver = function bundleUpdateResolver( +module.exports.updateBundle = function updateBundle( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.bundleDeleteResolver + * @name exports.removeBundle * @static - * @summary Bundle Delete Resolver. + * @summary Remove Bundle resolver. */ -module.exports.bundleDeleteResolver = function bundleDeleteResolver( +module.exports.removeBundle = function removeBundle( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/capabilitystatement/mutation.js b/src/resources/3_0_1/profiles/capabilitystatement/mutation.js index 902cc105..f772bf42 100644 --- a/src/resources/3_0_1/profiles/capabilitystatement/mutation.js +++ b/src/resources/3_0_1/profiles/capabilitystatement/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CapabilityStatementSchema = require('../../schemas/capabilitystatement.schema'); +const CapabilityStatementSchema = require('../../schemas/capabilitystatement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CapabilityStatementInput = require('../../inputs/capabilitystatement.input'); +const CapabilityStatementInput = require('../../inputs/capabilitystatement.input.js'); -// Resolvers -const { - capabilitystatementCreateResolver, - capabilitystatementUpdateResolver, - capabilitystatementDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCapabilityStatement, + updateCapabilityStatement, + removeCapabilityStatement, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CapabilityStatement', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a CapabilityStatement record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a CapabilityStatement record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.CapabilityStatementCreateMutation - * @summary CapabilityStatementCreate Mutation. + * @summary CapabilityStatementCreate mutation. */ module.exports.CapabilityStatementCreateMutation = { - args: WriteArgs, - description: 'Create a CapabilityStatement', - resolve: scopeInvariant(scopeOptions, capabilitystatementCreateResolver), + description: 'Create a CapabilityStatement record', + resolve: scopeInvariant(scopeOptions, createCapabilityStatement), type: CapabilityStatementSchema, + args: WriteArgs, }; /** * @name exports.CapabilityStatementUpdateMutation - * @summary CapabilityStatementUpdate Mutation. + * @summary CapabilityStatementUpdate mutation. */ module.exports.CapabilityStatementUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple CapabilityStatements', - resolve: scopeInvariant(scopeOptions, capabilitystatementUpdateResolver), + description: 'Update a CapabilityStatement record', + resolve: scopeInvariant(scopeOptions, updateCapabilityStatement), type: CapabilityStatementSchema, + args: WriteArgs, }; /** - * @name exports.CapabilityStatementDeleteMutation - * @summary CapabilityStatementDelete Mutation. + * @name exports.CapabilityStatementRemoveMutation + * @summary CapabilityStatementRemove mutation. */ -module.exports.CapabilityStatementDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single CapabilityStatement', - resolve: scopeInvariant(scopeOptions, capabilitystatementDeleteResolver), +module.exports.CapabilityStatementRemoveMutation = { + description: 'Remove a CapabilityStatement record', + resolve: scopeInvariant(scopeOptions, removeCapabilityStatement), type: CapabilityStatementSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/capabilitystatement/query.js b/src/resources/3_0_1/profiles/capabilitystatement/query.js index 5869991c..931f3826 100644 --- a/src/resources/3_0_1/profiles/capabilitystatement/query.js +++ b/src/resources/3_0_1/profiles/capabilitystatement/query.js @@ -1,55 +1,65 @@ // Schemas -const CapabilityStatementSchema = require('../../schemas/capabilitystatement.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CapabilityStatementSchema = require('../../schemas/capabilitystatement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CapabilityStatementArgs = require('../../parameters/capabilitystatement.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CapabilityStatementArgs = require('../../parameters/capabilitystatement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CapabilityStatementArgs, +); // Resolvers const { - capabilitystatementResolver, - capabilitystatementListResolver, - capabilitystatementInstanceResolver, + getCapabilityStatement, + getCapabilityStatementList, + getCapabilityStatementInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CapabilityStatement', action: 'read', - version: '3_0_1', }; /** * @name exports.CapabilityStatementQuery - * @summary CapabilityStatement Query. + * @summary CapabilityStatement query. */ module.exports.CapabilityStatementQuery = { - args: Object.assign({}, CommonArgs, CapabilityStatementArgs), description: 'Query for a single CapabilityStatement', - resolve: scopeInvariant(scopeOptions, capabilitystatementResolver), + resolve: scopeInvariant(scopeOptions, getCapabilityStatement), type: CapabilityStatementSchema, + args: args, }; /** * @name exports.CapabilityStatementListQuery - * @summary CapabilityStatementList Query. + * @summary CapabilityStatement query. */ module.exports.CapabilityStatementListQuery = { - args: Object.assign({}, CommonArgs, CapabilityStatementArgs), - description: 'Query for multiple CapabilityStatements', - resolve: scopeInvariant(scopeOptions, capabilitystatementListResolver), + description: 'Query for a more than or just one CapabilityStatement', + resolve: scopeInvariant(scopeOptions, getCapabilityStatementList), type: BundleSchema, + args: args, }; /** * @name exports.CapabilityStatementInstanceQuery - * @summary CapabilityStatementInstance Query. + * @summary CapabilityStatement query. */ module.exports.CapabilityStatementInstanceQuery = { - description: 'Get information about a single CapabilityStatement', - resolve: scopeInvariant(scopeOptions, capabilitystatementInstanceResolver), + description: 'Access information about a single CapabilityStatement', + resolve: scopeInvariant(scopeOptions, getCapabilityStatementInstance), type: CapabilityStatementSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/capabilitystatement/index.js b/src/resources/3_0_1/profiles/capabilitystatement/register.js similarity index 91% rename from src/resources/3_0_1/profiles/capabilitystatement/index.js rename to src/resources/3_0_1/profiles/capabilitystatement/register.js index 7097f442..3c9fa079 100644 --- a/src/resources/3_0_1/profiles/capabilitystatement/index.js +++ b/src/resources/3_0_1/profiles/capabilitystatement/register.js @@ -1,15 +1,15 @@ +const { + CapabilityStatementCreateMutation, + CapabilityStatementUpdateMutation, + CapabilityStatementRemoveMutation, +} = require('./mutation'); + const { CapabilityStatementQuery, CapabilityStatementListQuery, CapabilityStatementInstanceQuery, } = require('./query'); -const { - CapabilityStatementCreateMutation, - CapabilityStatementUpdateMutation, - CapabilityStatementDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CapabilityStatementCreate: CapabilityStatementCreateMutation, CapabilityStatementUpdate: CapabilityStatementUpdateMutation, - CapabilityStatementDelete: CapabilityStatementDeleteMutation, + CapabilityStatementRemove: CapabilityStatementRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'CapabilityStatement', path: '/3_0_1/CapabilityStatement/:id', query: CapabilityStatementInstanceQuery, diff --git a/src/resources/3_0_1/profiles/capabilitystatement/resolver.js b/src/resources/3_0_1/profiles/capabilitystatement/resolver.js index 2d609413..1c2d3722 100644 --- a/src/resources/3_0_1/profiles/capabilitystatement/resolver.js +++ b/src/resources/3_0_1/profiles/capabilitystatement/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.capabilitystatementResolver + * @name exports.getCapabilityStatement * @static - * @summary CapabilityStatement Resolver. + * @summary CapabilityStatement resolver. */ -module.exports.capabilitystatementResolver = function capabilitystatementResolver( +module.exports.getCapabilityStatement = function getCapabilityStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.capabilitystatementListResolver + * @name exports.getCapabilityStatementList * @static - * @summary CapabilityStatement List Resolver. + * @summary CapabilityStatement list resolver. */ -module.exports.capabilitystatementListResolver = function capabilitystatementListResolver( +module.exports.getCapabilityStatementList = function getCapabilityStatementList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.capabilitystatementInstanceResolver + * @name exports.getCapabilityStatementInstance * @static - * @summary CapabilityStatement Instance Resolver. + * @summary CapabilityStatement instance resolver. */ -module.exports.capabilitystatementInstanceResolver = function capabilitystatementInstanceResolver( +module.exports.getCapabilityStatementInstance = function getCapabilityStatementInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.capabilitystatementCreateResolver + * @name exports.createCapabilityStatement * @static - * @summary CapabilityStatement Create Resolver. + * @summary Create CapabilityStatement resolver. */ -module.exports.capabilitystatementCreateResolver = function capabilitystatementCreateResolver( +module.exports.createCapabilityStatement = function createCapabilityStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.capabilitystatementUpdateResolver + * @name exports.updateCapabilityStatement * @static - * @summary CapabilityStatement Update Resolver. + * @summary Update CapabilityStatement resolver. */ -module.exports.capabilitystatementUpdateResolver = function capabilitystatementUpdateResolver( +module.exports.updateCapabilityStatement = function updateCapabilityStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.capabilitystatementDeleteResolver + * @name exports.removeCapabilityStatement * @static - * @summary CapabilityStatement Delete Resolver. + * @summary Remove CapabilityStatement resolver. */ -module.exports.capabilitystatementDeleteResolver = function capabilitystatementDeleteResolver( +module.exports.removeCapabilityStatement = function removeCapabilityStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/careplan/mutation.js b/src/resources/3_0_1/profiles/careplan/mutation.js index 3ee87342..554c9949 100644 --- a/src/resources/3_0_1/profiles/careplan/mutation.js +++ b/src/resources/3_0_1/profiles/careplan/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CarePlanSchema = require('../../schemas/careplan.schema'); +const CarePlanSchema = require('../../schemas/careplan.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CarePlanInput = require('../../inputs/careplan.input'); +const CarePlanInput = require('../../inputs/careplan.input.js'); -// Resolvers -const { - careplanCreateResolver, - careplanUpdateResolver, - careplanDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCarePlan, + updateCarePlan, + removeCarePlan, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CarePlan', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a CarePlan record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a CarePlan record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.CarePlanCreateMutation - * @summary CarePlanCreate Mutation. + * @summary CarePlanCreate mutation. */ module.exports.CarePlanCreateMutation = { - args: WriteArgs, - description: 'Create a CarePlan', - resolve: scopeInvariant(scopeOptions, careplanCreateResolver), + description: 'Create a CarePlan record', + resolve: scopeInvariant(scopeOptions, createCarePlan), type: CarePlanSchema, + args: WriteArgs, }; /** * @name exports.CarePlanUpdateMutation - * @summary CarePlanUpdate Mutation. + * @summary CarePlanUpdate mutation. */ module.exports.CarePlanUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple CarePlans', - resolve: scopeInvariant(scopeOptions, careplanUpdateResolver), + description: 'Update a CarePlan record', + resolve: scopeInvariant(scopeOptions, updateCarePlan), type: CarePlanSchema, + args: WriteArgs, }; /** - * @name exports.CarePlanDeleteMutation - * @summary CarePlanDelete Mutation. + * @name exports.CarePlanRemoveMutation + * @summary CarePlanRemove mutation. */ -module.exports.CarePlanDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single CarePlan', - resolve: scopeInvariant(scopeOptions, careplanDeleteResolver), +module.exports.CarePlanRemoveMutation = { + description: 'Remove a CarePlan record', + resolve: scopeInvariant(scopeOptions, removeCarePlan), type: CarePlanSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/careplan/query.js b/src/resources/3_0_1/profiles/careplan/query.js index 3016483e..00c36db3 100644 --- a/src/resources/3_0_1/profiles/careplan/query.js +++ b/src/resources/3_0_1/profiles/careplan/query.js @@ -1,55 +1,60 @@ // Schemas -const CarePlanSchema = require('../../schemas/careplan.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CarePlanSchema = require('../../schemas/careplan.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CarePlanArgs = require('../../parameters/careplan.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CarePlanArgs = require('../../parameters/careplan.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CarePlanArgs); // Resolvers const { - careplanResolver, - careplanListResolver, - careplanInstanceResolver, + getCarePlan, + getCarePlanList, + getCarePlanInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CarePlan', action: 'read', - version: '3_0_1', }; /** * @name exports.CarePlanQuery - * @summary CarePlan Query. + * @summary CarePlan query. */ module.exports.CarePlanQuery = { - args: Object.assign({}, CommonArgs, CarePlanArgs), description: 'Query for a single CarePlan', - resolve: scopeInvariant(scopeOptions, careplanResolver), + resolve: scopeInvariant(scopeOptions, getCarePlan), type: CarePlanSchema, + args: args, }; /** * @name exports.CarePlanListQuery - * @summary CarePlanList Query. + * @summary CarePlan query. */ module.exports.CarePlanListQuery = { - args: Object.assign({}, CommonArgs, CarePlanArgs), - description: 'Query for multiple CarePlans', - resolve: scopeInvariant(scopeOptions, careplanListResolver), + description: 'Query for a more than or just one CarePlan', + resolve: scopeInvariant(scopeOptions, getCarePlanList), type: BundleSchema, + args: args, }; /** * @name exports.CarePlanInstanceQuery - * @summary CarePlanInstance Query. + * @summary CarePlan query. */ module.exports.CarePlanInstanceQuery = { - description: 'Get information about a single CarePlan', - resolve: scopeInvariant(scopeOptions, careplanInstanceResolver), + description: 'Access information about a single CarePlan', + resolve: scopeInvariant(scopeOptions, getCarePlanInstance), type: CarePlanSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/careplan/index.js b/src/resources/3_0_1/profiles/careplan/register.js similarity index 92% rename from src/resources/3_0_1/profiles/careplan/index.js rename to src/resources/3_0_1/profiles/careplan/register.js index 7fba3fbb..92308250 100644 --- a/src/resources/3_0_1/profiles/careplan/index.js +++ b/src/resources/3_0_1/profiles/careplan/register.js @@ -1,15 +1,15 @@ +const { + CarePlanCreateMutation, + CarePlanUpdateMutation, + CarePlanRemoveMutation, +} = require('./mutation'); + const { CarePlanQuery, CarePlanListQuery, CarePlanInstanceQuery, } = require('./query'); -const { - CarePlanCreateMutation, - CarePlanUpdateMutation, - CarePlanDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CarePlanCreate: CarePlanCreateMutation, CarePlanUpdate: CarePlanUpdateMutation, - CarePlanDelete: CarePlanDeleteMutation, + CarePlanRemove: CarePlanRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'CarePlan', path: '/3_0_1/CarePlan/:id', query: CarePlanInstanceQuery, diff --git a/src/resources/3_0_1/profiles/careplan/resolver.js b/src/resources/3_0_1/profiles/careplan/resolver.js index 48f09ef7..2fc8ecd0 100644 --- a/src/resources/3_0_1/profiles/careplan/resolver.js +++ b/src/resources/3_0_1/profiles/careplan/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.careplanResolver + * @name exports.getCarePlan * @static - * @summary CarePlan Resolver. + * @summary CarePlan resolver. */ -module.exports.careplanResolver = function careplanResolver( +module.exports.getCarePlan = function getCarePlan( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanListResolver + * @name exports.getCarePlanList * @static - * @summary CarePlan List Resolver. + * @summary CarePlan list resolver. */ -module.exports.careplanListResolver = function careplanListResolver( +module.exports.getCarePlanList = function getCarePlanList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanInstanceResolver + * @name exports.getCarePlanInstance * @static - * @summary CarePlan Instance Resolver. + * @summary CarePlan instance resolver. */ -module.exports.careplanInstanceResolver = function careplanInstanceResolver( +module.exports.getCarePlanInstance = function getCarePlanInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanCreateResolver + * @name exports.createCarePlan * @static - * @summary CarePlan Create Resolver. + * @summary Create CarePlan resolver. */ -module.exports.careplanCreateResolver = function careplanCreateResolver( +module.exports.createCarePlan = function createCarePlan( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanUpdateResolver + * @name exports.updateCarePlan * @static - * @summary CarePlan Update Resolver. + * @summary Update CarePlan resolver. */ -module.exports.careplanUpdateResolver = function careplanUpdateResolver( +module.exports.updateCarePlan = function updateCarePlan( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careplanDeleteResolver + * @name exports.removeCarePlan * @static - * @summary CarePlan Delete Resolver. + * @summary Remove CarePlan resolver. */ -module.exports.careplanDeleteResolver = function careplanDeleteResolver( +module.exports.removeCarePlan = function removeCarePlan( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/careteam/mutation.js b/src/resources/3_0_1/profiles/careteam/mutation.js index 45473e91..3d7f7fa6 100644 --- a/src/resources/3_0_1/profiles/careteam/mutation.js +++ b/src/resources/3_0_1/profiles/careteam/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CareTeamSchema = require('../../schemas/careteam.schema'); +const CareTeamSchema = require('../../schemas/careteam.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CareTeamInput = require('../../inputs/careteam.input'); +const CareTeamInput = require('../../inputs/careteam.input.js'); -// Resolvers -const { - careteamCreateResolver, - careteamUpdateResolver, - careteamDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCareTeam, + updateCareTeam, + removeCareTeam, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CareTeam', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a CareTeam record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a CareTeam record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.CareTeamCreateMutation - * @summary CareTeamCreate Mutation. + * @summary CareTeamCreate mutation. */ module.exports.CareTeamCreateMutation = { - args: WriteArgs, - description: 'Create a CareTeam', - resolve: scopeInvariant(scopeOptions, careteamCreateResolver), + description: 'Create a CareTeam record', + resolve: scopeInvariant(scopeOptions, createCareTeam), type: CareTeamSchema, + args: WriteArgs, }; /** * @name exports.CareTeamUpdateMutation - * @summary CareTeamUpdate Mutation. + * @summary CareTeamUpdate mutation. */ module.exports.CareTeamUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple CareTeams', - resolve: scopeInvariant(scopeOptions, careteamUpdateResolver), + description: 'Update a CareTeam record', + resolve: scopeInvariant(scopeOptions, updateCareTeam), type: CareTeamSchema, + args: WriteArgs, }; /** - * @name exports.CareTeamDeleteMutation - * @summary CareTeamDelete Mutation. + * @name exports.CareTeamRemoveMutation + * @summary CareTeamRemove mutation. */ -module.exports.CareTeamDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single CareTeam', - resolve: scopeInvariant(scopeOptions, careteamDeleteResolver), +module.exports.CareTeamRemoveMutation = { + description: 'Remove a CareTeam record', + resolve: scopeInvariant(scopeOptions, removeCareTeam), type: CareTeamSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/careteam/query.js b/src/resources/3_0_1/profiles/careteam/query.js index 18afda1a..76710200 100644 --- a/src/resources/3_0_1/profiles/careteam/query.js +++ b/src/resources/3_0_1/profiles/careteam/query.js @@ -1,55 +1,60 @@ // Schemas -const CareTeamSchema = require('../../schemas/careteam.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CareTeamSchema = require('../../schemas/careteam.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CareTeamArgs = require('../../parameters/careteam.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CareTeamArgs = require('../../parameters/careteam.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CareTeamArgs); // Resolvers const { - careteamResolver, - careteamListResolver, - careteamInstanceResolver, + getCareTeam, + getCareTeamList, + getCareTeamInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CareTeam', action: 'read', - version: '3_0_1', }; /** * @name exports.CareTeamQuery - * @summary CareTeam Query. + * @summary CareTeam query. */ module.exports.CareTeamQuery = { - args: Object.assign({}, CommonArgs, CareTeamArgs), description: 'Query for a single CareTeam', - resolve: scopeInvariant(scopeOptions, careteamResolver), + resolve: scopeInvariant(scopeOptions, getCareTeam), type: CareTeamSchema, + args: args, }; /** * @name exports.CareTeamListQuery - * @summary CareTeamList Query. + * @summary CareTeam query. */ module.exports.CareTeamListQuery = { - args: Object.assign({}, CommonArgs, CareTeamArgs), - description: 'Query for multiple CareTeams', - resolve: scopeInvariant(scopeOptions, careteamListResolver), + description: 'Query for a more than or just one CareTeam', + resolve: scopeInvariant(scopeOptions, getCareTeamList), type: BundleSchema, + args: args, }; /** * @name exports.CareTeamInstanceQuery - * @summary CareTeamInstance Query. + * @summary CareTeam query. */ module.exports.CareTeamInstanceQuery = { - description: 'Get information about a single CareTeam', - resolve: scopeInvariant(scopeOptions, careteamInstanceResolver), + description: 'Access information about a single CareTeam', + resolve: scopeInvariant(scopeOptions, getCareTeamInstance), type: CareTeamSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/careteam/index.js b/src/resources/3_0_1/profiles/careteam/register.js similarity index 92% rename from src/resources/3_0_1/profiles/careteam/index.js rename to src/resources/3_0_1/profiles/careteam/register.js index f7541f51..4c229a85 100644 --- a/src/resources/3_0_1/profiles/careteam/index.js +++ b/src/resources/3_0_1/profiles/careteam/register.js @@ -1,15 +1,15 @@ +const { + CareTeamCreateMutation, + CareTeamUpdateMutation, + CareTeamRemoveMutation, +} = require('./mutation'); + const { CareTeamQuery, CareTeamListQuery, CareTeamInstanceQuery, } = require('./query'); -const { - CareTeamCreateMutation, - CareTeamUpdateMutation, - CareTeamDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CareTeamCreate: CareTeamCreateMutation, CareTeamUpdate: CareTeamUpdateMutation, - CareTeamDelete: CareTeamDeleteMutation, + CareTeamRemove: CareTeamRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'CareTeam', path: '/3_0_1/CareTeam/:id', query: CareTeamInstanceQuery, diff --git a/src/resources/3_0_1/profiles/careteam/resolver.js b/src/resources/3_0_1/profiles/careteam/resolver.js index c1828000..e634adb1 100644 --- a/src/resources/3_0_1/profiles/careteam/resolver.js +++ b/src/resources/3_0_1/profiles/careteam/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.careteamResolver + * @name exports.getCareTeam * @static - * @summary CareTeam Resolver. + * @summary CareTeam resolver. */ -module.exports.careteamResolver = function careteamResolver( +module.exports.getCareTeam = function getCareTeam( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careteamListResolver + * @name exports.getCareTeamList * @static - * @summary CareTeam List Resolver. + * @summary CareTeam list resolver. */ -module.exports.careteamListResolver = function careteamListResolver( +module.exports.getCareTeamList = function getCareTeamList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careteamInstanceResolver + * @name exports.getCareTeamInstance * @static - * @summary CareTeam Instance Resolver. + * @summary CareTeam instance resolver. */ -module.exports.careteamInstanceResolver = function careteamInstanceResolver( +module.exports.getCareTeamInstance = function getCareTeamInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careteamCreateResolver + * @name exports.createCareTeam * @static - * @summary CareTeam Create Resolver. + * @summary Create CareTeam resolver. */ -module.exports.careteamCreateResolver = function careteamCreateResolver( +module.exports.createCareTeam = function createCareTeam( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careteamUpdateResolver + * @name exports.updateCareTeam * @static - * @summary CareTeam Update Resolver. + * @summary Update CareTeam resolver. */ -module.exports.careteamUpdateResolver = function careteamUpdateResolver( +module.exports.updateCareTeam = function updateCareTeam( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.careteamDeleteResolver + * @name exports.removeCareTeam * @static - * @summary CareTeam Delete Resolver. + * @summary Remove CareTeam resolver. */ -module.exports.careteamDeleteResolver = function careteamDeleteResolver( +module.exports.removeCareTeam = function removeCareTeam( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/chargeitem/mutation.js b/src/resources/3_0_1/profiles/chargeitem/mutation.js index f6d860ce..b2552123 100644 --- a/src/resources/3_0_1/profiles/chargeitem/mutation.js +++ b/src/resources/3_0_1/profiles/chargeitem/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ChargeItemSchema = require('../../schemas/chargeitem.schema'); +const ChargeItemSchema = require('../../schemas/chargeitem.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ChargeItemInput = require('../../inputs/chargeitem.input'); +const ChargeItemInput = require('../../inputs/chargeitem.input.js'); -// Resolvers -const { - chargeitemCreateResolver, - chargeitemUpdateResolver, - chargeitemDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createChargeItem, + updateChargeItem, + removeChargeItem, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ChargeItem', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ChargeItem record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ChargeItem record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ChargeItemCreateMutation - * @summary ChargeItemCreate Mutation. + * @summary ChargeItemCreate mutation. */ module.exports.ChargeItemCreateMutation = { - args: WriteArgs, - description: 'Create a ChargeItem', - resolve: scopeInvariant(scopeOptions, chargeitemCreateResolver), + description: 'Create a ChargeItem record', + resolve: scopeInvariant(scopeOptions, createChargeItem), type: ChargeItemSchema, + args: WriteArgs, }; /** * @name exports.ChargeItemUpdateMutation - * @summary ChargeItemUpdate Mutation. + * @summary ChargeItemUpdate mutation. */ module.exports.ChargeItemUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ChargeItems', - resolve: scopeInvariant(scopeOptions, chargeitemUpdateResolver), + description: 'Update a ChargeItem record', + resolve: scopeInvariant(scopeOptions, updateChargeItem), type: ChargeItemSchema, + args: WriteArgs, }; /** - * @name exports.ChargeItemDeleteMutation - * @summary ChargeItemDelete Mutation. + * @name exports.ChargeItemRemoveMutation + * @summary ChargeItemRemove mutation. */ -module.exports.ChargeItemDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ChargeItem', - resolve: scopeInvariant(scopeOptions, chargeitemDeleteResolver), +module.exports.ChargeItemRemoveMutation = { + description: 'Remove a ChargeItem record', + resolve: scopeInvariant(scopeOptions, removeChargeItem), type: ChargeItemSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/chargeitem/query.js b/src/resources/3_0_1/profiles/chargeitem/query.js index b022e545..b98ee6a6 100644 --- a/src/resources/3_0_1/profiles/chargeitem/query.js +++ b/src/resources/3_0_1/profiles/chargeitem/query.js @@ -1,55 +1,60 @@ // Schemas -const ChargeItemSchema = require('../../schemas/chargeitem.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ChargeItemSchema = require('../../schemas/chargeitem.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ChargeItemArgs = require('../../parameters/chargeitem.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ChargeItemArgs = require('../../parameters/chargeitem.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ChargeItemArgs); // Resolvers const { - chargeitemResolver, - chargeitemListResolver, - chargeitemInstanceResolver, + getChargeItem, + getChargeItemList, + getChargeItemInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ChargeItem', action: 'read', - version: '3_0_1', }; /** * @name exports.ChargeItemQuery - * @summary ChargeItem Query. + * @summary ChargeItem query. */ module.exports.ChargeItemQuery = { - args: Object.assign({}, CommonArgs, ChargeItemArgs), description: 'Query for a single ChargeItem', - resolve: scopeInvariant(scopeOptions, chargeitemResolver), + resolve: scopeInvariant(scopeOptions, getChargeItem), type: ChargeItemSchema, + args: args, }; /** * @name exports.ChargeItemListQuery - * @summary ChargeItemList Query. + * @summary ChargeItem query. */ module.exports.ChargeItemListQuery = { - args: Object.assign({}, CommonArgs, ChargeItemArgs), - description: 'Query for multiple ChargeItems', - resolve: scopeInvariant(scopeOptions, chargeitemListResolver), + description: 'Query for a more than or just one ChargeItem', + resolve: scopeInvariant(scopeOptions, getChargeItemList), type: BundleSchema, + args: args, }; /** * @name exports.ChargeItemInstanceQuery - * @summary ChargeItemInstance Query. + * @summary ChargeItem query. */ module.exports.ChargeItemInstanceQuery = { - description: 'Get information about a single ChargeItem', - resolve: scopeInvariant(scopeOptions, chargeitemInstanceResolver), + description: 'Access information about a single ChargeItem', + resolve: scopeInvariant(scopeOptions, getChargeItemInstance), type: ChargeItemSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/chargeitem/index.js b/src/resources/3_0_1/profiles/chargeitem/register.js similarity index 92% rename from src/resources/3_0_1/profiles/chargeitem/index.js rename to src/resources/3_0_1/profiles/chargeitem/register.js index d0895313..76be09bf 100644 --- a/src/resources/3_0_1/profiles/chargeitem/index.js +++ b/src/resources/3_0_1/profiles/chargeitem/register.js @@ -1,15 +1,15 @@ +const { + ChargeItemCreateMutation, + ChargeItemUpdateMutation, + ChargeItemRemoveMutation, +} = require('./mutation'); + const { ChargeItemQuery, ChargeItemListQuery, ChargeItemInstanceQuery, } = require('./query'); -const { - ChargeItemCreateMutation, - ChargeItemUpdateMutation, - ChargeItemDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ChargeItemCreate: ChargeItemCreateMutation, ChargeItemUpdate: ChargeItemUpdateMutation, - ChargeItemDelete: ChargeItemDeleteMutation, + ChargeItemRemove: ChargeItemRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ChargeItem', path: '/3_0_1/ChargeItem/:id', query: ChargeItemInstanceQuery, diff --git a/src/resources/3_0_1/profiles/chargeitem/resolver.js b/src/resources/3_0_1/profiles/chargeitem/resolver.js index b02578ff..5e6a7a19 100644 --- a/src/resources/3_0_1/profiles/chargeitem/resolver.js +++ b/src/resources/3_0_1/profiles/chargeitem/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.chargeitemResolver + * @name exports.getChargeItem * @static - * @summary ChargeItem Resolver. + * @summary ChargeItem resolver. */ -module.exports.chargeitemResolver = function chargeitemResolver( +module.exports.getChargeItem = function getChargeItem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.chargeitemListResolver + * @name exports.getChargeItemList * @static - * @summary ChargeItem List Resolver. + * @summary ChargeItem list resolver. */ -module.exports.chargeitemListResolver = function chargeitemListResolver( +module.exports.getChargeItemList = function getChargeItemList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.chargeitemInstanceResolver + * @name exports.getChargeItemInstance * @static - * @summary ChargeItem Instance Resolver. + * @summary ChargeItem instance resolver. */ -module.exports.chargeitemInstanceResolver = function chargeitemInstanceResolver( +module.exports.getChargeItemInstance = function getChargeItemInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.chargeitemCreateResolver + * @name exports.createChargeItem * @static - * @summary ChargeItem Create Resolver. + * @summary Create ChargeItem resolver. */ -module.exports.chargeitemCreateResolver = function chargeitemCreateResolver( +module.exports.createChargeItem = function createChargeItem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.chargeitemUpdateResolver + * @name exports.updateChargeItem * @static - * @summary ChargeItem Update Resolver. + * @summary Update ChargeItem resolver. */ -module.exports.chargeitemUpdateResolver = function chargeitemUpdateResolver( +module.exports.updateChargeItem = function updateChargeItem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.chargeitemDeleteResolver + * @name exports.removeChargeItem * @static - * @summary ChargeItem Delete Resolver. + * @summary Remove ChargeItem resolver. */ -module.exports.chargeitemDeleteResolver = function chargeitemDeleteResolver( +module.exports.removeChargeItem = function removeChargeItem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/claim/mutation.js b/src/resources/3_0_1/profiles/claim/mutation.js index d736b44f..e495ac5d 100644 --- a/src/resources/3_0_1/profiles/claim/mutation.js +++ b/src/resources/3_0_1/profiles/claim/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ClaimSchema = require('../../schemas/claim.schema'); +const ClaimSchema = require('../../schemas/claim.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ClaimInput = require('../../inputs/claim.input'); +const ClaimInput = require('../../inputs/claim.input.js'); -// Resolvers -const { - claimCreateResolver, - claimUpdateResolver, - claimDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createClaim, updateClaim, removeClaim } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Claim', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Claim record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Claim record for deletion.', }, }; /** * @name exports.ClaimCreateMutation - * @summary ClaimCreate Mutation. + * @summary ClaimCreate mutation. */ module.exports.ClaimCreateMutation = { - args: WriteArgs, - description: 'Create a Claim', - resolve: scopeInvariant(scopeOptions, claimCreateResolver), + description: 'Create a Claim record', + resolve: scopeInvariant(scopeOptions, createClaim), type: ClaimSchema, + args: WriteArgs, }; /** * @name exports.ClaimUpdateMutation - * @summary ClaimUpdate Mutation. + * @summary ClaimUpdate mutation. */ module.exports.ClaimUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Claims', - resolve: scopeInvariant(scopeOptions, claimUpdateResolver), + description: 'Update a Claim record', + resolve: scopeInvariant(scopeOptions, updateClaim), type: ClaimSchema, + args: WriteArgs, }; /** - * @name exports.ClaimDeleteMutation - * @summary ClaimDelete Mutation. + * @name exports.ClaimRemoveMutation + * @summary ClaimRemove mutation. */ -module.exports.ClaimDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Claim', - resolve: scopeInvariant(scopeOptions, claimDeleteResolver), +module.exports.ClaimRemoveMutation = { + description: 'Remove a Claim record', + resolve: scopeInvariant(scopeOptions, removeClaim), type: ClaimSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/claim/query.js b/src/resources/3_0_1/profiles/claim/query.js index a10fb786..50428b4d 100644 --- a/src/resources/3_0_1/profiles/claim/query.js +++ b/src/resources/3_0_1/profiles/claim/query.js @@ -1,55 +1,56 @@ // Schemas -const ClaimSchema = require('../../schemas/claim.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClaimSchema = require('../../schemas/claim.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ClaimArgs = require('../../parameters/claim.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ClaimArgs = require('../../parameters/claim.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ClaimArgs); // Resolvers -const { - claimResolver, - claimListResolver, - claimInstanceResolver, -} = require('./resolver'); +const { getClaim, getClaimList, getClaimInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Claim', action: 'read', - version: '3_0_1', }; /** * @name exports.ClaimQuery - * @summary Claim Query. + * @summary Claim query. */ module.exports.ClaimQuery = { - args: Object.assign({}, CommonArgs, ClaimArgs), description: 'Query for a single Claim', - resolve: scopeInvariant(scopeOptions, claimResolver), + resolve: scopeInvariant(scopeOptions, getClaim), type: ClaimSchema, + args: args, }; /** * @name exports.ClaimListQuery - * @summary ClaimList Query. + * @summary Claim query. */ module.exports.ClaimListQuery = { - args: Object.assign({}, CommonArgs, ClaimArgs), - description: 'Query for multiple Claims', - resolve: scopeInvariant(scopeOptions, claimListResolver), + description: 'Query for a more than or just one Claim', + resolve: scopeInvariant(scopeOptions, getClaimList), type: BundleSchema, + args: args, }; /** * @name exports.ClaimInstanceQuery - * @summary ClaimInstance Query. + * @summary Claim query. */ module.exports.ClaimInstanceQuery = { - description: 'Get information about a single Claim', - resolve: scopeInvariant(scopeOptions, claimInstanceResolver), + description: 'Access information about a single Claim', + resolve: scopeInvariant(scopeOptions, getClaimInstance), type: ClaimSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/claim/index.js b/src/resources/3_0_1/profiles/claim/register.js similarity index 93% rename from src/resources/3_0_1/profiles/claim/index.js rename to src/resources/3_0_1/profiles/claim/register.js index 1564248a..c873e36b 100644 --- a/src/resources/3_0_1/profiles/claim/index.js +++ b/src/resources/3_0_1/profiles/claim/register.js @@ -1,11 +1,11 @@ -const { ClaimQuery, ClaimListQuery, ClaimInstanceQuery } = require('./query'); - const { ClaimCreateMutation, ClaimUpdateMutation, - ClaimDeleteMutation, + ClaimRemoveMutation, } = require('./mutation'); +const { ClaimQuery, ClaimListQuery, ClaimInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { ClaimCreate: ClaimCreateMutation, ClaimUpdate: ClaimUpdateMutation, - ClaimDelete: ClaimDeleteMutation, + ClaimRemove: ClaimRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Claim', path: '/3_0_1/Claim/:id', query: ClaimInstanceQuery, diff --git a/src/resources/3_0_1/profiles/claim/resolver.js b/src/resources/3_0_1/profiles/claim/resolver.js index c60d996e..77268987 100644 --- a/src/resources/3_0_1/profiles/claim/resolver.js +++ b/src/resources/3_0_1/profiles/claim/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.claimResolver + * @name exports.getClaim * @static - * @summary Claim Resolver. + * @summary Claim resolver. */ -module.exports.claimResolver = function claimResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getClaim = function getClaim(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimListResolver + * @name exports.getClaimList * @static - * @summary Claim List Resolver. + * @summary Claim list resolver. */ -module.exports.claimListResolver = function claimListResolver( +module.exports.getClaimList = function getClaimList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimInstanceResolver + * @name exports.getClaimInstance * @static - * @summary Claim Instance Resolver. + * @summary Claim instance resolver. */ -module.exports.claimInstanceResolver = function claimInstanceResolver( +module.exports.getClaimInstance = function getClaimInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimCreateResolver + * @name exports.createClaim * @static - * @summary Claim Create Resolver. + * @summary Create Claim resolver. */ -module.exports.claimCreateResolver = function claimCreateResolver( +module.exports.createClaim = function createClaim( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimUpdateResolver + * @name exports.updateClaim * @static - * @summary Claim Update Resolver. + * @summary Update Claim resolver. */ -module.exports.claimUpdateResolver = function claimUpdateResolver( +module.exports.updateClaim = function updateClaim( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimDeleteResolver + * @name exports.removeClaim * @static - * @summary Claim Delete Resolver. + * @summary Remove Claim resolver. */ -module.exports.claimDeleteResolver = function claimDeleteResolver( +module.exports.removeClaim = function removeClaim( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/claimresponse/mutation.js b/src/resources/3_0_1/profiles/claimresponse/mutation.js index 6d12d7c4..6edd9a7e 100644 --- a/src/resources/3_0_1/profiles/claimresponse/mutation.js +++ b/src/resources/3_0_1/profiles/claimresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ClaimResponseSchema = require('../../schemas/claimresponse.schema'); +const ClaimResponseSchema = require('../../schemas/claimresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ClaimResponseInput = require('../../inputs/claimresponse.input'); +const ClaimResponseInput = require('../../inputs/claimresponse.input.js'); -// Resolvers -const { - claimresponseCreateResolver, - claimresponseUpdateResolver, - claimresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createClaimResponse, + updateClaimResponse, + removeClaimResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ClaimResponse', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ClaimResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ClaimResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ClaimResponseCreateMutation - * @summary ClaimResponseCreate Mutation. + * @summary ClaimResponseCreate mutation. */ module.exports.ClaimResponseCreateMutation = { - args: WriteArgs, - description: 'Create a ClaimResponse', - resolve: scopeInvariant(scopeOptions, claimresponseCreateResolver), + description: 'Create a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, createClaimResponse), type: ClaimResponseSchema, + args: WriteArgs, }; /** * @name exports.ClaimResponseUpdateMutation - * @summary ClaimResponseUpdate Mutation. + * @summary ClaimResponseUpdate mutation. */ module.exports.ClaimResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ClaimResponses', - resolve: scopeInvariant(scopeOptions, claimresponseUpdateResolver), + description: 'Update a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, updateClaimResponse), type: ClaimResponseSchema, + args: WriteArgs, }; /** - * @name exports.ClaimResponseDeleteMutation - * @summary ClaimResponseDelete Mutation. + * @name exports.ClaimResponseRemoveMutation + * @summary ClaimResponseRemove mutation. */ -module.exports.ClaimResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ClaimResponse', - resolve: scopeInvariant(scopeOptions, claimresponseDeleteResolver), +module.exports.ClaimResponseRemoveMutation = { + description: 'Remove a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, removeClaimResponse), type: ClaimResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/claimresponse/query.js b/src/resources/3_0_1/profiles/claimresponse/query.js index c22522cd..46aad672 100644 --- a/src/resources/3_0_1/profiles/claimresponse/query.js +++ b/src/resources/3_0_1/profiles/claimresponse/query.js @@ -1,55 +1,65 @@ // Schemas -const ClaimResponseSchema = require('../../schemas/claimresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClaimResponseSchema = require('../../schemas/claimresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ClaimResponseArgs = require('../../parameters/claimresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ClaimResponseArgs = require('../../parameters/claimresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ClaimResponseArgs, +); // Resolvers const { - claimresponseResolver, - claimresponseListResolver, - claimresponseInstanceResolver, + getClaimResponse, + getClaimResponseList, + getClaimResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ClaimResponse', action: 'read', - version: '3_0_1', }; /** * @name exports.ClaimResponseQuery - * @summary ClaimResponse Query. + * @summary ClaimResponse query. */ module.exports.ClaimResponseQuery = { - args: Object.assign({}, CommonArgs, ClaimResponseArgs), description: 'Query for a single ClaimResponse', - resolve: scopeInvariant(scopeOptions, claimresponseResolver), + resolve: scopeInvariant(scopeOptions, getClaimResponse), type: ClaimResponseSchema, + args: args, }; /** * @name exports.ClaimResponseListQuery - * @summary ClaimResponseList Query. + * @summary ClaimResponse query. */ module.exports.ClaimResponseListQuery = { - args: Object.assign({}, CommonArgs, ClaimResponseArgs), - description: 'Query for multiple ClaimResponses', - resolve: scopeInvariant(scopeOptions, claimresponseListResolver), + description: 'Query for a more than or just one ClaimResponse', + resolve: scopeInvariant(scopeOptions, getClaimResponseList), type: BundleSchema, + args: args, }; /** * @name exports.ClaimResponseInstanceQuery - * @summary ClaimResponseInstance Query. + * @summary ClaimResponse query. */ module.exports.ClaimResponseInstanceQuery = { - description: 'Get information about a single ClaimResponse', - resolve: scopeInvariant(scopeOptions, claimresponseInstanceResolver), + description: 'Access information about a single ClaimResponse', + resolve: scopeInvariant(scopeOptions, getClaimResponseInstance), type: ClaimResponseSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/claimresponse/index.js b/src/resources/3_0_1/profiles/claimresponse/register.js similarity index 92% rename from src/resources/3_0_1/profiles/claimresponse/index.js rename to src/resources/3_0_1/profiles/claimresponse/register.js index 3bc40d5c..07ff7370 100644 --- a/src/resources/3_0_1/profiles/claimresponse/index.js +++ b/src/resources/3_0_1/profiles/claimresponse/register.js @@ -1,15 +1,15 @@ +const { + ClaimResponseCreateMutation, + ClaimResponseUpdateMutation, + ClaimResponseRemoveMutation, +} = require('./mutation'); + const { ClaimResponseQuery, ClaimResponseListQuery, ClaimResponseInstanceQuery, } = require('./query'); -const { - ClaimResponseCreateMutation, - ClaimResponseUpdateMutation, - ClaimResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ClaimResponseCreate: ClaimResponseCreateMutation, ClaimResponseUpdate: ClaimResponseUpdateMutation, - ClaimResponseDelete: ClaimResponseDeleteMutation, + ClaimResponseRemove: ClaimResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ClaimResponse', path: '/3_0_1/ClaimResponse/:id', query: ClaimResponseInstanceQuery, diff --git a/src/resources/3_0_1/profiles/claimresponse/resolver.js b/src/resources/3_0_1/profiles/claimresponse/resolver.js index 5dc823ae..36363bfd 100644 --- a/src/resources/3_0_1/profiles/claimresponse/resolver.js +++ b/src/resources/3_0_1/profiles/claimresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.claimresponseResolver + * @name exports.getClaimResponse * @static - * @summary ClaimResponse Resolver. + * @summary ClaimResponse resolver. */ -module.exports.claimresponseResolver = function claimresponseResolver( +module.exports.getClaimResponse = function getClaimResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseListResolver + * @name exports.getClaimResponseList * @static - * @summary ClaimResponse List Resolver. + * @summary ClaimResponse list resolver. */ -module.exports.claimresponseListResolver = function claimresponseListResolver( +module.exports.getClaimResponseList = function getClaimResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseInstanceResolver + * @name exports.getClaimResponseInstance * @static - * @summary ClaimResponse Instance Resolver. + * @summary ClaimResponse instance resolver. */ -module.exports.claimresponseInstanceResolver = function claimresponseInstanceResolver( +module.exports.getClaimResponseInstance = function getClaimResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseCreateResolver + * @name exports.createClaimResponse * @static - * @summary ClaimResponse Create Resolver. + * @summary Create ClaimResponse resolver. */ -module.exports.claimresponseCreateResolver = function claimresponseCreateResolver( +module.exports.createClaimResponse = function createClaimResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseUpdateResolver + * @name exports.updateClaimResponse * @static - * @summary ClaimResponse Update Resolver. + * @summary Update ClaimResponse resolver. */ -module.exports.claimresponseUpdateResolver = function claimresponseUpdateResolver( +module.exports.updateClaimResponse = function updateClaimResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.claimresponseDeleteResolver + * @name exports.removeClaimResponse * @static - * @summary ClaimResponse Delete Resolver. + * @summary Remove ClaimResponse resolver. */ -module.exports.claimresponseDeleteResolver = function claimresponseDeleteResolver( +module.exports.removeClaimResponse = function removeClaimResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/clinicalimpression/mutation.js b/src/resources/3_0_1/profiles/clinicalimpression/mutation.js index bfe01349..fab28e20 100644 --- a/src/resources/3_0_1/profiles/clinicalimpression/mutation.js +++ b/src/resources/3_0_1/profiles/clinicalimpression/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema'); +const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ClinicalImpressionInput = require('../../inputs/clinicalimpression.input'); +const ClinicalImpressionInput = require('../../inputs/clinicalimpression.input.js'); -// Resolvers -const { - clinicalimpressionCreateResolver, - clinicalimpressionUpdateResolver, - clinicalimpressionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createClinicalImpression, + updateClinicalImpression, + removeClinicalImpression, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ClinicalImpression', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ClinicalImpression record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ClinicalImpression record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ClinicalImpressionCreateMutation - * @summary ClinicalImpressionCreate Mutation. + * @summary ClinicalImpressionCreate mutation. */ module.exports.ClinicalImpressionCreateMutation = { - args: WriteArgs, - description: 'Create a ClinicalImpression', - resolve: scopeInvariant(scopeOptions, clinicalimpressionCreateResolver), + description: 'Create a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, createClinicalImpression), type: ClinicalImpressionSchema, + args: WriteArgs, }; /** * @name exports.ClinicalImpressionUpdateMutation - * @summary ClinicalImpressionUpdate Mutation. + * @summary ClinicalImpressionUpdate mutation. */ module.exports.ClinicalImpressionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ClinicalImpressions', - resolve: scopeInvariant(scopeOptions, clinicalimpressionUpdateResolver), + description: 'Update a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, updateClinicalImpression), type: ClinicalImpressionSchema, + args: WriteArgs, }; /** - * @name exports.ClinicalImpressionDeleteMutation - * @summary ClinicalImpressionDelete Mutation. + * @name exports.ClinicalImpressionRemoveMutation + * @summary ClinicalImpressionRemove mutation. */ -module.exports.ClinicalImpressionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ClinicalImpression', - resolve: scopeInvariant(scopeOptions, clinicalimpressionDeleteResolver), +module.exports.ClinicalImpressionRemoveMutation = { + description: 'Remove a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, removeClinicalImpression), type: ClinicalImpressionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/clinicalimpression/query.js b/src/resources/3_0_1/profiles/clinicalimpression/query.js index f539ff1e..569b6644 100644 --- a/src/resources/3_0_1/profiles/clinicalimpression/query.js +++ b/src/resources/3_0_1/profiles/clinicalimpression/query.js @@ -1,55 +1,65 @@ // Schemas -const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ClinicalImpressionArgs = require('../../parameters/clinicalimpression.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ClinicalImpressionArgs = require('../../parameters/clinicalimpression.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ClinicalImpressionArgs, +); // Resolvers const { - clinicalimpressionResolver, - clinicalimpressionListResolver, - clinicalimpressionInstanceResolver, + getClinicalImpression, + getClinicalImpressionList, + getClinicalImpressionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ClinicalImpression', action: 'read', - version: '3_0_1', }; /** * @name exports.ClinicalImpressionQuery - * @summary ClinicalImpression Query. + * @summary ClinicalImpression query. */ module.exports.ClinicalImpressionQuery = { - args: Object.assign({}, CommonArgs, ClinicalImpressionArgs), description: 'Query for a single ClinicalImpression', - resolve: scopeInvariant(scopeOptions, clinicalimpressionResolver), + resolve: scopeInvariant(scopeOptions, getClinicalImpression), type: ClinicalImpressionSchema, + args: args, }; /** * @name exports.ClinicalImpressionListQuery - * @summary ClinicalImpressionList Query. + * @summary ClinicalImpression query. */ module.exports.ClinicalImpressionListQuery = { - args: Object.assign({}, CommonArgs, ClinicalImpressionArgs), - description: 'Query for multiple ClinicalImpressions', - resolve: scopeInvariant(scopeOptions, clinicalimpressionListResolver), + description: 'Query for a more than or just one ClinicalImpression', + resolve: scopeInvariant(scopeOptions, getClinicalImpressionList), type: BundleSchema, + args: args, }; /** * @name exports.ClinicalImpressionInstanceQuery - * @summary ClinicalImpressionInstance Query. + * @summary ClinicalImpression query. */ module.exports.ClinicalImpressionInstanceQuery = { - description: 'Get information about a single ClinicalImpression', - resolve: scopeInvariant(scopeOptions, clinicalimpressionInstanceResolver), + description: 'Access information about a single ClinicalImpression', + resolve: scopeInvariant(scopeOptions, getClinicalImpressionInstance), type: ClinicalImpressionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/clinicalimpression/index.js b/src/resources/3_0_1/profiles/clinicalimpression/register.js similarity index 91% rename from src/resources/3_0_1/profiles/clinicalimpression/index.js rename to src/resources/3_0_1/profiles/clinicalimpression/register.js index 5759cb1f..c0faac3b 100644 --- a/src/resources/3_0_1/profiles/clinicalimpression/index.js +++ b/src/resources/3_0_1/profiles/clinicalimpression/register.js @@ -1,15 +1,15 @@ +const { + ClinicalImpressionCreateMutation, + ClinicalImpressionUpdateMutation, + ClinicalImpressionRemoveMutation, +} = require('./mutation'); + const { ClinicalImpressionQuery, ClinicalImpressionListQuery, ClinicalImpressionInstanceQuery, } = require('./query'); -const { - ClinicalImpressionCreateMutation, - ClinicalImpressionUpdateMutation, - ClinicalImpressionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ClinicalImpressionCreate: ClinicalImpressionCreateMutation, ClinicalImpressionUpdate: ClinicalImpressionUpdateMutation, - ClinicalImpressionDelete: ClinicalImpressionDeleteMutation, + ClinicalImpressionRemove: ClinicalImpressionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ClinicalImpression', path: '/3_0_1/ClinicalImpression/:id', query: ClinicalImpressionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/clinicalimpression/resolver.js b/src/resources/3_0_1/profiles/clinicalimpression/resolver.js index 6c2ef307..b1d7766a 100644 --- a/src/resources/3_0_1/profiles/clinicalimpression/resolver.js +++ b/src/resources/3_0_1/profiles/clinicalimpression/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.clinicalimpressionResolver + * @name exports.getClinicalImpression * @static - * @summary ClinicalImpression Resolver. + * @summary ClinicalImpression resolver. */ -module.exports.clinicalimpressionResolver = function clinicalimpressionResolver( +module.exports.getClinicalImpression = function getClinicalImpression( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionListResolver + * @name exports.getClinicalImpressionList * @static - * @summary ClinicalImpression List Resolver. + * @summary ClinicalImpression list resolver. */ -module.exports.clinicalimpressionListResolver = function clinicalimpressionListResolver( +module.exports.getClinicalImpressionList = function getClinicalImpressionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionInstanceResolver + * @name exports.getClinicalImpressionInstance * @static - * @summary ClinicalImpression Instance Resolver. + * @summary ClinicalImpression instance resolver. */ -module.exports.clinicalimpressionInstanceResolver = function clinicalimpressionInstanceResolver( +module.exports.getClinicalImpressionInstance = function getClinicalImpressionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionCreateResolver + * @name exports.createClinicalImpression * @static - * @summary ClinicalImpression Create Resolver. + * @summary Create ClinicalImpression resolver. */ -module.exports.clinicalimpressionCreateResolver = function clinicalimpressionCreateResolver( +module.exports.createClinicalImpression = function createClinicalImpression( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionUpdateResolver + * @name exports.updateClinicalImpression * @static - * @summary ClinicalImpression Update Resolver. + * @summary Update ClinicalImpression resolver. */ -module.exports.clinicalimpressionUpdateResolver = function clinicalimpressionUpdateResolver( +module.exports.updateClinicalImpression = function updateClinicalImpression( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.clinicalimpressionDeleteResolver + * @name exports.removeClinicalImpression * @static - * @summary ClinicalImpression Delete Resolver. + * @summary Remove ClinicalImpression resolver. */ -module.exports.clinicalimpressionDeleteResolver = function clinicalimpressionDeleteResolver( +module.exports.removeClinicalImpression = function removeClinicalImpression( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/codesystem/mutation.js b/src/resources/3_0_1/profiles/codesystem/mutation.js index 08499cb8..e7806905 100644 --- a/src/resources/3_0_1/profiles/codesystem/mutation.js +++ b/src/resources/3_0_1/profiles/codesystem/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CodeSystemSchema = require('../../schemas/codesystem.schema'); +const CodeSystemSchema = require('../../schemas/codesystem.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CodeSystemInput = require('../../inputs/codesystem.input'); +const CodeSystemInput = require('../../inputs/codesystem.input.js'); -// Resolvers -const { - codesystemCreateResolver, - codesystemUpdateResolver, - codesystemDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCodeSystem, + updateCodeSystem, + removeCodeSystem, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CodeSystem', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a CodeSystem record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a CodeSystem record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.CodeSystemCreateMutation - * @summary CodeSystemCreate Mutation. + * @summary CodeSystemCreate mutation. */ module.exports.CodeSystemCreateMutation = { - args: WriteArgs, - description: 'Create a CodeSystem', - resolve: scopeInvariant(scopeOptions, codesystemCreateResolver), + description: 'Create a CodeSystem record', + resolve: scopeInvariant(scopeOptions, createCodeSystem), type: CodeSystemSchema, + args: WriteArgs, }; /** * @name exports.CodeSystemUpdateMutation - * @summary CodeSystemUpdate Mutation. + * @summary CodeSystemUpdate mutation. */ module.exports.CodeSystemUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple CodeSystems', - resolve: scopeInvariant(scopeOptions, codesystemUpdateResolver), + description: 'Update a CodeSystem record', + resolve: scopeInvariant(scopeOptions, updateCodeSystem), type: CodeSystemSchema, + args: WriteArgs, }; /** - * @name exports.CodeSystemDeleteMutation - * @summary CodeSystemDelete Mutation. + * @name exports.CodeSystemRemoveMutation + * @summary CodeSystemRemove mutation. */ -module.exports.CodeSystemDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single CodeSystem', - resolve: scopeInvariant(scopeOptions, codesystemDeleteResolver), +module.exports.CodeSystemRemoveMutation = { + description: 'Remove a CodeSystem record', + resolve: scopeInvariant(scopeOptions, removeCodeSystem), type: CodeSystemSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/codesystem/query.js b/src/resources/3_0_1/profiles/codesystem/query.js index 13d67817..ffd0c9ea 100644 --- a/src/resources/3_0_1/profiles/codesystem/query.js +++ b/src/resources/3_0_1/profiles/codesystem/query.js @@ -1,55 +1,60 @@ // Schemas -const CodeSystemSchema = require('../../schemas/codesystem.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CodeSystemSchema = require('../../schemas/codesystem.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CodeSystemArgs = require('../../parameters/codesystem.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CodeSystemArgs = require('../../parameters/codesystem.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CodeSystemArgs); // Resolvers const { - codesystemResolver, - codesystemListResolver, - codesystemInstanceResolver, + getCodeSystem, + getCodeSystemList, + getCodeSystemInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CodeSystem', action: 'read', - version: '3_0_1', }; /** * @name exports.CodeSystemQuery - * @summary CodeSystem Query. + * @summary CodeSystem query. */ module.exports.CodeSystemQuery = { - args: Object.assign({}, CommonArgs, CodeSystemArgs), description: 'Query for a single CodeSystem', - resolve: scopeInvariant(scopeOptions, codesystemResolver), + resolve: scopeInvariant(scopeOptions, getCodeSystem), type: CodeSystemSchema, + args: args, }; /** * @name exports.CodeSystemListQuery - * @summary CodeSystemList Query. + * @summary CodeSystem query. */ module.exports.CodeSystemListQuery = { - args: Object.assign({}, CommonArgs, CodeSystemArgs), - description: 'Query for multiple CodeSystems', - resolve: scopeInvariant(scopeOptions, codesystemListResolver), + description: 'Query for a more than or just one CodeSystem', + resolve: scopeInvariant(scopeOptions, getCodeSystemList), type: BundleSchema, + args: args, }; /** * @name exports.CodeSystemInstanceQuery - * @summary CodeSystemInstance Query. + * @summary CodeSystem query. */ module.exports.CodeSystemInstanceQuery = { - description: 'Get information about a single CodeSystem', - resolve: scopeInvariant(scopeOptions, codesystemInstanceResolver), + description: 'Access information about a single CodeSystem', + resolve: scopeInvariant(scopeOptions, getCodeSystemInstance), type: CodeSystemSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/codesystem/index.js b/src/resources/3_0_1/profiles/codesystem/register.js similarity index 92% rename from src/resources/3_0_1/profiles/codesystem/index.js rename to src/resources/3_0_1/profiles/codesystem/register.js index 8ead557b..0cca424f 100644 --- a/src/resources/3_0_1/profiles/codesystem/index.js +++ b/src/resources/3_0_1/profiles/codesystem/register.js @@ -1,15 +1,15 @@ +const { + CodeSystemCreateMutation, + CodeSystemUpdateMutation, + CodeSystemRemoveMutation, +} = require('./mutation'); + const { CodeSystemQuery, CodeSystemListQuery, CodeSystemInstanceQuery, } = require('./query'); -const { - CodeSystemCreateMutation, - CodeSystemUpdateMutation, - CodeSystemDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CodeSystemCreate: CodeSystemCreateMutation, CodeSystemUpdate: CodeSystemUpdateMutation, - CodeSystemDelete: CodeSystemDeleteMutation, + CodeSystemRemove: CodeSystemRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'CodeSystem', path: '/3_0_1/CodeSystem/:id', query: CodeSystemInstanceQuery, diff --git a/src/resources/3_0_1/profiles/codesystem/resolver.js b/src/resources/3_0_1/profiles/codesystem/resolver.js index f241390e..8c32c1dd 100644 --- a/src/resources/3_0_1/profiles/codesystem/resolver.js +++ b/src/resources/3_0_1/profiles/codesystem/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.codesystemResolver + * @name exports.getCodeSystem * @static - * @summary CodeSystem Resolver. + * @summary CodeSystem resolver. */ -module.exports.codesystemResolver = function codesystemResolver( +module.exports.getCodeSystem = function getCodeSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.codesystemListResolver + * @name exports.getCodeSystemList * @static - * @summary CodeSystem List Resolver. + * @summary CodeSystem list resolver. */ -module.exports.codesystemListResolver = function codesystemListResolver( +module.exports.getCodeSystemList = function getCodeSystemList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.codesystemInstanceResolver + * @name exports.getCodeSystemInstance * @static - * @summary CodeSystem Instance Resolver. + * @summary CodeSystem instance resolver. */ -module.exports.codesystemInstanceResolver = function codesystemInstanceResolver( +module.exports.getCodeSystemInstance = function getCodeSystemInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.codesystemCreateResolver + * @name exports.createCodeSystem * @static - * @summary CodeSystem Create Resolver. + * @summary Create CodeSystem resolver. */ -module.exports.codesystemCreateResolver = function codesystemCreateResolver( +module.exports.createCodeSystem = function createCodeSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.codesystemUpdateResolver + * @name exports.updateCodeSystem * @static - * @summary CodeSystem Update Resolver. + * @summary Update CodeSystem resolver. */ -module.exports.codesystemUpdateResolver = function codesystemUpdateResolver( +module.exports.updateCodeSystem = function updateCodeSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.codesystemDeleteResolver + * @name exports.removeCodeSystem * @static - * @summary CodeSystem Delete Resolver. + * @summary Remove CodeSystem resolver. */ -module.exports.codesystemDeleteResolver = function codesystemDeleteResolver( +module.exports.removeCodeSystem = function removeCodeSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/communication/mutation.js b/src/resources/3_0_1/profiles/communication/mutation.js index 26b5ea7c..79e1b5b2 100644 --- a/src/resources/3_0_1/profiles/communication/mutation.js +++ b/src/resources/3_0_1/profiles/communication/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CommunicationSchema = require('../../schemas/communication.schema'); +const CommunicationSchema = require('../../schemas/communication.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CommunicationInput = require('../../inputs/communication.input'); +const CommunicationInput = require('../../inputs/communication.input.js'); -// Resolvers -const { - communicationCreateResolver, - communicationUpdateResolver, - communicationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCommunication, + updateCommunication, + removeCommunication, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Communication', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Communication record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Communication record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.CommunicationCreateMutation - * @summary CommunicationCreate Mutation. + * @summary CommunicationCreate mutation. */ module.exports.CommunicationCreateMutation = { - args: WriteArgs, - description: 'Create a Communication', - resolve: scopeInvariant(scopeOptions, communicationCreateResolver), + description: 'Create a Communication record', + resolve: scopeInvariant(scopeOptions, createCommunication), type: CommunicationSchema, + args: WriteArgs, }; /** * @name exports.CommunicationUpdateMutation - * @summary CommunicationUpdate Mutation. + * @summary CommunicationUpdate mutation. */ module.exports.CommunicationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Communications', - resolve: scopeInvariant(scopeOptions, communicationUpdateResolver), + description: 'Update a Communication record', + resolve: scopeInvariant(scopeOptions, updateCommunication), type: CommunicationSchema, + args: WriteArgs, }; /** - * @name exports.CommunicationDeleteMutation - * @summary CommunicationDelete Mutation. + * @name exports.CommunicationRemoveMutation + * @summary CommunicationRemove mutation. */ -module.exports.CommunicationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Communication', - resolve: scopeInvariant(scopeOptions, communicationDeleteResolver), +module.exports.CommunicationRemoveMutation = { + description: 'Remove a Communication record', + resolve: scopeInvariant(scopeOptions, removeCommunication), type: CommunicationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/communication/query.js b/src/resources/3_0_1/profiles/communication/query.js index 8b930d8b..88f53a69 100644 --- a/src/resources/3_0_1/profiles/communication/query.js +++ b/src/resources/3_0_1/profiles/communication/query.js @@ -1,55 +1,65 @@ // Schemas -const CommunicationSchema = require('../../schemas/communication.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CommunicationSchema = require('../../schemas/communication.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CommunicationArgs = require('../../parameters/communication.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CommunicationArgs = require('../../parameters/communication.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CommunicationArgs, +); // Resolvers const { - communicationResolver, - communicationListResolver, - communicationInstanceResolver, + getCommunication, + getCommunicationList, + getCommunicationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Communication', action: 'read', - version: '3_0_1', }; /** * @name exports.CommunicationQuery - * @summary Communication Query. + * @summary Communication query. */ module.exports.CommunicationQuery = { - args: Object.assign({}, CommonArgs, CommunicationArgs), description: 'Query for a single Communication', - resolve: scopeInvariant(scopeOptions, communicationResolver), + resolve: scopeInvariant(scopeOptions, getCommunication), type: CommunicationSchema, + args: args, }; /** * @name exports.CommunicationListQuery - * @summary CommunicationList Query. + * @summary Communication query. */ module.exports.CommunicationListQuery = { - args: Object.assign({}, CommonArgs, CommunicationArgs), - description: 'Query for multiple Communications', - resolve: scopeInvariant(scopeOptions, communicationListResolver), + description: 'Query for a more than or just one Communication', + resolve: scopeInvariant(scopeOptions, getCommunicationList), type: BundleSchema, + args: args, }; /** * @name exports.CommunicationInstanceQuery - * @summary CommunicationInstance Query. + * @summary Communication query. */ module.exports.CommunicationInstanceQuery = { - description: 'Get information about a single Communication', - resolve: scopeInvariant(scopeOptions, communicationInstanceResolver), + description: 'Access information about a single Communication', + resolve: scopeInvariant(scopeOptions, getCommunicationInstance), type: CommunicationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/communication/index.js b/src/resources/3_0_1/profiles/communication/register.js similarity index 92% rename from src/resources/3_0_1/profiles/communication/index.js rename to src/resources/3_0_1/profiles/communication/register.js index 938617b6..d71830bd 100644 --- a/src/resources/3_0_1/profiles/communication/index.js +++ b/src/resources/3_0_1/profiles/communication/register.js @@ -1,15 +1,15 @@ +const { + CommunicationCreateMutation, + CommunicationUpdateMutation, + CommunicationRemoveMutation, +} = require('./mutation'); + const { CommunicationQuery, CommunicationListQuery, CommunicationInstanceQuery, } = require('./query'); -const { - CommunicationCreateMutation, - CommunicationUpdateMutation, - CommunicationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CommunicationCreate: CommunicationCreateMutation, CommunicationUpdate: CommunicationUpdateMutation, - CommunicationDelete: CommunicationDeleteMutation, + CommunicationRemove: CommunicationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Communication', path: '/3_0_1/Communication/:id', query: CommunicationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/communication/resolver.js b/src/resources/3_0_1/profiles/communication/resolver.js index ac9822e3..6d7bc94b 100644 --- a/src/resources/3_0_1/profiles/communication/resolver.js +++ b/src/resources/3_0_1/profiles/communication/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.communicationResolver + * @name exports.getCommunication * @static - * @summary Communication Resolver. + * @summary Communication resolver. */ -module.exports.communicationResolver = function communicationResolver( +module.exports.getCommunication = function getCommunication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationListResolver + * @name exports.getCommunicationList * @static - * @summary Communication List Resolver. + * @summary Communication list resolver. */ -module.exports.communicationListResolver = function communicationListResolver( +module.exports.getCommunicationList = function getCommunicationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationInstanceResolver + * @name exports.getCommunicationInstance * @static - * @summary Communication Instance Resolver. + * @summary Communication instance resolver. */ -module.exports.communicationInstanceResolver = function communicationInstanceResolver( +module.exports.getCommunicationInstance = function getCommunicationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationCreateResolver + * @name exports.createCommunication * @static - * @summary Communication Create Resolver. + * @summary Create Communication resolver. */ -module.exports.communicationCreateResolver = function communicationCreateResolver( +module.exports.createCommunication = function createCommunication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationUpdateResolver + * @name exports.updateCommunication * @static - * @summary Communication Update Resolver. + * @summary Update Communication resolver. */ -module.exports.communicationUpdateResolver = function communicationUpdateResolver( +module.exports.updateCommunication = function updateCommunication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationDeleteResolver + * @name exports.removeCommunication * @static - * @summary Communication Delete Resolver. + * @summary Remove Communication resolver. */ -module.exports.communicationDeleteResolver = function communicationDeleteResolver( +module.exports.removeCommunication = function removeCommunication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/communicationrequest/mutation.js b/src/resources/3_0_1/profiles/communicationrequest/mutation.js index 0f6c4c81..bcc2cb3c 100644 --- a/src/resources/3_0_1/profiles/communicationrequest/mutation.js +++ b/src/resources/3_0_1/profiles/communicationrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema'); +const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CommunicationRequestInput = require('../../inputs/communicationrequest.input'); +const CommunicationRequestInput = require('../../inputs/communicationrequest.input.js'); -// Resolvers -const { - communicationrequestCreateResolver, - communicationrequestUpdateResolver, - communicationrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCommunicationRequest, + updateCommunicationRequest, + removeCommunicationRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CommunicationRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a CommunicationRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a CommunicationRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.CommunicationRequestCreateMutation - * @summary CommunicationRequestCreate Mutation. + * @summary CommunicationRequestCreate mutation. */ module.exports.CommunicationRequestCreateMutation = { - args: WriteArgs, - description: 'Create a CommunicationRequest', - resolve: scopeInvariant(scopeOptions, communicationrequestCreateResolver), + description: 'Create a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, createCommunicationRequest), type: CommunicationRequestSchema, + args: WriteArgs, }; /** * @name exports.CommunicationRequestUpdateMutation - * @summary CommunicationRequestUpdate Mutation. + * @summary CommunicationRequestUpdate mutation. */ module.exports.CommunicationRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple CommunicationRequests', - resolve: scopeInvariant(scopeOptions, communicationrequestUpdateResolver), + description: 'Update a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, updateCommunicationRequest), type: CommunicationRequestSchema, + args: WriteArgs, }; /** - * @name exports.CommunicationRequestDeleteMutation - * @summary CommunicationRequestDelete Mutation. + * @name exports.CommunicationRequestRemoveMutation + * @summary CommunicationRequestRemove mutation. */ -module.exports.CommunicationRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single CommunicationRequest', - resolve: scopeInvariant(scopeOptions, communicationrequestDeleteResolver), +module.exports.CommunicationRequestRemoveMutation = { + description: 'Remove a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, removeCommunicationRequest), type: CommunicationRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/communicationrequest/query.js b/src/resources/3_0_1/profiles/communicationrequest/query.js index 6d56ec93..7a806eb3 100644 --- a/src/resources/3_0_1/profiles/communicationrequest/query.js +++ b/src/resources/3_0_1/profiles/communicationrequest/query.js @@ -1,55 +1,65 @@ // Schemas -const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CommunicationRequestArgs = require('../../parameters/communicationrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CommunicationRequestArgs = require('../../parameters/communicationrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CommunicationRequestArgs, +); // Resolvers const { - communicationrequestResolver, - communicationrequestListResolver, - communicationrequestInstanceResolver, + getCommunicationRequest, + getCommunicationRequestList, + getCommunicationRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CommunicationRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.CommunicationRequestQuery - * @summary CommunicationRequest Query. + * @summary CommunicationRequest query. */ module.exports.CommunicationRequestQuery = { - args: Object.assign({}, CommonArgs, CommunicationRequestArgs), description: 'Query for a single CommunicationRequest', - resolve: scopeInvariant(scopeOptions, communicationrequestResolver), + resolve: scopeInvariant(scopeOptions, getCommunicationRequest), type: CommunicationRequestSchema, + args: args, }; /** * @name exports.CommunicationRequestListQuery - * @summary CommunicationRequestList Query. + * @summary CommunicationRequest query. */ module.exports.CommunicationRequestListQuery = { - args: Object.assign({}, CommonArgs, CommunicationRequestArgs), - description: 'Query for multiple CommunicationRequests', - resolve: scopeInvariant(scopeOptions, communicationrequestListResolver), + description: 'Query for a more than or just one CommunicationRequest', + resolve: scopeInvariant(scopeOptions, getCommunicationRequestList), type: BundleSchema, + args: args, }; /** * @name exports.CommunicationRequestInstanceQuery - * @summary CommunicationRequestInstance Query. + * @summary CommunicationRequest query. */ module.exports.CommunicationRequestInstanceQuery = { - description: 'Get information about a single CommunicationRequest', - resolve: scopeInvariant(scopeOptions, communicationrequestInstanceResolver), + description: 'Access information about a single CommunicationRequest', + resolve: scopeInvariant(scopeOptions, getCommunicationRequestInstance), type: CommunicationRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/communicationrequest/index.js b/src/resources/3_0_1/profiles/communicationrequest/register.js similarity index 91% rename from src/resources/3_0_1/profiles/communicationrequest/index.js rename to src/resources/3_0_1/profiles/communicationrequest/register.js index 1307f23b..1f32827f 100644 --- a/src/resources/3_0_1/profiles/communicationrequest/index.js +++ b/src/resources/3_0_1/profiles/communicationrequest/register.js @@ -1,15 +1,15 @@ +const { + CommunicationRequestCreateMutation, + CommunicationRequestUpdateMutation, + CommunicationRequestRemoveMutation, +} = require('./mutation'); + const { CommunicationRequestQuery, CommunicationRequestListQuery, CommunicationRequestInstanceQuery, } = require('./query'); -const { - CommunicationRequestCreateMutation, - CommunicationRequestUpdateMutation, - CommunicationRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CommunicationRequestCreate: CommunicationRequestCreateMutation, CommunicationRequestUpdate: CommunicationRequestUpdateMutation, - CommunicationRequestDelete: CommunicationRequestDeleteMutation, + CommunicationRequestRemove: CommunicationRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'CommunicationRequest', path: '/3_0_1/CommunicationRequest/:id', query: CommunicationRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/communicationrequest/resolver.js b/src/resources/3_0_1/profiles/communicationrequest/resolver.js index c3acdb45..1d68cd3c 100644 --- a/src/resources/3_0_1/profiles/communicationrequest/resolver.js +++ b/src/resources/3_0_1/profiles/communicationrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.communicationrequestResolver + * @name exports.getCommunicationRequest * @static - * @summary CommunicationRequest Resolver. + * @summary CommunicationRequest resolver. */ -module.exports.communicationrequestResolver = function communicationrequestResolver( +module.exports.getCommunicationRequest = function getCommunicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestListResolver + * @name exports.getCommunicationRequestList * @static - * @summary CommunicationRequest List Resolver. + * @summary CommunicationRequest list resolver. */ -module.exports.communicationrequestListResolver = function communicationrequestListResolver( +module.exports.getCommunicationRequestList = function getCommunicationRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestInstanceResolver + * @name exports.getCommunicationRequestInstance * @static - * @summary CommunicationRequest Instance Resolver. + * @summary CommunicationRequest instance resolver. */ -module.exports.communicationrequestInstanceResolver = function communicationrequestInstanceResolver( +module.exports.getCommunicationRequestInstance = function getCommunicationRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestCreateResolver + * @name exports.createCommunicationRequest * @static - * @summary CommunicationRequest Create Resolver. + * @summary Create CommunicationRequest resolver. */ -module.exports.communicationrequestCreateResolver = function communicationrequestCreateResolver( +module.exports.createCommunicationRequest = function createCommunicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestUpdateResolver + * @name exports.updateCommunicationRequest * @static - * @summary CommunicationRequest Update Resolver. + * @summary Update CommunicationRequest resolver. */ -module.exports.communicationrequestUpdateResolver = function communicationrequestUpdateResolver( +module.exports.updateCommunicationRequest = function updateCommunicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.communicationrequestDeleteResolver + * @name exports.removeCommunicationRequest * @static - * @summary CommunicationRequest Delete Resolver. + * @summary Remove CommunicationRequest resolver. */ -module.exports.communicationrequestDeleteResolver = function communicationrequestDeleteResolver( +module.exports.removeCommunicationRequest = function removeCommunicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/compartmentdefinition/mutation.js b/src/resources/3_0_1/profiles/compartmentdefinition/mutation.js index 6b6fa0b2..9ed764b8 100644 --- a/src/resources/3_0_1/profiles/compartmentdefinition/mutation.js +++ b/src/resources/3_0_1/profiles/compartmentdefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CompartmentDefinitionSchema = require('../../schemas/compartmentdefinition.schema'); +const CompartmentDefinitionSchema = require('../../schemas/compartmentdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CompartmentDefinitionInput = require('../../inputs/compartmentdefinition.input'); +const CompartmentDefinitionInput = require('../../inputs/compartmentdefinition.input.js'); -// Resolvers -const { - compartmentdefinitionCreateResolver, - compartmentdefinitionUpdateResolver, - compartmentdefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCompartmentDefinition, + updateCompartmentDefinition, + removeCompartmentDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CompartmentDefinition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a CompartmentDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a CompartmentDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.CompartmentDefinitionCreateMutation - * @summary CompartmentDefinitionCreate Mutation. + * @summary CompartmentDefinitionCreate mutation. */ module.exports.CompartmentDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a CompartmentDefinition', - resolve: scopeInvariant(scopeOptions, compartmentdefinitionCreateResolver), + description: 'Create a CompartmentDefinition record', + resolve: scopeInvariant(scopeOptions, createCompartmentDefinition), type: CompartmentDefinitionSchema, + args: WriteArgs, }; /** * @name exports.CompartmentDefinitionUpdateMutation - * @summary CompartmentDefinitionUpdate Mutation. + * @summary CompartmentDefinitionUpdate mutation. */ module.exports.CompartmentDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple CompartmentDefinitions', - resolve: scopeInvariant(scopeOptions, compartmentdefinitionUpdateResolver), + description: 'Update a CompartmentDefinition record', + resolve: scopeInvariant(scopeOptions, updateCompartmentDefinition), type: CompartmentDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.CompartmentDefinitionDeleteMutation - * @summary CompartmentDefinitionDelete Mutation. + * @name exports.CompartmentDefinitionRemoveMutation + * @summary CompartmentDefinitionRemove mutation. */ -module.exports.CompartmentDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single CompartmentDefinition', - resolve: scopeInvariant(scopeOptions, compartmentdefinitionDeleteResolver), +module.exports.CompartmentDefinitionRemoveMutation = { + description: 'Remove a CompartmentDefinition record', + resolve: scopeInvariant(scopeOptions, removeCompartmentDefinition), type: CompartmentDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/compartmentdefinition/query.js b/src/resources/3_0_1/profiles/compartmentdefinition/query.js index b07d3c6e..b8d5c733 100644 --- a/src/resources/3_0_1/profiles/compartmentdefinition/query.js +++ b/src/resources/3_0_1/profiles/compartmentdefinition/query.js @@ -1,55 +1,65 @@ // Schemas -const CompartmentDefinitionSchema = require('../../schemas/compartmentdefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CompartmentDefinitionSchema = require('../../schemas/compartmentdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CompartmentDefinitionArgs = require('../../parameters/compartmentdefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CompartmentDefinitionArgs = require('../../parameters/compartmentdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CompartmentDefinitionArgs, +); // Resolvers const { - compartmentdefinitionResolver, - compartmentdefinitionListResolver, - compartmentdefinitionInstanceResolver, + getCompartmentDefinition, + getCompartmentDefinitionList, + getCompartmentDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'CompartmentDefinition', action: 'read', - version: '3_0_1', }; /** * @name exports.CompartmentDefinitionQuery - * @summary CompartmentDefinition Query. + * @summary CompartmentDefinition query. */ module.exports.CompartmentDefinitionQuery = { - args: Object.assign({}, CommonArgs, CompartmentDefinitionArgs), description: 'Query for a single CompartmentDefinition', - resolve: scopeInvariant(scopeOptions, compartmentdefinitionResolver), + resolve: scopeInvariant(scopeOptions, getCompartmentDefinition), type: CompartmentDefinitionSchema, + args: args, }; /** * @name exports.CompartmentDefinitionListQuery - * @summary CompartmentDefinitionList Query. + * @summary CompartmentDefinition query. */ module.exports.CompartmentDefinitionListQuery = { - args: Object.assign({}, CommonArgs, CompartmentDefinitionArgs), - description: 'Query for multiple CompartmentDefinitions', - resolve: scopeInvariant(scopeOptions, compartmentdefinitionListResolver), + description: 'Query for a more than or just one CompartmentDefinition', + resolve: scopeInvariant(scopeOptions, getCompartmentDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.CompartmentDefinitionInstanceQuery - * @summary CompartmentDefinitionInstance Query. + * @summary CompartmentDefinition query. */ module.exports.CompartmentDefinitionInstanceQuery = { - description: 'Get information about a single CompartmentDefinition', - resolve: scopeInvariant(scopeOptions, compartmentdefinitionInstanceResolver), + description: 'Access information about a single CompartmentDefinition', + resolve: scopeInvariant(scopeOptions, getCompartmentDefinitionInstance), type: CompartmentDefinitionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/compartmentdefinition/index.js b/src/resources/3_0_1/profiles/compartmentdefinition/register.js similarity index 91% rename from src/resources/3_0_1/profiles/compartmentdefinition/index.js rename to src/resources/3_0_1/profiles/compartmentdefinition/register.js index e36e4166..176661ce 100644 --- a/src/resources/3_0_1/profiles/compartmentdefinition/index.js +++ b/src/resources/3_0_1/profiles/compartmentdefinition/register.js @@ -1,15 +1,15 @@ +const { + CompartmentDefinitionCreateMutation, + CompartmentDefinitionUpdateMutation, + CompartmentDefinitionRemoveMutation, +} = require('./mutation'); + const { CompartmentDefinitionQuery, CompartmentDefinitionListQuery, CompartmentDefinitionInstanceQuery, } = require('./query'); -const { - CompartmentDefinitionCreateMutation, - CompartmentDefinitionUpdateMutation, - CompartmentDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CompartmentDefinitionCreate: CompartmentDefinitionCreateMutation, CompartmentDefinitionUpdate: CompartmentDefinitionUpdateMutation, - CompartmentDefinitionDelete: CompartmentDefinitionDeleteMutation, + CompartmentDefinitionRemove: CompartmentDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'CompartmentDefinition', path: '/3_0_1/CompartmentDefinition/:id', query: CompartmentDefinitionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/compartmentdefinition/resolver.js b/src/resources/3_0_1/profiles/compartmentdefinition/resolver.js index 39796cdb..0df90044 100644 --- a/src/resources/3_0_1/profiles/compartmentdefinition/resolver.js +++ b/src/resources/3_0_1/profiles/compartmentdefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.compartmentdefinitionResolver + * @name exports.getCompartmentDefinition * @static - * @summary CompartmentDefinition Resolver. + * @summary CompartmentDefinition resolver. */ -module.exports.compartmentdefinitionResolver = function compartmentdefinitionResolver( +module.exports.getCompartmentDefinition = function getCompartmentDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compartmentdefinitionListResolver + * @name exports.getCompartmentDefinitionList * @static - * @summary CompartmentDefinition List Resolver. + * @summary CompartmentDefinition list resolver. */ -module.exports.compartmentdefinitionListResolver = function compartmentdefinitionListResolver( +module.exports.getCompartmentDefinitionList = function getCompartmentDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compartmentdefinitionInstanceResolver + * @name exports.getCompartmentDefinitionInstance * @static - * @summary CompartmentDefinition Instance Resolver. + * @summary CompartmentDefinition instance resolver. */ -module.exports.compartmentdefinitionInstanceResolver = function compartmentdefinitionInstanceResolver( +module.exports.getCompartmentDefinitionInstance = function getCompartmentDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compartmentdefinitionCreateResolver + * @name exports.createCompartmentDefinition * @static - * @summary CompartmentDefinition Create Resolver. + * @summary Create CompartmentDefinition resolver. */ -module.exports.compartmentdefinitionCreateResolver = function compartmentdefinitionCreateResolver( +module.exports.createCompartmentDefinition = function createCompartmentDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compartmentdefinitionUpdateResolver + * @name exports.updateCompartmentDefinition * @static - * @summary CompartmentDefinition Update Resolver. + * @summary Update CompartmentDefinition resolver. */ -module.exports.compartmentdefinitionUpdateResolver = function compartmentdefinitionUpdateResolver( +module.exports.updateCompartmentDefinition = function updateCompartmentDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compartmentdefinitionDeleteResolver + * @name exports.removeCompartmentDefinition * @static - * @summary CompartmentDefinition Delete Resolver. + * @summary Remove CompartmentDefinition resolver. */ -module.exports.compartmentdefinitionDeleteResolver = function compartmentdefinitionDeleteResolver( +module.exports.removeCompartmentDefinition = function removeCompartmentDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/composition/mutation.js b/src/resources/3_0_1/profiles/composition/mutation.js index f439cc98..b43974c2 100644 --- a/src/resources/3_0_1/profiles/composition/mutation.js +++ b/src/resources/3_0_1/profiles/composition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CompositionSchema = require('../../schemas/composition.schema'); +const CompositionSchema = require('../../schemas/composition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CompositionInput = require('../../inputs/composition.input'); +const CompositionInput = require('../../inputs/composition.input.js'); -// Resolvers -const { - compositionCreateResolver, - compositionUpdateResolver, - compositionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createComposition, + updateComposition, + removeComposition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Composition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Composition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Composition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.CompositionCreateMutation - * @summary CompositionCreate Mutation. + * @summary CompositionCreate mutation. */ module.exports.CompositionCreateMutation = { - args: WriteArgs, - description: 'Create a Composition', - resolve: scopeInvariant(scopeOptions, compositionCreateResolver), + description: 'Create a Composition record', + resolve: scopeInvariant(scopeOptions, createComposition), type: CompositionSchema, + args: WriteArgs, }; /** * @name exports.CompositionUpdateMutation - * @summary CompositionUpdate Mutation. + * @summary CompositionUpdate mutation. */ module.exports.CompositionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Compositions', - resolve: scopeInvariant(scopeOptions, compositionUpdateResolver), + description: 'Update a Composition record', + resolve: scopeInvariant(scopeOptions, updateComposition), type: CompositionSchema, + args: WriteArgs, }; /** - * @name exports.CompositionDeleteMutation - * @summary CompositionDelete Mutation. + * @name exports.CompositionRemoveMutation + * @summary CompositionRemove mutation. */ -module.exports.CompositionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Composition', - resolve: scopeInvariant(scopeOptions, compositionDeleteResolver), +module.exports.CompositionRemoveMutation = { + description: 'Remove a Composition record', + resolve: scopeInvariant(scopeOptions, removeComposition), type: CompositionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/composition/query.js b/src/resources/3_0_1/profiles/composition/query.js index 7d1fdd94..698af3db 100644 --- a/src/resources/3_0_1/profiles/composition/query.js +++ b/src/resources/3_0_1/profiles/composition/query.js @@ -1,55 +1,60 @@ // Schemas -const CompositionSchema = require('../../schemas/composition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CompositionSchema = require('../../schemas/composition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CompositionArgs = require('../../parameters/composition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CompositionArgs = require('../../parameters/composition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CompositionArgs); // Resolvers const { - compositionResolver, - compositionListResolver, - compositionInstanceResolver, + getComposition, + getCompositionList, + getCompositionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Composition', action: 'read', - version: '3_0_1', }; /** * @name exports.CompositionQuery - * @summary Composition Query. + * @summary Composition query. */ module.exports.CompositionQuery = { - args: Object.assign({}, CommonArgs, CompositionArgs), description: 'Query for a single Composition', - resolve: scopeInvariant(scopeOptions, compositionResolver), + resolve: scopeInvariant(scopeOptions, getComposition), type: CompositionSchema, + args: args, }; /** * @name exports.CompositionListQuery - * @summary CompositionList Query. + * @summary Composition query. */ module.exports.CompositionListQuery = { - args: Object.assign({}, CommonArgs, CompositionArgs), - description: 'Query for multiple Compositions', - resolve: scopeInvariant(scopeOptions, compositionListResolver), + description: 'Query for a more than or just one Composition', + resolve: scopeInvariant(scopeOptions, getCompositionList), type: BundleSchema, + args: args, }; /** * @name exports.CompositionInstanceQuery - * @summary CompositionInstance Query. + * @summary Composition query. */ module.exports.CompositionInstanceQuery = { - description: 'Get information about a single Composition', - resolve: scopeInvariant(scopeOptions, compositionInstanceResolver), + description: 'Access information about a single Composition', + resolve: scopeInvariant(scopeOptions, getCompositionInstance), type: CompositionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/composition/index.js b/src/resources/3_0_1/profiles/composition/register.js similarity index 92% rename from src/resources/3_0_1/profiles/composition/index.js rename to src/resources/3_0_1/profiles/composition/register.js index 8bc41180..061572f6 100644 --- a/src/resources/3_0_1/profiles/composition/index.js +++ b/src/resources/3_0_1/profiles/composition/register.js @@ -1,15 +1,15 @@ +const { + CompositionCreateMutation, + CompositionUpdateMutation, + CompositionRemoveMutation, +} = require('./mutation'); + const { CompositionQuery, CompositionListQuery, CompositionInstanceQuery, } = require('./query'); -const { - CompositionCreateMutation, - CompositionUpdateMutation, - CompositionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CompositionCreate: CompositionCreateMutation, CompositionUpdate: CompositionUpdateMutation, - CompositionDelete: CompositionDeleteMutation, + CompositionRemove: CompositionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Composition', path: '/3_0_1/Composition/:id', query: CompositionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/composition/resolver.js b/src/resources/3_0_1/profiles/composition/resolver.js index b0e1dcce..7b810f94 100644 --- a/src/resources/3_0_1/profiles/composition/resolver.js +++ b/src/resources/3_0_1/profiles/composition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.compositionResolver + * @name exports.getComposition * @static - * @summary Composition Resolver. + * @summary Composition resolver. */ -module.exports.compositionResolver = function compositionResolver( +module.exports.getComposition = function getComposition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionListResolver + * @name exports.getCompositionList * @static - * @summary Composition List Resolver. + * @summary Composition list resolver. */ -module.exports.compositionListResolver = function compositionListResolver( +module.exports.getCompositionList = function getCompositionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionInstanceResolver + * @name exports.getCompositionInstance * @static - * @summary Composition Instance Resolver. + * @summary Composition instance resolver. */ -module.exports.compositionInstanceResolver = function compositionInstanceResolver( +module.exports.getCompositionInstance = function getCompositionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionCreateResolver + * @name exports.createComposition * @static - * @summary Composition Create Resolver. + * @summary Create Composition resolver. */ -module.exports.compositionCreateResolver = function compositionCreateResolver( +module.exports.createComposition = function createComposition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionUpdateResolver + * @name exports.updateComposition * @static - * @summary Composition Update Resolver. + * @summary Update Composition resolver. */ -module.exports.compositionUpdateResolver = function compositionUpdateResolver( +module.exports.updateComposition = function updateComposition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.compositionDeleteResolver + * @name exports.removeComposition * @static - * @summary Composition Delete Resolver. + * @summary Remove Composition resolver. */ -module.exports.compositionDeleteResolver = function compositionDeleteResolver( +module.exports.removeComposition = function removeComposition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/conceptmap/mutation.js b/src/resources/3_0_1/profiles/conceptmap/mutation.js index 444de326..b2babe5e 100644 --- a/src/resources/3_0_1/profiles/conceptmap/mutation.js +++ b/src/resources/3_0_1/profiles/conceptmap/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ConceptMapSchema = require('../../schemas/conceptmap.schema'); +const ConceptMapSchema = require('../../schemas/conceptmap.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ConceptMapInput = require('../../inputs/conceptmap.input'); +const ConceptMapInput = require('../../inputs/conceptmap.input.js'); -// Resolvers -const { - conceptmapCreateResolver, - conceptmapUpdateResolver, - conceptmapDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createConceptMap, + updateConceptMap, + removeConceptMap, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ConceptMap', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ConceptMap record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ConceptMap record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ConceptMapCreateMutation - * @summary ConceptMapCreate Mutation. + * @summary ConceptMapCreate mutation. */ module.exports.ConceptMapCreateMutation = { - args: WriteArgs, - description: 'Create a ConceptMap', - resolve: scopeInvariant(scopeOptions, conceptmapCreateResolver), + description: 'Create a ConceptMap record', + resolve: scopeInvariant(scopeOptions, createConceptMap), type: ConceptMapSchema, + args: WriteArgs, }; /** * @name exports.ConceptMapUpdateMutation - * @summary ConceptMapUpdate Mutation. + * @summary ConceptMapUpdate mutation. */ module.exports.ConceptMapUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ConceptMaps', - resolve: scopeInvariant(scopeOptions, conceptmapUpdateResolver), + description: 'Update a ConceptMap record', + resolve: scopeInvariant(scopeOptions, updateConceptMap), type: ConceptMapSchema, + args: WriteArgs, }; /** - * @name exports.ConceptMapDeleteMutation - * @summary ConceptMapDelete Mutation. + * @name exports.ConceptMapRemoveMutation + * @summary ConceptMapRemove mutation. */ -module.exports.ConceptMapDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ConceptMap', - resolve: scopeInvariant(scopeOptions, conceptmapDeleteResolver), +module.exports.ConceptMapRemoveMutation = { + description: 'Remove a ConceptMap record', + resolve: scopeInvariant(scopeOptions, removeConceptMap), type: ConceptMapSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/conceptmap/query.js b/src/resources/3_0_1/profiles/conceptmap/query.js index 95889d4e..f89dd02b 100644 --- a/src/resources/3_0_1/profiles/conceptmap/query.js +++ b/src/resources/3_0_1/profiles/conceptmap/query.js @@ -1,55 +1,60 @@ // Schemas -const ConceptMapSchema = require('../../schemas/conceptmap.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConceptMapSchema = require('../../schemas/conceptmap.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ConceptMapArgs = require('../../parameters/conceptmap.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ConceptMapArgs = require('../../parameters/conceptmap.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ConceptMapArgs); // Resolvers const { - conceptmapResolver, - conceptmapListResolver, - conceptmapInstanceResolver, + getConceptMap, + getConceptMapList, + getConceptMapInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ConceptMap', action: 'read', - version: '3_0_1', }; /** * @name exports.ConceptMapQuery - * @summary ConceptMap Query. + * @summary ConceptMap query. */ module.exports.ConceptMapQuery = { - args: Object.assign({}, CommonArgs, ConceptMapArgs), description: 'Query for a single ConceptMap', - resolve: scopeInvariant(scopeOptions, conceptmapResolver), + resolve: scopeInvariant(scopeOptions, getConceptMap), type: ConceptMapSchema, + args: args, }; /** * @name exports.ConceptMapListQuery - * @summary ConceptMapList Query. + * @summary ConceptMap query. */ module.exports.ConceptMapListQuery = { - args: Object.assign({}, CommonArgs, ConceptMapArgs), - description: 'Query for multiple ConceptMaps', - resolve: scopeInvariant(scopeOptions, conceptmapListResolver), + description: 'Query for a more than or just one ConceptMap', + resolve: scopeInvariant(scopeOptions, getConceptMapList), type: BundleSchema, + args: args, }; /** * @name exports.ConceptMapInstanceQuery - * @summary ConceptMapInstance Query. + * @summary ConceptMap query. */ module.exports.ConceptMapInstanceQuery = { - description: 'Get information about a single ConceptMap', - resolve: scopeInvariant(scopeOptions, conceptmapInstanceResolver), + description: 'Access information about a single ConceptMap', + resolve: scopeInvariant(scopeOptions, getConceptMapInstance), type: ConceptMapSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/conceptmap/index.js b/src/resources/3_0_1/profiles/conceptmap/register.js similarity index 92% rename from src/resources/3_0_1/profiles/conceptmap/index.js rename to src/resources/3_0_1/profiles/conceptmap/register.js index 7406fa95..571aaa7c 100644 --- a/src/resources/3_0_1/profiles/conceptmap/index.js +++ b/src/resources/3_0_1/profiles/conceptmap/register.js @@ -1,15 +1,15 @@ +const { + ConceptMapCreateMutation, + ConceptMapUpdateMutation, + ConceptMapRemoveMutation, +} = require('./mutation'); + const { ConceptMapQuery, ConceptMapListQuery, ConceptMapInstanceQuery, } = require('./query'); -const { - ConceptMapCreateMutation, - ConceptMapUpdateMutation, - ConceptMapDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ConceptMapCreate: ConceptMapCreateMutation, ConceptMapUpdate: ConceptMapUpdateMutation, - ConceptMapDelete: ConceptMapDeleteMutation, + ConceptMapRemove: ConceptMapRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ConceptMap', path: '/3_0_1/ConceptMap/:id', query: ConceptMapInstanceQuery, diff --git a/src/resources/3_0_1/profiles/conceptmap/resolver.js b/src/resources/3_0_1/profiles/conceptmap/resolver.js index a09ae8f4..df5d3b51 100644 --- a/src/resources/3_0_1/profiles/conceptmap/resolver.js +++ b/src/resources/3_0_1/profiles/conceptmap/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.conceptmapResolver + * @name exports.getConceptMap * @static - * @summary ConceptMap Resolver. + * @summary ConceptMap resolver. */ -module.exports.conceptmapResolver = function conceptmapResolver( +module.exports.getConceptMap = function getConceptMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapListResolver + * @name exports.getConceptMapList * @static - * @summary ConceptMap List Resolver. + * @summary ConceptMap list resolver. */ -module.exports.conceptmapListResolver = function conceptmapListResolver( +module.exports.getConceptMapList = function getConceptMapList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapInstanceResolver + * @name exports.getConceptMapInstance * @static - * @summary ConceptMap Instance Resolver. + * @summary ConceptMap instance resolver. */ -module.exports.conceptmapInstanceResolver = function conceptmapInstanceResolver( +module.exports.getConceptMapInstance = function getConceptMapInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapCreateResolver + * @name exports.createConceptMap * @static - * @summary ConceptMap Create Resolver. + * @summary Create ConceptMap resolver. */ -module.exports.conceptmapCreateResolver = function conceptmapCreateResolver( +module.exports.createConceptMap = function createConceptMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapUpdateResolver + * @name exports.updateConceptMap * @static - * @summary ConceptMap Update Resolver. + * @summary Update ConceptMap resolver. */ -module.exports.conceptmapUpdateResolver = function conceptmapUpdateResolver( +module.exports.updateConceptMap = function updateConceptMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conceptmapDeleteResolver + * @name exports.removeConceptMap * @static - * @summary ConceptMap Delete Resolver. + * @summary Remove ConceptMap resolver. */ -module.exports.conceptmapDeleteResolver = function conceptmapDeleteResolver( +module.exports.removeConceptMap = function removeConceptMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/condition/mutation.js b/src/resources/3_0_1/profiles/condition/mutation.js index c0865ba6..6c5e53da 100644 --- a/src/resources/3_0_1/profiles/condition/mutation.js +++ b/src/resources/3_0_1/profiles/condition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ConditionSchema = require('../../schemas/condition.schema'); +const ConditionSchema = require('../../schemas/condition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ConditionInput = require('../../inputs/condition.input'); +const ConditionInput = require('../../inputs/condition.input.js'); -// Resolvers -const { - conditionCreateResolver, - conditionUpdateResolver, - conditionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCondition, + updateCondition, + removeCondition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Condition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Condition record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Condition record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ConditionCreateMutation - * @summary ConditionCreate Mutation. + * @summary ConditionCreate mutation. */ module.exports.ConditionCreateMutation = { - args: WriteArgs, - description: 'Create a Condition', - resolve: scopeInvariant(scopeOptions, conditionCreateResolver), + description: 'Create a Condition record', + resolve: scopeInvariant(scopeOptions, createCondition), type: ConditionSchema, + args: WriteArgs, }; /** * @name exports.ConditionUpdateMutation - * @summary ConditionUpdate Mutation. + * @summary ConditionUpdate mutation. */ module.exports.ConditionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Conditions', - resolve: scopeInvariant(scopeOptions, conditionUpdateResolver), + description: 'Update a Condition record', + resolve: scopeInvariant(scopeOptions, updateCondition), type: ConditionSchema, + args: WriteArgs, }; /** - * @name exports.ConditionDeleteMutation - * @summary ConditionDelete Mutation. + * @name exports.ConditionRemoveMutation + * @summary ConditionRemove mutation. */ -module.exports.ConditionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Condition', - resolve: scopeInvariant(scopeOptions, conditionDeleteResolver), +module.exports.ConditionRemoveMutation = { + description: 'Remove a Condition record', + resolve: scopeInvariant(scopeOptions, removeCondition), type: ConditionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/condition/query.js b/src/resources/3_0_1/profiles/condition/query.js index 8f5a4c46..294dd7e7 100644 --- a/src/resources/3_0_1/profiles/condition/query.js +++ b/src/resources/3_0_1/profiles/condition/query.js @@ -1,55 +1,60 @@ // Schemas -const ConditionSchema = require('../../schemas/condition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConditionSchema = require('../../schemas/condition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ConditionArgs = require('../../parameters/condition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ConditionArgs = require('../../parameters/condition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ConditionArgs); // Resolvers const { - conditionResolver, - conditionListResolver, - conditionInstanceResolver, + getCondition, + getConditionList, + getConditionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Condition', action: 'read', - version: '3_0_1', }; /** * @name exports.ConditionQuery - * @summary Condition Query. + * @summary Condition query. */ module.exports.ConditionQuery = { - args: Object.assign({}, CommonArgs, ConditionArgs), description: 'Query for a single Condition', - resolve: scopeInvariant(scopeOptions, conditionResolver), + resolve: scopeInvariant(scopeOptions, getCondition), type: ConditionSchema, + args: args, }; /** * @name exports.ConditionListQuery - * @summary ConditionList Query. + * @summary Condition query. */ module.exports.ConditionListQuery = { - args: Object.assign({}, CommonArgs, ConditionArgs), - description: 'Query for multiple Conditions', - resolve: scopeInvariant(scopeOptions, conditionListResolver), + description: 'Query for a more than or just one Condition', + resolve: scopeInvariant(scopeOptions, getConditionList), type: BundleSchema, + args: args, }; /** * @name exports.ConditionInstanceQuery - * @summary ConditionInstance Query. + * @summary Condition query. */ module.exports.ConditionInstanceQuery = { - description: 'Get information about a single Condition', - resolve: scopeInvariant(scopeOptions, conditionInstanceResolver), + description: 'Access information about a single Condition', + resolve: scopeInvariant(scopeOptions, getConditionInstance), type: ConditionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/condition/index.js b/src/resources/3_0_1/profiles/condition/register.js similarity index 92% rename from src/resources/3_0_1/profiles/condition/index.js rename to src/resources/3_0_1/profiles/condition/register.js index ec49cd3f..41281a21 100644 --- a/src/resources/3_0_1/profiles/condition/index.js +++ b/src/resources/3_0_1/profiles/condition/register.js @@ -1,15 +1,15 @@ +const { + ConditionCreateMutation, + ConditionUpdateMutation, + ConditionRemoveMutation, +} = require('./mutation'); + const { ConditionQuery, ConditionListQuery, ConditionInstanceQuery, } = require('./query'); -const { - ConditionCreateMutation, - ConditionUpdateMutation, - ConditionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ConditionCreate: ConditionCreateMutation, ConditionUpdate: ConditionUpdateMutation, - ConditionDelete: ConditionDeleteMutation, + ConditionRemove: ConditionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Condition', path: '/3_0_1/Condition/:id', query: ConditionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/condition/resolver.js b/src/resources/3_0_1/profiles/condition/resolver.js index 0c169bc8..868361c3 100644 --- a/src/resources/3_0_1/profiles/condition/resolver.js +++ b/src/resources/3_0_1/profiles/condition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.conditionResolver + * @name exports.getCondition * @static - * @summary Condition Resolver. + * @summary Condition resolver. */ -module.exports.conditionResolver = function conditionResolver( +module.exports.getCondition = function getCondition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionListResolver + * @name exports.getConditionList * @static - * @summary Condition List Resolver. + * @summary Condition list resolver. */ -module.exports.conditionListResolver = function conditionListResolver( +module.exports.getConditionList = function getConditionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionInstanceResolver + * @name exports.getConditionInstance * @static - * @summary Condition Instance Resolver. + * @summary Condition instance resolver. */ -module.exports.conditionInstanceResolver = function conditionInstanceResolver( +module.exports.getConditionInstance = function getConditionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionCreateResolver + * @name exports.createCondition * @static - * @summary Condition Create Resolver. + * @summary Create Condition resolver. */ -module.exports.conditionCreateResolver = function conditionCreateResolver( +module.exports.createCondition = function createCondition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionUpdateResolver + * @name exports.updateCondition * @static - * @summary Condition Update Resolver. + * @summary Update Condition resolver. */ -module.exports.conditionUpdateResolver = function conditionUpdateResolver( +module.exports.updateCondition = function updateCondition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.conditionDeleteResolver + * @name exports.removeCondition * @static - * @summary Condition Delete Resolver. + * @summary Remove Condition resolver. */ -module.exports.conditionDeleteResolver = function conditionDeleteResolver( +module.exports.removeCondition = function removeCondition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/consent/mutation.js b/src/resources/3_0_1/profiles/consent/mutation.js index 69e6f688..253c84fc 100644 --- a/src/resources/3_0_1/profiles/consent/mutation.js +++ b/src/resources/3_0_1/profiles/consent/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ConsentSchema = require('../../schemas/consent.schema'); +const ConsentSchema = require('../../schemas/consent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ConsentInput = require('../../inputs/consent.input'); +const ConsentInput = require('../../inputs/consent.input.js'); -// Resolvers -const { - consentCreateResolver, - consentUpdateResolver, - consentDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createConsent, updateConsent, removeConsent } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Consent', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Consent record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Consent record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.ConsentCreateMutation - * @summary ConsentCreate Mutation. + * @summary ConsentCreate mutation. */ module.exports.ConsentCreateMutation = { - args: WriteArgs, - description: 'Create a Consent', - resolve: scopeInvariant(scopeOptions, consentCreateResolver), + description: 'Create a Consent record', + resolve: scopeInvariant(scopeOptions, createConsent), type: ConsentSchema, + args: WriteArgs, }; /** * @name exports.ConsentUpdateMutation - * @summary ConsentUpdate Mutation. + * @summary ConsentUpdate mutation. */ module.exports.ConsentUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Consents', - resolve: scopeInvariant(scopeOptions, consentUpdateResolver), + description: 'Update a Consent record', + resolve: scopeInvariant(scopeOptions, updateConsent), type: ConsentSchema, + args: WriteArgs, }; /** - * @name exports.ConsentDeleteMutation - * @summary ConsentDelete Mutation. + * @name exports.ConsentRemoveMutation + * @summary ConsentRemove mutation. */ -module.exports.ConsentDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Consent', - resolve: scopeInvariant(scopeOptions, consentDeleteResolver), +module.exports.ConsentRemoveMutation = { + description: 'Remove a Consent record', + resolve: scopeInvariant(scopeOptions, removeConsent), type: ConsentSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/consent/query.js b/src/resources/3_0_1/profiles/consent/query.js index 88954792..4bd8eeff 100644 --- a/src/resources/3_0_1/profiles/consent/query.js +++ b/src/resources/3_0_1/profiles/consent/query.js @@ -1,55 +1,60 @@ // Schemas -const ConsentSchema = require('../../schemas/consent.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConsentSchema = require('../../schemas/consent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ConsentArgs = require('../../parameters/consent.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ConsentArgs = require('../../parameters/consent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ConsentArgs); // Resolvers const { - consentResolver, - consentListResolver, - consentInstanceResolver, + getConsent, + getConsentList, + getConsentInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Consent', action: 'read', - version: '3_0_1', }; /** * @name exports.ConsentQuery - * @summary Consent Query. + * @summary Consent query. */ module.exports.ConsentQuery = { - args: Object.assign({}, CommonArgs, ConsentArgs), description: 'Query for a single Consent', - resolve: scopeInvariant(scopeOptions, consentResolver), + resolve: scopeInvariant(scopeOptions, getConsent), type: ConsentSchema, + args: args, }; /** * @name exports.ConsentListQuery - * @summary ConsentList Query. + * @summary Consent query. */ module.exports.ConsentListQuery = { - args: Object.assign({}, CommonArgs, ConsentArgs), - description: 'Query for multiple Consents', - resolve: scopeInvariant(scopeOptions, consentListResolver), + description: 'Query for a more than or just one Consent', + resolve: scopeInvariant(scopeOptions, getConsentList), type: BundleSchema, + args: args, }; /** * @name exports.ConsentInstanceQuery - * @summary ConsentInstance Query. + * @summary Consent query. */ module.exports.ConsentInstanceQuery = { - description: 'Get information about a single Consent', - resolve: scopeInvariant(scopeOptions, consentInstanceResolver), + description: 'Access information about a single Consent', + resolve: scopeInvariant(scopeOptions, getConsentInstance), type: ConsentSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/consent/index.js b/src/resources/3_0_1/profiles/consent/register.js similarity index 92% rename from src/resources/3_0_1/profiles/consent/index.js rename to src/resources/3_0_1/profiles/consent/register.js index 60884f49..91c03ddc 100644 --- a/src/resources/3_0_1/profiles/consent/index.js +++ b/src/resources/3_0_1/profiles/consent/register.js @@ -1,15 +1,15 @@ +const { + ConsentCreateMutation, + ConsentUpdateMutation, + ConsentRemoveMutation, +} = require('./mutation'); + const { ConsentQuery, ConsentListQuery, ConsentInstanceQuery, } = require('./query'); -const { - ConsentCreateMutation, - ConsentUpdateMutation, - ConsentDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ConsentCreate: ConsentCreateMutation, ConsentUpdate: ConsentUpdateMutation, - ConsentDelete: ConsentDeleteMutation, + ConsentRemove: ConsentRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Consent', path: '/3_0_1/Consent/:id', query: ConsentInstanceQuery, diff --git a/src/resources/3_0_1/profiles/consent/resolver.js b/src/resources/3_0_1/profiles/consent/resolver.js index 4e89f641..391342a0 100644 --- a/src/resources/3_0_1/profiles/consent/resolver.js +++ b/src/resources/3_0_1/profiles/consent/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.consentResolver + * @name exports.getConsent * @static - * @summary Consent Resolver. + * @summary Consent resolver. */ -module.exports.consentResolver = function consentResolver( +module.exports.getConsent = function getConsent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.consentListResolver + * @name exports.getConsentList * @static - * @summary Consent List Resolver. + * @summary Consent list resolver. */ -module.exports.consentListResolver = function consentListResolver( +module.exports.getConsentList = function getConsentList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.consentInstanceResolver + * @name exports.getConsentInstance * @static - * @summary Consent Instance Resolver. + * @summary Consent instance resolver. */ -module.exports.consentInstanceResolver = function consentInstanceResolver( +module.exports.getConsentInstance = function getConsentInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.consentCreateResolver + * @name exports.createConsent * @static - * @summary Consent Create Resolver. + * @summary Create Consent resolver. */ -module.exports.consentCreateResolver = function consentCreateResolver( +module.exports.createConsent = function createConsent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.consentUpdateResolver + * @name exports.updateConsent * @static - * @summary Consent Update Resolver. + * @summary Update Consent resolver. */ -module.exports.consentUpdateResolver = function consentUpdateResolver( +module.exports.updateConsent = function updateConsent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.consentDeleteResolver + * @name exports.removeConsent * @static - * @summary Consent Delete Resolver. + * @summary Remove Consent resolver. */ -module.exports.consentDeleteResolver = function consentDeleteResolver( +module.exports.removeConsent = function removeConsent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/contract/mutation.js b/src/resources/3_0_1/profiles/contract/mutation.js index bb50f54c..90e7e504 100644 --- a/src/resources/3_0_1/profiles/contract/mutation.js +++ b/src/resources/3_0_1/profiles/contract/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ContractSchema = require('../../schemas/contract.schema'); +const ContractSchema = require('../../schemas/contract.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ContractInput = require('../../inputs/contract.input'); +const ContractInput = require('../../inputs/contract.input.js'); -// Resolvers -const { - contractCreateResolver, - contractUpdateResolver, - contractDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createContract, + updateContract, + removeContract, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Contract', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Contract record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Contract record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ContractCreateMutation - * @summary ContractCreate Mutation. + * @summary ContractCreate mutation. */ module.exports.ContractCreateMutation = { - args: WriteArgs, - description: 'Create a Contract', - resolve: scopeInvariant(scopeOptions, contractCreateResolver), + description: 'Create a Contract record', + resolve: scopeInvariant(scopeOptions, createContract), type: ContractSchema, + args: WriteArgs, }; /** * @name exports.ContractUpdateMutation - * @summary ContractUpdate Mutation. + * @summary ContractUpdate mutation. */ module.exports.ContractUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Contracts', - resolve: scopeInvariant(scopeOptions, contractUpdateResolver), + description: 'Update a Contract record', + resolve: scopeInvariant(scopeOptions, updateContract), type: ContractSchema, + args: WriteArgs, }; /** - * @name exports.ContractDeleteMutation - * @summary ContractDelete Mutation. + * @name exports.ContractRemoveMutation + * @summary ContractRemove mutation. */ -module.exports.ContractDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Contract', - resolve: scopeInvariant(scopeOptions, contractDeleteResolver), +module.exports.ContractRemoveMutation = { + description: 'Remove a Contract record', + resolve: scopeInvariant(scopeOptions, removeContract), type: ContractSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/contract/query.js b/src/resources/3_0_1/profiles/contract/query.js index c8b46e1b..525c659f 100644 --- a/src/resources/3_0_1/profiles/contract/query.js +++ b/src/resources/3_0_1/profiles/contract/query.js @@ -1,55 +1,60 @@ // Schemas -const ContractSchema = require('../../schemas/contract.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ContractSchema = require('../../schemas/contract.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ContractArgs = require('../../parameters/contract.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ContractArgs = require('../../parameters/contract.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ContractArgs); // Resolvers const { - contractResolver, - contractListResolver, - contractInstanceResolver, + getContract, + getContractList, + getContractInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Contract', action: 'read', - version: '3_0_1', }; /** * @name exports.ContractQuery - * @summary Contract Query. + * @summary Contract query. */ module.exports.ContractQuery = { - args: Object.assign({}, CommonArgs, ContractArgs), description: 'Query for a single Contract', - resolve: scopeInvariant(scopeOptions, contractResolver), + resolve: scopeInvariant(scopeOptions, getContract), type: ContractSchema, + args: args, }; /** * @name exports.ContractListQuery - * @summary ContractList Query. + * @summary Contract query. */ module.exports.ContractListQuery = { - args: Object.assign({}, CommonArgs, ContractArgs), - description: 'Query for multiple Contracts', - resolve: scopeInvariant(scopeOptions, contractListResolver), + description: 'Query for a more than or just one Contract', + resolve: scopeInvariant(scopeOptions, getContractList), type: BundleSchema, + args: args, }; /** * @name exports.ContractInstanceQuery - * @summary ContractInstance Query. + * @summary Contract query. */ module.exports.ContractInstanceQuery = { - description: 'Get information about a single Contract', - resolve: scopeInvariant(scopeOptions, contractInstanceResolver), + description: 'Access information about a single Contract', + resolve: scopeInvariant(scopeOptions, getContractInstance), type: ContractSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/contract/index.js b/src/resources/3_0_1/profiles/contract/register.js similarity index 92% rename from src/resources/3_0_1/profiles/contract/index.js rename to src/resources/3_0_1/profiles/contract/register.js index d91832fb..a5eec3e0 100644 --- a/src/resources/3_0_1/profiles/contract/index.js +++ b/src/resources/3_0_1/profiles/contract/register.js @@ -1,15 +1,15 @@ +const { + ContractCreateMutation, + ContractUpdateMutation, + ContractRemoveMutation, +} = require('./mutation'); + const { ContractQuery, ContractListQuery, ContractInstanceQuery, } = require('./query'); -const { - ContractCreateMutation, - ContractUpdateMutation, - ContractDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ContractCreate: ContractCreateMutation, ContractUpdate: ContractUpdateMutation, - ContractDelete: ContractDeleteMutation, + ContractRemove: ContractRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Contract', path: '/3_0_1/Contract/:id', query: ContractInstanceQuery, diff --git a/src/resources/3_0_1/profiles/contract/resolver.js b/src/resources/3_0_1/profiles/contract/resolver.js index 2093d7d0..8c286140 100644 --- a/src/resources/3_0_1/profiles/contract/resolver.js +++ b/src/resources/3_0_1/profiles/contract/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.contractResolver + * @name exports.getContract * @static - * @summary Contract Resolver. + * @summary Contract resolver. */ -module.exports.contractResolver = function contractResolver( +module.exports.getContract = function getContract( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractListResolver + * @name exports.getContractList * @static - * @summary Contract List Resolver. + * @summary Contract list resolver. */ -module.exports.contractListResolver = function contractListResolver( +module.exports.getContractList = function getContractList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractInstanceResolver + * @name exports.getContractInstance * @static - * @summary Contract Instance Resolver. + * @summary Contract instance resolver. */ -module.exports.contractInstanceResolver = function contractInstanceResolver( +module.exports.getContractInstance = function getContractInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractCreateResolver + * @name exports.createContract * @static - * @summary Contract Create Resolver. + * @summary Create Contract resolver. */ -module.exports.contractCreateResolver = function contractCreateResolver( +module.exports.createContract = function createContract( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractUpdateResolver + * @name exports.updateContract * @static - * @summary Contract Update Resolver. + * @summary Update Contract resolver. */ -module.exports.contractUpdateResolver = function contractUpdateResolver( +module.exports.updateContract = function updateContract( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.contractDeleteResolver + * @name exports.removeContract * @static - * @summary Contract Delete Resolver. + * @summary Remove Contract resolver. */ -module.exports.contractDeleteResolver = function contractDeleteResolver( +module.exports.removeContract = function removeContract( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/coverage/mutation.js b/src/resources/3_0_1/profiles/coverage/mutation.js index 61c42396..b303bb42 100644 --- a/src/resources/3_0_1/profiles/coverage/mutation.js +++ b/src/resources/3_0_1/profiles/coverage/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const CoverageSchema = require('../../schemas/coverage.schema'); +const CoverageSchema = require('../../schemas/coverage.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const CoverageInput = require('../../inputs/coverage.input'); +const CoverageInput = require('../../inputs/coverage.input.js'); -// Resolvers -const { - coverageCreateResolver, - coverageUpdateResolver, - coverageDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createCoverage, + updateCoverage, + removeCoverage, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Coverage', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Coverage record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Coverage record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.CoverageCreateMutation - * @summary CoverageCreate Mutation. + * @summary CoverageCreate mutation. */ module.exports.CoverageCreateMutation = { - args: WriteArgs, - description: 'Create a Coverage', - resolve: scopeInvariant(scopeOptions, coverageCreateResolver), + description: 'Create a Coverage record', + resolve: scopeInvariant(scopeOptions, createCoverage), type: CoverageSchema, + args: WriteArgs, }; /** * @name exports.CoverageUpdateMutation - * @summary CoverageUpdate Mutation. + * @summary CoverageUpdate mutation. */ module.exports.CoverageUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Coverages', - resolve: scopeInvariant(scopeOptions, coverageUpdateResolver), + description: 'Update a Coverage record', + resolve: scopeInvariant(scopeOptions, updateCoverage), type: CoverageSchema, + args: WriteArgs, }; /** - * @name exports.CoverageDeleteMutation - * @summary CoverageDelete Mutation. + * @name exports.CoverageRemoveMutation + * @summary CoverageRemove mutation. */ -module.exports.CoverageDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Coverage', - resolve: scopeInvariant(scopeOptions, coverageDeleteResolver), +module.exports.CoverageRemoveMutation = { + description: 'Remove a Coverage record', + resolve: scopeInvariant(scopeOptions, removeCoverage), type: CoverageSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/coverage/query.js b/src/resources/3_0_1/profiles/coverage/query.js index efa649bb..461c6f0b 100644 --- a/src/resources/3_0_1/profiles/coverage/query.js +++ b/src/resources/3_0_1/profiles/coverage/query.js @@ -1,55 +1,60 @@ // Schemas -const CoverageSchema = require('../../schemas/coverage.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CoverageSchema = require('../../schemas/coverage.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const CoverageArgs = require('../../parameters/coverage.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const CoverageArgs = require('../../parameters/coverage.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CoverageArgs); // Resolvers const { - coverageResolver, - coverageListResolver, - coverageInstanceResolver, + getCoverage, + getCoverageList, + getCoverageInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Coverage', action: 'read', - version: '3_0_1', }; /** * @name exports.CoverageQuery - * @summary Coverage Query. + * @summary Coverage query. */ module.exports.CoverageQuery = { - args: Object.assign({}, CommonArgs, CoverageArgs), description: 'Query for a single Coverage', - resolve: scopeInvariant(scopeOptions, coverageResolver), + resolve: scopeInvariant(scopeOptions, getCoverage), type: CoverageSchema, + args: args, }; /** * @name exports.CoverageListQuery - * @summary CoverageList Query. + * @summary Coverage query. */ module.exports.CoverageListQuery = { - args: Object.assign({}, CommonArgs, CoverageArgs), - description: 'Query for multiple Coverages', - resolve: scopeInvariant(scopeOptions, coverageListResolver), + description: 'Query for a more than or just one Coverage', + resolve: scopeInvariant(scopeOptions, getCoverageList), type: BundleSchema, + args: args, }; /** * @name exports.CoverageInstanceQuery - * @summary CoverageInstance Query. + * @summary Coverage query. */ module.exports.CoverageInstanceQuery = { - description: 'Get information about a single Coverage', - resolve: scopeInvariant(scopeOptions, coverageInstanceResolver), + description: 'Access information about a single Coverage', + resolve: scopeInvariant(scopeOptions, getCoverageInstance), type: CoverageSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/coverage/index.js b/src/resources/3_0_1/profiles/coverage/register.js similarity index 92% rename from src/resources/3_0_1/profiles/coverage/index.js rename to src/resources/3_0_1/profiles/coverage/register.js index 864ffa79..35ee3822 100644 --- a/src/resources/3_0_1/profiles/coverage/index.js +++ b/src/resources/3_0_1/profiles/coverage/register.js @@ -1,15 +1,15 @@ +const { + CoverageCreateMutation, + CoverageUpdateMutation, + CoverageRemoveMutation, +} = require('./mutation'); + const { CoverageQuery, CoverageListQuery, CoverageInstanceQuery, } = require('./query'); -const { - CoverageCreateMutation, - CoverageUpdateMutation, - CoverageDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { CoverageCreate: CoverageCreateMutation, CoverageUpdate: CoverageUpdateMutation, - CoverageDelete: CoverageDeleteMutation, + CoverageRemove: CoverageRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Coverage', path: '/3_0_1/Coverage/:id', query: CoverageInstanceQuery, diff --git a/src/resources/3_0_1/profiles/coverage/resolver.js b/src/resources/3_0_1/profiles/coverage/resolver.js index ff344f22..3370c457 100644 --- a/src/resources/3_0_1/profiles/coverage/resolver.js +++ b/src/resources/3_0_1/profiles/coverage/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.coverageResolver + * @name exports.getCoverage * @static - * @summary Coverage Resolver. + * @summary Coverage resolver. */ -module.exports.coverageResolver = function coverageResolver( +module.exports.getCoverage = function getCoverage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageListResolver + * @name exports.getCoverageList * @static - * @summary Coverage List Resolver. + * @summary Coverage list resolver. */ -module.exports.coverageListResolver = function coverageListResolver( +module.exports.getCoverageList = function getCoverageList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageInstanceResolver + * @name exports.getCoverageInstance * @static - * @summary Coverage Instance Resolver. + * @summary Coverage instance resolver. */ -module.exports.coverageInstanceResolver = function coverageInstanceResolver( +module.exports.getCoverageInstance = function getCoverageInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageCreateResolver + * @name exports.createCoverage * @static - * @summary Coverage Create Resolver. + * @summary Create Coverage resolver. */ -module.exports.coverageCreateResolver = function coverageCreateResolver( +module.exports.createCoverage = function createCoverage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageUpdateResolver + * @name exports.updateCoverage * @static - * @summary Coverage Update Resolver. + * @summary Update Coverage resolver. */ -module.exports.coverageUpdateResolver = function coverageUpdateResolver( +module.exports.updateCoverage = function updateCoverage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.coverageDeleteResolver + * @name exports.removeCoverage * @static - * @summary Coverage Delete Resolver. + * @summary Remove Coverage resolver. */ -module.exports.coverageDeleteResolver = function coverageDeleteResolver( +module.exports.removeCoverage = function removeCoverage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/dataelement/mutation.js b/src/resources/3_0_1/profiles/dataelement/mutation.js index 3aaa44bd..92ee301e 100644 --- a/src/resources/3_0_1/profiles/dataelement/mutation.js +++ b/src/resources/3_0_1/profiles/dataelement/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DataElementSchema = require('../../schemas/dataelement.schema'); +const DataElementSchema = require('../../schemas/dataelement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DataElementInput = require('../../inputs/dataelement.input'); +const DataElementInput = require('../../inputs/dataelement.input.js'); -// Resolvers -const { - dataelementCreateResolver, - dataelementUpdateResolver, - dataelementDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDataElement, + updateDataElement, + removeDataElement, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DataElement', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DataElement record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DataElement record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DataElementCreateMutation - * @summary DataElementCreate Mutation. + * @summary DataElementCreate mutation. */ module.exports.DataElementCreateMutation = { - args: WriteArgs, - description: 'Create a DataElement', - resolve: scopeInvariant(scopeOptions, dataelementCreateResolver), + description: 'Create a DataElement record', + resolve: scopeInvariant(scopeOptions, createDataElement), type: DataElementSchema, + args: WriteArgs, }; /** * @name exports.DataElementUpdateMutation - * @summary DataElementUpdate Mutation. + * @summary DataElementUpdate mutation. */ module.exports.DataElementUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DataElements', - resolve: scopeInvariant(scopeOptions, dataelementUpdateResolver), + description: 'Update a DataElement record', + resolve: scopeInvariant(scopeOptions, updateDataElement), type: DataElementSchema, + args: WriteArgs, }; /** - * @name exports.DataElementDeleteMutation - * @summary DataElementDelete Mutation. + * @name exports.DataElementRemoveMutation + * @summary DataElementRemove mutation. */ -module.exports.DataElementDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DataElement', - resolve: scopeInvariant(scopeOptions, dataelementDeleteResolver), +module.exports.DataElementRemoveMutation = { + description: 'Remove a DataElement record', + resolve: scopeInvariant(scopeOptions, removeDataElement), type: DataElementSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/dataelement/query.js b/src/resources/3_0_1/profiles/dataelement/query.js index 9d8bd5bc..dfa6833e 100644 --- a/src/resources/3_0_1/profiles/dataelement/query.js +++ b/src/resources/3_0_1/profiles/dataelement/query.js @@ -1,55 +1,60 @@ // Schemas -const DataElementSchema = require('../../schemas/dataelement.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DataElementSchema = require('../../schemas/dataelement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DataElementArgs = require('../../parameters/dataelement.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DataElementArgs = require('../../parameters/dataelement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, DataElementArgs); // Resolvers const { - dataelementResolver, - dataelementListResolver, - dataelementInstanceResolver, + getDataElement, + getDataElementList, + getDataElementInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DataElement', action: 'read', - version: '3_0_1', }; /** * @name exports.DataElementQuery - * @summary DataElement Query. + * @summary DataElement query. */ module.exports.DataElementQuery = { - args: Object.assign({}, CommonArgs, DataElementArgs), description: 'Query for a single DataElement', - resolve: scopeInvariant(scopeOptions, dataelementResolver), + resolve: scopeInvariant(scopeOptions, getDataElement), type: DataElementSchema, + args: args, }; /** * @name exports.DataElementListQuery - * @summary DataElementList Query. + * @summary DataElement query. */ module.exports.DataElementListQuery = { - args: Object.assign({}, CommonArgs, DataElementArgs), - description: 'Query for multiple DataElements', - resolve: scopeInvariant(scopeOptions, dataelementListResolver), + description: 'Query for a more than or just one DataElement', + resolve: scopeInvariant(scopeOptions, getDataElementList), type: BundleSchema, + args: args, }; /** * @name exports.DataElementInstanceQuery - * @summary DataElementInstance Query. + * @summary DataElement query. */ module.exports.DataElementInstanceQuery = { - description: 'Get information about a single DataElement', - resolve: scopeInvariant(scopeOptions, dataelementInstanceResolver), + description: 'Access information about a single DataElement', + resolve: scopeInvariant(scopeOptions, getDataElementInstance), type: DataElementSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/dataelement/index.js b/src/resources/3_0_1/profiles/dataelement/register.js similarity index 92% rename from src/resources/3_0_1/profiles/dataelement/index.js rename to src/resources/3_0_1/profiles/dataelement/register.js index 0973aa35..5e57cbf9 100644 --- a/src/resources/3_0_1/profiles/dataelement/index.js +++ b/src/resources/3_0_1/profiles/dataelement/register.js @@ -1,15 +1,15 @@ +const { + DataElementCreateMutation, + DataElementUpdateMutation, + DataElementRemoveMutation, +} = require('./mutation'); + const { DataElementQuery, DataElementListQuery, DataElementInstanceQuery, } = require('./query'); -const { - DataElementCreateMutation, - DataElementUpdateMutation, - DataElementDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DataElementCreate: DataElementCreateMutation, DataElementUpdate: DataElementUpdateMutation, - DataElementDelete: DataElementDeleteMutation, + DataElementRemove: DataElementRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DataElement', path: '/3_0_1/DataElement/:id', query: DataElementInstanceQuery, diff --git a/src/resources/3_0_1/profiles/dataelement/resolver.js b/src/resources/3_0_1/profiles/dataelement/resolver.js index 7812b473..a5af0283 100644 --- a/src/resources/3_0_1/profiles/dataelement/resolver.js +++ b/src/resources/3_0_1/profiles/dataelement/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.dataelementResolver + * @name exports.getDataElement * @static - * @summary DataElement Resolver. + * @summary DataElement resolver. */ -module.exports.dataelementResolver = function dataelementResolver( +module.exports.getDataElement = function getDataElement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementListResolver + * @name exports.getDataElementList * @static - * @summary DataElement List Resolver. + * @summary DataElement list resolver. */ -module.exports.dataelementListResolver = function dataelementListResolver( +module.exports.getDataElementList = function getDataElementList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementInstanceResolver + * @name exports.getDataElementInstance * @static - * @summary DataElement Instance Resolver. + * @summary DataElement instance resolver. */ -module.exports.dataelementInstanceResolver = function dataelementInstanceResolver( +module.exports.getDataElementInstance = function getDataElementInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementCreateResolver + * @name exports.createDataElement * @static - * @summary DataElement Create Resolver. + * @summary Create DataElement resolver. */ -module.exports.dataelementCreateResolver = function dataelementCreateResolver( +module.exports.createDataElement = function createDataElement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementUpdateResolver + * @name exports.updateDataElement * @static - * @summary DataElement Update Resolver. + * @summary Update DataElement resolver. */ -module.exports.dataelementUpdateResolver = function dataelementUpdateResolver( +module.exports.updateDataElement = function updateDataElement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.dataelementDeleteResolver + * @name exports.removeDataElement * @static - * @summary DataElement Delete Resolver. + * @summary Remove DataElement resolver. */ -module.exports.dataelementDeleteResolver = function dataelementDeleteResolver( +module.exports.removeDataElement = function removeDataElement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/detectedissue/mutation.js b/src/resources/3_0_1/profiles/detectedissue/mutation.js index 3bd9a6a6..e08b8bc2 100644 --- a/src/resources/3_0_1/profiles/detectedissue/mutation.js +++ b/src/resources/3_0_1/profiles/detectedissue/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DetectedIssueSchema = require('../../schemas/detectedissue.schema'); +const DetectedIssueSchema = require('../../schemas/detectedissue.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DetectedIssueInput = require('../../inputs/detectedissue.input'); +const DetectedIssueInput = require('../../inputs/detectedissue.input.js'); -// Resolvers -const { - detectedissueCreateResolver, - detectedissueUpdateResolver, - detectedissueDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDetectedIssue, + updateDetectedIssue, + removeDetectedIssue, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DetectedIssue', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DetectedIssue record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DetectedIssue record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DetectedIssueCreateMutation - * @summary DetectedIssueCreate Mutation. + * @summary DetectedIssueCreate mutation. */ module.exports.DetectedIssueCreateMutation = { - args: WriteArgs, - description: 'Create a DetectedIssue', - resolve: scopeInvariant(scopeOptions, detectedissueCreateResolver), + description: 'Create a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, createDetectedIssue), type: DetectedIssueSchema, + args: WriteArgs, }; /** * @name exports.DetectedIssueUpdateMutation - * @summary DetectedIssueUpdate Mutation. + * @summary DetectedIssueUpdate mutation. */ module.exports.DetectedIssueUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DetectedIssues', - resolve: scopeInvariant(scopeOptions, detectedissueUpdateResolver), + description: 'Update a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, updateDetectedIssue), type: DetectedIssueSchema, + args: WriteArgs, }; /** - * @name exports.DetectedIssueDeleteMutation - * @summary DetectedIssueDelete Mutation. + * @name exports.DetectedIssueRemoveMutation + * @summary DetectedIssueRemove mutation. */ -module.exports.DetectedIssueDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DetectedIssue', - resolve: scopeInvariant(scopeOptions, detectedissueDeleteResolver), +module.exports.DetectedIssueRemoveMutation = { + description: 'Remove a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, removeDetectedIssue), type: DetectedIssueSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/detectedissue/query.js b/src/resources/3_0_1/profiles/detectedissue/query.js index 9042359b..b1e25aae 100644 --- a/src/resources/3_0_1/profiles/detectedissue/query.js +++ b/src/resources/3_0_1/profiles/detectedissue/query.js @@ -1,55 +1,65 @@ // Schemas -const DetectedIssueSchema = require('../../schemas/detectedissue.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DetectedIssueSchema = require('../../schemas/detectedissue.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DetectedIssueArgs = require('../../parameters/detectedissue.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DetectedIssueArgs = require('../../parameters/detectedissue.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DetectedIssueArgs, +); // Resolvers const { - detectedissueResolver, - detectedissueListResolver, - detectedissueInstanceResolver, + getDetectedIssue, + getDetectedIssueList, + getDetectedIssueInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DetectedIssue', action: 'read', - version: '3_0_1', }; /** * @name exports.DetectedIssueQuery - * @summary DetectedIssue Query. + * @summary DetectedIssue query. */ module.exports.DetectedIssueQuery = { - args: Object.assign({}, CommonArgs, DetectedIssueArgs), description: 'Query for a single DetectedIssue', - resolve: scopeInvariant(scopeOptions, detectedissueResolver), + resolve: scopeInvariant(scopeOptions, getDetectedIssue), type: DetectedIssueSchema, + args: args, }; /** * @name exports.DetectedIssueListQuery - * @summary DetectedIssueList Query. + * @summary DetectedIssue query. */ module.exports.DetectedIssueListQuery = { - args: Object.assign({}, CommonArgs, DetectedIssueArgs), - description: 'Query for multiple DetectedIssues', - resolve: scopeInvariant(scopeOptions, detectedissueListResolver), + description: 'Query for a more than or just one DetectedIssue', + resolve: scopeInvariant(scopeOptions, getDetectedIssueList), type: BundleSchema, + args: args, }; /** * @name exports.DetectedIssueInstanceQuery - * @summary DetectedIssueInstance Query. + * @summary DetectedIssue query. */ module.exports.DetectedIssueInstanceQuery = { - description: 'Get information about a single DetectedIssue', - resolve: scopeInvariant(scopeOptions, detectedissueInstanceResolver), + description: 'Access information about a single DetectedIssue', + resolve: scopeInvariant(scopeOptions, getDetectedIssueInstance), type: DetectedIssueSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/detectedissue/index.js b/src/resources/3_0_1/profiles/detectedissue/register.js similarity index 92% rename from src/resources/3_0_1/profiles/detectedissue/index.js rename to src/resources/3_0_1/profiles/detectedissue/register.js index f04363c1..9fc5a68e 100644 --- a/src/resources/3_0_1/profiles/detectedissue/index.js +++ b/src/resources/3_0_1/profiles/detectedissue/register.js @@ -1,15 +1,15 @@ +const { + DetectedIssueCreateMutation, + DetectedIssueUpdateMutation, + DetectedIssueRemoveMutation, +} = require('./mutation'); + const { DetectedIssueQuery, DetectedIssueListQuery, DetectedIssueInstanceQuery, } = require('./query'); -const { - DetectedIssueCreateMutation, - DetectedIssueUpdateMutation, - DetectedIssueDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DetectedIssueCreate: DetectedIssueCreateMutation, DetectedIssueUpdate: DetectedIssueUpdateMutation, - DetectedIssueDelete: DetectedIssueDeleteMutation, + DetectedIssueRemove: DetectedIssueRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DetectedIssue', path: '/3_0_1/DetectedIssue/:id', query: DetectedIssueInstanceQuery, diff --git a/src/resources/3_0_1/profiles/detectedissue/resolver.js b/src/resources/3_0_1/profiles/detectedissue/resolver.js index 0e0487c6..2f049205 100644 --- a/src/resources/3_0_1/profiles/detectedissue/resolver.js +++ b/src/resources/3_0_1/profiles/detectedissue/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.detectedissueResolver + * @name exports.getDetectedIssue * @static - * @summary DetectedIssue Resolver. + * @summary DetectedIssue resolver. */ -module.exports.detectedissueResolver = function detectedissueResolver( +module.exports.getDetectedIssue = function getDetectedIssue( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueListResolver + * @name exports.getDetectedIssueList * @static - * @summary DetectedIssue List Resolver. + * @summary DetectedIssue list resolver. */ -module.exports.detectedissueListResolver = function detectedissueListResolver( +module.exports.getDetectedIssueList = function getDetectedIssueList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueInstanceResolver + * @name exports.getDetectedIssueInstance * @static - * @summary DetectedIssue Instance Resolver. + * @summary DetectedIssue instance resolver. */ -module.exports.detectedissueInstanceResolver = function detectedissueInstanceResolver( +module.exports.getDetectedIssueInstance = function getDetectedIssueInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueCreateResolver + * @name exports.createDetectedIssue * @static - * @summary DetectedIssue Create Resolver. + * @summary Create DetectedIssue resolver. */ -module.exports.detectedissueCreateResolver = function detectedissueCreateResolver( +module.exports.createDetectedIssue = function createDetectedIssue( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueUpdateResolver + * @name exports.updateDetectedIssue * @static - * @summary DetectedIssue Update Resolver. + * @summary Update DetectedIssue resolver. */ -module.exports.detectedissueUpdateResolver = function detectedissueUpdateResolver( +module.exports.updateDetectedIssue = function updateDetectedIssue( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.detectedissueDeleteResolver + * @name exports.removeDetectedIssue * @static - * @summary DetectedIssue Delete Resolver. + * @summary Remove DetectedIssue resolver. */ -module.exports.detectedissueDeleteResolver = function detectedissueDeleteResolver( +module.exports.removeDetectedIssue = function removeDetectedIssue( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/device/mutation.js b/src/resources/3_0_1/profiles/device/mutation.js index 494a8d5c..28e8c671 100644 --- a/src/resources/3_0_1/profiles/device/mutation.js +++ b/src/resources/3_0_1/profiles/device/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceSchema = require('../../schemas/device.schema'); +const DeviceSchema = require('../../schemas/device.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceInput = require('../../inputs/device.input'); +const DeviceInput = require('../../inputs/device.input.js'); -// Resolvers -const { - deviceCreateResolver, - deviceUpdateResolver, - deviceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createDevice, updateDevice, removeDevice } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Device', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Device record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Device record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.DeviceCreateMutation - * @summary DeviceCreate Mutation. + * @summary DeviceCreate mutation. */ module.exports.DeviceCreateMutation = { - args: WriteArgs, - description: 'Create a Device', - resolve: scopeInvariant(scopeOptions, deviceCreateResolver), + description: 'Create a Device record', + resolve: scopeInvariant(scopeOptions, createDevice), type: DeviceSchema, + args: WriteArgs, }; /** * @name exports.DeviceUpdateMutation - * @summary DeviceUpdate Mutation. + * @summary DeviceUpdate mutation. */ module.exports.DeviceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Devices', - resolve: scopeInvariant(scopeOptions, deviceUpdateResolver), + description: 'Update a Device record', + resolve: scopeInvariant(scopeOptions, updateDevice), type: DeviceSchema, + args: WriteArgs, }; /** - * @name exports.DeviceDeleteMutation - * @summary DeviceDelete Mutation. + * @name exports.DeviceRemoveMutation + * @summary DeviceRemove mutation. */ -module.exports.DeviceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Device', - resolve: scopeInvariant(scopeOptions, deviceDeleteResolver), +module.exports.DeviceRemoveMutation = { + description: 'Remove a Device record', + resolve: scopeInvariant(scopeOptions, removeDevice), type: DeviceSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/device/query.js b/src/resources/3_0_1/profiles/device/query.js index b3422837..f6fca767 100644 --- a/src/resources/3_0_1/profiles/device/query.js +++ b/src/resources/3_0_1/profiles/device/query.js @@ -1,55 +1,56 @@ // Schemas -const DeviceSchema = require('../../schemas/device.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceSchema = require('../../schemas/device.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceArgs = require('../../parameters/device.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceArgs = require('../../parameters/device.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, DeviceArgs); // Resolvers -const { - deviceResolver, - deviceListResolver, - deviceInstanceResolver, -} = require('./resolver'); +const { getDevice, getDeviceList, getDeviceInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Device', action: 'read', - version: '3_0_1', }; /** * @name exports.DeviceQuery - * @summary Device Query. + * @summary Device query. */ module.exports.DeviceQuery = { - args: Object.assign({}, CommonArgs, DeviceArgs), description: 'Query for a single Device', - resolve: scopeInvariant(scopeOptions, deviceResolver), + resolve: scopeInvariant(scopeOptions, getDevice), type: DeviceSchema, + args: args, }; /** * @name exports.DeviceListQuery - * @summary DeviceList Query. + * @summary Device query. */ module.exports.DeviceListQuery = { - args: Object.assign({}, CommonArgs, DeviceArgs), - description: 'Query for multiple Devices', - resolve: scopeInvariant(scopeOptions, deviceListResolver), + description: 'Query for a more than or just one Device', + resolve: scopeInvariant(scopeOptions, getDeviceList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceInstanceQuery - * @summary DeviceInstance Query. + * @summary Device query. */ module.exports.DeviceInstanceQuery = { - description: 'Get information about a single Device', - resolve: scopeInvariant(scopeOptions, deviceInstanceResolver), + description: 'Access information about a single Device', + resolve: scopeInvariant(scopeOptions, getDeviceInstance), type: DeviceSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/device/index.js b/src/resources/3_0_1/profiles/device/register.js similarity index 93% rename from src/resources/3_0_1/profiles/device/index.js rename to src/resources/3_0_1/profiles/device/register.js index 20d62df4..4b179dc0 100644 --- a/src/resources/3_0_1/profiles/device/index.js +++ b/src/resources/3_0_1/profiles/device/register.js @@ -1,15 +1,15 @@ +const { + DeviceCreateMutation, + DeviceUpdateMutation, + DeviceRemoveMutation, +} = require('./mutation'); + const { DeviceQuery, DeviceListQuery, DeviceInstanceQuery, } = require('./query'); -const { - DeviceCreateMutation, - DeviceUpdateMutation, - DeviceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceCreate: DeviceCreateMutation, DeviceUpdate: DeviceUpdateMutation, - DeviceDelete: DeviceDeleteMutation, + DeviceRemove: DeviceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Device', path: '/3_0_1/Device/:id', query: DeviceInstanceQuery, diff --git a/src/resources/3_0_1/profiles/device/resolver.js b/src/resources/3_0_1/profiles/device/resolver.js index 885b0fd6..61c357a8 100644 --- a/src/resources/3_0_1/profiles/device/resolver.js +++ b/src/resources/3_0_1/profiles/device/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.deviceResolver + * @name exports.getDevice * @static - * @summary Device Resolver. + * @summary Device resolver. */ -module.exports.deviceResolver = function deviceResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getDevice = function getDevice(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceListResolver + * @name exports.getDeviceList * @static - * @summary Device List Resolver. + * @summary Device list resolver. */ -module.exports.deviceListResolver = function deviceListResolver( +module.exports.getDeviceList = function getDeviceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceInstanceResolver + * @name exports.getDeviceInstance * @static - * @summary Device Instance Resolver. + * @summary Device instance resolver. */ -module.exports.deviceInstanceResolver = function deviceInstanceResolver( +module.exports.getDeviceInstance = function getDeviceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceCreateResolver + * @name exports.createDevice * @static - * @summary Device Create Resolver. + * @summary Create Device resolver. */ -module.exports.deviceCreateResolver = function deviceCreateResolver( +module.exports.createDevice = function createDevice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceUpdateResolver + * @name exports.updateDevice * @static - * @summary Device Update Resolver. + * @summary Update Device resolver. */ -module.exports.deviceUpdateResolver = function deviceUpdateResolver( +module.exports.updateDevice = function updateDevice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceDeleteResolver + * @name exports.removeDevice * @static - * @summary Device Delete Resolver. + * @summary Remove Device resolver. */ -module.exports.deviceDeleteResolver = function deviceDeleteResolver( +module.exports.removeDevice = function removeDevice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/devicecomponent/mutation.js b/src/resources/3_0_1/profiles/devicecomponent/mutation.js index 403ad668..1e5b2fdb 100644 --- a/src/resources/3_0_1/profiles/devicecomponent/mutation.js +++ b/src/resources/3_0_1/profiles/devicecomponent/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceComponentSchema = require('../../schemas/devicecomponent.schema'); +const DeviceComponentSchema = require('../../schemas/devicecomponent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceComponentInput = require('../../inputs/devicecomponent.input'); +const DeviceComponentInput = require('../../inputs/devicecomponent.input.js'); -// Resolvers -const { - devicecomponentCreateResolver, - devicecomponentUpdateResolver, - devicecomponentDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDeviceComponent, + updateDeviceComponent, + removeDeviceComponent, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceComponent', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DeviceComponent record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DeviceComponent record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DeviceComponentCreateMutation - * @summary DeviceComponentCreate Mutation. + * @summary DeviceComponentCreate mutation. */ module.exports.DeviceComponentCreateMutation = { - args: WriteArgs, - description: 'Create a DeviceComponent', - resolve: scopeInvariant(scopeOptions, devicecomponentCreateResolver), + description: 'Create a DeviceComponent record', + resolve: scopeInvariant(scopeOptions, createDeviceComponent), type: DeviceComponentSchema, + args: WriteArgs, }; /** * @name exports.DeviceComponentUpdateMutation - * @summary DeviceComponentUpdate Mutation. + * @summary DeviceComponentUpdate mutation. */ module.exports.DeviceComponentUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DeviceComponents', - resolve: scopeInvariant(scopeOptions, devicecomponentUpdateResolver), + description: 'Update a DeviceComponent record', + resolve: scopeInvariant(scopeOptions, updateDeviceComponent), type: DeviceComponentSchema, + args: WriteArgs, }; /** - * @name exports.DeviceComponentDeleteMutation - * @summary DeviceComponentDelete Mutation. + * @name exports.DeviceComponentRemoveMutation + * @summary DeviceComponentRemove mutation. */ -module.exports.DeviceComponentDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DeviceComponent', - resolve: scopeInvariant(scopeOptions, devicecomponentDeleteResolver), +module.exports.DeviceComponentRemoveMutation = { + description: 'Remove a DeviceComponent record', + resolve: scopeInvariant(scopeOptions, removeDeviceComponent), type: DeviceComponentSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/devicecomponent/query.js b/src/resources/3_0_1/profiles/devicecomponent/query.js index 29115b9d..72a65717 100644 --- a/src/resources/3_0_1/profiles/devicecomponent/query.js +++ b/src/resources/3_0_1/profiles/devicecomponent/query.js @@ -1,55 +1,65 @@ // Schemas -const DeviceComponentSchema = require('../../schemas/devicecomponent.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceComponentSchema = require('../../schemas/devicecomponent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceComponentArgs = require('../../parameters/devicecomponent.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceComponentArgs = require('../../parameters/devicecomponent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DeviceComponentArgs, +); // Resolvers const { - devicecomponentResolver, - devicecomponentListResolver, - devicecomponentInstanceResolver, + getDeviceComponent, + getDeviceComponentList, + getDeviceComponentInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceComponent', action: 'read', - version: '3_0_1', }; /** * @name exports.DeviceComponentQuery - * @summary DeviceComponent Query. + * @summary DeviceComponent query. */ module.exports.DeviceComponentQuery = { - args: Object.assign({}, CommonArgs, DeviceComponentArgs), description: 'Query for a single DeviceComponent', - resolve: scopeInvariant(scopeOptions, devicecomponentResolver), + resolve: scopeInvariant(scopeOptions, getDeviceComponent), type: DeviceComponentSchema, + args: args, }; /** * @name exports.DeviceComponentListQuery - * @summary DeviceComponentList Query. + * @summary DeviceComponent query. */ module.exports.DeviceComponentListQuery = { - args: Object.assign({}, CommonArgs, DeviceComponentArgs), - description: 'Query for multiple DeviceComponents', - resolve: scopeInvariant(scopeOptions, devicecomponentListResolver), + description: 'Query for a more than or just one DeviceComponent', + resolve: scopeInvariant(scopeOptions, getDeviceComponentList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceComponentInstanceQuery - * @summary DeviceComponentInstance Query. + * @summary DeviceComponent query. */ module.exports.DeviceComponentInstanceQuery = { - description: 'Get information about a single DeviceComponent', - resolve: scopeInvariant(scopeOptions, devicecomponentInstanceResolver), + description: 'Access information about a single DeviceComponent', + resolve: scopeInvariant(scopeOptions, getDeviceComponentInstance), type: DeviceComponentSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/devicecomponent/index.js b/src/resources/3_0_1/profiles/devicecomponent/register.js similarity index 91% rename from src/resources/3_0_1/profiles/devicecomponent/index.js rename to src/resources/3_0_1/profiles/devicecomponent/register.js index 9a44f613..57d40623 100644 --- a/src/resources/3_0_1/profiles/devicecomponent/index.js +++ b/src/resources/3_0_1/profiles/devicecomponent/register.js @@ -1,15 +1,15 @@ +const { + DeviceComponentCreateMutation, + DeviceComponentUpdateMutation, + DeviceComponentRemoveMutation, +} = require('./mutation'); + const { DeviceComponentQuery, DeviceComponentListQuery, DeviceComponentInstanceQuery, } = require('./query'); -const { - DeviceComponentCreateMutation, - DeviceComponentUpdateMutation, - DeviceComponentDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceComponentCreate: DeviceComponentCreateMutation, DeviceComponentUpdate: DeviceComponentUpdateMutation, - DeviceComponentDelete: DeviceComponentDeleteMutation, + DeviceComponentRemove: DeviceComponentRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DeviceComponent', path: '/3_0_1/DeviceComponent/:id', query: DeviceComponentInstanceQuery, diff --git a/src/resources/3_0_1/profiles/devicecomponent/resolver.js b/src/resources/3_0_1/profiles/devicecomponent/resolver.js index 1fc2ac64..9476a417 100644 --- a/src/resources/3_0_1/profiles/devicecomponent/resolver.js +++ b/src/resources/3_0_1/profiles/devicecomponent/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.devicecomponentResolver + * @name exports.getDeviceComponent * @static - * @summary DeviceComponent Resolver. + * @summary DeviceComponent resolver. */ -module.exports.devicecomponentResolver = function devicecomponentResolver( +module.exports.getDeviceComponent = function getDeviceComponent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentListResolver + * @name exports.getDeviceComponentList * @static - * @summary DeviceComponent List Resolver. + * @summary DeviceComponent list resolver. */ -module.exports.devicecomponentListResolver = function devicecomponentListResolver( +module.exports.getDeviceComponentList = function getDeviceComponentList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentInstanceResolver + * @name exports.getDeviceComponentInstance * @static - * @summary DeviceComponent Instance Resolver. + * @summary DeviceComponent instance resolver. */ -module.exports.devicecomponentInstanceResolver = function devicecomponentInstanceResolver( +module.exports.getDeviceComponentInstance = function getDeviceComponentInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentCreateResolver + * @name exports.createDeviceComponent * @static - * @summary DeviceComponent Create Resolver. + * @summary Create DeviceComponent resolver. */ -module.exports.devicecomponentCreateResolver = function devicecomponentCreateResolver( +module.exports.createDeviceComponent = function createDeviceComponent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentUpdateResolver + * @name exports.updateDeviceComponent * @static - * @summary DeviceComponent Update Resolver. + * @summary Update DeviceComponent resolver. */ -module.exports.devicecomponentUpdateResolver = function devicecomponentUpdateResolver( +module.exports.updateDeviceComponent = function updateDeviceComponent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicecomponentDeleteResolver + * @name exports.removeDeviceComponent * @static - * @summary DeviceComponent Delete Resolver. + * @summary Remove DeviceComponent resolver. */ -module.exports.devicecomponentDeleteResolver = function devicecomponentDeleteResolver( +module.exports.removeDeviceComponent = function removeDeviceComponent( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/devicemetric/mutation.js b/src/resources/3_0_1/profiles/devicemetric/mutation.js index ded12acf..223633e9 100644 --- a/src/resources/3_0_1/profiles/devicemetric/mutation.js +++ b/src/resources/3_0_1/profiles/devicemetric/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceMetricSchema = require('../../schemas/devicemetric.schema'); +const DeviceMetricSchema = require('../../schemas/devicemetric.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceMetricInput = require('../../inputs/devicemetric.input'); +const DeviceMetricInput = require('../../inputs/devicemetric.input.js'); -// Resolvers -const { - devicemetricCreateResolver, - devicemetricUpdateResolver, - devicemetricDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDeviceMetric, + updateDeviceMetric, + removeDeviceMetric, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceMetric', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DeviceMetric record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DeviceMetric record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DeviceMetricCreateMutation - * @summary DeviceMetricCreate Mutation. + * @summary DeviceMetricCreate mutation. */ module.exports.DeviceMetricCreateMutation = { - args: WriteArgs, - description: 'Create a DeviceMetric', - resolve: scopeInvariant(scopeOptions, devicemetricCreateResolver), + description: 'Create a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, createDeviceMetric), type: DeviceMetricSchema, + args: WriteArgs, }; /** * @name exports.DeviceMetricUpdateMutation - * @summary DeviceMetricUpdate Mutation. + * @summary DeviceMetricUpdate mutation. */ module.exports.DeviceMetricUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DeviceMetrics', - resolve: scopeInvariant(scopeOptions, devicemetricUpdateResolver), + description: 'Update a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, updateDeviceMetric), type: DeviceMetricSchema, + args: WriteArgs, }; /** - * @name exports.DeviceMetricDeleteMutation - * @summary DeviceMetricDelete Mutation. + * @name exports.DeviceMetricRemoveMutation + * @summary DeviceMetricRemove mutation. */ -module.exports.DeviceMetricDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DeviceMetric', - resolve: scopeInvariant(scopeOptions, devicemetricDeleteResolver), +module.exports.DeviceMetricRemoveMutation = { + description: 'Remove a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, removeDeviceMetric), type: DeviceMetricSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/devicemetric/query.js b/src/resources/3_0_1/profiles/devicemetric/query.js index c89c9f3b..c2a713cf 100644 --- a/src/resources/3_0_1/profiles/devicemetric/query.js +++ b/src/resources/3_0_1/profiles/devicemetric/query.js @@ -1,55 +1,65 @@ // Schemas -const DeviceMetricSchema = require('../../schemas/devicemetric.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceMetricSchema = require('../../schemas/devicemetric.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceMetricArgs = require('../../parameters/devicemetric.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceMetricArgs = require('../../parameters/devicemetric.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DeviceMetricArgs, +); // Resolvers const { - devicemetricResolver, - devicemetricListResolver, - devicemetricInstanceResolver, + getDeviceMetric, + getDeviceMetricList, + getDeviceMetricInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceMetric', action: 'read', - version: '3_0_1', }; /** * @name exports.DeviceMetricQuery - * @summary DeviceMetric Query. + * @summary DeviceMetric query. */ module.exports.DeviceMetricQuery = { - args: Object.assign({}, CommonArgs, DeviceMetricArgs), description: 'Query for a single DeviceMetric', - resolve: scopeInvariant(scopeOptions, devicemetricResolver), + resolve: scopeInvariant(scopeOptions, getDeviceMetric), type: DeviceMetricSchema, + args: args, }; /** * @name exports.DeviceMetricListQuery - * @summary DeviceMetricList Query. + * @summary DeviceMetric query. */ module.exports.DeviceMetricListQuery = { - args: Object.assign({}, CommonArgs, DeviceMetricArgs), - description: 'Query for multiple DeviceMetrics', - resolve: scopeInvariant(scopeOptions, devicemetricListResolver), + description: 'Query for a more than or just one DeviceMetric', + resolve: scopeInvariant(scopeOptions, getDeviceMetricList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceMetricInstanceQuery - * @summary DeviceMetricInstance Query. + * @summary DeviceMetric query. */ module.exports.DeviceMetricInstanceQuery = { - description: 'Get information about a single DeviceMetric', - resolve: scopeInvariant(scopeOptions, devicemetricInstanceResolver), + description: 'Access information about a single DeviceMetric', + resolve: scopeInvariant(scopeOptions, getDeviceMetricInstance), type: DeviceMetricSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/devicemetric/index.js b/src/resources/3_0_1/profiles/devicemetric/register.js similarity index 92% rename from src/resources/3_0_1/profiles/devicemetric/index.js rename to src/resources/3_0_1/profiles/devicemetric/register.js index e9de33ad..a4a0fe25 100644 --- a/src/resources/3_0_1/profiles/devicemetric/index.js +++ b/src/resources/3_0_1/profiles/devicemetric/register.js @@ -1,15 +1,15 @@ +const { + DeviceMetricCreateMutation, + DeviceMetricUpdateMutation, + DeviceMetricRemoveMutation, +} = require('./mutation'); + const { DeviceMetricQuery, DeviceMetricListQuery, DeviceMetricInstanceQuery, } = require('./query'); -const { - DeviceMetricCreateMutation, - DeviceMetricUpdateMutation, - DeviceMetricDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceMetricCreate: DeviceMetricCreateMutation, DeviceMetricUpdate: DeviceMetricUpdateMutation, - DeviceMetricDelete: DeviceMetricDeleteMutation, + DeviceMetricRemove: DeviceMetricRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DeviceMetric', path: '/3_0_1/DeviceMetric/:id', query: DeviceMetricInstanceQuery, diff --git a/src/resources/3_0_1/profiles/devicemetric/resolver.js b/src/resources/3_0_1/profiles/devicemetric/resolver.js index 657c3f0b..5e97735b 100644 --- a/src/resources/3_0_1/profiles/devicemetric/resolver.js +++ b/src/resources/3_0_1/profiles/devicemetric/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.devicemetricResolver + * @name exports.getDeviceMetric * @static - * @summary DeviceMetric Resolver. + * @summary DeviceMetric resolver. */ -module.exports.devicemetricResolver = function devicemetricResolver( +module.exports.getDeviceMetric = function getDeviceMetric( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricListResolver + * @name exports.getDeviceMetricList * @static - * @summary DeviceMetric List Resolver. + * @summary DeviceMetric list resolver. */ -module.exports.devicemetricListResolver = function devicemetricListResolver( +module.exports.getDeviceMetricList = function getDeviceMetricList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricInstanceResolver + * @name exports.getDeviceMetricInstance * @static - * @summary DeviceMetric Instance Resolver. + * @summary DeviceMetric instance resolver. */ -module.exports.devicemetricInstanceResolver = function devicemetricInstanceResolver( +module.exports.getDeviceMetricInstance = function getDeviceMetricInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricCreateResolver + * @name exports.createDeviceMetric * @static - * @summary DeviceMetric Create Resolver. + * @summary Create DeviceMetric resolver. */ -module.exports.devicemetricCreateResolver = function devicemetricCreateResolver( +module.exports.createDeviceMetric = function createDeviceMetric( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricUpdateResolver + * @name exports.updateDeviceMetric * @static - * @summary DeviceMetric Update Resolver. + * @summary Update DeviceMetric resolver. */ -module.exports.devicemetricUpdateResolver = function devicemetricUpdateResolver( +module.exports.updateDeviceMetric = function updateDeviceMetric( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicemetricDeleteResolver + * @name exports.removeDeviceMetric * @static - * @summary DeviceMetric Delete Resolver. + * @summary Remove DeviceMetric resolver. */ -module.exports.devicemetricDeleteResolver = function devicemetricDeleteResolver( +module.exports.removeDeviceMetric = function removeDeviceMetric( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/devicerequest/mutation.js b/src/resources/3_0_1/profiles/devicerequest/mutation.js index 108f6168..77bb58a7 100644 --- a/src/resources/3_0_1/profiles/devicerequest/mutation.js +++ b/src/resources/3_0_1/profiles/devicerequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceRequestSchema = require('../../schemas/devicerequest.schema'); +const DeviceRequestSchema = require('../../schemas/devicerequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceRequestInput = require('../../inputs/devicerequest.input'); +const DeviceRequestInput = require('../../inputs/devicerequest.input.js'); -// Resolvers -const { - devicerequestCreateResolver, - devicerequestUpdateResolver, - devicerequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDeviceRequest, + updateDeviceRequest, + removeDeviceRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DeviceRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DeviceRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DeviceRequestCreateMutation - * @summary DeviceRequestCreate Mutation. + * @summary DeviceRequestCreate mutation. */ module.exports.DeviceRequestCreateMutation = { - args: WriteArgs, - description: 'Create a DeviceRequest', - resolve: scopeInvariant(scopeOptions, devicerequestCreateResolver), + description: 'Create a DeviceRequest record', + resolve: scopeInvariant(scopeOptions, createDeviceRequest), type: DeviceRequestSchema, + args: WriteArgs, }; /** * @name exports.DeviceRequestUpdateMutation - * @summary DeviceRequestUpdate Mutation. + * @summary DeviceRequestUpdate mutation. */ module.exports.DeviceRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DeviceRequests', - resolve: scopeInvariant(scopeOptions, devicerequestUpdateResolver), + description: 'Update a DeviceRequest record', + resolve: scopeInvariant(scopeOptions, updateDeviceRequest), type: DeviceRequestSchema, + args: WriteArgs, }; /** - * @name exports.DeviceRequestDeleteMutation - * @summary DeviceRequestDelete Mutation. + * @name exports.DeviceRequestRemoveMutation + * @summary DeviceRequestRemove mutation. */ -module.exports.DeviceRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DeviceRequest', - resolve: scopeInvariant(scopeOptions, devicerequestDeleteResolver), +module.exports.DeviceRequestRemoveMutation = { + description: 'Remove a DeviceRequest record', + resolve: scopeInvariant(scopeOptions, removeDeviceRequest), type: DeviceRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/devicerequest/query.js b/src/resources/3_0_1/profiles/devicerequest/query.js index aa0662d2..ee3aa996 100644 --- a/src/resources/3_0_1/profiles/devicerequest/query.js +++ b/src/resources/3_0_1/profiles/devicerequest/query.js @@ -1,55 +1,65 @@ // Schemas -const DeviceRequestSchema = require('../../schemas/devicerequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceRequestSchema = require('../../schemas/devicerequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceRequestArgs = require('../../parameters/devicerequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceRequestArgs = require('../../parameters/devicerequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DeviceRequestArgs, +); // Resolvers const { - devicerequestResolver, - devicerequestListResolver, - devicerequestInstanceResolver, + getDeviceRequest, + getDeviceRequestList, + getDeviceRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.DeviceRequestQuery - * @summary DeviceRequest Query. + * @summary DeviceRequest query. */ module.exports.DeviceRequestQuery = { - args: Object.assign({}, CommonArgs, DeviceRequestArgs), description: 'Query for a single DeviceRequest', - resolve: scopeInvariant(scopeOptions, devicerequestResolver), + resolve: scopeInvariant(scopeOptions, getDeviceRequest), type: DeviceRequestSchema, + args: args, }; /** * @name exports.DeviceRequestListQuery - * @summary DeviceRequestList Query. + * @summary DeviceRequest query. */ module.exports.DeviceRequestListQuery = { - args: Object.assign({}, CommonArgs, DeviceRequestArgs), - description: 'Query for multiple DeviceRequests', - resolve: scopeInvariant(scopeOptions, devicerequestListResolver), + description: 'Query for a more than or just one DeviceRequest', + resolve: scopeInvariant(scopeOptions, getDeviceRequestList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceRequestInstanceQuery - * @summary DeviceRequestInstance Query. + * @summary DeviceRequest query. */ module.exports.DeviceRequestInstanceQuery = { - description: 'Get information about a single DeviceRequest', - resolve: scopeInvariant(scopeOptions, devicerequestInstanceResolver), + description: 'Access information about a single DeviceRequest', + resolve: scopeInvariant(scopeOptions, getDeviceRequestInstance), type: DeviceRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/devicerequest/index.js b/src/resources/3_0_1/profiles/devicerequest/register.js similarity index 92% rename from src/resources/3_0_1/profiles/devicerequest/index.js rename to src/resources/3_0_1/profiles/devicerequest/register.js index 78978637..4230c9e5 100644 --- a/src/resources/3_0_1/profiles/devicerequest/index.js +++ b/src/resources/3_0_1/profiles/devicerequest/register.js @@ -1,15 +1,15 @@ +const { + DeviceRequestCreateMutation, + DeviceRequestUpdateMutation, + DeviceRequestRemoveMutation, +} = require('./mutation'); + const { DeviceRequestQuery, DeviceRequestListQuery, DeviceRequestInstanceQuery, } = require('./query'); -const { - DeviceRequestCreateMutation, - DeviceRequestUpdateMutation, - DeviceRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceRequestCreate: DeviceRequestCreateMutation, DeviceRequestUpdate: DeviceRequestUpdateMutation, - DeviceRequestDelete: DeviceRequestDeleteMutation, + DeviceRequestRemove: DeviceRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DeviceRequest', path: '/3_0_1/DeviceRequest/:id', query: DeviceRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/devicerequest/resolver.js b/src/resources/3_0_1/profiles/devicerequest/resolver.js index 608b61c4..891bec9f 100644 --- a/src/resources/3_0_1/profiles/devicerequest/resolver.js +++ b/src/resources/3_0_1/profiles/devicerequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.devicerequestResolver + * @name exports.getDeviceRequest * @static - * @summary DeviceRequest Resolver. + * @summary DeviceRequest resolver. */ -module.exports.devicerequestResolver = function devicerequestResolver( +module.exports.getDeviceRequest = function getDeviceRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicerequestListResolver + * @name exports.getDeviceRequestList * @static - * @summary DeviceRequest List Resolver. + * @summary DeviceRequest list resolver. */ -module.exports.devicerequestListResolver = function devicerequestListResolver( +module.exports.getDeviceRequestList = function getDeviceRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicerequestInstanceResolver + * @name exports.getDeviceRequestInstance * @static - * @summary DeviceRequest Instance Resolver. + * @summary DeviceRequest instance resolver. */ -module.exports.devicerequestInstanceResolver = function devicerequestInstanceResolver( +module.exports.getDeviceRequestInstance = function getDeviceRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicerequestCreateResolver + * @name exports.createDeviceRequest * @static - * @summary DeviceRequest Create Resolver. + * @summary Create DeviceRequest resolver. */ -module.exports.devicerequestCreateResolver = function devicerequestCreateResolver( +module.exports.createDeviceRequest = function createDeviceRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicerequestUpdateResolver + * @name exports.updateDeviceRequest * @static - * @summary DeviceRequest Update Resolver. + * @summary Update DeviceRequest resolver. */ -module.exports.devicerequestUpdateResolver = function devicerequestUpdateResolver( +module.exports.updateDeviceRequest = function updateDeviceRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.devicerequestDeleteResolver + * @name exports.removeDeviceRequest * @static - * @summary DeviceRequest Delete Resolver. + * @summary Remove DeviceRequest resolver. */ -module.exports.devicerequestDeleteResolver = function devicerequestDeleteResolver( +module.exports.removeDeviceRequest = function removeDeviceRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/deviceusestatement/mutation.js b/src/resources/3_0_1/profiles/deviceusestatement/mutation.js index ecabf792..f388e8f1 100644 --- a/src/resources/3_0_1/profiles/deviceusestatement/mutation.js +++ b/src/resources/3_0_1/profiles/deviceusestatement/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema'); +const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DeviceUseStatementInput = require('../../inputs/deviceusestatement.input'); +const DeviceUseStatementInput = require('../../inputs/deviceusestatement.input.js'); -// Resolvers -const { - deviceusestatementCreateResolver, - deviceusestatementUpdateResolver, - deviceusestatementDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDeviceUseStatement, + updateDeviceUseStatement, + removeDeviceUseStatement, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceUseStatement', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DeviceUseStatement record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DeviceUseStatement record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DeviceUseStatementCreateMutation - * @summary DeviceUseStatementCreate Mutation. + * @summary DeviceUseStatementCreate mutation. */ module.exports.DeviceUseStatementCreateMutation = { - args: WriteArgs, - description: 'Create a DeviceUseStatement', - resolve: scopeInvariant(scopeOptions, deviceusestatementCreateResolver), + description: 'Create a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, createDeviceUseStatement), type: DeviceUseStatementSchema, + args: WriteArgs, }; /** * @name exports.DeviceUseStatementUpdateMutation - * @summary DeviceUseStatementUpdate Mutation. + * @summary DeviceUseStatementUpdate mutation. */ module.exports.DeviceUseStatementUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DeviceUseStatements', - resolve: scopeInvariant(scopeOptions, deviceusestatementUpdateResolver), + description: 'Update a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, updateDeviceUseStatement), type: DeviceUseStatementSchema, + args: WriteArgs, }; /** - * @name exports.DeviceUseStatementDeleteMutation - * @summary DeviceUseStatementDelete Mutation. + * @name exports.DeviceUseStatementRemoveMutation + * @summary DeviceUseStatementRemove mutation. */ -module.exports.DeviceUseStatementDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DeviceUseStatement', - resolve: scopeInvariant(scopeOptions, deviceusestatementDeleteResolver), +module.exports.DeviceUseStatementRemoveMutation = { + description: 'Remove a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, removeDeviceUseStatement), type: DeviceUseStatementSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/deviceusestatement/query.js b/src/resources/3_0_1/profiles/deviceusestatement/query.js index 762ff5d5..3fa40940 100644 --- a/src/resources/3_0_1/profiles/deviceusestatement/query.js +++ b/src/resources/3_0_1/profiles/deviceusestatement/query.js @@ -1,55 +1,65 @@ // Schemas -const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DeviceUseStatementArgs = require('../../parameters/deviceusestatement.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DeviceUseStatementArgs = require('../../parameters/deviceusestatement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DeviceUseStatementArgs, +); // Resolvers const { - deviceusestatementResolver, - deviceusestatementListResolver, - deviceusestatementInstanceResolver, + getDeviceUseStatement, + getDeviceUseStatementList, + getDeviceUseStatementInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DeviceUseStatement', action: 'read', - version: '3_0_1', }; /** * @name exports.DeviceUseStatementQuery - * @summary DeviceUseStatement Query. + * @summary DeviceUseStatement query. */ module.exports.DeviceUseStatementQuery = { - args: Object.assign({}, CommonArgs, DeviceUseStatementArgs), description: 'Query for a single DeviceUseStatement', - resolve: scopeInvariant(scopeOptions, deviceusestatementResolver), + resolve: scopeInvariant(scopeOptions, getDeviceUseStatement), type: DeviceUseStatementSchema, + args: args, }; /** * @name exports.DeviceUseStatementListQuery - * @summary DeviceUseStatementList Query. + * @summary DeviceUseStatement query. */ module.exports.DeviceUseStatementListQuery = { - args: Object.assign({}, CommonArgs, DeviceUseStatementArgs), - description: 'Query for multiple DeviceUseStatements', - resolve: scopeInvariant(scopeOptions, deviceusestatementListResolver), + description: 'Query for a more than or just one DeviceUseStatement', + resolve: scopeInvariant(scopeOptions, getDeviceUseStatementList), type: BundleSchema, + args: args, }; /** * @name exports.DeviceUseStatementInstanceQuery - * @summary DeviceUseStatementInstance Query. + * @summary DeviceUseStatement query. */ module.exports.DeviceUseStatementInstanceQuery = { - description: 'Get information about a single DeviceUseStatement', - resolve: scopeInvariant(scopeOptions, deviceusestatementInstanceResolver), + description: 'Access information about a single DeviceUseStatement', + resolve: scopeInvariant(scopeOptions, getDeviceUseStatementInstance), type: DeviceUseStatementSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/deviceusestatement/index.js b/src/resources/3_0_1/profiles/deviceusestatement/register.js similarity index 91% rename from src/resources/3_0_1/profiles/deviceusestatement/index.js rename to src/resources/3_0_1/profiles/deviceusestatement/register.js index 510b900e..372d0191 100644 --- a/src/resources/3_0_1/profiles/deviceusestatement/index.js +++ b/src/resources/3_0_1/profiles/deviceusestatement/register.js @@ -1,15 +1,15 @@ +const { + DeviceUseStatementCreateMutation, + DeviceUseStatementUpdateMutation, + DeviceUseStatementRemoveMutation, +} = require('./mutation'); + const { DeviceUseStatementQuery, DeviceUseStatementListQuery, DeviceUseStatementInstanceQuery, } = require('./query'); -const { - DeviceUseStatementCreateMutation, - DeviceUseStatementUpdateMutation, - DeviceUseStatementDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DeviceUseStatementCreate: DeviceUseStatementCreateMutation, DeviceUseStatementUpdate: DeviceUseStatementUpdateMutation, - DeviceUseStatementDelete: DeviceUseStatementDeleteMutation, + DeviceUseStatementRemove: DeviceUseStatementRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DeviceUseStatement', path: '/3_0_1/DeviceUseStatement/:id', query: DeviceUseStatementInstanceQuery, diff --git a/src/resources/3_0_1/profiles/deviceusestatement/resolver.js b/src/resources/3_0_1/profiles/deviceusestatement/resolver.js index 5abebed7..d584494d 100644 --- a/src/resources/3_0_1/profiles/deviceusestatement/resolver.js +++ b/src/resources/3_0_1/profiles/deviceusestatement/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.deviceusestatementResolver + * @name exports.getDeviceUseStatement * @static - * @summary DeviceUseStatement Resolver. + * @summary DeviceUseStatement resolver. */ -module.exports.deviceusestatementResolver = function deviceusestatementResolver( +module.exports.getDeviceUseStatement = function getDeviceUseStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementListResolver + * @name exports.getDeviceUseStatementList * @static - * @summary DeviceUseStatement List Resolver. + * @summary DeviceUseStatement list resolver. */ -module.exports.deviceusestatementListResolver = function deviceusestatementListResolver( +module.exports.getDeviceUseStatementList = function getDeviceUseStatementList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementInstanceResolver + * @name exports.getDeviceUseStatementInstance * @static - * @summary DeviceUseStatement Instance Resolver. + * @summary DeviceUseStatement instance resolver. */ -module.exports.deviceusestatementInstanceResolver = function deviceusestatementInstanceResolver( +module.exports.getDeviceUseStatementInstance = function getDeviceUseStatementInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementCreateResolver + * @name exports.createDeviceUseStatement * @static - * @summary DeviceUseStatement Create Resolver. + * @summary Create DeviceUseStatement resolver. */ -module.exports.deviceusestatementCreateResolver = function deviceusestatementCreateResolver( +module.exports.createDeviceUseStatement = function createDeviceUseStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementUpdateResolver + * @name exports.updateDeviceUseStatement * @static - * @summary DeviceUseStatement Update Resolver. + * @summary Update DeviceUseStatement resolver. */ -module.exports.deviceusestatementUpdateResolver = function deviceusestatementUpdateResolver( +module.exports.updateDeviceUseStatement = function updateDeviceUseStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.deviceusestatementDeleteResolver + * @name exports.removeDeviceUseStatement * @static - * @summary DeviceUseStatement Delete Resolver. + * @summary Remove DeviceUseStatement resolver. */ -module.exports.deviceusestatementDeleteResolver = function deviceusestatementDeleteResolver( +module.exports.removeDeviceUseStatement = function removeDeviceUseStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/diagnosticreport/mutation.js b/src/resources/3_0_1/profiles/diagnosticreport/mutation.js index 0fd8a752..5b4c3813 100644 --- a/src/resources/3_0_1/profiles/diagnosticreport/mutation.js +++ b/src/resources/3_0_1/profiles/diagnosticreport/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema'); +const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DiagnosticReportInput = require('../../inputs/diagnosticreport.input'); +const DiagnosticReportInput = require('../../inputs/diagnosticreport.input.js'); -// Resolvers -const { - diagnosticreportCreateResolver, - diagnosticreportUpdateResolver, - diagnosticreportDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDiagnosticReport, + updateDiagnosticReport, + removeDiagnosticReport, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DiagnosticReport', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DiagnosticReport record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DiagnosticReport record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DiagnosticReportCreateMutation - * @summary DiagnosticReportCreate Mutation. + * @summary DiagnosticReportCreate mutation. */ module.exports.DiagnosticReportCreateMutation = { - args: WriteArgs, - description: 'Create a DiagnosticReport', - resolve: scopeInvariant(scopeOptions, diagnosticreportCreateResolver), + description: 'Create a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, createDiagnosticReport), type: DiagnosticReportSchema, + args: WriteArgs, }; /** * @name exports.DiagnosticReportUpdateMutation - * @summary DiagnosticReportUpdate Mutation. + * @summary DiagnosticReportUpdate mutation. */ module.exports.DiagnosticReportUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DiagnosticReports', - resolve: scopeInvariant(scopeOptions, diagnosticreportUpdateResolver), + description: 'Update a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, updateDiagnosticReport), type: DiagnosticReportSchema, + args: WriteArgs, }; /** - * @name exports.DiagnosticReportDeleteMutation - * @summary DiagnosticReportDelete Mutation. + * @name exports.DiagnosticReportRemoveMutation + * @summary DiagnosticReportRemove mutation. */ -module.exports.DiagnosticReportDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DiagnosticReport', - resolve: scopeInvariant(scopeOptions, diagnosticreportDeleteResolver), +module.exports.DiagnosticReportRemoveMutation = { + description: 'Remove a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, removeDiagnosticReport), type: DiagnosticReportSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/diagnosticreport/query.js b/src/resources/3_0_1/profiles/diagnosticreport/query.js index a67a0c10..ef7bc359 100644 --- a/src/resources/3_0_1/profiles/diagnosticreport/query.js +++ b/src/resources/3_0_1/profiles/diagnosticreport/query.js @@ -1,55 +1,65 @@ // Schemas -const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DiagnosticReportArgs = require('../../parameters/diagnosticreport.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DiagnosticReportArgs = require('../../parameters/diagnosticreport.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DiagnosticReportArgs, +); // Resolvers const { - diagnosticreportResolver, - diagnosticreportListResolver, - diagnosticreportInstanceResolver, + getDiagnosticReport, + getDiagnosticReportList, + getDiagnosticReportInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DiagnosticReport', action: 'read', - version: '3_0_1', }; /** * @name exports.DiagnosticReportQuery - * @summary DiagnosticReport Query. + * @summary DiagnosticReport query. */ module.exports.DiagnosticReportQuery = { - args: Object.assign({}, CommonArgs, DiagnosticReportArgs), description: 'Query for a single DiagnosticReport', - resolve: scopeInvariant(scopeOptions, diagnosticreportResolver), + resolve: scopeInvariant(scopeOptions, getDiagnosticReport), type: DiagnosticReportSchema, + args: args, }; /** * @name exports.DiagnosticReportListQuery - * @summary DiagnosticReportList Query. + * @summary DiagnosticReport query. */ module.exports.DiagnosticReportListQuery = { - args: Object.assign({}, CommonArgs, DiagnosticReportArgs), - description: 'Query for multiple DiagnosticReports', - resolve: scopeInvariant(scopeOptions, diagnosticreportListResolver), + description: 'Query for a more than or just one DiagnosticReport', + resolve: scopeInvariant(scopeOptions, getDiagnosticReportList), type: BundleSchema, + args: args, }; /** * @name exports.DiagnosticReportInstanceQuery - * @summary DiagnosticReportInstance Query. + * @summary DiagnosticReport query. */ module.exports.DiagnosticReportInstanceQuery = { - description: 'Get information about a single DiagnosticReport', - resolve: scopeInvariant(scopeOptions, diagnosticreportInstanceResolver), + description: 'Access information about a single DiagnosticReport', + resolve: scopeInvariant(scopeOptions, getDiagnosticReportInstance), type: DiagnosticReportSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/diagnosticreport/index.js b/src/resources/3_0_1/profiles/diagnosticreport/register.js similarity index 91% rename from src/resources/3_0_1/profiles/diagnosticreport/index.js rename to src/resources/3_0_1/profiles/diagnosticreport/register.js index 1209d1d1..25f0cc1f 100644 --- a/src/resources/3_0_1/profiles/diagnosticreport/index.js +++ b/src/resources/3_0_1/profiles/diagnosticreport/register.js @@ -1,15 +1,15 @@ +const { + DiagnosticReportCreateMutation, + DiagnosticReportUpdateMutation, + DiagnosticReportRemoveMutation, +} = require('./mutation'); + const { DiagnosticReportQuery, DiagnosticReportListQuery, DiagnosticReportInstanceQuery, } = require('./query'); -const { - DiagnosticReportCreateMutation, - DiagnosticReportUpdateMutation, - DiagnosticReportDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DiagnosticReportCreate: DiagnosticReportCreateMutation, DiagnosticReportUpdate: DiagnosticReportUpdateMutation, - DiagnosticReportDelete: DiagnosticReportDeleteMutation, + DiagnosticReportRemove: DiagnosticReportRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DiagnosticReport', path: '/3_0_1/DiagnosticReport/:id', query: DiagnosticReportInstanceQuery, diff --git a/src/resources/3_0_1/profiles/diagnosticreport/resolver.js b/src/resources/3_0_1/profiles/diagnosticreport/resolver.js index 46ca320c..f6f41b5f 100644 --- a/src/resources/3_0_1/profiles/diagnosticreport/resolver.js +++ b/src/resources/3_0_1/profiles/diagnosticreport/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.diagnosticreportResolver + * @name exports.getDiagnosticReport * @static - * @summary DiagnosticReport Resolver. + * @summary DiagnosticReport resolver. */ -module.exports.diagnosticreportResolver = function diagnosticreportResolver( +module.exports.getDiagnosticReport = function getDiagnosticReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportListResolver + * @name exports.getDiagnosticReportList * @static - * @summary DiagnosticReport List Resolver. + * @summary DiagnosticReport list resolver. */ -module.exports.diagnosticreportListResolver = function diagnosticreportListResolver( +module.exports.getDiagnosticReportList = function getDiagnosticReportList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportInstanceResolver + * @name exports.getDiagnosticReportInstance * @static - * @summary DiagnosticReport Instance Resolver. + * @summary DiagnosticReport instance resolver. */ -module.exports.diagnosticreportInstanceResolver = function diagnosticreportInstanceResolver( +module.exports.getDiagnosticReportInstance = function getDiagnosticReportInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportCreateResolver + * @name exports.createDiagnosticReport * @static - * @summary DiagnosticReport Create Resolver. + * @summary Create DiagnosticReport resolver. */ -module.exports.diagnosticreportCreateResolver = function diagnosticreportCreateResolver( +module.exports.createDiagnosticReport = function createDiagnosticReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportUpdateResolver + * @name exports.updateDiagnosticReport * @static - * @summary DiagnosticReport Update Resolver. + * @summary Update DiagnosticReport resolver. */ -module.exports.diagnosticreportUpdateResolver = function diagnosticreportUpdateResolver( +module.exports.updateDiagnosticReport = function updateDiagnosticReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.diagnosticreportDeleteResolver + * @name exports.removeDiagnosticReport * @static - * @summary DiagnosticReport Delete Resolver. + * @summary Remove DiagnosticReport resolver. */ -module.exports.diagnosticreportDeleteResolver = function diagnosticreportDeleteResolver( +module.exports.removeDiagnosticReport = function removeDiagnosticReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/documentmanifest/mutation.js b/src/resources/3_0_1/profiles/documentmanifest/mutation.js index d8831856..8f83476c 100644 --- a/src/resources/3_0_1/profiles/documentmanifest/mutation.js +++ b/src/resources/3_0_1/profiles/documentmanifest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DocumentManifestSchema = require('../../schemas/documentmanifest.schema'); +const DocumentManifestSchema = require('../../schemas/documentmanifest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DocumentManifestInput = require('../../inputs/documentmanifest.input'); +const DocumentManifestInput = require('../../inputs/documentmanifest.input.js'); -// Resolvers -const { - documentmanifestCreateResolver, - documentmanifestUpdateResolver, - documentmanifestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDocumentManifest, + updateDocumentManifest, + removeDocumentManifest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DocumentManifest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DocumentManifest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DocumentManifest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DocumentManifestCreateMutation - * @summary DocumentManifestCreate Mutation. + * @summary DocumentManifestCreate mutation. */ module.exports.DocumentManifestCreateMutation = { - args: WriteArgs, - description: 'Create a DocumentManifest', - resolve: scopeInvariant(scopeOptions, documentmanifestCreateResolver), + description: 'Create a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, createDocumentManifest), type: DocumentManifestSchema, + args: WriteArgs, }; /** * @name exports.DocumentManifestUpdateMutation - * @summary DocumentManifestUpdate Mutation. + * @summary DocumentManifestUpdate mutation. */ module.exports.DocumentManifestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DocumentManifests', - resolve: scopeInvariant(scopeOptions, documentmanifestUpdateResolver), + description: 'Update a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, updateDocumentManifest), type: DocumentManifestSchema, + args: WriteArgs, }; /** - * @name exports.DocumentManifestDeleteMutation - * @summary DocumentManifestDelete Mutation. + * @name exports.DocumentManifestRemoveMutation + * @summary DocumentManifestRemove mutation. */ -module.exports.DocumentManifestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DocumentManifest', - resolve: scopeInvariant(scopeOptions, documentmanifestDeleteResolver), +module.exports.DocumentManifestRemoveMutation = { + description: 'Remove a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, removeDocumentManifest), type: DocumentManifestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/documentmanifest/query.js b/src/resources/3_0_1/profiles/documentmanifest/query.js index 65edadda..a7752bb7 100644 --- a/src/resources/3_0_1/profiles/documentmanifest/query.js +++ b/src/resources/3_0_1/profiles/documentmanifest/query.js @@ -1,55 +1,65 @@ // Schemas -const DocumentManifestSchema = require('../../schemas/documentmanifest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DocumentManifestSchema = require('../../schemas/documentmanifest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DocumentManifestArgs = require('../../parameters/documentmanifest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DocumentManifestArgs = require('../../parameters/documentmanifest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DocumentManifestArgs, +); // Resolvers const { - documentmanifestResolver, - documentmanifestListResolver, - documentmanifestInstanceResolver, + getDocumentManifest, + getDocumentManifestList, + getDocumentManifestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DocumentManifest', action: 'read', - version: '3_0_1', }; /** * @name exports.DocumentManifestQuery - * @summary DocumentManifest Query. + * @summary DocumentManifest query. */ module.exports.DocumentManifestQuery = { - args: Object.assign({}, CommonArgs, DocumentManifestArgs), description: 'Query for a single DocumentManifest', - resolve: scopeInvariant(scopeOptions, documentmanifestResolver), + resolve: scopeInvariant(scopeOptions, getDocumentManifest), type: DocumentManifestSchema, + args: args, }; /** * @name exports.DocumentManifestListQuery - * @summary DocumentManifestList Query. + * @summary DocumentManifest query. */ module.exports.DocumentManifestListQuery = { - args: Object.assign({}, CommonArgs, DocumentManifestArgs), - description: 'Query for multiple DocumentManifests', - resolve: scopeInvariant(scopeOptions, documentmanifestListResolver), + description: 'Query for a more than or just one DocumentManifest', + resolve: scopeInvariant(scopeOptions, getDocumentManifestList), type: BundleSchema, + args: args, }; /** * @name exports.DocumentManifestInstanceQuery - * @summary DocumentManifestInstance Query. + * @summary DocumentManifest query. */ module.exports.DocumentManifestInstanceQuery = { - description: 'Get information about a single DocumentManifest', - resolve: scopeInvariant(scopeOptions, documentmanifestInstanceResolver), + description: 'Access information about a single DocumentManifest', + resolve: scopeInvariant(scopeOptions, getDocumentManifestInstance), type: DocumentManifestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/documentmanifest/index.js b/src/resources/3_0_1/profiles/documentmanifest/register.js similarity index 91% rename from src/resources/3_0_1/profiles/documentmanifest/index.js rename to src/resources/3_0_1/profiles/documentmanifest/register.js index f873dc40..7bdc18aa 100644 --- a/src/resources/3_0_1/profiles/documentmanifest/index.js +++ b/src/resources/3_0_1/profiles/documentmanifest/register.js @@ -1,15 +1,15 @@ +const { + DocumentManifestCreateMutation, + DocumentManifestUpdateMutation, + DocumentManifestRemoveMutation, +} = require('./mutation'); + const { DocumentManifestQuery, DocumentManifestListQuery, DocumentManifestInstanceQuery, } = require('./query'); -const { - DocumentManifestCreateMutation, - DocumentManifestUpdateMutation, - DocumentManifestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DocumentManifestCreate: DocumentManifestCreateMutation, DocumentManifestUpdate: DocumentManifestUpdateMutation, - DocumentManifestDelete: DocumentManifestDeleteMutation, + DocumentManifestRemove: DocumentManifestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DocumentManifest', path: '/3_0_1/DocumentManifest/:id', query: DocumentManifestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/documentmanifest/resolver.js b/src/resources/3_0_1/profiles/documentmanifest/resolver.js index b1daeba4..ef4bbe3a 100644 --- a/src/resources/3_0_1/profiles/documentmanifest/resolver.js +++ b/src/resources/3_0_1/profiles/documentmanifest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.documentmanifestResolver + * @name exports.getDocumentManifest * @static - * @summary DocumentManifest Resolver. + * @summary DocumentManifest resolver. */ -module.exports.documentmanifestResolver = function documentmanifestResolver( +module.exports.getDocumentManifest = function getDocumentManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestListResolver + * @name exports.getDocumentManifestList * @static - * @summary DocumentManifest List Resolver. + * @summary DocumentManifest list resolver. */ -module.exports.documentmanifestListResolver = function documentmanifestListResolver( +module.exports.getDocumentManifestList = function getDocumentManifestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestInstanceResolver + * @name exports.getDocumentManifestInstance * @static - * @summary DocumentManifest Instance Resolver. + * @summary DocumentManifest instance resolver. */ -module.exports.documentmanifestInstanceResolver = function documentmanifestInstanceResolver( +module.exports.getDocumentManifestInstance = function getDocumentManifestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestCreateResolver + * @name exports.createDocumentManifest * @static - * @summary DocumentManifest Create Resolver. + * @summary Create DocumentManifest resolver. */ -module.exports.documentmanifestCreateResolver = function documentmanifestCreateResolver( +module.exports.createDocumentManifest = function createDocumentManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestUpdateResolver + * @name exports.updateDocumentManifest * @static - * @summary DocumentManifest Update Resolver. + * @summary Update DocumentManifest resolver. */ -module.exports.documentmanifestUpdateResolver = function documentmanifestUpdateResolver( +module.exports.updateDocumentManifest = function updateDocumentManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentmanifestDeleteResolver + * @name exports.removeDocumentManifest * @static - * @summary DocumentManifest Delete Resolver. + * @summary Remove DocumentManifest resolver. */ -module.exports.documentmanifestDeleteResolver = function documentmanifestDeleteResolver( +module.exports.removeDocumentManifest = function removeDocumentManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/documentreference/mutation.js b/src/resources/3_0_1/profiles/documentreference/mutation.js index 88af345a..74a756b7 100644 --- a/src/resources/3_0_1/profiles/documentreference/mutation.js +++ b/src/resources/3_0_1/profiles/documentreference/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const DocumentReferenceSchema = require('../../schemas/documentreference.schema'); +const DocumentReferenceSchema = require('../../schemas/documentreference.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const DocumentReferenceInput = require('../../inputs/documentreference.input'); +const DocumentReferenceInput = require('../../inputs/documentreference.input.js'); -// Resolvers -const { - documentreferenceCreateResolver, - documentreferenceUpdateResolver, - documentreferenceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createDocumentReference, + updateDocumentReference, + removeDocumentReference, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DocumentReference', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a DocumentReference record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a DocumentReference record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.DocumentReferenceCreateMutation - * @summary DocumentReferenceCreate Mutation. + * @summary DocumentReferenceCreate mutation. */ module.exports.DocumentReferenceCreateMutation = { - args: WriteArgs, - description: 'Create a DocumentReference', - resolve: scopeInvariant(scopeOptions, documentreferenceCreateResolver), + description: 'Create a DocumentReference record', + resolve: scopeInvariant(scopeOptions, createDocumentReference), type: DocumentReferenceSchema, + args: WriteArgs, }; /** * @name exports.DocumentReferenceUpdateMutation - * @summary DocumentReferenceUpdate Mutation. + * @summary DocumentReferenceUpdate mutation. */ module.exports.DocumentReferenceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple DocumentReferences', - resolve: scopeInvariant(scopeOptions, documentreferenceUpdateResolver), + description: 'Update a DocumentReference record', + resolve: scopeInvariant(scopeOptions, updateDocumentReference), type: DocumentReferenceSchema, + args: WriteArgs, }; /** - * @name exports.DocumentReferenceDeleteMutation - * @summary DocumentReferenceDelete Mutation. + * @name exports.DocumentReferenceRemoveMutation + * @summary DocumentReferenceRemove mutation. */ -module.exports.DocumentReferenceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single DocumentReference', - resolve: scopeInvariant(scopeOptions, documentreferenceDeleteResolver), +module.exports.DocumentReferenceRemoveMutation = { + description: 'Remove a DocumentReference record', + resolve: scopeInvariant(scopeOptions, removeDocumentReference), type: DocumentReferenceSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/documentreference/query.js b/src/resources/3_0_1/profiles/documentreference/query.js index 817b012e..60330547 100644 --- a/src/resources/3_0_1/profiles/documentreference/query.js +++ b/src/resources/3_0_1/profiles/documentreference/query.js @@ -1,55 +1,65 @@ // Schemas -const DocumentReferenceSchema = require('../../schemas/documentreference.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DocumentReferenceSchema = require('../../schemas/documentreference.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const DocumentReferenceArgs = require('../../parameters/documentreference.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const DocumentReferenceArgs = require('../../parameters/documentreference.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DocumentReferenceArgs, +); // Resolvers const { - documentreferenceResolver, - documentreferenceListResolver, - documentreferenceInstanceResolver, + getDocumentReference, + getDocumentReferenceList, + getDocumentReferenceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'DocumentReference', action: 'read', - version: '3_0_1', }; /** * @name exports.DocumentReferenceQuery - * @summary DocumentReference Query. + * @summary DocumentReference query. */ module.exports.DocumentReferenceQuery = { - args: Object.assign({}, CommonArgs, DocumentReferenceArgs), description: 'Query for a single DocumentReference', - resolve: scopeInvariant(scopeOptions, documentreferenceResolver), + resolve: scopeInvariant(scopeOptions, getDocumentReference), type: DocumentReferenceSchema, + args: args, }; /** * @name exports.DocumentReferenceListQuery - * @summary DocumentReferenceList Query. + * @summary DocumentReference query. */ module.exports.DocumentReferenceListQuery = { - args: Object.assign({}, CommonArgs, DocumentReferenceArgs), - description: 'Query for multiple DocumentReferences', - resolve: scopeInvariant(scopeOptions, documentreferenceListResolver), + description: 'Query for a more than or just one DocumentReference', + resolve: scopeInvariant(scopeOptions, getDocumentReferenceList), type: BundleSchema, + args: args, }; /** * @name exports.DocumentReferenceInstanceQuery - * @summary DocumentReferenceInstance Query. + * @summary DocumentReference query. */ module.exports.DocumentReferenceInstanceQuery = { - description: 'Get information about a single DocumentReference', - resolve: scopeInvariant(scopeOptions, documentreferenceInstanceResolver), + description: 'Access information about a single DocumentReference', + resolve: scopeInvariant(scopeOptions, getDocumentReferenceInstance), type: DocumentReferenceSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/documentreference/index.js b/src/resources/3_0_1/profiles/documentreference/register.js similarity index 91% rename from src/resources/3_0_1/profiles/documentreference/index.js rename to src/resources/3_0_1/profiles/documentreference/register.js index f6197ae8..73f26d08 100644 --- a/src/resources/3_0_1/profiles/documentreference/index.js +++ b/src/resources/3_0_1/profiles/documentreference/register.js @@ -1,15 +1,15 @@ +const { + DocumentReferenceCreateMutation, + DocumentReferenceUpdateMutation, + DocumentReferenceRemoveMutation, +} = require('./mutation'); + const { DocumentReferenceQuery, DocumentReferenceListQuery, DocumentReferenceInstanceQuery, } = require('./query'); -const { - DocumentReferenceCreateMutation, - DocumentReferenceUpdateMutation, - DocumentReferenceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { DocumentReferenceCreate: DocumentReferenceCreateMutation, DocumentReferenceUpdate: DocumentReferenceUpdateMutation, - DocumentReferenceDelete: DocumentReferenceDeleteMutation, + DocumentReferenceRemove: DocumentReferenceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'DocumentReference', path: '/3_0_1/DocumentReference/:id', query: DocumentReferenceInstanceQuery, diff --git a/src/resources/3_0_1/profiles/documentreference/resolver.js b/src/resources/3_0_1/profiles/documentreference/resolver.js index 63bf038d..8e091616 100644 --- a/src/resources/3_0_1/profiles/documentreference/resolver.js +++ b/src/resources/3_0_1/profiles/documentreference/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.documentreferenceResolver + * @name exports.getDocumentReference * @static - * @summary DocumentReference Resolver. + * @summary DocumentReference resolver. */ -module.exports.documentreferenceResolver = function documentreferenceResolver( +module.exports.getDocumentReference = function getDocumentReference( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceListResolver + * @name exports.getDocumentReferenceList * @static - * @summary DocumentReference List Resolver. + * @summary DocumentReference list resolver. */ -module.exports.documentreferenceListResolver = function documentreferenceListResolver( +module.exports.getDocumentReferenceList = function getDocumentReferenceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceInstanceResolver + * @name exports.getDocumentReferenceInstance * @static - * @summary DocumentReference Instance Resolver. + * @summary DocumentReference instance resolver. */ -module.exports.documentreferenceInstanceResolver = function documentreferenceInstanceResolver( +module.exports.getDocumentReferenceInstance = function getDocumentReferenceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceCreateResolver + * @name exports.createDocumentReference * @static - * @summary DocumentReference Create Resolver. + * @summary Create DocumentReference resolver. */ -module.exports.documentreferenceCreateResolver = function documentreferenceCreateResolver( +module.exports.createDocumentReference = function createDocumentReference( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceUpdateResolver + * @name exports.updateDocumentReference * @static - * @summary DocumentReference Update Resolver. + * @summary Update DocumentReference resolver. */ -module.exports.documentreferenceUpdateResolver = function documentreferenceUpdateResolver( +module.exports.updateDocumentReference = function updateDocumentReference( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.documentreferenceDeleteResolver + * @name exports.removeDocumentReference * @static - * @summary DocumentReference Delete Resolver. + * @summary Remove DocumentReference resolver. */ -module.exports.documentreferenceDeleteResolver = function documentreferenceDeleteResolver( +module.exports.removeDocumentReference = function removeDocumentReference( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/eligibilityrequest/mutation.js b/src/resources/3_0_1/profiles/eligibilityrequest/mutation.js index ea0d6b4a..a9453a56 100644 --- a/src/resources/3_0_1/profiles/eligibilityrequest/mutation.js +++ b/src/resources/3_0_1/profiles/eligibilityrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EligibilityRequestSchema = require('../../schemas/eligibilityrequest.schema'); +const EligibilityRequestSchema = require('../../schemas/eligibilityrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EligibilityRequestInput = require('../../inputs/eligibilityrequest.input'); +const EligibilityRequestInput = require('../../inputs/eligibilityrequest.input.js'); -// Resolvers -const { - eligibilityrequestCreateResolver, - eligibilityrequestUpdateResolver, - eligibilityrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEligibilityRequest, + updateEligibilityRequest, + removeEligibilityRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EligibilityRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EligibilityRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EligibilityRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EligibilityRequestCreateMutation - * @summary EligibilityRequestCreate Mutation. + * @summary EligibilityRequestCreate mutation. */ module.exports.EligibilityRequestCreateMutation = { - args: WriteArgs, - description: 'Create a EligibilityRequest', - resolve: scopeInvariant(scopeOptions, eligibilityrequestCreateResolver), + description: 'Create a EligibilityRequest record', + resolve: scopeInvariant(scopeOptions, createEligibilityRequest), type: EligibilityRequestSchema, + args: WriteArgs, }; /** * @name exports.EligibilityRequestUpdateMutation - * @summary EligibilityRequestUpdate Mutation. + * @summary EligibilityRequestUpdate mutation. */ module.exports.EligibilityRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EligibilityRequests', - resolve: scopeInvariant(scopeOptions, eligibilityrequestUpdateResolver), + description: 'Update a EligibilityRequest record', + resolve: scopeInvariant(scopeOptions, updateEligibilityRequest), type: EligibilityRequestSchema, + args: WriteArgs, }; /** - * @name exports.EligibilityRequestDeleteMutation - * @summary EligibilityRequestDelete Mutation. + * @name exports.EligibilityRequestRemoveMutation + * @summary EligibilityRequestRemove mutation. */ -module.exports.EligibilityRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EligibilityRequest', - resolve: scopeInvariant(scopeOptions, eligibilityrequestDeleteResolver), +module.exports.EligibilityRequestRemoveMutation = { + description: 'Remove a EligibilityRequest record', + resolve: scopeInvariant(scopeOptions, removeEligibilityRequest), type: EligibilityRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/eligibilityrequest/query.js b/src/resources/3_0_1/profiles/eligibilityrequest/query.js index c2cecf48..6df05920 100644 --- a/src/resources/3_0_1/profiles/eligibilityrequest/query.js +++ b/src/resources/3_0_1/profiles/eligibilityrequest/query.js @@ -1,55 +1,65 @@ // Schemas -const EligibilityRequestSchema = require('../../schemas/eligibilityrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EligibilityRequestSchema = require('../../schemas/eligibilityrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EligibilityRequestArgs = require('../../parameters/eligibilityrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EligibilityRequestArgs = require('../../parameters/eligibilityrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EligibilityRequestArgs, +); // Resolvers const { - eligibilityrequestResolver, - eligibilityrequestListResolver, - eligibilityrequestInstanceResolver, + getEligibilityRequest, + getEligibilityRequestList, + getEligibilityRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EligibilityRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.EligibilityRequestQuery - * @summary EligibilityRequest Query. + * @summary EligibilityRequest query. */ module.exports.EligibilityRequestQuery = { - args: Object.assign({}, CommonArgs, EligibilityRequestArgs), description: 'Query for a single EligibilityRequest', - resolve: scopeInvariant(scopeOptions, eligibilityrequestResolver), + resolve: scopeInvariant(scopeOptions, getEligibilityRequest), type: EligibilityRequestSchema, + args: args, }; /** * @name exports.EligibilityRequestListQuery - * @summary EligibilityRequestList Query. + * @summary EligibilityRequest query. */ module.exports.EligibilityRequestListQuery = { - args: Object.assign({}, CommonArgs, EligibilityRequestArgs), - description: 'Query for multiple EligibilityRequests', - resolve: scopeInvariant(scopeOptions, eligibilityrequestListResolver), + description: 'Query for a more than or just one EligibilityRequest', + resolve: scopeInvariant(scopeOptions, getEligibilityRequestList), type: BundleSchema, + args: args, }; /** * @name exports.EligibilityRequestInstanceQuery - * @summary EligibilityRequestInstance Query. + * @summary EligibilityRequest query. */ module.exports.EligibilityRequestInstanceQuery = { - description: 'Get information about a single EligibilityRequest', - resolve: scopeInvariant(scopeOptions, eligibilityrequestInstanceResolver), + description: 'Access information about a single EligibilityRequest', + resolve: scopeInvariant(scopeOptions, getEligibilityRequestInstance), type: EligibilityRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/eligibilityrequest/index.js b/src/resources/3_0_1/profiles/eligibilityrequest/register.js similarity index 91% rename from src/resources/3_0_1/profiles/eligibilityrequest/index.js rename to src/resources/3_0_1/profiles/eligibilityrequest/register.js index cbba4ad5..4af4d2c9 100644 --- a/src/resources/3_0_1/profiles/eligibilityrequest/index.js +++ b/src/resources/3_0_1/profiles/eligibilityrequest/register.js @@ -1,15 +1,15 @@ +const { + EligibilityRequestCreateMutation, + EligibilityRequestUpdateMutation, + EligibilityRequestRemoveMutation, +} = require('./mutation'); + const { EligibilityRequestQuery, EligibilityRequestListQuery, EligibilityRequestInstanceQuery, } = require('./query'); -const { - EligibilityRequestCreateMutation, - EligibilityRequestUpdateMutation, - EligibilityRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EligibilityRequestCreate: EligibilityRequestCreateMutation, EligibilityRequestUpdate: EligibilityRequestUpdateMutation, - EligibilityRequestDelete: EligibilityRequestDeleteMutation, + EligibilityRequestRemove: EligibilityRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EligibilityRequest', path: '/3_0_1/EligibilityRequest/:id', query: EligibilityRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/eligibilityrequest/resolver.js b/src/resources/3_0_1/profiles/eligibilityrequest/resolver.js index 4c9bba41..9d3f42bb 100644 --- a/src/resources/3_0_1/profiles/eligibilityrequest/resolver.js +++ b/src/resources/3_0_1/profiles/eligibilityrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.eligibilityrequestResolver + * @name exports.getEligibilityRequest * @static - * @summary EligibilityRequest Resolver. + * @summary EligibilityRequest resolver. */ -module.exports.eligibilityrequestResolver = function eligibilityrequestResolver( +module.exports.getEligibilityRequest = function getEligibilityRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestListResolver + * @name exports.getEligibilityRequestList * @static - * @summary EligibilityRequest List Resolver. + * @summary EligibilityRequest list resolver. */ -module.exports.eligibilityrequestListResolver = function eligibilityrequestListResolver( +module.exports.getEligibilityRequestList = function getEligibilityRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestInstanceResolver + * @name exports.getEligibilityRequestInstance * @static - * @summary EligibilityRequest Instance Resolver. + * @summary EligibilityRequest instance resolver. */ -module.exports.eligibilityrequestInstanceResolver = function eligibilityrequestInstanceResolver( +module.exports.getEligibilityRequestInstance = function getEligibilityRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestCreateResolver + * @name exports.createEligibilityRequest * @static - * @summary EligibilityRequest Create Resolver. + * @summary Create EligibilityRequest resolver. */ -module.exports.eligibilityrequestCreateResolver = function eligibilityrequestCreateResolver( +module.exports.createEligibilityRequest = function createEligibilityRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestUpdateResolver + * @name exports.updateEligibilityRequest * @static - * @summary EligibilityRequest Update Resolver. + * @summary Update EligibilityRequest resolver. */ -module.exports.eligibilityrequestUpdateResolver = function eligibilityrequestUpdateResolver( +module.exports.updateEligibilityRequest = function updateEligibilityRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityrequestDeleteResolver + * @name exports.removeEligibilityRequest * @static - * @summary EligibilityRequest Delete Resolver. + * @summary Remove EligibilityRequest resolver. */ -module.exports.eligibilityrequestDeleteResolver = function eligibilityrequestDeleteResolver( +module.exports.removeEligibilityRequest = function removeEligibilityRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/eligibilityresponse/mutation.js b/src/resources/3_0_1/profiles/eligibilityresponse/mutation.js index f02d41cb..307a22a5 100644 --- a/src/resources/3_0_1/profiles/eligibilityresponse/mutation.js +++ b/src/resources/3_0_1/profiles/eligibilityresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EligibilityResponseSchema = require('../../schemas/eligibilityresponse.schema'); +const EligibilityResponseSchema = require('../../schemas/eligibilityresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EligibilityResponseInput = require('../../inputs/eligibilityresponse.input'); +const EligibilityResponseInput = require('../../inputs/eligibilityresponse.input.js'); -// Resolvers -const { - eligibilityresponseCreateResolver, - eligibilityresponseUpdateResolver, - eligibilityresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEligibilityResponse, + updateEligibilityResponse, + removeEligibilityResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EligibilityResponse', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EligibilityResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EligibilityResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EligibilityResponseCreateMutation - * @summary EligibilityResponseCreate Mutation. + * @summary EligibilityResponseCreate mutation. */ module.exports.EligibilityResponseCreateMutation = { - args: WriteArgs, - description: 'Create a EligibilityResponse', - resolve: scopeInvariant(scopeOptions, eligibilityresponseCreateResolver), + description: 'Create a EligibilityResponse record', + resolve: scopeInvariant(scopeOptions, createEligibilityResponse), type: EligibilityResponseSchema, + args: WriteArgs, }; /** * @name exports.EligibilityResponseUpdateMutation - * @summary EligibilityResponseUpdate Mutation. + * @summary EligibilityResponseUpdate mutation. */ module.exports.EligibilityResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EligibilityResponses', - resolve: scopeInvariant(scopeOptions, eligibilityresponseUpdateResolver), + description: 'Update a EligibilityResponse record', + resolve: scopeInvariant(scopeOptions, updateEligibilityResponse), type: EligibilityResponseSchema, + args: WriteArgs, }; /** - * @name exports.EligibilityResponseDeleteMutation - * @summary EligibilityResponseDelete Mutation. + * @name exports.EligibilityResponseRemoveMutation + * @summary EligibilityResponseRemove mutation. */ -module.exports.EligibilityResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EligibilityResponse', - resolve: scopeInvariant(scopeOptions, eligibilityresponseDeleteResolver), +module.exports.EligibilityResponseRemoveMutation = { + description: 'Remove a EligibilityResponse record', + resolve: scopeInvariant(scopeOptions, removeEligibilityResponse), type: EligibilityResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/eligibilityresponse/query.js b/src/resources/3_0_1/profiles/eligibilityresponse/query.js index 57bd4c77..ac77402a 100644 --- a/src/resources/3_0_1/profiles/eligibilityresponse/query.js +++ b/src/resources/3_0_1/profiles/eligibilityresponse/query.js @@ -1,55 +1,65 @@ // Schemas -const EligibilityResponseSchema = require('../../schemas/eligibilityresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EligibilityResponseSchema = require('../../schemas/eligibilityresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EligibilityResponseArgs = require('../../parameters/eligibilityresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EligibilityResponseArgs = require('../../parameters/eligibilityresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EligibilityResponseArgs, +); // Resolvers const { - eligibilityresponseResolver, - eligibilityresponseListResolver, - eligibilityresponseInstanceResolver, + getEligibilityResponse, + getEligibilityResponseList, + getEligibilityResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EligibilityResponse', action: 'read', - version: '3_0_1', }; /** * @name exports.EligibilityResponseQuery - * @summary EligibilityResponse Query. + * @summary EligibilityResponse query. */ module.exports.EligibilityResponseQuery = { - args: Object.assign({}, CommonArgs, EligibilityResponseArgs), description: 'Query for a single EligibilityResponse', - resolve: scopeInvariant(scopeOptions, eligibilityresponseResolver), + resolve: scopeInvariant(scopeOptions, getEligibilityResponse), type: EligibilityResponseSchema, + args: args, }; /** * @name exports.EligibilityResponseListQuery - * @summary EligibilityResponseList Query. + * @summary EligibilityResponse query. */ module.exports.EligibilityResponseListQuery = { - args: Object.assign({}, CommonArgs, EligibilityResponseArgs), - description: 'Query for multiple EligibilityResponses', - resolve: scopeInvariant(scopeOptions, eligibilityresponseListResolver), + description: 'Query for a more than or just one EligibilityResponse', + resolve: scopeInvariant(scopeOptions, getEligibilityResponseList), type: BundleSchema, + args: args, }; /** * @name exports.EligibilityResponseInstanceQuery - * @summary EligibilityResponseInstance Query. + * @summary EligibilityResponse query. */ module.exports.EligibilityResponseInstanceQuery = { - description: 'Get information about a single EligibilityResponse', - resolve: scopeInvariant(scopeOptions, eligibilityresponseInstanceResolver), + description: 'Access information about a single EligibilityResponse', + resolve: scopeInvariant(scopeOptions, getEligibilityResponseInstance), type: EligibilityResponseSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/eligibilityresponse/index.js b/src/resources/3_0_1/profiles/eligibilityresponse/register.js similarity index 91% rename from src/resources/3_0_1/profiles/eligibilityresponse/index.js rename to src/resources/3_0_1/profiles/eligibilityresponse/register.js index 71202f75..3bcc3a67 100644 --- a/src/resources/3_0_1/profiles/eligibilityresponse/index.js +++ b/src/resources/3_0_1/profiles/eligibilityresponse/register.js @@ -1,15 +1,15 @@ +const { + EligibilityResponseCreateMutation, + EligibilityResponseUpdateMutation, + EligibilityResponseRemoveMutation, +} = require('./mutation'); + const { EligibilityResponseQuery, EligibilityResponseListQuery, EligibilityResponseInstanceQuery, } = require('./query'); -const { - EligibilityResponseCreateMutation, - EligibilityResponseUpdateMutation, - EligibilityResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EligibilityResponseCreate: EligibilityResponseCreateMutation, EligibilityResponseUpdate: EligibilityResponseUpdateMutation, - EligibilityResponseDelete: EligibilityResponseDeleteMutation, + EligibilityResponseRemove: EligibilityResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EligibilityResponse', path: '/3_0_1/EligibilityResponse/:id', query: EligibilityResponseInstanceQuery, diff --git a/src/resources/3_0_1/profiles/eligibilityresponse/resolver.js b/src/resources/3_0_1/profiles/eligibilityresponse/resolver.js index 745287a2..449f4d67 100644 --- a/src/resources/3_0_1/profiles/eligibilityresponse/resolver.js +++ b/src/resources/3_0_1/profiles/eligibilityresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.eligibilityresponseResolver + * @name exports.getEligibilityResponse * @static - * @summary EligibilityResponse Resolver. + * @summary EligibilityResponse resolver. */ -module.exports.eligibilityresponseResolver = function eligibilityresponseResolver( +module.exports.getEligibilityResponse = function getEligibilityResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseListResolver + * @name exports.getEligibilityResponseList * @static - * @summary EligibilityResponse List Resolver. + * @summary EligibilityResponse list resolver. */ -module.exports.eligibilityresponseListResolver = function eligibilityresponseListResolver( +module.exports.getEligibilityResponseList = function getEligibilityResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseInstanceResolver + * @name exports.getEligibilityResponseInstance * @static - * @summary EligibilityResponse Instance Resolver. + * @summary EligibilityResponse instance resolver. */ -module.exports.eligibilityresponseInstanceResolver = function eligibilityresponseInstanceResolver( +module.exports.getEligibilityResponseInstance = function getEligibilityResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseCreateResolver + * @name exports.createEligibilityResponse * @static - * @summary EligibilityResponse Create Resolver. + * @summary Create EligibilityResponse resolver. */ -module.exports.eligibilityresponseCreateResolver = function eligibilityresponseCreateResolver( +module.exports.createEligibilityResponse = function createEligibilityResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseUpdateResolver + * @name exports.updateEligibilityResponse * @static - * @summary EligibilityResponse Update Resolver. + * @summary Update EligibilityResponse resolver. */ -module.exports.eligibilityresponseUpdateResolver = function eligibilityresponseUpdateResolver( +module.exports.updateEligibilityResponse = function updateEligibilityResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.eligibilityresponseDeleteResolver + * @name exports.removeEligibilityResponse * @static - * @summary EligibilityResponse Delete Resolver. + * @summary Remove EligibilityResponse resolver. */ -module.exports.eligibilityresponseDeleteResolver = function eligibilityresponseDeleteResolver( +module.exports.removeEligibilityResponse = function removeEligibilityResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/encounter/mutation.js b/src/resources/3_0_1/profiles/encounter/mutation.js index 53172539..d6382a40 100644 --- a/src/resources/3_0_1/profiles/encounter/mutation.js +++ b/src/resources/3_0_1/profiles/encounter/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EncounterSchema = require('../../schemas/encounter.schema'); +const EncounterSchema = require('../../schemas/encounter.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EncounterInput = require('../../inputs/encounter.input'); +const EncounterInput = require('../../inputs/encounter.input.js'); -// Resolvers -const { - encounterCreateResolver, - encounterUpdateResolver, - encounterDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEncounter, + updateEncounter, + removeEncounter, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Encounter', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Encounter record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Encounter record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.EncounterCreateMutation - * @summary EncounterCreate Mutation. + * @summary EncounterCreate mutation. */ module.exports.EncounterCreateMutation = { - args: WriteArgs, - description: 'Create a Encounter', - resolve: scopeInvariant(scopeOptions, encounterCreateResolver), + description: 'Create a Encounter record', + resolve: scopeInvariant(scopeOptions, createEncounter), type: EncounterSchema, + args: WriteArgs, }; /** * @name exports.EncounterUpdateMutation - * @summary EncounterUpdate Mutation. + * @summary EncounterUpdate mutation. */ module.exports.EncounterUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Encounters', - resolve: scopeInvariant(scopeOptions, encounterUpdateResolver), + description: 'Update a Encounter record', + resolve: scopeInvariant(scopeOptions, updateEncounter), type: EncounterSchema, + args: WriteArgs, }; /** - * @name exports.EncounterDeleteMutation - * @summary EncounterDelete Mutation. + * @name exports.EncounterRemoveMutation + * @summary EncounterRemove mutation. */ -module.exports.EncounterDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Encounter', - resolve: scopeInvariant(scopeOptions, encounterDeleteResolver), +module.exports.EncounterRemoveMutation = { + description: 'Remove a Encounter record', + resolve: scopeInvariant(scopeOptions, removeEncounter), type: EncounterSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/encounter/query.js b/src/resources/3_0_1/profiles/encounter/query.js index 26bf044c..a660bb30 100644 --- a/src/resources/3_0_1/profiles/encounter/query.js +++ b/src/resources/3_0_1/profiles/encounter/query.js @@ -1,55 +1,60 @@ // Schemas -const EncounterSchema = require('../../schemas/encounter.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EncounterSchema = require('../../schemas/encounter.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EncounterArgs = require('../../parameters/encounter.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EncounterArgs = require('../../parameters/encounter.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, EncounterArgs); // Resolvers const { - encounterResolver, - encounterListResolver, - encounterInstanceResolver, + getEncounter, + getEncounterList, + getEncounterInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Encounter', action: 'read', - version: '3_0_1', }; /** * @name exports.EncounterQuery - * @summary Encounter Query. + * @summary Encounter query. */ module.exports.EncounterQuery = { - args: Object.assign({}, CommonArgs, EncounterArgs), description: 'Query for a single Encounter', - resolve: scopeInvariant(scopeOptions, encounterResolver), + resolve: scopeInvariant(scopeOptions, getEncounter), type: EncounterSchema, + args: args, }; /** * @name exports.EncounterListQuery - * @summary EncounterList Query. + * @summary Encounter query. */ module.exports.EncounterListQuery = { - args: Object.assign({}, CommonArgs, EncounterArgs), - description: 'Query for multiple Encounters', - resolve: scopeInvariant(scopeOptions, encounterListResolver), + description: 'Query for a more than or just one Encounter', + resolve: scopeInvariant(scopeOptions, getEncounterList), type: BundleSchema, + args: args, }; /** * @name exports.EncounterInstanceQuery - * @summary EncounterInstance Query. + * @summary Encounter query. */ module.exports.EncounterInstanceQuery = { - description: 'Get information about a single Encounter', - resolve: scopeInvariant(scopeOptions, encounterInstanceResolver), + description: 'Access information about a single Encounter', + resolve: scopeInvariant(scopeOptions, getEncounterInstance), type: EncounterSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/encounter/index.js b/src/resources/3_0_1/profiles/encounter/register.js similarity index 92% rename from src/resources/3_0_1/profiles/encounter/index.js rename to src/resources/3_0_1/profiles/encounter/register.js index 9b1e3586..5f4c5948 100644 --- a/src/resources/3_0_1/profiles/encounter/index.js +++ b/src/resources/3_0_1/profiles/encounter/register.js @@ -1,15 +1,15 @@ +const { + EncounterCreateMutation, + EncounterUpdateMutation, + EncounterRemoveMutation, +} = require('./mutation'); + const { EncounterQuery, EncounterListQuery, EncounterInstanceQuery, } = require('./query'); -const { - EncounterCreateMutation, - EncounterUpdateMutation, - EncounterDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EncounterCreate: EncounterCreateMutation, EncounterUpdate: EncounterUpdateMutation, - EncounterDelete: EncounterDeleteMutation, + EncounterRemove: EncounterRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Encounter', path: '/3_0_1/Encounter/:id', query: EncounterInstanceQuery, diff --git a/src/resources/3_0_1/profiles/encounter/resolver.js b/src/resources/3_0_1/profiles/encounter/resolver.js index 0c03a3b1..e4c048d5 100644 --- a/src/resources/3_0_1/profiles/encounter/resolver.js +++ b/src/resources/3_0_1/profiles/encounter/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.encounterResolver + * @name exports.getEncounter * @static - * @summary Encounter Resolver. + * @summary Encounter resolver. */ -module.exports.encounterResolver = function encounterResolver( +module.exports.getEncounter = function getEncounter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterListResolver + * @name exports.getEncounterList * @static - * @summary Encounter List Resolver. + * @summary Encounter list resolver. */ -module.exports.encounterListResolver = function encounterListResolver( +module.exports.getEncounterList = function getEncounterList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterInstanceResolver + * @name exports.getEncounterInstance * @static - * @summary Encounter Instance Resolver. + * @summary Encounter instance resolver. */ -module.exports.encounterInstanceResolver = function encounterInstanceResolver( +module.exports.getEncounterInstance = function getEncounterInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterCreateResolver + * @name exports.createEncounter * @static - * @summary Encounter Create Resolver. + * @summary Create Encounter resolver. */ -module.exports.encounterCreateResolver = function encounterCreateResolver( +module.exports.createEncounter = function createEncounter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterUpdateResolver + * @name exports.updateEncounter * @static - * @summary Encounter Update Resolver. + * @summary Update Encounter resolver. */ -module.exports.encounterUpdateResolver = function encounterUpdateResolver( +module.exports.updateEncounter = function updateEncounter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.encounterDeleteResolver + * @name exports.removeEncounter * @static - * @summary Encounter Delete Resolver. + * @summary Remove Encounter resolver. */ -module.exports.encounterDeleteResolver = function encounterDeleteResolver( +module.exports.removeEncounter = function removeEncounter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/endpoint/mutation.js b/src/resources/3_0_1/profiles/endpoint/mutation.js index 465842be..1723167b 100644 --- a/src/resources/3_0_1/profiles/endpoint/mutation.js +++ b/src/resources/3_0_1/profiles/endpoint/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EndpointSchema = require('../../schemas/endpoint.schema'); +const EndpointSchema = require('../../schemas/endpoint.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EndpointInput = require('../../inputs/endpoint.input'); +const EndpointInput = require('../../inputs/endpoint.input.js'); -// Resolvers -const { - endpointCreateResolver, - endpointUpdateResolver, - endpointDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEndpoint, + updateEndpoint, + removeEndpoint, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Endpoint', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Endpoint record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Endpoint record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.EndpointCreateMutation - * @summary EndpointCreate Mutation. + * @summary EndpointCreate mutation. */ module.exports.EndpointCreateMutation = { - args: WriteArgs, - description: 'Create a Endpoint', - resolve: scopeInvariant(scopeOptions, endpointCreateResolver), + description: 'Create a Endpoint record', + resolve: scopeInvariant(scopeOptions, createEndpoint), type: EndpointSchema, + args: WriteArgs, }; /** * @name exports.EndpointUpdateMutation - * @summary EndpointUpdate Mutation. + * @summary EndpointUpdate mutation. */ module.exports.EndpointUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Endpoints', - resolve: scopeInvariant(scopeOptions, endpointUpdateResolver), + description: 'Update a Endpoint record', + resolve: scopeInvariant(scopeOptions, updateEndpoint), type: EndpointSchema, + args: WriteArgs, }; /** - * @name exports.EndpointDeleteMutation - * @summary EndpointDelete Mutation. + * @name exports.EndpointRemoveMutation + * @summary EndpointRemove mutation. */ -module.exports.EndpointDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Endpoint', - resolve: scopeInvariant(scopeOptions, endpointDeleteResolver), +module.exports.EndpointRemoveMutation = { + description: 'Remove a Endpoint record', + resolve: scopeInvariant(scopeOptions, removeEndpoint), type: EndpointSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/endpoint/query.js b/src/resources/3_0_1/profiles/endpoint/query.js index ac5c0fb3..917a88b4 100644 --- a/src/resources/3_0_1/profiles/endpoint/query.js +++ b/src/resources/3_0_1/profiles/endpoint/query.js @@ -1,55 +1,60 @@ // Schemas -const EndpointSchema = require('../../schemas/endpoint.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EndpointSchema = require('../../schemas/endpoint.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EndpointArgs = require('../../parameters/endpoint.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EndpointArgs = require('../../parameters/endpoint.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, EndpointArgs); // Resolvers const { - endpointResolver, - endpointListResolver, - endpointInstanceResolver, + getEndpoint, + getEndpointList, + getEndpointInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Endpoint', action: 'read', - version: '3_0_1', }; /** * @name exports.EndpointQuery - * @summary Endpoint Query. + * @summary Endpoint query. */ module.exports.EndpointQuery = { - args: Object.assign({}, CommonArgs, EndpointArgs), description: 'Query for a single Endpoint', - resolve: scopeInvariant(scopeOptions, endpointResolver), + resolve: scopeInvariant(scopeOptions, getEndpoint), type: EndpointSchema, + args: args, }; /** * @name exports.EndpointListQuery - * @summary EndpointList Query. + * @summary Endpoint query. */ module.exports.EndpointListQuery = { - args: Object.assign({}, CommonArgs, EndpointArgs), - description: 'Query for multiple Endpoints', - resolve: scopeInvariant(scopeOptions, endpointListResolver), + description: 'Query for a more than or just one Endpoint', + resolve: scopeInvariant(scopeOptions, getEndpointList), type: BundleSchema, + args: args, }; /** * @name exports.EndpointInstanceQuery - * @summary EndpointInstance Query. + * @summary Endpoint query. */ module.exports.EndpointInstanceQuery = { - description: 'Get information about a single Endpoint', - resolve: scopeInvariant(scopeOptions, endpointInstanceResolver), + description: 'Access information about a single Endpoint', + resolve: scopeInvariant(scopeOptions, getEndpointInstance), type: EndpointSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/endpoint/index.js b/src/resources/3_0_1/profiles/endpoint/register.js similarity index 92% rename from src/resources/3_0_1/profiles/endpoint/index.js rename to src/resources/3_0_1/profiles/endpoint/register.js index 1d8a2614..07ea8051 100644 --- a/src/resources/3_0_1/profiles/endpoint/index.js +++ b/src/resources/3_0_1/profiles/endpoint/register.js @@ -1,15 +1,15 @@ +const { + EndpointCreateMutation, + EndpointUpdateMutation, + EndpointRemoveMutation, +} = require('./mutation'); + const { EndpointQuery, EndpointListQuery, EndpointInstanceQuery, } = require('./query'); -const { - EndpointCreateMutation, - EndpointUpdateMutation, - EndpointDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EndpointCreate: EndpointCreateMutation, EndpointUpdate: EndpointUpdateMutation, - EndpointDelete: EndpointDeleteMutation, + EndpointRemove: EndpointRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Endpoint', path: '/3_0_1/Endpoint/:id', query: EndpointInstanceQuery, diff --git a/src/resources/3_0_1/profiles/endpoint/resolver.js b/src/resources/3_0_1/profiles/endpoint/resolver.js index 7e371aa4..ec6dab47 100644 --- a/src/resources/3_0_1/profiles/endpoint/resolver.js +++ b/src/resources/3_0_1/profiles/endpoint/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.endpointResolver + * @name exports.getEndpoint * @static - * @summary Endpoint Resolver. + * @summary Endpoint resolver. */ -module.exports.endpointResolver = function endpointResolver( +module.exports.getEndpoint = function getEndpoint( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.endpointListResolver + * @name exports.getEndpointList * @static - * @summary Endpoint List Resolver. + * @summary Endpoint list resolver. */ -module.exports.endpointListResolver = function endpointListResolver( +module.exports.getEndpointList = function getEndpointList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.endpointInstanceResolver + * @name exports.getEndpointInstance * @static - * @summary Endpoint Instance Resolver. + * @summary Endpoint instance resolver. */ -module.exports.endpointInstanceResolver = function endpointInstanceResolver( +module.exports.getEndpointInstance = function getEndpointInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.endpointCreateResolver + * @name exports.createEndpoint * @static - * @summary Endpoint Create Resolver. + * @summary Create Endpoint resolver. */ -module.exports.endpointCreateResolver = function endpointCreateResolver( +module.exports.createEndpoint = function createEndpoint( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.endpointUpdateResolver + * @name exports.updateEndpoint * @static - * @summary Endpoint Update Resolver. + * @summary Update Endpoint resolver. */ -module.exports.endpointUpdateResolver = function endpointUpdateResolver( +module.exports.updateEndpoint = function updateEndpoint( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.endpointDeleteResolver + * @name exports.removeEndpoint * @static - * @summary Endpoint Delete Resolver. + * @summary Remove Endpoint resolver. */ -module.exports.endpointDeleteResolver = function endpointDeleteResolver( +module.exports.removeEndpoint = function removeEndpoint( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/enrollmentrequest/mutation.js b/src/resources/3_0_1/profiles/enrollmentrequest/mutation.js index f0154430..78673a4a 100644 --- a/src/resources/3_0_1/profiles/enrollmentrequest/mutation.js +++ b/src/resources/3_0_1/profiles/enrollmentrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema'); +const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EnrollmentRequestInput = require('../../inputs/enrollmentrequest.input'); +const EnrollmentRequestInput = require('../../inputs/enrollmentrequest.input.js'); -// Resolvers -const { - enrollmentrequestCreateResolver, - enrollmentrequestUpdateResolver, - enrollmentrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEnrollmentRequest, + updateEnrollmentRequest, + removeEnrollmentRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EnrollmentRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EnrollmentRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EnrollmentRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EnrollmentRequestCreateMutation - * @summary EnrollmentRequestCreate Mutation. + * @summary EnrollmentRequestCreate mutation. */ module.exports.EnrollmentRequestCreateMutation = { - args: WriteArgs, - description: 'Create a EnrollmentRequest', - resolve: scopeInvariant(scopeOptions, enrollmentrequestCreateResolver), + description: 'Create a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, createEnrollmentRequest), type: EnrollmentRequestSchema, + args: WriteArgs, }; /** * @name exports.EnrollmentRequestUpdateMutation - * @summary EnrollmentRequestUpdate Mutation. + * @summary EnrollmentRequestUpdate mutation. */ module.exports.EnrollmentRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EnrollmentRequests', - resolve: scopeInvariant(scopeOptions, enrollmentrequestUpdateResolver), + description: 'Update a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, updateEnrollmentRequest), type: EnrollmentRequestSchema, + args: WriteArgs, }; /** - * @name exports.EnrollmentRequestDeleteMutation - * @summary EnrollmentRequestDelete Mutation. + * @name exports.EnrollmentRequestRemoveMutation + * @summary EnrollmentRequestRemove mutation. */ -module.exports.EnrollmentRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EnrollmentRequest', - resolve: scopeInvariant(scopeOptions, enrollmentrequestDeleteResolver), +module.exports.EnrollmentRequestRemoveMutation = { + description: 'Remove a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, removeEnrollmentRequest), type: EnrollmentRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/enrollmentrequest/query.js b/src/resources/3_0_1/profiles/enrollmentrequest/query.js index 473ac35c..141a8bba 100644 --- a/src/resources/3_0_1/profiles/enrollmentrequest/query.js +++ b/src/resources/3_0_1/profiles/enrollmentrequest/query.js @@ -1,55 +1,65 @@ // Schemas -const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EnrollmentRequestArgs = require('../../parameters/enrollmentrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EnrollmentRequestArgs = require('../../parameters/enrollmentrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EnrollmentRequestArgs, +); // Resolvers const { - enrollmentrequestResolver, - enrollmentrequestListResolver, - enrollmentrequestInstanceResolver, + getEnrollmentRequest, + getEnrollmentRequestList, + getEnrollmentRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EnrollmentRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.EnrollmentRequestQuery - * @summary EnrollmentRequest Query. + * @summary EnrollmentRequest query. */ module.exports.EnrollmentRequestQuery = { - args: Object.assign({}, CommonArgs, EnrollmentRequestArgs), description: 'Query for a single EnrollmentRequest', - resolve: scopeInvariant(scopeOptions, enrollmentrequestResolver), + resolve: scopeInvariant(scopeOptions, getEnrollmentRequest), type: EnrollmentRequestSchema, + args: args, }; /** * @name exports.EnrollmentRequestListQuery - * @summary EnrollmentRequestList Query. + * @summary EnrollmentRequest query. */ module.exports.EnrollmentRequestListQuery = { - args: Object.assign({}, CommonArgs, EnrollmentRequestArgs), - description: 'Query for multiple EnrollmentRequests', - resolve: scopeInvariant(scopeOptions, enrollmentrequestListResolver), + description: 'Query for a more than or just one EnrollmentRequest', + resolve: scopeInvariant(scopeOptions, getEnrollmentRequestList), type: BundleSchema, + args: args, }; /** * @name exports.EnrollmentRequestInstanceQuery - * @summary EnrollmentRequestInstance Query. + * @summary EnrollmentRequest query. */ module.exports.EnrollmentRequestInstanceQuery = { - description: 'Get information about a single EnrollmentRequest', - resolve: scopeInvariant(scopeOptions, enrollmentrequestInstanceResolver), + description: 'Access information about a single EnrollmentRequest', + resolve: scopeInvariant(scopeOptions, getEnrollmentRequestInstance), type: EnrollmentRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/enrollmentrequest/index.js b/src/resources/3_0_1/profiles/enrollmentrequest/register.js similarity index 91% rename from src/resources/3_0_1/profiles/enrollmentrequest/index.js rename to src/resources/3_0_1/profiles/enrollmentrequest/register.js index 84735ba2..b091dcbf 100644 --- a/src/resources/3_0_1/profiles/enrollmentrequest/index.js +++ b/src/resources/3_0_1/profiles/enrollmentrequest/register.js @@ -1,15 +1,15 @@ +const { + EnrollmentRequestCreateMutation, + EnrollmentRequestUpdateMutation, + EnrollmentRequestRemoveMutation, +} = require('./mutation'); + const { EnrollmentRequestQuery, EnrollmentRequestListQuery, EnrollmentRequestInstanceQuery, } = require('./query'); -const { - EnrollmentRequestCreateMutation, - EnrollmentRequestUpdateMutation, - EnrollmentRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EnrollmentRequestCreate: EnrollmentRequestCreateMutation, EnrollmentRequestUpdate: EnrollmentRequestUpdateMutation, - EnrollmentRequestDelete: EnrollmentRequestDeleteMutation, + EnrollmentRequestRemove: EnrollmentRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EnrollmentRequest', path: '/3_0_1/EnrollmentRequest/:id', query: EnrollmentRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/enrollmentrequest/resolver.js b/src/resources/3_0_1/profiles/enrollmentrequest/resolver.js index 2f6991e8..f9a1f9a2 100644 --- a/src/resources/3_0_1/profiles/enrollmentrequest/resolver.js +++ b/src/resources/3_0_1/profiles/enrollmentrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.enrollmentrequestResolver + * @name exports.getEnrollmentRequest * @static - * @summary EnrollmentRequest Resolver. + * @summary EnrollmentRequest resolver. */ -module.exports.enrollmentrequestResolver = function enrollmentrequestResolver( +module.exports.getEnrollmentRequest = function getEnrollmentRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestListResolver + * @name exports.getEnrollmentRequestList * @static - * @summary EnrollmentRequest List Resolver. + * @summary EnrollmentRequest list resolver. */ -module.exports.enrollmentrequestListResolver = function enrollmentrequestListResolver( +module.exports.getEnrollmentRequestList = function getEnrollmentRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestInstanceResolver + * @name exports.getEnrollmentRequestInstance * @static - * @summary EnrollmentRequest Instance Resolver. + * @summary EnrollmentRequest instance resolver. */ -module.exports.enrollmentrequestInstanceResolver = function enrollmentrequestInstanceResolver( +module.exports.getEnrollmentRequestInstance = function getEnrollmentRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestCreateResolver + * @name exports.createEnrollmentRequest * @static - * @summary EnrollmentRequest Create Resolver. + * @summary Create EnrollmentRequest resolver. */ -module.exports.enrollmentrequestCreateResolver = function enrollmentrequestCreateResolver( +module.exports.createEnrollmentRequest = function createEnrollmentRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestUpdateResolver + * @name exports.updateEnrollmentRequest * @static - * @summary EnrollmentRequest Update Resolver. + * @summary Update EnrollmentRequest resolver. */ -module.exports.enrollmentrequestUpdateResolver = function enrollmentrequestUpdateResolver( +module.exports.updateEnrollmentRequest = function updateEnrollmentRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentrequestDeleteResolver + * @name exports.removeEnrollmentRequest * @static - * @summary EnrollmentRequest Delete Resolver. + * @summary Remove EnrollmentRequest resolver. */ -module.exports.enrollmentrequestDeleteResolver = function enrollmentrequestDeleteResolver( +module.exports.removeEnrollmentRequest = function removeEnrollmentRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/enrollmentresponse/mutation.js b/src/resources/3_0_1/profiles/enrollmentresponse/mutation.js index eaf4efcd..0c1cd18b 100644 --- a/src/resources/3_0_1/profiles/enrollmentresponse/mutation.js +++ b/src/resources/3_0_1/profiles/enrollmentresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema'); +const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EnrollmentResponseInput = require('../../inputs/enrollmentresponse.input'); +const EnrollmentResponseInput = require('../../inputs/enrollmentresponse.input.js'); -// Resolvers -const { - enrollmentresponseCreateResolver, - enrollmentresponseUpdateResolver, - enrollmentresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEnrollmentResponse, + updateEnrollmentResponse, + removeEnrollmentResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EnrollmentResponse', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EnrollmentResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EnrollmentResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EnrollmentResponseCreateMutation - * @summary EnrollmentResponseCreate Mutation. + * @summary EnrollmentResponseCreate mutation. */ module.exports.EnrollmentResponseCreateMutation = { - args: WriteArgs, - description: 'Create a EnrollmentResponse', - resolve: scopeInvariant(scopeOptions, enrollmentresponseCreateResolver), + description: 'Create a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, createEnrollmentResponse), type: EnrollmentResponseSchema, + args: WriteArgs, }; /** * @name exports.EnrollmentResponseUpdateMutation - * @summary EnrollmentResponseUpdate Mutation. + * @summary EnrollmentResponseUpdate mutation. */ module.exports.EnrollmentResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EnrollmentResponses', - resolve: scopeInvariant(scopeOptions, enrollmentresponseUpdateResolver), + description: 'Update a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, updateEnrollmentResponse), type: EnrollmentResponseSchema, + args: WriteArgs, }; /** - * @name exports.EnrollmentResponseDeleteMutation - * @summary EnrollmentResponseDelete Mutation. + * @name exports.EnrollmentResponseRemoveMutation + * @summary EnrollmentResponseRemove mutation. */ -module.exports.EnrollmentResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EnrollmentResponse', - resolve: scopeInvariant(scopeOptions, enrollmentresponseDeleteResolver), +module.exports.EnrollmentResponseRemoveMutation = { + description: 'Remove a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, removeEnrollmentResponse), type: EnrollmentResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/enrollmentresponse/query.js b/src/resources/3_0_1/profiles/enrollmentresponse/query.js index 05e0e3eb..d35a1fce 100644 --- a/src/resources/3_0_1/profiles/enrollmentresponse/query.js +++ b/src/resources/3_0_1/profiles/enrollmentresponse/query.js @@ -1,55 +1,65 @@ // Schemas -const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EnrollmentResponseArgs = require('../../parameters/enrollmentresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EnrollmentResponseArgs = require('../../parameters/enrollmentresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EnrollmentResponseArgs, +); // Resolvers const { - enrollmentresponseResolver, - enrollmentresponseListResolver, - enrollmentresponseInstanceResolver, + getEnrollmentResponse, + getEnrollmentResponseList, + getEnrollmentResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EnrollmentResponse', action: 'read', - version: '3_0_1', }; /** * @name exports.EnrollmentResponseQuery - * @summary EnrollmentResponse Query. + * @summary EnrollmentResponse query. */ module.exports.EnrollmentResponseQuery = { - args: Object.assign({}, CommonArgs, EnrollmentResponseArgs), description: 'Query for a single EnrollmentResponse', - resolve: scopeInvariant(scopeOptions, enrollmentresponseResolver), + resolve: scopeInvariant(scopeOptions, getEnrollmentResponse), type: EnrollmentResponseSchema, + args: args, }; /** * @name exports.EnrollmentResponseListQuery - * @summary EnrollmentResponseList Query. + * @summary EnrollmentResponse query. */ module.exports.EnrollmentResponseListQuery = { - args: Object.assign({}, CommonArgs, EnrollmentResponseArgs), - description: 'Query for multiple EnrollmentResponses', - resolve: scopeInvariant(scopeOptions, enrollmentresponseListResolver), + description: 'Query for a more than or just one EnrollmentResponse', + resolve: scopeInvariant(scopeOptions, getEnrollmentResponseList), type: BundleSchema, + args: args, }; /** * @name exports.EnrollmentResponseInstanceQuery - * @summary EnrollmentResponseInstance Query. + * @summary EnrollmentResponse query. */ module.exports.EnrollmentResponseInstanceQuery = { - description: 'Get information about a single EnrollmentResponse', - resolve: scopeInvariant(scopeOptions, enrollmentresponseInstanceResolver), + description: 'Access information about a single EnrollmentResponse', + resolve: scopeInvariant(scopeOptions, getEnrollmentResponseInstance), type: EnrollmentResponseSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/enrollmentresponse/index.js b/src/resources/3_0_1/profiles/enrollmentresponse/register.js similarity index 91% rename from src/resources/3_0_1/profiles/enrollmentresponse/index.js rename to src/resources/3_0_1/profiles/enrollmentresponse/register.js index 200b6aba..4d7f575b 100644 --- a/src/resources/3_0_1/profiles/enrollmentresponse/index.js +++ b/src/resources/3_0_1/profiles/enrollmentresponse/register.js @@ -1,15 +1,15 @@ +const { + EnrollmentResponseCreateMutation, + EnrollmentResponseUpdateMutation, + EnrollmentResponseRemoveMutation, +} = require('./mutation'); + const { EnrollmentResponseQuery, EnrollmentResponseListQuery, EnrollmentResponseInstanceQuery, } = require('./query'); -const { - EnrollmentResponseCreateMutation, - EnrollmentResponseUpdateMutation, - EnrollmentResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EnrollmentResponseCreate: EnrollmentResponseCreateMutation, EnrollmentResponseUpdate: EnrollmentResponseUpdateMutation, - EnrollmentResponseDelete: EnrollmentResponseDeleteMutation, + EnrollmentResponseRemove: EnrollmentResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EnrollmentResponse', path: '/3_0_1/EnrollmentResponse/:id', query: EnrollmentResponseInstanceQuery, diff --git a/src/resources/3_0_1/profiles/enrollmentresponse/resolver.js b/src/resources/3_0_1/profiles/enrollmentresponse/resolver.js index ce12fb71..1db2e2dd 100644 --- a/src/resources/3_0_1/profiles/enrollmentresponse/resolver.js +++ b/src/resources/3_0_1/profiles/enrollmentresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.enrollmentresponseResolver + * @name exports.getEnrollmentResponse * @static - * @summary EnrollmentResponse Resolver. + * @summary EnrollmentResponse resolver. */ -module.exports.enrollmentresponseResolver = function enrollmentresponseResolver( +module.exports.getEnrollmentResponse = function getEnrollmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseListResolver + * @name exports.getEnrollmentResponseList * @static - * @summary EnrollmentResponse List Resolver. + * @summary EnrollmentResponse list resolver. */ -module.exports.enrollmentresponseListResolver = function enrollmentresponseListResolver( +module.exports.getEnrollmentResponseList = function getEnrollmentResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseInstanceResolver + * @name exports.getEnrollmentResponseInstance * @static - * @summary EnrollmentResponse Instance Resolver. + * @summary EnrollmentResponse instance resolver. */ -module.exports.enrollmentresponseInstanceResolver = function enrollmentresponseInstanceResolver( +module.exports.getEnrollmentResponseInstance = function getEnrollmentResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseCreateResolver + * @name exports.createEnrollmentResponse * @static - * @summary EnrollmentResponse Create Resolver. + * @summary Create EnrollmentResponse resolver. */ -module.exports.enrollmentresponseCreateResolver = function enrollmentresponseCreateResolver( +module.exports.createEnrollmentResponse = function createEnrollmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseUpdateResolver + * @name exports.updateEnrollmentResponse * @static - * @summary EnrollmentResponse Update Resolver. + * @summary Update EnrollmentResponse resolver. */ -module.exports.enrollmentresponseUpdateResolver = function enrollmentresponseUpdateResolver( +module.exports.updateEnrollmentResponse = function updateEnrollmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.enrollmentresponseDeleteResolver + * @name exports.removeEnrollmentResponse * @static - * @summary EnrollmentResponse Delete Resolver. + * @summary Remove EnrollmentResponse resolver. */ -module.exports.enrollmentresponseDeleteResolver = function enrollmentresponseDeleteResolver( +module.exports.removeEnrollmentResponse = function removeEnrollmentResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/episodeofcare/mutation.js b/src/resources/3_0_1/profiles/episodeofcare/mutation.js index 8f71f237..82491f33 100644 --- a/src/resources/3_0_1/profiles/episodeofcare/mutation.js +++ b/src/resources/3_0_1/profiles/episodeofcare/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema'); +const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const EpisodeOfCareInput = require('../../inputs/episodeofcare.input'); +const EpisodeOfCareInput = require('../../inputs/episodeofcare.input.js'); -// Resolvers -const { - episodeofcareCreateResolver, - episodeofcareUpdateResolver, - episodeofcareDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createEpisodeOfCare, + updateEpisodeOfCare, + removeEpisodeOfCare, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EpisodeOfCare', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a EpisodeOfCare record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a EpisodeOfCare record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.EpisodeOfCareCreateMutation - * @summary EpisodeOfCareCreate Mutation. + * @summary EpisodeOfCareCreate mutation. */ module.exports.EpisodeOfCareCreateMutation = { - args: WriteArgs, - description: 'Create a EpisodeOfCare', - resolve: scopeInvariant(scopeOptions, episodeofcareCreateResolver), + description: 'Create a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, createEpisodeOfCare), type: EpisodeOfCareSchema, + args: WriteArgs, }; /** * @name exports.EpisodeOfCareUpdateMutation - * @summary EpisodeOfCareUpdate Mutation. + * @summary EpisodeOfCareUpdate mutation. */ module.exports.EpisodeOfCareUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple EpisodeOfCares', - resolve: scopeInvariant(scopeOptions, episodeofcareUpdateResolver), + description: 'Update a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, updateEpisodeOfCare), type: EpisodeOfCareSchema, + args: WriteArgs, }; /** - * @name exports.EpisodeOfCareDeleteMutation - * @summary EpisodeOfCareDelete Mutation. + * @name exports.EpisodeOfCareRemoveMutation + * @summary EpisodeOfCareRemove mutation. */ -module.exports.EpisodeOfCareDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single EpisodeOfCare', - resolve: scopeInvariant(scopeOptions, episodeofcareDeleteResolver), +module.exports.EpisodeOfCareRemoveMutation = { + description: 'Remove a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, removeEpisodeOfCare), type: EpisodeOfCareSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/episodeofcare/query.js b/src/resources/3_0_1/profiles/episodeofcare/query.js index c3e45c0a..34bda91b 100644 --- a/src/resources/3_0_1/profiles/episodeofcare/query.js +++ b/src/resources/3_0_1/profiles/episodeofcare/query.js @@ -1,55 +1,65 @@ // Schemas -const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const EpisodeOfCareArgs = require('../../parameters/episodeofcare.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const EpisodeOfCareArgs = require('../../parameters/episodeofcare.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EpisodeOfCareArgs, +); // Resolvers const { - episodeofcareResolver, - episodeofcareListResolver, - episodeofcareInstanceResolver, + getEpisodeOfCare, + getEpisodeOfCareList, + getEpisodeOfCareInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'EpisodeOfCare', action: 'read', - version: '3_0_1', }; /** * @name exports.EpisodeOfCareQuery - * @summary EpisodeOfCare Query. + * @summary EpisodeOfCare query. */ module.exports.EpisodeOfCareQuery = { - args: Object.assign({}, CommonArgs, EpisodeOfCareArgs), description: 'Query for a single EpisodeOfCare', - resolve: scopeInvariant(scopeOptions, episodeofcareResolver), + resolve: scopeInvariant(scopeOptions, getEpisodeOfCare), type: EpisodeOfCareSchema, + args: args, }; /** * @name exports.EpisodeOfCareListQuery - * @summary EpisodeOfCareList Query. + * @summary EpisodeOfCare query. */ module.exports.EpisodeOfCareListQuery = { - args: Object.assign({}, CommonArgs, EpisodeOfCareArgs), - description: 'Query for multiple EpisodeOfCares', - resolve: scopeInvariant(scopeOptions, episodeofcareListResolver), + description: 'Query for a more than or just one EpisodeOfCare', + resolve: scopeInvariant(scopeOptions, getEpisodeOfCareList), type: BundleSchema, + args: args, }; /** * @name exports.EpisodeOfCareInstanceQuery - * @summary EpisodeOfCareInstance Query. + * @summary EpisodeOfCare query. */ module.exports.EpisodeOfCareInstanceQuery = { - description: 'Get information about a single EpisodeOfCare', - resolve: scopeInvariant(scopeOptions, episodeofcareInstanceResolver), + description: 'Access information about a single EpisodeOfCare', + resolve: scopeInvariant(scopeOptions, getEpisodeOfCareInstance), type: EpisodeOfCareSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/episodeofcare/index.js b/src/resources/3_0_1/profiles/episodeofcare/register.js similarity index 92% rename from src/resources/3_0_1/profiles/episodeofcare/index.js rename to src/resources/3_0_1/profiles/episodeofcare/register.js index 58152181..b4331845 100644 --- a/src/resources/3_0_1/profiles/episodeofcare/index.js +++ b/src/resources/3_0_1/profiles/episodeofcare/register.js @@ -1,15 +1,15 @@ +const { + EpisodeOfCareCreateMutation, + EpisodeOfCareUpdateMutation, + EpisodeOfCareRemoveMutation, +} = require('./mutation'); + const { EpisodeOfCareQuery, EpisodeOfCareListQuery, EpisodeOfCareInstanceQuery, } = require('./query'); -const { - EpisodeOfCareCreateMutation, - EpisodeOfCareUpdateMutation, - EpisodeOfCareDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { EpisodeOfCareCreate: EpisodeOfCareCreateMutation, EpisodeOfCareUpdate: EpisodeOfCareUpdateMutation, - EpisodeOfCareDelete: EpisodeOfCareDeleteMutation, + EpisodeOfCareRemove: EpisodeOfCareRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'EpisodeOfCare', path: '/3_0_1/EpisodeOfCare/:id', query: EpisodeOfCareInstanceQuery, diff --git a/src/resources/3_0_1/profiles/episodeofcare/resolver.js b/src/resources/3_0_1/profiles/episodeofcare/resolver.js index 5d4723e1..673af555 100644 --- a/src/resources/3_0_1/profiles/episodeofcare/resolver.js +++ b/src/resources/3_0_1/profiles/episodeofcare/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.episodeofcareResolver + * @name exports.getEpisodeOfCare * @static - * @summary EpisodeOfCare Resolver. + * @summary EpisodeOfCare resolver. */ -module.exports.episodeofcareResolver = function episodeofcareResolver( +module.exports.getEpisodeOfCare = function getEpisodeOfCare( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareListResolver + * @name exports.getEpisodeOfCareList * @static - * @summary EpisodeOfCare List Resolver. + * @summary EpisodeOfCare list resolver. */ -module.exports.episodeofcareListResolver = function episodeofcareListResolver( +module.exports.getEpisodeOfCareList = function getEpisodeOfCareList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareInstanceResolver + * @name exports.getEpisodeOfCareInstance * @static - * @summary EpisodeOfCare Instance Resolver. + * @summary EpisodeOfCare instance resolver. */ -module.exports.episodeofcareInstanceResolver = function episodeofcareInstanceResolver( +module.exports.getEpisodeOfCareInstance = function getEpisodeOfCareInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareCreateResolver + * @name exports.createEpisodeOfCare * @static - * @summary EpisodeOfCare Create Resolver. + * @summary Create EpisodeOfCare resolver. */ -module.exports.episodeofcareCreateResolver = function episodeofcareCreateResolver( +module.exports.createEpisodeOfCare = function createEpisodeOfCare( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareUpdateResolver + * @name exports.updateEpisodeOfCare * @static - * @summary EpisodeOfCare Update Resolver. + * @summary Update EpisodeOfCare resolver. */ -module.exports.episodeofcareUpdateResolver = function episodeofcareUpdateResolver( +module.exports.updateEpisodeOfCare = function updateEpisodeOfCare( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.episodeofcareDeleteResolver + * @name exports.removeEpisodeOfCare * @static - * @summary EpisodeOfCare Delete Resolver. + * @summary Remove EpisodeOfCare resolver. */ -module.exports.episodeofcareDeleteResolver = function episodeofcareDeleteResolver( +module.exports.removeEpisodeOfCare = function removeEpisodeOfCare( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/expansionprofile/mutation.js b/src/resources/3_0_1/profiles/expansionprofile/mutation.js index b0078d40..3d168fc2 100644 --- a/src/resources/3_0_1/profiles/expansionprofile/mutation.js +++ b/src/resources/3_0_1/profiles/expansionprofile/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ExpansionProfileSchema = require('../../schemas/expansionprofile.schema'); +const ExpansionProfileSchema = require('../../schemas/expansionprofile.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ExpansionProfileInput = require('../../inputs/expansionprofile.input'); +const ExpansionProfileInput = require('../../inputs/expansionprofile.input.js'); -// Resolvers -const { - expansionprofileCreateResolver, - expansionprofileUpdateResolver, - expansionprofileDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createExpansionProfile, + updateExpansionProfile, + removeExpansionProfile, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ExpansionProfile', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ExpansionProfile record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ExpansionProfile record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ExpansionProfileCreateMutation - * @summary ExpansionProfileCreate Mutation. + * @summary ExpansionProfileCreate mutation. */ module.exports.ExpansionProfileCreateMutation = { - args: WriteArgs, - description: 'Create a ExpansionProfile', - resolve: scopeInvariant(scopeOptions, expansionprofileCreateResolver), + description: 'Create a ExpansionProfile record', + resolve: scopeInvariant(scopeOptions, createExpansionProfile), type: ExpansionProfileSchema, + args: WriteArgs, }; /** * @name exports.ExpansionProfileUpdateMutation - * @summary ExpansionProfileUpdate Mutation. + * @summary ExpansionProfileUpdate mutation. */ module.exports.ExpansionProfileUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ExpansionProfiles', - resolve: scopeInvariant(scopeOptions, expansionprofileUpdateResolver), + description: 'Update a ExpansionProfile record', + resolve: scopeInvariant(scopeOptions, updateExpansionProfile), type: ExpansionProfileSchema, + args: WriteArgs, }; /** - * @name exports.ExpansionProfileDeleteMutation - * @summary ExpansionProfileDelete Mutation. + * @name exports.ExpansionProfileRemoveMutation + * @summary ExpansionProfileRemove mutation. */ -module.exports.ExpansionProfileDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ExpansionProfile', - resolve: scopeInvariant(scopeOptions, expansionprofileDeleteResolver), +module.exports.ExpansionProfileRemoveMutation = { + description: 'Remove a ExpansionProfile record', + resolve: scopeInvariant(scopeOptions, removeExpansionProfile), type: ExpansionProfileSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/expansionprofile/query.js b/src/resources/3_0_1/profiles/expansionprofile/query.js index 098f2057..eadf25f7 100644 --- a/src/resources/3_0_1/profiles/expansionprofile/query.js +++ b/src/resources/3_0_1/profiles/expansionprofile/query.js @@ -1,55 +1,65 @@ // Schemas -const ExpansionProfileSchema = require('../../schemas/expansionprofile.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ExpansionProfileSchema = require('../../schemas/expansionprofile.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ExpansionProfileArgs = require('../../parameters/expansionprofile.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ExpansionProfileArgs = require('../../parameters/expansionprofile.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ExpansionProfileArgs, +); // Resolvers const { - expansionprofileResolver, - expansionprofileListResolver, - expansionprofileInstanceResolver, + getExpansionProfile, + getExpansionProfileList, + getExpansionProfileInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ExpansionProfile', action: 'read', - version: '3_0_1', }; /** * @name exports.ExpansionProfileQuery - * @summary ExpansionProfile Query. + * @summary ExpansionProfile query. */ module.exports.ExpansionProfileQuery = { - args: Object.assign({}, CommonArgs, ExpansionProfileArgs), description: 'Query for a single ExpansionProfile', - resolve: scopeInvariant(scopeOptions, expansionprofileResolver), + resolve: scopeInvariant(scopeOptions, getExpansionProfile), type: ExpansionProfileSchema, + args: args, }; /** * @name exports.ExpansionProfileListQuery - * @summary ExpansionProfileList Query. + * @summary ExpansionProfile query. */ module.exports.ExpansionProfileListQuery = { - args: Object.assign({}, CommonArgs, ExpansionProfileArgs), - description: 'Query for multiple ExpansionProfiles', - resolve: scopeInvariant(scopeOptions, expansionprofileListResolver), + description: 'Query for a more than or just one ExpansionProfile', + resolve: scopeInvariant(scopeOptions, getExpansionProfileList), type: BundleSchema, + args: args, }; /** * @name exports.ExpansionProfileInstanceQuery - * @summary ExpansionProfileInstance Query. + * @summary ExpansionProfile query. */ module.exports.ExpansionProfileInstanceQuery = { - description: 'Get information about a single ExpansionProfile', - resolve: scopeInvariant(scopeOptions, expansionprofileInstanceResolver), + description: 'Access information about a single ExpansionProfile', + resolve: scopeInvariant(scopeOptions, getExpansionProfileInstance), type: ExpansionProfileSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/expansionprofile/index.js b/src/resources/3_0_1/profiles/expansionprofile/register.js similarity index 91% rename from src/resources/3_0_1/profiles/expansionprofile/index.js rename to src/resources/3_0_1/profiles/expansionprofile/register.js index d32722b3..f14f7bc1 100644 --- a/src/resources/3_0_1/profiles/expansionprofile/index.js +++ b/src/resources/3_0_1/profiles/expansionprofile/register.js @@ -1,15 +1,15 @@ +const { + ExpansionProfileCreateMutation, + ExpansionProfileUpdateMutation, + ExpansionProfileRemoveMutation, +} = require('./mutation'); + const { ExpansionProfileQuery, ExpansionProfileListQuery, ExpansionProfileInstanceQuery, } = require('./query'); -const { - ExpansionProfileCreateMutation, - ExpansionProfileUpdateMutation, - ExpansionProfileDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ExpansionProfileCreate: ExpansionProfileCreateMutation, ExpansionProfileUpdate: ExpansionProfileUpdateMutation, - ExpansionProfileDelete: ExpansionProfileDeleteMutation, + ExpansionProfileRemove: ExpansionProfileRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ExpansionProfile', path: '/3_0_1/ExpansionProfile/:id', query: ExpansionProfileInstanceQuery, diff --git a/src/resources/3_0_1/profiles/expansionprofile/resolver.js b/src/resources/3_0_1/profiles/expansionprofile/resolver.js index 17ee1060..4e9536d3 100644 --- a/src/resources/3_0_1/profiles/expansionprofile/resolver.js +++ b/src/resources/3_0_1/profiles/expansionprofile/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.expansionprofileResolver + * @name exports.getExpansionProfile * @static - * @summary ExpansionProfile Resolver. + * @summary ExpansionProfile resolver. */ -module.exports.expansionprofileResolver = function expansionprofileResolver( +module.exports.getExpansionProfile = function getExpansionProfile( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.expansionprofileListResolver + * @name exports.getExpansionProfileList * @static - * @summary ExpansionProfile List Resolver. + * @summary ExpansionProfile list resolver. */ -module.exports.expansionprofileListResolver = function expansionprofileListResolver( +module.exports.getExpansionProfileList = function getExpansionProfileList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.expansionprofileInstanceResolver + * @name exports.getExpansionProfileInstance * @static - * @summary ExpansionProfile Instance Resolver. + * @summary ExpansionProfile instance resolver. */ -module.exports.expansionprofileInstanceResolver = function expansionprofileInstanceResolver( +module.exports.getExpansionProfileInstance = function getExpansionProfileInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.expansionprofileCreateResolver + * @name exports.createExpansionProfile * @static - * @summary ExpansionProfile Create Resolver. + * @summary Create ExpansionProfile resolver. */ -module.exports.expansionprofileCreateResolver = function expansionprofileCreateResolver( +module.exports.createExpansionProfile = function createExpansionProfile( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.expansionprofileUpdateResolver + * @name exports.updateExpansionProfile * @static - * @summary ExpansionProfile Update Resolver. + * @summary Update ExpansionProfile resolver. */ -module.exports.expansionprofileUpdateResolver = function expansionprofileUpdateResolver( +module.exports.updateExpansionProfile = function updateExpansionProfile( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.expansionprofileDeleteResolver + * @name exports.removeExpansionProfile * @static - * @summary ExpansionProfile Delete Resolver. + * @summary Remove ExpansionProfile resolver. */ -module.exports.expansionprofileDeleteResolver = function expansionprofileDeleteResolver( +module.exports.removeExpansionProfile = function removeExpansionProfile( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/explanationofbenefit/mutation.js b/src/resources/3_0_1/profiles/explanationofbenefit/mutation.js index bc8bf9ed..6111985e 100644 --- a/src/resources/3_0_1/profiles/explanationofbenefit/mutation.js +++ b/src/resources/3_0_1/profiles/explanationofbenefit/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema'); +const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ExplanationOfBenefitInput = require('../../inputs/explanationofbenefit.input'); +const ExplanationOfBenefitInput = require('../../inputs/explanationofbenefit.input.js'); -// Resolvers -const { - explanationofbenefitCreateResolver, - explanationofbenefitUpdateResolver, - explanationofbenefitDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createExplanationOfBenefit, + updateExplanationOfBenefit, + removeExplanationOfBenefit, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ExplanationOfBenefit', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ExplanationOfBenefit record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ExplanationOfBenefit record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ExplanationOfBenefitCreateMutation - * @summary ExplanationOfBenefitCreate Mutation. + * @summary ExplanationOfBenefitCreate mutation. */ module.exports.ExplanationOfBenefitCreateMutation = { - args: WriteArgs, - description: 'Create a ExplanationOfBenefit', - resolve: scopeInvariant(scopeOptions, explanationofbenefitCreateResolver), + description: 'Create a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, createExplanationOfBenefit), type: ExplanationOfBenefitSchema, + args: WriteArgs, }; /** * @name exports.ExplanationOfBenefitUpdateMutation - * @summary ExplanationOfBenefitUpdate Mutation. + * @summary ExplanationOfBenefitUpdate mutation. */ module.exports.ExplanationOfBenefitUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ExplanationOfBenefits', - resolve: scopeInvariant(scopeOptions, explanationofbenefitUpdateResolver), + description: 'Update a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, updateExplanationOfBenefit), type: ExplanationOfBenefitSchema, + args: WriteArgs, }; /** - * @name exports.ExplanationOfBenefitDeleteMutation - * @summary ExplanationOfBenefitDelete Mutation. + * @name exports.ExplanationOfBenefitRemoveMutation + * @summary ExplanationOfBenefitRemove mutation. */ -module.exports.ExplanationOfBenefitDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ExplanationOfBenefit', - resolve: scopeInvariant(scopeOptions, explanationofbenefitDeleteResolver), +module.exports.ExplanationOfBenefitRemoveMutation = { + description: 'Remove a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, removeExplanationOfBenefit), type: ExplanationOfBenefitSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/explanationofbenefit/query.js b/src/resources/3_0_1/profiles/explanationofbenefit/query.js index 7a8dfae6..14eda3da 100644 --- a/src/resources/3_0_1/profiles/explanationofbenefit/query.js +++ b/src/resources/3_0_1/profiles/explanationofbenefit/query.js @@ -1,55 +1,65 @@ // Schemas -const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ExplanationOfBenefitArgs = require('../../parameters/explanationofbenefit.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ExplanationOfBenefitArgs = require('../../parameters/explanationofbenefit.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ExplanationOfBenefitArgs, +); // Resolvers const { - explanationofbenefitResolver, - explanationofbenefitListResolver, - explanationofbenefitInstanceResolver, + getExplanationOfBenefit, + getExplanationOfBenefitList, + getExplanationOfBenefitInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ExplanationOfBenefit', action: 'read', - version: '3_0_1', }; /** * @name exports.ExplanationOfBenefitQuery - * @summary ExplanationOfBenefit Query. + * @summary ExplanationOfBenefit query. */ module.exports.ExplanationOfBenefitQuery = { - args: Object.assign({}, CommonArgs, ExplanationOfBenefitArgs), description: 'Query for a single ExplanationOfBenefit', - resolve: scopeInvariant(scopeOptions, explanationofbenefitResolver), + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefit), type: ExplanationOfBenefitSchema, + args: args, }; /** * @name exports.ExplanationOfBenefitListQuery - * @summary ExplanationOfBenefitList Query. + * @summary ExplanationOfBenefit query. */ module.exports.ExplanationOfBenefitListQuery = { - args: Object.assign({}, CommonArgs, ExplanationOfBenefitArgs), - description: 'Query for multiple ExplanationOfBenefits', - resolve: scopeInvariant(scopeOptions, explanationofbenefitListResolver), + description: 'Query for a more than or just one ExplanationOfBenefit', + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefitList), type: BundleSchema, + args: args, }; /** * @name exports.ExplanationOfBenefitInstanceQuery - * @summary ExplanationOfBenefitInstance Query. + * @summary ExplanationOfBenefit query. */ module.exports.ExplanationOfBenefitInstanceQuery = { - description: 'Get information about a single ExplanationOfBenefit', - resolve: scopeInvariant(scopeOptions, explanationofbenefitInstanceResolver), + description: 'Access information about a single ExplanationOfBenefit', + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefitInstance), type: ExplanationOfBenefitSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/explanationofbenefit/index.js b/src/resources/3_0_1/profiles/explanationofbenefit/register.js similarity index 91% rename from src/resources/3_0_1/profiles/explanationofbenefit/index.js rename to src/resources/3_0_1/profiles/explanationofbenefit/register.js index 72d65148..182b49ce 100644 --- a/src/resources/3_0_1/profiles/explanationofbenefit/index.js +++ b/src/resources/3_0_1/profiles/explanationofbenefit/register.js @@ -1,15 +1,15 @@ +const { + ExplanationOfBenefitCreateMutation, + ExplanationOfBenefitUpdateMutation, + ExplanationOfBenefitRemoveMutation, +} = require('./mutation'); + const { ExplanationOfBenefitQuery, ExplanationOfBenefitListQuery, ExplanationOfBenefitInstanceQuery, } = require('./query'); -const { - ExplanationOfBenefitCreateMutation, - ExplanationOfBenefitUpdateMutation, - ExplanationOfBenefitDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ExplanationOfBenefitCreate: ExplanationOfBenefitCreateMutation, ExplanationOfBenefitUpdate: ExplanationOfBenefitUpdateMutation, - ExplanationOfBenefitDelete: ExplanationOfBenefitDeleteMutation, + ExplanationOfBenefitRemove: ExplanationOfBenefitRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ExplanationOfBenefit', path: '/3_0_1/ExplanationOfBenefit/:id', query: ExplanationOfBenefitInstanceQuery, diff --git a/src/resources/3_0_1/profiles/explanationofbenefit/resolver.js b/src/resources/3_0_1/profiles/explanationofbenefit/resolver.js index f39500f7..5f049eb4 100644 --- a/src/resources/3_0_1/profiles/explanationofbenefit/resolver.js +++ b/src/resources/3_0_1/profiles/explanationofbenefit/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.explanationofbenefitResolver + * @name exports.getExplanationOfBenefit * @static - * @summary ExplanationOfBenefit Resolver. + * @summary ExplanationOfBenefit resolver. */ -module.exports.explanationofbenefitResolver = function explanationofbenefitResolver( +module.exports.getExplanationOfBenefit = function getExplanationOfBenefit( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitListResolver + * @name exports.getExplanationOfBenefitList * @static - * @summary ExplanationOfBenefit List Resolver. + * @summary ExplanationOfBenefit list resolver. */ -module.exports.explanationofbenefitListResolver = function explanationofbenefitListResolver( +module.exports.getExplanationOfBenefitList = function getExplanationOfBenefitList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitInstanceResolver + * @name exports.getExplanationOfBenefitInstance * @static - * @summary ExplanationOfBenefit Instance Resolver. + * @summary ExplanationOfBenefit instance resolver. */ -module.exports.explanationofbenefitInstanceResolver = function explanationofbenefitInstanceResolver( +module.exports.getExplanationOfBenefitInstance = function getExplanationOfBenefitInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitCreateResolver + * @name exports.createExplanationOfBenefit * @static - * @summary ExplanationOfBenefit Create Resolver. + * @summary Create ExplanationOfBenefit resolver. */ -module.exports.explanationofbenefitCreateResolver = function explanationofbenefitCreateResolver( +module.exports.createExplanationOfBenefit = function createExplanationOfBenefit( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitUpdateResolver + * @name exports.updateExplanationOfBenefit * @static - * @summary ExplanationOfBenefit Update Resolver. + * @summary Update ExplanationOfBenefit resolver. */ -module.exports.explanationofbenefitUpdateResolver = function explanationofbenefitUpdateResolver( +module.exports.updateExplanationOfBenefit = function updateExplanationOfBenefit( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.explanationofbenefitDeleteResolver + * @name exports.removeExplanationOfBenefit * @static - * @summary ExplanationOfBenefit Delete Resolver. + * @summary Remove ExplanationOfBenefit resolver. */ -module.exports.explanationofbenefitDeleteResolver = function explanationofbenefitDeleteResolver( +module.exports.removeExplanationOfBenefit = function removeExplanationOfBenefit( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/familymemberhistory/mutation.js b/src/resources/3_0_1/profiles/familymemberhistory/mutation.js index 8cbb8097..b6028350 100644 --- a/src/resources/3_0_1/profiles/familymemberhistory/mutation.js +++ b/src/resources/3_0_1/profiles/familymemberhistory/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema'); +const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const FamilyMemberHistoryInput = require('../../inputs/familymemberhistory.input'); +const FamilyMemberHistoryInput = require('../../inputs/familymemberhistory.input.js'); -// Resolvers -const { - familymemberhistoryCreateResolver, - familymemberhistoryUpdateResolver, - familymemberhistoryDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createFamilyMemberHistory, + updateFamilyMemberHistory, + removeFamilyMemberHistory, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'FamilyMemberHistory', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a FamilyMemberHistory record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a FamilyMemberHistory record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.FamilyMemberHistoryCreateMutation - * @summary FamilyMemberHistoryCreate Mutation. + * @summary FamilyMemberHistoryCreate mutation. */ module.exports.FamilyMemberHistoryCreateMutation = { - args: WriteArgs, - description: 'Create a FamilyMemberHistory', - resolve: scopeInvariant(scopeOptions, familymemberhistoryCreateResolver), + description: 'Create a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, createFamilyMemberHistory), type: FamilyMemberHistorySchema, + args: WriteArgs, }; /** * @name exports.FamilyMemberHistoryUpdateMutation - * @summary FamilyMemberHistoryUpdate Mutation. + * @summary FamilyMemberHistoryUpdate mutation. */ module.exports.FamilyMemberHistoryUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple FamilyMemberHistorys', - resolve: scopeInvariant(scopeOptions, familymemberhistoryUpdateResolver), + description: 'Update a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, updateFamilyMemberHistory), type: FamilyMemberHistorySchema, + args: WriteArgs, }; /** - * @name exports.FamilyMemberHistoryDeleteMutation - * @summary FamilyMemberHistoryDelete Mutation. + * @name exports.FamilyMemberHistoryRemoveMutation + * @summary FamilyMemberHistoryRemove mutation. */ -module.exports.FamilyMemberHistoryDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single FamilyMemberHistory', - resolve: scopeInvariant(scopeOptions, familymemberhistoryDeleteResolver), +module.exports.FamilyMemberHistoryRemoveMutation = { + description: 'Remove a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, removeFamilyMemberHistory), type: FamilyMemberHistorySchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/familymemberhistory/query.js b/src/resources/3_0_1/profiles/familymemberhistory/query.js index 2c0ba760..9d365b62 100644 --- a/src/resources/3_0_1/profiles/familymemberhistory/query.js +++ b/src/resources/3_0_1/profiles/familymemberhistory/query.js @@ -1,55 +1,65 @@ // Schemas -const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const FamilyMemberHistoryArgs = require('../../parameters/familymemberhistory.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const FamilyMemberHistoryArgs = require('../../parameters/familymemberhistory.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + FamilyMemberHistoryArgs, +); // Resolvers const { - familymemberhistoryResolver, - familymemberhistoryListResolver, - familymemberhistoryInstanceResolver, + getFamilyMemberHistory, + getFamilyMemberHistoryList, + getFamilyMemberHistoryInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'FamilyMemberHistory', action: 'read', - version: '3_0_1', }; /** * @name exports.FamilyMemberHistoryQuery - * @summary FamilyMemberHistory Query. + * @summary FamilyMemberHistory query. */ module.exports.FamilyMemberHistoryQuery = { - args: Object.assign({}, CommonArgs, FamilyMemberHistoryArgs), description: 'Query for a single FamilyMemberHistory', - resolve: scopeInvariant(scopeOptions, familymemberhistoryResolver), + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistory), type: FamilyMemberHistorySchema, + args: args, }; /** * @name exports.FamilyMemberHistoryListQuery - * @summary FamilyMemberHistoryList Query. + * @summary FamilyMemberHistory query. */ module.exports.FamilyMemberHistoryListQuery = { - args: Object.assign({}, CommonArgs, FamilyMemberHistoryArgs), - description: 'Query for multiple FamilyMemberHistorys', - resolve: scopeInvariant(scopeOptions, familymemberhistoryListResolver), + description: 'Query for a more than or just one FamilyMemberHistory', + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistoryList), type: BundleSchema, + args: args, }; /** * @name exports.FamilyMemberHistoryInstanceQuery - * @summary FamilyMemberHistoryInstance Query. + * @summary FamilyMemberHistory query. */ module.exports.FamilyMemberHistoryInstanceQuery = { - description: 'Get information about a single FamilyMemberHistory', - resolve: scopeInvariant(scopeOptions, familymemberhistoryInstanceResolver), + description: 'Access information about a single FamilyMemberHistory', + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistoryInstance), type: FamilyMemberHistorySchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/familymemberhistory/index.js b/src/resources/3_0_1/profiles/familymemberhistory/register.js similarity index 91% rename from src/resources/3_0_1/profiles/familymemberhistory/index.js rename to src/resources/3_0_1/profiles/familymemberhistory/register.js index b20e492d..1ec55af9 100644 --- a/src/resources/3_0_1/profiles/familymemberhistory/index.js +++ b/src/resources/3_0_1/profiles/familymemberhistory/register.js @@ -1,15 +1,15 @@ +const { + FamilyMemberHistoryCreateMutation, + FamilyMemberHistoryUpdateMutation, + FamilyMemberHistoryRemoveMutation, +} = require('./mutation'); + const { FamilyMemberHistoryQuery, FamilyMemberHistoryListQuery, FamilyMemberHistoryInstanceQuery, } = require('./query'); -const { - FamilyMemberHistoryCreateMutation, - FamilyMemberHistoryUpdateMutation, - FamilyMemberHistoryDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { FamilyMemberHistoryCreate: FamilyMemberHistoryCreateMutation, FamilyMemberHistoryUpdate: FamilyMemberHistoryUpdateMutation, - FamilyMemberHistoryDelete: FamilyMemberHistoryDeleteMutation, + FamilyMemberHistoryRemove: FamilyMemberHistoryRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'FamilyMemberHistory', path: '/3_0_1/FamilyMemberHistory/:id', query: FamilyMemberHistoryInstanceQuery, diff --git a/src/resources/3_0_1/profiles/familymemberhistory/resolver.js b/src/resources/3_0_1/profiles/familymemberhistory/resolver.js index 6ea6b1c6..d042eb2f 100644 --- a/src/resources/3_0_1/profiles/familymemberhistory/resolver.js +++ b/src/resources/3_0_1/profiles/familymemberhistory/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.familymemberhistoryResolver + * @name exports.getFamilyMemberHistory * @static - * @summary FamilyMemberHistory Resolver. + * @summary FamilyMemberHistory resolver. */ -module.exports.familymemberhistoryResolver = function familymemberhistoryResolver( +module.exports.getFamilyMemberHistory = function getFamilyMemberHistory( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryListResolver + * @name exports.getFamilyMemberHistoryList * @static - * @summary FamilyMemberHistory List Resolver. + * @summary FamilyMemberHistory list resolver. */ -module.exports.familymemberhistoryListResolver = function familymemberhistoryListResolver( +module.exports.getFamilyMemberHistoryList = function getFamilyMemberHistoryList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryInstanceResolver + * @name exports.getFamilyMemberHistoryInstance * @static - * @summary FamilyMemberHistory Instance Resolver. + * @summary FamilyMemberHistory instance resolver. */ -module.exports.familymemberhistoryInstanceResolver = function familymemberhistoryInstanceResolver( +module.exports.getFamilyMemberHistoryInstance = function getFamilyMemberHistoryInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryCreateResolver + * @name exports.createFamilyMemberHistory * @static - * @summary FamilyMemberHistory Create Resolver. + * @summary Create FamilyMemberHistory resolver. */ -module.exports.familymemberhistoryCreateResolver = function familymemberhistoryCreateResolver( +module.exports.createFamilyMemberHistory = function createFamilyMemberHistory( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryUpdateResolver + * @name exports.updateFamilyMemberHistory * @static - * @summary FamilyMemberHistory Update Resolver. + * @summary Update FamilyMemberHistory resolver. */ -module.exports.familymemberhistoryUpdateResolver = function familymemberhistoryUpdateResolver( +module.exports.updateFamilyMemberHistory = function updateFamilyMemberHistory( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.familymemberhistoryDeleteResolver + * @name exports.removeFamilyMemberHistory * @static - * @summary FamilyMemberHistory Delete Resolver. + * @summary Remove FamilyMemberHistory resolver. */ -module.exports.familymemberhistoryDeleteResolver = function familymemberhistoryDeleteResolver( +module.exports.removeFamilyMemberHistory = function removeFamilyMemberHistory( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/flag/mutation.js b/src/resources/3_0_1/profiles/flag/mutation.js index 242eea09..5fde8e5a 100644 --- a/src/resources/3_0_1/profiles/flag/mutation.js +++ b/src/resources/3_0_1/profiles/flag/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const FlagSchema = require('../../schemas/flag.schema'); +const FlagSchema = require('../../schemas/flag.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const FlagInput = require('../../inputs/flag.input'); +const FlagInput = require('../../inputs/flag.input.js'); -// Resolvers -const { - flagCreateResolver, - flagUpdateResolver, - flagDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createFlag, updateFlag, removeFlag } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Flag', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Flag record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Flag record for deletion.', }, }; /** * @name exports.FlagCreateMutation - * @summary FlagCreate Mutation. + * @summary FlagCreate mutation. */ module.exports.FlagCreateMutation = { - args: WriteArgs, - description: 'Create a Flag', - resolve: scopeInvariant(scopeOptions, flagCreateResolver), + description: 'Create a Flag record', + resolve: scopeInvariant(scopeOptions, createFlag), type: FlagSchema, + args: WriteArgs, }; /** * @name exports.FlagUpdateMutation - * @summary FlagUpdate Mutation. + * @summary FlagUpdate mutation. */ module.exports.FlagUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Flags', - resolve: scopeInvariant(scopeOptions, flagUpdateResolver), + description: 'Update a Flag record', + resolve: scopeInvariant(scopeOptions, updateFlag), type: FlagSchema, + args: WriteArgs, }; /** - * @name exports.FlagDeleteMutation - * @summary FlagDelete Mutation. + * @name exports.FlagRemoveMutation + * @summary FlagRemove mutation. */ -module.exports.FlagDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Flag', - resolve: scopeInvariant(scopeOptions, flagDeleteResolver), +module.exports.FlagRemoveMutation = { + description: 'Remove a Flag record', + resolve: scopeInvariant(scopeOptions, removeFlag), type: FlagSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/flag/query.js b/src/resources/3_0_1/profiles/flag/query.js index 4755d1db..56fe2af9 100644 --- a/src/resources/3_0_1/profiles/flag/query.js +++ b/src/resources/3_0_1/profiles/flag/query.js @@ -1,55 +1,56 @@ // Schemas -const FlagSchema = require('../../schemas/flag.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const FlagSchema = require('../../schemas/flag.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const FlagArgs = require('../../parameters/flag.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const FlagArgs = require('../../parameters/flag.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, FlagArgs); // Resolvers -const { - flagResolver, - flagListResolver, - flagInstanceResolver, -} = require('./resolver'); +const { getFlag, getFlagList, getFlagInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Flag', action: 'read', - version: '3_0_1', }; /** * @name exports.FlagQuery - * @summary Flag Query. + * @summary Flag query. */ module.exports.FlagQuery = { - args: Object.assign({}, CommonArgs, FlagArgs), description: 'Query for a single Flag', - resolve: scopeInvariant(scopeOptions, flagResolver), + resolve: scopeInvariant(scopeOptions, getFlag), type: FlagSchema, + args: args, }; /** * @name exports.FlagListQuery - * @summary FlagList Query. + * @summary Flag query. */ module.exports.FlagListQuery = { - args: Object.assign({}, CommonArgs, FlagArgs), - description: 'Query for multiple Flags', - resolve: scopeInvariant(scopeOptions, flagListResolver), + description: 'Query for a more than or just one Flag', + resolve: scopeInvariant(scopeOptions, getFlagList), type: BundleSchema, + args: args, }; /** * @name exports.FlagInstanceQuery - * @summary FlagInstance Query. + * @summary Flag query. */ module.exports.FlagInstanceQuery = { - description: 'Get information about a single Flag', - resolve: scopeInvariant(scopeOptions, flagInstanceResolver), + description: 'Access information about a single Flag', + resolve: scopeInvariant(scopeOptions, getFlagInstance), type: FlagSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/flag/index.js b/src/resources/3_0_1/profiles/flag/register.js similarity index 93% rename from src/resources/3_0_1/profiles/flag/index.js rename to src/resources/3_0_1/profiles/flag/register.js index 8bba16aa..22441118 100644 --- a/src/resources/3_0_1/profiles/flag/index.js +++ b/src/resources/3_0_1/profiles/flag/register.js @@ -1,11 +1,11 @@ -const { FlagQuery, FlagListQuery, FlagInstanceQuery } = require('./query'); - const { FlagCreateMutation, FlagUpdateMutation, - FlagDeleteMutation, + FlagRemoveMutation, } = require('./mutation'); +const { FlagQuery, FlagListQuery, FlagInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { FlagCreate: FlagCreateMutation, FlagUpdate: FlagUpdateMutation, - FlagDelete: FlagDeleteMutation, + FlagRemove: FlagRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Flag', path: '/3_0_1/Flag/:id', query: FlagInstanceQuery, diff --git a/src/resources/3_0_1/profiles/flag/resolver.js b/src/resources/3_0_1/profiles/flag/resolver.js index ae6ed812..a6301664 100644 --- a/src/resources/3_0_1/profiles/flag/resolver.js +++ b/src/resources/3_0_1/profiles/flag/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.flagResolver + * @name exports.getFlag * @static - * @summary Flag Resolver. + * @summary Flag resolver. */ -module.exports.flagResolver = function flagResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getFlag = function getFlag(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagListResolver + * @name exports.getFlagList * @static - * @summary Flag List Resolver. + * @summary Flag list resolver. */ -module.exports.flagListResolver = function flagListResolver( +module.exports.getFlagList = function getFlagList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagInstanceResolver + * @name exports.getFlagInstance * @static - * @summary Flag Instance Resolver. + * @summary Flag instance resolver. */ -module.exports.flagInstanceResolver = function flagInstanceResolver( +module.exports.getFlagInstance = function getFlagInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagCreateResolver + * @name exports.createFlag * @static - * @summary Flag Create Resolver. + * @summary Create Flag resolver. */ -module.exports.flagCreateResolver = function flagCreateResolver( +module.exports.createFlag = function createFlag( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagUpdateResolver + * @name exports.updateFlag * @static - * @summary Flag Update Resolver. + * @summary Update Flag resolver. */ -module.exports.flagUpdateResolver = function flagUpdateResolver( +module.exports.updateFlag = function updateFlag( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.flagDeleteResolver + * @name exports.removeFlag * @static - * @summary Flag Delete Resolver. + * @summary Remove Flag resolver. */ -module.exports.flagDeleteResolver = function flagDeleteResolver( +module.exports.removeFlag = function removeFlag( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/goal/mutation.js b/src/resources/3_0_1/profiles/goal/mutation.js index 0ecc9be5..21b3746c 100644 --- a/src/resources/3_0_1/profiles/goal/mutation.js +++ b/src/resources/3_0_1/profiles/goal/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const GoalSchema = require('../../schemas/goal.schema'); +const GoalSchema = require('../../schemas/goal.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const GoalInput = require('../../inputs/goal.input'); +const GoalInput = require('../../inputs/goal.input.js'); -// Resolvers -const { - goalCreateResolver, - goalUpdateResolver, - goalDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createGoal, updateGoal, removeGoal } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Goal', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Goal record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Goal record for deletion.', }, }; /** * @name exports.GoalCreateMutation - * @summary GoalCreate Mutation. + * @summary GoalCreate mutation. */ module.exports.GoalCreateMutation = { - args: WriteArgs, - description: 'Create a Goal', - resolve: scopeInvariant(scopeOptions, goalCreateResolver), + description: 'Create a Goal record', + resolve: scopeInvariant(scopeOptions, createGoal), type: GoalSchema, + args: WriteArgs, }; /** * @name exports.GoalUpdateMutation - * @summary GoalUpdate Mutation. + * @summary GoalUpdate mutation. */ module.exports.GoalUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Goals', - resolve: scopeInvariant(scopeOptions, goalUpdateResolver), + description: 'Update a Goal record', + resolve: scopeInvariant(scopeOptions, updateGoal), type: GoalSchema, + args: WriteArgs, }; /** - * @name exports.GoalDeleteMutation - * @summary GoalDelete Mutation. + * @name exports.GoalRemoveMutation + * @summary GoalRemove mutation. */ -module.exports.GoalDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Goal', - resolve: scopeInvariant(scopeOptions, goalDeleteResolver), +module.exports.GoalRemoveMutation = { + description: 'Remove a Goal record', + resolve: scopeInvariant(scopeOptions, removeGoal), type: GoalSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/goal/query.js b/src/resources/3_0_1/profiles/goal/query.js index d844119a..3a4392a3 100644 --- a/src/resources/3_0_1/profiles/goal/query.js +++ b/src/resources/3_0_1/profiles/goal/query.js @@ -1,55 +1,56 @@ // Schemas -const GoalSchema = require('../../schemas/goal.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GoalSchema = require('../../schemas/goal.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const GoalArgs = require('../../parameters/goal.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const GoalArgs = require('../../parameters/goal.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, GoalArgs); // Resolvers -const { - goalResolver, - goalListResolver, - goalInstanceResolver, -} = require('./resolver'); +const { getGoal, getGoalList, getGoalInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Goal', action: 'read', - version: '3_0_1', }; /** * @name exports.GoalQuery - * @summary Goal Query. + * @summary Goal query. */ module.exports.GoalQuery = { - args: Object.assign({}, CommonArgs, GoalArgs), description: 'Query for a single Goal', - resolve: scopeInvariant(scopeOptions, goalResolver), + resolve: scopeInvariant(scopeOptions, getGoal), type: GoalSchema, + args: args, }; /** * @name exports.GoalListQuery - * @summary GoalList Query. + * @summary Goal query. */ module.exports.GoalListQuery = { - args: Object.assign({}, CommonArgs, GoalArgs), - description: 'Query for multiple Goals', - resolve: scopeInvariant(scopeOptions, goalListResolver), + description: 'Query for a more than or just one Goal', + resolve: scopeInvariant(scopeOptions, getGoalList), type: BundleSchema, + args: args, }; /** * @name exports.GoalInstanceQuery - * @summary GoalInstance Query. + * @summary Goal query. */ module.exports.GoalInstanceQuery = { - description: 'Get information about a single Goal', - resolve: scopeInvariant(scopeOptions, goalInstanceResolver), + description: 'Access information about a single Goal', + resolve: scopeInvariant(scopeOptions, getGoalInstance), type: GoalSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/goal/index.js b/src/resources/3_0_1/profiles/goal/register.js similarity index 93% rename from src/resources/3_0_1/profiles/goal/index.js rename to src/resources/3_0_1/profiles/goal/register.js index c9ac75b5..60d2e499 100644 --- a/src/resources/3_0_1/profiles/goal/index.js +++ b/src/resources/3_0_1/profiles/goal/register.js @@ -1,11 +1,11 @@ -const { GoalQuery, GoalListQuery, GoalInstanceQuery } = require('./query'); - const { GoalCreateMutation, GoalUpdateMutation, - GoalDeleteMutation, + GoalRemoveMutation, } = require('./mutation'); +const { GoalQuery, GoalListQuery, GoalInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { GoalCreate: GoalCreateMutation, GoalUpdate: GoalUpdateMutation, - GoalDelete: GoalDeleteMutation, + GoalRemove: GoalRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Goal', path: '/3_0_1/Goal/:id', query: GoalInstanceQuery, diff --git a/src/resources/3_0_1/profiles/goal/resolver.js b/src/resources/3_0_1/profiles/goal/resolver.js index 189872a9..0cfa479d 100644 --- a/src/resources/3_0_1/profiles/goal/resolver.js +++ b/src/resources/3_0_1/profiles/goal/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.goalResolver + * @name exports.getGoal * @static - * @summary Goal Resolver. + * @summary Goal resolver. */ -module.exports.goalResolver = function goalResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getGoal = function getGoal(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalListResolver + * @name exports.getGoalList * @static - * @summary Goal List Resolver. + * @summary Goal list resolver. */ -module.exports.goalListResolver = function goalListResolver( +module.exports.getGoalList = function getGoalList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalInstanceResolver + * @name exports.getGoalInstance * @static - * @summary Goal Instance Resolver. + * @summary Goal instance resolver. */ -module.exports.goalInstanceResolver = function goalInstanceResolver( +module.exports.getGoalInstance = function getGoalInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalCreateResolver + * @name exports.createGoal * @static - * @summary Goal Create Resolver. + * @summary Create Goal resolver. */ -module.exports.goalCreateResolver = function goalCreateResolver( +module.exports.createGoal = function createGoal( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalUpdateResolver + * @name exports.updateGoal * @static - * @summary Goal Update Resolver. + * @summary Update Goal resolver. */ -module.exports.goalUpdateResolver = function goalUpdateResolver( +module.exports.updateGoal = function updateGoal( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.goalDeleteResolver + * @name exports.removeGoal * @static - * @summary Goal Delete Resolver. + * @summary Remove Goal resolver. */ -module.exports.goalDeleteResolver = function goalDeleteResolver( +module.exports.removeGoal = function removeGoal( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/graphdefinition/mutation.js b/src/resources/3_0_1/profiles/graphdefinition/mutation.js index a2f65c29..ccb23427 100644 --- a/src/resources/3_0_1/profiles/graphdefinition/mutation.js +++ b/src/resources/3_0_1/profiles/graphdefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const GraphDefinitionSchema = require('../../schemas/graphdefinition.schema'); +const GraphDefinitionSchema = require('../../schemas/graphdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const GraphDefinitionInput = require('../../inputs/graphdefinition.input'); +const GraphDefinitionInput = require('../../inputs/graphdefinition.input.js'); -// Resolvers -const { - graphdefinitionCreateResolver, - graphdefinitionUpdateResolver, - graphdefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createGraphDefinition, + updateGraphDefinition, + removeGraphDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'GraphDefinition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a GraphDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a GraphDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.GraphDefinitionCreateMutation - * @summary GraphDefinitionCreate Mutation. + * @summary GraphDefinitionCreate mutation. */ module.exports.GraphDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a GraphDefinition', - resolve: scopeInvariant(scopeOptions, graphdefinitionCreateResolver), + description: 'Create a GraphDefinition record', + resolve: scopeInvariant(scopeOptions, createGraphDefinition), type: GraphDefinitionSchema, + args: WriteArgs, }; /** * @name exports.GraphDefinitionUpdateMutation - * @summary GraphDefinitionUpdate Mutation. + * @summary GraphDefinitionUpdate mutation. */ module.exports.GraphDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple GraphDefinitions', - resolve: scopeInvariant(scopeOptions, graphdefinitionUpdateResolver), + description: 'Update a GraphDefinition record', + resolve: scopeInvariant(scopeOptions, updateGraphDefinition), type: GraphDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.GraphDefinitionDeleteMutation - * @summary GraphDefinitionDelete Mutation. + * @name exports.GraphDefinitionRemoveMutation + * @summary GraphDefinitionRemove mutation. */ -module.exports.GraphDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single GraphDefinition', - resolve: scopeInvariant(scopeOptions, graphdefinitionDeleteResolver), +module.exports.GraphDefinitionRemoveMutation = { + description: 'Remove a GraphDefinition record', + resolve: scopeInvariant(scopeOptions, removeGraphDefinition), type: GraphDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/graphdefinition/query.js b/src/resources/3_0_1/profiles/graphdefinition/query.js index 21326973..4f15092b 100644 --- a/src/resources/3_0_1/profiles/graphdefinition/query.js +++ b/src/resources/3_0_1/profiles/graphdefinition/query.js @@ -1,55 +1,65 @@ // Schemas -const GraphDefinitionSchema = require('../../schemas/graphdefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GraphDefinitionSchema = require('../../schemas/graphdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const GraphDefinitionArgs = require('../../parameters/graphdefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const GraphDefinitionArgs = require('../../parameters/graphdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + GraphDefinitionArgs, +); // Resolvers const { - graphdefinitionResolver, - graphdefinitionListResolver, - graphdefinitionInstanceResolver, + getGraphDefinition, + getGraphDefinitionList, + getGraphDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'GraphDefinition', action: 'read', - version: '3_0_1', }; /** * @name exports.GraphDefinitionQuery - * @summary GraphDefinition Query. + * @summary GraphDefinition query. */ module.exports.GraphDefinitionQuery = { - args: Object.assign({}, CommonArgs, GraphDefinitionArgs), description: 'Query for a single GraphDefinition', - resolve: scopeInvariant(scopeOptions, graphdefinitionResolver), + resolve: scopeInvariant(scopeOptions, getGraphDefinition), type: GraphDefinitionSchema, + args: args, }; /** * @name exports.GraphDefinitionListQuery - * @summary GraphDefinitionList Query. + * @summary GraphDefinition query. */ module.exports.GraphDefinitionListQuery = { - args: Object.assign({}, CommonArgs, GraphDefinitionArgs), - description: 'Query for multiple GraphDefinitions', - resolve: scopeInvariant(scopeOptions, graphdefinitionListResolver), + description: 'Query for a more than or just one GraphDefinition', + resolve: scopeInvariant(scopeOptions, getGraphDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.GraphDefinitionInstanceQuery - * @summary GraphDefinitionInstance Query. + * @summary GraphDefinition query. */ module.exports.GraphDefinitionInstanceQuery = { - description: 'Get information about a single GraphDefinition', - resolve: scopeInvariant(scopeOptions, graphdefinitionInstanceResolver), + description: 'Access information about a single GraphDefinition', + resolve: scopeInvariant(scopeOptions, getGraphDefinitionInstance), type: GraphDefinitionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/graphdefinition/index.js b/src/resources/3_0_1/profiles/graphdefinition/register.js similarity index 91% rename from src/resources/3_0_1/profiles/graphdefinition/index.js rename to src/resources/3_0_1/profiles/graphdefinition/register.js index 9c1b5b45..ad49ee76 100644 --- a/src/resources/3_0_1/profiles/graphdefinition/index.js +++ b/src/resources/3_0_1/profiles/graphdefinition/register.js @@ -1,15 +1,15 @@ +const { + GraphDefinitionCreateMutation, + GraphDefinitionUpdateMutation, + GraphDefinitionRemoveMutation, +} = require('./mutation'); + const { GraphDefinitionQuery, GraphDefinitionListQuery, GraphDefinitionInstanceQuery, } = require('./query'); -const { - GraphDefinitionCreateMutation, - GraphDefinitionUpdateMutation, - GraphDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { GraphDefinitionCreate: GraphDefinitionCreateMutation, GraphDefinitionUpdate: GraphDefinitionUpdateMutation, - GraphDefinitionDelete: GraphDefinitionDeleteMutation, + GraphDefinitionRemove: GraphDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'GraphDefinition', path: '/3_0_1/GraphDefinition/:id', query: GraphDefinitionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/graphdefinition/resolver.js b/src/resources/3_0_1/profiles/graphdefinition/resolver.js index 151b3731..31093d1c 100644 --- a/src/resources/3_0_1/profiles/graphdefinition/resolver.js +++ b/src/resources/3_0_1/profiles/graphdefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.graphdefinitionResolver + * @name exports.getGraphDefinition * @static - * @summary GraphDefinition Resolver. + * @summary GraphDefinition resolver. */ -module.exports.graphdefinitionResolver = function graphdefinitionResolver( +module.exports.getGraphDefinition = function getGraphDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.graphdefinitionListResolver + * @name exports.getGraphDefinitionList * @static - * @summary GraphDefinition List Resolver. + * @summary GraphDefinition list resolver. */ -module.exports.graphdefinitionListResolver = function graphdefinitionListResolver( +module.exports.getGraphDefinitionList = function getGraphDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.graphdefinitionInstanceResolver + * @name exports.getGraphDefinitionInstance * @static - * @summary GraphDefinition Instance Resolver. + * @summary GraphDefinition instance resolver. */ -module.exports.graphdefinitionInstanceResolver = function graphdefinitionInstanceResolver( +module.exports.getGraphDefinitionInstance = function getGraphDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.graphdefinitionCreateResolver + * @name exports.createGraphDefinition * @static - * @summary GraphDefinition Create Resolver. + * @summary Create GraphDefinition resolver. */ -module.exports.graphdefinitionCreateResolver = function graphdefinitionCreateResolver( +module.exports.createGraphDefinition = function createGraphDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.graphdefinitionUpdateResolver + * @name exports.updateGraphDefinition * @static - * @summary GraphDefinition Update Resolver. + * @summary Update GraphDefinition resolver. */ -module.exports.graphdefinitionUpdateResolver = function graphdefinitionUpdateResolver( +module.exports.updateGraphDefinition = function updateGraphDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.graphdefinitionDeleteResolver + * @name exports.removeGraphDefinition * @static - * @summary GraphDefinition Delete Resolver. + * @summary Remove GraphDefinition resolver. */ -module.exports.graphdefinitionDeleteResolver = function graphdefinitionDeleteResolver( +module.exports.removeGraphDefinition = function removeGraphDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/group/mutation.js b/src/resources/3_0_1/profiles/group/mutation.js index f8437e7f..4d2a7ca2 100644 --- a/src/resources/3_0_1/profiles/group/mutation.js +++ b/src/resources/3_0_1/profiles/group/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const GroupSchema = require('../../schemas/group.schema'); +const GroupSchema = require('../../schemas/group.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const GroupInput = require('../../inputs/group.input'); +const GroupInput = require('../../inputs/group.input.js'); -// Resolvers -const { - groupCreateResolver, - groupUpdateResolver, - groupDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createGroup, updateGroup, removeGroup } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Group', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Group record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Group record for deletion.', }, }; /** * @name exports.GroupCreateMutation - * @summary GroupCreate Mutation. + * @summary GroupCreate mutation. */ module.exports.GroupCreateMutation = { - args: WriteArgs, - description: 'Create a Group', - resolve: scopeInvariant(scopeOptions, groupCreateResolver), + description: 'Create a Group record', + resolve: scopeInvariant(scopeOptions, createGroup), type: GroupSchema, + args: WriteArgs, }; /** * @name exports.GroupUpdateMutation - * @summary GroupUpdate Mutation. + * @summary GroupUpdate mutation. */ module.exports.GroupUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Groups', - resolve: scopeInvariant(scopeOptions, groupUpdateResolver), + description: 'Update a Group record', + resolve: scopeInvariant(scopeOptions, updateGroup), type: GroupSchema, + args: WriteArgs, }; /** - * @name exports.GroupDeleteMutation - * @summary GroupDelete Mutation. + * @name exports.GroupRemoveMutation + * @summary GroupRemove mutation. */ -module.exports.GroupDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Group', - resolve: scopeInvariant(scopeOptions, groupDeleteResolver), +module.exports.GroupRemoveMutation = { + description: 'Remove a Group record', + resolve: scopeInvariant(scopeOptions, removeGroup), type: GroupSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/group/query.js b/src/resources/3_0_1/profiles/group/query.js index 4cfe45de..9c6038b3 100644 --- a/src/resources/3_0_1/profiles/group/query.js +++ b/src/resources/3_0_1/profiles/group/query.js @@ -1,55 +1,56 @@ // Schemas -const GroupSchema = require('../../schemas/group.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GroupSchema = require('../../schemas/group.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const GroupArgs = require('../../parameters/group.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const GroupArgs = require('../../parameters/group.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, GroupArgs); // Resolvers -const { - groupResolver, - groupListResolver, - groupInstanceResolver, -} = require('./resolver'); +const { getGroup, getGroupList, getGroupInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Group', action: 'read', - version: '3_0_1', }; /** * @name exports.GroupQuery - * @summary Group Query. + * @summary Group query. */ module.exports.GroupQuery = { - args: Object.assign({}, CommonArgs, GroupArgs), description: 'Query for a single Group', - resolve: scopeInvariant(scopeOptions, groupResolver), + resolve: scopeInvariant(scopeOptions, getGroup), type: GroupSchema, + args: args, }; /** * @name exports.GroupListQuery - * @summary GroupList Query. + * @summary Group query. */ module.exports.GroupListQuery = { - args: Object.assign({}, CommonArgs, GroupArgs), - description: 'Query for multiple Groups', - resolve: scopeInvariant(scopeOptions, groupListResolver), + description: 'Query for a more than or just one Group', + resolve: scopeInvariant(scopeOptions, getGroupList), type: BundleSchema, + args: args, }; /** * @name exports.GroupInstanceQuery - * @summary GroupInstance Query. + * @summary Group query. */ module.exports.GroupInstanceQuery = { - description: 'Get information about a single Group', - resolve: scopeInvariant(scopeOptions, groupInstanceResolver), + description: 'Access information about a single Group', + resolve: scopeInvariant(scopeOptions, getGroupInstance), type: GroupSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/group/index.js b/src/resources/3_0_1/profiles/group/register.js similarity index 93% rename from src/resources/3_0_1/profiles/group/index.js rename to src/resources/3_0_1/profiles/group/register.js index bd9b2198..4affd615 100644 --- a/src/resources/3_0_1/profiles/group/index.js +++ b/src/resources/3_0_1/profiles/group/register.js @@ -1,11 +1,11 @@ -const { GroupQuery, GroupListQuery, GroupInstanceQuery } = require('./query'); - const { GroupCreateMutation, GroupUpdateMutation, - GroupDeleteMutation, + GroupRemoveMutation, } = require('./mutation'); +const { GroupQuery, GroupListQuery, GroupInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { GroupCreate: GroupCreateMutation, GroupUpdate: GroupUpdateMutation, - GroupDelete: GroupDeleteMutation, + GroupRemove: GroupRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Group', path: '/3_0_1/Group/:id', query: GroupInstanceQuery, diff --git a/src/resources/3_0_1/profiles/group/resolver.js b/src/resources/3_0_1/profiles/group/resolver.js index 9e490a7c..71d604dd 100644 --- a/src/resources/3_0_1/profiles/group/resolver.js +++ b/src/resources/3_0_1/profiles/group/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.groupResolver + * @name exports.getGroup * @static - * @summary Group Resolver. + * @summary Group resolver. */ -module.exports.groupResolver = function groupResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getGroup = function getGroup(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupListResolver + * @name exports.getGroupList * @static - * @summary Group List Resolver. + * @summary Group list resolver. */ -module.exports.groupListResolver = function groupListResolver( +module.exports.getGroupList = function getGroupList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupInstanceResolver + * @name exports.getGroupInstance * @static - * @summary Group Instance Resolver. + * @summary Group instance resolver. */ -module.exports.groupInstanceResolver = function groupInstanceResolver( +module.exports.getGroupInstance = function getGroupInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupCreateResolver + * @name exports.createGroup * @static - * @summary Group Create Resolver. + * @summary Create Group resolver. */ -module.exports.groupCreateResolver = function groupCreateResolver( +module.exports.createGroup = function createGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupUpdateResolver + * @name exports.updateGroup * @static - * @summary Group Update Resolver. + * @summary Update Group resolver. */ -module.exports.groupUpdateResolver = function groupUpdateResolver( +module.exports.updateGroup = function updateGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.groupDeleteResolver + * @name exports.removeGroup * @static - * @summary Group Delete Resolver. + * @summary Remove Group resolver. */ -module.exports.groupDeleteResolver = function groupDeleteResolver( +module.exports.removeGroup = function removeGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/guidanceresponse/mutation.js b/src/resources/3_0_1/profiles/guidanceresponse/mutation.js index ce67f5a5..ba8d0ec7 100644 --- a/src/resources/3_0_1/profiles/guidanceresponse/mutation.js +++ b/src/resources/3_0_1/profiles/guidanceresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const GuidanceResponseSchema = require('../../schemas/guidanceresponse.schema'); +const GuidanceResponseSchema = require('../../schemas/guidanceresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const GuidanceResponseInput = require('../../inputs/guidanceresponse.input'); +const GuidanceResponseInput = require('../../inputs/guidanceresponse.input.js'); -// Resolvers -const { - guidanceresponseCreateResolver, - guidanceresponseUpdateResolver, - guidanceresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createGuidanceResponse, + updateGuidanceResponse, + removeGuidanceResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'GuidanceResponse', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a GuidanceResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a GuidanceResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.GuidanceResponseCreateMutation - * @summary GuidanceResponseCreate Mutation. + * @summary GuidanceResponseCreate mutation. */ module.exports.GuidanceResponseCreateMutation = { - args: WriteArgs, - description: 'Create a GuidanceResponse', - resolve: scopeInvariant(scopeOptions, guidanceresponseCreateResolver), + description: 'Create a GuidanceResponse record', + resolve: scopeInvariant(scopeOptions, createGuidanceResponse), type: GuidanceResponseSchema, + args: WriteArgs, }; /** * @name exports.GuidanceResponseUpdateMutation - * @summary GuidanceResponseUpdate Mutation. + * @summary GuidanceResponseUpdate mutation. */ module.exports.GuidanceResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple GuidanceResponses', - resolve: scopeInvariant(scopeOptions, guidanceresponseUpdateResolver), + description: 'Update a GuidanceResponse record', + resolve: scopeInvariant(scopeOptions, updateGuidanceResponse), type: GuidanceResponseSchema, + args: WriteArgs, }; /** - * @name exports.GuidanceResponseDeleteMutation - * @summary GuidanceResponseDelete Mutation. + * @name exports.GuidanceResponseRemoveMutation + * @summary GuidanceResponseRemove mutation. */ -module.exports.GuidanceResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single GuidanceResponse', - resolve: scopeInvariant(scopeOptions, guidanceresponseDeleteResolver), +module.exports.GuidanceResponseRemoveMutation = { + description: 'Remove a GuidanceResponse record', + resolve: scopeInvariant(scopeOptions, removeGuidanceResponse), type: GuidanceResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/guidanceresponse/query.js b/src/resources/3_0_1/profiles/guidanceresponse/query.js index d1273cc2..4a1f9ae5 100644 --- a/src/resources/3_0_1/profiles/guidanceresponse/query.js +++ b/src/resources/3_0_1/profiles/guidanceresponse/query.js @@ -1,55 +1,65 @@ // Schemas -const GuidanceResponseSchema = require('../../schemas/guidanceresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GuidanceResponseSchema = require('../../schemas/guidanceresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const GuidanceResponseArgs = require('../../parameters/guidanceresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const GuidanceResponseArgs = require('../../parameters/guidanceresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + GuidanceResponseArgs, +); // Resolvers const { - guidanceresponseResolver, - guidanceresponseListResolver, - guidanceresponseInstanceResolver, + getGuidanceResponse, + getGuidanceResponseList, + getGuidanceResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'GuidanceResponse', action: 'read', - version: '3_0_1', }; /** * @name exports.GuidanceResponseQuery - * @summary GuidanceResponse Query. + * @summary GuidanceResponse query. */ module.exports.GuidanceResponseQuery = { - args: Object.assign({}, CommonArgs, GuidanceResponseArgs), description: 'Query for a single GuidanceResponse', - resolve: scopeInvariant(scopeOptions, guidanceresponseResolver), + resolve: scopeInvariant(scopeOptions, getGuidanceResponse), type: GuidanceResponseSchema, + args: args, }; /** * @name exports.GuidanceResponseListQuery - * @summary GuidanceResponseList Query. + * @summary GuidanceResponse query. */ module.exports.GuidanceResponseListQuery = { - args: Object.assign({}, CommonArgs, GuidanceResponseArgs), - description: 'Query for multiple GuidanceResponses', - resolve: scopeInvariant(scopeOptions, guidanceresponseListResolver), + description: 'Query for a more than or just one GuidanceResponse', + resolve: scopeInvariant(scopeOptions, getGuidanceResponseList), type: BundleSchema, + args: args, }; /** * @name exports.GuidanceResponseInstanceQuery - * @summary GuidanceResponseInstance Query. + * @summary GuidanceResponse query. */ module.exports.GuidanceResponseInstanceQuery = { - description: 'Get information about a single GuidanceResponse', - resolve: scopeInvariant(scopeOptions, guidanceresponseInstanceResolver), + description: 'Access information about a single GuidanceResponse', + resolve: scopeInvariant(scopeOptions, getGuidanceResponseInstance), type: GuidanceResponseSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/guidanceresponse/index.js b/src/resources/3_0_1/profiles/guidanceresponse/register.js similarity index 91% rename from src/resources/3_0_1/profiles/guidanceresponse/index.js rename to src/resources/3_0_1/profiles/guidanceresponse/register.js index 1a731c41..9ee69623 100644 --- a/src/resources/3_0_1/profiles/guidanceresponse/index.js +++ b/src/resources/3_0_1/profiles/guidanceresponse/register.js @@ -1,15 +1,15 @@ +const { + GuidanceResponseCreateMutation, + GuidanceResponseUpdateMutation, + GuidanceResponseRemoveMutation, +} = require('./mutation'); + const { GuidanceResponseQuery, GuidanceResponseListQuery, GuidanceResponseInstanceQuery, } = require('./query'); -const { - GuidanceResponseCreateMutation, - GuidanceResponseUpdateMutation, - GuidanceResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { GuidanceResponseCreate: GuidanceResponseCreateMutation, GuidanceResponseUpdate: GuidanceResponseUpdateMutation, - GuidanceResponseDelete: GuidanceResponseDeleteMutation, + GuidanceResponseRemove: GuidanceResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'GuidanceResponse', path: '/3_0_1/GuidanceResponse/:id', query: GuidanceResponseInstanceQuery, diff --git a/src/resources/3_0_1/profiles/guidanceresponse/resolver.js b/src/resources/3_0_1/profiles/guidanceresponse/resolver.js index 7819e16b..be9c74d4 100644 --- a/src/resources/3_0_1/profiles/guidanceresponse/resolver.js +++ b/src/resources/3_0_1/profiles/guidanceresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.guidanceresponseResolver + * @name exports.getGuidanceResponse * @static - * @summary GuidanceResponse Resolver. + * @summary GuidanceResponse resolver. */ -module.exports.guidanceresponseResolver = function guidanceresponseResolver( +module.exports.getGuidanceResponse = function getGuidanceResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.guidanceresponseListResolver + * @name exports.getGuidanceResponseList * @static - * @summary GuidanceResponse List Resolver. + * @summary GuidanceResponse list resolver. */ -module.exports.guidanceresponseListResolver = function guidanceresponseListResolver( +module.exports.getGuidanceResponseList = function getGuidanceResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.guidanceresponseInstanceResolver + * @name exports.getGuidanceResponseInstance * @static - * @summary GuidanceResponse Instance Resolver. + * @summary GuidanceResponse instance resolver. */ -module.exports.guidanceresponseInstanceResolver = function guidanceresponseInstanceResolver( +module.exports.getGuidanceResponseInstance = function getGuidanceResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.guidanceresponseCreateResolver + * @name exports.createGuidanceResponse * @static - * @summary GuidanceResponse Create Resolver. + * @summary Create GuidanceResponse resolver. */ -module.exports.guidanceresponseCreateResolver = function guidanceresponseCreateResolver( +module.exports.createGuidanceResponse = function createGuidanceResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.guidanceresponseUpdateResolver + * @name exports.updateGuidanceResponse * @static - * @summary GuidanceResponse Update Resolver. + * @summary Update GuidanceResponse resolver. */ -module.exports.guidanceresponseUpdateResolver = function guidanceresponseUpdateResolver( +module.exports.updateGuidanceResponse = function updateGuidanceResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.guidanceresponseDeleteResolver + * @name exports.removeGuidanceResponse * @static - * @summary GuidanceResponse Delete Resolver. + * @summary Remove GuidanceResponse resolver. */ -module.exports.guidanceresponseDeleteResolver = function guidanceresponseDeleteResolver( +module.exports.removeGuidanceResponse = function removeGuidanceResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/healthcareservice/mutation.js b/src/resources/3_0_1/profiles/healthcareservice/mutation.js index 70345153..b8696c2c 100644 --- a/src/resources/3_0_1/profiles/healthcareservice/mutation.js +++ b/src/resources/3_0_1/profiles/healthcareservice/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema'); +const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const HealthcareServiceInput = require('../../inputs/healthcareservice.input'); +const HealthcareServiceInput = require('../../inputs/healthcareservice.input.js'); -// Resolvers -const { - healthcareserviceCreateResolver, - healthcareserviceUpdateResolver, - healthcareserviceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createHealthcareService, + updateHealthcareService, + removeHealthcareService, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'HealthcareService', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a HealthcareService record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a HealthcareService record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.HealthcareServiceCreateMutation - * @summary HealthcareServiceCreate Mutation. + * @summary HealthcareServiceCreate mutation. */ module.exports.HealthcareServiceCreateMutation = { - args: WriteArgs, - description: 'Create a HealthcareService', - resolve: scopeInvariant(scopeOptions, healthcareserviceCreateResolver), + description: 'Create a HealthcareService record', + resolve: scopeInvariant(scopeOptions, createHealthcareService), type: HealthcareServiceSchema, + args: WriteArgs, }; /** * @name exports.HealthcareServiceUpdateMutation - * @summary HealthcareServiceUpdate Mutation. + * @summary HealthcareServiceUpdate mutation. */ module.exports.HealthcareServiceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple HealthcareServices', - resolve: scopeInvariant(scopeOptions, healthcareserviceUpdateResolver), + description: 'Update a HealthcareService record', + resolve: scopeInvariant(scopeOptions, updateHealthcareService), type: HealthcareServiceSchema, + args: WriteArgs, }; /** - * @name exports.HealthcareServiceDeleteMutation - * @summary HealthcareServiceDelete Mutation. + * @name exports.HealthcareServiceRemoveMutation + * @summary HealthcareServiceRemove mutation. */ -module.exports.HealthcareServiceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single HealthcareService', - resolve: scopeInvariant(scopeOptions, healthcareserviceDeleteResolver), +module.exports.HealthcareServiceRemoveMutation = { + description: 'Remove a HealthcareService record', + resolve: scopeInvariant(scopeOptions, removeHealthcareService), type: HealthcareServiceSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/healthcareservice/query.js b/src/resources/3_0_1/profiles/healthcareservice/query.js index d265d107..f0079f50 100644 --- a/src/resources/3_0_1/profiles/healthcareservice/query.js +++ b/src/resources/3_0_1/profiles/healthcareservice/query.js @@ -1,55 +1,65 @@ // Schemas -const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const HealthcareServiceArgs = require('../../parameters/healthcareservice.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const HealthcareServiceArgs = require('../../parameters/healthcareservice.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + HealthcareServiceArgs, +); // Resolvers const { - healthcareserviceResolver, - healthcareserviceListResolver, - healthcareserviceInstanceResolver, + getHealthcareService, + getHealthcareServiceList, + getHealthcareServiceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'HealthcareService', action: 'read', - version: '3_0_1', }; /** * @name exports.HealthcareServiceQuery - * @summary HealthcareService Query. + * @summary HealthcareService query. */ module.exports.HealthcareServiceQuery = { - args: Object.assign({}, CommonArgs, HealthcareServiceArgs), description: 'Query for a single HealthcareService', - resolve: scopeInvariant(scopeOptions, healthcareserviceResolver), + resolve: scopeInvariant(scopeOptions, getHealthcareService), type: HealthcareServiceSchema, + args: args, }; /** * @name exports.HealthcareServiceListQuery - * @summary HealthcareServiceList Query. + * @summary HealthcareService query. */ module.exports.HealthcareServiceListQuery = { - args: Object.assign({}, CommonArgs, HealthcareServiceArgs), - description: 'Query for multiple HealthcareServices', - resolve: scopeInvariant(scopeOptions, healthcareserviceListResolver), + description: 'Query for a more than or just one HealthcareService', + resolve: scopeInvariant(scopeOptions, getHealthcareServiceList), type: BundleSchema, + args: args, }; /** * @name exports.HealthcareServiceInstanceQuery - * @summary HealthcareServiceInstance Query. + * @summary HealthcareService query. */ module.exports.HealthcareServiceInstanceQuery = { - description: 'Get information about a single HealthcareService', - resolve: scopeInvariant(scopeOptions, healthcareserviceInstanceResolver), + description: 'Access information about a single HealthcareService', + resolve: scopeInvariant(scopeOptions, getHealthcareServiceInstance), type: HealthcareServiceSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/healthcareservice/index.js b/src/resources/3_0_1/profiles/healthcareservice/register.js similarity index 91% rename from src/resources/3_0_1/profiles/healthcareservice/index.js rename to src/resources/3_0_1/profiles/healthcareservice/register.js index 88d3fec7..bd7a74e5 100644 --- a/src/resources/3_0_1/profiles/healthcareservice/index.js +++ b/src/resources/3_0_1/profiles/healthcareservice/register.js @@ -1,15 +1,15 @@ +const { + HealthcareServiceCreateMutation, + HealthcareServiceUpdateMutation, + HealthcareServiceRemoveMutation, +} = require('./mutation'); + const { HealthcareServiceQuery, HealthcareServiceListQuery, HealthcareServiceInstanceQuery, } = require('./query'); -const { - HealthcareServiceCreateMutation, - HealthcareServiceUpdateMutation, - HealthcareServiceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { HealthcareServiceCreate: HealthcareServiceCreateMutation, HealthcareServiceUpdate: HealthcareServiceUpdateMutation, - HealthcareServiceDelete: HealthcareServiceDeleteMutation, + HealthcareServiceRemove: HealthcareServiceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'HealthcareService', path: '/3_0_1/HealthcareService/:id', query: HealthcareServiceInstanceQuery, diff --git a/src/resources/3_0_1/profiles/healthcareservice/resolver.js b/src/resources/3_0_1/profiles/healthcareservice/resolver.js index d52a46e0..29c4204d 100644 --- a/src/resources/3_0_1/profiles/healthcareservice/resolver.js +++ b/src/resources/3_0_1/profiles/healthcareservice/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.healthcareserviceResolver + * @name exports.getHealthcareService * @static - * @summary HealthcareService Resolver. + * @summary HealthcareService resolver. */ -module.exports.healthcareserviceResolver = function healthcareserviceResolver( +module.exports.getHealthcareService = function getHealthcareService( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceListResolver + * @name exports.getHealthcareServiceList * @static - * @summary HealthcareService List Resolver. + * @summary HealthcareService list resolver. */ -module.exports.healthcareserviceListResolver = function healthcareserviceListResolver( +module.exports.getHealthcareServiceList = function getHealthcareServiceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceInstanceResolver + * @name exports.getHealthcareServiceInstance * @static - * @summary HealthcareService Instance Resolver. + * @summary HealthcareService instance resolver. */ -module.exports.healthcareserviceInstanceResolver = function healthcareserviceInstanceResolver( +module.exports.getHealthcareServiceInstance = function getHealthcareServiceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceCreateResolver + * @name exports.createHealthcareService * @static - * @summary HealthcareService Create Resolver. + * @summary Create HealthcareService resolver. */ -module.exports.healthcareserviceCreateResolver = function healthcareserviceCreateResolver( +module.exports.createHealthcareService = function createHealthcareService( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceUpdateResolver + * @name exports.updateHealthcareService * @static - * @summary HealthcareService Update Resolver. + * @summary Update HealthcareService resolver. */ -module.exports.healthcareserviceUpdateResolver = function healthcareserviceUpdateResolver( +module.exports.updateHealthcareService = function updateHealthcareService( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.healthcareserviceDeleteResolver + * @name exports.removeHealthcareService * @static - * @summary HealthcareService Delete Resolver. + * @summary Remove HealthcareService resolver. */ -module.exports.healthcareserviceDeleteResolver = function healthcareserviceDeleteResolver( +module.exports.removeHealthcareService = function removeHealthcareService( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/imagingmanifest/mutation.js b/src/resources/3_0_1/profiles/imagingmanifest/mutation.js index bbeeb517..88ebabc5 100644 --- a/src/resources/3_0_1/profiles/imagingmanifest/mutation.js +++ b/src/resources/3_0_1/profiles/imagingmanifest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImagingManifestSchema = require('../../schemas/imagingmanifest.schema'); +const ImagingManifestSchema = require('../../schemas/imagingmanifest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImagingManifestInput = require('../../inputs/imagingmanifest.input'); +const ImagingManifestInput = require('../../inputs/imagingmanifest.input.js'); -// Resolvers -const { - imagingmanifestCreateResolver, - imagingmanifestUpdateResolver, - imagingmanifestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImagingManifest, + updateImagingManifest, + removeImagingManifest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImagingManifest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ImagingManifest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ImagingManifest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ImagingManifestCreateMutation - * @summary ImagingManifestCreate Mutation. + * @summary ImagingManifestCreate mutation. */ module.exports.ImagingManifestCreateMutation = { - args: WriteArgs, - description: 'Create a ImagingManifest', - resolve: scopeInvariant(scopeOptions, imagingmanifestCreateResolver), + description: 'Create a ImagingManifest record', + resolve: scopeInvariant(scopeOptions, createImagingManifest), type: ImagingManifestSchema, + args: WriteArgs, }; /** * @name exports.ImagingManifestUpdateMutation - * @summary ImagingManifestUpdate Mutation. + * @summary ImagingManifestUpdate mutation. */ module.exports.ImagingManifestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ImagingManifests', - resolve: scopeInvariant(scopeOptions, imagingmanifestUpdateResolver), + description: 'Update a ImagingManifest record', + resolve: scopeInvariant(scopeOptions, updateImagingManifest), type: ImagingManifestSchema, + args: WriteArgs, }; /** - * @name exports.ImagingManifestDeleteMutation - * @summary ImagingManifestDelete Mutation. + * @name exports.ImagingManifestRemoveMutation + * @summary ImagingManifestRemove mutation. */ -module.exports.ImagingManifestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ImagingManifest', - resolve: scopeInvariant(scopeOptions, imagingmanifestDeleteResolver), +module.exports.ImagingManifestRemoveMutation = { + description: 'Remove a ImagingManifest record', + resolve: scopeInvariant(scopeOptions, removeImagingManifest), type: ImagingManifestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/imagingmanifest/query.js b/src/resources/3_0_1/profiles/imagingmanifest/query.js index d0563635..fd8c667e 100644 --- a/src/resources/3_0_1/profiles/imagingmanifest/query.js +++ b/src/resources/3_0_1/profiles/imagingmanifest/query.js @@ -1,55 +1,65 @@ // Schemas -const ImagingManifestSchema = require('../../schemas/imagingmanifest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImagingManifestSchema = require('../../schemas/imagingmanifest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImagingManifestArgs = require('../../parameters/imagingmanifest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImagingManifestArgs = require('../../parameters/imagingmanifest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImagingManifestArgs, +); // Resolvers const { - imagingmanifestResolver, - imagingmanifestListResolver, - imagingmanifestInstanceResolver, + getImagingManifest, + getImagingManifestList, + getImagingManifestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImagingManifest', action: 'read', - version: '3_0_1', }; /** * @name exports.ImagingManifestQuery - * @summary ImagingManifest Query. + * @summary ImagingManifest query. */ module.exports.ImagingManifestQuery = { - args: Object.assign({}, CommonArgs, ImagingManifestArgs), description: 'Query for a single ImagingManifest', - resolve: scopeInvariant(scopeOptions, imagingmanifestResolver), + resolve: scopeInvariant(scopeOptions, getImagingManifest), type: ImagingManifestSchema, + args: args, }; /** * @name exports.ImagingManifestListQuery - * @summary ImagingManifestList Query. + * @summary ImagingManifest query. */ module.exports.ImagingManifestListQuery = { - args: Object.assign({}, CommonArgs, ImagingManifestArgs), - description: 'Query for multiple ImagingManifests', - resolve: scopeInvariant(scopeOptions, imagingmanifestListResolver), + description: 'Query for a more than or just one ImagingManifest', + resolve: scopeInvariant(scopeOptions, getImagingManifestList), type: BundleSchema, + args: args, }; /** * @name exports.ImagingManifestInstanceQuery - * @summary ImagingManifestInstance Query. + * @summary ImagingManifest query. */ module.exports.ImagingManifestInstanceQuery = { - description: 'Get information about a single ImagingManifest', - resolve: scopeInvariant(scopeOptions, imagingmanifestInstanceResolver), + description: 'Access information about a single ImagingManifest', + resolve: scopeInvariant(scopeOptions, getImagingManifestInstance), type: ImagingManifestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/imagingmanifest/index.js b/src/resources/3_0_1/profiles/imagingmanifest/register.js similarity index 91% rename from src/resources/3_0_1/profiles/imagingmanifest/index.js rename to src/resources/3_0_1/profiles/imagingmanifest/register.js index 9aea9bec..f6b0a22d 100644 --- a/src/resources/3_0_1/profiles/imagingmanifest/index.js +++ b/src/resources/3_0_1/profiles/imagingmanifest/register.js @@ -1,15 +1,15 @@ +const { + ImagingManifestCreateMutation, + ImagingManifestUpdateMutation, + ImagingManifestRemoveMutation, +} = require('./mutation'); + const { ImagingManifestQuery, ImagingManifestListQuery, ImagingManifestInstanceQuery, } = require('./query'); -const { - ImagingManifestCreateMutation, - ImagingManifestUpdateMutation, - ImagingManifestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImagingManifestCreate: ImagingManifestCreateMutation, ImagingManifestUpdate: ImagingManifestUpdateMutation, - ImagingManifestDelete: ImagingManifestDeleteMutation, + ImagingManifestRemove: ImagingManifestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ImagingManifest', path: '/3_0_1/ImagingManifest/:id', query: ImagingManifestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/imagingmanifest/resolver.js b/src/resources/3_0_1/profiles/imagingmanifest/resolver.js index 0bcaf495..2d128953 100644 --- a/src/resources/3_0_1/profiles/imagingmanifest/resolver.js +++ b/src/resources/3_0_1/profiles/imagingmanifest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.imagingmanifestResolver + * @name exports.getImagingManifest * @static - * @summary ImagingManifest Resolver. + * @summary ImagingManifest resolver. */ -module.exports.imagingmanifestResolver = function imagingmanifestResolver( +module.exports.getImagingManifest = function getImagingManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingmanifestListResolver + * @name exports.getImagingManifestList * @static - * @summary ImagingManifest List Resolver. + * @summary ImagingManifest list resolver. */ -module.exports.imagingmanifestListResolver = function imagingmanifestListResolver( +module.exports.getImagingManifestList = function getImagingManifestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingmanifestInstanceResolver + * @name exports.getImagingManifestInstance * @static - * @summary ImagingManifest Instance Resolver. + * @summary ImagingManifest instance resolver. */ -module.exports.imagingmanifestInstanceResolver = function imagingmanifestInstanceResolver( +module.exports.getImagingManifestInstance = function getImagingManifestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingmanifestCreateResolver + * @name exports.createImagingManifest * @static - * @summary ImagingManifest Create Resolver. + * @summary Create ImagingManifest resolver. */ -module.exports.imagingmanifestCreateResolver = function imagingmanifestCreateResolver( +module.exports.createImagingManifest = function createImagingManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingmanifestUpdateResolver + * @name exports.updateImagingManifest * @static - * @summary ImagingManifest Update Resolver. + * @summary Update ImagingManifest resolver. */ -module.exports.imagingmanifestUpdateResolver = function imagingmanifestUpdateResolver( +module.exports.updateImagingManifest = function updateImagingManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingmanifestDeleteResolver + * @name exports.removeImagingManifest * @static - * @summary ImagingManifest Delete Resolver. + * @summary Remove ImagingManifest resolver. */ -module.exports.imagingmanifestDeleteResolver = function imagingmanifestDeleteResolver( +module.exports.removeImagingManifest = function removeImagingManifest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/imagingstudy/mutation.js b/src/resources/3_0_1/profiles/imagingstudy/mutation.js index e9b7a0d5..45377c8c 100644 --- a/src/resources/3_0_1/profiles/imagingstudy/mutation.js +++ b/src/resources/3_0_1/profiles/imagingstudy/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImagingStudySchema = require('../../schemas/imagingstudy.schema'); +const ImagingStudySchema = require('../../schemas/imagingstudy.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImagingStudyInput = require('../../inputs/imagingstudy.input'); +const ImagingStudyInput = require('../../inputs/imagingstudy.input.js'); -// Resolvers -const { - imagingstudyCreateResolver, - imagingstudyUpdateResolver, - imagingstudyDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImagingStudy, + updateImagingStudy, + removeImagingStudy, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImagingStudy', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ImagingStudy record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ImagingStudy record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ImagingStudyCreateMutation - * @summary ImagingStudyCreate Mutation. + * @summary ImagingStudyCreate mutation. */ module.exports.ImagingStudyCreateMutation = { - args: WriteArgs, - description: 'Create a ImagingStudy', - resolve: scopeInvariant(scopeOptions, imagingstudyCreateResolver), + description: 'Create a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, createImagingStudy), type: ImagingStudySchema, + args: WriteArgs, }; /** * @name exports.ImagingStudyUpdateMutation - * @summary ImagingStudyUpdate Mutation. + * @summary ImagingStudyUpdate mutation. */ module.exports.ImagingStudyUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ImagingStudys', - resolve: scopeInvariant(scopeOptions, imagingstudyUpdateResolver), + description: 'Update a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, updateImagingStudy), type: ImagingStudySchema, + args: WriteArgs, }; /** - * @name exports.ImagingStudyDeleteMutation - * @summary ImagingStudyDelete Mutation. + * @name exports.ImagingStudyRemoveMutation + * @summary ImagingStudyRemove mutation. */ -module.exports.ImagingStudyDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ImagingStudy', - resolve: scopeInvariant(scopeOptions, imagingstudyDeleteResolver), +module.exports.ImagingStudyRemoveMutation = { + description: 'Remove a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, removeImagingStudy), type: ImagingStudySchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/imagingstudy/query.js b/src/resources/3_0_1/profiles/imagingstudy/query.js index b6dbf452..dc1d6d1f 100644 --- a/src/resources/3_0_1/profiles/imagingstudy/query.js +++ b/src/resources/3_0_1/profiles/imagingstudy/query.js @@ -1,55 +1,65 @@ // Schemas -const ImagingStudySchema = require('../../schemas/imagingstudy.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImagingStudySchema = require('../../schemas/imagingstudy.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImagingStudyArgs = require('../../parameters/imagingstudy.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImagingStudyArgs = require('../../parameters/imagingstudy.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImagingStudyArgs, +); // Resolvers const { - imagingstudyResolver, - imagingstudyListResolver, - imagingstudyInstanceResolver, + getImagingStudy, + getImagingStudyList, + getImagingStudyInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImagingStudy', action: 'read', - version: '3_0_1', }; /** * @name exports.ImagingStudyQuery - * @summary ImagingStudy Query. + * @summary ImagingStudy query. */ module.exports.ImagingStudyQuery = { - args: Object.assign({}, CommonArgs, ImagingStudyArgs), description: 'Query for a single ImagingStudy', - resolve: scopeInvariant(scopeOptions, imagingstudyResolver), + resolve: scopeInvariant(scopeOptions, getImagingStudy), type: ImagingStudySchema, + args: args, }; /** * @name exports.ImagingStudyListQuery - * @summary ImagingStudyList Query. + * @summary ImagingStudy query. */ module.exports.ImagingStudyListQuery = { - args: Object.assign({}, CommonArgs, ImagingStudyArgs), - description: 'Query for multiple ImagingStudys', - resolve: scopeInvariant(scopeOptions, imagingstudyListResolver), + description: 'Query for a more than or just one ImagingStudy', + resolve: scopeInvariant(scopeOptions, getImagingStudyList), type: BundleSchema, + args: args, }; /** * @name exports.ImagingStudyInstanceQuery - * @summary ImagingStudyInstance Query. + * @summary ImagingStudy query. */ module.exports.ImagingStudyInstanceQuery = { - description: 'Get information about a single ImagingStudy', - resolve: scopeInvariant(scopeOptions, imagingstudyInstanceResolver), + description: 'Access information about a single ImagingStudy', + resolve: scopeInvariant(scopeOptions, getImagingStudyInstance), type: ImagingStudySchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/imagingstudy/index.js b/src/resources/3_0_1/profiles/imagingstudy/register.js similarity index 92% rename from src/resources/3_0_1/profiles/imagingstudy/index.js rename to src/resources/3_0_1/profiles/imagingstudy/register.js index d274d8fc..1aa14824 100644 --- a/src/resources/3_0_1/profiles/imagingstudy/index.js +++ b/src/resources/3_0_1/profiles/imagingstudy/register.js @@ -1,15 +1,15 @@ +const { + ImagingStudyCreateMutation, + ImagingStudyUpdateMutation, + ImagingStudyRemoveMutation, +} = require('./mutation'); + const { ImagingStudyQuery, ImagingStudyListQuery, ImagingStudyInstanceQuery, } = require('./query'); -const { - ImagingStudyCreateMutation, - ImagingStudyUpdateMutation, - ImagingStudyDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImagingStudyCreate: ImagingStudyCreateMutation, ImagingStudyUpdate: ImagingStudyUpdateMutation, - ImagingStudyDelete: ImagingStudyDeleteMutation, + ImagingStudyRemove: ImagingStudyRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ImagingStudy', path: '/3_0_1/ImagingStudy/:id', query: ImagingStudyInstanceQuery, diff --git a/src/resources/3_0_1/profiles/imagingstudy/resolver.js b/src/resources/3_0_1/profiles/imagingstudy/resolver.js index 1de13e9a..41e899e7 100644 --- a/src/resources/3_0_1/profiles/imagingstudy/resolver.js +++ b/src/resources/3_0_1/profiles/imagingstudy/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.imagingstudyResolver + * @name exports.getImagingStudy * @static - * @summary ImagingStudy Resolver. + * @summary ImagingStudy resolver. */ -module.exports.imagingstudyResolver = function imagingstudyResolver( +module.exports.getImagingStudy = function getImagingStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyListResolver + * @name exports.getImagingStudyList * @static - * @summary ImagingStudy List Resolver. + * @summary ImagingStudy list resolver. */ -module.exports.imagingstudyListResolver = function imagingstudyListResolver( +module.exports.getImagingStudyList = function getImagingStudyList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyInstanceResolver + * @name exports.getImagingStudyInstance * @static - * @summary ImagingStudy Instance Resolver. + * @summary ImagingStudy instance resolver. */ -module.exports.imagingstudyInstanceResolver = function imagingstudyInstanceResolver( +module.exports.getImagingStudyInstance = function getImagingStudyInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyCreateResolver + * @name exports.createImagingStudy * @static - * @summary ImagingStudy Create Resolver. + * @summary Create ImagingStudy resolver. */ -module.exports.imagingstudyCreateResolver = function imagingstudyCreateResolver( +module.exports.createImagingStudy = function createImagingStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyUpdateResolver + * @name exports.updateImagingStudy * @static - * @summary ImagingStudy Update Resolver. + * @summary Update ImagingStudy resolver. */ -module.exports.imagingstudyUpdateResolver = function imagingstudyUpdateResolver( +module.exports.updateImagingStudy = function updateImagingStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.imagingstudyDeleteResolver + * @name exports.removeImagingStudy * @static - * @summary ImagingStudy Delete Resolver. + * @summary Remove ImagingStudy resolver. */ -module.exports.imagingstudyDeleteResolver = function imagingstudyDeleteResolver( +module.exports.removeImagingStudy = function removeImagingStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/immunization/mutation.js b/src/resources/3_0_1/profiles/immunization/mutation.js index e1d213e6..82c6ddbd 100644 --- a/src/resources/3_0_1/profiles/immunization/mutation.js +++ b/src/resources/3_0_1/profiles/immunization/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImmunizationSchema = require('../../schemas/immunization.schema'); +const ImmunizationSchema = require('../../schemas/immunization.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImmunizationInput = require('../../inputs/immunization.input'); +const ImmunizationInput = require('../../inputs/immunization.input.js'); -// Resolvers -const { - immunizationCreateResolver, - immunizationUpdateResolver, - immunizationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImmunization, + updateImmunization, + removeImmunization, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Immunization', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Immunization record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Immunization record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ImmunizationCreateMutation - * @summary ImmunizationCreate Mutation. + * @summary ImmunizationCreate mutation. */ module.exports.ImmunizationCreateMutation = { - args: WriteArgs, - description: 'Create a Immunization', - resolve: scopeInvariant(scopeOptions, immunizationCreateResolver), + description: 'Create a Immunization record', + resolve: scopeInvariant(scopeOptions, createImmunization), type: ImmunizationSchema, + args: WriteArgs, }; /** * @name exports.ImmunizationUpdateMutation - * @summary ImmunizationUpdate Mutation. + * @summary ImmunizationUpdate mutation. */ module.exports.ImmunizationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Immunizations', - resolve: scopeInvariant(scopeOptions, immunizationUpdateResolver), + description: 'Update a Immunization record', + resolve: scopeInvariant(scopeOptions, updateImmunization), type: ImmunizationSchema, + args: WriteArgs, }; /** - * @name exports.ImmunizationDeleteMutation - * @summary ImmunizationDelete Mutation. + * @name exports.ImmunizationRemoveMutation + * @summary ImmunizationRemove mutation. */ -module.exports.ImmunizationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Immunization', - resolve: scopeInvariant(scopeOptions, immunizationDeleteResolver), +module.exports.ImmunizationRemoveMutation = { + description: 'Remove a Immunization record', + resolve: scopeInvariant(scopeOptions, removeImmunization), type: ImmunizationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/immunization/query.js b/src/resources/3_0_1/profiles/immunization/query.js index b287d18d..364aaea3 100644 --- a/src/resources/3_0_1/profiles/immunization/query.js +++ b/src/resources/3_0_1/profiles/immunization/query.js @@ -1,55 +1,65 @@ // Schemas -const ImmunizationSchema = require('../../schemas/immunization.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImmunizationSchema = require('../../schemas/immunization.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImmunizationArgs = require('../../parameters/immunization.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImmunizationArgs = require('../../parameters/immunization.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImmunizationArgs, +); // Resolvers const { - immunizationResolver, - immunizationListResolver, - immunizationInstanceResolver, + getImmunization, + getImmunizationList, + getImmunizationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Immunization', action: 'read', - version: '3_0_1', }; /** * @name exports.ImmunizationQuery - * @summary Immunization Query. + * @summary Immunization query. */ module.exports.ImmunizationQuery = { - args: Object.assign({}, CommonArgs, ImmunizationArgs), description: 'Query for a single Immunization', - resolve: scopeInvariant(scopeOptions, immunizationResolver), + resolve: scopeInvariant(scopeOptions, getImmunization), type: ImmunizationSchema, + args: args, }; /** * @name exports.ImmunizationListQuery - * @summary ImmunizationList Query. + * @summary Immunization query. */ module.exports.ImmunizationListQuery = { - args: Object.assign({}, CommonArgs, ImmunizationArgs), - description: 'Query for multiple Immunizations', - resolve: scopeInvariant(scopeOptions, immunizationListResolver), + description: 'Query for a more than or just one Immunization', + resolve: scopeInvariant(scopeOptions, getImmunizationList), type: BundleSchema, + args: args, }; /** * @name exports.ImmunizationInstanceQuery - * @summary ImmunizationInstance Query. + * @summary Immunization query. */ module.exports.ImmunizationInstanceQuery = { - description: 'Get information about a single Immunization', - resolve: scopeInvariant(scopeOptions, immunizationInstanceResolver), + description: 'Access information about a single Immunization', + resolve: scopeInvariant(scopeOptions, getImmunizationInstance), type: ImmunizationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/immunization/index.js b/src/resources/3_0_1/profiles/immunization/register.js similarity index 92% rename from src/resources/3_0_1/profiles/immunization/index.js rename to src/resources/3_0_1/profiles/immunization/register.js index 95084947..d3bf24a8 100644 --- a/src/resources/3_0_1/profiles/immunization/index.js +++ b/src/resources/3_0_1/profiles/immunization/register.js @@ -1,15 +1,15 @@ +const { + ImmunizationCreateMutation, + ImmunizationUpdateMutation, + ImmunizationRemoveMutation, +} = require('./mutation'); + const { ImmunizationQuery, ImmunizationListQuery, ImmunizationInstanceQuery, } = require('./query'); -const { - ImmunizationCreateMutation, - ImmunizationUpdateMutation, - ImmunizationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImmunizationCreate: ImmunizationCreateMutation, ImmunizationUpdate: ImmunizationUpdateMutation, - ImmunizationDelete: ImmunizationDeleteMutation, + ImmunizationRemove: ImmunizationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Immunization', path: '/3_0_1/Immunization/:id', query: ImmunizationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/immunization/resolver.js b/src/resources/3_0_1/profiles/immunization/resolver.js index 252403bf..bb7be79f 100644 --- a/src/resources/3_0_1/profiles/immunization/resolver.js +++ b/src/resources/3_0_1/profiles/immunization/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.immunizationResolver + * @name exports.getImmunization * @static - * @summary Immunization Resolver. + * @summary Immunization resolver. */ -module.exports.immunizationResolver = function immunizationResolver( +module.exports.getImmunization = function getImmunization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationListResolver + * @name exports.getImmunizationList * @static - * @summary Immunization List Resolver. + * @summary Immunization list resolver. */ -module.exports.immunizationListResolver = function immunizationListResolver( +module.exports.getImmunizationList = function getImmunizationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationInstanceResolver + * @name exports.getImmunizationInstance * @static - * @summary Immunization Instance Resolver. + * @summary Immunization instance resolver. */ -module.exports.immunizationInstanceResolver = function immunizationInstanceResolver( +module.exports.getImmunizationInstance = function getImmunizationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationCreateResolver + * @name exports.createImmunization * @static - * @summary Immunization Create Resolver. + * @summary Create Immunization resolver. */ -module.exports.immunizationCreateResolver = function immunizationCreateResolver( +module.exports.createImmunization = function createImmunization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationUpdateResolver + * @name exports.updateImmunization * @static - * @summary Immunization Update Resolver. + * @summary Update Immunization resolver. */ -module.exports.immunizationUpdateResolver = function immunizationUpdateResolver( +module.exports.updateImmunization = function updateImmunization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationDeleteResolver + * @name exports.removeImmunization * @static - * @summary Immunization Delete Resolver. + * @summary Remove Immunization resolver. */ -module.exports.immunizationDeleteResolver = function immunizationDeleteResolver( +module.exports.removeImmunization = function removeImmunization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/immunizationrecommendation/mutation.js b/src/resources/3_0_1/profiles/immunizationrecommendation/mutation.js index a77d2379..83c4dca3 100644 --- a/src/resources/3_0_1/profiles/immunizationrecommendation/mutation.js +++ b/src/resources/3_0_1/profiles/immunizationrecommendation/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema'); +const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImmunizationRecommendationInput = require('../../inputs/immunizationrecommendation.input'); +const ImmunizationRecommendationInput = require('../../inputs/immunizationrecommendation.input.js'); -// Resolvers -const { - immunizationrecommendationCreateResolver, - immunizationrecommendationUpdateResolver, - immunizationrecommendationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImmunizationRecommendation, + updateImmunizationRecommendation, + removeImmunizationRecommendation, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImmunizationRecommendation', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ImmunizationRecommendation record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ImmunizationRecommendation record for deletion.', }, @@ -48,42 +49,33 @@ let DeleteArgs = { /** * @name exports.ImmunizationRecommendationCreateMutation - * @summary ImmunizationRecommendationCreate Mutation. + * @summary ImmunizationRecommendationCreate mutation. */ module.exports.ImmunizationRecommendationCreateMutation = { - args: WriteArgs, - description: 'Create a ImmunizationRecommendation', - resolve: scopeInvariant( - scopeOptions, - immunizationrecommendationCreateResolver, - ), + description: 'Create a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, createImmunizationRecommendation), type: ImmunizationRecommendationSchema, + args: WriteArgs, }; /** * @name exports.ImmunizationRecommendationUpdateMutation - * @summary ImmunizationRecommendationUpdate Mutation. + * @summary ImmunizationRecommendationUpdate mutation. */ module.exports.ImmunizationRecommendationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ImmunizationRecommendations', - resolve: scopeInvariant( - scopeOptions, - immunizationrecommendationUpdateResolver, - ), + description: 'Update a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, updateImmunizationRecommendation), type: ImmunizationRecommendationSchema, + args: WriteArgs, }; /** - * @name exports.ImmunizationRecommendationDeleteMutation - * @summary ImmunizationRecommendationDelete Mutation. + * @name exports.ImmunizationRecommendationRemoveMutation + * @summary ImmunizationRecommendationRemove mutation. */ -module.exports.ImmunizationRecommendationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ImmunizationRecommendation', - resolve: scopeInvariant( - scopeOptions, - immunizationrecommendationDeleteResolver, - ), +module.exports.ImmunizationRecommendationRemoveMutation = { + description: 'Remove a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, removeImmunizationRecommendation), type: ImmunizationRecommendationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/immunizationrecommendation/query.js b/src/resources/3_0_1/profiles/immunizationrecommendation/query.js index 2f8e1464..c15612f5 100644 --- a/src/resources/3_0_1/profiles/immunizationrecommendation/query.js +++ b/src/resources/3_0_1/profiles/immunizationrecommendation/query.js @@ -1,58 +1,65 @@ // Schemas -const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImmunizationRecommendationArgs = require('../../parameters/immunizationrecommendation.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImmunizationRecommendationArgs = require('../../parameters/immunizationrecommendation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImmunizationRecommendationArgs, +); // Resolvers const { - immunizationrecommendationResolver, - immunizationrecommendationListResolver, - immunizationrecommendationInstanceResolver, + getImmunizationRecommendation, + getImmunizationRecommendationList, + getImmunizationRecommendationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImmunizationRecommendation', action: 'read', - version: '3_0_1', }; /** * @name exports.ImmunizationRecommendationQuery - * @summary ImmunizationRecommendation Query. + * @summary ImmunizationRecommendation query. */ module.exports.ImmunizationRecommendationQuery = { - args: Object.assign({}, CommonArgs, ImmunizationRecommendationArgs), description: 'Query for a single ImmunizationRecommendation', - resolve: scopeInvariant(scopeOptions, immunizationrecommendationResolver), + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendation), type: ImmunizationRecommendationSchema, + args: args, }; /** * @name exports.ImmunizationRecommendationListQuery - * @summary ImmunizationRecommendationList Query. + * @summary ImmunizationRecommendation query. */ module.exports.ImmunizationRecommendationListQuery = { - args: Object.assign({}, CommonArgs, ImmunizationRecommendationArgs), - description: 'Query for multiple ImmunizationRecommendations', - resolve: scopeInvariant(scopeOptions, immunizationrecommendationListResolver), + description: 'Query for a more than or just one ImmunizationRecommendation', + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendationList), type: BundleSchema, + args: args, }; /** * @name exports.ImmunizationRecommendationInstanceQuery - * @summary ImmunizationRecommendationInstance Query. + * @summary ImmunizationRecommendation query. */ module.exports.ImmunizationRecommendationInstanceQuery = { - description: 'Get information about a single ImmunizationRecommendation', - resolve: scopeInvariant( - scopeOptions, - immunizationrecommendationInstanceResolver, - ), + description: 'Access information about a single ImmunizationRecommendation', + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendationInstance), type: ImmunizationRecommendationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/immunizationrecommendation/index.js b/src/resources/3_0_1/profiles/immunizationrecommendation/register.js similarity index 90% rename from src/resources/3_0_1/profiles/immunizationrecommendation/index.js rename to src/resources/3_0_1/profiles/immunizationrecommendation/register.js index 4a0eee44..46c33991 100644 --- a/src/resources/3_0_1/profiles/immunizationrecommendation/index.js +++ b/src/resources/3_0_1/profiles/immunizationrecommendation/register.js @@ -1,15 +1,15 @@ +const { + ImmunizationRecommendationCreateMutation, + ImmunizationRecommendationUpdateMutation, + ImmunizationRecommendationRemoveMutation, +} = require('./mutation'); + const { ImmunizationRecommendationQuery, ImmunizationRecommendationListQuery, ImmunizationRecommendationInstanceQuery, } = require('./query'); -const { - ImmunizationRecommendationCreateMutation, - ImmunizationRecommendationUpdateMutation, - ImmunizationRecommendationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImmunizationRecommendationCreate: ImmunizationRecommendationCreateMutation, ImmunizationRecommendationUpdate: ImmunizationRecommendationUpdateMutation, - ImmunizationRecommendationDelete: ImmunizationRecommendationDeleteMutation, + ImmunizationRecommendationRemove: ImmunizationRecommendationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ImmunizationRecommendation', path: '/3_0_1/ImmunizationRecommendation/:id', query: ImmunizationRecommendationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/immunizationrecommendation/resolver.js b/src/resources/3_0_1/profiles/immunizationrecommendation/resolver.js index 3e7246a4..3ad925a4 100644 --- a/src/resources/3_0_1/profiles/immunizationrecommendation/resolver.js +++ b/src/resources/3_0_1/profiles/immunizationrecommendation/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.immunizationrecommendationResolver + * @name exports.getImmunizationRecommendation * @static - * @summary ImmunizationRecommendation Resolver. + * @summary ImmunizationRecommendation resolver. */ -module.exports.immunizationrecommendationResolver = function immunizationrecommendationResolver( +module.exports.getImmunizationRecommendation = function getImmunizationRecommendation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationListResolver + * @name exports.getImmunizationRecommendationList * @static - * @summary ImmunizationRecommendation List Resolver. + * @summary ImmunizationRecommendation list resolver. */ -module.exports.immunizationrecommendationListResolver = function immunizationrecommendationListResolver( +module.exports.getImmunizationRecommendationList = function getImmunizationRecommendationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationInstanceResolver + * @name exports.getImmunizationRecommendationInstance * @static - * @summary ImmunizationRecommendation Instance Resolver. + * @summary ImmunizationRecommendation instance resolver. */ -module.exports.immunizationrecommendationInstanceResolver = function immunizationrecommendationInstanceResolver( +module.exports.getImmunizationRecommendationInstance = function getImmunizationRecommendationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationCreateResolver + * @name exports.createImmunizationRecommendation * @static - * @summary ImmunizationRecommendation Create Resolver. + * @summary Create ImmunizationRecommendation resolver. */ -module.exports.immunizationrecommendationCreateResolver = function immunizationrecommendationCreateResolver( +module.exports.createImmunizationRecommendation = function createImmunizationRecommendation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationUpdateResolver + * @name exports.updateImmunizationRecommendation * @static - * @summary ImmunizationRecommendation Update Resolver. + * @summary Update ImmunizationRecommendation resolver. */ -module.exports.immunizationrecommendationUpdateResolver = function immunizationrecommendationUpdateResolver( +module.exports.updateImmunizationRecommendation = function updateImmunizationRecommendation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.immunizationrecommendationDeleteResolver + * @name exports.removeImmunizationRecommendation * @static - * @summary ImmunizationRecommendation Delete Resolver. + * @summary Remove ImmunizationRecommendation resolver. */ -module.exports.immunizationrecommendationDeleteResolver = function immunizationrecommendationDeleteResolver( +module.exports.removeImmunizationRecommendation = function removeImmunizationRecommendation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/implementationguide/mutation.js b/src/resources/3_0_1/profiles/implementationguide/mutation.js index 8d231ac3..8285d3d3 100644 --- a/src/resources/3_0_1/profiles/implementationguide/mutation.js +++ b/src/resources/3_0_1/profiles/implementationguide/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ImplementationGuideSchema = require('../../schemas/implementationguide.schema'); +const ImplementationGuideSchema = require('../../schemas/implementationguide.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ImplementationGuideInput = require('../../inputs/implementationguide.input'); +const ImplementationGuideInput = require('../../inputs/implementationguide.input.js'); -// Resolvers -const { - implementationguideCreateResolver, - implementationguideUpdateResolver, - implementationguideDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createImplementationGuide, + updateImplementationGuide, + removeImplementationGuide, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImplementationGuide', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ImplementationGuide record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ImplementationGuide record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ImplementationGuideCreateMutation - * @summary ImplementationGuideCreate Mutation. + * @summary ImplementationGuideCreate mutation. */ module.exports.ImplementationGuideCreateMutation = { - args: WriteArgs, - description: 'Create a ImplementationGuide', - resolve: scopeInvariant(scopeOptions, implementationguideCreateResolver), + description: 'Create a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, createImplementationGuide), type: ImplementationGuideSchema, + args: WriteArgs, }; /** * @name exports.ImplementationGuideUpdateMutation - * @summary ImplementationGuideUpdate Mutation. + * @summary ImplementationGuideUpdate mutation. */ module.exports.ImplementationGuideUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ImplementationGuides', - resolve: scopeInvariant(scopeOptions, implementationguideUpdateResolver), + description: 'Update a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, updateImplementationGuide), type: ImplementationGuideSchema, + args: WriteArgs, }; /** - * @name exports.ImplementationGuideDeleteMutation - * @summary ImplementationGuideDelete Mutation. + * @name exports.ImplementationGuideRemoveMutation + * @summary ImplementationGuideRemove mutation. */ -module.exports.ImplementationGuideDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ImplementationGuide', - resolve: scopeInvariant(scopeOptions, implementationguideDeleteResolver), +module.exports.ImplementationGuideRemoveMutation = { + description: 'Remove a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, removeImplementationGuide), type: ImplementationGuideSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/implementationguide/query.js b/src/resources/3_0_1/profiles/implementationguide/query.js index c476ef29..d72d8042 100644 --- a/src/resources/3_0_1/profiles/implementationguide/query.js +++ b/src/resources/3_0_1/profiles/implementationguide/query.js @@ -1,55 +1,65 @@ // Schemas -const ImplementationGuideSchema = require('../../schemas/implementationguide.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImplementationGuideSchema = require('../../schemas/implementationguide.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ImplementationGuideArgs = require('../../parameters/implementationguide.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ImplementationGuideArgs = require('../../parameters/implementationguide.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImplementationGuideArgs, +); // Resolvers const { - implementationguideResolver, - implementationguideListResolver, - implementationguideInstanceResolver, + getImplementationGuide, + getImplementationGuideList, + getImplementationGuideInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ImplementationGuide', action: 'read', - version: '3_0_1', }; /** * @name exports.ImplementationGuideQuery - * @summary ImplementationGuide Query. + * @summary ImplementationGuide query. */ module.exports.ImplementationGuideQuery = { - args: Object.assign({}, CommonArgs, ImplementationGuideArgs), description: 'Query for a single ImplementationGuide', - resolve: scopeInvariant(scopeOptions, implementationguideResolver), + resolve: scopeInvariant(scopeOptions, getImplementationGuide), type: ImplementationGuideSchema, + args: args, }; /** * @name exports.ImplementationGuideListQuery - * @summary ImplementationGuideList Query. + * @summary ImplementationGuide query. */ module.exports.ImplementationGuideListQuery = { - args: Object.assign({}, CommonArgs, ImplementationGuideArgs), - description: 'Query for multiple ImplementationGuides', - resolve: scopeInvariant(scopeOptions, implementationguideListResolver), + description: 'Query for a more than or just one ImplementationGuide', + resolve: scopeInvariant(scopeOptions, getImplementationGuideList), type: BundleSchema, + args: args, }; /** * @name exports.ImplementationGuideInstanceQuery - * @summary ImplementationGuideInstance Query. + * @summary ImplementationGuide query. */ module.exports.ImplementationGuideInstanceQuery = { - description: 'Get information about a single ImplementationGuide', - resolve: scopeInvariant(scopeOptions, implementationguideInstanceResolver), + description: 'Access information about a single ImplementationGuide', + resolve: scopeInvariant(scopeOptions, getImplementationGuideInstance), type: ImplementationGuideSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/implementationguide/index.js b/src/resources/3_0_1/profiles/implementationguide/register.js similarity index 91% rename from src/resources/3_0_1/profiles/implementationguide/index.js rename to src/resources/3_0_1/profiles/implementationguide/register.js index a0dacee0..f6f19b04 100644 --- a/src/resources/3_0_1/profiles/implementationguide/index.js +++ b/src/resources/3_0_1/profiles/implementationguide/register.js @@ -1,15 +1,15 @@ +const { + ImplementationGuideCreateMutation, + ImplementationGuideUpdateMutation, + ImplementationGuideRemoveMutation, +} = require('./mutation'); + const { ImplementationGuideQuery, ImplementationGuideListQuery, ImplementationGuideInstanceQuery, } = require('./query'); -const { - ImplementationGuideCreateMutation, - ImplementationGuideUpdateMutation, - ImplementationGuideDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ImplementationGuideCreate: ImplementationGuideCreateMutation, ImplementationGuideUpdate: ImplementationGuideUpdateMutation, - ImplementationGuideDelete: ImplementationGuideDeleteMutation, + ImplementationGuideRemove: ImplementationGuideRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ImplementationGuide', path: '/3_0_1/ImplementationGuide/:id', query: ImplementationGuideInstanceQuery, diff --git a/src/resources/3_0_1/profiles/implementationguide/resolver.js b/src/resources/3_0_1/profiles/implementationguide/resolver.js index 1bb32b2f..cec84931 100644 --- a/src/resources/3_0_1/profiles/implementationguide/resolver.js +++ b/src/resources/3_0_1/profiles/implementationguide/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.implementationguideResolver + * @name exports.getImplementationGuide * @static - * @summary ImplementationGuide Resolver. + * @summary ImplementationGuide resolver. */ -module.exports.implementationguideResolver = function implementationguideResolver( +module.exports.getImplementationGuide = function getImplementationGuide( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideListResolver + * @name exports.getImplementationGuideList * @static - * @summary ImplementationGuide List Resolver. + * @summary ImplementationGuide list resolver. */ -module.exports.implementationguideListResolver = function implementationguideListResolver( +module.exports.getImplementationGuideList = function getImplementationGuideList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideInstanceResolver + * @name exports.getImplementationGuideInstance * @static - * @summary ImplementationGuide Instance Resolver. + * @summary ImplementationGuide instance resolver. */ -module.exports.implementationguideInstanceResolver = function implementationguideInstanceResolver( +module.exports.getImplementationGuideInstance = function getImplementationGuideInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideCreateResolver + * @name exports.createImplementationGuide * @static - * @summary ImplementationGuide Create Resolver. + * @summary Create ImplementationGuide resolver. */ -module.exports.implementationguideCreateResolver = function implementationguideCreateResolver( +module.exports.createImplementationGuide = function createImplementationGuide( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideUpdateResolver + * @name exports.updateImplementationGuide * @static - * @summary ImplementationGuide Update Resolver. + * @summary Update ImplementationGuide resolver. */ -module.exports.implementationguideUpdateResolver = function implementationguideUpdateResolver( +module.exports.updateImplementationGuide = function updateImplementationGuide( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.implementationguideDeleteResolver + * @name exports.removeImplementationGuide * @static - * @summary ImplementationGuide Delete Resolver. + * @summary Remove ImplementationGuide resolver. */ -module.exports.implementationguideDeleteResolver = function implementationguideDeleteResolver( +module.exports.removeImplementationGuide = function removeImplementationGuide( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/library/mutation.js b/src/resources/3_0_1/profiles/library/mutation.js index 40832e0f..22da4caf 100644 --- a/src/resources/3_0_1/profiles/library/mutation.js +++ b/src/resources/3_0_1/profiles/library/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const LibrarySchema = require('../../schemas/library.schema'); +const LibrarySchema = require('../../schemas/library.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const LibraryInput = require('../../inputs/library.input'); +const LibraryInput = require('../../inputs/library.input.js'); -// Resolvers -const { - libraryCreateResolver, - libraryUpdateResolver, - libraryDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createLibrary, updateLibrary, removeLibrary } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Library', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Library record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Library record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.LibraryCreateMutation - * @summary LibraryCreate Mutation. + * @summary LibraryCreate mutation. */ module.exports.LibraryCreateMutation = { - args: WriteArgs, - description: 'Create a Library', - resolve: scopeInvariant(scopeOptions, libraryCreateResolver), + description: 'Create a Library record', + resolve: scopeInvariant(scopeOptions, createLibrary), type: LibrarySchema, + args: WriteArgs, }; /** * @name exports.LibraryUpdateMutation - * @summary LibraryUpdate Mutation. + * @summary LibraryUpdate mutation. */ module.exports.LibraryUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Librarys', - resolve: scopeInvariant(scopeOptions, libraryUpdateResolver), + description: 'Update a Library record', + resolve: scopeInvariant(scopeOptions, updateLibrary), type: LibrarySchema, + args: WriteArgs, }; /** - * @name exports.LibraryDeleteMutation - * @summary LibraryDelete Mutation. + * @name exports.LibraryRemoveMutation + * @summary LibraryRemove mutation. */ -module.exports.LibraryDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Library', - resolve: scopeInvariant(scopeOptions, libraryDeleteResolver), +module.exports.LibraryRemoveMutation = { + description: 'Remove a Library record', + resolve: scopeInvariant(scopeOptions, removeLibrary), type: LibrarySchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/library/query.js b/src/resources/3_0_1/profiles/library/query.js index 95cf7d16..e5d7797c 100644 --- a/src/resources/3_0_1/profiles/library/query.js +++ b/src/resources/3_0_1/profiles/library/query.js @@ -1,55 +1,60 @@ // Schemas -const LibrarySchema = require('../../schemas/library.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const LibrarySchema = require('../../schemas/library.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const LibraryArgs = require('../../parameters/library.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const LibraryArgs = require('../../parameters/library.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, LibraryArgs); // Resolvers const { - libraryResolver, - libraryListResolver, - libraryInstanceResolver, + getLibrary, + getLibraryList, + getLibraryInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Library', action: 'read', - version: '3_0_1', }; /** * @name exports.LibraryQuery - * @summary Library Query. + * @summary Library query. */ module.exports.LibraryQuery = { - args: Object.assign({}, CommonArgs, LibraryArgs), description: 'Query for a single Library', - resolve: scopeInvariant(scopeOptions, libraryResolver), + resolve: scopeInvariant(scopeOptions, getLibrary), type: LibrarySchema, + args: args, }; /** * @name exports.LibraryListQuery - * @summary LibraryList Query. + * @summary Library query. */ module.exports.LibraryListQuery = { - args: Object.assign({}, CommonArgs, LibraryArgs), - description: 'Query for multiple Librarys', - resolve: scopeInvariant(scopeOptions, libraryListResolver), + description: 'Query for a more than or just one Library', + resolve: scopeInvariant(scopeOptions, getLibraryList), type: BundleSchema, + args: args, }; /** * @name exports.LibraryInstanceQuery - * @summary LibraryInstance Query. + * @summary Library query. */ module.exports.LibraryInstanceQuery = { - description: 'Get information about a single Library', - resolve: scopeInvariant(scopeOptions, libraryInstanceResolver), + description: 'Access information about a single Library', + resolve: scopeInvariant(scopeOptions, getLibraryInstance), type: LibrarySchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/library/index.js b/src/resources/3_0_1/profiles/library/register.js similarity index 92% rename from src/resources/3_0_1/profiles/library/index.js rename to src/resources/3_0_1/profiles/library/register.js index bb6b2892..92aead56 100644 --- a/src/resources/3_0_1/profiles/library/index.js +++ b/src/resources/3_0_1/profiles/library/register.js @@ -1,15 +1,15 @@ +const { + LibraryCreateMutation, + LibraryUpdateMutation, + LibraryRemoveMutation, +} = require('./mutation'); + const { LibraryQuery, LibraryListQuery, LibraryInstanceQuery, } = require('./query'); -const { - LibraryCreateMutation, - LibraryUpdateMutation, - LibraryDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { LibraryCreate: LibraryCreateMutation, LibraryUpdate: LibraryUpdateMutation, - LibraryDelete: LibraryDeleteMutation, + LibraryRemove: LibraryRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Library', path: '/3_0_1/Library/:id', query: LibraryInstanceQuery, diff --git a/src/resources/3_0_1/profiles/library/resolver.js b/src/resources/3_0_1/profiles/library/resolver.js index 76d60a73..e52452f3 100644 --- a/src/resources/3_0_1/profiles/library/resolver.js +++ b/src/resources/3_0_1/profiles/library/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.libraryResolver + * @name exports.getLibrary * @static - * @summary Library Resolver. + * @summary Library resolver. */ -module.exports.libraryResolver = function libraryResolver( +module.exports.getLibrary = function getLibrary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.libraryListResolver + * @name exports.getLibraryList * @static - * @summary Library List Resolver. + * @summary Library list resolver. */ -module.exports.libraryListResolver = function libraryListResolver( +module.exports.getLibraryList = function getLibraryList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.libraryInstanceResolver + * @name exports.getLibraryInstance * @static - * @summary Library Instance Resolver. + * @summary Library instance resolver. */ -module.exports.libraryInstanceResolver = function libraryInstanceResolver( +module.exports.getLibraryInstance = function getLibraryInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.libraryCreateResolver + * @name exports.createLibrary * @static - * @summary Library Create Resolver. + * @summary Create Library resolver. */ -module.exports.libraryCreateResolver = function libraryCreateResolver( +module.exports.createLibrary = function createLibrary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.libraryUpdateResolver + * @name exports.updateLibrary * @static - * @summary Library Update Resolver. + * @summary Update Library resolver. */ -module.exports.libraryUpdateResolver = function libraryUpdateResolver( +module.exports.updateLibrary = function updateLibrary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.libraryDeleteResolver + * @name exports.removeLibrary * @static - * @summary Library Delete Resolver. + * @summary Remove Library resolver. */ -module.exports.libraryDeleteResolver = function libraryDeleteResolver( +module.exports.removeLibrary = function removeLibrary( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/linkage/mutation.js b/src/resources/3_0_1/profiles/linkage/mutation.js index 0d7e5c7e..82d43f08 100644 --- a/src/resources/3_0_1/profiles/linkage/mutation.js +++ b/src/resources/3_0_1/profiles/linkage/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const LinkageSchema = require('../../schemas/linkage.schema'); +const LinkageSchema = require('../../schemas/linkage.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const LinkageInput = require('../../inputs/linkage.input'); +const LinkageInput = require('../../inputs/linkage.input.js'); -// Resolvers -const { - linkageCreateResolver, - linkageUpdateResolver, - linkageDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createLinkage, updateLinkage, removeLinkage } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Linkage', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Linkage record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Linkage record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.LinkageCreateMutation - * @summary LinkageCreate Mutation. + * @summary LinkageCreate mutation. */ module.exports.LinkageCreateMutation = { - args: WriteArgs, - description: 'Create a Linkage', - resolve: scopeInvariant(scopeOptions, linkageCreateResolver), + description: 'Create a Linkage record', + resolve: scopeInvariant(scopeOptions, createLinkage), type: LinkageSchema, + args: WriteArgs, }; /** * @name exports.LinkageUpdateMutation - * @summary LinkageUpdate Mutation. + * @summary LinkageUpdate mutation. */ module.exports.LinkageUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Linkages', - resolve: scopeInvariant(scopeOptions, linkageUpdateResolver), + description: 'Update a Linkage record', + resolve: scopeInvariant(scopeOptions, updateLinkage), type: LinkageSchema, + args: WriteArgs, }; /** - * @name exports.LinkageDeleteMutation - * @summary LinkageDelete Mutation. + * @name exports.LinkageRemoveMutation + * @summary LinkageRemove mutation. */ -module.exports.LinkageDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Linkage', - resolve: scopeInvariant(scopeOptions, linkageDeleteResolver), +module.exports.LinkageRemoveMutation = { + description: 'Remove a Linkage record', + resolve: scopeInvariant(scopeOptions, removeLinkage), type: LinkageSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/linkage/query.js b/src/resources/3_0_1/profiles/linkage/query.js index 67b80235..2848a407 100644 --- a/src/resources/3_0_1/profiles/linkage/query.js +++ b/src/resources/3_0_1/profiles/linkage/query.js @@ -1,55 +1,60 @@ // Schemas -const LinkageSchema = require('../../schemas/linkage.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const LinkageSchema = require('../../schemas/linkage.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const LinkageArgs = require('../../parameters/linkage.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const LinkageArgs = require('../../parameters/linkage.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, LinkageArgs); // Resolvers const { - linkageResolver, - linkageListResolver, - linkageInstanceResolver, + getLinkage, + getLinkageList, + getLinkageInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Linkage', action: 'read', - version: '3_0_1', }; /** * @name exports.LinkageQuery - * @summary Linkage Query. + * @summary Linkage query. */ module.exports.LinkageQuery = { - args: Object.assign({}, CommonArgs, LinkageArgs), description: 'Query for a single Linkage', - resolve: scopeInvariant(scopeOptions, linkageResolver), + resolve: scopeInvariant(scopeOptions, getLinkage), type: LinkageSchema, + args: args, }; /** * @name exports.LinkageListQuery - * @summary LinkageList Query. + * @summary Linkage query. */ module.exports.LinkageListQuery = { - args: Object.assign({}, CommonArgs, LinkageArgs), - description: 'Query for multiple Linkages', - resolve: scopeInvariant(scopeOptions, linkageListResolver), + description: 'Query for a more than or just one Linkage', + resolve: scopeInvariant(scopeOptions, getLinkageList), type: BundleSchema, + args: args, }; /** * @name exports.LinkageInstanceQuery - * @summary LinkageInstance Query. + * @summary Linkage query. */ module.exports.LinkageInstanceQuery = { - description: 'Get information about a single Linkage', - resolve: scopeInvariant(scopeOptions, linkageInstanceResolver), + description: 'Access information about a single Linkage', + resolve: scopeInvariant(scopeOptions, getLinkageInstance), type: LinkageSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/linkage/index.js b/src/resources/3_0_1/profiles/linkage/register.js similarity index 92% rename from src/resources/3_0_1/profiles/linkage/index.js rename to src/resources/3_0_1/profiles/linkage/register.js index 97a507be..134cf8de 100644 --- a/src/resources/3_0_1/profiles/linkage/index.js +++ b/src/resources/3_0_1/profiles/linkage/register.js @@ -1,15 +1,15 @@ +const { + LinkageCreateMutation, + LinkageUpdateMutation, + LinkageRemoveMutation, +} = require('./mutation'); + const { LinkageQuery, LinkageListQuery, LinkageInstanceQuery, } = require('./query'); -const { - LinkageCreateMutation, - LinkageUpdateMutation, - LinkageDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { LinkageCreate: LinkageCreateMutation, LinkageUpdate: LinkageUpdateMutation, - LinkageDelete: LinkageDeleteMutation, + LinkageRemove: LinkageRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Linkage', path: '/3_0_1/Linkage/:id', query: LinkageInstanceQuery, diff --git a/src/resources/3_0_1/profiles/linkage/resolver.js b/src/resources/3_0_1/profiles/linkage/resolver.js index f1ca58a9..eaf9881d 100644 --- a/src/resources/3_0_1/profiles/linkage/resolver.js +++ b/src/resources/3_0_1/profiles/linkage/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.linkageResolver + * @name exports.getLinkage * @static - * @summary Linkage Resolver. + * @summary Linkage resolver. */ -module.exports.linkageResolver = function linkageResolver( +module.exports.getLinkage = function getLinkage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.linkageListResolver + * @name exports.getLinkageList * @static - * @summary Linkage List Resolver. + * @summary Linkage list resolver. */ -module.exports.linkageListResolver = function linkageListResolver( +module.exports.getLinkageList = function getLinkageList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.linkageInstanceResolver + * @name exports.getLinkageInstance * @static - * @summary Linkage Instance Resolver. + * @summary Linkage instance resolver. */ -module.exports.linkageInstanceResolver = function linkageInstanceResolver( +module.exports.getLinkageInstance = function getLinkageInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.linkageCreateResolver + * @name exports.createLinkage * @static - * @summary Linkage Create Resolver. + * @summary Create Linkage resolver. */ -module.exports.linkageCreateResolver = function linkageCreateResolver( +module.exports.createLinkage = function createLinkage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.linkageUpdateResolver + * @name exports.updateLinkage * @static - * @summary Linkage Update Resolver. + * @summary Update Linkage resolver. */ -module.exports.linkageUpdateResolver = function linkageUpdateResolver( +module.exports.updateLinkage = function updateLinkage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.linkageDeleteResolver + * @name exports.removeLinkage * @static - * @summary Linkage Delete Resolver. + * @summary Remove Linkage resolver. */ -module.exports.linkageDeleteResolver = function linkageDeleteResolver( +module.exports.removeLinkage = function removeLinkage( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/list/mutation.js b/src/resources/3_0_1/profiles/list/mutation.js index 3741ce02..e23ef148 100644 --- a/src/resources/3_0_1/profiles/list/mutation.js +++ b/src/resources/3_0_1/profiles/list/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ListSchema = require('../../schemas/list.schema'); +const ListSchema = require('../../schemas/list.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ListInput = require('../../inputs/list.input'); +const ListInput = require('../../inputs/list.input.js'); -// Resolvers -const { - listCreateResolver, - listUpdateResolver, - listDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createList, updateList, removeList } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'List', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a List record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a List record for deletion.', }, }; /** * @name exports.ListCreateMutation - * @summary ListCreate Mutation. + * @summary ListCreate mutation. */ module.exports.ListCreateMutation = { - args: WriteArgs, - description: 'Create a List', - resolve: scopeInvariant(scopeOptions, listCreateResolver), + description: 'Create a List record', + resolve: scopeInvariant(scopeOptions, createList), type: ListSchema, + args: WriteArgs, }; /** * @name exports.ListUpdateMutation - * @summary ListUpdate Mutation. + * @summary ListUpdate mutation. */ module.exports.ListUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Lists', - resolve: scopeInvariant(scopeOptions, listUpdateResolver), + description: 'Update a List record', + resolve: scopeInvariant(scopeOptions, updateList), type: ListSchema, + args: WriteArgs, }; /** - * @name exports.ListDeleteMutation - * @summary ListDelete Mutation. + * @name exports.ListRemoveMutation + * @summary ListRemove mutation. */ -module.exports.ListDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single List', - resolve: scopeInvariant(scopeOptions, listDeleteResolver), +module.exports.ListRemoveMutation = { + description: 'Remove a List record', + resolve: scopeInvariant(scopeOptions, removeList), type: ListSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/list/query.js b/src/resources/3_0_1/profiles/list/query.js index 236351fc..246af79c 100644 --- a/src/resources/3_0_1/profiles/list/query.js +++ b/src/resources/3_0_1/profiles/list/query.js @@ -1,55 +1,56 @@ // Schemas -const ListSchema = require('../../schemas/list.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ListSchema = require('../../schemas/list.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ListArgs = require('../../parameters/list.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ListArgs = require('../../parameters/list.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ListArgs); // Resolvers -const { - listResolver, - listListResolver, - listInstanceResolver, -} = require('./resolver'); +const { getList, getListList, getListInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'List', action: 'read', - version: '3_0_1', }; /** * @name exports.ListQuery - * @summary List Query. + * @summary List query. */ module.exports.ListQuery = { - args: Object.assign({}, CommonArgs, ListArgs), description: 'Query for a single List', - resolve: scopeInvariant(scopeOptions, listResolver), + resolve: scopeInvariant(scopeOptions, getList), type: ListSchema, + args: args, }; /** * @name exports.ListListQuery - * @summary ListList Query. + * @summary List query. */ module.exports.ListListQuery = { - args: Object.assign({}, CommonArgs, ListArgs), - description: 'Query for multiple Lists', - resolve: scopeInvariant(scopeOptions, listListResolver), + description: 'Query for a more than or just one List', + resolve: scopeInvariant(scopeOptions, getListList), type: BundleSchema, + args: args, }; /** * @name exports.ListInstanceQuery - * @summary ListInstance Query. + * @summary List query. */ module.exports.ListInstanceQuery = { - description: 'Get information about a single List', - resolve: scopeInvariant(scopeOptions, listInstanceResolver), + description: 'Access information about a single List', + resolve: scopeInvariant(scopeOptions, getListInstance), type: ListSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/list/index.js b/src/resources/3_0_1/profiles/list/register.js similarity index 93% rename from src/resources/3_0_1/profiles/list/index.js rename to src/resources/3_0_1/profiles/list/register.js index ee5e0db9..0c286661 100644 --- a/src/resources/3_0_1/profiles/list/index.js +++ b/src/resources/3_0_1/profiles/list/register.js @@ -1,11 +1,11 @@ -const { ListQuery, ListListQuery, ListInstanceQuery } = require('./query'); - const { ListCreateMutation, ListUpdateMutation, - ListDeleteMutation, + ListRemoveMutation, } = require('./mutation'); +const { ListQuery, ListListQuery, ListInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { ListCreate: ListCreateMutation, ListUpdate: ListUpdateMutation, - ListDelete: ListDeleteMutation, + ListRemove: ListRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'List', path: '/3_0_1/List/:id', query: ListInstanceQuery, diff --git a/src/resources/3_0_1/profiles/list/resolver.js b/src/resources/3_0_1/profiles/list/resolver.js index 60be80f5..5cc5c290 100644 --- a/src/resources/3_0_1/profiles/list/resolver.js +++ b/src/resources/3_0_1/profiles/list/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.listResolver + * @name exports.getList * @static - * @summary List Resolver. + * @summary List resolver. */ -module.exports.listResolver = function listResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getList = function getList(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listListResolver + * @name exports.getListList * @static - * @summary List List Resolver. + * @summary List list resolver. */ -module.exports.listListResolver = function listListResolver( +module.exports.getListList = function getListList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listInstanceResolver + * @name exports.getListInstance * @static - * @summary List Instance Resolver. + * @summary List instance resolver. */ -module.exports.listInstanceResolver = function listInstanceResolver( +module.exports.getListInstance = function getListInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listCreateResolver + * @name exports.createList * @static - * @summary List Create Resolver. + * @summary Create List resolver. */ -module.exports.listCreateResolver = function listCreateResolver( +module.exports.createList = function createList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listUpdateResolver + * @name exports.updateList * @static - * @summary List Update Resolver. + * @summary Update List resolver. */ -module.exports.listUpdateResolver = function listUpdateResolver( +module.exports.updateList = function updateList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.listDeleteResolver + * @name exports.removeList * @static - * @summary List Delete Resolver. + * @summary Remove List resolver. */ -module.exports.listDeleteResolver = function listDeleteResolver( +module.exports.removeList = function removeList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/location/mutation.js b/src/resources/3_0_1/profiles/location/mutation.js index a6e1bca7..7e495221 100644 --- a/src/resources/3_0_1/profiles/location/mutation.js +++ b/src/resources/3_0_1/profiles/location/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const LocationSchema = require('../../schemas/location.schema'); +const LocationSchema = require('../../schemas/location.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const LocationInput = require('../../inputs/location.input'); +const LocationInput = require('../../inputs/location.input.js'); -// Resolvers -const { - locationCreateResolver, - locationUpdateResolver, - locationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createLocation, + updateLocation, + removeLocation, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Location', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Location record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Location record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.LocationCreateMutation - * @summary LocationCreate Mutation. + * @summary LocationCreate mutation. */ module.exports.LocationCreateMutation = { - args: WriteArgs, - description: 'Create a Location', - resolve: scopeInvariant(scopeOptions, locationCreateResolver), + description: 'Create a Location record', + resolve: scopeInvariant(scopeOptions, createLocation), type: LocationSchema, + args: WriteArgs, }; /** * @name exports.LocationUpdateMutation - * @summary LocationUpdate Mutation. + * @summary LocationUpdate mutation. */ module.exports.LocationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Locations', - resolve: scopeInvariant(scopeOptions, locationUpdateResolver), + description: 'Update a Location record', + resolve: scopeInvariant(scopeOptions, updateLocation), type: LocationSchema, + args: WriteArgs, }; /** - * @name exports.LocationDeleteMutation - * @summary LocationDelete Mutation. + * @name exports.LocationRemoveMutation + * @summary LocationRemove mutation. */ -module.exports.LocationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Location', - resolve: scopeInvariant(scopeOptions, locationDeleteResolver), +module.exports.LocationRemoveMutation = { + description: 'Remove a Location record', + resolve: scopeInvariant(scopeOptions, removeLocation), type: LocationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/location/query.js b/src/resources/3_0_1/profiles/location/query.js index 9bad1dcd..ec0b38b5 100644 --- a/src/resources/3_0_1/profiles/location/query.js +++ b/src/resources/3_0_1/profiles/location/query.js @@ -1,55 +1,60 @@ // Schemas -const LocationSchema = require('../../schemas/location.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const LocationSchema = require('../../schemas/location.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const LocationArgs = require('../../parameters/location.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const LocationArgs = require('../../parameters/location.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, LocationArgs); // Resolvers const { - locationResolver, - locationListResolver, - locationInstanceResolver, + getLocation, + getLocationList, + getLocationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Location', action: 'read', - version: '3_0_1', }; /** * @name exports.LocationQuery - * @summary Location Query. + * @summary Location query. */ module.exports.LocationQuery = { - args: Object.assign({}, CommonArgs, LocationArgs), description: 'Query for a single Location', - resolve: scopeInvariant(scopeOptions, locationResolver), + resolve: scopeInvariant(scopeOptions, getLocation), type: LocationSchema, + args: args, }; /** * @name exports.LocationListQuery - * @summary LocationList Query. + * @summary Location query. */ module.exports.LocationListQuery = { - args: Object.assign({}, CommonArgs, LocationArgs), - description: 'Query for multiple Locations', - resolve: scopeInvariant(scopeOptions, locationListResolver), + description: 'Query for a more than or just one Location', + resolve: scopeInvariant(scopeOptions, getLocationList), type: BundleSchema, + args: args, }; /** * @name exports.LocationInstanceQuery - * @summary LocationInstance Query. + * @summary Location query. */ module.exports.LocationInstanceQuery = { - description: 'Get information about a single Location', - resolve: scopeInvariant(scopeOptions, locationInstanceResolver), + description: 'Access information about a single Location', + resolve: scopeInvariant(scopeOptions, getLocationInstance), type: LocationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/location/index.js b/src/resources/3_0_1/profiles/location/register.js similarity index 92% rename from src/resources/3_0_1/profiles/location/index.js rename to src/resources/3_0_1/profiles/location/register.js index 7e5ded69..06992139 100644 --- a/src/resources/3_0_1/profiles/location/index.js +++ b/src/resources/3_0_1/profiles/location/register.js @@ -1,15 +1,15 @@ +const { + LocationCreateMutation, + LocationUpdateMutation, + LocationRemoveMutation, +} = require('./mutation'); + const { LocationQuery, LocationListQuery, LocationInstanceQuery, } = require('./query'); -const { - LocationCreateMutation, - LocationUpdateMutation, - LocationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { LocationCreate: LocationCreateMutation, LocationUpdate: LocationUpdateMutation, - LocationDelete: LocationDeleteMutation, + LocationRemove: LocationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Location', path: '/3_0_1/Location/:id', query: LocationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/location/resolver.js b/src/resources/3_0_1/profiles/location/resolver.js index 6eca1bcd..3a4b4712 100644 --- a/src/resources/3_0_1/profiles/location/resolver.js +++ b/src/resources/3_0_1/profiles/location/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.locationResolver + * @name exports.getLocation * @static - * @summary Location Resolver. + * @summary Location resolver. */ -module.exports.locationResolver = function locationResolver( +module.exports.getLocation = function getLocation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationListResolver + * @name exports.getLocationList * @static - * @summary Location List Resolver. + * @summary Location list resolver. */ -module.exports.locationListResolver = function locationListResolver( +module.exports.getLocationList = function getLocationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationInstanceResolver + * @name exports.getLocationInstance * @static - * @summary Location Instance Resolver. + * @summary Location instance resolver. */ -module.exports.locationInstanceResolver = function locationInstanceResolver( +module.exports.getLocationInstance = function getLocationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationCreateResolver + * @name exports.createLocation * @static - * @summary Location Create Resolver. + * @summary Create Location resolver. */ -module.exports.locationCreateResolver = function locationCreateResolver( +module.exports.createLocation = function createLocation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationUpdateResolver + * @name exports.updateLocation * @static - * @summary Location Update Resolver. + * @summary Update Location resolver. */ -module.exports.locationUpdateResolver = function locationUpdateResolver( +module.exports.updateLocation = function updateLocation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.locationDeleteResolver + * @name exports.removeLocation * @static - * @summary Location Delete Resolver. + * @summary Remove Location resolver. */ -module.exports.locationDeleteResolver = function locationDeleteResolver( +module.exports.removeLocation = function removeLocation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/measure/mutation.js b/src/resources/3_0_1/profiles/measure/mutation.js index c6b4fe4b..9bdc18aa 100644 --- a/src/resources/3_0_1/profiles/measure/mutation.js +++ b/src/resources/3_0_1/profiles/measure/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MeasureSchema = require('../../schemas/measure.schema'); +const MeasureSchema = require('../../schemas/measure.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MeasureInput = require('../../inputs/measure.input'); +const MeasureInput = require('../../inputs/measure.input.js'); -// Resolvers -const { - measureCreateResolver, - measureUpdateResolver, - measureDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createMeasure, updateMeasure, removeMeasure } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Measure', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Measure record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Measure record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.MeasureCreateMutation - * @summary MeasureCreate Mutation. + * @summary MeasureCreate mutation. */ module.exports.MeasureCreateMutation = { - args: WriteArgs, - description: 'Create a Measure', - resolve: scopeInvariant(scopeOptions, measureCreateResolver), + description: 'Create a Measure record', + resolve: scopeInvariant(scopeOptions, createMeasure), type: MeasureSchema, + args: WriteArgs, }; /** * @name exports.MeasureUpdateMutation - * @summary MeasureUpdate Mutation. + * @summary MeasureUpdate mutation. */ module.exports.MeasureUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Measures', - resolve: scopeInvariant(scopeOptions, measureUpdateResolver), + description: 'Update a Measure record', + resolve: scopeInvariant(scopeOptions, updateMeasure), type: MeasureSchema, + args: WriteArgs, }; /** - * @name exports.MeasureDeleteMutation - * @summary MeasureDelete Mutation. + * @name exports.MeasureRemoveMutation + * @summary MeasureRemove mutation. */ -module.exports.MeasureDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Measure', - resolve: scopeInvariant(scopeOptions, measureDeleteResolver), +module.exports.MeasureRemoveMutation = { + description: 'Remove a Measure record', + resolve: scopeInvariant(scopeOptions, removeMeasure), type: MeasureSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/measure/query.js b/src/resources/3_0_1/profiles/measure/query.js index d73cef66..07079a77 100644 --- a/src/resources/3_0_1/profiles/measure/query.js +++ b/src/resources/3_0_1/profiles/measure/query.js @@ -1,55 +1,60 @@ // Schemas -const MeasureSchema = require('../../schemas/measure.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MeasureSchema = require('../../schemas/measure.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MeasureArgs = require('../../parameters/measure.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MeasureArgs = require('../../parameters/measure.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, MeasureArgs); // Resolvers const { - measureResolver, - measureListResolver, - measureInstanceResolver, + getMeasure, + getMeasureList, + getMeasureInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Measure', action: 'read', - version: '3_0_1', }; /** * @name exports.MeasureQuery - * @summary Measure Query. + * @summary Measure query. */ module.exports.MeasureQuery = { - args: Object.assign({}, CommonArgs, MeasureArgs), description: 'Query for a single Measure', - resolve: scopeInvariant(scopeOptions, measureResolver), + resolve: scopeInvariant(scopeOptions, getMeasure), type: MeasureSchema, + args: args, }; /** * @name exports.MeasureListQuery - * @summary MeasureList Query. + * @summary Measure query. */ module.exports.MeasureListQuery = { - args: Object.assign({}, CommonArgs, MeasureArgs), - description: 'Query for multiple Measures', - resolve: scopeInvariant(scopeOptions, measureListResolver), + description: 'Query for a more than or just one Measure', + resolve: scopeInvariant(scopeOptions, getMeasureList), type: BundleSchema, + args: args, }; /** * @name exports.MeasureInstanceQuery - * @summary MeasureInstance Query. + * @summary Measure query. */ module.exports.MeasureInstanceQuery = { - description: 'Get information about a single Measure', - resolve: scopeInvariant(scopeOptions, measureInstanceResolver), + description: 'Access information about a single Measure', + resolve: scopeInvariant(scopeOptions, getMeasureInstance), type: MeasureSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/measure/index.js b/src/resources/3_0_1/profiles/measure/register.js similarity index 92% rename from src/resources/3_0_1/profiles/measure/index.js rename to src/resources/3_0_1/profiles/measure/register.js index fa23041f..6a4ae290 100644 --- a/src/resources/3_0_1/profiles/measure/index.js +++ b/src/resources/3_0_1/profiles/measure/register.js @@ -1,15 +1,15 @@ +const { + MeasureCreateMutation, + MeasureUpdateMutation, + MeasureRemoveMutation, +} = require('./mutation'); + const { MeasureQuery, MeasureListQuery, MeasureInstanceQuery, } = require('./query'); -const { - MeasureCreateMutation, - MeasureUpdateMutation, - MeasureDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MeasureCreate: MeasureCreateMutation, MeasureUpdate: MeasureUpdateMutation, - MeasureDelete: MeasureDeleteMutation, + MeasureRemove: MeasureRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Measure', path: '/3_0_1/Measure/:id', query: MeasureInstanceQuery, diff --git a/src/resources/3_0_1/profiles/measure/resolver.js b/src/resources/3_0_1/profiles/measure/resolver.js index b514bca6..35c7ae43 100644 --- a/src/resources/3_0_1/profiles/measure/resolver.js +++ b/src/resources/3_0_1/profiles/measure/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.measureResolver + * @name exports.getMeasure * @static - * @summary Measure Resolver. + * @summary Measure resolver. */ -module.exports.measureResolver = function measureResolver( +module.exports.getMeasure = function getMeasure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measureListResolver + * @name exports.getMeasureList * @static - * @summary Measure List Resolver. + * @summary Measure list resolver. */ -module.exports.measureListResolver = function measureListResolver( +module.exports.getMeasureList = function getMeasureList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measureInstanceResolver + * @name exports.getMeasureInstance * @static - * @summary Measure Instance Resolver. + * @summary Measure instance resolver. */ -module.exports.measureInstanceResolver = function measureInstanceResolver( +module.exports.getMeasureInstance = function getMeasureInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measureCreateResolver + * @name exports.createMeasure * @static - * @summary Measure Create Resolver. + * @summary Create Measure resolver. */ -module.exports.measureCreateResolver = function measureCreateResolver( +module.exports.createMeasure = function createMeasure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measureUpdateResolver + * @name exports.updateMeasure * @static - * @summary Measure Update Resolver. + * @summary Update Measure resolver. */ -module.exports.measureUpdateResolver = function measureUpdateResolver( +module.exports.updateMeasure = function updateMeasure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measureDeleteResolver + * @name exports.removeMeasure * @static - * @summary Measure Delete Resolver. + * @summary Remove Measure resolver. */ -module.exports.measureDeleteResolver = function measureDeleteResolver( +module.exports.removeMeasure = function removeMeasure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/measurereport/mutation.js b/src/resources/3_0_1/profiles/measurereport/mutation.js index 5ef31a00..de5caa86 100644 --- a/src/resources/3_0_1/profiles/measurereport/mutation.js +++ b/src/resources/3_0_1/profiles/measurereport/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MeasureReportSchema = require('../../schemas/measurereport.schema'); +const MeasureReportSchema = require('../../schemas/measurereport.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MeasureReportInput = require('../../inputs/measurereport.input'); +const MeasureReportInput = require('../../inputs/measurereport.input.js'); -// Resolvers -const { - measurereportCreateResolver, - measurereportUpdateResolver, - measurereportDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMeasureReport, + updateMeasureReport, + removeMeasureReport, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MeasureReport', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MeasureReport record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MeasureReport record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MeasureReportCreateMutation - * @summary MeasureReportCreate Mutation. + * @summary MeasureReportCreate mutation. */ module.exports.MeasureReportCreateMutation = { - args: WriteArgs, - description: 'Create a MeasureReport', - resolve: scopeInvariant(scopeOptions, measurereportCreateResolver), + description: 'Create a MeasureReport record', + resolve: scopeInvariant(scopeOptions, createMeasureReport), type: MeasureReportSchema, + args: WriteArgs, }; /** * @name exports.MeasureReportUpdateMutation - * @summary MeasureReportUpdate Mutation. + * @summary MeasureReportUpdate mutation. */ module.exports.MeasureReportUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MeasureReports', - resolve: scopeInvariant(scopeOptions, measurereportUpdateResolver), + description: 'Update a MeasureReport record', + resolve: scopeInvariant(scopeOptions, updateMeasureReport), type: MeasureReportSchema, + args: WriteArgs, }; /** - * @name exports.MeasureReportDeleteMutation - * @summary MeasureReportDelete Mutation. + * @name exports.MeasureReportRemoveMutation + * @summary MeasureReportRemove mutation. */ -module.exports.MeasureReportDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MeasureReport', - resolve: scopeInvariant(scopeOptions, measurereportDeleteResolver), +module.exports.MeasureReportRemoveMutation = { + description: 'Remove a MeasureReport record', + resolve: scopeInvariant(scopeOptions, removeMeasureReport), type: MeasureReportSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/measurereport/query.js b/src/resources/3_0_1/profiles/measurereport/query.js index b69e3966..a8c5ad41 100644 --- a/src/resources/3_0_1/profiles/measurereport/query.js +++ b/src/resources/3_0_1/profiles/measurereport/query.js @@ -1,55 +1,65 @@ // Schemas -const MeasureReportSchema = require('../../schemas/measurereport.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MeasureReportSchema = require('../../schemas/measurereport.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MeasureReportArgs = require('../../parameters/measurereport.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MeasureReportArgs = require('../../parameters/measurereport.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MeasureReportArgs, +); // Resolvers const { - measurereportResolver, - measurereportListResolver, - measurereportInstanceResolver, + getMeasureReport, + getMeasureReportList, + getMeasureReportInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MeasureReport', action: 'read', - version: '3_0_1', }; /** * @name exports.MeasureReportQuery - * @summary MeasureReport Query. + * @summary MeasureReport query. */ module.exports.MeasureReportQuery = { - args: Object.assign({}, CommonArgs, MeasureReportArgs), description: 'Query for a single MeasureReport', - resolve: scopeInvariant(scopeOptions, measurereportResolver), + resolve: scopeInvariant(scopeOptions, getMeasureReport), type: MeasureReportSchema, + args: args, }; /** * @name exports.MeasureReportListQuery - * @summary MeasureReportList Query. + * @summary MeasureReport query. */ module.exports.MeasureReportListQuery = { - args: Object.assign({}, CommonArgs, MeasureReportArgs), - description: 'Query for multiple MeasureReports', - resolve: scopeInvariant(scopeOptions, measurereportListResolver), + description: 'Query for a more than or just one MeasureReport', + resolve: scopeInvariant(scopeOptions, getMeasureReportList), type: BundleSchema, + args: args, }; /** * @name exports.MeasureReportInstanceQuery - * @summary MeasureReportInstance Query. + * @summary MeasureReport query. */ module.exports.MeasureReportInstanceQuery = { - description: 'Get information about a single MeasureReport', - resolve: scopeInvariant(scopeOptions, measurereportInstanceResolver), + description: 'Access information about a single MeasureReport', + resolve: scopeInvariant(scopeOptions, getMeasureReportInstance), type: MeasureReportSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/measurereport/index.js b/src/resources/3_0_1/profiles/measurereport/register.js similarity index 92% rename from src/resources/3_0_1/profiles/measurereport/index.js rename to src/resources/3_0_1/profiles/measurereport/register.js index 9796cc76..51c23492 100644 --- a/src/resources/3_0_1/profiles/measurereport/index.js +++ b/src/resources/3_0_1/profiles/measurereport/register.js @@ -1,15 +1,15 @@ +const { + MeasureReportCreateMutation, + MeasureReportUpdateMutation, + MeasureReportRemoveMutation, +} = require('./mutation'); + const { MeasureReportQuery, MeasureReportListQuery, MeasureReportInstanceQuery, } = require('./query'); -const { - MeasureReportCreateMutation, - MeasureReportUpdateMutation, - MeasureReportDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MeasureReportCreate: MeasureReportCreateMutation, MeasureReportUpdate: MeasureReportUpdateMutation, - MeasureReportDelete: MeasureReportDeleteMutation, + MeasureReportRemove: MeasureReportRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MeasureReport', path: '/3_0_1/MeasureReport/:id', query: MeasureReportInstanceQuery, diff --git a/src/resources/3_0_1/profiles/measurereport/resolver.js b/src/resources/3_0_1/profiles/measurereport/resolver.js index 4f51bd82..d99a4337 100644 --- a/src/resources/3_0_1/profiles/measurereport/resolver.js +++ b/src/resources/3_0_1/profiles/measurereport/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.measurereportResolver + * @name exports.getMeasureReport * @static - * @summary MeasureReport Resolver. + * @summary MeasureReport resolver. */ -module.exports.measurereportResolver = function measurereportResolver( +module.exports.getMeasureReport = function getMeasureReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measurereportListResolver + * @name exports.getMeasureReportList * @static - * @summary MeasureReport List Resolver. + * @summary MeasureReport list resolver. */ -module.exports.measurereportListResolver = function measurereportListResolver( +module.exports.getMeasureReportList = function getMeasureReportList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measurereportInstanceResolver + * @name exports.getMeasureReportInstance * @static - * @summary MeasureReport Instance Resolver. + * @summary MeasureReport instance resolver. */ -module.exports.measurereportInstanceResolver = function measurereportInstanceResolver( +module.exports.getMeasureReportInstance = function getMeasureReportInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measurereportCreateResolver + * @name exports.createMeasureReport * @static - * @summary MeasureReport Create Resolver. + * @summary Create MeasureReport resolver. */ -module.exports.measurereportCreateResolver = function measurereportCreateResolver( +module.exports.createMeasureReport = function createMeasureReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measurereportUpdateResolver + * @name exports.updateMeasureReport * @static - * @summary MeasureReport Update Resolver. + * @summary Update MeasureReport resolver. */ -module.exports.measurereportUpdateResolver = function measurereportUpdateResolver( +module.exports.updateMeasureReport = function updateMeasureReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.measurereportDeleteResolver + * @name exports.removeMeasureReport * @static - * @summary MeasureReport Delete Resolver. + * @summary Remove MeasureReport resolver. */ -module.exports.measurereportDeleteResolver = function measurereportDeleteResolver( +module.exports.removeMeasureReport = function removeMeasureReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/media/mutation.js b/src/resources/3_0_1/profiles/media/mutation.js index 286c360c..7bf70ac2 100644 --- a/src/resources/3_0_1/profiles/media/mutation.js +++ b/src/resources/3_0_1/profiles/media/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MediaSchema = require('../../schemas/media.schema'); +const MediaSchema = require('../../schemas/media.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MediaInput = require('../../inputs/media.input'); +const MediaInput = require('../../inputs/media.input.js'); -// Resolvers -const { - mediaCreateResolver, - mediaUpdateResolver, - mediaDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createMedia, updateMedia, removeMedia } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Media', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Media record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Media record for deletion.', }, }; /** * @name exports.MediaCreateMutation - * @summary MediaCreate Mutation. + * @summary MediaCreate mutation. */ module.exports.MediaCreateMutation = { - args: WriteArgs, - description: 'Create a Media', - resolve: scopeInvariant(scopeOptions, mediaCreateResolver), + description: 'Create a Media record', + resolve: scopeInvariant(scopeOptions, createMedia), type: MediaSchema, + args: WriteArgs, }; /** * @name exports.MediaUpdateMutation - * @summary MediaUpdate Mutation. + * @summary MediaUpdate mutation. */ module.exports.MediaUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Medias', - resolve: scopeInvariant(scopeOptions, mediaUpdateResolver), + description: 'Update a Media record', + resolve: scopeInvariant(scopeOptions, updateMedia), type: MediaSchema, + args: WriteArgs, }; /** - * @name exports.MediaDeleteMutation - * @summary MediaDelete Mutation. + * @name exports.MediaRemoveMutation + * @summary MediaRemove mutation. */ -module.exports.MediaDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Media', - resolve: scopeInvariant(scopeOptions, mediaDeleteResolver), +module.exports.MediaRemoveMutation = { + description: 'Remove a Media record', + resolve: scopeInvariant(scopeOptions, removeMedia), type: MediaSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/media/query.js b/src/resources/3_0_1/profiles/media/query.js index bd405708..edae55c8 100644 --- a/src/resources/3_0_1/profiles/media/query.js +++ b/src/resources/3_0_1/profiles/media/query.js @@ -1,55 +1,56 @@ // Schemas -const MediaSchema = require('../../schemas/media.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MediaSchema = require('../../schemas/media.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MediaArgs = require('../../parameters/media.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MediaArgs = require('../../parameters/media.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, MediaArgs); // Resolvers -const { - mediaResolver, - mediaListResolver, - mediaInstanceResolver, -} = require('./resolver'); +const { getMedia, getMediaList, getMediaInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Media', action: 'read', - version: '3_0_1', }; /** * @name exports.MediaQuery - * @summary Media Query. + * @summary Media query. */ module.exports.MediaQuery = { - args: Object.assign({}, CommonArgs, MediaArgs), description: 'Query for a single Media', - resolve: scopeInvariant(scopeOptions, mediaResolver), + resolve: scopeInvariant(scopeOptions, getMedia), type: MediaSchema, + args: args, }; /** * @name exports.MediaListQuery - * @summary MediaList Query. + * @summary Media query. */ module.exports.MediaListQuery = { - args: Object.assign({}, CommonArgs, MediaArgs), - description: 'Query for multiple Medias', - resolve: scopeInvariant(scopeOptions, mediaListResolver), + description: 'Query for a more than or just one Media', + resolve: scopeInvariant(scopeOptions, getMediaList), type: BundleSchema, + args: args, }; /** * @name exports.MediaInstanceQuery - * @summary MediaInstance Query. + * @summary Media query. */ module.exports.MediaInstanceQuery = { - description: 'Get information about a single Media', - resolve: scopeInvariant(scopeOptions, mediaInstanceResolver), + description: 'Access information about a single Media', + resolve: scopeInvariant(scopeOptions, getMediaInstance), type: MediaSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/media/index.js b/src/resources/3_0_1/profiles/media/register.js similarity index 93% rename from src/resources/3_0_1/profiles/media/index.js rename to src/resources/3_0_1/profiles/media/register.js index 4ce00ac3..eb7eaa9a 100644 --- a/src/resources/3_0_1/profiles/media/index.js +++ b/src/resources/3_0_1/profiles/media/register.js @@ -1,11 +1,11 @@ -const { MediaQuery, MediaListQuery, MediaInstanceQuery } = require('./query'); - const { MediaCreateMutation, MediaUpdateMutation, - MediaDeleteMutation, + MediaRemoveMutation, } = require('./mutation'); +const { MediaQuery, MediaListQuery, MediaInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { MediaCreate: MediaCreateMutation, MediaUpdate: MediaUpdateMutation, - MediaDelete: MediaDeleteMutation, + MediaRemove: MediaRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Media', path: '/3_0_1/Media/:id', query: MediaInstanceQuery, diff --git a/src/resources/3_0_1/profiles/media/resolver.js b/src/resources/3_0_1/profiles/media/resolver.js index dde937c3..992e07ff 100644 --- a/src/resources/3_0_1/profiles/media/resolver.js +++ b/src/resources/3_0_1/profiles/media/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.mediaResolver + * @name exports.getMedia * @static - * @summary Media Resolver. + * @summary Media resolver. */ -module.exports.mediaResolver = function mediaResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getMedia = function getMedia(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaListResolver + * @name exports.getMediaList * @static - * @summary Media List Resolver. + * @summary Media list resolver. */ -module.exports.mediaListResolver = function mediaListResolver( +module.exports.getMediaList = function getMediaList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaInstanceResolver + * @name exports.getMediaInstance * @static - * @summary Media Instance Resolver. + * @summary Media instance resolver. */ -module.exports.mediaInstanceResolver = function mediaInstanceResolver( +module.exports.getMediaInstance = function getMediaInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaCreateResolver + * @name exports.createMedia * @static - * @summary Media Create Resolver. + * @summary Create Media resolver. */ -module.exports.mediaCreateResolver = function mediaCreateResolver( +module.exports.createMedia = function createMedia( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaUpdateResolver + * @name exports.updateMedia * @static - * @summary Media Update Resolver. + * @summary Update Media resolver. */ -module.exports.mediaUpdateResolver = function mediaUpdateResolver( +module.exports.updateMedia = function updateMedia( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.mediaDeleteResolver + * @name exports.removeMedia * @static - * @summary Media Delete Resolver. + * @summary Remove Media resolver. */ -module.exports.mediaDeleteResolver = function mediaDeleteResolver( +module.exports.removeMedia = function removeMedia( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/medication/mutation.js b/src/resources/3_0_1/profiles/medication/mutation.js index a995f90c..fba0a527 100644 --- a/src/resources/3_0_1/profiles/medication/mutation.js +++ b/src/resources/3_0_1/profiles/medication/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationSchema = require('../../schemas/medication.schema'); +const MedicationSchema = require('../../schemas/medication.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationInput = require('../../inputs/medication.input'); +const MedicationInput = require('../../inputs/medication.input.js'); -// Resolvers -const { - medicationCreateResolver, - medicationUpdateResolver, - medicationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedication, + updateMedication, + removeMedication, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Medication', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Medication record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Medication record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.MedicationCreateMutation - * @summary MedicationCreate Mutation. + * @summary MedicationCreate mutation. */ module.exports.MedicationCreateMutation = { - args: WriteArgs, - description: 'Create a Medication', - resolve: scopeInvariant(scopeOptions, medicationCreateResolver), + description: 'Create a Medication record', + resolve: scopeInvariant(scopeOptions, createMedication), type: MedicationSchema, + args: WriteArgs, }; /** * @name exports.MedicationUpdateMutation - * @summary MedicationUpdate Mutation. + * @summary MedicationUpdate mutation. */ module.exports.MedicationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Medications', - resolve: scopeInvariant(scopeOptions, medicationUpdateResolver), + description: 'Update a Medication record', + resolve: scopeInvariant(scopeOptions, updateMedication), type: MedicationSchema, + args: WriteArgs, }; /** - * @name exports.MedicationDeleteMutation - * @summary MedicationDelete Mutation. + * @name exports.MedicationRemoveMutation + * @summary MedicationRemove mutation. */ -module.exports.MedicationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Medication', - resolve: scopeInvariant(scopeOptions, medicationDeleteResolver), +module.exports.MedicationRemoveMutation = { + description: 'Remove a Medication record', + resolve: scopeInvariant(scopeOptions, removeMedication), type: MedicationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/medication/query.js b/src/resources/3_0_1/profiles/medication/query.js index 7f6f987a..ae1be0a1 100644 --- a/src/resources/3_0_1/profiles/medication/query.js +++ b/src/resources/3_0_1/profiles/medication/query.js @@ -1,55 +1,60 @@ // Schemas -const MedicationSchema = require('../../schemas/medication.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationSchema = require('../../schemas/medication.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationArgs = require('../../parameters/medication.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationArgs = require('../../parameters/medication.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, MedicationArgs); // Resolvers const { - medicationResolver, - medicationListResolver, - medicationInstanceResolver, + getMedication, + getMedicationList, + getMedicationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Medication', action: 'read', - version: '3_0_1', }; /** * @name exports.MedicationQuery - * @summary Medication Query. + * @summary Medication query. */ module.exports.MedicationQuery = { - args: Object.assign({}, CommonArgs, MedicationArgs), description: 'Query for a single Medication', - resolve: scopeInvariant(scopeOptions, medicationResolver), + resolve: scopeInvariant(scopeOptions, getMedication), type: MedicationSchema, + args: args, }; /** * @name exports.MedicationListQuery - * @summary MedicationList Query. + * @summary Medication query. */ module.exports.MedicationListQuery = { - args: Object.assign({}, CommonArgs, MedicationArgs), - description: 'Query for multiple Medications', - resolve: scopeInvariant(scopeOptions, medicationListResolver), + description: 'Query for a more than or just one Medication', + resolve: scopeInvariant(scopeOptions, getMedicationList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationInstanceQuery - * @summary MedicationInstance Query. + * @summary Medication query. */ module.exports.MedicationInstanceQuery = { - description: 'Get information about a single Medication', - resolve: scopeInvariant(scopeOptions, medicationInstanceResolver), + description: 'Access information about a single Medication', + resolve: scopeInvariant(scopeOptions, getMedicationInstance), type: MedicationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/medication/index.js b/src/resources/3_0_1/profiles/medication/register.js similarity index 92% rename from src/resources/3_0_1/profiles/medication/index.js rename to src/resources/3_0_1/profiles/medication/register.js index 80461988..2b90062d 100644 --- a/src/resources/3_0_1/profiles/medication/index.js +++ b/src/resources/3_0_1/profiles/medication/register.js @@ -1,15 +1,15 @@ +const { + MedicationCreateMutation, + MedicationUpdateMutation, + MedicationRemoveMutation, +} = require('./mutation'); + const { MedicationQuery, MedicationListQuery, MedicationInstanceQuery, } = require('./query'); -const { - MedicationCreateMutation, - MedicationUpdateMutation, - MedicationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationCreate: MedicationCreateMutation, MedicationUpdate: MedicationUpdateMutation, - MedicationDelete: MedicationDeleteMutation, + MedicationRemove: MedicationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Medication', path: '/3_0_1/Medication/:id', query: MedicationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/medication/resolver.js b/src/resources/3_0_1/profiles/medication/resolver.js index 2eafb7d7..1fd3cb4a 100644 --- a/src/resources/3_0_1/profiles/medication/resolver.js +++ b/src/resources/3_0_1/profiles/medication/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationResolver + * @name exports.getMedication * @static - * @summary Medication Resolver. + * @summary Medication resolver. */ -module.exports.medicationResolver = function medicationResolver( +module.exports.getMedication = function getMedication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationListResolver + * @name exports.getMedicationList * @static - * @summary Medication List Resolver. + * @summary Medication list resolver. */ -module.exports.medicationListResolver = function medicationListResolver( +module.exports.getMedicationList = function getMedicationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationInstanceResolver + * @name exports.getMedicationInstance * @static - * @summary Medication Instance Resolver. + * @summary Medication instance resolver. */ -module.exports.medicationInstanceResolver = function medicationInstanceResolver( +module.exports.getMedicationInstance = function getMedicationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationCreateResolver + * @name exports.createMedication * @static - * @summary Medication Create Resolver. + * @summary Create Medication resolver. */ -module.exports.medicationCreateResolver = function medicationCreateResolver( +module.exports.createMedication = function createMedication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationUpdateResolver + * @name exports.updateMedication * @static - * @summary Medication Update Resolver. + * @summary Update Medication resolver. */ -module.exports.medicationUpdateResolver = function medicationUpdateResolver( +module.exports.updateMedication = function updateMedication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationDeleteResolver + * @name exports.removeMedication * @static - * @summary Medication Delete Resolver. + * @summary Remove Medication resolver. */ -module.exports.medicationDeleteResolver = function medicationDeleteResolver( +module.exports.removeMedication = function removeMedication( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/medicationadministration/mutation.js b/src/resources/3_0_1/profiles/medicationadministration/mutation.js index 5466416f..23cefb92 100644 --- a/src/resources/3_0_1/profiles/medicationadministration/mutation.js +++ b/src/resources/3_0_1/profiles/medicationadministration/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema'); +const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationAdministrationInput = require('../../inputs/medicationadministration.input'); +const MedicationAdministrationInput = require('../../inputs/medicationadministration.input.js'); -// Resolvers -const { - medicationadministrationCreateResolver, - medicationadministrationUpdateResolver, - medicationadministrationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedicationAdministration, + updateMedicationAdministration, + removeMedicationAdministration, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationAdministration', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MedicationAdministration record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MedicationAdministration record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MedicationAdministrationCreateMutation - * @summary MedicationAdministrationCreate Mutation. + * @summary MedicationAdministrationCreate mutation. */ module.exports.MedicationAdministrationCreateMutation = { - args: WriteArgs, - description: 'Create a MedicationAdministration', - resolve: scopeInvariant(scopeOptions, medicationadministrationCreateResolver), + description: 'Create a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, createMedicationAdministration), type: MedicationAdministrationSchema, + args: WriteArgs, }; /** * @name exports.MedicationAdministrationUpdateMutation - * @summary MedicationAdministrationUpdate Mutation. + * @summary MedicationAdministrationUpdate mutation. */ module.exports.MedicationAdministrationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MedicationAdministrations', - resolve: scopeInvariant(scopeOptions, medicationadministrationUpdateResolver), + description: 'Update a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, updateMedicationAdministration), type: MedicationAdministrationSchema, + args: WriteArgs, }; /** - * @name exports.MedicationAdministrationDeleteMutation - * @summary MedicationAdministrationDelete Mutation. + * @name exports.MedicationAdministrationRemoveMutation + * @summary MedicationAdministrationRemove mutation. */ -module.exports.MedicationAdministrationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MedicationAdministration', - resolve: scopeInvariant(scopeOptions, medicationadministrationDeleteResolver), +module.exports.MedicationAdministrationRemoveMutation = { + description: 'Remove a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, removeMedicationAdministration), type: MedicationAdministrationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/medicationadministration/query.js b/src/resources/3_0_1/profiles/medicationadministration/query.js index 546a3492..f7bbc6ed 100644 --- a/src/resources/3_0_1/profiles/medicationadministration/query.js +++ b/src/resources/3_0_1/profiles/medicationadministration/query.js @@ -1,58 +1,65 @@ // Schemas -const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationAdministrationArgs = require('../../parameters/medicationadministration.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationAdministrationArgs = require('../../parameters/medicationadministration.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationAdministrationArgs, +); // Resolvers const { - medicationadministrationResolver, - medicationadministrationListResolver, - medicationadministrationInstanceResolver, + getMedicationAdministration, + getMedicationAdministrationList, + getMedicationAdministrationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationAdministration', action: 'read', - version: '3_0_1', }; /** * @name exports.MedicationAdministrationQuery - * @summary MedicationAdministration Query. + * @summary MedicationAdministration query. */ module.exports.MedicationAdministrationQuery = { - args: Object.assign({}, CommonArgs, MedicationAdministrationArgs), description: 'Query for a single MedicationAdministration', - resolve: scopeInvariant(scopeOptions, medicationadministrationResolver), + resolve: scopeInvariant(scopeOptions, getMedicationAdministration), type: MedicationAdministrationSchema, + args: args, }; /** * @name exports.MedicationAdministrationListQuery - * @summary MedicationAdministrationList Query. + * @summary MedicationAdministration query. */ module.exports.MedicationAdministrationListQuery = { - args: Object.assign({}, CommonArgs, MedicationAdministrationArgs), - description: 'Query for multiple MedicationAdministrations', - resolve: scopeInvariant(scopeOptions, medicationadministrationListResolver), + description: 'Query for a more than or just one MedicationAdministration', + resolve: scopeInvariant(scopeOptions, getMedicationAdministrationList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationAdministrationInstanceQuery - * @summary MedicationAdministrationInstance Query. + * @summary MedicationAdministration query. */ module.exports.MedicationAdministrationInstanceQuery = { - description: 'Get information about a single MedicationAdministration', - resolve: scopeInvariant( - scopeOptions, - medicationadministrationInstanceResolver, - ), + description: 'Access information about a single MedicationAdministration', + resolve: scopeInvariant(scopeOptions, getMedicationAdministrationInstance), type: MedicationAdministrationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/medicationadministration/index.js b/src/resources/3_0_1/profiles/medicationadministration/register.js similarity index 91% rename from src/resources/3_0_1/profiles/medicationadministration/index.js rename to src/resources/3_0_1/profiles/medicationadministration/register.js index a39ae887..5669bb0b 100644 --- a/src/resources/3_0_1/profiles/medicationadministration/index.js +++ b/src/resources/3_0_1/profiles/medicationadministration/register.js @@ -1,15 +1,15 @@ +const { + MedicationAdministrationCreateMutation, + MedicationAdministrationUpdateMutation, + MedicationAdministrationRemoveMutation, +} = require('./mutation'); + const { MedicationAdministrationQuery, MedicationAdministrationListQuery, MedicationAdministrationInstanceQuery, } = require('./query'); -const { - MedicationAdministrationCreateMutation, - MedicationAdministrationUpdateMutation, - MedicationAdministrationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationAdministrationCreate: MedicationAdministrationCreateMutation, MedicationAdministrationUpdate: MedicationAdministrationUpdateMutation, - MedicationAdministrationDelete: MedicationAdministrationDeleteMutation, + MedicationAdministrationRemove: MedicationAdministrationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MedicationAdministration', path: '/3_0_1/MedicationAdministration/:id', query: MedicationAdministrationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/medicationadministration/resolver.js b/src/resources/3_0_1/profiles/medicationadministration/resolver.js index 579518c6..db9d52cb 100644 --- a/src/resources/3_0_1/profiles/medicationadministration/resolver.js +++ b/src/resources/3_0_1/profiles/medicationadministration/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationadministrationResolver + * @name exports.getMedicationAdministration * @static - * @summary MedicationAdministration Resolver. + * @summary MedicationAdministration resolver. */ -module.exports.medicationadministrationResolver = function medicationadministrationResolver( +module.exports.getMedicationAdministration = function getMedicationAdministration( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationListResolver + * @name exports.getMedicationAdministrationList * @static - * @summary MedicationAdministration List Resolver. + * @summary MedicationAdministration list resolver. */ -module.exports.medicationadministrationListResolver = function medicationadministrationListResolver( +module.exports.getMedicationAdministrationList = function getMedicationAdministrationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationInstanceResolver + * @name exports.getMedicationAdministrationInstance * @static - * @summary MedicationAdministration Instance Resolver. + * @summary MedicationAdministration instance resolver. */ -module.exports.medicationadministrationInstanceResolver = function medicationadministrationInstanceResolver( +module.exports.getMedicationAdministrationInstance = function getMedicationAdministrationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationCreateResolver + * @name exports.createMedicationAdministration * @static - * @summary MedicationAdministration Create Resolver. + * @summary Create MedicationAdministration resolver. */ -module.exports.medicationadministrationCreateResolver = function medicationadministrationCreateResolver( +module.exports.createMedicationAdministration = function createMedicationAdministration( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationUpdateResolver + * @name exports.updateMedicationAdministration * @static - * @summary MedicationAdministration Update Resolver. + * @summary Update MedicationAdministration resolver. */ -module.exports.medicationadministrationUpdateResolver = function medicationadministrationUpdateResolver( +module.exports.updateMedicationAdministration = function updateMedicationAdministration( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationadministrationDeleteResolver + * @name exports.removeMedicationAdministration * @static - * @summary MedicationAdministration Delete Resolver. + * @summary Remove MedicationAdministration resolver. */ -module.exports.medicationadministrationDeleteResolver = function medicationadministrationDeleteResolver( +module.exports.removeMedicationAdministration = function removeMedicationAdministration( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/medicationdispense/mutation.js b/src/resources/3_0_1/profiles/medicationdispense/mutation.js index 46eb1f68..4d5d21ba 100644 --- a/src/resources/3_0_1/profiles/medicationdispense/mutation.js +++ b/src/resources/3_0_1/profiles/medicationdispense/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema'); +const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationDispenseInput = require('../../inputs/medicationdispense.input'); +const MedicationDispenseInput = require('../../inputs/medicationdispense.input.js'); -// Resolvers -const { - medicationdispenseCreateResolver, - medicationdispenseUpdateResolver, - medicationdispenseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedicationDispense, + updateMedicationDispense, + removeMedicationDispense, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationDispense', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MedicationDispense record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MedicationDispense record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MedicationDispenseCreateMutation - * @summary MedicationDispenseCreate Mutation. + * @summary MedicationDispenseCreate mutation. */ module.exports.MedicationDispenseCreateMutation = { - args: WriteArgs, - description: 'Create a MedicationDispense', - resolve: scopeInvariant(scopeOptions, medicationdispenseCreateResolver), + description: 'Create a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, createMedicationDispense), type: MedicationDispenseSchema, + args: WriteArgs, }; /** * @name exports.MedicationDispenseUpdateMutation - * @summary MedicationDispenseUpdate Mutation. + * @summary MedicationDispenseUpdate mutation. */ module.exports.MedicationDispenseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MedicationDispenses', - resolve: scopeInvariant(scopeOptions, medicationdispenseUpdateResolver), + description: 'Update a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, updateMedicationDispense), type: MedicationDispenseSchema, + args: WriteArgs, }; /** - * @name exports.MedicationDispenseDeleteMutation - * @summary MedicationDispenseDelete Mutation. + * @name exports.MedicationDispenseRemoveMutation + * @summary MedicationDispenseRemove mutation. */ -module.exports.MedicationDispenseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MedicationDispense', - resolve: scopeInvariant(scopeOptions, medicationdispenseDeleteResolver), +module.exports.MedicationDispenseRemoveMutation = { + description: 'Remove a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, removeMedicationDispense), type: MedicationDispenseSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/medicationdispense/query.js b/src/resources/3_0_1/profiles/medicationdispense/query.js index d3087a70..3dc59b93 100644 --- a/src/resources/3_0_1/profiles/medicationdispense/query.js +++ b/src/resources/3_0_1/profiles/medicationdispense/query.js @@ -1,55 +1,65 @@ // Schemas -const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationDispenseArgs = require('../../parameters/medicationdispense.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationDispenseArgs = require('../../parameters/medicationdispense.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationDispenseArgs, +); // Resolvers const { - medicationdispenseResolver, - medicationdispenseListResolver, - medicationdispenseInstanceResolver, + getMedicationDispense, + getMedicationDispenseList, + getMedicationDispenseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationDispense', action: 'read', - version: '3_0_1', }; /** * @name exports.MedicationDispenseQuery - * @summary MedicationDispense Query. + * @summary MedicationDispense query. */ module.exports.MedicationDispenseQuery = { - args: Object.assign({}, CommonArgs, MedicationDispenseArgs), description: 'Query for a single MedicationDispense', - resolve: scopeInvariant(scopeOptions, medicationdispenseResolver), + resolve: scopeInvariant(scopeOptions, getMedicationDispense), type: MedicationDispenseSchema, + args: args, }; /** * @name exports.MedicationDispenseListQuery - * @summary MedicationDispenseList Query. + * @summary MedicationDispense query. */ module.exports.MedicationDispenseListQuery = { - args: Object.assign({}, CommonArgs, MedicationDispenseArgs), - description: 'Query for multiple MedicationDispenses', - resolve: scopeInvariant(scopeOptions, medicationdispenseListResolver), + description: 'Query for a more than or just one MedicationDispense', + resolve: scopeInvariant(scopeOptions, getMedicationDispenseList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationDispenseInstanceQuery - * @summary MedicationDispenseInstance Query. + * @summary MedicationDispense query. */ module.exports.MedicationDispenseInstanceQuery = { - description: 'Get information about a single MedicationDispense', - resolve: scopeInvariant(scopeOptions, medicationdispenseInstanceResolver), + description: 'Access information about a single MedicationDispense', + resolve: scopeInvariant(scopeOptions, getMedicationDispenseInstance), type: MedicationDispenseSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/medicationdispense/index.js b/src/resources/3_0_1/profiles/medicationdispense/register.js similarity index 91% rename from src/resources/3_0_1/profiles/medicationdispense/index.js rename to src/resources/3_0_1/profiles/medicationdispense/register.js index 88eb0589..14efcb19 100644 --- a/src/resources/3_0_1/profiles/medicationdispense/index.js +++ b/src/resources/3_0_1/profiles/medicationdispense/register.js @@ -1,15 +1,15 @@ +const { + MedicationDispenseCreateMutation, + MedicationDispenseUpdateMutation, + MedicationDispenseRemoveMutation, +} = require('./mutation'); + const { MedicationDispenseQuery, MedicationDispenseListQuery, MedicationDispenseInstanceQuery, } = require('./query'); -const { - MedicationDispenseCreateMutation, - MedicationDispenseUpdateMutation, - MedicationDispenseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationDispenseCreate: MedicationDispenseCreateMutation, MedicationDispenseUpdate: MedicationDispenseUpdateMutation, - MedicationDispenseDelete: MedicationDispenseDeleteMutation, + MedicationDispenseRemove: MedicationDispenseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MedicationDispense', path: '/3_0_1/MedicationDispense/:id', query: MedicationDispenseInstanceQuery, diff --git a/src/resources/3_0_1/profiles/medicationdispense/resolver.js b/src/resources/3_0_1/profiles/medicationdispense/resolver.js index c613ef01..8e02c449 100644 --- a/src/resources/3_0_1/profiles/medicationdispense/resolver.js +++ b/src/resources/3_0_1/profiles/medicationdispense/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationdispenseResolver + * @name exports.getMedicationDispense * @static - * @summary MedicationDispense Resolver. + * @summary MedicationDispense resolver. */ -module.exports.medicationdispenseResolver = function medicationdispenseResolver( +module.exports.getMedicationDispense = function getMedicationDispense( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseListResolver + * @name exports.getMedicationDispenseList * @static - * @summary MedicationDispense List Resolver. + * @summary MedicationDispense list resolver. */ -module.exports.medicationdispenseListResolver = function medicationdispenseListResolver( +module.exports.getMedicationDispenseList = function getMedicationDispenseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseInstanceResolver + * @name exports.getMedicationDispenseInstance * @static - * @summary MedicationDispense Instance Resolver. + * @summary MedicationDispense instance resolver. */ -module.exports.medicationdispenseInstanceResolver = function medicationdispenseInstanceResolver( +module.exports.getMedicationDispenseInstance = function getMedicationDispenseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseCreateResolver + * @name exports.createMedicationDispense * @static - * @summary MedicationDispense Create Resolver. + * @summary Create MedicationDispense resolver. */ -module.exports.medicationdispenseCreateResolver = function medicationdispenseCreateResolver( +module.exports.createMedicationDispense = function createMedicationDispense( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseUpdateResolver + * @name exports.updateMedicationDispense * @static - * @summary MedicationDispense Update Resolver. + * @summary Update MedicationDispense resolver. */ -module.exports.medicationdispenseUpdateResolver = function medicationdispenseUpdateResolver( +module.exports.updateMedicationDispense = function updateMedicationDispense( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationdispenseDeleteResolver + * @name exports.removeMedicationDispense * @static - * @summary MedicationDispense Delete Resolver. + * @summary Remove MedicationDispense resolver. */ -module.exports.medicationdispenseDeleteResolver = function medicationdispenseDeleteResolver( +module.exports.removeMedicationDispense = function removeMedicationDispense( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/medicationrequest/mutation.js b/src/resources/3_0_1/profiles/medicationrequest/mutation.js index 0ddae606..276b0d70 100644 --- a/src/resources/3_0_1/profiles/medicationrequest/mutation.js +++ b/src/resources/3_0_1/profiles/medicationrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationRequestSchema = require('../../schemas/medicationrequest.schema'); +const MedicationRequestSchema = require('../../schemas/medicationrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationRequestInput = require('../../inputs/medicationrequest.input'); +const MedicationRequestInput = require('../../inputs/medicationrequest.input.js'); -// Resolvers -const { - medicationrequestCreateResolver, - medicationrequestUpdateResolver, - medicationrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedicationRequest, + updateMedicationRequest, + removeMedicationRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MedicationRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MedicationRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MedicationRequestCreateMutation - * @summary MedicationRequestCreate Mutation. + * @summary MedicationRequestCreate mutation. */ module.exports.MedicationRequestCreateMutation = { - args: WriteArgs, - description: 'Create a MedicationRequest', - resolve: scopeInvariant(scopeOptions, medicationrequestCreateResolver), + description: 'Create a MedicationRequest record', + resolve: scopeInvariant(scopeOptions, createMedicationRequest), type: MedicationRequestSchema, + args: WriteArgs, }; /** * @name exports.MedicationRequestUpdateMutation - * @summary MedicationRequestUpdate Mutation. + * @summary MedicationRequestUpdate mutation. */ module.exports.MedicationRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MedicationRequests', - resolve: scopeInvariant(scopeOptions, medicationrequestUpdateResolver), + description: 'Update a MedicationRequest record', + resolve: scopeInvariant(scopeOptions, updateMedicationRequest), type: MedicationRequestSchema, + args: WriteArgs, }; /** - * @name exports.MedicationRequestDeleteMutation - * @summary MedicationRequestDelete Mutation. + * @name exports.MedicationRequestRemoveMutation + * @summary MedicationRequestRemove mutation. */ -module.exports.MedicationRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MedicationRequest', - resolve: scopeInvariant(scopeOptions, medicationrequestDeleteResolver), +module.exports.MedicationRequestRemoveMutation = { + description: 'Remove a MedicationRequest record', + resolve: scopeInvariant(scopeOptions, removeMedicationRequest), type: MedicationRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/medicationrequest/query.js b/src/resources/3_0_1/profiles/medicationrequest/query.js index 35143ddc..4e29d955 100644 --- a/src/resources/3_0_1/profiles/medicationrequest/query.js +++ b/src/resources/3_0_1/profiles/medicationrequest/query.js @@ -1,55 +1,65 @@ // Schemas -const MedicationRequestSchema = require('../../schemas/medicationrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationRequestSchema = require('../../schemas/medicationrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationRequestArgs = require('../../parameters/medicationrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationRequestArgs = require('../../parameters/medicationrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationRequestArgs, +); // Resolvers const { - medicationrequestResolver, - medicationrequestListResolver, - medicationrequestInstanceResolver, + getMedicationRequest, + getMedicationRequestList, + getMedicationRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.MedicationRequestQuery - * @summary MedicationRequest Query. + * @summary MedicationRequest query. */ module.exports.MedicationRequestQuery = { - args: Object.assign({}, CommonArgs, MedicationRequestArgs), description: 'Query for a single MedicationRequest', - resolve: scopeInvariant(scopeOptions, medicationrequestResolver), + resolve: scopeInvariant(scopeOptions, getMedicationRequest), type: MedicationRequestSchema, + args: args, }; /** * @name exports.MedicationRequestListQuery - * @summary MedicationRequestList Query. + * @summary MedicationRequest query. */ module.exports.MedicationRequestListQuery = { - args: Object.assign({}, CommonArgs, MedicationRequestArgs), - description: 'Query for multiple MedicationRequests', - resolve: scopeInvariant(scopeOptions, medicationrequestListResolver), + description: 'Query for a more than or just one MedicationRequest', + resolve: scopeInvariant(scopeOptions, getMedicationRequestList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationRequestInstanceQuery - * @summary MedicationRequestInstance Query. + * @summary MedicationRequest query. */ module.exports.MedicationRequestInstanceQuery = { - description: 'Get information about a single MedicationRequest', - resolve: scopeInvariant(scopeOptions, medicationrequestInstanceResolver), + description: 'Access information about a single MedicationRequest', + resolve: scopeInvariant(scopeOptions, getMedicationRequestInstance), type: MedicationRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/medicationrequest/index.js b/src/resources/3_0_1/profiles/medicationrequest/register.js similarity index 91% rename from src/resources/3_0_1/profiles/medicationrequest/index.js rename to src/resources/3_0_1/profiles/medicationrequest/register.js index 859bc925..a4b1d6e5 100644 --- a/src/resources/3_0_1/profiles/medicationrequest/index.js +++ b/src/resources/3_0_1/profiles/medicationrequest/register.js @@ -1,15 +1,15 @@ +const { + MedicationRequestCreateMutation, + MedicationRequestUpdateMutation, + MedicationRequestRemoveMutation, +} = require('./mutation'); + const { MedicationRequestQuery, MedicationRequestListQuery, MedicationRequestInstanceQuery, } = require('./query'); -const { - MedicationRequestCreateMutation, - MedicationRequestUpdateMutation, - MedicationRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationRequestCreate: MedicationRequestCreateMutation, MedicationRequestUpdate: MedicationRequestUpdateMutation, - MedicationRequestDelete: MedicationRequestDeleteMutation, + MedicationRequestRemove: MedicationRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MedicationRequest', path: '/3_0_1/MedicationRequest/:id', query: MedicationRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/medicationrequest/resolver.js b/src/resources/3_0_1/profiles/medicationrequest/resolver.js index eb3881a7..ace8e39c 100644 --- a/src/resources/3_0_1/profiles/medicationrequest/resolver.js +++ b/src/resources/3_0_1/profiles/medicationrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationrequestResolver + * @name exports.getMedicationRequest * @static - * @summary MedicationRequest Resolver. + * @summary MedicationRequest resolver. */ -module.exports.medicationrequestResolver = function medicationrequestResolver( +module.exports.getMedicationRequest = function getMedicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationrequestListResolver + * @name exports.getMedicationRequestList * @static - * @summary MedicationRequest List Resolver. + * @summary MedicationRequest list resolver. */ -module.exports.medicationrequestListResolver = function medicationrequestListResolver( +module.exports.getMedicationRequestList = function getMedicationRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationrequestInstanceResolver + * @name exports.getMedicationRequestInstance * @static - * @summary MedicationRequest Instance Resolver. + * @summary MedicationRequest instance resolver. */ -module.exports.medicationrequestInstanceResolver = function medicationrequestInstanceResolver( +module.exports.getMedicationRequestInstance = function getMedicationRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationrequestCreateResolver + * @name exports.createMedicationRequest * @static - * @summary MedicationRequest Create Resolver. + * @summary Create MedicationRequest resolver. */ -module.exports.medicationrequestCreateResolver = function medicationrequestCreateResolver( +module.exports.createMedicationRequest = function createMedicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationrequestUpdateResolver + * @name exports.updateMedicationRequest * @static - * @summary MedicationRequest Update Resolver. + * @summary Update MedicationRequest resolver. */ -module.exports.medicationrequestUpdateResolver = function medicationrequestUpdateResolver( +module.exports.updateMedicationRequest = function updateMedicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationrequestDeleteResolver + * @name exports.removeMedicationRequest * @static - * @summary MedicationRequest Delete Resolver. + * @summary Remove MedicationRequest resolver. */ -module.exports.medicationrequestDeleteResolver = function medicationrequestDeleteResolver( +module.exports.removeMedicationRequest = function removeMedicationRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/medicationstatement/mutation.js b/src/resources/3_0_1/profiles/medicationstatement/mutation.js index 3a24fcc8..39d1e62a 100644 --- a/src/resources/3_0_1/profiles/medicationstatement/mutation.js +++ b/src/resources/3_0_1/profiles/medicationstatement/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MedicationStatementSchema = require('../../schemas/medicationstatement.schema'); +const MedicationStatementSchema = require('../../schemas/medicationstatement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MedicationStatementInput = require('../../inputs/medicationstatement.input'); +const MedicationStatementInput = require('../../inputs/medicationstatement.input.js'); -// Resolvers -const { - medicationstatementCreateResolver, - medicationstatementUpdateResolver, - medicationstatementDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMedicationStatement, + updateMedicationStatement, + removeMedicationStatement, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationStatement', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MedicationStatement record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MedicationStatement record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MedicationStatementCreateMutation - * @summary MedicationStatementCreate Mutation. + * @summary MedicationStatementCreate mutation. */ module.exports.MedicationStatementCreateMutation = { - args: WriteArgs, - description: 'Create a MedicationStatement', - resolve: scopeInvariant(scopeOptions, medicationstatementCreateResolver), + description: 'Create a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, createMedicationStatement), type: MedicationStatementSchema, + args: WriteArgs, }; /** * @name exports.MedicationStatementUpdateMutation - * @summary MedicationStatementUpdate Mutation. + * @summary MedicationStatementUpdate mutation. */ module.exports.MedicationStatementUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MedicationStatements', - resolve: scopeInvariant(scopeOptions, medicationstatementUpdateResolver), + description: 'Update a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, updateMedicationStatement), type: MedicationStatementSchema, + args: WriteArgs, }; /** - * @name exports.MedicationStatementDeleteMutation - * @summary MedicationStatementDelete Mutation. + * @name exports.MedicationStatementRemoveMutation + * @summary MedicationStatementRemove mutation. */ -module.exports.MedicationStatementDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MedicationStatement', - resolve: scopeInvariant(scopeOptions, medicationstatementDeleteResolver), +module.exports.MedicationStatementRemoveMutation = { + description: 'Remove a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, removeMedicationStatement), type: MedicationStatementSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/medicationstatement/query.js b/src/resources/3_0_1/profiles/medicationstatement/query.js index 7d4f9c16..e32cd514 100644 --- a/src/resources/3_0_1/profiles/medicationstatement/query.js +++ b/src/resources/3_0_1/profiles/medicationstatement/query.js @@ -1,55 +1,65 @@ // Schemas -const MedicationStatementSchema = require('../../schemas/medicationstatement.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationStatementSchema = require('../../schemas/medicationstatement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MedicationStatementArgs = require('../../parameters/medicationstatement.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MedicationStatementArgs = require('../../parameters/medicationstatement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationStatementArgs, +); // Resolvers const { - medicationstatementResolver, - medicationstatementListResolver, - medicationstatementInstanceResolver, + getMedicationStatement, + getMedicationStatementList, + getMedicationStatementInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MedicationStatement', action: 'read', - version: '3_0_1', }; /** * @name exports.MedicationStatementQuery - * @summary MedicationStatement Query. + * @summary MedicationStatement query. */ module.exports.MedicationStatementQuery = { - args: Object.assign({}, CommonArgs, MedicationStatementArgs), description: 'Query for a single MedicationStatement', - resolve: scopeInvariant(scopeOptions, medicationstatementResolver), + resolve: scopeInvariant(scopeOptions, getMedicationStatement), type: MedicationStatementSchema, + args: args, }; /** * @name exports.MedicationStatementListQuery - * @summary MedicationStatementList Query. + * @summary MedicationStatement query. */ module.exports.MedicationStatementListQuery = { - args: Object.assign({}, CommonArgs, MedicationStatementArgs), - description: 'Query for multiple MedicationStatements', - resolve: scopeInvariant(scopeOptions, medicationstatementListResolver), + description: 'Query for a more than or just one MedicationStatement', + resolve: scopeInvariant(scopeOptions, getMedicationStatementList), type: BundleSchema, + args: args, }; /** * @name exports.MedicationStatementInstanceQuery - * @summary MedicationStatementInstance Query. + * @summary MedicationStatement query. */ module.exports.MedicationStatementInstanceQuery = { - description: 'Get information about a single MedicationStatement', - resolve: scopeInvariant(scopeOptions, medicationstatementInstanceResolver), + description: 'Access information about a single MedicationStatement', + resolve: scopeInvariant(scopeOptions, getMedicationStatementInstance), type: MedicationStatementSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/medicationstatement/index.js b/src/resources/3_0_1/profiles/medicationstatement/register.js similarity index 91% rename from src/resources/3_0_1/profiles/medicationstatement/index.js rename to src/resources/3_0_1/profiles/medicationstatement/register.js index 2d883a21..8411752e 100644 --- a/src/resources/3_0_1/profiles/medicationstatement/index.js +++ b/src/resources/3_0_1/profiles/medicationstatement/register.js @@ -1,15 +1,15 @@ +const { + MedicationStatementCreateMutation, + MedicationStatementUpdateMutation, + MedicationStatementRemoveMutation, +} = require('./mutation'); + const { MedicationStatementQuery, MedicationStatementListQuery, MedicationStatementInstanceQuery, } = require('./query'); -const { - MedicationStatementCreateMutation, - MedicationStatementUpdateMutation, - MedicationStatementDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MedicationStatementCreate: MedicationStatementCreateMutation, MedicationStatementUpdate: MedicationStatementUpdateMutation, - MedicationStatementDelete: MedicationStatementDeleteMutation, + MedicationStatementRemove: MedicationStatementRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MedicationStatement', path: '/3_0_1/MedicationStatement/:id', query: MedicationStatementInstanceQuery, diff --git a/src/resources/3_0_1/profiles/medicationstatement/resolver.js b/src/resources/3_0_1/profiles/medicationstatement/resolver.js index a9292885..bbabc326 100644 --- a/src/resources/3_0_1/profiles/medicationstatement/resolver.js +++ b/src/resources/3_0_1/profiles/medicationstatement/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.medicationstatementResolver + * @name exports.getMedicationStatement * @static - * @summary MedicationStatement Resolver. + * @summary MedicationStatement resolver. */ -module.exports.medicationstatementResolver = function medicationstatementResolver( +module.exports.getMedicationStatement = function getMedicationStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementListResolver + * @name exports.getMedicationStatementList * @static - * @summary MedicationStatement List Resolver. + * @summary MedicationStatement list resolver. */ -module.exports.medicationstatementListResolver = function medicationstatementListResolver( +module.exports.getMedicationStatementList = function getMedicationStatementList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementInstanceResolver + * @name exports.getMedicationStatementInstance * @static - * @summary MedicationStatement Instance Resolver. + * @summary MedicationStatement instance resolver. */ -module.exports.medicationstatementInstanceResolver = function medicationstatementInstanceResolver( +module.exports.getMedicationStatementInstance = function getMedicationStatementInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementCreateResolver + * @name exports.createMedicationStatement * @static - * @summary MedicationStatement Create Resolver. + * @summary Create MedicationStatement resolver. */ -module.exports.medicationstatementCreateResolver = function medicationstatementCreateResolver( +module.exports.createMedicationStatement = function createMedicationStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementUpdateResolver + * @name exports.updateMedicationStatement * @static - * @summary MedicationStatement Update Resolver. + * @summary Update MedicationStatement resolver. */ -module.exports.medicationstatementUpdateResolver = function medicationstatementUpdateResolver( +module.exports.updateMedicationStatement = function updateMedicationStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.medicationstatementDeleteResolver + * @name exports.removeMedicationStatement * @static - * @summary MedicationStatement Delete Resolver. + * @summary Remove MedicationStatement resolver. */ -module.exports.medicationstatementDeleteResolver = function medicationstatementDeleteResolver( +module.exports.removeMedicationStatement = function removeMedicationStatement( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/messagedefinition/mutation.js b/src/resources/3_0_1/profiles/messagedefinition/mutation.js index f2693120..1d5b4ce9 100644 --- a/src/resources/3_0_1/profiles/messagedefinition/mutation.js +++ b/src/resources/3_0_1/profiles/messagedefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MessageDefinitionSchema = require('../../schemas/messagedefinition.schema'); +const MessageDefinitionSchema = require('../../schemas/messagedefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MessageDefinitionInput = require('../../inputs/messagedefinition.input'); +const MessageDefinitionInput = require('../../inputs/messagedefinition.input.js'); -// Resolvers -const { - messagedefinitionCreateResolver, - messagedefinitionUpdateResolver, - messagedefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMessageDefinition, + updateMessageDefinition, + removeMessageDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MessageDefinition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MessageDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MessageDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MessageDefinitionCreateMutation - * @summary MessageDefinitionCreate Mutation. + * @summary MessageDefinitionCreate mutation. */ module.exports.MessageDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a MessageDefinition', - resolve: scopeInvariant(scopeOptions, messagedefinitionCreateResolver), + description: 'Create a MessageDefinition record', + resolve: scopeInvariant(scopeOptions, createMessageDefinition), type: MessageDefinitionSchema, + args: WriteArgs, }; /** * @name exports.MessageDefinitionUpdateMutation - * @summary MessageDefinitionUpdate Mutation. + * @summary MessageDefinitionUpdate mutation. */ module.exports.MessageDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MessageDefinitions', - resolve: scopeInvariant(scopeOptions, messagedefinitionUpdateResolver), + description: 'Update a MessageDefinition record', + resolve: scopeInvariant(scopeOptions, updateMessageDefinition), type: MessageDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.MessageDefinitionDeleteMutation - * @summary MessageDefinitionDelete Mutation. + * @name exports.MessageDefinitionRemoveMutation + * @summary MessageDefinitionRemove mutation. */ -module.exports.MessageDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MessageDefinition', - resolve: scopeInvariant(scopeOptions, messagedefinitionDeleteResolver), +module.exports.MessageDefinitionRemoveMutation = { + description: 'Remove a MessageDefinition record', + resolve: scopeInvariant(scopeOptions, removeMessageDefinition), type: MessageDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/messagedefinition/query.js b/src/resources/3_0_1/profiles/messagedefinition/query.js index b157ca48..66eaec79 100644 --- a/src/resources/3_0_1/profiles/messagedefinition/query.js +++ b/src/resources/3_0_1/profiles/messagedefinition/query.js @@ -1,55 +1,65 @@ // Schemas -const MessageDefinitionSchema = require('../../schemas/messagedefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MessageDefinitionSchema = require('../../schemas/messagedefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MessageDefinitionArgs = require('../../parameters/messagedefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MessageDefinitionArgs = require('../../parameters/messagedefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MessageDefinitionArgs, +); // Resolvers const { - messagedefinitionResolver, - messagedefinitionListResolver, - messagedefinitionInstanceResolver, + getMessageDefinition, + getMessageDefinitionList, + getMessageDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MessageDefinition', action: 'read', - version: '3_0_1', }; /** * @name exports.MessageDefinitionQuery - * @summary MessageDefinition Query. + * @summary MessageDefinition query. */ module.exports.MessageDefinitionQuery = { - args: Object.assign({}, CommonArgs, MessageDefinitionArgs), description: 'Query for a single MessageDefinition', - resolve: scopeInvariant(scopeOptions, messagedefinitionResolver), + resolve: scopeInvariant(scopeOptions, getMessageDefinition), type: MessageDefinitionSchema, + args: args, }; /** * @name exports.MessageDefinitionListQuery - * @summary MessageDefinitionList Query. + * @summary MessageDefinition query. */ module.exports.MessageDefinitionListQuery = { - args: Object.assign({}, CommonArgs, MessageDefinitionArgs), - description: 'Query for multiple MessageDefinitions', - resolve: scopeInvariant(scopeOptions, messagedefinitionListResolver), + description: 'Query for a more than or just one MessageDefinition', + resolve: scopeInvariant(scopeOptions, getMessageDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.MessageDefinitionInstanceQuery - * @summary MessageDefinitionInstance Query. + * @summary MessageDefinition query. */ module.exports.MessageDefinitionInstanceQuery = { - description: 'Get information about a single MessageDefinition', - resolve: scopeInvariant(scopeOptions, messagedefinitionInstanceResolver), + description: 'Access information about a single MessageDefinition', + resolve: scopeInvariant(scopeOptions, getMessageDefinitionInstance), type: MessageDefinitionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/messagedefinition/index.js b/src/resources/3_0_1/profiles/messagedefinition/register.js similarity index 91% rename from src/resources/3_0_1/profiles/messagedefinition/index.js rename to src/resources/3_0_1/profiles/messagedefinition/register.js index 1149c852..9edfe138 100644 --- a/src/resources/3_0_1/profiles/messagedefinition/index.js +++ b/src/resources/3_0_1/profiles/messagedefinition/register.js @@ -1,15 +1,15 @@ +const { + MessageDefinitionCreateMutation, + MessageDefinitionUpdateMutation, + MessageDefinitionRemoveMutation, +} = require('./mutation'); + const { MessageDefinitionQuery, MessageDefinitionListQuery, MessageDefinitionInstanceQuery, } = require('./query'); -const { - MessageDefinitionCreateMutation, - MessageDefinitionUpdateMutation, - MessageDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MessageDefinitionCreate: MessageDefinitionCreateMutation, MessageDefinitionUpdate: MessageDefinitionUpdateMutation, - MessageDefinitionDelete: MessageDefinitionDeleteMutation, + MessageDefinitionRemove: MessageDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MessageDefinition', path: '/3_0_1/MessageDefinition/:id', query: MessageDefinitionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/messagedefinition/resolver.js b/src/resources/3_0_1/profiles/messagedefinition/resolver.js index 7c2e72c7..52c29341 100644 --- a/src/resources/3_0_1/profiles/messagedefinition/resolver.js +++ b/src/resources/3_0_1/profiles/messagedefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.messagedefinitionResolver + * @name exports.getMessageDefinition * @static - * @summary MessageDefinition Resolver. + * @summary MessageDefinition resolver. */ -module.exports.messagedefinitionResolver = function messagedefinitionResolver( +module.exports.getMessageDefinition = function getMessageDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messagedefinitionListResolver + * @name exports.getMessageDefinitionList * @static - * @summary MessageDefinition List Resolver. + * @summary MessageDefinition list resolver. */ -module.exports.messagedefinitionListResolver = function messagedefinitionListResolver( +module.exports.getMessageDefinitionList = function getMessageDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messagedefinitionInstanceResolver + * @name exports.getMessageDefinitionInstance * @static - * @summary MessageDefinition Instance Resolver. + * @summary MessageDefinition instance resolver. */ -module.exports.messagedefinitionInstanceResolver = function messagedefinitionInstanceResolver( +module.exports.getMessageDefinitionInstance = function getMessageDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messagedefinitionCreateResolver + * @name exports.createMessageDefinition * @static - * @summary MessageDefinition Create Resolver. + * @summary Create MessageDefinition resolver. */ -module.exports.messagedefinitionCreateResolver = function messagedefinitionCreateResolver( +module.exports.createMessageDefinition = function createMessageDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messagedefinitionUpdateResolver + * @name exports.updateMessageDefinition * @static - * @summary MessageDefinition Update Resolver. + * @summary Update MessageDefinition resolver. */ -module.exports.messagedefinitionUpdateResolver = function messagedefinitionUpdateResolver( +module.exports.updateMessageDefinition = function updateMessageDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messagedefinitionDeleteResolver + * @name exports.removeMessageDefinition * @static - * @summary MessageDefinition Delete Resolver. + * @summary Remove MessageDefinition resolver. */ -module.exports.messagedefinitionDeleteResolver = function messagedefinitionDeleteResolver( +module.exports.removeMessageDefinition = function removeMessageDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/messageheader/mutation.js b/src/resources/3_0_1/profiles/messageheader/mutation.js index 196f57bb..1b2f5ea8 100644 --- a/src/resources/3_0_1/profiles/messageheader/mutation.js +++ b/src/resources/3_0_1/profiles/messageheader/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const MessageHeaderSchema = require('../../schemas/messageheader.schema'); +const MessageHeaderSchema = require('../../schemas/messageheader.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const MessageHeaderInput = require('../../inputs/messageheader.input'); +const MessageHeaderInput = require('../../inputs/messageheader.input.js'); -// Resolvers -const { - messageheaderCreateResolver, - messageheaderUpdateResolver, - messageheaderDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createMessageHeader, + updateMessageHeader, + removeMessageHeader, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MessageHeader', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a MessageHeader record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a MessageHeader record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.MessageHeaderCreateMutation - * @summary MessageHeaderCreate Mutation. + * @summary MessageHeaderCreate mutation. */ module.exports.MessageHeaderCreateMutation = { - args: WriteArgs, - description: 'Create a MessageHeader', - resolve: scopeInvariant(scopeOptions, messageheaderCreateResolver), + description: 'Create a MessageHeader record', + resolve: scopeInvariant(scopeOptions, createMessageHeader), type: MessageHeaderSchema, + args: WriteArgs, }; /** * @name exports.MessageHeaderUpdateMutation - * @summary MessageHeaderUpdate Mutation. + * @summary MessageHeaderUpdate mutation. */ module.exports.MessageHeaderUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple MessageHeaders', - resolve: scopeInvariant(scopeOptions, messageheaderUpdateResolver), + description: 'Update a MessageHeader record', + resolve: scopeInvariant(scopeOptions, updateMessageHeader), type: MessageHeaderSchema, + args: WriteArgs, }; /** - * @name exports.MessageHeaderDeleteMutation - * @summary MessageHeaderDelete Mutation. + * @name exports.MessageHeaderRemoveMutation + * @summary MessageHeaderRemove mutation. */ -module.exports.MessageHeaderDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single MessageHeader', - resolve: scopeInvariant(scopeOptions, messageheaderDeleteResolver), +module.exports.MessageHeaderRemoveMutation = { + description: 'Remove a MessageHeader record', + resolve: scopeInvariant(scopeOptions, removeMessageHeader), type: MessageHeaderSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/messageheader/query.js b/src/resources/3_0_1/profiles/messageheader/query.js index 19a514d0..dbcb6abf 100644 --- a/src/resources/3_0_1/profiles/messageheader/query.js +++ b/src/resources/3_0_1/profiles/messageheader/query.js @@ -1,55 +1,65 @@ // Schemas -const MessageHeaderSchema = require('../../schemas/messageheader.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MessageHeaderSchema = require('../../schemas/messageheader.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const MessageHeaderArgs = require('../../parameters/messageheader.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const MessageHeaderArgs = require('../../parameters/messageheader.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MessageHeaderArgs, +); // Resolvers const { - messageheaderResolver, - messageheaderListResolver, - messageheaderInstanceResolver, + getMessageHeader, + getMessageHeaderList, + getMessageHeaderInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'MessageHeader', action: 'read', - version: '3_0_1', }; /** * @name exports.MessageHeaderQuery - * @summary MessageHeader Query. + * @summary MessageHeader query. */ module.exports.MessageHeaderQuery = { - args: Object.assign({}, CommonArgs, MessageHeaderArgs), description: 'Query for a single MessageHeader', - resolve: scopeInvariant(scopeOptions, messageheaderResolver), + resolve: scopeInvariant(scopeOptions, getMessageHeader), type: MessageHeaderSchema, + args: args, }; /** * @name exports.MessageHeaderListQuery - * @summary MessageHeaderList Query. + * @summary MessageHeader query. */ module.exports.MessageHeaderListQuery = { - args: Object.assign({}, CommonArgs, MessageHeaderArgs), - description: 'Query for multiple MessageHeaders', - resolve: scopeInvariant(scopeOptions, messageheaderListResolver), + description: 'Query for a more than or just one MessageHeader', + resolve: scopeInvariant(scopeOptions, getMessageHeaderList), type: BundleSchema, + args: args, }; /** * @name exports.MessageHeaderInstanceQuery - * @summary MessageHeaderInstance Query. + * @summary MessageHeader query. */ module.exports.MessageHeaderInstanceQuery = { - description: 'Get information about a single MessageHeader', - resolve: scopeInvariant(scopeOptions, messageheaderInstanceResolver), + description: 'Access information about a single MessageHeader', + resolve: scopeInvariant(scopeOptions, getMessageHeaderInstance), type: MessageHeaderSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/messageheader/index.js b/src/resources/3_0_1/profiles/messageheader/register.js similarity index 92% rename from src/resources/3_0_1/profiles/messageheader/index.js rename to src/resources/3_0_1/profiles/messageheader/register.js index d3a06052..9afbd291 100644 --- a/src/resources/3_0_1/profiles/messageheader/index.js +++ b/src/resources/3_0_1/profiles/messageheader/register.js @@ -1,15 +1,15 @@ +const { + MessageHeaderCreateMutation, + MessageHeaderUpdateMutation, + MessageHeaderRemoveMutation, +} = require('./mutation'); + const { MessageHeaderQuery, MessageHeaderListQuery, MessageHeaderInstanceQuery, } = require('./query'); -const { - MessageHeaderCreateMutation, - MessageHeaderUpdateMutation, - MessageHeaderDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { MessageHeaderCreate: MessageHeaderCreateMutation, MessageHeaderUpdate: MessageHeaderUpdateMutation, - MessageHeaderDelete: MessageHeaderDeleteMutation, + MessageHeaderRemove: MessageHeaderRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'MessageHeader', path: '/3_0_1/MessageHeader/:id', query: MessageHeaderInstanceQuery, diff --git a/src/resources/3_0_1/profiles/messageheader/resolver.js b/src/resources/3_0_1/profiles/messageheader/resolver.js index fb85f2fa..4ccd0679 100644 --- a/src/resources/3_0_1/profiles/messageheader/resolver.js +++ b/src/resources/3_0_1/profiles/messageheader/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.messageheaderResolver + * @name exports.getMessageHeader * @static - * @summary MessageHeader Resolver. + * @summary MessageHeader resolver. */ -module.exports.messageheaderResolver = function messageheaderResolver( +module.exports.getMessageHeader = function getMessageHeader( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderListResolver + * @name exports.getMessageHeaderList * @static - * @summary MessageHeader List Resolver. + * @summary MessageHeader list resolver. */ -module.exports.messageheaderListResolver = function messageheaderListResolver( +module.exports.getMessageHeaderList = function getMessageHeaderList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderInstanceResolver + * @name exports.getMessageHeaderInstance * @static - * @summary MessageHeader Instance Resolver. + * @summary MessageHeader instance resolver. */ -module.exports.messageheaderInstanceResolver = function messageheaderInstanceResolver( +module.exports.getMessageHeaderInstance = function getMessageHeaderInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderCreateResolver + * @name exports.createMessageHeader * @static - * @summary MessageHeader Create Resolver. + * @summary Create MessageHeader resolver. */ -module.exports.messageheaderCreateResolver = function messageheaderCreateResolver( +module.exports.createMessageHeader = function createMessageHeader( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderUpdateResolver + * @name exports.updateMessageHeader * @static - * @summary MessageHeader Update Resolver. + * @summary Update MessageHeader resolver. */ -module.exports.messageheaderUpdateResolver = function messageheaderUpdateResolver( +module.exports.updateMessageHeader = function updateMessageHeader( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.messageheaderDeleteResolver + * @name exports.removeMessageHeader * @static - * @summary MessageHeader Delete Resolver. + * @summary Remove MessageHeader resolver. */ -module.exports.messageheaderDeleteResolver = function messageheaderDeleteResolver( +module.exports.removeMessageHeader = function removeMessageHeader( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/namingsystem/mutation.js b/src/resources/3_0_1/profiles/namingsystem/mutation.js index 53b69952..c20ef1ad 100644 --- a/src/resources/3_0_1/profiles/namingsystem/mutation.js +++ b/src/resources/3_0_1/profiles/namingsystem/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const NamingSystemSchema = require('../../schemas/namingsystem.schema'); +const NamingSystemSchema = require('../../schemas/namingsystem.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const NamingSystemInput = require('../../inputs/namingsystem.input'); +const NamingSystemInput = require('../../inputs/namingsystem.input.js'); -// Resolvers -const { - namingsystemCreateResolver, - namingsystemUpdateResolver, - namingsystemDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createNamingSystem, + updateNamingSystem, + removeNamingSystem, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'NamingSystem', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a NamingSystem record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a NamingSystem record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.NamingSystemCreateMutation - * @summary NamingSystemCreate Mutation. + * @summary NamingSystemCreate mutation. */ module.exports.NamingSystemCreateMutation = { - args: WriteArgs, - description: 'Create a NamingSystem', - resolve: scopeInvariant(scopeOptions, namingsystemCreateResolver), + description: 'Create a NamingSystem record', + resolve: scopeInvariant(scopeOptions, createNamingSystem), type: NamingSystemSchema, + args: WriteArgs, }; /** * @name exports.NamingSystemUpdateMutation - * @summary NamingSystemUpdate Mutation. + * @summary NamingSystemUpdate mutation. */ module.exports.NamingSystemUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple NamingSystems', - resolve: scopeInvariant(scopeOptions, namingsystemUpdateResolver), + description: 'Update a NamingSystem record', + resolve: scopeInvariant(scopeOptions, updateNamingSystem), type: NamingSystemSchema, + args: WriteArgs, }; /** - * @name exports.NamingSystemDeleteMutation - * @summary NamingSystemDelete Mutation. + * @name exports.NamingSystemRemoveMutation + * @summary NamingSystemRemove mutation. */ -module.exports.NamingSystemDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single NamingSystem', - resolve: scopeInvariant(scopeOptions, namingsystemDeleteResolver), +module.exports.NamingSystemRemoveMutation = { + description: 'Remove a NamingSystem record', + resolve: scopeInvariant(scopeOptions, removeNamingSystem), type: NamingSystemSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/namingsystem/query.js b/src/resources/3_0_1/profiles/namingsystem/query.js index d5107385..a0227bd9 100644 --- a/src/resources/3_0_1/profiles/namingsystem/query.js +++ b/src/resources/3_0_1/profiles/namingsystem/query.js @@ -1,55 +1,65 @@ // Schemas -const NamingSystemSchema = require('../../schemas/namingsystem.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const NamingSystemSchema = require('../../schemas/namingsystem.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const NamingSystemArgs = require('../../parameters/namingsystem.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const NamingSystemArgs = require('../../parameters/namingsystem.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + NamingSystemArgs, +); // Resolvers const { - namingsystemResolver, - namingsystemListResolver, - namingsystemInstanceResolver, + getNamingSystem, + getNamingSystemList, + getNamingSystemInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'NamingSystem', action: 'read', - version: '3_0_1', }; /** * @name exports.NamingSystemQuery - * @summary NamingSystem Query. + * @summary NamingSystem query. */ module.exports.NamingSystemQuery = { - args: Object.assign({}, CommonArgs, NamingSystemArgs), description: 'Query for a single NamingSystem', - resolve: scopeInvariant(scopeOptions, namingsystemResolver), + resolve: scopeInvariant(scopeOptions, getNamingSystem), type: NamingSystemSchema, + args: args, }; /** * @name exports.NamingSystemListQuery - * @summary NamingSystemList Query. + * @summary NamingSystem query. */ module.exports.NamingSystemListQuery = { - args: Object.assign({}, CommonArgs, NamingSystemArgs), - description: 'Query for multiple NamingSystems', - resolve: scopeInvariant(scopeOptions, namingsystemListResolver), + description: 'Query for a more than or just one NamingSystem', + resolve: scopeInvariant(scopeOptions, getNamingSystemList), type: BundleSchema, + args: args, }; /** * @name exports.NamingSystemInstanceQuery - * @summary NamingSystemInstance Query. + * @summary NamingSystem query. */ module.exports.NamingSystemInstanceQuery = { - description: 'Get information about a single NamingSystem', - resolve: scopeInvariant(scopeOptions, namingsystemInstanceResolver), + description: 'Access information about a single NamingSystem', + resolve: scopeInvariant(scopeOptions, getNamingSystemInstance), type: NamingSystemSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/namingsystem/index.js b/src/resources/3_0_1/profiles/namingsystem/register.js similarity index 92% rename from src/resources/3_0_1/profiles/namingsystem/index.js rename to src/resources/3_0_1/profiles/namingsystem/register.js index bb9bfe0f..b8486767 100644 --- a/src/resources/3_0_1/profiles/namingsystem/index.js +++ b/src/resources/3_0_1/profiles/namingsystem/register.js @@ -1,15 +1,15 @@ +const { + NamingSystemCreateMutation, + NamingSystemUpdateMutation, + NamingSystemRemoveMutation, +} = require('./mutation'); + const { NamingSystemQuery, NamingSystemListQuery, NamingSystemInstanceQuery, } = require('./query'); -const { - NamingSystemCreateMutation, - NamingSystemUpdateMutation, - NamingSystemDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { NamingSystemCreate: NamingSystemCreateMutation, NamingSystemUpdate: NamingSystemUpdateMutation, - NamingSystemDelete: NamingSystemDeleteMutation, + NamingSystemRemove: NamingSystemRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'NamingSystem', path: '/3_0_1/NamingSystem/:id', query: NamingSystemInstanceQuery, diff --git a/src/resources/3_0_1/profiles/namingsystem/resolver.js b/src/resources/3_0_1/profiles/namingsystem/resolver.js index 7417c7dd..de591f31 100644 --- a/src/resources/3_0_1/profiles/namingsystem/resolver.js +++ b/src/resources/3_0_1/profiles/namingsystem/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.namingsystemResolver + * @name exports.getNamingSystem * @static - * @summary NamingSystem Resolver. + * @summary NamingSystem resolver. */ -module.exports.namingsystemResolver = function namingsystemResolver( +module.exports.getNamingSystem = function getNamingSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemListResolver + * @name exports.getNamingSystemList * @static - * @summary NamingSystem List Resolver. + * @summary NamingSystem list resolver. */ -module.exports.namingsystemListResolver = function namingsystemListResolver( +module.exports.getNamingSystemList = function getNamingSystemList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemInstanceResolver + * @name exports.getNamingSystemInstance * @static - * @summary NamingSystem Instance Resolver. + * @summary NamingSystem instance resolver. */ -module.exports.namingsystemInstanceResolver = function namingsystemInstanceResolver( +module.exports.getNamingSystemInstance = function getNamingSystemInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemCreateResolver + * @name exports.createNamingSystem * @static - * @summary NamingSystem Create Resolver. + * @summary Create NamingSystem resolver. */ -module.exports.namingsystemCreateResolver = function namingsystemCreateResolver( +module.exports.createNamingSystem = function createNamingSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemUpdateResolver + * @name exports.updateNamingSystem * @static - * @summary NamingSystem Update Resolver. + * @summary Update NamingSystem resolver. */ -module.exports.namingsystemUpdateResolver = function namingsystemUpdateResolver( +module.exports.updateNamingSystem = function updateNamingSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.namingsystemDeleteResolver + * @name exports.removeNamingSystem * @static - * @summary NamingSystem Delete Resolver. + * @summary Remove NamingSystem resolver. */ -module.exports.namingsystemDeleteResolver = function namingsystemDeleteResolver( +module.exports.removeNamingSystem = function removeNamingSystem( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/nutritionorder/mutation.js b/src/resources/3_0_1/profiles/nutritionorder/mutation.js index e8376346..bb3dae4b 100644 --- a/src/resources/3_0_1/profiles/nutritionorder/mutation.js +++ b/src/resources/3_0_1/profiles/nutritionorder/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const NutritionOrderSchema = require('../../schemas/nutritionorder.schema'); +const NutritionOrderSchema = require('../../schemas/nutritionorder.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const NutritionOrderInput = require('../../inputs/nutritionorder.input'); +const NutritionOrderInput = require('../../inputs/nutritionorder.input.js'); -// Resolvers -const { - nutritionorderCreateResolver, - nutritionorderUpdateResolver, - nutritionorderDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createNutritionOrder, + updateNutritionOrder, + removeNutritionOrder, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'NutritionOrder', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a NutritionOrder record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a NutritionOrder record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.NutritionOrderCreateMutation - * @summary NutritionOrderCreate Mutation. + * @summary NutritionOrderCreate mutation. */ module.exports.NutritionOrderCreateMutation = { - args: WriteArgs, - description: 'Create a NutritionOrder', - resolve: scopeInvariant(scopeOptions, nutritionorderCreateResolver), + description: 'Create a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, createNutritionOrder), type: NutritionOrderSchema, + args: WriteArgs, }; /** * @name exports.NutritionOrderUpdateMutation - * @summary NutritionOrderUpdate Mutation. + * @summary NutritionOrderUpdate mutation. */ module.exports.NutritionOrderUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple NutritionOrders', - resolve: scopeInvariant(scopeOptions, nutritionorderUpdateResolver), + description: 'Update a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, updateNutritionOrder), type: NutritionOrderSchema, + args: WriteArgs, }; /** - * @name exports.NutritionOrderDeleteMutation - * @summary NutritionOrderDelete Mutation. + * @name exports.NutritionOrderRemoveMutation + * @summary NutritionOrderRemove mutation. */ -module.exports.NutritionOrderDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single NutritionOrder', - resolve: scopeInvariant(scopeOptions, nutritionorderDeleteResolver), +module.exports.NutritionOrderRemoveMutation = { + description: 'Remove a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, removeNutritionOrder), type: NutritionOrderSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/nutritionorder/query.js b/src/resources/3_0_1/profiles/nutritionorder/query.js index c845a81b..204278ce 100644 --- a/src/resources/3_0_1/profiles/nutritionorder/query.js +++ b/src/resources/3_0_1/profiles/nutritionorder/query.js @@ -1,55 +1,65 @@ // Schemas -const NutritionOrderSchema = require('../../schemas/nutritionorder.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const NutritionOrderSchema = require('../../schemas/nutritionorder.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const NutritionOrderArgs = require('../../parameters/nutritionorder.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const NutritionOrderArgs = require('../../parameters/nutritionorder.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + NutritionOrderArgs, +); // Resolvers const { - nutritionorderResolver, - nutritionorderListResolver, - nutritionorderInstanceResolver, + getNutritionOrder, + getNutritionOrderList, + getNutritionOrderInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'NutritionOrder', action: 'read', - version: '3_0_1', }; /** * @name exports.NutritionOrderQuery - * @summary NutritionOrder Query. + * @summary NutritionOrder query. */ module.exports.NutritionOrderQuery = { - args: Object.assign({}, CommonArgs, NutritionOrderArgs), description: 'Query for a single NutritionOrder', - resolve: scopeInvariant(scopeOptions, nutritionorderResolver), + resolve: scopeInvariant(scopeOptions, getNutritionOrder), type: NutritionOrderSchema, + args: args, }; /** * @name exports.NutritionOrderListQuery - * @summary NutritionOrderList Query. + * @summary NutritionOrder query. */ module.exports.NutritionOrderListQuery = { - args: Object.assign({}, CommonArgs, NutritionOrderArgs), - description: 'Query for multiple NutritionOrders', - resolve: scopeInvariant(scopeOptions, nutritionorderListResolver), + description: 'Query for a more than or just one NutritionOrder', + resolve: scopeInvariant(scopeOptions, getNutritionOrderList), type: BundleSchema, + args: args, }; /** * @name exports.NutritionOrderInstanceQuery - * @summary NutritionOrderInstance Query. + * @summary NutritionOrder query. */ module.exports.NutritionOrderInstanceQuery = { - description: 'Get information about a single NutritionOrder', - resolve: scopeInvariant(scopeOptions, nutritionorderInstanceResolver), + description: 'Access information about a single NutritionOrder', + resolve: scopeInvariant(scopeOptions, getNutritionOrderInstance), type: NutritionOrderSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/nutritionorder/index.js b/src/resources/3_0_1/profiles/nutritionorder/register.js similarity index 92% rename from src/resources/3_0_1/profiles/nutritionorder/index.js rename to src/resources/3_0_1/profiles/nutritionorder/register.js index fb9afcdb..5c6b50a0 100644 --- a/src/resources/3_0_1/profiles/nutritionorder/index.js +++ b/src/resources/3_0_1/profiles/nutritionorder/register.js @@ -1,15 +1,15 @@ +const { + NutritionOrderCreateMutation, + NutritionOrderUpdateMutation, + NutritionOrderRemoveMutation, +} = require('./mutation'); + const { NutritionOrderQuery, NutritionOrderListQuery, NutritionOrderInstanceQuery, } = require('./query'); -const { - NutritionOrderCreateMutation, - NutritionOrderUpdateMutation, - NutritionOrderDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { NutritionOrderCreate: NutritionOrderCreateMutation, NutritionOrderUpdate: NutritionOrderUpdateMutation, - NutritionOrderDelete: NutritionOrderDeleteMutation, + NutritionOrderRemove: NutritionOrderRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'NutritionOrder', path: '/3_0_1/NutritionOrder/:id', query: NutritionOrderInstanceQuery, diff --git a/src/resources/3_0_1/profiles/nutritionorder/resolver.js b/src/resources/3_0_1/profiles/nutritionorder/resolver.js index 5f643b8b..e6674684 100644 --- a/src/resources/3_0_1/profiles/nutritionorder/resolver.js +++ b/src/resources/3_0_1/profiles/nutritionorder/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.nutritionorderResolver + * @name exports.getNutritionOrder * @static - * @summary NutritionOrder Resolver. + * @summary NutritionOrder resolver. */ -module.exports.nutritionorderResolver = function nutritionorderResolver( +module.exports.getNutritionOrder = function getNutritionOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderListResolver + * @name exports.getNutritionOrderList * @static - * @summary NutritionOrder List Resolver. + * @summary NutritionOrder list resolver. */ -module.exports.nutritionorderListResolver = function nutritionorderListResolver( +module.exports.getNutritionOrderList = function getNutritionOrderList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderInstanceResolver + * @name exports.getNutritionOrderInstance * @static - * @summary NutritionOrder Instance Resolver. + * @summary NutritionOrder instance resolver. */ -module.exports.nutritionorderInstanceResolver = function nutritionorderInstanceResolver( +module.exports.getNutritionOrderInstance = function getNutritionOrderInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderCreateResolver + * @name exports.createNutritionOrder * @static - * @summary NutritionOrder Create Resolver. + * @summary Create NutritionOrder resolver. */ -module.exports.nutritionorderCreateResolver = function nutritionorderCreateResolver( +module.exports.createNutritionOrder = function createNutritionOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderUpdateResolver + * @name exports.updateNutritionOrder * @static - * @summary NutritionOrder Update Resolver. + * @summary Update NutritionOrder resolver. */ -module.exports.nutritionorderUpdateResolver = function nutritionorderUpdateResolver( +module.exports.updateNutritionOrder = function updateNutritionOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.nutritionorderDeleteResolver + * @name exports.removeNutritionOrder * @static - * @summary NutritionOrder Delete Resolver. + * @summary Remove NutritionOrder resolver. */ -module.exports.nutritionorderDeleteResolver = function nutritionorderDeleteResolver( +module.exports.removeNutritionOrder = function removeNutritionOrder( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/observation/mutation.js b/src/resources/3_0_1/profiles/observation/mutation.js index 2aeb0fbe..9fd5d068 100644 --- a/src/resources/3_0_1/profiles/observation/mutation.js +++ b/src/resources/3_0_1/profiles/observation/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ObservationSchema = require('../../schemas/observation.schema'); +const ObservationSchema = require('../../schemas/observation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ObservationInput = require('../../inputs/observation.input'); +const ObservationInput = require('../../inputs/observation.input.js'); -// Resolvers -const { - observationCreateResolver, - observationUpdateResolver, - observationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createObservation, + updateObservation, + removeObservation, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Observation', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Observation record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Observation record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ObservationCreateMutation - * @summary ObservationCreate Mutation. + * @summary ObservationCreate mutation. */ module.exports.ObservationCreateMutation = { - args: WriteArgs, - description: 'Create a Observation', - resolve: scopeInvariant(scopeOptions, observationCreateResolver), + description: 'Create a Observation record', + resolve: scopeInvariant(scopeOptions, createObservation), type: ObservationSchema, + args: WriteArgs, }; /** * @name exports.ObservationUpdateMutation - * @summary ObservationUpdate Mutation. + * @summary ObservationUpdate mutation. */ module.exports.ObservationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Observations', - resolve: scopeInvariant(scopeOptions, observationUpdateResolver), + description: 'Update a Observation record', + resolve: scopeInvariant(scopeOptions, updateObservation), type: ObservationSchema, + args: WriteArgs, }; /** - * @name exports.ObservationDeleteMutation - * @summary ObservationDelete Mutation. + * @name exports.ObservationRemoveMutation + * @summary ObservationRemove mutation. */ -module.exports.ObservationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Observation', - resolve: scopeInvariant(scopeOptions, observationDeleteResolver), +module.exports.ObservationRemoveMutation = { + description: 'Remove a Observation record', + resolve: scopeInvariant(scopeOptions, removeObservation), type: ObservationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/observation/query.js b/src/resources/3_0_1/profiles/observation/query.js index 8d52af71..554748ec 100644 --- a/src/resources/3_0_1/profiles/observation/query.js +++ b/src/resources/3_0_1/profiles/observation/query.js @@ -1,55 +1,60 @@ // Schemas -const ObservationSchema = require('../../schemas/observation.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ObservationSchema = require('../../schemas/observation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ObservationArgs = require('../../parameters/observation.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ObservationArgs = require('../../parameters/observation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ObservationArgs); // Resolvers const { - observationResolver, - observationListResolver, - observationInstanceResolver, + getObservation, + getObservationList, + getObservationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Observation', action: 'read', - version: '3_0_1', }; /** * @name exports.ObservationQuery - * @summary Observation Query. + * @summary Observation query. */ module.exports.ObservationQuery = { - args: Object.assign({}, CommonArgs, ObservationArgs), description: 'Query for a single Observation', - resolve: scopeInvariant(scopeOptions, observationResolver), + resolve: scopeInvariant(scopeOptions, getObservation), type: ObservationSchema, + args: args, }; /** * @name exports.ObservationListQuery - * @summary ObservationList Query. + * @summary Observation query. */ module.exports.ObservationListQuery = { - args: Object.assign({}, CommonArgs, ObservationArgs), - description: 'Query for multiple Observations', - resolve: scopeInvariant(scopeOptions, observationListResolver), + description: 'Query for a more than or just one Observation', + resolve: scopeInvariant(scopeOptions, getObservationList), type: BundleSchema, + args: args, }; /** * @name exports.ObservationInstanceQuery - * @summary ObservationInstance Query. + * @summary Observation query. */ module.exports.ObservationInstanceQuery = { - description: 'Get information about a single Observation', - resolve: scopeInvariant(scopeOptions, observationInstanceResolver), + description: 'Access information about a single Observation', + resolve: scopeInvariant(scopeOptions, getObservationInstance), type: ObservationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/observation/index.js b/src/resources/3_0_1/profiles/observation/register.js similarity index 92% rename from src/resources/3_0_1/profiles/observation/index.js rename to src/resources/3_0_1/profiles/observation/register.js index e643599e..35ba5a17 100644 --- a/src/resources/3_0_1/profiles/observation/index.js +++ b/src/resources/3_0_1/profiles/observation/register.js @@ -1,15 +1,15 @@ +const { + ObservationCreateMutation, + ObservationUpdateMutation, + ObservationRemoveMutation, +} = require('./mutation'); + const { ObservationQuery, ObservationListQuery, ObservationInstanceQuery, } = require('./query'); -const { - ObservationCreateMutation, - ObservationUpdateMutation, - ObservationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ObservationCreate: ObservationCreateMutation, ObservationUpdate: ObservationUpdateMutation, - ObservationDelete: ObservationDeleteMutation, + ObservationRemove: ObservationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Observation', path: '/3_0_1/Observation/:id', query: ObservationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/observation/resolver.js b/src/resources/3_0_1/profiles/observation/resolver.js index 8756b1e1..da09be65 100644 --- a/src/resources/3_0_1/profiles/observation/resolver.js +++ b/src/resources/3_0_1/profiles/observation/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.observationResolver + * @name exports.getObservation * @static - * @summary Observation Resolver. + * @summary Observation resolver. */ -module.exports.observationResolver = function observationResolver( +module.exports.getObservation = function getObservation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationListResolver + * @name exports.getObservationList * @static - * @summary Observation List Resolver. + * @summary Observation list resolver. */ -module.exports.observationListResolver = function observationListResolver( +module.exports.getObservationList = function getObservationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationInstanceResolver + * @name exports.getObservationInstance * @static - * @summary Observation Instance Resolver. + * @summary Observation instance resolver. */ -module.exports.observationInstanceResolver = function observationInstanceResolver( +module.exports.getObservationInstance = function getObservationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationCreateResolver + * @name exports.createObservation * @static - * @summary Observation Create Resolver. + * @summary Create Observation resolver. */ -module.exports.observationCreateResolver = function observationCreateResolver( +module.exports.createObservation = function createObservation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationUpdateResolver + * @name exports.updateObservation * @static - * @summary Observation Update Resolver. + * @summary Update Observation resolver. */ -module.exports.observationUpdateResolver = function observationUpdateResolver( +module.exports.updateObservation = function updateObservation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.observationDeleteResolver + * @name exports.removeObservation * @static - * @summary Observation Delete Resolver. + * @summary Remove Observation resolver. */ -module.exports.observationDeleteResolver = function observationDeleteResolver( +module.exports.removeObservation = function removeObservation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/operationdefinition/mutation.js b/src/resources/3_0_1/profiles/operationdefinition/mutation.js index 37a7cf6b..3e607b6b 100644 --- a/src/resources/3_0_1/profiles/operationdefinition/mutation.js +++ b/src/resources/3_0_1/profiles/operationdefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema'); +const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const OperationDefinitionInput = require('../../inputs/operationdefinition.input'); +const OperationDefinitionInput = require('../../inputs/operationdefinition.input.js'); -// Resolvers -const { - operationdefinitionCreateResolver, - operationdefinitionUpdateResolver, - operationdefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createOperationDefinition, + updateOperationDefinition, + removeOperationDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'OperationDefinition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a OperationDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a OperationDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.OperationDefinitionCreateMutation - * @summary OperationDefinitionCreate Mutation. + * @summary OperationDefinitionCreate mutation. */ module.exports.OperationDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a OperationDefinition', - resolve: scopeInvariant(scopeOptions, operationdefinitionCreateResolver), + description: 'Create a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, createOperationDefinition), type: OperationDefinitionSchema, + args: WriteArgs, }; /** * @name exports.OperationDefinitionUpdateMutation - * @summary OperationDefinitionUpdate Mutation. + * @summary OperationDefinitionUpdate mutation. */ module.exports.OperationDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple OperationDefinitions', - resolve: scopeInvariant(scopeOptions, operationdefinitionUpdateResolver), + description: 'Update a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, updateOperationDefinition), type: OperationDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.OperationDefinitionDeleteMutation - * @summary OperationDefinitionDelete Mutation. + * @name exports.OperationDefinitionRemoveMutation + * @summary OperationDefinitionRemove mutation. */ -module.exports.OperationDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single OperationDefinition', - resolve: scopeInvariant(scopeOptions, operationdefinitionDeleteResolver), +module.exports.OperationDefinitionRemoveMutation = { + description: 'Remove a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, removeOperationDefinition), type: OperationDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/operationdefinition/query.js b/src/resources/3_0_1/profiles/operationdefinition/query.js index 8699e6de..5179c68b 100644 --- a/src/resources/3_0_1/profiles/operationdefinition/query.js +++ b/src/resources/3_0_1/profiles/operationdefinition/query.js @@ -1,55 +1,65 @@ // Schemas -const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const OperationDefinitionArgs = require('../../parameters/operationdefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const OperationDefinitionArgs = require('../../parameters/operationdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + OperationDefinitionArgs, +); // Resolvers const { - operationdefinitionResolver, - operationdefinitionListResolver, - operationdefinitionInstanceResolver, + getOperationDefinition, + getOperationDefinitionList, + getOperationDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'OperationDefinition', action: 'read', - version: '3_0_1', }; /** * @name exports.OperationDefinitionQuery - * @summary OperationDefinition Query. + * @summary OperationDefinition query. */ module.exports.OperationDefinitionQuery = { - args: Object.assign({}, CommonArgs, OperationDefinitionArgs), description: 'Query for a single OperationDefinition', - resolve: scopeInvariant(scopeOptions, operationdefinitionResolver), + resolve: scopeInvariant(scopeOptions, getOperationDefinition), type: OperationDefinitionSchema, + args: args, }; /** * @name exports.OperationDefinitionListQuery - * @summary OperationDefinitionList Query. + * @summary OperationDefinition query. */ module.exports.OperationDefinitionListQuery = { - args: Object.assign({}, CommonArgs, OperationDefinitionArgs), - description: 'Query for multiple OperationDefinitions', - resolve: scopeInvariant(scopeOptions, operationdefinitionListResolver), + description: 'Query for a more than or just one OperationDefinition', + resolve: scopeInvariant(scopeOptions, getOperationDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.OperationDefinitionInstanceQuery - * @summary OperationDefinitionInstance Query. + * @summary OperationDefinition query. */ module.exports.OperationDefinitionInstanceQuery = { - description: 'Get information about a single OperationDefinition', - resolve: scopeInvariant(scopeOptions, operationdefinitionInstanceResolver), + description: 'Access information about a single OperationDefinition', + resolve: scopeInvariant(scopeOptions, getOperationDefinitionInstance), type: OperationDefinitionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/operationdefinition/index.js b/src/resources/3_0_1/profiles/operationdefinition/register.js similarity index 91% rename from src/resources/3_0_1/profiles/operationdefinition/index.js rename to src/resources/3_0_1/profiles/operationdefinition/register.js index 6459e107..80597fb8 100644 --- a/src/resources/3_0_1/profiles/operationdefinition/index.js +++ b/src/resources/3_0_1/profiles/operationdefinition/register.js @@ -1,15 +1,15 @@ +const { + OperationDefinitionCreateMutation, + OperationDefinitionUpdateMutation, + OperationDefinitionRemoveMutation, +} = require('./mutation'); + const { OperationDefinitionQuery, OperationDefinitionListQuery, OperationDefinitionInstanceQuery, } = require('./query'); -const { - OperationDefinitionCreateMutation, - OperationDefinitionUpdateMutation, - OperationDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { OperationDefinitionCreate: OperationDefinitionCreateMutation, OperationDefinitionUpdate: OperationDefinitionUpdateMutation, - OperationDefinitionDelete: OperationDefinitionDeleteMutation, + OperationDefinitionRemove: OperationDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'OperationDefinition', path: '/3_0_1/OperationDefinition/:id', query: OperationDefinitionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/operationdefinition/resolver.js b/src/resources/3_0_1/profiles/operationdefinition/resolver.js index 6f7949e7..3760e636 100644 --- a/src/resources/3_0_1/profiles/operationdefinition/resolver.js +++ b/src/resources/3_0_1/profiles/operationdefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.operationdefinitionResolver + * @name exports.getOperationDefinition * @static - * @summary OperationDefinition Resolver. + * @summary OperationDefinition resolver. */ -module.exports.operationdefinitionResolver = function operationdefinitionResolver( +module.exports.getOperationDefinition = function getOperationDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionListResolver + * @name exports.getOperationDefinitionList * @static - * @summary OperationDefinition List Resolver. + * @summary OperationDefinition list resolver. */ -module.exports.operationdefinitionListResolver = function operationdefinitionListResolver( +module.exports.getOperationDefinitionList = function getOperationDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionInstanceResolver + * @name exports.getOperationDefinitionInstance * @static - * @summary OperationDefinition Instance Resolver. + * @summary OperationDefinition instance resolver. */ -module.exports.operationdefinitionInstanceResolver = function operationdefinitionInstanceResolver( +module.exports.getOperationDefinitionInstance = function getOperationDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionCreateResolver + * @name exports.createOperationDefinition * @static - * @summary OperationDefinition Create Resolver. + * @summary Create OperationDefinition resolver. */ -module.exports.operationdefinitionCreateResolver = function operationdefinitionCreateResolver( +module.exports.createOperationDefinition = function createOperationDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionUpdateResolver + * @name exports.updateOperationDefinition * @static - * @summary OperationDefinition Update Resolver. + * @summary Update OperationDefinition resolver. */ -module.exports.operationdefinitionUpdateResolver = function operationdefinitionUpdateResolver( +module.exports.updateOperationDefinition = function updateOperationDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.operationdefinitionDeleteResolver + * @name exports.removeOperationDefinition * @static - * @summary OperationDefinition Delete Resolver. + * @summary Remove OperationDefinition resolver. */ -module.exports.operationdefinitionDeleteResolver = function operationdefinitionDeleteResolver( +module.exports.removeOperationDefinition = function removeOperationDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/organization/mutation.js b/src/resources/3_0_1/profiles/organization/mutation.js index dafe4ee6..8c814030 100644 --- a/src/resources/3_0_1/profiles/organization/mutation.js +++ b/src/resources/3_0_1/profiles/organization/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const OrganizationSchema = require('../../schemas/organization.schema'); +const OrganizationSchema = require('../../schemas/organization.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const OrganizationInput = require('../../inputs/organization.input'); +const OrganizationInput = require('../../inputs/organization.input.js'); -// Resolvers -const { - organizationCreateResolver, - organizationUpdateResolver, - organizationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createOrganization, + updateOrganization, + removeOrganization, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Organization', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Organization record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Organization record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.OrganizationCreateMutation - * @summary OrganizationCreate Mutation. + * @summary OrganizationCreate mutation. */ module.exports.OrganizationCreateMutation = { - args: WriteArgs, - description: 'Create a Organization', - resolve: scopeInvariant(scopeOptions, organizationCreateResolver), + description: 'Create a Organization record', + resolve: scopeInvariant(scopeOptions, createOrganization), type: OrganizationSchema, + args: WriteArgs, }; /** * @name exports.OrganizationUpdateMutation - * @summary OrganizationUpdate Mutation. + * @summary OrganizationUpdate mutation. */ module.exports.OrganizationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Organizations', - resolve: scopeInvariant(scopeOptions, organizationUpdateResolver), + description: 'Update a Organization record', + resolve: scopeInvariant(scopeOptions, updateOrganization), type: OrganizationSchema, + args: WriteArgs, }; /** - * @name exports.OrganizationDeleteMutation - * @summary OrganizationDelete Mutation. + * @name exports.OrganizationRemoveMutation + * @summary OrganizationRemove mutation. */ -module.exports.OrganizationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Organization', - resolve: scopeInvariant(scopeOptions, organizationDeleteResolver), +module.exports.OrganizationRemoveMutation = { + description: 'Remove a Organization record', + resolve: scopeInvariant(scopeOptions, removeOrganization), type: OrganizationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/organization/query.js b/src/resources/3_0_1/profiles/organization/query.js index 9219dd42..4ae4aa63 100644 --- a/src/resources/3_0_1/profiles/organization/query.js +++ b/src/resources/3_0_1/profiles/organization/query.js @@ -1,55 +1,65 @@ // Schemas -const OrganizationSchema = require('../../schemas/organization.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OrganizationSchema = require('../../schemas/organization.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const OrganizationArgs = require('../../parameters/organization.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const OrganizationArgs = require('../../parameters/organization.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + OrganizationArgs, +); // Resolvers const { - organizationResolver, - organizationListResolver, - organizationInstanceResolver, + getOrganization, + getOrganizationList, + getOrganizationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Organization', action: 'read', - version: '3_0_1', }; /** * @name exports.OrganizationQuery - * @summary Organization Query. + * @summary Organization query. */ module.exports.OrganizationQuery = { - args: Object.assign({}, CommonArgs, OrganizationArgs), description: 'Query for a single Organization', - resolve: scopeInvariant(scopeOptions, organizationResolver), + resolve: scopeInvariant(scopeOptions, getOrganization), type: OrganizationSchema, + args: args, }; /** * @name exports.OrganizationListQuery - * @summary OrganizationList Query. + * @summary Organization query. */ module.exports.OrganizationListQuery = { - args: Object.assign({}, CommonArgs, OrganizationArgs), - description: 'Query for multiple Organizations', - resolve: scopeInvariant(scopeOptions, organizationListResolver), + description: 'Query for a more than or just one Organization', + resolve: scopeInvariant(scopeOptions, getOrganizationList), type: BundleSchema, + args: args, }; /** * @name exports.OrganizationInstanceQuery - * @summary OrganizationInstance Query. + * @summary Organization query. */ module.exports.OrganizationInstanceQuery = { - description: 'Get information about a single Organization', - resolve: scopeInvariant(scopeOptions, organizationInstanceResolver), + description: 'Access information about a single Organization', + resolve: scopeInvariant(scopeOptions, getOrganizationInstance), type: OrganizationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/organization/index.js b/src/resources/3_0_1/profiles/organization/register.js similarity index 92% rename from src/resources/3_0_1/profiles/organization/index.js rename to src/resources/3_0_1/profiles/organization/register.js index 2a551052..10a5fb2a 100644 --- a/src/resources/3_0_1/profiles/organization/index.js +++ b/src/resources/3_0_1/profiles/organization/register.js @@ -1,15 +1,15 @@ +const { + OrganizationCreateMutation, + OrganizationUpdateMutation, + OrganizationRemoveMutation, +} = require('./mutation'); + const { OrganizationQuery, OrganizationListQuery, OrganizationInstanceQuery, } = require('./query'); -const { - OrganizationCreateMutation, - OrganizationUpdateMutation, - OrganizationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { OrganizationCreate: OrganizationCreateMutation, OrganizationUpdate: OrganizationUpdateMutation, - OrganizationDelete: OrganizationDeleteMutation, + OrganizationRemove: OrganizationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Organization', path: '/3_0_1/Organization/:id', query: OrganizationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/organization/resolver.js b/src/resources/3_0_1/profiles/organization/resolver.js index b770ad12..4cba8d20 100644 --- a/src/resources/3_0_1/profiles/organization/resolver.js +++ b/src/resources/3_0_1/profiles/organization/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.organizationResolver + * @name exports.getOrganization * @static - * @summary Organization Resolver. + * @summary Organization resolver. */ -module.exports.organizationResolver = function organizationResolver( +module.exports.getOrganization = function getOrganization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationListResolver + * @name exports.getOrganizationList * @static - * @summary Organization List Resolver. + * @summary Organization list resolver. */ -module.exports.organizationListResolver = function organizationListResolver( +module.exports.getOrganizationList = function getOrganizationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationInstanceResolver + * @name exports.getOrganizationInstance * @static - * @summary Organization Instance Resolver. + * @summary Organization instance resolver. */ -module.exports.organizationInstanceResolver = function organizationInstanceResolver( +module.exports.getOrganizationInstance = function getOrganizationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationCreateResolver + * @name exports.createOrganization * @static - * @summary Organization Create Resolver. + * @summary Create Organization resolver. */ -module.exports.organizationCreateResolver = function organizationCreateResolver( +module.exports.createOrganization = function createOrganization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationUpdateResolver + * @name exports.updateOrganization * @static - * @summary Organization Update Resolver. + * @summary Update Organization resolver. */ -module.exports.organizationUpdateResolver = function organizationUpdateResolver( +module.exports.updateOrganization = function updateOrganization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.organizationDeleteResolver + * @name exports.removeOrganization * @static - * @summary Organization Delete Resolver. + * @summary Remove Organization resolver. */ -module.exports.organizationDeleteResolver = function organizationDeleteResolver( +module.exports.removeOrganization = function removeOrganization( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/patient/mutation.js b/src/resources/3_0_1/profiles/patient/mutation.js index dd648e65..7fb77ec6 100644 --- a/src/resources/3_0_1/profiles/patient/mutation.js +++ b/src/resources/3_0_1/profiles/patient/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PatientSchema = require('../../schemas/patient.schema'); +const PatientSchema = require('../../schemas/patient.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PatientInput = require('../../inputs/patient.input'); +const PatientInput = require('../../inputs/patient.input.js'); -// Resolvers -const { - patientCreateResolver, - patientUpdateResolver, - patientDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createPatient, updatePatient, removePatient } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Patient', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Patient record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Patient record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.PatientCreateMutation - * @summary PatientCreate Mutation. + * @summary PatientCreate mutation. */ module.exports.PatientCreateMutation = { - args: WriteArgs, - description: 'Create a Patient', - resolve: scopeInvariant(scopeOptions, patientCreateResolver), + description: 'Create a Patient record', + resolve: scopeInvariant(scopeOptions, createPatient), type: PatientSchema, + args: WriteArgs, }; /** * @name exports.PatientUpdateMutation - * @summary PatientUpdate Mutation. + * @summary PatientUpdate mutation. */ module.exports.PatientUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Patients', - resolve: scopeInvariant(scopeOptions, patientUpdateResolver), + description: 'Update a Patient record', + resolve: scopeInvariant(scopeOptions, updatePatient), type: PatientSchema, + args: WriteArgs, }; /** - * @name exports.PatientDeleteMutation - * @summary PatientDelete Mutation. + * @name exports.PatientRemoveMutation + * @summary PatientRemove mutation. */ -module.exports.PatientDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Patient', - resolve: scopeInvariant(scopeOptions, patientDeleteResolver), +module.exports.PatientRemoveMutation = { + description: 'Remove a Patient record', + resolve: scopeInvariant(scopeOptions, removePatient), type: PatientSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/patient/query.js b/src/resources/3_0_1/profiles/patient/query.js index e1c7ea1b..16031145 100644 --- a/src/resources/3_0_1/profiles/patient/query.js +++ b/src/resources/3_0_1/profiles/patient/query.js @@ -1,55 +1,60 @@ // Schemas -const PatientSchema = require('../../schemas/patient.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PatientSchema = require('../../schemas/patient.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PatientArgs = require('../../parameters/patient.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PatientArgs = require('../../parameters/patient.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, PatientArgs); // Resolvers const { - patientResolver, - patientListResolver, - patientInstanceResolver, + getPatient, + getPatientList, + getPatientInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Patient', action: 'read', - version: '3_0_1', }; /** * @name exports.PatientQuery - * @summary Patient Query. + * @summary Patient query. */ module.exports.PatientQuery = { - args: Object.assign({}, CommonArgs, PatientArgs), description: 'Query for a single Patient', - resolve: scopeInvariant(scopeOptions, patientResolver), + resolve: scopeInvariant(scopeOptions, getPatient), type: PatientSchema, + args: args, }; /** * @name exports.PatientListQuery - * @summary PatientList Query. + * @summary Patient query. */ module.exports.PatientListQuery = { - args: Object.assign({}, CommonArgs, PatientArgs), - description: 'Query for multiple Patients', - resolve: scopeInvariant(scopeOptions, patientListResolver), + description: 'Query for a more than or just one Patient', + resolve: scopeInvariant(scopeOptions, getPatientList), type: BundleSchema, + args: args, }; /** * @name exports.PatientInstanceQuery - * @summary PatientInstance Query. + * @summary Patient query. */ module.exports.PatientInstanceQuery = { - description: 'Get information about a single Patient', - resolve: scopeInvariant(scopeOptions, patientInstanceResolver), + description: 'Access information about a single Patient', + resolve: scopeInvariant(scopeOptions, getPatientInstance), type: PatientSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/patient/index.js b/src/resources/3_0_1/profiles/patient/register.js similarity index 92% rename from src/resources/3_0_1/profiles/patient/index.js rename to src/resources/3_0_1/profiles/patient/register.js index 1e28918f..8d1c31db 100644 --- a/src/resources/3_0_1/profiles/patient/index.js +++ b/src/resources/3_0_1/profiles/patient/register.js @@ -1,15 +1,15 @@ +const { + PatientCreateMutation, + PatientUpdateMutation, + PatientRemoveMutation, +} = require('./mutation'); + const { PatientQuery, PatientListQuery, PatientInstanceQuery, } = require('./query'); -const { - PatientCreateMutation, - PatientUpdateMutation, - PatientDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PatientCreate: PatientCreateMutation, PatientUpdate: PatientUpdateMutation, - PatientDelete: PatientDeleteMutation, + PatientRemove: PatientRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Patient', path: '/3_0_1/Patient/:id', query: PatientInstanceQuery, diff --git a/src/resources/3_0_1/profiles/patient/resolver.js b/src/resources/3_0_1/profiles/patient/resolver.js index 9092516a..c717b007 100644 --- a/src/resources/3_0_1/profiles/patient/resolver.js +++ b/src/resources/3_0_1/profiles/patient/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.patientResolver + * @name exports.getPatient * @static - * @summary Patient Resolver. + * @summary Patient resolver. */ -module.exports.patientResolver = function patientResolver( +module.exports.getPatient = function getPatient( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientListResolver + * @name exports.getPatientList * @static - * @summary Patient List Resolver. + * @summary Patient list resolver. */ -module.exports.patientListResolver = function patientListResolver( +module.exports.getPatientList = function getPatientList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientInstanceResolver + * @name exports.getPatientInstance * @static - * @summary Patient Instance Resolver. + * @summary Patient instance resolver. */ -module.exports.patientInstanceResolver = function patientInstanceResolver( +module.exports.getPatientInstance = function getPatientInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientCreateResolver + * @name exports.createPatient * @static - * @summary Patient Create Resolver. + * @summary Create Patient resolver. */ -module.exports.patientCreateResolver = function patientCreateResolver( +module.exports.createPatient = function createPatient( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientUpdateResolver + * @name exports.updatePatient * @static - * @summary Patient Update Resolver. + * @summary Update Patient resolver. */ -module.exports.patientUpdateResolver = function patientUpdateResolver( +module.exports.updatePatient = function updatePatient( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.patientDeleteResolver + * @name exports.removePatient * @static - * @summary Patient Delete Resolver. + * @summary Remove Patient resolver. */ -module.exports.patientDeleteResolver = function patientDeleteResolver( +module.exports.removePatient = function removePatient( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/paymentnotice/mutation.js b/src/resources/3_0_1/profiles/paymentnotice/mutation.js index d805dec5..38435974 100644 --- a/src/resources/3_0_1/profiles/paymentnotice/mutation.js +++ b/src/resources/3_0_1/profiles/paymentnotice/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema'); +const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PaymentNoticeInput = require('../../inputs/paymentnotice.input'); +const PaymentNoticeInput = require('../../inputs/paymentnotice.input.js'); -// Resolvers -const { - paymentnoticeCreateResolver, - paymentnoticeUpdateResolver, - paymentnoticeDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createPaymentNotice, + updatePaymentNotice, + removePaymentNotice, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PaymentNotice', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a PaymentNotice record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a PaymentNotice record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.PaymentNoticeCreateMutation - * @summary PaymentNoticeCreate Mutation. + * @summary PaymentNoticeCreate mutation. */ module.exports.PaymentNoticeCreateMutation = { - args: WriteArgs, - description: 'Create a PaymentNotice', - resolve: scopeInvariant(scopeOptions, paymentnoticeCreateResolver), + description: 'Create a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, createPaymentNotice), type: PaymentNoticeSchema, + args: WriteArgs, }; /** * @name exports.PaymentNoticeUpdateMutation - * @summary PaymentNoticeUpdate Mutation. + * @summary PaymentNoticeUpdate mutation. */ module.exports.PaymentNoticeUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple PaymentNotices', - resolve: scopeInvariant(scopeOptions, paymentnoticeUpdateResolver), + description: 'Update a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, updatePaymentNotice), type: PaymentNoticeSchema, + args: WriteArgs, }; /** - * @name exports.PaymentNoticeDeleteMutation - * @summary PaymentNoticeDelete Mutation. + * @name exports.PaymentNoticeRemoveMutation + * @summary PaymentNoticeRemove mutation. */ -module.exports.PaymentNoticeDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single PaymentNotice', - resolve: scopeInvariant(scopeOptions, paymentnoticeDeleteResolver), +module.exports.PaymentNoticeRemoveMutation = { + description: 'Remove a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, removePaymentNotice), type: PaymentNoticeSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/paymentnotice/query.js b/src/resources/3_0_1/profiles/paymentnotice/query.js index 20e19d27..a5cd0ddd 100644 --- a/src/resources/3_0_1/profiles/paymentnotice/query.js +++ b/src/resources/3_0_1/profiles/paymentnotice/query.js @@ -1,55 +1,65 @@ // Schemas -const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PaymentNoticeArgs = require('../../parameters/paymentnotice.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PaymentNoticeArgs = require('../../parameters/paymentnotice.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PaymentNoticeArgs, +); // Resolvers const { - paymentnoticeResolver, - paymentnoticeListResolver, - paymentnoticeInstanceResolver, + getPaymentNotice, + getPaymentNoticeList, + getPaymentNoticeInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PaymentNotice', action: 'read', - version: '3_0_1', }; /** * @name exports.PaymentNoticeQuery - * @summary PaymentNotice Query. + * @summary PaymentNotice query. */ module.exports.PaymentNoticeQuery = { - args: Object.assign({}, CommonArgs, PaymentNoticeArgs), description: 'Query for a single PaymentNotice', - resolve: scopeInvariant(scopeOptions, paymentnoticeResolver), + resolve: scopeInvariant(scopeOptions, getPaymentNotice), type: PaymentNoticeSchema, + args: args, }; /** * @name exports.PaymentNoticeListQuery - * @summary PaymentNoticeList Query. + * @summary PaymentNotice query. */ module.exports.PaymentNoticeListQuery = { - args: Object.assign({}, CommonArgs, PaymentNoticeArgs), - description: 'Query for multiple PaymentNotices', - resolve: scopeInvariant(scopeOptions, paymentnoticeListResolver), + description: 'Query for a more than or just one PaymentNotice', + resolve: scopeInvariant(scopeOptions, getPaymentNoticeList), type: BundleSchema, + args: args, }; /** * @name exports.PaymentNoticeInstanceQuery - * @summary PaymentNoticeInstance Query. + * @summary PaymentNotice query. */ module.exports.PaymentNoticeInstanceQuery = { - description: 'Get information about a single PaymentNotice', - resolve: scopeInvariant(scopeOptions, paymentnoticeInstanceResolver), + description: 'Access information about a single PaymentNotice', + resolve: scopeInvariant(scopeOptions, getPaymentNoticeInstance), type: PaymentNoticeSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/paymentnotice/index.js b/src/resources/3_0_1/profiles/paymentnotice/register.js similarity index 92% rename from src/resources/3_0_1/profiles/paymentnotice/index.js rename to src/resources/3_0_1/profiles/paymentnotice/register.js index 2a1cc62a..9350a080 100644 --- a/src/resources/3_0_1/profiles/paymentnotice/index.js +++ b/src/resources/3_0_1/profiles/paymentnotice/register.js @@ -1,15 +1,15 @@ +const { + PaymentNoticeCreateMutation, + PaymentNoticeUpdateMutation, + PaymentNoticeRemoveMutation, +} = require('./mutation'); + const { PaymentNoticeQuery, PaymentNoticeListQuery, PaymentNoticeInstanceQuery, } = require('./query'); -const { - PaymentNoticeCreateMutation, - PaymentNoticeUpdateMutation, - PaymentNoticeDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PaymentNoticeCreate: PaymentNoticeCreateMutation, PaymentNoticeUpdate: PaymentNoticeUpdateMutation, - PaymentNoticeDelete: PaymentNoticeDeleteMutation, + PaymentNoticeRemove: PaymentNoticeRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'PaymentNotice', path: '/3_0_1/PaymentNotice/:id', query: PaymentNoticeInstanceQuery, diff --git a/src/resources/3_0_1/profiles/paymentnotice/resolver.js b/src/resources/3_0_1/profiles/paymentnotice/resolver.js index 353a241f..4522c307 100644 --- a/src/resources/3_0_1/profiles/paymentnotice/resolver.js +++ b/src/resources/3_0_1/profiles/paymentnotice/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.paymentnoticeResolver + * @name exports.getPaymentNotice * @static - * @summary PaymentNotice Resolver. + * @summary PaymentNotice resolver. */ -module.exports.paymentnoticeResolver = function paymentnoticeResolver( +module.exports.getPaymentNotice = function getPaymentNotice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeListResolver + * @name exports.getPaymentNoticeList * @static - * @summary PaymentNotice List Resolver. + * @summary PaymentNotice list resolver. */ -module.exports.paymentnoticeListResolver = function paymentnoticeListResolver( +module.exports.getPaymentNoticeList = function getPaymentNoticeList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeInstanceResolver + * @name exports.getPaymentNoticeInstance * @static - * @summary PaymentNotice Instance Resolver. + * @summary PaymentNotice instance resolver. */ -module.exports.paymentnoticeInstanceResolver = function paymentnoticeInstanceResolver( +module.exports.getPaymentNoticeInstance = function getPaymentNoticeInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeCreateResolver + * @name exports.createPaymentNotice * @static - * @summary PaymentNotice Create Resolver. + * @summary Create PaymentNotice resolver. */ -module.exports.paymentnoticeCreateResolver = function paymentnoticeCreateResolver( +module.exports.createPaymentNotice = function createPaymentNotice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeUpdateResolver + * @name exports.updatePaymentNotice * @static - * @summary PaymentNotice Update Resolver. + * @summary Update PaymentNotice resolver. */ -module.exports.paymentnoticeUpdateResolver = function paymentnoticeUpdateResolver( +module.exports.updatePaymentNotice = function updatePaymentNotice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentnoticeDeleteResolver + * @name exports.removePaymentNotice * @static - * @summary PaymentNotice Delete Resolver. + * @summary Remove PaymentNotice resolver. */ -module.exports.paymentnoticeDeleteResolver = function paymentnoticeDeleteResolver( +module.exports.removePaymentNotice = function removePaymentNotice( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/paymentreconciliation/mutation.js b/src/resources/3_0_1/profiles/paymentreconciliation/mutation.js index 71388bf5..be1e601c 100644 --- a/src/resources/3_0_1/profiles/paymentreconciliation/mutation.js +++ b/src/resources/3_0_1/profiles/paymentreconciliation/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema'); +const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PaymentReconciliationInput = require('../../inputs/paymentreconciliation.input'); +const PaymentReconciliationInput = require('../../inputs/paymentreconciliation.input.js'); -// Resolvers -const { - paymentreconciliationCreateResolver, - paymentreconciliationUpdateResolver, - paymentreconciliationDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createPaymentReconciliation, + updatePaymentReconciliation, + removePaymentReconciliation, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PaymentReconciliation', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a PaymentReconciliation record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a PaymentReconciliation record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.PaymentReconciliationCreateMutation - * @summary PaymentReconciliationCreate Mutation. + * @summary PaymentReconciliationCreate mutation. */ module.exports.PaymentReconciliationCreateMutation = { - args: WriteArgs, - description: 'Create a PaymentReconciliation', - resolve: scopeInvariant(scopeOptions, paymentreconciliationCreateResolver), + description: 'Create a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, createPaymentReconciliation), type: PaymentReconciliationSchema, + args: WriteArgs, }; /** * @name exports.PaymentReconciliationUpdateMutation - * @summary PaymentReconciliationUpdate Mutation. + * @summary PaymentReconciliationUpdate mutation. */ module.exports.PaymentReconciliationUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple PaymentReconciliations', - resolve: scopeInvariant(scopeOptions, paymentreconciliationUpdateResolver), + description: 'Update a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, updatePaymentReconciliation), type: PaymentReconciliationSchema, + args: WriteArgs, }; /** - * @name exports.PaymentReconciliationDeleteMutation - * @summary PaymentReconciliationDelete Mutation. + * @name exports.PaymentReconciliationRemoveMutation + * @summary PaymentReconciliationRemove mutation. */ -module.exports.PaymentReconciliationDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single PaymentReconciliation', - resolve: scopeInvariant(scopeOptions, paymentreconciliationDeleteResolver), +module.exports.PaymentReconciliationRemoveMutation = { + description: 'Remove a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, removePaymentReconciliation), type: PaymentReconciliationSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/paymentreconciliation/query.js b/src/resources/3_0_1/profiles/paymentreconciliation/query.js index 63a32fe1..11849c62 100644 --- a/src/resources/3_0_1/profiles/paymentreconciliation/query.js +++ b/src/resources/3_0_1/profiles/paymentreconciliation/query.js @@ -1,55 +1,65 @@ // Schemas -const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PaymentReconciliationArgs = require('../../parameters/paymentreconciliation.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PaymentReconciliationArgs = require('../../parameters/paymentreconciliation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PaymentReconciliationArgs, +); // Resolvers const { - paymentreconciliationResolver, - paymentreconciliationListResolver, - paymentreconciliationInstanceResolver, + getPaymentReconciliation, + getPaymentReconciliationList, + getPaymentReconciliationInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PaymentReconciliation', action: 'read', - version: '3_0_1', }; /** * @name exports.PaymentReconciliationQuery - * @summary PaymentReconciliation Query. + * @summary PaymentReconciliation query. */ module.exports.PaymentReconciliationQuery = { - args: Object.assign({}, CommonArgs, PaymentReconciliationArgs), description: 'Query for a single PaymentReconciliation', - resolve: scopeInvariant(scopeOptions, paymentreconciliationResolver), + resolve: scopeInvariant(scopeOptions, getPaymentReconciliation), type: PaymentReconciliationSchema, + args: args, }; /** * @name exports.PaymentReconciliationListQuery - * @summary PaymentReconciliationList Query. + * @summary PaymentReconciliation query. */ module.exports.PaymentReconciliationListQuery = { - args: Object.assign({}, CommonArgs, PaymentReconciliationArgs), - description: 'Query for multiple PaymentReconciliations', - resolve: scopeInvariant(scopeOptions, paymentreconciliationListResolver), + description: 'Query for a more than or just one PaymentReconciliation', + resolve: scopeInvariant(scopeOptions, getPaymentReconciliationList), type: BundleSchema, + args: args, }; /** * @name exports.PaymentReconciliationInstanceQuery - * @summary PaymentReconciliationInstance Query. + * @summary PaymentReconciliation query. */ module.exports.PaymentReconciliationInstanceQuery = { - description: 'Get information about a single PaymentReconciliation', - resolve: scopeInvariant(scopeOptions, paymentreconciliationInstanceResolver), + description: 'Access information about a single PaymentReconciliation', + resolve: scopeInvariant(scopeOptions, getPaymentReconciliationInstance), type: PaymentReconciliationSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/paymentreconciliation/index.js b/src/resources/3_0_1/profiles/paymentreconciliation/register.js similarity index 91% rename from src/resources/3_0_1/profiles/paymentreconciliation/index.js rename to src/resources/3_0_1/profiles/paymentreconciliation/register.js index f1f9ac45..42a78b93 100644 --- a/src/resources/3_0_1/profiles/paymentreconciliation/index.js +++ b/src/resources/3_0_1/profiles/paymentreconciliation/register.js @@ -1,15 +1,15 @@ +const { + PaymentReconciliationCreateMutation, + PaymentReconciliationUpdateMutation, + PaymentReconciliationRemoveMutation, +} = require('./mutation'); + const { PaymentReconciliationQuery, PaymentReconciliationListQuery, PaymentReconciliationInstanceQuery, } = require('./query'); -const { - PaymentReconciliationCreateMutation, - PaymentReconciliationUpdateMutation, - PaymentReconciliationDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PaymentReconciliationCreate: PaymentReconciliationCreateMutation, PaymentReconciliationUpdate: PaymentReconciliationUpdateMutation, - PaymentReconciliationDelete: PaymentReconciliationDeleteMutation, + PaymentReconciliationRemove: PaymentReconciliationRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'PaymentReconciliation', path: '/3_0_1/PaymentReconciliation/:id', query: PaymentReconciliationInstanceQuery, diff --git a/src/resources/3_0_1/profiles/paymentreconciliation/resolver.js b/src/resources/3_0_1/profiles/paymentreconciliation/resolver.js index 6c550306..8b6e5bb1 100644 --- a/src/resources/3_0_1/profiles/paymentreconciliation/resolver.js +++ b/src/resources/3_0_1/profiles/paymentreconciliation/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.paymentreconciliationResolver + * @name exports.getPaymentReconciliation * @static - * @summary PaymentReconciliation Resolver. + * @summary PaymentReconciliation resolver. */ -module.exports.paymentreconciliationResolver = function paymentreconciliationResolver( +module.exports.getPaymentReconciliation = function getPaymentReconciliation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationListResolver + * @name exports.getPaymentReconciliationList * @static - * @summary PaymentReconciliation List Resolver. + * @summary PaymentReconciliation list resolver. */ -module.exports.paymentreconciliationListResolver = function paymentreconciliationListResolver( +module.exports.getPaymentReconciliationList = function getPaymentReconciliationList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationInstanceResolver + * @name exports.getPaymentReconciliationInstance * @static - * @summary PaymentReconciliation Instance Resolver. + * @summary PaymentReconciliation instance resolver. */ -module.exports.paymentreconciliationInstanceResolver = function paymentreconciliationInstanceResolver( +module.exports.getPaymentReconciliationInstance = function getPaymentReconciliationInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationCreateResolver + * @name exports.createPaymentReconciliation * @static - * @summary PaymentReconciliation Create Resolver. + * @summary Create PaymentReconciliation resolver. */ -module.exports.paymentreconciliationCreateResolver = function paymentreconciliationCreateResolver( +module.exports.createPaymentReconciliation = function createPaymentReconciliation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationUpdateResolver + * @name exports.updatePaymentReconciliation * @static - * @summary PaymentReconciliation Update Resolver. + * @summary Update PaymentReconciliation resolver. */ -module.exports.paymentreconciliationUpdateResolver = function paymentreconciliationUpdateResolver( +module.exports.updatePaymentReconciliation = function updatePaymentReconciliation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.paymentreconciliationDeleteResolver + * @name exports.removePaymentReconciliation * @static - * @summary PaymentReconciliation Delete Resolver. + * @summary Remove PaymentReconciliation resolver. */ -module.exports.paymentreconciliationDeleteResolver = function paymentreconciliationDeleteResolver( +module.exports.removePaymentReconciliation = function removePaymentReconciliation( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/person/mutation.js b/src/resources/3_0_1/profiles/person/mutation.js index cbca0355..0f6cedbd 100644 --- a/src/resources/3_0_1/profiles/person/mutation.js +++ b/src/resources/3_0_1/profiles/person/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PersonSchema = require('../../schemas/person.schema'); +const PersonSchema = require('../../schemas/person.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PersonInput = require('../../inputs/person.input'); +const PersonInput = require('../../inputs/person.input.js'); -// Resolvers -const { - personCreateResolver, - personUpdateResolver, - personDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createPerson, updatePerson, removePerson } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Person', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Person record.', }, resource: { @@ -39,7 +36,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Person record for deletion.', }, @@ -47,33 +44,33 @@ let DeleteArgs = { /** * @name exports.PersonCreateMutation - * @summary PersonCreate Mutation. + * @summary PersonCreate mutation. */ module.exports.PersonCreateMutation = { - args: WriteArgs, - description: 'Create a Person', - resolve: scopeInvariant(scopeOptions, personCreateResolver), + description: 'Create a Person record', + resolve: scopeInvariant(scopeOptions, createPerson), type: PersonSchema, + args: WriteArgs, }; /** * @name exports.PersonUpdateMutation - * @summary PersonUpdate Mutation. + * @summary PersonUpdate mutation. */ module.exports.PersonUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Persons', - resolve: scopeInvariant(scopeOptions, personUpdateResolver), + description: 'Update a Person record', + resolve: scopeInvariant(scopeOptions, updatePerson), type: PersonSchema, + args: WriteArgs, }; /** - * @name exports.PersonDeleteMutation - * @summary PersonDelete Mutation. + * @name exports.PersonRemoveMutation + * @summary PersonRemove mutation. */ -module.exports.PersonDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Person', - resolve: scopeInvariant(scopeOptions, personDeleteResolver), +module.exports.PersonRemoveMutation = { + description: 'Remove a Person record', + resolve: scopeInvariant(scopeOptions, removePerson), type: PersonSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/person/query.js b/src/resources/3_0_1/profiles/person/query.js index 96a4faa3..310b2990 100644 --- a/src/resources/3_0_1/profiles/person/query.js +++ b/src/resources/3_0_1/profiles/person/query.js @@ -1,55 +1,56 @@ // Schemas -const PersonSchema = require('../../schemas/person.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PersonSchema = require('../../schemas/person.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PersonArgs = require('../../parameters/person.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PersonArgs = require('../../parameters/person.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, PersonArgs); // Resolvers -const { - personResolver, - personListResolver, - personInstanceResolver, -} = require('./resolver'); +const { getPerson, getPersonList, getPersonInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Person', action: 'read', - version: '3_0_1', }; /** * @name exports.PersonQuery - * @summary Person Query. + * @summary Person query. */ module.exports.PersonQuery = { - args: Object.assign({}, CommonArgs, PersonArgs), description: 'Query for a single Person', - resolve: scopeInvariant(scopeOptions, personResolver), + resolve: scopeInvariant(scopeOptions, getPerson), type: PersonSchema, + args: args, }; /** * @name exports.PersonListQuery - * @summary PersonList Query. + * @summary Person query. */ module.exports.PersonListQuery = { - args: Object.assign({}, CommonArgs, PersonArgs), - description: 'Query for multiple Persons', - resolve: scopeInvariant(scopeOptions, personListResolver), + description: 'Query for a more than or just one Person', + resolve: scopeInvariant(scopeOptions, getPersonList), type: BundleSchema, + args: args, }; /** * @name exports.PersonInstanceQuery - * @summary PersonInstance Query. + * @summary Person query. */ module.exports.PersonInstanceQuery = { - description: 'Get information about a single Person', - resolve: scopeInvariant(scopeOptions, personInstanceResolver), + description: 'Access information about a single Person', + resolve: scopeInvariant(scopeOptions, getPersonInstance), type: PersonSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/person/index.js b/src/resources/3_0_1/profiles/person/register.js similarity index 93% rename from src/resources/3_0_1/profiles/person/index.js rename to src/resources/3_0_1/profiles/person/register.js index 9bb472f3..4b5ce1a0 100644 --- a/src/resources/3_0_1/profiles/person/index.js +++ b/src/resources/3_0_1/profiles/person/register.js @@ -1,15 +1,15 @@ +const { + PersonCreateMutation, + PersonUpdateMutation, + PersonRemoveMutation, +} = require('./mutation'); + const { PersonQuery, PersonListQuery, PersonInstanceQuery, } = require('./query'); -const { - PersonCreateMutation, - PersonUpdateMutation, - PersonDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PersonCreate: PersonCreateMutation, PersonUpdate: PersonUpdateMutation, - PersonDelete: PersonDeleteMutation, + PersonRemove: PersonRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Person', path: '/3_0_1/Person/:id', query: PersonInstanceQuery, diff --git a/src/resources/3_0_1/profiles/person/resolver.js b/src/resources/3_0_1/profiles/person/resolver.js index 442ec0ed..bfba2b56 100644 --- a/src/resources/3_0_1/profiles/person/resolver.js +++ b/src/resources/3_0_1/profiles/person/resolver.js @@ -1,91 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.personResolver + * @name exports.getPerson * @static - * @summary Person Resolver. + * @summary Person resolver. */ -module.exports.personResolver = function personResolver( - root, - args, - context, - info, -) { - let { server, req, res, version } = context; +module.exports.getPerson = function getPerson(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personListResolver + * @name exports.getPersonList * @static - * @summary Person List Resolver. + * @summary Person list resolver. */ -module.exports.personListResolver = function personListResolver( +module.exports.getPersonList = function getPersonList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personInstanceResolver + * @name exports.getPersonInstance * @static - * @summary Person Instance Resolver. + * @summary Person instance resolver. */ -module.exports.personInstanceResolver = function personInstanceResolver( +module.exports.getPersonInstance = function getPersonInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personCreateResolver + * @name exports.createPerson * @static - * @summary Person Create Resolver. + * @summary Create Person resolver. */ -module.exports.personCreateResolver = function personCreateResolver( +module.exports.createPerson = function createPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personUpdateResolver + * @name exports.updatePerson * @static - * @summary Person Update Resolver. + * @summary Update Person resolver. */ -module.exports.personUpdateResolver = function personUpdateResolver( +module.exports.updatePerson = function updatePerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.personDeleteResolver + * @name exports.removePerson * @static - * @summary Person Delete Resolver. + * @summary Remove Person resolver. */ -module.exports.personDeleteResolver = function personDeleteResolver( +module.exports.removePerson = function removePerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/plandefinition/mutation.js b/src/resources/3_0_1/profiles/plandefinition/mutation.js index efbc4e7d..0370a91a 100644 --- a/src/resources/3_0_1/profiles/plandefinition/mutation.js +++ b/src/resources/3_0_1/profiles/plandefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PlanDefinitionSchema = require('../../schemas/plandefinition.schema'); +const PlanDefinitionSchema = require('../../schemas/plandefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PlanDefinitionInput = require('../../inputs/plandefinition.input'); +const PlanDefinitionInput = require('../../inputs/plandefinition.input.js'); -// Resolvers -const { - plandefinitionCreateResolver, - plandefinitionUpdateResolver, - plandefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createPlanDefinition, + updatePlanDefinition, + removePlanDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PlanDefinition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a PlanDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a PlanDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.PlanDefinitionCreateMutation - * @summary PlanDefinitionCreate Mutation. + * @summary PlanDefinitionCreate mutation. */ module.exports.PlanDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a PlanDefinition', - resolve: scopeInvariant(scopeOptions, plandefinitionCreateResolver), + description: 'Create a PlanDefinition record', + resolve: scopeInvariant(scopeOptions, createPlanDefinition), type: PlanDefinitionSchema, + args: WriteArgs, }; /** * @name exports.PlanDefinitionUpdateMutation - * @summary PlanDefinitionUpdate Mutation. + * @summary PlanDefinitionUpdate mutation. */ module.exports.PlanDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple PlanDefinitions', - resolve: scopeInvariant(scopeOptions, plandefinitionUpdateResolver), + description: 'Update a PlanDefinition record', + resolve: scopeInvariant(scopeOptions, updatePlanDefinition), type: PlanDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.PlanDefinitionDeleteMutation - * @summary PlanDefinitionDelete Mutation. + * @name exports.PlanDefinitionRemoveMutation + * @summary PlanDefinitionRemove mutation. */ -module.exports.PlanDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single PlanDefinition', - resolve: scopeInvariant(scopeOptions, plandefinitionDeleteResolver), +module.exports.PlanDefinitionRemoveMutation = { + description: 'Remove a PlanDefinition record', + resolve: scopeInvariant(scopeOptions, removePlanDefinition), type: PlanDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/plandefinition/query.js b/src/resources/3_0_1/profiles/plandefinition/query.js index d65fc26e..cca42b5e 100644 --- a/src/resources/3_0_1/profiles/plandefinition/query.js +++ b/src/resources/3_0_1/profiles/plandefinition/query.js @@ -1,55 +1,65 @@ // Schemas -const PlanDefinitionSchema = require('../../schemas/plandefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PlanDefinitionSchema = require('../../schemas/plandefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PlanDefinitionArgs = require('../../parameters/plandefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PlanDefinitionArgs = require('../../parameters/plandefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PlanDefinitionArgs, +); // Resolvers const { - plandefinitionResolver, - plandefinitionListResolver, - plandefinitionInstanceResolver, + getPlanDefinition, + getPlanDefinitionList, + getPlanDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PlanDefinition', action: 'read', - version: '3_0_1', }; /** * @name exports.PlanDefinitionQuery - * @summary PlanDefinition Query. + * @summary PlanDefinition query. */ module.exports.PlanDefinitionQuery = { - args: Object.assign({}, CommonArgs, PlanDefinitionArgs), description: 'Query for a single PlanDefinition', - resolve: scopeInvariant(scopeOptions, plandefinitionResolver), + resolve: scopeInvariant(scopeOptions, getPlanDefinition), type: PlanDefinitionSchema, + args: args, }; /** * @name exports.PlanDefinitionListQuery - * @summary PlanDefinitionList Query. + * @summary PlanDefinition query. */ module.exports.PlanDefinitionListQuery = { - args: Object.assign({}, CommonArgs, PlanDefinitionArgs), - description: 'Query for multiple PlanDefinitions', - resolve: scopeInvariant(scopeOptions, plandefinitionListResolver), + description: 'Query for a more than or just one PlanDefinition', + resolve: scopeInvariant(scopeOptions, getPlanDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.PlanDefinitionInstanceQuery - * @summary PlanDefinitionInstance Query. + * @summary PlanDefinition query. */ module.exports.PlanDefinitionInstanceQuery = { - description: 'Get information about a single PlanDefinition', - resolve: scopeInvariant(scopeOptions, plandefinitionInstanceResolver), + description: 'Access information about a single PlanDefinition', + resolve: scopeInvariant(scopeOptions, getPlanDefinitionInstance), type: PlanDefinitionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/plandefinition/index.js b/src/resources/3_0_1/profiles/plandefinition/register.js similarity index 92% rename from src/resources/3_0_1/profiles/plandefinition/index.js rename to src/resources/3_0_1/profiles/plandefinition/register.js index d9b2dae5..9d745f9a 100644 --- a/src/resources/3_0_1/profiles/plandefinition/index.js +++ b/src/resources/3_0_1/profiles/plandefinition/register.js @@ -1,15 +1,15 @@ +const { + PlanDefinitionCreateMutation, + PlanDefinitionUpdateMutation, + PlanDefinitionRemoveMutation, +} = require('./mutation'); + const { PlanDefinitionQuery, PlanDefinitionListQuery, PlanDefinitionInstanceQuery, } = require('./query'); -const { - PlanDefinitionCreateMutation, - PlanDefinitionUpdateMutation, - PlanDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PlanDefinitionCreate: PlanDefinitionCreateMutation, PlanDefinitionUpdate: PlanDefinitionUpdateMutation, - PlanDefinitionDelete: PlanDefinitionDeleteMutation, + PlanDefinitionRemove: PlanDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'PlanDefinition', path: '/3_0_1/PlanDefinition/:id', query: PlanDefinitionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/plandefinition/resolver.js b/src/resources/3_0_1/profiles/plandefinition/resolver.js index 29260128..50c6ace3 100644 --- a/src/resources/3_0_1/profiles/plandefinition/resolver.js +++ b/src/resources/3_0_1/profiles/plandefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.plandefinitionResolver + * @name exports.getPlanDefinition * @static - * @summary PlanDefinition Resolver. + * @summary PlanDefinition resolver. */ -module.exports.plandefinitionResolver = function plandefinitionResolver( +module.exports.getPlanDefinition = function getPlanDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.plandefinitionListResolver + * @name exports.getPlanDefinitionList * @static - * @summary PlanDefinition List Resolver. + * @summary PlanDefinition list resolver. */ -module.exports.plandefinitionListResolver = function plandefinitionListResolver( +module.exports.getPlanDefinitionList = function getPlanDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.plandefinitionInstanceResolver + * @name exports.getPlanDefinitionInstance * @static - * @summary PlanDefinition Instance Resolver. + * @summary PlanDefinition instance resolver. */ -module.exports.plandefinitionInstanceResolver = function plandefinitionInstanceResolver( +module.exports.getPlanDefinitionInstance = function getPlanDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.plandefinitionCreateResolver + * @name exports.createPlanDefinition * @static - * @summary PlanDefinition Create Resolver. + * @summary Create PlanDefinition resolver. */ -module.exports.plandefinitionCreateResolver = function plandefinitionCreateResolver( +module.exports.createPlanDefinition = function createPlanDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.plandefinitionUpdateResolver + * @name exports.updatePlanDefinition * @static - * @summary PlanDefinition Update Resolver. + * @summary Update PlanDefinition resolver. */ -module.exports.plandefinitionUpdateResolver = function plandefinitionUpdateResolver( +module.exports.updatePlanDefinition = function updatePlanDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.plandefinitionDeleteResolver + * @name exports.removePlanDefinition * @static - * @summary PlanDefinition Delete Resolver. + * @summary Remove PlanDefinition resolver. */ -module.exports.plandefinitionDeleteResolver = function plandefinitionDeleteResolver( +module.exports.removePlanDefinition = function removePlanDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/practitioner/mutation.js b/src/resources/3_0_1/profiles/practitioner/mutation.js index 4ec96a31..8f7a0280 100644 --- a/src/resources/3_0_1/profiles/practitioner/mutation.js +++ b/src/resources/3_0_1/profiles/practitioner/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PractitionerSchema = require('../../schemas/practitioner.schema'); +const PractitionerSchema = require('../../schemas/practitioner.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PractitionerInput = require('../../inputs/practitioner.input'); +const PractitionerInput = require('../../inputs/practitioner.input.js'); -// Resolvers -const { - practitionerCreateResolver, - practitionerUpdateResolver, - practitionerDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createPractitioner, + updatePractitioner, + removePractitioner, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Practitioner', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Practitioner record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Practitioner record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.PractitionerCreateMutation - * @summary PractitionerCreate Mutation. + * @summary PractitionerCreate mutation. */ module.exports.PractitionerCreateMutation = { - args: WriteArgs, - description: 'Create a Practitioner', - resolve: scopeInvariant(scopeOptions, practitionerCreateResolver), + description: 'Create a Practitioner record', + resolve: scopeInvariant(scopeOptions, createPractitioner), type: PractitionerSchema, + args: WriteArgs, }; /** * @name exports.PractitionerUpdateMutation - * @summary PractitionerUpdate Mutation. + * @summary PractitionerUpdate mutation. */ module.exports.PractitionerUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Practitioners', - resolve: scopeInvariant(scopeOptions, practitionerUpdateResolver), + description: 'Update a Practitioner record', + resolve: scopeInvariant(scopeOptions, updatePractitioner), type: PractitionerSchema, + args: WriteArgs, }; /** - * @name exports.PractitionerDeleteMutation - * @summary PractitionerDelete Mutation. + * @name exports.PractitionerRemoveMutation + * @summary PractitionerRemove mutation. */ -module.exports.PractitionerDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Practitioner', - resolve: scopeInvariant(scopeOptions, practitionerDeleteResolver), +module.exports.PractitionerRemoveMutation = { + description: 'Remove a Practitioner record', + resolve: scopeInvariant(scopeOptions, removePractitioner), type: PractitionerSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/practitioner/query.js b/src/resources/3_0_1/profiles/practitioner/query.js index 802ef71e..fec7038a 100644 --- a/src/resources/3_0_1/profiles/practitioner/query.js +++ b/src/resources/3_0_1/profiles/practitioner/query.js @@ -1,55 +1,65 @@ // Schemas -const PractitionerSchema = require('../../schemas/practitioner.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PractitionerSchema = require('../../schemas/practitioner.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PractitionerArgs = require('../../parameters/practitioner.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PractitionerArgs = require('../../parameters/practitioner.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PractitionerArgs, +); // Resolvers const { - practitionerResolver, - practitionerListResolver, - practitionerInstanceResolver, + getPractitioner, + getPractitionerList, + getPractitionerInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Practitioner', action: 'read', - version: '3_0_1', }; /** * @name exports.PractitionerQuery - * @summary Practitioner Query. + * @summary Practitioner query. */ module.exports.PractitionerQuery = { - args: Object.assign({}, CommonArgs, PractitionerArgs), description: 'Query for a single Practitioner', - resolve: scopeInvariant(scopeOptions, practitionerResolver), + resolve: scopeInvariant(scopeOptions, getPractitioner), type: PractitionerSchema, + args: args, }; /** * @name exports.PractitionerListQuery - * @summary PractitionerList Query. + * @summary Practitioner query. */ module.exports.PractitionerListQuery = { - args: Object.assign({}, CommonArgs, PractitionerArgs), - description: 'Query for multiple Practitioners', - resolve: scopeInvariant(scopeOptions, practitionerListResolver), + description: 'Query for a more than or just one Practitioner', + resolve: scopeInvariant(scopeOptions, getPractitionerList), type: BundleSchema, + args: args, }; /** * @name exports.PractitionerInstanceQuery - * @summary PractitionerInstance Query. + * @summary Practitioner query. */ module.exports.PractitionerInstanceQuery = { - description: 'Get information about a single Practitioner', - resolve: scopeInvariant(scopeOptions, practitionerInstanceResolver), + description: 'Access information about a single Practitioner', + resolve: scopeInvariant(scopeOptions, getPractitionerInstance), type: PractitionerSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/practitioner/index.js b/src/resources/3_0_1/profiles/practitioner/register.js similarity index 92% rename from src/resources/3_0_1/profiles/practitioner/index.js rename to src/resources/3_0_1/profiles/practitioner/register.js index 915b7876..9f6a53a9 100644 --- a/src/resources/3_0_1/profiles/practitioner/index.js +++ b/src/resources/3_0_1/profiles/practitioner/register.js @@ -1,15 +1,15 @@ +const { + PractitionerCreateMutation, + PractitionerUpdateMutation, + PractitionerRemoveMutation, +} = require('./mutation'); + const { PractitionerQuery, PractitionerListQuery, PractitionerInstanceQuery, } = require('./query'); -const { - PractitionerCreateMutation, - PractitionerUpdateMutation, - PractitionerDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PractitionerCreate: PractitionerCreateMutation, PractitionerUpdate: PractitionerUpdateMutation, - PractitionerDelete: PractitionerDeleteMutation, + PractitionerRemove: PractitionerRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Practitioner', path: '/3_0_1/Practitioner/:id', query: PractitionerInstanceQuery, diff --git a/src/resources/3_0_1/profiles/practitioner/resolver.js b/src/resources/3_0_1/profiles/practitioner/resolver.js index 627a5b4a..1f36b115 100644 --- a/src/resources/3_0_1/profiles/practitioner/resolver.js +++ b/src/resources/3_0_1/profiles/practitioner/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.practitionerResolver + * @name exports.getPractitioner * @static - * @summary Practitioner Resolver. + * @summary Practitioner resolver. */ -module.exports.practitionerResolver = function practitionerResolver( +module.exports.getPractitioner = function getPractitioner( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerListResolver + * @name exports.getPractitionerList * @static - * @summary Practitioner List Resolver. + * @summary Practitioner list resolver. */ -module.exports.practitionerListResolver = function practitionerListResolver( +module.exports.getPractitionerList = function getPractitionerList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerInstanceResolver + * @name exports.getPractitionerInstance * @static - * @summary Practitioner Instance Resolver. + * @summary Practitioner instance resolver. */ -module.exports.practitionerInstanceResolver = function practitionerInstanceResolver( +module.exports.getPractitionerInstance = function getPractitionerInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerCreateResolver + * @name exports.createPractitioner * @static - * @summary Practitioner Create Resolver. + * @summary Create Practitioner resolver. */ -module.exports.practitionerCreateResolver = function practitionerCreateResolver( +module.exports.createPractitioner = function createPractitioner( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerUpdateResolver + * @name exports.updatePractitioner * @static - * @summary Practitioner Update Resolver. + * @summary Update Practitioner resolver. */ -module.exports.practitionerUpdateResolver = function practitionerUpdateResolver( +module.exports.updatePractitioner = function updatePractitioner( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerDeleteResolver + * @name exports.removePractitioner * @static - * @summary Practitioner Delete Resolver. + * @summary Remove Practitioner resolver. */ -module.exports.practitionerDeleteResolver = function practitionerDeleteResolver( +module.exports.removePractitioner = function removePractitioner( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/practitionerrole/mutation.js b/src/resources/3_0_1/profiles/practitionerrole/mutation.js index b296bf87..89f7be2c 100644 --- a/src/resources/3_0_1/profiles/practitionerrole/mutation.js +++ b/src/resources/3_0_1/profiles/practitionerrole/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const PractitionerRoleSchema = require('../../schemas/practitionerrole.schema'); +const PractitionerRoleSchema = require('../../schemas/practitionerrole.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const PractitionerRoleInput = require('../../inputs/practitionerrole.input'); +const PractitionerRoleInput = require('../../inputs/practitionerrole.input.js'); -// Resolvers -const { - practitionerroleCreateResolver, - practitionerroleUpdateResolver, - practitionerroleDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createPractitionerRole, + updatePractitionerRole, + removePractitionerRole, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PractitionerRole', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a PractitionerRole record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a PractitionerRole record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.PractitionerRoleCreateMutation - * @summary PractitionerRoleCreate Mutation. + * @summary PractitionerRoleCreate mutation. */ module.exports.PractitionerRoleCreateMutation = { - args: WriteArgs, - description: 'Create a PractitionerRole', - resolve: scopeInvariant(scopeOptions, practitionerroleCreateResolver), + description: 'Create a PractitionerRole record', + resolve: scopeInvariant(scopeOptions, createPractitionerRole), type: PractitionerRoleSchema, + args: WriteArgs, }; /** * @name exports.PractitionerRoleUpdateMutation - * @summary PractitionerRoleUpdate Mutation. + * @summary PractitionerRoleUpdate mutation. */ module.exports.PractitionerRoleUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple PractitionerRoles', - resolve: scopeInvariant(scopeOptions, practitionerroleUpdateResolver), + description: 'Update a PractitionerRole record', + resolve: scopeInvariant(scopeOptions, updatePractitionerRole), type: PractitionerRoleSchema, + args: WriteArgs, }; /** - * @name exports.PractitionerRoleDeleteMutation - * @summary PractitionerRoleDelete Mutation. + * @name exports.PractitionerRoleRemoveMutation + * @summary PractitionerRoleRemove mutation. */ -module.exports.PractitionerRoleDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single PractitionerRole', - resolve: scopeInvariant(scopeOptions, practitionerroleDeleteResolver), +module.exports.PractitionerRoleRemoveMutation = { + description: 'Remove a PractitionerRole record', + resolve: scopeInvariant(scopeOptions, removePractitionerRole), type: PractitionerRoleSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/practitionerrole/query.js b/src/resources/3_0_1/profiles/practitionerrole/query.js index 9756d7b0..457e4441 100644 --- a/src/resources/3_0_1/profiles/practitionerrole/query.js +++ b/src/resources/3_0_1/profiles/practitionerrole/query.js @@ -1,55 +1,65 @@ // Schemas -const PractitionerRoleSchema = require('../../schemas/practitionerrole.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PractitionerRoleSchema = require('../../schemas/practitionerrole.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const PractitionerRoleArgs = require('../../parameters/practitionerrole.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const PractitionerRoleArgs = require('../../parameters/practitionerrole.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PractitionerRoleArgs, +); // Resolvers const { - practitionerroleResolver, - practitionerroleListResolver, - practitionerroleInstanceResolver, + getPractitionerRole, + getPractitionerRoleList, + getPractitionerRoleInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'PractitionerRole', action: 'read', - version: '3_0_1', }; /** * @name exports.PractitionerRoleQuery - * @summary PractitionerRole Query. + * @summary PractitionerRole query. */ module.exports.PractitionerRoleQuery = { - args: Object.assign({}, CommonArgs, PractitionerRoleArgs), description: 'Query for a single PractitionerRole', - resolve: scopeInvariant(scopeOptions, practitionerroleResolver), + resolve: scopeInvariant(scopeOptions, getPractitionerRole), type: PractitionerRoleSchema, + args: args, }; /** * @name exports.PractitionerRoleListQuery - * @summary PractitionerRoleList Query. + * @summary PractitionerRole query. */ module.exports.PractitionerRoleListQuery = { - args: Object.assign({}, CommonArgs, PractitionerRoleArgs), - description: 'Query for multiple PractitionerRoles', - resolve: scopeInvariant(scopeOptions, practitionerroleListResolver), + description: 'Query for a more than or just one PractitionerRole', + resolve: scopeInvariant(scopeOptions, getPractitionerRoleList), type: BundleSchema, + args: args, }; /** * @name exports.PractitionerRoleInstanceQuery - * @summary PractitionerRoleInstance Query. + * @summary PractitionerRole query. */ module.exports.PractitionerRoleInstanceQuery = { - description: 'Get information about a single PractitionerRole', - resolve: scopeInvariant(scopeOptions, practitionerroleInstanceResolver), + description: 'Access information about a single PractitionerRole', + resolve: scopeInvariant(scopeOptions, getPractitionerRoleInstance), type: PractitionerRoleSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/practitionerrole/index.js b/src/resources/3_0_1/profiles/practitionerrole/register.js similarity index 91% rename from src/resources/3_0_1/profiles/practitionerrole/index.js rename to src/resources/3_0_1/profiles/practitionerrole/register.js index 266d457e..09b34674 100644 --- a/src/resources/3_0_1/profiles/practitionerrole/index.js +++ b/src/resources/3_0_1/profiles/practitionerrole/register.js @@ -1,15 +1,15 @@ +const { + PractitionerRoleCreateMutation, + PractitionerRoleUpdateMutation, + PractitionerRoleRemoveMutation, +} = require('./mutation'); + const { PractitionerRoleQuery, PractitionerRoleListQuery, PractitionerRoleInstanceQuery, } = require('./query'); -const { - PractitionerRoleCreateMutation, - PractitionerRoleUpdateMutation, - PractitionerRoleDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { PractitionerRoleCreate: PractitionerRoleCreateMutation, PractitionerRoleUpdate: PractitionerRoleUpdateMutation, - PractitionerRoleDelete: PractitionerRoleDeleteMutation, + PractitionerRoleRemove: PractitionerRoleRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'PractitionerRole', path: '/3_0_1/PractitionerRole/:id', query: PractitionerRoleInstanceQuery, diff --git a/src/resources/3_0_1/profiles/practitionerrole/resolver.js b/src/resources/3_0_1/profiles/practitionerrole/resolver.js index fbeff34a..62435aff 100644 --- a/src/resources/3_0_1/profiles/practitionerrole/resolver.js +++ b/src/resources/3_0_1/profiles/practitionerrole/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.practitionerroleResolver + * @name exports.getPractitionerRole * @static - * @summary PractitionerRole Resolver. + * @summary PractitionerRole resolver. */ -module.exports.practitionerroleResolver = function practitionerroleResolver( +module.exports.getPractitionerRole = function getPractitionerRole( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerroleListResolver + * @name exports.getPractitionerRoleList * @static - * @summary PractitionerRole List Resolver. + * @summary PractitionerRole list resolver. */ -module.exports.practitionerroleListResolver = function practitionerroleListResolver( +module.exports.getPractitionerRoleList = function getPractitionerRoleList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerroleInstanceResolver + * @name exports.getPractitionerRoleInstance * @static - * @summary PractitionerRole Instance Resolver. + * @summary PractitionerRole instance resolver. */ -module.exports.practitionerroleInstanceResolver = function practitionerroleInstanceResolver( +module.exports.getPractitionerRoleInstance = function getPractitionerRoleInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerroleCreateResolver + * @name exports.createPractitionerRole * @static - * @summary PractitionerRole Create Resolver. + * @summary Create PractitionerRole resolver. */ -module.exports.practitionerroleCreateResolver = function practitionerroleCreateResolver( +module.exports.createPractitionerRole = function createPractitionerRole( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerroleUpdateResolver + * @name exports.updatePractitionerRole * @static - * @summary PractitionerRole Update Resolver. + * @summary Update PractitionerRole resolver. */ -module.exports.practitionerroleUpdateResolver = function practitionerroleUpdateResolver( +module.exports.updatePractitionerRole = function updatePractitionerRole( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.practitionerroleDeleteResolver + * @name exports.removePractitionerRole * @static - * @summary PractitionerRole Delete Resolver. + * @summary Remove PractitionerRole resolver. */ -module.exports.practitionerroleDeleteResolver = function practitionerroleDeleteResolver( +module.exports.removePractitionerRole = function removePractitionerRole( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/procedure/mutation.js b/src/resources/3_0_1/profiles/procedure/mutation.js index 344206de..48e07d9a 100644 --- a/src/resources/3_0_1/profiles/procedure/mutation.js +++ b/src/resources/3_0_1/profiles/procedure/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProcedureSchema = require('../../schemas/procedure.schema'); +const ProcedureSchema = require('../../schemas/procedure.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProcedureInput = require('../../inputs/procedure.input'); +const ProcedureInput = require('../../inputs/procedure.input.js'); -// Resolvers -const { - procedureCreateResolver, - procedureUpdateResolver, - procedureDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProcedure, + updateProcedure, + removeProcedure, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Procedure', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Procedure record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Procedure record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ProcedureCreateMutation - * @summary ProcedureCreate Mutation. + * @summary ProcedureCreate mutation. */ module.exports.ProcedureCreateMutation = { - args: WriteArgs, - description: 'Create a Procedure', - resolve: scopeInvariant(scopeOptions, procedureCreateResolver), + description: 'Create a Procedure record', + resolve: scopeInvariant(scopeOptions, createProcedure), type: ProcedureSchema, + args: WriteArgs, }; /** * @name exports.ProcedureUpdateMutation - * @summary ProcedureUpdate Mutation. + * @summary ProcedureUpdate mutation. */ module.exports.ProcedureUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Procedures', - resolve: scopeInvariant(scopeOptions, procedureUpdateResolver), + description: 'Update a Procedure record', + resolve: scopeInvariant(scopeOptions, updateProcedure), type: ProcedureSchema, + args: WriteArgs, }; /** - * @name exports.ProcedureDeleteMutation - * @summary ProcedureDelete Mutation. + * @name exports.ProcedureRemoveMutation + * @summary ProcedureRemove mutation. */ -module.exports.ProcedureDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Procedure', - resolve: scopeInvariant(scopeOptions, procedureDeleteResolver), +module.exports.ProcedureRemoveMutation = { + description: 'Remove a Procedure record', + resolve: scopeInvariant(scopeOptions, removeProcedure), type: ProcedureSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/procedure/query.js b/src/resources/3_0_1/profiles/procedure/query.js index 68e4996d..a4b5eff1 100644 --- a/src/resources/3_0_1/profiles/procedure/query.js +++ b/src/resources/3_0_1/profiles/procedure/query.js @@ -1,55 +1,60 @@ // Schemas -const ProcedureSchema = require('../../schemas/procedure.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcedureSchema = require('../../schemas/procedure.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProcedureArgs = require('../../parameters/procedure.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProcedureArgs = require('../../parameters/procedure.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ProcedureArgs); // Resolvers const { - procedureResolver, - procedureListResolver, - procedureInstanceResolver, + getProcedure, + getProcedureList, + getProcedureInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Procedure', action: 'read', - version: '3_0_1', }; /** * @name exports.ProcedureQuery - * @summary Procedure Query. + * @summary Procedure query. */ module.exports.ProcedureQuery = { - args: Object.assign({}, CommonArgs, ProcedureArgs), description: 'Query for a single Procedure', - resolve: scopeInvariant(scopeOptions, procedureResolver), + resolve: scopeInvariant(scopeOptions, getProcedure), type: ProcedureSchema, + args: args, }; /** * @name exports.ProcedureListQuery - * @summary ProcedureList Query. + * @summary Procedure query. */ module.exports.ProcedureListQuery = { - args: Object.assign({}, CommonArgs, ProcedureArgs), - description: 'Query for multiple Procedures', - resolve: scopeInvariant(scopeOptions, procedureListResolver), + description: 'Query for a more than or just one Procedure', + resolve: scopeInvariant(scopeOptions, getProcedureList), type: BundleSchema, + args: args, }; /** * @name exports.ProcedureInstanceQuery - * @summary ProcedureInstance Query. + * @summary Procedure query. */ module.exports.ProcedureInstanceQuery = { - description: 'Get information about a single Procedure', - resolve: scopeInvariant(scopeOptions, procedureInstanceResolver), + description: 'Access information about a single Procedure', + resolve: scopeInvariant(scopeOptions, getProcedureInstance), type: ProcedureSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/procedure/index.js b/src/resources/3_0_1/profiles/procedure/register.js similarity index 92% rename from src/resources/3_0_1/profiles/procedure/index.js rename to src/resources/3_0_1/profiles/procedure/register.js index 9f27cbf1..0bd32590 100644 --- a/src/resources/3_0_1/profiles/procedure/index.js +++ b/src/resources/3_0_1/profiles/procedure/register.js @@ -1,15 +1,15 @@ +const { + ProcedureCreateMutation, + ProcedureUpdateMutation, + ProcedureRemoveMutation, +} = require('./mutation'); + const { ProcedureQuery, ProcedureListQuery, ProcedureInstanceQuery, } = require('./query'); -const { - ProcedureCreateMutation, - ProcedureUpdateMutation, - ProcedureDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProcedureCreate: ProcedureCreateMutation, ProcedureUpdate: ProcedureUpdateMutation, - ProcedureDelete: ProcedureDeleteMutation, + ProcedureRemove: ProcedureRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Procedure', path: '/3_0_1/Procedure/:id', query: ProcedureInstanceQuery, diff --git a/src/resources/3_0_1/profiles/procedure/resolver.js b/src/resources/3_0_1/profiles/procedure/resolver.js index 0eda09d3..a1340247 100644 --- a/src/resources/3_0_1/profiles/procedure/resolver.js +++ b/src/resources/3_0_1/profiles/procedure/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.procedureResolver + * @name exports.getProcedure * @static - * @summary Procedure Resolver. + * @summary Procedure resolver. */ -module.exports.procedureResolver = function procedureResolver( +module.exports.getProcedure = function getProcedure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureListResolver + * @name exports.getProcedureList * @static - * @summary Procedure List Resolver. + * @summary Procedure list resolver. */ -module.exports.procedureListResolver = function procedureListResolver( +module.exports.getProcedureList = function getProcedureList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureInstanceResolver + * @name exports.getProcedureInstance * @static - * @summary Procedure Instance Resolver. + * @summary Procedure instance resolver. */ -module.exports.procedureInstanceResolver = function procedureInstanceResolver( +module.exports.getProcedureInstance = function getProcedureInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureCreateResolver + * @name exports.createProcedure * @static - * @summary Procedure Create Resolver. + * @summary Create Procedure resolver. */ -module.exports.procedureCreateResolver = function procedureCreateResolver( +module.exports.createProcedure = function createProcedure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureUpdateResolver + * @name exports.updateProcedure * @static - * @summary Procedure Update Resolver. + * @summary Update Procedure resolver. */ -module.exports.procedureUpdateResolver = function procedureUpdateResolver( +module.exports.updateProcedure = function updateProcedure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedureDeleteResolver + * @name exports.removeProcedure * @static - * @summary Procedure Delete Resolver. + * @summary Remove Procedure resolver. */ -module.exports.procedureDeleteResolver = function procedureDeleteResolver( +module.exports.removeProcedure = function removeProcedure( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/procedurerequest/mutation.js b/src/resources/3_0_1/profiles/procedurerequest/mutation.js index 75827920..6be4593b 100644 --- a/src/resources/3_0_1/profiles/procedurerequest/mutation.js +++ b/src/resources/3_0_1/profiles/procedurerequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProcedureRequestSchema = require('../../schemas/procedurerequest.schema'); +const ProcedureRequestSchema = require('../../schemas/procedurerequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProcedureRequestInput = require('../../inputs/procedurerequest.input'); +const ProcedureRequestInput = require('../../inputs/procedurerequest.input.js'); -// Resolvers -const { - procedurerequestCreateResolver, - procedurerequestUpdateResolver, - procedurerequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProcedureRequest, + updateProcedureRequest, + removeProcedureRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcedureRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ProcedureRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ProcedureRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ProcedureRequestCreateMutation - * @summary ProcedureRequestCreate Mutation. + * @summary ProcedureRequestCreate mutation. */ module.exports.ProcedureRequestCreateMutation = { - args: WriteArgs, - description: 'Create a ProcedureRequest', - resolve: scopeInvariant(scopeOptions, procedurerequestCreateResolver), + description: 'Create a ProcedureRequest record', + resolve: scopeInvariant(scopeOptions, createProcedureRequest), type: ProcedureRequestSchema, + args: WriteArgs, }; /** * @name exports.ProcedureRequestUpdateMutation - * @summary ProcedureRequestUpdate Mutation. + * @summary ProcedureRequestUpdate mutation. */ module.exports.ProcedureRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ProcedureRequests', - resolve: scopeInvariant(scopeOptions, procedurerequestUpdateResolver), + description: 'Update a ProcedureRequest record', + resolve: scopeInvariant(scopeOptions, updateProcedureRequest), type: ProcedureRequestSchema, + args: WriteArgs, }; /** - * @name exports.ProcedureRequestDeleteMutation - * @summary ProcedureRequestDelete Mutation. + * @name exports.ProcedureRequestRemoveMutation + * @summary ProcedureRequestRemove mutation. */ -module.exports.ProcedureRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ProcedureRequest', - resolve: scopeInvariant(scopeOptions, procedurerequestDeleteResolver), +module.exports.ProcedureRequestRemoveMutation = { + description: 'Remove a ProcedureRequest record', + resolve: scopeInvariant(scopeOptions, removeProcedureRequest), type: ProcedureRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/procedurerequest/query.js b/src/resources/3_0_1/profiles/procedurerequest/query.js index b616b138..3a28e81f 100644 --- a/src/resources/3_0_1/profiles/procedurerequest/query.js +++ b/src/resources/3_0_1/profiles/procedurerequest/query.js @@ -1,55 +1,65 @@ // Schemas -const ProcedureRequestSchema = require('../../schemas/procedurerequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcedureRequestSchema = require('../../schemas/procedurerequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProcedureRequestArgs = require('../../parameters/procedurerequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProcedureRequestArgs = require('../../parameters/procedurerequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ProcedureRequestArgs, +); // Resolvers const { - procedurerequestResolver, - procedurerequestListResolver, - procedurerequestInstanceResolver, + getProcedureRequest, + getProcedureRequestList, + getProcedureRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcedureRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.ProcedureRequestQuery - * @summary ProcedureRequest Query. + * @summary ProcedureRequest query. */ module.exports.ProcedureRequestQuery = { - args: Object.assign({}, CommonArgs, ProcedureRequestArgs), description: 'Query for a single ProcedureRequest', - resolve: scopeInvariant(scopeOptions, procedurerequestResolver), + resolve: scopeInvariant(scopeOptions, getProcedureRequest), type: ProcedureRequestSchema, + args: args, }; /** * @name exports.ProcedureRequestListQuery - * @summary ProcedureRequestList Query. + * @summary ProcedureRequest query. */ module.exports.ProcedureRequestListQuery = { - args: Object.assign({}, CommonArgs, ProcedureRequestArgs), - description: 'Query for multiple ProcedureRequests', - resolve: scopeInvariant(scopeOptions, procedurerequestListResolver), + description: 'Query for a more than or just one ProcedureRequest', + resolve: scopeInvariant(scopeOptions, getProcedureRequestList), type: BundleSchema, + args: args, }; /** * @name exports.ProcedureRequestInstanceQuery - * @summary ProcedureRequestInstance Query. + * @summary ProcedureRequest query. */ module.exports.ProcedureRequestInstanceQuery = { - description: 'Get information about a single ProcedureRequest', - resolve: scopeInvariant(scopeOptions, procedurerequestInstanceResolver), + description: 'Access information about a single ProcedureRequest', + resolve: scopeInvariant(scopeOptions, getProcedureRequestInstance), type: ProcedureRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/procedurerequest/index.js b/src/resources/3_0_1/profiles/procedurerequest/register.js similarity index 91% rename from src/resources/3_0_1/profiles/procedurerequest/index.js rename to src/resources/3_0_1/profiles/procedurerequest/register.js index 260bd784..2478888e 100644 --- a/src/resources/3_0_1/profiles/procedurerequest/index.js +++ b/src/resources/3_0_1/profiles/procedurerequest/register.js @@ -1,15 +1,15 @@ +const { + ProcedureRequestCreateMutation, + ProcedureRequestUpdateMutation, + ProcedureRequestRemoveMutation, +} = require('./mutation'); + const { ProcedureRequestQuery, ProcedureRequestListQuery, ProcedureRequestInstanceQuery, } = require('./query'); -const { - ProcedureRequestCreateMutation, - ProcedureRequestUpdateMutation, - ProcedureRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProcedureRequestCreate: ProcedureRequestCreateMutation, ProcedureRequestUpdate: ProcedureRequestUpdateMutation, - ProcedureRequestDelete: ProcedureRequestDeleteMutation, + ProcedureRequestRemove: ProcedureRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ProcedureRequest', path: '/3_0_1/ProcedureRequest/:id', query: ProcedureRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/procedurerequest/resolver.js b/src/resources/3_0_1/profiles/procedurerequest/resolver.js index f50b6027..596dad53 100644 --- a/src/resources/3_0_1/profiles/procedurerequest/resolver.js +++ b/src/resources/3_0_1/profiles/procedurerequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.procedurerequestResolver + * @name exports.getProcedureRequest * @static - * @summary ProcedureRequest Resolver. + * @summary ProcedureRequest resolver. */ -module.exports.procedurerequestResolver = function procedurerequestResolver( +module.exports.getProcedureRequest = function getProcedureRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestListResolver + * @name exports.getProcedureRequestList * @static - * @summary ProcedureRequest List Resolver. + * @summary ProcedureRequest list resolver. */ -module.exports.procedurerequestListResolver = function procedurerequestListResolver( +module.exports.getProcedureRequestList = function getProcedureRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestInstanceResolver + * @name exports.getProcedureRequestInstance * @static - * @summary ProcedureRequest Instance Resolver. + * @summary ProcedureRequest instance resolver. */ -module.exports.procedurerequestInstanceResolver = function procedurerequestInstanceResolver( +module.exports.getProcedureRequestInstance = function getProcedureRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestCreateResolver + * @name exports.createProcedureRequest * @static - * @summary ProcedureRequest Create Resolver. + * @summary Create ProcedureRequest resolver. */ -module.exports.procedurerequestCreateResolver = function procedurerequestCreateResolver( +module.exports.createProcedureRequest = function createProcedureRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestUpdateResolver + * @name exports.updateProcedureRequest * @static - * @summary ProcedureRequest Update Resolver. + * @summary Update ProcedureRequest resolver. */ -module.exports.procedurerequestUpdateResolver = function procedurerequestUpdateResolver( +module.exports.updateProcedureRequest = function updateProcedureRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.procedurerequestDeleteResolver + * @name exports.removeProcedureRequest * @static - * @summary ProcedureRequest Delete Resolver. + * @summary Remove ProcedureRequest resolver. */ -module.exports.procedurerequestDeleteResolver = function procedurerequestDeleteResolver( +module.exports.removeProcedureRequest = function removeProcedureRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/processrequest/mutation.js b/src/resources/3_0_1/profiles/processrequest/mutation.js index ae94039b..989ba8fa 100644 --- a/src/resources/3_0_1/profiles/processrequest/mutation.js +++ b/src/resources/3_0_1/profiles/processrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProcessRequestSchema = require('../../schemas/processrequest.schema'); +const ProcessRequestSchema = require('../../schemas/processrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProcessRequestInput = require('../../inputs/processrequest.input'); +const ProcessRequestInput = require('../../inputs/processrequest.input.js'); -// Resolvers -const { - processrequestCreateResolver, - processrequestUpdateResolver, - processrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProcessRequest, + updateProcessRequest, + removeProcessRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcessRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ProcessRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ProcessRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ProcessRequestCreateMutation - * @summary ProcessRequestCreate Mutation. + * @summary ProcessRequestCreate mutation. */ module.exports.ProcessRequestCreateMutation = { - args: WriteArgs, - description: 'Create a ProcessRequest', - resolve: scopeInvariant(scopeOptions, processrequestCreateResolver), + description: 'Create a ProcessRequest record', + resolve: scopeInvariant(scopeOptions, createProcessRequest), type: ProcessRequestSchema, + args: WriteArgs, }; /** * @name exports.ProcessRequestUpdateMutation - * @summary ProcessRequestUpdate Mutation. + * @summary ProcessRequestUpdate mutation. */ module.exports.ProcessRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ProcessRequests', - resolve: scopeInvariant(scopeOptions, processrequestUpdateResolver), + description: 'Update a ProcessRequest record', + resolve: scopeInvariant(scopeOptions, updateProcessRequest), type: ProcessRequestSchema, + args: WriteArgs, }; /** - * @name exports.ProcessRequestDeleteMutation - * @summary ProcessRequestDelete Mutation. + * @name exports.ProcessRequestRemoveMutation + * @summary ProcessRequestRemove mutation. */ -module.exports.ProcessRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ProcessRequest', - resolve: scopeInvariant(scopeOptions, processrequestDeleteResolver), +module.exports.ProcessRequestRemoveMutation = { + description: 'Remove a ProcessRequest record', + resolve: scopeInvariant(scopeOptions, removeProcessRequest), type: ProcessRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/processrequest/query.js b/src/resources/3_0_1/profiles/processrequest/query.js index a3688f72..7d7f80b0 100644 --- a/src/resources/3_0_1/profiles/processrequest/query.js +++ b/src/resources/3_0_1/profiles/processrequest/query.js @@ -1,55 +1,65 @@ // Schemas -const ProcessRequestSchema = require('../../schemas/processrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcessRequestSchema = require('../../schemas/processrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProcessRequestArgs = require('../../parameters/processrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProcessRequestArgs = require('../../parameters/processrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ProcessRequestArgs, +); // Resolvers const { - processrequestResolver, - processrequestListResolver, - processrequestInstanceResolver, + getProcessRequest, + getProcessRequestList, + getProcessRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcessRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.ProcessRequestQuery - * @summary ProcessRequest Query. + * @summary ProcessRequest query. */ module.exports.ProcessRequestQuery = { - args: Object.assign({}, CommonArgs, ProcessRequestArgs), description: 'Query for a single ProcessRequest', - resolve: scopeInvariant(scopeOptions, processrequestResolver), + resolve: scopeInvariant(scopeOptions, getProcessRequest), type: ProcessRequestSchema, + args: args, }; /** * @name exports.ProcessRequestListQuery - * @summary ProcessRequestList Query. + * @summary ProcessRequest query. */ module.exports.ProcessRequestListQuery = { - args: Object.assign({}, CommonArgs, ProcessRequestArgs), - description: 'Query for multiple ProcessRequests', - resolve: scopeInvariant(scopeOptions, processrequestListResolver), + description: 'Query for a more than or just one ProcessRequest', + resolve: scopeInvariant(scopeOptions, getProcessRequestList), type: BundleSchema, + args: args, }; /** * @name exports.ProcessRequestInstanceQuery - * @summary ProcessRequestInstance Query. + * @summary ProcessRequest query. */ module.exports.ProcessRequestInstanceQuery = { - description: 'Get information about a single ProcessRequest', - resolve: scopeInvariant(scopeOptions, processrequestInstanceResolver), + description: 'Access information about a single ProcessRequest', + resolve: scopeInvariant(scopeOptions, getProcessRequestInstance), type: ProcessRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/processrequest/index.js b/src/resources/3_0_1/profiles/processrequest/register.js similarity index 92% rename from src/resources/3_0_1/profiles/processrequest/index.js rename to src/resources/3_0_1/profiles/processrequest/register.js index ad61726d..e2f0ed73 100644 --- a/src/resources/3_0_1/profiles/processrequest/index.js +++ b/src/resources/3_0_1/profiles/processrequest/register.js @@ -1,15 +1,15 @@ +const { + ProcessRequestCreateMutation, + ProcessRequestUpdateMutation, + ProcessRequestRemoveMutation, +} = require('./mutation'); + const { ProcessRequestQuery, ProcessRequestListQuery, ProcessRequestInstanceQuery, } = require('./query'); -const { - ProcessRequestCreateMutation, - ProcessRequestUpdateMutation, - ProcessRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProcessRequestCreate: ProcessRequestCreateMutation, ProcessRequestUpdate: ProcessRequestUpdateMutation, - ProcessRequestDelete: ProcessRequestDeleteMutation, + ProcessRequestRemove: ProcessRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ProcessRequest', path: '/3_0_1/ProcessRequest/:id', query: ProcessRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/processrequest/resolver.js b/src/resources/3_0_1/profiles/processrequest/resolver.js index 8f63e290..d044a15d 100644 --- a/src/resources/3_0_1/profiles/processrequest/resolver.js +++ b/src/resources/3_0_1/profiles/processrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.processrequestResolver + * @name exports.getProcessRequest * @static - * @summary ProcessRequest Resolver. + * @summary ProcessRequest resolver. */ -module.exports.processrequestResolver = function processrequestResolver( +module.exports.getProcessRequest = function getProcessRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestListResolver + * @name exports.getProcessRequestList * @static - * @summary ProcessRequest List Resolver. + * @summary ProcessRequest list resolver. */ -module.exports.processrequestListResolver = function processrequestListResolver( +module.exports.getProcessRequestList = function getProcessRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestInstanceResolver + * @name exports.getProcessRequestInstance * @static - * @summary ProcessRequest Instance Resolver. + * @summary ProcessRequest instance resolver. */ -module.exports.processrequestInstanceResolver = function processrequestInstanceResolver( +module.exports.getProcessRequestInstance = function getProcessRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestCreateResolver + * @name exports.createProcessRequest * @static - * @summary ProcessRequest Create Resolver. + * @summary Create ProcessRequest resolver. */ -module.exports.processrequestCreateResolver = function processrequestCreateResolver( +module.exports.createProcessRequest = function createProcessRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestUpdateResolver + * @name exports.updateProcessRequest * @static - * @summary ProcessRequest Update Resolver. + * @summary Update ProcessRequest resolver. */ -module.exports.processrequestUpdateResolver = function processrequestUpdateResolver( +module.exports.updateProcessRequest = function updateProcessRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processrequestDeleteResolver + * @name exports.removeProcessRequest * @static - * @summary ProcessRequest Delete Resolver. + * @summary Remove ProcessRequest resolver. */ -module.exports.processrequestDeleteResolver = function processrequestDeleteResolver( +module.exports.removeProcessRequest = function removeProcessRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/processresponse/mutation.js b/src/resources/3_0_1/profiles/processresponse/mutation.js index ad35cce7..427c2f93 100644 --- a/src/resources/3_0_1/profiles/processresponse/mutation.js +++ b/src/resources/3_0_1/profiles/processresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProcessResponseSchema = require('../../schemas/processresponse.schema'); +const ProcessResponseSchema = require('../../schemas/processresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProcessResponseInput = require('../../inputs/processresponse.input'); +const ProcessResponseInput = require('../../inputs/processresponse.input.js'); -// Resolvers -const { - processresponseCreateResolver, - processresponseUpdateResolver, - processresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProcessResponse, + updateProcessResponse, + removeProcessResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcessResponse', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ProcessResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ProcessResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ProcessResponseCreateMutation - * @summary ProcessResponseCreate Mutation. + * @summary ProcessResponseCreate mutation. */ module.exports.ProcessResponseCreateMutation = { - args: WriteArgs, - description: 'Create a ProcessResponse', - resolve: scopeInvariant(scopeOptions, processresponseCreateResolver), + description: 'Create a ProcessResponse record', + resolve: scopeInvariant(scopeOptions, createProcessResponse), type: ProcessResponseSchema, + args: WriteArgs, }; /** * @name exports.ProcessResponseUpdateMutation - * @summary ProcessResponseUpdate Mutation. + * @summary ProcessResponseUpdate mutation. */ module.exports.ProcessResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ProcessResponses', - resolve: scopeInvariant(scopeOptions, processresponseUpdateResolver), + description: 'Update a ProcessResponse record', + resolve: scopeInvariant(scopeOptions, updateProcessResponse), type: ProcessResponseSchema, + args: WriteArgs, }; /** - * @name exports.ProcessResponseDeleteMutation - * @summary ProcessResponseDelete Mutation. + * @name exports.ProcessResponseRemoveMutation + * @summary ProcessResponseRemove mutation. */ -module.exports.ProcessResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ProcessResponse', - resolve: scopeInvariant(scopeOptions, processresponseDeleteResolver), +module.exports.ProcessResponseRemoveMutation = { + description: 'Remove a ProcessResponse record', + resolve: scopeInvariant(scopeOptions, removeProcessResponse), type: ProcessResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/processresponse/query.js b/src/resources/3_0_1/profiles/processresponse/query.js index 908e02ec..c484c871 100644 --- a/src/resources/3_0_1/profiles/processresponse/query.js +++ b/src/resources/3_0_1/profiles/processresponse/query.js @@ -1,55 +1,65 @@ // Schemas -const ProcessResponseSchema = require('../../schemas/processresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcessResponseSchema = require('../../schemas/processresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProcessResponseArgs = require('../../parameters/processresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProcessResponseArgs = require('../../parameters/processresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ProcessResponseArgs, +); // Resolvers const { - processresponseResolver, - processresponseListResolver, - processresponseInstanceResolver, + getProcessResponse, + getProcessResponseList, + getProcessResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ProcessResponse', action: 'read', - version: '3_0_1', }; /** * @name exports.ProcessResponseQuery - * @summary ProcessResponse Query. + * @summary ProcessResponse query. */ module.exports.ProcessResponseQuery = { - args: Object.assign({}, CommonArgs, ProcessResponseArgs), description: 'Query for a single ProcessResponse', - resolve: scopeInvariant(scopeOptions, processresponseResolver), + resolve: scopeInvariant(scopeOptions, getProcessResponse), type: ProcessResponseSchema, + args: args, }; /** * @name exports.ProcessResponseListQuery - * @summary ProcessResponseList Query. + * @summary ProcessResponse query. */ module.exports.ProcessResponseListQuery = { - args: Object.assign({}, CommonArgs, ProcessResponseArgs), - description: 'Query for multiple ProcessResponses', - resolve: scopeInvariant(scopeOptions, processresponseListResolver), + description: 'Query for a more than or just one ProcessResponse', + resolve: scopeInvariant(scopeOptions, getProcessResponseList), type: BundleSchema, + args: args, }; /** * @name exports.ProcessResponseInstanceQuery - * @summary ProcessResponseInstance Query. + * @summary ProcessResponse query. */ module.exports.ProcessResponseInstanceQuery = { - description: 'Get information about a single ProcessResponse', - resolve: scopeInvariant(scopeOptions, processresponseInstanceResolver), + description: 'Access information about a single ProcessResponse', + resolve: scopeInvariant(scopeOptions, getProcessResponseInstance), type: ProcessResponseSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/processresponse/index.js b/src/resources/3_0_1/profiles/processresponse/register.js similarity index 91% rename from src/resources/3_0_1/profiles/processresponse/index.js rename to src/resources/3_0_1/profiles/processresponse/register.js index effc9652..69bebf0f 100644 --- a/src/resources/3_0_1/profiles/processresponse/index.js +++ b/src/resources/3_0_1/profiles/processresponse/register.js @@ -1,15 +1,15 @@ +const { + ProcessResponseCreateMutation, + ProcessResponseUpdateMutation, + ProcessResponseRemoveMutation, +} = require('./mutation'); + const { ProcessResponseQuery, ProcessResponseListQuery, ProcessResponseInstanceQuery, } = require('./query'); -const { - ProcessResponseCreateMutation, - ProcessResponseUpdateMutation, - ProcessResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProcessResponseCreate: ProcessResponseCreateMutation, ProcessResponseUpdate: ProcessResponseUpdateMutation, - ProcessResponseDelete: ProcessResponseDeleteMutation, + ProcessResponseRemove: ProcessResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ProcessResponse', path: '/3_0_1/ProcessResponse/:id', query: ProcessResponseInstanceQuery, diff --git a/src/resources/3_0_1/profiles/processresponse/resolver.js b/src/resources/3_0_1/profiles/processresponse/resolver.js index b598c4db..1cdf7dc3 100644 --- a/src/resources/3_0_1/profiles/processresponse/resolver.js +++ b/src/resources/3_0_1/profiles/processresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.processresponseResolver + * @name exports.getProcessResponse * @static - * @summary ProcessResponse Resolver. + * @summary ProcessResponse resolver. */ -module.exports.processresponseResolver = function processresponseResolver( +module.exports.getProcessResponse = function getProcessResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseListResolver + * @name exports.getProcessResponseList * @static - * @summary ProcessResponse List Resolver. + * @summary ProcessResponse list resolver. */ -module.exports.processresponseListResolver = function processresponseListResolver( +module.exports.getProcessResponseList = function getProcessResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseInstanceResolver + * @name exports.getProcessResponseInstance * @static - * @summary ProcessResponse Instance Resolver. + * @summary ProcessResponse instance resolver. */ -module.exports.processresponseInstanceResolver = function processresponseInstanceResolver( +module.exports.getProcessResponseInstance = function getProcessResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseCreateResolver + * @name exports.createProcessResponse * @static - * @summary ProcessResponse Create Resolver. + * @summary Create ProcessResponse resolver. */ -module.exports.processresponseCreateResolver = function processresponseCreateResolver( +module.exports.createProcessResponse = function createProcessResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseUpdateResolver + * @name exports.updateProcessResponse * @static - * @summary ProcessResponse Update Resolver. + * @summary Update ProcessResponse resolver. */ -module.exports.processresponseUpdateResolver = function processresponseUpdateResolver( +module.exports.updateProcessResponse = function updateProcessResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.processresponseDeleteResolver + * @name exports.removeProcessResponse * @static - * @summary ProcessResponse Delete Resolver. + * @summary Remove ProcessResponse resolver. */ -module.exports.processresponseDeleteResolver = function processresponseDeleteResolver( +module.exports.removeProcessResponse = function removeProcessResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/provenance/mutation.js b/src/resources/3_0_1/profiles/provenance/mutation.js index c2b58174..781969d8 100644 --- a/src/resources/3_0_1/profiles/provenance/mutation.js +++ b/src/resources/3_0_1/profiles/provenance/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ProvenanceSchema = require('../../schemas/provenance.schema'); +const ProvenanceSchema = require('../../schemas/provenance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ProvenanceInput = require('../../inputs/provenance.input'); +const ProvenanceInput = require('../../inputs/provenance.input.js'); -// Resolvers -const { - provenanceCreateResolver, - provenanceUpdateResolver, - provenanceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createProvenance, + updateProvenance, + removeProvenance, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Provenance', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Provenance record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Provenance record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ProvenanceCreateMutation - * @summary ProvenanceCreate Mutation. + * @summary ProvenanceCreate mutation. */ module.exports.ProvenanceCreateMutation = { - args: WriteArgs, - description: 'Create a Provenance', - resolve: scopeInvariant(scopeOptions, provenanceCreateResolver), + description: 'Create a Provenance record', + resolve: scopeInvariant(scopeOptions, createProvenance), type: ProvenanceSchema, + args: WriteArgs, }; /** * @name exports.ProvenanceUpdateMutation - * @summary ProvenanceUpdate Mutation. + * @summary ProvenanceUpdate mutation. */ module.exports.ProvenanceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Provenances', - resolve: scopeInvariant(scopeOptions, provenanceUpdateResolver), + description: 'Update a Provenance record', + resolve: scopeInvariant(scopeOptions, updateProvenance), type: ProvenanceSchema, + args: WriteArgs, }; /** - * @name exports.ProvenanceDeleteMutation - * @summary ProvenanceDelete Mutation. + * @name exports.ProvenanceRemoveMutation + * @summary ProvenanceRemove mutation. */ -module.exports.ProvenanceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Provenance', - resolve: scopeInvariant(scopeOptions, provenanceDeleteResolver), +module.exports.ProvenanceRemoveMutation = { + description: 'Remove a Provenance record', + resolve: scopeInvariant(scopeOptions, removeProvenance), type: ProvenanceSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/provenance/query.js b/src/resources/3_0_1/profiles/provenance/query.js index 36ad4f5b..9dc9b33b 100644 --- a/src/resources/3_0_1/profiles/provenance/query.js +++ b/src/resources/3_0_1/profiles/provenance/query.js @@ -1,55 +1,60 @@ // Schemas -const ProvenanceSchema = require('../../schemas/provenance.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProvenanceSchema = require('../../schemas/provenance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ProvenanceArgs = require('../../parameters/provenance.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ProvenanceArgs = require('../../parameters/provenance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ProvenanceArgs); // Resolvers const { - provenanceResolver, - provenanceListResolver, - provenanceInstanceResolver, + getProvenance, + getProvenanceList, + getProvenanceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Provenance', action: 'read', - version: '3_0_1', }; /** * @name exports.ProvenanceQuery - * @summary Provenance Query. + * @summary Provenance query. */ module.exports.ProvenanceQuery = { - args: Object.assign({}, CommonArgs, ProvenanceArgs), description: 'Query for a single Provenance', - resolve: scopeInvariant(scopeOptions, provenanceResolver), + resolve: scopeInvariant(scopeOptions, getProvenance), type: ProvenanceSchema, + args: args, }; /** * @name exports.ProvenanceListQuery - * @summary ProvenanceList Query. + * @summary Provenance query. */ module.exports.ProvenanceListQuery = { - args: Object.assign({}, CommonArgs, ProvenanceArgs), - description: 'Query for multiple Provenances', - resolve: scopeInvariant(scopeOptions, provenanceListResolver), + description: 'Query for a more than or just one Provenance', + resolve: scopeInvariant(scopeOptions, getProvenanceList), type: BundleSchema, + args: args, }; /** * @name exports.ProvenanceInstanceQuery - * @summary ProvenanceInstance Query. + * @summary Provenance query. */ module.exports.ProvenanceInstanceQuery = { - description: 'Get information about a single Provenance', - resolve: scopeInvariant(scopeOptions, provenanceInstanceResolver), + description: 'Access information about a single Provenance', + resolve: scopeInvariant(scopeOptions, getProvenanceInstance), type: ProvenanceSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/provenance/index.js b/src/resources/3_0_1/profiles/provenance/register.js similarity index 92% rename from src/resources/3_0_1/profiles/provenance/index.js rename to src/resources/3_0_1/profiles/provenance/register.js index 8de460c2..18f054f9 100644 --- a/src/resources/3_0_1/profiles/provenance/index.js +++ b/src/resources/3_0_1/profiles/provenance/register.js @@ -1,15 +1,15 @@ +const { + ProvenanceCreateMutation, + ProvenanceUpdateMutation, + ProvenanceRemoveMutation, +} = require('./mutation'); + const { ProvenanceQuery, ProvenanceListQuery, ProvenanceInstanceQuery, } = require('./query'); -const { - ProvenanceCreateMutation, - ProvenanceUpdateMutation, - ProvenanceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ProvenanceCreate: ProvenanceCreateMutation, ProvenanceUpdate: ProvenanceUpdateMutation, - ProvenanceDelete: ProvenanceDeleteMutation, + ProvenanceRemove: ProvenanceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Provenance', path: '/3_0_1/Provenance/:id', query: ProvenanceInstanceQuery, diff --git a/src/resources/3_0_1/profiles/provenance/resolver.js b/src/resources/3_0_1/profiles/provenance/resolver.js index 141a53c9..5359714e 100644 --- a/src/resources/3_0_1/profiles/provenance/resolver.js +++ b/src/resources/3_0_1/profiles/provenance/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.provenanceResolver + * @name exports.getProvenance * @static - * @summary Provenance Resolver. + * @summary Provenance resolver. */ -module.exports.provenanceResolver = function provenanceResolver( +module.exports.getProvenance = function getProvenance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceListResolver + * @name exports.getProvenanceList * @static - * @summary Provenance List Resolver. + * @summary Provenance list resolver. */ -module.exports.provenanceListResolver = function provenanceListResolver( +module.exports.getProvenanceList = function getProvenanceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceInstanceResolver + * @name exports.getProvenanceInstance * @static - * @summary Provenance Instance Resolver. + * @summary Provenance instance resolver. */ -module.exports.provenanceInstanceResolver = function provenanceInstanceResolver( +module.exports.getProvenanceInstance = function getProvenanceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceCreateResolver + * @name exports.createProvenance * @static - * @summary Provenance Create Resolver. + * @summary Create Provenance resolver. */ -module.exports.provenanceCreateResolver = function provenanceCreateResolver( +module.exports.createProvenance = function createProvenance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceUpdateResolver + * @name exports.updateProvenance * @static - * @summary Provenance Update Resolver. + * @summary Update Provenance resolver. */ -module.exports.provenanceUpdateResolver = function provenanceUpdateResolver( +module.exports.updateProvenance = function updateProvenance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.provenanceDeleteResolver + * @name exports.removeProvenance * @static - * @summary Provenance Delete Resolver. + * @summary Remove Provenance resolver. */ -module.exports.provenanceDeleteResolver = function provenanceDeleteResolver( +module.exports.removeProvenance = function removeProvenance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/questionnaire/mutation.js b/src/resources/3_0_1/profiles/questionnaire/mutation.js index 039dab70..abbb5966 100644 --- a/src/resources/3_0_1/profiles/questionnaire/mutation.js +++ b/src/resources/3_0_1/profiles/questionnaire/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const QuestionnaireSchema = require('../../schemas/questionnaire.schema'); +const QuestionnaireSchema = require('../../schemas/questionnaire.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const QuestionnaireInput = require('../../inputs/questionnaire.input'); +const QuestionnaireInput = require('../../inputs/questionnaire.input.js'); -// Resolvers -const { - questionnaireCreateResolver, - questionnaireUpdateResolver, - questionnaireDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createQuestionnaire, + updateQuestionnaire, + removeQuestionnaire, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Questionnaire', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Questionnaire record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Questionnaire record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.QuestionnaireCreateMutation - * @summary QuestionnaireCreate Mutation. + * @summary QuestionnaireCreate mutation. */ module.exports.QuestionnaireCreateMutation = { - args: WriteArgs, - description: 'Create a Questionnaire', - resolve: scopeInvariant(scopeOptions, questionnaireCreateResolver), + description: 'Create a Questionnaire record', + resolve: scopeInvariant(scopeOptions, createQuestionnaire), type: QuestionnaireSchema, + args: WriteArgs, }; /** * @name exports.QuestionnaireUpdateMutation - * @summary QuestionnaireUpdate Mutation. + * @summary QuestionnaireUpdate mutation. */ module.exports.QuestionnaireUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Questionnaires', - resolve: scopeInvariant(scopeOptions, questionnaireUpdateResolver), + description: 'Update a Questionnaire record', + resolve: scopeInvariant(scopeOptions, updateQuestionnaire), type: QuestionnaireSchema, + args: WriteArgs, }; /** - * @name exports.QuestionnaireDeleteMutation - * @summary QuestionnaireDelete Mutation. + * @name exports.QuestionnaireRemoveMutation + * @summary QuestionnaireRemove mutation. */ -module.exports.QuestionnaireDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Questionnaire', - resolve: scopeInvariant(scopeOptions, questionnaireDeleteResolver), +module.exports.QuestionnaireRemoveMutation = { + description: 'Remove a Questionnaire record', + resolve: scopeInvariant(scopeOptions, removeQuestionnaire), type: QuestionnaireSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/questionnaire/query.js b/src/resources/3_0_1/profiles/questionnaire/query.js index 61009b84..b69b52ab 100644 --- a/src/resources/3_0_1/profiles/questionnaire/query.js +++ b/src/resources/3_0_1/profiles/questionnaire/query.js @@ -1,55 +1,65 @@ // Schemas -const QuestionnaireSchema = require('../../schemas/questionnaire.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const QuestionnaireSchema = require('../../schemas/questionnaire.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const QuestionnaireArgs = require('../../parameters/questionnaire.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const QuestionnaireArgs = require('../../parameters/questionnaire.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + QuestionnaireArgs, +); // Resolvers const { - questionnaireResolver, - questionnaireListResolver, - questionnaireInstanceResolver, + getQuestionnaire, + getQuestionnaireList, + getQuestionnaireInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Questionnaire', action: 'read', - version: '3_0_1', }; /** * @name exports.QuestionnaireQuery - * @summary Questionnaire Query. + * @summary Questionnaire query. */ module.exports.QuestionnaireQuery = { - args: Object.assign({}, CommonArgs, QuestionnaireArgs), description: 'Query for a single Questionnaire', - resolve: scopeInvariant(scopeOptions, questionnaireResolver), + resolve: scopeInvariant(scopeOptions, getQuestionnaire), type: QuestionnaireSchema, + args: args, }; /** * @name exports.QuestionnaireListQuery - * @summary QuestionnaireList Query. + * @summary Questionnaire query. */ module.exports.QuestionnaireListQuery = { - args: Object.assign({}, CommonArgs, QuestionnaireArgs), - description: 'Query for multiple Questionnaires', - resolve: scopeInvariant(scopeOptions, questionnaireListResolver), + description: 'Query for a more than or just one Questionnaire', + resolve: scopeInvariant(scopeOptions, getQuestionnaireList), type: BundleSchema, + args: args, }; /** * @name exports.QuestionnaireInstanceQuery - * @summary QuestionnaireInstance Query. + * @summary Questionnaire query. */ module.exports.QuestionnaireInstanceQuery = { - description: 'Get information about a single Questionnaire', - resolve: scopeInvariant(scopeOptions, questionnaireInstanceResolver), + description: 'Access information about a single Questionnaire', + resolve: scopeInvariant(scopeOptions, getQuestionnaireInstance), type: QuestionnaireSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/questionnaire/index.js b/src/resources/3_0_1/profiles/questionnaire/register.js similarity index 92% rename from src/resources/3_0_1/profiles/questionnaire/index.js rename to src/resources/3_0_1/profiles/questionnaire/register.js index 6cefba6c..77c4a615 100644 --- a/src/resources/3_0_1/profiles/questionnaire/index.js +++ b/src/resources/3_0_1/profiles/questionnaire/register.js @@ -1,15 +1,15 @@ +const { + QuestionnaireCreateMutation, + QuestionnaireUpdateMutation, + QuestionnaireRemoveMutation, +} = require('./mutation'); + const { QuestionnaireQuery, QuestionnaireListQuery, QuestionnaireInstanceQuery, } = require('./query'); -const { - QuestionnaireCreateMutation, - QuestionnaireUpdateMutation, - QuestionnaireDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { QuestionnaireCreate: QuestionnaireCreateMutation, QuestionnaireUpdate: QuestionnaireUpdateMutation, - QuestionnaireDelete: QuestionnaireDeleteMutation, + QuestionnaireRemove: QuestionnaireRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Questionnaire', path: '/3_0_1/Questionnaire/:id', query: QuestionnaireInstanceQuery, diff --git a/src/resources/3_0_1/profiles/questionnaire/resolver.js b/src/resources/3_0_1/profiles/questionnaire/resolver.js index 26eff2bd..f3ecab16 100644 --- a/src/resources/3_0_1/profiles/questionnaire/resolver.js +++ b/src/resources/3_0_1/profiles/questionnaire/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.questionnaireResolver + * @name exports.getQuestionnaire * @static - * @summary Questionnaire Resolver. + * @summary Questionnaire resolver. */ -module.exports.questionnaireResolver = function questionnaireResolver( +module.exports.getQuestionnaire = function getQuestionnaire( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireListResolver + * @name exports.getQuestionnaireList * @static - * @summary Questionnaire List Resolver. + * @summary Questionnaire list resolver. */ -module.exports.questionnaireListResolver = function questionnaireListResolver( +module.exports.getQuestionnaireList = function getQuestionnaireList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireInstanceResolver + * @name exports.getQuestionnaireInstance * @static - * @summary Questionnaire Instance Resolver. + * @summary Questionnaire instance resolver. */ -module.exports.questionnaireInstanceResolver = function questionnaireInstanceResolver( +module.exports.getQuestionnaireInstance = function getQuestionnaireInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireCreateResolver + * @name exports.createQuestionnaire * @static - * @summary Questionnaire Create Resolver. + * @summary Create Questionnaire resolver. */ -module.exports.questionnaireCreateResolver = function questionnaireCreateResolver( +module.exports.createQuestionnaire = function createQuestionnaire( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireUpdateResolver + * @name exports.updateQuestionnaire * @static - * @summary Questionnaire Update Resolver. + * @summary Update Questionnaire resolver. */ -module.exports.questionnaireUpdateResolver = function questionnaireUpdateResolver( +module.exports.updateQuestionnaire = function updateQuestionnaire( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireDeleteResolver + * @name exports.removeQuestionnaire * @static - * @summary Questionnaire Delete Resolver. + * @summary Remove Questionnaire resolver. */ -module.exports.questionnaireDeleteResolver = function questionnaireDeleteResolver( +module.exports.removeQuestionnaire = function removeQuestionnaire( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/questionnaireresponse/mutation.js b/src/resources/3_0_1/profiles/questionnaireresponse/mutation.js index c6711cf3..d3b85ac2 100644 --- a/src/resources/3_0_1/profiles/questionnaireresponse/mutation.js +++ b/src/resources/3_0_1/profiles/questionnaireresponse/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema'); +const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const QuestionnaireResponseInput = require('../../inputs/questionnaireresponse.input'); +const QuestionnaireResponseInput = require('../../inputs/questionnaireresponse.input.js'); -// Resolvers -const { - questionnaireresponseCreateResolver, - questionnaireresponseUpdateResolver, - questionnaireresponseDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createQuestionnaireResponse, + updateQuestionnaireResponse, + removeQuestionnaireResponse, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'QuestionnaireResponse', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a QuestionnaireResponse record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a QuestionnaireResponse record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.QuestionnaireResponseCreateMutation - * @summary QuestionnaireResponseCreate Mutation. + * @summary QuestionnaireResponseCreate mutation. */ module.exports.QuestionnaireResponseCreateMutation = { - args: WriteArgs, - description: 'Create a QuestionnaireResponse', - resolve: scopeInvariant(scopeOptions, questionnaireresponseCreateResolver), + description: 'Create a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, createQuestionnaireResponse), type: QuestionnaireResponseSchema, + args: WriteArgs, }; /** * @name exports.QuestionnaireResponseUpdateMutation - * @summary QuestionnaireResponseUpdate Mutation. + * @summary QuestionnaireResponseUpdate mutation. */ module.exports.QuestionnaireResponseUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple QuestionnaireResponses', - resolve: scopeInvariant(scopeOptions, questionnaireresponseUpdateResolver), + description: 'Update a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, updateQuestionnaireResponse), type: QuestionnaireResponseSchema, + args: WriteArgs, }; /** - * @name exports.QuestionnaireResponseDeleteMutation - * @summary QuestionnaireResponseDelete Mutation. + * @name exports.QuestionnaireResponseRemoveMutation + * @summary QuestionnaireResponseRemove mutation. */ -module.exports.QuestionnaireResponseDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single QuestionnaireResponse', - resolve: scopeInvariant(scopeOptions, questionnaireresponseDeleteResolver), +module.exports.QuestionnaireResponseRemoveMutation = { + description: 'Remove a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, removeQuestionnaireResponse), type: QuestionnaireResponseSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/questionnaireresponse/query.js b/src/resources/3_0_1/profiles/questionnaireresponse/query.js index 8ae6acae..c7ae0e16 100644 --- a/src/resources/3_0_1/profiles/questionnaireresponse/query.js +++ b/src/resources/3_0_1/profiles/questionnaireresponse/query.js @@ -1,55 +1,65 @@ // Schemas -const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const QuestionnaireResponseArgs = require('../../parameters/questionnaireresponse.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const QuestionnaireResponseArgs = require('../../parameters/questionnaireresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + QuestionnaireResponseArgs, +); // Resolvers const { - questionnaireresponseResolver, - questionnaireresponseListResolver, - questionnaireresponseInstanceResolver, + getQuestionnaireResponse, + getQuestionnaireResponseList, + getQuestionnaireResponseInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'QuestionnaireResponse', action: 'read', - version: '3_0_1', }; /** * @name exports.QuestionnaireResponseQuery - * @summary QuestionnaireResponse Query. + * @summary QuestionnaireResponse query. */ module.exports.QuestionnaireResponseQuery = { - args: Object.assign({}, CommonArgs, QuestionnaireResponseArgs), description: 'Query for a single QuestionnaireResponse', - resolve: scopeInvariant(scopeOptions, questionnaireresponseResolver), + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponse), type: QuestionnaireResponseSchema, + args: args, }; /** * @name exports.QuestionnaireResponseListQuery - * @summary QuestionnaireResponseList Query. + * @summary QuestionnaireResponse query. */ module.exports.QuestionnaireResponseListQuery = { - args: Object.assign({}, CommonArgs, QuestionnaireResponseArgs), - description: 'Query for multiple QuestionnaireResponses', - resolve: scopeInvariant(scopeOptions, questionnaireresponseListResolver), + description: 'Query for a more than or just one QuestionnaireResponse', + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponseList), type: BundleSchema, + args: args, }; /** * @name exports.QuestionnaireResponseInstanceQuery - * @summary QuestionnaireResponseInstance Query. + * @summary QuestionnaireResponse query. */ module.exports.QuestionnaireResponseInstanceQuery = { - description: 'Get information about a single QuestionnaireResponse', - resolve: scopeInvariant(scopeOptions, questionnaireresponseInstanceResolver), + description: 'Access information about a single QuestionnaireResponse', + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponseInstance), type: QuestionnaireResponseSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/questionnaireresponse/index.js b/src/resources/3_0_1/profiles/questionnaireresponse/register.js similarity index 91% rename from src/resources/3_0_1/profiles/questionnaireresponse/index.js rename to src/resources/3_0_1/profiles/questionnaireresponse/register.js index c3ba6ba9..97ee7536 100644 --- a/src/resources/3_0_1/profiles/questionnaireresponse/index.js +++ b/src/resources/3_0_1/profiles/questionnaireresponse/register.js @@ -1,15 +1,15 @@ +const { + QuestionnaireResponseCreateMutation, + QuestionnaireResponseUpdateMutation, + QuestionnaireResponseRemoveMutation, +} = require('./mutation'); + const { QuestionnaireResponseQuery, QuestionnaireResponseListQuery, QuestionnaireResponseInstanceQuery, } = require('./query'); -const { - QuestionnaireResponseCreateMutation, - QuestionnaireResponseUpdateMutation, - QuestionnaireResponseDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { QuestionnaireResponseCreate: QuestionnaireResponseCreateMutation, QuestionnaireResponseUpdate: QuestionnaireResponseUpdateMutation, - QuestionnaireResponseDelete: QuestionnaireResponseDeleteMutation, + QuestionnaireResponseRemove: QuestionnaireResponseRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'QuestionnaireResponse', path: '/3_0_1/QuestionnaireResponse/:id', query: QuestionnaireResponseInstanceQuery, diff --git a/src/resources/3_0_1/profiles/questionnaireresponse/resolver.js b/src/resources/3_0_1/profiles/questionnaireresponse/resolver.js index 22e4c7ed..7592bda6 100644 --- a/src/resources/3_0_1/profiles/questionnaireresponse/resolver.js +++ b/src/resources/3_0_1/profiles/questionnaireresponse/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.questionnaireresponseResolver + * @name exports.getQuestionnaireResponse * @static - * @summary QuestionnaireResponse Resolver. + * @summary QuestionnaireResponse resolver. */ -module.exports.questionnaireresponseResolver = function questionnaireresponseResolver( +module.exports.getQuestionnaireResponse = function getQuestionnaireResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseListResolver + * @name exports.getQuestionnaireResponseList * @static - * @summary QuestionnaireResponse List Resolver. + * @summary QuestionnaireResponse list resolver. */ -module.exports.questionnaireresponseListResolver = function questionnaireresponseListResolver( +module.exports.getQuestionnaireResponseList = function getQuestionnaireResponseList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseInstanceResolver + * @name exports.getQuestionnaireResponseInstance * @static - * @summary QuestionnaireResponse Instance Resolver. + * @summary QuestionnaireResponse instance resolver. */ -module.exports.questionnaireresponseInstanceResolver = function questionnaireresponseInstanceResolver( +module.exports.getQuestionnaireResponseInstance = function getQuestionnaireResponseInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseCreateResolver + * @name exports.createQuestionnaireResponse * @static - * @summary QuestionnaireResponse Create Resolver. + * @summary Create QuestionnaireResponse resolver. */ -module.exports.questionnaireresponseCreateResolver = function questionnaireresponseCreateResolver( +module.exports.createQuestionnaireResponse = function createQuestionnaireResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseUpdateResolver + * @name exports.updateQuestionnaireResponse * @static - * @summary QuestionnaireResponse Update Resolver. + * @summary Update QuestionnaireResponse resolver. */ -module.exports.questionnaireresponseUpdateResolver = function questionnaireresponseUpdateResolver( +module.exports.updateQuestionnaireResponse = function updateQuestionnaireResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.questionnaireresponseDeleteResolver + * @name exports.removeQuestionnaireResponse * @static - * @summary QuestionnaireResponse Delete Resolver. + * @summary Remove QuestionnaireResponse resolver. */ -module.exports.questionnaireresponseDeleteResolver = function questionnaireresponseDeleteResolver( +module.exports.removeQuestionnaireResponse = function removeQuestionnaireResponse( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/referralrequest/mutation.js b/src/resources/3_0_1/profiles/referralrequest/mutation.js index f2965ebe..0d679d98 100644 --- a/src/resources/3_0_1/profiles/referralrequest/mutation.js +++ b/src/resources/3_0_1/profiles/referralrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ReferralRequestSchema = require('../../schemas/referralrequest.schema'); +const ReferralRequestSchema = require('../../schemas/referralrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ReferralRequestInput = require('../../inputs/referralrequest.input'); +const ReferralRequestInput = require('../../inputs/referralrequest.input.js'); -// Resolvers -const { - referralrequestCreateResolver, - referralrequestUpdateResolver, - referralrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createReferralRequest, + updateReferralRequest, + removeReferralRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ReferralRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ReferralRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ReferralRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ReferralRequestCreateMutation - * @summary ReferralRequestCreate Mutation. + * @summary ReferralRequestCreate mutation. */ module.exports.ReferralRequestCreateMutation = { - args: WriteArgs, - description: 'Create a ReferralRequest', - resolve: scopeInvariant(scopeOptions, referralrequestCreateResolver), + description: 'Create a ReferralRequest record', + resolve: scopeInvariant(scopeOptions, createReferralRequest), type: ReferralRequestSchema, + args: WriteArgs, }; /** * @name exports.ReferralRequestUpdateMutation - * @summary ReferralRequestUpdate Mutation. + * @summary ReferralRequestUpdate mutation. */ module.exports.ReferralRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ReferralRequests', - resolve: scopeInvariant(scopeOptions, referralrequestUpdateResolver), + description: 'Update a ReferralRequest record', + resolve: scopeInvariant(scopeOptions, updateReferralRequest), type: ReferralRequestSchema, + args: WriteArgs, }; /** - * @name exports.ReferralRequestDeleteMutation - * @summary ReferralRequestDelete Mutation. + * @name exports.ReferralRequestRemoveMutation + * @summary ReferralRequestRemove mutation. */ -module.exports.ReferralRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ReferralRequest', - resolve: scopeInvariant(scopeOptions, referralrequestDeleteResolver), +module.exports.ReferralRequestRemoveMutation = { + description: 'Remove a ReferralRequest record', + resolve: scopeInvariant(scopeOptions, removeReferralRequest), type: ReferralRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/referralrequest/query.js b/src/resources/3_0_1/profiles/referralrequest/query.js index 3fdd9cfc..902f1739 100644 --- a/src/resources/3_0_1/profiles/referralrequest/query.js +++ b/src/resources/3_0_1/profiles/referralrequest/query.js @@ -1,55 +1,65 @@ // Schemas -const ReferralRequestSchema = require('../../schemas/referralrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ReferralRequestSchema = require('../../schemas/referralrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ReferralRequestArgs = require('../../parameters/referralrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ReferralRequestArgs = require('../../parameters/referralrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ReferralRequestArgs, +); // Resolvers const { - referralrequestResolver, - referralrequestListResolver, - referralrequestInstanceResolver, + getReferralRequest, + getReferralRequestList, + getReferralRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ReferralRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.ReferralRequestQuery - * @summary ReferralRequest Query. + * @summary ReferralRequest query. */ module.exports.ReferralRequestQuery = { - args: Object.assign({}, CommonArgs, ReferralRequestArgs), description: 'Query for a single ReferralRequest', - resolve: scopeInvariant(scopeOptions, referralrequestResolver), + resolve: scopeInvariant(scopeOptions, getReferralRequest), type: ReferralRequestSchema, + args: args, }; /** * @name exports.ReferralRequestListQuery - * @summary ReferralRequestList Query. + * @summary ReferralRequest query. */ module.exports.ReferralRequestListQuery = { - args: Object.assign({}, CommonArgs, ReferralRequestArgs), - description: 'Query for multiple ReferralRequests', - resolve: scopeInvariant(scopeOptions, referralrequestListResolver), + description: 'Query for a more than or just one ReferralRequest', + resolve: scopeInvariant(scopeOptions, getReferralRequestList), type: BundleSchema, + args: args, }; /** * @name exports.ReferralRequestInstanceQuery - * @summary ReferralRequestInstance Query. + * @summary ReferralRequest query. */ module.exports.ReferralRequestInstanceQuery = { - description: 'Get information about a single ReferralRequest', - resolve: scopeInvariant(scopeOptions, referralrequestInstanceResolver), + description: 'Access information about a single ReferralRequest', + resolve: scopeInvariant(scopeOptions, getReferralRequestInstance), type: ReferralRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/referralrequest/index.js b/src/resources/3_0_1/profiles/referralrequest/register.js similarity index 91% rename from src/resources/3_0_1/profiles/referralrequest/index.js rename to src/resources/3_0_1/profiles/referralrequest/register.js index 58194f0f..a3f1e8ce 100644 --- a/src/resources/3_0_1/profiles/referralrequest/index.js +++ b/src/resources/3_0_1/profiles/referralrequest/register.js @@ -1,15 +1,15 @@ +const { + ReferralRequestCreateMutation, + ReferralRequestUpdateMutation, + ReferralRequestRemoveMutation, +} = require('./mutation'); + const { ReferralRequestQuery, ReferralRequestListQuery, ReferralRequestInstanceQuery, } = require('./query'); -const { - ReferralRequestCreateMutation, - ReferralRequestUpdateMutation, - ReferralRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ReferralRequestCreate: ReferralRequestCreateMutation, ReferralRequestUpdate: ReferralRequestUpdateMutation, - ReferralRequestDelete: ReferralRequestDeleteMutation, + ReferralRequestRemove: ReferralRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ReferralRequest', path: '/3_0_1/ReferralRequest/:id', query: ReferralRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/referralrequest/resolver.js b/src/resources/3_0_1/profiles/referralrequest/resolver.js index 382aa24e..ee9682fd 100644 --- a/src/resources/3_0_1/profiles/referralrequest/resolver.js +++ b/src/resources/3_0_1/profiles/referralrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.referralrequestResolver + * @name exports.getReferralRequest * @static - * @summary ReferralRequest Resolver. + * @summary ReferralRequest resolver. */ -module.exports.referralrequestResolver = function referralrequestResolver( +module.exports.getReferralRequest = function getReferralRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestListResolver + * @name exports.getReferralRequestList * @static - * @summary ReferralRequest List Resolver. + * @summary ReferralRequest list resolver. */ -module.exports.referralrequestListResolver = function referralrequestListResolver( +module.exports.getReferralRequestList = function getReferralRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestInstanceResolver + * @name exports.getReferralRequestInstance * @static - * @summary ReferralRequest Instance Resolver. + * @summary ReferralRequest instance resolver. */ -module.exports.referralrequestInstanceResolver = function referralrequestInstanceResolver( +module.exports.getReferralRequestInstance = function getReferralRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestCreateResolver + * @name exports.createReferralRequest * @static - * @summary ReferralRequest Create Resolver. + * @summary Create ReferralRequest resolver. */ -module.exports.referralrequestCreateResolver = function referralrequestCreateResolver( +module.exports.createReferralRequest = function createReferralRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestUpdateResolver + * @name exports.updateReferralRequest * @static - * @summary ReferralRequest Update Resolver. + * @summary Update ReferralRequest resolver. */ -module.exports.referralrequestUpdateResolver = function referralrequestUpdateResolver( +module.exports.updateReferralRequest = function updateReferralRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.referralrequestDeleteResolver + * @name exports.removeReferralRequest * @static - * @summary ReferralRequest Delete Resolver. + * @summary Remove ReferralRequest resolver. */ -module.exports.referralrequestDeleteResolver = function referralrequestDeleteResolver( +module.exports.removeReferralRequest = function removeReferralRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/relatedperson/mutation.js b/src/resources/3_0_1/profiles/relatedperson/mutation.js index 38bef596..2e90ec2f 100644 --- a/src/resources/3_0_1/profiles/relatedperson/mutation.js +++ b/src/resources/3_0_1/profiles/relatedperson/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const RelatedPersonSchema = require('../../schemas/relatedperson.schema'); +const RelatedPersonSchema = require('../../schemas/relatedperson.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const RelatedPersonInput = require('../../inputs/relatedperson.input'); +const RelatedPersonInput = require('../../inputs/relatedperson.input.js'); -// Resolvers -const { - relatedpersonCreateResolver, - relatedpersonUpdateResolver, - relatedpersonDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createRelatedPerson, + updateRelatedPerson, + removeRelatedPerson, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RelatedPerson', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a RelatedPerson record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a RelatedPerson record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.RelatedPersonCreateMutation - * @summary RelatedPersonCreate Mutation. + * @summary RelatedPersonCreate mutation. */ module.exports.RelatedPersonCreateMutation = { - args: WriteArgs, - description: 'Create a RelatedPerson', - resolve: scopeInvariant(scopeOptions, relatedpersonCreateResolver), + description: 'Create a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, createRelatedPerson), type: RelatedPersonSchema, + args: WriteArgs, }; /** * @name exports.RelatedPersonUpdateMutation - * @summary RelatedPersonUpdate Mutation. + * @summary RelatedPersonUpdate mutation. */ module.exports.RelatedPersonUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple RelatedPersons', - resolve: scopeInvariant(scopeOptions, relatedpersonUpdateResolver), + description: 'Update a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, updateRelatedPerson), type: RelatedPersonSchema, + args: WriteArgs, }; /** - * @name exports.RelatedPersonDeleteMutation - * @summary RelatedPersonDelete Mutation. + * @name exports.RelatedPersonRemoveMutation + * @summary RelatedPersonRemove mutation. */ -module.exports.RelatedPersonDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single RelatedPerson', - resolve: scopeInvariant(scopeOptions, relatedpersonDeleteResolver), +module.exports.RelatedPersonRemoveMutation = { + description: 'Remove a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, removeRelatedPerson), type: RelatedPersonSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/relatedperson/query.js b/src/resources/3_0_1/profiles/relatedperson/query.js index 8422f3fa..2930affe 100644 --- a/src/resources/3_0_1/profiles/relatedperson/query.js +++ b/src/resources/3_0_1/profiles/relatedperson/query.js @@ -1,55 +1,65 @@ // Schemas -const RelatedPersonSchema = require('../../schemas/relatedperson.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RelatedPersonSchema = require('../../schemas/relatedperson.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const RelatedPersonArgs = require('../../parameters/relatedperson.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const RelatedPersonArgs = require('../../parameters/relatedperson.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + RelatedPersonArgs, +); // Resolvers const { - relatedpersonResolver, - relatedpersonListResolver, - relatedpersonInstanceResolver, + getRelatedPerson, + getRelatedPersonList, + getRelatedPersonInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RelatedPerson', action: 'read', - version: '3_0_1', }; /** * @name exports.RelatedPersonQuery - * @summary RelatedPerson Query. + * @summary RelatedPerson query. */ module.exports.RelatedPersonQuery = { - args: Object.assign({}, CommonArgs, RelatedPersonArgs), description: 'Query for a single RelatedPerson', - resolve: scopeInvariant(scopeOptions, relatedpersonResolver), + resolve: scopeInvariant(scopeOptions, getRelatedPerson), type: RelatedPersonSchema, + args: args, }; /** * @name exports.RelatedPersonListQuery - * @summary RelatedPersonList Query. + * @summary RelatedPerson query. */ module.exports.RelatedPersonListQuery = { - args: Object.assign({}, CommonArgs, RelatedPersonArgs), - description: 'Query for multiple RelatedPersons', - resolve: scopeInvariant(scopeOptions, relatedpersonListResolver), + description: 'Query for a more than or just one RelatedPerson', + resolve: scopeInvariant(scopeOptions, getRelatedPersonList), type: BundleSchema, + args: args, }; /** * @name exports.RelatedPersonInstanceQuery - * @summary RelatedPersonInstance Query. + * @summary RelatedPerson query. */ module.exports.RelatedPersonInstanceQuery = { - description: 'Get information about a single RelatedPerson', - resolve: scopeInvariant(scopeOptions, relatedpersonInstanceResolver), + description: 'Access information about a single RelatedPerson', + resolve: scopeInvariant(scopeOptions, getRelatedPersonInstance), type: RelatedPersonSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/relatedperson/index.js b/src/resources/3_0_1/profiles/relatedperson/register.js similarity index 92% rename from src/resources/3_0_1/profiles/relatedperson/index.js rename to src/resources/3_0_1/profiles/relatedperson/register.js index 6dbcbb7e..c6c4651e 100644 --- a/src/resources/3_0_1/profiles/relatedperson/index.js +++ b/src/resources/3_0_1/profiles/relatedperson/register.js @@ -1,15 +1,15 @@ +const { + RelatedPersonCreateMutation, + RelatedPersonUpdateMutation, + RelatedPersonRemoveMutation, +} = require('./mutation'); + const { RelatedPersonQuery, RelatedPersonListQuery, RelatedPersonInstanceQuery, } = require('./query'); -const { - RelatedPersonCreateMutation, - RelatedPersonUpdateMutation, - RelatedPersonDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { RelatedPersonCreate: RelatedPersonCreateMutation, RelatedPersonUpdate: RelatedPersonUpdateMutation, - RelatedPersonDelete: RelatedPersonDeleteMutation, + RelatedPersonRemove: RelatedPersonRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'RelatedPerson', path: '/3_0_1/RelatedPerson/:id', query: RelatedPersonInstanceQuery, diff --git a/src/resources/3_0_1/profiles/relatedperson/resolver.js b/src/resources/3_0_1/profiles/relatedperson/resolver.js index 7993e818..9302c7ce 100644 --- a/src/resources/3_0_1/profiles/relatedperson/resolver.js +++ b/src/resources/3_0_1/profiles/relatedperson/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.relatedpersonResolver + * @name exports.getRelatedPerson * @static - * @summary RelatedPerson Resolver. + * @summary RelatedPerson resolver. */ -module.exports.relatedpersonResolver = function relatedpersonResolver( +module.exports.getRelatedPerson = function getRelatedPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonListResolver + * @name exports.getRelatedPersonList * @static - * @summary RelatedPerson List Resolver. + * @summary RelatedPerson list resolver. */ -module.exports.relatedpersonListResolver = function relatedpersonListResolver( +module.exports.getRelatedPersonList = function getRelatedPersonList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonInstanceResolver + * @name exports.getRelatedPersonInstance * @static - * @summary RelatedPerson Instance Resolver. + * @summary RelatedPerson instance resolver. */ -module.exports.relatedpersonInstanceResolver = function relatedpersonInstanceResolver( +module.exports.getRelatedPersonInstance = function getRelatedPersonInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonCreateResolver + * @name exports.createRelatedPerson * @static - * @summary RelatedPerson Create Resolver. + * @summary Create RelatedPerson resolver. */ -module.exports.relatedpersonCreateResolver = function relatedpersonCreateResolver( +module.exports.createRelatedPerson = function createRelatedPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonUpdateResolver + * @name exports.updateRelatedPerson * @static - * @summary RelatedPerson Update Resolver. + * @summary Update RelatedPerson resolver. */ -module.exports.relatedpersonUpdateResolver = function relatedpersonUpdateResolver( +module.exports.updateRelatedPerson = function updateRelatedPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.relatedpersonDeleteResolver + * @name exports.removeRelatedPerson * @static - * @summary RelatedPerson Delete Resolver. + * @summary Remove RelatedPerson resolver. */ -module.exports.relatedpersonDeleteResolver = function relatedpersonDeleteResolver( +module.exports.removeRelatedPerson = function removeRelatedPerson( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/requestgroup/mutation.js b/src/resources/3_0_1/profiles/requestgroup/mutation.js index 5569546d..e95627df 100644 --- a/src/resources/3_0_1/profiles/requestgroup/mutation.js +++ b/src/resources/3_0_1/profiles/requestgroup/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const RequestGroupSchema = require('../../schemas/requestgroup.schema'); +const RequestGroupSchema = require('../../schemas/requestgroup.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const RequestGroupInput = require('../../inputs/requestgroup.input'); +const RequestGroupInput = require('../../inputs/requestgroup.input.js'); -// Resolvers -const { - requestgroupCreateResolver, - requestgroupUpdateResolver, - requestgroupDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createRequestGroup, + updateRequestGroup, + removeRequestGroup, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RequestGroup', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a RequestGroup record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a RequestGroup record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.RequestGroupCreateMutation - * @summary RequestGroupCreate Mutation. + * @summary RequestGroupCreate mutation. */ module.exports.RequestGroupCreateMutation = { - args: WriteArgs, - description: 'Create a RequestGroup', - resolve: scopeInvariant(scopeOptions, requestgroupCreateResolver), + description: 'Create a RequestGroup record', + resolve: scopeInvariant(scopeOptions, createRequestGroup), type: RequestGroupSchema, + args: WriteArgs, }; /** * @name exports.RequestGroupUpdateMutation - * @summary RequestGroupUpdate Mutation. + * @summary RequestGroupUpdate mutation. */ module.exports.RequestGroupUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple RequestGroups', - resolve: scopeInvariant(scopeOptions, requestgroupUpdateResolver), + description: 'Update a RequestGroup record', + resolve: scopeInvariant(scopeOptions, updateRequestGroup), type: RequestGroupSchema, + args: WriteArgs, }; /** - * @name exports.RequestGroupDeleteMutation - * @summary RequestGroupDelete Mutation. + * @name exports.RequestGroupRemoveMutation + * @summary RequestGroupRemove mutation. */ -module.exports.RequestGroupDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single RequestGroup', - resolve: scopeInvariant(scopeOptions, requestgroupDeleteResolver), +module.exports.RequestGroupRemoveMutation = { + description: 'Remove a RequestGroup record', + resolve: scopeInvariant(scopeOptions, removeRequestGroup), type: RequestGroupSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/requestgroup/query.js b/src/resources/3_0_1/profiles/requestgroup/query.js index 75b87e40..353378f8 100644 --- a/src/resources/3_0_1/profiles/requestgroup/query.js +++ b/src/resources/3_0_1/profiles/requestgroup/query.js @@ -1,55 +1,65 @@ // Schemas -const RequestGroupSchema = require('../../schemas/requestgroup.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RequestGroupSchema = require('../../schemas/requestgroup.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const RequestGroupArgs = require('../../parameters/requestgroup.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const RequestGroupArgs = require('../../parameters/requestgroup.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + RequestGroupArgs, +); // Resolvers const { - requestgroupResolver, - requestgroupListResolver, - requestgroupInstanceResolver, + getRequestGroup, + getRequestGroupList, + getRequestGroupInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RequestGroup', action: 'read', - version: '3_0_1', }; /** * @name exports.RequestGroupQuery - * @summary RequestGroup Query. + * @summary RequestGroup query. */ module.exports.RequestGroupQuery = { - args: Object.assign({}, CommonArgs, RequestGroupArgs), description: 'Query for a single RequestGroup', - resolve: scopeInvariant(scopeOptions, requestgroupResolver), + resolve: scopeInvariant(scopeOptions, getRequestGroup), type: RequestGroupSchema, + args: args, }; /** * @name exports.RequestGroupListQuery - * @summary RequestGroupList Query. + * @summary RequestGroup query. */ module.exports.RequestGroupListQuery = { - args: Object.assign({}, CommonArgs, RequestGroupArgs), - description: 'Query for multiple RequestGroups', - resolve: scopeInvariant(scopeOptions, requestgroupListResolver), + description: 'Query for a more than or just one RequestGroup', + resolve: scopeInvariant(scopeOptions, getRequestGroupList), type: BundleSchema, + args: args, }; /** * @name exports.RequestGroupInstanceQuery - * @summary RequestGroupInstance Query. + * @summary RequestGroup query. */ module.exports.RequestGroupInstanceQuery = { - description: 'Get information about a single RequestGroup', - resolve: scopeInvariant(scopeOptions, requestgroupInstanceResolver), + description: 'Access information about a single RequestGroup', + resolve: scopeInvariant(scopeOptions, getRequestGroupInstance), type: RequestGroupSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/requestgroup/index.js b/src/resources/3_0_1/profiles/requestgroup/register.js similarity index 92% rename from src/resources/3_0_1/profiles/requestgroup/index.js rename to src/resources/3_0_1/profiles/requestgroup/register.js index cb14b5f0..06ca4ed0 100644 --- a/src/resources/3_0_1/profiles/requestgroup/index.js +++ b/src/resources/3_0_1/profiles/requestgroup/register.js @@ -1,15 +1,15 @@ +const { + RequestGroupCreateMutation, + RequestGroupUpdateMutation, + RequestGroupRemoveMutation, +} = require('./mutation'); + const { RequestGroupQuery, RequestGroupListQuery, RequestGroupInstanceQuery, } = require('./query'); -const { - RequestGroupCreateMutation, - RequestGroupUpdateMutation, - RequestGroupDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { RequestGroupCreate: RequestGroupCreateMutation, RequestGroupUpdate: RequestGroupUpdateMutation, - RequestGroupDelete: RequestGroupDeleteMutation, + RequestGroupRemove: RequestGroupRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'RequestGroup', path: '/3_0_1/RequestGroup/:id', query: RequestGroupInstanceQuery, diff --git a/src/resources/3_0_1/profiles/requestgroup/resolver.js b/src/resources/3_0_1/profiles/requestgroup/resolver.js index 9184f4db..9941fcbd 100644 --- a/src/resources/3_0_1/profiles/requestgroup/resolver.js +++ b/src/resources/3_0_1/profiles/requestgroup/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.requestgroupResolver + * @name exports.getRequestGroup * @static - * @summary RequestGroup Resolver. + * @summary RequestGroup resolver. */ -module.exports.requestgroupResolver = function requestgroupResolver( +module.exports.getRequestGroup = function getRequestGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.requestgroupListResolver + * @name exports.getRequestGroupList * @static - * @summary RequestGroup List Resolver. + * @summary RequestGroup list resolver. */ -module.exports.requestgroupListResolver = function requestgroupListResolver( +module.exports.getRequestGroupList = function getRequestGroupList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.requestgroupInstanceResolver + * @name exports.getRequestGroupInstance * @static - * @summary RequestGroup Instance Resolver. + * @summary RequestGroup instance resolver. */ -module.exports.requestgroupInstanceResolver = function requestgroupInstanceResolver( +module.exports.getRequestGroupInstance = function getRequestGroupInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.requestgroupCreateResolver + * @name exports.createRequestGroup * @static - * @summary RequestGroup Create Resolver. + * @summary Create RequestGroup resolver. */ -module.exports.requestgroupCreateResolver = function requestgroupCreateResolver( +module.exports.createRequestGroup = function createRequestGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.requestgroupUpdateResolver + * @name exports.updateRequestGroup * @static - * @summary RequestGroup Update Resolver. + * @summary Update RequestGroup resolver. */ -module.exports.requestgroupUpdateResolver = function requestgroupUpdateResolver( +module.exports.updateRequestGroup = function updateRequestGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.requestgroupDeleteResolver + * @name exports.removeRequestGroup * @static - * @summary RequestGroup Delete Resolver. + * @summary Remove RequestGroup resolver. */ -module.exports.requestgroupDeleteResolver = function requestgroupDeleteResolver( +module.exports.removeRequestGroup = function removeRequestGroup( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/researchstudy/mutation.js b/src/resources/3_0_1/profiles/researchstudy/mutation.js index 24d2ccf4..53bd7e20 100644 --- a/src/resources/3_0_1/profiles/researchstudy/mutation.js +++ b/src/resources/3_0_1/profiles/researchstudy/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ResearchStudySchema = require('../../schemas/researchstudy.schema'); +const ResearchStudySchema = require('../../schemas/researchstudy.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ResearchStudyInput = require('../../inputs/researchstudy.input'); +const ResearchStudyInput = require('../../inputs/researchstudy.input.js'); -// Resolvers -const { - researchstudyCreateResolver, - researchstudyUpdateResolver, - researchstudyDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createResearchStudy, + updateResearchStudy, + removeResearchStudy, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ResearchStudy', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ResearchStudy record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ResearchStudy record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ResearchStudyCreateMutation - * @summary ResearchStudyCreate Mutation. + * @summary ResearchStudyCreate mutation. */ module.exports.ResearchStudyCreateMutation = { - args: WriteArgs, - description: 'Create a ResearchStudy', - resolve: scopeInvariant(scopeOptions, researchstudyCreateResolver), + description: 'Create a ResearchStudy record', + resolve: scopeInvariant(scopeOptions, createResearchStudy), type: ResearchStudySchema, + args: WriteArgs, }; /** * @name exports.ResearchStudyUpdateMutation - * @summary ResearchStudyUpdate Mutation. + * @summary ResearchStudyUpdate mutation. */ module.exports.ResearchStudyUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ResearchStudys', - resolve: scopeInvariant(scopeOptions, researchstudyUpdateResolver), + description: 'Update a ResearchStudy record', + resolve: scopeInvariant(scopeOptions, updateResearchStudy), type: ResearchStudySchema, + args: WriteArgs, }; /** - * @name exports.ResearchStudyDeleteMutation - * @summary ResearchStudyDelete Mutation. + * @name exports.ResearchStudyRemoveMutation + * @summary ResearchStudyRemove mutation. */ -module.exports.ResearchStudyDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ResearchStudy', - resolve: scopeInvariant(scopeOptions, researchstudyDeleteResolver), +module.exports.ResearchStudyRemoveMutation = { + description: 'Remove a ResearchStudy record', + resolve: scopeInvariant(scopeOptions, removeResearchStudy), type: ResearchStudySchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/researchstudy/query.js b/src/resources/3_0_1/profiles/researchstudy/query.js index bc418421..e9e30b20 100644 --- a/src/resources/3_0_1/profiles/researchstudy/query.js +++ b/src/resources/3_0_1/profiles/researchstudy/query.js @@ -1,55 +1,65 @@ // Schemas -const ResearchStudySchema = require('../../schemas/researchstudy.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ResearchStudySchema = require('../../schemas/researchstudy.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ResearchStudyArgs = require('../../parameters/researchstudy.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ResearchStudyArgs = require('../../parameters/researchstudy.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ResearchStudyArgs, +); // Resolvers const { - researchstudyResolver, - researchstudyListResolver, - researchstudyInstanceResolver, + getResearchStudy, + getResearchStudyList, + getResearchStudyInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ResearchStudy', action: 'read', - version: '3_0_1', }; /** * @name exports.ResearchStudyQuery - * @summary ResearchStudy Query. + * @summary ResearchStudy query. */ module.exports.ResearchStudyQuery = { - args: Object.assign({}, CommonArgs, ResearchStudyArgs), description: 'Query for a single ResearchStudy', - resolve: scopeInvariant(scopeOptions, researchstudyResolver), + resolve: scopeInvariant(scopeOptions, getResearchStudy), type: ResearchStudySchema, + args: args, }; /** * @name exports.ResearchStudyListQuery - * @summary ResearchStudyList Query. + * @summary ResearchStudy query. */ module.exports.ResearchStudyListQuery = { - args: Object.assign({}, CommonArgs, ResearchStudyArgs), - description: 'Query for multiple ResearchStudys', - resolve: scopeInvariant(scopeOptions, researchstudyListResolver), + description: 'Query for a more than or just one ResearchStudy', + resolve: scopeInvariant(scopeOptions, getResearchStudyList), type: BundleSchema, + args: args, }; /** * @name exports.ResearchStudyInstanceQuery - * @summary ResearchStudyInstance Query. + * @summary ResearchStudy query. */ module.exports.ResearchStudyInstanceQuery = { - description: 'Get information about a single ResearchStudy', - resolve: scopeInvariant(scopeOptions, researchstudyInstanceResolver), + description: 'Access information about a single ResearchStudy', + resolve: scopeInvariant(scopeOptions, getResearchStudyInstance), type: ResearchStudySchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/researchstudy/index.js b/src/resources/3_0_1/profiles/researchstudy/register.js similarity index 92% rename from src/resources/3_0_1/profiles/researchstudy/index.js rename to src/resources/3_0_1/profiles/researchstudy/register.js index b72ddcd4..e1acc383 100644 --- a/src/resources/3_0_1/profiles/researchstudy/index.js +++ b/src/resources/3_0_1/profiles/researchstudy/register.js @@ -1,15 +1,15 @@ +const { + ResearchStudyCreateMutation, + ResearchStudyUpdateMutation, + ResearchStudyRemoveMutation, +} = require('./mutation'); + const { ResearchStudyQuery, ResearchStudyListQuery, ResearchStudyInstanceQuery, } = require('./query'); -const { - ResearchStudyCreateMutation, - ResearchStudyUpdateMutation, - ResearchStudyDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ResearchStudyCreate: ResearchStudyCreateMutation, ResearchStudyUpdate: ResearchStudyUpdateMutation, - ResearchStudyDelete: ResearchStudyDeleteMutation, + ResearchStudyRemove: ResearchStudyRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ResearchStudy', path: '/3_0_1/ResearchStudy/:id', query: ResearchStudyInstanceQuery, diff --git a/src/resources/3_0_1/profiles/researchstudy/resolver.js b/src/resources/3_0_1/profiles/researchstudy/resolver.js index 1b1d8eac..2cf0fb52 100644 --- a/src/resources/3_0_1/profiles/researchstudy/resolver.js +++ b/src/resources/3_0_1/profiles/researchstudy/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.researchstudyResolver + * @name exports.getResearchStudy * @static - * @summary ResearchStudy Resolver. + * @summary ResearchStudy resolver. */ -module.exports.researchstudyResolver = function researchstudyResolver( +module.exports.getResearchStudy = function getResearchStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchstudyListResolver + * @name exports.getResearchStudyList * @static - * @summary ResearchStudy List Resolver. + * @summary ResearchStudy list resolver. */ -module.exports.researchstudyListResolver = function researchstudyListResolver( +module.exports.getResearchStudyList = function getResearchStudyList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchstudyInstanceResolver + * @name exports.getResearchStudyInstance * @static - * @summary ResearchStudy Instance Resolver. + * @summary ResearchStudy instance resolver. */ -module.exports.researchstudyInstanceResolver = function researchstudyInstanceResolver( +module.exports.getResearchStudyInstance = function getResearchStudyInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchstudyCreateResolver + * @name exports.createResearchStudy * @static - * @summary ResearchStudy Create Resolver. + * @summary Create ResearchStudy resolver. */ -module.exports.researchstudyCreateResolver = function researchstudyCreateResolver( +module.exports.createResearchStudy = function createResearchStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchstudyUpdateResolver + * @name exports.updateResearchStudy * @static - * @summary ResearchStudy Update Resolver. + * @summary Update ResearchStudy resolver. */ -module.exports.researchstudyUpdateResolver = function researchstudyUpdateResolver( +module.exports.updateResearchStudy = function updateResearchStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchstudyDeleteResolver + * @name exports.removeResearchStudy * @static - * @summary ResearchStudy Delete Resolver. + * @summary Remove ResearchStudy resolver. */ -module.exports.researchstudyDeleteResolver = function researchstudyDeleteResolver( +module.exports.removeResearchStudy = function removeResearchStudy( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/researchsubject/mutation.js b/src/resources/3_0_1/profiles/researchsubject/mutation.js index c43808f7..767aa14d 100644 --- a/src/resources/3_0_1/profiles/researchsubject/mutation.js +++ b/src/resources/3_0_1/profiles/researchsubject/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ResearchSubjectSchema = require('../../schemas/researchsubject.schema'); +const ResearchSubjectSchema = require('../../schemas/researchsubject.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ResearchSubjectInput = require('../../inputs/researchsubject.input'); +const ResearchSubjectInput = require('../../inputs/researchsubject.input.js'); -// Resolvers -const { - researchsubjectCreateResolver, - researchsubjectUpdateResolver, - researchsubjectDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createResearchSubject, + updateResearchSubject, + removeResearchSubject, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ResearchSubject', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ResearchSubject record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ResearchSubject record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ResearchSubjectCreateMutation - * @summary ResearchSubjectCreate Mutation. + * @summary ResearchSubjectCreate mutation. */ module.exports.ResearchSubjectCreateMutation = { - args: WriteArgs, - description: 'Create a ResearchSubject', - resolve: scopeInvariant(scopeOptions, researchsubjectCreateResolver), + description: 'Create a ResearchSubject record', + resolve: scopeInvariant(scopeOptions, createResearchSubject), type: ResearchSubjectSchema, + args: WriteArgs, }; /** * @name exports.ResearchSubjectUpdateMutation - * @summary ResearchSubjectUpdate Mutation. + * @summary ResearchSubjectUpdate mutation. */ module.exports.ResearchSubjectUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ResearchSubjects', - resolve: scopeInvariant(scopeOptions, researchsubjectUpdateResolver), + description: 'Update a ResearchSubject record', + resolve: scopeInvariant(scopeOptions, updateResearchSubject), type: ResearchSubjectSchema, + args: WriteArgs, }; /** - * @name exports.ResearchSubjectDeleteMutation - * @summary ResearchSubjectDelete Mutation. + * @name exports.ResearchSubjectRemoveMutation + * @summary ResearchSubjectRemove mutation. */ -module.exports.ResearchSubjectDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ResearchSubject', - resolve: scopeInvariant(scopeOptions, researchsubjectDeleteResolver), +module.exports.ResearchSubjectRemoveMutation = { + description: 'Remove a ResearchSubject record', + resolve: scopeInvariant(scopeOptions, removeResearchSubject), type: ResearchSubjectSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/researchsubject/query.js b/src/resources/3_0_1/profiles/researchsubject/query.js index bcb61353..4012aea5 100644 --- a/src/resources/3_0_1/profiles/researchsubject/query.js +++ b/src/resources/3_0_1/profiles/researchsubject/query.js @@ -1,55 +1,65 @@ // Schemas -const ResearchSubjectSchema = require('../../schemas/researchsubject.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ResearchSubjectSchema = require('../../schemas/researchsubject.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ResearchSubjectArgs = require('../../parameters/researchsubject.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ResearchSubjectArgs = require('../../parameters/researchsubject.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ResearchSubjectArgs, +); // Resolvers const { - researchsubjectResolver, - researchsubjectListResolver, - researchsubjectInstanceResolver, + getResearchSubject, + getResearchSubjectList, + getResearchSubjectInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ResearchSubject', action: 'read', - version: '3_0_1', }; /** * @name exports.ResearchSubjectQuery - * @summary ResearchSubject Query. + * @summary ResearchSubject query. */ module.exports.ResearchSubjectQuery = { - args: Object.assign({}, CommonArgs, ResearchSubjectArgs), description: 'Query for a single ResearchSubject', - resolve: scopeInvariant(scopeOptions, researchsubjectResolver), + resolve: scopeInvariant(scopeOptions, getResearchSubject), type: ResearchSubjectSchema, + args: args, }; /** * @name exports.ResearchSubjectListQuery - * @summary ResearchSubjectList Query. + * @summary ResearchSubject query. */ module.exports.ResearchSubjectListQuery = { - args: Object.assign({}, CommonArgs, ResearchSubjectArgs), - description: 'Query for multiple ResearchSubjects', - resolve: scopeInvariant(scopeOptions, researchsubjectListResolver), + description: 'Query for a more than or just one ResearchSubject', + resolve: scopeInvariant(scopeOptions, getResearchSubjectList), type: BundleSchema, + args: args, }; /** * @name exports.ResearchSubjectInstanceQuery - * @summary ResearchSubjectInstance Query. + * @summary ResearchSubject query. */ module.exports.ResearchSubjectInstanceQuery = { - description: 'Get information about a single ResearchSubject', - resolve: scopeInvariant(scopeOptions, researchsubjectInstanceResolver), + description: 'Access information about a single ResearchSubject', + resolve: scopeInvariant(scopeOptions, getResearchSubjectInstance), type: ResearchSubjectSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/researchsubject/index.js b/src/resources/3_0_1/profiles/researchsubject/register.js similarity index 91% rename from src/resources/3_0_1/profiles/researchsubject/index.js rename to src/resources/3_0_1/profiles/researchsubject/register.js index abe95b07..3130402b 100644 --- a/src/resources/3_0_1/profiles/researchsubject/index.js +++ b/src/resources/3_0_1/profiles/researchsubject/register.js @@ -1,15 +1,15 @@ +const { + ResearchSubjectCreateMutation, + ResearchSubjectUpdateMutation, + ResearchSubjectRemoveMutation, +} = require('./mutation'); + const { ResearchSubjectQuery, ResearchSubjectListQuery, ResearchSubjectInstanceQuery, } = require('./query'); -const { - ResearchSubjectCreateMutation, - ResearchSubjectUpdateMutation, - ResearchSubjectDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ResearchSubjectCreate: ResearchSubjectCreateMutation, ResearchSubjectUpdate: ResearchSubjectUpdateMutation, - ResearchSubjectDelete: ResearchSubjectDeleteMutation, + ResearchSubjectRemove: ResearchSubjectRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ResearchSubject', path: '/3_0_1/ResearchSubject/:id', query: ResearchSubjectInstanceQuery, diff --git a/src/resources/3_0_1/profiles/researchsubject/resolver.js b/src/resources/3_0_1/profiles/researchsubject/resolver.js index 75242d19..1d9393d5 100644 --- a/src/resources/3_0_1/profiles/researchsubject/resolver.js +++ b/src/resources/3_0_1/profiles/researchsubject/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.researchsubjectResolver + * @name exports.getResearchSubject * @static - * @summary ResearchSubject Resolver. + * @summary ResearchSubject resolver. */ -module.exports.researchsubjectResolver = function researchsubjectResolver( +module.exports.getResearchSubject = function getResearchSubject( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchsubjectListResolver + * @name exports.getResearchSubjectList * @static - * @summary ResearchSubject List Resolver. + * @summary ResearchSubject list resolver. */ -module.exports.researchsubjectListResolver = function researchsubjectListResolver( +module.exports.getResearchSubjectList = function getResearchSubjectList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchsubjectInstanceResolver + * @name exports.getResearchSubjectInstance * @static - * @summary ResearchSubject Instance Resolver. + * @summary ResearchSubject instance resolver. */ -module.exports.researchsubjectInstanceResolver = function researchsubjectInstanceResolver( +module.exports.getResearchSubjectInstance = function getResearchSubjectInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchsubjectCreateResolver + * @name exports.createResearchSubject * @static - * @summary ResearchSubject Create Resolver. + * @summary Create ResearchSubject resolver. */ -module.exports.researchsubjectCreateResolver = function researchsubjectCreateResolver( +module.exports.createResearchSubject = function createResearchSubject( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchsubjectUpdateResolver + * @name exports.updateResearchSubject * @static - * @summary ResearchSubject Update Resolver. + * @summary Update ResearchSubject resolver. */ -module.exports.researchsubjectUpdateResolver = function researchsubjectUpdateResolver( +module.exports.updateResearchSubject = function updateResearchSubject( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.researchsubjectDeleteResolver + * @name exports.removeResearchSubject * @static - * @summary ResearchSubject Delete Resolver. + * @summary Remove ResearchSubject resolver. */ -module.exports.researchsubjectDeleteResolver = function researchsubjectDeleteResolver( +module.exports.removeResearchSubject = function removeResearchSubject( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/riskassessment/mutation.js b/src/resources/3_0_1/profiles/riskassessment/mutation.js index 82220d5a..51966f32 100644 --- a/src/resources/3_0_1/profiles/riskassessment/mutation.js +++ b/src/resources/3_0_1/profiles/riskassessment/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const RiskAssessmentSchema = require('../../schemas/riskassessment.schema'); +const RiskAssessmentSchema = require('../../schemas/riskassessment.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const RiskAssessmentInput = require('../../inputs/riskassessment.input'); +const RiskAssessmentInput = require('../../inputs/riskassessment.input.js'); -// Resolvers -const { - riskassessmentCreateResolver, - riskassessmentUpdateResolver, - riskassessmentDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createRiskAssessment, + updateRiskAssessment, + removeRiskAssessment, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RiskAssessment', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a RiskAssessment record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a RiskAssessment record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.RiskAssessmentCreateMutation - * @summary RiskAssessmentCreate Mutation. + * @summary RiskAssessmentCreate mutation. */ module.exports.RiskAssessmentCreateMutation = { - args: WriteArgs, - description: 'Create a RiskAssessment', - resolve: scopeInvariant(scopeOptions, riskassessmentCreateResolver), + description: 'Create a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, createRiskAssessment), type: RiskAssessmentSchema, + args: WriteArgs, }; /** * @name exports.RiskAssessmentUpdateMutation - * @summary RiskAssessmentUpdate Mutation. + * @summary RiskAssessmentUpdate mutation. */ module.exports.RiskAssessmentUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple RiskAssessments', - resolve: scopeInvariant(scopeOptions, riskassessmentUpdateResolver), + description: 'Update a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, updateRiskAssessment), type: RiskAssessmentSchema, + args: WriteArgs, }; /** - * @name exports.RiskAssessmentDeleteMutation - * @summary RiskAssessmentDelete Mutation. + * @name exports.RiskAssessmentRemoveMutation + * @summary RiskAssessmentRemove mutation. */ -module.exports.RiskAssessmentDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single RiskAssessment', - resolve: scopeInvariant(scopeOptions, riskassessmentDeleteResolver), +module.exports.RiskAssessmentRemoveMutation = { + description: 'Remove a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, removeRiskAssessment), type: RiskAssessmentSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/riskassessment/query.js b/src/resources/3_0_1/profiles/riskassessment/query.js index 96cf1eb2..74e8246b 100644 --- a/src/resources/3_0_1/profiles/riskassessment/query.js +++ b/src/resources/3_0_1/profiles/riskassessment/query.js @@ -1,55 +1,65 @@ // Schemas -const RiskAssessmentSchema = require('../../schemas/riskassessment.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RiskAssessmentSchema = require('../../schemas/riskassessment.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const RiskAssessmentArgs = require('../../parameters/riskassessment.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const RiskAssessmentArgs = require('../../parameters/riskassessment.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + RiskAssessmentArgs, +); // Resolvers const { - riskassessmentResolver, - riskassessmentListResolver, - riskassessmentInstanceResolver, + getRiskAssessment, + getRiskAssessmentList, + getRiskAssessmentInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'RiskAssessment', action: 'read', - version: '3_0_1', }; /** * @name exports.RiskAssessmentQuery - * @summary RiskAssessment Query. + * @summary RiskAssessment query. */ module.exports.RiskAssessmentQuery = { - args: Object.assign({}, CommonArgs, RiskAssessmentArgs), description: 'Query for a single RiskAssessment', - resolve: scopeInvariant(scopeOptions, riskassessmentResolver), + resolve: scopeInvariant(scopeOptions, getRiskAssessment), type: RiskAssessmentSchema, + args: args, }; /** * @name exports.RiskAssessmentListQuery - * @summary RiskAssessmentList Query. + * @summary RiskAssessment query. */ module.exports.RiskAssessmentListQuery = { - args: Object.assign({}, CommonArgs, RiskAssessmentArgs), - description: 'Query for multiple RiskAssessments', - resolve: scopeInvariant(scopeOptions, riskassessmentListResolver), + description: 'Query for a more than or just one RiskAssessment', + resolve: scopeInvariant(scopeOptions, getRiskAssessmentList), type: BundleSchema, + args: args, }; /** * @name exports.RiskAssessmentInstanceQuery - * @summary RiskAssessmentInstance Query. + * @summary RiskAssessment query. */ module.exports.RiskAssessmentInstanceQuery = { - description: 'Get information about a single RiskAssessment', - resolve: scopeInvariant(scopeOptions, riskassessmentInstanceResolver), + description: 'Access information about a single RiskAssessment', + resolve: scopeInvariant(scopeOptions, getRiskAssessmentInstance), type: RiskAssessmentSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/riskassessment/index.js b/src/resources/3_0_1/profiles/riskassessment/register.js similarity index 92% rename from src/resources/3_0_1/profiles/riskassessment/index.js rename to src/resources/3_0_1/profiles/riskassessment/register.js index aae4f42b..e8820e69 100644 --- a/src/resources/3_0_1/profiles/riskassessment/index.js +++ b/src/resources/3_0_1/profiles/riskassessment/register.js @@ -1,15 +1,15 @@ +const { + RiskAssessmentCreateMutation, + RiskAssessmentUpdateMutation, + RiskAssessmentRemoveMutation, +} = require('./mutation'); + const { RiskAssessmentQuery, RiskAssessmentListQuery, RiskAssessmentInstanceQuery, } = require('./query'); -const { - RiskAssessmentCreateMutation, - RiskAssessmentUpdateMutation, - RiskAssessmentDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { RiskAssessmentCreate: RiskAssessmentCreateMutation, RiskAssessmentUpdate: RiskAssessmentUpdateMutation, - RiskAssessmentDelete: RiskAssessmentDeleteMutation, + RiskAssessmentRemove: RiskAssessmentRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'RiskAssessment', path: '/3_0_1/RiskAssessment/:id', query: RiskAssessmentInstanceQuery, diff --git a/src/resources/3_0_1/profiles/riskassessment/resolver.js b/src/resources/3_0_1/profiles/riskassessment/resolver.js index 708c6a1b..719040b7 100644 --- a/src/resources/3_0_1/profiles/riskassessment/resolver.js +++ b/src/resources/3_0_1/profiles/riskassessment/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.riskassessmentResolver + * @name exports.getRiskAssessment * @static - * @summary RiskAssessment Resolver. + * @summary RiskAssessment resolver. */ -module.exports.riskassessmentResolver = function riskassessmentResolver( +module.exports.getRiskAssessment = function getRiskAssessment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentListResolver + * @name exports.getRiskAssessmentList * @static - * @summary RiskAssessment List Resolver. + * @summary RiskAssessment list resolver. */ -module.exports.riskassessmentListResolver = function riskassessmentListResolver( +module.exports.getRiskAssessmentList = function getRiskAssessmentList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentInstanceResolver + * @name exports.getRiskAssessmentInstance * @static - * @summary RiskAssessment Instance Resolver. + * @summary RiskAssessment instance resolver. */ -module.exports.riskassessmentInstanceResolver = function riskassessmentInstanceResolver( +module.exports.getRiskAssessmentInstance = function getRiskAssessmentInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentCreateResolver + * @name exports.createRiskAssessment * @static - * @summary RiskAssessment Create Resolver. + * @summary Create RiskAssessment resolver. */ -module.exports.riskassessmentCreateResolver = function riskassessmentCreateResolver( +module.exports.createRiskAssessment = function createRiskAssessment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentUpdateResolver + * @name exports.updateRiskAssessment * @static - * @summary RiskAssessment Update Resolver. + * @summary Update RiskAssessment resolver. */ -module.exports.riskassessmentUpdateResolver = function riskassessmentUpdateResolver( +module.exports.updateRiskAssessment = function updateRiskAssessment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.riskassessmentDeleteResolver + * @name exports.removeRiskAssessment * @static - * @summary RiskAssessment Delete Resolver. + * @summary Remove RiskAssessment resolver. */ -module.exports.riskassessmentDeleteResolver = function riskassessmentDeleteResolver( +module.exports.removeRiskAssessment = function removeRiskAssessment( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/schedule/mutation.js b/src/resources/3_0_1/profiles/schedule/mutation.js index b6763e04..dcf1ff41 100644 --- a/src/resources/3_0_1/profiles/schedule/mutation.js +++ b/src/resources/3_0_1/profiles/schedule/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ScheduleSchema = require('../../schemas/schedule.schema'); +const ScheduleSchema = require('../../schemas/schedule.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ScheduleInput = require('../../inputs/schedule.input'); +const ScheduleInput = require('../../inputs/schedule.input.js'); -// Resolvers -const { - scheduleCreateResolver, - scheduleUpdateResolver, - scheduleDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSchedule, + updateSchedule, + removeSchedule, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Schedule', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Schedule record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Schedule record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ScheduleCreateMutation - * @summary ScheduleCreate Mutation. + * @summary ScheduleCreate mutation. */ module.exports.ScheduleCreateMutation = { - args: WriteArgs, - description: 'Create a Schedule', - resolve: scopeInvariant(scopeOptions, scheduleCreateResolver), + description: 'Create a Schedule record', + resolve: scopeInvariant(scopeOptions, createSchedule), type: ScheduleSchema, + args: WriteArgs, }; /** * @name exports.ScheduleUpdateMutation - * @summary ScheduleUpdate Mutation. + * @summary ScheduleUpdate mutation. */ module.exports.ScheduleUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Schedules', - resolve: scopeInvariant(scopeOptions, scheduleUpdateResolver), + description: 'Update a Schedule record', + resolve: scopeInvariant(scopeOptions, updateSchedule), type: ScheduleSchema, + args: WriteArgs, }; /** - * @name exports.ScheduleDeleteMutation - * @summary ScheduleDelete Mutation. + * @name exports.ScheduleRemoveMutation + * @summary ScheduleRemove mutation. */ -module.exports.ScheduleDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Schedule', - resolve: scopeInvariant(scopeOptions, scheduleDeleteResolver), +module.exports.ScheduleRemoveMutation = { + description: 'Remove a Schedule record', + resolve: scopeInvariant(scopeOptions, removeSchedule), type: ScheduleSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/schedule/query.js b/src/resources/3_0_1/profiles/schedule/query.js index 720f5bf3..66fbac87 100644 --- a/src/resources/3_0_1/profiles/schedule/query.js +++ b/src/resources/3_0_1/profiles/schedule/query.js @@ -1,55 +1,60 @@ // Schemas -const ScheduleSchema = require('../../schemas/schedule.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ScheduleSchema = require('../../schemas/schedule.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ScheduleArgs = require('../../parameters/schedule.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ScheduleArgs = require('../../parameters/schedule.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ScheduleArgs); // Resolvers const { - scheduleResolver, - scheduleListResolver, - scheduleInstanceResolver, + getSchedule, + getScheduleList, + getScheduleInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Schedule', action: 'read', - version: '3_0_1', }; /** * @name exports.ScheduleQuery - * @summary Schedule Query. + * @summary Schedule query. */ module.exports.ScheduleQuery = { - args: Object.assign({}, CommonArgs, ScheduleArgs), description: 'Query for a single Schedule', - resolve: scopeInvariant(scopeOptions, scheduleResolver), + resolve: scopeInvariant(scopeOptions, getSchedule), type: ScheduleSchema, + args: args, }; /** * @name exports.ScheduleListQuery - * @summary ScheduleList Query. + * @summary Schedule query. */ module.exports.ScheduleListQuery = { - args: Object.assign({}, CommonArgs, ScheduleArgs), - description: 'Query for multiple Schedules', - resolve: scopeInvariant(scopeOptions, scheduleListResolver), + description: 'Query for a more than or just one Schedule', + resolve: scopeInvariant(scopeOptions, getScheduleList), type: BundleSchema, + args: args, }; /** * @name exports.ScheduleInstanceQuery - * @summary ScheduleInstance Query. + * @summary Schedule query. */ module.exports.ScheduleInstanceQuery = { - description: 'Get information about a single Schedule', - resolve: scopeInvariant(scopeOptions, scheduleInstanceResolver), + description: 'Access information about a single Schedule', + resolve: scopeInvariant(scopeOptions, getScheduleInstance), type: ScheduleSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/schedule/index.js b/src/resources/3_0_1/profiles/schedule/register.js similarity index 92% rename from src/resources/3_0_1/profiles/schedule/index.js rename to src/resources/3_0_1/profiles/schedule/register.js index 451ebccf..495aadd1 100644 --- a/src/resources/3_0_1/profiles/schedule/index.js +++ b/src/resources/3_0_1/profiles/schedule/register.js @@ -1,15 +1,15 @@ +const { + ScheduleCreateMutation, + ScheduleUpdateMutation, + ScheduleRemoveMutation, +} = require('./mutation'); + const { ScheduleQuery, ScheduleListQuery, ScheduleInstanceQuery, } = require('./query'); -const { - ScheduleCreateMutation, - ScheduleUpdateMutation, - ScheduleDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ScheduleCreate: ScheduleCreateMutation, ScheduleUpdate: ScheduleUpdateMutation, - ScheduleDelete: ScheduleDeleteMutation, + ScheduleRemove: ScheduleRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Schedule', path: '/3_0_1/Schedule/:id', query: ScheduleInstanceQuery, diff --git a/src/resources/3_0_1/profiles/schedule/resolver.js b/src/resources/3_0_1/profiles/schedule/resolver.js index 2b02c4d6..759d0a83 100644 --- a/src/resources/3_0_1/profiles/schedule/resolver.js +++ b/src/resources/3_0_1/profiles/schedule/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.scheduleResolver + * @name exports.getSchedule * @static - * @summary Schedule Resolver. + * @summary Schedule resolver. */ -module.exports.scheduleResolver = function scheduleResolver( +module.exports.getSchedule = function getSchedule( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleListResolver + * @name exports.getScheduleList * @static - * @summary Schedule List Resolver. + * @summary Schedule list resolver. */ -module.exports.scheduleListResolver = function scheduleListResolver( +module.exports.getScheduleList = function getScheduleList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleInstanceResolver + * @name exports.getScheduleInstance * @static - * @summary Schedule Instance Resolver. + * @summary Schedule instance resolver. */ -module.exports.scheduleInstanceResolver = function scheduleInstanceResolver( +module.exports.getScheduleInstance = function getScheduleInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleCreateResolver + * @name exports.createSchedule * @static - * @summary Schedule Create Resolver. + * @summary Create Schedule resolver. */ -module.exports.scheduleCreateResolver = function scheduleCreateResolver( +module.exports.createSchedule = function createSchedule( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleUpdateResolver + * @name exports.updateSchedule * @static - * @summary Schedule Update Resolver. + * @summary Update Schedule resolver. */ -module.exports.scheduleUpdateResolver = function scheduleUpdateResolver( +module.exports.updateSchedule = function updateSchedule( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.scheduleDeleteResolver + * @name exports.removeSchedule * @static - * @summary Schedule Delete Resolver. + * @summary Remove Schedule resolver. */ -module.exports.scheduleDeleteResolver = function scheduleDeleteResolver( +module.exports.removeSchedule = function removeSchedule( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/searchparameter/mutation.js b/src/resources/3_0_1/profiles/searchparameter/mutation.js index 6c7d1b06..acc8e818 100644 --- a/src/resources/3_0_1/profiles/searchparameter/mutation.js +++ b/src/resources/3_0_1/profiles/searchparameter/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SearchParameterSchema = require('../../schemas/searchparameter.schema'); +const SearchParameterSchema = require('../../schemas/searchparameter.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SearchParameterInput = require('../../inputs/searchparameter.input'); +const SearchParameterInput = require('../../inputs/searchparameter.input.js'); -// Resolvers -const { - searchparameterCreateResolver, - searchparameterUpdateResolver, - searchparameterDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSearchParameter, + updateSearchParameter, + removeSearchParameter, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SearchParameter', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a SearchParameter record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a SearchParameter record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.SearchParameterCreateMutation - * @summary SearchParameterCreate Mutation. + * @summary SearchParameterCreate mutation. */ module.exports.SearchParameterCreateMutation = { - args: WriteArgs, - description: 'Create a SearchParameter', - resolve: scopeInvariant(scopeOptions, searchparameterCreateResolver), + description: 'Create a SearchParameter record', + resolve: scopeInvariant(scopeOptions, createSearchParameter), type: SearchParameterSchema, + args: WriteArgs, }; /** * @name exports.SearchParameterUpdateMutation - * @summary SearchParameterUpdate Mutation. + * @summary SearchParameterUpdate mutation. */ module.exports.SearchParameterUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple SearchParameters', - resolve: scopeInvariant(scopeOptions, searchparameterUpdateResolver), + description: 'Update a SearchParameter record', + resolve: scopeInvariant(scopeOptions, updateSearchParameter), type: SearchParameterSchema, + args: WriteArgs, }; /** - * @name exports.SearchParameterDeleteMutation - * @summary SearchParameterDelete Mutation. + * @name exports.SearchParameterRemoveMutation + * @summary SearchParameterRemove mutation. */ -module.exports.SearchParameterDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single SearchParameter', - resolve: scopeInvariant(scopeOptions, searchparameterDeleteResolver), +module.exports.SearchParameterRemoveMutation = { + description: 'Remove a SearchParameter record', + resolve: scopeInvariant(scopeOptions, removeSearchParameter), type: SearchParameterSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/searchparameter/query.js b/src/resources/3_0_1/profiles/searchparameter/query.js index 52fcd327..c3353844 100644 --- a/src/resources/3_0_1/profiles/searchparameter/query.js +++ b/src/resources/3_0_1/profiles/searchparameter/query.js @@ -1,55 +1,65 @@ // Schemas -const SearchParameterSchema = require('../../schemas/searchparameter.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SearchParameterSchema = require('../../schemas/searchparameter.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SearchParameterArgs = require('../../parameters/searchparameter.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SearchParameterArgs = require('../../parameters/searchparameter.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SearchParameterArgs, +); // Resolvers const { - searchparameterResolver, - searchparameterListResolver, - searchparameterInstanceResolver, + getSearchParameter, + getSearchParameterList, + getSearchParameterInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SearchParameter', action: 'read', - version: '3_0_1', }; /** * @name exports.SearchParameterQuery - * @summary SearchParameter Query. + * @summary SearchParameter query. */ module.exports.SearchParameterQuery = { - args: Object.assign({}, CommonArgs, SearchParameterArgs), description: 'Query for a single SearchParameter', - resolve: scopeInvariant(scopeOptions, searchparameterResolver), + resolve: scopeInvariant(scopeOptions, getSearchParameter), type: SearchParameterSchema, + args: args, }; /** * @name exports.SearchParameterListQuery - * @summary SearchParameterList Query. + * @summary SearchParameter query. */ module.exports.SearchParameterListQuery = { - args: Object.assign({}, CommonArgs, SearchParameterArgs), - description: 'Query for multiple SearchParameters', - resolve: scopeInvariant(scopeOptions, searchparameterListResolver), + description: 'Query for a more than or just one SearchParameter', + resolve: scopeInvariant(scopeOptions, getSearchParameterList), type: BundleSchema, + args: args, }; /** * @name exports.SearchParameterInstanceQuery - * @summary SearchParameterInstance Query. + * @summary SearchParameter query. */ module.exports.SearchParameterInstanceQuery = { - description: 'Get information about a single SearchParameter', - resolve: scopeInvariant(scopeOptions, searchparameterInstanceResolver), + description: 'Access information about a single SearchParameter', + resolve: scopeInvariant(scopeOptions, getSearchParameterInstance), type: SearchParameterSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/searchparameter/index.js b/src/resources/3_0_1/profiles/searchparameter/register.js similarity index 91% rename from src/resources/3_0_1/profiles/searchparameter/index.js rename to src/resources/3_0_1/profiles/searchparameter/register.js index ca9076bf..198a76c5 100644 --- a/src/resources/3_0_1/profiles/searchparameter/index.js +++ b/src/resources/3_0_1/profiles/searchparameter/register.js @@ -1,15 +1,15 @@ +const { + SearchParameterCreateMutation, + SearchParameterUpdateMutation, + SearchParameterRemoveMutation, +} = require('./mutation'); + const { SearchParameterQuery, SearchParameterListQuery, SearchParameterInstanceQuery, } = require('./query'); -const { - SearchParameterCreateMutation, - SearchParameterUpdateMutation, - SearchParameterDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SearchParameterCreate: SearchParameterCreateMutation, SearchParameterUpdate: SearchParameterUpdateMutation, - SearchParameterDelete: SearchParameterDeleteMutation, + SearchParameterRemove: SearchParameterRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'SearchParameter', path: '/3_0_1/SearchParameter/:id', query: SearchParameterInstanceQuery, diff --git a/src/resources/3_0_1/profiles/searchparameter/resolver.js b/src/resources/3_0_1/profiles/searchparameter/resolver.js index c2355728..4543ddbf 100644 --- a/src/resources/3_0_1/profiles/searchparameter/resolver.js +++ b/src/resources/3_0_1/profiles/searchparameter/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.searchparameterResolver + * @name exports.getSearchParameter * @static - * @summary SearchParameter Resolver. + * @summary SearchParameter resolver. */ -module.exports.searchparameterResolver = function searchparameterResolver( +module.exports.getSearchParameter = function getSearchParameter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterListResolver + * @name exports.getSearchParameterList * @static - * @summary SearchParameter List Resolver. + * @summary SearchParameter list resolver. */ -module.exports.searchparameterListResolver = function searchparameterListResolver( +module.exports.getSearchParameterList = function getSearchParameterList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterInstanceResolver + * @name exports.getSearchParameterInstance * @static - * @summary SearchParameter Instance Resolver. + * @summary SearchParameter instance resolver. */ -module.exports.searchparameterInstanceResolver = function searchparameterInstanceResolver( +module.exports.getSearchParameterInstance = function getSearchParameterInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterCreateResolver + * @name exports.createSearchParameter * @static - * @summary SearchParameter Create Resolver. + * @summary Create SearchParameter resolver. */ -module.exports.searchparameterCreateResolver = function searchparameterCreateResolver( +module.exports.createSearchParameter = function createSearchParameter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterUpdateResolver + * @name exports.updateSearchParameter * @static - * @summary SearchParameter Update Resolver. + * @summary Update SearchParameter resolver. */ -module.exports.searchparameterUpdateResolver = function searchparameterUpdateResolver( +module.exports.updateSearchParameter = function updateSearchParameter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.searchparameterDeleteResolver + * @name exports.removeSearchParameter * @static - * @summary SearchParameter Delete Resolver. + * @summary Remove SearchParameter resolver. */ -module.exports.searchparameterDeleteResolver = function searchparameterDeleteResolver( +module.exports.removeSearchParameter = function removeSearchParameter( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/sequence/mutation.js b/src/resources/3_0_1/profiles/sequence/mutation.js index 3b384329..64e66c29 100644 --- a/src/resources/3_0_1/profiles/sequence/mutation.js +++ b/src/resources/3_0_1/profiles/sequence/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SequenceSchema = require('../../schemas/sequence.schema'); +const SequenceSchema = require('../../schemas/sequence.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SequenceInput = require('../../inputs/sequence.input'); +const SequenceInput = require('../../inputs/sequence.input.js'); -// Resolvers -const { - sequenceCreateResolver, - sequenceUpdateResolver, - sequenceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSequence, + updateSequence, + removeSequence, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Sequence', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Sequence record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Sequence record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.SequenceCreateMutation - * @summary SequenceCreate Mutation. + * @summary SequenceCreate mutation. */ module.exports.SequenceCreateMutation = { - args: WriteArgs, - description: 'Create a Sequence', - resolve: scopeInvariant(scopeOptions, sequenceCreateResolver), + description: 'Create a Sequence record', + resolve: scopeInvariant(scopeOptions, createSequence), type: SequenceSchema, + args: WriteArgs, }; /** * @name exports.SequenceUpdateMutation - * @summary SequenceUpdate Mutation. + * @summary SequenceUpdate mutation. */ module.exports.SequenceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Sequences', - resolve: scopeInvariant(scopeOptions, sequenceUpdateResolver), + description: 'Update a Sequence record', + resolve: scopeInvariant(scopeOptions, updateSequence), type: SequenceSchema, + args: WriteArgs, }; /** - * @name exports.SequenceDeleteMutation - * @summary SequenceDelete Mutation. + * @name exports.SequenceRemoveMutation + * @summary SequenceRemove mutation. */ -module.exports.SequenceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Sequence', - resolve: scopeInvariant(scopeOptions, sequenceDeleteResolver), +module.exports.SequenceRemoveMutation = { + description: 'Remove a Sequence record', + resolve: scopeInvariant(scopeOptions, removeSequence), type: SequenceSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/sequence/query.js b/src/resources/3_0_1/profiles/sequence/query.js index 54c39e2e..8be5a6d5 100644 --- a/src/resources/3_0_1/profiles/sequence/query.js +++ b/src/resources/3_0_1/profiles/sequence/query.js @@ -1,55 +1,60 @@ // Schemas -const SequenceSchema = require('../../schemas/sequence.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SequenceSchema = require('../../schemas/sequence.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SequenceArgs = require('../../parameters/sequence.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SequenceArgs = require('../../parameters/sequence.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, SequenceArgs); // Resolvers const { - sequenceResolver, - sequenceListResolver, - sequenceInstanceResolver, + getSequence, + getSequenceList, + getSequenceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Sequence', action: 'read', - version: '3_0_1', }; /** * @name exports.SequenceQuery - * @summary Sequence Query. + * @summary Sequence query. */ module.exports.SequenceQuery = { - args: Object.assign({}, CommonArgs, SequenceArgs), description: 'Query for a single Sequence', - resolve: scopeInvariant(scopeOptions, sequenceResolver), + resolve: scopeInvariant(scopeOptions, getSequence), type: SequenceSchema, + args: args, }; /** * @name exports.SequenceListQuery - * @summary SequenceList Query. + * @summary Sequence query. */ module.exports.SequenceListQuery = { - args: Object.assign({}, CommonArgs, SequenceArgs), - description: 'Query for multiple Sequences', - resolve: scopeInvariant(scopeOptions, sequenceListResolver), + description: 'Query for a more than or just one Sequence', + resolve: scopeInvariant(scopeOptions, getSequenceList), type: BundleSchema, + args: args, }; /** * @name exports.SequenceInstanceQuery - * @summary SequenceInstance Query. + * @summary Sequence query. */ module.exports.SequenceInstanceQuery = { - description: 'Get information about a single Sequence', - resolve: scopeInvariant(scopeOptions, sequenceInstanceResolver), + description: 'Access information about a single Sequence', + resolve: scopeInvariant(scopeOptions, getSequenceInstance), type: SequenceSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/sequence/index.js b/src/resources/3_0_1/profiles/sequence/register.js similarity index 92% rename from src/resources/3_0_1/profiles/sequence/index.js rename to src/resources/3_0_1/profiles/sequence/register.js index df571ff2..3ec8aeeb 100644 --- a/src/resources/3_0_1/profiles/sequence/index.js +++ b/src/resources/3_0_1/profiles/sequence/register.js @@ -1,15 +1,15 @@ +const { + SequenceCreateMutation, + SequenceUpdateMutation, + SequenceRemoveMutation, +} = require('./mutation'); + const { SequenceQuery, SequenceListQuery, SequenceInstanceQuery, } = require('./query'); -const { - SequenceCreateMutation, - SequenceUpdateMutation, - SequenceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SequenceCreate: SequenceCreateMutation, SequenceUpdate: SequenceUpdateMutation, - SequenceDelete: SequenceDeleteMutation, + SequenceRemove: SequenceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Sequence', path: '/3_0_1/Sequence/:id', query: SequenceInstanceQuery, diff --git a/src/resources/3_0_1/profiles/sequence/resolver.js b/src/resources/3_0_1/profiles/sequence/resolver.js index 591ad629..3e99d6ab 100644 --- a/src/resources/3_0_1/profiles/sequence/resolver.js +++ b/src/resources/3_0_1/profiles/sequence/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.sequenceResolver + * @name exports.getSequence * @static - * @summary Sequence Resolver. + * @summary Sequence resolver. */ -module.exports.sequenceResolver = function sequenceResolver( +module.exports.getSequence = function getSequence( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.sequenceListResolver + * @name exports.getSequenceList * @static - * @summary Sequence List Resolver. + * @summary Sequence list resolver. */ -module.exports.sequenceListResolver = function sequenceListResolver( +module.exports.getSequenceList = function getSequenceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.sequenceInstanceResolver + * @name exports.getSequenceInstance * @static - * @summary Sequence Instance Resolver. + * @summary Sequence instance resolver. */ -module.exports.sequenceInstanceResolver = function sequenceInstanceResolver( +module.exports.getSequenceInstance = function getSequenceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.sequenceCreateResolver + * @name exports.createSequence * @static - * @summary Sequence Create Resolver. + * @summary Create Sequence resolver. */ -module.exports.sequenceCreateResolver = function sequenceCreateResolver( +module.exports.createSequence = function createSequence( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.sequenceUpdateResolver + * @name exports.updateSequence * @static - * @summary Sequence Update Resolver. + * @summary Update Sequence resolver. */ -module.exports.sequenceUpdateResolver = function sequenceUpdateResolver( +module.exports.updateSequence = function updateSequence( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.sequenceDeleteResolver + * @name exports.removeSequence * @static - * @summary Sequence Delete Resolver. + * @summary Remove Sequence resolver. */ -module.exports.sequenceDeleteResolver = function sequenceDeleteResolver( +module.exports.removeSequence = function removeSequence( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/servicedefinition/mutation.js b/src/resources/3_0_1/profiles/servicedefinition/mutation.js index 9b3567ab..6986aae9 100644 --- a/src/resources/3_0_1/profiles/servicedefinition/mutation.js +++ b/src/resources/3_0_1/profiles/servicedefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ServiceDefinitionSchema = require('../../schemas/servicedefinition.schema'); +const ServiceDefinitionSchema = require('../../schemas/servicedefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ServiceDefinitionInput = require('../../inputs/servicedefinition.input'); +const ServiceDefinitionInput = require('../../inputs/servicedefinition.input.js'); -// Resolvers -const { - servicedefinitionCreateResolver, - servicedefinitionUpdateResolver, - servicedefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createServiceDefinition, + updateServiceDefinition, + removeServiceDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ServiceDefinition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ServiceDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ServiceDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.ServiceDefinitionCreateMutation - * @summary ServiceDefinitionCreate Mutation. + * @summary ServiceDefinitionCreate mutation. */ module.exports.ServiceDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a ServiceDefinition', - resolve: scopeInvariant(scopeOptions, servicedefinitionCreateResolver), + description: 'Create a ServiceDefinition record', + resolve: scopeInvariant(scopeOptions, createServiceDefinition), type: ServiceDefinitionSchema, + args: WriteArgs, }; /** * @name exports.ServiceDefinitionUpdateMutation - * @summary ServiceDefinitionUpdate Mutation. + * @summary ServiceDefinitionUpdate mutation. */ module.exports.ServiceDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ServiceDefinitions', - resolve: scopeInvariant(scopeOptions, servicedefinitionUpdateResolver), + description: 'Update a ServiceDefinition record', + resolve: scopeInvariant(scopeOptions, updateServiceDefinition), type: ServiceDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.ServiceDefinitionDeleteMutation - * @summary ServiceDefinitionDelete Mutation. + * @name exports.ServiceDefinitionRemoveMutation + * @summary ServiceDefinitionRemove mutation. */ -module.exports.ServiceDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ServiceDefinition', - resolve: scopeInvariant(scopeOptions, servicedefinitionDeleteResolver), +module.exports.ServiceDefinitionRemoveMutation = { + description: 'Remove a ServiceDefinition record', + resolve: scopeInvariant(scopeOptions, removeServiceDefinition), type: ServiceDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/servicedefinition/query.js b/src/resources/3_0_1/profiles/servicedefinition/query.js index 0a108b0f..6ea605f4 100644 --- a/src/resources/3_0_1/profiles/servicedefinition/query.js +++ b/src/resources/3_0_1/profiles/servicedefinition/query.js @@ -1,55 +1,65 @@ // Schemas -const ServiceDefinitionSchema = require('../../schemas/servicedefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ServiceDefinitionSchema = require('../../schemas/servicedefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ServiceDefinitionArgs = require('../../parameters/servicedefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ServiceDefinitionArgs = require('../../parameters/servicedefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ServiceDefinitionArgs, +); // Resolvers const { - servicedefinitionResolver, - servicedefinitionListResolver, - servicedefinitionInstanceResolver, + getServiceDefinition, + getServiceDefinitionList, + getServiceDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ServiceDefinition', action: 'read', - version: '3_0_1', }; /** * @name exports.ServiceDefinitionQuery - * @summary ServiceDefinition Query. + * @summary ServiceDefinition query. */ module.exports.ServiceDefinitionQuery = { - args: Object.assign({}, CommonArgs, ServiceDefinitionArgs), description: 'Query for a single ServiceDefinition', - resolve: scopeInvariant(scopeOptions, servicedefinitionResolver), + resolve: scopeInvariant(scopeOptions, getServiceDefinition), type: ServiceDefinitionSchema, + args: args, }; /** * @name exports.ServiceDefinitionListQuery - * @summary ServiceDefinitionList Query. + * @summary ServiceDefinition query. */ module.exports.ServiceDefinitionListQuery = { - args: Object.assign({}, CommonArgs, ServiceDefinitionArgs), - description: 'Query for multiple ServiceDefinitions', - resolve: scopeInvariant(scopeOptions, servicedefinitionListResolver), + description: 'Query for a more than or just one ServiceDefinition', + resolve: scopeInvariant(scopeOptions, getServiceDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.ServiceDefinitionInstanceQuery - * @summary ServiceDefinitionInstance Query. + * @summary ServiceDefinition query. */ module.exports.ServiceDefinitionInstanceQuery = { - description: 'Get information about a single ServiceDefinition', - resolve: scopeInvariant(scopeOptions, servicedefinitionInstanceResolver), + description: 'Access information about a single ServiceDefinition', + resolve: scopeInvariant(scopeOptions, getServiceDefinitionInstance), type: ServiceDefinitionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/servicedefinition/index.js b/src/resources/3_0_1/profiles/servicedefinition/register.js similarity index 91% rename from src/resources/3_0_1/profiles/servicedefinition/index.js rename to src/resources/3_0_1/profiles/servicedefinition/register.js index a289acfa..28900f79 100644 --- a/src/resources/3_0_1/profiles/servicedefinition/index.js +++ b/src/resources/3_0_1/profiles/servicedefinition/register.js @@ -1,15 +1,15 @@ +const { + ServiceDefinitionCreateMutation, + ServiceDefinitionUpdateMutation, + ServiceDefinitionRemoveMutation, +} = require('./mutation'); + const { ServiceDefinitionQuery, ServiceDefinitionListQuery, ServiceDefinitionInstanceQuery, } = require('./query'); -const { - ServiceDefinitionCreateMutation, - ServiceDefinitionUpdateMutation, - ServiceDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ServiceDefinitionCreate: ServiceDefinitionCreateMutation, ServiceDefinitionUpdate: ServiceDefinitionUpdateMutation, - ServiceDefinitionDelete: ServiceDefinitionDeleteMutation, + ServiceDefinitionRemove: ServiceDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ServiceDefinition', path: '/3_0_1/ServiceDefinition/:id', query: ServiceDefinitionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/servicedefinition/resolver.js b/src/resources/3_0_1/profiles/servicedefinition/resolver.js index 7c756b90..e28a0383 100644 --- a/src/resources/3_0_1/profiles/servicedefinition/resolver.js +++ b/src/resources/3_0_1/profiles/servicedefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.servicedefinitionResolver + * @name exports.getServiceDefinition * @static - * @summary ServiceDefinition Resolver. + * @summary ServiceDefinition resolver. */ -module.exports.servicedefinitionResolver = function servicedefinitionResolver( +module.exports.getServiceDefinition = function getServiceDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.servicedefinitionListResolver + * @name exports.getServiceDefinitionList * @static - * @summary ServiceDefinition List Resolver. + * @summary ServiceDefinition list resolver. */ -module.exports.servicedefinitionListResolver = function servicedefinitionListResolver( +module.exports.getServiceDefinitionList = function getServiceDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.servicedefinitionInstanceResolver + * @name exports.getServiceDefinitionInstance * @static - * @summary ServiceDefinition Instance Resolver. + * @summary ServiceDefinition instance resolver. */ -module.exports.servicedefinitionInstanceResolver = function servicedefinitionInstanceResolver( +module.exports.getServiceDefinitionInstance = function getServiceDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.servicedefinitionCreateResolver + * @name exports.createServiceDefinition * @static - * @summary ServiceDefinition Create Resolver. + * @summary Create ServiceDefinition resolver. */ -module.exports.servicedefinitionCreateResolver = function servicedefinitionCreateResolver( +module.exports.createServiceDefinition = function createServiceDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.servicedefinitionUpdateResolver + * @name exports.updateServiceDefinition * @static - * @summary ServiceDefinition Update Resolver. + * @summary Update ServiceDefinition resolver. */ -module.exports.servicedefinitionUpdateResolver = function servicedefinitionUpdateResolver( +module.exports.updateServiceDefinition = function updateServiceDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.servicedefinitionDeleteResolver + * @name exports.removeServiceDefinition * @static - * @summary ServiceDefinition Delete Resolver. + * @summary Remove ServiceDefinition resolver. */ -module.exports.servicedefinitionDeleteResolver = function servicedefinitionDeleteResolver( +module.exports.removeServiceDefinition = function removeServiceDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/slot/mutation.js b/src/resources/3_0_1/profiles/slot/mutation.js index 018ce0a6..8f8d16a8 100644 --- a/src/resources/3_0_1/profiles/slot/mutation.js +++ b/src/resources/3_0_1/profiles/slot/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SlotSchema = require('../../schemas/slot.schema'); +const SlotSchema = require('../../schemas/slot.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SlotInput = require('../../inputs/slot.input'); +const SlotInput = require('../../inputs/slot.input.js'); -// Resolvers -const { - slotCreateResolver, - slotUpdateResolver, - slotDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createSlot, updateSlot, removeSlot } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Slot', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Slot record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Slot record for deletion.', }, }; /** * @name exports.SlotCreateMutation - * @summary SlotCreate Mutation. + * @summary SlotCreate mutation. */ module.exports.SlotCreateMutation = { - args: WriteArgs, - description: 'Create a Slot', - resolve: scopeInvariant(scopeOptions, slotCreateResolver), + description: 'Create a Slot record', + resolve: scopeInvariant(scopeOptions, createSlot), type: SlotSchema, + args: WriteArgs, }; /** * @name exports.SlotUpdateMutation - * @summary SlotUpdate Mutation. + * @summary SlotUpdate mutation. */ module.exports.SlotUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Slots', - resolve: scopeInvariant(scopeOptions, slotUpdateResolver), + description: 'Update a Slot record', + resolve: scopeInvariant(scopeOptions, updateSlot), type: SlotSchema, + args: WriteArgs, }; /** - * @name exports.SlotDeleteMutation - * @summary SlotDelete Mutation. + * @name exports.SlotRemoveMutation + * @summary SlotRemove mutation. */ -module.exports.SlotDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Slot', - resolve: scopeInvariant(scopeOptions, slotDeleteResolver), +module.exports.SlotRemoveMutation = { + description: 'Remove a Slot record', + resolve: scopeInvariant(scopeOptions, removeSlot), type: SlotSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/slot/query.js b/src/resources/3_0_1/profiles/slot/query.js index 62503998..e1006d13 100644 --- a/src/resources/3_0_1/profiles/slot/query.js +++ b/src/resources/3_0_1/profiles/slot/query.js @@ -1,55 +1,56 @@ // Schemas -const SlotSchema = require('../../schemas/slot.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SlotSchema = require('../../schemas/slot.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SlotArgs = require('../../parameters/slot.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SlotArgs = require('../../parameters/slot.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, SlotArgs); // Resolvers -const { - slotResolver, - slotListResolver, - slotInstanceResolver, -} = require('./resolver'); +const { getSlot, getSlotList, getSlotInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Slot', action: 'read', - version: '3_0_1', }; /** * @name exports.SlotQuery - * @summary Slot Query. + * @summary Slot query. */ module.exports.SlotQuery = { - args: Object.assign({}, CommonArgs, SlotArgs), description: 'Query for a single Slot', - resolve: scopeInvariant(scopeOptions, slotResolver), + resolve: scopeInvariant(scopeOptions, getSlot), type: SlotSchema, + args: args, }; /** * @name exports.SlotListQuery - * @summary SlotList Query. + * @summary Slot query. */ module.exports.SlotListQuery = { - args: Object.assign({}, CommonArgs, SlotArgs), - description: 'Query for multiple Slots', - resolve: scopeInvariant(scopeOptions, slotListResolver), + description: 'Query for a more than or just one Slot', + resolve: scopeInvariant(scopeOptions, getSlotList), type: BundleSchema, + args: args, }; /** * @name exports.SlotInstanceQuery - * @summary SlotInstance Query. + * @summary Slot query. */ module.exports.SlotInstanceQuery = { - description: 'Get information about a single Slot', - resolve: scopeInvariant(scopeOptions, slotInstanceResolver), + description: 'Access information about a single Slot', + resolve: scopeInvariant(scopeOptions, getSlotInstance), type: SlotSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/slot/index.js b/src/resources/3_0_1/profiles/slot/register.js similarity index 93% rename from src/resources/3_0_1/profiles/slot/index.js rename to src/resources/3_0_1/profiles/slot/register.js index 7da05c97..b62654be 100644 --- a/src/resources/3_0_1/profiles/slot/index.js +++ b/src/resources/3_0_1/profiles/slot/register.js @@ -1,11 +1,11 @@ -const { SlotQuery, SlotListQuery, SlotInstanceQuery } = require('./query'); - const { SlotCreateMutation, SlotUpdateMutation, - SlotDeleteMutation, + SlotRemoveMutation, } = require('./mutation'); +const { SlotQuery, SlotListQuery, SlotInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { SlotCreate: SlotCreateMutation, SlotUpdate: SlotUpdateMutation, - SlotDelete: SlotDeleteMutation, + SlotRemove: SlotRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Slot', path: '/3_0_1/Slot/:id', query: SlotInstanceQuery, diff --git a/src/resources/3_0_1/profiles/slot/resolver.js b/src/resources/3_0_1/profiles/slot/resolver.js index fff5043c..6c533648 100644 --- a/src/resources/3_0_1/profiles/slot/resolver.js +++ b/src/resources/3_0_1/profiles/slot/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.slotResolver + * @name exports.getSlot * @static - * @summary Slot Resolver. + * @summary Slot resolver. */ -module.exports.slotResolver = function slotResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getSlot = function getSlot(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotListResolver + * @name exports.getSlotList * @static - * @summary Slot List Resolver. + * @summary Slot list resolver. */ -module.exports.slotListResolver = function slotListResolver( +module.exports.getSlotList = function getSlotList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotInstanceResolver + * @name exports.getSlotInstance * @static - * @summary Slot Instance Resolver. + * @summary Slot instance resolver. */ -module.exports.slotInstanceResolver = function slotInstanceResolver( +module.exports.getSlotInstance = function getSlotInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotCreateResolver + * @name exports.createSlot * @static - * @summary Slot Create Resolver. + * @summary Create Slot resolver. */ -module.exports.slotCreateResolver = function slotCreateResolver( +module.exports.createSlot = function createSlot( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotUpdateResolver + * @name exports.updateSlot * @static - * @summary Slot Update Resolver. + * @summary Update Slot resolver. */ -module.exports.slotUpdateResolver = function slotUpdateResolver( +module.exports.updateSlot = function updateSlot( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.slotDeleteResolver + * @name exports.removeSlot * @static - * @summary Slot Delete Resolver. + * @summary Remove Slot resolver. */ -module.exports.slotDeleteResolver = function slotDeleteResolver( +module.exports.removeSlot = function removeSlot( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/specimen/mutation.js b/src/resources/3_0_1/profiles/specimen/mutation.js index 48ca8932..e6ec47bc 100644 --- a/src/resources/3_0_1/profiles/specimen/mutation.js +++ b/src/resources/3_0_1/profiles/specimen/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SpecimenSchema = require('../../schemas/specimen.schema'); +const SpecimenSchema = require('../../schemas/specimen.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SpecimenInput = require('../../inputs/specimen.input'); +const SpecimenInput = require('../../inputs/specimen.input.js'); -// Resolvers -const { - specimenCreateResolver, - specimenUpdateResolver, - specimenDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSpecimen, + updateSpecimen, + removeSpecimen, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Specimen', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Specimen record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Specimen record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.SpecimenCreateMutation - * @summary SpecimenCreate Mutation. + * @summary SpecimenCreate mutation. */ module.exports.SpecimenCreateMutation = { - args: WriteArgs, - description: 'Create a Specimen', - resolve: scopeInvariant(scopeOptions, specimenCreateResolver), + description: 'Create a Specimen record', + resolve: scopeInvariant(scopeOptions, createSpecimen), type: SpecimenSchema, + args: WriteArgs, }; /** * @name exports.SpecimenUpdateMutation - * @summary SpecimenUpdate Mutation. + * @summary SpecimenUpdate mutation. */ module.exports.SpecimenUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Specimens', - resolve: scopeInvariant(scopeOptions, specimenUpdateResolver), + description: 'Update a Specimen record', + resolve: scopeInvariant(scopeOptions, updateSpecimen), type: SpecimenSchema, + args: WriteArgs, }; /** - * @name exports.SpecimenDeleteMutation - * @summary SpecimenDelete Mutation. + * @name exports.SpecimenRemoveMutation + * @summary SpecimenRemove mutation. */ -module.exports.SpecimenDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Specimen', - resolve: scopeInvariant(scopeOptions, specimenDeleteResolver), +module.exports.SpecimenRemoveMutation = { + description: 'Remove a Specimen record', + resolve: scopeInvariant(scopeOptions, removeSpecimen), type: SpecimenSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/specimen/query.js b/src/resources/3_0_1/profiles/specimen/query.js index 6142ae97..a0e27d71 100644 --- a/src/resources/3_0_1/profiles/specimen/query.js +++ b/src/resources/3_0_1/profiles/specimen/query.js @@ -1,55 +1,60 @@ // Schemas -const SpecimenSchema = require('../../schemas/specimen.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SpecimenSchema = require('../../schemas/specimen.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SpecimenArgs = require('../../parameters/specimen.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SpecimenArgs = require('../../parameters/specimen.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, SpecimenArgs); // Resolvers const { - specimenResolver, - specimenListResolver, - specimenInstanceResolver, + getSpecimen, + getSpecimenList, + getSpecimenInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Specimen', action: 'read', - version: '3_0_1', }; /** * @name exports.SpecimenQuery - * @summary Specimen Query. + * @summary Specimen query. */ module.exports.SpecimenQuery = { - args: Object.assign({}, CommonArgs, SpecimenArgs), description: 'Query for a single Specimen', - resolve: scopeInvariant(scopeOptions, specimenResolver), + resolve: scopeInvariant(scopeOptions, getSpecimen), type: SpecimenSchema, + args: args, }; /** * @name exports.SpecimenListQuery - * @summary SpecimenList Query. + * @summary Specimen query. */ module.exports.SpecimenListQuery = { - args: Object.assign({}, CommonArgs, SpecimenArgs), - description: 'Query for multiple Specimens', - resolve: scopeInvariant(scopeOptions, specimenListResolver), + description: 'Query for a more than or just one Specimen', + resolve: scopeInvariant(scopeOptions, getSpecimenList), type: BundleSchema, + args: args, }; /** * @name exports.SpecimenInstanceQuery - * @summary SpecimenInstance Query. + * @summary Specimen query. */ module.exports.SpecimenInstanceQuery = { - description: 'Get information about a single Specimen', - resolve: scopeInvariant(scopeOptions, specimenInstanceResolver), + description: 'Access information about a single Specimen', + resolve: scopeInvariant(scopeOptions, getSpecimenInstance), type: SpecimenSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/specimen/index.js b/src/resources/3_0_1/profiles/specimen/register.js similarity index 92% rename from src/resources/3_0_1/profiles/specimen/index.js rename to src/resources/3_0_1/profiles/specimen/register.js index 34e360b6..99abfaac 100644 --- a/src/resources/3_0_1/profiles/specimen/index.js +++ b/src/resources/3_0_1/profiles/specimen/register.js @@ -1,15 +1,15 @@ +const { + SpecimenCreateMutation, + SpecimenUpdateMutation, + SpecimenRemoveMutation, +} = require('./mutation'); + const { SpecimenQuery, SpecimenListQuery, SpecimenInstanceQuery, } = require('./query'); -const { - SpecimenCreateMutation, - SpecimenUpdateMutation, - SpecimenDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SpecimenCreate: SpecimenCreateMutation, SpecimenUpdate: SpecimenUpdateMutation, - SpecimenDelete: SpecimenDeleteMutation, + SpecimenRemove: SpecimenRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Specimen', path: '/3_0_1/Specimen/:id', query: SpecimenInstanceQuery, diff --git a/src/resources/3_0_1/profiles/specimen/resolver.js b/src/resources/3_0_1/profiles/specimen/resolver.js index 13af9e7e..3c829e26 100644 --- a/src/resources/3_0_1/profiles/specimen/resolver.js +++ b/src/resources/3_0_1/profiles/specimen/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.specimenResolver + * @name exports.getSpecimen * @static - * @summary Specimen Resolver. + * @summary Specimen resolver. */ -module.exports.specimenResolver = function specimenResolver( +module.exports.getSpecimen = function getSpecimen( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenListResolver + * @name exports.getSpecimenList * @static - * @summary Specimen List Resolver. + * @summary Specimen list resolver. */ -module.exports.specimenListResolver = function specimenListResolver( +module.exports.getSpecimenList = function getSpecimenList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenInstanceResolver + * @name exports.getSpecimenInstance * @static - * @summary Specimen Instance Resolver. + * @summary Specimen instance resolver. */ -module.exports.specimenInstanceResolver = function specimenInstanceResolver( +module.exports.getSpecimenInstance = function getSpecimenInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenCreateResolver + * @name exports.createSpecimen * @static - * @summary Specimen Create Resolver. + * @summary Create Specimen resolver. */ -module.exports.specimenCreateResolver = function specimenCreateResolver( +module.exports.createSpecimen = function createSpecimen( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenUpdateResolver + * @name exports.updateSpecimen * @static - * @summary Specimen Update Resolver. + * @summary Update Specimen resolver. */ -module.exports.specimenUpdateResolver = function specimenUpdateResolver( +module.exports.updateSpecimen = function updateSpecimen( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.specimenDeleteResolver + * @name exports.removeSpecimen * @static - * @summary Specimen Delete Resolver. + * @summary Remove Specimen resolver. */ -module.exports.specimenDeleteResolver = function specimenDeleteResolver( +module.exports.removeSpecimen = function removeSpecimen( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/structuredefinition/mutation.js b/src/resources/3_0_1/profiles/structuredefinition/mutation.js index fc1ca950..4e1ddcec 100644 --- a/src/resources/3_0_1/profiles/structuredefinition/mutation.js +++ b/src/resources/3_0_1/profiles/structuredefinition/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema'); +const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const StructureDefinitionInput = require('../../inputs/structuredefinition.input'); +const StructureDefinitionInput = require('../../inputs/structuredefinition.input.js'); -// Resolvers -const { - structuredefinitionCreateResolver, - structuredefinitionUpdateResolver, - structuredefinitionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createStructureDefinition, + updateStructureDefinition, + removeStructureDefinition, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'StructureDefinition', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a StructureDefinition record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a StructureDefinition record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.StructureDefinitionCreateMutation - * @summary StructureDefinitionCreate Mutation. + * @summary StructureDefinitionCreate mutation. */ module.exports.StructureDefinitionCreateMutation = { - args: WriteArgs, - description: 'Create a StructureDefinition', - resolve: scopeInvariant(scopeOptions, structuredefinitionCreateResolver), + description: 'Create a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, createStructureDefinition), type: StructureDefinitionSchema, + args: WriteArgs, }; /** * @name exports.StructureDefinitionUpdateMutation - * @summary StructureDefinitionUpdate Mutation. + * @summary StructureDefinitionUpdate mutation. */ module.exports.StructureDefinitionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple StructureDefinitions', - resolve: scopeInvariant(scopeOptions, structuredefinitionUpdateResolver), + description: 'Update a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, updateStructureDefinition), type: StructureDefinitionSchema, + args: WriteArgs, }; /** - * @name exports.StructureDefinitionDeleteMutation - * @summary StructureDefinitionDelete Mutation. + * @name exports.StructureDefinitionRemoveMutation + * @summary StructureDefinitionRemove mutation. */ -module.exports.StructureDefinitionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single StructureDefinition', - resolve: scopeInvariant(scopeOptions, structuredefinitionDeleteResolver), +module.exports.StructureDefinitionRemoveMutation = { + description: 'Remove a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, removeStructureDefinition), type: StructureDefinitionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/structuredefinition/query.js b/src/resources/3_0_1/profiles/structuredefinition/query.js index 08dadf76..512c2a88 100644 --- a/src/resources/3_0_1/profiles/structuredefinition/query.js +++ b/src/resources/3_0_1/profiles/structuredefinition/query.js @@ -1,55 +1,65 @@ // Schemas -const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const StructureDefinitionArgs = require('../../parameters/structuredefinition.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const StructureDefinitionArgs = require('../../parameters/structuredefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + StructureDefinitionArgs, +); // Resolvers const { - structuredefinitionResolver, - structuredefinitionListResolver, - structuredefinitionInstanceResolver, + getStructureDefinition, + getStructureDefinitionList, + getStructureDefinitionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'StructureDefinition', action: 'read', - version: '3_0_1', }; /** * @name exports.StructureDefinitionQuery - * @summary StructureDefinition Query. + * @summary StructureDefinition query. */ module.exports.StructureDefinitionQuery = { - args: Object.assign({}, CommonArgs, StructureDefinitionArgs), description: 'Query for a single StructureDefinition', - resolve: scopeInvariant(scopeOptions, structuredefinitionResolver), + resolve: scopeInvariant(scopeOptions, getStructureDefinition), type: StructureDefinitionSchema, + args: args, }; /** * @name exports.StructureDefinitionListQuery - * @summary StructureDefinitionList Query. + * @summary StructureDefinition query. */ module.exports.StructureDefinitionListQuery = { - args: Object.assign({}, CommonArgs, StructureDefinitionArgs), - description: 'Query for multiple StructureDefinitions', - resolve: scopeInvariant(scopeOptions, structuredefinitionListResolver), + description: 'Query for a more than or just one StructureDefinition', + resolve: scopeInvariant(scopeOptions, getStructureDefinitionList), type: BundleSchema, + args: args, }; /** * @name exports.StructureDefinitionInstanceQuery - * @summary StructureDefinitionInstance Query. + * @summary StructureDefinition query. */ module.exports.StructureDefinitionInstanceQuery = { - description: 'Get information about a single StructureDefinition', - resolve: scopeInvariant(scopeOptions, structuredefinitionInstanceResolver), + description: 'Access information about a single StructureDefinition', + resolve: scopeInvariant(scopeOptions, getStructureDefinitionInstance), type: StructureDefinitionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/structuredefinition/index.js b/src/resources/3_0_1/profiles/structuredefinition/register.js similarity index 91% rename from src/resources/3_0_1/profiles/structuredefinition/index.js rename to src/resources/3_0_1/profiles/structuredefinition/register.js index 7fe79604..80cca0bb 100644 --- a/src/resources/3_0_1/profiles/structuredefinition/index.js +++ b/src/resources/3_0_1/profiles/structuredefinition/register.js @@ -1,15 +1,15 @@ +const { + StructureDefinitionCreateMutation, + StructureDefinitionUpdateMutation, + StructureDefinitionRemoveMutation, +} = require('./mutation'); + const { StructureDefinitionQuery, StructureDefinitionListQuery, StructureDefinitionInstanceQuery, } = require('./query'); -const { - StructureDefinitionCreateMutation, - StructureDefinitionUpdateMutation, - StructureDefinitionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { StructureDefinitionCreate: StructureDefinitionCreateMutation, StructureDefinitionUpdate: StructureDefinitionUpdateMutation, - StructureDefinitionDelete: StructureDefinitionDeleteMutation, + StructureDefinitionRemove: StructureDefinitionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'StructureDefinition', path: '/3_0_1/StructureDefinition/:id', query: StructureDefinitionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/structuredefinition/resolver.js b/src/resources/3_0_1/profiles/structuredefinition/resolver.js index bd462148..66e0cc14 100644 --- a/src/resources/3_0_1/profiles/structuredefinition/resolver.js +++ b/src/resources/3_0_1/profiles/structuredefinition/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.structuredefinitionResolver + * @name exports.getStructureDefinition * @static - * @summary StructureDefinition Resolver. + * @summary StructureDefinition resolver. */ -module.exports.structuredefinitionResolver = function structuredefinitionResolver( +module.exports.getStructureDefinition = function getStructureDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionListResolver + * @name exports.getStructureDefinitionList * @static - * @summary StructureDefinition List Resolver. + * @summary StructureDefinition list resolver. */ -module.exports.structuredefinitionListResolver = function structuredefinitionListResolver( +module.exports.getStructureDefinitionList = function getStructureDefinitionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionInstanceResolver + * @name exports.getStructureDefinitionInstance * @static - * @summary StructureDefinition Instance Resolver. + * @summary StructureDefinition instance resolver. */ -module.exports.structuredefinitionInstanceResolver = function structuredefinitionInstanceResolver( +module.exports.getStructureDefinitionInstance = function getStructureDefinitionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionCreateResolver + * @name exports.createStructureDefinition * @static - * @summary StructureDefinition Create Resolver. + * @summary Create StructureDefinition resolver. */ -module.exports.structuredefinitionCreateResolver = function structuredefinitionCreateResolver( +module.exports.createStructureDefinition = function createStructureDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionUpdateResolver + * @name exports.updateStructureDefinition * @static - * @summary StructureDefinition Update Resolver. + * @summary Update StructureDefinition resolver. */ -module.exports.structuredefinitionUpdateResolver = function structuredefinitionUpdateResolver( +module.exports.updateStructureDefinition = function updateStructureDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuredefinitionDeleteResolver + * @name exports.removeStructureDefinition * @static - * @summary StructureDefinition Delete Resolver. + * @summary Remove StructureDefinition resolver. */ -module.exports.structuredefinitionDeleteResolver = function structuredefinitionDeleteResolver( +module.exports.removeStructureDefinition = function removeStructureDefinition( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/structuremap/mutation.js b/src/resources/3_0_1/profiles/structuremap/mutation.js index fe2abd27..dbd218ae 100644 --- a/src/resources/3_0_1/profiles/structuremap/mutation.js +++ b/src/resources/3_0_1/profiles/structuremap/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const StructureMapSchema = require('../../schemas/structuremap.schema'); +const StructureMapSchema = require('../../schemas/structuremap.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const StructureMapInput = require('../../inputs/structuremap.input'); +const StructureMapInput = require('../../inputs/structuremap.input.js'); -// Resolvers -const { - structuremapCreateResolver, - structuremapUpdateResolver, - structuremapDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createStructureMap, + updateStructureMap, + removeStructureMap, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'StructureMap', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a StructureMap record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a StructureMap record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.StructureMapCreateMutation - * @summary StructureMapCreate Mutation. + * @summary StructureMapCreate mutation. */ module.exports.StructureMapCreateMutation = { - args: WriteArgs, - description: 'Create a StructureMap', - resolve: scopeInvariant(scopeOptions, structuremapCreateResolver), + description: 'Create a StructureMap record', + resolve: scopeInvariant(scopeOptions, createStructureMap), type: StructureMapSchema, + args: WriteArgs, }; /** * @name exports.StructureMapUpdateMutation - * @summary StructureMapUpdate Mutation. + * @summary StructureMapUpdate mutation. */ module.exports.StructureMapUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple StructureMaps', - resolve: scopeInvariant(scopeOptions, structuremapUpdateResolver), + description: 'Update a StructureMap record', + resolve: scopeInvariant(scopeOptions, updateStructureMap), type: StructureMapSchema, + args: WriteArgs, }; /** - * @name exports.StructureMapDeleteMutation - * @summary StructureMapDelete Mutation. + * @name exports.StructureMapRemoveMutation + * @summary StructureMapRemove mutation. */ -module.exports.StructureMapDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single StructureMap', - resolve: scopeInvariant(scopeOptions, structuremapDeleteResolver), +module.exports.StructureMapRemoveMutation = { + description: 'Remove a StructureMap record', + resolve: scopeInvariant(scopeOptions, removeStructureMap), type: StructureMapSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/structuremap/query.js b/src/resources/3_0_1/profiles/structuremap/query.js index ed8ac208..c6c49523 100644 --- a/src/resources/3_0_1/profiles/structuremap/query.js +++ b/src/resources/3_0_1/profiles/structuremap/query.js @@ -1,55 +1,65 @@ // Schemas -const StructureMapSchema = require('../../schemas/structuremap.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const StructureMapSchema = require('../../schemas/structuremap.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const StructureMapArgs = require('../../parameters/structuremap.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const StructureMapArgs = require('../../parameters/structuremap.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + StructureMapArgs, +); // Resolvers const { - structuremapResolver, - structuremapListResolver, - structuremapInstanceResolver, + getStructureMap, + getStructureMapList, + getStructureMapInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'StructureMap', action: 'read', - version: '3_0_1', }; /** * @name exports.StructureMapQuery - * @summary StructureMap Query. + * @summary StructureMap query. */ module.exports.StructureMapQuery = { - args: Object.assign({}, CommonArgs, StructureMapArgs), description: 'Query for a single StructureMap', - resolve: scopeInvariant(scopeOptions, structuremapResolver), + resolve: scopeInvariant(scopeOptions, getStructureMap), type: StructureMapSchema, + args: args, }; /** * @name exports.StructureMapListQuery - * @summary StructureMapList Query. + * @summary StructureMap query. */ module.exports.StructureMapListQuery = { - args: Object.assign({}, CommonArgs, StructureMapArgs), - description: 'Query for multiple StructureMaps', - resolve: scopeInvariant(scopeOptions, structuremapListResolver), + description: 'Query for a more than or just one StructureMap', + resolve: scopeInvariant(scopeOptions, getStructureMapList), type: BundleSchema, + args: args, }; /** * @name exports.StructureMapInstanceQuery - * @summary StructureMapInstance Query. + * @summary StructureMap query. */ module.exports.StructureMapInstanceQuery = { - description: 'Get information about a single StructureMap', - resolve: scopeInvariant(scopeOptions, structuremapInstanceResolver), + description: 'Access information about a single StructureMap', + resolve: scopeInvariant(scopeOptions, getStructureMapInstance), type: StructureMapSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/structuremap/index.js b/src/resources/3_0_1/profiles/structuremap/register.js similarity index 92% rename from src/resources/3_0_1/profiles/structuremap/index.js rename to src/resources/3_0_1/profiles/structuremap/register.js index ab1fd8b8..f031d8e9 100644 --- a/src/resources/3_0_1/profiles/structuremap/index.js +++ b/src/resources/3_0_1/profiles/structuremap/register.js @@ -1,15 +1,15 @@ +const { + StructureMapCreateMutation, + StructureMapUpdateMutation, + StructureMapRemoveMutation, +} = require('./mutation'); + const { StructureMapQuery, StructureMapListQuery, StructureMapInstanceQuery, } = require('./query'); -const { - StructureMapCreateMutation, - StructureMapUpdateMutation, - StructureMapDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { StructureMapCreate: StructureMapCreateMutation, StructureMapUpdate: StructureMapUpdateMutation, - StructureMapDelete: StructureMapDeleteMutation, + StructureMapRemove: StructureMapRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'StructureMap', path: '/3_0_1/StructureMap/:id', query: StructureMapInstanceQuery, diff --git a/src/resources/3_0_1/profiles/structuremap/resolver.js b/src/resources/3_0_1/profiles/structuremap/resolver.js index 4b0d4dfa..06b9e453 100644 --- a/src/resources/3_0_1/profiles/structuremap/resolver.js +++ b/src/resources/3_0_1/profiles/structuremap/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.structuremapResolver + * @name exports.getStructureMap * @static - * @summary StructureMap Resolver. + * @summary StructureMap resolver. */ -module.exports.structuremapResolver = function structuremapResolver( +module.exports.getStructureMap = function getStructureMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuremapListResolver + * @name exports.getStructureMapList * @static - * @summary StructureMap List Resolver. + * @summary StructureMap list resolver. */ -module.exports.structuremapListResolver = function structuremapListResolver( +module.exports.getStructureMapList = function getStructureMapList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuremapInstanceResolver + * @name exports.getStructureMapInstance * @static - * @summary StructureMap Instance Resolver. + * @summary StructureMap instance resolver. */ -module.exports.structuremapInstanceResolver = function structuremapInstanceResolver( +module.exports.getStructureMapInstance = function getStructureMapInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuremapCreateResolver + * @name exports.createStructureMap * @static - * @summary StructureMap Create Resolver. + * @summary Create StructureMap resolver. */ -module.exports.structuremapCreateResolver = function structuremapCreateResolver( +module.exports.createStructureMap = function createStructureMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuremapUpdateResolver + * @name exports.updateStructureMap * @static - * @summary StructureMap Update Resolver. + * @summary Update StructureMap resolver. */ -module.exports.structuremapUpdateResolver = function structuremapUpdateResolver( +module.exports.updateStructureMap = function updateStructureMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.structuremapDeleteResolver + * @name exports.removeStructureMap * @static - * @summary StructureMap Delete Resolver. + * @summary Remove StructureMap resolver. */ -module.exports.structuremapDeleteResolver = function structuremapDeleteResolver( +module.exports.removeStructureMap = function removeStructureMap( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/subscription/mutation.js b/src/resources/3_0_1/profiles/subscription/mutation.js index 5342140f..e23edf53 100644 --- a/src/resources/3_0_1/profiles/subscription/mutation.js +++ b/src/resources/3_0_1/profiles/subscription/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SubscriptionSchema = require('../../schemas/subscription.schema'); +const SubscriptionSchema = require('../../schemas/subscription.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SubscriptionInput = require('../../inputs/subscription.input'); +const SubscriptionInput = require('../../inputs/subscription.input.js'); -// Resolvers -const { - subscriptionCreateResolver, - subscriptionUpdateResolver, - subscriptionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSubscription, + updateSubscription, + removeSubscription, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Subscription', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Subscription record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Subscription record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.SubscriptionCreateMutation - * @summary SubscriptionCreate Mutation. + * @summary SubscriptionCreate mutation. */ module.exports.SubscriptionCreateMutation = { - args: WriteArgs, - description: 'Create a Subscription', - resolve: scopeInvariant(scopeOptions, subscriptionCreateResolver), + description: 'Create a Subscription record', + resolve: scopeInvariant(scopeOptions, createSubscription), type: SubscriptionSchema, + args: WriteArgs, }; /** * @name exports.SubscriptionUpdateMutation - * @summary SubscriptionUpdate Mutation. + * @summary SubscriptionUpdate mutation. */ module.exports.SubscriptionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Subscriptions', - resolve: scopeInvariant(scopeOptions, subscriptionUpdateResolver), + description: 'Update a Subscription record', + resolve: scopeInvariant(scopeOptions, updateSubscription), type: SubscriptionSchema, + args: WriteArgs, }; /** - * @name exports.SubscriptionDeleteMutation - * @summary SubscriptionDelete Mutation. + * @name exports.SubscriptionRemoveMutation + * @summary SubscriptionRemove mutation. */ -module.exports.SubscriptionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Subscription', - resolve: scopeInvariant(scopeOptions, subscriptionDeleteResolver), +module.exports.SubscriptionRemoveMutation = { + description: 'Remove a Subscription record', + resolve: scopeInvariant(scopeOptions, removeSubscription), type: SubscriptionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/subscription/query.js b/src/resources/3_0_1/profiles/subscription/query.js index 28690241..ca7cdfc3 100644 --- a/src/resources/3_0_1/profiles/subscription/query.js +++ b/src/resources/3_0_1/profiles/subscription/query.js @@ -1,55 +1,65 @@ // Schemas -const SubscriptionSchema = require('../../schemas/subscription.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SubscriptionSchema = require('../../schemas/subscription.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SubscriptionArgs = require('../../parameters/subscription.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SubscriptionArgs = require('../../parameters/subscription.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SubscriptionArgs, +); // Resolvers const { - subscriptionResolver, - subscriptionListResolver, - subscriptionInstanceResolver, + getSubscription, + getSubscriptionList, + getSubscriptionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Subscription', action: 'read', - version: '3_0_1', }; /** * @name exports.SubscriptionQuery - * @summary Subscription Query. + * @summary Subscription query. */ module.exports.SubscriptionQuery = { - args: Object.assign({}, CommonArgs, SubscriptionArgs), description: 'Query for a single Subscription', - resolve: scopeInvariant(scopeOptions, subscriptionResolver), + resolve: scopeInvariant(scopeOptions, getSubscription), type: SubscriptionSchema, + args: args, }; /** * @name exports.SubscriptionListQuery - * @summary SubscriptionList Query. + * @summary Subscription query. */ module.exports.SubscriptionListQuery = { - args: Object.assign({}, CommonArgs, SubscriptionArgs), - description: 'Query for multiple Subscriptions', - resolve: scopeInvariant(scopeOptions, subscriptionListResolver), + description: 'Query for a more than or just one Subscription', + resolve: scopeInvariant(scopeOptions, getSubscriptionList), type: BundleSchema, + args: args, }; /** * @name exports.SubscriptionInstanceQuery - * @summary SubscriptionInstance Query. + * @summary Subscription query. */ module.exports.SubscriptionInstanceQuery = { - description: 'Get information about a single Subscription', - resolve: scopeInvariant(scopeOptions, subscriptionInstanceResolver), + description: 'Access information about a single Subscription', + resolve: scopeInvariant(scopeOptions, getSubscriptionInstance), type: SubscriptionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/subscription/index.js b/src/resources/3_0_1/profiles/subscription/register.js similarity index 92% rename from src/resources/3_0_1/profiles/subscription/index.js rename to src/resources/3_0_1/profiles/subscription/register.js index f55045da..a1c59a7c 100644 --- a/src/resources/3_0_1/profiles/subscription/index.js +++ b/src/resources/3_0_1/profiles/subscription/register.js @@ -1,15 +1,15 @@ +const { + SubscriptionCreateMutation, + SubscriptionUpdateMutation, + SubscriptionRemoveMutation, +} = require('./mutation'); + const { SubscriptionQuery, SubscriptionListQuery, SubscriptionInstanceQuery, } = require('./query'); -const { - SubscriptionCreateMutation, - SubscriptionUpdateMutation, - SubscriptionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SubscriptionCreate: SubscriptionCreateMutation, SubscriptionUpdate: SubscriptionUpdateMutation, - SubscriptionDelete: SubscriptionDeleteMutation, + SubscriptionRemove: SubscriptionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Subscription', path: '/3_0_1/Subscription/:id', query: SubscriptionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/subscription/resolver.js b/src/resources/3_0_1/profiles/subscription/resolver.js index f3a6a0f9..6c5c864a 100644 --- a/src/resources/3_0_1/profiles/subscription/resolver.js +++ b/src/resources/3_0_1/profiles/subscription/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.subscriptionResolver + * @name exports.getSubscription * @static - * @summary Subscription Resolver. + * @summary Subscription resolver. */ -module.exports.subscriptionResolver = function subscriptionResolver( +module.exports.getSubscription = function getSubscription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionListResolver + * @name exports.getSubscriptionList * @static - * @summary Subscription List Resolver. + * @summary Subscription list resolver. */ -module.exports.subscriptionListResolver = function subscriptionListResolver( +module.exports.getSubscriptionList = function getSubscriptionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionInstanceResolver + * @name exports.getSubscriptionInstance * @static - * @summary Subscription Instance Resolver. + * @summary Subscription instance resolver. */ -module.exports.subscriptionInstanceResolver = function subscriptionInstanceResolver( +module.exports.getSubscriptionInstance = function getSubscriptionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionCreateResolver + * @name exports.createSubscription * @static - * @summary Subscription Create Resolver. + * @summary Create Subscription resolver. */ -module.exports.subscriptionCreateResolver = function subscriptionCreateResolver( +module.exports.createSubscription = function createSubscription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionUpdateResolver + * @name exports.updateSubscription * @static - * @summary Subscription Update Resolver. + * @summary Update Subscription resolver. */ -module.exports.subscriptionUpdateResolver = function subscriptionUpdateResolver( +module.exports.updateSubscription = function updateSubscription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.subscriptionDeleteResolver + * @name exports.removeSubscription * @static - * @summary Subscription Delete Resolver. + * @summary Remove Subscription resolver. */ -module.exports.subscriptionDeleteResolver = function subscriptionDeleteResolver( +module.exports.removeSubscription = function removeSubscription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/substance/mutation.js b/src/resources/3_0_1/profiles/substance/mutation.js index f55906d0..660b442b 100644 --- a/src/resources/3_0_1/profiles/substance/mutation.js +++ b/src/resources/3_0_1/profiles/substance/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SubstanceSchema = require('../../schemas/substance.schema'); +const SubstanceSchema = require('../../schemas/substance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SubstanceInput = require('../../inputs/substance.input'); +const SubstanceInput = require('../../inputs/substance.input.js'); -// Resolvers -const { - substanceCreateResolver, - substanceUpdateResolver, - substanceDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSubstance, + updateSubstance, + removeSubstance, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Substance', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Substance record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Substance record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.SubstanceCreateMutation - * @summary SubstanceCreate Mutation. + * @summary SubstanceCreate mutation. */ module.exports.SubstanceCreateMutation = { - args: WriteArgs, - description: 'Create a Substance', - resolve: scopeInvariant(scopeOptions, substanceCreateResolver), + description: 'Create a Substance record', + resolve: scopeInvariant(scopeOptions, createSubstance), type: SubstanceSchema, + args: WriteArgs, }; /** * @name exports.SubstanceUpdateMutation - * @summary SubstanceUpdate Mutation. + * @summary SubstanceUpdate mutation. */ module.exports.SubstanceUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Substances', - resolve: scopeInvariant(scopeOptions, substanceUpdateResolver), + description: 'Update a Substance record', + resolve: scopeInvariant(scopeOptions, updateSubstance), type: SubstanceSchema, + args: WriteArgs, }; /** - * @name exports.SubstanceDeleteMutation - * @summary SubstanceDelete Mutation. + * @name exports.SubstanceRemoveMutation + * @summary SubstanceRemove mutation. */ -module.exports.SubstanceDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Substance', - resolve: scopeInvariant(scopeOptions, substanceDeleteResolver), +module.exports.SubstanceRemoveMutation = { + description: 'Remove a Substance record', + resolve: scopeInvariant(scopeOptions, removeSubstance), type: SubstanceSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/substance/query.js b/src/resources/3_0_1/profiles/substance/query.js index 5ef1ab07..6b247192 100644 --- a/src/resources/3_0_1/profiles/substance/query.js +++ b/src/resources/3_0_1/profiles/substance/query.js @@ -1,55 +1,60 @@ // Schemas -const SubstanceSchema = require('../../schemas/substance.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SubstanceSchema = require('../../schemas/substance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SubstanceArgs = require('../../parameters/substance.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SubstanceArgs = require('../../parameters/substance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, SubstanceArgs); // Resolvers const { - substanceResolver, - substanceListResolver, - substanceInstanceResolver, + getSubstance, + getSubstanceList, + getSubstanceInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Substance', action: 'read', - version: '3_0_1', }; /** * @name exports.SubstanceQuery - * @summary Substance Query. + * @summary Substance query. */ module.exports.SubstanceQuery = { - args: Object.assign({}, CommonArgs, SubstanceArgs), description: 'Query for a single Substance', - resolve: scopeInvariant(scopeOptions, substanceResolver), + resolve: scopeInvariant(scopeOptions, getSubstance), type: SubstanceSchema, + args: args, }; /** * @name exports.SubstanceListQuery - * @summary SubstanceList Query. + * @summary Substance query. */ module.exports.SubstanceListQuery = { - args: Object.assign({}, CommonArgs, SubstanceArgs), - description: 'Query for multiple Substances', - resolve: scopeInvariant(scopeOptions, substanceListResolver), + description: 'Query for a more than or just one Substance', + resolve: scopeInvariant(scopeOptions, getSubstanceList), type: BundleSchema, + args: args, }; /** * @name exports.SubstanceInstanceQuery - * @summary SubstanceInstance Query. + * @summary Substance query. */ module.exports.SubstanceInstanceQuery = { - description: 'Get information about a single Substance', - resolve: scopeInvariant(scopeOptions, substanceInstanceResolver), + description: 'Access information about a single Substance', + resolve: scopeInvariant(scopeOptions, getSubstanceInstance), type: SubstanceSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/substance/index.js b/src/resources/3_0_1/profiles/substance/register.js similarity index 92% rename from src/resources/3_0_1/profiles/substance/index.js rename to src/resources/3_0_1/profiles/substance/register.js index 02ad485c..248e1c13 100644 --- a/src/resources/3_0_1/profiles/substance/index.js +++ b/src/resources/3_0_1/profiles/substance/register.js @@ -1,15 +1,15 @@ +const { + SubstanceCreateMutation, + SubstanceUpdateMutation, + SubstanceRemoveMutation, +} = require('./mutation'); + const { SubstanceQuery, SubstanceListQuery, SubstanceInstanceQuery, } = require('./query'); -const { - SubstanceCreateMutation, - SubstanceUpdateMutation, - SubstanceDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SubstanceCreate: SubstanceCreateMutation, SubstanceUpdate: SubstanceUpdateMutation, - SubstanceDelete: SubstanceDeleteMutation, + SubstanceRemove: SubstanceRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Substance', path: '/3_0_1/Substance/:id', query: SubstanceInstanceQuery, diff --git a/src/resources/3_0_1/profiles/substance/resolver.js b/src/resources/3_0_1/profiles/substance/resolver.js index 3cfb6ed5..2c04b7f3 100644 --- a/src/resources/3_0_1/profiles/substance/resolver.js +++ b/src/resources/3_0_1/profiles/substance/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.substanceResolver + * @name exports.getSubstance * @static - * @summary Substance Resolver. + * @summary Substance resolver. */ -module.exports.substanceResolver = function substanceResolver( +module.exports.getSubstance = function getSubstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceListResolver + * @name exports.getSubstanceList * @static - * @summary Substance List Resolver. + * @summary Substance list resolver. */ -module.exports.substanceListResolver = function substanceListResolver( +module.exports.getSubstanceList = function getSubstanceList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceInstanceResolver + * @name exports.getSubstanceInstance * @static - * @summary Substance Instance Resolver. + * @summary Substance instance resolver. */ -module.exports.substanceInstanceResolver = function substanceInstanceResolver( +module.exports.getSubstanceInstance = function getSubstanceInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceCreateResolver + * @name exports.createSubstance * @static - * @summary Substance Create Resolver. + * @summary Create Substance resolver. */ -module.exports.substanceCreateResolver = function substanceCreateResolver( +module.exports.createSubstance = function createSubstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceUpdateResolver + * @name exports.updateSubstance * @static - * @summary Substance Update Resolver. + * @summary Update Substance resolver. */ -module.exports.substanceUpdateResolver = function substanceUpdateResolver( +module.exports.updateSubstance = function updateSubstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.substanceDeleteResolver + * @name exports.removeSubstance * @static - * @summary Substance Delete Resolver. + * @summary Remove Substance resolver. */ -module.exports.substanceDeleteResolver = function substanceDeleteResolver( +module.exports.removeSubstance = function removeSubstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/supplydelivery/mutation.js b/src/resources/3_0_1/profiles/supplydelivery/mutation.js index 48b5558b..84b89de7 100644 --- a/src/resources/3_0_1/profiles/supplydelivery/mutation.js +++ b/src/resources/3_0_1/profiles/supplydelivery/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema'); +const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SupplyDeliveryInput = require('../../inputs/supplydelivery.input'); +const SupplyDeliveryInput = require('../../inputs/supplydelivery.input.js'); -// Resolvers -const { - supplydeliveryCreateResolver, - supplydeliveryUpdateResolver, - supplydeliveryDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSupplyDelivery, + updateSupplyDelivery, + removeSupplyDelivery, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SupplyDelivery', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a SupplyDelivery record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a SupplyDelivery record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.SupplyDeliveryCreateMutation - * @summary SupplyDeliveryCreate Mutation. + * @summary SupplyDeliveryCreate mutation. */ module.exports.SupplyDeliveryCreateMutation = { - args: WriteArgs, - description: 'Create a SupplyDelivery', - resolve: scopeInvariant(scopeOptions, supplydeliveryCreateResolver), + description: 'Create a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, createSupplyDelivery), type: SupplyDeliverySchema, + args: WriteArgs, }; /** * @name exports.SupplyDeliveryUpdateMutation - * @summary SupplyDeliveryUpdate Mutation. + * @summary SupplyDeliveryUpdate mutation. */ module.exports.SupplyDeliveryUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple SupplyDeliverys', - resolve: scopeInvariant(scopeOptions, supplydeliveryUpdateResolver), + description: 'Update a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, updateSupplyDelivery), type: SupplyDeliverySchema, + args: WriteArgs, }; /** - * @name exports.SupplyDeliveryDeleteMutation - * @summary SupplyDeliveryDelete Mutation. + * @name exports.SupplyDeliveryRemoveMutation + * @summary SupplyDeliveryRemove mutation. */ -module.exports.SupplyDeliveryDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single SupplyDelivery', - resolve: scopeInvariant(scopeOptions, supplydeliveryDeleteResolver), +module.exports.SupplyDeliveryRemoveMutation = { + description: 'Remove a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, removeSupplyDelivery), type: SupplyDeliverySchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/supplydelivery/query.js b/src/resources/3_0_1/profiles/supplydelivery/query.js index 73282358..9c82e549 100644 --- a/src/resources/3_0_1/profiles/supplydelivery/query.js +++ b/src/resources/3_0_1/profiles/supplydelivery/query.js @@ -1,55 +1,65 @@ // Schemas -const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SupplyDeliveryArgs = require('../../parameters/supplydelivery.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SupplyDeliveryArgs = require('../../parameters/supplydelivery.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SupplyDeliveryArgs, +); // Resolvers const { - supplydeliveryResolver, - supplydeliveryListResolver, - supplydeliveryInstanceResolver, + getSupplyDelivery, + getSupplyDeliveryList, + getSupplyDeliveryInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SupplyDelivery', action: 'read', - version: '3_0_1', }; /** * @name exports.SupplyDeliveryQuery - * @summary SupplyDelivery Query. + * @summary SupplyDelivery query. */ module.exports.SupplyDeliveryQuery = { - args: Object.assign({}, CommonArgs, SupplyDeliveryArgs), description: 'Query for a single SupplyDelivery', - resolve: scopeInvariant(scopeOptions, supplydeliveryResolver), + resolve: scopeInvariant(scopeOptions, getSupplyDelivery), type: SupplyDeliverySchema, + args: args, }; /** * @name exports.SupplyDeliveryListQuery - * @summary SupplyDeliveryList Query. + * @summary SupplyDelivery query. */ module.exports.SupplyDeliveryListQuery = { - args: Object.assign({}, CommonArgs, SupplyDeliveryArgs), - description: 'Query for multiple SupplyDeliverys', - resolve: scopeInvariant(scopeOptions, supplydeliveryListResolver), + description: 'Query for a more than or just one SupplyDelivery', + resolve: scopeInvariant(scopeOptions, getSupplyDeliveryList), type: BundleSchema, + args: args, }; /** * @name exports.SupplyDeliveryInstanceQuery - * @summary SupplyDeliveryInstance Query. + * @summary SupplyDelivery query. */ module.exports.SupplyDeliveryInstanceQuery = { - description: 'Get information about a single SupplyDelivery', - resolve: scopeInvariant(scopeOptions, supplydeliveryInstanceResolver), + description: 'Access information about a single SupplyDelivery', + resolve: scopeInvariant(scopeOptions, getSupplyDeliveryInstance), type: SupplyDeliverySchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/supplydelivery/index.js b/src/resources/3_0_1/profiles/supplydelivery/register.js similarity index 92% rename from src/resources/3_0_1/profiles/supplydelivery/index.js rename to src/resources/3_0_1/profiles/supplydelivery/register.js index c18f5a9d..617f9891 100644 --- a/src/resources/3_0_1/profiles/supplydelivery/index.js +++ b/src/resources/3_0_1/profiles/supplydelivery/register.js @@ -1,15 +1,15 @@ +const { + SupplyDeliveryCreateMutation, + SupplyDeliveryUpdateMutation, + SupplyDeliveryRemoveMutation, +} = require('./mutation'); + const { SupplyDeliveryQuery, SupplyDeliveryListQuery, SupplyDeliveryInstanceQuery, } = require('./query'); -const { - SupplyDeliveryCreateMutation, - SupplyDeliveryUpdateMutation, - SupplyDeliveryDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SupplyDeliveryCreate: SupplyDeliveryCreateMutation, SupplyDeliveryUpdate: SupplyDeliveryUpdateMutation, - SupplyDeliveryDelete: SupplyDeliveryDeleteMutation, + SupplyDeliveryRemove: SupplyDeliveryRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'SupplyDelivery', path: '/3_0_1/SupplyDelivery/:id', query: SupplyDeliveryInstanceQuery, diff --git a/src/resources/3_0_1/profiles/supplydelivery/resolver.js b/src/resources/3_0_1/profiles/supplydelivery/resolver.js index f5caeed2..0ceb2dbf 100644 --- a/src/resources/3_0_1/profiles/supplydelivery/resolver.js +++ b/src/resources/3_0_1/profiles/supplydelivery/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.supplydeliveryResolver + * @name exports.getSupplyDelivery * @static - * @summary SupplyDelivery Resolver. + * @summary SupplyDelivery resolver. */ -module.exports.supplydeliveryResolver = function supplydeliveryResolver( +module.exports.getSupplyDelivery = function getSupplyDelivery( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryListResolver + * @name exports.getSupplyDeliveryList * @static - * @summary SupplyDelivery List Resolver. + * @summary SupplyDelivery list resolver. */ -module.exports.supplydeliveryListResolver = function supplydeliveryListResolver( +module.exports.getSupplyDeliveryList = function getSupplyDeliveryList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryInstanceResolver + * @name exports.getSupplyDeliveryInstance * @static - * @summary SupplyDelivery Instance Resolver. + * @summary SupplyDelivery instance resolver. */ -module.exports.supplydeliveryInstanceResolver = function supplydeliveryInstanceResolver( +module.exports.getSupplyDeliveryInstance = function getSupplyDeliveryInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryCreateResolver + * @name exports.createSupplyDelivery * @static - * @summary SupplyDelivery Create Resolver. + * @summary Create SupplyDelivery resolver. */ -module.exports.supplydeliveryCreateResolver = function supplydeliveryCreateResolver( +module.exports.createSupplyDelivery = function createSupplyDelivery( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryUpdateResolver + * @name exports.updateSupplyDelivery * @static - * @summary SupplyDelivery Update Resolver. + * @summary Update SupplyDelivery resolver. */ -module.exports.supplydeliveryUpdateResolver = function supplydeliveryUpdateResolver( +module.exports.updateSupplyDelivery = function updateSupplyDelivery( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplydeliveryDeleteResolver + * @name exports.removeSupplyDelivery * @static - * @summary SupplyDelivery Delete Resolver. + * @summary Remove SupplyDelivery resolver. */ -module.exports.supplydeliveryDeleteResolver = function supplydeliveryDeleteResolver( +module.exports.removeSupplyDelivery = function removeSupplyDelivery( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/supplyrequest/mutation.js b/src/resources/3_0_1/profiles/supplyrequest/mutation.js index caccdaa9..836df5e6 100644 --- a/src/resources/3_0_1/profiles/supplyrequest/mutation.js +++ b/src/resources/3_0_1/profiles/supplyrequest/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const SupplyRequestSchema = require('../../schemas/supplyrequest.schema'); +const SupplyRequestSchema = require('../../schemas/supplyrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const SupplyRequestInput = require('../../inputs/supplyrequest.input'); +const SupplyRequestInput = require('../../inputs/supplyrequest.input.js'); -// Resolvers -const { - supplyrequestCreateResolver, - supplyrequestUpdateResolver, - supplyrequestDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createSupplyRequest, + updateSupplyRequest, + removeSupplyRequest, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SupplyRequest', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a SupplyRequest record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a SupplyRequest record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.SupplyRequestCreateMutation - * @summary SupplyRequestCreate Mutation. + * @summary SupplyRequestCreate mutation. */ module.exports.SupplyRequestCreateMutation = { - args: WriteArgs, - description: 'Create a SupplyRequest', - resolve: scopeInvariant(scopeOptions, supplyrequestCreateResolver), + description: 'Create a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, createSupplyRequest), type: SupplyRequestSchema, + args: WriteArgs, }; /** * @name exports.SupplyRequestUpdateMutation - * @summary SupplyRequestUpdate Mutation. + * @summary SupplyRequestUpdate mutation. */ module.exports.SupplyRequestUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple SupplyRequests', - resolve: scopeInvariant(scopeOptions, supplyrequestUpdateResolver), + description: 'Update a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, updateSupplyRequest), type: SupplyRequestSchema, + args: WriteArgs, }; /** - * @name exports.SupplyRequestDeleteMutation - * @summary SupplyRequestDelete Mutation. + * @name exports.SupplyRequestRemoveMutation + * @summary SupplyRequestRemove mutation. */ -module.exports.SupplyRequestDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single SupplyRequest', - resolve: scopeInvariant(scopeOptions, supplyrequestDeleteResolver), +module.exports.SupplyRequestRemoveMutation = { + description: 'Remove a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, removeSupplyRequest), type: SupplyRequestSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/supplyrequest/query.js b/src/resources/3_0_1/profiles/supplyrequest/query.js index 82ad8c2a..a063853e 100644 --- a/src/resources/3_0_1/profiles/supplyrequest/query.js +++ b/src/resources/3_0_1/profiles/supplyrequest/query.js @@ -1,55 +1,65 @@ // Schemas -const SupplyRequestSchema = require('../../schemas/supplyrequest.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SupplyRequestSchema = require('../../schemas/supplyrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const SupplyRequestArgs = require('../../parameters/supplyrequest.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const SupplyRequestArgs = require('../../parameters/supplyrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SupplyRequestArgs, +); // Resolvers const { - supplyrequestResolver, - supplyrequestListResolver, - supplyrequestInstanceResolver, + getSupplyRequest, + getSupplyRequestList, + getSupplyRequestInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'SupplyRequest', action: 'read', - version: '3_0_1', }; /** * @name exports.SupplyRequestQuery - * @summary SupplyRequest Query. + * @summary SupplyRequest query. */ module.exports.SupplyRequestQuery = { - args: Object.assign({}, CommonArgs, SupplyRequestArgs), description: 'Query for a single SupplyRequest', - resolve: scopeInvariant(scopeOptions, supplyrequestResolver), + resolve: scopeInvariant(scopeOptions, getSupplyRequest), type: SupplyRequestSchema, + args: args, }; /** * @name exports.SupplyRequestListQuery - * @summary SupplyRequestList Query. + * @summary SupplyRequest query. */ module.exports.SupplyRequestListQuery = { - args: Object.assign({}, CommonArgs, SupplyRequestArgs), - description: 'Query for multiple SupplyRequests', - resolve: scopeInvariant(scopeOptions, supplyrequestListResolver), + description: 'Query for a more than or just one SupplyRequest', + resolve: scopeInvariant(scopeOptions, getSupplyRequestList), type: BundleSchema, + args: args, }; /** * @name exports.SupplyRequestInstanceQuery - * @summary SupplyRequestInstance Query. + * @summary SupplyRequest query. */ module.exports.SupplyRequestInstanceQuery = { - description: 'Get information about a single SupplyRequest', - resolve: scopeInvariant(scopeOptions, supplyrequestInstanceResolver), + description: 'Access information about a single SupplyRequest', + resolve: scopeInvariant(scopeOptions, getSupplyRequestInstance), type: SupplyRequestSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/supplyrequest/index.js b/src/resources/3_0_1/profiles/supplyrequest/register.js similarity index 92% rename from src/resources/3_0_1/profiles/supplyrequest/index.js rename to src/resources/3_0_1/profiles/supplyrequest/register.js index 12201461..59b3d8d8 100644 --- a/src/resources/3_0_1/profiles/supplyrequest/index.js +++ b/src/resources/3_0_1/profiles/supplyrequest/register.js @@ -1,15 +1,15 @@ +const { + SupplyRequestCreateMutation, + SupplyRequestUpdateMutation, + SupplyRequestRemoveMutation, +} = require('./mutation'); + const { SupplyRequestQuery, SupplyRequestListQuery, SupplyRequestInstanceQuery, } = require('./query'); -const { - SupplyRequestCreateMutation, - SupplyRequestUpdateMutation, - SupplyRequestDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { SupplyRequestCreate: SupplyRequestCreateMutation, SupplyRequestUpdate: SupplyRequestUpdateMutation, - SupplyRequestDelete: SupplyRequestDeleteMutation, + SupplyRequestRemove: SupplyRequestRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'SupplyRequest', path: '/3_0_1/SupplyRequest/:id', query: SupplyRequestInstanceQuery, diff --git a/src/resources/3_0_1/profiles/supplyrequest/resolver.js b/src/resources/3_0_1/profiles/supplyrequest/resolver.js index 162dd8b4..13869b26 100644 --- a/src/resources/3_0_1/profiles/supplyrequest/resolver.js +++ b/src/resources/3_0_1/profiles/supplyrequest/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.supplyrequestResolver + * @name exports.getSupplyRequest * @static - * @summary SupplyRequest Resolver. + * @summary SupplyRequest resolver. */ -module.exports.supplyrequestResolver = function supplyrequestResolver( +module.exports.getSupplyRequest = function getSupplyRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestListResolver + * @name exports.getSupplyRequestList * @static - * @summary SupplyRequest List Resolver. + * @summary SupplyRequest list resolver. */ -module.exports.supplyrequestListResolver = function supplyrequestListResolver( +module.exports.getSupplyRequestList = function getSupplyRequestList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestInstanceResolver + * @name exports.getSupplyRequestInstance * @static - * @summary SupplyRequest Instance Resolver. + * @summary SupplyRequest instance resolver. */ -module.exports.supplyrequestInstanceResolver = function supplyrequestInstanceResolver( +module.exports.getSupplyRequestInstance = function getSupplyRequestInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestCreateResolver + * @name exports.createSupplyRequest * @static - * @summary SupplyRequest Create Resolver. + * @summary Create SupplyRequest resolver. */ -module.exports.supplyrequestCreateResolver = function supplyrequestCreateResolver( +module.exports.createSupplyRequest = function createSupplyRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestUpdateResolver + * @name exports.updateSupplyRequest * @static - * @summary SupplyRequest Update Resolver. + * @summary Update SupplyRequest resolver. */ -module.exports.supplyrequestUpdateResolver = function supplyrequestUpdateResolver( +module.exports.updateSupplyRequest = function updateSupplyRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.supplyrequestDeleteResolver + * @name exports.removeSupplyRequest * @static - * @summary SupplyRequest Delete Resolver. + * @summary Remove SupplyRequest resolver. */ -module.exports.supplyrequestDeleteResolver = function supplyrequestDeleteResolver( +module.exports.removeSupplyRequest = function removeSupplyRequest( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/task/mutation.js b/src/resources/3_0_1/profiles/task/mutation.js index 9c7e4237..c6dc04c3 100644 --- a/src/resources/3_0_1/profiles/task/mutation.js +++ b/src/resources/3_0_1/profiles/task/mutation.js @@ -1,34 +1,31 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const TaskSchema = require('../../schemas/task.schema'); +const TaskSchema = require('../../schemas/task.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const TaskInput = require('../../inputs/task.input'); +const TaskInput = require('../../inputs/task.input.js'); -// Resolvers -const { - taskCreateResolver, - taskUpdateResolver, - taskDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { createTask, updateTask, removeTask } = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Task', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a Task record.', }, resource: { @@ -39,40 +36,40 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a Task record for deletion.', }, }; /** * @name exports.TaskCreateMutation - * @summary TaskCreate Mutation. + * @summary TaskCreate mutation. */ module.exports.TaskCreateMutation = { - args: WriteArgs, - description: 'Create a Task', - resolve: scopeInvariant(scopeOptions, taskCreateResolver), + description: 'Create a Task record', + resolve: scopeInvariant(scopeOptions, createTask), type: TaskSchema, + args: WriteArgs, }; /** * @name exports.TaskUpdateMutation - * @summary TaskUpdate Mutation. + * @summary TaskUpdate mutation. */ module.exports.TaskUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple Tasks', - resolve: scopeInvariant(scopeOptions, taskUpdateResolver), + description: 'Update a Task record', + resolve: scopeInvariant(scopeOptions, updateTask), type: TaskSchema, + args: WriteArgs, }; /** - * @name exports.TaskDeleteMutation - * @summary TaskDelete Mutation. + * @name exports.TaskRemoveMutation + * @summary TaskRemove mutation. */ -module.exports.TaskDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single Task', - resolve: scopeInvariant(scopeOptions, taskDeleteResolver), +module.exports.TaskRemoveMutation = { + description: 'Remove a Task record', + resolve: scopeInvariant(scopeOptions, removeTask), type: TaskSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/task/query.js b/src/resources/3_0_1/profiles/task/query.js index 8e467be9..c273ce78 100644 --- a/src/resources/3_0_1/profiles/task/query.js +++ b/src/resources/3_0_1/profiles/task/query.js @@ -1,55 +1,56 @@ // Schemas -const TaskSchema = require('../../schemas/task.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const TaskSchema = require('../../schemas/task.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const TaskArgs = require('../../parameters/task.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const TaskArgs = require('../../parameters/task.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, TaskArgs); // Resolvers -const { - taskResolver, - taskListResolver, - taskInstanceResolver, -} = require('./resolver'); +const { getTask, getTaskList, getTaskInstance } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'Task', action: 'read', - version: '3_0_1', }; /** * @name exports.TaskQuery - * @summary Task Query. + * @summary Task query. */ module.exports.TaskQuery = { - args: Object.assign({}, CommonArgs, TaskArgs), description: 'Query for a single Task', - resolve: scopeInvariant(scopeOptions, taskResolver), + resolve: scopeInvariant(scopeOptions, getTask), type: TaskSchema, + args: args, }; /** * @name exports.TaskListQuery - * @summary TaskList Query. + * @summary Task query. */ module.exports.TaskListQuery = { - args: Object.assign({}, CommonArgs, TaskArgs), - description: 'Query for multiple Tasks', - resolve: scopeInvariant(scopeOptions, taskListResolver), + description: 'Query for a more than or just one Task', + resolve: scopeInvariant(scopeOptions, getTaskList), type: BundleSchema, + args: args, }; /** * @name exports.TaskInstanceQuery - * @summary TaskInstance Query. + * @summary Task query. */ module.exports.TaskInstanceQuery = { - description: 'Get information about a single Task', - resolve: scopeInvariant(scopeOptions, taskInstanceResolver), + description: 'Access information about a single Task', + resolve: scopeInvariant(scopeOptions, getTaskInstance), type: TaskSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/task/index.js b/src/resources/3_0_1/profiles/task/register.js similarity index 93% rename from src/resources/3_0_1/profiles/task/index.js rename to src/resources/3_0_1/profiles/task/register.js index 042a2c62..87670912 100644 --- a/src/resources/3_0_1/profiles/task/index.js +++ b/src/resources/3_0_1/profiles/task/register.js @@ -1,11 +1,11 @@ -const { TaskQuery, TaskListQuery, TaskInstanceQuery } = require('./query'); - const { TaskCreateMutation, TaskUpdateMutation, - TaskDeleteMutation, + TaskRemoveMutation, } = require('./mutation'); +const { TaskQuery, TaskListQuery, TaskInstanceQuery } = require('./query'); + /** * @name exports * @static @@ -30,13 +30,13 @@ module.exports = { mutation: { TaskCreate: TaskCreateMutation, TaskUpdate: TaskUpdateMutation, - TaskDelete: TaskDeleteMutation, + TaskRemove: TaskRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'Task', path: '/3_0_1/Task/:id', query: TaskInstanceQuery, diff --git a/src/resources/3_0_1/profiles/task/resolver.js b/src/resources/3_0_1/profiles/task/resolver.js index b7798ecb..41357afa 100644 --- a/src/resources/3_0_1/profiles/task/resolver.js +++ b/src/resources/3_0_1/profiles/task/resolver.js @@ -1,86 +1,84 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.taskResolver + * @name exports.getTask * @static - * @summary Task Resolver. + * @summary Task resolver. */ -module.exports.taskResolver = function taskResolver(root, args, context, info) { - let { server, req, res, version } = context; +module.exports.getTask = function getTask(root, args, context = {}, info) { + let { server, version, req, res } = context; return {}; }; /** - * @name exports.taskListResolver + * @name exports.getTaskList * @static - * @summary Task List Resolver. + * @summary Task list resolver. */ -module.exports.taskListResolver = function taskListResolver( +module.exports.getTaskList = function getTaskList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.taskInstanceResolver + * @name exports.getTaskInstance * @static - * @summary Task Instance Resolver. + * @summary Task instance resolver. */ -module.exports.taskInstanceResolver = function taskInstanceResolver( +module.exports.getTaskInstance = function getTaskInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.taskCreateResolver + * @name exports.createTask * @static - * @summary Task Create Resolver. + * @summary Create Task resolver. */ -module.exports.taskCreateResolver = function taskCreateResolver( +module.exports.createTask = function createTask( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.taskUpdateResolver + * @name exports.updateTask * @static - * @summary Task Update Resolver. + * @summary Update Task resolver. */ -module.exports.taskUpdateResolver = function taskUpdateResolver( +module.exports.updateTask = function updateTask( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.taskDeleteResolver + * @name exports.removeTask * @static - * @summary Task Delete Resolver. + * @summary Remove Task resolver. */ -module.exports.taskDeleteResolver = function taskDeleteResolver( +module.exports.removeTask = function removeTask( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/testreport/mutation.js b/src/resources/3_0_1/profiles/testreport/mutation.js index 0f3c68dc..4f34d0d4 100644 --- a/src/resources/3_0_1/profiles/testreport/mutation.js +++ b/src/resources/3_0_1/profiles/testreport/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const TestReportSchema = require('../../schemas/testreport.schema'); +const TestReportSchema = require('../../schemas/testreport.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const TestReportInput = require('../../inputs/testreport.input'); +const TestReportInput = require('../../inputs/testreport.input.js'); -// Resolvers -const { - testreportCreateResolver, - testreportUpdateResolver, - testreportDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createTestReport, + updateTestReport, + removeTestReport, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'TestReport', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a TestReport record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a TestReport record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.TestReportCreateMutation - * @summary TestReportCreate Mutation. + * @summary TestReportCreate mutation. */ module.exports.TestReportCreateMutation = { - args: WriteArgs, - description: 'Create a TestReport', - resolve: scopeInvariant(scopeOptions, testreportCreateResolver), + description: 'Create a TestReport record', + resolve: scopeInvariant(scopeOptions, createTestReport), type: TestReportSchema, + args: WriteArgs, }; /** * @name exports.TestReportUpdateMutation - * @summary TestReportUpdate Mutation. + * @summary TestReportUpdate mutation. */ module.exports.TestReportUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple TestReports', - resolve: scopeInvariant(scopeOptions, testreportUpdateResolver), + description: 'Update a TestReport record', + resolve: scopeInvariant(scopeOptions, updateTestReport), type: TestReportSchema, + args: WriteArgs, }; /** - * @name exports.TestReportDeleteMutation - * @summary TestReportDelete Mutation. + * @name exports.TestReportRemoveMutation + * @summary TestReportRemove mutation. */ -module.exports.TestReportDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single TestReport', - resolve: scopeInvariant(scopeOptions, testreportDeleteResolver), +module.exports.TestReportRemoveMutation = { + description: 'Remove a TestReport record', + resolve: scopeInvariant(scopeOptions, removeTestReport), type: TestReportSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/testreport/query.js b/src/resources/3_0_1/profiles/testreport/query.js index bb9fe91f..fa76c8b1 100644 --- a/src/resources/3_0_1/profiles/testreport/query.js +++ b/src/resources/3_0_1/profiles/testreport/query.js @@ -1,55 +1,60 @@ // Schemas -const TestReportSchema = require('../../schemas/testreport.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const TestReportSchema = require('../../schemas/testreport.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const TestReportArgs = require('../../parameters/testreport.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const TestReportArgs = require('../../parameters/testreport.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, TestReportArgs); // Resolvers const { - testreportResolver, - testreportListResolver, - testreportInstanceResolver, + getTestReport, + getTestReportList, + getTestReportInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'TestReport', action: 'read', - version: '3_0_1', }; /** * @name exports.TestReportQuery - * @summary TestReport Query. + * @summary TestReport query. */ module.exports.TestReportQuery = { - args: Object.assign({}, CommonArgs, TestReportArgs), description: 'Query for a single TestReport', - resolve: scopeInvariant(scopeOptions, testreportResolver), + resolve: scopeInvariant(scopeOptions, getTestReport), type: TestReportSchema, + args: args, }; /** * @name exports.TestReportListQuery - * @summary TestReportList Query. + * @summary TestReport query. */ module.exports.TestReportListQuery = { - args: Object.assign({}, CommonArgs, TestReportArgs), - description: 'Query for multiple TestReports', - resolve: scopeInvariant(scopeOptions, testreportListResolver), + description: 'Query for a more than or just one TestReport', + resolve: scopeInvariant(scopeOptions, getTestReportList), type: BundleSchema, + args: args, }; /** * @name exports.TestReportInstanceQuery - * @summary TestReportInstance Query. + * @summary TestReport query. */ module.exports.TestReportInstanceQuery = { - description: 'Get information about a single TestReport', - resolve: scopeInvariant(scopeOptions, testreportInstanceResolver), + description: 'Access information about a single TestReport', + resolve: scopeInvariant(scopeOptions, getTestReportInstance), type: TestReportSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/testreport/index.js b/src/resources/3_0_1/profiles/testreport/register.js similarity index 92% rename from src/resources/3_0_1/profiles/testreport/index.js rename to src/resources/3_0_1/profiles/testreport/register.js index 975ddac4..228bb4ca 100644 --- a/src/resources/3_0_1/profiles/testreport/index.js +++ b/src/resources/3_0_1/profiles/testreport/register.js @@ -1,15 +1,15 @@ +const { + TestReportCreateMutation, + TestReportUpdateMutation, + TestReportRemoveMutation, +} = require('./mutation'); + const { TestReportQuery, TestReportListQuery, TestReportInstanceQuery, } = require('./query'); -const { - TestReportCreateMutation, - TestReportUpdateMutation, - TestReportDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { TestReportCreate: TestReportCreateMutation, TestReportUpdate: TestReportUpdateMutation, - TestReportDelete: TestReportDeleteMutation, + TestReportRemove: TestReportRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'TestReport', path: '/3_0_1/TestReport/:id', query: TestReportInstanceQuery, diff --git a/src/resources/3_0_1/profiles/testreport/resolver.js b/src/resources/3_0_1/profiles/testreport/resolver.js index f6d4d455..3260283e 100644 --- a/src/resources/3_0_1/profiles/testreport/resolver.js +++ b/src/resources/3_0_1/profiles/testreport/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.testreportResolver + * @name exports.getTestReport * @static - * @summary TestReport Resolver. + * @summary TestReport resolver. */ -module.exports.testreportResolver = function testreportResolver( +module.exports.getTestReport = function getTestReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testreportListResolver + * @name exports.getTestReportList * @static - * @summary TestReport List Resolver. + * @summary TestReport list resolver. */ -module.exports.testreportListResolver = function testreportListResolver( +module.exports.getTestReportList = function getTestReportList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testreportInstanceResolver + * @name exports.getTestReportInstance * @static - * @summary TestReport Instance Resolver. + * @summary TestReport instance resolver. */ -module.exports.testreportInstanceResolver = function testreportInstanceResolver( +module.exports.getTestReportInstance = function getTestReportInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testreportCreateResolver + * @name exports.createTestReport * @static - * @summary TestReport Create Resolver. + * @summary Create TestReport resolver. */ -module.exports.testreportCreateResolver = function testreportCreateResolver( +module.exports.createTestReport = function createTestReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testreportUpdateResolver + * @name exports.updateTestReport * @static - * @summary TestReport Update Resolver. + * @summary Update TestReport resolver. */ -module.exports.testreportUpdateResolver = function testreportUpdateResolver( +module.exports.updateTestReport = function updateTestReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testreportDeleteResolver + * @name exports.removeTestReport * @static - * @summary TestReport Delete Resolver. + * @summary Remove TestReport resolver. */ -module.exports.testreportDeleteResolver = function testreportDeleteResolver( +module.exports.removeTestReport = function removeTestReport( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/testscript/mutation.js b/src/resources/3_0_1/profiles/testscript/mutation.js index f376ded0..ce962fd8 100644 --- a/src/resources/3_0_1/profiles/testscript/mutation.js +++ b/src/resources/3_0_1/profiles/testscript/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const TestScriptSchema = require('../../schemas/testscript.schema'); +const TestScriptSchema = require('../../schemas/testscript.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const TestScriptInput = require('../../inputs/testscript.input'); +const TestScriptInput = require('../../inputs/testscript.input.js'); -// Resolvers -const { - testscriptCreateResolver, - testscriptUpdateResolver, - testscriptDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createTestScript, + updateTestScript, + removeTestScript, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'TestScript', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a TestScript record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a TestScript record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.TestScriptCreateMutation - * @summary TestScriptCreate Mutation. + * @summary TestScriptCreate mutation. */ module.exports.TestScriptCreateMutation = { - args: WriteArgs, - description: 'Create a TestScript', - resolve: scopeInvariant(scopeOptions, testscriptCreateResolver), + description: 'Create a TestScript record', + resolve: scopeInvariant(scopeOptions, createTestScript), type: TestScriptSchema, + args: WriteArgs, }; /** * @name exports.TestScriptUpdateMutation - * @summary TestScriptUpdate Mutation. + * @summary TestScriptUpdate mutation. */ module.exports.TestScriptUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple TestScripts', - resolve: scopeInvariant(scopeOptions, testscriptUpdateResolver), + description: 'Update a TestScript record', + resolve: scopeInvariant(scopeOptions, updateTestScript), type: TestScriptSchema, + args: WriteArgs, }; /** - * @name exports.TestScriptDeleteMutation - * @summary TestScriptDelete Mutation. + * @name exports.TestScriptRemoveMutation + * @summary TestScriptRemove mutation. */ -module.exports.TestScriptDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single TestScript', - resolve: scopeInvariant(scopeOptions, testscriptDeleteResolver), +module.exports.TestScriptRemoveMutation = { + description: 'Remove a TestScript record', + resolve: scopeInvariant(scopeOptions, removeTestScript), type: TestScriptSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/testscript/query.js b/src/resources/3_0_1/profiles/testscript/query.js index 52b2b788..75a4152c 100644 --- a/src/resources/3_0_1/profiles/testscript/query.js +++ b/src/resources/3_0_1/profiles/testscript/query.js @@ -1,55 +1,60 @@ // Schemas -const TestScriptSchema = require('../../schemas/testscript.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const TestScriptSchema = require('../../schemas/testscript.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const TestScriptArgs = require('../../parameters/testscript.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const TestScriptArgs = require('../../parameters/testscript.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, TestScriptArgs); // Resolvers const { - testscriptResolver, - testscriptListResolver, - testscriptInstanceResolver, + getTestScript, + getTestScriptList, + getTestScriptInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'TestScript', action: 'read', - version: '3_0_1', }; /** * @name exports.TestScriptQuery - * @summary TestScript Query. + * @summary TestScript query. */ module.exports.TestScriptQuery = { - args: Object.assign({}, CommonArgs, TestScriptArgs), description: 'Query for a single TestScript', - resolve: scopeInvariant(scopeOptions, testscriptResolver), + resolve: scopeInvariant(scopeOptions, getTestScript), type: TestScriptSchema, + args: args, }; /** * @name exports.TestScriptListQuery - * @summary TestScriptList Query. + * @summary TestScript query. */ module.exports.TestScriptListQuery = { - args: Object.assign({}, CommonArgs, TestScriptArgs), - description: 'Query for multiple TestScripts', - resolve: scopeInvariant(scopeOptions, testscriptListResolver), + description: 'Query for a more than or just one TestScript', + resolve: scopeInvariant(scopeOptions, getTestScriptList), type: BundleSchema, + args: args, }; /** * @name exports.TestScriptInstanceQuery - * @summary TestScriptInstance Query. + * @summary TestScript query. */ module.exports.TestScriptInstanceQuery = { - description: 'Get information about a single TestScript', - resolve: scopeInvariant(scopeOptions, testscriptInstanceResolver), + description: 'Access information about a single TestScript', + resolve: scopeInvariant(scopeOptions, getTestScriptInstance), type: TestScriptSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/testscript/index.js b/src/resources/3_0_1/profiles/testscript/register.js similarity index 92% rename from src/resources/3_0_1/profiles/testscript/index.js rename to src/resources/3_0_1/profiles/testscript/register.js index f35a8687..6c072a4d 100644 --- a/src/resources/3_0_1/profiles/testscript/index.js +++ b/src/resources/3_0_1/profiles/testscript/register.js @@ -1,15 +1,15 @@ +const { + TestScriptCreateMutation, + TestScriptUpdateMutation, + TestScriptRemoveMutation, +} = require('./mutation'); + const { TestScriptQuery, TestScriptListQuery, TestScriptInstanceQuery, } = require('./query'); -const { - TestScriptCreateMutation, - TestScriptUpdateMutation, - TestScriptDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { TestScriptCreate: TestScriptCreateMutation, TestScriptUpdate: TestScriptUpdateMutation, - TestScriptDelete: TestScriptDeleteMutation, + TestScriptRemove: TestScriptRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'TestScript', path: '/3_0_1/TestScript/:id', query: TestScriptInstanceQuery, diff --git a/src/resources/3_0_1/profiles/testscript/resolver.js b/src/resources/3_0_1/profiles/testscript/resolver.js index ef59e7f0..10514345 100644 --- a/src/resources/3_0_1/profiles/testscript/resolver.js +++ b/src/resources/3_0_1/profiles/testscript/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.testscriptResolver + * @name exports.getTestScript * @static - * @summary TestScript Resolver. + * @summary TestScript resolver. */ -module.exports.testscriptResolver = function testscriptResolver( +module.exports.getTestScript = function getTestScript( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptListResolver + * @name exports.getTestScriptList * @static - * @summary TestScript List Resolver. + * @summary TestScript list resolver. */ -module.exports.testscriptListResolver = function testscriptListResolver( +module.exports.getTestScriptList = function getTestScriptList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptInstanceResolver + * @name exports.getTestScriptInstance * @static - * @summary TestScript Instance Resolver. + * @summary TestScript instance resolver. */ -module.exports.testscriptInstanceResolver = function testscriptInstanceResolver( +module.exports.getTestScriptInstance = function getTestScriptInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptCreateResolver + * @name exports.createTestScript * @static - * @summary TestScript Create Resolver. + * @summary Create TestScript resolver. */ -module.exports.testscriptCreateResolver = function testscriptCreateResolver( +module.exports.createTestScript = function createTestScript( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptUpdateResolver + * @name exports.updateTestScript * @static - * @summary TestScript Update Resolver. + * @summary Update TestScript resolver. */ -module.exports.testscriptUpdateResolver = function testscriptUpdateResolver( +module.exports.updateTestScript = function updateTestScript( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.testscriptDeleteResolver + * @name exports.removeTestScript * @static - * @summary TestScript Delete Resolver. + * @summary Remove TestScript resolver. */ -module.exports.testscriptDeleteResolver = function testscriptDeleteResolver( +module.exports.removeTestScript = function removeTestScript( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/valueset/mutation.js b/src/resources/3_0_1/profiles/valueset/mutation.js index c2a3d797..bec4ef6f 100644 --- a/src/resources/3_0_1/profiles/valueset/mutation.js +++ b/src/resources/3_0_1/profiles/valueset/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const ValueSetSchema = require('../../schemas/valueset.schema'); +const ValueSetSchema = require('../../schemas/valueset.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const ValueSetInput = require('../../inputs/valueset.input'); +const ValueSetInput = require('../../inputs/valueset.input.js'); -// Resolvers -const { - valuesetCreateResolver, - valuesetUpdateResolver, - valuesetDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createValueSet, + updateValueSet, + removeValueSet, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ValueSet', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a ValueSet record.', }, resource: { @@ -39,7 +40,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a ValueSet record for deletion.', }, @@ -47,33 +48,33 @@ let DeleteArgs = { /** * @name exports.ValueSetCreateMutation - * @summary ValueSetCreate Mutation. + * @summary ValueSetCreate mutation. */ module.exports.ValueSetCreateMutation = { - args: WriteArgs, - description: 'Create a ValueSet', - resolve: scopeInvariant(scopeOptions, valuesetCreateResolver), + description: 'Create a ValueSet record', + resolve: scopeInvariant(scopeOptions, createValueSet), type: ValueSetSchema, + args: WriteArgs, }; /** * @name exports.ValueSetUpdateMutation - * @summary ValueSetUpdate Mutation. + * @summary ValueSetUpdate mutation. */ module.exports.ValueSetUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple ValueSets', - resolve: scopeInvariant(scopeOptions, valuesetUpdateResolver), + description: 'Update a ValueSet record', + resolve: scopeInvariant(scopeOptions, updateValueSet), type: ValueSetSchema, + args: WriteArgs, }; /** - * @name exports.ValueSetDeleteMutation - * @summary ValueSetDelete Mutation. + * @name exports.ValueSetRemoveMutation + * @summary ValueSetRemove mutation. */ -module.exports.ValueSetDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single ValueSet', - resolve: scopeInvariant(scopeOptions, valuesetDeleteResolver), +module.exports.ValueSetRemoveMutation = { + description: 'Remove a ValueSet record', + resolve: scopeInvariant(scopeOptions, removeValueSet), type: ValueSetSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/valueset/query.js b/src/resources/3_0_1/profiles/valueset/query.js index 3802ff34..08fa9e6b 100644 --- a/src/resources/3_0_1/profiles/valueset/query.js +++ b/src/resources/3_0_1/profiles/valueset/query.js @@ -1,55 +1,60 @@ // Schemas -const ValueSetSchema = require('../../schemas/valueset.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ValueSetSchema = require('../../schemas/valueset.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const ValueSetArgs = require('../../parameters/valueset.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const ValueSetArgs = require('../../parameters/valueset.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ValueSetArgs); // Resolvers const { - valuesetResolver, - valuesetListResolver, - valuesetInstanceResolver, + getValueSet, + getValueSetList, + getValueSetInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'ValueSet', action: 'read', - version: '3_0_1', }; /** * @name exports.ValueSetQuery - * @summary ValueSet Query. + * @summary ValueSet query. */ module.exports.ValueSetQuery = { - args: Object.assign({}, CommonArgs, ValueSetArgs), description: 'Query for a single ValueSet', - resolve: scopeInvariant(scopeOptions, valuesetResolver), + resolve: scopeInvariant(scopeOptions, getValueSet), type: ValueSetSchema, + args: args, }; /** * @name exports.ValueSetListQuery - * @summary ValueSetList Query. + * @summary ValueSet query. */ module.exports.ValueSetListQuery = { - args: Object.assign({}, CommonArgs, ValueSetArgs), - description: 'Query for multiple ValueSets', - resolve: scopeInvariant(scopeOptions, valuesetListResolver), + description: 'Query for a more than or just one ValueSet', + resolve: scopeInvariant(scopeOptions, getValueSetList), type: BundleSchema, + args: args, }; /** * @name exports.ValueSetInstanceQuery - * @summary ValueSetInstance Query. + * @summary ValueSet query. */ module.exports.ValueSetInstanceQuery = { - description: 'Get information about a single ValueSet', - resolve: scopeInvariant(scopeOptions, valuesetInstanceResolver), + description: 'Access information about a single ValueSet', + resolve: scopeInvariant(scopeOptions, getValueSetInstance), type: ValueSetSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/valueset/index.js b/src/resources/3_0_1/profiles/valueset/register.js similarity index 92% rename from src/resources/3_0_1/profiles/valueset/index.js rename to src/resources/3_0_1/profiles/valueset/register.js index f3474519..293e6733 100644 --- a/src/resources/3_0_1/profiles/valueset/index.js +++ b/src/resources/3_0_1/profiles/valueset/register.js @@ -1,15 +1,15 @@ +const { + ValueSetCreateMutation, + ValueSetUpdateMutation, + ValueSetRemoveMutation, +} = require('./mutation'); + const { ValueSetQuery, ValueSetListQuery, ValueSetInstanceQuery, } = require('./query'); -const { - ValueSetCreateMutation, - ValueSetUpdateMutation, - ValueSetDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { ValueSetCreate: ValueSetCreateMutation, ValueSetUpdate: ValueSetUpdateMutation, - ValueSetDelete: ValueSetDeleteMutation, + ValueSetRemove: ValueSetRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'ValueSet', path: '/3_0_1/ValueSet/:id', query: ValueSetInstanceQuery, diff --git a/src/resources/3_0_1/profiles/valueset/resolver.js b/src/resources/3_0_1/profiles/valueset/resolver.js index 00e62350..bda77ba5 100644 --- a/src/resources/3_0_1/profiles/valueset/resolver.js +++ b/src/resources/3_0_1/profiles/valueset/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.valuesetResolver + * @name exports.getValueSet * @static - * @summary ValueSet Resolver. + * @summary ValueSet resolver. */ -module.exports.valuesetResolver = function valuesetResolver( +module.exports.getValueSet = function getValueSet( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetListResolver + * @name exports.getValueSetList * @static - * @summary ValueSet List Resolver. + * @summary ValueSet list resolver. */ -module.exports.valuesetListResolver = function valuesetListResolver( +module.exports.getValueSetList = function getValueSetList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetInstanceResolver + * @name exports.getValueSetInstance * @static - * @summary ValueSet Instance Resolver. + * @summary ValueSet instance resolver. */ -module.exports.valuesetInstanceResolver = function valuesetInstanceResolver( +module.exports.getValueSetInstance = function getValueSetInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetCreateResolver + * @name exports.createValueSet * @static - * @summary ValueSet Create Resolver. + * @summary Create ValueSet resolver. */ -module.exports.valuesetCreateResolver = function valuesetCreateResolver( +module.exports.createValueSet = function createValueSet( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetUpdateResolver + * @name exports.updateValueSet * @static - * @summary ValueSet Update Resolver. + * @summary Update ValueSet resolver. */ -module.exports.valuesetUpdateResolver = function valuesetUpdateResolver( +module.exports.updateValueSet = function updateValueSet( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.valuesetDeleteResolver + * @name exports.removeValueSet * @static - * @summary ValueSet Delete Resolver. + * @summary Remove ValueSet resolver. */ -module.exports.valuesetDeleteResolver = function valuesetDeleteResolver( +module.exports.removeValueSet = function removeValueSet( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/profiles/visionprescription/mutation.js b/src/resources/3_0_1/profiles/visionprescription/mutation.js index ed18649a..202c8d04 100644 --- a/src/resources/3_0_1/profiles/visionprescription/mutation.js +++ b/src/resources/3_0_1/profiles/visionprescription/mutation.js @@ -1,34 +1,35 @@ -// Scalars -const IdScalar = require('../../scalars/id.scalar'); - // Schemas -const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema'); +const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); // Inputs -const VisionPrescriptionInput = require('../../inputs/visionprescription.input'); +const VisionPrescriptionInput = require('../../inputs/visionprescription.input.js'); -// Resolvers -const { - visionprescriptionCreateResolver, - visionprescriptionUpdateResolver, - visionprescriptionDeleteResolver, -} = require('./resolver'); +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); // GraphQL const { GraphQLNonNull } = require('graphql'); +// Resolvers +const { + createVisionPrescription, + updateVisionPrescription, + removeVisionPrescription, +} = require('./resolver'); + // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'VisionPrescription', action: 'write', - version: '3_0_1', }; let WriteArgs = { id: { - type: IdScalar, + type: idScalar, description: 'Unique identifier for creating/updating a VisionPrescription record.', }, @@ -40,7 +41,7 @@ let WriteArgs = { let DeleteArgs = { id: { - type: new GraphQLNonNull(IdScalar), + type: new GraphQLNonNull(idScalar), description: 'Unique identifier for selecting a VisionPrescription record for deletion.', }, @@ -48,33 +49,33 @@ let DeleteArgs = { /** * @name exports.VisionPrescriptionCreateMutation - * @summary VisionPrescriptionCreate Mutation. + * @summary VisionPrescriptionCreate mutation. */ module.exports.VisionPrescriptionCreateMutation = { - args: WriteArgs, - description: 'Create a VisionPrescription', - resolve: scopeInvariant(scopeOptions, visionprescriptionCreateResolver), + description: 'Create a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, createVisionPrescription), type: VisionPrescriptionSchema, + args: WriteArgs, }; /** * @name exports.VisionPrescriptionUpdateMutation - * @summary VisionPrescriptionUpdate Mutation. + * @summary VisionPrescriptionUpdate mutation. */ module.exports.VisionPrescriptionUpdateMutation = { - args: WriteArgs, - description: 'Query for multiple VisionPrescriptions', - resolve: scopeInvariant(scopeOptions, visionprescriptionUpdateResolver), + description: 'Update a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, updateVisionPrescription), type: VisionPrescriptionSchema, + args: WriteArgs, }; /** - * @name exports.VisionPrescriptionDeleteMutation - * @summary VisionPrescriptionDelete Mutation. + * @name exports.VisionPrescriptionRemoveMutation + * @summary VisionPrescriptionRemove mutation. */ -module.exports.VisionPrescriptionDeleteMutation = { - args: DeleteArgs, - description: 'Get information about a single VisionPrescription', - resolve: scopeInvariant(scopeOptions, visionprescriptionDeleteResolver), +module.exports.VisionPrescriptionRemoveMutation = { + description: 'Remove a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, removeVisionPrescription), type: VisionPrescriptionSchema, + args: DeleteArgs, }; diff --git a/src/resources/3_0_1/profiles/visionprescription/query.js b/src/resources/3_0_1/profiles/visionprescription/query.js index 2e95df56..31bf02ff 100644 --- a/src/resources/3_0_1/profiles/visionprescription/query.js +++ b/src/resources/3_0_1/profiles/visionprescription/query.js @@ -1,55 +1,65 @@ // Schemas -const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema'); -const BundleSchema = require('../../schemas/bundle.schema'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); // Arguments -const VisionPrescriptionArgs = require('../../parameters/visionprescription.parameters'); -const CommonArgs = require('../../parameters/common.parameters'); +const VisionPrescriptionArgs = require('../../parameters/visionprescription.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + VisionPrescriptionArgs, +); // Resolvers const { - visionprescriptionResolver, - visionprescriptionListResolver, - visionprescriptionInstanceResolver, + getVisionPrescription, + getVisionPrescriptionList, + getVisionPrescriptionInstance, } = require('./resolver'); // Scope Utilities -const { scopeInvariant } = require('../../../../utils/scope.utils'); +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); let scopeOptions = { + schema: OperationOutcome, name: 'VisionPrescription', action: 'read', - version: '3_0_1', }; /** * @name exports.VisionPrescriptionQuery - * @summary VisionPrescription Query. + * @summary VisionPrescription query. */ module.exports.VisionPrescriptionQuery = { - args: Object.assign({}, CommonArgs, VisionPrescriptionArgs), description: 'Query for a single VisionPrescription', - resolve: scopeInvariant(scopeOptions, visionprescriptionResolver), + resolve: scopeInvariant(scopeOptions, getVisionPrescription), type: VisionPrescriptionSchema, + args: args, }; /** * @name exports.VisionPrescriptionListQuery - * @summary VisionPrescriptionList Query. + * @summary VisionPrescription query. */ module.exports.VisionPrescriptionListQuery = { - args: Object.assign({}, CommonArgs, VisionPrescriptionArgs), - description: 'Query for multiple VisionPrescriptions', - resolve: scopeInvariant(scopeOptions, visionprescriptionListResolver), + description: 'Query for a more than or just one VisionPrescription', + resolve: scopeInvariant(scopeOptions, getVisionPrescriptionList), type: BundleSchema, + args: args, }; /** * @name exports.VisionPrescriptionInstanceQuery - * @summary VisionPrescriptionInstance Query. + * @summary VisionPrescription query. */ module.exports.VisionPrescriptionInstanceQuery = { - description: 'Get information about a single VisionPrescription', - resolve: scopeInvariant(scopeOptions, visionprescriptionInstanceResolver), + description: 'Access information about a single VisionPrescription', + resolve: scopeInvariant(scopeOptions, getVisionPrescriptionInstance), type: VisionPrescriptionSchema, + args: args, }; diff --git a/src/resources/3_0_1/profiles/visionprescription/index.js b/src/resources/3_0_1/profiles/visionprescription/register.js similarity index 91% rename from src/resources/3_0_1/profiles/visionprescription/index.js rename to src/resources/3_0_1/profiles/visionprescription/register.js index 4ee7cdf4..c69096e6 100644 --- a/src/resources/3_0_1/profiles/visionprescription/index.js +++ b/src/resources/3_0_1/profiles/visionprescription/register.js @@ -1,15 +1,15 @@ +const { + VisionPrescriptionCreateMutation, + VisionPrescriptionUpdateMutation, + VisionPrescriptionRemoveMutation, +} = require('./mutation'); + const { VisionPrescriptionQuery, VisionPrescriptionListQuery, VisionPrescriptionInstanceQuery, } = require('./query'); -const { - VisionPrescriptionCreateMutation, - VisionPrescriptionUpdateMutation, - VisionPrescriptionDeleteMutation, -} = require('./mutation'); - /** * @name exports * @static @@ -34,13 +34,13 @@ module.exports = { mutation: { VisionPrescriptionCreate: VisionPrescriptionCreateMutation, VisionPrescriptionUpdate: VisionPrescriptionUpdateMutation, - VisionPrescriptionDelete: VisionPrescriptionDeleteMutation, + VisionPrescriptionRemove: VisionPrescriptionRemoveMutation, }, /** * These properties are so the core router can setup the approriate endpoint * for a direct query against a resource */ - instance_query: { + instance: { name: 'VisionPrescription', path: '/3_0_1/VisionPrescription/:id', query: VisionPrescriptionInstanceQuery, diff --git a/src/resources/3_0_1/profiles/visionprescription/resolver.js b/src/resources/3_0_1/profiles/visionprescription/resolver.js index da19cafd..af219e37 100644 --- a/src/resources/3_0_1/profiles/visionprescription/resolver.js +++ b/src/resources/3_0_1/profiles/visionprescription/resolver.js @@ -1,91 +1,89 @@ -const errorUtils = require('../../../../utils/error.utils'); - /** - * @name exports.visionprescriptionResolver + * @name exports.getVisionPrescription * @static - * @summary VisionPrescription Resolver. + * @summary VisionPrescription resolver. */ -module.exports.visionprescriptionResolver = function visionprescriptionResolver( +module.exports.getVisionPrescription = function getVisionPrescription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionListResolver + * @name exports.getVisionPrescriptionList * @static - * @summary VisionPrescription List Resolver. + * @summary VisionPrescription list resolver. */ -module.exports.visionprescriptionListResolver = function visionprescriptionListResolver( +module.exports.getVisionPrescriptionList = function getVisionPrescriptionList( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionInstanceResolver + * @name exports.getVisionPrescriptionInstance * @static - * @summary VisionPrescription Instance Resolver. + * @summary VisionPrescription instance resolver. */ -module.exports.visionprescriptionInstanceResolver = function visionprescriptionInstanceResolver( +module.exports.getVisionPrescriptionInstance = function getVisionPrescriptionInstance( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionCreateResolver + * @name exports.createVisionPrescription * @static - * @summary VisionPrescription Create Resolver. + * @summary Create VisionPrescription resolver. */ -module.exports.visionprescriptionCreateResolver = function visionprescriptionCreateResolver( +module.exports.createVisionPrescription = function createVisionPrescription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionUpdateResolver + * @name exports.updateVisionPrescription * @static - * @summary VisionPrescription Update Resolver. + * @summary Update VisionPrescription resolver. */ -module.exports.visionprescriptionUpdateResolver = function visionprescriptionUpdateResolver( +module.exports.updateVisionPrescription = function updateVisionPrescription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; /** - * @name exports.visionprescriptionDeleteResolver + * @name exports.removeVisionPrescription * @static - * @summary VisionPrescription Delete Resolver. + * @summary Remove VisionPrescription resolver. */ -module.exports.visionprescriptionDeleteResolver = function visionprescriptionDeleteResolver( +module.exports.removeVisionPrescription = function removeVisionPrescription( root, args, - context, + context = {}, info, ) { - let { server, req, res, version } = context; + let { server, version, req, res } = context; return {}; }; diff --git a/src/resources/3_0_1/scalars/base64.scalar.js b/src/resources/3_0_1/scalars/base64.scalar.js deleted file mode 100644 index aabfcd1f..00000000 --- a/src/resources/3_0_1/scalars/base64.scalar.js +++ /dev/null @@ -1,35 +0,0 @@ -const { GraphQLScalarType } = require('graphql'); -const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const validator = require('validator'); -const xss = require('xss'); - -const parse = (value, ast) => { - let sanitized_value = validator.stripLow(xss(sanitize(value))); - if ( - !validator.isBase64(sanitized_value) || - !validator.isHash(sanitized_value, 'sha1') - ) { - return new GraphQLError( - 'Invalid value provided to Base64Scalar. String must be a valid base64 or sha1 encoded string.', - ); - } - return sanitized_value; -}; - -/** - * @name exports - * @summary Base64 Scalar, should be a string value - */ -module.exports = new GraphQLScalarType({ - name: 'Base64Scalar', - description: - 'Base StructureDefinition for base64Binary Type: A stream of bytes.', - serialize: value => validator.stripLow(xss(sanitize(value))), - // parseValue is required since we are specifying a parseLiteral function - parseValue: (value, ast) => parse(value, ast), - parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); - }, -}); diff --git a/src/resources/3_0_1/scalars/base64binary.scalar.js b/src/resources/3_0_1/scalars/base64binary.scalar.js index 987cd741..50474788 100644 --- a/src/resources/3_0_1/scalars/base64binary.scalar.js +++ b/src/resources/3_0_1/scalars/base64binary.scalar.js @@ -4,20 +4,19 @@ const { Kind } = require('graphql/language'); /** * @name exports - * @summary base64binary Scalar + * @summary base64Binary scalar */ module.exports = new GraphQLScalarType({ - name: 'base64binary', + name: 'base64Binary', description: - 'Base StructureDefinition for base64Binary Type: A stream of bytes.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for base64Binary Type: A stream of bytes', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { let { kind, value } = ast; return kind === Kind.STRING ? value : undefined; diff --git a/src/resources/3_0_1/scalars/boolean.scalar.js b/src/resources/3_0_1/scalars/boolean.scalar.js new file mode 100644 index 00000000..ae43c6a7 --- /dev/null +++ b/src/resources/3_0_1/scalars/boolean.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary boolean scalar + */ +module.exports = new GraphQLScalarType({ + name: 'boolean', + description: + "Base StructureDefinition for boolean Type: Value of 'true' or 'false'", + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/3_0_1/scalars/code.scalar.js b/src/resources/3_0_1/scalars/code.scalar.js index b7e0859a..9c228835 100644 --- a/src/resources/3_0_1/scalars/code.scalar.js +++ b/src/resources/3_0_1/scalars/code.scalar.js @@ -4,20 +4,19 @@ const { Kind } = require('graphql/language'); /** * @name exports - * @summary code Scalar + * @summary code scalar */ module.exports = new GraphQLScalarType({ name: 'code', description: - 'Base StructureDefinition for code type: A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for code type: A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { let { kind, value } = ast; return kind === Kind.STRING ? value : undefined; diff --git a/src/resources/3_0_1/scalars/date.scalar.js b/src/resources/3_0_1/scalars/date.scalar.js index 69d0454e..75c5ccb5 100644 --- a/src/resources/3_0_1/scalars/date.scalar.js +++ b/src/resources/3_0_1/scalars/date.scalar.js @@ -1,44 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const moment = require('moment-timezone'); -const xss = require('xss'); - -const { resolve } = require('../../../utils/resolve.utils'); -const { DATE_CONFIG } = require(resolve('config')); - -const parse = (value, ast) => { - /* date pattern was simplified from document specified pattern of: - /-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?/ - The day portion of the date is optional. ie 2018-12 or 2018-12-01 are both valid */ - let date_pattern = /^[12]\d{3}-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01]))?$/; - let sanitized_value = xss(sanitize(value)).trim(); - let is_date = date_pattern.test(sanitized_value); - return is_date - ? moment(sanitized_value).format(DATE_CONFIG.dateFormat) - : new GraphQLError( - `Invalid date provided to DateScalar. Format should be ${ - DATE_CONFIG.dateFormat - }`, - ); -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary date Scalar + * @summary date scalar */ module.exports = new GraphQLScalarType({ name: 'date', description: 'Base StructureDefinition for date Type: A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates.', - // TODO: Implement proper serialization here + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/3_0_1/scalars/date.scalar.test.js b/src/resources/3_0_1/scalars/date.scalar.test.js deleted file mode 100644 index 78c79a8b..00000000 --- a/src/resources/3_0_1/scalars/date.scalar.test.js +++ /dev/null @@ -1,50 +0,0 @@ -const DateScalar = require('./date.scalar'); -const { GraphQLError } = require('graphql'); - -describe('Date Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid date', () => { - expect(DateScalar.parseLiteral({ value: '2018-12' })).toEqual( - '2018-12-01', - ); - expect(DateScalar.parseLiteral({ value: '2018-12-31' })).toEqual( - '2018-12-31', - ); - }); - test('should return error', () => { - expect(DateScalar.parseLiteral({ value: '2018-13' })).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseLiteral({ value: '2018-00' })).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseLiteral({ value: '2018-12-32' })).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseLiteral({ value: '2018-12-00' })).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseLiteral({ value: 20292920 })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return valid date', () => { - expect(DateScalar.parseValue('2018-12', {})).toEqual('2018-12-01'); - expect(DateScalar.parseValue('2018-12-31', {})).toEqual('2018-12-31'); - }); - test('should return error', () => { - expect(DateScalar.parseValue('2018-13', {})).toBeInstanceOf(GraphQLError); - expect(DateScalar.parseValue('2018-00', {})).toBeInstanceOf(GraphQLError); - expect(DateScalar.parseValue('2018-12-32', {})).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseValue('2018-12-00', {})).toBeInstanceOf( - GraphQLError, - ); - expect(DateScalar.parseValue(392929239, {})).toBeInstanceOf(GraphQLError); - }); - }); -}); diff --git a/src/resources/3_0_1/scalars/datetime.scalar.js b/src/resources/3_0_1/scalars/datetime.scalar.js index 673c5166..3beb1940 100644 --- a/src/resources/3_0_1/scalars/datetime.scalar.js +++ b/src/resources/3_0_1/scalars/datetime.scalar.js @@ -1,47 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const moment = require('moment-timezone'); -const xss = require('xss'); - -const { resolve } = require('../../../utils/resolve.utils'); -const { DATE_CONFIG } = require(resolve('config')); - -const parse = (value, ast) => { - /* date pattern was simplified from document specified pattern of: - /-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?/ - The day portion of the date is optional. If hours and minutes are - specified, a time zone SHALL be populated. Seconds must be provided - due to schema type constraints but may be zero-filled and may be - ignored. Dates SHALL be valid dates. The time "24:00" is not allowed */ - let date_pattern = /^[12]\d{3}-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?$/; - let sanitized_value = xss(sanitize(value)); - let is_date = date_pattern.test(sanitized_value); - return is_date - ? moment.parseZone(sanitized_value).format(DATE_CONFIG.dateTimeFormat) - : new GraphQLError( - `Invalid dateTime provided to DateTimeScalar. Format should be ${ - DATE_CONFIG.dateTimeFormat - } and date's missing time will be filled with 0's.`, - ); -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary datetime Scalar + * @summary dateTime scalar */ module.exports = new GraphQLScalarType({ - name: 'datetime', + name: 'dateTime', description: 'Base StructureDefinition for dateTime Type: A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates.', - // TODO: Implement proper serialization here + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/3_0_1/scalars/datetime.scalar.test.js b/src/resources/3_0_1/scalars/datetime.scalar.test.js deleted file mode 100644 index 5336ab18..00000000 --- a/src/resources/3_0_1/scalars/datetime.scalar.test.js +++ /dev/null @@ -1,102 +0,0 @@ -const DatetimeScalar = require('./datetime.scalar'); -const { GraphQLError } = require('graphql'); - -describe('Date Time Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid date time', () => { - expect(DatetimeScalar.parseLiteral({ value: '2018-12-31' })).toEqual( - '2018-12-31T00:00:00.0000+00:00', - ); - expect(DatetimeScalar.parseLiteral({ value: '2018-12' })).toEqual( - '2018-12-01T00:00:00.0000+00:00', - ); - expect( - DatetimeScalar.parseLiteral({ - value: '2018-12-01T01:01:02.0000-05:00', - }), - ).toEqual('2018-12-01T01:01:02.0000-05:00'); - expect( - DatetimeScalar.parseLiteral({ - value: '2018-12-01T00:00:00.0000-05:00', - }), - ).toEqual('2018-12-01T00:00:00.0000-05:00'); - }); - test('should return error', () => { - expect( - DatetimeScalar.parseLiteral({ - value: '2018-12-31T24:00:00.0000-05:00', - }), - ).toBeInstanceOf(GraphQLError); - expect(DatetimeScalar.parseLiteral({ value: '2018-00' })).toBeInstanceOf( - GraphQLError, - ); - expect( - DatetimeScalar.parseLiteral({ value: '2018-12-32' }), - ).toBeInstanceOf(GraphQLError); - expect( - DatetimeScalar.parseLiteral({ value: '2018-12-00' }), - ).toBeInstanceOf(GraphQLError); - expect( - DatetimeScalar.parseLiteral({ - value: '2018-12-31T00:60:00.0000-05:00', - }), - ).toBeInstanceOf(GraphQLError); - expect( - DatetimeScalar.parseLiteral({ - value: '2018-12-31T01:01:60.0000-05:00', - }), - ).toBeInstanceOf(GraphQLError); - expect( - DatetimeScalar.parseLiteral({ - value: '2018-13-31T00:00:00.0000-05:00', - }), - ).toBeInstanceOf(GraphQLError); - expect(DatetimeScalar.parseLiteral({ value: 20292920 })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return valid date time', () => { - expect(DatetimeScalar.parseValue('2018-12-31', {})).toEqual( - '2018-12-31T00:00:00.0000+00:00', - ); - expect(DatetimeScalar.parseValue('2018-12', {})).toEqual( - '2018-12-01T00:00:00.0000+00:00', - ); - expect( - DatetimeScalar.parseValue('2018-12-01T01:01:02.0000-05:00', {}), - ).toEqual('2018-12-01T01:01:02.0000-05:00'); - expect( - DatetimeScalar.parseValue('2018-12-01T00:00:00.0000-05:00', {}), - ).toEqual('2018-12-01T00:00:00.0000-05:00'); - }); - test('should return error', () => { - expect( - DatetimeScalar.parseValue('2018-12-31T24:00:00.0000-05:00', {}), - ).toBeInstanceOf(GraphQLError); - expect(DatetimeScalar.parseValue('2018-00', {})).toBeInstanceOf( - GraphQLError, - ); - expect(DatetimeScalar.parseValue('2018-12-32', {})).toBeInstanceOf( - GraphQLError, - ); - expect(DatetimeScalar.parseValue('2018-12-00', {})).toBeInstanceOf( - GraphQLError, - ); - expect( - DatetimeScalar.parseValue('2018-12-31T00:60:00.0000-05:00', {}), - ).toBeInstanceOf(GraphQLError); - expect( - DatetimeScalar.parseValue('2018-12-31T01:01:60.0000-05:00', {}), - ).toBeInstanceOf(GraphQLError); - expect( - DatetimeScalar.parseValue('2018-13-31T00:00:00.0000-05:00', {}), - ).toBeInstanceOf(GraphQLError); - expect(DatetimeScalar.parseValue(20292920, {})).toBeInstanceOf( - GraphQLError, - ); - }); - }); -}); diff --git a/src/resources/3_0_1/scalars/decimal.scalar.js b/src/resources/3_0_1/scalars/decimal.scalar.js new file mode 100644 index 00000000..cc7d0e77 --- /dev/null +++ b/src/resources/3_0_1/scalars/decimal.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary decimal scalar + */ +module.exports = new GraphQLScalarType({ + name: 'decimal', + description: + 'Base StructureDefinition for decimal Type: A rational number with implicit precision', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/3_0_1/scalars/id.scalar.js b/src/resources/3_0_1/scalars/id.scalar.js index f20b750e..cd66d8f5 100644 --- a/src/resources/3_0_1/scalars/id.scalar.js +++ b/src/resources/3_0_1/scalars/id.scalar.js @@ -1,21 +1,24 @@ const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); /** * @name exports - * @summary id Scalar + * @summary id scalar */ module.exports = new GraphQLScalarType({ name: 'id', description: "Base StructureDefinition for id type: Any combination of letters, numerals, '-' and '.', with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.", - // TODO: Implement proper serialization here + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => value, - // TODO: Implement proper parsing and sanitization here - parseLiteral: ast => { - let { value } = ast; + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { return value; }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, }); diff --git a/src/resources/3_0_1/scalars/instant.scalar.js b/src/resources/3_0_1/scalars/instant.scalar.js index c54988ac..579195b9 100644 --- a/src/resources/3_0_1/scalars/instant.scalar.js +++ b/src/resources/3_0_1/scalars/instant.scalar.js @@ -1,21 +1,24 @@ const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); /** * @name exports - * @summary instant Scalar + * @summary instant scalar */ module.exports = new GraphQLScalarType({ name: 'instant', description: - 'Base StructureDefinition for instant Type: An instant in time - known at least to the second.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for instant Type: An instant in time - known at least to the second', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => value, - // TODO: Implement proper parsing and sanitization here - parseLiteral: ast => { - let { value } = ast; + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { return value; }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, }); diff --git a/src/resources/3_0_1/scalars/integer.scalar.js b/src/resources/3_0_1/scalars/integer.scalar.js new file mode 100644 index 00000000..4e67eb06 --- /dev/null +++ b/src/resources/3_0_1/scalars/integer.scalar.js @@ -0,0 +1,23 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary integer scalar + */ +module.exports = new GraphQLScalarType({ + name: 'integer', + description: 'Base StructureDefinition for integer Type: A whole number', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/3_0_1/scalars/markdown.scalar.js b/src/resources/3_0_1/scalars/markdown.scalar.js new file mode 100644 index 00000000..666243ad --- /dev/null +++ b/src/resources/3_0_1/scalars/markdown.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary markdown scalar + */ +module.exports = new GraphQLScalarType({ + name: 'markdown', + description: + 'Base StructureDefinition for markdown type: A string that may contain markdown syntax for optional processing by a mark down presentation engine', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/3_0_1/scalars/oid.scalar.js b/src/resources/3_0_1/scalars/oid.scalar.js index 019e927e..ae24c28b 100644 --- a/src/resources/3_0_1/scalars/oid.scalar.js +++ b/src/resources/3_0_1/scalars/oid.scalar.js @@ -1,36 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const xss = require('xss'); -const validator = require('validator'); - -const parse = (value, ast) => { - let pattern = /^urn:oid:[0-2](\.[1-9]\d*)+/; - let sanitized_value = validator.stripLow(xss(sanitize(value)).trim()); - let is_oid = pattern.test(sanitized_value); - return is_oid - ? sanitized_value - : new GraphQLError( - "Invalid value provided to OID Scalar. An OID must begin with 'urn:oid:' and is a uri not an id. See http://hl7.org/fhir/datatypes.html for a description on oid under uri.", - ); -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary oid Scalar + * @summary oid scalar */ module.exports = new GraphQLScalarType({ name: 'oid', description: - 'Base StructureDefinition for oid type: An OID represented as a URI.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for oid type: An OID represented as a URI', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/3_0_1/scalars/oid.scalar.test.js b/src/resources/3_0_1/scalars/oid.scalar.test.js deleted file mode 100644 index 564ecebe..00000000 --- a/src/resources/3_0_1/scalars/oid.scalar.test.js +++ /dev/null @@ -1,42 +0,0 @@ -const OidScalar = require('./oid.scalar'); -const { GraphQLError } = require('graphql'); - -describe('OID Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid OID', () => { - expect(OidScalar.parseLiteral({ value: 'urn:oid:1.2.3.4.5' })).toEqual( - 'urn:oid:1.2.3.4.5', - ); - }); - test('should return error', () => { - expect( - OidScalar.parseLiteral({ value: 'urn:oids:1.2.3.4.5' }), - ).toBeInstanceOf(GraphQLError); - expect( - OidScalar.parseLiteral({ value: 'urns:oid:1.2.3.4.5' }), - ).toBeInstanceOf(GraphQLError); - expect(OidScalar.parseLiteral({ value: 'oid:1.2.3.4.5' })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return valid OID', () => { - expect(OidScalar.parseValue('urn:oid:1.2.3.4.5', {})).toEqual( - 'urn:oid:1.2.3.4.5', - ); - }); - test('should return error', () => { - expect(OidScalar.parseLiteral('urn:oids:1.2.3.4.5', {})).toBeInstanceOf( - GraphQLError, - ); - expect(OidScalar.parseLiteral('urns:oid:1.2.3.4.5', {})).toBeInstanceOf( - GraphQLError, - ); - expect(OidScalar.parseLiteral('oid:1.2.3.4.5', {})).toBeInstanceOf( - GraphQLError, - ); - }); - }); -}); diff --git a/src/resources/3_0_1/scalars/positiveint.scalar.js b/src/resources/3_0_1/scalars/positiveint.scalar.js index 66c95e88..b32b429c 100644 --- a/src/resources/3_0_1/scalars/positiveint.scalar.js +++ b/src/resources/3_0_1/scalars/positiveint.scalar.js @@ -1,37 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const validator = require('validator'); - -const parse = (value, ast) => { - try { - return validator.isInt(value, { min: 1, max: Number.MAX_SAFE_INTEGER }) - ? validator.toInt(value, 10) - : new GraphQLError( - 'Invalid value provided to positiveInt. String Int must be > 0.', - ); - } catch (e) { - return new GraphQLError( - 'Unsupported type value provided to positiveInt. String Int must be > 0.', - ); - } -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary positiveint Scalar + * @summary positiveInt scalar */ module.exports = new GraphQLScalarType({ - name: 'positiveint', + name: 'positiveInt', description: - 'Base StructureDefinition for positiveInt type: An integer with a value that is positive (e.g. >0).', - // TODO: Implement proper serialization here + 'Base StructureDefinition for positiveInt type: An integer with a value that is positive (e.g. >0)', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/3_0_1/scalars/positiveint.scalar.test.js b/src/resources/3_0_1/scalars/positiveint.scalar.test.js deleted file mode 100644 index 2ad9a4d1..00000000 --- a/src/resources/3_0_1/scalars/positiveint.scalar.test.js +++ /dev/null @@ -1,46 +0,0 @@ -const PositiveIntScalar = require('./positiveint.scalar'); -const { GraphQLError } = require('graphql'); - -describe('Positive Int Scalar Test', () => { - describe('parseLiteral', () => { - test('should return positive integers', () => { - expect(PositiveIntScalar.parseLiteral({ value: '1024' })).toEqual(1024); - expect( - PositiveIntScalar.parseLiteral({ - value: Number.MAX_SAFE_INTEGER.toString(), - }), - ).toEqual(Number.MAX_SAFE_INTEGER); - }); - test('should return error', () => { - expect(PositiveIntScalar.parseLiteral({ value: '0' })).toBeInstanceOf( - GraphQLError, - ); - expect(PositiveIntScalar.parseLiteral({ value: '-1' })).toBeInstanceOf( - GraphQLError, - ); - expect(PositiveIntScalar.parseLiteral({ value: 1024 })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return positive integers', () => { - expect(PositiveIntScalar.parseValue('1024', {})).toEqual(1024); - expect( - PositiveIntScalar.parseValue(Number.MAX_SAFE_INTEGER.toString(), {}), - ).toEqual(Number.MAX_SAFE_INTEGER); - }); - test('should return error', () => { - expect(PositiveIntScalar.parseValue('0', {})).toBeInstanceOf( - GraphQLError, - ); - expect(PositiveIntScalar.parseValue('-1', {})).toBeInstanceOf( - GraphQLError, - ); - expect(PositiveIntScalar.parseValue(1024, {})).toBeInstanceOf( - GraphQLError, - ); - }); - }); -}); diff --git a/src/resources/3_0_1/scalars/string.scalar.js b/src/resources/3_0_1/scalars/string.scalar.js new file mode 100644 index 00000000..f1175866 --- /dev/null +++ b/src/resources/3_0_1/scalars/string.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary string scalar + */ +module.exports = new GraphQLScalarType({ + name: 'string', + description: + 'Base StructureDefinition for string Type: A sequence of Unicode characters', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/3_0_1/scalars/time.scalar.js b/src/resources/3_0_1/scalars/time.scalar.js index 319c220b..3f4a8bfe 100644 --- a/src/resources/3_0_1/scalars/time.scalar.js +++ b/src/resources/3_0_1/scalars/time.scalar.js @@ -1,41 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const moment = require('moment-timezone'); -const xss = require('xss'); - -const { resolve } = require('../../../utils/resolve.utils'); -const { DATE_CONFIG } = require(resolve('config')); - -const parse = (value, ast) => { - let time_pattern = /([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/; - let sanitized_value = xss(sanitize(value)).trim(); - let is_time = time_pattern.test(sanitized_value); - return is_time - ? moment(sanitized_value, DATE_CONFIG.timeFormat).format( - DATE_CONFIG.timeFormat, - ) - : new GraphQLError( - `Invalid time provided to TimeScalar. Format should be ${DATE_CONFIG}`, - ); -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary time Scalar + * @summary time scalar */ module.exports = new GraphQLScalarType({ name: 'time', description: - 'Base StructureDefinition for time Type: A time during the day, with no date specified.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for time Type: A time during the day, with no date specified', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/3_0_1/scalars/time.scalar.test.js b/src/resources/3_0_1/scalars/time.scalar.test.js deleted file mode 100644 index abff4697..00000000 --- a/src/resources/3_0_1/scalars/time.scalar.test.js +++ /dev/null @@ -1,44 +0,0 @@ -const TimeScalar = require('./time.scalar'); -const { GraphQLError } = require('graphql'); - -describe('Time Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid time', () => { - expect(TimeScalar.parseLiteral({ value: '02:01:59' })).toEqual( - '02:01:59', - ); - expect(TimeScalar.parseLiteral({ value: '12:59:00' })).toEqual( - '12:59:00', - ); - }); - test('should return error', () => { - expect(TimeScalar.parseLiteral({ value: '24:00:00' })).toBeInstanceOf( - GraphQLError, - ); - expect(TimeScalar.parseLiteral({ value: '00:60:00' })).toBeInstanceOf( - GraphQLError, - ); - expect(TimeScalar.parseLiteral({ value: '01:01:60' })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return valid time', () => { - expect(TimeScalar.parseValue('02:01:59', {})).toEqual('02:01:59'); - expect(TimeScalar.parseValue('12:59:00', {})).toEqual('12:59:00'); - }); - test('should return error', () => { - expect(TimeScalar.parseValue('24:00:00', {})).toBeInstanceOf( - GraphQLError, - ); - expect(TimeScalar.parseValue('00:60:00', {})).toBeInstanceOf( - GraphQLError, - ); - expect(TimeScalar.parseValue('01:01:60', {})).toBeInstanceOf( - GraphQLError, - ); - }); - }); -}); diff --git a/src/resources/3_0_1/scalars/token.scalar.js b/src/resources/3_0_1/scalars/token.scalar.js index 8610ce4f..9d8c25a6 100644 --- a/src/resources/3_0_1/scalars/token.scalar.js +++ b/src/resources/3_0_1/scalars/token.scalar.js @@ -1,23 +1,23 @@ const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); /** * @name exports - * @summary token Scalar + * @summary token scalar */ module.exports = new GraphQLScalarType({ name: 'token', - description: - 'Base StructureDefinition for token Type: String of characters used to identify a name or a resource.', - // TODO: Implement proper serialization here + description: 'Base StructureDefinition for token type', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return value; + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/3_0_1/scalars/unsignedint.scalar.js b/src/resources/3_0_1/scalars/unsignedint.scalar.js index a471569d..b90da78c 100644 --- a/src/resources/3_0_1/scalars/unsignedint.scalar.js +++ b/src/resources/3_0_1/scalars/unsignedint.scalar.js @@ -1,37 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const validator = require('validator'); - -const parse = (value, ast) => { - try { - return validator.isInt(value, { min: 0, max: Number.MAX_SAFE_INTEGER }) - ? validator.toInt(value, 10) - : new GraphQLError( - 'Invalid value provided to UnsignedIntScalar. Int must be >= 0.', - ); - } catch (e) { - return new GraphQLError( - 'Unsupported type value provided to unsigned int. String Int must be >= 0.', - ); - } -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary unsignedint Scalar + * @summary unsignedInt scalar */ module.exports = new GraphQLScalarType({ - name: 'unsignedint', + name: 'unsignedInt', description: - 'Base StructureDefinition for unsignedInt type: An integer with a value that is not negative (e.g. >= 0).', - // TODO: Implement proper serialization here + 'Base StructureDefinition for unsignedInt type: An integer with a value that is not negative (e.g. >= 0)', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/3_0_1/scalars/unsignedint.scalar.test.js b/src/resources/3_0_1/scalars/unsignedint.scalar.test.js deleted file mode 100644 index 5c6442a9..00000000 --- a/src/resources/3_0_1/scalars/unsignedint.scalar.test.js +++ /dev/null @@ -1,42 +0,0 @@ -const UnsignedIntScalar = require('./unsignedint.scalar'); -const { GraphQLError } = require('graphql'); - -describe('Unsigned Int Scalar Test', () => { - describe('parseLiteral', () => { - test('should return unsigned integers', () => { - expect(UnsignedIntScalar.parseLiteral({ value: '0' })).toEqual(0); - expect(UnsignedIntScalar.parseLiteral({ value: '1024' })).toEqual(1024); - expect( - UnsignedIntScalar.parseLiteral({ - value: Number.MAX_SAFE_INTEGER.toString(), - }), - ).toEqual(Number.MAX_SAFE_INTEGER); - }); - test('should return error', () => { - expect(UnsignedIntScalar.parseLiteral({ value: '-1' })).toBeInstanceOf( - GraphQLError, - ); - expect(UnsignedIntScalar.parseLiteral({ value: 1024 })).toBeInstanceOf( - GraphQLError, - ); - }); - }); - - describe('parseValue', () => { - test('should return unsigned integers', () => { - expect(UnsignedIntScalar.parseValue('0', {})).toEqual(0); - expect(UnsignedIntScalar.parseValue('1024', {})).toEqual(1024); - expect( - UnsignedIntScalar.parseValue(Number.MAX_SAFE_INTEGER.toString(), {}), - ).toEqual(Number.MAX_SAFE_INTEGER); - }); - test('should return error', () => { - expect(UnsignedIntScalar.parseValue('-1', {})).toBeInstanceOf( - GraphQLError, - ); - expect(UnsignedIntScalar.parseValue(1024, {})).toBeInstanceOf( - GraphQLError, - ); - }); - }); -}); diff --git a/src/resources/3_0_1/scalars/uri.scalar.js b/src/resources/3_0_1/scalars/uri.scalar.js index c22b2522..43a6f136 100644 --- a/src/resources/3_0_1/scalars/uri.scalar.js +++ b/src/resources/3_0_1/scalars/uri.scalar.js @@ -4,20 +4,19 @@ const { Kind } = require('graphql/language'); /** * @name exports - * @summary uri Scalar + * @summary uri scalar */ module.exports = new GraphQLScalarType({ name: 'uri', description: - 'Base StructureDefinition for uri Type: String of characters used to identify a name or a resource.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for uri Type: String of characters used to identify a name or a resource', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { let { kind, value } = ast; return kind === Kind.STRING ? value : undefined; diff --git a/src/resources/3_0_1/scalars/uuid.scalar.js b/src/resources/3_0_1/scalars/uuid.scalar.js index cb4525f5..2fcca56d 100644 --- a/src/resources/3_0_1/scalars/uuid.scalar.js +++ b/src/resources/3_0_1/scalars/uuid.scalar.js @@ -1,36 +1,24 @@ const { GraphQLScalarType } = require('graphql'); const { GraphQLError } = require('graphql/error'); -const sanitize = require('sanitize-html'); -const xss = require('xss'); -const validator = require('validator'); - -const parse = (value, ast) => { - let pattern = /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/; - let sanitized_value = validator.stripLow(xss(sanitize(value)).trim()); - let is_uuid = pattern.test(sanitized_value); - return is_uuid - ? sanitized_value - : new GraphQLError( - "Invalid value provided to UuidScalar. A UUID must begin with 'urn:uuid:' and is a uri not an id. See http://hl7.org/fhir/datatypes.html for a description on uuid under uri.", - ); -}; +const { Kind } = require('graphql/language'); /** * @name exports - * @summary uuid Scalar + * @summary uuid scalar */ module.exports = new GraphQLScalarType({ name: 'uuid', description: - 'Base StructureDefinition for uuid type: A UUID, represented as a URI.', - // TODO: Implement proper serialization here + 'Base StructureDefinition for uuid type: A UUID, represented as a URI', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error - parseValue: (value, ast) => parse(value, ast), - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { - let { value } = ast; - return parse(value, ast); + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; }, }); diff --git a/src/resources/3_0_1/scalars/uuid.scalar.test.js b/src/resources/3_0_1/scalars/uuid.scalar.test.js deleted file mode 100644 index 17f3891b..00000000 --- a/src/resources/3_0_1/scalars/uuid.scalar.test.js +++ /dev/null @@ -1,95 +0,0 @@ -const UuidScalar = require('./uuid.scalar'); -const { GraphQLError } = require('graphql'); - -describe('UUID Scalar Test', () => { - describe('parseLiteral', () => { - test('should return valid UUID', () => { - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7', - }), - ).toEqual('urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7'); - }); - test('should return error', () => { - expect( - UuidScalar.parseLiteral({ - value: 'urns:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee1208', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fcbb-4ff8-8a-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fcbb-48-8a92-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fefa32-fb-4ff8-8a92-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral({ - value: 'urn:uuid:53fe2-fcbb-4ff8-8a92-55ee120877b7', - }), - ).toBeInstanceOf(GraphQLError); - }); - }); - - describe('parseValue', () => { - test('should return valid UUID', () => { - expect( - UuidScalar.parseValue( - 'urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7', - {}, - ), - ).toEqual('urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7'); - }); - test('should return error', () => { - expect( - UuidScalar.parseLiteral( - 'urns:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee1208', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fefa32-fcbb-4ff8-8a-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fefa32-fcbb-48-8a92-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fefa32-fb-4ff8-8a92-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - expect( - UuidScalar.parseLiteral( - 'urn:uuid:53fe2-fcbb-4ff8-8a92-55ee120877b7', - {}, - ), - ).toBeInstanceOf(GraphQLError); - }); - }); -}); diff --git a/src/resources/3_0_1/scalars/xhtml.scalar.js b/src/resources/3_0_1/scalars/xhtml.scalar.js index 1655716c..4a28133c 100644 --- a/src/resources/3_0_1/scalars/xhtml.scalar.js +++ b/src/resources/3_0_1/scalars/xhtml.scalar.js @@ -4,19 +4,18 @@ const { Kind } = require('graphql/language'); /** * @name exports - * @summary xhtml Scalar + * @summary xhtml scalar */ module.exports = new GraphQLScalarType({ name: 'xhtml', - description: 'Base StructureDefinition for xhtml Type.', - // TODO: Implement proper serialization here + description: 'Base StructureDefinition for xhtml Type', + // TODO: Implement serialization serialize: value => value, - // TODO: Implement proper parsing and sanitization here - // Throw a GraphQL Error if unable to parse or sanitize error + // TODO: Parse and sanitize here, throw a graphql error if things fail parseValue: (value, ast) => { return value; }, - // TODO: Implement proper parsing and sanitization here + // TODO: Parse and sanitize here as well, return undefined if unable to parse parseLiteral: ast => { let { kind, value } = ast; return kind === Kind.STRING ? value : undefined; diff --git a/src/resources/3_0_1/schemas/account.schema.js b/src/resources/3_0_1/schemas/account.schema.js index 90fcd864..a51823ff 100644 --- a/src/resources/3_0_1/schemas/account.schema.js +++ b/src/resources/3_0_1/schemas/account.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AccountResourceType = new GraphQLEnumType({ - name: 'AccountResourceType', - 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 @@ -22,88 +16,188 @@ let AccountResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Account', - description: 'Base StructureDefinition for Account Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AccountResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/account-status - status: { - type: CodeScalar, - description: - 'Indicates whether the account is presently used/usable or not.', - }, - _status: { - type: require('./element.schema'), - description: - 'Indicates whether the account is presently used/usable or not.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/account-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Categorizes the account for reporting and searching purposes.', - }, - name: { - type: GraphQLString, - description: - 'Name used for the account when displaying it to humans in reports, etc.', - }, - _name: { - type: require('./element.schema'), - description: - 'Name used for the account when displaying it to humans in reports, etc.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Account Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Account_Enum_schema', + values: { Account: { value: 'Account' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number).', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Indicates whether the account is presently used/usable or not.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/account-status + status: { + type: CodeScalar, + description: + 'Indicates whether the account is presently used/usable or not.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/account-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Categorizes the account for reporting and searching purposes.', + }, + _name: { + type: require('./element.schema.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.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Accountsubject_subject_Union', description: 'Identifies the patient, device, practitioner, location or other object the account is associated with.', - }, - period: { - type: require('./period.schema'), - description: - 'Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.', - }, - active: { - type: require('./period.schema'), - description: - 'Indicates the period of time over which the account is allowed to have transactions posted to it. This period may be different to the coveragePeriod which is the duration of time that services may occur.', - }, - balance: { - type: require('./money.schema'), - description: - 'Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.', - }, - coverage: { - type: new GraphQLList(require('./accountcoverage.schema')), - description: - 'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.', - }, - owner: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./location.schema.js'), + require('./healthcareservice.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the patient, device, practitioner, location or other object the account is associated with.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.', + }, + active: { + type: require('./period.schema.js'), + description: + 'Indicates the period of time over which the account is allowed to have transactions posted to it. This period may be different to the coveragePeriod which is the duration of time that services may occur.', + }, + balance: { + type: require('./money.schema.js'), + description: + 'Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.', + }, + coverage: { + type: new GraphQLList(require('./accountcoverage.schema.js')), + description: + 'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'Accountowner_owner_Union', 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.schema'), - description: - 'Provides additional information about what the account tracks and how it is used.', - }, - guarantor: { - type: new GraphQLList(require('./accountguarantor.schema')), - description: 'Parties financially responsible for the account.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the organization, department, etc. with responsibility for the account.', + }, + _description: { + type: require('./element.schema.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.', + }, + guarantor: { + type: new GraphQLList(require('./accountguarantor.schema.js')), + description: 'Parties financially responsible for the account.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/accountcoverage.schema.js b/src/resources/3_0_1/schemas/accountcoverage.schema.js index c56a3de1..1b43f31a 100644 --- a/src/resources/3_0_1/schemas/accountcoverage.schema.js +++ b/src/resources/3_0_1/schemas/accountcoverage.schema.js @@ -1,32 +1,66 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Account.coverage Schema + * @summary Accountcoverage Schema */ module.exports = new GraphQLObjectType({ - name: 'AccountCoverage', - description: - 'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - coverage: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The party(s) that are responsible for payment (or part of) of charges applied to this account (including self-pay). A coverage may only be resposible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.', - }, - priority: { - type: PositiveIntScalar, - description: - 'The priority of the coverage in the context of this account.', - }, - _priority: { - type: require('./element.schema'), - description: - 'The priority of the coverage in the context of this account.', - }, - }), + name: 'Accountcoverage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Accountcoveragecoverage_coverage_Union', + description: + 'The party(s) that are responsible for payment (or part of) of charges applied to this account (including self-pay). A coverage may only be resposible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.', + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + 'The party(s) that are responsible for payment (or part of) of charges applied to this account (including self-pay). A coverage may only be resposible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'The priority of the coverage in the context of this account.', + }, + priority: { + type: PositiveIntScalar, + description: + 'The priority of the coverage in the context of this account.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/accountguarantor.schema.js b/src/resources/3_0_1/schemas/accountguarantor.schema.js index 73fea3d0..8247bbfe 100644 --- a/src/resources/3_0_1/schemas/accountguarantor.schema.js +++ b/src/resources/3_0_1/schemas/accountguarantor.schema.js @@ -1,38 +1,79 @@ const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Account.guarantor Schema + * @summary Accountguarantor Schema */ module.exports = new GraphQLObjectType({ - name: 'AccountGuarantor', - description: 'Parties financially responsible for the account.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - party: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The entity who is responsible.', - }, - onHold: { - type: GraphQLBoolean, - description: - 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', - }, - _onHold: { - type: require('./element.schema'), - description: - 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', - }, - period: { - type: require('./period.schema'), - description: - 'The timeframe during which the guarantor accepts responsibility for the account.', - }, - }), + name: 'Accountguarantor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + party: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Accountguarantorparty_party_Union', + description: 'The entity who is responsible.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The entity who is responsible.', + }, + _onHold: { + type: require('./element.schema.js'), + description: + 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', + }, + onHold: { + type: GraphQLBoolean, + description: + 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The timeframe during which the guarantor accepts responsibility for the account.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/activitydefinition.schema.js b/src/resources/3_0_1/schemas/activitydefinition.schema.js index 1d650d6c..b5cc18c7 100644 --- a/src/resources/3_0_1/schemas/activitydefinition.schema.js +++ b/src/resources/3_0_1/schemas/activitydefinition.schema.js @@ -1,24 +1,17 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ActivityDefinitionResourceType = new GraphQLEnumType({ - name: 'ActivityDefinitionResourceType', - values: { - ActivityDefinition: { value: 'ActivityDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,294 +19,400 @@ let ActivityDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ActivityDefinition', - description: 'Base StructureDefinition for ActivityDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ActivityDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the activity definition.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the activity definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this activity definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this activity definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the activity definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the activity definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the activity definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the activity definition.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the activity definition from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the activity definition from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this activity definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this activity definition is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the asset is used from a clinical perspective.', - }, - _usage: { - type: require('./element.schema'), - description: - 'A detailed description of how the asset is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.schema'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.schema'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The period during which the activity definition content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate activity definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the activity definition is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.schema')), - description: - 'A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: - 'Related artifacts such as additional documentation, justification, or bibliographic references.', - }, - library: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A reference to a Library resource containing any formal logic used by the asset.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - kind: { - type: CodeScalar, - description: - 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', - }, - _kind: { - type: require('./element.schema'), - description: - 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: require('./codeableconcept.schema'), - description: - 'Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.', - }, - timingTiming: { - type: require('./timing.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - timingDateTime: { - type: DateTimeScalar, - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - _timingDateTime: { - type: require('./element.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - timingPeriod: { - type: require('./period.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - timingRange: { - type: require('./range.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - location: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ActivityDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ActivityDefinition_Enum_schema', + values: { ActivityDefinition: { value: 'ActivityDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the activity definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the activity definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this activity definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this activity definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the activity definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the activity definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the activity definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the activity definition.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the activity definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the activity definition from a consumer's perspective.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this activity definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this activity definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the asset is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the asset is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the activity definition content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate activity definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the activity definition is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.schema.js')), + description: + 'A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + library: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ActivityDefinitionlibrary_library_Union', + description: + 'A reference to a Library resource containing any formal logic used by the asset.', + types: () => [require('./library.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Library') { + return require('./library.schema.js'); + } + }, + }), + ), + description: + 'A reference to a Library resource containing any formal logic used by the asset.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + kind: { + type: CodeScalar, + description: + 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingRange: { + type: require('./range.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: new GraphQLUnionType({ + name: 'ActivityDefinitionlocation_location_Union', description: 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', - }, - participant: { - type: new GraphQLList( - require('./activitydefinitionparticipant.schema'), - ), - description: - 'Indicates who should participate in performing the action described.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productReference: { - type: require('./reference.schema'), - description: - 'Identifies the food, drug or other product being consumed or supplied in the activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productCodeableConcept: { - type: require('./codeableconcept.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + participant: { + type: new GraphQLList( + require('./activitydefinitionparticipant.schema.js'), + ), + description: + 'Indicates who should participate in performing the action described.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productReference: { + type: new GraphQLUnionType({ + name: 'ActivityDefinitionproductReference_productReference_Union', description: 'Identifies the food, drug or other product being consumed or supplied in the activity.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).', - }, - dosage: { - type: new GraphQLList(require('./dosage.schema')), - description: - 'Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", - }, - transform: { - type: require('./reference.schema'), + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).', + }, + dosage: { + type: new GraphQLList(require('./dosage.schema.js')), + description: + 'Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", + }, + transform: { + type: new GraphQLUnionType({ + name: 'ActivityDefinitiontransform_transform_Union', description: 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', - }, - dynamicValue: { - type: new GraphQLList( - require('./activitydefinitiondynamicvalue.schema'), - ), - description: - "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the intent resource that would contain the result.", - }, - }), + types: () => [require('./structuremap.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureMap') { + return require('./structuremap.schema.js'); + } + }, + }), + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + dynamicValue: { + type: new GraphQLList( + require('./activitydefinitiondynamicvalue.schema.js'), + ), + description: + "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the intent resource that would contain the result.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/activitydefinitiondynamicvalue.schema.js b/src/resources/3_0_1/schemas/activitydefinitiondynamicvalue.schema.js index cb6a5c95..3ca6c08a 100644 --- a/src/resources/3_0_1/schemas/activitydefinitiondynamicvalue.schema.js +++ b/src/resources/3_0_1/schemas/activitydefinitiondynamicvalue.schema.js @@ -1,54 +1,70 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary ActivityDefinition.dynamicValue Schema + * @summary ActivityDefinitiondynamicValue Schema */ module.exports = new GraphQLObjectType({ - name: 'ActivityDefinitionDynamicValue', - description: - "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the intent resource that would contain the result.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: GraphQLString, - description: - 'A brief, natural language description of the intended semantics of the dynamic value.', - }, - _description: { - type: require('./element.schema'), - description: - 'A brief, natural language description of the intended semantics of the dynamic value.', - }, - path: { - type: GraphQLString, - description: - 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', - }, - _path: { - type: require('./element.schema'), - description: - 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', - }, - language: { - type: GraphQLString, - description: 'The media type of the language for the expression.', - }, - _language: { - type: require('./element.schema'), - description: 'The media type of the language for the expression.', - }, - expression: { - type: GraphQLString, - description: - 'An expression specifying the value of the customized element.', - }, - _expression: { - type: require('./element.schema'), - description: - 'An expression specifying the value of the customized element.', - }, - }), + name: 'ActivityDefinitiondynamicValue', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A brief, natural language description of the intended semantics of the dynamic value.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the intended semantics of the dynamic value.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', + }, + path: { + type: GraphQLString, + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: GraphQLString, + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'An expression specifying the value of the customized element.', + }, + expression: { + type: GraphQLString, + description: + 'An expression specifying the value of the customized element.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/activitydefinitionparticipant.schema.js b/src/resources/3_0_1/schemas/activitydefinitionparticipant.schema.js index dc7156c4..b4d67074 100644 --- a/src/resources/3_0_1/schemas/activitydefinitionparticipant.schema.js +++ b/src/resources/3_0_1/schemas/activitydefinitionparticipant.schema.js @@ -1,32 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ActivityDefinition.participant Schema + * @summary ActivityDefinitionparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'ActivityDefinitionParticipant', - description: - 'Indicates who should participate in performing the action described.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-participant-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of participant in the action.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of participant in the action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-participant-role - role: { - type: require('./codeableconcept.schema'), - description: - 'The role the participant should play in performing the described action.', - }, - }), + name: 'ActivityDefinitionparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of participant in the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-participant-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant in the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-participant-role + role: { + type: require('./codeableconcept.schema.js'), + description: + 'The role the participant should play in performing the described action.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/address.schema.js b/src/resources/3_0_1/schemas/address.schema.js index 4a7f097a..cd5a1437 100644 --- a/src/resources/3_0_1/schemas/address.schema.js +++ b/src/resources/3_0_1/schemas/address.schema.js @@ -1,7 +1,5 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -9,98 +7,112 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Address', - description: 'Base StructureDefinition for Address Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/address-use - use: { - type: CodeScalar, - description: 'The purpose of this address.', - }, - _use: { - type: require('./element.schema'), - description: 'The purpose of this address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/address-type - type: { - type: CodeScalar, - description: - 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', - }, - _type: { - type: require('./element.schema'), - description: - 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', - }, - text: { - type: GraphQLString, - description: 'A full text representation of the address.', - }, - _text: { - type: require('./element.schema'), - description: 'A full text representation of the address.', - }, - line: { - type: new GraphQLList(GraphQLString), - description: - 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', - }, - _line: { - type: require('./element.schema'), - description: - 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', - }, - city: { - type: GraphQLString, - description: - 'The name of the city, town, village or other community or delivery center.', - }, - _city: { - type: require('./element.schema'), - description: - 'The name of the city, town, village or other community or delivery center.', - }, - district: { - type: GraphQLString, - description: 'The name of the administrative area (county).', - }, - _district: { - type: require('./element.schema'), - description: 'The name of the administrative area (county).', - }, - state: { - type: GraphQLString, - description: - 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', - }, - _state: { - type: require('./element.schema'), - description: - 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', - }, - postalCode: { - type: GraphQLString, - description: - 'A postal code designating a region defined by the postal service.', - }, - _postalCode: { - type: require('./element.schema'), - description: - 'A postal code designating a region defined by the postal service.', - }, - country: { - type: GraphQLString, - description: - 'Country - a nation as commonly understood or generally accepted.', - }, - _country: { - type: require('./element.schema'), - description: - 'Country - a nation as commonly understood or generally accepted.', - }, - period: { - type: require('./period.schema'), - description: 'Time period when address was/is in use.', - }, - }), + description: 'Base StructureDefinition for Address Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _use: { + type: require('./element.schema.js'), + description: 'The purpose of this address.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/address-use + use: { + type: CodeScalar, + description: 'The purpose of this address.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/address-type + type: { + type: CodeScalar, + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + _text: { + type: require('./element.schema.js'), + description: 'A full text representation of the address.', + }, + text: { + type: GraphQLString, + description: 'A full text representation of the address.', + }, + _line: { + type: require('./element.schema.js'), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + line: { + type: new GraphQLList(GraphQLString), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + _city: { + type: require('./element.schema.js'), + description: + 'The name of the city, town, village or other community or delivery center.', + }, + city: { + type: GraphQLString, + description: + 'The name of the city, town, village or other community or delivery center.', + }, + _district: { + type: require('./element.schema.js'), + description: 'The name of the administrative area (county).', + }, + district: { + type: GraphQLString, + description: 'The name of the administrative area (county).', + }, + _state: { + type: require('./element.schema.js'), + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', + }, + state: { + type: GraphQLString, + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).', + }, + _postalCode: { + type: require('./element.schema.js'), + description: + 'A postal code designating a region defined by the postal service.', + }, + postalCode: { + type: GraphQLString, + description: + 'A postal code designating a region defined by the postal service.', + }, + _country: { + type: require('./element.schema.js'), + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + country: { + type: GraphQLString, + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period when address was/is in use.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/adverseevent.schema.js b/src/resources/3_0_1/schemas/adverseevent.schema.js index 0c43a121..9f33145e 100644 --- a/src/resources/3_0_1/schemas/adverseevent.schema.js +++ b/src/resources/3_0_1/schemas/adverseevent.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AdverseEventResourceType = new GraphQLEnumType({ - name: 'AdverseEventResourceType', - values: { - AdverseEvent: { value: 'AdverseEvent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,104 +17,298 @@ let AdverseEventResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'AdverseEvent', - description: 'Base StructureDefinition for AdverseEvent Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AdverseEventResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'The identifier(s) of this adverse event that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itsefl is not appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-category - category: { - type: CodeScalar, - description: - 'The type of event which is important to characterize what occurred and caused harm to the subject, or had the potential to cause harm to the subject.', - }, - _category: { - type: require('./element.schema'), - description: - 'The type of event which is important to characterize what occurred and caused harm to the subject, or had the potential to cause harm to the subject.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-type - type: { - type: require('./codeableconcept.schema'), - description: - 'This element defines the specific type of event that occurred or that was prevented from occurring.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for AdverseEvent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AdverseEvent_Enum_schema', + values: { AdverseEvent: { value: 'AdverseEvent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'The identifier(s) of this adverse event that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itsefl is not appropriate.', + }, + _category: { + type: require('./element.schema.js'), + description: + 'The type of event which is important to characterize what occurred and caused harm to the subject, or had the potential to cause harm to the subject.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-category + category: { + type: CodeScalar, + description: + 'The type of event which is important to characterize what occurred and caused harm to the subject, or had the potential to cause harm to the subject.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'This element defines the specific type of event that occurred or that was prevented from occurring.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'AdverseEventsubject_subject_Union', description: 'This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the adverse event occurred.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and perhaps time) when the adverse event occurred.', - }, - reaction: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).', - }, - location: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./researchsubject.schema.js'), + require('./medication.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'ResearchSubject') { + return require('./researchsubject.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'This subject or group impacted by the event. With a prospective adverse event, there will be no subject as the adverse event was prevented.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the adverse event occurred.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the adverse event occurred.', + }, + reaction: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventreaction_reaction_Union', + description: + 'Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).', + }, + location: { + type: new GraphQLUnionType({ + name: 'AdverseEventlocation_location_Union', description: 'The information about where the adverse event occurred.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-seriousness - seriousness: { - type: require('./codeableconcept.schema'), - description: - 'Describes the seriousness or severity of the adverse event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: 'Describes the type of outcome from the adverse event.', - }, - recorder: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The information about where the adverse event occurred.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-seriousness + seriousness: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the seriousness or severity of the adverse event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: 'Describes the type of outcome from the adverse event.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'AdverseEventrecorder_recorder_Union', description: 'Information on who recorded the adverse event. May be the patient or a practitioner.', - }, - eventParticipant: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Information on who recorded the adverse event. May be the patient or a practitioner.', + }, + eventParticipant: { + type: new GraphQLUnionType({ + name: 'AdverseEventeventParticipant_eventParticipant_Union', description: 'Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g. consultant), information that the Act itself seeks to reveal (e.g. informant of clinical history), or information about what Act was performed (e.g. informant witness).', - }, - description: { - type: GraphQLString, - description: 'Describes the adverse event in text.', - }, - _description: { - type: require('./element.schema'), - description: 'Describes the adverse event in text.', - }, - suspectEntity: { - type: new GraphQLList(require('./adverseeventsuspectentity.schema')), - description: - 'Describes the entity that is suspected to have caused the adverse event.', - }, - subjectMedicalHistory: { - type: new GraphQLList(require('./reference.schema')), - description: 'AdverseEvent.subjectMedicalHistory.', - }, - referenceDocument: { - type: new GraphQLList(require('./reference.schema')), - description: 'AdverseEvent.referenceDocument.', - }, - study: { - type: new GraphQLList(require('./reference.schema')), - description: 'AdverseEvent.study.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Parties that may or should contribute or have contributed information to the Act. Such information includes information leading to the decision to perform the Act and how to perform the Act (e.g. consultant), information that the Act itself seeks to reveal (e.g. informant of clinical history), or information about what Act was performed (e.g. informant witness).', + }, + _description: { + type: require('./element.schema.js'), + description: 'Describes the adverse event in text.', + }, + description: { + type: GraphQLString, + description: 'Describes the adverse event in text.', + }, + suspectEntity: { + type: new GraphQLList(require('./adverseeventsuspectentity.schema.js')), + description: + 'Describes the entity that is suspected to have caused the adverse event.', + }, + subjectMedicalHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventsubjectMedicalHistory_subjectMedicalHistory_Union', + description: 'AdverseEvent.subjectMedicalHistory.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./allergyintolerance.schema.js'), + require('./familymemberhistory.schema.js'), + require('./immunization.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + if (data && data.resourceType === 'FamilyMemberHistory') { + return require('./familymemberhistory.schema.js'); + } + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: 'AdverseEvent.subjectMedicalHistory.', + }, + referenceDocument: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventreferenceDocument_referenceDocument_Union', + description: 'AdverseEvent.referenceDocument.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'AdverseEvent.referenceDocument.', + }, + study: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventstudy_study_Union', + description: 'AdverseEvent.study.', + types: () => [require('./researchstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + }, + }), + ), + description: 'AdverseEvent.study.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/adverseeventsuspectentity.schema.js b/src/resources/3_0_1/schemas/adverseeventsuspectentity.schema.js index 195e8dd2..c98a5088 100644 --- a/src/resources/3_0_1/schemas/adverseeventsuspectentity.schema.js +++ b/src/resources/3_0_1/schemas/adverseeventsuspectentity.schema.js @@ -1,58 +1,125 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary AdverseEvent.suspectEntity Schema + * @summary AdverseEventsuspectEntity Schema */ module.exports = new GraphQLObjectType({ - name: 'AdverseEventSuspectEntity', - description: - 'Describes the entity that is suspected to have caused the adverse event.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - instance: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality - causality: { - type: CodeScalar, - description: 'causality1 | causality2.', - }, - _causality: { - type: require('./element.schema'), - description: 'causality1 | causality2.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-assess - causalityAssessment: { - type: require('./codeableconcept.schema'), - description: 'assess1 | assess2.', - }, - causalityProductRelatedness: { - type: GraphQLString, - description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', - }, - _causalityProductRelatedness: { - type: require('./element.schema'), - description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-method - causalityMethod: { - type: require('./codeableconcept.schema'), - description: 'method1 | method2.', - }, - causalityAuthor: { - type: require('./reference.schema'), + name: 'AdverseEventsuspectEntity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + instance: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AdverseEventsuspectEntityinstance_instance_Union', + description: + 'Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device.', + types: () => [ + require('./substance.schema.js'), + require('./medication.schema.js'), + require('./medicationadministration.schema.js'), + require('./medicationstatement.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device.', + }, + _causality: { + type: require('./element.schema.js'), + description: 'causality1 | causality2.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality + causality: { + type: CodeScalar, + description: 'causality1 | causality2.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-assess + causalityAssessment: { + type: require('./codeableconcept.schema.js'), + description: 'assess1 | assess2.', + }, + _causalityProductRelatedness: { + type: require('./element.schema.js'), + description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', + }, + causalityProductRelatedness: { + type: GraphQLString, + description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-method + causalityMethod: { + type: require('./codeableconcept.schema.js'), + description: 'method1 | method2.', + }, + causalityAuthor: { + type: new GraphQLUnionType({ + name: 'AdverseEventsuspectEntitycausalityAuthor_causalityAuthor_Union', description: 'AdverseEvent.suspectEntity.causalityAuthor.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-result - causalityResult: { - type: require('./codeableconcept.schema'), - description: 'result1 | result2.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'AdverseEvent.suspectEntity.causalityAuthor.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adverse-event-causality-result + causalityResult: { + type: require('./codeableconcept.schema.js'), + description: 'result1 | result2.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/age.schema.js b/src/resources/3_0_1/schemas/age.schema.js index 326f5197..14722bfb 100644 --- a/src/resources/3_0_1/schemas/age.schema.js +++ b/src/resources/3_0_1/schemas/age.schema.js @@ -1,6 +1,11 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Age', - description: 'Base StructureDefinition for Age Type.', - fields: () => extendSchema(require('./quantity.schema')), + description: 'Base StructureDefinition for Age Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/allergyintolerance.schema.js b/src/resources/3_0_1/schemas/allergyintolerance.schema.js index 028add48..3459168a 100644 --- a/src/resources/3_0_1/schemas/allergyintolerance.schema.js +++ b/src/resources/3_0_1/schemas/allergyintolerance.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AllergyIntoleranceResourceType = new GraphQLEnumType({ - name: 'AllergyIntoleranceResourceType', - values: { - AllergyIntolerance: { value: 'AllergyIntolerance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,153 +17,258 @@ let AllergyIntoleranceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'AllergyIntolerance', - description: 'Base StructureDefinition for AllergyIntolerance Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AllergyIntoleranceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-clinical-status - clinicalStatus: { - type: CodeScalar, - description: 'The clinical status of the allergy or intolerance.', - }, - _clinicalStatus: { - type: require('./element.schema'), - description: 'The clinical status of the allergy or intolerance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-verification-status - verificationStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', - }, - _verificationStatus: { - type: require('./element.schema'), - description: - 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-type - type: { - type: CodeScalar, - description: - 'Identification of the underlying physiological mechanism for the reaction risk.', - }, - _type: { - type: require('./element.schema'), - description: - 'Identification of the underlying physiological mechanism for the reaction risk.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-category - category: { - type: new GraphQLList(CodeScalar), - description: 'Category of the identified substance.', - }, - _category: { - type: require('./element.schema'), - description: 'Category of the identified substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality - criticality: { - type: CodeScalar, - description: - 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', - }, - _criticality: { - type: require('./element.schema'), - description: - 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/allergyintolerance-code - code: { - type: require('./codeableconcept.schema'), - description: - "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., 'Latex'), an allergy or intolerance condition (e.g., 'Latex allergy'), or a negated/excluded code for a specific substance or class (e.g., 'No latex allergy') or a general or categorical negated statement (e.g., 'No known allergy', 'No known drug allergies').", - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient who has the allergy or intolerance.', - }, - onsetDateTime: { - type: DateTimeScalar, - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - _onsetDateTime: { - type: require('./element.schema'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - onsetAge: { - type: require('./age.schema'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - onsetPeriod: { - type: require('./period.schema'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - onsetRange: { - type: require('./range.schema'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - onsetString: { - type: GraphQLString, - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - _onsetString: { - type: require('./element.schema'), - description: - 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', - }, - assertedDate: { - type: DateTimeScalar, - description: - 'The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.', - }, - _assertedDate: { - type: require('./element.schema'), - description: - 'The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.', - }, - recorder: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for AllergyIntolerance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AllergyIntolerance_Enum_schema', + values: { AllergyIntolerance: { value: 'AllergyIntolerance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _clinicalStatus: { + type: require('./element.schema.js'), + description: 'The clinical status of the allergy or intolerance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-clinical-status + clinicalStatus: { + type: CodeScalar, + description: 'The clinical status of the allergy or intolerance.', + }, + _verificationStatus: { + type: require('./element.schema.js'), + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-verification-status + verificationStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-type + type: { + type: CodeScalar, + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + _category: { + type: require('./element.schema.js'), + description: 'Category of the identified substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-category + category: { + type: new GraphQLList(CodeScalar), + description: 'Category of the identified substance.', + }, + _criticality: { + type: require('./element.schema.js'), + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality + criticality: { + type: CodeScalar, + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/allergyintolerance-code + code: { + type: require('./codeableconcept.schema.js'), + description: + "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., 'Latex'), an allergy or intolerance condition (e.g., 'Latex allergy'), or a negated/excluded code for a specific substance or class (e.g., 'No latex allergy') or a general or categorical negated statement (e.g., 'No known allergy', 'No known drug allergies').", + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AllergyIntolerancepatient_patient_Union', + description: 'The patient who has the allergy or intolerance.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient who has the allergy or intolerance.', + }, + _onsetDateTime: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetAge: { + type: require('./age.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetPeriod: { + type: require('./period.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetRange: { + type: require('./range.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + _onsetString: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + _assertedDate: { + type: require('./element.schema.js'), + description: + 'The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.', + }, + assertedDate: { + type: DateTimeScalar, + description: + 'The date on which the existance of the AllergyIntolerance was first asserted or acknowledged.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'AllergyIntolerancerecorder_recorder_Union', description: 'Individual who recorded the record and takes responsibility for its content.', - }, - asserter: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'Individual who recorded the record and takes responsibility for its content.', + }, + asserter: { + type: new GraphQLUnionType({ + name: 'AllergyIntoleranceasserter_asserter_Union', description: 'The source of the information about the allergy that is recorded.', - }, - lastOccurrence: { - type: DateTimeScalar, - description: - 'Represents the date and/or time of the last known occurrence of a reaction event.', - }, - _lastOccurrence: { - type: require('./element.schema'), - description: - 'Represents the date and/or time of the last known occurrence of a reaction event.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', - }, - reaction: { - type: new GraphQLList(require('./allergyintolerancereaction.schema')), - description: - 'Details about each adverse reaction event linked to exposure to the identified substance.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The source of the information about the allergy that is recorded.', + }, + _lastOccurrence: { + type: require('./element.schema.js'), + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + lastOccurrence: { + type: DateTimeScalar, + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', + }, + reaction: { + type: new GraphQLList(require('./allergyintolerancereaction.schema.js')), + description: + 'Details about each adverse reaction event linked to exposure to the identified substance.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/allergyintolerancereaction.schema.js b/src/resources/3_0_1/schemas/allergyintolerancereaction.schema.js index 871b6ea9..6aac18e1 100644 --- a/src/resources/3_0_1/schemas/allergyintolerancereaction.schema.js +++ b/src/resources/3_0_1/schemas/allergyintolerancereaction.schema.js @@ -1,79 +1,95 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary AllergyIntolerance.reaction Schema + * @summary AllergyIntolerancereaction Schema */ module.exports = new GraphQLObjectType({ - name: 'AllergyIntoleranceReaction', - description: - 'Details about each adverse reaction event linked to exposure to the identified substance.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - substance: { - type: require('./codeableconcept.schema'), - description: - "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - manifestation: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.schema')), - ), - description: - 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', - }, - description: { - type: GraphQLString, - description: - 'Text description about the reaction as a whole, including details of the manifestation if required.', - }, - _description: { - type: require('./element.schema'), - description: - 'Text description about the reaction as a whole, including details of the manifestation if required.', - }, - onset: { - type: DateTimeScalar, - description: - 'Record of the date and/or time of the onset of the Reaction.', - }, - _onset: { - type: require('./element.schema'), - description: - 'Record of the date and/or time of the onset of the Reaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-severity - severity: { - type: CodeScalar, - description: - 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', - }, - _severity: { - type: require('./element.schema'), - description: - 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - exposureRoute: { - type: require('./codeableconcept.schema'), - description: - 'Identification of the route by which the subject was exposed to the substance.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Additional text about the adverse reaction event not captured in other fields.', - }, - }), + name: 'AllergyIntolerancereaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + substance: { + type: require('./codeableconcept.schema.js'), + description: + "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + manifestation: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.schema.js')), + ), + description: + 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + description: { + type: GraphQLString, + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + _onset: { + type: require('./element.schema.js'), + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + onset: { + type: DateTimeScalar, + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reaction-event-severity + severity: { + type: CodeScalar, + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + exposureRoute: { + type: require('./codeableconcept.schema.js'), + description: + 'Identification of the route by which the subject was exposed to the substance.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Additional text about the adverse reaction event not captured in other fields.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/annotation.schema.js b/src/resources/3_0_1/schemas/annotation.schema.js index daba5883..0aa52a60 100644 --- a/src/resources/3_0_1/schemas/annotation.schema.js +++ b/src/resources/3_0_1/schemas/annotation.schema.js @@ -1,7 +1,11 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -9,36 +13,69 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Annotation', - description: 'Base StructureDefinition for Annotation Type.', - fields: () => - extendSchema(require('./element.schema'), { - authorReference: { - type: require('./reference.schema'), - description: 'The individual responsible for making the annotation.', - }, - authorString: { - type: GraphQLString, - description: 'The individual responsible for making the annotation.', - }, - _authorString: { - type: require('./element.schema'), + description: 'Base StructureDefinition for Annotation Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + authorReference: { + type: new GraphQLUnionType({ + name: 'AnnotationauthorReference_authorReference_Union', description: 'The individual responsible for making the annotation.', - }, - time: { - type: DateTimeScalar, - description: 'Indicates when this particular annotation was made.', - }, - _time: { - type: require('./element.schema'), - description: 'Indicates when this particular annotation was made.', - }, - text: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text of the annotation.', - }, - _text: { - type: require('./element.schema'), - description: 'The text of the annotation.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The individual responsible for making the annotation.', + }, + _authorString: { + type: require('./element.schema.js'), + description: 'The individual responsible for making the annotation.', + }, + authorString: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _time: { + type: require('./element.schema.js'), + description: 'Indicates when this particular annotation was made.', + }, + time: { + type: DateTimeScalar, + description: 'Indicates when this particular annotation was made.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The text of the annotation.', + }, + text: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text of the annotation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/appointment.schema.js b/src/resources/3_0_1/schemas/appointment.schema.js index 5a64766d..b0c220b3 100644 --- a/src/resources/3_0_1/schemas/appointment.schema.js +++ b/src/resources/3_0_1/schemas/appointment.schema.js @@ -1,24 +1,18 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AppointmentResourceType = new GraphQLEnumType({ - name: 'AppointmentResourceType', - values: { - Appointment: { value: 'Appointment' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,153 +20,265 @@ let AppointmentResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Appointment', - description: 'Base StructureDefinition for Appointment Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AppointmentResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', - }, - _status: { - type: require('./element.schema'), - description: - 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-category - serviceCategory: { - type: require('./codeableconcept.schema'), - description: - 'A broad categorisation of the service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-type - serviceType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The specific service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0276 - appointmentType: { - type: require('./codeableconcept.schema'), - description: - 'The style of appointment or patient that has been booked in the slot (not service type).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The reason that this appointment is being scheduled. This is more clinical than administrative.', - }, - indication: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', - }, - priority: { - type: UnsignedIntScalar, - description: - 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', - }, - _priority: { - type: require('./element.schema'), - description: - 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', - }, - description: { - type: GraphQLString, - description: - 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', - }, - _description: { - type: require('./element.schema'), - description: - 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Additional information to support the appointment provided when making the appointment.', - }, - start: { - type: InstantScalar, - description: 'Date/Time that the appointment is to take place.', - }, - _start: { - type: require('./element.schema'), - description: 'Date/Time that the appointment is to take place.', - }, - end: { - type: InstantScalar, - description: 'Date/Time that the appointment is to conclude.', - }, - _end: { - type: require('./element.schema'), - description: 'Date/Time that the appointment is to conclude.', - }, - minutesDuration: { - type: PositiveIntScalar, - description: - 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', - }, - _minutesDuration: { - type: require('./element.schema'), - description: - 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', - }, - slot: { - type: new GraphQLList(require('./reference.schema')), - description: - "The slots from the participants' schedules that will be filled by the appointment.", - }, - created: { - type: DateTimeScalar, - description: - 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the appointment.', - }, - _comment: { - type: require('./element.schema'), - description: 'Additional comments about the appointment.', - }, - incomingReferral: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The referral request this appointment is allocated to assess (incoming referral).', - }, - participant: { - type: new GraphQLList( - new GraphQLNonNull(require('./appointmentparticipant.schema')), - ), - description: 'List of participants involved in the appointment.', - }, - requestedPeriod: { - type: new GraphQLList(require('./period.schema')), - description: - 'A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. When using these values, the minutes duration should be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time.', - }, - }), + description: 'Base StructureDefinition for Appointment Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Appointment_Enum_schema', + values: { Appointment: { value: 'Appointment' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/appointmentstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-category + serviceCategory: { + type: require('./codeableconcept.schema.js'), + description: + 'A broad categorisation of the service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-type + serviceType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specific service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0276 + appointmentType: { + type: require('./codeableconcept.schema.js'), + description: + 'The style of appointment or patient that has been booked in the slot (not service type).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The reason that this appointment is being scheduled. This is more clinical than administrative.', + }, + indication: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Appointmentindication_indication_Union', + description: + 'Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + types: () => [ + require('./condition.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + priority: { + type: UnsignedIntScalar, + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + description: { + type: GraphQLString, + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AppointmentsupportingInformation_supportingInformation_Union', + description: + 'Additional information to support the appointment provided when making the appointment.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Additional information to support the appointment provided when making the appointment.', + }, + _start: { + type: require('./element.schema.js'), + description: 'Date/Time that the appointment is to take place.', + }, + start: { + type: InstantScalar, + description: 'Date/Time that the appointment is to take place.', + }, + _end: { + type: require('./element.schema.js'), + description: 'Date/Time that the appointment is to conclude.', + }, + end: { + type: InstantScalar, + description: 'Date/Time that the appointment is to conclude.', + }, + _minutesDuration: { + type: require('./element.schema.js'), + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', + }, + minutesDuration: { + type: PositiveIntScalar, + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).', + }, + slot: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Appointmentslot_slot_Union', + description: + "The slots from the participants' schedules that will be filled by the appointment.", + types: () => [require('./slot.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Slot') { + return require('./slot.schema.js'); + } + }, + }), + ), + description: + "The slots from the participants' schedules that will be filled by the appointment.", + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', + }, + created: { + type: DateTimeScalar, + description: + 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + incomingReferral: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AppointmentincomingReferral_incomingReferral_Union', + description: + 'The referral request this appointment is allocated to assess (incoming referral).', + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'The referral request this appointment is allocated to assess (incoming referral).', + }, + participant: { + type: new GraphQLList( + new GraphQLNonNull(require('./appointmentparticipant.schema.js')), + ), + description: 'List of participants involved in the appointment.', + }, + requestedPeriod: { + type: new GraphQLList(require('./period.schema.js')), + description: + 'A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. When using these values, the minutes duration should be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/appointmentparticipant.schema.js b/src/resources/3_0_1/schemas/appointmentparticipant.schema.js index 25d377de..6e9d36f3 100644 --- a/src/resources/3_0_1/schemas/appointmentparticipant.schema.js +++ b/src/resources/3_0_1/schemas/appointmentparticipant.schema.js @@ -1,46 +1,101 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Appointment.participant Schema + * @summary Appointmentparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'AppointmentParticipant', - description: 'List of participants involved in the appointment.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Role of participant in the appointment.', - }, - actor: { - type: require('./reference.schema'), + name: 'Appointmentparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'Appointmentparticipantactor_actor_Union', description: 'A Person, Location/HealthcareService or Device that is participating in the appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participantrequired - required: { - type: CodeScalar, - description: - 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', - }, - _required: { - type: require('./element.schema'), - description: - 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participationstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Participation status of the actor.', - }, - _status: { - type: require('./element.schema'), - description: 'Participation status of the actor.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _required: { + type: require('./element.schema.js'), + description: + 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participantrequired + required: { + type: CodeScalar, + description: + 'Is this participant required to be present at the meeting. This covers a use-case where 2 doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Participation status of the actor.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participationstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Participation status of the actor.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/appointmentresponse.schema.js b/src/resources/3_0_1/schemas/appointmentresponse.schema.js index ae752833..d039f824 100644 --- a/src/resources/3_0_1/schemas/appointmentresponse.schema.js +++ b/src/resources/3_0_1/schemas/appointmentresponse.schema.js @@ -1,21 +1,15 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AppointmentResponseResourceType = new GraphQLEnumType({ - name: 'AppointmentResponseResourceType', - values: { - AppointmentResponse: { value: 'AppointmentResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,70 +17,171 @@ let AppointmentResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'AppointmentResponse', - description: 'Base StructureDefinition for AppointmentResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AppointmentResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', - }, - appointment: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Appointment that this response is replying to.', - }, - start: { - type: InstantScalar, - description: - 'Date/Time that the appointment is to take place, or requested new start time.', - }, - _start: { - type: require('./element.schema'), - description: - 'Date/Time that the appointment is to take place, or requested new start time.', - }, - end: { - type: InstantScalar, - description: - 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', - }, - _end: { - type: require('./element.schema'), - description: - 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - participantType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Role of participant in the appointment.', - }, - actor: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for AppointmentResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AppointmentResponse_Enum_schema', + values: { AppointmentResponse: { value: 'AppointmentResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + appointment: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AppointmentResponseappointment_appointment_Union', + description: 'Appointment that this response is replying to.', + types: () => [require('./appointment.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + }, + }), + ), + description: 'Appointment that this response is replying to.', + }, + _start: { + type: require('./element.schema.js'), + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + start: { + type: InstantScalar, + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + end: { + type: InstantScalar, + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + participantType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'AppointmentResponseactor_actor_Union', description: 'A Person, Location/HealthcareService or Device that is participating in the appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participationstatus - participantStatus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', - }, - _participantStatus: { - type: require('./element.schema'), - description: - 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the appointment.', - }, - _comment: { - type: require('./element.schema'), - description: 'Additional comments about the appointment.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _participantStatus: { + type: require('./element.schema.js'), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participationstatus + participantStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/attachment.schema.js b/src/resources/3_0_1/schemas/attachment.schema.js index 4a1a6cbb..692a26dc 100644 --- a/src/resources/3_0_1/schemas/attachment.schema.js +++ b/src/resources/3_0_1/schemas/attachment.schema.js @@ -1,11 +1,9 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -13,83 +11,97 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Attachment', - description: 'Base StructureDefinition for Attachment Type.', - fields: () => - extendSchema(require('./element.schema'), { - contentType: { - type: CodeScalar, - description: - 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', - }, - _contentType: { - type: require('./element.schema'), - description: - 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: - 'The human language of the content. The value can be any valid value according to BCP 47.', - }, - _language: { - type: require('./element.schema'), - description: - 'The human language of the content. The value can be any valid value according to BCP 47.', - }, - data: { - type: Base64BinaryScalar, - description: - 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', - }, - _data: { - type: require('./element.schema'), - description: - 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', - }, - url: { - type: UriScalar, - description: 'An alternative location where the data can be accessed.', - }, - _url: { - type: require('./element.schema'), - description: 'An alternative location where the data can be accessed.', - }, - size: { - type: UnsignedIntScalar, - description: - 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', - }, - _size: { - type: require('./element.schema'), - description: - 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', - }, - hash: { - type: Base64BinaryScalar, - description: - 'The calculated hash of the data using SHA-1. Represented using base64.', - }, - _hash: { - type: require('./element.schema'), - description: - 'The calculated hash of the data using SHA-1. Represented using base64.', - }, - title: { - type: GraphQLString, - description: 'A label or set of text to display in place of the data.', - }, - _title: { - type: require('./element.schema'), - description: 'A label or set of text to display in place of the data.', - }, - creation: { - type: DateTimeScalar, - description: 'The date that the attachment was first created.', - }, - _creation: { - type: require('./element.schema'), - description: 'The date that the attachment was first created.', - }, - }), + description: 'Base StructureDefinition for Attachment Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + contentType: { + type: CodeScalar, + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + _language: { + type: require('./element.schema.js'), + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + _data: { + type: require('./element.schema.js'), + description: + 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', + }, + data: { + type: Base64BinaryScalar, + description: + 'The actual data of the attachment - a sequence of bytes. In XML, represented using base64.', + }, + _url: { + type: require('./element.schema.js'), + description: 'An alternative location where the data can be accessed.', + }, + url: { + type: UriScalar, + description: 'An alternative location where the data can be accessed.', + }, + _size: { + type: require('./element.schema.js'), + description: + 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', + }, + size: { + type: UnsignedIntScalar, + description: + 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', + }, + _hash: { + type: require('./element.schema.js'), + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + hash: { + type: Base64BinaryScalar, + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A label or set of text to display in place of the data.', + }, + title: { + type: GraphQLString, + description: 'A label or set of text to display in place of the data.', + }, + _creation: { + type: require('./element.schema.js'), + description: 'The date that the attachment was first created.', + }, + creation: { + type: DateTimeScalar, + description: 'The date that the attachment was first created.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/auditevent.schema.js b/src/resources/3_0_1/schemas/auditevent.schema.js index bf5086c7..b6a1ac63 100644 --- a/src/resources/3_0_1/schemas/auditevent.schema.js +++ b/src/resources/3_0_1/schemas/auditevent.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let AuditEventResourceType = new GraphQLEnumType({ - name: 'AuditEventResourceType', - values: { - AuditEvent: { value: 'AuditEvent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,81 +17,139 @@ let AuditEventResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'AuditEvent', - description: 'Base StructureDefinition for AuditEvent Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(AuditEventResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-type - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-sub-type - subtype: { - type: new GraphQLList(require('./coding.schema')), - description: 'Identifier for the category of event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-action - action: { - type: CodeScalar, - description: - 'Indicator for type of action performed during the event that generated the audit.', - }, - _action: { - type: require('./element.schema'), - description: - 'Indicator for type of action performed during the event that generated the audit.', - }, - recorded: { - type: new GraphQLNonNull(InstantScalar), - description: 'The time when the event occurred on the source.', - }, - _recorded: { - type: require('./element.schema'), - description: 'The time when the event occurred on the source.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-event-outcome - outcome: { - type: CodeScalar, - description: 'Indicates whether the event succeeded or failed.', - }, - _outcome: { - type: require('./element.schema'), - description: 'Indicates whether the event succeeded or failed.', - }, - outcomeDesc: { - type: GraphQLString, - description: 'A free text description of the outcome of the event.', - }, - _outcomeDesc: { - type: require('./element.schema'), - description: 'A free text description of the outcome of the event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purposeOfEvent: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The purposeOfUse (reason) that was used during the event being recorded.', - }, - agent: { - type: new GraphQLList( - new GraphQLNonNull(require('./auditeventagent.schema')), - ), - description: - 'An actor taking an active role in the event or activity that is logged.', - }, - source: { - type: new GraphQLNonNull(require('./auditeventsource.schema')), - description: 'The system that is reporting the event.', - }, - entity: { - type: new GraphQLList(require('./auditevententity.schema')), - description: - 'Specific instances of data or objects that have been accessed.', - }, - }), + description: 'Base StructureDefinition for AuditEvent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AuditEvent_Enum_schema', + values: { AuditEvent: { value: 'AuditEvent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-type + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-sub-type + subtype: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Identifier for the category of event.', + }, + _action: { + type: require('./element.schema.js'), + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-action + action: { + type: CodeScalar, + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + _recorded: { + type: require('./element.schema.js'), + description: 'The time when the event occurred on the source.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time when the event occurred on the source.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Indicates whether the event succeeded or failed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-event-outcome + outcome: { + type: CodeScalar, + description: 'Indicates whether the event succeeded or failed.', + }, + _outcomeDesc: { + type: require('./element.schema.js'), + description: 'A free text description of the outcome of the event.', + }, + outcomeDesc: { + type: GraphQLString, + description: 'A free text description of the outcome of the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purposeOfEvent: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The purposeOfUse (reason) that was used during the event being recorded.', + }, + agent: { + type: new GraphQLList( + new GraphQLNonNull(require('./auditeventagent.schema.js')), + ), + description: + 'An actor taking an active role in the event or activity that is logged.', + }, + source: { + type: new GraphQLNonNull(require('./auditeventsource.schema.js')), + description: 'The system that is reporting the event.', + }, + entity: { + type: new GraphQLList(require('./auditevententity.schema.js')), + description: + 'Specific instances of data or objects that have been accessed.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/auditeventagent.schema.js b/src/resources/3_0_1/schemas/auditeventagent.schema.js index ec30bc60..91ae7aac 100644 --- a/src/resources/3_0_1/schemas/auditeventagent.schema.js +++ b/src/resources/3_0_1/schemas/auditeventagent.schema.js @@ -1,98 +1,151 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLUnionType, GraphQLNonNull, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary AuditEvent.agent Schema + * @summary AuditEventagent Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventAgent', - description: - 'An actor taking an active role in the event or activity that is logged.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-role-type - role: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.', - }, - reference: { - type: require('./reference.schema'), + name: 'AuditEventagent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-role-type + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.', + }, + reference: { + type: new GraphQLUnionType({ + name: 'AuditEventagentreference_reference_Union', description: 'Direct reference to a resource that identifies the agent.', - }, - userId: { - type: require('./identifier.schema'), - description: - 'Unique identifier for the user actively participating in the event.', - }, - altId: { - type: GraphQLString, - description: - 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', - }, - _altId: { - type: require('./element.schema'), - description: - 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', - }, - name: { - type: GraphQLString, - description: 'Human-meaningful name for the agent.', - }, - _name: { - type: require('./element.schema'), - description: 'Human-meaningful name for the agent.', - }, - requestor: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', - }, - _requestor: { - type: require('./element.schema'), - description: - 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', - }, - location: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Direct reference to a resource that identifies the agent.', + }, + userId: { + type: require('./identifier.schema.js'), + description: + 'Unique identifier for the user actively participating in the event.', + }, + _altId: { + type: require('./element.schema.js'), + description: + 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + altId: { + type: GraphQLString, + description: + 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-meaningful name for the agent.', + }, + name: { + type: GraphQLString, + description: 'Human-meaningful name for the agent.', + }, + _requestor: { + type: require('./element.schema.js'), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + requestor: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + location: { + type: new GraphQLUnionType({ + name: 'AuditEventagentlocation_location_Union', description: 'Where the event occurred.', - }, - policy: { - type: new GraphQLList(UriScalar), - description: - 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', - }, - _policy: { - type: require('./element.schema'), - description: - 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicm-405-mediatype - media: { - type: require('./coding.schema'), - description: - 'Type of media involved. Used when the event is about exporting/importing onto media.', - }, - network: { - type: require('./auditeventagentnetwork.schema'), - description: - 'Logical network location for application activity, if the activity has a network location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purposeOfUse: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The reason (purpose of use), specific to this agent, that was used during the event being recorded.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the event occurred.', + }, + _policy: { + type: require('./element.schema.js'), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicm-405-mediatype + media: { + type: require('./coding.schema.js'), + description: + 'Type of media involved. Used when the event is about exporting/importing onto media.', + }, + network: { + type: require('./auditeventagentnetwork.schema.js'), + description: + 'Logical network location for application activity, if the activity has a network location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purposeOfUse: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The reason (purpose of use), specific to this agent, that was used during the event being recorded.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/auditeventagentnetwork.schema.js b/src/resources/3_0_1/schemas/auditeventagentnetwork.schema.js index 41af4dce..9ca57518 100644 --- a/src/resources/3_0_1/schemas/auditeventagentnetwork.schema.js +++ b/src/resources/3_0_1/schemas/auditeventagentnetwork.schema.js @@ -1,38 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary AuditEvent.agent.network Schema + * @summary AuditEventagentnetwork Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventAgentNetwork', - description: - 'Logical network location for application activity, if the activity has a network location.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - address: { - type: GraphQLString, - description: - 'An identifier for the network access point of the user device for the audit event.', - }, - _address: { - type: require('./element.schema'), - description: - 'An identifier for the network access point of the user device for the audit event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/network-type - type: { - type: CodeScalar, - description: - 'An identifier for the type of network access point that originated the audit event.', - }, - _type: { - type: require('./element.schema'), - description: - 'An identifier for the type of network access point that originated the audit event.', - }, - }), + name: 'AuditEventagentnetwork', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _address: { + type: require('./element.schema.js'), + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + address: { + type: GraphQLString, + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/network-type + type: { + type: CodeScalar, + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/auditevententity.schema.js b/src/resources/3_0_1/schemas/auditevententity.schema.js index df600c2d..29d2ab03 100644 --- a/src/resources/3_0_1/schemas/auditevententity.schema.js +++ b/src/resources/3_0_1/schemas/auditevententity.schema.js @@ -1,77 +1,109 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary AuditEvent.entity Schema + * @summary AuditEvententity Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventEntity', - description: 'Specific instances of data or objects that have been accessed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Identifies a specific instance of the entity. The reference should always be version specific.', - }, - reference: { - type: require('./reference.schema'), + name: 'AuditEvententity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'Identifies a specific instance of the entity. The reference should always be version specific.', + }, + reference: { + type: new GraphQLUnionType({ + name: 'AuditEvententityreference_reference_Union', description: 'Identifies a specific instance of the entity. The reference should be version specific.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-entity-type - type: { - type: require('./coding.schema'), - description: - 'The type of the object that was involved in this audit event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-role - role: { - type: require('./coding.schema'), - description: - 'Code representing the role the entity played in the event being audited.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/object-lifecycle-events - lifecycle: { - type: require('./coding.schema'), - description: 'Identifier for the data life-cycle stage for the entity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.schema')), - description: 'Security labels for the identified entity.', - }, - name: { - type: GraphQLString, - description: 'A name of the entity in the audit event.', - }, - _name: { - type: require('./element.schema'), - description: 'A name of the entity in the audit event.', - }, - description: { - type: GraphQLString, - description: 'Text that describes the entity in more detail.', - }, - _description: { - type: require('./element.schema'), - description: 'Text that describes the entity in more detail.', - }, - query: { - type: Base64BinaryScalar, - description: 'The query parameters for a query-type entities.', - }, - _query: { - type: require('./element.schema'), - description: 'The query parameters for a query-type entities.', - }, - detail: { - type: new GraphQLList(require('./auditevententitydetail.schema')), - description: - 'Tagged value pairs for conveying additional information about the entity.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Identifies a specific instance of the entity. The reference should be version specific.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-entity-type + type: { + type: require('./coding.schema.js'), + description: + 'The type of the object that was involved in this audit event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-role + role: { + type: require('./coding.schema.js'), + description: + 'Code representing the role the entity played in the event being audited.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/object-lifecycle-events + lifecycle: { + type: require('./coding.schema.js'), + description: 'Identifier for the data life-cycle stage for the entity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Security labels for the identified entity.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name of the entity in the audit event.', + }, + name: { + type: GraphQLString, + description: 'A name of the entity in the audit event.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Text that describes the entity in more detail.', + }, + description: { + type: GraphQLString, + description: 'Text that describes the entity in more detail.', + }, + _query: { + type: require('./element.schema.js'), + description: 'The query parameters for a query-type entities.', + }, + query: { + type: Base64BinaryScalar, + description: 'The query parameters for a query-type entities.', + }, + detail: { + type: new GraphQLList(require('./auditevententitydetail.schema.js')), + description: + 'Tagged value pairs for conveying additional information about the entity.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/auditevententitydetail.schema.js b/src/resources/3_0_1/schemas/auditevententitydetail.schema.js index 4df8831a..e898463d 100644 --- a/src/resources/3_0_1/schemas/auditevententitydetail.schema.js +++ b/src/resources/3_0_1/schemas/auditevententitydetail.schema.js @@ -1,35 +1,56 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary AuditEvent.entity.detail Schema + * @summary AuditEvententitydetail Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventEntityDetail', - description: - 'Tagged value pairs for conveying additional information about the entity.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - type: { - type: new GraphQLNonNull(GraphQLString), - description: 'The type of extra detail provided in the value.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of extra detail provided in the value.', - }, - value: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: - 'The details, base64 encoded. Used to carry bulk information.', - }, - _value: { - type: require('./element.schema'), - description: - 'The details, base64 encoded. Used to carry bulk information.', - }, - }), + name: 'AuditEvententitydetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of extra detail provided in the value.', + }, + type: { + type: new GraphQLNonNull(GraphQLString), + description: 'The type of extra detail provided in the value.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The details, base64 encoded. Used to carry bulk information.', + }, + value: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: + 'The details, base64 encoded. Used to carry bulk information.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/auditeventsource.schema.js b/src/resources/3_0_1/schemas/auditeventsource.schema.js index 36645929..851d3145 100644 --- a/src/resources/3_0_1/schemas/auditeventsource.schema.js +++ b/src/resources/3_0_1/schemas/auditeventsource.schema.js @@ -1,40 +1,56 @@ const { - GraphQLObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary AuditEvent.source Schema + * @summary AuditEventsource Schema */ module.exports = new GraphQLObjectType({ - name: 'AuditEventSource', - description: 'The system that is reporting the event.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - site: { - type: GraphQLString, - description: - 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', - }, - _site: { - type: require('./element.schema'), - description: - 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: 'Identifier of the source where the event was detected.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/audit-source-type - type: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Code specifying the type of source where event originated.', - }, - }), + name: 'AuditEventsource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _site: { + type: require('./element.schema.js'), + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + site: { + type: GraphQLString, + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + identifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: 'Identifier of the source where the event was detected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/audit-source-type + type: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Code specifying the type of source where event originated.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/backboneelement.schema.js b/src/resources/3_0_1/schemas/backboneelement.schema.js index a987bb44..948d825d 100644 --- a/src/resources/3_0_1/schemas/backboneelement.schema.js +++ b/src/resources/3_0_1/schemas/backboneelement.schema.js @@ -1,6 +1,4 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports @@ -8,13 +6,27 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'BackboneElement', - description: 'Base StructureDefinition for BackboneElement Type.', - fields: () => - extendSchema(require('./element.schema'), { - modifierExtension: { - type: new GraphQLList(require('./extension.schema')), - description: - 'May be used to represent additional information that is not part of the basic definition of the element, 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.', - }, - }), + description: 'Base StructureDefinition for BackboneElement Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/basic.schema.js b/src/resources/3_0_1/schemas/basic.schema.js index c8316413..e6efbfb7 100644 --- a/src/resources/3_0_1/schemas/basic.schema.js +++ b/src/resources/3_0_1/schemas/basic.schema.js @@ -1,20 +1,14 @@ -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BasicResourceType = new GraphQLEnumType({ - name: 'BasicResourceType', - values: { - Basic: { value: 'Basic' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -22,41 +16,129 @@ let BasicResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Basic', - description: 'Base StructureDefinition for Basic Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(BasicResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/basic-resource-type - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Identifies the 'type' of resource - equivalent to the resource name for other resources.", - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Basic Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Basic_Enum_schema', + values: { Basic: { value: 'Basic' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/basic-resource-type + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Identifies the 'type' of resource - equivalent to the resource name for other resources.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'Basicsubject_subject_Union', description: "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", - }, - created: { - type: DateScalar, - description: 'Identifies when the resource was first created.', - }, - _created: { - type: require('./element.schema'), - description: 'Identifies when the resource was first created.', - }, - author: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", + }, + _created: { + type: require('./element.schema.js'), + description: 'Identifies when the resource was first created.', + }, + created: { + type: DateScalar, + description: 'Identifies when the resource was first created.', + }, + author: { + type: new GraphQLUnionType({ + name: 'Basicauthor_author_Union', description: 'Indicates who was responsible for creating the resource instance.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Indicates who was responsible for creating the resource instance.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/binary.schema.js b/src/resources/3_0_1/schemas/binary.schema.js index adc9d097..6bbe54ab 100644 --- a/src/resources/3_0_1/schemas/binary.schema.js +++ b/src/resources/3_0_1/schemas/binary.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BinaryResourceType = new GraphQLEnumType({ - name: 'BinaryResourceType', - values: { - Binary: { value: 'Binary' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports @@ -22,35 +15,83 @@ let BinaryResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Binary', - description: 'Base StructureDefinition for Binary Resource.', - fields: () => - extendSchema(require('./resource.schema'), { - resourceType: { - type: new GraphQLNonNull(BinaryResourceType), - description: 'Type of this resource.', - }, - contentType: { - type: new GraphQLNonNull(CodeScalar), - description: - 'MimeType of the binary content represented as a standard MimeType (BCP 13).', - }, - _contentType: { - type: require('./element.schema'), - description: - 'MimeType of the binary content represented as a standard MimeType (BCP 13).', - }, - securityContext: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Binary Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Binary_Enum_schema', + values: { Binary: { value: 'Binary' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + contentType: { + type: new GraphQLNonNull(CodeScalar), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + securityContext: { + type: new GraphQLUnionType({ + name: 'BinarysecurityContext_securityContext_Union', description: 'Treat this binary as if it was this other resource for access control purposes.', - }, - content: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The actual content, base64 encoded.', - }, - _content: { - type: require('./element.schema'), - description: 'The actual content, base64 encoded.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Treat this binary as if it was this other resource for access control purposes.', + }, + _content: { + type: require('./element.schema.js'), + description: 'The actual content, base64 encoded.', + }, + content: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The actual content, base64 encoded.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/bodysite.schema.js b/src/resources/3_0_1/schemas/bodysite.schema.js index 8503f0f9..219bd083 100644 --- a/src/resources/3_0_1/schemas/bodysite.schema.js +++ b/src/resources/3_0_1/schemas/bodysite.schema.js @@ -1,20 +1,15 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BodySiteResourceType = new GraphQLEnumType({ - name: 'BodySiteResourceType', - values: { - BodySite: { value: 'BodySite' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,54 +17,122 @@ let BodySiteResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'BodySite', - description: 'Base StructureDefinition for BodySite Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(BodySiteResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier for this instance of the anatomical location.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this body site is in active use.', - }, - _active: { - type: require('./element.schema'), - description: 'Whether this body site is in active use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - code: { - type: require('./codeableconcept.schema'), - description: - 'Named anatomical location - ideally coded where possible.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bodysite-relative-location - qualifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.', - }, - description: { - type: GraphQLString, - description: - 'A summary, charactarization or explanation of the anatomic location.', - }, - _description: { - type: require('./element.schema'), - description: - 'A summary, charactarization or explanation of the anatomic location.', - }, - image: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Image or images used to identify a location.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The person to which the body site belongs.', - }, - }), + description: 'Base StructureDefinition for BodySite Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'BodySite_Enum_schema', + values: { BodySite: { value: 'BodySite' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Identifier for this instance of the anatomical location.', + }, + _active: { + type: require('./element.schema.js'), + description: 'Whether this body site is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this body site is in active use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + code: { + type: require('./codeableconcept.schema.js'), + description: 'Named anatomical location - ideally coded where possible.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bodysite-relative-location + qualifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A summary, charactarization or explanation of the anatomic location.', + }, + description: { + type: GraphQLString, + description: + 'A summary, charactarization or explanation of the anatomic location.', + }, + image: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image or images used to identify a location.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'BodySitepatient_patient_Union', + description: 'The person to which the body site belongs.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The person to which the body site belongs.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/bundle.schema.js b/src/resources/3_0_1/schemas/bundle.schema.js index 4d725217..7c41a03d 100644 --- a/src/resources/3_0_1/schemas/bundle.schema.js +++ b/src/resources/3_0_1/schemas/bundle.schema.js @@ -1,21 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let BundleResourceType = new GraphQLEnumType({ - name: 'BundleResourceType', - values: { - Bundle: { value: 'Bundle' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -23,51 +15,89 @@ let BundleResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Bundle', - description: 'Base StructureDefinition for Bundle Resource.', - fields: () => - extendSchema(require('./resource.schema'), { - resourceType: { - type: new GraphQLNonNull(BundleResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - "A persistent identifier for the batch that won't change as a batch is copied from server to server.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bundle-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the purpose of this bundle - how it was intended to be used.', - }, - _type: { - type: require('./element.schema'), - description: - 'Indicates the purpose of this bundle - how it was intended to be used.', - }, - total: { - type: UnsignedIntScalar, - description: - 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', - }, - _total: { - type: require('./element.schema'), - description: - 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', - }, - link: { - type: new GraphQLList(require('./bundlelink.schema')), - description: 'A series of links that provide context to this bundle.', - }, - entry: { - type: new GraphQLList(require('./bundleentry.schema')), - description: - 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', - }, - signature: { - type: require('./signature.schema'), - description: 'Digital Signature - base64 encoded. XML-DSIg or a JWT.', - }, - }), + description: 'Base StructureDefinition for Bundle Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Bundle_Enum_schema', + values: { Bundle: { value: 'Bundle' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + "A persistent identifier for the batch that won't change as a batch is copied from server to server.", + }, + _type: { + type: require('./element.schema.js'), + description: + 'Indicates the purpose of this bundle - how it was intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bundle-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose of this bundle - how it was intended to be used.', + }, + _total: { + type: require('./element.schema.js'), + description: + 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', + }, + total: { + type: UnsignedIntScalar, + description: + 'If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).', + }, + link: { + type: new GraphQLList(require('./bundlelink.schema.js')), + description: 'A series of links that provide context to this bundle.', + }, + entry: { + type: new GraphQLList(require('./bundleentry.schema.js')), + description: + 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', + }, + signature: { + type: require('./signature.schema.js'), + description: 'Digital Signature - base64 encoded. XML-DSIg or a JWT.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/bundleentry.schema.js b/src/resources/3_0_1/schemas/bundleentry.schema.js index 700d11ae..41ea1bc3 100644 --- a/src/resources/3_0_1/schemas/bundleentry.schema.js +++ b/src/resources/3_0_1/schemas/bundleentry.schema.js @@ -1,46 +1,67 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Bundle.entry Schema + * @summary Bundleentry Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleEntry', - description: - 'An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - fullUrl: { - type: UriScalar, - description: - 'The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', - }, - _fullUrl: { - type: require('./element.schema'), - description: - 'The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', - }, - resource: { - type: require('./resourcelist.schema'), - description: 'The Resources for the entry.', - }, - search: { - type: require('./bundleentrysearch.schema'), - description: - 'Information about the search process that lead to the creation of this entry.', - }, - request: { - type: require('./bundleentryrequest.schema'), - description: - 'Additional information about how this entry should be processed as part of a transaction.', - }, - response: { - type: require('./bundleentryresponse.schema'), - description: - 'Additional information about how this entry should be processed as part of a transaction.', - }, - }), + name: 'Bundleentry', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _fullUrl: { + type: require('./element.schema.js'), + description: + 'The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', + }, + fullUrl: { + type: UriScalar, + description: + 'The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', + }, + resource: { + type: require('./resourcelist.schema'), + description: 'The Resources for the entry.', + }, + search: { + type: require('./bundleentrysearch.schema.js'), + description: + 'Information about the search process that lead to the creation of this entry.', + }, + request: { + type: require('./bundleentryrequest.schema.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction.', + }, + response: { + type: require('./bundleentryresponse.schema.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/bundleentryrequest.schema.js b/src/resources/3_0_1/schemas/bundleentryrequest.schema.js index 6882cfde..a0e3093e 100644 --- a/src/resources/3_0_1/schemas/bundleentryrequest.schema.js +++ b/src/resources/3_0_1/schemas/bundleentryrequest.schema.js @@ -1,80 +1,101 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary Bundle.entry.request Schema + * @summary Bundleentryrequest Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleEntryRequest', - description: - 'Additional information about how this entry should be processed as part of a transaction.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/http-verb - method: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The HTTP verb for this entry in either a change history, or a transaction/ transaction response.', - }, - _method: { - type: require('./element.schema'), - description: - 'The HTTP verb for this entry in either a change history, or a transaction/ transaction response.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'The URL for this entry, relative to the root (the address to which the request is posted).', - }, - _url: { - type: require('./element.schema'), - description: - 'The URL for this entry, relative to the root (the address to which the request is posted).', - }, - ifNoneMatch: { - type: GraphQLString, - description: - "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - _ifNoneMatch: { - type: require('./element.schema'), - description: - "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - ifModifiedSince: { - type: InstantScalar, - description: - "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - _ifModifiedSince: { - type: require('./element.schema'), - description: - "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", - }, - ifMatch: { - type: GraphQLString, - description: - "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", - }, - _ifMatch: { - type: require('./element.schema'), - description: - "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", - }, - ifNoneExist: { - type: GraphQLString, - description: - "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", - }, - _ifNoneExist: { - type: require('./element.schema'), - description: - "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", - }, - }), + name: 'Bundleentryrequest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _method: { + type: require('./element.schema.js'), + description: + 'The HTTP verb for this entry in either a change history, or a transaction/ transaction response.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/http-verb + method: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The HTTP verb for this entry in either a change history, or a transaction/ transaction response.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + _ifNoneMatch: { + type: require('./element.schema.js'), + description: + "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifNoneMatch: { + type: GraphQLString, + description: + "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifModifiedSince: { + type: require('./element.schema.js'), + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifModifiedSince: { + type: InstantScalar, + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifMatch: { + type: require('./element.schema.js'), + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + ifMatch: { + type: GraphQLString, + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + _ifNoneExist: { + type: require('./element.schema.js'), + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + ifNoneExist: { + type: GraphQLString, + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/bundleentryresponse.schema.js b/src/resources/3_0_1/schemas/bundleentryresponse.schema.js index b1d82753..62c0c35a 100644 --- a/src/resources/3_0_1/schemas/bundleentryresponse.schema.js +++ b/src/resources/3_0_1/schemas/bundleentryresponse.schema.js @@ -1,63 +1,83 @@ -const UriScalar = require('../scalars/uri.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary Bundle.entry.response Schema + * @summary Bundleentryresponse Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleEntryResponse', - description: - 'Additional information about how this entry should be processed as part of a transaction.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - status: { - type: new GraphQLNonNull(GraphQLString), - description: - '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.', - }, - _status: { - type: require('./element.schema'), - description: - '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.', - }, - location: { - type: UriScalar, - description: - 'The location header created by processing this operation.', - }, - _location: { - type: require('./element.schema'), - description: - 'The location header created by processing this operation.', - }, - etag: { - type: GraphQLString, - description: - 'The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', - }, - _etag: { - type: require('./element.schema'), - description: - 'The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', - }, - lastModified: { - type: InstantScalar, - description: - 'The date/time that the resource was modified on the server.', - }, - _lastModified: { - type: require('./element.schema'), - description: - 'The date/time that the resource was modified on the server.', - }, - outcome: { - type: require('./resourcelist.schema'), - description: - 'An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.', - }, - }), + name: 'Bundleentryresponse', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _status: { + type: require('./element.schema.js'), + description: + '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.', + }, + status: { + type: new GraphQLNonNull(GraphQLString), + description: + '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.', + }, + _location: { + type: require('./element.schema.js'), + description: 'The location header created by processing this operation.', + }, + location: { + type: UriScalar, + description: 'The location header created by processing this operation.', + }, + _etag: { + type: require('./element.schema.js'), + description: + 'The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', + }, + etag: { + type: GraphQLString, + description: + 'The etag for the resource, it the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', + }, + _lastModified: { + type: require('./element.schema.js'), + description: + 'The date/time that the resource was modified on the server.', + }, + lastModified: { + type: InstantScalar, + description: + 'The date/time that the resource was modified on the server.', + }, + outcome: { + type: require('./resourcelist.schema'), + description: + 'An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/bundleentrysearch.schema.js b/src/resources/3_0_1/schemas/bundleentrysearch.schema.js index 75b21e7d..7fc34203 100644 --- a/src/resources/3_0_1/schemas/bundleentrysearch.schema.js +++ b/src/resources/3_0_1/schemas/bundleentrysearch.schema.js @@ -1,38 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Bundle.entry.search Schema + * @summary Bundleentrysearch Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleEntrySearch', - description: - 'Information about the search process that lead to the creation of this entry.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-entry-mode - mode: { - type: CodeScalar, - description: - "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", - }, - _mode: { - type: require('./element.schema'), - description: - "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", - }, - score: { - type: GraphQLFloat, - description: - "When searching, the server's search ranking score for the entry.", - }, - _score: { - type: require('./element.schema'), - description: - "When searching, the server's search ranking score for the entry.", - }, - }), + name: 'Bundleentrysearch', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-entry-mode + mode: { + type: CodeScalar, + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement.", + }, + _score: { + type: require('./element.schema.js'), + description: + "When searching, the server's search ranking score for the entry.", + }, + score: { + type: GraphQLFloat, + description: + "When searching, the server's search ranking score for the entry.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/bundlelink.schema.js b/src/resources/3_0_1/schemas/bundlelink.schema.js index 6e89faf2..7797735e 100644 --- a/src/resources/3_0_1/schemas/bundlelink.schema.js +++ b/src/resources/3_0_1/schemas/bundlelink.schema.js @@ -1,34 +1,56 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Bundle.link Schema + * @summary Bundlelink Schema */ module.exports = new GraphQLObjectType({ - name: 'BundleLink', - description: 'A series of links that provide context to this bundle.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - relation: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', - }, - _relation: { - type: require('./element.schema'), - description: - 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: 'The reference details for the link.', - }, - _url: { - type: require('./element.schema'), - description: 'The reference details for the link.', - }, - }), + name: 'Bundlelink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _relation: { + type: require('./element.schema.js'), + description: + 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', + }, + relation: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', + }, + _url: { + type: require('./element.schema.js'), + description: 'The reference details for the link.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'The reference details for the link.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatement.schema.js b/src/resources/3_0_1/schemas/capabilitystatement.schema.js index 863ddb4d..c962d07c 100644 --- a/src/resources/3_0_1/schemas/capabilitystatement.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatement.schema.js @@ -1,24 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CapabilityStatementResourceType = new GraphQLEnumType({ - name: 'CapabilityStatementResourceType', - values: { - CapabilityStatement: { value: 'CapabilityStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,240 +18,312 @@ let CapabilityStatementResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'CapabilityStatement', - description: 'Base StructureDefinition for CapabilityStatement Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CapabilityStatementResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the capability statement.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the capability statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this capability statement. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this capability statement. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the capability statement was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the capability statement was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the capability statement.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the capability statement.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate capability statement instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the capability statement is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this capability statement is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this capability statement is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/capability-statement-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', - }, - _kind: { - type: require('./element.schema'), - description: - 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', - }, - instantiates: { - type: new GraphQLList(UriScalar), - description: - 'Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.', - }, - _instantiates: { - type: require('./element.schema'), - description: - 'Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.', - }, - software: { - type: require('./capabilitystatementsoftware.schema'), - description: - 'Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.', - }, - implementation: { - type: require('./capabilitystatementimplementation.schema'), - description: - 'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.', - }, - fhirVersion: { - type: new GraphQLNonNull(IdScalar), - description: - 'The version of the FHIR specification on which this capability statement is based.', - }, - _fhirVersion: { - type: require('./element.schema'), - description: - 'The version of the FHIR specification on which this capability statement is based.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/unknown-content-code - acceptUnknown: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', - }, - _acceptUnknown: { - type: require('./element.schema'), - description: - 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', - }, - format: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: - 'A list of the formats supported by this implementation using their content types.', - }, - _format: { - type: require('./element.schema'), - description: - 'A list of the formats supported by this implementation using their content types.', - }, - patchFormat: { - type: new GraphQLList(CodeScalar), - description: - 'A list of the patch formats supported by this implementation using their content types.', - }, - _patchFormat: { - type: require('./element.schema'), - description: - 'A list of the patch formats supported by this implementation using their content types.', - }, - implementationGuide: { - type: new GraphQLList(UriScalar), - description: - 'A list of implementation guides that the server does (or should) support in their entirety.', - }, - _implementationGuide: { - type: require('./element.schema'), - description: - 'A list of implementation guides that the server does (or should) support in their entirety.', - }, - profile: { - type: new GraphQLList(require('./reference.schema')), - description: - "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", - }, - rest: { - type: new GraphQLList(require('./capabilitystatementrest.schema')), - description: - 'A definition of the restful capabilities of the solution, if any.', - }, - messaging: { - type: new GraphQLList(require('./capabilitystatementmessaging.schema')), - description: - 'A description of the messaging capabilities of the solution.', - }, - document: { - type: new GraphQLList(require('./capabilitystatementdocument.schema')), - description: 'A document definition.', - }, - }), + description: 'Base StructureDefinition for CapabilityStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CapabilityStatement_Enum_schema', + values: { CapabilityStatement: { value: 'CapabilityStatement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this capability statement is (or will be) published. The URL SHOULD include the major version of the capability statement. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the capability statement.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the capability statement.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this capability statement. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this capability statement. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the capability statement was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the capability statement was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the capability statement.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the capability statement.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate capability statement instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the capability statement is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this capability statement is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this capability statement is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/capability-statement-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + _instantiates: { + type: require('./element.schema.js'), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.', + }, + instantiates: { + type: new GraphQLList(UriScalar), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software implements or uses. This capability statement is a published API description that corresponds to a business service. The rest of the capability statement does not need to repeat the details of the referenced resource, but can do so.', + }, + software: { + type: require('./capabilitystatementsoftware.schema.js'), + description: + 'Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.', + }, + implementation: { + type: require('./capabilitystatementimplementation.schema.js'), + description: + 'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version of the FHIR specification on which this capability statement is based.', + }, + fhirVersion: { + type: new GraphQLNonNull(IdScalar), + description: + 'The version of the FHIR specification on which this capability statement is based.', + }, + _acceptUnknown: { + type: require('./element.schema.js'), + description: + 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/unknown-content-code + acceptUnknown: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that indicates whether the application accepts unknown elements or extensions when reading resources.', + }, + _format: { + type: require('./element.schema.js'), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + format: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + _patchFormat: { + type: require('./element.schema.js'), + description: + 'A list of the patch formats supported by this implementation using their content types.', + }, + patchFormat: { + type: new GraphQLList(CodeScalar), + description: + 'A list of the patch formats supported by this implementation using their content types.', + }, + _implementationGuide: { + type: require('./element.schema.js'), + description: + 'A list of implementation guides that the server does (or should) support in their entirety.', + }, + implementationGuide: { + type: new GraphQLList(UriScalar), + description: + 'A list of implementation guides that the server does (or should) support in their entirety.', + }, + profile: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CapabilityStatementprofile_profile_Union', + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + rest: { + type: new GraphQLList(require('./capabilitystatementrest.schema.js')), + description: + 'A definition of the restful capabilities of the solution, if any.', + }, + messaging: { + type: new GraphQLList( + require('./capabilitystatementmessaging.schema.js'), + ), + description: + 'A description of the messaging capabilities of the solution.', + }, + document: { + type: new GraphQLList(require('./capabilitystatementdocument.schema.js')), + description: 'A document definition.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementdocument.schema.js b/src/resources/3_0_1/schemas/capabilitystatementdocument.schema.js index 8d32ea5b..c88f1a23 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementdocument.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementdocument.schema.js @@ -1,41 +1,75 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.document Schema + * @summary CapabilityStatementdocument Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementDocument', - description: 'A document definition.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Mode of this document declaration - whether an application is a producer or consumer.', - }, - _mode: { - type: require('./element.schema'), - description: - 'Mode of this document declaration - whether an application is a producer or consumer.', - }, - documentation: { - type: GraphQLString, - description: - 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', - }, - profile: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'A constraint on a resource used in the document.', - }, - }), + name: 'CapabilityStatementdocument', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Mode of this document declaration - whether an application is a producer or consumer.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Mode of this document declaration - whether an application is a producer or consumer.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', + }, + profile: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CapabilityStatementdocumentprofile_profile_Union', + description: 'A constraint on a resource used in the document.', + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: 'A constraint on a resource used in the document.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementimplementation.schema.js b/src/resources/3_0_1/schemas/capabilitystatementimplementation.schema.js index fa915987..d1ddc27e 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementimplementation.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementimplementation.schema.js @@ -1,37 +1,58 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary CapabilityStatement.implementation Schema + * @summary CapabilityStatementimplementation Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementImplementation', - description: - 'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Information about the specific installation that this capability statement relates to.', - }, - _description: { - type: require('./element.schema'), - description: - 'Information about the specific installation that this capability statement relates to.', - }, - url: { - type: UriScalar, - description: - 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', - }, - }), + name: 'CapabilityStatementimplementation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Information about the specific installation that this capability statement relates to.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Information about the specific installation that this capability statement relates to.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + url: { + type: UriScalar, + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementmessaging.schema.js b/src/resources/3_0_1/schemas/capabilitystatementmessaging.schema.js index a8d1ad67..66b9a546 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementmessaging.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementmessaging.schema.js @@ -1,57 +1,74 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary CapabilityStatement.messaging Schema + * @summary CapabilityStatementmessaging Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementMessaging', - description: 'A description of the messaging capabilities of the solution.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - endpoint: { - type: new GraphQLList( - require('./capabilitystatementmessagingendpoint.schema'), - ), - description: - 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', - }, - reliableCache: { - type: UnsignedIntScalar, - description: - "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", - }, - _reliableCache: { - type: require('./element.schema'), - description: - "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", - }, - documentation: { - type: GraphQLString, - description: - "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", - }, - _documentation: { - type: require('./element.schema'), - description: - "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", - }, - supportedMessage: { - type: new GraphQLList( - require('./capabilitystatementmessagingsupportedmessage.schema'), - ), - description: - 'References to message definitions for messages this system can send or receive.', - }, - event: { - type: new GraphQLList( - require('./capabilitystatementmessagingevent.schema'), - ), - description: - "A description of the solution's support for an event at this end-point.", - }, - }), + name: 'CapabilityStatementmessaging', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + endpoint: { + type: new GraphQLList( + require('./capabilitystatementmessagingendpoint.schema.js'), + ), + description: + 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', + }, + _reliableCache: { + type: require('./element.schema.js'), + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + reliableCache: { + type: UnsignedIntScalar, + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", + }, + documentation: { + type: GraphQLString, + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", + }, + supportedMessage: { + type: new GraphQLList( + require('./capabilitystatementmessagingsupportedmessage.schema.js'), + ), + description: + 'References to message definitions for messages this system can send or receive.', + }, + event: { + type: new GraphQLList( + require('./capabilitystatementmessagingevent.schema.js'), + ), + description: + "A description of the solution's support for an event at this end-point.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementmessagingendpoint.schema.js b/src/resources/3_0_1/schemas/capabilitystatementmessagingendpoint.schema.js index 0ec2005a..feb95ac7 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementmessagingendpoint.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementmessagingendpoint.schema.js @@ -1,33 +1,54 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary CapabilityStatement.messaging.endpoint Schema + * @summary CapabilityStatementmessagingendpoint Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementMessagingEndpoint', - description: - 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-transport - protocol: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', - }, - address: { - type: new GraphQLNonNull(UriScalar), - description: - 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', - }, - _address: { - type: require('./element.schema'), - description: - 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', - }, - }), + name: 'CapabilityStatementmessagingendpoint', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-transport + protocol: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', + }, + _address: { + type: require('./element.schema.js'), + description: + 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + address: { + type: new GraphQLNonNull(UriScalar), + description: + 'The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementmessagingevent.schema.js b/src/resources/3_0_1/schemas/capabilitystatementmessagingevent.schema.js index 46dacb04..77cc7ca2 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementmessagingevent.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementmessagingevent.schema.js @@ -1,71 +1,115 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.messaging.event Schema + * @summary CapabilityStatementmessagingevent Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementMessagingEvent', - description: - "A description of the solution's support for an event at this end-point.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'A coded identifier of a supported messaging event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category - category: { - type: CodeScalar, - description: 'The impact of the content of the message.', - }, - _category: { - type: require('./element.schema'), - description: 'The impact of the content of the message.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-capability-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The mode of this event declaration - whether an application is a sender or receiver.', - }, - _mode: { - type: require('./element.schema'), - description: - 'The mode of this event declaration - whether an application is a sender or receiver.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - focus: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A resource associated with the event. This is the resource that defines the event.', - }, - _focus: { - type: require('./element.schema'), - description: - 'A resource associated with the event. This is the resource that defines the event.', - }, - request: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Information about the request for this event.', - }, - response: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Information about the response for this event.', - }, - documentation: { - type: GraphQLString, - description: - 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', - }, - }), + name: 'CapabilityStatementmessagingevent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'A coded identifier of a supported messaging event.', + }, + _category: { + type: require('./element.schema.js'), + description: 'The impact of the content of the message.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category + category: { + type: CodeScalar, + description: 'The impact of the content of the message.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'The mode of this event declaration - whether an application is a sender or receiver.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-capability-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The mode of this event declaration - whether an application is a sender or receiver.', + }, + _focus: { + type: require('./element.schema.js'), + description: + 'A resource associated with the event. This is the resource that defines the event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + focus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A resource associated with the event. This is the resource that defines the event.', + }, + request: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CapabilityStatementmessagingeventrequest_request_Union', + description: 'Information about the request for this event.', + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: 'Information about the request for this event.', + }, + response: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CapabilityStatementmessagingeventresponse_response_Union', + description: 'Information about the response for this event.', + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: 'Information about the response for this event.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance on how this event is handled, such as internal system trigger points, business rules, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementmessagingsupportedmessage.schema.js b/src/resources/3_0_1/schemas/capabilitystatementmessagingsupportedmessage.schema.js index 23f45302..2a5accb2 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementmessagingsupportedmessage.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementmessagingsupportedmessage.schema.js @@ -1,33 +1,68 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.messaging.supportedMessage Schema + * @summary CapabilityStatementmessagingsupportedMessage Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementMessagingSupportedMessage', - description: - 'References to message definitions for messages this system can send or receive.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-capability-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The mode of this event declaration - whether application is sender or receiver.', - }, - _mode: { - type: require('./element.schema'), - description: - 'The mode of this event declaration - whether application is sender or receiver.', - }, - definition: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', - }, - }), + name: 'CapabilityStatementmessagingsupportedMessage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-capability-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + definition: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'CapabilityStatementmessagingsupportedMessagedefinition_definition_Union', + description: + 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', + types: () => [require('./messagedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MessageDefinition') { + return require('./messagedefinition.schema.js'); + } + }, + }), + ), + description: + 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementrest.schema.js b/src/resources/3_0_1/schemas/capabilitystatementrest.schema.js index fc61a944..00e050f0 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementrest.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementrest.schema.js @@ -1,80 +1,96 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest Schema + * @summary CapabilityStatementrest Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementRest', - description: - 'A definition of the restful capabilities of the solution, if any.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/restful-capability-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', - }, - _mode: { - type: require('./element.schema'), - description: - 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', - }, - documentation: { - type: GraphQLString, - description: - "Information about the system's restful capabilities that apply across all applications, such as security.", - }, - _documentation: { - type: require('./element.schema'), - description: - "Information about the system's restful capabilities that apply across all applications, such as security.", - }, - security: { - type: require('./capabilitystatementrestsecurity.schema'), - description: - 'Information about security implementation from an interface perspective - what a client needs to know.', - }, - resource: { - type: new GraphQLList( - require('./capabilitystatementrestresource.schema'), - ), - description: - 'A specification of the restful capabilities of the solution for a specific resource type.', - }, - interaction: { - type: new GraphQLList( - require('./capabilitystatementrestinteraction.schema'), - ), - description: - 'A specification of restful operations supported by the system.', - }, - operation: { - type: new GraphQLList( - require('./capabilitystatementrestoperation.schema'), - ), - description: - 'Definition of an operation or a named query together with its parameters and their meaning and type.', - }, - compartment: { - type: new GraphQLList(UriScalar), - description: - 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', - }, - _compartment: { - type: require('./element.schema'), - description: - 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', - }, - }), + name: 'CapabilityStatementrest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/restful-capability-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + documentation: { + type: GraphQLString, + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + security: { + type: require('./capabilitystatementrestsecurity.schema.js'), + description: + 'Information about security implementation from an interface perspective - what a client needs to know.', + }, + resource: { + type: new GraphQLList( + require('./capabilitystatementrestresource.schema.js'), + ), + description: + 'A specification of the restful capabilities of the solution for a specific resource type.', + }, + interaction: { + type: new GraphQLList( + require('./capabilitystatementrestinteraction.schema.js'), + ), + description: + 'A specification of restful operations supported by the system.', + }, + operation: { + type: new GraphQLList( + require('./capabilitystatementrestoperation.schema.js'), + ), + description: + 'Definition of an operation or a named query together with its parameters and their meaning and type.', + }, + _compartment: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', + }, + compartment: { + type: new GraphQLList(UriScalar), + description: + 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementrestinteraction.schema.js b/src/resources/3_0_1/schemas/capabilitystatementrestinteraction.schema.js index 9d30ad50..08be2c4f 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementrestinteraction.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementrestinteraction.schema.js @@ -1,37 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.interaction Schema + * @summary CapabilityStatementrestinteraction Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementRestInteraction', - description: 'A specification of restful operations supported by the system.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/system-restful-interaction - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A coded identifier of the operation, supported by the system.', - }, - _code: { - type: require('./element.schema'), - description: - 'A coded identifier of the operation, supported by the system.', - }, - documentation: { - type: GraphQLString, - description: - 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', - }, - }), + name: 'CapabilityStatementrestinteraction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A coded identifier of the operation, supported by the system.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/system-restful-interaction + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A coded identifier of the operation, supported by the system.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementrestoperation.schema.js b/src/resources/3_0_1/schemas/capabilitystatementrestoperation.schema.js index 21eed8f4..ae594e52 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementrestoperation.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementrestoperation.schema.js @@ -1,30 +1,63 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary CapabilityStatement.rest.operation Schema + * @summary CapabilityStatementrestoperation Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementRestOperation', - description: - 'Definition of an operation or a named query together with its parameters and their meaning and type.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', - }, - definition: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Where the formal definition can be found.', - }, - }), + name: 'CapabilityStatementrestoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', + }, + definition: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CapabilityStatementrestoperationdefinition_definition_Union', + description: 'Where the formal definition can be found.', + types: () => [require('./operationdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationDefinition') { + return require('./operationdefinition.schema.js'); + } + }, + }), + ), + description: 'Where the formal definition can be found.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementrestresource.schema.js b/src/resources/3_0_1/schemas/capabilitystatementrestresource.schema.js index 387b3fde..fb948522 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementrestresource.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementrestresource.schema.js @@ -1,165 +1,189 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.resource Schema + * @summary CapabilityStatementrestresource Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementRestResource', - description: - 'A specification of the restful capabilities of the solution for a specific resource type.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'A type of resource exposed via the restful interface.', - }, - _type: { - type: require('./element.schema'), - description: 'A type of resource exposed via the restful interface.', - }, - profile: { - type: require('./reference.schema'), + name: 'CapabilityStatementrestresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'A type of resource exposed via the restful interface.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'A type of resource exposed via the restful interface.', + }, + profile: { + type: new GraphQLUnionType({ + name: 'CapabilityStatementrestresourceprofile_profile_Union', description: "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", - }, - documentation: { - type: GraphQLString, - description: - 'Additional information about the resource type used by the system.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'Additional information about the resource type used by the system.', - }, - interaction: { - type: new GraphQLList( - new GraphQLNonNull( - require('./capabilitystatementrestresourceinteraction.schema'), - ), - ), - description: - 'Identifies a restful operation supported by the solution.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/versioning-policy - versioning: { - type: CodeScalar, - description: - "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", - }, - _versioning: { - type: require('./element.schema'), - description: - "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", - }, - readHistory: { - type: GraphQLBoolean, - description: - 'A flag for whether the server is able to return past versions as part of the vRead operation.', - }, - _readHistory: { - type: require('./element.schema'), - description: - 'A flag for whether the server is able to return past versions as part of the vRead operation.', - }, - updateCreate: { - type: GraphQLBoolean, - description: - 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', - }, - _updateCreate: { - type: require('./element.schema'), - description: - 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', - }, - conditionalCreate: { - type: GraphQLBoolean, - description: - 'A flag that indicates that the server supports conditional create.', - }, - _conditionalCreate: { - type: require('./element.schema'), - description: - 'A flag that indicates that the server supports conditional create.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conditional-read-status - conditionalRead: { - type: CodeScalar, - description: - 'A code that indicates how the server supports conditional read.', - }, - _conditionalRead: { - type: require('./element.schema'), - description: - 'A code that indicates how the server supports conditional read.', - }, - conditionalUpdate: { - type: GraphQLBoolean, - description: - 'A flag that indicates that the server supports conditional update.', - }, - _conditionalUpdate: { - type: require('./element.schema'), - description: - 'A flag that indicates that the server supports conditional update.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/conditional-delete-status - conditionalDelete: { - type: CodeScalar, - description: - 'A code that indicates how the server supports conditional delete.', - }, - _conditionalDelete: { - type: require('./element.schema'), - description: - 'A code that indicates how the server supports conditional delete.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reference-handling-policy - referencePolicy: { - type: new GraphQLList(CodeScalar), - description: - 'A set of flags that defines how references are supported.', - }, - _referencePolicy: { - type: require('./element.schema'), - description: - 'A set of flags that defines how references are supported.', - }, - searchInclude: { - type: new GraphQLList(GraphQLString), - description: 'A list of _include values supported by the server.', - }, - _searchInclude: { - type: require('./element.schema'), - description: 'A list of _include values supported by the server.', - }, - searchRevInclude: { - type: new GraphQLList(GraphQLString), - description: - 'A list of _revinclude (reverse include) values supported by the server.', - }, - _searchRevInclude: { - type: require('./element.schema'), - description: - 'A list of _revinclude (reverse include) values supported by the server.', - }, - searchParam: { - type: new GraphQLList( - require('./capabilitystatementrestresourcesearchparam.schema'), + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + description: + "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Additional information about the resource type used by the system.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional information about the resource type used by the system.', + }, + interaction: { + type: new GraphQLList( + new GraphQLNonNull( + require('./capabilitystatementrestresourceinteraction.schema.js'), ), - description: - 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', - }, - }), + ), + description: 'Identifies a restful operation supported by the solution.', + }, + _versioning: { + type: require('./element.schema.js'), + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/versioning-policy + versioning: { + type: CodeScalar, + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + _readHistory: { + type: require('./element.schema.js'), + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + readHistory: { + type: GraphQLBoolean, + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + _updateCreate: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + updateCreate: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + _conditionalCreate: { + type: require('./element.schema.js'), + description: + 'A flag that indicates that the server supports conditional create.', + }, + conditionalCreate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional create.', + }, + _conditionalRead: { + type: require('./element.schema.js'), + description: + 'A code that indicates how the server supports conditional read.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conditional-read-status + conditionalRead: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional read.', + }, + _conditionalUpdate: { + type: require('./element.schema.js'), + description: + 'A flag that indicates that the server supports conditional update.', + }, + conditionalUpdate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional update.', + }, + _conditionalDelete: { + type: require('./element.schema.js'), + description: + 'A code that indicates how the server supports conditional delete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conditional-delete-status + conditionalDelete: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional delete.', + }, + _referencePolicy: { + type: require('./element.schema.js'), + description: 'A set of flags that defines how references are supported.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reference-handling-policy + referencePolicy: { + type: new GraphQLList(CodeScalar), + description: 'A set of flags that defines how references are supported.', + }, + _searchInclude: { + type: require('./element.schema.js'), + description: 'A list of _include values supported by the server.', + }, + searchInclude: { + type: new GraphQLList(GraphQLString), + description: 'A list of _include values supported by the server.', + }, + _searchRevInclude: { + type: require('./element.schema.js'), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchRevInclude: { + type: new GraphQLList(GraphQLString), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchParam: { + type: new GraphQLList( + require('./capabilitystatementrestresourcesearchparam.schema.js'), + ), + description: + 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementrestresourceinteraction.schema.js b/src/resources/3_0_1/schemas/capabilitystatementrestresourceinteraction.schema.js index db90c943..0927826d 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementrestresourceinteraction.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementrestresourceinteraction.schema.js @@ -1,37 +1,59 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.resource.interaction Schema + * @summary CapabilityStatementrestresourceinteraction Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementRestResourceInteraction', - description: 'Identifies a restful operation supported by the solution.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/type-restful-interaction - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Coded identifier of the operation, supported by the system resource.', - }, - _code: { - type: require('./element.schema'), - description: - 'Coded identifier of the operation, supported by the system resource.', - }, - documentation: { - type: GraphQLString, - description: - "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", - }, - _documentation: { - type: require('./element.schema'), - description: - "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", - }, - }), + name: 'CapabilityStatementrestresourceinteraction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/type-restful-interaction + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + documentation: { + type: GraphQLString, + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementrestresourcesearchparam.schema.js b/src/resources/3_0_1/schemas/capabilitystatementrestresourcesearchparam.schema.js index 1492e686..b2729d20 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementrestresourcesearchparam.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementrestresourcesearchparam.schema.js @@ -1,57 +1,78 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.resource.searchParam Schema + * @summary CapabilityStatementrestresourcesearchParam Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementRestResourceSearchParam', - description: - 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name of the search parameter used in the interface.', - }, - _name: { - type: require('./element.schema'), - description: 'The name of the search parameter used in the interface.', - }, - definition: { - type: UriScalar, - description: - 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url]()).', - }, - _definition: { - type: require('./element.schema'), - description: - 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url]()).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - _type: { - type: require('./element.schema'), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - documentation: { - type: GraphQLString, - description: - 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', - }, - }), + name: 'CapabilityStatementrestresourcesearchParam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of the search parameter used in the interface.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the search parameter used in the interface.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url]()).', + }, + definition: { + type: UriScalar, + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url]()).', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + documentation: { + type: GraphQLString, + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementrestsecurity.schema.js b/src/resources/3_0_1/schemas/capabilitystatementrestsecurity.schema.js index 84625b99..36ae8d4e 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementrestsecurity.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementrestsecurity.schema.js @@ -1,51 +1,67 @@ const { - GraphQLObjectType, - GraphQLBoolean, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary CapabilityStatement.rest.security Schema + * @summary CapabilityStatementrestsecurity Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementRestSecurity', - description: - 'Information about security implementation from an interface perspective - what a client needs to know.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - cors: { - type: GraphQLBoolean, - description: - 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', - }, - _cors: { - type: require('./element.schema'), - description: - 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/restful-security-service - service: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Types of security services that are supported/required by the system.', - }, - description: { - type: GraphQLString, - description: 'General description of how security works.', - }, - _description: { - type: require('./element.schema'), - description: 'General description of how security works.', - }, - certificate: { - type: new GraphQLList( - require('./capabilitystatementrestsecuritycertificate.schema'), - ), - description: 'Certificates associated with security profiles.', - }, - }), + name: 'CapabilityStatementrestsecurity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _cors: { + type: require('./element.schema.js'), + description: + 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', + }, + cors: { + type: GraphQLBoolean, + description: + 'Server adds CORS headers when responding to requests - this enables javascript applications to use the server.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/restful-security-service + service: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Types of security services that are supported/required by the system.', + }, + _description: { + type: require('./element.schema.js'), + description: 'General description of how security works.', + }, + description: { + type: GraphQLString, + description: 'General description of how security works.', + }, + certificate: { + type: new GraphQLList( + require('./capabilitystatementrestsecuritycertificate.schema.js'), + ), + description: 'Certificates associated with security profiles.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementrestsecuritycertificate.schema.js b/src/resources/3_0_1/schemas/capabilitystatementrestsecuritycertificate.schema.js index c09c0795..473886cb 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementrestsecuritycertificate.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementrestsecuritycertificate.schema.js @@ -1,33 +1,50 @@ -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports - * @summary CapabilityStatement.rest.security.certificate Schema + * @summary CapabilityStatementrestsecuritycertificate Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementRestSecurityCertificate', - description: 'Certificates associated with security profiles.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - type: { - type: CodeScalar, - description: 'Mime type for a certificate.', - }, - _type: { - type: require('./element.schema'), - description: 'Mime type for a certificate.', - }, - blob: { - type: Base64BinaryScalar, - description: 'Actual certificate.', - }, - _blob: { - type: require('./element.schema'), - description: 'Actual certificate.', - }, - }), + name: 'CapabilityStatementrestsecuritycertificate', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Mime type for a certificate.', + }, + type: { + type: CodeScalar, + description: 'Mime type for a certificate.', + }, + _blob: { + type: require('./element.schema.js'), + description: 'Actual certificate.', + }, + blob: { + type: Base64BinaryScalar, + description: 'Actual certificate.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/capabilitystatementsoftware.schema.js b/src/resources/3_0_1/schemas/capabilitystatementsoftware.schema.js index 85e98e6d..253b1544 100644 --- a/src/resources/3_0_1/schemas/capabilitystatementsoftware.schema.js +++ b/src/resources/3_0_1/schemas/capabilitystatementsoftware.schema.js @@ -1,43 +1,64 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary CapabilityStatement.software Schema + * @summary CapabilityStatementsoftware Schema */ module.exports = new GraphQLObjectType({ - name: 'CapabilityStatementSoftware', - description: - 'Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Name software is known by.', - }, - _name: { - type: require('./element.schema'), - description: 'Name software is known by.', - }, - version: { - type: GraphQLString, - description: - 'The version identifier for the software covered by this statement.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version identifier for the software covered by this statement.', - }, - releaseDate: { - type: DateTimeScalar, - description: 'Date this version of the software was released.', - }, - _releaseDate: { - type: require('./element.schema'), - description: 'Date this version of the software was released.', - }, - }), + name: 'CapabilityStatementsoftware', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Name software is known by.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name software is known by.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version identifier for the software covered by this statement.', + }, + version: { + type: GraphQLString, + description: + 'The version identifier for the software covered by this statement.', + }, + _releaseDate: { + type: require('./element.schema.js'), + description: 'Date this version of the software was released.', + }, + releaseDate: { + type: DateTimeScalar, + description: 'Date this version of the software was released.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/careplan.schema.js b/src/resources/3_0_1/schemas/careplan.schema.js index 014e0b33..3e784930 100644 --- a/src/resources/3_0_1/schemas/careplan.schema.js +++ b/src/resources/3_0_1/schemas/careplan.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CarePlanResourceType = new GraphQLEnumType({ - name: 'CarePlanResourceType', - values: { - CarePlan: { value: 'CarePlan' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,130 +16,354 @@ let CarePlanResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'CarePlan', - description: 'Base StructureDefinition for CarePlan Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CarePlanResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies the protocol, questionnaire, guideline or other specification the care plan should be conducted in accordance with.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A care plan that is fulfilled in whole or in part by this care plan.', - }, - replaces: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Completed or terminated care plan whose function is taken by this new care plan.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A larger care plan of which this particular care plan is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', - }, - _status: { - type: require('./element.schema'), - description: - 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', - }, - _intent: { - type: require('./element.schema'), - description: - 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", - }, - title: { - type: GraphQLString, - description: 'Human-friendly name for the CarePlan.', - }, - _title: { - type: require('./element.schema'), - description: 'Human-friendly name for the CarePlan.', - }, - description: { - type: GraphQLString, - description: 'A description of the scope and nature of the plan.', - }, - _description: { - type: require('./element.schema'), - description: 'A description of the scope and nature of the plan.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the patient or group whose intended care is described by the plan.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for CarePlan Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CarePlan_Enum_schema', + values: { CarePlan: { value: 'CarePlan' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlandefinition_definition_Union', + description: + 'Identifies the protocol, questionnaire, guideline or other specification the care plan should be conducted in accordance with.', + types: () => [ + require('./plandefinition.schema.js'), + require('./questionnaire.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); + } + }, + }), + ), + description: + 'Identifies the protocol, questionnaire, guideline or other specification the care plan should be conducted in accordance with.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanbasedOn_basedOn_Union', + description: + 'A care plan that is fulfilled in whole or in part by this care plan.', + types: () => [require('./careplan.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + }, + }), + ), + description: + 'A care plan that is fulfilled in whole or in part by this care plan.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanreplaces_replaces_Union', + description: + 'Completed or terminated care plan whose function is taken by this new care plan.', + types: () => [require('./careplan.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + }, + }), + ), + description: + 'Completed or terminated care plan whose function is taken by this new care plan.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanpartOf_partOf_Union', + description: + 'A larger care plan of which this particular care plan is a component or step.', + types: () => [require('./careplan.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + }, + }), + ), + description: + 'A larger care plan of which this particular care plan is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", + }, + _title: { + type: require('./element.schema.js'), + description: 'Human-friendly name for the CarePlan.', + }, + title: { + type: GraphQLString, + description: 'Human-friendly name for the CarePlan.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of the scope and nature of the plan.', + }, + description: { + type: GraphQLString, + description: 'A description of the scope and nature of the plan.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CarePlansubject_subject_Union', + description: + 'Identifies the patient or group whose intended care is described by the plan.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'Identifies the patient or group whose intended care is described by the plan.', + }, + context: { + type: new GraphQLUnionType({ + name: 'CarePlancontext_context_Union', description: 'Identifies the original context in which this particular CarePlan was created.', - }, - period: { - type: require('./period.schema'), - description: - 'Indicates when the plan did (or is intended to) come into effect and end.', - }, - author: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', - }, - careTeam: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', - }, - addresses: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', - }, - supportingInfo: { - type: new GraphQLList(require('./reference.schema')), - description: - "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", - }, - goal: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Describes the intended objective(s) of carrying out the care plan.', - }, - activity: { - type: new GraphQLList(require('./careplanactivity.schema')), - description: - 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: 'General notes about the care plan not covered elsewhere.', - }, - }), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'Identifies the original context in which this particular CarePlan was created.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates when the plan did (or is intended to) come into effect and end.', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanauthor_author_Union', + description: + 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + 'Identifies the individual(s) or ogranization who is responsible for the content of the care plan.', + }, + careTeam: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlancareTeam_careTeam_Union', + description: + 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', + types: () => [require('./careteam.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', + }, + addresses: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanaddresses_addresses_Union', + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlansupportingInfo_supportingInfo_Union', + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include co-morbidities, recent procedures, limitations, recent assessments, etc.", + }, + goal: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlangoal_goal_Union', + description: + 'Describes the intended objective(s) of carrying out the care plan.', + types: () => [require('./goal.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); + } + }, + }), + ), + description: + 'Describes the intended objective(s) of carrying out the care plan.', + }, + activity: { + type: new GraphQLList(require('./careplanactivity.schema.js')), + description: + 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'General notes about the care plan not covered elsewhere.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/careplanactivity.schema.js b/src/resources/3_0_1/schemas/careplanactivity.schema.js index 145c4f1a..08224fcb 100644 --- a/src/resources/3_0_1/schemas/careplanactivity.schema.js +++ b/src/resources/3_0_1/schemas/careplanactivity.schema.js @@ -1,42 +1,122 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary CarePlan.activity Schema + * @summary CarePlanactivity Schema */ module.exports = new GraphQLObjectType({ - name: 'CarePlanActivity', - description: - 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-outcome - outcomeCodeableConcept: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).', - }, - outcomeReference: { - type: new GraphQLList(require('./reference.schema')), - description: - "Details of the outcome or action resulting from the activity. The reference to an 'event' resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).", - }, - progress: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Notes about the adherence/status/progress of the activity.', - }, - reference: { - type: require('./reference.schema'), + name: 'CarePlanactivity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-outcome + outcomeCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).', + }, + outcomeReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivityoutcomeReference_outcomeReference_Union', + description: + "Details of the outcome or action resulting from the activity. The reference to an 'event' resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Details of the outcome or action resulting from the activity. The reference to an 'event' resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).", + }, + progress: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Notes about the adherence/status/progress of the activity.', + }, + reference: { + type: new GraphQLUnionType({ + name: 'CarePlanactivityreference_reference_Union', description: 'The details of the proposed activity represented in a specific resource.', - }, - detail: { - type: require('./careplanactivitydetail.schema'), - description: - "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", - }, - }), + types: () => [ + require('./appointment.schema.js'), + require('./communicationrequest.schema.js'), + require('./devicerequest.schema.js'), + require('./medicationrequest.schema.js'), + require('./nutritionorder.schema.js'), + require('./task.schema.js'), + require('./procedurerequest.schema.js'), + require('./referralrequest.schema.js'), + require('./visionprescription.schema.js'), + require('./requestgroup.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + if (data && data.resourceType === 'DeviceRequest') { + return require('./devicerequest.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'Task') { + return require('./task.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + if (data && data.resourceType === 'RequestGroup') { + return require('./requestgroup.schema.js'); + } + }, + }), + description: + 'The details of the proposed activity represented in a specific resource.', + }, + detail: { + type: require('./careplanactivitydetail.schema.js'), + description: + "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/careplanactivitydetail.schema.js b/src/resources/3_0_1/schemas/careplanactivitydetail.schema.js index 9547d935..e0cb271c 100644 --- a/src/resources/3_0_1/schemas/careplanactivitydetail.schema.js +++ b/src/resources/3_0_1/schemas/careplanactivitydetail.schema.js @@ -1,149 +1,265 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLString, GraphQLList, + GraphQLUnionType, GraphQLNonNull, - GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CarePlan.activity.detail Schema + * @summary CarePlanactivitydetail Schema */ module.exports = new GraphQLObjectType({ - name: 'CarePlanActivityDetail', - description: - "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-category - category: { - type: require('./codeableconcept.schema'), - description: - 'High-level categorization of the type of activity in a care plan.', - }, - definition: { - type: require('./reference.schema'), + name: 'CarePlanactivitydetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'High-level categorization of the type of activity in a care plan.', + }, + definition: { + type: new GraphQLUnionType({ + name: 'CarePlanactivitydetaildefinition_definition_Union', description: 'Identifies the protocol, questionnaire, guideline or other specification the planned activity should be conducted in accordance with.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity - code: { - type: require('./codeableconcept.schema'), - description: - 'Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/activity-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', - }, - goal: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies what progress is being made for the specific activity.', - }, - _status: { - type: require('./element.schema'), - description: - 'Identifies what progress is being made for the specific activity.', - }, - statusReason: { - type: GraphQLString, - description: - "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", - }, - _statusReason: { - type: require('./element.schema'), - description: - "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", - }, - prohibited: { - type: GraphQLBoolean, - description: - 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, indicates that the described activity is one that should be engaged in when following the plan.', - }, - _prohibited: { - type: require('./element.schema'), - description: - 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, indicates that the described activity is one that should be engaged in when following the plan.', - }, - scheduledTiming: { - type: require('./timing.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - scheduledPeriod: { - type: require('./period.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - scheduledString: { - type: GraphQLString, - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - _scheduledString: { - type: require('./element.schema'), - description: - 'The period, timing or frequency upon which the described activity is to occur.', - }, - location: { - type: require('./reference.schema'), + types: () => [ + require('./plandefinition.schema.js'), + require('./activitydefinition.schema.js'), + require('./questionnaire.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); + } + }, + }), + description: + 'Identifies the protocol, questionnaire, guideline or other specification the planned activity should be conducted in accordance with.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Detailed description of the type of planned activity; e.g. What lab test, what procedure, what kind of encounter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/activity-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailreasonReference_reasonReference_Union', + description: + 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Provides the health condition(s) that drove the inclusion of this particular activity as part of the plan.', + }, + goal: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailgoal_goal_Union', + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + types: () => [require('./goal.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); + } + }, + }), + ), + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Identifies what progress is being made for the specific activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-plan-activity-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies what progress is being made for the specific activity.', + }, + _statusReason: { + type: require('./element.schema.js'), + description: + "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", + }, + statusReason: { + type: GraphQLString, + description: + "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", + }, + _prohibited: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, indicates that the described activity is one that should be engaged in when following the plan.', + }, + prohibited: { + type: GraphQLBoolean, + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, indicates that the described activity is one that should be engaged in when following the plan.', + }, + scheduledTiming: { + type: require('./timing.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledPeriod: { + type: require('./period.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _scheduledString: { + type: require('./element.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledString: { + type: GraphQLString, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: new GraphQLUnionType({ + name: 'CarePlanactivitydetaillocation_location_Union', description: 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', - }, - performer: { - type: new GraphQLList(require('./reference.schema')), - description: - "Identifies who's expected to be involved in the activity.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productCodeableConcept: { - type: require('./codeableconcept.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailperformer_performer_Union', + description: + "Identifies who's expected to be involved in the activity.", + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: "Identifies who's expected to be involved in the activity.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + productReference: { + type: new GraphQLUnionType({ + name: 'CarePlanactivitydetailproductReference_productReference_Union', description: 'Identifies the food, drug or other product to be consumed or supplied in the activity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - productReference: { - type: require('./reference.schema'), - description: - 'Identifies the food, drug or other product to be consumed or supplied in the activity.', - }, - dailyAmount: { - type: require('./quantity.schema'), - description: - 'Identifies the quantity expected to be consumed in a given day.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', - }, - description: { - type: GraphQLString, - description: - 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', - }, - _description: { - type: require('./element.schema'), - description: - 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', - }, - }), + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + dailyAmount: { + type: require('./quantity.schema.js'), + description: + 'Identifies the quantity expected to be consumed in a given day.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + description: { + type: GraphQLString, + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/careteam.schema.js b/src/resources/3_0_1/schemas/careteam.schema.js index 08120e8b..75480b5f 100644 --- a/src/resources/3_0_1/schemas/careteam.schema.js +++ b/src/resources/3_0_1/schemas/careteam.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CareTeamResourceType = new GraphQLEnumType({ - name: 'CareTeamResourceType', - values: { - CareTeam: { value: 'CareTeam' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,79 +16,191 @@ let CareTeamResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'CareTeam', - description: 'Base StructureDefinition for CareTeam Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CareTeamResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-team-status - status: { - type: CodeScalar, - description: 'Indicates the current state of the care team.', - }, - _status: { - type: require('./element.schema'), - description: 'Indicates the current state of the care team.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/care-team-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.', - }, - name: { - type: GraphQLString, - description: - "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", - }, - _name: { - type: require('./element.schema'), - description: - "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for CareTeam Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CareTeam_Enum_schema', + values: { CareTeam: { value: 'CareTeam' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current state of the care team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-team-status + status: { + type: CodeScalar, + description: 'Indicates the current state of the care team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/care-team-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.', + }, + _name: { + type: require('./element.schema.js'), + description: + "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", + }, + name: { + type: GraphQLString, + description: + "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'CareTeamsubject_subject_Union', description: 'Identifies the patient or group whose intended care is handled by the team.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'Identifies the patient or group whose intended care is handled by the team.', + }, + context: { + type: new GraphQLUnionType({ + name: 'CareTeamcontext_context_Union', description: 'The encounter or episode of care that establishes the context for this care team.', - }, - period: { - type: require('./period.schema'), - description: - 'Indicates when the team did (or is intended to) come into effect and end.', - }, - participant: { - type: new GraphQLList(require('./careteamparticipant.schema')), - description: - 'Identifies all people and organizations who are expected to be involved in the care team.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Describes why the care team exists.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: 'Condition(s) that this care team addresses.', - }, - managingOrganization: { - type: new GraphQLList(require('./reference.schema')), - description: 'The organization responsible for the care team.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: 'Comments made about the CareTeam.', - }, - }), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care that establishes the context for this care team.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates when the team did (or is intended to) come into effect and end.', + }, + participant: { + type: new GraphQLList(require('./careteamparticipant.schema.js')), + description: + 'Identifies all people and organizations who are expected to be involved in the care team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Describes why the care team exists.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CareTeamreasonReference_reasonReference_Union', + description: 'Condition(s) that this care team addresses.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: 'Condition(s) that this care team addresses.', + }, + managingOrganization: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CareTeammanagingOrganization_managingOrganization_Union', + description: 'The organization responsible for the care team.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The organization responsible for the care team.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Comments made about the CareTeam.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/careteamparticipant.schema.js b/src/resources/3_0_1/schemas/careteamparticipant.schema.js index 1669a2e6..99939c94 100644 --- a/src/resources/3_0_1/schemas/careteamparticipant.schema.js +++ b/src/resources/3_0_1/schemas/careteamparticipant.schema.js @@ -1,36 +1,94 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary CareTeam.participant Schema + * @summary CareTeamparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'CareTeamParticipant', - description: - 'Identifies all people and organizations who are expected to be involved in the care team.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - role: { - type: require('./codeableconcept.schema'), - description: - "Indicates specific responsibility of an individual within the care team, such as 'Primary care physician', 'Trained social worker counselor', 'Caregiver', etc.", - }, - member: { - type: require('./reference.schema'), + name: 'CareTeamparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + role: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates specific responsibility of an individual within the care team, such as 'Primary care physician', 'Trained social worker counselor', 'Caregiver', etc.", + }, + member: { + type: new GraphQLUnionType({ + name: 'CareTeamparticipantmember_member_Union', description: 'The specific person or organization who is participating/expected to participate in the care team.', - }, - onBehalfOf: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + description: + 'The specific person or organization who is participating/expected to participate in the care team.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'CareTeamparticipantonBehalfOf_onBehalfOf_Union', description: 'The organization of the practitioner.', - }, - period: { - type: require('./period.schema'), - description: - 'Indicates when the specific member or organization did (or is intended to) come into effect and end.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization of the practitioner.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates when the specific member or organization did (or is intended to) come into effect and end.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/chargeitem.schema.js b/src/resources/3_0_1/schemas/chargeitem.schema.js index c3b7e781..e6642145 100644 --- a/src/resources/3_0_1/schemas/chargeitem.schema.js +++ b/src/resources/3_0_1/schemas/chargeitem.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLFloat, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ChargeItemResourceType = new GraphQLEnumType({ - name: 'ChargeItemResourceType', - values: { - ChargeItem: { value: 'ChargeItem' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,160 +18,373 @@ let ChargeItemResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ChargeItem', - description: 'Base StructureDefinition for ChargeItem Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ChargeItemResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Identifiers assigned to this event performer or other systems.', - }, - definition: { - type: new GraphQLList(UriScalar), - description: - 'References the source of pricing information, rules of application for the code this ChargeItem uses.', - }, - _definition: { - type: require('./element.schema'), - description: - 'References the source of pricing information, rules of application for the code this ChargeItem uses.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/chargeitem-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current state of the ChargeItem.', - }, - _status: { - type: require('./element.schema'), - description: 'The current state of the ChargeItem.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: - 'ChargeItems can be grouped to larger ChargeItems covering the whole set.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/chargeitem-billingcodes - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'A code that identifies the charge, like a billing code.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The individual or set of individuals the action is being or was performed on.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ChargeItem Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ChargeItem_Enum_schema', + values: { ChargeItem: { value: 'ChargeItem' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Identifiers assigned to this event performer or other systems.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'References the source of pricing information, rules of application for the code this ChargeItem uses.', + }, + definition: { + type: new GraphQLList(UriScalar), + description: + 'References the source of pricing information, rules of application for the code this ChargeItem uses.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the ChargeItem.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/chargeitem-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the ChargeItem.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItempartOf_partOf_Union', + description: + 'ChargeItems can be grouped to larger ChargeItems covering the whole set.', + types: () => [require('./chargeitem.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ChargeItem') { + return require('./chargeitem.schema.js'); + } + }, + }), + ), + description: + 'ChargeItems can be grouped to larger ChargeItems covering the whole set.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/chargeitem-billingcodes + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code that identifies the charge, like a billing code.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ChargeItemsubject_subject_Union', + description: + 'The individual or set of individuals the action is being or was performed on.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The individual or set of individuals the action is being or was performed on.', + }, + context: { + type: new GraphQLUnionType({ + name: 'ChargeItemcontext_context_Union', description: 'The encounter or episode of care that establishes the context for this event.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - 'Date/time(s) or duration when the charged service was applied.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: - 'Date/time(s) or duration when the charged service was applied.', - }, - occurrencePeriod: { - type: require('./period.schema'), - description: - 'Date/time(s) or duration when the charged service was applied.', - }, - occurrenceTiming: { - type: require('./timing.schema'), - description: - 'Date/time(s) or duration when the charged service was applied.', - }, - participant: { - type: new GraphQLList(require('./chargeitemparticipant.schema')), - description: - 'Indicates who or what performed or participated in the charged service.', - }, - performingOrganization: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care that establishes the context for this event.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + participant: { + type: new GraphQLList(require('./chargeitemparticipant.schema.js')), + description: + 'Indicates who or what performed or participated in the charged service.', + }, + performingOrganization: { + type: new GraphQLUnionType({ + name: 'ChargeItemperformingOrganization_performingOrganization_Union', description: 'The organization requesting the service.', - }, - requestingOrganization: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization requesting the service.', + }, + requestingOrganization: { + type: new GraphQLUnionType({ + name: 'ChargeItemrequestingOrganization_requestingOrganization_Union', description: 'The organization performing the service.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'Quantity of which the charge item has been serviced.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodysite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The anatomical location where the related service has been applied.', - }, - factorOverride: { - type: GraphQLFloat, - description: - 'Factor overriding the factor determined by the rules associated with the code.', - }, - _factorOverride: { - type: require('./element.schema'), - description: - 'Factor overriding the factor determined by the rules associated with the code.', - }, - priceOverride: { - type: require('./money.schema'), - description: - 'Total price of the charge overriding the list price associated with the code.', - }, - overrideReason: { - type: GraphQLString, - description: - 'If the list price or the rule based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', - }, - _overrideReason: { - type: require('./element.schema'), - description: - 'If the list price or the rule based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', - }, - enterer: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization performing the service.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'Quantity of which the charge item has been serviced.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodysite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The anatomical location where the related service has been applied.', + }, + _factorOverride: { + type: require('./element.schema.js'), + description: + 'Factor overriding the factor determined by the rules associated with the code.', + }, + factorOverride: { + type: GraphQLFloat, + description: + 'Factor overriding the factor determined by the rules associated with the code.', + }, + priceOverride: { + type: require('./money.schema.js'), + description: + 'Total price of the charge overriding the list price associated with the code.', + }, + _overrideReason: { + type: require('./element.schema.js'), + description: + 'If the list price or the rule based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', + }, + overrideReason: { + type: GraphQLString, + description: + 'If the list price or the rule based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'ChargeItementerer_enterer_Union', description: 'The device, practitioner, etc. who entered the charge item.', - }, - enteredDate: { - type: DateTimeScalar, - description: 'Date the charge item was entered.', - }, - _enteredDate: { - type: require('./element.schema'), - description: 'Date the charge item was entered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Describes why the event occurred in coded or textual form.', - }, - service: { - type: new GraphQLList(require('./reference.schema')), - description: 'Indicated the rendered service that caused this charge.', - }, - account: { - type: new GraphQLList(require('./reference.schema')), - description: 'Account into which this ChargeItems belongs.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Comments made about the event by the performer, subject or other participants.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.schema')), - description: 'Further information supporting the this charge.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The device, practitioner, etc. who entered the charge item.', + }, + _enteredDate: { + type: require('./element.schema.js'), + description: 'Date the charge item was entered.', + }, + enteredDate: { + type: DateTimeScalar, + description: 'Date the charge item was entered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Describes why the event occurred in coded or textual form.', + }, + service: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItemservice_service_Union', + description: + 'Indicated the rendered service that caused this charge.', + types: () => [ + require('./diagnosticreport.schema.js'), + require('./imagingstudy.schema.js'), + require('./immunization.schema.js'), + require('./medicationadministration.schema.js'), + require('./medicationdispense.schema.js'), + require('./observation.schema.js'), + require('./procedure.schema.js'), + require('./supplydelivery.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'MedicationDispense') { + return require('./medicationdispense.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'SupplyDelivery') { + return require('./supplydelivery.schema.js'); + } + }, + }), + ), + description: 'Indicated the rendered service that caused this charge.', + }, + account: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItemaccount_account_Union', + description: 'Account into which this ChargeItems belongs.', + types: () => [require('./account.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + }, + }), + ), + description: 'Account into which this ChargeItems belongs.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the event by the performer, subject or other participants.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItemsupportingInformation_supportingInformation_Union', + description: 'Further information supporting the this charge.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Further information supporting the this charge.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/chargeitemparticipant.schema.js b/src/resources/3_0_1/schemas/chargeitemparticipant.schema.js index c232fc81..1c794bcf 100644 --- a/src/resources/3_0_1/schemas/chargeitemparticipant.schema.js +++ b/src/resources/3_0_1/schemas/chargeitemparticipant.schema.js @@ -1,27 +1,79 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ChargeItem.participant Schema + * @summary ChargeItemparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'ChargeItemParticipant', - description: - 'Indicates who or what performed or participated in the charged service.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/performer-role - role: { - type: require('./codeableconcept.schema'), - description: - 'Describes the type of performance or participation(e.g. primary surgeon, anaesthesiologiest, etc.).', - }, - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device, practitioner, etc. who performed or participated in the service.', - }, - }), + name: 'ChargeItemparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/performer-role + role: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the type of performance or participation(e.g. primary surgeon, anaesthesiologiest, etc.).', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ChargeItemparticipantactor_actor_Union', + description: + 'The device, practitioner, etc. who performed or participated in the service.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The device, practitioner, etc. who performed or participated in the service.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claim.schema.js b/src/resources/3_0_1/schemas/claim.schema.js index 38a4fc99..ec9f1e39 100644 --- a/src/resources/3_0_1/schemas/claim.schema.js +++ b/src/resources/3_0_1/schemas/claim.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ClaimResourceType = new GraphQLEnumType({ - name: 'ClaimResourceType', - values: { - Claim: { value: 'Claim' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,174 +16,323 @@ let ClaimResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Claim', - description: 'Base StructureDefinition for Claim Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ClaimResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'The business identifier for the instance: claim number, pre-determination or pre-authorization number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-type - type: { - type: require('./codeableconcept.schema'), - description: - 'The category of claim, eg, oral, pharmacy, vision, insitutional, professional.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-subtype - subType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-use - use: { - type: CodeScalar, - description: - 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', - }, - _use: { - type: require('./element.schema'), - description: - 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Claim Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Claim_Enum_schema', + values: { Claim: { value: 'Claim' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'The business identifier for the instance: claim number, pre-determination or pre-authorization number.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The category of claim, eg, oral, pharmacy, vision, insitutional, professional.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-subtype + subType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.', + }, + _use: { + type: require('./element.schema.js'), + description: + 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-use + use: { + type: CodeScalar, + description: + 'Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).', + }, + patient: { + type: new GraphQLUnionType({ + name: 'Claimpatient_patient_Union', description: 'Patient Resource.', - }, - billablePeriod: { - type: require('./period.schema'), - description: - 'The billable period for which charges are being submitted.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - enterer: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Patient Resource.', + }, + billablePeriod: { + type: require('./period.schema.js'), + description: 'The billable period for which charges are being submitted.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'Claimenterer_enterer_Union', description: 'Person who created the invoice/claim/pre-determination or pre-authorization.', - }, - insurer: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Person who created the invoice/claim/pre-determination or pre-authorization.', + }, + insurer: { + type: new GraphQLUnionType({ + name: 'Claiminsurer_insurer_Union', description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'Claimprovider_provider_Union', description: 'The provider which is responsible for the bill, claim pre-determination, pre-authorization.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The provider which is responsible for the bill, claim pre-determination, pre-authorization.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'Claimorganization_organization_Union', description: 'The organization which is responsible for the bill, claim pre-determination, pre-authorization.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-priority - priority: { - type: require('./codeableconcept.schema'), - description: - 'Immediate (STAT), best effort (NORMAL), deferred (DEFER).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve - fundsReserve: { - type: require('./codeableconcept.schema'), - description: - "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", - }, - related: { - type: new GraphQLList(require('./claimrelated.schema')), - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - }, - prescription: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the bill, claim pre-determination, pre-authorization.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-priority + priority: { + type: require('./codeableconcept.schema.js'), + description: 'Immediate (STAT), best effort (NORMAL), deferred (DEFER).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve + fundsReserve: { + type: require('./codeableconcept.schema.js'), + description: + "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", + }, + related: { + type: new GraphQLList(require('./claimrelated.schema.js')), + description: + 'Other claims which are related to this claim such as prior claim versions or for related services.', + }, + prescription: { + type: new GraphQLUnionType({ + name: 'Claimprescription_prescription_Union', description: 'Prescription to support the dispensing of Pharmacy or Vision products.', - }, - originalPrescription: { - type: require('./reference.schema'), + types: () => [ + require('./medicationrequest.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, + }), + description: + 'Prescription to support the dispensing of Pharmacy or Vision products.', + }, + originalPrescription: { + type: new GraphQLUnionType({ + name: 'ClaimoriginalPrescription_originalPrescription_Union', description: "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new precription for an alternate medication which has the same theraputic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", - }, - payee: { - type: require('./claimpayee.schema'), - description: 'The party to be reimbursed for the services.', - }, - referral: { - type: require('./reference.schema'), + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + description: + "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new precription for an alternate medication which has the same theraputic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", + }, + payee: { + type: require('./claimpayee.schema.js'), + description: 'The party to be reimbursed for the services.', + }, + referral: { + type: new GraphQLUnionType({ + name: 'Claimreferral_referral_Union', description: 'The referral resource which lists the date, practitioner, reason and other supporting information.', - }, - facility: { - type: require('./reference.schema'), + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + description: + 'The referral resource which lists the date, practitioner, reason and other supporting information.', + }, + facility: { + type: new GraphQLUnionType({ + name: 'Claimfacility_facility_Union', description: 'Facility where the services were provided.', - }, - careTeam: { - type: new GraphQLList(require('./claimcareteam.schema')), - description: - 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', - }, - information: { - type: new GraphQLList(require('./claiminformation.schema')), - description: - 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', - }, - diagnosis: { - type: new GraphQLList(require('./claimdiagnosis.schema')), - description: 'List of patient diagnosis for which care is sought.', - }, - procedure: { - type: new GraphQLList(require('./claimprocedure.schema')), - description: - 'Ordered list of patient procedures performed to support the adjudication.', - }, - insurance: { - type: new GraphQLList(require('./claiminsurance.schema')), - description: - 'Financial instrument by which payment information for health care.', - }, - accident: { - type: require('./claimaccident.schema'), - description: - 'An accident which resulted in the need for healthcare services.', - }, - employmentImpacted: { - type: require('./period.schema'), - description: - 'The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).', - }, - hospitalization: { - type: require('./period.schema'), - description: - 'The start and optional end dates of when the patient was confined to a treatment center.', - }, - item: { - type: new GraphQLList(require('./claimitem.schema')), - description: 'First tier of goods and services.', - }, - total: { - type: require('./money.schema'), - description: 'The total value of the claim.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Facility where the services were provided.', + }, + careTeam: { + type: new GraphQLList(require('./claimcareteam.schema.js')), + description: + 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', + }, + information: { + type: new GraphQLList(require('./claiminformation.schema.js')), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', + }, + diagnosis: { + type: new GraphQLList(require('./claimdiagnosis.schema.js')), + description: 'List of patient diagnosis for which care is sought.', + }, + procedure: { + type: new GraphQLList(require('./claimprocedure.schema.js')), + description: + 'Ordered list of patient procedures performed to support the adjudication.', + }, + insurance: { + type: new GraphQLList(require('./claiminsurance.schema.js')), + description: + 'Financial instrument by which payment information for health care.', + }, + accident: { + type: require('./claimaccident.schema.js'), + description: + 'An accident which resulted in the need for healthcare services.', + }, + employmentImpacted: { + type: require('./period.schema.js'), + description: + 'The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).', + }, + hospitalization: { + type: require('./period.schema.js'), + description: + 'The start and optional end dates of when the patient was confined to a treatment center.', + }, + item: { + type: new GraphQLList(require('./claimitem.schema.js')), + description: 'First tier of goods and services.', + }, + total: { + type: require('./money.schema.js'), + description: 'The total value of the claim.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimaccident.schema.js b/src/resources/3_0_1/schemas/claimaccident.schema.js index 35b1ec9d..9ed8635d 100644 --- a/src/resources/3_0_1/schemas/claimaccident.schema.js +++ b/src/resources/3_0_1/schemas/claimaccident.schema.js @@ -1,38 +1,69 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.accident Schema + * @summary Claimaccident Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimAccident', - description: - 'An accident which resulted in the need for healthcare services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - date: { - type: new GraphQLNonNull(DateScalar), - description: 'Date of an accident which these services are addressing.', - }, - _date: { - type: require('./element.schema'), - description: 'Date of an accident which these services are addressing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode - type: { - type: require('./codeableconcept.schema'), - description: 'Type of accident: work, auto, etc.', - }, - locationAddress: { - type: require('./address.schema'), - description: 'Accident Place.', - }, - locationReference: { - type: require('./reference.schema'), + name: 'Claimaccident', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date of an accident which these services are addressing.', + }, + date: { + type: new GraphQLNonNull(DateScalar), + description: 'Date of an accident which these services are addressing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode + type: { + type: require('./codeableconcept.schema.js'), + description: 'Type of accident: work, auto, etc.', + }, + locationAddress: { + type: require('./address.schema.js'), + description: 'Accident Place.', + }, + locationReference: { + type: new GraphQLUnionType({ + name: 'ClaimaccidentlocationReference_locationReference_Union', description: 'Accident Place.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Accident Place.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimcareteam.schema.js b/src/resources/3_0_1/schemas/claimcareteam.schema.js index f57f25ee..58f7168e 100644 --- a/src/resources/3_0_1/schemas/claimcareteam.schema.js +++ b/src/resources/3_0_1/schemas/claimcareteam.schema.js @@ -1,56 +1,92 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.careTeam Schema + * @summary ClaimcareTeam Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimCareTeam', - description: - 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of the careTeam which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Sequence of the careTeam which serves to order and provide a link.', - }, - provider: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Member of the team who provided the overall service.', - }, - responsible: { - type: GraphQLBoolean, - description: - 'The party who is billing and responsible for the claimed good or service rendered to the patient.', - }, - _responsible: { - type: require('./element.schema'), - description: - 'The party who is billing and responsible for the claimed good or service rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-careteamrole - role: { - type: require('./codeableconcept.schema'), - description: - 'The lead, assisting or supervising practitioner and their discipline if a multidisiplinary team.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/provider-qualification - qualification: { - type: require('./codeableconcept.schema'), - description: 'The qualification which is applicable for this service.', - }, - }), + name: 'ClaimcareTeam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Sequence of the careTeam which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of the careTeam which serves to order and provide a link.', + }, + provider: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimcareTeamprovider_provider_Union', + description: 'Member of the team who provided the overall service.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Member of the team who provided the overall service.', + }, + _responsible: { + type: require('./element.schema.js'), + description: + 'The party who is billing and responsible for the claimed good or service rendered to the patient.', + }, + responsible: { + type: GraphQLBoolean, + description: + 'The party who is billing and responsible for the claimed good or service rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-careteamrole + role: { + type: require('./codeableconcept.schema.js'), + description: + 'The lead, assisting or supervising practitioner and their discipline if a multidisiplinary team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provider-qualification + qualification: { + type: require('./codeableconcept.schema.js'), + description: 'The qualification which is applicable for this service.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimdiagnosis.schema.js b/src/resources/3_0_1/schemas/claimdiagnosis.schema.js index e8aa53c5..aa208df0 100644 --- a/src/resources/3_0_1/schemas/claimdiagnosis.schema.js +++ b/src/resources/3_0_1/schemas/claimdiagnosis.schema.js @@ -1,46 +1,80 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.diagnosis Schema + * @summary Claimdiagnosis Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimDiagnosis', - description: 'List of patient diagnosis for which care is sought.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'Sequence of diagnosis which serves to provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: 'Sequence of diagnosis which serves to provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosisCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosisReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosistype - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The type of the Diagnosis, for example: admitting, primary, secondary, discharge.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup - packageCode: { - type: require('./codeableconcept.schema'), - description: - 'The package billing code, for example DRG, based on the assigned grouping code system.', - }, - }), + name: 'Claimdiagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'Sequence of diagnosis which serves to provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'Sequence of diagnosis which serves to provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosisCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosisReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimdiagnosisdiagnosisReference_diagnosisReference_Union', + description: 'The diagnosis.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: 'The diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosistype + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of the Diagnosis, for example: admitting, primary, secondary, discharge.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup + packageCode: { + type: require('./codeableconcept.schema.js'), + description: + 'The package billing code, for example DRG, based on the assigned grouping code system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claiminformation.schema.js b/src/resources/3_0_1/schemas/claiminformation.schema.js index b7633b9c..cff8df0f 100644 --- a/src/resources/3_0_1/schemas/claiminformation.schema.js +++ b/src/resources/3_0_1/schemas/claiminformation.schema.js @@ -1,86 +1,115 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.information Schema + * @summary Claiminformation Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimInformation', - description: - 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of the information element which serves to provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Sequence of the information element which serves to provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-informationcategory - category: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-exception - code: { - type: require('./codeableconcept.schema'), - description: - 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.', - }, - timingDate: { - type: DateScalar, - description: - 'The date when or period to which this information refers.', - }, - _timingDate: { - type: require('./element.schema'), - description: - 'The date when or period to which this information refers.', - }, - timingPeriod: { - type: require('./period.schema'), - description: - 'The date when or period to which this information refers.', - }, - valueString: { - type: GraphQLString, + name: 'Claiminformation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Sequence of the information element which serves to provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of the information element which serves to provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-informationcategory + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-exception + code: { + type: require('./codeableconcept.schema.js'), + description: + 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.', + }, + _timingDate: { + type: require('./element.schema.js'), + description: 'The date when or period to which this information refers.', + }, + timingDate: { + type: DateScalar, + description: 'The date when or period to which this information refers.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: 'The date when or period to which this information refers.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueString: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueReference: { + type: new GraphQLUnionType({ + name: 'ClaiminformationvalueReference_valueReference_Union', description: 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueReference: { - type: require('./reference.schema'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason - reason: { - type: require('./codeableconcept.schema'), - description: - 'For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claiminsurance.schema.js b/src/resources/3_0_1/schemas/claiminsurance.schema.js index 713f95b9..a9038730 100644 --- a/src/resources/3_0_1/schemas/claiminsurance.schema.js +++ b/src/resources/3_0_1/schemas/claiminsurance.schema.js @@ -1,72 +1,110 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.insurance Schema + * @summary Claiminsurance Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimInsurance', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of coverage which serves to provide a link and convey coordination of benefit order.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Sequence of coverage which serves to provide a link and convey coordination of benefit order.', - }, - focal: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - _focal: { - type: require('./element.schema'), - description: - 'A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.schema'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.schema'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - claimResponse: { - type: require('./reference.schema'), + name: 'Claiminsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Sequence of coverage which serves to provide a link and convey coordination of benefit order.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of coverage which serves to provide a link and convey coordination of benefit order.', + }, + _focal: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A flag to indicate that this Coverage is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Claiminsurancecoverage_coverage_Union', + description: + 'Reference to the program or plan identification, underwriter or payor.', + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _businessArrangement: { + type: require('./element.schema.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + claimResponse: { + type: new GraphQLUnionType({ + name: 'ClaiminsuranceclaimResponse_claimResponse_Union', description: 'The Coverages adjudication details.', - }, - }), + types: () => [require('./claimresponse.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + description: 'The Coverages adjudication details.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimitem.schema.js b/src/resources/3_0_1/schemas/claimitem.schema.js index ceca92c1..681c0b27 100644 --- a/src/resources/3_0_1/schemas/claimitem.schema.js +++ b/src/resources/3_0_1/schemas/claimitem.schema.js @@ -1,173 +1,225 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLUnionType, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Claim.item Schema + * @summary Claimitem Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimItem', - description: 'First tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - careTeamLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'CareTeam applicable for this service or product line.', - }, - _careTeamLinkId: { - type: require('./element.schema'), - description: 'CareTeam applicable for this service or product line.', - }, - diagnosisLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Diagnosis applicable for this service or product line.', - }, - _diagnosisLinkId: { - type: require('./element.schema'), - description: 'Diagnosis applicable for this service or product line.', - }, - procedureLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Procedures applicable for this service or product line.', - }, - _procedureLinkId: { - type: require('./element.schema'), - description: 'Procedures applicable for this service or product line.', - }, - informationLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'Exceptions, special conditions and supporting information pplicable for this service or product line.', - }, - _informationLinkId: { - type: require('./element.schema'), - description: - 'Exceptions, special conditions and supporting information pplicable for this service or product line.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,RXNorm,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'For programs which require reason codes for the inclusion or covering of this billed item under the program or sub-program.', - }, - servicedDate: { - type: DateScalar, - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - _servicedDate: { - type: require('./element.schema'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - servicedPeriod: { - type: require('./period.schema'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'Where the service was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationAddress: { - type: require('./address.schema'), - description: 'Where the service was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationReference: { - type: require('./reference.schema'), + name: 'Claimitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _careTeamLinkId: { + type: require('./element.schema.js'), + description: 'CareTeam applicable for this service or product line.', + }, + careTeamLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'CareTeam applicable for this service or product line.', + }, + _diagnosisLinkId: { + type: require('./element.schema.js'), + description: 'Diagnosis applicable for this service or product line.', + }, + diagnosisLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnosis applicable for this service or product line.', + }, + _procedureLinkId: { + type: require('./element.schema.js'), + description: 'Procedures applicable for this service or product line.', + }, + procedureLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Procedures applicable for this service or product line.', + }, + _informationLinkId: { + type: require('./element.schema.js'), + description: + 'Exceptions, special conditions and supporting information pplicable for this service or product line.', + }, + informationLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information pplicable for this service or product line.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,RXNorm,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'For programs which require reason codes for the inclusion or covering of this billed item under the program or sub-program.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Where the service was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationAddress: { + type: require('./address.schema.js'), + description: 'Where the service was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationReference: { + type: new GraphQLUnionType({ + name: 'ClaimitemlocationReference_locationReference_Union', description: 'Where the service was provided.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.schema'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.schema'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.schema')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/tooth - bodySite: { - type: require('./codeableconcept.schema'), - description: 'Physical service site on the patient (limb, tooth, etc).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/surface - subSite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A region or surface of the site, eg. limb region or tooth surface(s).', - }, - encounter: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A billed item may include goods or services provided in multiple encounters.', - }, - detail: { - type: new GraphQLList(require('./claimitemdetail.schema')), - description: 'Second tier of goods and services.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the service was provided.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Claimitemudi_udi_Union', + description: + 'List of Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/tooth + bodySite: { + type: require('./codeableconcept.schema.js'), + description: 'Physical service site on the patient (limb, tooth, etc).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/surface + subSite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A region or surface of the site, eg. limb region or tooth surface(s).', + }, + encounter: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Claimitemencounter_encounter_Union', + description: + 'A billed item may include goods or services provided in multiple encounters.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + ), + description: + 'A billed item may include goods or services provided in multiple encounters.', + }, + detail: { + type: new GraphQLList(require('./claimitemdetail.schema.js')), + description: 'Second tier of goods and services.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimitemdetail.schema.js b/src/resources/3_0_1/schemas/claimitemdetail.schema.js index dc7a69a4..5fd71fd0 100644 --- a/src/resources/3_0_1/schemas/claimitemdetail.schema.js +++ b/src/resources/3_0_1/schemas/claimitemdetail.schema.js @@ -1,92 +1,123 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.item.detail Schema + * @summary Claimitemdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimItemDetail', - description: 'Second tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.schema'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.schema'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.schema')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - subDetail: { - type: new GraphQLList(require('./claimitemdetailsubdetail.schema')), - description: 'Third tier of goods and services.', - }, - }), + name: 'Claimitemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Claimitemdetailudi_udi_Union', + description: + 'List of Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + subDetail: { + type: new GraphQLList(require('./claimitemdetailsubdetail.schema.js')), + description: 'Third tier of goods and services.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimitemdetailsubdetail.schema.js b/src/resources/3_0_1/schemas/claimitemdetailsubdetail.schema.js index 66635de0..5744babc 100644 --- a/src/resources/3_0_1/schemas/claimitemdetailsubdetail.schema.js +++ b/src/resources/3_0_1/schemas/claimitemdetailsubdetail.schema.js @@ -1,87 +1,118 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Claim.item.detail.subDetail Schema + * @summary ClaimitemdetailsubDetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimItemDetailSubDetail', - description: 'Third tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.schema'), - description: 'The fee for an addittional service or product or charge.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.schema'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.schema')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - }), + name: 'ClaimitemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: 'The fee for an addittional service or product or charge.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClaimitemdetailsubDetailudi_udi_Union', + description: + 'List of Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimpayee.schema.js b/src/resources/3_0_1/schemas/claimpayee.schema.js index 3270b507..b61b22fd 100644 --- a/src/resources/3_0_1/schemas/claimpayee.schema.js +++ b/src/resources/3_0_1/schemas/claimpayee.schema.js @@ -1,30 +1,76 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Claim.payee Schema + * @summary Claimpayee Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimPayee', - description: 'The party to be reimbursed for the services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Type of Party to be reimbursed: Subscriber, provider, other.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-payee-resource-type - resourceType: { - type: require('./coding.schema'), - description: 'organization | patient | practitioner | relatedperson.', - }, - party: { - type: require('./reference.schema'), + name: 'Claimpayee', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Type of Party to be reimbursed: Subscriber, provider, other.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-payee-resource-type + resourceType: { + type: require('./coding.schema.js'), + description: 'organization | patient | practitioner | relatedperson.', + }, + party: { + type: new GraphQLUnionType({ + name: 'Claimpayeeparty_party_Union', description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimprocedure.schema.js b/src/resources/3_0_1/schemas/claimprocedure.schema.js index 3d75028c..171b68dd 100644 --- a/src/resources/3_0_1/schemas/claimprocedure.schema.js +++ b/src/resources/3_0_1/schemas/claimprocedure.schema.js @@ -1,46 +1,79 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Claim.procedure Schema + * @summary Claimprocedure Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimProcedure', - description: - 'Ordered list of patient procedures performed to support the adjudication.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of procedures which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Sequence of procedures which serves to order and provide a link.', - }, - date: { - type: DateTimeScalar, - description: 'Date and optionally time the procedure was performed .', - }, - _date: { - type: require('./element.schema'), - description: 'Date and optionally time the procedure was performed .', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures - procedureCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The procedure code.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures - procedureReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The procedure code.', - }, - }), + name: 'Claimprocedure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Sequence of procedures which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of procedures which serves to order and provide a link.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date and optionally time the procedure was performed .', + }, + date: { + type: DateTimeScalar, + description: 'Date and optionally time the procedure was performed .', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures + procedureCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The procedure code.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures + procedureReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimprocedureprocedureReference_procedureReference_Union', + description: 'The procedure code.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: 'The procedure code.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimrelated.schema.js b/src/resources/3_0_1/schemas/claimrelated.schema.js index 1b50c832..0db3a1df 100644 --- a/src/resources/3_0_1/schemas/claimrelated.schema.js +++ b/src/resources/3_0_1/schemas/claimrelated.schema.js @@ -1,31 +1,62 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Claim.related Schema + * @summary Claimrelated Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimRelated', - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - claim: { - type: require('./reference.schema'), + name: 'Claimrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + claim: { + type: new GraphQLUnionType({ + name: 'Claimrelatedclaim_claim_Union', description: 'Other claims which are related to this claim such as prior claim versions or for related services.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship - relationship: { - type: require('./codeableconcept.schema'), - description: 'For example prior or umbrella.', - }, - reference: { - type: require('./identifier.schema'), - description: - 'An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .', - }, - }), + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: + 'Other claims which are related to this claim such as prior claim versions or for related services.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship + relationship: { + type: require('./codeableconcept.schema.js'), + description: 'For example prior or umbrella.', + }, + reference: { + type: require('./identifier.schema.js'), + description: + 'An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponse.schema.js b/src/resources/3_0_1/schemas/claimresponse.schema.js index 47a7a0c4..b1759cb0 100644 --- a/src/resources/3_0_1/schemas/claimresponse.schema.js +++ b/src/resources/3_0_1/schemas/claimresponse.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ClaimResponseResourceType = new GraphQLEnumType({ - name: 'ClaimResponseResourceType', - values: { - ClaimResponse: { value: 'ClaimResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,134 +17,249 @@ let ClaimResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ClaimResponse', - description: 'Base StructureDefinition for ClaimResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ClaimResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ClaimResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClaimResponse_Enum_schema', + values: { ClaimResponse: { value: 'ClaimResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'ClaimResponsepatient_patient_Union', description: 'Patient Resource.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - insurer: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Patient Resource.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + insurer: { + type: new GraphQLUnionType({ + name: 'ClaimResponseinsurer_insurer_Union', description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'ClaimResponserequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: 'ClaimResponserequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - request: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + request: { + type: new GraphQLUnionType({ + name: 'ClaimResponserequest_request_Union', description: 'Original request resource referrence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: - 'Processing outcome errror, partial or complete processing.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - payeeType: { - type: require('./codeableconcept.schema'), - description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - item: { - type: new GraphQLList(require('./claimresponseitem.schema')), - description: - 'The first tier service adjudications for submitted services.', - }, - addItem: { - type: new GraphQLList(require('./claimresponseadditem.schema')), - description: - 'The first tier service adjudications for payor added services.', - }, - error: { - type: new GraphQLList(require('./claimresponseerror.schema')), - description: 'Mutually exclusive with Services Provided (Item).', - }, - totalCost: { - type: require('./money.schema'), - description: 'The total cost of the services reported.', - }, - unallocDeductable: { - type: require('./money.schema'), - description: - 'The amount of deductible applied which was not allocated to any particular service line.', - }, - totalBenefit: { - type: require('./money.schema'), - description: - 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).', - }, - payment: { - type: require('./claimresponsepayment.schema'), - description: - 'Payment details for the claim if the claim has been paid.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve - reserved: { - type: require('./coding.schema'), - description: - 'Status of funds reservation (For provider, for Patient, None).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.schema'), - description: 'The form to be used for printing the content.', - }, - processNote: { - type: new GraphQLList(require('./claimresponseprocessnote.schema')), - description: 'Note text.', - }, - communicationRequest: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Request for additional supporting or authorizing information, such as: documents, images or resources.', - }, - insurance: { - type: new GraphQLList(require('./claimresponseinsurance.schema')), - description: - 'Financial instrument by which payment information for health care.', - }, - }), + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: 'Original request resource referrence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: 'Processing outcome errror, partial or complete processing.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + payeeType: { + type: require('./codeableconcept.schema.js'), + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + item: { + type: new GraphQLList(require('./claimresponseitem.schema.js')), + description: + 'The first tier service adjudications for submitted services.', + }, + addItem: { + type: new GraphQLList(require('./claimresponseadditem.schema.js')), + description: + 'The first tier service adjudications for payor added services.', + }, + error: { + type: new GraphQLList(require('./claimresponseerror.schema.js')), + description: 'Mutually exclusive with Services Provided (Item).', + }, + totalCost: { + type: require('./money.schema.js'), + description: 'The total cost of the services reported.', + }, + unallocDeductable: { + type: require('./money.schema.js'), + description: + 'The amount of deductible applied which was not allocated to any particular service line.', + }, + totalBenefit: { + type: require('./money.schema.js'), + description: + 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductible).', + }, + payment: { + type: require('./claimresponsepayment.schema.js'), + description: 'Payment details for the claim if the claim has been paid.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fundsreserve + reserved: { + type: require('./coding.schema.js'), + description: + 'Status of funds reservation (For provider, for Patient, None).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.schema.js'), + description: 'The form to be used for printing the content.', + }, + processNote: { + type: new GraphQLList(require('./claimresponseprocessnote.schema.js')), + description: 'Note text.', + }, + communicationRequest: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClaimResponsecommunicationRequest_communicationRequest_Union', + description: + 'Request for additional supporting or authorizing information, such as: documents, images or resources.', + types: () => [require('./communicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + }, + }), + ), + description: + 'Request for additional supporting or authorizing information, such as: documents, images or resources.', + }, + insurance: { + type: new GraphQLList(require('./claimresponseinsurance.schema.js')), + description: + 'Financial instrument by which payment information for health care.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseadditem.schema.js b/src/resources/3_0_1/schemas/claimresponseadditem.schema.js index 9fdf50ce..9fe86169 100644 --- a/src/resources/3_0_1/schemas/claimresponseadditem.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseadditem.schema.js @@ -1,68 +1,84 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem Schema + * @summary ClaimResponseaddItem Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseAddItem', - description: 'The first tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'List of input service items which this service line is intended to replace.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: - 'List of input service items which this service line is intended to replace.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - 'A code to indicate the Professional Service or Product supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - fee: { - type: require('./money.schema'), - description: - 'The fee charged for the professional service or product..', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - detail: { - type: new GraphQLList(require('./claimresponseadditemdetail.schema')), - description: - 'The second tier service adjudications for payor added services.', - }, - }), + name: 'ClaimResponseaddItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: + 'List of input service items which this service line is intended to replace.', + }, + sequenceLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'List of input service items which this service line is intended to replace.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to indicate the Professional Service or Product supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + fee: { + type: require('./money.schema.js'), + description: 'The fee charged for the professional service or product..', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + detail: { + type: new GraphQLList(require('./claimresponseadditemdetail.schema.js')), + description: + 'The second tier service adjudications for payor added services.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseadditemdetail.schema.js b/src/resources/3_0_1/schemas/claimresponseadditemdetail.schema.js index 6cabb7cf..a83db5f6 100644 --- a/src/resources/3_0_1/schemas/claimresponseadditemdetail.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseadditemdetail.schema.js @@ -1,54 +1,69 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.addItem.detail Schema + * @summary ClaimResponseaddItemdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseAddItemDetail', - description: - 'The second tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - 'A code to indicate the Professional Service or Product supplied.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - fee: { - type: require('./money.schema'), - description: - 'The fee charged for the professional service or product..', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - }), + name: 'ClaimResponseaddItemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to indicate the Professional Service or Product supplied.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + fee: { + type: require('./money.schema.js'), + description: 'The fee charged for the professional service or product..', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseerror.schema.js b/src/resources/3_0_1/schemas/claimresponseerror.schema.js index 74fb5314..32a7953f 100644 --- a/src/resources/3_0_1/schemas/claimresponseerror.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseerror.schema.js @@ -1,52 +1,74 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.error Schema + * @summary ClaimResponseerror Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseError', - description: 'Mutually exclusive with Services Provided (Item).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: - 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', - }, - detailSequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - _detailSequenceLinkId: { - type: require('./element.schema'), - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - subdetailSequenceLinkId: { - type: PositiveIntScalar, - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - _subdetailSequenceLinkId: { - type: require('./element.schema'), - description: - 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'An error code,from a specified code system, which details why the claim could not be adjudicated.', - }, - }), + name: 'ClaimResponseerror', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', + }, + sequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error is elsewhere.', + }, + _detailSequenceLinkId: { + type: require('./element.schema.js'), + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + detailSequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + _subdetailSequenceLinkId: { + type: require('./element.schema.js'), + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + subdetailSequenceLinkId: { + type: PositiveIntScalar, + description: + 'The sequence number of the addition within the line item submitted which contains the error. This value is omitted when the error is not related to an Addition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'An error code,from a specified code system, which details why the claim could not be adjudicated.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseinsurance.schema.js b/src/resources/3_0_1/schemas/claimresponseinsurance.schema.js index ad10c678..5e477972 100644 --- a/src/resources/3_0_1/schemas/claimresponseinsurance.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseinsurance.schema.js @@ -1,70 +1,108 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.insurance Schema + * @summary ClaimResponseinsurance Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseInsurance', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line item.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line item.', - }, - focal: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - _focal: { - type: require('./element.schema'), - description: - 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', - }, - coverage: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Reference to the program or plan identification, underwriter or payor.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.schema'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.schema'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - claimResponse: { - type: require('./reference.schema'), + name: 'ClaimResponseinsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line item.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line item.', + }, + _focal: { + type: require('./element.schema.js'), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimResponseinsurancecoverage_coverage_Union', + description: + 'Reference to the program or plan identification, underwriter or payor.', + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _businessArrangement: { + type: require('./element.schema.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + claimResponse: { + type: new GraphQLUnionType({ + name: 'ClaimResponseinsuranceclaimResponse_claimResponse_Union', description: 'The Coverages adjudication details.', - }, - }), + types: () => [require('./claimresponse.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + description: 'The Coverages adjudication details.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseitem.schema.js b/src/resources/3_0_1/schemas/claimresponseitem.schema.js index ee871e2b..d1960071 100644 --- a/src/resources/3_0_1/schemas/claimresponseitem.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseitem.schema.js @@ -1,43 +1,65 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item Schema + * @summary ClaimResponseitem Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItem', - description: 'The first tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: 'A service line number.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - adjudication: { - type: new GraphQLList( - require('./claimresponseitemadjudication.schema'), - ), - description: 'The adjudication results.', - }, - detail: { - type: new GraphQLList(require('./claimresponseitemdetail.schema')), - description: - 'The second tier service adjudications for submitted services.', - }, - }), + name: 'ClaimResponseitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + adjudication: { + type: new GraphQLList( + require('./claimresponseitemadjudication.schema.js'), + ), + description: 'The adjudication results.', + }, + detail: { + type: new GraphQLList(require('./claimresponseitemdetail.schema.js')), + description: + 'The second tier service adjudications for submitted services.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseitemadjudication.schema.js b/src/resources/3_0_1/schemas/claimresponseitemadjudication.schema.js index 7edc9dea..d7113435 100644 --- a/src/resources/3_0_1/schemas/claimresponseitemadjudication.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseitemadjudication.schema.js @@ -1,40 +1,63 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ClaimResponse.item.adjudication Schema + * @summary ClaimResponseitemadjudication Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItemAdjudication', - description: 'The adjudication results.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - category: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-reason - reason: { - type: require('./codeableconcept.schema'), - description: 'Adjudication reason such as limit reached.', - }, - amount: { - type: require('./money.schema'), - description: 'Monetary amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.schema'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ClaimResponseitemadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-reason + reason: { + type: require('./codeableconcept.schema.js'), + description: 'Adjudication reason such as limit reached.', + }, + amount: { + type: require('./money.schema.js'), + description: 'Monetary amount associated with the code.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseitemdetail.schema.js b/src/resources/3_0_1/schemas/claimresponseitemdetail.schema.js index 9a53b0f2..589e7e1e 100644 --- a/src/resources/3_0_1/schemas/claimresponseitemdetail.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseitemdetail.schema.js @@ -1,39 +1,61 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail Schema + * @summary ClaimResponseitemdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItemDetail', - description: 'The second tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: 'A service line number.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - subDetail: { - type: new GraphQLList( - require('./claimresponseitemdetailsubdetail.schema'), - ), - description: - 'The third tier service adjudications for submitted services.', - }, - }), + name: 'ClaimResponseitemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + subDetail: { + type: new GraphQLList( + require('./claimresponseitemdetailsubdetail.schema.js'), + ), + description: + 'The third tier service adjudications for submitted services.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseitemdetailsubdetail.schema.js b/src/resources/3_0_1/schemas/claimresponseitemdetailsubdetail.schema.js index d206c514..5adc979b 100644 --- a/src/resources/3_0_1/schemas/claimresponseitemdetailsubdetail.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseitemdetailsubdetail.schema.js @@ -1,32 +1,54 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.item.detail.subDetail Schema + * @summary ClaimResponseitemdetailsubDetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseItemDetailSubDetail', - description: 'The third tier service adjudications for submitted services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: 'A service line number.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - }), + name: 'ClaimResponseitemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponsepayment.schema.js b/src/resources/3_0_1/schemas/claimresponsepayment.schema.js index 6bbc6e21..8a79aff3 100644 --- a/src/resources/3_0_1/schemas/claimresponsepayment.schema.js +++ b/src/resources/3_0_1/schemas/claimresponsepayment.schema.js @@ -1,48 +1,65 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ClaimResponse.payment Schema + * @summary ClaimResponsepayment Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponsePayment', - description: 'Payment details for the claim if the claim has been paid.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-paymenttype - type: { - type: require('./codeableconcept.schema'), - description: - 'Whether this represents partial or complete payment of the claim.', - }, - adjustment: { - type: require('./money.schema'), - description: - 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-adjustment-reason - adjustmentReason: { - type: require('./codeableconcept.schema'), - description: 'Reason for the payment adjustment.', - }, - date: { - type: DateScalar, - description: 'Estimated payment data.', - }, - _date: { - type: require('./element.schema'), - description: 'Estimated payment data.', - }, - amount: { - type: require('./money.schema'), - description: 'Payable less any payment adjustment.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Payment identifier.', - }, - }), + name: 'ClaimResponsepayment', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-paymenttype + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether this represents partial or complete payment of the claim.', + }, + adjustment: { + type: require('./money.schema.js'), + description: + 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-adjustment-reason + adjustmentReason: { + type: require('./codeableconcept.schema.js'), + description: 'Reason for the payment adjustment.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Estimated payment data.', + }, + date: { + type: DateScalar, + description: 'Estimated payment data.', + }, + amount: { + type: require('./money.schema.js'), + description: 'Payable less any payment adjustment.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Payment identifier.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/claimresponseprocessnote.schema.js b/src/resources/3_0_1/schemas/claimresponseprocessnote.schema.js index 3ea8eb6a..cc080bc6 100644 --- a/src/resources/3_0_1/schemas/claimresponseprocessnote.schema.js +++ b/src/resources/3_0_1/schemas/claimresponseprocessnote.schema.js @@ -1,45 +1,62 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ClaimResponse.processNote Schema + * @summary ClaimResponseprocessNote Schema */ module.exports = new GraphQLObjectType({ - name: 'ClaimResponseProcessNote', - description: 'Note text.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - number: { - type: PositiveIntScalar, - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - _number: { - type: require('./element.schema'), - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./codeableconcept.schema'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.schema'), - description: 'The note text.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: require('./codeableconcept.schema'), - description: - "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", - }, - }), + name: 'ClaimResponseprocessNote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _number: { + type: require('./element.schema.js'), + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + number: { + type: PositiveIntScalar, + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./codeableconcept.schema.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: require('./codeableconcept.schema.js'), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/clinicalimpression.schema.js b/src/resources/3_0_1/schemas/clinicalimpression.schema.js index 3bcf8b04..d7a1ed02 100644 --- a/src/resources/3_0_1/schemas/clinicalimpression.schema.js +++ b/src/resources/3_0_1/schemas/clinicalimpression.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ClinicalImpressionResourceType = new GraphQLEnumType({ - name: 'ClinicalImpressionResourceType', - values: { - ClinicalImpression: { value: 'ClinicalImpression' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,137 +17,306 @@ let ClinicalImpressionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ClinicalImpression', - description: 'Base StructureDefinition for ClinicalImpression Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ClinicalImpressionResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A unique identifier assigned to the clinical impression that remains consistent regardless of what server the impression is stored on.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-impression-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Identifies the workflow status of the assessment.', - }, - _status: { - type: require('./element.schema'), - description: 'Identifies the workflow status of the assessment.', - }, - code: { - type: require('./codeableconcept.schema'), - description: 'Categorizes the type of clinical assessment performed.', - }, - description: { - type: GraphQLString, - description: - 'A summary of the context and/or cause of the assessment - why / where was it performed, and what patient events/status prompted it.', - }, - _description: { - type: require('./element.schema'), - description: - 'A summary of the context and/or cause of the assessment - why / where was it performed, and what patient events/status prompted it.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The patient or group of individuals assessed as part of this record.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ClinicalImpression Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClinicalImpression_Enum_schema', + values: { ClinicalImpression: { value: 'ClinicalImpression' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'A unique identifier assigned to the clinical impression that remains consistent regardless of what server the impression is stored on.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Identifies the workflow status of the assessment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-impression-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the workflow status of the assessment.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'Categorizes the type of clinical assessment performed.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A summary of the context and/or cause of the assessment - why / where was it performed, and what patient events/status prompted it.', + }, + description: { + type: GraphQLString, + description: + 'A summary of the context and/or cause of the assessment - why / where was it performed, and what patient events/status prompted it.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClinicalImpressionsubject_subject_Union', + description: + 'The patient or group of individuals assessed as part of this record.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The patient or group of individuals assessed as part of this record.', + }, + context: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressioncontext_context_Union', description: 'The encounter or episode of care this impression was created as part of.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - 'The point in time or period over which the subject was assessed.', - }, - _effectiveDateTime: { - type: require('./element.schema'), - description: - 'The point in time or period over which the subject was assessed.', - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The point in time or period over which the subject was assessed.', - }, - date: { - type: DateTimeScalar, - description: - 'Indicates when the documentation of the assessment was complete.', - }, - _date: { - type: require('./element.schema'), - description: - 'Indicates when the documentation of the assessment was complete.', - }, - assessor: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care this impression was created as part of.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + 'The point in time or period over which the subject was assessed.', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The point in time or period over which the subject was assessed.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The point in time or period over which the subject was assessed.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'Indicates when the documentation of the assessment was complete.', + }, + date: { + type: DateTimeScalar, + description: + 'Indicates when the documentation of the assessment was complete.', + }, + assessor: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressionassessor_assessor_Union', description: 'The clinician performing the assessment.', - }, - previous: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The clinician performing the assessment.', + }, + previous: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressionprevious_previous_Union', description: "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", - }, - problem: { - type: new GraphQLList(require('./reference.schema')), - description: - 'This a list of the relevant problems/conditions for a patient.', - }, - investigation: { - type: new GraphQLList( - require('./clinicalimpressioninvestigation.schema'), - ), - description: - 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', - }, - protocol: { - type: new GraphQLList(UriScalar), - description: - 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', - }, - _protocol: { - type: require('./element.schema'), - description: - 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', - }, - summary: { - type: GraphQLString, - description: 'A text summary of the investigations and the diagnosis.', - }, - _summary: { - type: require('./element.schema'), - description: 'A text summary of the investigations and the diagnosis.', - }, - finding: { - type: new GraphQLList(require('./clinicalimpressionfinding.schema')), - description: - 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis - prognosisCodeableConcept: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Estimate of likely outcome.', - }, - prognosisReference: { - type: new GraphQLList(require('./reference.schema')), - description: 'RiskAssessment expressing likely outcome.', - }, - action: { - type: new GraphQLList(require('./reference.schema')), - description: 'Action taken as part of assessment procedure.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.', - }, - }), + types: () => [require('./clinicalimpression.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); + } + }, + }), + description: + "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", + }, + problem: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionproblem_problem_Union', + description: + 'This a list of the relevant problems/conditions for a patient.', + types: () => [ + require('./condition.schema.js'), + require('./allergyintolerance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + }, + }), + ), + description: + 'This a list of the relevant problems/conditions for a patient.', + }, + investigation: { + type: new GraphQLList( + require('./clinicalimpressioninvestigation.schema.js'), + ), + description: + 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', + }, + _protocol: { + type: require('./element.schema.js'), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + protocol: { + type: new GraphQLList(UriScalar), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + _summary: { + type: require('./element.schema.js'), + description: 'A text summary of the investigations and the diagnosis.', + }, + summary: { + type: GraphQLString, + description: 'A text summary of the investigations and the diagnosis.', + }, + finding: { + type: new GraphQLList(require('./clinicalimpressionfinding.schema.js')), + description: + 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis + prognosisCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Estimate of likely outcome.', + }, + prognosisReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionprognosisReference_prognosisReference_Union', + description: 'RiskAssessment expressing likely outcome.', + types: () => [require('./riskassessment.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); + } + }, + }), + ), + description: 'RiskAssessment expressing likely outcome.', + }, + action: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionaction_action_Union', + description: 'Action taken as part of assessment procedure.', + types: () => [ + require('./referralrequest.schema.js'), + require('./procedurerequest.schema.js'), + require('./procedure.schema.js'), + require('./medicationrequest.schema.js'), + require('./appointment.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + }, + }), + ), + description: 'Action taken as part of assessment procedure.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/clinicalimpressionfinding.schema.js b/src/resources/3_0_1/schemas/clinicalimpressionfinding.schema.js index 3e7e9f3f..86fbdde3 100644 --- a/src/resources/3_0_1/schemas/clinicalimpressionfinding.schema.js +++ b/src/resources/3_0_1/schemas/clinicalimpressionfinding.schema.js @@ -1,36 +1,76 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ClinicalImpression.finding Schema + * @summary ClinicalImpressionfinding Schema */ module.exports = new GraphQLObjectType({ - name: 'ClinicalImpressionFinding', - description: - 'Specific findings or diagnoses that was considered likely or relevant to ongoing treatment.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - itemCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - itemReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', - }, - basis: { - type: GraphQLString, - description: 'Which investigations support finding or diagnosis.', - }, - _basis: { - type: require('./element.schema'), - description: 'Which investigations support finding or diagnosis.', - }, - }), + name: 'ClinicalImpressionfinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + itemReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClinicalImpressionfindingitemReference_itemReference_Union', + description: + 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Specific text, code or reference for finding or diagnosis, which may include ruled-out or resolved conditions.', + }, + _basis: { + type: require('./element.schema.js'), + description: 'Which investigations support finding or diagnosis.', + }, + basis: { + type: GraphQLString, + description: 'Which investigations support finding or diagnosis.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/clinicalimpressioninvestigation.schema.js b/src/resources/3_0_1/schemas/clinicalimpressioninvestigation.schema.js index 3f40ae13..29f76de9 100644 --- a/src/resources/3_0_1/schemas/clinicalimpressioninvestigation.schema.js +++ b/src/resources/3_0_1/schemas/clinicalimpressioninvestigation.schema.js @@ -1,27 +1,82 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ClinicalImpression.investigation Schema + * @summary ClinicalImpressioninvestigation Schema */ module.exports = new GraphQLObjectType({ - name: 'ClinicalImpressionInvestigation', - description: - 'One or more sets of investigations (signs, symptions, etc.). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/investigation-sets - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", - }, - item: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A record of a specific investigation that was undertaken.', - }, - }), + name: 'ClinicalImpressioninvestigation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/investigation-sets + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", + }, + item: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressioninvestigationitem_item_Union', + description: + 'A record of a specific investigation that was undertaken.', + types: () => [ + require('./observation.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./familymemberhistory.schema.js'), + require('./diagnosticreport.schema.js'), + require('./riskassessment.schema.js'), + require('./imagingstudy.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'FamilyMemberHistory') { + return require('./familymemberhistory.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); + } + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + }, + }), + ), + description: 'A record of a specific investigation that was undertaken.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/codeableconcept.schema.js b/src/resources/3_0_1/schemas/codeableconcept.schema.js index d1364f67..bc9cdce8 100644 --- a/src/resources/3_0_1/schemas/codeableconcept.schema.js +++ b/src/resources/3_0_1/schemas/codeableconcept.schema.js @@ -1,6 +1,4 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports @@ -8,22 +6,36 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'CodeableConcept', - description: 'Base StructureDefinition for CodeableConcept Type.', - fields: () => - extendSchema(require('./element.schema'), { - coding: { - type: new GraphQLList(require('./coding.schema')), - description: 'A reference to a code defined by a terminology system.', - }, - text: { - type: GraphQLString, - description: - 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', - }, - _text: { - type: require('./element.schema'), - description: - 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', - }, - }), + description: 'Base StructureDefinition for CodeableConcept Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + coding: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'A reference to a code defined by a terminology system.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + text: { + type: GraphQLString, + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/codesystem.schema.js b/src/resources/3_0_1/schemas/codesystem.schema.js index 61d9e725..5a5520eb 100644 --- a/src/resources/3_0_1/schemas/codesystem.schema.js +++ b/src/resources/3_0_1/schemas/codesystem.schema.js @@ -1,24 +1,17 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CodeSystemResourceType = new GraphQLEnumType({ - name: 'CodeSystemResourceType', - values: { - CodeSystem: { value: 'CodeSystem' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -26,227 +19,285 @@ let CodeSystemResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'CodeSystem', - description: 'Base StructureDefinition for CodeSystem Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CodeSystemResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. The URL SHOULD include the major version of the code system. For more information see [Technical and Business Versions](resource.html#versions). This is used in [Coding]{datatypes.html#Coding}.system.', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. The URL SHOULD include the major version of the code system. For more information see [Technical and Business Versions](resource.html#versions). This is used in [Coding]{datatypes.html#Coding}.system.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding]{datatypes.html#Coding}.version.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding]{datatypes.html#Coding}.version.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the code system.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this code system. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this code system. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the code system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the code system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the code system.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the code system.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the code system from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the code system from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate code system instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the code system is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this code system is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this code system is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', - }, - caseSensitive: { - type: GraphQLBoolean, - description: - 'If code comparison is case sensitive when codes within this system are compared to each other.', - }, - _caseSensitive: { - type: require('./element.schema'), - description: - 'If code comparison is case sensitive when codes within this system are compared to each other.', - }, - valueSet: { - type: UriScalar, - description: - 'Canonical URL of value set that contains the entire code system.', - }, - _valueSet: { - type: require('./element.schema'), - description: - 'Canonical URL of value set that contains the entire code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning - hierarchyMeaning: { - type: CodeScalar, - description: 'The meaning of the hierarchy of concepts.', - }, - _hierarchyMeaning: { - type: require('./element.schema'), - description: 'The meaning of the hierarchy of concepts.', - }, - compositional: { - type: GraphQLBoolean, - description: 'True If code system defines a post-composition grammar.', - }, - _compositional: { - type: require('./element.schema'), - description: 'True If code system defines a post-composition grammar.', - }, - versionNeeded: { - type: GraphQLBoolean, - description: - 'This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.', - }, - _versionNeeded: { - type: require('./element.schema'), - description: - 'This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/codesystem-content-mode - content: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How much of the content of the code system - the concepts and codes it defines - are represented in this resource.', - }, - _content: { - type: require('./element.schema'), - description: - 'How much of the content of the code system - the concepts and codes it defines - are represented in this resource.', - }, - count: { - type: UnsignedIntScalar, - description: - 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts.', - }, - _count: { - type: require('./element.schema'), - description: - 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts.', - }, - filter: { - type: new GraphQLList(require('./codesystemfilter.schema')), - description: - 'A filter that can be used in a value set compose statement when selecting concepts using a filter.', - }, - property: { - type: new GraphQLList(require('./codesystemproperty.schema')), - description: - 'A property defines an additional slot through which additional information can be provided about a concept.', - }, - concept: { - type: new GraphQLList(require('./codesystemconcept.schema')), - description: - 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', - }, - }), + description: 'Base StructureDefinition for CodeSystem Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CodeSystem_Enum_schema', + values: { CodeSystem: { value: 'CodeSystem' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. The URL SHOULD include the major version of the code system. For more information see [Technical and Business Versions](resource.html#versions). This is used in [Coding]{datatypes.html#Coding}.system.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this code system is (or will be) published. The URL SHOULD include the major version of the code system. For more information see [Technical and Business Versions](resource.html#versions). This is used in [Coding]{datatypes.html#Coding}.system.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding]{datatypes.html#Coding}.version.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding]{datatypes.html#Coding}.version.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the code system.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the code system.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this code system. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this code system. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the code system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the code system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the code system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the code system.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the code system from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the code system from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate code system instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the code system is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this code system is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this code system is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', + }, + _caseSensitive: { + type: require('./element.schema.js'), + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + caseSensitive: { + type: GraphQLBoolean, + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + _valueSet: { + type: require('./element.schema.js'), + description: + 'Canonical URL of value set that contains the entire code system.', + }, + valueSet: { + type: UriScalar, + description: + 'Canonical URL of value set that contains the entire code system.', + }, + _hierarchyMeaning: { + type: require('./element.schema.js'), + description: 'The meaning of the hierarchy of concepts.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning + hierarchyMeaning: { + type: CodeScalar, + description: 'The meaning of the hierarchy of concepts.', + }, + _compositional: { + type: require('./element.schema.js'), + description: 'True If code system defines a post-composition grammar.', + }, + compositional: { + type: GraphQLBoolean, + description: 'True If code system defines a post-composition grammar.', + }, + _versionNeeded: { + type: require('./element.schema.js'), + description: + 'This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.', + }, + versionNeeded: { + type: GraphQLBoolean, + description: + 'This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.', + }, + _content: { + type: require('./element.schema.js'), + description: + 'How much of the content of the code system - the concepts and codes it defines - are represented in this resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/codesystem-content-mode + content: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How much of the content of the code system - the concepts and codes it defines - are represented in this resource.', + }, + _count: { + type: require('./element.schema.js'), + description: + 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts.', + }, + count: { + type: UnsignedIntScalar, + description: + 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts.', + }, + filter: { + type: new GraphQLList(require('./codesystemfilter.schema.js')), + description: + 'A filter that can be used in a value set compose statement when selecting concepts using a filter.', + }, + property: { + type: new GraphQLList(require('./codesystemproperty.schema.js')), + description: + 'A property defines an additional slot through which additional information can be provided about a concept.', + }, + concept: { + type: new GraphQLList(require('./codesystemconcept.schema.js')), + description: + 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/codesystemconcept.schema.js b/src/resources/3_0_1/schemas/codesystemconcept.schema.js index 3e361974..bb94388c 100644 --- a/src/resources/3_0_1/schemas/codesystemconcept.schema.js +++ b/src/resources/3_0_1/schemas/codesystemconcept.schema.js @@ -1,61 +1,79 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CodeSystem.concept Schema + * @summary CodeSystemconcept Schema */ module.exports = new GraphQLObjectType({ - name: 'CodeSystemConcept', - description: - 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code - a text symbol - that uniquely identifies the concept within the code system.', - }, - _code: { - type: require('./element.schema'), - description: - 'A code - a text symbol - that uniquely identifies the concept within the code system.', - }, - display: { - type: GraphQLString, - description: - 'A human readable string that is the recommended default way to present this concept to a user.', - }, - _display: { - type: require('./element.schema'), - description: - 'A human readable string that is the recommended default way to present this concept to a user.', - }, - definition: { - type: GraphQLString, - description: - 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', - }, - _definition: { - type: require('./element.schema'), - description: - 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', - }, - designation: { - type: new GraphQLList(require('./codesystemconceptdesignation.schema')), - description: - 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', - }, - property: { - type: new GraphQLList(require('./codesystemconceptproperty.schema')), - description: 'A property value for this concept.', - }, - }), + name: 'CodeSystemconcept', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + display: { + type: GraphQLString, + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + definition: { + type: GraphQLString, + description: + 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + designation: { + type: new GraphQLList( + require('./codesystemconceptdesignation.schema.js'), + ), + description: + 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + property: { + type: new GraphQLList(require('./codesystemconceptproperty.schema.js')), + description: 'A property value for this concept.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/codesystemconceptdesignation.schema.js b/src/resources/3_0_1/schemas/codesystemconceptdesignation.schema.js index f9b25816..3e3fd4b2 100644 --- a/src/resources/3_0_1/schemas/codesystemconceptdesignation.schema.js +++ b/src/resources/3_0_1/schemas/codesystemconceptdesignation.schema.js @@ -1,39 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CodeSystem.concept.designation Schema + * @summary CodeSystemconceptdesignation Schema */ module.exports = new GraphQLObjectType({ - name: 'CodeSystemConceptDesignation', - description: - 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.schema'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.schema'), - description: 'A code that details how this designation would be used.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text value for this designation.', - }, - _value: { - type: require('./element.schema'), - description: 'The text value for this designation.', - }, - }), + name: 'CodeSystemconceptdesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.schema.js'), + description: 'A code that details how this designation would be used.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/codesystemconceptproperty.schema.js b/src/resources/3_0_1/schemas/codesystemconceptproperty.schema.js index 7d3469ff..2d77be36 100644 --- a/src/resources/3_0_1/schemas/codesystemconceptproperty.schema.js +++ b/src/resources/3_0_1/schemas/codesystemconceptproperty.schema.js @@ -1,75 +1,93 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLInt, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary CodeSystem.concept.property Schema + * @summary CodeSystemconceptproperty Schema */ module.exports = new GraphQLObjectType({ - name: 'CodeSystemConceptProperty', - description: 'A property value for this concept.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'A code that is a reference to CodeSystem.property.code.', - }, - _code: { - type: require('./element.schema'), - description: 'A code that is a reference to CodeSystem.property.code.', - }, - valueCode: { - type: new GraphQLNonNull(CodeScalar), - description: 'The value of this property.', - }, - _valueCode: { - type: require('./element.schema'), - description: 'The value of this property.', - }, - valueCoding: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The value of this property.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of this property.', - }, - _valueString: { - type: require('./element.schema'), - description: 'The value of this property.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: 'The value of this property.', - }, - _valueInteger: { - type: require('./element.schema'), - description: 'The value of this property.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'The value of this property.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: 'The value of this property.', - }, - valueDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The value of this property.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: 'The value of this property.', - }, - }), + name: 'CodeSystemconceptproperty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: 'A code that is a reference to CodeSystem.property.code.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'A code that is a reference to CodeSystem.property.code.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of this property.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The value of this property.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of this property.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of this property.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of this property.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of this property.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/codesystemfilter.schema.js b/src/resources/3_0_1/schemas/codesystemfilter.schema.js index b4218f38..51bf196c 100644 --- a/src/resources/3_0_1/schemas/codesystemfilter.schema.js +++ b/src/resources/3_0_1/schemas/codesystemfilter.schema.js @@ -1,59 +1,73 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CodeSystem.filter Schema + * @summary CodeSystemfilter Schema */ module.exports = new GraphQLObjectType({ - name: 'CodeSystemFilter', - description: - 'A filter that can be used in a value set compose statement when selecting concepts using a filter.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The code that identifies this filter when it is used in the instance.', - }, - _code: { - type: require('./element.schema'), - description: - 'The code that identifies this filter when it is used in the instance.', - }, - description: { - type: GraphQLString, - description: 'A description of how or why the filter is used.', - }, - _description: { - type: require('./element.schema'), - description: 'A description of how or why the filter is used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/filter-operator - operator: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: 'A list of operators that can be used with the filter.', - }, - _operator: { - type: require('./element.schema'), - description: 'A list of operators that can be used with the filter.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A description of what the value for the filter should be.', - }, - _value: { - type: require('./element.schema'), - description: - 'A description of what the value for the filter should be.', - }, - }), + name: 'CodeSystemfilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The code that identifies this filter when it is used in the instance.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code that identifies this filter when it is used in the instance.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of how or why the filter is used.', + }, + description: { + type: GraphQLString, + description: 'A description of how or why the filter is used.', + }, + _operator: { + type: require('./element.schema.js'), + description: 'A list of operators that can be used with the filter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/filter-operator + operator: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'A list of operators that can be used with the filter.', + }, + _value: { + type: require('./element.schema.js'), + description: 'A description of what the value for the filter should be.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of what the value for the filter should be.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/codesystemproperty.schema.js b/src/resources/3_0_1/schemas/codesystemproperty.schema.js index 928927ba..68accc44 100644 --- a/src/resources/3_0_1/schemas/codesystemproperty.schema.js +++ b/src/resources/3_0_1/schemas/codesystemproperty.schema.js @@ -1,59 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary CodeSystem.property Schema + * @summary CodeSystemproperty Schema */ module.exports = new GraphQLObjectType({ - name: 'CodeSystemProperty', - description: - 'A property defines an additional slot through which additional information can be provided about a concept.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', - }, - _code: { - type: require('./element.schema'), - description: - 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', - }, - uri: { - type: UriScalar, - description: - 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', - }, - _uri: { - type: require('./element.schema'), - description: - 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', - }, - description: { - type: GraphQLString, - description: - 'A description of the property- why it is defined, and how its value might be used.', - }, - _description: { - type: require('./element.schema'), - description: - 'A description of the property- why it is defined, and how its value might be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/concept-property-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to anotherr defined concept).", - }, - _type: { - type: require('./element.schema'), - description: - "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to anotherr defined concept).", - }, - }), + name: 'CodeSystemproperty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', + }, + uri: { + type: UriScalar, + description: + 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A description of the property- why it is defined, and how its value might be used.', + }, + description: { + type: GraphQLString, + description: + 'A description of the property- why it is defined, and how its value might be used.', + }, + _type: { + type: require('./element.schema.js'), + description: + "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to anotherr defined concept).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/concept-property-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to anotherr defined concept).", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/coding.schema.js b/src/resources/3_0_1/schemas/coding.schema.js index b0f9709d..594b5122 100644 --- a/src/resources/3_0_1/schemas/coding.schema.js +++ b/src/resources/3_0_1/schemas/coding.schema.js @@ -1,8 +1,11 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -10,58 +13,72 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Coding', - description: 'Base StructureDefinition for Coding Type.', - fields: () => - extendSchema(require('./element.schema'), { - system: { - type: UriScalar, - description: - 'The identification of the code system that defines the meaning of the symbol in the code.', - }, - _system: { - type: require('./element.schema'), - description: - 'The identification of the code system that defines the meaning of the symbol in the code.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', - }, - code: { - type: CodeScalar, - description: - 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', - }, - _code: { - type: require('./element.schema'), - description: - 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', - }, - display: { - type: GraphQLString, - description: - 'A representation of the meaning of the code in the system, following the rules of the system.', - }, - _display: { - type: require('./element.schema'), - description: - 'A representation of the meaning of the code in the system, following the rules of the system.', - }, - userSelected: { - type: GraphQLBoolean, - description: - 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', - }, - _userSelected: { - type: require('./element.schema'), - description: - 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', - }, - }), + description: 'Base StructureDefinition for Coding Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + system: { + type: UriScalar, + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + code: { + type: CodeScalar, + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + _display: { + type: require('./element.schema.js'), + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + display: { + type: GraphQLString, + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + _userSelected: { + type: require('./element.schema.js'), + description: + 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', + }, + userSelected: { + type: GraphQLBoolean, + description: + 'Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/communication.schema.js b/src/resources/3_0_1/schemas/communication.schema.js index 67c6e503..544f8cb1 100644 --- a/src/resources/3_0_1/schemas/communication.schema.js +++ b/src/resources/3_0_1/schemas/communication.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CommunicationResourceType = new GraphQLEnumType({ - name: 'CommunicationResourceType', - values: { - Communication: { value: 'Communication' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,130 +17,352 @@ let CommunicationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Communication', - description: 'Base StructureDefinition for Communication Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CommunicationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A protocol, guideline, or other definition that was adhered to in whole or in part by this communication event.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'An order, proposal or plan fulfilled in whole or in part by this Communication.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: 'Part of this action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the transmission.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the transmission.', - }, - notDone: { - type: GraphQLBoolean, - description: - 'If true, indicates that the described communication event did not actually occur.', - }, - _notDone: { - type: require('./element.schema'), - description: - 'If true, indicates that the described communication event did not actually occur.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-not-done-reason - notDoneReason: { - type: require('./codeableconcept.schema'), - description: - 'Describes why the communication event did not occur in coded and/or textual form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode - medium: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A channel that was used for this communication (e.g. email, fax).', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Communication Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Communication_Enum_schema', + values: { Communication: { value: 'Communication' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Communicationdefinition_definition_Union', + description: + 'A protocol, guideline, or other definition that was adhered to in whole or in part by this communication event.', + types: () => [ + require('./plandefinition.schema.js'), + require('./activitydefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + }, + }), + ), + description: + 'A protocol, guideline, or other definition that was adhered to in whole or in part by this communication event.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationbasedOn_basedOn_Union', + description: + 'An order, proposal or plan fulfilled in whole or in part by this Communication.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'An order, proposal or plan fulfilled in whole or in part by this Communication.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationpartOf_partOf_Union', + description: 'Part of this action.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Part of this action.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the transmission.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the transmission.', + }, + _notDone: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the described communication event did not actually occur.', + }, + notDone: { + type: GraphQLBoolean, + description: + 'If true, indicates that the described communication event did not actually occur.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-not-done-reason + notDoneReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes why the communication event did not occur in coded and/or textual form.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode + medium: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Communicationsubject_subject_Union', description: 'The patient or group that was the focus of this communication.', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', - }, - topic: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The resources which were responsible for or related to producing this communication.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The patient or group that was the focus of this communication.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Communicationrecipient_recipient_Union', + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the target of the communication. If receipts need to be tracked by individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either a receipt(s) is not tracked (e.g. a mass mail-out) or is captured in aggregate (all emails confirmed received by a particular time).', + }, + topic: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Communicationtopic_topic_Union', + description: + 'The resources which were responsible for or related to producing this communication.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The resources which were responsible for or related to producing this communication.', + }, + context: { + type: new GraphQLUnionType({ + name: 'Communicationcontext_context_Union', description: 'The encounter within which the communication was sent.', - }, - sent: { - type: DateTimeScalar, - description: 'The time when this communication was sent.', - }, - _sent: { - type: require('./element.schema'), - description: 'The time when this communication was sent.', - }, - received: { - type: DateTimeScalar, - description: - 'The time when this communication arrived at the destination.', - }, - _received: { - type: require('./element.schema'), - description: - 'The time when this communication arrived at the destination.', - }, - sender: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: 'The encounter within which the communication was sent.', + }, + _sent: { + type: require('./element.schema.js'), + description: 'The time when this communication was sent.', + }, + sent: { + type: DateTimeScalar, + description: 'The time when this communication was sent.', + }, + _received: { + type: require('./element.schema.js'), + description: + 'The time when this communication arrived at the destination.', + }, + received: { + type: DateTimeScalar, + description: + 'The time when this communication arrived at the destination.', + }, + sender: { + type: new GraphQLUnionType({ + name: 'Communicationsender_sender_Union', description: 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'The reason or justification for the communication.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates another resource whose existence justifies this communication.', - }, - payload: { - type: new GraphQLList(require('./communicationpayload.schema')), - description: - 'Text, attachment(s), or resource(s) that was communicated to the recipient.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Additional notes or commentary about the communication by the sender, receiver or other interested parties.', - }, - }), + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason or justification for the communication.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies this communication.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies this communication.', + }, + payload: { + type: new GraphQLList(require('./communicationpayload.schema.js')), + description: + 'Text, attachment(s), or resource(s) that was communicated to the recipient.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Additional notes or commentary about the communication by the sender, receiver or other interested parties.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/communicationpayload.schema.js b/src/resources/3_0_1/schemas/communicationpayload.schema.js index 1df61402..85cf0353 100644 --- a/src/resources/3_0_1/schemas/communicationpayload.schema.js +++ b/src/resources/3_0_1/schemas/communicationpayload.schema.js @@ -1,36 +1,70 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Communication.payload Schema + * @summary Communicationpayload Schema */ module.exports = new GraphQLObjectType({ - name: 'CommunicationPayload', - description: - 'Text, attachment(s), or resource(s) that was communicated to the recipient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - _contentString: { - type: require('./element.schema'), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A communicated content (or for multi-part communications, one portion of the communication).', - }, - }), + name: 'Communicationpayload', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _contentString: { + type: require('./element.schema.js'), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CommunicationpayloadcontentReference_contentReference_Union', + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/communicationrequest.schema.js b/src/resources/3_0_1/schemas/communicationrequest.schema.js index f51ab645..9dec3a7d 100644 --- a/src/resources/3_0_1/schemas/communicationrequest.schema.js +++ b/src/resources/3_0_1/schemas/communicationrequest.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CommunicationRequestResourceType = new GraphQLEnumType({ - name: 'CommunicationRequestResourceType', - values: { - CommunicationRequest: { value: 'CommunicationRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,137 +16,347 @@ let CommunicationRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'CommunicationRequest', - description: 'Base StructureDefinition for CommunicationRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CommunicationRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A plan or proposal that is fulfilled in whole or in part by this request.', - }, - replaces: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Completed or terminated request(s) whose function is taken by this new request.', - }, - groupIdentifier: { - type: require('./identifier.schema'), - description: - 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the proposal or order.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the proposal or order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/communication-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', - }, - _priority: { - type: require('./element.schema'), - description: - 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode - medium: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A channel that was used for this communication (e.g. email, fax).', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for CommunicationRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CommunicationRequest_Enum_schema', + values: { CommunicationRequest: { value: 'CommunicationRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestbasedOn_basedOn_Union', + description: + 'A plan or proposal that is fulfilled in whole or in part by this request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A plan or proposal that is fulfilled in whole or in part by this request.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestreplaces_replaces_Union', + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + types: () => [require('./communicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + }, + }), + ), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the proposal or order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the proposal or order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/communication-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ParticipationMode + medium: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestsubject_subject_Union', description: 'The patient or group that is the focus of this communication request.', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.', - }, - topic: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The resources which were related to producing this communication request.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The patient or group that is the focus of this communication request.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestrecipient_recipient_Union', + description: + 'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./group.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + 'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.', + }, + topic: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequesttopic_topic_Union', + description: + 'The resources which were related to producing this communication request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The resources which were related to producing this communication request.', + }, + context: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestcontext_context_Union', description: 'The encounter or episode of care within which the communication request was created.', - }, - payload: { - type: new GraphQLList(require('./communicationrequestpayload.schema')), - description: - 'Text, attachment(s), or resource(s) to be communicated to the recipient.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'The time when this communication is to occur.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: 'The time when this communication is to occur.', - }, - occurrencePeriod: { - type: require('./period.schema'), - description: 'The time when this communication is to occur.', - }, - authoredOn: { - type: DateTimeScalar, - description: - 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', - }, - _authoredOn: { - type: require('./element.schema'), - description: - 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', - }, - sender: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care within which the communication request was created.', + }, + payload: { + type: new GraphQLList(require('./communicationrequestpayload.schema.js')), + description: + 'Text, attachment(s), or resource(s) to be communicated to the recipient.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'The time when this communication is to occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The time when this communication is to occur.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'The time when this communication is to occur.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: + 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', + }, + sender: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestsender_sender_Union', description: 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', - }, - requester: { - type: require('./communicationrequestrequester.schema'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActReason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Describes why the request is being made in coded or textual form.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates another resource whose existence justifies this request.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Comments made about the request by the requester, sender, recipient, subject or other participants.', - }, - }), + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', + }, + requester: { + type: require('./communicationrequestrequester.schema.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActReason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Describes why the request is being made in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies this request.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies this request.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the request by the requester, sender, recipient, subject or other participants.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/communicationrequestpayload.schema.js b/src/resources/3_0_1/schemas/communicationrequestpayload.schema.js index 88afaea1..860ff7f8 100644 --- a/src/resources/3_0_1/schemas/communicationrequestpayload.schema.js +++ b/src/resources/3_0_1/schemas/communicationrequestpayload.schema.js @@ -1,36 +1,71 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary CommunicationRequest.payload Schema + * @summary CommunicationRequestpayload Schema */ module.exports = new GraphQLObjectType({ - name: 'CommunicationRequestPayload', - description: - 'Text, attachment(s), or resource(s) to be communicated to the recipient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - _contentString: { - type: require('./element.schema'), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The communicated content (or for multi-part communications, one portion of the communication).', - }, - }), + name: 'CommunicationRequestpayload', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _contentString: { + type: require('./element.schema.js'), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'CommunicationRequestpayloadcontentReference_contentReference_Union', + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/communicationrequestrequester.schema.js b/src/resources/3_0_1/schemas/communicationrequestrequester.schema.js index 5d07b688..28acb47e 100644 --- a/src/resources/3_0_1/schemas/communicationrequestrequester.schema.js +++ b/src/resources/3_0_1/schemas/communicationrequestrequester.schema.js @@ -1,26 +1,87 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary CommunicationRequest.requester Schema + * @summary CommunicationRequestrequester Schema */ module.exports = new GraphQLObjectType({ - name: 'CommunicationRequestRequester', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - agent: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device, practitioner, etc. who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'CommunicationRequestrequester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + agent: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CommunicationRequestrequesteragent_agent_Union', + description: + 'The device, practitioner, etc. who initiated the request.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The device, practitioner, etc. who initiated the request.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestrequesteronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/compartmentdefinition.schema.js b/src/resources/3_0_1/schemas/compartmentdefinition.schema.js index 0a5f7bf1..25d5e6ee 100644 --- a/src/resources/3_0_1/schemas/compartmentdefinition.schema.js +++ b/src/resources/3_0_1/schemas/compartmentdefinition.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CompartmentDefinitionResourceType = new GraphQLEnumType({ - name: 'CompartmentDefinitionResourceType', - values: { - CompartmentDefinition: { value: 'CompartmentDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,143 +18,201 @@ let CompartmentDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'CompartmentDefinition', - description: 'Base StructureDefinition for CompartmentDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CompartmentDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. The URL SHOULD include the major version of the compartment definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. The URL SHOULD include the major version of the compartment definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the compartment definition.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the compartment definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this compartment definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this compartment definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the compartment definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the compartment definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the compartment definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the compartment definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the compartment definition from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the compartment definition from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this compartment definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this compartment definition is needed and why it has been designed as it has.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate compartment definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the compartment definition is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/compartment-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'Which compartment this definition describes.', - }, - _code: { - type: require('./element.schema'), - description: 'Which compartment this definition describes.', - }, - search: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'Whether the search syntax is supported,.', - }, - _search: { - type: require('./element.schema'), - description: 'Whether the search syntax is supported,.', - }, - resource: { - type: new GraphQLList( - require('./compartmentdefinitionresource.schema'), - ), - description: - 'Information about how a resource is related to the compartment.', - }, - }), + description: 'Base StructureDefinition for CompartmentDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CompartmentDefinition_Enum_schema', + values: { CompartmentDefinition: { value: 'CompartmentDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. The URL SHOULD include the major version of the compartment definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. The URL SHOULD include the major version of the compartment definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the compartment definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the compartment definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this compartment definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this compartment definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the compartment definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the compartment definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the compartment definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the compartment definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the compartment definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the compartment definition from a consumer's perspective.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this compartment definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this compartment definition is needed and why it has been designed as it has.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate compartment definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the compartment definition is intended to be used.', + }, + _code: { + type: require('./element.schema.js'), + description: 'Which compartment this definition describes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/compartment-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Which compartment this definition describes.', + }, + _search: { + type: require('./element.schema.js'), + description: 'Whether the search syntax is supported,.', + }, + search: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether the search syntax is supported,.', + }, + resource: { + type: new GraphQLList( + require('./compartmentdefinitionresource.schema.js'), + ), + description: + 'Information about how a resource is related to the compartment.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/compartmentdefinitionresource.schema.js b/src/resources/3_0_1/schemas/compartmentdefinitionresource.schema.js index 4ba3d6de..9eb16f43 100644 --- a/src/resources/3_0_1/schemas/compartmentdefinitionresource.schema.js +++ b/src/resources/3_0_1/schemas/compartmentdefinitionresource.schema.js @@ -1,51 +1,67 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary CompartmentDefinition.resource Schema + * @summary CompartmentDefinitionresource Schema */ module.exports = new GraphQLObjectType({ - name: 'CompartmentDefinitionResource', - description: - 'Information about how a resource is related to the compartment.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name of a resource supported by the server.', - }, - _code: { - type: require('./element.schema'), - description: 'The name of a resource supported by the server.', - }, - param: { - type: new GraphQLList(GraphQLString), - description: - 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', - }, - _param: { - type: require('./element.schema'), - description: - 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', - }, - documentation: { - type: GraphQLString, - description: - 'Additional documentation about the resource and compartment.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'Additional documentation about the resource and compartment.', - }, - }), + name: 'CompartmentDefinitionresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: 'The name of a resource supported by the server.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of a resource supported by the server.', + }, + _param: { + type: require('./element.schema.js'), + description: + 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', + }, + param: { + type: new GraphQLList(GraphQLString), + description: + 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Additional documentation about the resource and compartment.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional documentation about the resource and compartment.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/composition.schema.js b/src/resources/3_0_1/schemas/composition.schema.js index 06de4919..f9a6d15f 100644 --- a/src/resources/3_0_1/schemas/composition.schema.js +++ b/src/resources/3_0_1/schemas/composition.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CompositionResourceType = new GraphQLEnumType({ - name: 'CompositionResourceType', - values: { - Composition: { value: 'Composition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,110 +17,226 @@ let CompositionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Composition', - description: 'Base StructureDefinition for Composition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CompositionResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', - }, - _status: { - type: require('./element.schema'), - description: - 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-typecodes - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-classcodes - class: { - type: require('./codeableconcept.schema'), - description: - 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', - }, - encounter: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Composition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Composition_Enum_schema', + values: { Composition: { value: 'Composition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-typecodes + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-classcodes + class: { + type: require('./codeableconcept.schema.js'), + description: + 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Compositionsubject_subject_Union', + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Compositionencounter_encounter_Union', description: 'Describes the clinical encounter or type of care this documentation is associated with.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The composition editing time, when the composition was last logically changed by the author.', - }, - _date: { - type: require('./element.schema'), - description: - 'The composition editing time, when the composition was last logically changed by the author.', - }, - author: { - type: new GraphQLList( - new GraphQLNonNull(require('./reference.schema')), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Describes the clinical encounter or type of care this documentation is associated with.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + author: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Compositionauthor_author_Union', + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), ), - description: - 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', - }, - title: { - type: new GraphQLNonNull(GraphQLString), - description: 'Official human-readable label for the composition.', - }, - _title: { - type: require('./element.schema'), - description: 'Official human-readable label for the composition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ConfidentialityClassification - confidentiality: { - type: CodeScalar, - description: - 'The code specifying the level of confidentiality of the Composition.', - }, - _confidentiality: { - type: require('./element.schema'), - description: - 'The code specifying the level of confidentiality of the Composition.', - }, - attester: { - type: new GraphQLList(require('./compositionattester.schema')), - description: - 'A participant who has attested to the accuracy of the composition/document.', - }, - custodian: { - type: require('./reference.schema'), + ), + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + }, + _title: { + type: require('./element.schema.js'), + description: 'Official human-readable label for the composition.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: 'Official human-readable label for the composition.', + }, + _confidentiality: { + type: require('./element.schema.js'), + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ConfidentialityClassification + confidentiality: { + type: CodeScalar, + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + attester: { + type: new GraphQLList(require('./compositionattester.schema.js')), + description: + 'A participant who has attested to the accuracy of the composition/document.', + }, + custodian: { + type: new GraphQLUnionType({ + name: 'Compositioncustodian_custodian_Union', description: 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', - }, - relatesTo: { - type: new GraphQLList(require('./compositionrelatesto.schema')), - description: - 'Relationships that this composition has with other compositions or documents that already exist.', - }, - event: { - type: new GraphQLList(require('./compositionevent.schema')), - description: - 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', - }, - section: { - type: new GraphQLList(require('./compositionsection.schema')), - description: 'The root of the sections that make up the composition.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', + }, + relatesTo: { + type: new GraphQLList(require('./compositionrelatesto.schema.js')), + description: + 'Relationships that this composition has with other compositions or documents that already exist.', + }, + event: { + type: new GraphQLList(require('./compositionevent.schema.js')), + description: + 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', + }, + section: { + type: new GraphQLList(require('./compositionsection.schema.js')), + description: 'The root of the sections that make up the composition.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/compositionattester.schema.js b/src/resources/3_0_1/schemas/compositionattester.schema.js index daad0ef2..3be893ac 100644 --- a/src/resources/3_0_1/schemas/compositionattester.schema.js +++ b/src/resources/3_0_1/schemas/compositionattester.schema.js @@ -1,39 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Composition.attester Schema + * @summary Compositionattester Schema */ module.exports = new GraphQLObjectType({ - name: 'CompositionAttester', - description: - 'A participant who has attested to the accuracy of the composition/document.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-attestation-mode - mode: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: 'The type of attestation the authenticator offers.', - }, - _mode: { - type: require('./element.schema'), - description: 'The type of attestation the authenticator offers.', - }, - time: { - type: DateTimeScalar, - description: 'When the composition was attested by the party.', - }, - _time: { - type: require('./element.schema'), - description: 'When the composition was attested by the party.', - }, - party: { - type: require('./reference.schema'), + name: 'Compositionattester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: 'The type of attestation the authenticator offers.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-attestation-mode + mode: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'The type of attestation the authenticator offers.', + }, + _time: { + type: require('./element.schema.js'), + description: 'When the composition was attested by the party.', + }, + time: { + type: DateTimeScalar, + description: 'When the composition was attested by the party.', + }, + party: { + type: new GraphQLUnionType({ + name: 'Compositionattesterparty_party_Union', description: 'Who attested the composition in the specified way.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Who attested the composition in the specified way.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/compositionevent.schema.js b/src/resources/3_0_1/schemas/compositionevent.schema.js index 395d98df..7a3aafb2 100644 --- a/src/resources/3_0_1/schemas/compositionevent.schema.js +++ b/src/resources/3_0_1/schemas/compositionevent.schema.js @@ -1,32 +1,65 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Composition.event Schema + * @summary Compositionevent Schema */ module.exports = new GraphQLObjectType({ - name: 'CompositionEvent', - description: - 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode - code: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", - }, - period: { - type: require('./period.schema'), - description: - 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', - }, - detail: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', - }, - }), + name: 'Compositionevent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', + }, + detail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Compositioneventdetail_detail_Union', + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/compositionrelatesto.schema.js b/src/resources/3_0_1/schemas/compositionrelatesto.schema.js index fb4cff83..89a1d253 100644 --- a/src/resources/3_0_1/schemas/compositionrelatesto.schema.js +++ b/src/resources/3_0_1/schemas/compositionrelatesto.schema.js @@ -1,36 +1,69 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Composition.relatesTo Schema + * @summary CompositionrelatesTo Schema */ module.exports = new GraphQLObjectType({ - name: 'CompositionRelatesTo', - description: - 'Relationships that this composition has with other compositions or documents that already exist.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of relationship that this composition has with anther composition or document.', - }, - _code: { - type: require('./element.schema'), - description: - 'The type of relationship that this composition has with anther composition or document.', - }, - targetIdentifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: 'The target composition/document of this relationship.', - }, - targetReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The target composition/document of this relationship.', - }, - }), + name: 'CompositionrelatesTo', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The type of relationship that this composition has with anther composition or document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this composition has with anther composition or document.', + }, + targetIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: 'The target composition/document of this relationship.', + }, + targetReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CompositionrelatesTotargetReference_targetReference_Union', + description: 'The target composition/document of this relationship.', + types: () => [require('./composition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + }, + }), + ), + description: 'The target composition/document of this relationship.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/compositionsection.schema.js b/src/resources/3_0_1/schemas/compositionsection.schema.js index 50be2467..4f2698cb 100644 --- a/src/resources/3_0_1/schemas/compositionsection.schema.js +++ b/src/resources/3_0_1/schemas/compositionsection.schema.js @@ -1,65 +1,99 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Composition.section Schema + * @summary Compositionsection Schema */ module.exports = new GraphQLObjectType({ - name: 'CompositionSection', - description: 'The root of the sections that make up the composition.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - title: { - type: GraphQLString, - description: - 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', - }, - _title: { - type: require('./element.schema'), - description: - 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/doc-section-codes - code: { - type: require('./codeableconcept.schema'), - description: - 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', - }, - text: { - type: require('./narrative.schema'), - description: - "A human-readable narrative that contains the attested content of the section, 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.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-mode - mode: { - type: CodeScalar, - description: - 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - _mode: { - type: require('./element.schema'), - description: - 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-order - orderedBy: { - type: require('./codeableconcept.schema'), - description: - 'Specifies the order applied to the items in the section entries.', - }, - entry: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A reference to the actual resource from which the narrative in the section is derived.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason - emptyReason: { - type: require('./codeableconcept.schema'), - description: - 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', - }, - }), + name: 'Compositionsection', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + title: { + type: GraphQLString, + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/doc-section-codes + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', + }, + text: { + type: require('./narrative.schema.js'), + description: + "A human-readable narrative that contains the attested content of the section, 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.", + }, + _mode: { + type: require('./element.schema.js'), + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-mode + mode: { + type: CodeScalar, + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-order + orderedBy: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies the order applied to the items in the section entries.', + }, + entry: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Compositionsectionentry_entry_Union', + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason + emptyReason: { + type: require('./codeableconcept.schema.js'), + description: + 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/conceptmap.schema.js b/src/resources/3_0_1/schemas/conceptmap.schema.js index b4427459..d31be38c 100644 --- a/src/resources/3_0_1/schemas/conceptmap.schema.js +++ b/src/resources/3_0_1/schemas/conceptmap.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConceptMapResourceType = new GraphQLEnumType({ - name: 'ConceptMapResourceType', - values: { - ConceptMap: { value: 'ConceptMap' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,179 +18,257 @@ let ConceptMapResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ConceptMap', - description: 'Base StructureDefinition for ConceptMap Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ConceptMapResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. The URL SHOULD include the major version of the concept map. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. The URL SHOULD include the major version of the concept map. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the concept map.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the concept map.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this concept map. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this concept map. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the concept map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the concept map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the concept map.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the concept map.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the concept map from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the concept map from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate concept map instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the concept map is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this concept map is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this concept map is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', - }, - sourceUri: { - type: UriScalar, - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - _sourceUri: { - type: require('./element.schema'), - description: - 'The source value set that specifies the concepts that are being mapped.', - }, - sourceReference: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ConceptMap Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ConceptMap_Enum_schema', + values: { ConceptMap: { value: 'ConceptMap' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. The URL SHOULD include the major version of the concept map. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published. The URL SHOULD include the major version of the concept map. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the concept map.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the concept map.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this concept map. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this concept map. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the concept map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the concept map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the concept map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the concept map.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the concept map from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the concept map from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate concept map instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the concept map is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this concept map is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this concept map is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', + }, + _sourceUri: { + type: require('./element.schema.js'), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + sourceUri: { + type: UriScalar, + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + sourceReference: { + type: new GraphQLUnionType({ + name: 'ConceptMapsourceReference_sourceReference_Union', description: 'The source value set that specifies the concepts that are being mapped.', - }, - targetUri: { - type: UriScalar, + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'The source value set that specifies the concepts that are being mapped.', + }, + _targetUri: { + type: require('./element.schema.js'), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetUri: { + type: UriScalar, + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetReference: { + type: new GraphQLUnionType({ + name: 'ConceptMaptargetReference_targetReference_Union', description: 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - _targetUri: { - type: require('./element.schema'), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - targetReference: { - type: require('./reference.schema'), - description: - 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', - }, - group: { - type: new GraphQLList(require('./conceptmapgroup.schema')), - description: - 'A group of mappings that all have the same source and target system.', - }, - }), + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + group: { + type: new GraphQLList(require('./conceptmapgroup.schema.js')), + description: + 'A group of mappings that all have the same source and target system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/conceptmapgroup.schema.js b/src/resources/3_0_1/schemas/conceptmapgroup.schema.js index aef76c3e..56bf5670 100644 --- a/src/resources/3_0_1/schemas/conceptmapgroup.schema.js +++ b/src/resources/3_0_1/schemas/conceptmapgroup.schema.js @@ -1,74 +1,90 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ConceptMap.group Schema + * @summary ConceptMapgroup Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapGroup', - description: - 'A group of mappings that all have the same source and target system.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - source: { - type: UriScalar, - description: - 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', - }, - _source: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', - }, - sourceVersion: { - type: GraphQLString, - description: - 'The specific version of the code system, as determined by the code system authority.', - }, - _sourceVersion: { - type: require('./element.schema'), - description: - 'The specific version of the code system, as determined by the code system authority.', - }, - target: { - type: UriScalar, - description: - 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', - }, - _target: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', - }, - targetVersion: { - type: GraphQLString, - description: - 'The specific version of the code system, as determined by the code system authority.', - }, - _targetVersion: { - type: require('./element.schema'), - description: - 'The specific version of the code system, as determined by the code system authority.', - }, - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./conceptmapgroupelement.schema')), - ), - description: - 'Mappings for an individual concept in the source to one or more concepts in the target.', - }, - unmapped: { - type: require('./conceptmapgroupunmapped.schema'), - description: - 'What to do when there is no match in the mappings in the group.', - }, - }), + name: 'ConceptMapgroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _source: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', + }, + source: { + type: UriScalar, + description: + 'An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).', + }, + _sourceVersion: { + type: require('./element.schema.js'), + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + sourceVersion: { + type: GraphQLString, + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + _target: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', + }, + target: { + type: UriScalar, + description: + 'An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).', + }, + _targetVersion: { + type: require('./element.schema.js'), + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + targetVersion: { + type: GraphQLString, + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./conceptmapgroupelement.schema.js')), + ), + description: + 'Mappings for an individual concept in the source to one or more concepts in the target.', + }, + unmapped: { + type: require('./conceptmapgroupunmapped.schema.js'), + description: + 'What to do when there is no match in the mappings in the group.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/conceptmapgroupelement.schema.js b/src/resources/3_0_1/schemas/conceptmapgroupelement.schema.js index bfd709bd..c89d3ede 100644 --- a/src/resources/3_0_1/schemas/conceptmapgroupelement.schema.js +++ b/src/resources/3_0_1/schemas/conceptmapgroupelement.schema.js @@ -1,42 +1,58 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ConceptMap.group.element Schema + * @summary ConceptMapgroupelement Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapGroupElement', - description: - 'Mappings for an individual concept in the source to one or more concepts in the target.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: CodeScalar, - description: - 'Identity (code or path) or the element/item being mapped.', - }, - _code: { - type: require('./element.schema'), - description: - 'Identity (code or path) or the element/item being mapped.', - }, - display: { - type: GraphQLString, - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - _display: { - type: require('./element.schema'), - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - target: { - type: new GraphQLList(require('./conceptmapgroupelementtarget.schema')), - description: - 'A concept from the target value set that this concept maps to.', - }, - }), + name: 'ConceptMapgroupelement', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: 'Identity (code or path) or the element/item being mapped.', + }, + code: { + type: CodeScalar, + description: 'Identity (code or path) or the element/item being mapped.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + target: { + type: new GraphQLList( + require('./conceptmapgroupelementtarget.schema.js'), + ), + description: + 'A concept from the target value set that this concept maps to.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/conceptmapgroupelementtarget.schema.js b/src/resources/3_0_1/schemas/conceptmapgroupelementtarget.schema.js index eee08c1c..cfdbcc2e 100644 --- a/src/resources/3_0_1/schemas/conceptmapgroupelementtarget.schema.js +++ b/src/resources/3_0_1/schemas/conceptmapgroupelementtarget.schema.js @@ -1,64 +1,81 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ConceptMap.group.element.target Schema + * @summary ConceptMapgroupelementtarget Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapGroupElementTarget', - description: 'A concept from the target value set that this concept maps to.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: CodeScalar, - description: - 'Identity (code or path) or the element/item that the map refers to.', - }, - _code: { - type: require('./element.schema'), - description: - 'Identity (code or path) or the element/item that the map refers to.', - }, - display: { - type: GraphQLString, - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - _display: { - type: require('./element.schema'), - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/concept-map-equivalence - equivalence: { - type: CodeScalar, - description: - "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", - }, - _equivalence: { - type: require('./element.schema'), - description: - "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", - }, - comment: { - type: GraphQLString, - description: - 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', - }, - _comment: { - type: require('./element.schema'), - description: - 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', - }, - dependsOn: { - type: new GraphQLList( - require('./conceptmapgroupelementtargetdependson.schema'), - ), - description: - 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', - }, - }), + name: 'ConceptMapgroupelementtarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + code: { + type: CodeScalar, + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + _equivalence: { + type: require('./element.schema.js'), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/concept-map-equivalence + equivalence: { + type: CodeScalar, + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + _comment: { + type: require('./element.schema.js'), + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + comment: { + type: GraphQLString, + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + dependsOn: { + type: new GraphQLList( + require('./conceptmapgroupelementtargetdependson.schema.js'), + ), + description: + 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/conceptmapgroupelementtargetdependson.schema.js b/src/resources/3_0_1/schemas/conceptmapgroupelementtargetdependson.schema.js index 6f3330df..f2de7866 100644 --- a/src/resources/3_0_1/schemas/conceptmapgroupelementtargetdependson.schema.js +++ b/src/resources/3_0_1/schemas/conceptmapgroupelementtargetdependson.schema.js @@ -1,57 +1,78 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ConceptMap.group.element.target.dependsOn Schema + * @summary ConceptMapgroupelementtargetdependsOn Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapGroupElementTargetDependsOn', - description: - 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - property: { - type: new GraphQLNonNull(UriScalar), - description: - 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.', - }, - _property: { - type: require('./element.schema'), - description: - 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.', - }, - system: { - type: UriScalar, - description: - 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', - }, - _system: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', - }, - code: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', - }, - _code: { - type: require('./element.schema'), - description: - 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', - }, - display: { - type: GraphQLString, - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - _display: { - type: require('./element.schema'), - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - }), + name: 'ConceptMapgroupelementtargetdependsOn', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _property: { + type: require('./element.schema.js'), + description: + 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.', + }, + property: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + system: { + type: UriScalar, + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', + }, + code: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/conceptmapgroupunmapped.schema.js b/src/resources/3_0_1/schemas/conceptmapgroupunmapped.schema.js index 021e2139..0233d0c4 100644 --- a/src/resources/3_0_1/schemas/conceptmapgroupunmapped.schema.js +++ b/src/resources/3_0_1/schemas/conceptmapgroupunmapped.schema.js @@ -1,59 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ConceptMap.group.unmapped Schema + * @summary ConceptMapgroupunmapped Schema */ module.exports = new GraphQLObjectType({ - name: 'ConceptMapGroupUnmapped', - description: - 'What to do when there is no match in the mappings in the group.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', - }, - _mode: { - type: require('./element.schema'), - description: - 'Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', - }, - code: { - type: CodeScalar, - description: - "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", - }, - _code: { - type: require('./element.schema'), - description: - "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", - }, - display: { - type: GraphQLString, - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - _display: { - type: require('./element.schema'), - description: - 'The display for the code. The display is only provided to help editors when editing the concept map.', - }, - url: { - type: UriScalar, - description: - 'The canonical URL of the map to use if this map contains no mapping.', - }, - _url: { - type: require('./element.schema'), - description: - 'The canonical URL of the map to use if this map contains no mapping.', - }, - }), + name: 'ConceptMapgroupunmapped', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines which action to take if there is no match in the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', + }, + _code: { + type: require('./element.schema.js'), + description: + "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", + }, + code: { + type: CodeScalar, + description: + "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", + }, + _display: { + type: require('./element.schema.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'The canonical URL of the map to use if this map contains no mapping.', + }, + url: { + type: UriScalar, + description: + 'The canonical URL of the map to use if this map contains no mapping.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/condition.schema.js b/src/resources/3_0_1/schemas/condition.schema.js index 10f20946..24826cdf 100644 --- a/src/resources/3_0_1/schemas/condition.schema.js +++ b/src/resources/3_0_1/schemas/condition.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConditionResourceType = new GraphQLEnumType({ - name: 'ConditionResourceType', - values: { - Condition: { value: 'Condition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,177 +18,287 @@ let ConditionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Condition', - description: 'Base StructureDefinition for Condition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ConditionResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-clinical - clinicalStatus: { - type: CodeScalar, - description: 'The clinical status of the condition.', - }, - _clinicalStatus: { - type: require('./element.schema'), - description: 'The clinical status of the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-ver-status - verificationStatus: { - type: CodeScalar, - description: - 'The verification status to support the clinical status of the condition.', - }, - _verificationStatus: { - type: require('./element.schema'), - description: - 'The verification status to support the clinical status of the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'A category assigned to the condition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-severity - severity: { - type: require('./codeableconcept.schema'), - description: - 'A subjective assessment of the severity of the condition as evaluated by the clinician.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - code: { - type: require('./codeableconcept.schema'), - description: 'Identification of the condition, problem or diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The anatomical location where this condition manifests itself.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Indicates the patient or group who the condition record is associated with.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Condition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Condition_Enum_schema', + values: { Condition: { value: 'Condition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this condition that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _clinicalStatus: { + type: require('./element.schema.js'), + description: 'The clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-clinical + clinicalStatus: { + type: CodeScalar, + description: 'The clinical status of the condition.', + }, + _verificationStatus: { + type: require('./element.schema.js'), + description: + 'The verification status to support the clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-ver-status + verificationStatus: { + type: CodeScalar, + description: + 'The verification status to support the clinical status of the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A category assigned to the condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-severity + severity: { + type: require('./codeableconcept.schema.js'), + description: + 'A subjective assessment of the severity of the condition as evaluated by the clinician.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + code: { + type: require('./codeableconcept.schema.js'), + description: 'Identification of the condition, problem or diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The anatomical location where this condition manifests itself.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Conditionsubject_subject_Union', + description: + 'Indicates the patient or group who the condition record is associated with.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'Indicates the patient or group who the condition record is associated with.', + }, + context: { + type: new GraphQLUnionType({ + name: 'Conditioncontext_context_Union', description: 'Encounter during which the condition was first asserted.', - }, - onsetDateTime: { - type: DateTimeScalar, - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - _onsetDateTime: { - type: require('./element.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetAge: { - type: require('./age.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetPeriod: { - type: require('./period.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetRange: { - type: require('./range.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - onsetString: { - type: GraphQLString, - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - _onsetString: { - type: require('./element.schema'), - description: - 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', - }, - abatementDateTime: { - type: DateTimeScalar, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementDateTime: { - type: require('./element.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementAge: { - type: require('./age.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementBoolean: { - type: GraphQLBoolean, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementBoolean: { - type: require('./element.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementPeriod: { - type: require('./period.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementRange: { - type: require('./range.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - abatementString: { - type: GraphQLString, - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - _abatementString: { - type: require('./element.schema'), - description: - "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", - }, - assertedDate: { - type: DateTimeScalar, - description: - 'The date on which the existance of the Condition was first asserted or acknowledged.', - }, - _assertedDate: { - type: require('./element.schema'), - description: - 'The date on which the existance of the Condition was first asserted or acknowledged.', - }, - asserter: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: 'Encounter during which the condition was first asserted.', + }, + _onsetDateTime: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetAge: { + type: require('./age.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetPeriod: { + type: require('./period.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetRange: { + type: require('./range.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _onsetString: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _abatementDateTime: { + type: require('./element.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementDateTime: { + type: DateTimeScalar, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementAge: { + type: require('./age.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementBoolean: { + type: require('./element.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementBoolean: { + type: GraphQLBoolean, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementPeriod: { + type: require('./period.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementRange: { + type: require('./range.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementString: { + type: require('./element.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementString: { + type: GraphQLString, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _assertedDate: { + type: require('./element.schema.js'), + description: + 'The date on which the existance of the Condition was first asserted or acknowledged.', + }, + assertedDate: { + type: DateTimeScalar, + description: + 'The date on which the existance of the Condition was first asserted or acknowledged.', + }, + asserter: { + type: new GraphQLUnionType({ + name: 'Conditionasserter_asserter_Union', description: 'Individual who is making the condition statement.', - }, - stage: { - type: require('./conditionstage.schema'), - description: - 'Clinical stage or grade of a condition. May include formal severity assessments.', - }, - evidence: { - type: new GraphQLList(require('./conditionevidence.schema')), - description: - 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Individual who is making the condition statement.', + }, + stage: { + type: require('./conditionstage.schema.js'), + description: + 'Clinical stage or grade of a condition. May include formal severity assessments.', + }, + evidence: { + type: new GraphQLList(require('./conditionevidence.schema.js')), + description: + 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/conditionevidence.schema.js b/src/resources/3_0_1/schemas/conditionevidence.schema.js index c0e223cb..5675e16d 100644 --- a/src/resources/3_0_1/schemas/conditionevidence.schema.js +++ b/src/resources/3_0_1/schemas/conditionevidence.schema.js @@ -1,27 +1,60 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Condition.evidence Schema + * @summary Conditionevidence Schema */ module.exports = new GraphQLObjectType({ - name: 'ConditionEvidence', - description: - 'Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/manifestation-or-symptom - code: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A manifestation or symptom that led to the recording of this condition.', - }, - detail: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Links to other relevant information, including pathology reports.', - }, - }), + name: 'Conditionevidence', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/manifestation-or-symptom + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A manifestation or symptom that led to the recording of this condition.', + }, + detail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Conditionevidencedetail_detail_Union', + description: + 'Links to other relevant information, including pathology reports.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Links to other relevant information, including pathology reports.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/conditionstage.schema.js b/src/resources/3_0_1/schemas/conditionstage.schema.js index e9eefb42..4c44ac62 100644 --- a/src/resources/3_0_1/schemas/conditionstage.schema.js +++ b/src/resources/3_0_1/schemas/conditionstage.schema.js @@ -1,27 +1,70 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Condition.stage Schema + * @summary Conditionstage Schema */ module.exports = new GraphQLObjectType({ - name: 'ConditionStage', - description: - 'Clinical stage or grade of a condition. May include formal severity assessments.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-stage - summary: { - type: require('./codeableconcept.schema'), - description: - "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", - }, - assessment: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Reference to a formal record of the evidence on which the staging assessment is based.', - }, - }), + name: 'Conditionstage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-stage + summary: { + type: require('./codeableconcept.schema.js'), + description: + "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", + }, + assessment: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Conditionstageassessment_assessment_Union', + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + types: () => [ + require('./clinicalimpression.schema.js'), + require('./diagnosticreport.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/consent.schema.js b/src/resources/3_0_1/schemas/consent.schema.js index 3573fe46..7ca24c34 100644 --- a/src/resources/3_0_1/schemas/consent.schema.js +++ b/src/resources/3_0_1/schemas/consent.schema.js @@ -1,22 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ConsentResourceType = new GraphQLEnumType({ - name: 'ConsentResourceType', - values: { - Consent: { value: 'Consent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,125 +16,256 @@ let ConsentResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Consent', - description: 'Base StructureDefinition for Consent Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ConsentResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Unique identifier for this copy of the Consent Statement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-state-codes - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current state of this consent.', - }, - _status: { - type: require('./element.schema'), - description: 'Indicates the current state of this consent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The patient/healthcare consumer to whom this consent applies.', - }, - period: { - type: require('./period.schema'), - description: - 'Relevant time or time-period when this Consent is applicable.', - }, - dateTime: { - type: DateTimeScalar, - description: 'When this Consent was issued / created / indexed.', - }, - _dateTime: { - type: require('./element.schema'), - description: 'When this Consent was issued / created / indexed.', - }, - consentingParty: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.', - }, - actor: { - type: new GraphQLList(require('./consentactor.schema')), - description: - "Who or what is controlled by this consent. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-action - action: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Actions controlled by this consent.', - }, - organization: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The organization that manages the consent, and the framework within which it is executed.', - }, - sourceAttachment: { - type: require('./attachment.schema'), - description: - 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', - }, - sourceIdentifier: { - type: require('./identifier.schema'), - description: - 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', - }, - sourceReference: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Consent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Consent_Enum_schema', + values: { Consent: { value: 'Consent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: 'Unique identifier for this copy of the Consent Statement.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current state of this consent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-state-codes + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this consent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Consentpatient_patient_Union', + description: + 'The patient/healthcare consumer to whom this consent applies.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The patient/healthcare consumer to whom this consent applies.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Relevant time or time-period when this Consent is applicable.', + }, + _dateTime: { + type: require('./element.schema.js'), + description: 'When this Consent was issued / created / indexed.', + }, + dateTime: { + type: DateTimeScalar, + description: 'When this Consent was issued / created / indexed.', + }, + consentingParty: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ConsentconsentingParty_consentingParty_Union', + description: + 'Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.', + }, + actor: { + type: new GraphQLList(require('./consentactor.schema.js')), + description: + "Who or what is controlled by this consent. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-action + action: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Actions controlled by this consent.', + }, + organization: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Consentorganization_organization_Union', + description: + 'The organization that manages the consent, and the framework within which it is executed.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The organization that manages the consent, and the framework within which it is executed.', + }, + sourceAttachment: { + type: require('./attachment.schema.js'), + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + sourceIdentifier: { + type: require('./identifier.schema.js'), + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + sourceReference: { + type: new GraphQLUnionType({ + name: 'ConsentsourceReference_sourceReference_Union', description: 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', - }, - policy: { - type: new GraphQLList(require('./consentpolicy.schema')), - description: - 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', - }, - policyRule: { - type: UriScalar, - description: 'A referece to the specific computable policy.', - }, - _policyRule: { - type: require('./element.schema'), - description: 'A referece to the specific computable policy.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purpose: { - type: new GraphQLList(require('./coding.schema')), - description: - 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this consent.', - }, - dataPeriod: { - type: require('./period.schema'), - description: - 'Clinical or Operational Relevant period of time that bounds the data controlled by this consent.', - }, - data: { - type: new GraphQLList(require('./consentdata.schema')), - description: - 'The resources controlled by this consent, if specific resources are referenced.', - }, - except: { - type: new GraphQLList(require('./consentexcept.schema')), - description: - 'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.', - }, - }), + types: () => [ + require('./consent.schema.js'), + require('./documentreference.schema.js'), + require('./contract.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Consent') { + return require('./consent.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + policy: { + type: new GraphQLList(require('./consentpolicy.schema.js')), + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + _policyRule: { + type: require('./element.schema.js'), + description: 'A referece to the specific computable policy.', + }, + policyRule: { + type: UriScalar, + description: 'A referece to the specific computable policy.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purpose: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this consent.', + }, + dataPeriod: { + type: require('./period.schema.js'), + description: + 'Clinical or Operational Relevant period of time that bounds the data controlled by this consent.', + }, + data: { + type: new GraphQLList(require('./consentdata.schema.js')), + description: + 'The resources controlled by this consent, if specific resources are referenced.', + }, + except: { + type: new GraphQLList(require('./consentexcept.schema.js')), + description: + 'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/consentactor.schema.js b/src/resources/3_0_1/schemas/consentactor.schema.js index 0724ccb2..c9c5cb8b 100644 --- a/src/resources/3_0_1/schemas/consentactor.schema.js +++ b/src/resources/3_0_1/schemas/consentactor.schema.js @@ -1,27 +1,87 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Consent.actor Schema + * @summary Consentactor Schema */ module.exports = new GraphQLObjectType({ - name: 'ConsentActor', - description: - "Who or what is controlled by this consent. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-role-type - role: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'How the individual is involved in the resources content that is described in the consent.', - }, - reference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - }, - }), + name: 'Consentactor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-role-type + role: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'How the individual is involved in the resources content that is described in the consent.', + }, + reference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Consentactorreference_reference_Union', + description: + "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + types: () => [ + require('./device.schema.js'), + require('./group.schema.js'), + require('./careteam.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/consentdata.schema.js b/src/resources/3_0_1/schemas/consentdata.schema.js index 520f82c3..2f1bd624 100644 --- a/src/resources/3_0_1/schemas/consentdata.schema.js +++ b/src/resources/3_0_1/schemas/consentdata.schema.js @@ -1,33 +1,67 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Consent.data Schema + * @summary Consentdata Schema */ module.exports = new GraphQLObjectType({ - name: 'ConsentData', - description: - 'The resources controlled by this consent, if specific resources are referenced.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-data-meaning - meaning: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the resource reference is interpreted when testing consent restrictions.', - }, - _meaning: { - type: require('./element.schema'), - description: - 'How the resource reference is interpreted when testing consent restrictions.', - }, - reference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to a specific resource that defines which resources are covered by this consent.', - }, - }), + name: 'Consentdata', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _meaning: { + type: require('./element.schema.js'), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-data-meaning + meaning: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + reference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Consentdatareference_reference_Union', + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/consentexcept.schema.js b/src/resources/3_0_1/schemas/consentexcept.schema.js index 1ccc2200..42473080 100644 --- a/src/resources/3_0_1/schemas/consentexcept.schema.js +++ b/src/resources/3_0_1/schemas/consentexcept.schema.js @@ -1,76 +1,97 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Consent.except Schema + * @summary Consentexcept Schema */ module.exports = new GraphQLObjectType({ - name: 'ConsentExcept', - description: - 'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-except-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Action to take - permit or deny - when the exception conditions are met.', - }, - _type: { - type: require('./element.schema'), - description: - 'Action to take - permit or deny - when the exception conditions are met.', - }, - period: { - type: require('./period.schema'), - description: 'The timeframe in this exception is valid.', - }, - actor: { - type: new GraphQLList(require('./consentexceptactor.schema')), - description: - "Who or what is controlled by this Exception. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-action - action: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Actions controlled by this Exception.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A set of security labels that define which resources are controlled by this exception. If more than one label is specified, all resources must have all the specified labels.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - purpose: { - type: new GraphQLList(require('./coding.schema')), - description: - 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this exception.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-content-class - class: { - type: new GraphQLList(require('./coding.schema')), - description: - 'The class of information covered by this exception. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-content-code - code: { - type: new GraphQLList(require('./coding.schema')), - description: - 'If this code is found in an instance, then the exception applies.', - }, - dataPeriod: { - type: require('./period.schema'), - description: - 'Clinical or Operational Relevant period of time that bounds the data controlled by this exception.', - }, - data: { - type: new GraphQLList(require('./consentexceptdata.schema')), - description: - 'The resources controlled by this exception, if specific resources are referenced.', - }, - }), + name: 'Consentexcept', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Action to take - permit or deny - when the exception conditions are met.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-except-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Action to take - permit or deny - when the exception conditions are met.', + }, + period: { + type: require('./period.schema.js'), + description: 'The timeframe in this exception is valid.', + }, + actor: { + type: new GraphQLList(require('./consentexceptactor.schema.js')), + description: + "Who or what is controlled by this Exception. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-action + action: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Actions controlled by this Exception.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A set of security labels that define which resources are controlled by this exception. If more than one label is specified, all resources must have all the specified labels.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + purpose: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this exception.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-content-class + class: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The class of information covered by this exception. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-content-code + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'If this code is found in an instance, then the exception applies.', + }, + dataPeriod: { + type: require('./period.schema.js'), + description: + 'Clinical or Operational Relevant period of time that bounds the data controlled by this exception.', + }, + data: { + type: new GraphQLList(require('./consentexceptdata.schema.js')), + description: + 'The resources controlled by this exception, if specific resources are referenced.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/consentexceptactor.schema.js b/src/resources/3_0_1/schemas/consentexceptactor.schema.js index 4e23cbf1..000544d7 100644 --- a/src/resources/3_0_1/schemas/consentexceptactor.schema.js +++ b/src/resources/3_0_1/schemas/consentexceptactor.schema.js @@ -1,27 +1,87 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Consent.except.actor Schema + * @summary Consentexceptactor Schema */ module.exports = new GraphQLObjectType({ - name: 'ConsentExceptActor', - description: - "Who or what is controlled by this Exception. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-role-type - role: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'How the individual is involved in the resources content that is described in the exception.', - }, - reference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", - }, - }), + name: 'Consentexceptactor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-role-type + role: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'How the individual is involved in the resources content that is described in the exception.', + }, + reference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Consentexceptactorreference_reference_Union', + description: + "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + types: () => [ + require('./device.schema.js'), + require('./group.schema.js'), + require('./careteam.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/consentexceptdata.schema.js b/src/resources/3_0_1/schemas/consentexceptdata.schema.js index ef04796b..a066c70d 100644 --- a/src/resources/3_0_1/schemas/consentexceptdata.schema.js +++ b/src/resources/3_0_1/schemas/consentexceptdata.schema.js @@ -1,33 +1,67 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Consent.except.data Schema + * @summary Consentexceptdata Schema */ module.exports = new GraphQLObjectType({ - name: 'ConsentExceptData', - description: - 'The resources controlled by this exception, if specific resources are referenced.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/consent-data-meaning - meaning: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the resource reference is interpreted when testing consent restrictions.', - }, - _meaning: { - type: require('./element.schema'), - description: - 'How the resource reference is interpreted when testing consent restrictions.', - }, - reference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to a specific resource that defines which resources are covered by this consent.', - }, - }), + name: 'Consentexceptdata', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _meaning: { + type: require('./element.schema.js'), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consent-data-meaning + meaning: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + reference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Consentexceptdatareference_reference_Union', + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/consentpolicy.schema.js b/src/resources/3_0_1/schemas/consentpolicy.schema.js index a4eb4d63..b672547c 100644 --- a/src/resources/3_0_1/schemas/consentpolicy.schema.js +++ b/src/resources/3_0_1/schemas/consentpolicy.schema.js @@ -1,37 +1,53 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Consent.policy Schema + * @summary Consentpolicy Schema */ module.exports = new GraphQLObjectType({ - name: 'ConsentPolicy', - description: - 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - authority: { - type: UriScalar, - description: - 'Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.', - }, - _authority: { - type: require('./element.schema'), - description: - 'Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.', - }, - uri: { - type: UriScalar, - description: - 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', - }, - _uri: { - type: require('./element.schema'), - description: - 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', - }, - }), + name: 'Consentpolicy', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _authority: { + type: require('./element.schema.js'), + description: + 'Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.', + }, + authority: { + type: UriScalar, + description: + 'Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + uri: { + type: UriScalar, + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contactdetail.schema.js b/src/resources/3_0_1/schemas/contactdetail.schema.js index 36eba435..2aff327b 100644 --- a/src/resources/3_0_1/schemas/contactdetail.schema.js +++ b/src/resources/3_0_1/schemas/contactdetail.schema.js @@ -1,6 +1,4 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports @@ -8,21 +6,35 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'ContactDetail', - description: 'Base StructureDefinition for ContactDetail Type.', - fields: () => - extendSchema(require('./element.schema'), { - name: { - type: GraphQLString, - description: 'The name of an individual to contact.', - }, - _name: { - type: require('./element.schema'), - description: 'The name of an individual to contact.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'The contact details for the individual (if a name was provided) or the organization.', - }, - }), + description: 'Base StructureDefinition for ContactDetail Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of an individual to contact.', + }, + name: { + type: GraphQLString, + description: 'The name of an individual to contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'The contact details for the individual (if a name was provided) or the organization.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contactpoint.schema.js b/src/resources/3_0_1/schemas/contactpoint.schema.js index ecfea01c..fa0a481e 100644 --- a/src/resources/3_0_1/schemas/contactpoint.schema.js +++ b/src/resources/3_0_1/schemas/contactpoint.schema.js @@ -1,8 +1,6 @@ -const CodeScalar = require('../scalars/code.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -10,52 +8,66 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'ContactPoint', - description: 'Base StructureDefinition for ContactPoint Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contact-point-system - system: { - type: CodeScalar, - description: - 'Telecommunications form for contact point - what communications system is required to make use of the contact.', - }, - _system: { - type: require('./element.schema'), - description: - 'Telecommunications form for contact point - what communications system is required to make use of the contact.', - }, - value: { - type: GraphQLString, - description: - 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', - }, - _value: { - type: require('./element.schema'), - description: - 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contact-point-use - use: { - type: CodeScalar, - description: 'Identifies the purpose for the contact point.', - }, - _use: { - type: require('./element.schema'), - description: 'Identifies the purpose for the contact point.', - }, - rank: { - type: PositiveIntScalar, - description: - 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', - }, - _rank: { - type: require('./element.schema'), - description: - 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', - }, - period: { - type: require('./period.schema'), - description: 'Time period when the contact point was/is in use.', - }, - }), + description: 'Base StructureDefinition for ContactPoint Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contact-point-system + system: { + type: CodeScalar, + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + value: { + type: GraphQLString, + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + _use: { + type: require('./element.schema.js'), + description: 'Identifies the purpose for the contact point.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contact-point-use + use: { + type: CodeScalar, + description: 'Identifies the purpose for the contact point.', + }, + _rank: { + type: require('./element.schema.js'), + description: + 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', + }, + rank: { + type: PositiveIntScalar, + description: + 'Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period when the contact point was/is in use.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contract.schema.js b/src/resources/3_0_1/schemas/contract.schema.js index 2fc3feab..a5629b79 100644 --- a/src/resources/3_0_1/schemas/contract.schema.js +++ b/src/resources/3_0_1/schemas/contract.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ContractResourceType = new GraphQLEnumType({ - name: 'ContractResourceType', - values: { - Contract: { value: 'Contract' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,141 +16,267 @@ let ContractResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Contract', - description: 'Base StructureDefinition for Contract Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ContractResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Unique identifier for this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - issued: { - type: DateTimeScalar, - description: 'When this Contract was issued.', - }, - _issued: { - type: require('./element.schema'), - description: 'When this Contract was issued.', - }, - applies: { - type: require('./period.schema'), - description: - 'Relevant time or time-period when this Contract is applicable.', - }, - subject: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The target entity impacted by or of interest to parties to the agreement.', - }, - topic: { - type: new GraphQLList(require('./reference.schema')), - description: 'The matter of concern in the context of this agreement.', - }, - authority: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', - }, - domain: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-subtype - subType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-action - action: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Action stipulated by this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - actionReason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reason for action stipulated by this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActConsentDirective - decisionType: { - type: require('./codeableconcept.schema'), - description: - 'The type of decision made by a grantor with respect to an offer made by a grantee.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-content-derivative - contentDerivative: { - type: require('./codeableconcept.schema'), - description: - 'The minimal content derived from the basal information source at a specific stage in its lifecycle.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.', - }, - agent: { - type: new GraphQLList(require('./contractagent.schema')), - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - }, - signer: { - type: new GraphQLList(require('./contractsigner.schema')), - description: - 'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.', - }, - valuedItem: { - type: new GraphQLList(require('./contractvalueditem.schema')), - description: 'Contract Valued Item List.', - }, - term: { - type: new GraphQLList(require('./contractterm.schema')), - description: - 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', - }, - bindingAttachment: { - type: require('./attachment.schema'), - description: - "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", - }, - bindingReference: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Contract Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Contract_Enum_schema', + values: { Contract: { value: 'Contract' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: 'Unique identifier for this Contract.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _issued: { + type: require('./element.schema.js'), + description: 'When this Contract was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract was issued.', + }, + applies: { + type: require('./period.schema.js'), + description: + 'Relevant time or time-period when this Contract is applicable.', + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractsubject_subject_Union', + description: + 'The target entity impacted by or of interest to parties to the agreement.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The target entity impacted by or of interest to parties to the agreement.', + }, + topic: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contracttopic_topic_Union', + description: + 'The matter of concern in the context of this agreement.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'The matter of concern in the context of this agreement.', + }, + authority: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractauthority_authority_Union', + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + }, + domain: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractdomain_domain_Union', + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-subtype + subType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-action + action: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Action stipulated by this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + actionReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason for action stipulated by this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActConsentDirective + decisionType: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of decision made by a grantor with respect to an offer made by a grantee.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-content-derivative + contentDerivative: { + type: require('./codeableconcept.schema.js'), + description: + 'The minimal content derived from the basal information source at a specific stage in its lifecycle.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.', + }, + agent: { + type: new GraphQLList(require('./contractagent.schema.js')), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + signer: { + type: new GraphQLList(require('./contractsigner.schema.js')), + description: + 'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.', + }, + valuedItem: { + type: new GraphQLList(require('./contractvalueditem.schema.js')), + description: 'Contract Valued Item List.', + }, + term: { + type: new GraphQLList(require('./contractterm.schema.js')), + description: + 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', + }, + bindingAttachment: { + type: require('./attachment.schema.js'), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + bindingReference: { + type: new GraphQLUnionType({ + name: 'ContractbindingReference_bindingReference_Union', description: "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", - }, - friendly: { - type: new GraphQLList(require('./contractfriendly.schema')), - description: - "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", - }, - legal: { - type: new GraphQLList(require('./contractlegal.schema')), - description: - 'List of Legal expressions or representations of this Contract.', - }, - rule: { - type: new GraphQLList(require('./contractrule.schema')), - description: - 'List of Computable Policy Rule Language Representations of this Contract.', - }, - }), + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + friendly: { + type: new GraphQLList(require('./contractfriendly.schema.js')), + description: + "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", + }, + legal: { + type: new GraphQLList(require('./contractlegal.schema.js')), + description: + 'List of Legal expressions or representations of this Contract.', + }, + rule: { + type: new GraphQLList(require('./contractrule.schema.js')), + description: + 'List of Computable Policy Rule Language Representations of this Contract.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contractagent.schema.js b/src/resources/3_0_1/schemas/contractagent.schema.js index e8fa190e..56b32c62 100644 --- a/src/resources/3_0_1/schemas/contractagent.schema.js +++ b/src/resources/3_0_1/schemas/contractagent.schema.js @@ -1,25 +1,93 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.agent Schema + * @summary Contractagent Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractAgent', - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Who or what parties are assigned roles in this Contract.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole - role: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Role type of agent assigned roles in this Contract.', - }, - }), + name: 'Contractagent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contractagentactor_actor_Union', + description: + 'Who or what parties are assigned roles in this Contract.', + types: () => [ + require('./contract.schema.js'), + require('./device.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'Who or what parties are assigned roles in this Contract.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role type of agent assigned roles in this Contract.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contractfriendly.schema.js b/src/resources/3_0_1/schemas/contractfriendly.schema.js index 0cd7e668..0fc283d2 100644 --- a/src/resources/3_0_1/schemas/contractfriendly.schema.js +++ b/src/resources/3_0_1/schemas/contractfriendly.schema.js @@ -1,26 +1,70 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.friendly Schema + * @summary Contractfriendly Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractFriendly', - description: - "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', - }, - }), + name: 'Contractfriendly', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractfriendlycontentReference_contentReference_Union', + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contractlegal.schema.js b/src/resources/3_0_1/schemas/contractlegal.schema.js index c231a530..60dfe0d7 100644 --- a/src/resources/3_0_1/schemas/contractlegal.schema.js +++ b/src/resources/3_0_1/schemas/contractlegal.schema.js @@ -1,23 +1,67 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.legal Schema + * @summary Contractlegal Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractLegal', - description: 'List of Legal expressions or representations of this Contract.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: 'Contract legal text in human renderable form.', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Contract legal text in human renderable form.', - }, - }), + name: 'Contractlegal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: 'Contract legal text in human renderable form.', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractlegalcontentReference_contentReference_Union', + description: 'Contract legal text in human renderable form.', + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: 'Contract legal text in human renderable form.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contractrule.schema.js b/src/resources/3_0_1/schemas/contractrule.schema.js index 0834a237..49d31965 100644 --- a/src/resources/3_0_1/schemas/contractrule.schema.js +++ b/src/resources/3_0_1/schemas/contractrule.schema.js @@ -1,26 +1,60 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.rule Schema + * @summary Contractrule Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractRule', - description: - 'List of Computable Policy Rule Language Representations of this Contract.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - contentAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', - }, - contentReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', - }, - }), + name: 'Contractrule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractrulecontentReference_contentReference_Union', + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contractsigner.schema.js b/src/resources/3_0_1/schemas/contractsigner.schema.js index d5f17d99..28978590 100644 --- a/src/resources/3_0_1/schemas/contractsigner.schema.js +++ b/src/resources/3_0_1/schemas/contractsigner.schema.js @@ -1,32 +1,79 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.signer Schema + * @summary Contractsigner Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractSigner', - description: - 'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-signer-type - type: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'Role of this Contract signer, e.g. notary, grantee.', - }, - party: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Party which is a signator to this Contract.', - }, - signature: { - type: new GraphQLList( - new GraphQLNonNull(require('./signature.schema')), - ), - description: - 'Legally binding Contract DSIG signature contents in Base64.', - }, - }), + name: 'Contractsigner', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-signer-type + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'Role of this Contract signer, e.g. notary, grantee.', + }, + party: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contractsignerparty_party_Union', + description: 'Party which is a signator to this Contract.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'Party which is a signator to this Contract.', + }, + signature: { + type: new GraphQLList( + new GraphQLNonNull(require('./signature.schema.js')), + ), + description: + 'Legally binding Contract DSIG signature contents in Base64.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contractterm.schema.js b/src/resources/3_0_1/schemas/contractterm.schema.js index dedfe630..ef2ab495 100644 --- a/src/resources/3_0_1/schemas/contractterm.schema.js +++ b/src/resources/3_0_1/schemas/contractterm.schema.js @@ -1,86 +1,118 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.term Schema + * @summary Contractterm Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractTerm', - description: - 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Unique identifier for this particular Contract Provision.', - }, - issued: { - type: DateTimeScalar, - description: 'When this Contract Provision was issued.', - }, - _issued: { - type: require('./element.schema'), - description: 'When this Contract Provision was issued.', - }, - applies: { - type: require('./period.schema'), - description: - 'Relevant time or time-period when this Contract Provision is applicable.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-term-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-term-subtype - subType: { - type: require('./codeableconcept.schema'), - description: - 'Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.', - }, - topic: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The matter of concern in the context of this provision of the agrement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-action - action: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Action stipulated by this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - actionReason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Reason or purpose for the action stipulated by this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A set of security labels that define which terms are controlled by this condition.', - }, - agent: { - type: new GraphQLList(require('./contracttermagent.schema')), - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - }, - text: { - type: GraphQLString, - description: 'Human readable form of this Contract Provision.', - }, - _text: { - type: require('./element.schema'), - description: 'Human readable form of this Contract Provision.', - }, - valuedItem: { - type: new GraphQLList(require('./contracttermvalueditem.schema')), - description: 'Contract Provision Valued Item List.', - }, - }), + name: 'Contractterm', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: 'Unique identifier for this particular Contract Provision.', + }, + _issued: { + type: require('./element.schema.js'), + description: 'When this Contract Provision was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract Provision was issued.', + }, + applies: { + type: require('./period.schema.js'), + description: + 'Relevant time or time-period when this Contract Provision is applicable.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-term-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-term-subtype + subType: { + type: require('./codeableconcept.schema.js'), + description: + 'Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.', + }, + topic: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contracttermtopic_topic_Union', + description: + 'The matter of concern in the context of this provision of the agrement.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The matter of concern in the context of this provision of the agrement.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-action + action: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Action stipulated by this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + actionReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Reason or purpose for the action stipulated by this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A set of security labels that define which terms are controlled by this condition.', + }, + agent: { + type: new GraphQLList(require('./contracttermagent.schema.js')), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Human readable form of this Contract Provision.', + }, + text: { + type: GraphQLString, + description: 'Human readable form of this Contract Provision.', + }, + valuedItem: { + type: new GraphQLList(require('./contracttermvalueditem.schema.js')), + description: 'Contract Provision Valued Item List.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contracttermagent.schema.js b/src/resources/3_0_1/schemas/contracttermagent.schema.js index 2ebb07c5..a71dc1eb 100644 --- a/src/resources/3_0_1/schemas/contracttermagent.schema.js +++ b/src/resources/3_0_1/schemas/contracttermagent.schema.js @@ -1,26 +1,93 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Contract.term.agent Schema + * @summary Contracttermagent Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractTermAgent', - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The agent assigned a role in this Contract Provision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole - role: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Role played by the agent assigned this role in the execution of this Contract Provision.', - }, - }), + name: 'Contracttermagent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contracttermagentactor_actor_Union', + description: 'The agent assigned a role in this Contract Provision.', + types: () => [ + require('./contract.schema.js'), + require('./device.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'The agent assigned a role in this Contract Provision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contract-actorrole + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Role played by the agent assigned this role in the execution of this Contract Provision.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contracttermvalueditem.schema.js b/src/resources/3_0_1/schemas/contracttermvalueditem.schema.js index 27a5ffd3..86e83f24 100644 --- a/src/resources/3_0_1/schemas/contracttermvalueditem.schema.js +++ b/src/resources/3_0_1/schemas/contracttermvalueditem.schema.js @@ -1,74 +1,107 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.term.valuedItem Schema + * @summary ContracttermvaluedItem Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractTermValuedItem', - description: 'Contract Provision Valued Item List.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - entityCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Specific type of Contract Provision Valued Item that may be priced.', - }, - entityReference: { - type: require('./reference.schema'), + name: 'ContracttermvaluedItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + entityCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specific type of Contract Provision Valued Item that may be priced.', + }, + entityReference: { + type: new GraphQLUnionType({ + name: 'ContracttermvaluedItementityReference_entityReference_Union', description: 'Specific type of Contract Provision Valued Item that may be priced.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Identifies a Contract Provision Valued Item instance.', - }, - effectiveTime: { - type: DateTimeScalar, - description: - 'Indicates the time during which this Contract Term ValuedItem information is effective.', - }, - _effectiveTime: { - type: require('./element.schema'), - description: - 'Indicates the time during which this Contract Term ValuedItem information is effective.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.', - }, - unitPrice: { - type: require('./money.schema'), - description: 'A Contract Provision Valued Item unit valuation measure.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.schema'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./money.schema'), - description: - 'Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Specific type of Contract Provision Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Identifies a Contract Provision Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.schema.js'), + description: + 'Indicates the time during which this Contract Term ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract Term ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: 'A Contract Provision Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.schema.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./money.schema.js'), + description: + 'Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contractvalueditem.schema.js b/src/resources/3_0_1/schemas/contractvalueditem.schema.js index d1946650..3133e991 100644 --- a/src/resources/3_0_1/schemas/contractvalueditem.schema.js +++ b/src/resources/3_0_1/schemas/contractvalueditem.schema.js @@ -1,74 +1,105 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Contract.valuedItem Schema + * @summary ContractvaluedItem Schema */ module.exports = new GraphQLObjectType({ - name: 'ContractValuedItem', - description: 'Contract Valued Item List.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - entityCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Specific type of Contract Valued Item that may be priced.', - }, - entityReference: { - type: require('./reference.schema'), + name: 'ContractvaluedItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + entityCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + entityReference: { + type: new GraphQLUnionType({ + name: 'ContractvaluedItementityReference_entityReference_Union', description: 'Specific type of Contract Valued Item that may be priced.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Identifies a Contract Valued Item instance.', - }, - effectiveTime: { - type: DateTimeScalar, - description: - 'Indicates the time during which this Contract ValuedItem information is effective.', - }, - _effectiveTime: { - type: require('./element.schema'), - description: - 'Indicates the time during which this Contract ValuedItem information is effective.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', - }, - unitPrice: { - type: require('./money.schema'), - description: 'A Contract Valued Item unit valuation measure.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - points: { - type: GraphQLFloat, - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', - }, - _points: { - type: require('./element.schema'), - description: - 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', - }, - net: { - type: require('./money.schema'), - description: - 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Identifies a Contract Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.schema.js'), + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: 'A Contract Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.schema.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./money.schema.js'), + description: + 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/contributor.schema.js b/src/resources/3_0_1/schemas/contributor.schema.js index ced0858d..61e1c8e0 100644 --- a/src/resources/3_0_1/schemas/contributor.schema.js +++ b/src/resources/3_0_1/schemas/contributor.schema.js @@ -1,12 +1,10 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -14,32 +12,46 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Contributor', - description: 'Base StructureDefinition for Contributor Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contributor-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of contributor.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of contributor.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of the individual or organization responsible for the contribution.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of the individual or organization responsible for the contribution.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the contributor.', - }, - }), + description: 'Base StructureDefinition for Contributor Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of contributor.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contributor-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of contributor.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization responsible for the contribution.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the individual or organization responsible for the contribution.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the contributor.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/count.schema.js b/src/resources/3_0_1/schemas/count.schema.js index 587e204a..950c2ee1 100644 --- a/src/resources/3_0_1/schemas/count.schema.js +++ b/src/resources/3_0_1/schemas/count.schema.js @@ -1,6 +1,11 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Count', - description: 'Base StructureDefinition for Count Type.', - fields: () => extendSchema(require('./quantity.schema')), + description: 'Base StructureDefinition for Count Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/coverage.schema.js b/src/resources/3_0_1/schemas/coverage.schema.js index b7b09c7e..545b038b 100644 --- a/src/resources/3_0_1/schemas/coverage.schema.js +++ b/src/resources/3_0_1/schemas/coverage.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let CoverageResourceType = new GraphQLEnumType({ - name: 'CoverageResourceType', - values: { - Coverage: { value: 'Coverage' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -23,118 +17,256 @@ let CoverageResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Coverage', - description: 'Base StructureDefinition for Coverage Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(CoverageResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Certificate number, Personal Health Number or Case ID. May be constructed as the concatination of the Coverage.SubscriberID and the Coverage.dependant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/coverage-type - type: { - type: require('./codeableconcept.schema'), - description: - 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.', - }, - policyHolder: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Coverage Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Coverage_Enum_schema', + values: { Coverage: { value: 'Coverage' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Certificate number, Personal Health Number or Case ID. May be constructed as the concatination of the Coverage.SubscriberID and the Coverage.dependant.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/coverage-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.', + }, + policyHolder: { + type: new GraphQLUnionType({ + name: 'CoveragepolicyHolder_policyHolder_Union', description: "The party who 'owns' the insurance policy, may be an individual, corporation or the subscriber's employer.", - }, - subscriber: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "The party who 'owns' the insurance policy, may be an individual, corporation or the subscriber's employer.", + }, + subscriber: { + type: new GraphQLUnionType({ + name: 'Coveragesubscriber_subscriber_Union', description: "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", - }, - subscriberId: { - type: GraphQLString, - description: 'The insurer assigned ID for the Subscriber.', - }, - _subscriberId: { - type: require('./element.schema'), - description: 'The insurer assigned ID for the Subscriber.', - }, - beneficiary: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", + }, + _subscriberId: { + type: require('./element.schema.js'), + description: 'The insurer assigned ID for the Subscriber.', + }, + subscriberId: { + type: GraphQLString, + description: 'The insurer assigned ID for the Subscriber.', + }, + beneficiary: { + type: new GraphQLUnionType({ + name: 'Coveragebeneficiary_beneficiary_Union', description: 'The party who benefits from the insurance coverage., the patient when services are provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/policyholder-relationship - relationship: { - type: require('./codeableconcept.schema'), - description: - 'The relationship of beneficiary (patient) to the subscriber.', - }, - period: { - type: require('./period.schema'), - description: - "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", - }, - payor: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements. May provide multiple identifiers such as insurance company identifier or business identifier (BIN number).', - }, - grouping: { - type: require('./coveragegrouping.schema'), - description: - 'A suite of underwrite specific classifiers, for example may be used to identify a class of coverage or employer group, Policy, Plan.', - }, - dependent: { - type: GraphQLString, - description: 'A unique identifier for a dependent under the coverage.', - }, - _dependent: { - type: require('./element.schema'), - description: 'A unique identifier for a dependent under the coverage.', - }, - sequence: { - type: GraphQLString, - description: - 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', - }, - order: { - type: PositiveIntScalar, - description: - 'The order of applicability of this coverage relative to other coverages which are currently inforce. Note, there may be gaps in the numbering and this does not imply primary, secondard etc. as the specific positioning of coverages depends upon the episode of care.', - }, - _order: { - type: require('./element.schema'), - description: - 'The order of applicability of this coverage relative to other coverages which are currently inforce. Note, there may be gaps in the numbering and this does not imply primary, secondard etc. as the specific positioning of coverages depends upon the episode of care.', - }, - network: { - type: GraphQLString, - description: - "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", - }, - _network: { - type: require('./element.schema'), - description: - "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", - }, - contract: { - type: new GraphQLList(require('./reference.schema')), - description: 'The policy(s) which constitute this insurance coverage.', - }, - }), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The party who benefits from the insurance coverage., the patient when services are provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/policyholder-relationship + relationship: { + type: require('./codeableconcept.schema.js'), + description: + 'The relationship of beneficiary (patient) to the subscriber.', + }, + period: { + type: require('./period.schema.js'), + description: + "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", + }, + payor: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Coveragepayor_payor_Union', + description: + 'The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements. May provide multiple identifiers such as insurance company identifier or business identifier (BIN number).', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements. May provide multiple identifiers such as insurance company identifier or business identifier (BIN number).', + }, + grouping: { + type: require('./coveragegrouping.schema.js'), + description: + 'A suite of underwrite specific classifiers, for example may be used to identify a class of coverage or employer group, Policy, Plan.', + }, + _dependent: { + type: require('./element.schema.js'), + description: 'A unique identifier for a dependent under the coverage.', + }, + dependent: { + type: GraphQLString, + description: 'A unique identifier for a dependent under the coverage.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', + }, + sequence: { + type: GraphQLString, + description: + 'An optional counter for a particular instance of the identified coverage which increments upon each renewal.', + }, + _order: { + type: require('./element.schema.js'), + description: + 'The order of applicability of this coverage relative to other coverages which are currently inforce. Note, there may be gaps in the numbering and this does not imply primary, secondard etc. as the specific positioning of coverages depends upon the episode of care.', + }, + order: { + type: PositiveIntScalar, + description: + 'The order of applicability of this coverage relative to other coverages which are currently inforce. Note, there may be gaps in the numbering and this does not imply primary, secondard etc. as the specific positioning of coverages depends upon the episode of care.', + }, + _network: { + type: require('./element.schema.js'), + description: + "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", + }, + network: { + type: GraphQLString, + description: + "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", + }, + contract: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Coveragecontract_contract_Union', + description: + 'The policy(s) which constitute this insurance coverage.', + types: () => [require('./contract.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + }, + }), + ), + description: 'The policy(s) which constitute this insurance coverage.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/coveragegrouping.schema.js b/src/resources/3_0_1/schemas/coveragegrouping.schema.js index 736e0dc1..404f9431 100644 --- a/src/resources/3_0_1/schemas/coveragegrouping.schema.js +++ b/src/resources/3_0_1/schemas/coveragegrouping.schema.js @@ -1,124 +1,140 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary Coverage.grouping Schema + * @summary Coveragegrouping Schema */ module.exports = new GraphQLObjectType({ - name: 'CoverageGrouping', - description: - 'A suite of underwrite specific classifiers, for example may be used to identify a class of coverage or employer group, Policy, Plan.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - group: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify an employer group. May also be referred to as a Policy or Group ID.', - }, - _group: { - type: require('./element.schema'), - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify an employer group. May also be referred to as a Policy or Group ID.', - }, - groupDisplay: { - type: GraphQLString, - description: 'A short description for the group.', - }, - _groupDisplay: { - type: require('./element.schema'), - description: 'A short description for the group.', - }, - subGroup: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a subset of an employer group.', - }, - _subGroup: { - type: require('./element.schema'), - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a subset of an employer group.', - }, - subGroupDisplay: { - type: GraphQLString, - description: 'A short description for the subgroup.', - }, - _subGroupDisplay: { - type: require('./element.schema'), - description: 'A short description for the subgroup.', - }, - plan: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a collection of benefits provided to employees. May be referred to as a Section or Division ID.', - }, - _plan: { - type: require('./element.schema'), - description: - 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a collection of benefits provided to employees. May be referred to as a Section or Division ID.', - }, - planDisplay: { - type: GraphQLString, - description: 'A short description for the plan.', - }, - _planDisplay: { - type: require('./element.schema'), - description: 'A short description for the plan.', - }, - subPlan: { - type: GraphQLString, - description: - 'Identifies a sub-style or sub-collective of coverage issued by the underwriter, for example may be used to identify a subset of a collection of benefits provided to employees.', - }, - _subPlan: { - type: require('./element.schema'), - description: - 'Identifies a sub-style or sub-collective of coverage issued by the underwriter, for example may be used to identify a subset of a collection of benefits provided to employees.', - }, - subPlanDisplay: { - type: GraphQLString, - description: 'A short description for the subplan.', - }, - _subPlanDisplay: { - type: require('./element.schema'), - description: 'A short description for the subplan.', - }, - class: { - type: GraphQLString, - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage such as a level of deductables or co-payment.', - }, - _class: { - type: require('./element.schema'), - description: - 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage such as a level of deductables or co-payment.', - }, - classDisplay: { - type: GraphQLString, - description: 'A short description for the class.', - }, - _classDisplay: { - type: require('./element.schema'), - description: 'A short description for the class.', - }, - subClass: { - type: GraphQLString, - description: - 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a subclass of coverage such as a sub-level of deductables or co-payment.', - }, - _subClass: { - type: require('./element.schema'), - description: - 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a subclass of coverage such as a sub-level of deductables or co-payment.', - }, - subClassDisplay: { - type: GraphQLString, - description: 'A short description for the subclass.', - }, - _subClassDisplay: { - type: require('./element.schema'), - description: 'A short description for the subclass.', - }, - }), + name: 'Coveragegrouping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _group: { + type: require('./element.schema.js'), + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify an employer group. May also be referred to as a Policy or Group ID.', + }, + group: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify an employer group. May also be referred to as a Policy or Group ID.', + }, + _groupDisplay: { + type: require('./element.schema.js'), + description: 'A short description for the group.', + }, + groupDisplay: { + type: GraphQLString, + description: 'A short description for the group.', + }, + _subGroup: { + type: require('./element.schema.js'), + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a subset of an employer group.', + }, + subGroup: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a subset of an employer group.', + }, + _subGroupDisplay: { + type: require('./element.schema.js'), + description: 'A short description for the subgroup.', + }, + subGroupDisplay: { + type: GraphQLString, + description: 'A short description for the subgroup.', + }, + _plan: { + type: require('./element.schema.js'), + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a collection of benefits provided to employees. May be referred to as a Section or Division ID.', + }, + plan: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issued by the underwriter, for example may be used to identify a collection of benefits provided to employees. May be referred to as a Section or Division ID.', + }, + _planDisplay: { + type: require('./element.schema.js'), + description: 'A short description for the plan.', + }, + planDisplay: { + type: GraphQLString, + description: 'A short description for the plan.', + }, + _subPlan: { + type: require('./element.schema.js'), + description: + 'Identifies a sub-style or sub-collective of coverage issued by the underwriter, for example may be used to identify a subset of a collection of benefits provided to employees.', + }, + subPlan: { + type: GraphQLString, + description: + 'Identifies a sub-style or sub-collective of coverage issued by the underwriter, for example may be used to identify a subset of a collection of benefits provided to employees.', + }, + _subPlanDisplay: { + type: require('./element.schema.js'), + description: 'A short description for the subplan.', + }, + subPlanDisplay: { + type: GraphQLString, + description: 'A short description for the subplan.', + }, + _class: { + type: require('./element.schema.js'), + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage such as a level of deductables or co-payment.', + }, + class: { + type: GraphQLString, + description: + 'Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage such as a level of deductables or co-payment.', + }, + _classDisplay: { + type: require('./element.schema.js'), + description: 'A short description for the class.', + }, + classDisplay: { + type: GraphQLString, + description: 'A short description for the class.', + }, + _subClass: { + type: require('./element.schema.js'), + description: + 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a subclass of coverage such as a sub-level of deductables or co-payment.', + }, + subClass: { + type: GraphQLString, + description: + 'Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a subclass of coverage such as a sub-level of deductables or co-payment.', + }, + _subClassDisplay: { + type: require('./element.schema.js'), + description: 'A short description for the subclass.', + }, + subClassDisplay: { + type: GraphQLString, + description: 'A short description for the subclass.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/dataelement.schema.js b/src/resources/3_0_1/schemas/dataelement.schema.js index f4de4bee..0d745a71 100644 --- a/src/resources/3_0_1/schemas/dataelement.schema.js +++ b/src/resources/3_0_1/schemas/dataelement.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DataElementResourceType = new GraphQLEnumType({ - name: 'DataElementResourceType', - values: { - DataElement: { value: 'DataElement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,147 +18,205 @@ let DataElementResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DataElement', - description: 'Base StructureDefinition for DataElement Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DataElementResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this data element. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this data element. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the data element.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the data element.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the data element.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the data element.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate data element instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the data element is intended to be used.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dataelement-stringency - stringency: { - type: CodeScalar, - description: - 'Identifies how precise the data element is in its definition.', - }, - _stringency: { - type: require('./element.schema'), - description: - 'Identifies how precise the data element is in its definition.', - }, - mapping: { - type: new GraphQLList(require('./dataelementmapping.schema')), - description: - 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', - }, - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.schema')), - ), - description: - 'Defines the structure, type, allowed values and other constraining characteristics of the data element.', - }, - }), + description: 'Base StructureDefinition for DataElement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DataElement_Enum_schema', + values: { DataElement: { value: 'DataElement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published. The URL SHOULD include the major version of the data element. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the data element when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the data element author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this data element. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this data element. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this data element is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the data element was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the data element.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the data element.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the data element. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the data element.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the data element.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate data element instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the data element is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the data element and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the data element.', + }, + _stringency: { + type: require('./element.schema.js'), + description: + 'Identifies how precise the data element is in its definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dataelement-stringency + stringency: { + type: CodeScalar, + description: + 'Identifies how precise the data element is in its definition.', + }, + mapping: { + type: new GraphQLList(require('./dataelementmapping.schema.js')), + description: + 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.schema.js')), + ), + description: + 'Defines the structure, type, allowed values and other constraining characteristics of the data element.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/dataelementmapping.schema.js b/src/resources/3_0_1/schemas/dataelementmapping.schema.js index acb8fd04..f02dcc2f 100644 --- a/src/resources/3_0_1/schemas/dataelementmapping.schema.js +++ b/src/resources/3_0_1/schemas/dataelementmapping.schema.js @@ -1,56 +1,77 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary DataElement.mapping Schema + * @summary DataElementmapping Schema */ module.exports = new GraphQLObjectType({ - name: 'DataElementMapping', - description: - 'Identifies a specification (other than a terminology) that the elements which make up the DataElement have some correspondence with.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: - 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', - }, - _identity: { - type: require('./element.schema'), - description: - 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', - }, - uri: { - type: UriScalar, - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - _uri: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - name: { - type: GraphQLString, - description: 'A name for the specification that is being mapped to.', - }, - _name: { - type: require('./element.schema'), - description: 'A name for the specification that is being mapped to.', - }, - comment: { - type: GraphQLString, - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - }), + name: 'DataElementmapping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _identity: { + type: require('./element.schema.js'), + description: + 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comment: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/datarequirement.schema.js b/src/resources/3_0_1/schemas/datarequirement.schema.js index 86fdd9f3..e28027ce 100644 --- a/src/resources/3_0_1/schemas/datarequirement.schema.js +++ b/src/resources/3_0_1/schemas/datarequirement.schema.js @@ -1,13 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -15,49 +13,63 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'DataRequirement', - description: 'Base StructureDefinition for DataRequirement Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/all-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', - }, - _type: { - type: require('./element.schema'), - description: - 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', - }, - profile: { - type: new GraphQLList(UriScalar), - description: - 'The profile of the required data, specified as the uri of the profile definition.', - }, - _profile: { - type: require('./element.schema'), - description: - 'The profile of the required data, specified as the uri of the profile definition.', - }, - mustSupport: { - type: new GraphQLList(GraphQLString), - description: - 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.', - }, - _mustSupport: { - type: require('./element.schema'), - description: - 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.', - }, - codeFilter: { - type: new GraphQLList(require('./datarequirementcodefilter.schema')), - description: - 'Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.', - }, - dateFilter: { - type: new GraphQLList(require('./datarequirementdatefilter.schema')), - description: - 'Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.', - }, - }), + description: 'Base StructureDefinition for DataRequirement Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/all-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'The profile of the required data, specified as the uri of the profile definition.', + }, + profile: { + type: new GraphQLList(UriScalar), + description: + 'The profile of the required data, specified as the uri of the profile definition.', + }, + _mustSupport: { + type: require('./element.schema.js'), + description: + 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.', + }, + mustSupport: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. Note that the value for this element can be a path to allow references to nested elements. In that case, all the elements along the path must be supported.', + }, + codeFilter: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.', + }, + dateFilter: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/datarequirementcodefilter.schema.js b/src/resources/3_0_1/schemas/datarequirementcodefilter.schema.js index 35db5480..7eadcec9 100644 --- a/src/resources/3_0_1/schemas/datarequirementcodefilter.schema.js +++ b/src/resources/3_0_1/schemas/datarequirementcodefilter.schema.js @@ -1,67 +1,90 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary DataRequirement.codeFilter Schema + * @summary DataRequirementcodeFilter Schema */ module.exports = new GraphQLObjectType({ - name: 'DataRequirementCodeFilter', - description: - 'Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.', - fields: () => - extendSchema(require('./element.schema'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', - }, - _path: { - type: require('./element.schema'), - description: - 'The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', - }, - valueSetString: { - type: GraphQLString, + name: 'DataRequirementcodeFilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', + }, + _valueSetString: { + type: require('./element.schema.js'), + description: + 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + valueSetString: { + type: GraphQLString, + description: + 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + valueSetReference: { + type: new GraphQLUnionType({ + name: + 'DataRequirementcodeFiltervalueSetReference_valueSetReference_Union', description: 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', - }, - _valueSetString: { - type: require('./element.schema'), - description: - 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', - }, - valueSetReference: { - type: require('./reference.schema'), - description: - 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', - }, - valueCode: { - type: new GraphQLList(CodeScalar), - description: - 'The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.', - }, - _valueCode: { - type: require('./element.schema'), - description: - 'The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.', - }, - valueCoding: { - type: new GraphQLList(require('./coding.schema')), - description: - 'The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.', - }, - valueCodeableConcept: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.', - }, - }), + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: + 'The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.', + }, + valueCode: { + type: new GraphQLList(CodeScalar), + description: + 'The codes for the code filter. Only one of valueSet, valueCode, valueCoding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.', + }, + valueCoding: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.', + }, + valueCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/datarequirementdatefilter.schema.js b/src/resources/3_0_1/schemas/datarequirementdatefilter.schema.js index 3e0ab11d..54d14883 100644 --- a/src/resources/3_0_1/schemas/datarequirementdatefilter.schema.js +++ b/src/resources/3_0_1/schemas/datarequirementdatefilter.schema.js @@ -1,47 +1,63 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary DataRequirement.dateFilter Schema + * @summary DataRequirementdateFilter Schema */ module.exports = new GraphQLObjectType({ - name: 'DataRequirementDateFilter', - description: - 'Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.', - fields: () => - extendSchema(require('./element.schema'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.', - }, - _path: { - type: require('./element.schema'), - description: - 'The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', - }, - valuePeriod: { - type: require('./period.schema'), - description: - 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', - }, - valueDuration: { - type: require('./duration.schema'), - description: - 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', - }, - }), + name: 'DataRequirementdateFilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', + }, + valueDuration: { + type: require('./duration.schema.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration from now.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/detectedissue.schema.js b/src/resources/3_0_1/schemas/detectedissue.schema.js index 4bf6de76..f3bc746d 100644 --- a/src/resources/3_0_1/schemas/detectedissue.schema.js +++ b/src/resources/3_0_1/schemas/detectedissue.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DetectedIssueResourceType = new GraphQLEnumType({ - name: 'DetectedIssueResourceType', - values: { - DetectedIssue: { value: 'DetectedIssue' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,90 +17,186 @@ let DetectedIssueResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DetectedIssue', - description: 'Base StructureDefinition for DetectedIssue Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DetectedIssueResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Business identifier associated with the detected issue record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the status of the detected issue.', - }, - _status: { - type: require('./element.schema'), - description: 'Indicates the status of the detected issue.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-category - category: { - type: require('./codeableconcept.schema'), - description: 'Identifies the general type of issue identified.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-severity - severity: { - type: CodeScalar, - description: - 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', - }, - _severity: { - type: require('./element.schema'), - description: - 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DetectedIssue Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DetectedIssue_Enum_schema', + values: { DetectedIssue: { value: 'DetectedIssue' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Business identifier associated with the detected issue record.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the status of the detected issue.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the status of the detected issue.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-category + category: { + type: require('./codeableconcept.schema.js'), + description: 'Identifies the general type of issue identified.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-severity + severity: { + type: CodeScalar, + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'DetectedIssuepatient_patient_Union', description: 'Indicates the patient whose record the detected issue is associated with.', - }, - date: { - type: DateTimeScalar, - description: - 'The date or date-time when the detected issue was initially identified.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date or date-time when the detected issue was initially identified.', - }, - author: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'Indicates the patient whose record the detected issue is associated with.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date or date-time when the detected issue was initially identified.', + }, + date: { + type: DateTimeScalar, + description: + 'The date or date-time when the detected issue was initially identified.', + }, + author: { + type: new GraphQLUnionType({ + name: 'DetectedIssueauthor_author_Union', description: 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', - }, - implicated: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', - }, - detail: { - type: GraphQLString, - description: 'A textual explanation of the detected issue.', - }, - _detail: { - type: require('./element.schema'), - description: 'A textual explanation of the detected issue.', - }, - reference: { - type: UriScalar, - description: - 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', - }, - _reference: { - type: require('./element.schema'), - description: - 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', - }, - mitigation: { - type: new GraphQLList(require('./detectedissuemitigation.schema')), - description: - 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', + }, + implicated: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DetectedIssueimplicated_implicated_Union', + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + }, + _detail: { + type: require('./element.schema.js'), + description: 'A textual explanation of the detected issue.', + }, + detail: { + type: GraphQLString, + description: 'A textual explanation of the detected issue.', + }, + _reference: { + type: require('./element.schema.js'), + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + reference: { + type: UriScalar, + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + mitigation: { + type: new GraphQLList(require('./detectedissuemitigation.schema.js')), + description: + 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/detectedissuemitigation.schema.js b/src/resources/3_0_1/schemas/detectedissuemitigation.schema.js index 1a80d1c9..7db8416e 100644 --- a/src/resources/3_0_1/schemas/detectedissuemitigation.schema.js +++ b/src/resources/3_0_1/schemas/detectedissuemitigation.schema.js @@ -1,36 +1,68 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary DetectedIssue.mitigation Schema + * @summary DetectedIssuemitigation Schema */ module.exports = new GraphQLObjectType({ - name: 'DetectedIssueMitigation', - description: - 'Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action - action: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', - }, - date: { - type: DateTimeScalar, - description: 'Indicates when the mitigating action was documented.', - }, - _date: { - type: require('./element.schema'), - description: 'Indicates when the mitigating action was documented.', - }, - author: { - type: require('./reference.schema'), + name: 'DetectedIssuemitigation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action + action: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Indicates when the mitigating action was documented.', + }, + date: { + type: DateTimeScalar, + description: 'Indicates when the mitigating action was documented.', + }, + author: { + type: new GraphQLUnionType({ + name: 'DetectedIssuemitigationauthor_author_Union', description: 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/device.schema.js b/src/resources/3_0_1/schemas/device.schema.js index 17e41e86..ae5f106f 100644 --- a/src/resources/3_0_1/schemas/device.schema.js +++ b/src/resources/3_0_1/schemas/device.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceResourceType = new GraphQLEnumType({ - name: 'DeviceResourceType', - values: { - Device: { value: 'Device' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,130 +17,216 @@ let DeviceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Device', - description: 'Base StructureDefinition for Device Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Unique instance identifiers assigned to a device by manufacturers other organizations or owners.', - }, - udi: { - type: require('./deviceudi.schema'), - description: - '[Unique device identifier (UDI)](device.html#5.11.3.2.2) assigned to device label or package.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-status - status: { - type: CodeScalar, - description: 'Status of the Device availability.', - }, - _status: { - type: require('./element.schema'), - description: 'Status of the Device availability.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-kind - type: { - type: require('./codeableconcept.schema'), - description: 'Code or identifier to identify a kind of device.', - }, - lotNumber: { - type: GraphQLString, - description: 'Lot number assigned by the manufacturer.', - }, - _lotNumber: { - type: require('./element.schema'), - description: 'Lot number assigned by the manufacturer.', - }, - manufacturer: { - type: GraphQLString, - description: 'A name of the manufacturer.', - }, - _manufacturer: { - type: require('./element.schema'), - description: 'A name of the manufacturer.', - }, - manufactureDate: { - type: DateTimeScalar, - description: 'The date and time when the device was manufactured.', - }, - _manufactureDate: { - type: require('./element.schema'), - description: 'The date and time when the device was manufactured.', - }, - expirationDate: { - type: DateTimeScalar, - description: - 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', - }, - _expirationDate: { - type: require('./element.schema'), - description: - 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', - }, - model: { - type: GraphQLString, - description: - "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", - }, - _model: { - type: require('./element.schema'), - description: - "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", - }, - version: { - type: GraphQLString, - description: - 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Device Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Device_Enum_schema', + values: { Device: { value: 'Device' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Unique instance identifiers assigned to a device by manufacturers other organizations or owners.', + }, + udi: { + type: require('./deviceudi.schema.js'), + description: + '[Unique device identifier (UDI)](device.html#5.11.3.2.2) assigned to device label or package.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Status of the Device availability.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-status + status: { + type: CodeScalar, + description: 'Status of the Device availability.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-kind + type: { + type: require('./codeableconcept.schema.js'), + description: 'Code or identifier to identify a kind of device.', + }, + _lotNumber: { + type: require('./element.schema.js'), + description: 'Lot number assigned by the manufacturer.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number assigned by the manufacturer.', + }, + _manufacturer: { + type: require('./element.schema.js'), + description: 'A name of the manufacturer.', + }, + manufacturer: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + _manufactureDate: { + type: require('./element.schema.js'), + description: 'The date and time when the device was manufactured.', + }, + manufactureDate: { + type: DateTimeScalar, + description: 'The date and time when the device was manufactured.', + }, + _expirationDate: { + type: require('./element.schema.js'), + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + expirationDate: { + type: DateTimeScalar, + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + _model: { + type: require('./element.schema.js'), + description: + "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", + }, + model: { + type: GraphQLString, + description: + "The 'model' is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', + }, + version: { + type: GraphQLString, + description: + 'The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'Devicepatient_patient_Union', description: 'Patient information, If the device is affixed to a person.', - }, - owner: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Patient information, If the device is affixed to a person.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'Deviceowner_owner_Union', description: 'An organization that is responsible for the provision and ongoing maintenance of the device.', - }, - contact: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for an organization or a particular human that is responsible for the device.', - }, - location: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for an organization or a particular human that is responsible for the device.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Devicelocation_location_Union', description: 'The place where the device can be found.', - }, - url: { - type: UriScalar, - description: - 'A network address on which the device may be contacted directly.', - }, - _url: { - type: require('./element.schema'), - description: - 'A network address on which the device may be contacted directly.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Descriptive information, usage information or implantation information that is not captured in an existing element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-safety - safety: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Provides additional safety characteristics about a medical device. For example devices containing latex.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The place where the device can be found.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'A network address on which the device may be contacted directly.', + }, + url: { + type: UriScalar, + description: + 'A network address on which the device may be contacted directly.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Descriptive information, usage information or implantation information that is not captured in an existing element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-safety + safety: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Provides additional safety characteristics about a medical device. For example devices containing latex.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/devicecomponent.schema.js b/src/resources/3_0_1/schemas/devicecomponent.schema.js index 98a5ce9e..482b7517 100644 --- a/src/resources/3_0_1/schemas/devicecomponent.schema.js +++ b/src/resources/3_0_1/schemas/devicecomponent.schema.js @@ -1,21 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceComponentResourceType = new GraphQLEnumType({ - name: 'DeviceComponentResourceType', - values: { - DeviceComponent: { value: 'DeviceComponent' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,78 +16,156 @@ let DeviceComponentResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DeviceComponent', - description: 'Base StructureDefinition for DeviceComponent Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceComponentResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: - 'The locally assigned unique identification by the software. For example: handle ID.', - }, - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The component type as defined in the object-oriented or metric nomenclature partition.', - }, - lastSystemChange: { - type: InstantScalar, - description: - 'The timestamp for the most recent system change which includes device configuration or setting change.', - }, - _lastSystemChange: { - type: require('./element.schema'), - description: - 'The timestamp for the most recent system change which includes device configuration or setting change.', - }, - source: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DeviceComponent Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceComponent_Enum_schema', + values: { DeviceComponent: { value: 'DeviceComponent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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 GraphQLNonNull(require('./identifier.schema.js')), + description: + 'The locally assigned unique identification by the software. For example: handle ID.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The component type as defined in the object-oriented or metric nomenclature partition.', + }, + _lastSystemChange: { + type: require('./element.schema.js'), + description: + 'The timestamp for the most recent system change which includes device configuration or setting change.', + }, + lastSystemChange: { + type: InstantScalar, + description: + 'The timestamp for the most recent system change which includes device configuration or setting change.', + }, + source: { + type: new GraphQLUnionType({ + name: 'DeviceComponentsource_source_Union', description: 'The link to the source Device that contains administrative device information such as manufacture, serial number, etc.', - }, - parent: { - type: require('./reference.schema'), + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The link to the source Device that contains administrative device information such as manufacture, serial number, etc.', + }, + parent: { + type: new GraphQLUnionType({ + name: 'DeviceComponentparent_parent_Union', description: 'The link to the parent resource. For example: Channel is linked to its VMD parent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operational-status - operationalStatus: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The current operational status of the device. For example: On, Off, Standby, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/parameter-group - parameterGroup: { - type: require('./codeableconcept.schema'), - description: - 'The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measurement-principle - measurementPrinciple: { - type: CodeScalar, - description: - 'The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', - }, - _measurementPrinciple: { - type: require('./element.schema'), - description: - 'The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', - }, - productionSpecification: { - type: new GraphQLList( - require('./devicecomponentproductionspecification.schema'), - ), - description: - 'The production specification such as component revision, serial number, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - languageCode: { - type: require('./codeableconcept.schema'), - description: - 'The language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.', - }, - }), + types: () => [require('./devicecomponent.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DeviceComponent') { + return require('./devicecomponent.schema.js'); + } + }, + }), + description: + 'The link to the parent resource. For example: Channel is linked to its VMD parent.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operational-status + operationalStatus: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The current operational status of the device. For example: On, Off, Standby, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/parameter-group + parameterGroup: { + type: require('./codeableconcept.schema.js'), + description: + 'The parameter group supported by the current device component that is based on some nomenclature, e.g. cardiovascular.', + }, + _measurementPrinciple: { + type: require('./element.schema.js'), + description: + 'The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measurement-principle + measurementPrinciple: { + type: CodeScalar, + description: + 'The physical principle of the measurement. For example: thermal, chemical, acoustical, etc.', + }, + productionSpecification: { + type: new GraphQLList( + require('./devicecomponentproductionspecification.schema.js'), + ), + description: + 'The production specification such as component revision, serial number, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + languageCode: { + type: require('./codeableconcept.schema.js'), + description: + 'The language code for the human-readable text string produced by the device. This language code will follow the IETF language tag. Example: en-US.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/devicecomponentproductionspecification.schema.js b/src/resources/3_0_1/schemas/devicecomponentproductionspecification.schema.js index 06742994..a50fe9ee 100644 --- a/src/resources/3_0_1/schemas/devicecomponentproductionspecification.schema.js +++ b/src/resources/3_0_1/schemas/devicecomponentproductionspecification.schema.js @@ -1,35 +1,51 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary DeviceComponent.productionSpecification Schema + * @summary DeviceComponentproductionSpecification Schema */ module.exports = new GraphQLObjectType({ - name: 'DeviceComponentProductionSpecification', - description: - 'The production specification such as component revision, serial number, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/specification-type - specType: { - type: require('./codeableconcept.schema'), - description: - 'The specification type, such as, serial number, part number, hardware revision, software revision, etc.', - }, - componentId: { - type: require('./identifier.schema'), - description: - 'The internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacturer can make use of.', - }, - productionSpec: { - type: GraphQLString, - description: 'The printable string defining the component.', - }, - _productionSpec: { - type: require('./element.schema'), - description: 'The printable string defining the component.', - }, - }), + name: 'DeviceComponentproductionSpecification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specification-type + specType: { + type: require('./codeableconcept.schema.js'), + description: + 'The specification type, such as, serial number, part number, hardware revision, software revision, etc.', + }, + componentId: { + type: require('./identifier.schema.js'), + description: + 'The internal component unique identification. This is a provision for manufacture specific standard components using a private OID. 11073-10101 has a partition for private OID semantic that the manufacturer can make use of.', + }, + _productionSpec: { + type: require('./element.schema.js'), + description: 'The printable string defining the component.', + }, + productionSpec: { + type: GraphQLString, + description: 'The printable string defining the component.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/devicemetric.schema.js b/src/resources/3_0_1/schemas/devicemetric.schema.js index 3851f620..06c4f7b0 100644 --- a/src/resources/3_0_1/schemas/devicemetric.schema.js +++ b/src/resources/3_0_1/schemas/devicemetric.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceMetricResourceType = new GraphQLEnumType({ - name: 'DeviceMetricResourceType', - values: { - DeviceMetric: { value: 'DeviceMetric' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,82 +15,160 @@ let DeviceMetricResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DeviceMetric', - description: 'Base StructureDefinition for DeviceMetric Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceMetricResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: - 'Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/devicemetric-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/devicemetric-type - unit: { - type: require('./codeableconcept.schema'), - description: - 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', - }, - source: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DeviceMetric Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceMetric_Enum_schema', + values: { DeviceMetric: { value: 'DeviceMetric' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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 GraphQLNonNull(require('./identifier.schema.js')), + description: + 'Describes the unique identification of this metric that has been assigned by the device or gateway software. For example: handle ID. It should be noted that in order to make the identifier unique, the system element of the identifier should be set to the unique identifier of the device.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/devicemetric-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/devicemetric-type + unit: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', + }, + source: { + type: new GraphQLUnionType({ + name: 'DeviceMetricsource_source_Union', description: 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.', - }, - parent: { - type: require('./reference.schema'), + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.', + }, + parent: { + type: new GraphQLUnionType({ + name: 'DeviceMetricparent_parent_Union', description: 'Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-operational-status - operationalStatus: { - type: CodeScalar, - description: - 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', - }, - _operationalStatus: { - type: require('./element.schema'), - description: - 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-color - color: { - type: CodeScalar, - description: - 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', - }, - _color: { - type: require('./element.schema'), - description: - 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-category - category: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', - }, - _category: { - type: require('./element.schema'), - description: - 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', - }, - measurementPeriod: { - type: require('./timing.schema'), - description: - 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', - }, - calibration: { - type: new GraphQLList(require('./devicemetriccalibration.schema')), - description: - 'Describes the calibrations that have been performed or that are required to be performed.', - }, - }), + types: () => [require('./devicecomponent.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DeviceComponent') { + return require('./devicecomponent.schema.js'); + } + }, + }), + description: + 'Describes the link to the DeviceComponent that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a DeviceComponent that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', + }, + _operationalStatus: { + type: require('./element.schema.js'), + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-operational-status + operationalStatus: { + type: CodeScalar, + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + _color: { + type: require('./element.schema.js'), + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-color + color: { + type: CodeScalar, + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + _category: { + type: require('./element.schema.js'), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-category + category: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + measurementPeriod: { + type: require('./timing.schema.js'), + description: + 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', + }, + calibration: { + type: new GraphQLList(require('./devicemetriccalibration.schema.js')), + description: + 'Describes the calibrations that have been performed or that are required to be performed.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/devicemetriccalibration.schema.js b/src/resources/3_0_1/schemas/devicemetriccalibration.schema.js index 38834c65..be35049e 100644 --- a/src/resources/3_0_1/schemas/devicemetriccalibration.schema.js +++ b/src/resources/3_0_1/schemas/devicemetriccalibration.schema.js @@ -1,44 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports - * @summary DeviceMetric.calibration Schema + * @summary DeviceMetriccalibration Schema */ module.exports = new GraphQLObjectType({ - name: 'DeviceMetricCalibration', - description: - 'Describes the calibrations that have been performed or that are required to be performed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-type - type: { - type: CodeScalar, - description: 'Describes the type of the calibration method.', - }, - _type: { - type: require('./element.schema'), - description: 'Describes the type of the calibration method.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-state - state: { - type: CodeScalar, - description: 'Describes the state of the calibration.', - }, - _state: { - type: require('./element.schema'), - description: 'Describes the state of the calibration.', - }, - time: { - type: InstantScalar, - description: 'Describes the time last calibration has been performed.', - }, - _time: { - type: require('./element.schema'), - description: 'Describes the time last calibration has been performed.', - }, - }), + name: 'DeviceMetriccalibration', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Describes the type of the calibration method.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-type + type: { + type: CodeScalar, + description: 'Describes the type of the calibration method.', + }, + _state: { + type: require('./element.schema.js'), + description: 'Describes the state of the calibration.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/metric-calibration-state + state: { + type: CodeScalar, + description: 'Describes the state of the calibration.', + }, + _time: { + type: require('./element.schema.js'), + description: 'Describes the time last calibration has been performed.', + }, + time: { + type: InstantScalar, + description: 'Describes the time last calibration has been performed.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/devicerequest.schema.js b/src/resources/3_0_1/schemas/devicerequest.schema.js index d1d19ecd..cd43d0ec 100644 --- a/src/resources/3_0_1/schemas/devicerequest.schema.js +++ b/src/resources/3_0_1/schemas/devicerequest.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceRequestResourceType = new GraphQLEnumType({ - name: 'DeviceRequestResourceType', - values: { - DeviceRequest: { value: 'DeviceRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,146 +16,362 @@ let DeviceRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DeviceRequest', - description: 'Base StructureDefinition for DeviceRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order by the orderer or by the receiver.', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Protocol or definition followed by this request. For example: The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: 'Plan/proposal/order fulfilled by this request.', - }, - priorRequest: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The request takes the place of the referenced completed or terminated request(s).', - }, - groupIdentifier: { - type: require('./identifier.schema'), - description: 'Composite request this is part of.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: CodeScalar, - description: 'The status of the request.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the request.', - }, - // ValueSetReference: http://build.fhir.org/valueset-request-intent.html - intent: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Whether the request is a proposal, plan, an original order or a reflex order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.schema'), - description: - 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-kind - codeReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The details of the device to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-kind - codeCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The details of the device to be used.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient who will use the device.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DeviceRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceRequest_Enum_schema', + values: { DeviceRequest: { value: 'DeviceRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers assigned to this order by the orderer or by the receiver.', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestdefinition_definition_Union', + description: + 'Protocol or definition followed by this request. For example: The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', + types: () => [ + require('./activitydefinition.schema.js'), + require('./plandefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + }, + }), + ), + description: + 'Protocol or definition followed by this request. For example: The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestbasedOn_basedOn_Union', + description: 'Plan/proposal/order fulfilled by this request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Plan/proposal/order fulfilled by this request.', + }, + priorRequest: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestpriorRequest_priorRequest_Union', + description: + 'The request takes the place of the referenced completed or terminated request(s).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The request takes the place of the referenced completed or terminated request(s).', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: 'Composite request this is part of.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: CodeScalar, + description: 'The status of the request.', + }, + // valueSetReference: http://build.fhir.org/valueset-request-intent.html + intent: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-kind + codeReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceRequestcodeReference_codeReference_Union', + description: 'The details of the device to be used.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The details of the device to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-kind + codeCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The details of the device to be used.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceRequestsubject_subject_Union', + description: 'The patient who will use the device.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The patient who will use the device.', + }, + context: { + type: new GraphQLUnionType({ + name: 'DeviceRequestcontext_context_Union', description: 'An encounter that provides additional context in which this request is made.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: - "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - occurrencePeriod: { - type: require('./period.schema'), - description: - "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - occurrenceTiming: { - type: require('./timing.schema'), - description: - "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", - }, - authoredOn: { - type: DateTimeScalar, - description: 'When the request transitioned to being actionable.', - }, - _authoredOn: { - type: require('./element.schema'), - description: 'When the request transitioned to being actionable.', - }, - requester: { - type: require('./devicerequestrequester.schema'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - performerType: { - type: require('./codeableconcept.schema'), - description: - 'Desired type of performer for doing the diagnostic testing.', - }, - performer: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'An encounter that provides additional context in which this request is made.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'When the request transitioned to being actionable.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request transitioned to being actionable.', + }, + requester: { + type: require('./devicerequestrequester.schema.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + performerType: { + type: require('./codeableconcept.schema.js'), + description: + 'Desired type of performer for doing the diagnostic testing.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'DeviceRequestperformer_performer_Union', description: 'The desired perfomer for doing the diagnostic testing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reason or justification for the use of this device.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: 'Reason or justification for the use of this device.', - }, - supportingInfo: { - type: new GraphQLList(require('./reference.schema')), - description: - "Additional clinical information about the patient that may influence the request fulfilment. For example, this may includes body where on the subject's the device will be used ( i.e. the target site).", - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - relevantHistory: { - type: new GraphQLList(require('./reference.schema')), - description: 'Key events in the history of the request.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + description: 'The desired perfomer for doing the diagnostic testing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason or justification for the use of this device.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestreasonReference_reasonReference_Union', + description: 'Reason or justification for the use of this device.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Reason or justification for the use of this device.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestsupportingInfo_supportingInfo_Union', + description: + "Additional clinical information about the patient that may influence the request fulfilment. For example, this may includes body where on the subject's the device will be used ( i.e. the target site).", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Additional clinical information about the patient that may influence the request fulfilment. For example, this may includes body where on the subject's the device will be used ( i.e. the target site).", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + relevantHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestrelevantHistory_relevantHistory_Union', + description: 'Key events in the history of the request.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: 'Key events in the history of the request.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/devicerequestrequester.schema.js b/src/resources/3_0_1/schemas/devicerequestrequester.schema.js index 5c845714..8d7fce70 100644 --- a/src/resources/3_0_1/schemas/devicerequestrequester.schema.js +++ b/src/resources/3_0_1/schemas/devicerequestrequester.schema.js @@ -1,26 +1,79 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary DeviceRequest.requester Schema + * @summary DeviceRequestrequester Schema */ module.exports = new GraphQLObjectType({ - name: 'DeviceRequestRequester', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - agent: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device, practitioner, etc. who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'DeviceRequestrequester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + agent: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceRequestrequesteragent_agent_Union', + description: + 'The device, practitioner, etc. who initiated the request.', + types: () => [ + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The device, practitioner, etc. who initiated the request.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'DeviceRequestrequesteronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/deviceudi.schema.js b/src/resources/3_0_1/schemas/deviceudi.schema.js index 729c4705..4c240b8f 100644 --- a/src/resources/3_0_1/schemas/deviceudi.schema.js +++ b/src/resources/3_0_1/schemas/deviceudi.schema.js @@ -1,86 +1,102 @@ -const UriScalar = require('../scalars/uri.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Device.udi Schema + * @summary Deviceudi Schema */ module.exports = new GraphQLObjectType({ - name: 'DeviceUdi', - description: - '[Unique device identifier (UDI)](device.html#5.11.3.2.2) assigned to device label or package.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - deviceIdentifier: { - type: GraphQLString, - description: - 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', - }, - _deviceIdentifier: { - type: require('./element.schema'), - description: - 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', - }, - name: { - type: GraphQLString, - description: 'Name of device as used in labeling or catalog.', - }, - _name: { - type: require('./element.schema'), - description: 'Name of device as used in labeling or catalog.', - }, - jurisdiction: { - type: UriScalar, - description: - 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', - }, - _jurisdiction: { - type: require('./element.schema'), - description: - 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', - }, - carrierHRF: { - type: GraphQLString, - description: - 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', - }, - _carrierHRF: { - type: require('./element.schema'), - description: - 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', - }, - carrierAIDC: { - type: Base64BinaryScalar, - description: - 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', - }, - _carrierAIDC: { - type: require('./element.schema'), - description: - 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', - }, - issuer: { - type: UriScalar, - description: - 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', - }, - _issuer: { - type: require('./element.schema'), - description: - 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/udi-entry-type - entryType: { - type: CodeScalar, - description: 'A coded entry to indicate how the data was entered.', - }, - _entryType: { - type: require('./element.schema'), - description: 'A coded entry to indicate how the data was entered.', - }, - }), + name: 'Deviceudi', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _deviceIdentifier: { + type: require('./element.schema.js'), + description: + 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', + }, + deviceIdentifier: { + type: GraphQLString, + description: + 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Name of device as used in labeling or catalog.', + }, + name: { + type: GraphQLString, + description: 'Name of device as used in labeling or catalog.', + }, + _jurisdiction: { + type: require('./element.schema.js'), + description: + 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', + }, + jurisdiction: { + type: UriScalar, + description: + 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', + }, + _carrierHRF: { + type: require('./element.schema.js'), + description: + 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', + }, + carrierHRF: { + type: GraphQLString, + description: + 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', + }, + _carrierAIDC: { + type: require('./element.schema.js'), + description: + 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', + }, + carrierAIDC: { + type: Base64BinaryScalar, + description: + 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', + }, + _issuer: { + type: require('./element.schema.js'), + description: + 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', + }, + issuer: { + type: UriScalar, + description: + 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', + }, + _entryType: { + type: require('./element.schema.js'), + description: 'A coded entry to indicate how the data was entered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/udi-entry-type + entryType: { + type: CodeScalar, + description: 'A coded entry to indicate how the data was entered.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/deviceusestatement.schema.js b/src/resources/3_0_1/schemas/deviceusestatement.schema.js index c28a257d..78e9c490 100644 --- a/src/resources/3_0_1/schemas/deviceusestatement.schema.js +++ b/src/resources/3_0_1/schemas/deviceusestatement.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DeviceUseStatementResourceType = new GraphQLEnumType({ - name: 'DeviceUseStatementResourceType', - values: { - DeviceUseStatement: { value: 'DeviceUseStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,83 +16,187 @@ let DeviceUseStatementResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DeviceUseStatement', - description: 'Base StructureDefinition for DeviceUseStatement Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DeviceUseStatementResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'An external identifier for this statement such as an IRI.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-statement-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", - }, - _status: { - type: require('./element.schema'), - description: - "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient who used the device.', - }, - whenUsed: { - type: require('./period.schema'), - description: 'The time period over which the device was used.', - }, - timingTiming: { - type: require('./timing.schema'), - description: 'How often the device was used.', - }, - timingPeriod: { - type: require('./period.schema'), - description: 'How often the device was used.', - }, - timingDateTime: { - type: DateTimeScalar, - description: 'How often the device was used.', - }, - _timingDateTime: { - type: require('./element.schema'), - description: 'How often the device was used.', - }, - recordedOn: { - type: DateTimeScalar, - description: 'The time at which the statement was made/recorded.', - }, - _recordedOn: { - type: require('./element.schema'), - description: 'The time at which the statement was made/recorded.', - }, - source: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DeviceUseStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceUseStatement_Enum_schema', + values: { DeviceUseStatement: { value: 'DeviceUseStatement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'An external identifier for this statement such as an IRI.', + }, + _status: { + type: require('./element.schema.js'), + description: + "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-statement-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceUseStatementsubject_subject_Union', + description: 'The patient who used the device.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: 'The patient who used the device.', + }, + whenUsed: { + type: require('./period.schema.js'), + description: 'The time period over which the device was used.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: 'How often the device was used.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: 'How often the device was used.', + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: 'How often the device was used.', + }, + timingDateTime: { + type: DateTimeScalar, + description: 'How often the device was used.', + }, + _recordedOn: { + type: require('./element.schema.js'), + description: 'The time at which the statement was made/recorded.', + }, + recordedOn: { + type: DateTimeScalar, + description: 'The time at which the statement was made/recorded.', + }, + source: { + type: new GraphQLUnionType({ + name: 'DeviceUseStatementsource_source_Union', description: 'Who reported the device was being used by the patient.', - }, - device: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The details of the device used.', - }, - indication: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reason or justification for the use of the device.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.schema'), - description: - "Indicates the site on the subject's body where the device was used ( i.e. the target site).", - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Who reported the device was being used by the patient.', + }, + device: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceUseStatementdevice_device_Union', + description: 'The details of the device used.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The details of the device used.', + }, + indication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason or justification for the use of the device.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the site on the subject's body where the device was used ( i.e. the target site).", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/diagnosticreport.schema.js b/src/resources/3_0_1/schemas/diagnosticreport.schema.js index 85885c5c..f59cb6dd 100644 --- a/src/resources/3_0_1/schemas/diagnosticreport.schema.js +++ b/src/resources/3_0_1/schemas/diagnosticreport.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DiagnosticReportResourceType = new GraphQLEnumType({ - name: 'DiagnosticReportResourceType', - values: { - DiagnosticReport: { value: 'DiagnosticReport' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,121 +18,294 @@ let DiagnosticReportResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DiagnosticReport', - description: 'Base StructureDefinition for DiagnosticReport Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DiagnosticReportResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this report by the performer or other systems.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: 'Details concerning a test or procedure requested.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-report-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the diagnostic report as a whole.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the diagnostic report as a whole.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-service-sections - category: { - type: require('./codeableconcept.schema'), - description: - 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'A code or name that describes this diagnostic report.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DiagnosticReport Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DiagnosticReport_Enum_schema', + values: { DiagnosticReport: { value: 'DiagnosticReport' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers assigned to this report by the performer or other systems.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportbasedOn_basedOn_Union', + description: 'Details concerning a test or procedure requested.', + types: () => [ + require('./careplan.schema.js'), + require('./immunizationrecommendation.schema.js'), + require('./medicationrequest.schema.js'), + require('./nutritionorder.schema.js'), + require('./procedurerequest.schema.js'), + require('./referralrequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: 'Details concerning a test or procedure requested.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the diagnostic report as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-report-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the diagnostic report as a whole.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnostic-service-sections + category: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code or name that describes this diagnostic report.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'DiagnosticReportsubject_subject_Union', description: 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.', + }, + context: { + type: new GraphQLUnionType({ + name: 'DiagnosticReportcontext_context_Union', description: 'The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - _effectiveDateTime: { - type: require('./element.schema'), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', - }, - issued: { - type: InstantScalar, - description: - 'The date and time that this version of the report was released from the source diagnostic service.', - }, - _issued: { - type: require('./element.schema'), - description: - 'The date and time that this version of the report was released from the source diagnostic service.', - }, - performer: { - type: new GraphQLList(require('./diagnosticreportperformer.schema')), - description: - 'Indicates who or what participated in producing the report.', - }, - specimen: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Details about the specimens on which this diagnostic report is based.', - }, - result: { - type: new GraphQLList(require('./reference.schema')), - description: - "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", - }, - imagingStudy: { - type: new GraphQLList(require('./reference.schema')), - description: - 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', - }, - image: { - type: new GraphQLList(require('./diagnosticreportimage.schema')), - description: - 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', - }, - conclusion: { - type: GraphQLString, - description: - 'Concise and clinically contextualized impression / summary of the diagnostic report.', - }, - _conclusion: { - type: require('./element.schema'), - description: - 'Concise and clinically contextualized impression / summary of the diagnostic report.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - codedDiagnosis: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Codes for the conclusion.', - }, - presentedForm: { - type: new GraphQLList(require('./attachment.schema')), - description: - 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', - }, - }), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + _issued: { + type: require('./element.schema.js'), + description: + 'The date and time that this version of the report was released from the source diagnostic service.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time that this version of the report was released from the source diagnostic service.', + }, + performer: { + type: new GraphQLList(require('./diagnosticreportperformer.schema.js')), + description: + 'Indicates who or what participated in producing the report.', + }, + specimen: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportspecimen_specimen_Union', + description: + 'Details about the specimens on which this diagnostic report is based.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'Details about the specimens on which this diagnostic report is based.', + }, + result: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportresult_result_Union', + description: + "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. 'atomic' results), or they can be grouping observations that include references to other members of the group (e.g. 'panels').", + }, + imagingStudy: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportimagingStudy_imagingStudy_Union', + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + types: () => [ + require('./imagingstudy.schema.js'), + require('./imagingmanifest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + if (data && data.resourceType === 'ImagingManifest') { + return require('./imagingmanifest.schema.js'); + } + }, + }), + ), + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + }, + image: { + type: new GraphQLList(require('./diagnosticreportimage.schema.js')), + description: + 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', + }, + _conclusion: { + type: require('./element.schema.js'), + description: + 'Concise and clinically contextualized impression / summary of the diagnostic report.', + }, + conclusion: { + type: GraphQLString, + description: + 'Concise and clinically contextualized impression / summary of the diagnostic report.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + codedDiagnosis: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Codes for the conclusion.', + }, + presentedForm: { + type: new GraphQLList(require('./attachment.schema.js')), + description: + 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/diagnosticreportimage.schema.js b/src/resources/3_0_1/schemas/diagnosticreportimage.schema.js index 73cad088..da929400 100644 --- a/src/resources/3_0_1/schemas/diagnosticreportimage.schema.js +++ b/src/resources/3_0_1/schemas/diagnosticreportimage.schema.js @@ -1,30 +1,63 @@ -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary DiagnosticReport.image Schema + * @summary DiagnosticReportimage Schema */ module.exports = new GraphQLObjectType({ - name: 'DiagnosticReportImage', - description: - 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - comment: { - type: GraphQLString, - description: - "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", - }, - _comment: { - type: require('./element.schema'), - description: - "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", - }, - link: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Reference to the image source.', - }, - }), + name: 'DiagnosticReportimage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _comment: { + type: require('./element.schema.js'), + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + comment: { + type: GraphQLString, + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + link: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DiagnosticReportimagelink_link_Union', + description: 'Reference to the image source.', + types: () => [require('./media.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + }, + }), + ), + description: 'Reference to the image source.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/diagnosticreportperformer.schema.js b/src/resources/3_0_1/schemas/diagnosticreportperformer.schema.js index 6a4dc2ef..e92ea089 100644 --- a/src/resources/3_0_1/schemas/diagnosticreportperformer.schema.js +++ b/src/resources/3_0_1/schemas/diagnosticreportperformer.schema.js @@ -1,26 +1,67 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary DiagnosticReport.performer Schema + * @summary DiagnosticReportperformer Schema */ module.exports = new GraphQLObjectType({ - name: 'DiagnosticReportPerformer', - description: 'Indicates who or what participated in producing the report.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/performer-role - role: { - type: require('./codeableconcept.schema'), - description: - 'Describes the type of participation (e.g. a responsible party, author, or verifier).', - }, - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.', - }, - }), + name: 'DiagnosticReportperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/performer-role + role: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the type of participation (e.g. a responsible party, author, or verifier).', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DiagnosticReportperformeractor_actor_Union', + description: + 'The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/distance.schema.js b/src/resources/3_0_1/schemas/distance.schema.js index 8c07652e..6581b3e2 100644 --- a/src/resources/3_0_1/schemas/distance.schema.js +++ b/src/resources/3_0_1/schemas/distance.schema.js @@ -1,6 +1,11 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Distance', - description: 'Base StructureDefinition for Distance Type.', - fields: () => extendSchema(require('./quantity.schema')), + description: 'Base StructureDefinition for Distance Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/documentmanifest.schema.js b/src/resources/3_0_1/schemas/documentmanifest.schema.js index acb63cdf..79764fba 100644 --- a/src/resources/3_0_1/schemas/documentmanifest.schema.js +++ b/src/resources/3_0_1/schemas/documentmanifest.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DocumentManifestResourceType = new GraphQLEnumType({ - name: 'DocumentManifestResourceType', - values: { - DocumentManifest: { value: 'DocumentManifest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,93 +17,231 @@ let DocumentManifestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DocumentManifest', - description: 'Base StructureDefinition for DocumentManifest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DocumentManifestResourceType), - description: 'Type of this resource.', - }, - masterIdentifier: { - type: require('./identifier.schema'), - description: - 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Other identifiers associated with the document manifest, including version independent identifiers.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of this document manifest.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of this document manifest.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - type: { - type: require('./codeableconcept.schema'), - description: - 'Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DocumentManifest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentManifest_Enum_schema', + values: { DocumentManifest: { value: 'DocumentManifest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + masterIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Other identifiers associated with the document manifest, including version independent identifiers.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this document manifest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document manifest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'DocumentManifestsubject_subject_Union', description: 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', - }, - created: { - type: DateTimeScalar, - description: - 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', - }, - _created: { - type: require('./element.schema'), - description: - 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', - }, - author: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies who is responsible for creating the manifest, and adding documents to it.', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A patient, practitioner, or organization for which this set of documents is intended.', - }, - source: { - type: UriScalar, - description: - 'Identifies the source system, application, or software that produced the document manifest.', - }, - _source: { - type: require('./element.schema'), - description: - 'Identifies the source system, application, or software that produced the document manifest.', - }, - description: { - type: GraphQLString, - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - _description: { - type: require('./element.schema'), - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - content: { - type: new GraphQLList( - new GraphQLNonNull(require('./documentmanifestcontent.schema')), - ), - description: 'The list of Documents included in the manifest.', - }, - related: { - type: new GraphQLList(require('./documentmanifestrelated.schema')), - description: - 'Related identifiers or resources associated with the DocumentManifest.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', + }, + _created: { + type: require('./element.schema.js'), + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + created: { + type: DateTimeScalar, + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentManifestauthor_author_Union', + description: + 'Identifies who is responsible for creating the manifest, and adding documents to it.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'Identifies who is responsible for creating the manifest, and adding documents to it.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentManifestrecipient_recipient_Union', + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + }, + _source: { + type: require('./element.schema.js'), + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + source: { + type: UriScalar, + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + _description: { + type: require('./element.schema.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentmanifestcontent.schema.js')), + ), + description: 'The list of Documents included in the manifest.', + }, + related: { + type: new GraphQLList(require('./documentmanifestrelated.schema.js')), + description: + 'Related identifiers or resources associated with the DocumentManifest.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/documentmanifestcontent.schema.js b/src/resources/3_0_1/schemas/documentmanifestcontent.schema.js index 0d343265..0b42736b 100644 --- a/src/resources/3_0_1/schemas/documentmanifestcontent.schema.js +++ b/src/resources/3_0_1/schemas/documentmanifestcontent.schema.js @@ -1,25 +1,60 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentManifest.content Schema + * @summary DocumentManifestcontent Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentManifestContent', - description: 'The list of Documents included in the manifest.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - pAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', - }, - pReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', - }, - }), + name: 'DocumentManifestcontent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + pAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + }, + pReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DocumentManifestcontentpReference_pReference_Union', + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/documentmanifestrelated.schema.js b/src/resources/3_0_1/schemas/documentmanifestrelated.schema.js index 7169f7d7..545eda0c 100644 --- a/src/resources/3_0_1/schemas/documentmanifestrelated.schema.js +++ b/src/resources/3_0_1/schemas/documentmanifestrelated.schema.js @@ -1,26 +1,57 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentManifest.related Schema + * @summary DocumentManifestrelated Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentManifestRelated', - description: - 'Related identifiers or resources associated with the DocumentManifest.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', - }, - ref: { - type: require('./reference.schema'), + name: 'DocumentManifestrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', + }, + ref: { + type: new GraphQLUnionType({ + name: 'DocumentManifestrelatedref_ref_Union', description: 'Related Resource to this DocumentManifest. For example, Order, ProcedureRequest, Procedure, EligibilityRequest, etc.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Related Resource to this DocumentManifest. For example, Order, ProcedureRequest, Procedure, EligibilityRequest, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/documentreference.schema.js b/src/resources/3_0_1/schemas/documentreference.schema.js index 010f5fcd..39e93a6a 100644 --- a/src/resources/3_0_1/schemas/documentreference.schema.js +++ b/src/resources/3_0_1/schemas/documentreference.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DocumentReferenceResourceType = new GraphQLEnumType({ - name: 'DocumentReferenceResourceType', - values: { - DocumentReference: { value: 'DocumentReference' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,120 +18,258 @@ let DocumentReferenceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DocumentReference', - description: 'Base StructureDefinition for DocumentReference Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(DocumentReferenceResourceType), - description: 'Type of this resource.', - }, - masterIdentifier: { - type: require('./identifier.schema'), - description: - 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Other identifiers associated with the document, including version independent identifiers.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of this document reference.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of this document reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composition-status - docStatus: { - type: CodeScalar, - description: 'The status of the underlying document.', - }, - _docStatus: { - type: require('./element.schema'), - description: 'The status of the underlying document.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-classcodes - class: { - type: require('./codeableconcept.schema'), - description: - 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for DocumentReference Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentReference_Enum_schema', + values: { DocumentReference: { value: 'DocumentReference' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + masterIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Other identifiers associated with the document, including version independent identifiers.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this document reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-reference-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document reference.', + }, + _docStatus: { + type: require('./element.schema.js'), + description: 'The status of the underlying document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composition-status + docStatus: { + type: CodeScalar, + description: 'The status of the underlying document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-typecodes + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-doc-classcodes + class: { + type: require('./codeableconcept.schema.js'), + description: + 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'DocumentReferencesubject_subject_Union', description: 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', - }, - created: { - type: DateTimeScalar, - description: 'When the document was created.', - }, - _created: { - type: require('./element.schema'), - description: 'When the document was created.', - }, - indexed: { - type: new GraphQLNonNull(InstantScalar), - description: 'When the document reference was created.', - }, - _indexed: { - type: require('./element.schema'), - description: 'When the document reference was created.', - }, - author: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies who is responsible for adding the information to the document.', - }, - authenticator: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', + }, + _created: { + type: require('./element.schema.js'), + description: 'When the document was created.', + }, + created: { + type: DateTimeScalar, + description: 'When the document was created.', + }, + _indexed: { + type: require('./element.schema.js'), + description: 'When the document reference was created.', + }, + indexed: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the document reference was created.', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentReferenceauthor_author_Union', + description: + 'Identifies who is responsible for adding the information to the document.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'Identifies who is responsible for adding the information to the document.', + }, + authenticator: { + type: new GraphQLUnionType({ + name: 'DocumentReferenceauthenticator_authenticator_Union', description: 'Which person or organization authenticates that this document is valid.', - }, - custodian: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Which person or organization authenticates that this document is valid.', + }, + custodian: { + type: new GraphQLUnionType({ + name: 'DocumentReferencecustodian_custodian_Union', description: 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', - }, - relatesTo: { - type: new GraphQLList(require('./documentreferencerelatesto.schema')), - description: - 'Relationships that this document has with other document references that already exist.', - }, - description: { - type: GraphQLString, - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - _description: { - type: require('./element.schema'), - description: - "Human-readable description of the source document. This is sometimes known as the 'title'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - securityLabel: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", - }, - content: { - type: new GraphQLList( - new GraphQLNonNull(require('./documentreferencecontent.schema')), - ), - description: - 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', - }, - context: { - type: require('./documentreferencecontext.schema'), - description: 'The clinical context in which the document was prepared.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', + }, + relatesTo: { + type: new GraphQLList(require('./documentreferencerelatesto.schema.js')), + description: + 'Relationships that this document has with other document references that already exist.', + }, + _description: { + type: require('./element.schema.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + securityLabel: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentreferencecontent.schema.js')), + ), + description: + 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', + }, + context: { + type: require('./documentreferencecontext.schema.js'), + description: 'The clinical context in which the document was prepared.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/documentreferencecontent.schema.js b/src/resources/3_0_1/schemas/documentreferencecontent.schema.js index e56e915b..c2a773a0 100644 --- a/src/resources/3_0_1/schemas/documentreferencecontent.schema.js +++ b/src/resources/3_0_1/schemas/documentreferencecontent.schema.js @@ -1,27 +1,48 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentReference.content Schema + * @summary DocumentReferencecontent Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentReferenceContent', - description: - 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - attachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The document or URL of the document along with critical metadata to prove content has integrity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/formatcodes - format: { - type: require('./coding.schema'), - description: - 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', - }, - }), + name: 'DocumentReferencecontent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + attachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The document or URL of the document along with critical metadata to prove content has integrity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/formatcodes + format: { + type: require('./coding.schema.js'), + description: + 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/documentreferencecontext.schema.js b/src/resources/3_0_1/schemas/documentreferencecontext.schema.js index 5f207216..0d002fe8 100644 --- a/src/resources/3_0_1/schemas/documentreferencecontext.schema.js +++ b/src/resources/3_0_1/schemas/documentreferencecontext.schema.js @@ -1,54 +1,97 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentReference.context Schema + * @summary DocumentReferencecontext Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentReferenceContext', - description: 'The clinical context in which the document was prepared.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - encounter: { - type: require('./reference.schema'), + name: 'DocumentReferencecontext', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'DocumentReferencecontextencounter_encounter_Union', description: 'Describes the clinical encounter or type of care that the document content is associated with.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode - event: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", - }, - period: { - type: require('./period.schema'), - description: - 'The time period over which the service that is described by the document was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-facilitycodes - facilityType: { - type: require('./codeableconcept.schema'), - description: 'The kind of facility where the patient was seen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - practiceSetting: { - type: require('./codeableconcept.schema'), - description: - 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', - }, - sourcePatientInfo: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Describes the clinical encounter or type of care that the document content is associated with.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActCode + event: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.schema.js'), + description: + 'The time period over which the service that is described by the document was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-facilitycodes + facilityType: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of facility where the patient was seen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + practiceSetting: { + type: require('./codeableconcept.schema.js'), + description: + 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', + }, + sourcePatientInfo: { + type: new GraphQLUnionType({ + name: + 'DocumentReferencecontextsourcePatientInfo_sourcePatientInfo_Union', description: 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', - }, - related: { - type: new GraphQLList( - require('./documentreferencecontextrelated.schema'), - ), - description: - 'Related identifiers or resources associated with the DocumentReference.', - }, - }), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', + }, + related: { + type: new GraphQLList( + require('./documentreferencecontextrelated.schema.js'), + ), + description: + 'Related identifiers or resources associated with the DocumentReference.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/documentreferencecontextrelated.schema.js b/src/resources/3_0_1/schemas/documentreferencecontextrelated.schema.js index a6af4e15..1914ec76 100644 --- a/src/resources/3_0_1/schemas/documentreferencecontextrelated.schema.js +++ b/src/resources/3_0_1/schemas/documentreferencecontextrelated.schema.js @@ -1,26 +1,57 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary DocumentReference.context.related Schema + * @summary DocumentReferencecontextrelated Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentReferenceContextRelated', - description: - 'Related identifiers or resources associated with the DocumentReference.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.', - }, - ref: { - type: require('./reference.schema'), + name: 'DocumentReferencecontextrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.', + }, + ref: { + type: new GraphQLUnionType({ + name: 'DocumentReferencecontextrelatedref_ref_Union', description: 'Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/documentreferencerelatesto.schema.js b/src/resources/3_0_1/schemas/documentreferencerelatesto.schema.js index c8e21bf7..9c9ae97a 100644 --- a/src/resources/3_0_1/schemas/documentreferencerelatesto.schema.js +++ b/src/resources/3_0_1/schemas/documentreferencerelatesto.schema.js @@ -1,32 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary DocumentReference.relatesTo Schema + * @summary DocumentReferencerelatesTo Schema */ module.exports = new GraphQLObjectType({ - name: 'DocumentReferenceRelatesTo', - description: - 'Relationships that this document has with other document references that already exist.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of relationship that this document has with anther document.', - }, - _code: { - type: require('./element.schema'), - description: - 'The type of relationship that this document has with anther document.', - }, - target: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The target document of this relationship.', - }, - }), + name: 'DocumentReferencerelatesTo', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The type of relationship that this document has with anther document.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/document-relationship-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this document has with anther document.', + }, + target: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DocumentReferencerelatesTotarget_target_Union', + description: 'The target document of this relationship.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'The target document of this relationship.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/domainresource.schema.js b/src/resources/3_0_1/schemas/domainresource.schema.js index c1800b55..accc9374 100644 --- a/src/resources/3_0_1/schemas/domainresource.schema.js +++ b/src/resources/3_0_1/schemas/domainresource.schema.js @@ -1,19 +1,13 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let DomainResourceResourceType = new GraphQLEnumType({ - name: 'DomainResourceResourceType', - values: { - DomainResource: { value: 'DomainResource' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,32 +15,70 @@ let DomainResourceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'DomainResource', - description: 'Base StructureDefinition for DomainResource Resource.', - fields: () => - extendSchema(require('./resource.schema'), { - resourceType: { - type: new GraphQLNonNull(DomainResourceResourceType), - description: 'Type of this resource.', - }, - text: { - type: require('./narrative.schema'), - 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(require('./resourcelist.schema')), - 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.schema')), - 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.schema')), - 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.', - }, - }), + description: 'Base StructureDefinition for DomainResource Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DomainResource_Enum_schema', + values: { DomainResource: { value: 'DomainResource' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/dosage.schema.js b/src/resources/3_0_1/schemas/dosage.schema.js index 5d63ec47..18df7464 100644 --- a/src/resources/3_0_1/schemas/dosage.schema.js +++ b/src/resources/3_0_1/schemas/dosage.schema.js @@ -1,122 +1,134 @@ const { - GraphQLObjectType, - GraphQLInt, GraphQLString, GraphQLList, + GraphQLInt, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary Dosage Schema */ module.exports = new GraphQLObjectType({ name: 'Dosage', - description: 'Base StructureDefinition for Dosage Type.', - fields: () => - extendSchema(require('./element.schema'), { - sequence: { - type: GraphQLInt, - description: - 'Indicates the order in which the dosage instructions should be applied or interpreted.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Indicates the order in which the dosage instructions should be applied or interpreted.', - }, - text: { - type: GraphQLString, - description: 'Free text dosage instructions e.g. SIG.', - }, - _text: { - type: require('./element.schema'), - description: 'Free text dosage instructions e.g. SIG.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/additional-instruction-codes - additionalInstruction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: "Supplemental instruction - e.g. 'with meals'.", - }, - patientInstruction: { - type: GraphQLString, - description: - 'Instructions in terms that are understood by the patient or consumer.', - }, - _patientInstruction: { - type: require('./element.schema'), - description: - 'Instructions in terms that are understood by the patient or consumer.', - }, - timing: { - type: require('./timing.schema'), - description: 'When medication should be administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason - asNeededBoolean: { - type: GraphQLBoolean, - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - _asNeededBoolean: { - type: require('./element.schema'), - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason - asNeededCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - site: { - type: require('./codeableconcept.schema'), - description: 'Body site to administer to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.schema'), - description: 'How drug should enter body.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administration-method-codes - method: { - type: require('./codeableconcept.schema'), - description: 'Technique for administering medication.', - }, - doseRange: { - type: require('./range.schema'), - description: 'Amount of medication per dose.', - }, - doseQuantity: { - type: require('./quantity.schema'), - description: 'Amount of medication per dose.', - }, - maxDosePerPeriod: { - type: require('./ratio.schema'), - description: 'Upper limit on medication per unit of time.', - }, - maxDosePerAdministration: { - type: require('./quantity.schema'), - description: 'Upper limit on medication per administration.', - }, - maxDosePerLifetime: { - type: require('./quantity.schema'), - description: 'Upper limit on medication per lifetime of the patient.', - }, - rateRatio: { - type: require('./ratio.schema'), - description: 'Amount of medication per unit of time.', - }, - rateRange: { - type: require('./range.schema'), - description: 'Amount of medication per unit of time.', - }, - rateQuantity: { - type: require('./quantity.schema'), - description: 'Amount of medication per unit of time.', - }, - }), + description: 'Base StructureDefinition for Dosage Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Indicates the order in which the dosage instructions should be applied or interpreted.', + }, + sequence: { + type: GraphQLInt, + description: + 'Indicates the order in which the dosage instructions should be applied or interpreted.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Free text dosage instructions e.g. SIG.', + }, + text: { + type: GraphQLString, + description: 'Free text dosage instructions e.g. SIG.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/additional-instruction-codes + additionalInstruction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: "Supplemental instruction - e.g. 'with meals'.", + }, + _patientInstruction: { + type: require('./element.schema.js'), + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + patientInstruction: { + type: GraphQLString, + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + timing: { + type: require('./timing.schema.js'), + description: 'When medication should be administered.', + }, + _asNeededBoolean: { + type: require('./element.schema.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + asNeededBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + asNeededCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + site: { + type: require('./codeableconcept.schema.js'), + description: 'Body site to administer to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.schema.js'), + description: 'How drug should enter body.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administration-method-codes + method: { + type: require('./codeableconcept.schema.js'), + description: 'Technique for administering medication.', + }, + doseRange: { + type: require('./range.schema.js'), + description: 'Amount of medication per dose.', + }, + doseQuantity: { + type: require('./quantity.schema.js'), + description: 'Amount of medication per dose.', + }, + maxDosePerPeriod: { + type: require('./ratio.schema.js'), + description: 'Upper limit on medication per unit of time.', + }, + maxDosePerAdministration: { + type: require('./quantity.schema.js'), + description: 'Upper limit on medication per administration.', + }, + maxDosePerLifetime: { + type: require('./quantity.schema.js'), + description: 'Upper limit on medication per lifetime of the patient.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: 'Amount of medication per unit of time.', + }, + rateRange: { + type: require('./range.schema.js'), + description: 'Amount of medication per unit of time.', + }, + rateQuantity: { + type: require('./quantity.schema.js'), + description: 'Amount of medication per unit of time.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/duration.schema.js b/src/resources/3_0_1/schemas/duration.schema.js index a9dfee44..848ca6de 100644 --- a/src/resources/3_0_1/schemas/duration.schema.js +++ b/src/resources/3_0_1/schemas/duration.schema.js @@ -1,6 +1,11 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Duration', - description: 'Base StructureDefinition for Duration Type.', - fields: () => extendSchema(require('./quantity.schema')), + description: 'Base StructureDefinition for Duration Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/element.schema.js b/src/resources/3_0_1/schemas/element.schema.js index 471529cb..ba184adb 100644 --- a/src/resources/3_0_1/schemas/element.schema.js +++ b/src/resources/3_0_1/schemas/element.schema.js @@ -1,6 +1,4 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports @@ -8,23 +6,22 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Element', - description: 'Base StructureDefinition for Element Type.', - fields: () => - extendSchema({ - id: { - type: GraphQLString, - description: - 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', - }, - _id: { - type: require('./element.schema'), - description: - 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', - }, - extension: { - type: new GraphQLList(require('./extension.schema')), - description: - 'May be used to represent additional information that is not part of the basic definition of the element. 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.', - }, - }), + description: 'Base StructureDefinition for Element Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinition.schema.js b/src/resources/3_0_1/schemas/elementdefinition.schema.js index dce9d500..e2ca25be 100644 --- a/src/resources/3_0_1/schemas/elementdefinition.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinition.schema.js @@ -1,25 +1,24 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports @@ -27,1220 +26,1234 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'ElementDefinition', - description: 'Base StructureDefinition for ElementDefinition Type.', - fields: () => - extendSchema(require('./element.schema'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", - }, - _path: { - type: require('./element.schema'), - description: - "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/property-representation - representation: { - type: new GraphQLList(CodeScalar), - description: - 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', - }, - _representation: { - type: require('./element.schema'), - description: - 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', - }, - sliceName: { - type: GraphQLString, - description: - 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', - }, - _sliceName: { - type: require('./element.schema'), - description: - 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', - }, - label: { - type: GraphQLString, - description: - 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', - }, - _label: { - type: require('./element.schema'), - description: - 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A code that has the same meaning as the element in a particular terminology.', - }, - slicing: { - type: require('./elementdefinitionslicing.schema'), - description: - 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', - }, - short: { - type: GraphQLString, - description: - 'A concise description of what this element means (e.g. for use in autogenerated summaries).', - }, - _short: { - type: require('./element.schema'), - description: - 'A concise description of what this element means (e.g. for use in autogenerated summaries).', - }, - definition: { - type: GraphQLString, - description: - 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', - }, - _definition: { - type: require('./element.schema'), - description: - 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', - }, - comment: { - type: GraphQLString, - description: - 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', - }, - requirements: { - type: GraphQLString, - description: - 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', - }, - _requirements: { - type: require('./element.schema'), - description: - 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', - }, - alias: { - type: new GraphQLList(GraphQLString), - description: - 'Identifies additional names by which this element might also be known.', - }, - _alias: { - type: require('./element.schema'), - description: - 'Identifies additional names by which this element might also be known.', - }, - min: { - type: UnsignedIntScalar, - description: - 'The minimum number of times this element SHALL appear in the instance.', - }, - _min: { - type: require('./element.schema'), - description: - 'The minimum number of times this element SHALL appear in the instance.', - }, - max: { - type: GraphQLString, - description: - 'The maximum number of times this element is permitted to appear in the instance.', - }, - _max: { - type: require('./element.schema'), - description: - 'The maximum number of times this element is permitted to appear in the instance.', - }, - base: { - type: require('./elementdefinitionbase.schema'), - description: - 'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.', - }, - contentReference: { - type: UriScalar, - description: - 'Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.', - }, - _contentReference: { - type: require('./element.schema'), - description: - 'Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.', - }, - type: { - type: new GraphQLList(require('./elementdefinitiontype.schema')), - description: - 'The data type or resource that the value of this element is permitted to be.', - }, - defaultValueBase64Binary: { - type: Base64BinaryScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueBase64Binary: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueBoolean: { - type: GraphQLBoolean, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueBoolean: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCode: { - type: CodeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueCode: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDate: { - type: DateScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDate: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDateTime: { - type: DateTimeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDateTime: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDecimal: { - type: GraphQLFloat, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueDecimal: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueId: { - type: IdScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueId: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueInstant: { - type: InstantScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueInstant: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueInteger: { - type: GraphQLInt, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueInteger: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMarkdown: { - type: GraphQLString, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueMarkdown: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueOid: { - type: OidScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueOid: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValuePositiveInt: { - type: PositiveIntScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValuePositiveInt: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueString: { - type: GraphQLString, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueString: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueTime: { - type: TimeScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueTime: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueUnsignedInt: { - type: UnsignedIntScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueUnsignedInt: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueUri: { - type: UriScalar, - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - _defaultValueUri: { - type: require('./element.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAddress: { - type: require('./address.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAge: { - type: require('./age.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAnnotation: { - type: require('./annotation.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueAttachment: { - type: require('./attachment.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCoding: { - type: require('./coding.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueContactPoint: { - type: require('./contactpoint.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueCount: { - type: require('./count.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDistance: { - type: require('./distance.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueDuration: { - type: require('./duration.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueHumanName: { - type: require('./humanname.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueIdentifier: { - type: require('./identifier.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMoney: { - type: require('./money.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValuePeriod: { - type: require('./period.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueQuantity: { - type: require('./quantity.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueRange: { - type: require('./range.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueRatio: { - type: require('./ratio.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueReference: { - type: require('./reference.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueSampledData: { - type: require('./sampleddata.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueSignature: { - type: require('./signature.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueTiming: { - type: require('./timing.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - defaultValueMeta: { - type: require('./meta.schema'), - description: - "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", - }, - meaningWhenMissing: { - type: GraphQLString, - description: - "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", - }, - _meaningWhenMissing: { - type: require('./element.schema'), - description: - "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", - }, - orderMeaning: { - type: GraphQLString, - description: - 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', - }, - _orderMeaning: { - type: require('./element.schema'), - description: - 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', - }, - fixedBase64Binary: { - type: Base64BinaryScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedBase64Binary: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedBoolean: { - type: GraphQLBoolean, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedBoolean: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCode: { - type: CodeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedCode: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDate: { - type: DateScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDate: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDateTime: { - type: DateTimeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDateTime: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDecimal: { - type: GraphQLFloat, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedDecimal: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedId: { - type: IdScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedId: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedInstant: { - type: InstantScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedInstant: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedInteger: { - type: GraphQLInt, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedInteger: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMarkdown: { - type: GraphQLString, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedMarkdown: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedOid: { - type: OidScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedOid: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedPositiveInt: { - type: PositiveIntScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedPositiveInt: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedString: { - type: GraphQLString, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedString: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedTime: { - type: TimeScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedTime: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedUnsignedInt: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedUri: { - type: UriScalar, - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - _fixedUri: { - type: require('./element.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAddress: { - type: require('./address.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAge: { - type: require('./age.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAnnotation: { - type: require('./annotation.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedAttachment: { - type: require('./attachment.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCoding: { - type: require('./coding.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedContactPoint: { - type: require('./contactpoint.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedCount: { - type: require('./count.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDistance: { - type: require('./distance.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedDuration: { - type: require('./duration.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedHumanName: { - type: require('./humanname.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedIdentifier: { - type: require('./identifier.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMoney: { - type: require('./money.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedPeriod: { - type: require('./period.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedQuantity: { - type: require('./quantity.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedRange: { - type: require('./range.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedRatio: { - type: require('./ratio.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedReference: { - type: require('./reference.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedSampledData: { - type: require('./sampleddata.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedSignature: { - type: require('./signature.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedTiming: { - type: require('./timing.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - fixedMeta: { - type: require('./meta.schema'), - description: - 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', - }, - patternBase64Binary: { - type: Base64BinaryScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternBase64Binary: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternBoolean: { - type: GraphQLBoolean, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternBoolean: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCode: { - type: CodeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternCode: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDate: { - type: DateScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDate: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDateTime: { - type: DateTimeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDateTime: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDecimal: { - type: GraphQLFloat, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternDecimal: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternId: { - type: IdScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternId: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternInstant: { - type: InstantScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternInstant: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternInteger: { - type: GraphQLInt, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternInteger: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMarkdown: { - type: GraphQLString, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternMarkdown: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternOid: { - type: OidScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternOid: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternPositiveInt: { - type: PositiveIntScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternPositiveInt: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternString: { - type: GraphQLString, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternString: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternTime: { - type: TimeScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternTime: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternUnsignedInt: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternUri: { - type: UriScalar, - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - _patternUri: { - type: require('./element.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAddress: { - type: require('./address.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAge: { - type: require('./age.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAnnotation: { - type: require('./annotation.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternAttachment: { - type: require('./attachment.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCoding: { - type: require('./coding.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternContactPoint: { - type: require('./contactpoint.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternCount: { - type: require('./count.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDistance: { - type: require('./distance.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternDuration: { - type: require('./duration.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternHumanName: { - type: require('./humanname.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternIdentifier: { - type: require('./identifier.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMoney: { - type: require('./money.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternPeriod: { - type: require('./period.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternQuantity: { - type: require('./quantity.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternRange: { - type: require('./range.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternRatio: { - type: require('./ratio.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternReference: { - type: require('./reference.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternSampledData: { - type: require('./sampleddata.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternSignature: { - type: require('./signature.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternTiming: { - type: require('./timing.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - patternMeta: { - type: require('./meta.schema'), - description: - 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', - }, - example: { - type: new GraphQLList(require('./elementdefinitionexample.schema')), - description: - 'A sample value for this element demonstrating the type of information that would typically be found in the element.', - }, - minValueDate: { - type: DateScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDate: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDateTime: { - type: DateTimeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDateTime: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueInstant: { - type: InstantScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueInstant: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueTime: { - type: TimeScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueTime: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueDecimal: { - type: GraphQLFloat, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueDecimal: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueInteger: { - type: GraphQLInt, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueInteger: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValuePositiveInt: { - type: PositiveIntScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValuePositiveInt: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _minValueUnsignedInt: { - type: require('./element.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - minValueQuantity: { - type: require('./quantity.schema'), - description: - 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDate: { - type: DateScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDate: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDateTime: { - type: DateTimeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDateTime: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueInstant: { - type: InstantScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueInstant: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueTime: { - type: TimeScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueTime: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueDecimal: { - type: GraphQLFloat, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueDecimal: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueInteger: { - type: GraphQLInt, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueInteger: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValuePositiveInt: { - type: PositiveIntScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValuePositiveInt: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - _maxValueUnsignedInt: { - type: require('./element.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxValueQuantity: { - type: require('./quantity.schema'), - description: - 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', - }, - maxLength: { - type: GraphQLInt, - description: - 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', - }, - _maxLength: { - type: require('./element.schema'), - description: - 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', - }, - condition: { - type: new GraphQLList(IdScalar), - description: - 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', - }, - _condition: { - type: require('./element.schema'), - description: - 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', - }, - constraint: { - type: new GraphQLList(require('./elementdefinitionconstraint.schema')), - description: - 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', - }, - mustSupport: { - type: GraphQLBoolean, - description: - "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", - }, - _mustSupport: { - type: require('./element.schema'), - description: - "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", - }, - isModifier: { - type: GraphQLBoolean, - description: - 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', - }, - _isModifier: { - type: require('./element.schema'), - description: - 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', - }, - isSummary: { - type: GraphQLBoolean, - description: - 'Whether the element should be included if a client requests a search with the parameter _summary=true.', - }, - _isSummary: { - type: require('./element.schema'), - description: - 'Whether the element should be included if a client requests a search with the parameter _summary=true.', - }, - binding: { - type: require('./elementdefinitionbinding.schema'), - description: - 'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).', - }, - mapping: { - type: new GraphQLList(require('./elementdefinitionmapping.schema')), - description: - 'Identifies a concept from an external specification that roughly corresponds to this element.', - }, - }), + description: 'Base StructureDefinition for ElementDefinition Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _path: { + type: require('./element.schema.js'), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + _representation: { + type: require('./element.schema.js'), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/property-representation + representation: { + type: new GraphQLList(CodeScalar), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + _sliceName: { + type: require('./element.schema.js'), + description: + 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', + }, + sliceName: { + type: GraphQLString, + description: + 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + label: { + type: GraphQLString, + description: + 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A code that has the same meaning as the element in a particular terminology.', + }, + slicing: { + type: require('./element.schema.js'), + description: + 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', + }, + _short: { + type: require('./element.schema.js'), + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + short: { + type: GraphQLString, + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', + }, + definition: { + type: GraphQLString, + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', + }, + comment: { + type: GraphQLString, + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + requirements: { + type: GraphQLString, + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'Identifies additional names by which this element might also be known.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies additional names by which this element might also be known.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + min: { + type: UnsignedIntScalar, + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + base: { + type: require('./element.schema.js'), + description: + 'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.', + }, + _contentReference: { + type: require('./element.schema.js'), + description: + 'Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.', + }, + contentReference: { + type: UriScalar, + description: + 'Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.', + }, + type: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'The data type or resource that the value of this element is permitted to be.', + }, + _defaultValueBase64Binary: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueBoolean: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueCode: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCode: { + type: CodeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDate: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDate: { + type: DateScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDateTime: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDecimal: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueId: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueId: { + type: IdScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInstant: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInstant: { + type: InstantScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInteger: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInteger: { + type: GraphQLInt, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueMarkdown: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueOid: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueOid: { + type: OidScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValuePositiveInt: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueString: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueString: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueTime: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTime: { + type: TimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUnsignedInt: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUri: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUri: { + type: UriScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAddress: { + type: require('./address.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAge: { + type: require('./age.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAnnotation: { + type: require('./annotation.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAttachment: { + type: require('./attachment.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCoding: { + type: require('./coding.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCount: { + type: require('./count.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDistance: { + type: require('./distance.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDuration: { + type: require('./duration.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueHumanName: { + type: require('./humanname.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueIdentifier: { + type: require('./identifier.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMoney: { + type: require('./money.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePeriod: { + type: require('./period.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueQuantity: { + type: require('./quantity.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRange: { + type: require('./range.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRatio: { + type: require('./ratio.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueReference: { + type: require('./resourcelist.schema'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSampledData: { + type: require('./sampleddata.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSignature: { + type: require('./signature.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTiming: { + type: require('./timing.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMeta: { + type: require('./meta.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _meaningWhenMissing: { + type: require('./element.schema.js'), + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", + }, + meaningWhenMissing: { + type: GraphQLString, + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", + }, + _orderMeaning: { + type: require('./element.schema.js'), + description: + 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', + }, + orderMeaning: { + type: GraphQLString, + description: + 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', + }, + _fixedBase64Binary: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedBoolean: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedCode: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCode: { + type: CodeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDate: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDate: { + type: DateScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDateTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDecimal: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedId: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedId: { + type: IdScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInstant: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInstant: { + type: InstantScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInteger: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInteger: { + type: GraphQLInt, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedMarkdown: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedOid: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedOid: { + type: OidScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedPositiveInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedString: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedString: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTime: { + type: TimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUri: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUri: { + type: UriScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAddress: { + type: require('./address.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAge: { + type: require('./age.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAttachment: { + type: require('./attachment.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCoding: { + type: require('./coding.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCount: { + type: require('./count.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDistance: { + type: require('./distance.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDuration: { + type: require('./duration.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedHumanName: { + type: require('./humanname.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMoney: { + type: require('./money.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPeriod: { + type: require('./period.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedQuantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRange: { + type: require('./range.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRatio: { + type: require('./ratio.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedReference: { + type: require('./resourcelist.schema'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSignature: { + type: require('./signature.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTiming: { + type: require('./timing.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMeta: { + type: require('./meta.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _patternBase64Binary: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternBoolean: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternCode: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCode: { + type: CodeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDate: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDate: { + type: DateScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDateTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternDecimal: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternId: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternId: { + type: IdScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternInstant: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternInstant: { + type: InstantScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternInteger: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternInteger: { + type: GraphQLInt, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternMarkdown: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternOid: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternOid: { + type: OidScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternPositiveInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternString: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternString: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternTime: { + type: TimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + _patternUri: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternUri: { + type: UriScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAddress: { + type: require('./address.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAge: { + type: require('./age.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternAttachment: { + type: require('./attachment.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCoding: { + type: require('./coding.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternCount: { + type: require('./count.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDistance: { + type: require('./distance.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternDuration: { + type: require('./duration.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternHumanName: { + type: require('./humanname.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMoney: { + type: require('./money.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternPeriod: { + type: require('./period.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternQuantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternRange: { + type: require('./range.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternRatio: { + type: require('./ratio.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternReference: { + type: require('./resourcelist.schema'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternSignature: { + type: require('./signature.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternTiming: { + type: require('./timing.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + patternMeta: { + type: require('./meta.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. The values of elements present in the pattern must match exactly (case-sensitive, accent-sensitive, etc.).', + }, + example: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'A sample value for this element demonstrating the type of information that would typically be found in the element.', + }, + _minValueDate: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDate: { + type: DateScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDateTime: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDateTime: { + type: DateTimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInstant: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInstant: { + type: InstantScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueTime: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueTime: { + type: TimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDecimal: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDecimal: { + type: GraphQLFloat, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInteger: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInteger: { + type: GraphQLInt, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValuePositiveInt: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDate: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDate: { + type: DateScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDateTime: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDateTime: { + type: DateTimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInstant: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInstant: { + type: InstantScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueTime: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueTime: { + type: TimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDecimal: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDecimal: { + type: GraphQLFloat, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInteger: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInteger: { + type: GraphQLInt, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValuePositiveInt: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxLength: { + type: require('./element.schema.js'), + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + maxLength: { + type: GraphQLInt, + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + _condition: { + type: require('./element.schema.js'), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + condition: { + type: new GraphQLList(IdScalar), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + constraint: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', + }, + _mustSupport: { + type: require('./element.schema.js'), + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", + }, + mustSupport: { + type: GraphQLBoolean, + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported.", + }, + _isModifier: { + type: require('./element.schema.js'), + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + isModifier: { + type: GraphQLBoolean, + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + _isSummary: { + type: require('./element.schema.js'), + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + isSummary: { + type: GraphQLBoolean, + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + binding: { + type: require('./element.schema.js'), + description: + 'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).', + }, + mapping: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Identifies a concept from an external specification that roughly corresponds to this element.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinitionbase.schema.js b/src/resources/3_0_1/schemas/elementdefinitionbase.schema.js index 467fadd9..8fdbe94d 100644 --- a/src/resources/3_0_1/schemas/elementdefinitionbase.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinitionbase.schema.js @@ -1,47 +1,63 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary ElementDefinition.base Schema + * @summary ElementDefinitionbase Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionBase', - description: - 'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is provided when the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot.', - fields: () => - extendSchema(require('./element.schema'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', - }, - _path: { - type: require('./element.schema'), - description: - 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', - }, - min: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: - 'Minimum cardinality of the base element identified by the path.', - }, - _min: { - type: require('./element.schema'), - description: - 'Minimum cardinality of the base element identified by the path.', - }, - max: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Maximum cardinality of the base element identified by the path.', - }, - _max: { - type: require('./element.schema'), - description: - 'Maximum cardinality of the base element identified by the path.', - }, - }), + name: 'ElementDefinitionbase', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + min: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinitionbinding.schema.js b/src/resources/3_0_1/schemas/elementdefinitionbinding.schema.js index 06e556a9..b407c7d3 100644 --- a/src/resources/3_0_1/schemas/elementdefinitionbinding.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinitionbinding.schema.js @@ -1,54 +1,82 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.binding Schema + * @summary ElementDefinitionbinding Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionBinding', - description: - 'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/binding-strength - strength: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - _strength: { - type: require('./element.schema'), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - description: { - type: GraphQLString, - description: - 'Describes the intended use of this particular set of codes.', - }, - _description: { - type: require('./element.schema'), - description: - 'Describes the intended use of this particular set of codes.', - }, - valueSetUri: { - type: UriScalar, - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', - }, - _valueSetUri: { - type: require('./element.schema'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', - }, - valueSetReference: { - type: require('./reference.schema'), + name: 'ElementDefinitionbinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _strength: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/binding-strength + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Describes the intended use of this particular set of codes.', + }, + description: { + type: GraphQLString, + description: + 'Describes the intended use of this particular set of codes.', + }, + _valueSetUri: { + type: require('./element.schema.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', + }, + valueSetUri: { + type: UriScalar, + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', + }, + valueSetReference: { + type: new GraphQLUnionType({ + name: + 'ElementDefinitionbindingvalueSetReference_valueSetReference_Union', description: 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', - }, - }), + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. If the binding refers to an explicit value set - the normal case - then use a Reference(ValueSet) preferably containing the canonical URL for the value set. If the reference is to an implicit value set - usually, an IETF RFC that defines a grammar, such as mime types - then use a uri.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinitionconstraint.schema.js b/src/resources/3_0_1/schemas/elementdefinitionconstraint.schema.js index fefe2199..5df09703 100644 --- a/src/resources/3_0_1/schemas/elementdefinitionconstraint.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinitionconstraint.schema.js @@ -1,90 +1,106 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.constraint Schema + * @summary ElementDefinitionconstraint Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionConstraint', - description: - 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', - fields: () => - extendSchema(require('./element.schema'), { - key: { - type: new GraphQLNonNull(IdScalar), - description: - 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', - }, - _key: { - type: require('./element.schema'), - description: - 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', - }, - requirements: { - type: GraphQLString, - description: - 'Description of why this constraint is necessary or appropriate.', - }, - _requirements: { - type: require('./element.schema'), - description: - 'Description of why this constraint is necessary or appropriate.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/constraint-severity - severity: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the impact constraint violation has on the conformance of the instance.', - }, - _severity: { - type: require('./element.schema'), - description: - 'Identifies the impact constraint violation has on the conformance of the instance.', - }, - human: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', - }, - _human: { - type: require('./element.schema'), - description: - 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', - }, - expression: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.', - }, - _expression: { - type: require('./element.schema'), - description: - 'A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.', - }, - xpath: { - type: GraphQLString, - description: - 'An XPath expression of constraint that can be executed to see if this constraint is met.', - }, - _xpath: { - type: require('./element.schema'), - description: - 'An XPath expression of constraint that can be executed to see if this constraint is met.', - }, - source: { - type: UriScalar, - description: - 'A reference to the original source of the constraint, for traceability purposes.', - }, - _source: { - type: require('./element.schema'), - description: - 'A reference to the original source of the constraint, for traceability purposes.', - }, - }), + name: 'ElementDefinitionconstraint', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _key: { + type: require('./element.schema.js'), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + key: { + type: new GraphQLNonNull(IdScalar), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'Description of why this constraint is necessary or appropriate.', + }, + requirements: { + type: GraphQLString, + description: + 'Description of why this constraint is necessary or appropriate.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/constraint-severity + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + _human: { + type: require('./element.schema.js'), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + human: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.', + }, + expression: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A [FHIRPath](http://hl7.org/fluentpath) expression of constraint that can be executed to see if this constraint is met.', + }, + _xpath: { + type: require('./element.schema.js'), + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + _source: { + type: require('./element.schema.js'), + description: + 'A reference to the original source of the constraint, for traceability purposes.', + }, + source: { + type: UriScalar, + description: + 'A reference to the original source of the constraint, for traceability purposes.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinitionexample.schema.js b/src/resources/3_0_1/schemas/elementdefinitionexample.schema.js index a645e4b2..676765d6 100644 --- a/src/resources/3_0_1/schemas/elementdefinitionexample.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinitionexample.schema.js @@ -1,314 +1,327 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ElementDefinition.example Schema + * @summary ElementDefinitionexample Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionExample', - description: - 'A sample value for this element demonstrating the type of information that would typically be found in the element.', - fields: () => - extendSchema(require('./element.schema'), { - label: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Describes the purpose of this example amoung the set of examples.', - }, - _label: { - type: require('./element.schema'), - description: - 'Describes the purpose of this example amoung the set of examples.', - }, - valueBase64Binary: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueBase64Binary: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueCode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueCode: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDate: { - type: new GraphQLNonNull(DateScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueDate: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDecimal: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueId: { - type: new GraphQLNonNull(IdScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueId: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueInstant: { - type: new GraphQLNonNull(InstantScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueInstant: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueInteger: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueMarkdown: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueMarkdown: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueOid: { - type: new GraphQLNonNull(OidScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueOid: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valuePositiveInt: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valuePositiveInt: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueTime: { - type: new GraphQLNonNull(TimeScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueUnsignedInt: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueUnsignedInt: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - _valueUri: { - type: require('./element.schema'), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueAddress: { - type: new GraphQLNonNull(require('./address.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueAge: { - type: new GraphQLNonNull(require('./age.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueAnnotation: { - type: new GraphQLNonNull(require('./annotation.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueCoding: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueContactPoint: { - type: new GraphQLNonNull(require('./contactpoint.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueCount: { - type: new GraphQLNonNull(require('./count.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDistance: { - type: new GraphQLNonNull(require('./distance.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueDuration: { - type: new GraphQLNonNull(require('./duration.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueHumanName: { - type: new GraphQLNonNull(require('./humanname.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueIdentifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueMoney: { - type: new GraphQLNonNull(require('./money.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valuePeriod: { - type: new GraphQLNonNull(require('./period.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueRange: { - type: new GraphQLNonNull(require('./range.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueRatio: { - type: new GraphQLNonNull(require('./ratio.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueSampledData: { - type: new GraphQLNonNull(require('./sampleddata.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueSignature: { - type: new GraphQLNonNull(require('./signature.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueTiming: { - type: new GraphQLNonNull(require('./timing.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - valueMeta: { - type: new GraphQLNonNull(require('./meta.schema')), - description: - 'The actual value for the element, which must be one of the types allowed for this element.', - }, - }), + name: 'ElementDefinitionexample', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'Describes the purpose of this example amoung the set of examples.', + }, + label: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Describes the purpose of this example amoung the set of examples.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueId: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueReference: { + type: new GraphQLNonNull(require('./resourcelist.schema')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMeta: { + type: new GraphQLNonNull(require('./meta.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinitionmapping.schema.js b/src/resources/3_0_1/schemas/elementdefinitionmapping.schema.js index 18a41991..6c200dc8 100644 --- a/src/resources/3_0_1/schemas/elementdefinitionmapping.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinitionmapping.schema.js @@ -1,56 +1,72 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.mapping Schema + * @summary ElementDefinitionmapping Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionMapping', - description: - 'Identifies a concept from an external specification that roughly corresponds to this element.', - fields: () => - extendSchema(require('./element.schema'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: 'An internal reference to the definition of a mapping.', - }, - _identity: { - type: require('./element.schema'), - description: 'An internal reference to the definition of a mapping.', - }, - language: { - type: CodeScalar, - description: - 'Identifies the computable language in which mapping.map is expressed.', - }, - _language: { - type: require('./element.schema'), - description: - 'Identifies the computable language in which mapping.map is expressed.', - }, - map: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Expresses what part of the target specification corresponds to this element.', - }, - _map: { - type: require('./element.schema'), - description: - 'Expresses what part of the target specification corresponds to this element.', - }, - comment: { - type: GraphQLString, - description: - 'Comments that provide information about the mapping or its use.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Comments that provide information about the mapping or its use.', - }, - }), + name: 'ElementDefinitionmapping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _identity: { + type: require('./element.schema.js'), + description: 'An internal reference to the definition of a mapping.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: 'An internal reference to the definition of a mapping.', + }, + _language: { + type: require('./element.schema.js'), + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + language: { + type: CodeScalar, + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + _map: { + type: require('./element.schema.js'), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + map: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments that provide information about the mapping or its use.', + }, + comment: { + type: GraphQLString, + description: + 'Comments that provide information about the mapping or its use.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinitionslicing.schema.js b/src/resources/3_0_1/schemas/elementdefinitionslicing.schema.js index 8812c61d..79a37958 100644 --- a/src/resources/3_0_1/schemas/elementdefinitionslicing.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinitionslicing.schema.js @@ -1,61 +1,70 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLList, GraphQLString, + GraphQLList, GraphQLBoolean, GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.slicing Schema + * @summary ElementDefinitionslicing Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionSlicing', - description: - 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', - fields: () => - extendSchema(require('./element.schema'), { - discriminator: { - type: new GraphQLList( - require('./elementdefinitionslicingdiscriminator.schema'), - ), - description: - 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', - }, - description: { - type: GraphQLString, - description: - 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', - }, - _description: { - type: require('./element.schema'), - description: - 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', - }, - ordered: { - type: GraphQLBoolean, - description: - 'If the matching elements have to occur in the same order as defined in the profile.', - }, - _ordered: { - type: require('./element.schema'), - description: - 'If the matching elements have to occur in the same order as defined in the profile.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-slicing-rules - rules: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', - }, - _rules: { - type: require('./element.schema'), - description: - 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', - }, - }), + name: 'ElementDefinitionslicing', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + discriminator: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + description: { + type: GraphQLString, + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + _ordered: { + type: require('./element.schema.js'), + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + ordered: { + type: GraphQLBoolean, + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + _rules: { + type: require('./element.schema.js'), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-slicing-rules + rules: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinitionslicingdiscriminator.schema.js b/src/resources/3_0_1/schemas/elementdefinitionslicingdiscriminator.schema.js index 76a397c2..b4d80818 100644 --- a/src/resources/3_0_1/schemas/elementdefinitionslicingdiscriminator.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinitionslicingdiscriminator.schema.js @@ -1,38 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.slicing.discriminator Schema + * @summary ElementDefinitionslicingdiscriminator Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionSlicingDiscriminator', - description: - 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/discriminator-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the element value is interpreted when discrimination is evaluated.', - }, - _type: { - type: require('./element.schema'), - description: - 'How the element value is interpreted when discrimination is evaluated.', - }, - path: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.', - }, - _path: { - type: require('./element.schema'), - description: - 'A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.', - }, - }), + name: 'ElementDefinitionslicingdiscriminator', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'How the element value is interpreted when discrimination is evaluated.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/discriminator-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the element value is interpreted when discrimination is evaluated.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A FHIRPath expression, using a restricted subset of FHIRPath, that is used to identify the element on which discrimination is based.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/elementdefinitiontype.schema.js b/src/resources/3_0_1/schemas/elementdefinitiontype.schema.js index b1da002a..b156dcb9 100644 --- a/src/resources/3_0_1/schemas/elementdefinitiontype.schema.js +++ b/src/resources/3_0_1/schemas/elementdefinitiontype.schema.js @@ -1,71 +1,87 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ElementDefinition.type Schema + * @summary ElementDefinitiontype Schema */ module.exports = new GraphQLObjectType({ - name: 'ElementDefinitionType', - description: - 'The data type or resource that the value of this element is permitted to be.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - code: { - type: new GraphQLNonNull(UriScalar), - description: - "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", - }, - _code: { - type: require('./element.schema'), - description: - "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", - }, - profile: { - type: UriScalar, - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - _profile: { - type: require('./element.schema'), - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - targetProfile: { - type: UriScalar, - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - _targetProfile: { - type: require('./element.schema'), - description: - 'Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-aggregation-mode - aggregation: { - type: new GraphQLList(CodeScalar), - description: - 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', - }, - _aggregation: { - type: require('./element.schema'), - description: - 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reference-version-rules - versioning: { - type: CodeScalar, - description: - 'Whether this reference needs to be version specific or version independent, or whether either can be used.', - }, - _versioning: { - type: require('./element.schema'), - description: - 'Whether this reference needs to be version specific or version independent, or whether either can be used.', - }, - }), + name: 'ElementDefinitiontype', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + code: { + type: new GraphQLNonNull(UriScalar), + description: + "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + _profile: { + type: require('./element.schema.js'), + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + profile: { + type: UriScalar, + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for the datatype this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + _targetProfile: { + type: require('./element.schema.js'), + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + targetProfile: { + type: UriScalar, + description: + 'Identifies a profile structure or implementation Guide that SHALL hold for the target of the reference this element refers to. Can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.', + }, + _aggregation: { + type: require('./element.schema.js'), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-aggregation-mode + aggregation: { + type: new GraphQLList(CodeScalar), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + _versioning: { + type: require('./element.schema.js'), + description: + 'Whether this reference needs to be version specific or version independent, or whether either can be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reference-version-rules + versioning: { + type: CodeScalar, + description: + 'Whether this reference needs to be version specific or version independent, or whether either can be used.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/eligibilityrequest.schema.js b/src/resources/3_0_1/schemas/eligibilityrequest.schema.js index b251ca17..b8f42019 100644 --- a/src/resources/3_0_1/schemas/eligibilityrequest.schema.js +++ b/src/resources/3_0_1/schemas/eligibilityrequest.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EligibilityRequestResourceType = new GraphQLEnumType({ - name: 'EligibilityRequestResourceType', - values: { - EligibilityRequest: { value: 'EligibilityRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,107 +18,231 @@ let EligibilityRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EligibilityRequest', - description: 'Base StructureDefinition for EligibilityRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EligibilityRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-priority - priority: { - type: require('./codeableconcept.schema'), - description: - 'Immediate (STAT), best effort (NORMAL), deferred (DEFER).', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EligibilityRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EligibilityRequest_Enum_schema', + values: { EligibilityRequest: { value: 'EligibilityRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-priority + priority: { + type: require('./codeableconcept.schema.js'), + description: 'Immediate (STAT), best effort (NORMAL), deferred (DEFER).', + }, + patient: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestpatient_patient_Union', description: 'Patient Resource.', - }, - servicedDate: { - type: DateScalar, - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - _servicedDate: { - type: require('./element.schema'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - servicedPeriod: { - type: require('./period.schema'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when this resource was created.', - }, - enterer: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Patient Resource.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestenterer_enterer_Union', description: 'Person who created the invoice/claim/pre-determination or pre-authorization.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Person who created the invoice/claim/pre-determination or pre-authorization.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestprovider_provider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestorganization_organization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - insurer: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + insurer: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestinsurer_insurer_Union', description: 'The Insurer who is target of the request.', - }, - facility: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + facility: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestfacility_facility_Union', description: 'Facility where the services were provided.', - }, - coverage: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Facility where the services were provided.', + }, + coverage: { + type: new GraphQLUnionType({ + name: 'EligibilityRequestcoverage_coverage_Union', description: 'Financial instrument by which payment information for health care.', - }, - businessArrangement: { - type: GraphQLString, - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - _businessArrangement: { - type: require('./element.schema'), - description: - 'The contract number of a business agreement which describes the terms and conditions.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-category - benefitCategory: { - type: require('./codeableconcept.schema'), - description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - benefitSubCategory: { - type: require('./codeableconcept.schema'), - description: - 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', - }, - }), + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + description: + 'Financial instrument by which payment information for health care.', + }, + _businessArrangement: { + type: require('./element.schema.js'), + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'The contract number of a business agreement which describes the terms and conditions.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-category + benefitCategory: { + type: require('./codeableconcept.schema.js'), + description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + benefitSubCategory: { + type: require('./codeableconcept.schema.js'), + description: + 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/eligibilityresponse.schema.js b/src/resources/3_0_1/schemas/eligibilityresponse.schema.js index 32fccfb5..2008efee 100644 --- a/src/resources/3_0_1/schemas/eligibilityresponse.schema.js +++ b/src/resources/3_0_1/schemas/eligibilityresponse.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EligibilityResponseResourceType = new GraphQLEnumType({ - name: 'EligibilityResponseResourceType', - values: { - EligibilityResponse: { value: 'EligibilityResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,90 +18,189 @@ let EligibilityResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EligibilityResponse', - description: 'Base StructureDefinition for EligibilityResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EligibilityResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - requestProvider: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EligibilityResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EligibilityResponse_Enum_schema', + values: { EligibilityResponse: { value: 'EligibilityResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'EligibilityResponserequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: + 'EligibilityResponserequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - request: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + request: { + type: new GraphQLUnionType({ + name: 'EligibilityResponserequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - insurer: { - type: require('./reference.schema'), + types: () => [require('./eligibilityrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EligibilityRequest') { + return require('./eligibilityrequest.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + insurer: { + type: new GraphQLUnionType({ + name: 'EligibilityResponseinsurer_insurer_Union', description: 'The Insurer who produced this adjudicated response.', - }, - inforce: { - type: GraphQLBoolean, - description: - 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', - }, - _inforce: { - type: require('./element.schema'), - description: - 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', - }, - insurance: { - type: new GraphQLList(require('./eligibilityresponseinsurance.schema')), - description: - 'The insurer may provide both the details for the requested coverage as well as details for additional coverages known to the insurer.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.schema'), - description: 'The form to be used for printing the content.', - }, - error: { - type: new GraphQLList(require('./eligibilityresponseerror.schema')), - description: 'Mutually exclusive with Services Provided (Item).', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + _inforce: { + type: require('./element.schema.js'), + description: + 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', + }, + inforce: { + type: GraphQLBoolean, + description: + 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', + }, + insurance: { + type: new GraphQLList( + require('./eligibilityresponseinsurance.schema.js'), + ), + description: + 'The insurer may provide both the details for the requested coverage as well as details for additional coverages known to the insurer.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.schema.js'), + description: 'The form to be used for printing the content.', + }, + error: { + type: new GraphQLList(require('./eligibilityresponseerror.schema.js')), + description: 'Mutually exclusive with Services Provided (Item).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/eligibilityresponseerror.schema.js b/src/resources/3_0_1/schemas/eligibilityresponseerror.schema.js index 539a28a5..c594b111 100644 --- a/src/resources/3_0_1/schemas/eligibilityresponseerror.schema.js +++ b/src/resources/3_0_1/schemas/eligibilityresponseerror.schema.js @@ -1,21 +1,43 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary EligibilityResponse.error Schema + * @summary EligibilityResponseerror Schema */ module.exports = new GraphQLObjectType({ - name: 'EligibilityResponseError', - description: 'Mutually exclusive with Services Provided (Item).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'An error code,from a specified code system, which details why the eligibility check could not be performed.', - }, - }), + name: 'EligibilityResponseerror', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'An error code,from a specified code system, which details why the eligibility check could not be performed.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/eligibilityresponseinsurance.schema.js b/src/resources/3_0_1/schemas/eligibilityresponseinsurance.schema.js index d3b72fe4..65f18ccd 100644 --- a/src/resources/3_0_1/schemas/eligibilityresponseinsurance.schema.js +++ b/src/resources/3_0_1/schemas/eligibilityresponseinsurance.schema.js @@ -1,32 +1,73 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary EligibilityResponse.insurance Schema + * @summary EligibilityResponseinsurance Schema */ module.exports = new GraphQLObjectType({ - name: 'EligibilityResponseInsurance', - description: - 'The insurer may provide both the details for the requested coverage as well as details for additional coverages known to the insurer.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - coverage: { - type: require('./reference.schema'), + name: 'EligibilityResponseinsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + coverage: { + type: new GraphQLUnionType({ + name: 'EligibilityResponseinsurancecoverage_coverage_Union', description: 'A suite of updated or additional Coverages from the Insurer.', - }, - contract: { - type: require('./reference.schema'), + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + description: + 'A suite of updated or additional Coverages from the Insurer.', + }, + contract: { + type: new GraphQLUnionType({ + name: 'EligibilityResponseinsurancecontract_contract_Union', description: 'The contract resource which may provide more detailed information.', - }, - benefitBalance: { - type: new GraphQLList( - require('./eligibilityresponseinsurancebenefitbalance.schema'), - ), - description: 'Benefits and optionally current balances by Category.', - }, - }), + types: () => [require('./contract.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + }, + }), + description: + 'The contract resource which may provide more detailed information.', + }, + benefitBalance: { + type: new GraphQLList( + require('./eligibilityresponseinsurancebenefitbalance.schema.js'), + ), + description: 'Benefits and optionally current balances by Category.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/eligibilityresponseinsurancebenefitbalance.schema.js b/src/resources/3_0_1/schemas/eligibilityresponseinsurancebenefitbalance.schema.js index 6ac9d623..34ebdf79 100644 --- a/src/resources/3_0_1/schemas/eligibilityresponseinsurancebenefitbalance.schema.js +++ b/src/resources/3_0_1/schemas/eligibilityresponseinsurancebenefitbalance.schema.js @@ -1,84 +1,101 @@ const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary EligibilityResponse.insurance.benefitBalance Schema + * @summary EligibilityResponseinsurancebenefitBalance Schema */ module.exports = new GraphQLObjectType({ - name: 'EligibilityResponseInsuranceBenefitBalance', - description: 'Benefits and optionally current balances by Category.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-category - category: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - subCategory: { - type: require('./codeableconcept.schema'), - description: - 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', - }, - excluded: { - type: GraphQLBoolean, - description: - 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', - }, - _excluded: { - type: require('./element.schema'), - description: - 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', - }, - name: { - type: GraphQLString, - description: - 'A short name or tag for the benefit, for example MED01, or DENT2.', - }, - _name: { - type: require('./element.schema'), - description: - 'A short name or tag for the benefit, for example MED01, or DENT2.', - }, - description: { - type: GraphQLString, - description: - "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", - }, - _description: { - type: require('./element.schema'), - description: - "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-network - network: { - type: require('./codeableconcept.schema'), - description: 'Network designation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-unit - unit: { - type: require('./codeableconcept.schema'), - description: 'Unit designation: individual or family.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-term - term: { - type: require('./codeableconcept.schema'), - description: - "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", - }, - financial: { - type: new GraphQLList( - require('./eligibilityresponseinsurancebenefitbalancefinancial.schema'), - ), - description: 'Benefits Used to date.', - }, - }), + name: 'EligibilityResponseinsurancebenefitBalance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-category + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + subCategory: { + type: require('./codeableconcept.schema.js'), + description: + 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', + }, + _excluded: { + type: require('./element.schema.js'), + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', + }, + excluded: { + type: GraphQLBoolean, + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A short name or tag for the benefit, for example MED01, or DENT2.', + }, + name: { + type: GraphQLString, + description: + 'A short name or tag for the benefit, for example MED01, or DENT2.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", + }, + description: { + type: GraphQLString, + description: + "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-network + network: { + type: require('./codeableconcept.schema.js'), + description: 'Network designation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-unit + unit: { + type: require('./codeableconcept.schema.js'), + description: 'Unit designation: individual or family.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-term + term: { + type: require('./codeableconcept.schema.js'), + description: + "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", + }, + financial: { + type: new GraphQLList( + require('./eligibilityresponseinsurancebenefitbalancefinancial.schema.js'), + ), + description: 'Benefits Used to date.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/eligibilityresponseinsurancebenefitbalancefinancial.schema.js b/src/resources/3_0_1/schemas/eligibilityresponseinsurancebenefitbalancefinancial.schema.js index 923ddda1..58f05676 100644 --- a/src/resources/3_0_1/schemas/eligibilityresponseinsurancebenefitbalancefinancial.schema.js +++ b/src/resources/3_0_1/schemas/eligibilityresponseinsurancebenefitbalancefinancial.schema.js @@ -1,53 +1,75 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary EligibilityResponse.insurance.benefitBalance.financial Schema + * @summary EligibilityResponseinsurancebenefitBalancefinancial Schema */ module.exports = new GraphQLObjectType({ - name: 'EligibilityResponseInsuranceBenefitBalanceFinancial', - description: 'Benefits Used to date.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Deductable, visits, benefit amount.', - }, - allowedUnsignedInt: { - type: UnsignedIntScalar, - description: 'Benefits allowed.', - }, - _allowedUnsignedInt: { - type: require('./element.schema'), - description: 'Benefits allowed.', - }, - allowedString: { - type: GraphQLString, - description: 'Benefits allowed.', - }, - _allowedString: { - type: require('./element.schema'), - description: 'Benefits allowed.', - }, - allowedMoney: { - type: require('./money.schema'), - description: 'Benefits allowed.', - }, - usedUnsignedInt: { - type: UnsignedIntScalar, - description: 'Benefits used.', - }, - _usedUnsignedInt: { - type: require('./element.schema'), - description: 'Benefits used.', - }, - usedMoney: { - type: require('./money.schema'), - description: 'Benefits used.', - }, - }), + name: 'EligibilityResponseinsurancebenefitBalancefinancial', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Deductable, visits, benefit amount.', + }, + _allowedUnsignedInt: { + type: require('./element.schema.js'), + description: 'Benefits allowed.', + }, + allowedUnsignedInt: { + type: UnsignedIntScalar, + description: 'Benefits allowed.', + }, + _allowedString: { + type: require('./element.schema.js'), + description: 'Benefits allowed.', + }, + allowedString: { + type: GraphQLString, + description: 'Benefits allowed.', + }, + allowedMoney: { + type: require('./money.schema.js'), + description: 'Benefits allowed.', + }, + _usedUnsignedInt: { + type: require('./element.schema.js'), + description: 'Benefits used.', + }, + usedUnsignedInt: { + type: UnsignedIntScalar, + description: 'Benefits used.', + }, + usedMoney: { + type: require('./money.schema.js'), + description: 'Benefits used.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/encounter.schema.js b/src/resources/3_0_1/schemas/encounter.schema.js index 0f194410..5e2151f3 100644 --- a/src/resources/3_0_1/schemas/encounter.schema.js +++ b/src/resources/3_0_1/schemas/encounter.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EncounterResourceType = new GraphQLEnumType({ - name: 'EncounterResourceType', - values: { - Encounter: { value: 'Encounter' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,119 +15,256 @@ let EncounterResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Encounter', - description: 'Base StructureDefinition for Encounter Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EncounterResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier(s) by which this encounter is known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', - }, - _status: { - type: require('./element.schema'), - description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', - }, - statusHistory: { - type: new GraphQLList(require('./encounterstatushistory.schema')), - description: - 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActEncounterCode - class: { - type: require('./coding.schema'), - description: 'inpatient | outpatient | ambulatory | emergency +.', - }, - classHistory: { - type: new GraphQLList(require('./encounterclasshistory.schema')), - description: - 'The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transisions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kindof discharge from emergency to inpatient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPriority - priority: { - type: require('./codeableconcept.schema'), - description: 'Indicates the urgency of the encounter.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Encounter Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Encounter_Enum_schema', + values: { Encounter: { value: 'Encounter' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Identifier(s) by which this encounter is known.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + statusHistory: { + type: new GraphQLList(require('./encounterstatushistory.schema.js')), + description: + 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActEncounterCode + class: { + type: require('./coding.schema.js'), + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + classHistory: { + type: new GraphQLList(require('./encounterclasshistory.schema.js')), + description: + 'The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transisions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kindof discharge from emergency to inpatient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPriority + priority: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the urgency of the encounter.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Encountersubject_subject_Union', description: 'The patient ro group present at the encounter.', - }, - episodeOfCare: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', - }, - incomingReferral: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The referral request this encounter satisfies (incoming referral).', - }, - participant: { - type: new GraphQLList(require('./encounterparticipant.schema')), - description: - 'The list of people responsible for providing the service.', - }, - appointment: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: 'The patient ro group present at the encounter.', + }, + episodeOfCare: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EncounterepisodeOfCare_episodeOfCare_Union', + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + types: () => [require('./episodeofcare.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + ), + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care, and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + }, + incomingReferral: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EncounterincomingReferral_incomingReferral_Union', + description: + 'The referral request this encounter satisfies (incoming referral).', + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'The referral request this encounter satisfies (incoming referral).', + }, + participant: { + type: new GraphQLList(require('./encounterparticipant.schema.js')), + description: 'The list of people responsible for providing the service.', + }, + appointment: { + type: new GraphQLUnionType({ + name: 'Encounterappointment_appointment_Union', description: 'The appointment that scheduled this encounter.', - }, - period: { - type: require('./period.schema'), - description: 'The start and end time of the encounter.', - }, - length: { - type: require('./duration.schema'), - description: - 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', - }, - diagnosis: { - type: new GraphQLList(require('./encounterdiagnosis.schema')), - description: 'The list of diagnosis relevant to this encounter.', - }, - account: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The set of accounts that may be used for billing for this Encounter.', - }, - hospitalization: { - type: require('./encounterhospitalization.schema'), - description: 'Details about the admission to a healthcare service.', - }, - location: { - type: new GraphQLList(require('./encounterlocation.schema')), - description: - 'List of locations where the patient has been during this encounter.', - }, - serviceProvider: { - type: require('./reference.schema'), + types: () => [require('./appointment.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + }, + }), + description: 'The appointment that scheduled this encounter.', + }, + period: { + type: require('./period.schema.js'), + description: 'The start and end time of the encounter.', + }, + length: { + type: require('./duration.schema.js'), + description: + 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-reason + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + }, + diagnosis: { + type: new GraphQLList(require('./encounterdiagnosis.schema.js')), + description: 'The list of diagnosis relevant to this encounter.', + }, + account: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Encounteraccount_account_Union', + description: + 'The set of accounts that may be used for billing for this Encounter.', + types: () => [require('./account.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + }, + }), + ), + description: + 'The set of accounts that may be used for billing for this Encounter.', + }, + hospitalization: { + type: require('./encounterhospitalization.schema.js'), + description: 'Details about the admission to a healthcare service.', + }, + location: { + type: new GraphQLList(require('./encounterlocation.schema.js')), + description: + 'List of locations where the patient has been during this encounter.', + }, + serviceProvider: { + type: new GraphQLUnionType({ + name: 'EncounterserviceProvider_serviceProvider_Union', description: "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", - }, - partOf: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "An organization that is in charge of maintaining the information of this Encounter (e.g. who maintains the report or the master service catalog item, etc.). This MAY be the same as the organization on the Patient record, however it could be different. This MAY not be not the Service Delivery Location's Organization.", + }, + partOf: { + type: new GraphQLUnionType({ + name: 'EncounterpartOf_partOf_Union', description: 'Another Encounter of which this encounter is a part of (administratively or in time).', - }, - }), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Another Encounter of which this encounter is a part of (administratively or in time).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/encounterclasshistory.schema.js b/src/resources/3_0_1/schemas/encounterclasshistory.schema.js index 8890f650..62a0d519 100644 --- a/src/resources/3_0_1/schemas/encounterclasshistory.schema.js +++ b/src/resources/3_0_1/schemas/encounterclasshistory.schema.js @@ -1,25 +1,46 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Encounter.classHistory Schema + * @summary EncounterclassHistory Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterClassHistory', - description: - 'The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transisions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kindof discharge from emergency to inpatient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActEncounterCode - class: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'inpatient | outpatient | ambulatory | emergency +.', - }, - period: { - type: new GraphQLNonNull(require('./period.schema')), - description: 'The time that the episode was in the specified class.', - }, - }), + name: 'EncounterclassHistory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActEncounterCode + class: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The time that the episode was in the specified class.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/encounterdiagnosis.schema.js b/src/resources/3_0_1/schemas/encounterdiagnosis.schema.js index 5a8712e5..fc267072 100644 --- a/src/resources/3_0_1/schemas/encounterdiagnosis.schema.js +++ b/src/resources/3_0_1/schemas/encounterdiagnosis.schema.js @@ -1,35 +1,76 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Encounter.diagnosis Schema + * @summary Encounterdiagnosis Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterDiagnosis', - description: 'The list of diagnosis relevant to this encounter.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - condition: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnosis-role - role: { - type: require('./codeableconcept.schema'), - description: - 'Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).', - }, - rank: { - type: PositiveIntScalar, - description: 'Ranking of the diagnosis (for each role type).', - }, - _rank: { - type: require('./element.schema'), - description: 'Ranking of the diagnosis (for each role type).', - }, - }), + name: 'Encounterdiagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + condition: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Encounterdiagnosiscondition_condition_Union', + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + types: () => [ + require('./condition.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnosis-role + role: { + type: require('./codeableconcept.schema.js'), + description: + 'Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).', + }, + _rank: { + type: require('./element.schema.js'), + description: 'Ranking of the diagnosis (for each role type).', + }, + rank: { + type: PositiveIntScalar, + description: 'Ranking of the diagnosis (for each role type).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/encounterhospitalization.schema.js b/src/resources/3_0_1/schemas/encounterhospitalization.schema.js index 0b25a7cd..b57896d4 100644 --- a/src/resources/3_0_1/schemas/encounterhospitalization.schema.js +++ b/src/resources/3_0_1/schemas/encounterhospitalization.schema.js @@ -1,61 +1,101 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Encounter.hospitalization Schema + * @summary Encounterhospitalization Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterHospitalization', - description: 'Details about the admission to a healthcare service.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - preAdmissionIdentifier: { - type: require('./identifier.schema'), - description: 'Pre-admission identifier.', - }, - origin: { - type: require('./reference.schema'), + name: 'Encounterhospitalization', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + preAdmissionIdentifier: { + type: require('./identifier.schema.js'), + description: 'Pre-admission identifier.', + }, + origin: { + type: new GraphQLUnionType({ + name: 'Encounterhospitalizationorigin_origin_Union', description: 'The location from which the patient came before admission.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-admit-source - admitSource: { - type: require('./codeableconcept.schema'), - description: - 'From where patient was admitted (physician referral, transfer).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0092 - reAdmission: { - type: require('./codeableconcept.schema'), - description: - 'Whether this hospitalization is a readmission and why if known.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet - dietPreference: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Diet preferences reported by the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-courtesy - specialCourtesy: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Special courtesies (VIP, board member).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-arrangements - specialArrangement: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.', - }, - destination: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The location from which the patient came before admission.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-admit-source + admitSource: { + type: require('./codeableconcept.schema.js'), + description: + 'From where patient was admitted (physician referral, transfer).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0092 + reAdmission: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether this hospitalization is a readmission and why if known.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet + dietPreference: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Diet preferences reported by the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-courtesy + specialCourtesy: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Special courtesies (VIP, board member).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-special-arrangements + specialArrangement: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.', + }, + destination: { + type: new GraphQLUnionType({ + name: 'Encounterhospitalizationdestination_destination_Union', description: 'Location to which the patient is discharged.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition - dischargeDisposition: { - type: require('./codeableconcept.schema'), - description: 'Category or kind of location after discharge.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Location to which the patient is discharged.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition + dischargeDisposition: { + type: require('./codeableconcept.schema.js'), + description: 'Category or kind of location after discharge.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/encounterlocation.schema.js b/src/resources/3_0_1/schemas/encounterlocation.schema.js index 21b99845..755dbb52 100644 --- a/src/resources/3_0_1/schemas/encounterlocation.schema.js +++ b/src/resources/3_0_1/schemas/encounterlocation.schema.js @@ -1,37 +1,70 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Encounter.location Schema + * @summary Encounterlocation Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterLocation', - description: - 'List of locations where the patient has been during this encounter.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - location: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The location where the encounter takes place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-location-status - status: { - type: CodeScalar, - description: - "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", - }, - _status: { - type: require('./element.schema'), - description: - "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", - }, - period: { - type: require('./period.schema'), - description: - 'Time period during which the patient was present at the location.', - }, - }), + name: 'Encounterlocation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + location: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Encounterlocationlocation_location_Union', + description: 'The location where the encounter takes place.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: 'The location where the encounter takes place.', + }, + _status: { + type: require('./element.schema.js'), + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-location-status + status: { + type: CodeScalar, + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is is no longer at the location, then the period will have an end date/time.", + }, + period: { + type: require('./period.schema.js'), + description: + 'Time period during which the patient was present at the location.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/encounterparticipant.schema.js b/src/resources/3_0_1/schemas/encounterparticipant.schema.js index b2f7f5f2..eea4396a 100644 --- a/src/resources/3_0_1/schemas/encounterparticipant.schema.js +++ b/src/resources/3_0_1/schemas/encounterparticipant.schema.js @@ -1,30 +1,67 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Encounter.participant Schema + * @summary Encounterparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterParticipant', - description: 'The list of people responsible for providing the service.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Role of participant in encounter.', - }, - period: { - type: require('./period.schema'), - description: - "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", - }, - individual: { - type: require('./reference.schema'), + name: 'Encounterparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-participant-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in encounter.', + }, + period: { + type: require('./period.schema.js'), + description: + "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", + }, + individual: { + type: new GraphQLUnionType({ + name: 'Encounterparticipantindividual_individual_Union', description: 'Persons involved in the encounter other than the patient.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Persons involved in the encounter other than the patient.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/encounterstatushistory.schema.js b/src/resources/3_0_1/schemas/encounterstatushistory.schema.js index bb930bb0..6b40ede0 100644 --- a/src/resources/3_0_1/schemas/encounterstatushistory.schema.js +++ b/src/resources/3_0_1/schemas/encounterstatushistory.schema.js @@ -1,32 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Encounter.statusHistory Schema + * @summary EncounterstatusHistory Schema */ module.exports = new GraphQLObjectType({ - name: 'EncounterStatusHistory', - description: - 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', - }, - _status: { - type: require('./element.schema'), - description: - 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', - }, - period: { - type: new GraphQLNonNull(require('./period.schema')), - description: 'The time that the episode was in the specified status.', - }, - }), + name: 'EncounterstatusHistory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The time that the episode was in the specified status.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/endpoint.schema.js b/src/resources/3_0_1/schemas/endpoint.schema.js index 0dd02172..21aa5f8d 100644 --- a/src/resources/3_0_1/schemas/endpoint.schema.js +++ b/src/resources/3_0_1/schemas/endpoint.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EndpointResourceType = new GraphQLEnumType({ - name: 'EndpointResourceType', - values: { - Endpoint: { value: 'Endpoint' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,95 +16,161 @@ let EndpointResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Endpoint', - description: 'Base StructureDefinition for Endpoint Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EndpointResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier for the organization that is used to identify the endpoint across multiple disparate systems.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/endpoint-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'active | suspended | error | off | test.', - }, - _status: { - type: require('./element.schema'), - description: 'active | suspended | error | off | test.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/endpoint-connection-type - connectionType: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).', - }, - name: { - type: GraphQLString, - description: - 'A friendly name that this endpoint can be referred to with.', - }, - _name: { - type: require('./element.schema'), - description: - 'A friendly name that this endpoint can be referred to with.', - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Endpoint Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Endpoint_Enum_schema', + values: { Endpoint: { value: 'Endpoint' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier for the organization that is used to identify the endpoint across multiple disparate systems.', + }, + _status: { + type: require('./element.schema.js'), + description: 'active | suspended | error | off | test.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/endpoint-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'active | suspended | error | off | test.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/endpoint-connection-type + connectionType: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A friendly name that this endpoint can be referred to with.', + }, + name: { + type: GraphQLString, + description: + 'A friendly name that this endpoint can be referred to with.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'EndpointmanagingOrganization_managingOrganization_Union', description: 'The organization that manages this endpoint (even if technically another organisation is hosting this in the cloud, it is the organisation associated with the data).', - }, - contact: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', - }, - period: { - type: require('./period.schema'), - description: - 'The interval during which the endpoint is expected to be operational.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/endpoint-payload-type - payloadType: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.schema')), - ), - description: - 'The payload type describes the acceptable content that can be communicated on the endpoint.', - }, - payloadMimeType: { - type: new GraphQLList(CodeScalar), - description: - 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', - }, - _payloadMimeType: { - type: require('./element.schema'), - description: - 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', - }, - address: { - type: new GraphQLNonNull(UriScalar), - description: - 'The uri that describes the actual end-point to connect to.', - }, - _address: { - type: require('./element.schema'), - description: - 'The uri that describes the actual end-point to connect to.', - }, - header: { - type: new GraphQLList(GraphQLString), - description: - 'Additional headers / information to send as part of the notification.', - }, - _header: { - type: require('./element.schema'), - description: - 'Additional headers / information to send as part of the notification.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization that manages this endpoint (even if technically another organisation is hosting this in the cloud, it is the organisation associated with the data).', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The interval during which the endpoint is expected to be operational.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/endpoint-payload-type + payloadType: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.schema.js')), + ), + description: + 'The payload type describes the acceptable content that can be communicated on the endpoint.', + }, + _payloadMimeType: { + type: require('./element.schema.js'), + description: + 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', + }, + payloadMimeType: { + type: new GraphQLList(CodeScalar), + description: + 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', + }, + _address: { + type: require('./element.schema.js'), + description: 'The uri that describes the actual end-point to connect to.', + }, + address: { + type: new GraphQLNonNull(UriScalar), + description: 'The uri that describes the actual end-point to connect to.', + }, + _header: { + type: require('./element.schema.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: new GraphQLList(GraphQLString), + description: + 'Additional headers / information to send as part of the notification.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/enrollmentrequest.schema.js b/src/resources/3_0_1/schemas/enrollmentrequest.schema.js index 1d679644..ab3911c2 100644 --- a/src/resources/3_0_1/schemas/enrollmentrequest.schema.js +++ b/src/resources/3_0_1/schemas/enrollmentrequest.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EnrollmentRequestResourceType = new GraphQLEnumType({ - name: 'EnrollmentRequestResourceType', - values: { - EnrollmentRequest: { value: 'EnrollmentRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,56 +16,162 @@ let EnrollmentRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EnrollmentRequest', - description: 'Base StructureDefinition for EnrollmentRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EnrollmentRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when this resource was created.', - }, - insurer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EnrollmentRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentRequest_Enum_schema', + values: { EnrollmentRequest: { value: 'EnrollmentRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + insurer: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestinsurer_insurer_Union', description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestprovider_provider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestorganization_organization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - subject: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestsubject_subject_Union', description: 'Patient Resource.', - }, - coverage: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Patient Resource.', + }, + coverage: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestcoverage_coverage_Union', description: 'Reference to the program or plan identification, underwriter or payor.', - }, - }), + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/enrollmentresponse.schema.js b/src/resources/3_0_1/schemas/enrollmentresponse.schema.js index 0f7c8fc3..51b09228 100644 --- a/src/resources/3_0_1/schemas/enrollmentresponse.schema.js +++ b/src/resources/3_0_1/schemas/enrollmentresponse.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EnrollmentResponseResourceType = new GraphQLEnumType({ - name: 'EnrollmentResponseResourceType', - values: { - EnrollmentResponse: { value: 'EnrollmentResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,66 +17,162 @@ let EnrollmentResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EnrollmentResponse', - description: 'Base StructureDefinition for EnrollmentResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EnrollmentResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - request: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EnrollmentResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentResponse_Enum_schema', + values: { EnrollmentResponse: { value: 'EnrollmentResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + request: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponserequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: 'Processing status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./enrollmentrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EnrollmentRequest') { + return require('./enrollmentrequest.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: 'Processing status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponseorganization_organization_Union', description: 'The Insurer who produced this adjudicated response.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponserequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponserequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/episodeofcare.schema.js b/src/resources/3_0_1/schemas/episodeofcare.schema.js index 87fff24c..d373228c 100644 --- a/src/resources/3_0_1/schemas/episodeofcare.schema.js +++ b/src/resources/3_0_1/schemas/episodeofcare.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let EpisodeOfCareResourceType = new GraphQLEnumType({ - name: 'EpisodeOfCareResourceType', - values: { - EpisodeOfCare: { value: 'EpisodeOfCare' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,77 +15,202 @@ let EpisodeOfCareResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'EpisodeOfCare', - description: 'Base StructureDefinition for EpisodeOfCare Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(EpisodeOfCareResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - _status: { - type: require('./element.schema'), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - statusHistory: { - type: new GraphQLList(require('./episodeofcarestatushistory.schema')), - description: - 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/episodeofcare-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.', - }, - diagnosis: { - type: new GraphQLList(require('./episodeofcarediagnosis.schema')), - description: 'The list of diagnosis relevant to this episode of care.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient who is the focus of this episode of care.', - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for EpisodeOfCare Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EpisodeOfCare_Enum_schema', + values: { EpisodeOfCare: { value: 'EpisodeOfCare' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + statusHistory: { + type: new GraphQLList(require('./episodeofcarestatushistory.schema.js')), + description: + 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episodeofcare-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.', + }, + diagnosis: { + type: new GraphQLList(require('./episodeofcarediagnosis.schema.js')), + description: 'The list of diagnosis relevant to this episode of care.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EpisodeOfCarepatient_patient_Union', + description: 'The patient who is the focus of this episode of care.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient who is the focus of this episode of care.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'EpisodeOfCaremanagingOrganization_managingOrganization_Union', description: 'The organization that has assumed the specific responsibilities for the specified duration.', - }, - period: { - type: require('./period.schema'), - description: - 'The interval during which the managing organization assumes the defined responsibility.', - }, - referralRequest: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', - }, - careManager: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization that has assumed the specific responsibilities for the specified duration.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The interval during which the managing organization assumes the defined responsibility.', + }, + referralRequest: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EpisodeOfCarereferralRequest_referralRequest_Union', + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + }, + careManager: { + type: new GraphQLUnionType({ + name: 'EpisodeOfCarecareManager_careManager_Union', description: 'The practitioner that is the care manager/care co-ordinator for this patient.', - }, - team: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The list of practitioners that may be facilitating this episode of care for specific purposes.', - }, - account: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The set of accounts that may be used for billing for this EpisodeOfCare.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner that is the care manager/care co-ordinator for this patient.', + }, + team: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EpisodeOfCareteam_team_Union', + description: + 'The list of practitioners that may be facilitating this episode of care for specific purposes.', + types: () => [require('./careteam.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + 'The list of practitioners that may be facilitating this episode of care for specific purposes.', + }, + account: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EpisodeOfCareaccount_account_Union', + description: + 'The set of accounts that may be used for billing for this EpisodeOfCare.', + types: () => [require('./account.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + }, + }), + ), + description: + 'The set of accounts that may be used for billing for this EpisodeOfCare.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/episodeofcarediagnosis.schema.js b/src/resources/3_0_1/schemas/episodeofcarediagnosis.schema.js index 57f3213d..973743b7 100644 --- a/src/resources/3_0_1/schemas/episodeofcarediagnosis.schema.js +++ b/src/resources/3_0_1/schemas/episodeofcarediagnosis.schema.js @@ -1,35 +1,70 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary EpisodeOfCare.diagnosis Schema + * @summary EpisodeOfCarediagnosis Schema */ module.exports = new GraphQLObjectType({ - name: 'EpisodeOfCareDiagnosis', - description: 'The list of diagnosis relevant to this episode of care.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - condition: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/diagnosis-role - role: { - type: require('./codeableconcept.schema'), - description: - 'Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).', - }, - rank: { - type: PositiveIntScalar, - description: 'Ranking of the diagnosis (for each role type).', - }, - _rank: { - type: require('./element.schema'), - description: 'Ranking of the diagnosis (for each role type).', - }, - }), + name: 'EpisodeOfCarediagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + condition: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EpisodeOfCarediagnosiscondition_condition_Union', + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diagnosis-role + role: { + type: require('./codeableconcept.schema.js'), + description: + 'Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).', + }, + _rank: { + type: require('./element.schema.js'), + description: 'Ranking of the diagnosis (for each role type).', + }, + rank: { + type: PositiveIntScalar, + description: 'Ranking of the diagnosis (for each role type).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/episodeofcarestatushistory.schema.js b/src/resources/3_0_1/schemas/episodeofcarestatushistory.schema.js index af90c363..6519ab67 100644 --- a/src/resources/3_0_1/schemas/episodeofcarestatushistory.schema.js +++ b/src/resources/3_0_1/schemas/episodeofcarestatushistory.schema.js @@ -1,33 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary EpisodeOfCare.statusHistory Schema + * @summary EpisodeOfCarestatusHistory Schema */ module.exports = new GraphQLObjectType({ - name: 'EpisodeOfCareStatusHistory', - description: - 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - _status: { - type: require('./element.schema'), - description: - 'planned | waitlist | active | onhold | finished | cancelled.', - }, - period: { - type: new GraphQLNonNull(require('./period.schema')), - description: - 'The period during this EpisodeOfCare that the specific status applied.', - }, - }), + name: 'EpisodeOfCarestatusHistory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/episode-of-care-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + 'The period during this EpisodeOfCare that the specific status applied.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/expansionprofile.schema.js b/src/resources/3_0_1/schemas/expansionprofile.schema.js index 75afcfcb..fd5fa1e3 100644 --- a/src/resources/3_0_1/schemas/expansionprofile.schema.js +++ b/src/resources/3_0_1/schemas/expansionprofile.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ExpansionProfileResourceType = new GraphQLEnumType({ - name: 'ExpansionProfileResourceType', - values: { - ExpansionProfile: { value: 'ExpansionProfile' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,210 +18,270 @@ let ExpansionProfileResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ExpansionProfile', - description: 'Base StructureDefinition for ExpansionProfile Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ExpansionProfileResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. The URL SHOULD include the major version of the expansion profile. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. The URL SHOULD include the major version of the expansion profile. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'A formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the expansion profile author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the expansion profile author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the expansion profile. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the expansion profile. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this expansion profile. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this expansion profile. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this expansion profile is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this expansion profile is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the expansion profile was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the expansion profile changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the expansion profile was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the expansion profile changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the expansion profile.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the expansion profile.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the expansion profile from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the expansion profile from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate expansion profile instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the expansion profile is intended to be used.', - }, - fixedVersion: { - type: new GraphQLList(require('./expansionprofilefixedversion.schema')), - description: - 'Fix use of a particular code system to a particular version.', - }, - excludedSystem: { - type: require('./expansionprofileexcludedsystem.schema'), - description: - 'Code system, or a particular version of a code system to be excluded from value set expansions.', - }, - includeDesignations: { - type: GraphQLBoolean, - description: - 'Controls whether concept designations are to be included or excluded in value set expansions.', - }, - _includeDesignations: { - type: require('./element.schema'), - description: - 'Controls whether concept designations are to be included or excluded in value set expansions.', - }, - designation: { - type: require('./expansionprofiledesignation.schema'), - description: - 'A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.', - }, - includeDefinition: { - type: GraphQLBoolean, - description: - 'Controls whether the value set definition is included or excluded in value set expansions.', - }, - _includeDefinition: { - type: require('./element.schema'), - description: - 'Controls whether the value set definition is included or excluded in value set expansions.', - }, - activeOnly: { - type: GraphQLBoolean, - description: - 'Controls whether inactive concepts are included or excluded in value set expansions.', - }, - _activeOnly: { - type: require('./element.schema'), - description: - 'Controls whether inactive concepts are included or excluded in value set expansions.', - }, - excludeNested: { - type: GraphQLBoolean, - description: - 'Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains).', - }, - _excludeNested: { - type: require('./element.schema'), - description: - 'Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains).', - }, - excludeNotForUI: { - type: GraphQLBoolean, - description: - 'Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.', - }, - _excludeNotForUI: { - type: require('./element.schema'), - description: - 'Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.', - }, - excludePostCoordinated: { - type: GraphQLBoolean, - description: - 'Controls whether or not the value set expansion includes post coordinated codes.', - }, - _excludePostCoordinated: { - type: require('./element.schema'), - description: - 'Controls whether or not the value set expansion includes post coordinated codes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - displayLanguage: { - type: CodeScalar, - description: - 'Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.', - }, - _displayLanguage: { - type: require('./element.schema'), - description: - 'Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.', - }, - limitedExpansion: { - type: GraphQLBoolean, - description: - 'If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete, using the extension [http://hl7.org/fhir/StructureDefinition/valueset-toocostly](extension-valueset-toocostly.html).', - }, - _limitedExpansion: { - type: require('./element.schema'), - description: - 'If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete, using the extension [http://hl7.org/fhir/StructureDefinition/valueset-toocostly](extension-valueset-toocostly.html).', - }, - }), + description: 'Base StructureDefinition for ExpansionProfile Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExpansionProfile_Enum_schema', + values: { ExpansionProfile: { value: 'ExpansionProfile' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. The URL SHOULD include the major version of the expansion profile. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this expansion profile when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this expansion profile is (or will be) published. The URL SHOULD include the major version of the expansion profile. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A formal identifier that is used to identify this expansion profile when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the expansion profile author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the expansion profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the expansion profile author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the expansion profile. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the expansion profile. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this expansion profile. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this expansion profile. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this expansion profile is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this expansion profile is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the expansion profile was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the expansion profile changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the expansion profile was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the expansion profile changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the expansion profile.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the expansion profile.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the expansion profile from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the expansion profile from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate expansion profile instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the expansion profile is intended to be used.', + }, + fixedVersion: { + type: new GraphQLList( + require('./expansionprofilefixedversion.schema.js'), + ), + description: + 'Fix use of a particular code system to a particular version.', + }, + excludedSystem: { + type: require('./expansionprofileexcludedsystem.schema.js'), + description: + 'Code system, or a particular version of a code system to be excluded from value set expansions.', + }, + _includeDesignations: { + type: require('./element.schema.js'), + description: + 'Controls whether concept designations are to be included or excluded in value set expansions.', + }, + includeDesignations: { + type: GraphQLBoolean, + description: + 'Controls whether concept designations are to be included or excluded in value set expansions.', + }, + designation: { + type: require('./expansionprofiledesignation.schema.js'), + description: + 'A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.', + }, + _includeDefinition: { + type: require('./element.schema.js'), + description: + 'Controls whether the value set definition is included or excluded in value set expansions.', + }, + includeDefinition: { + type: GraphQLBoolean, + description: + 'Controls whether the value set definition is included or excluded in value set expansions.', + }, + _activeOnly: { + type: require('./element.schema.js'), + description: + 'Controls whether inactive concepts are included or excluded in value set expansions.', + }, + activeOnly: { + type: GraphQLBoolean, + description: + 'Controls whether inactive concepts are included or excluded in value set expansions.', + }, + _excludeNested: { + type: require('./element.schema.js'), + description: + 'Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains).', + }, + excludeNested: { + type: GraphQLBoolean, + description: + 'Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains).', + }, + _excludeNotForUI: { + type: require('./element.schema.js'), + description: + 'Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.', + }, + excludeNotForUI: { + type: GraphQLBoolean, + description: + 'Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces.', + }, + _excludePostCoordinated: { + type: require('./element.schema.js'), + description: + 'Controls whether or not the value set expansion includes post coordinated codes.', + }, + excludePostCoordinated: { + type: GraphQLBoolean, + description: + 'Controls whether or not the value set expansion includes post coordinated codes.', + }, + _displayLanguage: { + type: require('./element.schema.js'), + description: + 'Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + displayLanguage: { + type: CodeScalar, + description: + 'Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display.', + }, + _limitedExpansion: { + type: require('./element.schema.js'), + description: + 'If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete, using the extension [http://hl7.org/fhir/StructureDefinition/valueset-toocostly](extension-valueset-toocostly.html).', + }, + limitedExpansion: { + type: GraphQLBoolean, + description: + 'If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete, using the extension [http://hl7.org/fhir/StructureDefinition/valueset-toocostly](extension-valueset-toocostly.html).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/expansionprofiledesignation.schema.js b/src/resources/3_0_1/schemas/expansionprofiledesignation.schema.js index 0be7c987..4c082b6e 100644 --- a/src/resources/3_0_1/schemas/expansionprofiledesignation.schema.js +++ b/src/resources/3_0_1/schemas/expansionprofiledesignation.schema.js @@ -1,24 +1,40 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary ExpansionProfile.designation Schema + * @summary ExpansionProfiledesignation Schema */ module.exports = new GraphQLObjectType({ - name: 'ExpansionProfileDesignation', - description: - 'A set of criteria that provide the constraints imposed on the value set expansion by including or excluding designations.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - include: { - type: require('./expansionprofiledesignationinclude.schema'), - description: 'Designations to be included.', - }, - exclude: { - type: require('./expansionprofiledesignationexclude.schema'), - description: 'Designations to be excluded.', - }, - }), + name: 'ExpansionProfiledesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + include: { + type: require('./expansionprofiledesignationinclude.schema.js'), + description: 'Designations to be included.', + }, + exclude: { + type: require('./expansionprofiledesignationexclude.schema.js'), + description: 'Designations to be excluded.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/expansionprofiledesignationexclude.schema.js b/src/resources/3_0_1/schemas/expansionprofiledesignationexclude.schema.js index 98413afc..35b978c6 100644 --- a/src/resources/3_0_1/schemas/expansionprofiledesignationexclude.schema.js +++ b/src/resources/3_0_1/schemas/expansionprofiledesignationexclude.schema.js @@ -1,21 +1,38 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary ExpansionProfile.designation.exclude Schema + * @summary ExpansionProfiledesignationexclude Schema */ module.exports = new GraphQLObjectType({ - name: 'ExpansionProfileDesignationExclude', - description: 'Designations to be excluded.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - designation: { - type: new GraphQLList( - require('./expansionprofiledesignationexcludedesignation.schema'), - ), - description: 'A data group for each designation to be excluded.', - }, - }), + name: 'ExpansionProfiledesignationexclude', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + designation: { + type: new GraphQLList( + require('./expansionprofiledesignationexcludedesignation.schema.js'), + ), + description: 'A data group for each designation to be excluded.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/expansionprofiledesignationexcludedesignation.schema.js b/src/resources/3_0_1/schemas/expansionprofiledesignationexcludedesignation.schema.js index 8f17af10..ad2e01ed 100644 --- a/src/resources/3_0_1/schemas/expansionprofiledesignationexcludedesignation.schema.js +++ b/src/resources/3_0_1/schemas/expansionprofiledesignationexcludedesignation.schema.js @@ -1,31 +1,47 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ExpansionProfile.designation.exclude.designation Schema + * @summary ExpansionProfiledesignationexcludedesignation Schema */ module.exports = new GraphQLObjectType({ - name: 'ExpansionProfileDesignationExcludeDesignation', - description: 'A data group for each designation to be excluded.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.schema'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.schema'), - description: - 'Which kinds of designation to exclude from the expansion.', - }, - }), + name: 'ExpansionProfiledesignationexcludedesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.schema.js'), + description: 'Which kinds of designation to exclude from the expansion.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/expansionprofiledesignationinclude.schema.js b/src/resources/3_0_1/schemas/expansionprofiledesignationinclude.schema.js index 8e6015a5..003a1491 100644 --- a/src/resources/3_0_1/schemas/expansionprofiledesignationinclude.schema.js +++ b/src/resources/3_0_1/schemas/expansionprofiledesignationinclude.schema.js @@ -1,21 +1,38 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary ExpansionProfile.designation.include Schema + * @summary ExpansionProfiledesignationinclude Schema */ module.exports = new GraphQLObjectType({ - name: 'ExpansionProfileDesignationInclude', - description: 'Designations to be included.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - designation: { - type: new GraphQLList( - require('./expansionprofiledesignationincludedesignation.schema'), - ), - description: 'A data group for each designation to be included.', - }, - }), + name: 'ExpansionProfiledesignationinclude', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + designation: { + type: new GraphQLList( + require('./expansionprofiledesignationincludedesignation.schema.js'), + ), + description: 'A data group for each designation to be included.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/expansionprofiledesignationincludedesignation.schema.js b/src/resources/3_0_1/schemas/expansionprofiledesignationincludedesignation.schema.js index 1c90642b..46041f1a 100644 --- a/src/resources/3_0_1/schemas/expansionprofiledesignationincludedesignation.schema.js +++ b/src/resources/3_0_1/schemas/expansionprofiledesignationincludedesignation.schema.js @@ -1,30 +1,47 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ExpansionProfile.designation.include.designation Schema + * @summary ExpansionProfiledesignationincludedesignation Schema */ module.exports = new GraphQLObjectType({ - name: 'ExpansionProfileDesignationIncludeDesignation', - description: 'A data group for each designation to be included.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.schema'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.schema'), - description: 'Which kinds of designation to include in the expansion.', - }, - }), + name: 'ExpansionProfiledesignationincludedesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.schema.js'), + description: 'Which kinds of designation to include in the expansion.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/expansionprofileexcludedsystem.schema.js b/src/resources/3_0_1/schemas/expansionprofileexcludedsystem.schema.js index 3ca59d24..54528c45 100644 --- a/src/resources/3_0_1/schemas/expansionprofileexcludedsystem.schema.js +++ b/src/resources/3_0_1/schemas/expansionprofileexcludedsystem.schema.js @@ -1,35 +1,56 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ExpansionProfile.excludedSystem Schema + * @summary ExpansionProfileexcludedSystem Schema */ module.exports = new GraphQLObjectType({ - name: 'ExpansionProfileExcludedSystem', - description: - 'Code system, or a particular version of a code system to be excluded from value set expansions.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - system: { - type: new GraphQLNonNull(UriScalar), - description: 'An absolute URI which is the code system to be excluded.', - }, - _system: { - type: require('./element.schema'), - description: 'An absolute URI which is the code system to be excluded.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system from which codes in the expansion should be excluded.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of the code system from which codes in the expansion should be excluded.', - }, - }), + name: 'ExpansionProfileexcludedSystem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _system: { + type: require('./element.schema.js'), + description: 'An absolute URI which is the code system to be excluded.', + }, + system: { + type: new GraphQLNonNull(UriScalar), + description: 'An absolute URI which is the code system to be excluded.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the code system from which codes in the expansion should be excluded.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system from which codes in the expansion should be excluded.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/expansionprofilefixedversion.schema.js b/src/resources/3_0_1/schemas/expansionprofilefixedversion.schema.js index d7dc03ac..13ec8ae9 100644 --- a/src/resources/3_0_1/schemas/expansionprofilefixedversion.schema.js +++ b/src/resources/3_0_1/schemas/expansionprofilefixedversion.schema.js @@ -1,46 +1,68 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ExpansionProfile.fixedVersion Schema + * @summary ExpansionProfilefixedVersion Schema */ module.exports = new GraphQLObjectType({ - name: 'ExpansionProfileFixedVersion', - description: 'Fix use of a particular code system to a particular version.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - system: { - type: new GraphQLNonNull(UriScalar), - description: 'The specific system for which to fix the version.', - }, - _system: { - type: require('./element.schema'), - description: 'The specific system for which to fix the version.', - }, - version: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The version of the code system from which codes in the expansion should be included.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of the code system from which codes in the expansion should be included.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/system-version-processing-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How to manage the intersection between a fixed version in a value set, and this fixed version of the system in the expansion profile.', - }, - _mode: { - type: require('./element.schema'), - description: - 'How to manage the intersection between a fixed version in a value set, and this fixed version of the system in the expansion profile.', - }, - }), + name: 'ExpansionProfilefixedVersion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _system: { + type: require('./element.schema.js'), + description: 'The specific system for which to fix the version.', + }, + system: { + type: new GraphQLNonNull(UriScalar), + description: 'The specific system for which to fix the version.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the code system from which codes in the expansion should be included.', + }, + version: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The version of the code system from which codes in the expansion should be included.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'How to manage the intersection between a fixed version in a value set, and this fixed version of the system in the expansion profile.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/system-version-processing-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How to manage the intersection between a fixed version in a value set, and this fixed version of the system in the expansion profile.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefit.schema.js b/src/resources/3_0_1/schemas/explanationofbenefit.schema.js index 3bcd5a92..3a53437a 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefit.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefit.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ExplanationOfBenefitResourceType = new GraphQLEnumType({ - name: 'ExplanationOfBenefitResourceType', - values: { - ExplanationOfBenefit: { value: 'ExplanationOfBenefit' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -24,222 +18,391 @@ let ExplanationOfBenefitResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ExplanationOfBenefit', - description: 'Base StructureDefinition for ExplanationOfBenefit Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ExplanationOfBenefitResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The EOB Business Identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/explanationofbenefit-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-type - type: { - type: require('./codeableconcept.schema'), - description: - 'The category of claim, eg, oral, pharmacy, vision, insitutional, professional.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-subtype - subType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ExplanationOfBenefit Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExplanationOfBenefit_Enum_schema', + values: { ExplanationOfBenefit: { value: 'ExplanationOfBenefit' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The EOB Business Identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/explanationofbenefit-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The category of claim, eg, oral, pharmacy, vision, insitutional, professional.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-subtype + subType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitpatient_patient_Union', description: 'Patient Resource.', - }, - billablePeriod: { - type: require('./period.schema'), - description: - 'The billable period for which charges are being submitted.', - }, - created: { - type: DateTimeScalar, - description: 'The date when the EOB was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when the EOB was created.', - }, - enterer: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Patient Resource.', + }, + billablePeriod: { + type: require('./period.schema.js'), + description: 'The billable period for which charges are being submitted.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when the EOB was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when the EOB was created.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitenterer_enterer_Union', description: 'The person who created the explanation of benefit.', - }, - insurer: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The person who created the explanation of benefit.', + }, + insurer: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitinsurer_insurer_Union', description: 'The insurer which is responsible for the explanation of benefit.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The insurer which is responsible for the explanation of benefit.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitprovider_provider_Union', description: 'The provider which is responsible for the claim.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The provider which is responsible for the claim.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitorganization_organization_Union', description: 'The provider which is responsible for the claim.', - }, - referral: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The provider which is responsible for the claim.', + }, + referral: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitreferral_referral_Union', description: 'The referral resource which lists the date, practitioner, reason and other supporting information.', - }, - facility: { - type: require('./reference.schema'), + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + description: + 'The referral resource which lists the date, practitioner, reason and other supporting information.', + }, + facility: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitfacility_facility_Union', description: 'Facility where the services were provided.', - }, - claim: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Facility where the services were provided.', + }, + claim: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitclaim_claim_Union', description: 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', - }, - claimResponse: { - type: require('./reference.schema'), + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: + 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', + }, + claimResponse: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitclaimResponse_claimResponse_Union', description: 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: - 'Processing outcome errror, partial or complete processing.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - related: { - type: new GraphQLList(require('./explanationofbenefitrelated.schema')), - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - }, - prescription: { - type: require('./reference.schema'), + types: () => [require('./claimresponse.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + description: + 'The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: 'Processing outcome errror, partial or complete processing.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + related: { + type: new GraphQLList(require('./explanationofbenefitrelated.schema.js')), + description: + 'Other claims which are related to this claim such as prior claim versions or for related services.', + }, + prescription: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitprescription_prescription_Union', description: 'Prescription to support the dispensing of Pharmacy or Vision products.', - }, - originalPrescription: { - type: require('./reference.schema'), + types: () => [ + require('./medicationrequest.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, + }), + description: + 'Prescription to support the dispensing of Pharmacy or Vision products.', + }, + originalPrescription: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefitoriginalPrescription_originalPrescription_Union', description: "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new precription for an alternate medication which has the same theraputic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", - }, - payee: { - type: require('./explanationofbenefitpayee.schema'), - description: 'The party to be reimbursed for the services.', - }, - information: { - type: new GraphQLList( - require('./explanationofbenefitinformation.schema'), - ), - description: - 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', - }, - careTeam: { - type: new GraphQLList(require('./explanationofbenefitcareteam.schema')), - description: - 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', - }, - diagnosis: { - type: new GraphQLList( - require('./explanationofbenefitdiagnosis.schema'), - ), - description: - 'Ordered list of patient diagnosis for which care is sought.', - }, - procedure: { - type: new GraphQLList( - require('./explanationofbenefitprocedure.schema'), - ), - description: - 'Ordered list of patient procedures performed to support the adjudication.', - }, - precedence: { - type: PositiveIntScalar, - description: 'Precedence (primary, secondary, etc.).', - }, - _precedence: { - type: require('./element.schema'), - description: 'Precedence (primary, secondary, etc.).', - }, - insurance: { - type: require('./explanationofbenefitinsurance.schema'), - description: - 'Financial instrument by which payment information for health care.', - }, - accident: { - type: require('./explanationofbenefitaccident.schema'), - description: - 'An accident which resulted in the need for healthcare services.', - }, - employmentImpacted: { - type: require('./period.schema'), - description: - 'The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).', - }, - hospitalization: { - type: require('./period.schema'), - description: - 'The start and optional end dates of when the patient was confined to a treatment center.', - }, - item: { - type: new GraphQLList(require('./explanationofbenefititem.schema')), - description: 'First tier of goods and services.', - }, - addItem: { - type: new GraphQLList(require('./explanationofbenefitadditem.schema')), - description: - 'The first tier service adjudications for payor added services.', - }, - totalCost: { - type: require('./money.schema'), - description: 'The total cost of the services reported.', - }, - unallocDeductable: { - type: require('./money.schema'), - description: - 'The amount of deductable applied which was not allocated to any particular service line.', - }, - totalBenefit: { - type: require('./money.schema'), - description: - 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable).', - }, - payment: { - type: require('./explanationofbenefitpayment.schema'), - description: - 'Payment details for the claim if the claim has been paid.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.schema'), - description: 'The form to be used for printing the content.', - }, - processNote: { - type: new GraphQLList( - require('./explanationofbenefitprocessnote.schema'), - ), - description: 'Note text.', - }, - benefitBalance: { - type: new GraphQLList( - require('./explanationofbenefitbenefitbalance.schema'), - ), - description: 'Balance by Benefit Category.', - }, - }), + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + description: + "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new precription for an alternate medication which has the same theraputic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", + }, + payee: { + type: require('./explanationofbenefitpayee.schema.js'), + description: 'The party to be reimbursed for the services.', + }, + information: { + type: new GraphQLList( + require('./explanationofbenefitinformation.schema.js'), + ), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', + }, + careTeam: { + type: new GraphQLList( + require('./explanationofbenefitcareteam.schema.js'), + ), + description: + 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', + }, + diagnosis: { + type: new GraphQLList( + require('./explanationofbenefitdiagnosis.schema.js'), + ), + description: + 'Ordered list of patient diagnosis for which care is sought.', + }, + procedure: { + type: new GraphQLList( + require('./explanationofbenefitprocedure.schema.js'), + ), + description: + 'Ordered list of patient procedures performed to support the adjudication.', + }, + _precedence: { + type: require('./element.schema.js'), + description: 'Precedence (primary, secondary, etc.).', + }, + precedence: { + type: PositiveIntScalar, + description: 'Precedence (primary, secondary, etc.).', + }, + insurance: { + type: require('./explanationofbenefitinsurance.schema.js'), + description: + 'Financial instrument by which payment information for health care.', + }, + accident: { + type: require('./explanationofbenefitaccident.schema.js'), + description: + 'An accident which resulted in the need for healthcare services.', + }, + employmentImpacted: { + type: require('./period.schema.js'), + description: + 'The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).', + }, + hospitalization: { + type: require('./period.schema.js'), + description: + 'The start and optional end dates of when the patient was confined to a treatment center.', + }, + item: { + type: new GraphQLList(require('./explanationofbenefititem.schema.js')), + description: 'First tier of goods and services.', + }, + addItem: { + type: new GraphQLList(require('./explanationofbenefitadditem.schema.js')), + description: + 'The first tier service adjudications for payor added services.', + }, + totalCost: { + type: require('./money.schema.js'), + description: 'The total cost of the services reported.', + }, + unallocDeductable: { + type: require('./money.schema.js'), + description: + 'The amount of deductable applied which was not allocated to any particular service line.', + }, + totalBenefit: { + type: require('./money.schema.js'), + description: + 'Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable).', + }, + payment: { + type: require('./explanationofbenefitpayment.schema.js'), + description: 'Payment details for the claim if the claim has been paid.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.schema.js'), + description: 'The form to be used for printing the content.', + }, + processNote: { + type: new GraphQLList( + require('./explanationofbenefitprocessnote.schema.js'), + ), + description: 'Note text.', + }, + benefitBalance: { + type: new GraphQLList( + require('./explanationofbenefitbenefitbalance.schema.js'), + ), + description: 'Balance by Benefit Category.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitaccident.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitaccident.schema.js index 52cf2344..eb37266c 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitaccident.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitaccident.schema.js @@ -1,38 +1,69 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.accident Schema + * @summary ExplanationOfBenefitaccident Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitAccident', - description: - 'An accident which resulted in the need for healthcare services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - date: { - type: DateScalar, - description: 'Date of an accident which these services are addressing.', - }, - _date: { - type: require('./element.schema'), - description: 'Date of an accident which these services are addressing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode - type: { - type: require('./codeableconcept.schema'), - description: 'Type of accident: work, auto, etc.', - }, - locationAddress: { - type: require('./address.schema'), - description: 'Where the accident occurred.', - }, - locationReference: { - type: require('./reference.schema'), + name: 'ExplanationOfBenefitaccident', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date of an accident which these services are addressing.', + }, + date: { + type: DateScalar, + description: 'Date of an accident which these services are addressing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActIncidentCode + type: { + type: require('./codeableconcept.schema.js'), + description: 'Type of accident: work, auto, etc.', + }, + locationAddress: { + type: require('./address.schema.js'), + description: 'Where the accident occurred.', + }, + locationReference: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefitaccidentlocationReference_locationReference_Union', description: 'Where the accident occurred.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the accident occurred.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitadditem.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitadditem.schema.js index 29fcea20..ad65535c 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitadditem.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitadditem.schema.js @@ -1,69 +1,86 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.addItem Schema + * @summary ExplanationOfBenefitaddItem Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitAddItem', - description: 'The first tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'List of input service items which this service line is intended to replace.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: - 'List of input service items which this service line is intended to replace.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - fee: { - type: require('./money.schema'), - description: 'The fee charged for the professional service or product.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - detail: { - type: new GraphQLList( - require('./explanationofbenefitadditemdetail.schema'), - ), - description: - 'The second tier service adjudications for payor added services.', - }, - }), + name: 'ExplanationOfBenefitaddItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: + 'List of input service items which this service line is intended to replace.', + }, + sequenceLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'List of input service items which this service line is intended to replace.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + fee: { + type: require('./money.schema.js'), + description: 'The fee charged for the professional service or product.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + detail: { + type: new GraphQLList( + require('./explanationofbenefitadditemdetail.schema.js'), + ), + description: + 'The second tier service adjudications for payor added services.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitadditemdetail.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitadditemdetail.schema.js index e540b48d..97e01ba4 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitadditemdetail.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitadditemdetail.schema.js @@ -1,53 +1,69 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.addItem.detail Schema + * @summary ExplanationOfBenefitaddItemdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitAddItemDetail', - description: - 'The second tier service adjudications for payor added services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - fee: { - type: require('./money.schema'), - description: 'The fee charged for the professional service or product.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - }), + name: 'ExplanationOfBenefitaddItemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + fee: { + type: require('./money.schema.js'), + description: 'The fee charged for the professional service or product.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitbenefitbalance.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitbenefitbalance.schema.js index ffab0750..23f2d3e5 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitbenefitbalance.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitbenefitbalance.schema.js @@ -1,84 +1,101 @@ const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ExplanationOfBenefit.benefitBalance Schema + * @summary ExplanationOfBenefitbenefitBalance Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitBenefitBalance', - description: 'Balance by Benefit Category.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-category - category: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - subCategory: { - type: require('./codeableconcept.schema'), - description: - 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', - }, - excluded: { - type: GraphQLBoolean, - description: - 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', - }, - _excluded: { - type: require('./element.schema'), - description: - 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', - }, - name: { - type: GraphQLString, - description: - 'A short name or tag for the benefit, for example MED01, or DENT2.', - }, - _name: { - type: require('./element.schema'), - description: - 'A short name or tag for the benefit, for example MED01, or DENT2.', - }, - description: { - type: GraphQLString, - description: - "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", - }, - _description: { - type: require('./element.schema'), - description: - "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-network - network: { - type: require('./codeableconcept.schema'), - description: 'Network designation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-unit - unit: { - type: require('./codeableconcept.schema'), - description: 'Unit designation: individual or family.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-term - term: { - type: require('./codeableconcept.schema'), - description: - "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", - }, - financial: { - type: new GraphQLList( - require('./explanationofbenefitbenefitbalancefinancial.schema'), - ), - description: 'Benefits Used to date.', - }, - }), + name: 'ExplanationOfBenefitbenefitBalance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-category + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Dental, Vision, Medical, Pharmacy, Rehab etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + subCategory: { + type: require('./codeableconcept.schema.js'), + description: + 'Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.', + }, + _excluded: { + type: require('./element.schema.js'), + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', + }, + excluded: { + type: GraphQLBoolean, + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicated the service is included in the coverage.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A short name or tag for the benefit, for example MED01, or DENT2.', + }, + name: { + type: GraphQLString, + description: + 'A short name or tag for the benefit, for example MED01, or DENT2.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", + }, + description: { + type: GraphQLString, + description: + "A richer description of the benefit, for example 'DENT2 covers 100% of basic, 50% of major but exclused Ortho, Implants and Costmetic services'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-network + network: { + type: require('./codeableconcept.schema.js'), + description: 'Network designation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-unit + unit: { + type: require('./codeableconcept.schema.js'), + description: 'Unit designation: individual or family.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-term + term: { + type: require('./codeableconcept.schema.js'), + description: + "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", + }, + financial: { + type: new GraphQLList( + require('./explanationofbenefitbenefitbalancefinancial.schema.js'), + ), + description: 'Benefits Used to date.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitbenefitbalancefinancial.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitbenefitbalancefinancial.schema.js index 3966b9d4..f439e933 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitbenefitbalancefinancial.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitbenefitbalancefinancial.schema.js @@ -1,53 +1,75 @@ -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.benefitBalance.financial Schema + * @summary ExplanationOfBenefitbenefitBalancefinancial Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitBenefitBalanceFinancial', - description: 'Benefits Used to date.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Deductable, visits, benefit amount.', - }, - allowedUnsignedInt: { - type: UnsignedIntScalar, - description: 'Benefits allowed.', - }, - _allowedUnsignedInt: { - type: require('./element.schema'), - description: 'Benefits allowed.', - }, - allowedString: { - type: GraphQLString, - description: 'Benefits allowed.', - }, - _allowedString: { - type: require('./element.schema'), - description: 'Benefits allowed.', - }, - allowedMoney: { - type: require('./money.schema'), - description: 'Benefits allowed.', - }, - usedUnsignedInt: { - type: UnsignedIntScalar, - description: 'Benefits used.', - }, - _usedUnsignedInt: { - type: require('./element.schema'), - description: 'Benefits used.', - }, - usedMoney: { - type: require('./money.schema'), - description: 'Benefits used.', - }, - }), + name: 'ExplanationOfBenefitbenefitBalancefinancial', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Deductable, visits, benefit amount.', + }, + _allowedUnsignedInt: { + type: require('./element.schema.js'), + description: 'Benefits allowed.', + }, + allowedUnsignedInt: { + type: UnsignedIntScalar, + description: 'Benefits allowed.', + }, + _allowedString: { + type: require('./element.schema.js'), + description: 'Benefits allowed.', + }, + allowedString: { + type: GraphQLString, + description: 'Benefits allowed.', + }, + allowedMoney: { + type: require('./money.schema.js'), + description: 'Benefits allowed.', + }, + _usedUnsignedInt: { + type: require('./element.schema.js'), + description: 'Benefits used.', + }, + usedUnsignedInt: { + type: UnsignedIntScalar, + description: 'Benefits used.', + }, + usedMoney: { + type: require('./money.schema.js'), + description: 'Benefits used.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitcareteam.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitcareteam.schema.js index df1acefb..8068a17d 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitcareteam.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitcareteam.schema.js @@ -1,57 +1,93 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.careTeam Schema + * @summary ExplanationOfBenefitcareTeam Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitCareTeam', - description: - 'The members of the team who provided the overall service as well as their role and whether responsible and qualifications.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of careteam which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Sequence of careteam which serves to order and provide a link.', - }, - provider: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The members of the team who provided the overall service.', - }, - responsible: { - type: GraphQLBoolean, - description: - 'The practitioner who is billing and responsible for the claimed services rendered to the patient.', - }, - _responsible: { - type: require('./element.schema'), - description: - 'The practitioner who is billing and responsible for the claimed services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-careteamrole - role: { - type: require('./codeableconcept.schema'), - description: - 'The lead, assisting or supervising practitioner and their discipline if a multidisiplinary team.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/provider-qualification - qualification: { - type: require('./codeableconcept.schema'), - description: 'The qualification which is applicable for this service.', - }, - }), + name: 'ExplanationOfBenefitcareTeam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Sequence of careteam which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of careteam which serves to order and provide a link.', + }, + provider: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ExplanationOfBenefitcareTeamprovider_provider_Union', + description: + 'The members of the team who provided the overall service.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The members of the team who provided the overall service.', + }, + _responsible: { + type: require('./element.schema.js'), + description: + 'The practitioner who is billing and responsible for the claimed services rendered to the patient.', + }, + responsible: { + type: GraphQLBoolean, + description: + 'The practitioner who is billing and responsible for the claimed services rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-careteamrole + role: { + type: require('./codeableconcept.schema.js'), + description: + 'The lead, assisting or supervising practitioner and their discipline if a multidisiplinary team.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provider-qualification + qualification: { + type: require('./codeableconcept.schema.js'), + description: 'The qualification which is applicable for this service.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitdiagnosis.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitdiagnosis.schema.js index 10adf563..eb39f749 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitdiagnosis.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitdiagnosis.schema.js @@ -1,46 +1,81 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.diagnosis Schema + * @summary ExplanationOfBenefitdiagnosis Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitDiagnosis', - description: 'Ordered list of patient diagnosis for which care is sought.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'Sequence of diagnosis which serves to provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: 'Sequence of diagnosis which serves to provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosisCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10 - diagnosisReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The diagnosis.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosistype - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The type of the Diagnosis, for example: admitting, primary, secondary, discharge.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup - packageCode: { - type: require('./codeableconcept.schema'), - description: - 'The package billing code, for example DRG, based on the assigned grouping code system.', - }, - }), + name: 'ExplanationOfBenefitdiagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'Sequence of diagnosis which serves to provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'Sequence of diagnosis which serves to provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosisCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10 + diagnosisReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ExplanationOfBenefitdiagnosisdiagnosisReference_diagnosisReference_Union', + description: 'The diagnosis.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: 'The diagnosis.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosistype + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of the Diagnosis, for example: admitting, primary, secondary, discharge.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup + packageCode: { + type: require('./codeableconcept.schema.js'), + description: + 'The package billing code, for example DRG, based on the assigned grouping code system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitinformation.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitinformation.schema.js index a98219c1..a23875ea 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitinformation.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitinformation.schema.js @@ -1,86 +1,116 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.information Schema + * @summary ExplanationOfBenefitinformation Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitInformation', - description: - 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues. Often there are mutiple jurisdiction specific valuesets which are required.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of the information element which serves to provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Sequence of the information element which serves to provide a link.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-informationcategory - category: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-exception - code: { - type: require('./codeableconcept.schema'), - description: - 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.', - }, - timingDate: { - type: DateScalar, - description: - 'The date when or period to which this information refers.', - }, - _timingDate: { - type: require('./element.schema'), - description: - 'The date when or period to which this information refers.', - }, - timingPeriod: { - type: require('./period.schema'), - description: - 'The date when or period to which this information refers.', - }, - valueString: { - type: GraphQLString, + name: 'ExplanationOfBenefitinformation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Sequence of the information element which serves to provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of the information element which serves to provide a link.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-informationcategory + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-exception + code: { + type: require('./codeableconcept.schema.js'), + description: + 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.', + }, + _timingDate: { + type: require('./element.schema.js'), + description: 'The date when or period to which this information refers.', + }, + timingDate: { + type: DateScalar, + description: 'The date when or period to which this information refers.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: 'The date when or period to which this information refers.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueString: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueReference: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefitinformationvalueReference_valueReference_Union', description: 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - valueReference: { - type: require('./reference.schema'), - description: - 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason - reason: { - type: require('./coding.schema'), - description: - 'For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/missing-tooth-reason + reason: { + type: require('./coding.schema.js'), + description: + 'For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitinsurance.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitinsurance.schema.js index 6f46a8cc..8f546365 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitinsurance.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitinsurance.schema.js @@ -1,31 +1,62 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ExplanationOfBenefit.insurance Schema + * @summary ExplanationOfBenefitinsurance Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitInsurance', - description: - 'Financial instrument by which payment information for health care.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - coverage: { - type: require('./reference.schema'), + name: 'ExplanationOfBenefitinsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + coverage: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitinsurancecoverage_coverage_Union', description: 'Reference to the program or plan identification, underwriter or payor.', - }, - preAuthRef: { - type: new GraphQLList(GraphQLString), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - _preAuthRef: { - type: require('./element.schema'), - description: - 'A list of references from the Insurer to which these services pertain.', - }, - }), + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'A list of references from the Insurer to which these services pertain.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefititem.schema.js b/src/resources/3_0_1/schemas/explanationofbenefititem.schema.js index ae271633..43b48106 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefititem.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefititem.schema.js @@ -1,189 +1,242 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLUnionType, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.item Schema + * @summary ExplanationOfBenefititem Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitItem', - description: 'First tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - careTeamLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Careteam applicable for this service or product line.', - }, - _careTeamLinkId: { - type: require('./element.schema'), - description: 'Careteam applicable for this service or product line.', - }, - diagnosisLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Diagnosis applicable for this service or product line.', - }, - _diagnosisLinkId: { - type: require('./element.schema'), - description: 'Diagnosis applicable for this service or product line.', - }, - procedureLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: 'Procedures applicable for this service or product line.', - }, - _procedureLinkId: { - type: require('./element.schema'), - description: 'Procedures applicable for this service or product line.', - }, - informationLinkId: { - type: new GraphQLList(PositiveIntScalar), - description: - 'Exceptions, special conditions and supporting information pplicable for this service or product line.', - }, - _informationLinkId: { - type: require('./element.schema'), - description: - 'Exceptions, special conditions and supporting information pplicable for this service or product line.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - servicedDate: { - type: DateScalar, - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - _servicedDate: { - type: require('./element.schema'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - servicedPeriod: { - type: require('./period.schema'), - description: - 'The date or dates when the enclosed suite of services were performed or completed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'Where the service was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationAddress: { - type: require('./address.schema'), - description: 'Where the service was provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-place - locationReference: { - type: require('./reference.schema'), + name: 'ExplanationOfBenefititem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + _careTeamLinkId: { + type: require('./element.schema.js'), + description: 'Careteam applicable for this service or product line.', + }, + careTeamLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Careteam applicable for this service or product line.', + }, + _diagnosisLinkId: { + type: require('./element.schema.js'), + description: 'Diagnosis applicable for this service or product line.', + }, + diagnosisLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnosis applicable for this service or product line.', + }, + _procedureLinkId: { + type: require('./element.schema.js'), + description: 'Procedures applicable for this service or product line.', + }, + procedureLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: 'Procedures applicable for this service or product line.', + }, + _informationLinkId: { + type: require('./element.schema.js'), + description: + 'Exceptions, special conditions and supporting information pplicable for this service or product line.', + }, + informationLinkId: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information pplicable for this service or product line.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Where the service was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationAddress: { + type: require('./address.schema.js'), + description: 'Where the service was provided.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-place + locationReference: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefititemlocationReference_locationReference_Union', description: 'Where the service was provided.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.schema'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.schema'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.schema')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/tooth - bodySite: { - type: require('./codeableconcept.schema'), - description: 'Physical service site on the patient (limb, tooth, etc).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/surface - subSite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A region or surface of the site, eg. limb region or tooth surface(s).', - }, - encounter: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A billed item may include goods or services provided in multiple encounters.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - adjudication: { - type: new GraphQLList( - require('./explanationofbenefititemadjudication.schema'), - ), - description: 'The adjudications results.', - }, - detail: { - type: new GraphQLList( - require('./explanationofbenefititemdetail.schema'), - ), - description: 'Second tier of goods and services.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the service was provided.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefititemudi_udi_Union', + description: + 'List of Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/tooth + bodySite: { + type: require('./codeableconcept.schema.js'), + description: 'Physical service site on the patient (limb, tooth, etc).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/surface + subSite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A region or surface of the site, eg. limb region or tooth surface(s).', + }, + encounter: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefititemencounter_encounter_Union', + description: + 'A billed item may include goods or services provided in multiple encounters.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + ), + description: + 'A billed item may include goods or services provided in multiple encounters.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + adjudication: { + type: new GraphQLList( + require('./explanationofbenefititemadjudication.schema.js'), + ), + description: 'The adjudications results.', + }, + detail: { + type: new GraphQLList( + require('./explanationofbenefititemdetail.schema.js'), + ), + description: 'Second tier of goods and services.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefititemadjudication.schema.js b/src/resources/3_0_1/schemas/explanationofbenefititemadjudication.schema.js index f9ac2662..38aa5ccc 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefititemadjudication.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefititemadjudication.schema.js @@ -1,40 +1,63 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ExplanationOfBenefit.item.adjudication Schema + * @summary ExplanationOfBenefititemadjudication Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitItemAdjudication', - description: 'The adjudications results.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication - category: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-reason - reason: { - type: require('./codeableconcept.schema'), - description: 'Adjudication reason such as limit reached.', - }, - amount: { - type: require('./money.schema'), - description: 'Monitory amount associated with the code.', - }, - value: { - type: GraphQLFloat, - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - _value: { - type: require('./element.schema'), - description: - 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', - }, - }), + name: 'ExplanationOfBenefititemadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-reason + reason: { + type: require('./codeableconcept.schema.js'), + description: 'Adjudication reason such as limit reached.', + }, + amount: { + type: require('./money.schema.js'), + description: 'Monitory amount associated with the code.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value for example a percentage. Mutually exclusive to the amount element above.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefititemdetail.schema.js b/src/resources/3_0_1/schemas/explanationofbenefititemdetail.schema.js index fb430781..a6dfdf96 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefititemdetail.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefititemdetail.schema.js @@ -1,107 +1,138 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.item.detail Schema + * @summary ExplanationOfBenefititemdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitItemDetail', - description: 'Second tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The type of product or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.schema'), - description: - 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.schema'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.schema')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - subDetail: { - type: new GraphQLList( - require('./explanationofbenefititemdetailsubdetail.schema'), - ), - description: 'Third tier of goods and services.', - }, - }), + name: 'ExplanationOfBenefititemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The type of product or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + "If this is an actual service or product line, ie. not a Group, then use code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI). If a grouping item then use a group code to indicate the type of thing being grouped eg. 'glasses' or 'compound'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefititemdetailudi_udi_Union', + description: + 'List of Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + subDetail: { + type: new GraphQLList( + require('./explanationofbenefititemdetailsubdetail.schema.js'), + ), + description: 'Third tier of goods and services.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefititemdetailsubdetail.schema.js b/src/resources/3_0_1/schemas/explanationofbenefititemdetailsubdetail.schema.js index 47649576..53dcb6ae 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefititemdetailsubdetail.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefititemdetailsubdetail.schema.js @@ -1,100 +1,131 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.item.detail.subDetail Schema + * @summary ExplanationOfBenefititemdetailsubDetail Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitItemDetailSubDetail', - description: 'Third tier of goods and services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'A service line number.', - }, - _sequence: { - type: require('./element.schema'), - description: 'A service line number.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The type of product or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center - revenue: { - type: require('./codeableconcept.schema'), - description: - 'The type of reveneu or cost center providing the product and/or service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory - category: { - type: require('./codeableconcept.schema'), - description: - 'Health Care Service Type Codes to identify the classification of service or benefits.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-uscls - service: { - type: require('./codeableconcept.schema'), - description: - 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers - modifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code - programCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The number of repetitions of a service or product.', - }, - unitPrice: { - type: require('./money.schema'), - description: 'The fee for an addittional service or product or charge.', - }, - factor: { - type: GraphQLFloat, - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', - }, - net: { - type: require('./money.schema'), - description: - 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', - }, - udi: { - type: new GraphQLList(require('./reference.schema')), - description: - 'List of Unique Device Identifiers associated with this line item.', - }, - noteNumber: { - type: new GraphQLList(PositiveIntScalar), - description: 'A list of note references to the notes provided below.', - }, - _noteNumber: { - type: require('./element.schema'), - description: 'A list of note references to the notes provided below.', - }, - }), + name: 'ExplanationOfBenefititemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A service line number.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The type of product or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-revenue-center + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of reveneu or cost center providing the product and/or service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/benefit-subcategory + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Health Care Service Type Codes to identify the classification of service or benefits.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-uscls + service: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to indicate the Professional Service or Product supplied (eg. CTP, HCPCS,USCLS,ICD10, NCPDP,DIN,ACHI,CCI).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/claim-modifiers + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or for medical whether the treatment was outside the clinic or out of office hours.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-program-code + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: 'The fee for an addittional service or product or charge.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefititemdetailsubDetailudi_udi_Union', + description: + 'List of Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'List of Unique Device Identifiers associated with this line item.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: 'A list of note references to the notes provided below.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: 'A list of note references to the notes provided below.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitpayee.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitpayee.schema.js index 78b6cebd..ccda2f4e 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitpayee.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitpayee.schema.js @@ -1,30 +1,75 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ExplanationOfBenefit.payee Schema + * @summary ExplanationOfBenefitpayee Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitPayee', - description: 'The party to be reimbursed for the services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payeetype - type: { - type: require('./codeableconcept.schema'), - description: - 'Type of Party to be reimbursed: Subscriber, provider, other.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-type-link - resourceType: { - type: require('./codeableconcept.schema'), - description: 'organization | patient | practitioner | relatedperson.', - }, - party: { - type: require('./reference.schema'), + name: 'ExplanationOfBenefitpayee', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payeetype + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Party to be reimbursed: Subscriber, provider, other.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-type-link + resourceType: { + type: require('./codeableconcept.schema.js'), + description: 'organization | patient | practitioner | relatedperson.', + }, + party: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitpayeeparty_party_Union', description: 'Party to be reimbursed: Subscriber, provider, other.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Party to be reimbursed: Subscriber, provider, other.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitpayment.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitpayment.schema.js index 815f8417..10f4037a 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitpayment.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitpayment.schema.js @@ -1,48 +1,65 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.payment Schema + * @summary ExplanationOfBenefitpayment Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitPayment', - description: 'Payment details for the claim if the claim has been paid.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/ex-paymenttype - type: { - type: require('./codeableconcept.schema'), - description: - 'Whether this represents partial or complete payment of the claim.', - }, - adjustment: { - type: require('./money.schema'), - description: - 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-adjustment-reason - adjustmentReason: { - type: require('./codeableconcept.schema'), - description: 'Reason for the payment adjustment.', - }, - date: { - type: DateScalar, - description: 'Estimated payment date.', - }, - _date: { - type: require('./element.schema'), - description: 'Estimated payment date.', - }, - amount: { - type: require('./money.schema'), - description: 'Payable less any payment adjustment.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Payment identifer.', - }, - }), + name: 'ExplanationOfBenefitpayment', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/ex-paymenttype + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether this represents partial or complete payment of the claim.', + }, + adjustment: { + type: require('./money.schema.js'), + description: + 'Adjustment to the payment of this transaction which is not related to adjudication of this transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-adjustment-reason + adjustmentReason: { + type: require('./codeableconcept.schema.js'), + description: 'Reason for the payment adjustment.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Estimated payment date.', + }, + date: { + type: DateScalar, + description: 'Estimated payment date.', + }, + amount: { + type: require('./money.schema.js'), + description: 'Payable less any payment adjustment.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Payment identifer.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitprocedure.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitprocedure.schema.js index c1654c17..9b58bcd3 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitprocedure.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitprocedure.schema.js @@ -1,46 +1,80 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.procedure Schema + * @summary ExplanationOfBenefitprocedure Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitProcedure', - description: - 'Ordered list of patient procedures performed to support the adjudication.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequence: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'Sequence of procedures which serves to order and provide a link.', - }, - _sequence: { - type: require('./element.schema'), - description: - 'Sequence of procedures which serves to order and provide a link.', - }, - date: { - type: DateTimeScalar, - description: 'Date and optionally time the procedure was performed .', - }, - _date: { - type: require('./element.schema'), - description: 'Date and optionally time the procedure was performed .', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures - procedureCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The procedure code.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures - procedureReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The procedure code.', - }, - }), + name: 'ExplanationOfBenefitprocedure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Sequence of procedures which serves to order and provide a link.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'Sequence of procedures which serves to order and provide a link.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date and optionally time the procedure was performed .', + }, + date: { + type: DateTimeScalar, + description: 'Date and optionally time the procedure was performed .', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures + procedureCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The procedure code.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/icd-10-procedures + procedureReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ExplanationOfBenefitprocedureprocedureReference_procedureReference_Union', + description: 'The procedure code.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: 'The procedure code.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitprocessnote.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitprocessnote.schema.js index 0d227403..d6e9496c 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitprocessnote.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitprocessnote.schema.js @@ -1,45 +1,62 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ExplanationOfBenefit.processNote Schema + * @summary ExplanationOfBenefitprocessNote Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitProcessNote', - description: 'Note text.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - number: { - type: PositiveIntScalar, - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - _number: { - type: require('./element.schema'), - description: - 'An integer associated with each note which may be referred to from each service line item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./codeableconcept.schema'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.schema'), - description: 'The note text.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: require('./codeableconcept.schema'), - description: - "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", - }, - }), + name: 'ExplanationOfBenefitprocessNote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _number: { + type: require('./element.schema.js'), + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + number: { + type: PositiveIntScalar, + description: + 'An integer associated with each note which may be referred to from each service line item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./codeableconcept.schema.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: require('./codeableconcept.schema.js'), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/explanationofbenefitrelated.schema.js b/src/resources/3_0_1/schemas/explanationofbenefitrelated.schema.js index 4dcfd1b5..d5bf31a8 100644 --- a/src/resources/3_0_1/schemas/explanationofbenefitrelated.schema.js +++ b/src/resources/3_0_1/schemas/explanationofbenefitrelated.schema.js @@ -1,31 +1,62 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ExplanationOfBenefit.related Schema + * @summary ExplanationOfBenefitrelated Schema */ module.exports = new GraphQLObjectType({ - name: 'ExplanationOfBenefitRelated', - description: - 'Other claims which are related to this claim such as prior claim versions or for related services.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - claim: { - type: require('./reference.schema'), + name: 'ExplanationOfBenefitrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + claim: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitrelatedclaim_claim_Union', description: 'Other claims which are related to this claim such as prior claim versions or for related services.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship - relationship: { - type: require('./codeableconcept.schema'), - description: 'For example prior or umbrella.', - }, - reference: { - type: require('./identifier.schema'), - description: - 'An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .', - }, - }), + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: + 'Other claims which are related to this claim such as prior claim versions or for related services.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship + relationship: { + type: require('./codeableconcept.schema.js'), + description: 'For example prior or umbrella.', + }, + reference: { + type: require('./identifier.schema.js'), + description: + 'An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/extension.schema.js b/src/resources/3_0_1/schemas/extension.schema.js index 2f04a65e..0c90a997 100644 --- a/src/resources/3_0_1/schemas/extension.schema.js +++ b/src/resources/3_0_1/schemas/extension.schema.js @@ -1,24 +1,24 @@ -const UriScalar = require('../scalars/uri.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, - GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -26,288 +26,302 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Extension', - description: 'Base StructureDefinition for Extension Type.', - fields: () => - extendSchema(require('./element.schema'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'Source of the definition for the extension code - a logical name or a URL.', - }, - _url: { - type: require('./element.schema'), - description: - 'Source of the definition for the extension code - a logical name or a URL.', - }, - valueBase64Binary: { - type: Base64BinaryScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueBase64Binary: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueBoolean: { - type: GraphQLBoolean, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueBoolean: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCode: { - type: CodeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueCode: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDate: { - type: DateScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDate: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDecimal: { - type: GraphQLFloat, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueDecimal: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueId: { - type: IdScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueId: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueInstant: { - type: InstantScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueInstant: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueInteger: { - type: GraphQLInt, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueInteger: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMarkdown: { - type: GraphQLString, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueMarkdown: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueOid: { - type: OidScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueOid: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valuePositiveInt: { - type: PositiveIntScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valuePositiveInt: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueString: { - type: GraphQLString, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueString: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueTime: { - type: TimeScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueUnsignedInt: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueUri: { - type: UriScalar, - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - _valueUri: { - type: require('./element.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAddress: { - type: require('./address.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAge: { - type: require('./age.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAnnotation: { - type: require('./annotation.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCoding: { - type: require('./coding.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueContactPoint: { - type: require('./contactpoint.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueCount: { - type: require('./count.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDistance: { - type: require('./distance.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueDuration: { - type: require('./duration.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueHumanName: { - type: require('./humanname.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueIdentifier: { - type: require('./identifier.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMoney: { - type: require('./money.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valuePeriod: { - type: require('./period.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueRange: { - type: require('./range.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueRatio: { - type: require('./ratio.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueReference: { - type: require('./reference.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueSampledData: { - type: require('./sampleddata.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueSignature: { - type: require('./signature.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueTiming: { - type: require('./timing.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - valueMeta: { - type: require('./meta.schema'), - description: - 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', - }, - }), + description: 'Base StructureDefinition for Extension Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueCode: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCode: { + type: CodeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDate: { + type: DateScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueId: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueId: { + type: IdScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueInstant: { + type: InstantScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueInteger: { + type: GraphQLInt, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMarkdown: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueOid: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueOid: { + type: OidScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueString: { + type: GraphQLString, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueTime: { + type: TimeScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueUri: { + type: UriScalar, + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAddress: { + type: require('./address.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAge: { + type: require('./age.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCoding: { + type: require('./coding.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueCount: { + type: require('./count.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDistance: { + type: require('./distance.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueDuration: { + type: require('./duration.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueHumanName: { + type: require('./humanname.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMoney: { + type: require('./money.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueReference: { + type: require('./resourcelist.schema'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueSignature: { + type: require('./signature.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueTiming: { + type: require('./timing.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + valueMeta: { + type: require('./meta.schema.js'), + description: + 'Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/familymemberhistory.schema.js b/src/resources/3_0_1/schemas/familymemberhistory.schema.js index 43c24bc5..119ead08 100644 --- a/src/resources/3_0_1/schemas/familymemberhistory.schema.js +++ b/src/resources/3_0_1/schemas/familymemberhistory.schema.js @@ -1,23 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let FamilyMemberHistoryResourceType = new GraphQLEnumType({ - name: 'FamilyMemberHistoryResourceType', - values: { - FamilyMemberHistory: { value: 'FamilyMemberHistory' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,200 +19,315 @@ let FamilyMemberHistoryResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'FamilyMemberHistory', - description: 'Base StructureDefinition for FamilyMemberHistory Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(FamilyMemberHistoryResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A protocol or questionnaire that was adhered to in whole or in part by this event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/history-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code specifying the status of the record of the family history of a specific family member.', - }, - _status: { - type: require('./element.schema'), - description: - 'A code specifying the status of the record of the family history of a specific family member.', - }, - notDone: { - type: GraphQLBoolean, - description: - "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", - }, - _notDone: { - type: require('./element.schema'), - description: - "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/history-not-done-reason - notDoneReason: { - type: require('./codeableconcept.schema'), - description: "Describes why the family member's history is absent.", - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The person who this history concerns.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and possibly time) when the family member history was taken.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and possibly time) when the family member history was taken.', - }, - name: { - type: GraphQLString, - description: - "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", - }, - _name: { - type: require('./element.schema'), - description: - "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-FamilyMember - relationship: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The type of relationship this person has to the patient (father, mother, brother etc.).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', - }, - bornPeriod: { - type: require('./period.schema'), - description: 'The actual or approximate date of birth of the relative.', - }, - bornDate: { - type: DateScalar, - description: 'The actual or approximate date of birth of the relative.', - }, - _bornDate: { - type: require('./element.schema'), - description: 'The actual or approximate date of birth of the relative.', - }, - bornString: { - type: GraphQLString, - description: 'The actual or approximate date of birth of the relative.', - }, - _bornString: { - type: require('./element.schema'), - description: 'The actual or approximate date of birth of the relative.', - }, - ageAge: { - type: require('./age.schema'), - description: - 'The age of the relative at the time the family member history is recorded.', - }, - ageRange: { - type: require('./range.schema'), - description: - 'The age of the relative at the time the family member history is recorded.', - }, - ageString: { - type: GraphQLString, - description: - 'The age of the relative at the time the family member history is recorded.', - }, - _ageString: { - type: require('./element.schema'), - description: - 'The age of the relative at the time the family member history is recorded.', - }, - estimatedAge: { - type: GraphQLBoolean, - description: - 'If true, indicates that the age value specified is an estimated value.', - }, - _estimatedAge: { - type: require('./element.schema'), - description: - 'If true, indicates that the age value specified is an estimated value.', - }, - deceasedBoolean: { - type: GraphQLBoolean, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedBoolean: { - type: require('./element.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedAge: { - type: require('./age.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedRange: { - type: require('./range.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedDate: { - type: DateScalar, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedDate: { - type: require('./element.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - deceasedString: { - type: GraphQLString, - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - _deceasedString: { - type: require('./element.schema'), - description: - 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Describes why the family member history occurred in coded or textual form.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', - }, - condition: { - type: new GraphQLList(require('./familymemberhistorycondition.schema')), - description: - 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', - }, - }), + description: 'Base StructureDefinition for FamilyMemberHistory Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'FamilyMemberHistory_Enum_schema', + values: { FamilyMemberHistory: { value: 'FamilyMemberHistory' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'FamilyMemberHistorydefinition_definition_Union', + description: + 'A protocol or questionnaire that was adhered to in whole or in part by this event.', + types: () => [ + require('./plandefinition.schema.js'), + require('./questionnaire.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); + } + }, + }), + ), + description: + 'A protocol or questionnaire that was adhered to in whole or in part by this event.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying the status of the record of the family history of a specific family member.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/history-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the status of the record of the family history of a specific family member.', + }, + _notDone: { + type: require('./element.schema.js'), + description: + "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", + }, + notDone: { + type: GraphQLBoolean, + description: + "If true, indicates the taking of an individual family member's history did not occur. The notDone element should not be used to document negated conditions, such as a family member that did not have a condition.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/history-not-done-reason + notDoneReason: { + type: require('./codeableconcept.schema.js'), + description: "Describes why the family member's history is absent.", + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'FamilyMemberHistorypatient_patient_Union', + description: 'The person who this history concerns.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The person who this history concerns.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and possibly time) when the family member history was taken.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and possibly time) when the family member history was taken.', + }, + _name: { + type: require('./element.schema.js'), + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + name: { + type: GraphQLString, + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-FamilyMember + relationship: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The type of relationship this person has to the patient (father, mother, brother etc.).', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.', + }, + bornPeriod: { + type: require('./period.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + _bornDate: { + type: require('./element.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornDate: { + type: DateScalar, + description: 'The actual or approximate date of birth of the relative.', + }, + _bornString: { + type: require('./element.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornString: { + type: GraphQLString, + description: 'The actual or approximate date of birth of the relative.', + }, + ageAge: { + type: require('./age.schema.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + ageRange: { + type: require('./range.schema.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + _ageString: { + type: require('./element.schema.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + ageString: { + type: GraphQLString, + description: + 'The age of the relative at the time the family member history is recorded.', + }, + _estimatedAge: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the age value specified is an estimated value.', + }, + estimatedAge: { + type: GraphQLBoolean, + description: + 'If true, indicates that the age value specified is an estimated value.', + }, + _deceasedBoolean: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedAge: { + type: require('./age.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedRange: { + type: require('./range.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedDate: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedDate: { + type: DateScalar, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedString: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedString: { + type: GraphQLString, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Describes why the family member history occurred in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'FamilyMemberHistoryreasonReference_reasonReference_Union', + description: + 'Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./allergyintolerance.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: + 'Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', + }, + condition: { + type: new GraphQLList( + require('./familymemberhistorycondition.schema.js'), + ), + description: + 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/familymemberhistorycondition.schema.js b/src/resources/3_0_1/schemas/familymemberhistorycondition.schema.js index 4d82ac9e..33e4bc1d 100644 --- a/src/resources/3_0_1/schemas/familymemberhistorycondition.schema.js +++ b/src/resources/3_0_1/schemas/familymemberhistorycondition.schema.js @@ -1,63 +1,79 @@ const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary FamilyMemberHistory.condition Schema + * @summary FamilyMemberHistorycondition Schema */ module.exports = new GraphQLObjectType({ - name: 'FamilyMemberHistoryCondition', - description: - 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: - 'Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.', - }, - onsetAge: { - type: require('./age.schema'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetRange: { - type: require('./range.schema'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetPeriod: { - type: require('./period.schema'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - onsetString: { - type: GraphQLString, - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - _onsetString: { - type: require('./element.schema'), - description: - 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'An area where general notes can be placed about this specific condition.', - }, - }), + name: 'FamilyMemberHistorycondition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.', + }, + onsetAge: { + type: require('./age.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetRange: { + type: require('./range.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetPeriod: { + type: require('./period.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + _onsetString: { + type: require('./element.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetString: { + type: GraphQLString, + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'An area where general notes can be placed about this specific condition.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/flag.schema.js b/src/resources/3_0_1/schemas/flag.schema.js index 80471c0c..6923c4e5 100644 --- a/src/resources/3_0_1/schemas/flag.schema.js +++ b/src/resources/3_0_1/schemas/flag.schema.js @@ -1,20 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let FlagResourceType = new GraphQLEnumType({ - name: 'FlagResourceType', - values: { - Flag: { value: 'Flag' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,57 +15,189 @@ let FlagResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Flag', - description: 'Base StructureDefinition for Flag Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(FlagResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier assigned to the flag for external use (outside the FHIR environment).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Supports basic workflow.', - }, - _status: { - type: require('./element.schema'), - description: 'Supports basic workflow.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-category - category: { - type: require('./codeableconcept.schema'), - description: - 'Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/flag-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The coded value or textual component of the flag to display to the user.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The patient, location, group , organization , or practitioner, etc. this is about record this flag is associated with.', - }, - period: { - type: require('./period.schema'), - description: - 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', - }, - encounter: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Flag Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Flag_Enum_schema', + values: { Flag: { value: 'Flag' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier assigned to the flag for external use (outside the FHIR environment).', + }, + _status: { + type: require('./element.schema.js'), + description: 'Supports basic workflow.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Supports basic workflow.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Allows an flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/flag-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The coded value or textual component of the flag to display to the user.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Flagsubject_subject_Union', + description: + 'The patient, location, group , organization , or practitioner, etc. this is about record this flag is associated with.', + types: () => [ + require('./patient.schema.js'), + require('./location.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + require('./practitioner.schema.js'), + require('./plandefinition.schema.js'), + require('./medication.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'The patient, location, group , organization , or practitioner, etc. this is about record this flag is associated with.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Flagencounter_encounter_Union', description: 'This alert is only relevant during the encounter.', - }, - author: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'This alert is only relevant during the encounter.', + }, + author: { + type: new GraphQLUnionType({ + name: 'Flagauthor_author_Union', description: 'The person, organization or device that created the flag.', - }, - }), + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The person, organization or device that created the flag.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/goal.schema.js b/src/resources/3_0_1/schemas/goal.schema.js index 6117a506..a39ffbdf 100644 --- a/src/resources/3_0_1/schemas/goal.schema.js +++ b/src/resources/3_0_1/schemas/goal.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GoalResourceType = new GraphQLEnumType({ - name: 'GoalResourceType', - values: { - Goal: { value: 'Goal' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -23,113 +17,256 @@ let GoalResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Goal', - description: 'Base StructureDefinition for Goal Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(GoalResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the goal has been reached and is still considered relevant.', - }, - _status: { - type: require('./element.schema'), - description: - 'Indicates whether the goal has been reached and is still considered relevant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Indicates a category the goal falls within.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-priority - priority: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - description: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Goal Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Goal_Enum_schema', + values: { Goal: { value: 'Goal' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this care plan that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Indicates whether the goal has been reached and is still considered relevant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the goal has been reached and is still considered relevant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Indicates a category the goal falls within.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-priority + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + description: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'Goalsubject_subject_Union', description: 'Identifies the patient, group or organization for whom the goal is being established.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - startDate: { - type: DateScalar, - description: - 'The date or event after which the goal should begin being pursued.', - }, - _startDate: { - type: require('./element.schema'), - description: - 'The date or event after which the goal should begin being pursued.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - startCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The date or event after which the goal should begin being pursued.', - }, - target: { - type: require('./goaltarget.schema'), - description: 'Indicates what should be done by when.', - }, - statusDate: { - type: DateScalar, - description: - 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', - }, - _statusDate: { - type: require('./element.schema'), - description: - 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', - }, - statusReason: { - type: GraphQLString, - description: 'Captures the reason for the current status.', - }, - _statusReason: { - type: require('./element.schema'), - description: 'Captures the reason for the current status.', - }, - expressedBy: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the patient, group or organization for whom the goal is being established.', + }, + _startDate: { + type: require('./element.schema.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + startDate: { + type: DateScalar, + description: + 'The date or event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + startCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + target: { + type: require('./goaltarget.schema.js'), + description: 'Indicates what should be done by when.', + }, + _statusDate: { + type: require('./element.schema.js'), + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + statusDate: { + type: DateScalar, + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + _statusReason: { + type: require('./element.schema.js'), + description: 'Captures the reason for the current status.', + }, + statusReason: { + type: GraphQLString, + description: 'Captures the reason for the current status.', + }, + expressedBy: { + type: new GraphQLUnionType({ + name: 'GoalexpressedBy_expressedBy_Union', description: 'Indicates whose goal this is - patient goal, practitioner goal, etc.', - }, - addresses: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The identified conditions and other health record elements that are intended to be addressed by the goal.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: 'Any comments related to the goal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - outcomeCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Identifies the change (or lack of change) at the point when the status of the goal is assessed.', - }, - outcomeReference: { - type: new GraphQLList(require('./reference.schema')), - description: "Details of what's changed (or not changed).", - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Indicates whose goal this is - patient goal, practitioner goal, etc.', + }, + addresses: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Goaladdresses_addresses_Union', + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./medicationstatement.schema.js'), + require('./nutritionorder.schema.js'), + require('./procedurerequest.schema.js'), + require('./riskassessment.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); + } + }, + }), + ), + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Any comments related to the goal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + outcomeCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies the change (or lack of change) at the point when the status of the goal is assessed.', + }, + outcomeReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'GoaloutcomeReference_outcomeReference_Union', + description: "Details of what's changed (or not changed).", + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: "Details of what's changed (or not changed).", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/goaltarget.schema.js b/src/resources/3_0_1/schemas/goaltarget.schema.js index 43e4d323..eff2e0c8 100644 --- a/src/resources/3_0_1/schemas/goaltarget.schema.js +++ b/src/resources/3_0_1/schemas/goaltarget.schema.js @@ -1,52 +1,69 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary Goal.target Schema + * @summary Goaltarget Schema */ module.exports = new GraphQLObjectType({ - name: 'GoalTarget', - description: 'Indicates what should be done by when.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - measure: { - type: require('./codeableconcept.schema'), - description: - 'The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.', - }, - detailQuantity: { - type: require('./quantity.schema'), - description: - 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', - }, - detailRange: { - type: require('./range.schema'), - description: - 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', - }, - detailCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', - }, - dueDate: { - type: DateScalar, - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - _dueDate: { - type: require('./element.schema'), - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - dueDuration: { - type: require('./duration.schema'), - description: - 'Indicates either the date or the duration after start by which the goal should be met.', - }, - }), + name: 'Goaltarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + measure: { + type: require('./codeableconcept.schema.js'), + description: + 'The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.', + }, + detailQuantity: { + type: require('./quantity.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailRange: { + type: require('./range.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _dueDate: { + type: require('./element.schema.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + dueDate: { + type: DateScalar, + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + dueDuration: { + type: require('./duration.schema.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/graphdefinition.schema.js b/src/resources/3_0_1/schemas/graphdefinition.schema.js index 7311950a..38ec647d 100644 --- a/src/resources/3_0_1/schemas/graphdefinition.schema.js +++ b/src/resources/3_0_1/schemas/graphdefinition.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GraphDefinitionResourceType = new GraphQLEnumType({ - name: 'GraphDefinitionResourceType', - values: { - GraphDefinition: { value: 'GraphDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,142 +18,200 @@ let GraphDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'GraphDefinition', - description: 'Base StructureDefinition for GraphDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(GraphDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this graph definition is (or will be) published. The URL SHOULD include the major version of the graph definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this graph definition is (or will be) published. The URL SHOULD include the major version of the graph definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this graph definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this graph definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the graph definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the graph definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the graph definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the graph definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the graph definition from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the graph definition from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate graph definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the graph definition is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this graph definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this graph definition is needed and why it has been designed as it has.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - start: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of FHIR resource at which instances of this graph start.', - }, - _start: { - type: require('./element.schema'), - description: - 'The type of FHIR resource at which instances of this graph start.', - }, - profile: { - type: UriScalar, - description: 'The profile that describes the use of the base resource.', - }, - _profile: { - type: require('./element.schema'), - description: 'The profile that describes the use of the base resource.', - }, - link: { - type: new GraphQLList(require('./graphdefinitionlink.schema')), - description: 'Links this graph makes rules about.', - }, - }), + description: 'Base StructureDefinition for GraphDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'GraphDefinition_Enum_schema', + values: { GraphDefinition: { value: 'GraphDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this graph definition is (or will be) published. The URL SHOULD include the major version of the graph definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this graph definition is (or will be) published. The URL SHOULD include the major version of the graph definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this graph definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this graph definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the graph definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the graph definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the graph definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the graph definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the graph definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the graph definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate graph definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the graph definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this graph definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this graph definition is needed and why it has been designed as it has.', + }, + _start: { + type: require('./element.schema.js'), + description: + 'The type of FHIR resource at which instances of this graph start.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + start: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of FHIR resource at which instances of this graph start.', + }, + _profile: { + type: require('./element.schema.js'), + description: 'The profile that describes the use of the base resource.', + }, + profile: { + type: UriScalar, + description: 'The profile that describes the use of the base resource.', + }, + link: { + type: new GraphQLList(require('./graphdefinitionlink.schema.js')), + description: 'Links this graph makes rules about.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/graphdefinitionlink.schema.js b/src/resources/3_0_1/schemas/graphdefinitionlink.schema.js index e55590fe..806aef55 100644 --- a/src/resources/3_0_1/schemas/graphdefinitionlink.schema.js +++ b/src/resources/3_0_1/schemas/graphdefinitionlink.schema.js @@ -1,69 +1,86 @@ const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, - GraphQLInt, GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary GraphDefinition.link Schema + * @summary GraphDefinitionlink Schema */ module.exports = new GraphQLObjectType({ - name: 'GraphDefinitionLink', - description: 'Links this graph makes rules about.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - path: { - type: new GraphQLNonNull(GraphQLString), - description: 'Path in the resource that contains the link.', - }, - _path: { - type: require('./element.schema'), - description: 'Path in the resource that contains the link.', - }, - sliceName: { - type: GraphQLString, - description: 'Which slice (if profiled).', - }, - _sliceName: { - type: require('./element.schema'), - description: 'Which slice (if profiled).', - }, - min: { - type: GraphQLInt, - description: 'Minimum occurrences for this link.', - }, - _min: { - type: require('./element.schema'), - description: 'Minimum occurrences for this link.', - }, - max: { - type: GraphQLString, - description: 'Maximum occurrences for this link.', - }, - _max: { - type: require('./element.schema'), - description: 'Maximum occurrences for this link.', - }, - description: { - type: GraphQLString, - description: - 'Information about why this link is of interest in this graph definition.', - }, - _description: { - type: require('./element.schema'), - description: - 'Information about why this link is of interest in this graph definition.', - }, - target: { - type: new GraphQLList( - new GraphQLNonNull(require('./graphdefinitionlinktarget.schema')), - ), - description: 'Potential target for the link.', - }, - }), + name: 'GraphDefinitionlink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _path: { + type: require('./element.schema.js'), + description: 'Path in the resource that contains the link.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: 'Path in the resource that contains the link.', + }, + _sliceName: { + type: require('./element.schema.js'), + description: 'Which slice (if profiled).', + }, + sliceName: { + type: GraphQLString, + description: 'Which slice (if profiled).', + }, + _min: { + type: require('./element.schema.js'), + description: 'Minimum occurrences for this link.', + }, + min: { + type: GraphQLInt, + description: 'Minimum occurrences for this link.', + }, + _max: { + type: require('./element.schema.js'), + description: 'Maximum occurrences for this link.', + }, + max: { + type: GraphQLString, + description: 'Maximum occurrences for this link.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Information about why this link is of interest in this graph definition.', + }, + description: { + type: GraphQLString, + description: + 'Information about why this link is of interest in this graph definition.', + }, + target: { + type: new GraphQLList( + new GraphQLNonNull(require('./graphdefinitionlinktarget.schema.js')), + ), + description: 'Potential target for the link.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/graphdefinitionlinktarget.schema.js b/src/resources/3_0_1/schemas/graphdefinitionlinktarget.schema.js index 008262c0..65ec5802 100644 --- a/src/resources/3_0_1/schemas/graphdefinitionlinktarget.schema.js +++ b/src/resources/3_0_1/schemas/graphdefinitionlinktarget.schema.js @@ -1,40 +1,62 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary GraphDefinition.link.target Schema + * @summary GraphDefinitionlinktarget Schema */ module.exports = new GraphQLObjectType({ - name: 'GraphDefinitionLinkTarget', - description: 'Potential target for the link.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'Type of resource this link refers to.', - }, - _type: { - type: require('./element.schema'), - description: 'Type of resource this link refers to.', - }, - profile: { - type: UriScalar, - description: 'Profile for the target resource.', - }, - _profile: { - type: require('./element.schema'), - description: 'Profile for the target resource.', - }, - compartment: { - type: new GraphQLList( - require('./graphdefinitionlinktargetcompartment.schema'), - ), - description: 'Compartment Consistency Rules.', - }, - }), + name: 'GraphDefinitionlinktarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Type of resource this link refers to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'Type of resource this link refers to.', + }, + _profile: { + type: require('./element.schema.js'), + description: 'Profile for the target resource.', + }, + profile: { + type: UriScalar, + description: 'Profile for the target resource.', + }, + compartment: { + type: new GraphQLList( + require('./graphdefinitionlinktargetcompartment.schema.js'), + ), + description: 'Compartment Consistency Rules.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/graphdefinitionlinktargetcompartment.schema.js b/src/resources/3_0_1/schemas/graphdefinitionlinktargetcompartment.schema.js index e8a29cd4..56deddac 100644 --- a/src/resources/3_0_1/schemas/graphdefinitionlinktargetcompartment.schema.js +++ b/src/resources/3_0_1/schemas/graphdefinitionlinktargetcompartment.schema.js @@ -1,50 +1,72 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary GraphDefinition.link.target.compartment Schema + * @summary GraphDefinitionlinktargetcompartment Schema */ module.exports = new GraphQLObjectType({ - name: 'GraphDefinitionLinkTargetCompartment', - description: 'Compartment Consistency Rules.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/compartment-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'Identifies the compartment.', - }, - _code: { - type: require('./element.schema'), - description: 'Identifies the compartment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/graph-compartment-rule - rule: { - type: new GraphQLNonNull(CodeScalar), - description: 'identical | matching | different | no-rule | custom.', - }, - _rule: { - type: require('./element.schema'), - description: 'identical | matching | different | no-rule | custom.', - }, - expression: { - type: GraphQLString, - description: 'Custom rule, as a FHIRPath expression.', - }, - _expression: { - type: require('./element.schema'), - description: 'Custom rule, as a FHIRPath expression.', - }, - description: { - type: GraphQLString, - description: 'Documentation for FHIRPath expression.', - }, - _description: { - type: require('./element.schema'), - description: 'Documentation for FHIRPath expression.', - }, - }), + name: 'GraphDefinitionlinktargetcompartment', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: 'Identifies the compartment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/compartment-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the compartment.', + }, + _rule: { + type: require('./element.schema.js'), + description: 'identical | matching | different | no-rule | custom.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/graph-compartment-rule + rule: { + type: new GraphQLNonNull(CodeScalar), + description: 'identical | matching | different | no-rule | custom.', + }, + _expression: { + type: require('./element.schema.js'), + description: 'Custom rule, as a FHIRPath expression.', + }, + expression: { + type: GraphQLString, + description: 'Custom rule, as a FHIRPath expression.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Documentation for FHIRPath expression.', + }, + description: { + type: GraphQLString, + description: 'Documentation for FHIRPath expression.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/group.schema.js b/src/resources/3_0_1/schemas/group.schema.js index 72dd46a3..c9c274a2 100644 --- a/src/resources/3_0_1/schemas/group.schema.js +++ b/src/resources/3_0_1/schemas/group.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GroupResourceType = new GraphQLEnumType({ - name: 'GroupResourceType', - values: { - Group: { value: 'Group' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -24,81 +18,139 @@ let GroupResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Group', - description: 'Base StructureDefinition for Group Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(GroupResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'A unique business identifier for this group.', - }, - active: { - type: GraphQLBoolean, - description: - 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', - }, - _active: { - type: require('./element.schema'), - description: - 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/group-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the broad classification of the kind of resources the group includes.', - }, - _type: { - type: require('./element.schema'), - description: - 'Identifies the broad classification of the kind of resources the group includes.', - }, - actual: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', - }, - _actual: { - type: require('./element.schema'), - description: - 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', - }, - code: { - type: require('./codeableconcept.schema'), - description: - "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", - }, - name: { - type: GraphQLString, - description: - 'A label assigned to the group for human identification and communication.', - }, - _name: { - type: require('./element.schema'), - description: - 'A label assigned to the group for human identification and communication.', - }, - quantity: { - type: UnsignedIntScalar, - description: - 'A count of the number of resource instances that are part of the group.', - }, - _quantity: { - type: require('./element.schema'), - description: - 'A count of the number of resource instances that are part of the group.', - }, - characteristic: { - type: new GraphQLList(require('./groupcharacteristic.schema')), - description: 'Identifies the traits shared by members of the group.', - }, - member: { - type: new GraphQLList(require('./groupmember.schema')), - description: - 'Identifies the resource instances that are members of the group.', - }, - }), + description: 'Base StructureDefinition for Group Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Group_Enum_schema', + values: { Group: { value: 'Group' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'A unique business identifier for this group.', + }, + _active: { + type: require('./element.schema.js'), + description: + 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', + }, + active: { + type: GraphQLBoolean, + description: + 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/group-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + _actual: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + actual: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", + }, + _name: { + type: require('./element.schema.js'), + description: + 'A label assigned to the group for human identification and communication.', + }, + name: { + type: GraphQLString, + description: + 'A label assigned to the group for human identification and communication.', + }, + _quantity: { + type: require('./element.schema.js'), + description: + 'A count of the number of resource instances that are part of the group.', + }, + quantity: { + type: UnsignedIntScalar, + description: + 'A count of the number of resource instances that are part of the group.', + }, + characteristic: { + type: new GraphQLList(require('./groupcharacteristic.schema.js')), + description: 'Identifies the traits shared by members of the group.', + }, + member: { + type: new GraphQLList(require('./groupmember.schema.js')), + description: + 'Identifies the resource instances that are members of the group.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/groupcharacteristic.schema.js b/src/resources/3_0_1/schemas/groupcharacteristic.schema.js index ba810ca5..02b31671 100644 --- a/src/resources/3_0_1/schemas/groupcharacteristic.schema.js +++ b/src/resources/3_0_1/schemas/groupcharacteristic.schema.js @@ -1,63 +1,82 @@ const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Group.characteristic Schema + * @summary Groupcharacteristic Schema */ module.exports = new GraphQLObjectType({ - name: 'GroupCharacteristic', - description: 'Identifies the traits shared by members of the group.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'A code that identifies the kind of trait being asserted.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - _valueBoolean: { - type: require('./element.schema'), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - valueRange: { - type: new GraphQLNonNull(require('./range.schema')), - description: - "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", - }, - exclude: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'If true, indicates the characteristic is one that is NOT held by members of the group.', - }, - _exclude: { - type: require('./element.schema'), - description: - 'If true, indicates the characteristic is one that is NOT held by members of the group.', - }, - period: { - type: require('./period.schema'), - description: - 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', - }, - }), + name: 'Groupcharacteristic', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code that identifies the kind of trait being asserted.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _exclude: { + type: require('./element.schema.js'), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + exclude: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/groupmember.schema.js b/src/resources/3_0_1/schemas/groupmember.schema.js index 56c9ed24..fa9078b7 100644 --- a/src/resources/3_0_1/schemas/groupmember.schema.js +++ b/src/resources/3_0_1/schemas/groupmember.schema.js @@ -1,39 +1,88 @@ const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Group.member Schema + * @summary Groupmember Schema */ module.exports = new GraphQLObjectType({ - name: 'GroupMember', - description: - 'Identifies the resource instances that are members of the group.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - entity: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', - }, - period: { - type: require('./period.schema'), - description: 'The period that the member was in the group, if known.', - }, - inactive: { - type: GraphQLBoolean, - description: - 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', - }, - _inactive: { - type: require('./element.schema'), - description: - 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', - }, - }), + name: 'Groupmember', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + entity: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Groupmemberentity_entity_Union', + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./device.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type.', + }, + period: { + type: require('./period.schema.js'), + description: 'The period that the member was in the group, if known.', + }, + _inactive: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + inactive: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/guidanceresponse.schema.js b/src/resources/3_0_1/schemas/guidanceresponse.schema.js index 4da4176b..acc03f1c 100644 --- a/src/resources/3_0_1/schemas/guidanceresponse.schema.js +++ b/src/resources/3_0_1/schemas/guidanceresponse.schema.js @@ -1,22 +1,14 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let GuidanceResponseResourceType = new GraphQLEnumType({ - name: 'GuidanceResponseResourceType', - values: { - GuidanceResponse: { value: 'GuidanceResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,99 +16,257 @@ let GuidanceResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'GuidanceResponse', - description: 'Base StructureDefinition for GuidanceResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(GuidanceResponseResourceType), - description: 'Type of this resource.', - }, - requestId: { - type: IdScalar, - description: - 'The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', - }, - _requestId: { - type: require('./element.schema'), - description: - 'The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Allows a service to provide a unique, business identifier for the response.', - }, - module: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'A reference to the knowledge module that was invoked.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/guidance-response-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for GuidanceResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'GuidanceResponse_Enum_schema', + values: { GuidanceResponse: { value: 'GuidanceResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _requestId: { + type: require('./element.schema.js'), + description: + 'The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', + }, + requestId: { + type: IdScalar, + description: + 'The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Allows a service to provide a unique, business identifier for the response.', + }, + module: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'GuidanceResponsemodule_module_Union', + description: 'A reference to the knowledge module that was invoked.', + types: () => [require('./servicedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceDefinition') { + return require('./servicedefinition.schema.js'); + } + }, + }), + ), + description: 'A reference to the knowledge module that was invoked.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guidance-response-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'GuidanceResponsesubject_subject_Union', description: 'The patient for which the request was processed.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: 'The patient for which the request was processed.', + }, + context: { + type: new GraphQLUnionType({ + name: 'GuidanceResponsecontext_context_Union', description: 'Allows the context of the guidance response to be provided if available. In a service context, this would likely be unavailable.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'Indicates when the guidance response was processed.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: 'Indicates when the guidance response was processed.', - }, - performer: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'Allows the context of the guidance response to be provided if available. In a service context, this would likely be unavailable.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'Indicates when the guidance response was processed.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'Indicates when the guidance response was processed.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'GuidanceResponseperformer_performer_Union', description: 'Provides a reference to the device that performed the guidance.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', - }, - reasonReference: { - type: require('./reference.schema'), + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Provides a reference to the device that performed the guidance.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + reasonReference: { + type: new GraphQLUnionType({ + name: 'GuidanceResponsereasonReference_reasonReference_Union', description: 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Provides a mechanism to communicate additional information about the response.', - }, - evaluationMessage: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.', - }, - outputParameters: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Provides a mechanism to communicate additional information about the response.', + }, + evaluationMessage: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'GuidanceResponseevaluationMessage_evaluationMessage_Union', + description: + 'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.', + types: () => [require('./operationoutcome.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationOutcome') { + return require('./operationoutcome.schema.js'); + } + }, + }), + ), + description: + 'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.', + }, + outputParameters: { + type: new GraphQLUnionType({ + name: 'GuidanceResponseoutputParameters_outputParameters_Union', description: 'The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.', - }, - result: { - type: require('./reference.schema'), + types: () => [require('./parameters.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Parameters') { + return require('./parameters.schema.js'); + } + }, + }), + description: + 'The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.', + }, + result: { + type: new GraphQLUnionType({ + name: 'GuidanceResponseresult_result_Union', description: 'The actions, if any, produced by the evaluation of the artifact.', - }, - dataRequirement: { - type: new GraphQLList(require('./datarequirement.schema')), - description: - 'If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.', - }, - }), + types: () => [ + require('./careplan.schema.js'), + require('./requestgroup.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'RequestGroup') { + return require('./requestgroup.schema.js'); + } + }, + }), + description: + 'The actions, if any, produced by the evaluation of the artifact.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: + 'If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/healthcareservice.schema.js b/src/resources/3_0_1/schemas/healthcareservice.schema.js index 34c47380..6c88c2bd 100644 --- a/src/resources/3_0_1/schemas/healthcareservice.schema.js +++ b/src/resources/3_0_1/schemas/healthcareservice.schema.js @@ -1,20 +1,15 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let HealthcareServiceResourceType = new GraphQLEnumType({ - name: 'HealthcareServiceResourceType', - values: { - HealthcareService: { value: 'HealthcareService' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,174 +17,274 @@ let HealthcareServiceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'HealthcareService', - description: 'Base StructureDefinition for HealthcareService Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(HealthcareServiceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'External identifiers for this item.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this healthcareservice record is in active use.', - }, - _active: { - type: require('./element.schema'), - description: 'Whether this healthcareservice record is in active use.', - }, - providedBy: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for HealthcareService Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'HealthcareService_Enum_schema', + values: { HealthcareService: { value: 'HealthcareService' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'External identifiers for this item.', + }, + _active: { + type: require('./element.schema.js'), + description: 'Whether this healthcareservice record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this healthcareservice record is in active use.', + }, + providedBy: { + type: new GraphQLUnionType({ + name: 'HealthcareServiceprovidedBy_providedBy_Union', description: 'The organization that provides this healthcare service.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-category - category: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the broad category of service being performed or delivered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The specific type of service that may be delivered or performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Collection of specialties handled by the service site. This is more of a medical term.', - }, - location: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The location(s) where this healthcare service may be provided.', - }, - name: { - type: GraphQLString, - description: - 'Further description of the service as it would be presented to a consumer while searching.', - }, - _name: { - type: require('./element.schema'), - description: - 'Further description of the service as it would be presented to a consumer while searching.', - }, - comment: { - type: GraphQLString, - description: - 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', - }, - extraDetails: { - type: GraphQLString, - description: - "Extra details about the service that can't be placed in the other fields.", - }, - _extraDetails: { - type: require('./element.schema'), - description: - "Extra details about the service that can't be placed in the other fields.", - }, - photo: { - type: require('./attachment.schema'), - description: - 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'List of contacts related to this specific healthcare service.', - }, - coverageArea: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The location(s) that this service is available to (not where the service is provided).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-provision-conditions - serviceProvisionCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The code(s) that detail the conditions under which the healthcare service is available/offered.', - }, - eligibility: { - type: require('./codeableconcept.schema'), - description: - 'Does this service have specific eligibility requirements that need to be met in order to use the service?.', - }, - eligibilityNote: { - type: GraphQLString, - description: 'Describes the eligibility conditions for the service.', - }, - _eligibilityNote: { - type: require('./element.schema'), - description: 'Describes the eligibility conditions for the service.', - }, - programName: { - type: new GraphQLList(GraphQLString), - description: - 'Program Names that can be used to categorize the service.', - }, - _programName: { - type: require('./element.schema'), - description: - 'Program Names that can be used to categorize the service.', - }, - characteristic: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Collection of characteristics (attributes).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-referral-method - referralMethod: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', - }, - appointmentRequired: { - type: GraphQLBoolean, - description: - 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', - }, - _appointmentRequired: { - type: require('./element.schema'), - description: - 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', - }, - availableTime: { - type: new GraphQLList( - require('./healthcareserviceavailabletime.schema'), - ), - description: - 'A collection of times that the Service Site is available.', - }, - notAvailable: { - type: new GraphQLList( - require('./healthcareservicenotavailable.schema'), - ), - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - }, - availabilityExceptions: { - type: GraphQLString, - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - _availabilityExceptions: { - type: require('./element.schema'), - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - endpoint: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization that provides this healthcare service.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the broad category of service being performed or delivered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specific type of service that may be delivered or performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Collection of specialties handled by the service site. This is more of a medical term.', + }, + location: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'HealthcareServicelocation_location_Union', + description: + 'The location(s) where this healthcare service may be provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'The location(s) where this healthcare service may be provided.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + name: { + type: GraphQLString, + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + comment: { + type: GraphQLString, + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + _extraDetails: { + type: require('./element.schema.js'), + description: + "Extra details about the service that can't be placed in the other fields.", + }, + extraDetails: { + type: GraphQLString, + description: + "Extra details about the service that can't be placed in the other fields.", + }, + photo: { + type: require('./attachment.schema.js'), + description: + 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'List of contacts related to this specific healthcare service.', + }, + coverageArea: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'HealthcareServicecoverageArea_coverageArea_Union', + description: + 'The location(s) that this service is available to (not where the service is provided).', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'The location(s) that this service is available to (not where the service is provided).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-provision-conditions + serviceProvisionCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The code(s) that detail the conditions under which the healthcare service is available/offered.', + }, + eligibility: { + type: require('./codeableconcept.schema.js'), + description: + 'Does this service have specific eligibility requirements that need to be met in order to use the service?', + }, + _eligibilityNote: { + type: require('./element.schema.js'), + description: 'Describes the eligibility conditions for the service.', + }, + eligibilityNote: { + type: GraphQLString, + description: 'Describes the eligibility conditions for the service.', + }, + _programName: { + type: require('./element.schema.js'), + description: 'Program Names that can be used to categorize the service.', + }, + programName: { + type: new GraphQLList(GraphQLString), + description: 'Program Names that can be used to categorize the service.', + }, + characteristic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Collection of characteristics (attributes).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-referral-method + referralMethod: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', + }, + _appointmentRequired: { + type: require('./element.schema.js'), + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + appointmentRequired: { + type: GraphQLBoolean, + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + availableTime: { + type: new GraphQLList( + require('./healthcareserviceavailabletime.schema.js'), + ), + description: 'A collection of times that the Service Site is available.', + }, + notAvailable: { + type: new GraphQLList( + require('./healthcareservicenotavailable.schema.js'), + ), + description: + 'The HealthcareService is not available during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.schema.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'HealthcareServiceendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/healthcareserviceavailabletime.schema.js b/src/resources/3_0_1/schemas/healthcareserviceavailabletime.schema.js index 4d5a3437..082a979f 100644 --- a/src/resources/3_0_1/schemas/healthcareserviceavailabletime.schema.js +++ b/src/resources/3_0_1/schemas/healthcareserviceavailabletime.schema.js @@ -1,58 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary HealthcareService.availableTime Schema + * @summary HealthcareServiceavailableTime Schema */ module.exports = new GraphQLObjectType({ - name: 'HealthcareServiceAvailableTime', - description: 'A collection of times that the Service Site is available.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/days-of-week - daysOfWeek: { - type: new GraphQLList(CodeScalar), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - _daysOfWeek: { - type: require('./element.schema'), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - allDay: { - type: GraphQLBoolean, - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - _allDay: { - type: require('./element.schema'), - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - availableStartTime: { - type: TimeScalar, - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableStartTime: { - type: require('./element.schema'), - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - availableEndTime: { - type: TimeScalar, - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableEndTime: { - type: require('./element.schema'), - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - }), + name: 'HealthcareServiceavailableTime', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _daysOfWeek: { + type: require('./element.schema.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/days-of-week + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.schema.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.schema.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.schema.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/healthcareservicenotavailable.schema.js b/src/resources/3_0_1/schemas/healthcareservicenotavailable.schema.js index 5836a381..c3b4542a 100644 --- a/src/resources/3_0_1/schemas/healthcareservicenotavailable.schema.js +++ b/src/resources/3_0_1/schemas/healthcareservicenotavailable.schema.js @@ -1,31 +1,52 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary HealthcareService.notAvailable Schema + * @summary HealthcareServicenotAvailable Schema */ module.exports = new GraphQLObjectType({ - name: 'HealthcareServiceNotAvailable', - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - _description: { - type: require('./element.schema'), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - during: { - type: require('./period.schema'), - description: - 'Service is not available (seasonally or for a public holiday) from this date.', - }, - }), + name: 'HealthcareServicenotAvailable', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.schema.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/humanname.schema.js b/src/resources/3_0_1/schemas/humanname.schema.js index 2e0c52a7..4dc53b7f 100644 --- a/src/resources/3_0_1/schemas/humanname.schema.js +++ b/src/resources/3_0_1/schemas/humanname.schema.js @@ -1,7 +1,5 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -9,68 +7,82 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'HumanName', - description: 'Base StructureDefinition for HumanName Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/name-use - use: { - type: CodeScalar, - description: 'Identifies the purpose for this name.', - }, - _use: { - type: require('./element.schema'), - description: 'Identifies the purpose for this name.', - }, - text: { - type: GraphQLString, - description: 'A full text representation of the name.', - }, - _text: { - type: require('./element.schema'), - description: 'A full text representation of the name.', - }, - family: { - type: GraphQLString, - description: - 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', - }, - _family: { - type: require('./element.schema'), - description: - 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', - }, - given: { - type: new GraphQLList(GraphQLString), - description: 'Given name.', - }, - _given: { - type: require('./element.schema'), - description: 'Given name.', - }, - prefix: { - type: new GraphQLList(GraphQLString), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', - }, - _prefix: { - type: require('./element.schema'), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', - }, - suffix: { - type: new GraphQLList(GraphQLString), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', - }, - _suffix: { - type: require('./element.schema'), - description: - 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', - }, - period: { - type: require('./period.schema'), - description: - 'Indicates the period of time when this name was valid for the named person.', - }, - }), + description: 'Base StructureDefinition for HumanName Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _use: { + type: require('./element.schema.js'), + description: 'Identifies the purpose for this name.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/name-use + use: { + type: CodeScalar, + description: 'Identifies the purpose for this name.', + }, + _text: { + type: require('./element.schema.js'), + description: 'A full text representation of the name.', + }, + text: { + type: GraphQLString, + description: 'A full text representation of the name.', + }, + _family: { + type: require('./element.schema.js'), + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + family: { + type: GraphQLString, + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + _given: { + type: require('./element.schema.js'), + description: 'Given name.', + }, + given: { + type: new GraphQLList(GraphQLString), + description: 'Given name.', + }, + _prefix: { + type: require('./element.schema.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + prefix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + _suffix: { + type: require('./element.schema.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + suffix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates the period of time when this name was valid for the named person.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/identifier.schema.js b/src/resources/3_0_1/schemas/identifier.schema.js index 688a02a0..ad6a257d 100644 --- a/src/resources/3_0_1/schemas/identifier.schema.js +++ b/src/resources/3_0_1/schemas/identifier.schema.js @@ -1,8 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -10,52 +13,74 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Identifier', - description: 'Base StructureDefinition for Identifier Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-use - use: { - type: CodeScalar, - description: 'The purpose of this identifier.', - }, - _use: { - type: require('./element.schema'), - description: 'The purpose of this identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-type - type: { - type: require('./codeableconcept.schema'), - description: - 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', - }, - system: { - type: UriScalar, - description: - 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', - }, - _system: { - type: require('./element.schema'), - description: - 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', - }, - value: { - type: GraphQLString, - description: - 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', - }, - _value: { - type: require('./element.schema'), - description: - 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', - }, - period: { - type: require('./period.schema'), - description: - 'Time period during which identifier is/was valid for use.', - }, - assigner: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Identifier Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _use: { + type: require('./element.schema.js'), + description: 'The purpose of this identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-use + use: { + type: CodeScalar, + description: 'The purpose of this identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', + }, + system: { + type: UriScalar, + description: + 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', + }, + value: { + type: GraphQLString, + description: + 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period during which identifier is/was valid for use.', + }, + assigner: { + type: new GraphQLUnionType({ + name: 'Identifierassigner_assigner_Union', description: 'Organization that issued/manages the identifier.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that issued/manages the identifier.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/imagingmanifest.schema.js b/src/resources/3_0_1/schemas/imagingmanifest.schema.js index 776c8c00..88a16149 100644 --- a/src/resources/3_0_1/schemas/imagingmanifest.schema.js +++ b/src/resources/3_0_1/schemas/imagingmanifest.schema.js @@ -1,20 +1,15 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImagingManifestResourceType = new GraphQLEnumType({ - name: 'ImagingManifestResourceType', - values: { - ImagingManifest: { value: 'ImagingManifest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -22,54 +17,152 @@ let ImagingManifestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ImagingManifest', - description: 'Base StructureDefinition for ImagingManifest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImagingManifestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Unique identifier of the DICOM Key Object Selection (KOS) that this resource represents.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingManifest.', - }, - authoringTime: { - type: DateTimeScalar, - description: - 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', - }, - _authoringTime: { - type: require('./element.schema'), - description: - 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', - }, - author: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ImagingManifest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingManifest_Enum_schema', + values: { ImagingManifest: { value: 'ImagingManifest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Unique identifier of the DICOM Key Object Selection (KOS) that this resource represents.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImagingManifestpatient_patient_Union', + description: + 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingManifest.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingManifest.', + }, + _authoringTime: { + type: require('./element.schema.js'), + description: + 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', + }, + authoringTime: { + type: DateTimeScalar, + description: + 'Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).', + }, + author: { + type: new GraphQLUnionType({ + name: 'ImagingManifestauthor_author_Union', description: 'Author of ImagingManifest. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.', - }, - description: { - type: GraphQLString, - description: - 'Free text narrative description of the ImagingManifest. The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions (e.g. Best in Set, Complete Study Content). Note that those values cover the wide range of uses of the DICOM Key Object Selection object, several of which are not supported by ImagingManifest. Specifically, there is no expected behavior associated with descriptions that suggest referenced images be removed or not used.', - }, - _description: { - type: require('./element.schema'), - description: - 'Free text narrative description of the ImagingManifest. The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions (e.g. Best in Set, Complete Study Content). Note that those values cover the wide range of uses of the DICOM Key Object Selection object, several of which are not supported by ImagingManifest. Specifically, there is no expected behavior associated with descriptions that suggest referenced images be removed or not used.', - }, - study: { - type: new GraphQLList( - new GraphQLNonNull(require('./imagingmanifeststudy.schema')), - ), - description: - 'Study identity and locating information of the DICOM SOP instances in the selection.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Author of ImagingManifest. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Free text narrative description of the ImagingManifest. The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions (e.g. Best in Set, Complete Study Content). Note that those values cover the wide range of uses of the DICOM Key Object Selection object, several of which are not supported by ImagingManifest. Specifically, there is no expected behavior associated with descriptions that suggest referenced images be removed or not used.', + }, + description: { + type: GraphQLString, + description: + 'Free text narrative description of the ImagingManifest. The value may be derived from the DICOM Standard Part 16, CID-7010 descriptions (e.g. Best in Set, Complete Study Content). Note that those values cover the wide range of uses of the DICOM Key Object Selection object, several of which are not supported by ImagingManifest. Specifically, there is no expected behavior associated with descriptions that suggest referenced images be removed or not used.', + }, + study: { + type: new GraphQLList( + new GraphQLNonNull(require('./imagingmanifeststudy.schema.js')), + ), + description: + 'Study identity and locating information of the DICOM SOP instances in the selection.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/imagingmanifeststudy.schema.js b/src/resources/3_0_1/schemas/imagingmanifeststudy.schema.js index 29c01cdf..d963e4c9 100644 --- a/src/resources/3_0_1/schemas/imagingmanifeststudy.schema.js +++ b/src/resources/3_0_1/schemas/imagingmanifeststudy.schema.js @@ -1,43 +1,84 @@ -const OidScalar = require('../scalars/oid.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const OidScalar = require('../scalars/oid.scalar.js'); /** * @name exports - * @summary ImagingManifest.study Schema + * @summary ImagingManifeststudy Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingManifestStudy', - description: - 'Study identity and locating information of the DICOM SOP instances in the selection.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: - 'Study instance UID of the SOP instances in the selection.', - }, - _uid: { - type: require('./element.schema'), - description: - 'Study instance UID of the SOP instances in the selection.', - }, - imagingStudy: { - type: require('./reference.schema'), + name: 'ImagingManifeststudy', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Study instance UID of the SOP instances in the selection.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Study instance UID of the SOP instances in the selection.', + }, + imagingStudy: { + type: new GraphQLUnionType({ + name: 'ImagingManifeststudyimagingStudy_imagingStudy_Union', description: 'Reference to the Imaging Study in FHIR form.', - }, - endpoint: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', - }, - series: { - type: new GraphQLList( - new GraphQLNonNull(require('./imagingmanifeststudyseries.schema')), - ), - description: - 'Series identity and locating information of the DICOM SOP instances in the selection.', - }, - }), + types: () => [require('./imagingstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + }, + }), + description: 'Reference to the Imaging Study in FHIR form.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingManifeststudyendpoint_endpoint_Union', + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', + }, + series: { + type: new GraphQLList( + new GraphQLNonNull(require('./imagingmanifeststudyseries.schema.js')), + ), + description: + 'Series identity and locating information of the DICOM SOP instances in the selection.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/imagingmanifeststudyseries.schema.js b/src/resources/3_0_1/schemas/imagingmanifeststudyseries.schema.js index f57110f7..66249c21 100644 --- a/src/resources/3_0_1/schemas/imagingmanifeststudyseries.schema.js +++ b/src/resources/3_0_1/schemas/imagingmanifeststudyseries.schema.js @@ -1,41 +1,73 @@ -const OidScalar = require('../scalars/oid.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const OidScalar = require('../scalars/oid.scalar.js'); /** * @name exports - * @summary ImagingManifest.study.series Schema + * @summary ImagingManifeststudyseries Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingManifestStudySeries', - description: - 'Series identity and locating information of the DICOM SOP instances in the selection.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: - 'Series instance UID of the SOP instances in the selection.', - }, - _uid: { - type: require('./element.schema'), - description: - 'Series instance UID of the SOP instances in the selection.', - }, - endpoint: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', - }, - instance: { - type: new GraphQLList( - new GraphQLNonNull( - require('./imagingmanifeststudyseriesinstance.schema'), - ), + name: 'ImagingManifeststudyseries', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Series instance UID of the SOP instances in the selection.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Series instance UID of the SOP instances in the selection.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingManifeststudyseriesendpoint_endpoint_Union', + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', + }, + instance: { + type: new GraphQLList( + new GraphQLNonNull( + require('./imagingmanifeststudyseriesinstance.schema.js'), ), - description: - 'Identity and locating information of the selected DICOM SOP instances.', - }, - }), + ), + description: + 'Identity and locating information of the selected DICOM SOP instances.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/imagingmanifeststudyseriesinstance.schema.js b/src/resources/3_0_1/schemas/imagingmanifeststudyseriesinstance.schema.js index 3125b49b..235416cd 100644 --- a/src/resources/3_0_1/schemas/imagingmanifeststudyseriesinstance.schema.js +++ b/src/resources/3_0_1/schemas/imagingmanifeststudyseriesinstance.schema.js @@ -1,33 +1,54 @@ -const OidScalar = require('../scalars/oid.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const OidScalar = require('../scalars/oid.scalar.js'); /** * @name exports - * @summary ImagingManifest.study.series.instance Schema + * @summary ImagingManifeststudyseriesinstance Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingManifestStudySeriesInstance', - description: - 'Identity and locating information of the selected DICOM SOP instances.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sopClass: { - type: new GraphQLNonNull(OidScalar), - description: 'SOP class UID of the selected instance.', - }, - _sopClass: { - type: require('./element.schema'), - description: 'SOP class UID of the selected instance.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'SOP Instance UID of the selected instance.', - }, - _uid: { - type: require('./element.schema'), - description: 'SOP Instance UID of the selected instance.', - }, - }), + name: 'ImagingManifeststudyseriesinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sopClass: { + type: require('./element.schema.js'), + description: 'SOP class UID of the selected instance.', + }, + sopClass: { + type: new GraphQLNonNull(OidScalar), + description: 'SOP class UID of the selected instance.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'SOP Instance UID of the selected instance.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'SOP Instance UID of the selected instance.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/imagingstudy.schema.js b/src/resources/3_0_1/schemas/imagingstudy.schema.js index 84d23f1c..146f2b8c 100644 --- a/src/resources/3_0_1/schemas/imagingstudy.schema.js +++ b/src/resources/3_0_1/schemas/imagingstudy.schema.js @@ -1,23 +1,17 @@ -const OidScalar = require('../scalars/oid.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImagingStudyResourceType = new GraphQLEnumType({ - name: 'ImagingStudyResourceType', - values: { - ImagingStudy: { value: 'ImagingStudy' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -25,130 +19,281 @@ let ImagingStudyResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ImagingStudy', - description: 'Base StructureDefinition for ImagingStudy Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImagingStudyResourceType), - description: 'Type of this resource.', - }, - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for the study.', - }, - _uid: { - type: require('./element.schema'), - description: 'Formal identifier for the study.', - }, - accession: { - type: require('./identifier.schema'), - description: - 'Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Other identifiers for the study.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/instance-availability - availability: { - type: CodeScalar, - description: 'Availability of study (online, offline, or nearline).', - }, - _availability: { - type: require('./element.schema'), - description: 'Availability of study (online, offline, or nearline).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 - modalityList: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient imaged in the study.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ImagingStudy Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingStudy_Enum_schema', + values: { ImagingStudy: { value: 'ImagingStudy' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Formal identifier for the study.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for the study.', + }, + accession: { + type: require('./identifier.schema.js'), + description: + 'Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Other identifiers for the study.', + }, + _availability: { + type: require('./element.schema.js'), + description: 'Availability of study (online, offline, or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/instance-availability + availability: { + type: CodeScalar, + description: 'Availability of study (online, offline, or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 + modalityList: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImagingStudypatient_patient_Union', + description: 'The patient imaged in the study.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient imaged in the study.', + }, + context: { + type: new GraphQLUnionType({ + name: 'ImagingStudycontext_context_Union', description: 'The encounter or episode at which the request is initiated.', - }, - started: { - type: DateTimeScalar, - description: 'Date and time the study started.', - }, - _started: { - type: require('./element.schema'), - description: 'Date and time the study started.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A list of the diagnostic requests that resulted in this imaging study being performed.', - }, - referrer: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode at which the request is initiated.', + }, + _started: { + type: require('./element.schema.js'), + description: 'Date and time the study started.', + }, + started: { + type: DateTimeScalar, + description: 'Date and time the study started.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudybasedOn_basedOn_Union', + description: + 'A list of the diagnostic requests that resulted in this imaging study being performed.', + types: () => [ + require('./referralrequest.schema.js'), + require('./careplan.schema.js'), + require('./procedurerequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + }, + }), + ), + description: + 'A list of the diagnostic requests that resulted in this imaging study being performed.', + }, + referrer: { + type: new GraphQLUnionType({ + name: 'ImagingStudyreferrer_referrer_Union', description: 'The requesting/referring physician.', - }, - interpreter: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Who read the study and interpreted the images or other content.', - }, - endpoint: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', - }, - numberOfSeries: { - type: UnsignedIntScalar, - description: - 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', - }, - _numberOfSeries: { - type: require('./element.schema'), - description: - 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', - }, - numberOfInstances: { - type: UnsignedIntScalar, - description: - 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', - }, - _numberOfInstances: { - type: require('./element.schema'), - description: - 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', - }, - procedureReference: { - type: new GraphQLList(require('./reference.schema')), - description: 'A reference to the performed Procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - procedureCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'The code for the performed procedure type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reason: { - type: require('./codeableconcept.schema'), - description: - 'Description of clinical condition indicating why the ImagingStudy was requested.', - }, - description: { - type: GraphQLString, - description: - 'Institution-generated description or classification of the Study performed.', - }, - _description: { - type: require('./element.schema'), - description: - 'Institution-generated description or classification of the Study performed.', - }, - series: { - type: new GraphQLList(require('./imagingstudyseries.schema')), - description: - 'Each study has one or more series of images or other content.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The requesting/referring physician.', + }, + interpreter: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyinterpreter_interpreter_Union', + description: + 'Who read the study and interpreted the images or other content.', + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: + 'Who read the study and interpreted the images or other content.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyendpoint_endpoint_Union', + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.type.', + }, + _numberOfSeries: { + type: require('./element.schema.js'), + description: + 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', + }, + numberOfSeries: { + type: UnsignedIntScalar, + description: + 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', + }, + _numberOfInstances: { + type: require('./element.schema.js'), + description: + 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + numberOfInstances: { + type: UnsignedIntScalar, + description: + 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + procedureReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyprocedureReference_procedureReference_Union', + description: 'A reference to the performed Procedure.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: 'A reference to the performed Procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + procedureCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The code for the performed procedure type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Description of clinical condition indicating why the ImagingStudy was requested.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Institution-generated description or classification of the Study performed.', + }, + description: { + type: GraphQLString, + description: + 'Institution-generated description or classification of the Study performed.', + }, + series: { + type: new GraphQLList(require('./imagingstudyseries.schema.js')), + description: + 'Each study has one or more series of images or other content.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/imagingstudyseries.schema.js b/src/resources/3_0_1/schemas/imagingstudyseries.schema.js index 84a0fe85..b2fab31f 100644 --- a/src/resources/3_0_1/schemas/imagingstudyseries.schema.js +++ b/src/resources/3_0_1/schemas/imagingstudyseries.schema.js @@ -1,107 +1,149 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ImagingStudy.series Schema + * @summary ImagingStudyseries Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingStudySeries', - description: 'Each study has one or more series of images or other content.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for this series.', - }, - _uid: { - type: require('./element.schema'), - description: 'Formal identifier for this series.', - }, - number: { - type: UnsignedIntScalar, - description: 'The numeric identifier of this series in the study.', - }, - _number: { - type: require('./element.schema'), - description: 'The numeric identifier of this series in the study.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 - modality: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The modality of this series sequence.', - }, - description: { - type: GraphQLString, - description: 'A description of the series.', - }, - _description: { - type: require('./element.schema'), - description: 'A description of the series.', - }, - numberOfInstances: { - type: UnsignedIntScalar, - description: - 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', - }, - _numberOfInstances: { - type: require('./element.schema'), - description: - 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/instance-availability - availability: { - type: CodeScalar, - description: 'Availability of series (online, offline or nearline).', - }, - _availability: { - type: require('./element.schema'), - description: 'Availability of series (online, offline or nearline).', - }, - endpoint: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./coding.schema'), - description: - 'The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/bodysite-laterality - laterality: { - type: require('./coding.schema'), - description: - 'The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.', - }, - started: { - type: DateTimeScalar, - description: 'The date and time the series was started.', - }, - _started: { - type: require('./element.schema'), - description: 'The date and time the series was started.', - }, - performer: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The physician or operator (often the radiology technician) who performed the series. The performer is recorded at the series level, since each series in a study may be performed by a different practitioner, at different times, and using different devices. A series may be performed by multiple practitioners.', - }, - instance: { - type: new GraphQLList(require('./imagingstudyseriesinstance.schema')), - description: - 'A single SOP instance within the series, e.g. an image, or presentation state.', - }, - }), + name: 'ImagingStudyseries', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Formal identifier for this series.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for this series.', + }, + _number: { + type: require('./element.schema.js'), + description: 'The numeric identifier of this series in the study.', + }, + number: { + type: UnsignedIntScalar, + description: 'The numeric identifier of this series in the study.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/dicom-cid29 + modality: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The modality of this series sequence.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of the series.', + }, + description: { + type: GraphQLString, + description: 'A description of the series.', + }, + _numberOfInstances: { + type: require('./element.schema.js'), + description: + 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + numberOfInstances: { + type: UnsignedIntScalar, + description: + 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + _availability: { + type: require('./element.schema.js'), + description: 'Availability of series (online, offline or nearline).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/instance-availability + availability: { + type: CodeScalar, + description: 'Availability of series (online, offline or nearline).', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyseriesendpoint_endpoint_Union', + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./coding.schema.js'), + description: + 'The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/bodysite-laterality + laterality: { + type: require('./coding.schema.js'), + description: + 'The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.', + }, + _started: { + type: require('./element.schema.js'), + description: 'The date and time the series was started.', + }, + started: { + type: DateTimeScalar, + description: 'The date and time the series was started.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyseriesperformer_performer_Union', + description: + 'The physician or operator (often the radiology technician) who performed the series. The performer is recorded at the series level, since each series in a study may be performed by a different practitioner, at different times, and using different devices. A series may be performed by multiple practitioners.', + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: + 'The physician or operator (often the radiology technician) who performed the series. The performer is recorded at the series level, since each series in a study may be performed by a different practitioner, at different times, and using different devices. A series may be performed by multiple practitioners.', + }, + instance: { + type: new GraphQLList(require('./imagingstudyseriesinstance.schema.js')), + description: + 'A single SOP instance within the series, e.g. an image, or presentation state.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/imagingstudyseriesinstance.schema.js b/src/resources/3_0_1/schemas/imagingstudyseriesinstance.schema.js index cb112026..b4aaaabe 100644 --- a/src/resources/3_0_1/schemas/imagingstudyseriesinstance.schema.js +++ b/src/resources/3_0_1/schemas/imagingstudyseriesinstance.schema.js @@ -1,50 +1,71 @@ -const OidScalar = require('../scalars/oid.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const OidScalar = require('../scalars/oid.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary ImagingStudy.series.instance Schema + * @summary ImagingStudyseriesinstance Schema */ module.exports = new GraphQLObjectType({ - name: 'ImagingStudySeriesInstance', - description: - 'A single SOP instance within the series, e.g. an image, or presentation state.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - uid: { - type: new GraphQLNonNull(OidScalar), - description: 'Formal identifier for this image or other content.', - }, - _uid: { - type: require('./element.schema'), - description: 'Formal identifier for this image or other content.', - }, - number: { - type: UnsignedIntScalar, - description: 'The number of instance in the series.', - }, - _number: { - type: require('./element.schema'), - description: 'The number of instance in the series.', - }, - sopClass: { - type: new GraphQLNonNull(OidScalar), - description: 'DICOM instance type.', - }, - _sopClass: { - type: require('./element.schema'), - description: 'DICOM instance type.', - }, - title: { - type: GraphQLString, - description: 'The description of the instance.', - }, - _title: { - type: require('./element.schema'), - description: 'The description of the instance.', - }, - }), + name: 'ImagingStudyseriesinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _uid: { + type: require('./element.schema.js'), + description: 'Formal identifier for this image or other content.', + }, + uid: { + type: new GraphQLNonNull(OidScalar), + description: 'Formal identifier for this image or other content.', + }, + _number: { + type: require('./element.schema.js'), + description: 'The number of instance in the series.', + }, + number: { + type: UnsignedIntScalar, + description: 'The number of instance in the series.', + }, + _sopClass: { + type: require('./element.schema.js'), + description: 'DICOM instance type.', + }, + sopClass: { + type: new GraphQLNonNull(OidScalar), + description: 'DICOM instance type.', + }, + _title: { + type: require('./element.schema.js'), + description: 'The description of the instance.', + }, + title: { + type: GraphQLString, + description: 'The description of the instance.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunization.schema.js b/src/resources/3_0_1/schemas/immunization.schema.js index d5674fb6..83588718 100644 --- a/src/resources/3_0_1/schemas/immunization.schema.js +++ b/src/resources/3_0_1/schemas/immunization.schema.js @@ -1,23 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImmunizationResourceType = new GraphQLEnumType({ - name: 'ImmunizationResourceType', - values: { - Immunization: { value: 'Immunization' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -25,138 +19,236 @@ let ImmunizationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Immunization', - description: 'Base StructureDefinition for Immunization Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImmunizationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A unique identifier assigned to this immunization record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current status of the vaccination event.', - }, - _status: { - type: require('./element.schema'), - description: 'Indicates the current status of the vaccination event.', - }, - notGiven: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'Indicates if the vaccination was or was not given.', - }, - _notGiven: { - type: require('./element.schema'), - description: 'Indicates if the vaccination was or was not given.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code - vaccineCode: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Vaccine that was administered or was to be administered.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The patient who either received or did not receive the immunization.', - }, - encounter: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Immunization Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Immunization_Enum_schema', + values: { Immunization: { value: 'Immunization' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'A unique identifier assigned to this immunization record.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current status of the vaccination event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current status of the vaccination event.', + }, + _notGiven: { + type: require('./element.schema.js'), + description: 'Indicates if the vaccination was or was not given.', + }, + notGiven: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Indicates if the vaccination was or was not given.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code + vaccineCode: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Vaccine that was administered or was to be administered.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Immunizationpatient_patient_Union', + description: + 'The patient who either received or did not receive the immunization.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The patient who either received or did not receive the immunization.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Immunizationencounter_encounter_Union', description: 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', - }, - date: { - type: DateTimeScalar, - description: 'Date vaccine administered or was to be administered.', - }, - _date: { - type: require('./element.schema'), - description: 'Date vaccine administered or was to be administered.', - }, - primarySource: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', - }, - _primarySource: { - type: require('./element.schema'), - description: - 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-origin - reportOrigin: { - type: require('./codeableconcept.schema'), - description: - 'The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.', - }, - location: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date vaccine administered or was to be administered.', + }, + date: { + type: DateTimeScalar, + description: 'Date vaccine administered or was to be administered.', + }, + _primarySource: { + type: require('./element.schema.js'), + description: + 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', + }, + primarySource: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-origin + reportOrigin: { + type: require('./codeableconcept.schema.js'), + description: + 'The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Immunizationlocation_location_Union', description: 'The service delivery location where the vaccine administration occurred.', - }, - manufacturer: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The service delivery location where the vaccine administration occurred.', + }, + manufacturer: { + type: new GraphQLUnionType({ + name: 'Immunizationmanufacturer_manufacturer_Union', description: 'Name of vaccine manufacturer.', - }, - lotNumber: { - type: GraphQLString, - description: 'Lot number of the vaccine product.', - }, - _lotNumber: { - type: require('./element.schema'), - description: 'Lot number of the vaccine product.', - }, - expirationDate: { - type: DateScalar, - description: 'Date vaccine batch expires.', - }, - _expirationDate: { - type: require('./element.schema'), - description: 'Date vaccine batch expires.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-site - site: { - type: require('./codeableconcept.schema'), - description: 'Body site where vaccine was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-route - route: { - type: require('./codeableconcept.schema'), - description: - 'The path by which the vaccine product is taken into the body.', - }, - doseQuantity: { - type: require('./quantity.schema'), - description: 'The quantity of vaccine product that was administered.', - }, - practitioner: { - type: new GraphQLList(require('./immunizationpractitioner.schema')), - description: 'Indicates who or what performed the event.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Extra information about the immunization that is not conveyed by the other attributes.', - }, - explanation: { - type: require('./immunizationexplanation.schema'), - description: 'Reasons why a vaccine was or was not administered.', - }, - reaction: { - type: new GraphQLList(require('./immunizationreaction.schema')), - description: - 'Categorical data indicating that an adverse event is associated in time to an immunization.', - }, - vaccinationProtocol: { - type: new GraphQLList( - require('./immunizationvaccinationprotocol.schema'), - ), - description: - 'Contains information about the protocol(s) under which the vaccine was administered.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Name of vaccine manufacturer.', + }, + _lotNumber: { + type: require('./element.schema.js'), + description: 'Lot number of the vaccine product.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number of the vaccine product.', + }, + _expirationDate: { + type: require('./element.schema.js'), + description: 'Date vaccine batch expires.', + }, + expirationDate: { + type: DateScalar, + description: 'Date vaccine batch expires.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-site + site: { + type: require('./codeableconcept.schema.js'), + description: 'Body site where vaccine was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-route + route: { + type: require('./codeableconcept.schema.js'), + description: + 'The path by which the vaccine product is taken into the body.', + }, + doseQuantity: { + type: require('./quantity.schema.js'), + description: 'The quantity of vaccine product that was administered.', + }, + practitioner: { + type: new GraphQLList(require('./immunizationpractitioner.schema.js')), + description: 'Indicates who or what performed the event.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the immunization that is not conveyed by the other attributes.', + }, + explanation: { + type: require('./immunizationexplanation.schema.js'), + description: 'Reasons why a vaccine was or was not administered.', + }, + reaction: { + type: new GraphQLList(require('./immunizationreaction.schema.js')), + description: + 'Categorical data indicating that an adverse event is associated in time to an immunization.', + }, + vaccinationProtocol: { + type: new GraphQLList( + require('./immunizationvaccinationprotocol.schema.js'), + ), + description: + 'Contains information about the protocol(s) under which the vaccine was administered.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunizationexplanation.schema.js b/src/resources/3_0_1/schemas/immunizationexplanation.schema.js index c487c29a..19de68f8 100644 --- a/src/resources/3_0_1/schemas/immunizationexplanation.schema.js +++ b/src/resources/3_0_1/schemas/immunizationexplanation.schema.js @@ -1,25 +1,42 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary Immunization.explanation Schema + * @summary Immunizationexplanation Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationExplanation', - description: 'Reasons why a vaccine was or was not administered.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-reason - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reasons why a vaccine was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/no-immunization-reason - reasonNotGiven: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Reason why a vaccine was not administered.', - }, - }), + name: 'Immunizationexplanation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-reason + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reasons why a vaccine was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/no-immunization-reason + reasonNotGiven: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason why a vaccine was not administered.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunizationpractitioner.schema.js b/src/resources/3_0_1/schemas/immunizationpractitioner.schema.js index d336de1f..3c7de3cd 100644 --- a/src/resources/3_0_1/schemas/immunizationpractitioner.schema.js +++ b/src/resources/3_0_1/schemas/immunizationpractitioner.schema.js @@ -1,25 +1,60 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Immunization.practitioner Schema + * @summary Immunizationpractitioner Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationPractitioner', - description: 'Indicates who or what performed the event.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-role - role: { - type: require('./codeableconcept.schema'), - description: - 'Describes the type of performance (e.g. ordering provider, administering provider, etc.).', - }, - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The device, practitioner, etc. who performed the action.', - }, - }), + name: 'Immunizationpractitioner', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-role + role: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the type of performance (e.g. ordering provider, administering provider, etc.).', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Immunizationpractitioneractor_actor_Union', + description: + 'The device, practitioner, etc. who performed the action.', + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: 'The device, practitioner, etc. who performed the action.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunizationreaction.schema.js b/src/resources/3_0_1/schemas/immunizationreaction.schema.js index ba1b24fa..806dacbd 100644 --- a/src/resources/3_0_1/schemas/immunizationreaction.schema.js +++ b/src/resources/3_0_1/schemas/immunizationreaction.schema.js @@ -1,37 +1,68 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Immunization.reaction Schema + * @summary Immunizationreaction Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationReaction', - description: - 'Categorical data indicating that an adverse event is associated in time to an immunization.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - date: { - type: DateTimeScalar, - description: 'Date of reaction to the immunization.', - }, - _date: { - type: require('./element.schema'), - description: 'Date of reaction to the immunization.', - }, - detail: { - type: require('./reference.schema'), + name: 'Immunizationreaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date of reaction to the immunization.', + }, + date: { + type: DateTimeScalar, + description: 'Date of reaction to the immunization.', + }, + detail: { + type: new GraphQLUnionType({ + name: 'Immunizationreactiondetail_detail_Union', description: 'Details of the reaction.', - }, - reported: { - type: GraphQLBoolean, - description: 'Self-reported indicator.', - }, - _reported: { - type: require('./element.schema'), - description: 'Self-reported indicator.', - }, - }), + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + description: 'Details of the reaction.', + }, + _reported: { + type: require('./element.schema.js'), + description: 'Self-reported indicator.', + }, + reported: { + type: GraphQLBoolean, + description: 'Self-reported indicator.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunizationrecommendation.schema.js b/src/resources/3_0_1/schemas/immunizationrecommendation.schema.js index 93e50836..9e864224 100644 --- a/src/resources/3_0_1/schemas/immunizationrecommendation.schema.js +++ b/src/resources/3_0_1/schemas/immunizationrecommendation.schema.js @@ -1,19 +1,13 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImmunizationRecommendationResourceType = new GraphQLEnumType({ - name: 'ImmunizationRecommendationResourceType', - values: { - ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,29 +16,100 @@ let ImmunizationRecommendationResourceType = new GraphQLEnumType({ module.exports = new GraphQLObjectType({ name: 'ImmunizationRecommendation', description: - 'Base StructureDefinition for ImmunizationRecommendation Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImmunizationRecommendationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A unique identifier assigned to this particular recommendation record.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient the recommendations are for.', - }, - recommendation: { - type: new GraphQLList( - new GraphQLNonNull( - require('./immunizationrecommendationrecommendation.schema'), - ), + 'Base StructureDefinition for ImmunizationRecommendation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImmunizationRecommendation_Enum_schema', + values: { + ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'A unique identifier assigned to this particular recommendation record.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImmunizationRecommendationpatient_patient_Union', + description: 'The patient the recommendations are for.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient the recommendations are for.', + }, + recommendation: { + type: new GraphQLList( + new GraphQLNonNull( + require('./immunizationrecommendationrecommendation.schema.js'), ), - description: 'Vaccine administration recommendations.', - }, - }), + ), + description: 'Vaccine administration recommendations.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunizationrecommendationrecommendation.schema.js b/src/resources/3_0_1/schemas/immunizationrecommendationrecommendation.schema.js index 49fcc870..ac0a052b 100644 --- a/src/resources/3_0_1/schemas/immunizationrecommendationrecommendation.schema.js +++ b/src/resources/3_0_1/schemas/immunizationrecommendationrecommendation.schema.js @@ -1,72 +1,127 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation Schema + * @summary ImmunizationRecommendationrecommendation Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationRecommendationRecommendation', - description: 'Vaccine administration recommendations.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The date the immunization recommendation was created.', - }, - _date: { - type: require('./element.schema'), - description: 'The date the immunization recommendation was created.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code - vaccineCode: { - type: require('./codeableconcept.schema'), - description: 'Vaccine that pertains to the recommendation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-target-disease - targetDisease: { - type: require('./codeableconcept.schema'), - description: 'The targeted disease for the recommendation.', - }, - doseNumber: { - type: PositiveIntScalar, - description: - 'The next recommended dose number (e.g. dose 2 is the next recommended dose).', - }, - _doseNumber: { - type: require('./element.schema'), - description: - 'The next recommended dose number (e.g. dose 2 is the next recommended dose).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-status - forecastStatus: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Vaccine administration status.', - }, - dateCriterion: { - type: new GraphQLList( - require('./immunizationrecommendationrecommendationdatecriterion.schema'), - ), - description: - 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', - }, - protocol: { - type: require('./immunizationrecommendationrecommendationprotocol.schema'), - description: - 'Contains information about the protocol under which the vaccine was administered.', - }, - supportingImmunization: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Immunization event history that supports the status and recommendation.', - }, - supportingPatientInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', - }, - }), + name: 'ImmunizationRecommendationrecommendation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date the immunization recommendation was created.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date the immunization recommendation was created.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccine-code + vaccineCode: { + type: require('./codeableconcept.schema.js'), + description: 'Vaccine that pertains to the recommendation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-target-disease + targetDisease: { + type: require('./codeableconcept.schema.js'), + description: 'The targeted disease for the recommendation.', + }, + _doseNumber: { + type: require('./element.schema.js'), + description: + 'The next recommended dose number (e.g. dose 2 is the next recommended dose).', + }, + doseNumber: { + type: PositiveIntScalar, + description: + 'The next recommended dose number (e.g. dose 2 is the next recommended dose).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-status + forecastStatus: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Vaccine administration status.', + }, + dateCriterion: { + type: new GraphQLList( + require('./immunizationrecommendationrecommendationdatecriterion.schema.js'), + ), + description: + 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', + }, + protocol: { + type: require('./immunizationrecommendationrecommendationprotocol.schema.js'), + description: + 'Contains information about the protocol under which the vaccine was administered.', + }, + supportingImmunization: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ImmunizationRecommendationrecommendationsupportingImmunization_supportingImmunization_Union', + description: + 'Immunization event history that supports the status and recommendation.', + types: () => [require('./immunization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + }, + }), + ), + description: + 'Immunization event history that supports the status and recommendation.', + }, + supportingPatientInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ImmunizationRecommendationrecommendationsupportingPatientInformation_supportingPatientInformation_Union', + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + types: () => [ + require('./observation.schema.js'), + require('./allergyintolerance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + }, + }), + ), + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js b/src/resources/3_0_1/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js index ad9d9ad1..b86166b2 100644 --- a/src/resources/3_0_1/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js +++ b/src/resources/3_0_1/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js @@ -1,33 +1,52 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation.dateCriterion Schema + * @summary ImmunizationRecommendationrecommendationdateCriterion Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationRecommendationRecommendationDateCriterion', - description: - 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', - }, - value: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date whose meaning is specified by dateCriterion.code.', - }, - _value: { - type: require('./element.schema'), - description: - 'The date whose meaning is specified by dateCriterion.code.', - }, - }), + name: 'ImmunizationRecommendationrecommendationdateCriterion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + value: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunizationrecommendationrecommendationprotocol.schema.js b/src/resources/3_0_1/schemas/immunizationrecommendationrecommendationprotocol.schema.js index f0e58383..aeb44d49 100644 --- a/src/resources/3_0_1/schemas/immunizationrecommendationrecommendationprotocol.schema.js +++ b/src/resources/3_0_1/schemas/immunizationrecommendationrecommendationprotocol.schema.js @@ -1,52 +1,84 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary ImmunizationRecommendation.recommendation.protocol Schema + * @summary ImmunizationRecommendationrecommendationprotocol Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationRecommendationRecommendationProtocol', - description: - 'Contains information about the protocol under which the vaccine was administered.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - doseSequence: { - type: PositiveIntScalar, - description: - 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', - }, - _doseSequence: { - type: require('./element.schema'), - description: - 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', - }, - description: { - type: GraphQLString, - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - _description: { - type: require('./element.schema'), - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - authority: { - type: require('./reference.schema'), + name: 'ImmunizationRecommendationrecommendationprotocol', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _doseSequence: { + type: require('./element.schema.js'), + description: + 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', + }, + doseSequence: { + type: PositiveIntScalar, + description: + 'Indicates the nominal position in a series of the next dose. This is the recommended dose number as per a specified protocol.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + authority: { + type: new GraphQLUnionType({ + name: + 'ImmunizationRecommendationrecommendationprotocolauthority_authority_Union', description: 'Indicates the authority who published the protocol. For example, ACIP.', - }, - series: { - type: GraphQLString, - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - _series: { - type: require('./element.schema'), - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the authority who published the protocol. For example, ACIP.', + }, + _series: { + type: require('./element.schema.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/immunizationvaccinationprotocol.schema.js b/src/resources/3_0_1/schemas/immunizationvaccinationprotocol.schema.js index a0fc4c95..9e389a39 100644 --- a/src/resources/3_0_1/schemas/immunizationvaccinationprotocol.schema.js +++ b/src/resources/3_0_1/schemas/immunizationvaccinationprotocol.schema.js @@ -1,82 +1,109 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Immunization.vaccinationProtocol Schema + * @summary ImmunizationvaccinationProtocol Schema */ module.exports = new GraphQLObjectType({ - name: 'ImmunizationVaccinationProtocol', - description: - 'Contains information about the protocol(s) under which the vaccine was administered.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - doseSequence: { - type: PositiveIntScalar, - description: 'Nominal position in a series.', - }, - _doseSequence: { - type: require('./element.schema'), - description: 'Nominal position in a series.', - }, - description: { - type: GraphQLString, - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - _description: { - type: require('./element.schema'), - description: - 'Contains the description about the protocol under which the vaccine was administered.', - }, - authority: { - type: require('./reference.schema'), + name: 'ImmunizationvaccinationProtocol', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _doseSequence: { + type: require('./element.schema.js'), + description: 'Nominal position in a series.', + }, + doseSequence: { + type: PositiveIntScalar, + description: 'Nominal position in a series.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + authority: { + type: new GraphQLUnionType({ + name: 'ImmunizationvaccinationProtocolauthority_authority_Union', description: 'Indicates the authority who published the protocol. E.g. ACIP.', - }, - series: { - type: GraphQLString, - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - _series: { - type: require('./element.schema'), - description: - 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', - }, - seriesDoses: { - type: PositiveIntScalar, - description: 'The recommended number of doses to achieve immunity.', - }, - _seriesDoses: { - type: require('./element.schema'), - description: 'The recommended number of doses to achieve immunity.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-target - targetDisease: { - type: new GraphQLList( - new GraphQLNonNull(require('./codeableconcept.schema')), - ), - description: 'The targeted disease.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status - doseStatus: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Indicates if the immunization event should 'count' against the protocol.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status-reason - doseStatusReason: { - type: require('./codeableconcept.schema'), - description: - 'Provides an explanation as to why an immunization event should or should not count against the protocol.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the authority who published the protocol. E.g. ACIP.', + }, + _series: { + type: require('./element.schema.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + _seriesDoses: { + type: require('./element.schema.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDoses: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-target + targetDisease: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.schema.js')), + ), + description: 'The targeted disease.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status + doseStatus: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Indicates if the immunization event should 'count' against the protocol.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vaccination-protocol-dose-status-reason + doseStatusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides an explanation as to why an immunization event should or should not count against the protocol.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/implementationguide.schema.js b/src/resources/3_0_1/schemas/implementationguide.schema.js index dfd74ea8..b7431b64 100644 --- a/src/resources/3_0_1/schemas/implementationguide.schema.js +++ b/src/resources/3_0_1/schemas/implementationguide.schema.js @@ -1,24 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ImplementationGuideResourceType = new GraphQLEnumType({ - name: 'ImplementationGuideResourceType', - values: { - ImplementationGuide: { value: 'ImplementationGuide' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,161 +18,219 @@ let ImplementationGuideResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ImplementationGuide', - description: 'Base StructureDefinition for ImplementationGuide Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ImplementationGuideResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this implementation guide. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this implementation guide. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the implementation guide.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the implementation guide.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the implementation guide from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the implementation guide from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate implementation guide instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the implementation guide is intended to be used.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', - }, - fhirVersion: { - type: IdScalar, - description: - 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', - }, - _fhirVersion: { - type: require('./element.schema'), - description: - 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', - }, - dependency: { - type: new GraphQLList( - require('./implementationguidedependency.schema'), - ), - description: - 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', - }, - package: { - type: new GraphQLList(require('./implementationguidepackage.schema')), - description: - 'A logical group of resources. Logical groups can be used when building pages.', - }, - global: { - type: new GraphQLList(require('./implementationguideglobal.schema')), - description: - 'A set of profiles that all resources covered by this implementation guide must conform to.', - }, - binary: { - type: new GraphQLList(UriScalar), - description: - 'A binary file that is included in the implementation guide when it is published.', - }, - _binary: { - type: require('./element.schema'), - description: - 'A binary file that is included in the implementation guide when it is published.', - }, - page: { - type: require('./implementationguidepage.schema'), - description: - 'A page / section in the implementation guide. The root page is the implementation guide home page.', - }, - }), + description: 'Base StructureDefinition for ImplementationGuide Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImplementationGuide_Enum_schema', + values: { ImplementationGuide: { value: 'ImplementationGuide' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. The URL SHOULD include the major version of the implementation guide. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this implementation guide. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this implementation guide. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the implementation guide was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the implementation guide.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the implementation guide.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the implementation guide from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the implementation guide from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate implementation guide instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the implementation guide is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', + }, + fhirVersion: { + type: IdScalar, + description: + 'The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', + }, + dependency: { + type: new GraphQLList( + require('./implementationguidedependency.schema.js'), + ), + description: + 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', + }, + package: { + type: new GraphQLList(require('./implementationguidepackage.schema.js')), + description: + 'A logical group of resources. Logical groups can be used when building pages.', + }, + global: { + type: new GraphQLList(require('./implementationguideglobal.schema.js')), + description: + 'A set of profiles that all resources covered by this implementation guide must conform to.', + }, + _binary: { + type: require('./element.schema.js'), + description: + 'A binary file that is included in the implementation guide when it is published.', + }, + binary: { + type: new GraphQLList(UriScalar), + description: + 'A binary file that is included in the implementation guide when it is published.', + }, + page: { + type: require('./implementationguidepage.schema.js'), + description: + 'A page / section in the implementation guide. The root page is the implementation guide home page.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/implementationguidedependency.schema.js b/src/resources/3_0_1/schemas/implementationguidedependency.schema.js index 5a965b34..004d5d52 100644 --- a/src/resources/3_0_1/schemas/implementationguidedependency.schema.js +++ b/src/resources/3_0_1/schemas/implementationguidedependency.schema.js @@ -1,37 +1,58 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImplementationGuide.dependency Schema + * @summary ImplementationGuidedependency Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuideDependency', - description: - 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-dependency-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How the dependency is represented when the guide is published.', - }, - _type: { - type: require('./element.schema'), - description: - 'How the dependency is represented when the guide is published.', - }, - uri: { - type: new GraphQLNonNull(UriScalar), - description: 'Where the dependency is located.', - }, - _uri: { - type: require('./element.schema'), - description: 'Where the dependency is located.', - }, - }), + name: 'ImplementationGuidedependency', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'How the dependency is represented when the guide is published.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-dependency-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the dependency is represented when the guide is published.', + }, + _uri: { + type: require('./element.schema.js'), + description: 'Where the dependency is located.', + }, + uri: { + type: new GraphQLNonNull(UriScalar), + description: 'Where the dependency is located.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/implementationguideglobal.schema.js b/src/resources/3_0_1/schemas/implementationguideglobal.schema.js index 3b480008..6c95463f 100644 --- a/src/resources/3_0_1/schemas/implementationguideglobal.schema.js +++ b/src/resources/3_0_1/schemas/implementationguideglobal.schema.js @@ -1,31 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ImplementationGuide.global Schema + * @summary ImplementationGuideglobal Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuideGlobal', - description: - 'A set of profiles that all resources covered by this implementation guide must conform to.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of resource that all instances must conform to.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of resource that all instances must conform to.', - }, - profile: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the profile that all instances must conform to.', - }, - }), + name: 'ImplementationGuideglobal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of resource that all instances must conform to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of resource that all instances must conform to.', + }, + profile: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImplementationGuideglobalprofile_profile_Union', + description: + 'A reference to the profile that all instances must conform to.', + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + ), + description: + 'A reference to the profile that all instances must conform to.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/implementationguidepackage.schema.js b/src/resources/3_0_1/schemas/implementationguidepackage.schema.js index 1f74b777..fb1128a4 100644 --- a/src/resources/3_0_1/schemas/implementationguidepackage.schema.js +++ b/src/resources/3_0_1/schemas/implementationguidepackage.schema.js @@ -1,46 +1,62 @@ const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary ImplementationGuide.package Schema + * @summary ImplementationGuidepackage Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuidePackage', - description: - 'A logical group of resources. Logical groups can be used when building pages.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name for the group, as used in page.package.', - }, - _name: { - type: require('./element.schema'), - description: 'The name for the group, as used in page.package.', - }, - description: { - type: GraphQLString, - description: 'Human readable text describing the package.', - }, - _description: { - type: require('./element.schema'), - description: 'Human readable text describing the package.', - }, - resource: { - type: new GraphQLList( - new GraphQLNonNull( - require('./implementationguidepackageresource.schema'), - ), + name: 'ImplementationGuidepackage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name for the group, as used in page.package.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name for the group, as used in page.package.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Human readable text describing the package.', + }, + description: { + type: GraphQLString, + description: 'Human readable text describing the package.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull( + require('./implementationguidepackageresource.schema.js'), ), - description: - 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', - }, - }), + ), + description: + 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/implementationguidepackageresource.schema.js b/src/resources/3_0_1/schemas/implementationguidepackageresource.schema.js index 3832ee17..6a1588ed 100644 --- a/src/resources/3_0_1/schemas/implementationguidepackageresource.schema.js +++ b/src/resources/3_0_1/schemas/implementationguidepackageresource.schema.js @@ -1,79 +1,119 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, - GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ImplementationGuide.package.resource Schema + * @summary ImplementationGuidepackageresource Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuidePackageResource', - description: - 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - example: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.', - }, - _example: { - type: require('./element.schema'), - description: - 'Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.', - }, - name: { - type: GraphQLString, - description: - 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', - }, - _name: { - type: require('./element.schema'), - description: - 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', - }, - description: { - type: GraphQLString, - description: - 'A description of the reason that a resource has been included in the implementation guide.', - }, - _description: { - type: require('./element.schema'), - description: - 'A description of the reason that a resource has been included in the implementation guide.', - }, - acronym: { - type: GraphQLString, - description: - 'A short code that may be used to identify the resource throughout the implementation guide.', - }, - _acronym: { - type: require('./element.schema'), - description: - 'A short code that may be used to identify the resource throughout the implementation guide.', - }, - sourceUri: { - type: new GraphQLNonNull(UriScalar), - description: 'Where this resource is found.', - }, - _sourceUri: { - type: require('./element.schema'), - description: 'Where this resource is found.', - }, - sourceReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Where this resource is found.', - }, - exampleFor: { - type: require('./reference.schema'), + name: 'ImplementationGuidepackageresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _example: { + type: require('./element.schema.js'), + description: + 'Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.', + }, + example: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + name: { + type: GraphQLString, + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + description: { + type: GraphQLString, + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + _acronym: { + type: require('./element.schema.js'), + description: + 'A short code that may be used to identify the resource throughout the implementation guide.', + }, + acronym: { + type: GraphQLString, + description: + 'A short code that may be used to identify the resource throughout the implementation guide.', + }, + _sourceUri: { + type: require('./element.schema.js'), + description: 'Where this resource is found.', + }, + sourceUri: { + type: new GraphQLNonNull(UriScalar), + description: 'Where this resource is found.', + }, + sourceReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ImplementationGuidepackageresourcesourceReference_sourceReference_Union', + description: 'Where this resource is found.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Where this resource is found.', + }, + exampleFor: { + type: new GraphQLUnionType({ + name: 'ImplementationGuidepackageresourceexampleFor_exampleFor_Union', description: 'Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.', - }, - }), + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + description: + 'Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/implementationguidepage.schema.js b/src/resources/3_0_1/schemas/implementationguidepage.schema.js index 7e91c281..029ecea9 100644 --- a/src/resources/3_0_1/schemas/implementationguidepage.schema.js +++ b/src/resources/3_0_1/schemas/implementationguidepage.schema.js @@ -1,81 +1,97 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ImplementationGuide.page Schema + * @summary ImplementationGuidepage Schema */ module.exports = new GraphQLObjectType({ - name: 'ImplementationGuidePage', - description: - 'A page / section in the implementation guide. The root page is the implementation guide home page.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - source: { - type: new GraphQLNonNull(UriScalar), - description: 'The source address for the page.', - }, - _source: { - type: require('./element.schema'), - description: 'The source address for the page.', - }, - title: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/guide-page-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', - }, - _kind: { - type: require('./element.schema'), - description: - 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - type: { - type: new GraphQLList(CodeScalar), - description: - 'For constructed pages, what kind of resources to include in the list.', - }, - _type: { - type: require('./element.schema'), - description: - 'For constructed pages, what kind of resources to include in the list.', - }, - package: { - type: new GraphQLList(GraphQLString), - description: - 'For constructed pages, a list of packages to include in the page (or else empty for everything).', - }, - _package: { - type: require('./element.schema'), - description: - 'For constructed pages, a list of packages to include in the page (or else empty for everything).', - }, - format: { - type: CodeScalar, - description: 'The format of the page.', - }, - _format: { - type: require('./element.schema'), - description: 'The format of the page.', - }, - }), + name: 'ImplementationGuidepage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _source: { + type: require('./element.schema.js'), + description: 'The source address for the page.', + }, + source: { + type: new GraphQLNonNull(UriScalar), + description: 'The source address for the page.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/guide-page-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'For constructed pages, what kind of resources to include in the list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + type: { + type: new GraphQLList(CodeScalar), + description: + 'For constructed pages, what kind of resources to include in the list.', + }, + _package: { + type: require('./element.schema.js'), + description: + 'For constructed pages, a list of packages to include in the page (or else empty for everything).', + }, + package: { + type: new GraphQLList(GraphQLString), + description: + 'For constructed pages, a list of packages to include in the page (or else empty for everything).', + }, + _format: { + type: require('./element.schema.js'), + description: 'The format of the page.', + }, + format: { + type: CodeScalar, + description: 'The format of the page.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/library.schema.js b/src/resources/3_0_1/schemas/library.schema.js index a1f5d8e7..eaf82e5a 100644 --- a/src/resources/3_0_1/schemas/library.schema.js +++ b/src/resources/3_0_1/schemas/library.schema.js @@ -1,24 +1,17 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let LibraryResourceType = new GraphQLEnumType({ - name: 'LibraryResourceType', - values: { - Library: { value: 'Library' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,216 +19,272 @@ let LibraryResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Library', - description: 'Base StructureDefinition for Library Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(LibraryResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the library.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the library.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this library. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this library. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/library-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the library.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the library.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the library from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the library from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this library is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this library is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the library is used from a clinical perspective.', - }, - _usage: { - type: require('./element.schema'), - description: - 'A detailed description of how the library is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.schema'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.schema'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The period during which the library content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate library instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the library is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.schema')), - description: - 'A contributor to the content of the library, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: - 'Related artifacts such as additional documentation, justification, or bibliographic references.', - }, - parameter: { - type: new GraphQLList(require('./parameterdefinition.schema')), - description: - 'The parameter element defines parameters used by the library.', - }, - dataRequirement: { - type: new GraphQLList(require('./datarequirement.schema')), - description: - 'Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.', - }, - content: { - type: new GraphQLList(require('./attachment.schema')), - description: - 'The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.', - }, - }), + description: 'Base StructureDefinition for Library Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Library_Enum_schema', + values: { Library: { value: 'Library' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) published. The URL SHOULD include the major version of the library. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A short, descriptive, user-friendly title for the library.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive, user-friendly title for the library.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this library. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this library. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/library-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the library was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the library.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the library.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the library from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the library from a consumer's perspective.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this library is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this library is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the library is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the library is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the library content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate library instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the library is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.schema.js')), + description: + 'A contributor to the content of the library, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + parameter: { + type: new GraphQLList(require('./parameterdefinition.schema.js')), + description: + 'The parameter element defines parameters used by the library.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: + 'Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.', + }, + content: { + type: new GraphQLList(require('./attachment.schema.js')), + description: + 'The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/linkage.schema.js b/src/resources/3_0_1/schemas/linkage.schema.js index 0cdb5a41..f799ed1f 100644 --- a/src/resources/3_0_1/schemas/linkage.schema.js +++ b/src/resources/3_0_1/schemas/linkage.schema.js @@ -1,20 +1,14 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, - GraphQLBoolean, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let LinkageResourceType = new GraphQLEnumType({ - name: 'LinkageResourceType', - values: { - Linkage: { value: 'Linkage' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,34 +16,108 @@ let LinkageResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Linkage', - description: 'Base StructureDefinition for Linkage Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(LinkageResourceType), - description: 'Type of this resource.', - }, - active: { - type: GraphQLBoolean, - description: - "Indicates whether the asserted set of linkages are considered to be 'in effect'.", - }, - _active: { - type: require('./element.schema'), - description: - "Indicates whether the asserted set of linkages are considered to be 'in effect'.", - }, - author: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Linkage Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Linkage_Enum_schema', + values: { Linkage: { value: 'Linkage' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _active: { + type: require('./element.schema.js'), + description: + "Indicates whether the asserted set of linkages are considered to be 'in effect'.", + }, + active: { + type: GraphQLBoolean, + description: + "Indicates whether the asserted set of linkages are considered to be 'in effect'.", + }, + author: { + type: new GraphQLUnionType({ + name: 'Linkageauthor_author_Union', description: 'Identifies the user or organization responsible for asserting the linkages and who establishes the context for evaluating the nature of each linkage.', - }, - item: { - type: new GraphQLList( - new GraphQLNonNull(require('./linkageitem.schema')), - ), - description: - 'Identifies one of the records that is considered to refer to the same real-world occurrence as well as how the items hould be evaluated within the collection of linked items.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the user or organization responsible for asserting the linkages and who establishes the context for evaluating the nature of each linkage.', + }, + item: { + type: new GraphQLList( + new GraphQLNonNull(require('./linkageitem.schema.js')), + ), + description: + 'Identifies one of the records that is considered to refer to the same real-world occurrence as well as how the items hould be evaluated within the collection of linked items.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/linkageitem.schema.js b/src/resources/3_0_1/schemas/linkageitem.schema.js index 4989e5eb..af0b932b 100644 --- a/src/resources/3_0_1/schemas/linkageitem.schema.js +++ b/src/resources/3_0_1/schemas/linkageitem.schema.js @@ -1,32 +1,54 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Linkage.item Schema + * @summary Linkageitem Schema */ module.exports = new GraphQLObjectType({ - name: 'LinkageItem', - description: - 'Identifies one of the records that is considered to refer to the same real-world occurrence as well as how the items hould be evaluated within the collection of linked items.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/linkage-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", - }, - _type: { - type: require('./element.schema'), - description: - "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", - }, - resource: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The resource instance being linked as part of the group.', - }, - }), + name: 'Linkageitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/linkage-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", + }, + resource: { + type: new GraphQLNonNull(require('./resourcelist.schema')), + description: 'The resource instance being linked as part of the group.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/list.schema.js b/src/resources/3_0_1/schemas/list.schema.js index 8fe9e74c..caeb77d7 100644 --- a/src/resources/3_0_1/schemas/list.schema.js +++ b/src/resources/3_0_1/schemas/list.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ListResourceType = new GraphQLEnumType({ - name: 'ListResourceType', - values: { - List: { value: 'List' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,92 +17,204 @@ let ListResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'List', - description: 'Base StructureDefinition for List Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ListResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier for the List assigned for business purposes outside the context of FHIR.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'Indicates the current state of this list.', - }, - _status: { - type: require('./element.schema'), - description: 'Indicates the current state of this list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - _mode: { - type: require('./element.schema'), - description: - 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', - }, - title: { - type: GraphQLString, - description: 'A label for the list assigned by the author.', - }, - _title: { - type: require('./element.schema'), - description: 'A label for the list assigned by the author.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-example-codes - code: { - type: require('./codeableconcept.schema'), - description: - 'This code defines the purpose of the list - why it was created.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for List Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'List_Enum_schema', + values: { List: { value: 'List' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier for the List assigned for business purposes outside the context of FHIR.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current state of this list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this list.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A label for the list assigned by the author.', + }, + title: { + type: GraphQLString, + description: 'A label for the list assigned by the author.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-example-codes + code: { + type: require('./codeableconcept.schema.js'), + description: + 'This code defines the purpose of the list - why it was created.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Listsubject_subject_Union', description: 'The common subject (or patient) of the resources that are in the list, if there is one.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The common subject (or patient) of the resources that are in the list, if there is one.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Listencounter_encounter_Union', description: 'The encounter that is the context in which this list was created.', - }, - date: { - type: DateTimeScalar, - description: 'The date that the list was prepared.', - }, - _date: { - type: require('./element.schema'), - description: 'The date that the list was prepared.', - }, - source: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The encounter that is the context in which this list was created.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date that the list was prepared.', + }, + date: { + type: DateTimeScalar, + description: 'The date that the list was prepared.', + }, + source: { + type: new GraphQLUnionType({ + name: 'Listsource_source_Union', description: 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-order - orderedBy: { - type: require('./codeableconcept.schema'), - description: 'What order applies to the items in the list.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: 'Comments that apply to the overall list.', - }, - entry: { - type: new GraphQLList(require('./listentry.schema')), - description: 'Entries in this list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason - emptyReason: { - type: require('./codeableconcept.schema'), - description: 'If the list is empty, why the list is empty.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-order + orderedBy: { + type: require('./codeableconcept.schema.js'), + description: 'What order applies to the items in the list.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Comments that apply to the overall list.', + }, + entry: { + type: new GraphQLList(require('./listentry.schema.js')), + description: 'Entries in this list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-empty-reason + emptyReason: { + type: require('./codeableconcept.schema.js'), + description: 'If the list is empty, why the list is empty.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/listentry.schema.js b/src/resources/3_0_1/schemas/listentry.schema.js index f9a641c6..455793d7 100644 --- a/src/resources/3_0_1/schemas/listentry.schema.js +++ b/src/resources/3_0_1/schemas/listentry.schema.js @@ -1,47 +1,79 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLBoolean, GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary List.entry Schema + * @summary Listentry Schema */ module.exports = new GraphQLObjectType({ - name: 'ListEntry', - description: 'Entries in this list.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/list-item-flag - flag: { - type: require('./codeableconcept.schema'), - description: - 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', - }, - deleted: { - type: GraphQLBoolean, - description: 'True if this item is marked as deleted in the list.', - }, - _deleted: { - type: require('./element.schema'), - description: 'True if this item is marked as deleted in the list.', - }, - date: { - type: DateTimeScalar, - description: 'When this item was added to the list.', - }, - _date: { - type: require('./element.schema'), - description: 'When this item was added to the list.', - }, - item: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the actual resource from which data was derived.', - }, - }), + name: 'Listentry', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/list-item-flag + flag: { + type: require('./codeableconcept.schema.js'), + description: + 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', + }, + _deleted: { + type: require('./element.schema.js'), + description: 'True if this item is marked as deleted in the list.', + }, + deleted: { + type: GraphQLBoolean, + description: 'True if this item is marked as deleted in the list.', + }, + _date: { + type: require('./element.schema.js'), + description: 'When this item was added to the list.', + }, + date: { + type: DateTimeScalar, + description: 'When this item was added to the list.', + }, + item: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Listentryitem_item_Union', + description: + 'A reference to the actual resource from which data was derived.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to the actual resource from which data was derived.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/location.schema.js b/src/resources/3_0_1/schemas/location.schema.js index a9f52e4b..7a6ff4f6 100644 --- a/src/resources/3_0_1/schemas/location.schema.js +++ b/src/resources/3_0_1/schemas/location.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let LocationResourceType = new GraphQLEnumType({ - name: 'LocationResourceType', - values: { - Location: { value: 'Location' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,116 +16,205 @@ let LocationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Location', - description: 'Base StructureDefinition for Location Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(LocationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Unique code or number identifying the location to its users.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-status - status: { - type: CodeScalar, - description: - 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0116 - operationalStatus: { - type: require('./coding.schema'), - description: - 'The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.', - }, - name: { - type: GraphQLString, - description: - 'Name of the location as used by humans. Does not need to be unique.', - }, - _name: { - type: require('./element.schema'), - description: - 'Name of the location as used by humans. Does not need to be unique.', - }, - alias: { - type: new GraphQLList(GraphQLString), - description: - 'A list of alternate names that the location is known as, or was known as in the past.', - }, - _alias: { - type: require('./element.schema'), - description: - 'A list of alternate names that the location is known as, or was known as in the past.', - }, - description: { - type: GraphQLString, - description: - 'Description of the Location, which helps in finding or referencing the place.', - }, - _description: { - type: require('./element.schema'), - description: - 'Description of the Location, which helps in finding or referencing the place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-mode - mode: { - type: CodeScalar, - description: - 'Indicates whether a resource instance represents a specific location or a class of locations.', - }, - _mode: { - type: require('./element.schema'), - description: - 'Indicates whether a resource instance represents a specific location or a class of locations.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType - type: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of function performed at the location.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', - }, - address: { - type: require('./address.schema'), - description: 'Physical location.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/location-physical-type - physicalType: { - type: require('./codeableconcept.schema'), - description: - 'Physical form of the location, e.g. building, room, vehicle, road.', - }, - position: { - type: require('./locationposition.schema'), - description: - 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Location Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Location_Enum_schema', + values: { Location: { value: 'Location' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Unique code or number identifying the location to its users.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-status + status: { + type: CodeScalar, + description: + 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0116 + operationalStatus: { + type: require('./coding.schema.js'), + description: + 'The Operational status covers operation values most relevant to beds (but can also apply to rooms/units/chair/etc such as an isolation unit/dialisys chair). This typically covers concepts such as contamination, housekeeping and other activities like maintenance.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + name: { + type: GraphQLString, + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'A list of alternate names that the location is known as, or was known as in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the location is known as, or was known as in the past.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + description: { + type: GraphQLString, + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-mode + mode: { + type: CodeScalar, + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType + type: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the type of function performed at the location.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', + }, + address: { + type: require('./address.schema.js'), + description: 'Physical location.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/location-physical-type + physicalType: { + type: require('./codeableconcept.schema.js'), + description: + 'Physical form of the location, e.g. building, room, vehicle, road.', + }, + position: { + type: require('./locationposition.schema.js'), + description: + 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'LocationmanagingOrganization_managingOrganization_Union', description: 'The organization responsible for the provisioning and upkeep of the location.', - }, - partOf: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization responsible for the provisioning and upkeep of the location.', + }, + partOf: { + type: new GraphQLUnionType({ + name: 'LocationpartOf_partOf_Union', description: 'Another Location which this Location is physically part of.', - }, - endpoint: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Technical endpoints providing access to services operated for the location.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Another Location which this Location is physically part of.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Locationendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for the location.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for the location.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/locationposition.schema.js b/src/resources/3_0_1/schemas/locationposition.schema.js index 154dfad1..9e500c4d 100644 --- a/src/resources/3_0_1/schemas/locationposition.schema.js +++ b/src/resources/3_0_1/schemas/locationposition.schema.js @@ -1,46 +1,68 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Location.position Schema + * @summary Locationposition Schema */ module.exports = new GraphQLObjectType({ - name: 'LocationPosition', - description: - 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - longitude: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', - }, - _longitude: { - type: require('./element.schema'), - description: - 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', - }, - latitude: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', - }, - _latitude: { - type: require('./element.schema'), - description: - 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', - }, - altitude: { - type: GraphQLFloat, - description: - 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', - }, - _altitude: { - type: require('./element.schema'), - description: - 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', - }, - }), + name: 'Locationposition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _longitude: { + type: require('./element.schema.js'), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + longitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + _latitude: { + type: require('./element.schema.js'), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + latitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + _altitude: { + type: require('./element.schema.js'), + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + altitude: { + type: GraphQLFloat, + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measure.schema.js b/src/resources/3_0_1/schemas/measure.schema.js index d721fc70..19858b55 100644 --- a/src/resources/3_0_1/schemas/measure.schema.js +++ b/src/resources/3_0_1/schemas/measure.schema.js @@ -1,24 +1,17 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MeasureResourceType = new GraphQLEnumType({ - name: 'MeasureResourceType', - values: { - Measure: { value: 'Measure' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,315 +19,383 @@ let MeasureResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Measure', - description: 'Base StructureDefinition for Measure Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MeasureResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this measure is (or will be) published. The URL SHOULD include the major version of the measure. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this measure is (or will be) published. The URL SHOULD include the major version of the measure. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the measure.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the measure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this measure. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this measure. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the measure was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the measure was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the measure.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the measure.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the measure from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the measure from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this measure is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this measure is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the measure is used from a clinical perspective.', - }, - _usage: { - type: require('./element.schema'), - description: - 'A detailed description of how the measure is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.schema'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.schema'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The period during which the measure content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate measure instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the measure is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Descriptive topics related to the content of the measure. Topics provide a high-level categorization of the type of the measure that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.schema')), - description: - 'A contributor to the content of the measure, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: - 'Related artifacts such as additional documentation, justification, or bibliographic references.', - }, - library: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A reference to a Library resource containing the formal logic used by the measure.', - }, - disclaimer: { - type: GraphQLString, - description: - 'Notices and disclaimers regarding the use of the measure, or related to intellectual property (such as code systems) referenced by the measure.', - }, - _disclaimer: { - type: require('./element.schema'), - description: - 'Notices and disclaimers regarding the use of the measure, or related to intellectual property (such as code systems) referenced by the measure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-scoring - scoring: { - type: require('./codeableconcept.schema'), - description: - 'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/composite-measure-scoring - compositeScoring: { - type: require('./codeableconcept.schema'), - description: - 'If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.', - }, - riskAdjustment: { - type: GraphQLString, - description: - 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', - }, - _riskAdjustment: { - type: require('./element.schema'), - description: - 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', - }, - rateAggregation: { - type: GraphQLString, - description: - 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', - }, - _rateAggregation: { - type: require('./element.schema'), - description: - 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', - }, - rationale: { - type: GraphQLString, - description: - 'Provides a succint statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', - }, - _rationale: { - type: require('./element.schema'), - description: - 'Provides a succint statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', - }, - clinicalRecommendationStatement: { - type: GraphQLString, - description: - 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', - }, - _clinicalRecommendationStatement: { - type: require('./element.schema'), - description: - 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', - }, - improvementNotation: { - type: GraphQLString, - description: - 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is whthin a range).', - }, - _improvementNotation: { - type: require('./element.schema'), - description: - 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is whthin a range).', - }, - definition: { - type: new GraphQLList(GraphQLString), - description: - 'Provides a description of an individual term used within the measure.', - }, - _definition: { - type: require('./element.schema'), - description: - 'Provides a description of an individual term used within the measure.', - }, - guidance: { - type: GraphQLString, - description: - 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', - }, - _guidance: { - type: require('./element.schema'), - description: - 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', - }, - set: { - type: GraphQLString, - description: 'The measure set, e.g. Preventive Care and Screening.', - }, - _set: { - type: require('./element.schema'), - description: 'The measure set, e.g. Preventive Care and Screening.', - }, - group: { - type: new GraphQLList(require('./measuregroup.schema')), - description: 'A group of population criteria for the measure.', - }, - supplementalData: { - type: new GraphQLList(require('./measuresupplementaldata.schema')), - description: - 'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.', - }, - }), + description: 'Base StructureDefinition for Measure Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Measure_Enum_schema', + values: { Measure: { value: 'Measure' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this measure is (or will be) published. The URL SHOULD include the major version of the measure. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this measure is (or will be) published. The URL SHOULD include the major version of the measure. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A short, descriptive, user-friendly title for the measure.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive, user-friendly title for the measure.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this measure. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this measure. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the measure was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the measure was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the measure.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the measure.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the measure from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the measure from a consumer's perspective.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this measure is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this measure is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the measure is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the measure is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the measure content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate measure instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the measure is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the measure. Topics provide a high-level categorization of the type of the measure that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.schema.js')), + description: + 'A contributor to the content of the measure, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + library: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Measurelibrary_library_Union', + description: + 'A reference to a Library resource containing the formal logic used by the measure.', + types: () => [require('./library.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Library') { + return require('./library.schema.js'); + } + }, + }), + ), + description: + 'A reference to a Library resource containing the formal logic used by the measure.', + }, + _disclaimer: { + type: require('./element.schema.js'), + description: + 'Notices and disclaimers regarding the use of the measure, or related to intellectual property (such as code systems) referenced by the measure.', + }, + disclaimer: { + type: GraphQLString, + description: + 'Notices and disclaimers regarding the use of the measure, or related to intellectual property (such as code systems) referenced by the measure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-scoring + scoring: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/composite-measure-scoring + compositeScoring: { + type: require('./codeableconcept.schema.js'), + description: + 'If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.', + }, + _riskAdjustment: { + type: require('./element.schema.js'), + description: + 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', + }, + riskAdjustment: { + type: GraphQLString, + description: + 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', + }, + _rateAggregation: { + type: require('./element.schema.js'), + description: + 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', + }, + rateAggregation: { + type: GraphQLString, + description: + 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', + }, + _rationale: { + type: require('./element.schema.js'), + description: + 'Provides a succint statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', + }, + rationale: { + type: GraphQLString, + description: + 'Provides a succint statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', + }, + _clinicalRecommendationStatement: { + type: require('./element.schema.js'), + description: + 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', + }, + clinicalRecommendationStatement: { + type: GraphQLString, + description: + 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', + }, + _improvementNotation: { + type: require('./element.schema.js'), + description: + 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is whthin a range).', + }, + improvementNotation: { + type: GraphQLString, + description: + 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is whthin a range).', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'Provides a description of an individual term used within the measure.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'Provides a description of an individual term used within the measure.', + }, + _guidance: { + type: require('./element.schema.js'), + description: + 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', + }, + guidance: { + type: GraphQLString, + description: + 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', + }, + _set: { + type: require('./element.schema.js'), + description: 'The measure set, e.g. Preventive Care and Screening.', + }, + set: { + type: GraphQLString, + description: 'The measure set, e.g. Preventive Care and Screening.', + }, + group: { + type: new GraphQLList(require('./measuregroup.schema.js')), + description: 'A group of population criteria for the measure.', + }, + supplementalData: { + type: new GraphQLList(require('./measuresupplementaldata.schema.js')), + description: + 'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measuregroup.schema.js b/src/resources/3_0_1/schemas/measuregroup.schema.js index 1afe2f70..2e94519a 100644 --- a/src/resources/3_0_1/schemas/measuregroup.schema.js +++ b/src/resources/3_0_1/schemas/measuregroup.schema.js @@ -1,50 +1,67 @@ const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Measure.group Schema + * @summary Measuregroup Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureGroup', - description: 'A group of population criteria for the measure.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: - 'A unique identifier for the group. This identifier will used to report data for the group in the measure report.', - }, - name: { - type: GraphQLString, - description: 'Optional name or short description of this group.', - }, - _name: { - type: require('./element.schema'), - description: 'Optional name or short description of this group.', - }, - description: { - type: GraphQLString, - description: 'The human readable description of this population group.', - }, - _description: { - type: require('./element.schema'), - description: 'The human readable description of this population group.', - }, - population: { - type: new GraphQLList(require('./measuregrouppopulation.schema')), - description: 'A population criteria for the measure.', - }, - stratifier: { - type: new GraphQLList(require('./measuregroupstratifier.schema')), - description: - 'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.', - }, - }), + name: 'Measuregroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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 GraphQLNonNull(require('./identifier.schema.js')), + description: + 'A unique identifier for the group. This identifier will used to report data for the group in the measure report.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Optional name or short description of this group.', + }, + name: { + type: GraphQLString, + description: 'Optional name or short description of this group.', + }, + _description: { + type: require('./element.schema.js'), + description: 'The human readable description of this population group.', + }, + description: { + type: GraphQLString, + description: 'The human readable description of this population group.', + }, + population: { + type: new GraphQLList(require('./measuregrouppopulation.schema.js')), + description: 'A population criteria for the measure.', + }, + stratifier: { + type: new GraphQLList(require('./measuregroupstratifier.schema.js')), + description: + 'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measuregrouppopulation.schema.js b/src/resources/3_0_1/schemas/measuregrouppopulation.schema.js index c4e69b2b..671b4392 100644 --- a/src/resources/3_0_1/schemas/measuregrouppopulation.schema.js +++ b/src/resources/3_0_1/schemas/measuregrouppopulation.schema.js @@ -1,53 +1,75 @@ -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Measure.group.population Schema + * @summary Measuregrouppopulation Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureGroupPopulation', - description: 'A population criteria for the measure.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-population - code: { - type: require('./codeableconcept.schema'), - description: 'The type of population criteria.', - }, - name: { - type: GraphQLString, - description: 'Optional name or short description of this population.', - }, - _name: { - type: require('./element.schema'), - description: 'Optional name or short description of this population.', - }, - description: { - type: GraphQLString, - description: - 'The human readable description of this population criteria.', - }, - _description: { - type: require('./element.schema'), - description: - 'The human readable description of this population criteria.', - }, - criteria: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.', - }, - _criteria: { - type: require('./element.schema'), - description: - 'The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.', - }, - }), + name: 'Measuregrouppopulation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-population + code: { + type: require('./codeableconcept.schema.js'), + description: 'The type of population criteria.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Optional name or short description of this population.', + }, + name: { + type: GraphQLString, + description: 'Optional name or short description of this population.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The human readable description of this population criteria.', + }, + description: { + type: GraphQLString, + description: + 'The human readable description of this population criteria.', + }, + _criteria: { + type: require('./element.schema.js'), + description: + 'The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.', + }, + criteria: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measuregroupstratifier.schema.js b/src/resources/3_0_1/schemas/measuregroupstratifier.schema.js index 330e1605..d27495f9 100644 --- a/src/resources/3_0_1/schemas/measuregroupstratifier.schema.js +++ b/src/resources/3_0_1/schemas/measuregroupstratifier.schema.js @@ -1,41 +1,57 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary Measure.group.stratifier Schema + * @summary Measuregroupstratifier Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureGroupStratifier', - description: - 'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'The identifier for the stratifier used to coordinate the reported data back to this stratifier.', - }, - criteria: { - type: GraphQLString, - description: - 'The criteria for the stratifier. This must be the name of an expression defined within a referenced library.', - }, - _criteria: { - type: require('./element.schema'), - description: - 'The criteria for the stratifier. This must be the name of an expression defined within a referenced library.', - }, - path: { - type: GraphQLString, - description: - 'The path to an element that defines the stratifier, specified as a valid FHIR resource path.', - }, - _path: { - type: require('./element.schema'), - description: - 'The path to an element that defines the stratifier, specified as a valid FHIR resource path.', - }, - }), + name: 'Measuregroupstratifier', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'The identifier for the stratifier used to coordinate the reported data back to this stratifier.', + }, + _criteria: { + type: require('./element.schema.js'), + description: + 'The criteria for the stratifier. This must be the name of an expression defined within a referenced library.', + }, + criteria: { + type: GraphQLString, + description: + 'The criteria for the stratifier. This must be the name of an expression defined within a referenced library.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The path to an element that defines the stratifier, specified as a valid FHIR resource path.', + }, + path: { + type: GraphQLString, + description: + 'The path to an element that defines the stratifier, specified as a valid FHIR resource path.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measurereport.schema.js b/src/resources/3_0_1/schemas/measurereport.schema.js index 110b53d3..b29eeb4d 100644 --- a/src/resources/3_0_1/schemas/measurereport.schema.js +++ b/src/resources/3_0_1/schemas/measurereport.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MeasureReportResourceType = new GraphQLEnumType({ - name: 'MeasureReportResourceType', - values: { - MeasureReport: { value: 'MeasureReport' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,76 +16,174 @@ let MeasureReportResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MeasureReport', - description: 'Base StructureDefinition for MeasureReport Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MeasureReportResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'A formal identifier that is used to identify this report when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-report-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The report status. No data will be available until the report status is complete.', - }, - _status: { - type: require('./element.schema'), - description: - 'The report status. No data will be available until the report status is complete.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-report-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - "The type of measure report. This may be an individual report, which provides a single patient's score for the measure; a patient listing, which returns the list of patients that meet the various criteria in the measure; or a summary report, which returns a population count for each of the criteria in the measure.", - }, - _type: { - type: require('./element.schema'), - description: - "The type of measure report. This may be an individual report, which provides a single patient's score for the measure; a patient listing, which returns the list of patients that meet the various criteria in the measure; or a summary report, which returns a population count for each of the criteria in the measure.", - }, - measure: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the Measure that was evaluated to produce this report.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MeasureReport Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MeasureReport_Enum_schema', + values: { MeasureReport: { value: 'MeasureReport' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'A formal identifier that is used to identify this report when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The report status. No data will be available until the report status is complete.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-report-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The report status. No data will be available until the report status is complete.', + }, + _type: { + type: require('./element.schema.js'), + description: + "The type of measure report. This may be an individual report, which provides a single patient's score for the measure; a patient listing, which returns the list of patients that meet the various criteria in the measure; or a summary report, which returns a population count for each of the criteria in the measure.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-report-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "The type of measure report. This may be an individual report, which provides a single patient's score for the measure; a patient listing, which returns the list of patients that meet the various criteria in the measure; or a summary report, which returns a population count for each of the criteria in the measure.", + }, + measure: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MeasureReportmeasure_measure_Union', + description: + 'A reference to the Measure that was evaluated to produce this report.', + types: () => [require('./measure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Measure') { + return require('./measure.schema.js'); + } + }, + }), + ), + description: + 'A reference to the Measure that was evaluated to produce this report.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'MeasureReportpatient_patient_Union', description: 'Optional Patient if the report was requested for a single patient.', - }, - date: { - type: DateTimeScalar, - description: 'The date this measure report was generated.', - }, - _date: { - type: require('./element.schema'), - description: 'The date this measure report was generated.', - }, - reportingOrganization: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'Optional Patient if the report was requested for a single patient.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date this measure report was generated.', + }, + date: { + type: DateTimeScalar, + description: 'The date this measure report was generated.', + }, + reportingOrganization: { + type: new GraphQLUnionType({ + name: 'MeasureReportreportingOrganization_reportingOrganization_Union', description: 'Reporting Organization.', - }, - period: { - type: new GraphQLNonNull(require('./period.schema')), - description: - 'The reporting period for which the report was calculated.', - }, - group: { - type: new GraphQLList(require('./measurereportgroup.schema')), - description: - 'The results of the calculation, one for each population group in the measure.', - }, - evaluatedResources: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Reporting Organization.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The reporting period for which the report was calculated.', + }, + group: { + type: new GraphQLList(require('./measurereportgroup.schema.js')), + description: + 'The results of the calculation, one for each population group in the measure.', + }, + evaluatedResources: { + type: new GraphQLUnionType({ + name: 'MeasureReportevaluatedResources_evaluatedResources_Union', description: 'A reference to a Bundle containing the Resources that were used in the evaluation of this report.', - }, - }), + types: () => [require('./bundle.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Bundle') { + return require('./bundle.schema.js'); + } + }, + }), + description: + 'A reference to a Bundle containing the Resources that were used in the evaluation of this report.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measurereportgroup.schema.js b/src/resources/3_0_1/schemas/measurereportgroup.schema.js index 1380573b..d035ab6e 100644 --- a/src/resources/3_0_1/schemas/measurereportgroup.schema.js +++ b/src/resources/3_0_1/schemas/measurereportgroup.schema.js @@ -1,46 +1,67 @@ const { - GraphQLObjectType, - GraphQLNonNull, + GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MeasureReport.group Schema + * @summary MeasureReportgroup Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureReportGroup', - description: - 'The results of the calculation, one for each population group in the measure.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: - 'The identifier of the population group as defined in the measure definition.', - }, - population: { - type: new GraphQLList(require('./measurereportgrouppopulation.schema')), - description: - 'The populations that make up the population group, one for each type of population appropriate for the measure.', - }, - measureScore: { - type: GraphQLFloat, - description: - 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', - }, - _measureScore: { - type: require('./element.schema'), - description: - 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', - }, - stratifier: { - type: new GraphQLList(require('./measurereportgroupstratifier.schema')), - description: - 'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.', - }, - }), + name: 'MeasureReportgroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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 GraphQLNonNull(require('./identifier.schema.js')), + description: + 'The identifier of the population group as defined in the measure definition.', + }, + population: { + type: new GraphQLList( + require('./measurereportgrouppopulation.schema.js'), + ), + description: + 'The populations that make up the population group, one for each type of population appropriate for the measure.', + }, + _measureScore: { + type: require('./element.schema.js'), + description: + 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', + }, + measureScore: { + type: GraphQLFloat, + description: + 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', + }, + stratifier: { + type: new GraphQLList( + require('./measurereportgroupstratifier.schema.js'), + ), + description: + 'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measurereportgrouppopulation.schema.js b/src/resources/3_0_1/schemas/measurereportgrouppopulation.schema.js index 5fbc19c2..2110fa08 100644 --- a/src/resources/3_0_1/schemas/measurereportgrouppopulation.schema.js +++ b/src/resources/3_0_1/schemas/measurereportgrouppopulation.schema.js @@ -1,38 +1,70 @@ -const { GraphQLObjectType, GraphQLInt } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary MeasureReport.group.population Schema + * @summary MeasureReportgrouppopulation Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureReportGroupPopulation', - description: - 'The populations that make up the population group, one for each type of population appropriate for the measure.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'The identifier of the population being reported, as defined by the population element of the measure.', - }, - code: { - type: require('./codeableconcept.schema'), - description: 'The type of the population.', - }, - count: { - type: GraphQLInt, - description: 'The number of members of the population.', - }, - _count: { - type: require('./element.schema'), - description: 'The number of members of the population.', - }, - patients: { - type: require('./reference.schema'), + name: 'MeasureReportgrouppopulation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'The identifier of the population being reported, as defined by the population element of the measure.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The type of the population.', + }, + _count: { + type: require('./element.schema.js'), + description: 'The number of members of the population.', + }, + count: { + type: GraphQLInt, + description: 'The number of members of the population.', + }, + patients: { + type: new GraphQLUnionType({ + name: 'MeasureReportgrouppopulationpatients_patients_Union', description: 'This element refers to a List of patient level MeasureReport resources, one for each patient in this population.', - }, - }), + types: () => [require('./list.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'List') { + return require('./list.schema.js'); + } + }, + }), + description: + 'This element refers to a List of patient level MeasureReport resources, one for each patient in this population.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measurereportgroupstratifier.schema.js b/src/resources/3_0_1/schemas/measurereportgroupstratifier.schema.js index ea25faf1..824c55a4 100644 --- a/src/resources/3_0_1/schemas/measurereportgroupstratifier.schema.js +++ b/src/resources/3_0_1/schemas/measurereportgroupstratifier.schema.js @@ -1,28 +1,44 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary MeasureReport.group.stratifier Schema + * @summary MeasureReportgroupstratifier Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureReportGroupStratifier', - description: - 'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'The identifier of this stratifier, as defined in the measure definition.', - }, - stratum: { - type: new GraphQLList( - require('./measurereportgroupstratifierstratum.schema'), - ), - description: - 'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.', - }, - }), + name: 'MeasureReportgroupstratifier', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'The identifier of this stratifier, as defined in the measure definition.', + }, + stratum: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratum.schema.js'), + ), + description: + 'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measurereportgroupstratifierstratum.schema.js b/src/resources/3_0_1/schemas/measurereportgroupstratifierstratum.schema.js index 1ebfc955..b235a54d 100644 --- a/src/resources/3_0_1/schemas/measurereportgroupstratifierstratum.schema.js +++ b/src/resources/3_0_1/schemas/measurereportgroupstratifierstratum.schema.js @@ -1,49 +1,65 @@ const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MeasureReport.group.stratifier.stratum Schema + * @summary MeasureReportgroupstratifierstratum Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureReportGroupStratifierStratum', - description: - 'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', - }, - _value: { - type: require('./element.schema'), - description: - 'The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', - }, - population: { - type: new GraphQLList( - require('./measurereportgroupstratifierstratumpopulation.schema'), - ), - description: - 'The populations that make up the stratum, one for each type of population appropriate to the measure.', - }, - measureScore: { - type: GraphQLFloat, - description: - 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', - }, - _measureScore: { - type: require('./element.schema'), - description: - 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', - }, - }), + name: 'MeasureReportgroupstratifierstratum', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', + }, + population: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratumpopulation.schema.js'), + ), + description: + 'The populations that make up the stratum, one for each type of population appropriate to the measure.', + }, + _measureScore: { + type: require('./element.schema.js'), + description: + 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', + }, + measureScore: { + type: GraphQLFloat, + description: + 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measurereportgroupstratifierstratumpopulation.schema.js b/src/resources/3_0_1/schemas/measurereportgroupstratifierstratumpopulation.schema.js index 907e9d7b..1b727ab8 100644 --- a/src/resources/3_0_1/schemas/measurereportgroupstratifierstratumpopulation.schema.js +++ b/src/resources/3_0_1/schemas/measurereportgroupstratifierstratumpopulation.schema.js @@ -1,38 +1,71 @@ -const { GraphQLObjectType, GraphQLInt } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary MeasureReport.group.stratifier.stratum.population Schema + * @summary MeasureReportgroupstratifierstratumpopulation Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureReportGroupStratifierStratumPopulation', - description: - 'The populations that make up the stratum, one for each type of population appropriate to the measure.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'The identifier of the population being reported, as defined by the population element of the measure.', - }, - code: { - type: require('./codeableconcept.schema'), - description: 'The type of the population.', - }, - count: { - type: GraphQLInt, - description: 'The number of members of the population in this stratum.', - }, - _count: { - type: require('./element.schema'), - description: 'The number of members of the population in this stratum.', - }, - patients: { - type: require('./reference.schema'), + name: 'MeasureReportgroupstratifierstratumpopulation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'The identifier of the population being reported, as defined by the population element of the measure.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The type of the population.', + }, + _count: { + type: require('./element.schema.js'), + description: 'The number of members of the population in this stratum.', + }, + count: { + type: GraphQLInt, + description: 'The number of members of the population in this stratum.', + }, + patients: { + type: new GraphQLUnionType({ + name: + 'MeasureReportgroupstratifierstratumpopulationpatients_patients_Union', description: 'This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.', - }, - }), + types: () => [require('./list.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'List') { + return require('./list.schema.js'); + } + }, + }), + description: + 'This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/measuresupplementaldata.schema.js b/src/resources/3_0_1/schemas/measuresupplementaldata.schema.js index 5ce02a32..27d605ad 100644 --- a/src/resources/3_0_1/schemas/measuresupplementaldata.schema.js +++ b/src/resources/3_0_1/schemas/measuresupplementaldata.schema.js @@ -1,46 +1,62 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary Measure.supplementalData Schema + * @summary MeasuresupplementalData Schema */ module.exports = new GraphQLObjectType({ - name: 'MeasureSupplementalData', - description: - 'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: 'An identifier for the supplemental data.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/measure-data-usage - usage: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.', - }, - criteria: { - type: GraphQLString, - description: - 'The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.', - }, - _criteria: { - type: require('./element.schema'), - description: - 'The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.', - }, - path: { - type: GraphQLString, - description: - 'The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.', - }, - _path: { - type: require('./element.schema'), - description: - 'The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.', - }, - }), + name: 'MeasuresupplementalData', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: 'An identifier for the supplemental data.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/measure-data-usage + usage: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.', + }, + _criteria: { + type: require('./element.schema.js'), + description: + 'The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.', + }, + criteria: { + type: GraphQLString, + description: + 'The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.', + }, + path: { + type: GraphQLString, + description: + 'The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/media.schema.js b/src/resources/3_0_1/schemas/media.schema.js index b8b8814c..1fa8d326 100644 --- a/src/resources/3_0_1/schemas/media.schema.js +++ b/src/resources/3_0_1/schemas/media.schema.js @@ -1,23 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MediaResourceType = new GraphQLEnumType({ - name: 'MediaResourceType', - values: { - Media: { value: 'Media' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports @@ -25,132 +18,268 @@ let MediaResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Media', - description: 'Base StructureDefinition for Media Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MediaResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A procedure that is fulfilled in whole or in part by the creation of this media.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/digital-media-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether the media is a photo (still image), an audio recording, or a video recording.', - }, - _type: { - type: require('./element.schema'), - description: - 'Whether the media is a photo (still image), an audio recording, or a video recording.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/digital-media-subtype - subtype: { - type: require('./codeableconcept.schema'), - description: - 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/media-view - view: { - type: require('./codeableconcept.schema'), - description: - 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Media Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Media_Enum_schema', + values: { Media: { value: 'Media' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MediabasedOn_basedOn_Union', + description: + 'A procedure that is fulfilled in whole or in part by the creation of this media.', + types: () => [require('./procedurerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + }, + }), + ), + description: + 'A procedure that is fulfilled in whole or in part by the creation of this media.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Whether the media is a photo (still image), an audio recording, or a video recording.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/digital-media-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the media is a photo (still image), an audio recording, or a video recording.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/digital-media-subtype + subtype: { + type: require('./codeableconcept.schema.js'), + description: + 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/media-view + view: { + type: require('./codeableconcept.schema.js'), + description: + 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Mediasubject_subject_Union', description: 'Who/What this Media is a record of.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./specimen.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + description: 'Who/What this Media is a record of.', + }, + context: { + type: new GraphQLUnionType({ + name: 'Mediacontext_context_Union', description: 'The encounter or episode of care that establishes the context for this media.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'The date and time(s) at which the media was collected.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: 'The date and time(s) at which the media was collected.', - }, - occurrencePeriod: { - type: require('./period.schema'), - description: 'The date and time(s) at which the media was collected.', - }, - operator: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care that establishes the context for this media.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'The date and time(s) at which the media was collected.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The date and time(s) at which the media was collected.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'The date and time(s) at which the media was collected.', + }, + operator: { + type: new GraphQLUnionType({ + name: 'Mediaoperator_operator_Union', description: 'The person who administered the collection of the image.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Describes why the event occurred in coded or textual form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.schema'), - description: - "Indicates the site on the subject's body where the media was collected (i.e. the target site).", - }, - device: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'The person who administered the collection of the image.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Describes why the event occurred in coded or textual form.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the site on the subject's body where the media was collected (i.e. the target site).", + }, + device: { + type: new GraphQLUnionType({ + name: 'Mediadevice_device_Union', description: 'The device used to collect the media.', - }, - height: { - type: PositiveIntScalar, - description: 'Height of the image in pixels (photo/video).', - }, - _height: { - type: require('./element.schema'), - description: 'Height of the image in pixels (photo/video).', - }, - width: { - type: PositiveIntScalar, - description: 'Width of the image in pixels (photo/video).', - }, - _width: { - type: require('./element.schema'), - description: 'Width of the image in pixels (photo/video).', - }, - frames: { - type: PositiveIntScalar, - description: - 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', - }, - _frames: { - type: require('./element.schema'), - description: - 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', - }, - duration: { - type: UnsignedIntScalar, - description: - 'The duration of the recording in seconds - for audio and video.', - }, - _duration: { - type: require('./element.schema'), - description: - 'The duration of the recording in seconds - for audio and video.', - }, - content: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: - 'The actual content of the media - inline or by direct reference to the media source file.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Comments made about the media by the performer, subject or other participants.', - }, - }), + types: () => [ + require('./device.schema.js'), + require('./devicemetric.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'DeviceMetric') { + return require('./devicemetric.schema.js'); + } + }, + }), + description: 'The device used to collect the media.', + }, + _height: { + type: require('./element.schema.js'), + description: 'Height of the image in pixels (photo/video).', + }, + height: { + type: PositiveIntScalar, + description: 'Height of the image in pixels (photo/video).', + }, + _width: { + type: require('./element.schema.js'), + description: 'Width of the image in pixels (photo/video).', + }, + width: { + type: PositiveIntScalar, + description: 'Width of the image in pixels (photo/video).', + }, + _frames: { + type: require('./element.schema.js'), + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + frames: { + type: PositiveIntScalar, + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + _duration: { + type: require('./element.schema.js'), + description: + 'The duration of the recording in seconds - for audio and video.', + }, + duration: { + type: UnsignedIntScalar, + description: + 'The duration of the recording in seconds - for audio and video.', + }, + content: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The actual content of the media - inline or by direct reference to the media source file.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the media by the performer, subject or other participants.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medication.schema.js b/src/resources/3_0_1/schemas/medication.schema.js index f3d1df33..24d721b2 100644 --- a/src/resources/3_0_1/schemas/medication.schema.js +++ b/src/resources/3_0_1/schemas/medication.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, - GraphQLBoolean, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationResourceType = new GraphQLEnumType({ - name: 'MedicationResourceType', - values: { - Medication: { value: 'Medication' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,72 +16,138 @@ let MedicationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Medication', - description: 'Base StructureDefinition for Medication Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - code: { - type: require('./codeableconcept.schema'), - description: - 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-status - status: { - type: CodeScalar, - description: 'A code to indicate if the medication is in active use.', - }, - _status: { - type: require('./element.schema'), - description: 'A code to indicate if the medication is in active use.', - }, - isBrand: { - type: GraphQLBoolean, - description: - 'Set to true if the item is attributable to a specific manufacturer.', - }, - _isBrand: { - type: require('./element.schema'), - description: - 'Set to true if the item is attributable to a specific manufacturer.', - }, - isOverTheCounter: { - type: GraphQLBoolean, - description: - 'Set to true if the medication can be obtained without an order from a prescriber.', - }, - _isOverTheCounter: { - type: require('./element.schema'), - description: - 'Set to true if the medication can be obtained without an order from a prescriber.', - }, - manufacturer: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Medication Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Medication_Enum_schema', + values: { Medication: { value: 'Medication' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code to indicate if the medication is in active use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-status + status: { + type: CodeScalar, + description: 'A code to indicate if the medication is in active use.', + }, + _isBrand: { + type: require('./element.schema.js'), + description: + 'Set to true if the item is attributable to a specific manufacturer.', + }, + isBrand: { + type: GraphQLBoolean, + description: + 'Set to true if the item is attributable to a specific manufacturer.', + }, + _isOverTheCounter: { + type: require('./element.schema.js'), + description: + 'Set to true if the medication can be obtained without an order from a prescriber.', + }, + isOverTheCounter: { + type: GraphQLBoolean, + description: + 'Set to true if the medication can be obtained without an order from a prescriber.', + }, + manufacturer: { + type: new GraphQLUnionType({ + name: 'Medicationmanufacturer_manufacturer_Union', description: 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-form-codes - form: { - type: require('./codeableconcept.schema'), - description: - 'Describes the form of the item. Powder; tablets; capsule.', - }, - ingredient: { - type: new GraphQLList(require('./medicationingredient.schema')), - description: - 'Identifies a particular constituent of interest in the product.', - }, - package: { - type: require('./medicationpackage.schema'), - description: - 'Information that only applies to packages (not products).', - }, - image: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Photo(s) or graphic representation(s) of the medication.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-form-codes + form: { + type: require('./codeableconcept.schema.js'), + description: 'Describes the form of the item. Powder; tablets; capsule.', + }, + ingredient: { + type: new GraphQLList(require('./medicationingredient.schema.js')), + description: + 'Identifies a particular constituent of interest in the product.', + }, + package: { + type: require('./medicationpackage.schema.js'), + description: 'Information that only applies to packages (not products).', + }, + image: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Photo(s) or graphic representation(s) of the medication.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationadministration.schema.js b/src/resources/3_0_1/schemas/medicationadministration.schema.js index 2d507c94..dbfbe186 100644 --- a/src/resources/3_0_1/schemas/medicationadministration.schema.js +++ b/src/resources/3_0_1/schemas/medicationadministration.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationAdministrationResourceType = new GraphQLEnumType({ - name: 'MedicationAdministrationResourceType', - values: { - MedicationAdministration: { value: 'MedicationAdministration' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,144 +17,351 @@ let MedicationAdministrationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MedicationAdministration', - description: - 'Base StructureDefinition for MedicationAdministration Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationAdministrationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this event.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A larger event of which this particular event is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', - }, - _status: { - type: require('./element.schema'), - description: - 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-category - category: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of medication administration and where the medication is expected to be consumed or administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The person or animal or group receiving the medication.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MedicationAdministration Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationAdministration_Enum_schema', + values: { + MedicationAdministration: { value: 'MedicationAdministration' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationdefinition_definition_Union', + description: + 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this event.', + types: () => [ + require('./plandefinition.schema.js'), + require('./activitydefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + }, + }), + ), + description: + 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationpartOf_partOf_Union', + description: + 'A larger event of which this particular event is a component or step.', + types: () => [ + require('./medicationadministration.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-admin-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of medication administration and where the medication is expected to be consumed or administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationAdministrationmedicationReference_medicationReference_Union', + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationAdministrationsubject_subject_Union', + description: + 'The person or animal or group receiving the medication.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: 'The person or animal or group receiving the medication.', + }, + context: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationcontext_context_Union', description: 'The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Additional information (for example, patient height and weight) that supports the administration of the medication.', - }, - effectiveDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - _effectiveDateTime: { - type: require('./element.schema'), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - effectivePeriod: { - type: new GraphQLNonNull(require('./period.schema')), - description: - "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", - }, - performer: { - type: new GraphQLList( - require('./medicationadministrationperformer.schema'), - ), - description: - 'The individual who was responsible for giving the medication to the patient.', - }, - notGiven: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the medication was NOT administered.', - }, - _notGiven: { - type: require('./element.schema'), - description: - 'Set this to true if the record is saying that the medication was NOT administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes - reasonNotGiven: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A code indicating why the administration was not performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-given-codes - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'A code indicating why the medication was given.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Condition or observation that supports why the medication was administered.', - }, - prescription: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationAdministrationsupportingInformation_supportingInformation_Union', + description: + 'Additional information (for example, patient height and weight) that supports the administration of the medication.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Additional information (for example, patient height and weight) that supports the administration of the medication.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectiveDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectivePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + performer: { + type: new GraphQLList( + require('./medicationadministrationperformer.schema.js'), + ), + description: + 'The individual who was responsible for giving the medication to the patient.', + }, + _notGiven: { + type: require('./element.schema.js'), + description: + 'Set this to true if the record is saying that the medication was NOT administered.', + }, + notGiven: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the medication was NOT administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes + reasonNotGiven: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code indicating why the administration was not performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-given-codes + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A code indicating why the medication was given.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationreasonReference_reasonReference_Union', + description: + 'Condition or observation that supports why the medication was administered.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Condition or observation that supports why the medication was administered.', + }, + prescription: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationprescription_prescription_Union', description: 'The original request, instruction or authority to perform the administration.', - }, - device: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The device used in administering the medication to the patient. For example, a particular infusion pump.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Extra information about the medication administration that is not conveyed by the other attributes.', - }, - dosage: { - type: require('./medicationadministrationdosage.schema'), - description: - 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', - }, - eventHistory: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A summary of the events of interest that have occurred, such as when the administration was verified.', - }, - }), + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + description: + 'The original request, instruction or authority to perform the administration.', + }, + device: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationdevice_device_Union', + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the medication administration that is not conveyed by the other attributes.', + }, + dosage: { + type: require('./medicationadministrationdosage.schema.js'), + description: + 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', + }, + eventHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationeventHistory_eventHistory_Union', + description: + 'A summary of the events of interest that have occurred, such as when the administration was verified.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'A summary of the events of interest that have occurred, such as when the administration was verified.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationadministrationdosage.schema.js b/src/resources/3_0_1/schemas/medicationadministrationdosage.schema.js index 78bacd4c..4d5dcbef 100644 --- a/src/resources/3_0_1/schemas/medicationadministrationdosage.schema.js +++ b/src/resources/3_0_1/schemas/medicationadministrationdosage.schema.js @@ -1,59 +1,75 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary MedicationAdministration.dosage Schema + * @summary MedicationAdministrationdosage Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationAdministrationDosage', - description: - 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - text: { - type: GraphQLString, - description: - 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', - }, - _text: { - type: require('./element.schema'), - description: - 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes - site: { - type: require('./codeableconcept.schema'), - description: - "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/route-codes - route: { - type: require('./codeableconcept.schema'), - description: - 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administration-method-codes - method: { - type: require('./codeableconcept.schema'), - description: - 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', - }, - dose: { - type: require('./quantity.schema'), - description: - 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', - }, - rateRatio: { - type: require('./ratio.schema'), - description: - 'Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', - }, - rateQuantity: { - type: require('./quantity.schema'), - description: - 'Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', - }, - }), + name: 'MedicationAdministrationdosage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/approach-site-codes + site: { + type: require('./codeableconcept.schema.js'), + description: + "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/route-codes + route: { + type: require('./codeableconcept.schema.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administration-method-codes + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', + }, + dose: { + type: require('./quantity.schema.js'), + description: + 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + 'Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', + }, + rateQuantity: { + type: require('./quantity.schema.js'), + description: + 'Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationadministrationperformer.schema.js b/src/resources/3_0_1/schemas/medicationadministrationperformer.schema.js index 5e9456d8..0faff0e9 100644 --- a/src/resources/3_0_1/schemas/medicationadministrationperformer.schema.js +++ b/src/resources/3_0_1/schemas/medicationadministrationperformer.schema.js @@ -1,25 +1,83 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary MedicationAdministration.performer Schema + * @summary MedicationAdministrationperformer Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationAdministrationPerformer', - description: - 'The individual who was responsible for giving the medication to the patient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The device, practitioner, etc. who performed the action.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'MedicationAdministrationperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationAdministrationperformeractor_actor_Union', + description: + 'The device, practitioner, etc. who performed the action.', + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The device, practitioner, etc. who performed the action.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationperformeronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationdispense.schema.js b/src/resources/3_0_1/schemas/medicationdispense.schema.js index d8ea5495..af1f278c 100644 --- a/src/resources/3_0_1/schemas/medicationdispense.schema.js +++ b/src/resources/3_0_1/schemas/medicationdispense.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationDispenseResourceType = new GraphQLEnumType({ - name: 'MedicationDispenseResourceType', - values: { - MedicationDispense: { value: 'MedicationDispense' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,161 +17,360 @@ let MedicationDispenseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MedicationDispense', - description: 'Base StructureDefinition for MedicationDispense Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationDispenseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: 'The procedure that the dispense is done because of.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-status - status: { - type: CodeScalar, - description: - 'A code specifying the state of the set of dispense events.', - }, - _status: { - type: require('./element.schema'), - description: - 'A code specifying the state of the set of dispense events.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-category - category: { - type: require('./codeableconcept.schema'), - description: - 'Indicates type of medication dispense and where the medication is expected to be consumed or administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MedicationDispense Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationDispense_Enum_schema', + values: { MedicationDispense: { value: 'MedicationDispense' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispensepartOf_partOf_Union', + description: 'The procedure that the dispense is done because of.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: 'The procedure that the dispense is done because of.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code specifying the state of the set of dispense events.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-status + status: { + type: CodeScalar, + description: 'A code specifying the state of the set of dispense events.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-dispense-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates type of medication dispense and where the medication is expected to be consumed or administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationDispensemedicationReference_medicationReference_Union', + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'MedicationDispensesubject_subject_Union', description: 'A link to a resource representing the person or the group to whom the medication will be given.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person or the group to whom the medication will be given.', + }, + context: { + type: new GraphQLUnionType({ + name: 'MedicationDispensecontext_context_Union', description: 'The encounter or episode of care that establishes the context for this event.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Additional information that supports the medication being dispensed.', - }, - performer: { - type: new GraphQLList(require('./medicationdispenseperformer.schema')), - description: - 'Indicates who or what performed the event. It should be assumed that the performer is the dispenser of the medication.', - }, - authorizingPrescription: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates the medication order that is being dispensed against.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType - type: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The amount of medication that has been dispensed. Includes unit of measure.', - }, - daysSupply: { - type: require('./quantity.schema'), - description: 'The amount of medication expressed as a timing amount.', - }, - whenPrepared: { - type: DateTimeScalar, - description: - 'The time when the dispensed product was packaged and reviewed.', - }, - _whenPrepared: { - type: require('./element.schema'), - description: - 'The time when the dispensed product was packaged and reviewed.', - }, - whenHandedOver: { - type: DateTimeScalar, - description: - 'The time the dispensed product was provided to the patient or their representative.', - }, - _whenHandedOver: { - type: require('./element.schema'), - description: - 'The time the dispensed product was provided to the patient or their representative.', - }, - destination: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care that establishes the context for this event.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationDispensesupportingInformation_supportingInformation_Union', + description: + 'Additional information that supports the medication being dispensed.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Additional information that supports the medication being dispensed.', + }, + performer: { + type: new GraphQLList(require('./medicationdispenseperformer.schema.js')), + description: + 'Indicates who or what performed the event. It should be assumed that the performer is the dispenser of the medication.', + }, + authorizingPrescription: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationDispenseauthorizingPrescription_authorizingPrescription_Union', + description: + 'Indicates the medication order that is being dispensed against.', + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + ), + description: + 'Indicates the medication order that is being dispensed against.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of medication that has been dispensed. Includes unit of measure.', + }, + daysSupply: { + type: require('./quantity.schema.js'), + description: 'The amount of medication expressed as a timing amount.', + }, + _whenPrepared: { + type: require('./element.schema.js'), + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + whenPrepared: { + type: DateTimeScalar, + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + _whenHandedOver: { + type: require('./element.schema.js'), + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + whenHandedOver: { + type: DateTimeScalar, + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + destination: { + type: new GraphQLUnionType({ + name: 'MedicationDispensedestination_destination_Union', description: 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', - }, - receiver: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Extra information about the dispense that could not be conveyed in the other attributes.', - }, - dosageInstruction: { - type: new GraphQLList(require('./dosage.schema')), - description: - 'Indicates how the medication is to be used by the patient.', - }, - substitution: { - type: require('./medicationdispensesubstitution.schema'), - description: - 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.', - }, - detectedIssue: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', - }, - notDone: { - type: GraphQLBoolean, - description: 'True if the dispense was not performed for some reason.', - }, - _notDone: { - type: require('./element.schema'), - description: 'True if the dispense was not performed for some reason.', - }, - notDoneReasonCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'Indicates the reason why a dispense was not performed.', - }, - notDoneReasonReference: { - type: require('./reference.schema'), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispensereceiver_receiver_Union', + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the dispense that could not be conveyed in the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList(require('./dosage.schema.js')), + description: 'Indicates how the medication is to be used by the patient.', + }, + substitution: { + type: require('./medicationdispensesubstitution.schema.js'), + description: + 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.', + }, + detectedIssue: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispensedetectedIssue_detectedIssue_Union', + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + types: () => [require('./detectedissue.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); + } + }, + }), + ), + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + }, + _notDone: { + type: require('./element.schema.js'), + description: 'True if the dispense was not performed for some reason.', + }, + notDone: { + type: GraphQLBoolean, + description: 'True if the dispense was not performed for some reason.', + }, + notDoneReasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the reason why a dispense was not performed.', + }, + notDoneReasonReference: { + type: new GraphQLUnionType({ + name: + 'MedicationDispensenotDoneReasonReference_notDoneReasonReference_Union', description: 'Indicates the reason why a dispense was not performed.', - }, - eventHistory: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A summary of the events of interest that have occurred, such as when the dispense was verified.', - }, - }), + types: () => [require('./detectedissue.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); + } + }, + }), + description: 'Indicates the reason why a dispense was not performed.', + }, + eventHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispenseeventHistory_eventHistory_Union', + description: + 'A summary of the events of interest that have occurred, such as when the dispense was verified.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'A summary of the events of interest that have occurred, such as when the dispense was verified.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationdispenseperformer.schema.js b/src/resources/3_0_1/schemas/medicationdispenseperformer.schema.js index 3381784b..3bad8a07 100644 --- a/src/resources/3_0_1/schemas/medicationdispenseperformer.schema.js +++ b/src/resources/3_0_1/schemas/medicationdispenseperformer.schema.js @@ -1,26 +1,88 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary MedicationDispense.performer Schema + * @summary MedicationDispenseperformer Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationDispensePerformer', - description: - 'Indicates who or what performed the event. It should be assumed that the performer is the dispenser of the medication.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'MedicationDispenseperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationDispenseperformeractor_actor_Union', + description: + 'The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'MedicationDispenseperformeronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationdispensesubstitution.schema.js b/src/resources/3_0_1/schemas/medicationdispensesubstitution.schema.js index e257ef03..628f5cd0 100644 --- a/src/resources/3_0_1/schemas/medicationdispensesubstitution.schema.js +++ b/src/resources/3_0_1/schemas/medicationdispensesubstitution.schema.js @@ -1,48 +1,79 @@ const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, - GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MedicationDispense.substitution Schema + * @summary MedicationDispensesubstitution Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationDispenseSubstitution', - description: - 'Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - wasSubstituted: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'True if the dispenser dispensed a different drug or product from what was prescribed.', - }, - _wasSubstituted: { - type: require('./element.schema'), - description: - 'True if the dispenser dispensed a different drug or product from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode - type: { - type: require('./codeableconcept.schema'), - description: - 'A code signifying whether a different drug was dispensed from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.', - }, - responsibleParty: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The person or organization that has primary responsibility for the substitution.', - }, - }), + name: 'MedicationDispensesubstitution', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _wasSubstituted: { + type: require('./element.schema.js'), + description: + 'True if the dispenser dispensed a different drug or product from what was prescribed.', + }, + wasSubstituted: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if the dispenser dispensed a different drug or product from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A code signifying whether a different drug was dispensed from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.', + }, + responsibleParty: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationDispensesubstitutionresponsibleParty_responsibleParty_Union', + description: + 'The person or organization that has primary responsibility for the substitution.', + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: + 'The person or organization that has primary responsibility for the substitution.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationingredient.schema.js b/src/resources/3_0_1/schemas/medicationingredient.schema.js index 2d6a4d0c..fc59cab3 100644 --- a/src/resources/3_0_1/schemas/medicationingredient.schema.js +++ b/src/resources/3_0_1/schemas/medicationingredient.schema.js @@ -1,45 +1,82 @@ const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Medication.ingredient Schema + * @summary Medicationingredient Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationIngredient', - description: - 'Identifies a particular constituent of interest in the product.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - itemCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'The actual ingredient - either a substance (simple ingredient) or another medication.', - }, - itemReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The actual ingredient - either a substance (simple ingredient) or another medication.', - }, - isActive: { - type: GraphQLBoolean, - description: - 'Indication of whether this ingredient affects the therapeutic action of the drug.', - }, - _isActive: { - type: require('./element.schema'), - description: - 'Indication of whether this ingredient affects the therapeutic action of the drug.', - }, - amount: { - type: require('./ratio.schema'), - description: - 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.', - }, - }), + name: 'Medicationingredient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + itemReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationingredientitemReference_itemReference_Union', + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + types: () => [ + require('./substance.schema.js'), + require('./medication.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + _isActive: { + type: require('./element.schema.js'), + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + isActive: { + type: GraphQLBoolean, + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + amount: { + type: require('./ratio.schema.js'), + description: + 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationpackage.schema.js b/src/resources/3_0_1/schemas/medicationpackage.schema.js index a87b42ad..2ac974d8 100644 --- a/src/resources/3_0_1/schemas/medicationpackage.schema.js +++ b/src/resources/3_0_1/schemas/medicationpackage.schema.js @@ -1,30 +1,46 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary Medication.package Schema + * @summary Medicationpackage Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationPackage', - description: 'Information that only applies to packages (not products).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-package-form - container: { - type: require('./codeableconcept.schema'), - description: 'The kind of container that this package comes as.', - }, - content: { - type: new GraphQLList(require('./medicationpackagecontent.schema')), - description: - 'A set of components that go to make up the described item.', - }, - batch: { - type: new GraphQLList(require('./medicationpackagebatch.schema')), - description: - 'Information about a group of medication produced or packaged from one production run.', - }, - }), + name: 'Medicationpackage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-package-form + container: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of container that this package comes as.', + }, + content: { + type: new GraphQLList(require('./medicationpackagecontent.schema.js')), + description: 'A set of components that go to make up the described item.', + }, + batch: { + type: new GraphQLList(require('./medicationpackagebatch.schema.js')), + description: + 'Information about a group of medication produced or packaged from one production run.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationpackagebatch.schema.js b/src/resources/3_0_1/schemas/medicationpackagebatch.schema.js index 90b00fde..d13c9c2a 100644 --- a/src/resources/3_0_1/schemas/medicationpackagebatch.schema.js +++ b/src/resources/3_0_1/schemas/medicationpackagebatch.schema.js @@ -1,35 +1,51 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Medication.package.batch Schema + * @summary Medicationpackagebatch Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationPackageBatch', - description: - 'Information about a group of medication produced or packaged from one production run.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - lotNumber: { - type: GraphQLString, - description: - 'The assigned lot number of a batch of the specified product.', - }, - _lotNumber: { - type: require('./element.schema'), - description: - 'The assigned lot number of a batch of the specified product.', - }, - expirationDate: { - type: DateTimeScalar, - description: 'When this specific batch of product will expire.', - }, - _expirationDate: { - type: require('./element.schema'), - description: 'When this specific batch of product will expire.', - }, - }), + name: 'Medicationpackagebatch', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _lotNumber: { + type: require('./element.schema.js'), + description: + 'The assigned lot number of a batch of the specified product.', + }, + lotNumber: { + type: GraphQLString, + description: + 'The assigned lot number of a batch of the specified product.', + }, + _expirationDate: { + type: require('./element.schema.js'), + description: 'When this specific batch of product will expire.', + }, + expirationDate: { + type: DateTimeScalar, + description: 'When this specific batch of product will expire.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationpackagecontent.schema.js b/src/resources/3_0_1/schemas/medicationpackagecontent.schema.js index b6d07c26..4353c38a 100644 --- a/src/resources/3_0_1/schemas/medicationpackagecontent.schema.js +++ b/src/resources/3_0_1/schemas/medicationpackagecontent.schema.js @@ -1,27 +1,61 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Medication.package.content Schema + * @summary Medicationpackagecontent Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationPackageContent', - description: 'A set of components that go to make up the described item.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - itemCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Identifies one of the items in the package.', - }, - itemReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Identifies one of the items in the package.', - }, - amount: { - type: require('./quantity.schema'), - description: 'The amount of the product that is in the package.', - }, - }), + name: 'Medicationpackagecontent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Identifies one of the items in the package.', + }, + itemReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationpackagecontentitemReference_itemReference_Union', + description: 'Identifies one of the items in the package.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: 'Identifies one of the items in the package.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'The amount of the product that is in the package.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationrequest.schema.js b/src/resources/3_0_1/schemas/medicationrequest.schema.js index 29bb1b28..187fa3f7 100644 --- a/src/resources/3_0_1/schemas/medicationrequest.schema.js +++ b/src/resources/3_0_1/schemas/medicationrequest.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationRequestResourceType = new GraphQLEnumType({ - name: 'MedicationRequestResourceType', - values: { - MedicationRequest: { value: 'MedicationRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,163 +16,384 @@ let MedicationRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MedicationRequest', - description: 'Base StructureDefinition for MedicationRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. For example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records must be tracked through an entire system.', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: 'Protocol or definition followed by this request.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A plan or request that is fulfilled in whole or in part by this medication request.', - }, - groupIdentifier: { - type: require('./identifier.schema'), - description: - 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-request-status - status: { - type: CodeScalar, - description: - 'A code specifying the current state of the order. Generally this will be active or completed state.', - }, - _status: { - type: require('./element.schema'), - description: - 'A code specifying the current state of the order. Generally this will be active or completed state.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether the request is a proposal, plan, or an original order.', - }, - _intent: { - type: require('./element.schema'), - description: - 'Whether the request is a proposal, plan, or an original order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-request-category - category: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of medication order and where the medication is expected to be consumed or administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.schema'), - description: - 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A link to a resource representing the person or set of individuals to whom the medication will be given.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MedicationRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationRequest_Enum_schema', + values: { MedicationRequest: { value: 'MedicationRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. For example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records must be tracked through an entire system.', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequestdefinition_definition_Union', + description: 'Protocol or definition followed by this request.', + types: () => [ + require('./activitydefinition.schema.js'), + require('./plandefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + }, + }), + ), + description: 'Protocol or definition followed by this request.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequestbasedOn_basedOn_Union', + description: + 'A plan or request that is fulfilled in whole or in part by this medication request.', + types: () => [ + require('./careplan.schema.js'), + require('./medicationrequest.schema.js'), + require('./procedurerequest.schema.js'), + require('./referralrequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'A plan or request that is fulfilled in whole or in part by this medication request.', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying the current state of the order. Generally this will be active or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-request-status + status: { + type: CodeScalar, + description: + 'A code specifying the current state of the order. Generally this will be active or completed state.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Whether the request is a proposal, plan, or an original order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, or an original order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-request-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of medication order and where the medication is expected to be consumed or administered.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationRequestmedicationReference_medicationReference_Union', + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationRequestsubject_subject_Union', + description: + 'A link to a resource representing the person or set of individuals to whom the medication will be given.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'A link to a resource representing the person or set of individuals to whom the medication will be given.', + }, + context: { + type: new GraphQLUnionType({ + name: 'MedicationRequestcontext_context_Union', description: 'A link to an encounter, or episode of care, that identifies the particular occurrence or set occurrences of contact between patient and health care provider.', - }, - supportingInformation: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Include additional information (for example, patient height and weight) that supports the ordering of the medication.', - }, - authoredOn: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was initially written or authored on.', - }, - _authoredOn: { - type: require('./element.schema'), - description: - 'The date (and perhaps time) when the prescription was initially written or authored on.', - }, - requester: { - type: require('./medicationrequestrequester.schema'), - description: - 'The individual, organization or device that initiated the request and has responsibility for its activation.', - }, - recorder: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'A link to an encounter, or episode of care, that identifies the particular occurrence or set occurrences of contact between patient and health care provider.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationRequestsupportingInformation_supportingInformation_Union', + description: + 'Include additional information (for example, patient height and weight) that supports the ordering of the medication.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Include additional information (for example, patient height and weight) that supports the ordering of the medication.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the prescription was initially written or authored on.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was initially written or authored on.', + }, + requester: { + type: require('./medicationrequestrequester.schema.js'), + description: + 'The individual, organization or device that initiated the request and has responsibility for its activation.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'MedicationRequestrecorder_recorder_Union', description: 'The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The reason or the indication for ordering the medication.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Condition or observation that supports why the medication was ordered.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Extra information about the prescription that could not be conveyed by the other attributes.', - }, - dosageInstruction: { - type: new GraphQLList(require('./dosage.schema')), - description: - 'Indicates how the medication is to be used by the patient.', - }, - dispenseRequest: { - type: require('./medicationrequestdispenserequest.schema'), - description: - 'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', - }, - substitution: { - type: require('./medicationrequestsubstitution.schema'), - description: - "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", - }, - priorPrescription: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason or the indication for ordering the medication.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequestreasonReference_reasonReference_Union', + description: + 'Condition or observation that supports why the medication was ordered.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Condition or observation that supports why the medication was ordered.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the prescription that could not be conveyed by the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList(require('./dosage.schema.js')), + description: 'Indicates how the medication is to be used by the patient.', + }, + dispenseRequest: { + type: require('./medicationrequestdispenserequest.schema.js'), + description: + 'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', + }, + substitution: { + type: require('./medicationrequestsubstitution.schema.js'), + description: + "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", + }, + priorPrescription: { + type: new GraphQLUnionType({ + name: 'MedicationRequestpriorPrescription_priorPrescription_Union', description: 'A link to a resource representing an earlier order related order or prescription.', - }, - detectedIssue: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', - }, - eventHistory: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', - }, - }), + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + description: + 'A link to a resource representing an earlier order related order or prescription.', + }, + detectedIssue: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequestdetectedIssue_detectedIssue_Union', + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + types: () => [require('./detectedissue.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); + } + }, + }), + ), + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + }, + eventHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequesteventHistory_eventHistory_Union', + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationrequestdispenserequest.schema.js b/src/resources/3_0_1/schemas/medicationrequestdispenserequest.schema.js index 068b0ce4..6d8ed2c6 100644 --- a/src/resources/3_0_1/schemas/medicationrequestdispenserequest.schema.js +++ b/src/resources/3_0_1/schemas/medicationrequestdispenserequest.schema.js @@ -1,46 +1,77 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary MedicationRequest.dispenseRequest Schema + * @summary MedicationRequestdispenseRequest Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationRequestDispenseRequest', - description: - 'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - validityPeriod: { - type: require('./period.schema'), - description: - 'This indicates the validity period of a prescription (stale dating the Prescription).', - }, - numberOfRepeatsAllowed: { - type: PositiveIntScalar, - description: - "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", - }, - _numberOfRepeatsAllowed: { - type: require('./element.schema'), - description: - "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", - }, - quantity: { - type: require('./quantity.schema'), - description: 'The amount that is to be dispensed for one fill.', - }, - expectedSupplyDuration: { - type: require('./duration.schema'), - description: - 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', - }, - performer: { - type: require('./reference.schema'), + name: 'MedicationRequestdispenseRequest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + validityPeriod: { + type: require('./period.schema.js'), + description: + 'This indicates the validity period of a prescription (stale dating the Prescription).', + }, + _numberOfRepeatsAllowed: { + type: require('./element.schema.js'), + description: + "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", + }, + numberOfRepeatsAllowed: { + type: PositiveIntScalar, + description: + "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.", + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount that is to be dispensed for one fill.', + }, + expectedSupplyDuration: { + type: require('./duration.schema.js'), + description: + 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'MedicationRequestdispenseRequestperformer_performer_Union', description: 'Indicates the intended dispensing Organization specified by the prescriber.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the intended dispensing Organization specified by the prescriber.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationrequestrequester.schema.js b/src/resources/3_0_1/schemas/medicationrequestrequester.schema.js index 4cdf69c1..628e39d5 100644 --- a/src/resources/3_0_1/schemas/medicationrequestrequester.schema.js +++ b/src/resources/3_0_1/schemas/medicationrequestrequester.schema.js @@ -1,26 +1,88 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary MedicationRequest.requester Schema + * @summary MedicationRequestrequester Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationRequestRequester', - description: - 'The individual, organization or device that initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - agent: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The healthcare professional responsible for authorizing the initial prescription.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'MedicationRequestrequester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + agent: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationRequestrequesteragent_agent_Union', + description: + 'The healthcare professional responsible for authorizing the initial prescription.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The healthcare professional responsible for authorizing the initial prescription.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'MedicationRequestrequesteronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationrequestsubstitution.schema.js b/src/resources/3_0_1/schemas/medicationrequestsubstitution.schema.js index be455274..11de9ed5 100644 --- a/src/resources/3_0_1/schemas/medicationrequestsubstitution.schema.js +++ b/src/resources/3_0_1/schemas/medicationrequestsubstitution.schema.js @@ -1,36 +1,54 @@ const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary MedicationRequest.substitution Schema + * @summary MedicationRequestsubstitution Schema */ module.exports = new GraphQLObjectType({ - name: 'MedicationRequestSubstitution', - description: - "Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - allowed: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', - }, - _allowed: { - type: require('./element.schema'), - description: - 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason - reason: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the reason for the substitution, or why substitution must or must not be performed.', - }, - }), + name: 'MedicationRequestsubstitution', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _allowed: { + type: require('./element.schema.js'), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + allowed: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the reason for the substitution, or why substitution must or must not be performed.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/medicationstatement.schema.js b/src/resources/3_0_1/schemas/medicationstatement.schema.js index c55f037b..3f44bed2 100644 --- a/src/resources/3_0_1/schemas/medicationstatement.schema.js +++ b/src/resources/3_0_1/schemas/medicationstatement.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MedicationStatementResourceType = new GraphQLEnumType({ - name: 'MedicationStatementResourceType', - values: { - MedicationStatement: { value: 'MedicationStatement' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,137 +16,352 @@ let MedicationStatementResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MedicationStatement', - description: 'Base StructureDefinition for MedicationStatement Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MedicationStatementResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A plan, proposal or order that is fulfilled in whole or in part by this event.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A larger event of which this particular event is a component or step.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MedicationStatement Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationStatement_Enum_schema', + values: { MedicationStatement: { value: 'MedicationStatement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationStatementbasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + types: () => [ + require('./medicationrequest.schema.js'), + require('./careplan.schema.js'), + require('./procedurerequest.schema.js'), + require('./referralrequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationStatementpartOf_partOf_Union', + description: + 'A larger event of which this particular event is a component or step.', + types: () => [ + require('./medicationadministration.schema.js'), + require('./medicationdispense.schema.js'), + require('./medicationstatement.schema.js'), + require('./procedure.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'MedicationDispense') { + return require('./medicationdispense.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular event is a component or step.', + }, + context: { + type: new GraphQLUnionType({ + name: 'MedicationStatementcontext_context_Union', description: 'The encounter or episode of care that establishes the context for this MedicationStatement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", - }, - _status: { - type: require('./element.schema'), - description: - "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-category - category: { - type: require('./codeableconcept.schema'), - description: - 'Indicates where type of medication statement and where the medication is expected to be consumed or administered.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-codes - medicationReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - _effectiveDateTime: { - type: require('./element.schema'), - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', - }, - dateAsserted: { - type: DateTimeScalar, - description: - 'The date when the medication statement was asserted by the information source.', - }, - _dateAsserted: { - type: require('./element.schema'), - description: - 'The date when the medication statement was asserted by the information source.', - }, - informationSource: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care that establishes the context for this MedicationStatement.', + }, + _status: { + type: require('./element.schema.js'), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-category + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates where type of medication statement and where the medication is expected to be consumed or administered.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-codes + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationStatementmedicationReference_medicationReference_Union', + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).', + }, + _dateAsserted: { + type: require('./element.schema.js'), + description: + 'The date when the medication statement was asserted by the information source.', + }, + dateAsserted: { + type: DateTimeScalar, + description: + 'The date when the medication statement was asserted by the information source.', + }, + informationSource: { + type: new GraphQLUnionType({ + name: 'MedicationStatementinformationSource_informationSource_Union', description: 'The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g Claim or MedicationRequest.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The person, animal or group who is/was taking the medication.', - }, - derivedFrom: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-taken - taken: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicator of the certainty of whether the medication was taken by the patient.', - }, - _taken: { - type: require('./element.schema'), - description: - 'Indicator of the certainty of whether the medication was taken by the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-taken-codes - reasonNotTaken: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'A code indicating why the medication was not taken.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'A reason for why the medication is being/was taken.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Condition or observation that supports why the medication is being/was taken.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Provides extra information about the medication statement that is not conveyed by the other attributes.', - }, - dosage: { - type: new GraphQLList(require('./dosage.schema')), - description: - 'Indicates how the medication is/was or should be taken by the patient.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g Claim or MedicationRequest.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationStatementsubject_subject_Union', + description: + 'The person, animal or group who is/was taking the medication.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The person, animal or group who is/was taking the medication.', + }, + derivedFrom: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationStatementderivedFrom_derivedFrom_Union', + description: + 'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.', + }, + _taken: { + type: require('./element.schema.js'), + description: + 'Indicator of the certainty of whether the medication was taken by the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-statement-taken + taken: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicator of the certainty of whether the medication was taken by the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/reason-medication-not-taken-codes + reasonNotTaken: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A code indicating why the medication was not taken.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A reason for why the medication is being/was taken.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationStatementreasonReference_reasonReference_Union', + description: + 'Condition or observation that supports why the medication is being/was taken.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Condition or observation that supports why the medication is being/was taken.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Provides extra information about the medication statement that is not conveyed by the other attributes.', + }, + dosage: { + type: new GraphQLList(require('./dosage.schema.js')), + description: + 'Indicates how the medication is/was or should be taken by the patient.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/messagedefinition.schema.js b/src/resources/3_0_1/schemas/messagedefinition.schema.js index e3af8056..b07497fd 100644 --- a/src/resources/3_0_1/schemas/messagedefinition.schema.js +++ b/src/resources/3_0_1/schemas/messagedefinition.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MessageDefinitionResourceType = new GraphQLEnumType({ - name: 'MessageDefinitionResourceType', - values: { - MessageDefinition: { value: 'MessageDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,195 +18,290 @@ let MessageDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MessageDefinition', - description: 'Base StructureDefinition for MessageDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MessageDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of the message definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of the message definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the message definition.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the message definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this message definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this message definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the message definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the message definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the message definition from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the message definition from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate message definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the message definition is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this message definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this message definition is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', - }, - base: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MessageDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageDefinition_Enum_schema', + values: { MessageDefinition: { value: 'MessageDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of the message definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this message definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this message definition is (or will be) published. The URL SHOULD include the major version of the message definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the message definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the message definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this message definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this message definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the message definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the message definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the message definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the message definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the message definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate message definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the message definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this message definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this message definition is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', + }, + base: { + type: new GraphQLUnionType({ + name: 'MessageDefinitionbase_base_Union', description: 'The MessageDefinition that is the basis for the contents of this resource.', - }, - parent: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', - }, - replaces: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A MessageDefinition that is superseded by this definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - event: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'A coded identifier of a supported messaging event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category - category: { - type: CodeScalar, - description: 'The impact of the content of the message.', - }, - _category: { - type: require('./element.schema'), - description: 'The impact of the content of the message.', - }, - focus: { - type: new GraphQLList(require('./messagedefinitionfocus.schema')), - description: - 'Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.', - }, - responseRequired: { - type: GraphQLBoolean, - description: - 'Indicates whether a response is required for this message.', - }, - _responseRequired: { - type: require('./element.schema'), - description: - 'Indicates whether a response is required for this message.', - }, - allowedResponse: { - type: new GraphQLList( - require('./messagedefinitionallowedresponse.schema'), - ), - description: - 'Indicates what types of messages may be sent as an application-level response to this message.', - }, - }), + types: () => [require('./messagedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MessageDefinition') { + return require('./messagedefinition.schema.js'); + } + }, + }), + description: + 'The MessageDefinition that is the basis for the contents of this resource.', + }, + parent: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MessageDefinitionparent_parent_Union', + description: + 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', + types: () => [ + require('./activitydefinition.schema.js'), + require('./plandefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + }, + }), + ), + description: + 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MessageDefinitionreplaces_replaces_Union', + description: + 'A MessageDefinition that is superseded by this definition.', + types: () => [require('./messagedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MessageDefinition') { + return require('./messagedefinition.schema.js'); + } + }, + }), + ), + description: 'A MessageDefinition that is superseded by this definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + event: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'A coded identifier of a supported messaging event.', + }, + _category: { + type: require('./element.schema.js'), + description: 'The impact of the content of the message.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-significance-category + category: { + type: CodeScalar, + description: 'The impact of the content of the message.', + }, + focus: { + type: new GraphQLList(require('./messagedefinitionfocus.schema.js')), + description: + 'Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.', + }, + _responseRequired: { + type: require('./element.schema.js'), + description: 'Indicates whether a response is required for this message.', + }, + responseRequired: { + type: GraphQLBoolean, + description: 'Indicates whether a response is required for this message.', + }, + allowedResponse: { + type: new GraphQLList( + require('./messagedefinitionallowedresponse.schema.js'), + ), + description: + 'Indicates what types of messages may be sent as an application-level response to this message.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/messagedefinitionallowedresponse.schema.js b/src/resources/3_0_1/schemas/messagedefinitionallowedresponse.schema.js index 87514d0c..1f5a6602 100644 --- a/src/resources/3_0_1/schemas/messagedefinitionallowedresponse.schema.js +++ b/src/resources/3_0_1/schemas/messagedefinitionallowedresponse.schema.js @@ -1,31 +1,65 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary MessageDefinition.allowedResponse Schema + * @summary MessageDefinitionallowedResponse Schema */ module.exports = new GraphQLObjectType({ - name: 'MessageDefinitionAllowedResponse', - description: - 'Indicates what types of messages may be sent as an application-level response to this message.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - message: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the message definition that must be adhered to by this supported response.', - }, - situation: { - type: GraphQLString, - description: - 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', - }, - _situation: { - type: require('./element.schema'), - description: - 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', - }, - }), + name: 'MessageDefinitionallowedResponse', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + message: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MessageDefinitionallowedResponsemessage_message_Union', + description: + 'A reference to the message definition that must be adhered to by this supported response.', + types: () => [require('./messagedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MessageDefinition') { + return require('./messagedefinition.schema.js'); + } + }, + }), + ), + description: + 'A reference to the message definition that must be adhered to by this supported response.', + }, + _situation: { + type: require('./element.schema.js'), + description: + 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', + }, + situation: { + type: GraphQLString, + description: + 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/messagedefinitionfocus.schema.js b/src/resources/3_0_1/schemas/messagedefinitionfocus.schema.js index b027326c..7c3d4e5c 100644 --- a/src/resources/3_0_1/schemas/messagedefinitionfocus.schema.js +++ b/src/resources/3_0_1/schemas/messagedefinitionfocus.schema.js @@ -1,54 +1,86 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary MessageDefinition.focus Schema + * @summary MessageDefinitionfocus Schema */ module.exports = new GraphQLObjectType({ - name: 'MessageDefinitionFocus', - description: - 'Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of resource that must be the focus for this message.', - }, - _code: { - type: require('./element.schema'), - description: - 'The kind of resource that must be the focus for this message.', - }, - profile: { - type: require('./reference.schema'), + name: 'MessageDefinitionfocus', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The kind of resource that must be the focus for this message.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of resource that must be the focus for this message.', + }, + profile: { + type: new GraphQLUnionType({ + name: 'MessageDefinitionfocusprofile_profile_Union', description: 'A profile that reflects constraints for the focal resource (and potentially for related resources).', - }, - min: { - type: UnsignedIntScalar, - description: - 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', - }, - _min: { - type: require('./element.schema'), - description: - 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', - }, - max: { - type: GraphQLString, - description: - 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', - }, - _max: { - type: require('./element.schema'), - description: - 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', - }, - }), + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + description: + 'A profile that reflects constraints for the focal resource (and potentially for related resources).', + }, + _min: { + type: require('./element.schema.js'), + description: + 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + min: { + type: UnsignedIntScalar, + description: + 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + max: { + type: GraphQLString, + description: + 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/messageheader.schema.js b/src/resources/3_0_1/schemas/messageheader.schema.js index c779c52d..f69d7955 100644 --- a/src/resources/3_0_1/schemas/messageheader.schema.js +++ b/src/resources/3_0_1/schemas/messageheader.schema.js @@ -1,20 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let MessageHeaderResourceType = new GraphQLEnumType({ - name: 'MessageHeaderResourceType', - values: { - MessageHeader: { value: 'MessageHeader' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -22,77 +16,214 @@ let MessageHeaderResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'MessageHeader', - description: 'Base StructureDefinition for MessageHeader Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(MessageHeaderResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-events - event: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-events'.", - }, - destination: { - type: new GraphQLList(require('./messageheaderdestination.schema')), - description: - 'The destination application which the message is intended for.', - }, - receiver: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for MessageHeader Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageHeader_Enum_schema', + values: { MessageHeader: { value: 'MessageHeader' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-events + event: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://hl7.org/fhir/message-events'.", + }, + destination: { + type: new GraphQLList(require('./messageheaderdestination.schema.js')), + description: + 'The destination application which the message is intended for.', + }, + receiver: { + type: new GraphQLUnionType({ + name: 'MessageHeaderreceiver_receiver_Union', description: "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", - }, - sender: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", + }, + sender: { + type: new GraphQLUnionType({ + name: 'MessageHeadersender_sender_Union', description: 'Identifies the sending system to allow the use of a trust relationship.', - }, - timestamp: { - type: new GraphQLNonNull(InstantScalar), - description: 'The time that the message was sent.', - }, - _timestamp: { - type: require('./element.schema'), - description: 'The time that the message was sent.', - }, - enterer: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the sending system to allow the use of a trust relationship.', + }, + _timestamp: { + type: require('./element.schema.js'), + description: 'The time that the message was sent.', + }, + timestamp: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time that the message was sent.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'MessageHeaderenterer_enterer_Union', description: 'The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', - }, - author: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', + }, + author: { + type: new GraphQLUnionType({ + name: 'MessageHeaderauthor_author_Union', description: 'The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', - }, - source: { - type: new GraphQLNonNull(require('./messageheadersource.schema')), - description: - 'The source application from which this message originated.', - }, - responsible: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', + }, + source: { + type: new GraphQLNonNull(require('./messageheadersource.schema.js')), + description: 'The source application from which this message originated.', + }, + responsible: { + type: new GraphQLUnionType({ + name: 'MessageHeaderresponsible_responsible_Union', description: 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/message-reason-encounter - reason: { - type: require('./codeableconcept.schema'), - description: - 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', - }, - response: { - type: require('./messageheaderresponse.schema'), - description: - 'Information about the message that this message is a response to. Only present if this message is a response.', - }, - focus: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The actual data of the message - a reference to the root/focus class of the event.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/message-reason-encounter + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', + }, + response: { + type: require('./messageheaderresponse.schema.js'), + description: + 'Information about the message that this message is a response to. Only present if this message is a response.', + }, + focus: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MessageHeaderfocus_focus_Union', + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/messageheaderdestination.schema.js b/src/resources/3_0_1/schemas/messageheaderdestination.schema.js index 52f458b8..d3ca5e86 100644 --- a/src/resources/3_0_1/schemas/messageheaderdestination.schema.js +++ b/src/resources/3_0_1/schemas/messageheaderdestination.schema.js @@ -1,37 +1,70 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary MessageHeader.destination Schema + * @summary MessageHeaderdestination Schema */ module.exports = new GraphQLObjectType({ - name: 'MessageHeaderDestination', - description: 'The destination application which the message is intended for.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: 'Human-readable name for the target system.', - }, - _name: { - type: require('./element.schema'), - description: 'Human-readable name for the target system.', - }, - target: { - type: require('./reference.schema'), + name: 'MessageHeaderdestination', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-readable name for the target system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the target system.', + }, + target: { + type: new GraphQLUnionType({ + name: 'MessageHeaderdestinationtarget_target_Union', description: 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', - }, - endpoint: { - type: new GraphQLNonNull(UriScalar), - description: 'Indicates where the message should be routed to.', - }, - _endpoint: { - type: require('./element.schema'), - description: 'Indicates where the message should be routed to.', - }, - }), + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: 'Indicates where the message should be routed to.', + }, + endpoint: { + type: new GraphQLNonNull(UriScalar), + description: 'Indicates where the message should be routed to.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/messageheaderresponse.schema.js b/src/resources/3_0_1/schemas/messageheaderresponse.schema.js index dc876cc7..be9c710a 100644 --- a/src/resources/3_0_1/schemas/messageheaderresponse.schema.js +++ b/src/resources/3_0_1/schemas/messageheaderresponse.schema.js @@ -1,43 +1,74 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary MessageHeader.response Schema + * @summary MessageHeaderresponse Schema */ module.exports = new GraphQLObjectType({ - name: 'MessageHeaderResponse', - description: - 'Information about the message that this message is a response to. Only present if this message is a response.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLNonNull(IdScalar), - description: - 'The MessageHeader.id of the message to which this message is a response.', - }, - _identifier: { - type: require('./element.schema'), - description: - 'The MessageHeader.id of the message to which this message is a response.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/response-code - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', - }, - _code: { - type: require('./element.schema'), - description: - 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', - }, - details: { - type: require('./reference.schema'), + name: 'MessageHeaderresponse', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./element.schema.js'), + description: + 'The MessageHeader.id of the message to which this message is a response.', + }, + identifier: { + type: new GraphQLNonNull(IdScalar), + description: + 'The MessageHeader.id of the message to which this message is a response.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/response-code + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + details: { + type: new GraphQLUnionType({ + name: 'MessageHeaderresponsedetails_details_Union', description: 'Full details of any issues found in the message.', - }, - }), + types: () => [require('./operationoutcome.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationOutcome') { + return require('./operationoutcome.schema.js'); + } + }, + }), + description: 'Full details of any issues found in the message.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/messageheadersource.schema.js b/src/resources/3_0_1/schemas/messageheadersource.schema.js index 5ae91229..bcb3e7f6 100644 --- a/src/resources/3_0_1/schemas/messageheadersource.schema.js +++ b/src/resources/3_0_1/schemas/messageheadersource.schema.js @@ -1,59 +1,79 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary MessageHeader.source Schema + * @summary MessageHeadersource Schema */ module.exports = new GraphQLObjectType({ - name: 'MessageHeaderSource', - description: 'The source application from which this message originated.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: 'Human-readable name for the source system.', - }, - _name: { - type: require('./element.schema'), - description: 'Human-readable name for the source system.', - }, - software: { - type: GraphQLString, - description: - 'May include configuration or other information useful in debugging.', - }, - _software: { - type: require('./element.schema'), - description: - 'May include configuration or other information useful in debugging.', - }, - version: { - type: GraphQLString, - description: - 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', - }, - _version: { - type: require('./element.schema'), - description: - 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', - }, - contact: { - type: require('./contactpoint.schema'), - description: - 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', - }, - endpoint: { - type: new GraphQLNonNull(UriScalar), - description: - 'Identifies the routing target to send acknowledgements to.', - }, - _endpoint: { - type: require('./element.schema'), - description: - 'Identifies the routing target to send acknowledgements to.', - }, - }), + name: 'MessageHeadersource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-readable name for the source system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the source system.', + }, + _software: { + type: require('./element.schema.js'), + description: + 'May include configuration or other information useful in debugging.', + }, + software: { + type: GraphQLString, + description: + 'May include configuration or other information useful in debugging.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + version: { + type: GraphQLString, + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + contact: { + type: require('./contactpoint.schema.js'), + description: + 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: 'Identifies the routing target to send acknowledgements to.', + }, + endpoint: { + type: new GraphQLNonNull(UriScalar), + description: 'Identifies the routing target to send acknowledgements to.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/meta.schema.js b/src/resources/3_0_1/schemas/meta.schema.js index 68d7e351..9d5b158a 100644 --- a/src/resources/3_0_1/schemas/meta.schema.js +++ b/src/resources/3_0_1/schemas/meta.schema.js @@ -1,9 +1,7 @@ -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -11,50 +9,64 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Meta', - description: 'Base StructureDefinition for Meta Type.', - fields: () => - extendSchema(require('./element.schema'), { - versionId: { - type: IdScalar, - description: - 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', - }, - _versionId: { - type: require('./element.schema'), - description: - 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', - }, - lastUpdated: { - type: InstantScalar, - description: - 'When the resource last changed - e.g. when the version changed.', - }, - _lastUpdated: { - type: require('./element.schema'), - description: - 'When the resource last changed - e.g. when the version changed.', - }, - profile: { - type: new GraphQLList(UriScalar), - description: - 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().', - }, - _profile: { - type: require('./element.schema'), - description: - 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-labels - security: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/common-tags - tag: { - type: new GraphQLList(require('./coding.schema')), - description: - 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', - }, - }), + description: 'Base StructureDefinition for Meta Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _versionId: { + type: require('./element.schema.js'), + description: + 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', + }, + versionId: { + type: IdScalar, + description: + 'The version specific identifier, as it appears in the version portion of the URL. This values changes when the resource is created, updated, or deleted.', + }, + _lastUpdated: { + type: require('./element.schema.js'), + description: + 'When the resource last changed - e.g. when the version changed.', + }, + lastUpdated: { + type: InstantScalar, + description: + 'When the resource last changed - e.g. when the version changed.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().', + }, + profile: { + type: new GraphQLList(UriScalar), + description: + 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url]().', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-labels + security: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/common-tags + tag: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/metadataresource.schema.js b/src/resources/3_0_1/schemas/metadataresource.schema.js new file mode 100644 index 00000000..0b0ca82f --- /dev/null +++ b/src/resources/3_0_1/schemas/metadataresource.schema.js @@ -0,0 +1,184 @@ +const { + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MetadataResource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MetadataResource', + description: 'Base StructureDefinition for MetadataResource Resource', + fields: () => ({ + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this metadata resource is (or will be) published. The URL SHOULD include the major version of the metadata resource. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this metadata resource is (or will be) published. The URL SHOULD include the major version of the metadata resource. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the metadata resource.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the metadata resource.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this metadata resource. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this metadata resource. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the metadata resource was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the metadata resource was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the metadata resource.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the metadata resource.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate metadata resource instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the metadata resource is intended to be used.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the metadata resource from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the metadata resource from a consumer's perspective.", + }, + }), +}); diff --git a/src/resources/3_0_1/schemas/money.schema.js b/src/resources/3_0_1/schemas/money.schema.js index e2c62605..99902881 100644 --- a/src/resources/3_0_1/schemas/money.schema.js +++ b/src/resources/3_0_1/schemas/money.schema.js @@ -1,6 +1,11 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -8,6 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Money', - description: 'Base StructureDefinition for Money Type.', - fields: () => extendSchema(require('./quantity.schema')), + description: 'Base StructureDefinition for Money Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/namingsystem.schema.js b/src/resources/3_0_1/schemas/namingsystem.schema.js index b9edd31b..eecbcd08 100644 --- a/src/resources/3_0_1/schemas/namingsystem.schema.js +++ b/src/resources/3_0_1/schemas/namingsystem.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let NamingSystemResourceType = new GraphQLEnumType({ - name: 'NamingSystemResourceType', - values: { - NamingSystem: { value: 'NamingSystem' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,128 +17,196 @@ let NamingSystemResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'NamingSystem', - description: 'Base StructureDefinition for NamingSystem Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(NamingSystemResourceType), - description: 'Type of this resource.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this naming system. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this naming system. Enables tracking the life-cycle of the content.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-type - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the purpose for the naming system - what kinds of things does it make unique?.', - }, - _kind: { - type: require('./element.schema'), - description: - 'Indicates the purpose for the naming system - what kinds of things does it make unique?.', - }, - date: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date (and optionally time) when the naming system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the naming system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the naming system.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the naming system.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - responsible: { - type: GraphQLString, - description: - 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', - }, - _responsible: { - type: require('./element.schema'), - description: - 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identifier-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Categorizes a naming system for easier search by grouping related naming systems.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate naming system instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the naming system is intended to be used.', - }, - usage: { - type: GraphQLString, - description: - 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', - }, - _usage: { - type: require('./element.schema'), - description: - 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', - }, - uniqueId: { - type: new GraphQLList( - new GraphQLNonNull(require('./namingsystemuniqueid.schema')), - ), - description: - 'Indicates how the system may be identified when referenced in electronic exchange.', - }, - replacedBy: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for NamingSystem Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NamingSystem_Enum_schema', + values: { NamingSystem: { value: 'NamingSystem' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this naming system. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this naming system. Enables tracking the life-cycle of the content.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-type + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the naming system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the naming system was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the naming system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the naming system.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _responsible: { + type: require('./element.schema.js'), + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + responsible: { + type: GraphQLString, + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identifier-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Categorizes a naming system for easier search by grouping related naming systems.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate naming system instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the naming system is intended to be used.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + usage: { + type: GraphQLString, + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + uniqueId: { + type: new GraphQLList( + new GraphQLNonNull(require('./namingsystemuniqueid.schema.js')), + ), + description: + 'Indicates how the system may be identified when referenced in electronic exchange.', + }, + replacedBy: { + type: new GraphQLUnionType({ + name: 'NamingSystemreplacedBy_replacedBy_Union', description: 'For naming systems that are retired, indicates the naming system that should be used in their place (if any).', - }, - }), + types: () => [require('./namingsystem.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'NamingSystem') { + return require('./namingsystem.schema.js'); + } + }, + }), + description: + 'For naming systems that are retired, indicates the naming system that should be used in their place (if any).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/namingsystemuniqueid.schema.js b/src/resources/3_0_1/schemas/namingsystemuniqueid.schema.js index 51f2d2d8..f2c587c6 100644 --- a/src/resources/3_0_1/schemas/namingsystemuniqueid.schema.js +++ b/src/resources/3_0_1/schemas/namingsystemuniqueid.schema.js @@ -1,68 +1,83 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary NamingSystem.uniqueId Schema + * @summary NamingSystemuniqueId Schema */ module.exports = new GraphQLObjectType({ - name: 'NamingSystemUniqueId', - description: - 'Indicates how the system may be identified when referenced in electronic exchange.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-identifier-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Identifies the unique identifier scheme used for this particular identifier.', - }, - _type: { - type: require('./element.schema'), - description: - 'Identifies the unique identifier scheme used for this particular identifier.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The string that should be sent over the wire to identify the code system or identifier system.', - }, - _value: { - type: require('./element.schema'), - description: - 'The string that should be sent over the wire to identify the code system or identifier system.', - }, - preferred: { - type: GraphQLBoolean, - description: - "Indicates whether this identifier is the 'preferred' identifier of this type.", - }, - _preferred: { - type: require('./element.schema'), - description: - "Indicates whether this identifier is the 'preferred' identifier of this type.", - }, - comment: { - type: GraphQLString, - description: - 'Notes about the past or intended usage of this identifier.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Notes about the past or intended usage of this identifier.', - }, - period: { - type: require('./period.schema'), - description: - 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', - }, - }), + name: 'NamingSystemuniqueId', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/namingsystem-identifier-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + _preferred: { + type: require('./element.schema.js'), + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + preferred: { + type: GraphQLBoolean, + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + _comment: { + type: require('./element.schema.js'), + description: 'Notes about the past or intended usage of this identifier.', + }, + comment: { + type: GraphQLString, + description: 'Notes about the past or intended usage of this identifier.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/narrative.schema.js b/src/resources/3_0_1/schemas/narrative.schema.js index cc81f7b6..671487b8 100644 --- a/src/resources/3_0_1/schemas/narrative.schema.js +++ b/src/resources/3_0_1/schemas/narrative.schema.js @@ -1,8 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const XhtmlScalar = require('../scalars/xhtml.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const XhtmlScalar = require('../scalars/xhtml.scalar.js'); /** * @name exports @@ -10,29 +13,43 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Narrative', - description: 'Base StructureDefinition for Narrative Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/narrative-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", - }, - _status: { - type: require('./element.schema'), - description: - "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", - }, - div: { - type: new GraphQLNonNull(XhtmlScalar), - description: - 'The actual narrative content, a stripped down version of XHTML.', - }, - _div: { - type: require('./element.schema'), - description: - 'The actual narrative content, a stripped down version of XHTML.', - }, - }), + description: 'Base StructureDefinition for Narrative Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _status: { + type: require('./element.schema.js'), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/narrative-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + _div: { + type: require('./element.schema.js'), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + div: { + type: new GraphQLNonNull(XhtmlScalar), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/nutritionorder.schema.js b/src/resources/3_0_1/schemas/nutritionorder.schema.js index eaa21a40..2cf34131 100644 --- a/src/resources/3_0_1/schemas/nutritionorder.schema.js +++ b/src/resources/3_0_1/schemas/nutritionorder.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let NutritionOrderResourceType = new GraphQLEnumType({ - name: 'NutritionOrderResourceType', - values: { - NutritionOrder: { value: 'NutritionOrder' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,82 +16,182 @@ let NutritionOrderResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'NutritionOrder', - description: 'Base StructureDefinition for NutritionOrder Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(NutritionOrderResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order by the order sender or by the order receiver.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/nutrition-request-status - status: { - type: CodeScalar, - description: 'The workflow status of the nutrition order/request.', - }, - _status: { - type: require('./element.schema'), - description: 'The workflow status of the nutrition order/request.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', - }, - encounter: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for NutritionOrder Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NutritionOrder_Enum_schema', + values: { NutritionOrder: { value: 'NutritionOrder' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers assigned to this order by the order sender or by the order receiver.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The workflow status of the nutrition order/request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/nutrition-request-status + status: { + type: CodeScalar, + description: 'The workflow status of the nutrition order/request.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'NutritionOrderpatient_patient_Union', + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'NutritionOrderencounter_encounter_Union', description: 'An encounter that provides additional information about the healthcare context in which this request is made.', - }, - dateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The date and time that this nutrition order was requested.', - }, - _dateTime: { - type: require('./element.schema'), - description: - 'The date and time that this nutrition order was requested.', - }, - orderer: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + _dateTime: { + type: require('./element.schema.js'), + description: 'The date and time that this nutrition order was requested.', + }, + dateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date and time that this nutrition order was requested.', + }, + orderer: { + type: new GraphQLUnionType({ + name: 'NutritionOrderorderer_orderer_Union', description: 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', - }, - allergyIntolerance: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A link to a record of allergies or intolerances which should be included in the nutrition order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet - foodPreferenceModifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/food-type - excludeFoodModifier: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', - }, - oralDiet: { - type: require('./nutritionorderoraldiet.schema'), - description: 'Diet given orally in contrast to enteral (tube) feeding.', - }, - supplement: { - type: new GraphQLList(require('./nutritionordersupplement.schema')), - description: - "Oral nutritional products given in order to add further nutritional value to the patient's diet.", - }, - enteralFormula: { - type: require('./nutritionorderenteralformula.schema'), - description: - 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', + }, + allergyIntolerance: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'NutritionOrderallergyIntolerance_allergyIntolerance_Union', + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + types: () => [require('./allergyintolerance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + }, + }), + ), + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/encounter-diet + foodPreferenceModifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/food-type + excludeFoodModifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + oralDiet: { + type: require('./nutritionorderoraldiet.schema.js'), + description: 'Diet given orally in contrast to enteral (tube) feeding.', + }, + supplement: { + type: new GraphQLList(require('./nutritionordersupplement.schema.js')), + description: + "Oral nutritional products given in order to add further nutritional value to the patient's diet.", + }, + enteralFormula: { + type: require('./nutritionorderenteralformula.schema.js'), + description: + 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/nutritionorderenteralformula.schema.js b/src/resources/3_0_1/schemas/nutritionorderenteralformula.schema.js index 74ca6093..182d6291 100644 --- a/src/resources/3_0_1/schemas/nutritionorderenteralformula.schema.js +++ b/src/resources/3_0_1/schemas/nutritionorderenteralformula.schema.js @@ -1,81 +1,97 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary NutritionOrder.enteralFormula Schema + * @summary NutritionOrderenteralFormula Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderEnteralFormula', - description: - 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/entformula-type - baseFormulaType: { - type: require('./codeableconcept.schema'), - description: - 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', - }, - baseFormulaProductName: { - type: GraphQLString, - description: - "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", - }, - _baseFormulaProductName: { - type: require('./element.schema'), - description: - "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/entformula-additive - additiveType: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', - }, - additiveProductName: { - type: GraphQLString, - description: - 'The product or brand name of the type of modular component to be added to the formula.', - }, - _additiveProductName: { - type: require('./element.schema'), - description: - 'The product or brand name of the type of modular component to be added to the formula.', - }, - caloricDensity: { - type: require('./quantity.schema'), - description: - 'The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/enteral-route - routeofAdministration: { - type: require('./codeableconcept.schema'), - description: - "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", - }, - administration: { - type: new GraphQLList( - require('./nutritionorderenteralformulaadministration.schema'), - ), - description: - 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', - }, - maxVolumeToDeliver: { - type: require('./quantity.schema'), - description: - 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', - }, - administrationInstruction: { - type: GraphQLString, - description: - 'Free text formula administration, feeding instructions or additional instructions or information.', - }, - _administrationInstruction: { - type: require('./element.schema'), - description: - 'Free text formula administration, feeding instructions or additional instructions or information.', - }, - }), + name: 'NutritionOrderenteralFormula', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/entformula-type + baseFormulaType: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', + }, + _baseFormulaProductName: { + type: require('./element.schema.js'), + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + baseFormulaProductName: { + type: GraphQLString, + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/entformula-additive + additiveType: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', + }, + _additiveProductName: { + type: require('./element.schema.js'), + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + additiveProductName: { + type: GraphQLString, + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + caloricDensity: { + type: require('./quantity.schema.js'), + description: + 'The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/enteral-route + routeofAdministration: { + type: require('./codeableconcept.schema.js'), + description: + "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", + }, + administration: { + type: new GraphQLList( + require('./nutritionorderenteralformulaadministration.schema.js'), + ), + description: + 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', + }, + maxVolumeToDeliver: { + type: require('./quantity.schema.js'), + description: + 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', + }, + _administrationInstruction: { + type: require('./element.schema.js'), + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + administrationInstruction: { + type: GraphQLString, + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/nutritionorderenteralformulaadministration.schema.js b/src/resources/3_0_1/schemas/nutritionorderenteralformulaadministration.schema.js index c1c12d80..7989a424 100644 --- a/src/resources/3_0_1/schemas/nutritionorderenteralformulaadministration.schema.js +++ b/src/resources/3_0_1/schemas/nutritionorderenteralformulaadministration.schema.js @@ -1,36 +1,52 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary NutritionOrder.enteralFormula.administration Schema + * @summary NutritionOrderenteralFormulaadministration Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderEnteralFormulaAdministration', - description: - 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - schedule: { - type: require('./timing.schema'), - description: - 'The time period and frequency at which the enteral formula should be delivered to the patient.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The volume of formula to provide to the patient per the specified administration schedule.', - }, - rateQuantity: { - type: require('./quantity.schema'), - description: - 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', - }, - rateRatio: { - type: require('./ratio.schema'), - description: - 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', - }, - }), + name: 'NutritionOrderenteralFormulaadministration', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + schedule: { + type: require('./timing.schema.js'), + description: + 'The time period and frequency at which the enteral formula should be delivered to the patient.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The volume of formula to provide to the patient per the specified administration schedule.', + }, + rateQuantity: { + type: require('./quantity.schema.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/nutritionorderoraldiet.schema.js b/src/resources/3_0_1/schemas/nutritionorderoraldiet.schema.js index e1b0b7eb..aaf4df2d 100644 --- a/src/resources/3_0_1/schemas/nutritionorderoraldiet.schema.js +++ b/src/resources/3_0_1/schemas/nutritionorderoraldiet.schema.js @@ -1,56 +1,73 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary NutritionOrder.oralDiet Schema + * @summary NutritionOrderoralDiet Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderOralDiet', - description: 'Diet given orally in contrast to enteral (tube) feeding.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/diet-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', - }, - schedule: { - type: new GraphQLList(require('./timing.schema')), - description: - 'The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.', - }, - nutrient: { - type: new GraphQLList( - require('./nutritionorderoraldietnutrient.schema'), - ), - description: - 'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.', - }, - texture: { - type: new GraphQLList( - require('./nutritionorderoraldiettexture.schema'), - ), - description: - 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/consistency-type - fluidConsistencyType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', - }, - instruction: { - type: GraphQLString, - description: - 'Free text or additional instructions or information pertaining to the oral diet.', - }, - _instruction: { - type: require('./element.schema'), - description: - 'Free text or additional instructions or information pertaining to the oral diet.', - }, - }), + name: 'NutritionOrderoralDiet', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/diet-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', + }, + schedule: { + type: new GraphQLList(require('./timing.schema.js')), + description: + 'The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.', + }, + nutrient: { + type: new GraphQLList( + require('./nutritionorderoraldietnutrient.schema.js'), + ), + description: + 'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.', + }, + texture: { + type: new GraphQLList( + require('./nutritionorderoraldiettexture.schema.js'), + ), + description: + 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/consistency-type + fluidConsistencyType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', + }, + _instruction: { + type: require('./element.schema.js'), + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/nutritionorderoraldietnutrient.schema.js b/src/resources/3_0_1/schemas/nutritionorderoraldietnutrient.schema.js index bad39036..ad5c217e 100644 --- a/src/resources/3_0_1/schemas/nutritionorderoraldietnutrient.schema.js +++ b/src/resources/3_0_1/schemas/nutritionorderoraldietnutrient.schema.js @@ -1,27 +1,42 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary NutritionOrder.oralDiet.nutrient Schema + * @summary NutritionOrderoralDietnutrient Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderOralDietNutrient', - description: - 'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/nutrient-code - modifier: { - type: require('./codeableconcept.schema'), - description: - 'The nutrient that is being modified such as carbohydrate or sodium.', - }, - amount: { - type: require('./quantity.schema'), - description: - 'The quantity of the specified nutrient to include in diet.', - }, - }), + name: 'NutritionOrderoralDietnutrient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/nutrient-code + modifier: { + type: require('./codeableconcept.schema.js'), + description: + 'The nutrient that is being modified such as carbohydrate or sodium.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'The quantity of the specified nutrient to include in diet.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/nutritionorderoraldiettexture.schema.js b/src/resources/3_0_1/schemas/nutritionorderoraldiettexture.schema.js index 25fa7c8f..50287d0c 100644 --- a/src/resources/3_0_1/schemas/nutritionorderoraldiettexture.schema.js +++ b/src/resources/3_0_1/schemas/nutritionorderoraldiettexture.schema.js @@ -1,28 +1,44 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary NutritionOrder.oralDiet.texture Schema + * @summary NutritionOrderoralDiettexture Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderOralDietTexture', - description: - 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/texture-code - modifier: { - type: require('./codeableconcept.schema'), - description: - 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/modified-foodtype - foodType: { - type: require('./codeableconcept.schema'), - description: - 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', - }, - }), + name: 'NutritionOrderoralDiettexture', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/texture-code + modifier: { + type: require('./codeableconcept.schema.js'), + description: + 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/modified-foodtype + foodType: { + type: require('./codeableconcept.schema.js'), + description: + 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/nutritionordersupplement.schema.js b/src/resources/3_0_1/schemas/nutritionordersupplement.schema.js index 3207f1af..b9d693a8 100644 --- a/src/resources/3_0_1/schemas/nutritionordersupplement.schema.js +++ b/src/resources/3_0_1/schemas/nutritionordersupplement.schema.js @@ -1,51 +1,67 @@ -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary NutritionOrder.supplement Schema + * @summary NutritionOrdersupplement Schema */ module.exports = new GraphQLObjectType({ - name: 'NutritionOrderSupplement', - description: - "Oral nutritional products given in order to add further nutritional value to the patient's diet.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplement-type - type: { - type: require('./codeableconcept.schema'), - description: - 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', - }, - productName: { - type: GraphQLString, - description: - "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", - }, - _productName: { - type: require('./element.schema'), - description: - "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", - }, - schedule: { - type: new GraphQLList(require('./timing.schema')), - description: - 'The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The amount of the nutritional supplement to be given.', - }, - instruction: { - type: GraphQLString, - description: - 'Free text or additional instructions or information pertaining to the oral supplement.', - }, - _instruction: { - type: require('./element.schema'), - description: - 'Free text or additional instructions or information pertaining to the oral supplement.', - }, - }), + name: 'NutritionOrdersupplement', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplement-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', + }, + _productName: { + type: require('./element.schema.js'), + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + productName: { + type: GraphQLString, + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + schedule: { + type: new GraphQLList(require('./timing.schema.js')), + description: + 'The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount of the nutritional supplement to be given.', + }, + _instruction: { + type: require('./element.schema.js'), + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/observation.schema.js b/src/resources/3_0_1/schemas/observation.schema.js index d0a73642..6a3dfdc3 100644 --- a/src/resources/3_0_1/schemas/observation.schema.js +++ b/src/resources/3_0_1/schemas/observation.schema.js @@ -1,24 +1,18 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ObservationResourceType = new GraphQLEnumType({ - name: 'ObservationResourceType', - values: { - Observation: { value: 'Observation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports @@ -26,214 +20,400 @@ let ObservationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Observation', - description: 'Base StructureDefinition for Observation Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ObservationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'A unique identifier assigned to this observation.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A plan, proposal or order that is fulfilled in whole or in part by this event.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the result value.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the result value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A code that classifies the general type of observation being made.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Describes what was observed. Sometimes this is called the observation 'name'.", - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Observation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Observation_Enum_schema', + values: { Observation: { value: 'Observation' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'A unique identifier assigned to this observation.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ObservationbasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + types: () => [ + require('./careplan.schema.js'), + require('./devicerequest.schema.js'), + require('./immunizationrecommendation.schema.js'), + require('./medicationrequest.schema.js'), + require('./nutritionorder.schema.js'), + require('./procedurerequest.schema.js'), + require('./referralrequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'DeviceRequest') { + return require('./devicerequest.schema.js'); + } + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the result value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the result value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that classifies the general type of observation being made.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'name'.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'Observationsubject_subject_Union', description: 'The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.', + }, + context: { + type: new GraphQLUnionType({ + name: 'Observationcontext_context_Union', description: 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', - }, - effectiveDateTime: { - type: DateTimeScalar, - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - _effectiveDateTime: { - type: require('./element.schema'), - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - effectivePeriod: { - type: require('./period.schema'), - description: - "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", - }, - issued: { - type: InstantScalar, - description: - 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', - }, - _issued: { - type: require('./element.schema'), - description: - 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', - }, - performer: { - type: new GraphQLList(require('./reference.schema')), - description: - "Who was responsible for asserting the observed value as 'true'.", - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueString: { - type: GraphQLString, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRange: { - type: require('./range.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRatio: { - type: require('./ratio.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueSampledData: { - type: require('./sampleddata.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueTime: { - type: TimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valuePeriod: { - type: require('./period.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason - dataAbsentReason: { - type: require('./codeableconcept.schema'), - description: - 'Provides a reason why the expected value in the element Observation.value[x] is missing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation - interpretation: { - type: require('./codeableconcept.schema'), - description: - 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', - }, - comment: { - type: GraphQLString, - description: - 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', - }, - _comment: { - type: require('./element.schema'), - description: - 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.schema'), - description: - "Indicates the site on the subject's body where the observation was made (i.e. the target site).", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-methods - method: { - type: require('./codeableconcept.schema'), - description: 'Indicates the mechanism used to perform the observation.', - }, - specimen: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + _issued: { + type: require('./element.schema.js'), + description: + 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time this observation was made available to providers, typically after the results have been reviewed and verified.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Observationperformer_performer_Union', + description: + "Who was responsible for asserting the observed value as 'true'.", + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + "Who was responsible for asserting the observed value as 'true'.", + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason + dataAbsentReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation + interpretation: { + type: require('./codeableconcept.schema.js'), + description: + 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', + }, + comment: { + type: GraphQLString, + description: + 'May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-methods + method: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the mechanism used to perform the observation.', + }, + specimen: { + type: new GraphQLUnionType({ + name: 'Observationspecimen_specimen_Union', description: 'The specimen that was used when this observation was made.', - }, - device: { - type: require('./reference.schema'), + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + description: 'The specimen that was used when this observation was made.', + }, + device: { + type: new GraphQLUnionType({ + name: 'Observationdevice_device_Union', description: 'The device used to generate the observation data.', - }, - referenceRange: { - type: new GraphQLList(require('./observationreferencerange.schema')), - description: - 'Guidance on how to interpret the value by comparison to a normal or recommended range.', - }, - related: { - type: new GraphQLList(require('./observationrelated.schema')), - description: - 'A reference to another resource (usually another Observation) whose relationship is defined by the relationship type code.', - }, - component: { - type: new GraphQLList(require('./observationcomponent.schema')), - description: - 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', - }, - }), + types: () => [ + require('./device.schema.js'), + require('./devicemetric.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'DeviceMetric') { + return require('./devicemetric.schema.js'); + } + }, + }), + description: 'The device used to generate the observation data.', + }, + referenceRange: { + type: new GraphQLList(require('./observationreferencerange.schema.js')), + description: + 'Guidance on how to interpret the value by comparison to a normal or recommended range.', + }, + related: { + type: new GraphQLList(require('./observationrelated.schema.js')), + description: + 'A reference to another resource (usually another Observation) whose relationship is defined by the relationship type code.', + }, + component: { + type: new GraphQLList(require('./observationcomponent.schema.js')), + description: + 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/observationcomponent.schema.js b/src/resources/3_0_1/schemas/observationcomponent.schema.js index 0bb431f2..0a01cf68 100644 --- a/src/resources/3_0_1/schemas/observationcomponent.schema.js +++ b/src/resources/3_0_1/schemas/observationcomponent.schema.js @@ -1,101 +1,122 @@ -const TimeScalar = require('../scalars/time.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const TimeScalar = require('../scalars/time.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Observation.component Schema + * @summary Observationcomponent Schema */ module.exports = new GraphQLObjectType({ - name: 'ObservationComponent', - description: - 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Describes what was observed. Sometimes this is called the observation 'code'.", - }, - valueQuantity: { - type: require('./quantity.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueString: { - type: GraphQLString, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRange: { - type: require('./range.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueRatio: { - type: require('./ratio.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueSampledData: { - type: require('./sampleddata.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueTime: { - type: TimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valueDateTime: { - type: DateTimeScalar, - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - valuePeriod: { - type: require('./period.schema'), - description: - 'The information determined as a result of making the observation, if the information has a simple value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason - dataAbsentReason: { - type: require('./codeableconcept.schema'), - description: - 'Provides a reason why the expected value in the element Observation.value[x] is missing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation - interpretation: { - type: require('./codeableconcept.schema'), - description: - 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', - }, - }), + name: 'Observationcomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'code'.", + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-valueabsentreason + dataAbsentReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-interpretation + interpretation: { + type: require('./codeableconcept.schema.js'), + description: + 'The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/observationreferencerange.schema.js b/src/resources/3_0_1/schemas/observationreferencerange.schema.js index 43e576c0..ad678adf 100644 --- a/src/resources/3_0_1/schemas/observationreferencerange.schema.js +++ b/src/resources/3_0_1/schemas/observationreferencerange.schema.js @@ -1,53 +1,69 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary Observation.referenceRange Schema + * @summary ObservationreferenceRange Schema */ module.exports = new GraphQLObjectType({ - name: 'ObservationReferenceRange', - description: - 'Guidance on how to interpret the value by comparison to a normal or recommended range.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - low: { - type: require('./quantity.schema'), - description: - 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', - }, - high: { - type: require('./quantity.schema'), - description: - 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referencerange-meaning - type: { - type: require('./codeableconcept.schema'), - description: - 'Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referencerange-appliesto - appliesTo: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race.', - }, - age: { - type: require('./range.schema'), - description: - 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', - }, - text: { - type: GraphQLString, - description: - "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", - }, - _text: { - type: require('./element.schema'), - description: - "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", - }, - }), + name: 'ObservationreferenceRange', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + low: { + type: require('./quantity.schema.js'), + description: + 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', + }, + high: { + type: require('./quantity.schema.js'), + description: + 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referencerange-meaning + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referencerange-appliesto + appliesTo: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race.', + }, + age: { + type: require('./range.schema.js'), + description: + 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', + }, + _text: { + type: require('./element.schema.js'), + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + text: { + type: GraphQLString, + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/observationrelated.schema.js b/src/resources/3_0_1/schemas/observationrelated.schema.js index 1ae2dc62..de5daba9 100644 --- a/src/resources/3_0_1/schemas/observationrelated.schema.js +++ b/src/resources/3_0_1/schemas/observationrelated.schema.js @@ -1,33 +1,77 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Observation.related Schema + * @summary Observationrelated Schema */ module.exports = new GraphQLObjectType({ - name: 'ObservationRelated', - description: - 'A reference to another resource (usually another Observation) whose relationship is defined by the relationship type code.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-relationshiptypes - type: { - type: CodeScalar, - description: - 'A code specifying the kind of relationship that exists with the target resource.', - }, - _type: { - type: require('./element.schema'), - description: - 'A code specifying the kind of relationship that exists with the target resource.', - }, - target: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to the observation or [QuestionnaireResponse](questionnaireresponse.html#) resource that is related to this observation.', - }, - }), + name: 'Observationrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'A code specifying the kind of relationship that exists with the target resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-relationshiptypes + type: { + type: CodeScalar, + description: + 'A code specifying the kind of relationship that exists with the target resource.', + }, + target: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Observationrelatedtarget_target_Union', + description: + 'A reference to the observation or [QuestionnaireResponse](questionnaireresponse.html#) resource that is related to this observation.', + types: () => [ + require('./observation.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./sequence.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'Sequence') { + return require('./sequence.schema.js'); + } + }, + }), + ), + description: + 'A reference to the observation or [QuestionnaireResponse](questionnaireresponse.html#) resource that is related to this observation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/operationdefinition.schema.js b/src/resources/3_0_1/schemas/operationdefinition.schema.js index 40e3a92b..5dd75a2e 100644 --- a/src/resources/3_0_1/schemas/operationdefinition.schema.js +++ b/src/resources/3_0_1/schemas/operationdefinition.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OperationDefinitionResourceType = new GraphQLEnumType({ - name: 'OperationDefinitionResourceType', - values: { - OperationDefinition: { value: 'OperationDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,209 +18,279 @@ let OperationDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'OperationDefinition', - description: 'Base StructureDefinition for OperationDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(OperationDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this operation definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this operation definition. Enables tracking the life-cycle of the content.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether this is an operation or a named query.', - }, - _kind: { - type: require('./element.schema'), - description: 'Whether this is an operation or a named query.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the operation definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the operation definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the operation definition from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the operation definition from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the operation definition is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this operation definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this operation definition is needed and why it has been designed as it has.', - }, - idempotent: { - type: GraphQLBoolean, - description: - 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', - }, - _idempotent: { - type: require('./element.schema'), - description: - 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', - }, - code: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name used to invoke the operation.', - }, - _code: { - type: require('./element.schema'), - description: 'The name used to invoke the operation.', - }, - comment: { - type: GraphQLString, - description: - 'Additional information about how to use this operation or named query.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Additional information about how to use this operation or named query.', - }, - base: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for OperationDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationDefinition_Enum_schema', + values: { OperationDefinition: { value: 'OperationDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this operation definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this operation definition. Enables tracking the life-cycle of the content.', + }, + _kind: { + type: require('./element.schema.js'), + description: 'Whether this is an operation or a named query.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an operation or a named query.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the operation definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the operation definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the operation definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the operation definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the operation definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this operation definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this operation definition is needed and why it has been designed as it has.', + }, + _idempotent: { + type: require('./element.schema.js'), + description: + 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', + }, + idempotent: { + type: GraphQLBoolean, + description: + 'Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.', + }, + _code: { + type: require('./element.schema.js'), + description: 'The name used to invoke the operation.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name used to invoke the operation.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Additional information about how to use this operation or named query.', + }, + comment: { + type: GraphQLString, + description: + 'Additional information about how to use this operation or named query.', + }, + base: { + type: new GraphQLUnionType({ + name: 'OperationDefinitionbase_base_Union', description: 'Indicates that this operation definition is a constraining profile on the base.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - resource: { - type: new GraphQLList(CodeScalar), - description: 'The types on which this operation can be executed.', - }, - _resource: { - type: require('./element.schema'), - description: 'The types on which this operation can be executed.', - }, - system: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', - }, - _system: { - type: require('./element.schema'), - description: - 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', - }, - type: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', - }, - _type: { - type: require('./element.schema'), - description: - 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', - }, - instance: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', - }, - _instance: { - type: require('./element.schema'), - description: - 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', - }, - parameter: { - type: new GraphQLList(require('./operationdefinitionparameter.schema')), - description: 'The parameters for the operation/query.', - }, - overload: { - type: new GraphQLList(require('./operationdefinitionoverload.schema')), - description: - 'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.', - }, - }), + types: () => [require('./operationdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationDefinition') { + return require('./operationdefinition.schema.js'); + } + }, + }), + description: + 'Indicates that this operation definition is a constraining profile on the base.', + }, + _resource: { + type: require('./element.schema.js'), + description: 'The types on which this operation can be executed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + resource: { + type: new GraphQLList(CodeScalar), + description: 'The types on which this operation can be executed.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + system: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', + }, + type: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', + }, + _instance: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + instance: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + parameter: { + type: new GraphQLList( + require('./operationdefinitionparameter.schema.js'), + ), + description: 'The parameters for the operation/query.', + }, + overload: { + type: new GraphQLList(require('./operationdefinitionoverload.schema.js')), + description: + 'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/operationdefinitionoverload.schema.js b/src/resources/3_0_1/schemas/operationdefinitionoverload.schema.js index c3e21b0d..7b2f40e5 100644 --- a/src/resources/3_0_1/schemas/operationdefinitionoverload.schema.js +++ b/src/resources/3_0_1/schemas/operationdefinitionoverload.schema.js @@ -1,32 +1,48 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary OperationDefinition.overload Schema + * @summary OperationDefinitionoverload Schema */ module.exports = new GraphQLObjectType({ - name: 'OperationDefinitionOverload', - description: - 'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - parameterName: { - type: new GraphQLList(GraphQLString), - description: 'Name of parameter to include in overload.', - }, - _parameterName: { - type: require('./element.schema'), - description: 'Name of parameter to include in overload.', - }, - comment: { - type: GraphQLString, - description: 'Comments to go on overload.', - }, - _comment: { - type: require('./element.schema'), - description: 'Comments to go on overload.', - }, - }), + name: 'OperationDefinitionoverload', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _parameterName: { + type: require('./element.schema.js'), + description: 'Name of parameter to include in overload.', + }, + parameterName: { + type: new GraphQLList(GraphQLString), + description: 'Name of parameter to include in overload.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Comments to go on overload.', + }, + comment: { + type: GraphQLString, + description: 'Comments to go on overload.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/operationdefinitionparameter.schema.js b/src/resources/3_0_1/schemas/operationdefinitionparameter.schema.js index 54a41ebf..8319887a 100644 --- a/src/resources/3_0_1/schemas/operationdefinitionparameter.schema.js +++ b/src/resources/3_0_1/schemas/operationdefinitionparameter.schema.js @@ -1,96 +1,125 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary OperationDefinition.parameter Schema + * @summary OperationDefinitionparameter Schema */ module.exports = new GraphQLObjectType({ - name: 'OperationDefinitionParameter', - description: 'The parameters for the operation/query.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(CodeScalar), - description: 'The name of used to identify the parameter.', - }, - _name: { - type: require('./element.schema'), - description: 'The name of used to identify the parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use - use: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether this is an input or an output parameter.', - }, - _use: { - type: require('./element.schema'), - description: 'Whether this is an input or an output parameter.', - }, - min: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - _min: { - type: require('./element.schema'), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - max: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - _max: { - type: require('./element.schema'), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - documentation: { - type: GraphQLString, - description: 'Describes the meaning or use of this parameter.', - }, - _documentation: { - type: require('./element.schema'), - description: 'Describes the meaning or use of this parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/all-types - type: { - type: CodeScalar, - description: 'The type for this parameter.', - }, - _type: { - type: require('./element.schema'), - description: 'The type for this parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - searchType: { - type: CodeScalar, - description: - "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", - }, - _searchType: { - type: require('./element.schema'), - description: - "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", - }, - profile: { - type: require('./reference.schema'), + name: 'OperationDefinitionparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of used to identify the parameter.', + }, + name: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of used to identify the parameter.', + }, + _use: { + type: require('./element.schema.js'), + description: 'Whether this is an input or an output parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an input or an output parameter.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.schema.js'), + description: 'Describes the meaning or use of this parameter.', + }, + documentation: { + type: GraphQLString, + description: 'Describes the meaning or use of this parameter.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type for this parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/all-types + type: { + type: CodeScalar, + description: 'The type for this parameter.', + }, + _searchType: { + type: require('./element.schema.js'), + description: + "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + searchType: { + type: CodeScalar, + description: + "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", + }, + profile: { + type: new GraphQLUnionType({ + name: 'OperationDefinitionparameterprofile_profile_Union', description: 'A profile the specifies the rules that this parameter must conform to.', - }, - binding: { - type: require('./operationdefinitionparameterbinding.schema'), - description: - 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', - }, - }), + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + description: + 'A profile the specifies the rules that this parameter must conform to.', + }, + binding: { + type: require('./operationdefinitionparameterbinding.schema.js'), + description: + 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/operationdefinitionparameterbinding.schema.js b/src/resources/3_0_1/schemas/operationdefinitionparameterbinding.schema.js index 41ade696..68efa137 100644 --- a/src/resources/3_0_1/schemas/operationdefinitionparameterbinding.schema.js +++ b/src/resources/3_0_1/schemas/operationdefinitionparameterbinding.schema.js @@ -1,44 +1,79 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary OperationDefinition.parameter.binding Schema + * @summary OperationDefinitionparameterbinding Schema */ module.exports = new GraphQLObjectType({ - name: 'OperationDefinitionParameterBinding', - description: - 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/binding-strength - strength: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - _strength: { - type: require('./element.schema'), - description: - 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', - }, - valueSetUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - _valueSetUri: { - type: require('./element.schema'), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - valueSetReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', - }, - }), + name: 'OperationDefinitionparameterbinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _strength: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/binding-strength + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _valueSetUri: { + type: require('./element.schema.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSetReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'OperationDefinitionparameterbindingvalueSetReference_valueSetReference_Union', + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + ), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/operationoutcome.schema.js b/src/resources/3_0_1/schemas/operationoutcome.schema.js index 24bd72b8..bf9d027a 100644 --- a/src/resources/3_0_1/schemas/operationoutcome.schema.js +++ b/src/resources/3_0_1/schemas/operationoutcome.schema.js @@ -1,19 +1,13 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OperationOutcomeResourceType = new GraphQLEnumType({ - name: 'OperationOutcomeResourceType', - values: { - OperationOutcome: { value: 'OperationOutcome' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,19 +15,77 @@ let OperationOutcomeResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'OperationOutcome', - description: 'Base StructureDefinition for OperationOutcome Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(OperationOutcomeResourceType), - description: 'Type of this resource.', - }, - issue: { - type: new GraphQLList( - new GraphQLNonNull(require('./operationoutcomeissue.schema')), - ), - description: - 'An error, warning or information message that results from a system action.', - }, - }), + description: 'Base StructureDefinition for OperationOutcome Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationOutcome_Enum_schema', + values: { OperationOutcome: { value: 'OperationOutcome' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + issue: { + type: new GraphQLList( + new GraphQLNonNull(require('./operationoutcomeissue.schema.js')), + ), + description: + 'An error, warning or information message that results from a system action.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/operationoutcomeissue.schema.js b/src/resources/3_0_1/schemas/operationoutcomeissue.schema.js index c03a3809..f6694f63 100644 --- a/src/resources/3_0_1/schemas/operationoutcomeissue.schema.js +++ b/src/resources/3_0_1/schemas/operationoutcomeissue.schema.js @@ -1,80 +1,96 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary OperationOutcome.issue Schema + * @summary OperationOutcomeissue Schema */ module.exports = new GraphQLObjectType({ - name: 'OperationOutcomeIssue', - description: - 'An error, warning or information message that results from a system action.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/issue-severity - severity: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates whether the issue indicates a variation from successful processing.', - }, - _severity: { - type: require('./element.schema'), - description: - 'Indicates whether the issue indicates a variation from successful processing.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/issue-type - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', - }, - _code: { - type: require('./element.schema'), - description: - 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-outcome - details: { - type: require('./codeableconcept.schema'), - description: - 'Additional details about the error. This may be a text description of the error, or a system code that identifies the error.', - }, - diagnostics: { - type: GraphQLString, - description: - 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', - }, - _diagnostics: { - type: require('./element.schema'), - description: - 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', - }, - location: { - type: new GraphQLList(GraphQLString), - description: - "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", - }, - _location: { - type: require('./element.schema'), - description: - "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", - }, - expression: { - type: new GraphQLList(GraphQLString), - description: - 'A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', - }, - _expression: { - type: require('./element.schema'), - description: - 'A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', - }, - }), + name: 'OperationOutcomeissue', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/issue-severity + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/issue-type + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-outcome + details: { + type: require('./codeableconcept.schema.js'), + description: + 'Additional details about the error. This may be a text description of the error, or a system code that identifies the error.', + }, + _diagnostics: { + type: require('./element.schema.js'), + description: + 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', + }, + diagnostics: { + type: GraphQLString, + description: + 'Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.', + }, + _location: { + type: require('./element.schema.js'), + description: + "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", + }, + location: { + type: new GraphQLList(GraphQLString), + description: + "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", + }, + _expression: { + type: require('./element.schema.js'), + description: + 'A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', + }, + expression: { + type: new GraphQLList(GraphQLString), + description: + 'A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/organization.schema.js b/src/resources/3_0_1/schemas/organization.schema.js index 499965a5..0f859f37 100644 --- a/src/resources/3_0_1/schemas/organization.schema.js +++ b/src/resources/3_0_1/schemas/organization.schema.js @@ -1,20 +1,15 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let OrganizationResourceType = new GraphQLEnumType({ - name: 'OrganizationResourceType', - values: { - Organization: { value: 'Organization' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,72 +17,149 @@ let OrganizationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Organization', - description: 'Base StructureDefinition for Organization Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(OrganizationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', - }, - active: { - type: GraphQLBoolean, - description: - "Whether the organization's record is still in active use.", - }, - _active: { - type: require('./element.schema'), - description: - "Whether the organization's record is still in active use.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/organization-type - type: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'The kind(s) of organization that this is.', - }, - name: { - type: GraphQLString, - description: 'A name associated with the organization.', - }, - _name: { - type: require('./element.schema'), - description: 'A name associated with the organization.', - }, - alias: { - type: new GraphQLList(GraphQLString), - description: - 'A list of alternate names that the organization is known as, or was known as in the past.', - }, - _alias: { - type: require('./element.schema'), - description: - 'A list of alternate names that the organization is known as, or was known as in the past.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: 'A contact detail for the organization.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: 'An address for the organization.', - }, - partOf: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Organization Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Organization_Enum_schema', + values: { Organization: { value: 'Organization' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether the organization's record is still in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether the organization's record is still in active use.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/organization-type + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The kind(s) of organization that this is.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name associated with the organization.', + }, + name: { + type: GraphQLString, + description: 'A name associated with the organization.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'A list of alternate names that the organization is known as, or was known as in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the organization is known as, or was known as in the past.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: 'A contact detail for the organization.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'An address for the organization.', + }, + partOf: { + type: new GraphQLUnionType({ + name: 'OrganizationpartOf_partOf_Union', description: 'The organization of which this organization forms a part.', - }, - contact: { - type: new GraphQLList(require('./organizationcontact.schema')), - description: 'Contact for the organization for a certain purpose.', - }, - endpoint: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Technical endpoints providing access to services operated for the organization.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization of which this organization forms a part.', + }, + contact: { + type: new GraphQLList(require('./organizationcontact.schema.js')), + description: 'Contact for the organization for a certain purpose.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Organizationendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for the organization.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for the organization.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/organizationcontact.schema.js b/src/resources/3_0_1/schemas/organizationcontact.schema.js index 38c14895..9636146c 100644 --- a/src/resources/3_0_1/schemas/organizationcontact.schema.js +++ b/src/resources/3_0_1/schemas/organizationcontact.schema.js @@ -1,34 +1,50 @@ -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary Organization.contact Schema + * @summary Organizationcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'OrganizationContact', - description: 'Contact for the organization for a certain purpose.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/contactentity-type - purpose: { - type: require('./codeableconcept.schema'), - description: - 'Indicates a purpose for which the contact can be reached.', - }, - name: { - type: require('./humanname.schema'), - description: 'A name associated with the contact.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', - }, - address: { - type: require('./address.schema'), - description: 'Visiting or postal addresses for the contact.', - }, - }), + name: 'Organizationcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/contactentity-type + purpose: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates a purpose for which the contact can be reached.', + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', + }, + address: { + type: require('./address.schema.js'), + description: 'Visiting or postal addresses for the contact.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/parameterdefinition.schema.js b/src/resources/3_0_1/schemas/parameterdefinition.schema.js index 339bdc21..dacc186d 100644 --- a/src/resources/3_0_1/schemas/parameterdefinition.schema.js +++ b/src/resources/3_0_1/schemas/parameterdefinition.schema.js @@ -1,12 +1,12 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -14,71 +14,95 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'ParameterDefinition', - description: 'Base StructureDefinition for ParameterDefinition Type.', - fields: () => - extendSchema(require('./element.schema'), { - name: { - type: CodeScalar, - description: - 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use - use: { - type: new GraphQLNonNull(CodeScalar), - description: 'Whether the parameter is input or output for the module.', - }, - _use: { - type: require('./element.schema'), - description: 'Whether the parameter is input or output for the module.', - }, - min: { - type: GraphQLInt, - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - _min: { - type: require('./element.schema'), - description: - 'The minimum number of times this parameter SHALL appear in the request or response.', - }, - max: { - type: GraphQLString, - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - _max: { - type: require('./element.schema'), - description: - 'The maximum number of times this element is permitted to appear in the request or response.', - }, - documentation: { - type: GraphQLString, - description: - 'A brief discussion of what the parameter is for and how it is used by the module.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'A brief discussion of what the parameter is for and how it is used by the module.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/all-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of the parameter.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of the parameter.', - }, - profile: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ParameterDefinition Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', + }, + name: { + type: CodeScalar, + description: + 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', + }, + _use: { + type: require('./element.schema.js'), + description: 'Whether the parameter is input or output for the module.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/operation-parameter-use + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether the parameter is input or output for the module.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: GraphQLInt, + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'A brief discussion of what the parameter is for and how it is used by the module.', + }, + documentation: { + type: GraphQLString, + description: + 'A brief discussion of what the parameter is for and how it is used by the module.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of the parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/all-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of the parameter.', + }, + profile: { + type: new GraphQLUnionType({ + name: 'ParameterDefinitionprofile_profile_Union', description: 'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.', - }, - }), + types: () => [require('./structuredefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + }, + }), + description: + 'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/parameters.schema.js b/src/resources/3_0_1/schemas/parameters.schema.js index 8f1c49c9..01e9ce07 100644 --- a/src/resources/3_0_1/schemas/parameters.schema.js +++ b/src/resources/3_0_1/schemas/parameters.schema.js @@ -1,19 +1,12 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ParametersResourceType = new GraphQLEnumType({ - name: 'ParametersResourceType', - values: { - Parameters: { value: 'Parameters' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,16 +14,54 @@ let ParametersResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Parameters', - description: 'Base StructureDefinition for Parameters Resource.', - fields: () => - extendSchema(require('./resource.schema'), { - resourceType: { - type: new GraphQLNonNull(ParametersResourceType), - description: 'Type of this resource.', - }, - parameter: { - type: new GraphQLList(require('./parametersparameter.schema')), - description: 'A parameter passed to or received from the operation.', - }, - }), + description: 'Base StructureDefinition for Parameters Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Parameters_Enum_schema', + values: { Parameters: { value: 'Parameters' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + parameter: { + type: new GraphQLList(require('./parametersparameter.schema.js')), + description: 'A parameter passed to or received from the operation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/parametersparameter.schema.js b/src/resources/3_0_1/schemas/parametersparameter.schema.js index 8b08dc43..8698da17 100644 --- a/src/resources/3_0_1/schemas/parametersparameter.schema.js +++ b/src/resources/3_0_1/schemas/parametersparameter.schema.js @@ -1,263 +1,282 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Parameters.parameter Schema + * @summary Parametersparameter Schema */ module.exports = new GraphQLObjectType({ - name: 'ParametersParameter', - description: 'A parameter passed to or received from the operation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The name of the parameter (reference to the operation definition).', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of the parameter (reference to the operation definition).', - }, - valueBase64Binary: { - type: Base64BinaryScalar, - description: 'If the parameter is a data type.', - }, - _valueBase64Binary: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: 'If the parameter is a data type.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueCode: { - type: CodeScalar, - description: 'If the parameter is a data type.', - }, - _valueCode: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueDate: { - type: DateScalar, - description: 'If the parameter is a data type.', - }, - _valueDate: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueDateTime: { - type: DateTimeScalar, - description: 'If the parameter is a data type.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueDecimal: { - type: GraphQLFloat, - description: 'If the parameter is a data type.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueId: { - type: IdScalar, - description: 'If the parameter is a data type.', - }, - _valueId: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueInstant: { - type: InstantScalar, - description: 'If the parameter is a data type.', - }, - _valueInstant: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueInteger: { - type: GraphQLInt, - description: 'If the parameter is a data type.', - }, - _valueInteger: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueMarkdown: { - type: GraphQLString, - description: 'If the parameter is a data type.', - }, - _valueMarkdown: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueOid: { - type: OidScalar, - description: 'If the parameter is a data type.', - }, - _valueOid: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valuePositiveInt: { - type: PositiveIntScalar, - description: 'If the parameter is a data type.', - }, - _valuePositiveInt: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueString: { - type: GraphQLString, - description: 'If the parameter is a data type.', - }, - _valueString: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueTime: { - type: TimeScalar, - description: 'If the parameter is a data type.', - }, - _valueTime: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueUnsignedInt: { - type: UnsignedIntScalar, - description: 'If the parameter is a data type.', - }, - _valueUnsignedInt: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueUri: { - type: UriScalar, - description: 'If the parameter is a data type.', - }, - _valueUri: { - type: require('./element.schema'), - description: 'If the parameter is a data type.', - }, - valueAddress: { - type: require('./address.schema'), - description: 'If the parameter is a data type.', - }, - valueAge: { - type: require('./age.schema'), - description: 'If the parameter is a data type.', - }, - valueAnnotation: { - type: require('./annotation.schema'), - description: 'If the parameter is a data type.', - }, - valueAttachment: { - type: require('./attachment.schema'), - description: 'If the parameter is a data type.', - }, - valueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'If the parameter is a data type.', - }, - valueCoding: { - type: require('./coding.schema'), - description: 'If the parameter is a data type.', - }, - valueContactPoint: { - type: require('./contactpoint.schema'), - description: 'If the parameter is a data type.', - }, - valueCount: { - type: require('./count.schema'), - description: 'If the parameter is a data type.', - }, - valueDistance: { - type: require('./distance.schema'), - description: 'If the parameter is a data type.', - }, - valueDuration: { - type: require('./duration.schema'), - description: 'If the parameter is a data type.', - }, - valueHumanName: { - type: require('./humanname.schema'), - description: 'If the parameter is a data type.', - }, - valueIdentifier: { - type: require('./identifier.schema'), - description: 'If the parameter is a data type.', - }, - valueMoney: { - type: require('./money.schema'), - description: 'If the parameter is a data type.', - }, - valuePeriod: { - type: require('./period.schema'), - description: 'If the parameter is a data type.', - }, - valueQuantity: { - type: require('./quantity.schema'), - description: 'If the parameter is a data type.', - }, - valueRange: { - type: require('./range.schema'), - description: 'If the parameter is a data type.', - }, - valueRatio: { - type: require('./ratio.schema'), - description: 'If the parameter is a data type.', - }, - valueReference: { - type: require('./reference.schema'), - description: 'If the parameter is a data type.', - }, - valueSampledData: { - type: require('./sampleddata.schema'), - description: 'If the parameter is a data type.', - }, - valueSignature: { - type: require('./signature.schema'), - description: 'If the parameter is a data type.', - }, - valueTiming: { - type: require('./timing.schema'), - description: 'If the parameter is a data type.', - }, - valueMeta: { - type: require('./meta.schema'), - description: 'If the parameter is a data type.', - }, - resource: { - type: require('./resourcelist.schema'), - description: 'If the parameter is a whole resource.', - }, - }), + name: 'Parametersparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the parameter (reference to the operation definition).', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the parameter (reference to the operation definition).', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: 'If the parameter is a data type.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'If the parameter is a data type.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCode: { + type: CodeScalar, + description: 'If the parameter is a data type.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDate: { + type: DateScalar, + description: 'If the parameter is a data type.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDateTime: { + type: DateTimeScalar, + description: 'If the parameter is a data type.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'If the parameter is a data type.', + }, + _valueId: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueId: { + type: IdScalar, + description: 'If the parameter is a data type.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueInstant: { + type: InstantScalar, + description: 'If the parameter is a data type.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueInteger: { + type: GraphQLInt, + description: 'If the parameter is a data type.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueMarkdown: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueOid: { + type: OidScalar, + description: 'If the parameter is a data type.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: 'If the parameter is a data type.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueString: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueTime: { + type: TimeScalar, + description: 'If the parameter is a data type.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: 'If the parameter is a data type.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUri: { + type: UriScalar, + description: 'If the parameter is a data type.', + }, + valueAddress: { + type: require('./address.schema.js'), + description: 'If the parameter is a data type.', + }, + valueAge: { + type: require('./age.schema.js'), + description: 'If the parameter is a data type.', + }, + valueAnnotation: { + type: require('./annotation.schema.js'), + description: 'If the parameter is a data type.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCoding: { + type: require('./coding.schema.js'), + description: 'If the parameter is a data type.', + }, + valueContactPoint: { + type: require('./contactpoint.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCount: { + type: require('./count.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDistance: { + type: require('./distance.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDuration: { + type: require('./duration.schema.js'), + description: 'If the parameter is a data type.', + }, + valueHumanName: { + type: require('./humanname.schema.js'), + description: 'If the parameter is a data type.', + }, + valueIdentifier: { + type: require('./identifier.schema.js'), + description: 'If the parameter is a data type.', + }, + valueMoney: { + type: require('./money.schema.js'), + description: 'If the parameter is a data type.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: 'If the parameter is a data type.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: 'If the parameter is a data type.', + }, + valueRange: { + type: require('./range.schema.js'), + description: 'If the parameter is a data type.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: 'If the parameter is a data type.', + }, + valueReference: { + type: require('./resourcelist.schema'), + description: 'If the parameter is a data type.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: 'If the parameter is a data type.', + }, + valueSignature: { + type: require('./signature.schema.js'), + description: 'If the parameter is a data type.', + }, + valueTiming: { + type: require('./timing.schema.js'), + description: 'If the parameter is a data type.', + }, + valueMeta: { + type: require('./meta.schema.js'), + description: 'If the parameter is a data type.', + }, + resource: { + type: require('./resourcelist.schema'), + description: 'If the parameter is a whole resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/patient.schema.js b/src/resources/3_0_1/schemas/patient.schema.js index 893ba90a..4390d71a 100644 --- a/src/resources/3_0_1/schemas/patient.schema.js +++ b/src/resources/3_0_1/schemas/patient.schema.js @@ -1,24 +1,17 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, GraphQLInt, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PatientResourceType = new GraphQLEnumType({ - name: 'PatientResourceType', - values: { - Patient: { value: 'Patient' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,130 +19,214 @@ let PatientResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Patient', - description: 'Base StructureDefinition for Patient Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PatientResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'An identifier for this patient.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this patient record is in active use.', - }, - _active: { - type: require('./element.schema'), - description: 'Whether this patient record is in active use.', - }, - name: { - type: new GraphQLList(require('./humanname.schema')), - description: 'A name associated with the individual.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date of birth for the individual.', - }, - _birthDate: { - type: require('./element.schema'), - description: 'The date of birth for the individual.', - }, - deceasedBoolean: { - type: GraphQLBoolean, - description: 'Indicates if the individual is deceased or not.', - }, - _deceasedBoolean: { - type: require('./element.schema'), - description: 'Indicates if the individual is deceased or not.', - }, - deceasedDateTime: { - type: DateTimeScalar, - description: 'Indicates if the individual is deceased or not.', - }, - _deceasedDateTime: { - type: require('./element.schema'), - description: 'Indicates if the individual is deceased or not.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: 'Addresses for the individual.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/marital-status - maritalStatus: { - type: require('./codeableconcept.schema'), - description: - "This field contains a patient's most recent marital (civil) status.", - }, - multipleBirthBoolean: { - type: GraphQLBoolean, - description: - 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', - }, - _multipleBirthBoolean: { - type: require('./element.schema'), - description: - 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', - }, - multipleBirthInteger: { - type: GraphQLInt, - description: - 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', - }, - _multipleBirthInteger: { - type: require('./element.schema'), - description: - 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', - }, - photo: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Image of the patient.', - }, - contact: { - type: new GraphQLList(require('./patientcontact.schema')), - description: - 'A contact party (e.g. guardian, partner, friend) for the patient.', - }, - animal: { - type: require('./patientanimal.schema'), - description: 'This patient is known to be an animal.', - }, - communication: { - type: new GraphQLList(require('./patientcommunication.schema')), - description: - 'Languages which may be used to communicate with the patient about his or her health.', - }, - generalPractitioner: { - type: new GraphQLList(require('./reference.schema')), - description: "Patient's nominated care provider.", - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Patient Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Patient_Enum_schema', + values: { Patient: { value: 'Patient' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'An identifier for this patient.', + }, + _active: { + type: require('./element.schema.js'), + description: 'Whether this patient record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this patient record is in active use.', + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'A name associated with the individual.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date of birth for the individual.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the individual.', + }, + _deceasedBoolean: { + type: require('./element.schema.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: 'Indicates if the individual is deceased or not.', + }, + _deceasedDateTime: { + type: require('./element.schema.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedDateTime: { + type: DateTimeScalar, + description: 'Indicates if the individual is deceased or not.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'Addresses for the individual.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/marital-status + maritalStatus: { + type: require('./codeableconcept.schema.js'), + description: + "This field contains a patient's most recent marital (civil) status.", + }, + _multipleBirthBoolean: { + type: require('./element.schema.js'), + description: + 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', + }, + multipleBirthBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', + }, + _multipleBirthInteger: { + type: require('./element.schema.js'), + description: + 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', + }, + multipleBirthInteger: { + type: GraphQLInt, + description: + 'Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the patient.', + }, + contact: { + type: new GraphQLList(require('./patientcontact.schema.js')), + description: + 'A contact party (e.g. guardian, partner, friend) for the patient.', + }, + animal: { + type: require('./patientanimal.schema.js'), + description: 'This patient is known to be an animal.', + }, + communication: { + type: new GraphQLList(require('./patientcommunication.schema.js')), + description: + 'Languages which may be used to communicate with the patient about his or her health.', + }, + generalPractitioner: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PatientgeneralPractitioner_generalPractitioner_Union', + description: "Patient's nominated care provider.", + types: () => [ + require('./organization.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: "Patient's nominated care provider.", + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'PatientmanagingOrganization_managingOrganization_Union', description: 'Organization that is the custodian of the patient record.', - }, - link: { - type: new GraphQLList(require('./patientlink.schema')), - description: - 'Link to another patient resource that concerns the same actual patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that is the custodian of the patient record.', + }, + link: { + type: new GraphQLList(require('./patientlink.schema.js')), + description: + 'Link to another patient resource that concerns the same actual patient.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/patientanimal.schema.js b/src/resources/3_0_1/schemas/patientanimal.schema.js index 337af955..a8dc3293 100644 --- a/src/resources/3_0_1/schemas/patientanimal.schema.js +++ b/src/resources/3_0_1/schemas/patientanimal.schema.js @@ -1,33 +1,55 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Patient.animal Schema + * @summary Patientanimal Schema */ module.exports = new GraphQLObjectType({ - name: 'PatientAnimal', - description: 'This patient is known to be an animal.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-species - species: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Identifies the high level taxonomic categorization of the kind of animal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-breeds - breed: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the detailed categorization of the kind of animal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/animal-genderstatus - genderStatus: { - type: require('./codeableconcept.schema'), - description: - "Indicates the current state of the animal's reproductive organs.", - }, - }), + name: 'Patientanimal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-species + species: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the high level taxonomic categorization of the kind of animal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-breeds + breed: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the detailed categorization of the kind of animal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/animal-genderstatus + genderStatus: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the current state of the animal's reproductive organs.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/patientcommunication.schema.js b/src/resources/3_0_1/schemas/patientcommunication.schema.js index 849ceb83..f94467ae 100644 --- a/src/resources/3_0_1/schemas/patientcommunication.schema.js +++ b/src/resources/3_0_1/schemas/patientcommunication.schema.js @@ -1,36 +1,54 @@ const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Patient.communication Schema + * @summary Patientcommunication Schema */ module.exports = new GraphQLObjectType({ - name: 'PatientCommunication', - description: - 'Languages which may be used to communicate with the patient about his or her health.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", - }, - preferred: { - type: GraphQLBoolean, - description: - 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', - }, - _preferred: { - type: require('./element.schema'), - description: - 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', - }, - }), + name: 'Patientcommunication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + _preferred: { + type: require('./element.schema.js'), + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + preferred: { + type: GraphQLBoolean, + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/patientcontact.schema.js b/src/resources/3_0_1/schemas/patientcontact.schema.js index f3d463f0..4d2222ef 100644 --- a/src/resources/3_0_1/schemas/patientcontact.schema.js +++ b/src/resources/3_0_1/schemas/patientcontact.schema.js @@ -1,57 +1,88 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Patient.contact Schema + * @summary Patientcontact Schema */ module.exports = new GraphQLObjectType({ - name: 'PatientContact', - description: - 'A contact party (e.g. guardian, partner, friend) for the patient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0131 - relationship: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The nature of the relationship between the patient and the contact person.', - }, - name: { - type: require('./humanname.schema'), - description: 'A name associated with the contact person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - address: { - type: require('./address.schema'), - description: 'Address for the contact person.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', - }, - organization: { - type: require('./reference.schema'), + name: 'Patientcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0131 + relationship: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The nature of the relationship between the patient and the contact person.', + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the contact person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + address: { + type: require('./address.schema.js'), + description: 'Address for the contact person.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'Patientcontactorganization_organization_Union', description: 'Organization on behalf of which the contact is acting or for which the contact is working.', - }, - period: { - type: require('./period.schema'), - description: - 'The period during which this contact person or organization is valid to be contacted relating to this patient.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Organization on behalf of which the contact is acting or for which the contact is working.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period during which this contact person or organization is valid to be contacted relating to this patient.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/patientlink.schema.js b/src/resources/3_0_1/schemas/patientlink.schema.js index 757e6b78..77120d23 100644 --- a/src/resources/3_0_1/schemas/patientlink.schema.js +++ b/src/resources/3_0_1/schemas/patientlink.schema.js @@ -1,32 +1,71 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Patient.link Schema + * @summary Patientlink Schema */ module.exports = new GraphQLObjectType({ - name: 'PatientLink', - description: - 'Link to another patient resource that concerns the same actual patient.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - other: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The other patient resource that the link refers to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/link-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of link between this patient resource and another patient resource.', - }, - _type: { - type: require('./element.schema'), - description: - 'The type of link between this patient resource and another patient resource.', - }, - }), + name: 'Patientlink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + other: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Patientlinkother_other_Union', + description: 'The other patient resource that the link refers to.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'The other patient resource that the link refers to.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of link between this patient resource and another patient resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/link-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of link between this patient resource and another patient resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/paymentnotice.schema.js b/src/resources/3_0_1/schemas/paymentnotice.schema.js index 9d8fabc9..c7449663 100644 --- a/src/resources/3_0_1/schemas/paymentnotice.schema.js +++ b/src/resources/3_0_1/schemas/paymentnotice.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PaymentNoticeResourceType = new GraphQLEnumType({ - name: 'PaymentNoticeResourceType', - values: { - PaymentNotice: { value: 'PaymentNotice' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,70 +17,176 @@ let PaymentNoticeResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'PaymentNotice', - description: 'Base StructureDefinition for PaymentNotice Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PaymentNoticeResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The notice business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - request: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for PaymentNotice Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentNotice_Enum_schema', + values: { PaymentNotice: { value: 'PaymentNotice' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The notice business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentNoticerequest_request_Union', description: 'Reference of resource for which payment is being made.', - }, - response: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Reference of resource for which payment is being made.', + }, + response: { + type: new GraphQLUnionType({ + name: 'PaymentNoticeresponse_response_Union', description: 'Reference of response to resource for which payment is being made.', - }, - statusDate: { - type: DateScalar, - description: 'The date when the above payment action occurrred.', - }, - _statusDate: { - type: require('./element.schema'), - description: 'The date when the above payment action occurrred.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when this resource was created.', - }, - target: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference of response to resource for which payment is being made.', + }, + _statusDate: { + type: require('./element.schema.js'), + description: 'The date when the above payment action occurrred.', + }, + statusDate: { + type: DateScalar, + description: 'The date when the above payment action occurrred.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + target: { + type: new GraphQLUnionType({ + name: 'PaymentNoticetarget_target_Union', description: 'The Insurer who is target of the request.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'PaymentNoticeprovider_provider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'PaymentNoticeorganization_organization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-status - paymentStatus: { - type: require('./codeableconcept.schema'), - description: - 'The payment status, typically paid: payment sent, cleared: payment received.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-status + paymentStatus: { + type: require('./codeableconcept.schema.js'), + description: + 'The payment status, typically paid: payment sent, cleared: payment received.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/paymentreconciliation.schema.js b/src/resources/3_0_1/schemas/paymentreconciliation.schema.js index b2847ab4..c6c5253f 100644 --- a/src/resources/3_0_1/schemas/paymentreconciliation.schema.js +++ b/src/resources/3_0_1/schemas/paymentreconciliation.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PaymentReconciliationResourceType = new GraphQLEnumType({ - name: 'PaymentReconciliationResourceType', - values: { - PaymentReconciliation: { value: 'PaymentReconciliation' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,91 +17,188 @@ let PaymentReconciliationResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'PaymentReconciliation', - description: 'Base StructureDefinition for PaymentReconciliation Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PaymentReconciliationResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - period: { - type: require('./period.schema'), - description: - 'The period of time for which payments have been gathered into this bulk payment for settlement.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for PaymentReconciliation Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentReconciliation_Enum_schema', + values: { PaymentReconciliation: { value: 'PaymentReconciliation' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time for which payments have been gathered into this bulk payment for settlement.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationorganization_organization_Union', description: 'The Insurer who produced this adjudicated response.', - }, - request: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationrequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: 'Transaction status: error, complete.', - }, - disposition: { - type: GraphQLString, - description: 'A description of the status of the adjudication.', - }, - _disposition: { - type: require('./element.schema'), - description: 'A description of the status of the adjudication.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./processrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ProcessRequest') { + return require('./processrequest.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/remittance-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: 'Transaction status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationrequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: + 'PaymentReconciliationrequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - detail: { - type: new GraphQLList(require('./paymentreconciliationdetail.schema')), - description: - 'List of individual settlement amounts and the corresponding transaction.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.schema'), - description: 'The form to be used for printing the content.', - }, - total: { - type: require('./money.schema'), - description: 'Total payment amount.', - }, - processNote: { - type: new GraphQLList( - require('./paymentreconciliationprocessnote.schema'), - ), - description: 'Suite of notes.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + detail: { + type: new GraphQLList(require('./paymentreconciliationdetail.schema.js')), + description: + 'List of individual settlement amounts and the corresponding transaction.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.schema.js'), + description: 'The form to be used for printing the content.', + }, + total: { + type: require('./money.schema.js'), + description: 'Total payment amount.', + }, + processNote: { + type: new GraphQLList( + require('./paymentreconciliationprocessnote.schema.js'), + ), + description: 'Suite of notes.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/paymentreconciliationdetail.schema.js b/src/resources/3_0_1/schemas/paymentreconciliationdetail.schema.js index d336ac8c..2a080cf9 100644 --- a/src/resources/3_0_1/schemas/paymentreconciliationdetail.schema.js +++ b/src/resources/3_0_1/schemas/paymentreconciliationdetail.schema.js @@ -1,52 +1,111 @@ -const DateScalar = require('../scalars/date.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary PaymentReconciliation.detail Schema + * @summary PaymentReconciliationdetail Schema */ module.exports = new GraphQLObjectType({ - name: 'PaymentReconciliationDetail', - description: - 'List of individual settlement amounts and the corresponding transaction.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/payment-type - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'Code to indicate the nature of the payment, adjustment, funds advance, etc.', - }, - request: { - type: require('./reference.schema'), + name: 'PaymentReconciliationdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/payment-type + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Code to indicate the nature of the payment, adjustment, funds advance, etc.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailrequest_request_Union', description: 'The claim or financial resource.', - }, - response: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'The claim or financial resource.', + }, + response: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailresponse_response_Union', description: 'The claim response resource.', - }, - submitter: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'The claim response resource.', + }, + submitter: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailsubmitter_submitter_Union', description: 'The Organization which submitted the claim or financial transaction.', - }, - payee: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The Organization which submitted the claim or financial transaction.', + }, + payee: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailpayee_payee_Union', description: 'The organization which is receiving the payment.', - }, - date: { - type: DateScalar, - description: 'The date of the invoice or financial resource.', - }, - _date: { - type: require('./element.schema'), - description: 'The date of the invoice or financial resource.', - }, - amount: { - type: require('./money.schema'), - description: 'Amount paid for this detail.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization which is receiving the payment.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date of the invoice or financial resource.', + }, + date: { + type: DateScalar, + description: 'The date of the invoice or financial resource.', + }, + amount: { + type: require('./money.schema.js'), + description: 'Amount paid for this detail.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/paymentreconciliationprocessnote.schema.js b/src/resources/3_0_1/schemas/paymentreconciliationprocessnote.schema.js index 527146ec..fe8bbfcd 100644 --- a/src/resources/3_0_1/schemas/paymentreconciliationprocessnote.schema.js +++ b/src/resources/3_0_1/schemas/paymentreconciliationprocessnote.schema.js @@ -1,28 +1,45 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary PaymentReconciliation.processNote Schema + * @summary PaymentReconciliationprocessNote Schema */ module.exports = new GraphQLObjectType({ - name: 'PaymentReconciliationProcessNote', - description: 'Suite of notes.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./codeableconcept.schema'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.schema'), - description: 'The note text.', - }, - }), + name: 'PaymentReconciliationprocessNote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./codeableconcept.schema.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/period.schema.js b/src/resources/3_0_1/schemas/period.schema.js index 69a49542..6d2885ad 100644 --- a/src/resources/3_0_1/schemas/period.schema.js +++ b/src/resources/3_0_1/schemas/period.schema.js @@ -1,7 +1,5 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -9,26 +7,40 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Period', - description: 'Base StructureDefinition for Period Type.', - fields: () => - extendSchema(require('./element.schema'), { - start: { - type: DateTimeScalar, - description: 'The start of the period. The boundary is inclusive.', - }, - _start: { - type: require('./element.schema'), - description: 'The start of the period. The boundary is inclusive.', - }, - end: { - type: DateTimeScalar, - description: - 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', - }, - _end: { - type: require('./element.schema'), - description: - 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', - }, - }), + description: 'Base StructureDefinition for Period Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _start: { + type: require('./element.schema.js'), + description: 'The start of the period. The boundary is inclusive.', + }, + start: { + type: DateTimeScalar, + description: 'The start of the period. The boundary is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + end: { + type: DateTimeScalar, + description: + 'The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/person.schema.js b/src/resources/3_0_1/schemas/person.schema.js index b770ded7..d289dd39 100644 --- a/src/resources/3_0_1/schemas/person.schema.js +++ b/src/resources/3_0_1/schemas/person.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PersonResourceType = new GraphQLEnumType({ - name: 'PersonResourceType', - values: { - Person: { value: 'Person' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,68 +17,136 @@ let PersonResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Person', - description: 'Base StructureDefinition for Person Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PersonResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier for a person within a particular scope.', - }, - name: { - type: new GraphQLList(require('./humanname.schema')), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: 'Administrative Gender.', - }, - _gender: { - type: require('./element.schema'), - description: 'Administrative Gender.', - }, - birthDate: { - type: DateScalar, - description: 'The birth date for the person.', - }, - _birthDate: { - type: require('./element.schema'), - description: 'The birth date for the person.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: 'One or more addresses for the person.', - }, - photo: { - type: require('./attachment.schema'), - description: - 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', - }, - managingOrganization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Person Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Person_Enum_schema', + values: { Person: { value: 'Person' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Identifier for a person within a particular scope.', + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.schema.js'), + description: 'Administrative Gender.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: 'Administrative Gender.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The birth date for the person.', + }, + birthDate: { + type: DateScalar, + description: 'The birth date for the person.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'One or more addresses for the person.', + }, + photo: { + type: require('./attachment.schema.js'), + description: + 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'PersonmanagingOrganization_managingOrganization_Union', description: 'The organization that is the custodian of the person record.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this person's record is in active use.", - }, - _active: { - type: require('./element.schema'), - description: "Whether this person's record is in active use.", - }, - link: { - type: new GraphQLList(require('./personlink.schema')), - description: 'Link to a resource that concerns the same actual person.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization that is the custodian of the person record.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether this person's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this person's record is in active use.", + }, + link: { + type: new GraphQLList(require('./personlink.schema.js')), + description: 'Link to a resource that concerns the same actual person.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/personlink.schema.js b/src/resources/3_0_1/schemas/personlink.schema.js index 1d8a4ff6..7c0d2e55 100644 --- a/src/resources/3_0_1/schemas/personlink.schema.js +++ b/src/resources/3_0_1/schemas/personlink.schema.js @@ -1,31 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Person.link Schema + * @summary Personlink Schema */ module.exports = new GraphQLObjectType({ - name: 'PersonLink', - description: 'Link to a resource that concerns the same actual person.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - target: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The resource to which this actual person is associated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/identity-assuranceLevel - assurance: { - type: CodeScalar, - description: - 'Level of assurance that this link is actually associated with the target resource.', - }, - _assurance: { - type: require('./element.schema'), - description: - 'Level of assurance that this link is actually associated with the target resource.', - }, - }), + name: 'Personlink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + target: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Personlinktarget_target_Union', + description: + 'The resource to which this actual person is associated.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./person.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Person') { + return require('./person.schema.js'); + } + }, + }), + ), + description: 'The resource to which this actual person is associated.', + }, + _assurance: { + type: require('./element.schema.js'), + description: + 'Level of assurance that this link is actually associated with the target resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/identity-assuranceLevel + assurance: { + type: CodeScalar, + description: + 'Level of assurance that this link is actually associated with the target resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/plandefinition.schema.js b/src/resources/3_0_1/schemas/plandefinition.schema.js index fa00f8c0..4cb78ee2 100644 --- a/src/resources/3_0_1/schemas/plandefinition.schema.js +++ b/src/resources/3_0_1/schemas/plandefinition.schema.js @@ -1,24 +1,17 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PlanDefinitionResourceType = new GraphQLEnumType({ - name: 'PlanDefinitionResourceType', - values: { - PlanDefinition: { value: 'PlanDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,215 +19,285 @@ let PlanDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'PlanDefinition', - description: 'Base StructureDefinition for PlanDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PlanDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the plan definition.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the plan definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/plan-definition-type - type: { - type: require('./codeableconcept.schema'), - description: - 'The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this plan definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this plan definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the plan definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the plan definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the plan definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the plan definition.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the plan definition from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the plan definition from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this plan definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this plan definition is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the asset is used from a clinical perspective.', - }, - _usage: { - type: require('./element.schema'), - description: - 'A detailed description of how the asset is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.schema'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.schema'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The period during which the plan definition content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate plan definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the plan definition is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.schema')), - description: - 'A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: - 'Related artifacts such as additional documentation, justification, or bibliographic references.', - }, - library: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A reference to a Library resource containing any formal logic used by the plan definition.', - }, - goal: { - type: new GraphQLList(require('./plandefinitiongoal.schema')), - description: - 'Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', - }, - action: { - type: new GraphQLList(require('./plandefinitionaction.schema')), - description: 'An action to be taken as part of the plan.', - }, - }), + description: 'Base StructureDefinition for PlanDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PlanDefinition_Enum_schema', + values: { PlanDefinition: { value: 'PlanDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the plan definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the plan definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/plan-definition-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this plan definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this plan definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the plan definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the plan definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the plan definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the plan definition.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the plan definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the plan definition from a consumer's perspective.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this plan definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this plan definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the asset is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the asset is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the plan definition content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate plan definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the plan definition is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.schema.js')), + description: + 'A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + library: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PlanDefinitionlibrary_library_Union', + description: + 'A reference to a Library resource containing any formal logic used by the plan definition.', + types: () => [require('./library.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Library') { + return require('./library.schema.js'); + } + }, + }), + ), + description: + 'A reference to a Library resource containing any formal logic used by the plan definition.', + }, + goal: { + type: new GraphQLList(require('./plandefinitiongoal.schema.js')), + description: + 'Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', + }, + action: { + type: new GraphQLList(require('./plandefinitionaction.schema.js')), + description: 'An action to be taken as part of the plan.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/plandefinitionaction.schema.js b/src/resources/3_0_1/schemas/plandefinitionaction.schema.js index ed8b00d6..c34a48ce 100644 --- a/src/resources/3_0_1/schemas/plandefinitionaction.schema.js +++ b/src/resources/3_0_1/schemas/plandefinitionaction.schema.js @@ -1,217 +1,261 @@ -const IdScalar = require('../scalars/id.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary PlanDefinition.action Schema + * @summary PlanDefinitionaction Schema */ module.exports = new GraphQLObjectType({ - name: 'PlanDefinitionAction', - description: 'An action to be taken as part of the plan.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - label: { - type: GraphQLString, - description: 'A user-visible label for the action.', - }, - _label: { - type: require('./element.schema'), - description: 'A user-visible label for the action.', - }, - title: { - type: GraphQLString, - description: 'The title of the action displayed to a user.', - }, - _title: { - type: require('./element.schema'), - description: 'The title of the action displayed to a user.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the action used to provide a summary to display to the user.', - }, - _description: { - type: require('./element.schema'), - description: - 'A short description of the action used to provide a summary to display to the user.', - }, - textEquivalent: { - type: GraphQLString, - description: - 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', - }, - _textEquivalent: { - type: require('./element.schema'), - description: - 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', - }, - code: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.', - }, - reason: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A description of why this action is necessary or appropriate.', - }, - documentation: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: - 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', - }, - goalId: { - type: new GraphQLList(IdScalar), - description: - 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', - }, - _goalId: { - type: require('./element.schema'), - description: - 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', - }, - triggerDefinition: { - type: new GraphQLList(require('./triggerdefinition.schema')), - description: 'A description of when the action should be triggered.', - }, - condition: { - type: new GraphQLList( - require('./plandefinitionactioncondition.schema'), - ), - description: - 'An expression that describes applicability criteria, or start/stop conditions for the action.', - }, - input: { - type: new GraphQLList(require('./datarequirement.schema')), - description: 'Defines input data requirements for the action.', - }, - output: { - type: new GraphQLList(require('./datarequirement.schema')), - description: 'Defines the outputs of the action, if any.', - }, - relatedAction: { - type: new GraphQLList( - require('./plandefinitionactionrelatedaction.schema'), - ), - description: - "A relationship to another action such as 'before' or '30-60 minutes after start of'.", - }, - timingDateTime: { - type: DateTimeScalar, - description: - 'An optional value describing when the action should be performed.', - }, - _timingDateTime: { - type: require('./element.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - timingPeriod: { - type: require('./period.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - timingDuration: { - type: require('./duration.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - timingRange: { - type: require('./range.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - timingTiming: { - type: require('./timing.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - participant: { - type: new GraphQLList( - require('./plandefinitionactionparticipant.schema'), - ), - description: - 'Indicates who should participate in performing the action described.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-type - type: { - type: require('./coding.schema'), - description: 'The type of action to perform (create, update, remove).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-grouping-behavior - groupingBehavior: { - type: CodeScalar, - description: - 'Defines the grouping behavior for the action and its children.', - }, - _groupingBehavior: { - type: require('./element.schema'), - description: - 'Defines the grouping behavior for the action and its children.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-selection-behavior - selectionBehavior: { - type: CodeScalar, - description: - 'Defines the selection behavior for the action and its children.', - }, - _selectionBehavior: { - type: require('./element.schema'), - description: - 'Defines the selection behavior for the action and its children.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-required-behavior - requiredBehavior: { - type: CodeScalar, - description: 'Defines the requiredness behavior for the action.', - }, - _requiredBehavior: { - type: require('./element.schema'), - description: 'Defines the requiredness behavior for the action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-precheck-behavior - precheckBehavior: { - type: CodeScalar, - description: - 'Defines whether the action should usually be preselected.', - }, - _precheckBehavior: { - type: require('./element.schema'), - description: - 'Defines whether the action should usually be preselected.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-cardinality-behavior - cardinalityBehavior: { - type: CodeScalar, - description: - 'Defines whether the action can be selected multiple times.', - }, - _cardinalityBehavior: { - type: require('./element.schema'), - description: - 'Defines whether the action can be selected multiple times.', - }, - definition: { - type: require('./reference.schema'), + name: 'PlanDefinitionaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _label: { + type: require('./element.schema.js'), + description: 'A user-visible label for the action.', + }, + label: { + type: GraphQLString, + description: 'A user-visible label for the action.', + }, + _title: { + type: require('./element.schema.js'), + description: 'The title of the action displayed to a user.', + }, + title: { + type: GraphQLString, + description: 'The title of the action displayed to a user.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + _textEquivalent: { + type: require('./element.schema.js'), + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', + }, + textEquivalent: { + type: GraphQLString, + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A description of why this action is necessary or appropriate.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', + }, + _goalId: { + type: require('./element.schema.js'), + description: + 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', + }, + goalId: { + type: new GraphQLList(IdScalar), + description: + 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', + }, + triggerDefinition: { + type: new GraphQLList(require('./triggerdefinition.schema.js')), + description: 'A description of when the action should be triggered.', + }, + condition: { + type: new GraphQLList( + require('./plandefinitionactioncondition.schema.js'), + ), + description: + 'An expression that describes applicability criteria, or start/stop conditions for the action.', + }, + input: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: 'Defines input data requirements for the action.', + }, + output: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: 'Defines the outputs of the action, if any.', + }, + relatedAction: { + type: new GraphQLList( + require('./plandefinitionactionrelatedaction.schema.js'), + ), + description: + "A relationship to another action such as 'before' or '30-60 minutes after start of'.", + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'An optional value describing when the action should be performed.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDuration: { + type: require('./duration.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingRange: { + type: require('./range.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + participant: { + type: new GraphQLList( + require('./plandefinitionactionparticipant.schema.js'), + ), + description: + 'Indicates who should participate in performing the action described.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-type + type: { + type: require('./coding.schema.js'), + description: 'The type of action to perform (create, update, remove).', + }, + _groupingBehavior: { + type: require('./element.schema.js'), + description: + 'Defines the grouping behavior for the action and its children.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-grouping-behavior + groupingBehavior: { + type: CodeScalar, + description: + 'Defines the grouping behavior for the action and its children.', + }, + _selectionBehavior: { + type: require('./element.schema.js'), + description: + 'Defines the selection behavior for the action and its children.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-selection-behavior + selectionBehavior: { + type: CodeScalar, + description: + 'Defines the selection behavior for the action and its children.', + }, + _requiredBehavior: { + type: require('./element.schema.js'), + description: 'Defines the requiredness behavior for the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-required-behavior + requiredBehavior: { + type: CodeScalar, + description: 'Defines the requiredness behavior for the action.', + }, + _precheckBehavior: { + type: require('./element.schema.js'), + description: 'Defines whether the action should usually be preselected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-precheck-behavior + precheckBehavior: { + type: CodeScalar, + description: 'Defines whether the action should usually be preselected.', + }, + _cardinalityBehavior: { + type: require('./element.schema.js'), + description: 'Defines whether the action can be selected multiple times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-cardinality-behavior + cardinalityBehavior: { + type: CodeScalar, + description: 'Defines whether the action can be selected multiple times.', + }, + definition: { + type: new GraphQLUnionType({ + name: 'PlanDefinitionactiondefinition_definition_Union', description: 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', - }, - transform: { - type: require('./reference.schema'), + types: () => [ + require('./activitydefinition.schema.js'), + require('./plandefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + }, + }), + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + transform: { + type: new GraphQLUnionType({ + name: 'PlanDefinitionactiontransform_transform_Union', description: 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', - }, - dynamicValue: { - type: new GraphQLList( - require('./plandefinitionactiondynamicvalue.schema'), - ), - description: - "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", - }, - }), + types: () => [require('./structuremap.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'StructureMap') { + return require('./structuremap.schema.js'); + } + }, + }), + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + dynamicValue: { + type: new GraphQLList( + require('./plandefinitionactiondynamicvalue.schema.js'), + ), + description: + "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/plandefinitionactioncondition.schema.js b/src/resources/3_0_1/schemas/plandefinitionactioncondition.schema.js index 4a8bd387..2fedc3c7 100644 --- a/src/resources/3_0_1/schemas/plandefinitionactioncondition.schema.js +++ b/src/resources/3_0_1/schemas/plandefinitionactioncondition.schema.js @@ -1,54 +1,75 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary PlanDefinition.action.condition Schema + * @summary PlanDefinitionactioncondition Schema */ module.exports = new GraphQLObjectType({ - name: 'PlanDefinitionActionCondition', - description: - 'An expression that describes applicability criteria, or start/stop conditions for the action.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-condition-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: 'The kind of condition.', - }, - _kind: { - type: require('./element.schema'), - description: 'The kind of condition.', - }, - description: { - type: GraphQLString, - description: - 'A brief, natural language description of the condition that effectively communicates the intended semantics.', - }, - _description: { - type: require('./element.schema'), - description: - 'A brief, natural language description of the condition that effectively communicates the intended semantics.', - }, - language: { - type: GraphQLString, - description: 'The media type of the language for the expression.', - }, - _language: { - type: require('./element.schema'), - description: 'The media type of the language for the expression.', - }, - expression: { - type: GraphQLString, - description: - 'An expression that returns true or false, indicating whether or not the condition is satisfied.', - }, - _expression: { - type: require('./element.schema'), - description: - 'An expression that returns true or false, indicating whether or not the condition is satisfied.', - }, - }), + name: 'PlanDefinitionactioncondition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _kind: { + type: require('./element.schema.js'), + description: 'The kind of condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-condition-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'The kind of condition.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: GraphQLString, + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + expression: { + type: GraphQLString, + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/plandefinitionactiondynamicvalue.schema.js b/src/resources/3_0_1/schemas/plandefinitionactiondynamicvalue.schema.js index 49719b6b..53600de6 100644 --- a/src/resources/3_0_1/schemas/plandefinitionactiondynamicvalue.schema.js +++ b/src/resources/3_0_1/schemas/plandefinitionactiondynamicvalue.schema.js @@ -1,54 +1,70 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary PlanDefinition.action.dynamicValue Schema + * @summary PlanDefinitionactiondynamicValue Schema */ module.exports = new GraphQLObjectType({ - name: 'PlanDefinitionActionDynamicValue', - description: - "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: GraphQLString, - description: - 'A brief, natural language description of the intended semantics of the dynamic value.', - }, - _description: { - type: require('./element.schema'), - description: - 'A brief, natural language description of the intended semantics of the dynamic value.', - }, - path: { - type: GraphQLString, - description: - 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', - }, - _path: { - type: require('./element.schema'), - description: - 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', - }, - language: { - type: GraphQLString, - description: 'The media type of the language for the expression.', - }, - _language: { - type: require('./element.schema'), - description: 'The media type of the language for the expression.', - }, - expression: { - type: GraphQLString, - description: - 'An expression specifying the value of the customized element.', - }, - _expression: { - type: require('./element.schema'), - description: - 'An expression specifying the value of the customized element.', - }, - }), + name: 'PlanDefinitionactiondynamicValue', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A brief, natural language description of the intended semantics of the dynamic value.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the intended semantics of the dynamic value.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', + }, + path: { + type: GraphQLString, + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: GraphQLString, + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'An expression specifying the value of the customized element.', + }, + expression: { + type: GraphQLString, + description: + 'An expression specifying the value of the customized element.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/plandefinitionactionparticipant.schema.js b/src/resources/3_0_1/schemas/plandefinitionactionparticipant.schema.js index 26e3eb0a..5ae8d857 100644 --- a/src/resources/3_0_1/schemas/plandefinitionactionparticipant.schema.js +++ b/src/resources/3_0_1/schemas/plandefinitionactionparticipant.schema.js @@ -1,32 +1,53 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary PlanDefinition.action.participant Schema + * @summary PlanDefinitionactionparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'PlanDefinitionActionParticipant', - description: - 'Indicates who should participate in performing the action described.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-participant-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of participant in the action.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of participant in the action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-participant-role - role: { - type: require('./codeableconcept.schema'), - description: - 'The role the participant should play in performing the described action.', - }, - }), + name: 'PlanDefinitionactionparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of participant in the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-participant-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant in the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-participant-role + role: { + type: require('./codeableconcept.schema.js'), + description: + 'The role the participant should play in performing the described action.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/plandefinitionactionrelatedaction.schema.js b/src/resources/3_0_1/schemas/plandefinitionactionrelatedaction.schema.js index 2737ab09..000f1ced 100644 --- a/src/resources/3_0_1/schemas/plandefinitionactionrelatedaction.schema.js +++ b/src/resources/3_0_1/schemas/plandefinitionactionrelatedaction.schema.js @@ -1,45 +1,66 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary PlanDefinition.action.relatedAction Schema + * @summary PlanDefinitionactionrelatedAction Schema */ module.exports = new GraphQLObjectType({ - name: 'PlanDefinitionActionRelatedAction', - description: - "A relationship to another action such as 'before' or '30-60 minutes after start of'.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - actionId: { - type: new GraphQLNonNull(IdScalar), - description: 'The element id of the related action.', - }, - _actionId: { - type: require('./element.schema'), - description: 'The element id of the related action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-relationship-type - relationship: { - type: new GraphQLNonNull(CodeScalar), - description: 'The relationship of this action to the related action.', - }, - _relationship: { - type: require('./element.schema'), - description: 'The relationship of this action to the related action.', - }, - offsetDuration: { - type: require('./duration.schema'), - description: - 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', - }, - offsetRange: { - type: require('./range.schema'), - description: - 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', - }, - }), + name: 'PlanDefinitionactionrelatedAction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _actionId: { + type: require('./element.schema.js'), + description: 'The element id of the related action.', + }, + actionId: { + type: new GraphQLNonNull(IdScalar), + description: 'The element id of the related action.', + }, + _relationship: { + type: require('./element.schema.js'), + description: 'The relationship of this action to the related action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-relationship-type + relationship: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relationship of this action to the related action.', + }, + offsetDuration: { + type: require('./duration.schema.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + offsetRange: { + type: require('./range.schema.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/plandefinitiongoal.schema.js b/src/resources/3_0_1/schemas/plandefinitiongoal.schema.js index 4550b35c..6dce7fa6 100644 --- a/src/resources/3_0_1/schemas/plandefinitiongoal.schema.js +++ b/src/resources/3_0_1/schemas/plandefinitiongoal.schema.js @@ -1,54 +1,74 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary PlanDefinition.goal Schema + * @summary PlanDefinitiongoal Schema */ module.exports = new GraphQLObjectType({ - name: 'PlanDefinitionGoal', - description: - 'Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-category - category: { - type: require('./codeableconcept.schema'), - description: 'Indicates a category the goal falls within.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - description: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-priority - priority: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the expected level of importance associated with reaching/sustaining the defined goal.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event - start: { - type: require('./codeableconcept.schema'), - description: - 'The event after which the goal should begin being pursued.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - addresses: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Identifies problems, conditions, issues, or concerns the goal is intended to address.', - }, - documentation: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: - 'Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.', - }, - target: { - type: new GraphQLList(require('./plandefinitiongoaltarget.schema')), - description: 'Indicates what should be done and within what timeframe.', - }, - }), + name: 'PlanDefinitiongoal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-category + category: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates a category the goal falls within.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + description: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-priority + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the expected level of importance associated with reaching/sustaining the defined goal.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/goal-start-event + start: { + type: require('./codeableconcept.schema.js'), + description: 'The event after which the goal should begin being pursued.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + addresses: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies problems, conditions, issues, or concerns the goal is intended to address.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.', + }, + target: { + type: new GraphQLList(require('./plandefinitiongoaltarget.schema.js')), + description: 'Indicates what should be done and within what timeframe.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/plandefinitiongoaltarget.schema.js b/src/resources/3_0_1/schemas/plandefinitiongoaltarget.schema.js index 179db198..ae37622c 100644 --- a/src/resources/3_0_1/schemas/plandefinitiongoaltarget.schema.js +++ b/src/resources/3_0_1/schemas/plandefinitiongoaltarget.schema.js @@ -1,41 +1,58 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary PlanDefinition.goal.target Schema + * @summary PlanDefinitiongoaltarget Schema */ module.exports = new GraphQLObjectType({ - name: 'PlanDefinitionGoalTarget', - description: 'Indicates what should be done and within what timeframe.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-codes - measure: { - type: require('./codeableconcept.schema'), - description: - 'The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.', - }, - detailQuantity: { - type: require('./quantity.schema'), - description: - 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', - }, - detailRange: { - type: require('./range.schema'), - description: - 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', - }, - detailCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', - }, - due: { - type: require('./duration.schema'), - description: - 'Indicates the timeframe after the start of the goal in which the goal should be met.', - }, - }), + name: 'PlanDefinitiongoaltarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-codes + measure: { + type: require('./codeableconcept.schema.js'), + description: + 'The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.', + }, + detailQuantity: { + type: require('./quantity.schema.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + detailRange: { + type: require('./range.schema.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + detailCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + due: { + type: require('./duration.schema.js'), + description: + 'Indicates the timeframe after the start of the goal in which the goal should be met.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/practitioner.schema.js b/src/resources/3_0_1/schemas/practitioner.schema.js index c734db6c..f8c21cff 100644 --- a/src/resources/3_0_1/schemas/practitioner.schema.js +++ b/src/resources/3_0_1/schemas/practitioner.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PractitionerResourceType = new GraphQLEnumType({ - name: 'PractitionerResourceType', - values: { - Practitioner: { value: 'Practitioner' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,71 +17,129 @@ let PractitionerResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Practitioner', - description: 'Base StructureDefinition for Practitioner Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PractitionerResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'An identifier that applies to this person in this role.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this practitioner's record is in active use.", - }, - _active: { - type: require('./element.schema'), - description: "Whether this practitioner's record is in active use.", - }, - name: { - type: new GraphQLList(require('./humanname.schema')), - description: 'The name(s) associated with the practitioner.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail for the practitioner, e.g. a telephone number or an email address.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: - 'Address(es) of the practitioner that are not role specific (typically home address). Work addresses are not typically entered in this property as they are usually role dependent.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date of birth for the practitioner.', - }, - _birthDate: { - type: require('./element.schema'), - description: 'The date of birth for the practitioner.', - }, - photo: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Image of the person.', - }, - qualification: { - type: new GraphQLList(require('./practitionerqualification.schema')), - description: 'Qualifications obtained by training and certification.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - communication: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A language the practitioner is able to use in patient communication.', - }, - }), + description: 'Base StructureDefinition for Practitioner Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Practitioner_Enum_schema', + values: { Practitioner: { value: 'Practitioner' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'An identifier that applies to this person in this role.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether this practitioner's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this practitioner's record is in active use.", + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'The name(s) associated with the practitioner.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the practitioner, e.g. a telephone number or an email address.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: + 'Address(es) of the practitioner that are not role specific (typically home address). Work addresses are not typically entered in this property as they are usually role dependent.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date of birth for the practitioner.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the practitioner.', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the person.', + }, + qualification: { + type: new GraphQLList(require('./practitionerqualification.schema.js')), + description: 'Qualifications obtained by training and certification.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + communication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A language the practitioner is able to use in patient communication.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/practitionerqualification.schema.js b/src/resources/3_0_1/schemas/practitionerqualification.schema.js index e30ea117..1f604ace 100644 --- a/src/resources/3_0_1/schemas/practitionerqualification.schema.js +++ b/src/resources/3_0_1/schemas/practitionerqualification.schema.js @@ -1,34 +1,66 @@ -const { GraphQLObjectType, GraphQLList, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Practitioner.qualification Schema + * @summary Practitionerqualification Schema */ module.exports = new GraphQLObjectType({ - name: 'PractitionerQualification', - description: 'Qualifications obtained by training and certification.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - "An identifier that applies to this person's qualification in this role.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-2.7-0360 - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Coded representation of the qualification.', - }, - period: { - type: require('./period.schema'), - description: 'Period during which the qualification is valid.', - }, - issuer: { - type: require('./reference.schema'), + name: 'Practitionerqualification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.schema.js')), + description: + "An identifier that applies to this person's qualification in this role.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-2.7-0360 + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Coded representation of the qualification.', + }, + period: { + type: require('./period.schema.js'), + description: 'Period during which the qualification is valid.', + }, + issuer: { + type: new GraphQLUnionType({ + name: 'Practitionerqualificationissuer_issuer_Union', description: 'Organization that regulates and issues the qualification.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that regulates and issues the qualification.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/practitionerrole.schema.js b/src/resources/3_0_1/schemas/practitionerrole.schema.js index 79f16b70..69d6ed5d 100644 --- a/src/resources/3_0_1/schemas/practitionerrole.schema.js +++ b/src/resources/3_0_1/schemas/practitionerrole.schema.js @@ -1,20 +1,15 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let PractitionerRoleResourceType = new GraphQLEnumType({ - name: 'PractitionerRoleResourceType', - values: { - PractitionerRole: { value: 'PractitionerRole' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,93 +17,206 @@ let PractitionerRoleResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'PractitionerRole', - description: 'Base StructureDefinition for PractitionerRole Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(PractitionerRoleResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Business Identifiers that are specific to a role/location.', - }, - active: { - type: GraphQLBoolean, - description: "Whether this practitioner's record is in active use.", - }, - _active: { - type: require('./element.schema'), - description: "Whether this practitioner's record is in active use.", - }, - period: { - type: require('./period.schema'), - description: - 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', - }, - practitioner: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for PractitionerRole Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PractitionerRole_Enum_schema', + values: { PractitionerRole: { value: 'PractitionerRole' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Business Identifiers that are specific to a role/location.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether this practitioner's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this practitioner's record is in active use.", + }, + period: { + type: require('./period.schema.js'), + description: + 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', + }, + practitioner: { + type: new GraphQLUnionType({ + name: 'PractitionerRolepractitioner_practitioner_Union', description: 'Practitioner that is able to provide the defined services for the organation.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Practitioner that is able to provide the defined services for the organation.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'PractitionerRoleorganization_organization_Union', description: 'The organization where the Practitioner performs the roles associated.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-role - code: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Roles which this practitioner is authorized to perform for the organization.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Specific specialty of the practitioner.', - }, - location: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The location(s) at which this practitioner provides care.', - }, - healthcareService: { - type: new GraphQLList(require('./reference.schema')), - description: - "The list of healthcare services that this worker provides for this role's Organization/Location(s).", - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details that are specific to the role/location/service.', - }, - availableTime: { - type: new GraphQLList( - require('./practitionerroleavailabletime.schema'), - ), - description: - 'A collection of times that the Service Site is available.', - }, - notAvailable: { - type: new GraphQLList(require('./practitionerrolenotavailable.schema')), - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - }, - availabilityExceptions: { - type: GraphQLString, - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - _availabilityExceptions: { - type: require('./element.schema'), - description: - 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', - }, - endpoint: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Technical endpoints providing access to services operated for the practitioner with this role.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization where the Practitioner performs the roles associated.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-role + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Roles which this practitioner is authorized to perform for the organization.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Specific specialty of the practitioner.', + }, + location: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PractitionerRolelocation_location_Union', + description: + 'The location(s) at which this practitioner provides care.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: 'The location(s) at which this practitioner provides care.', + }, + healthcareService: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PractitionerRolehealthcareService_healthcareService_Union', + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + types: () => [require('./healthcareservice.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details that are specific to the role/location/service.', + }, + availableTime: { + type: new GraphQLList( + require('./practitionerroleavailabletime.schema.js'), + ), + description: 'A collection of times that the Service Site is available.', + }, + notAvailable: { + type: new GraphQLList( + require('./practitionerrolenotavailable.schema.js'), + ), + description: + 'The HealthcareService is not available during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.schema.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PractitionerRoleendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for the practitioner with this role.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for the practitioner with this role.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/practitionerroleavailabletime.schema.js b/src/resources/3_0_1/schemas/practitionerroleavailabletime.schema.js index c5207b13..61401e1f 100644 --- a/src/resources/3_0_1/schemas/practitionerroleavailabletime.schema.js +++ b/src/resources/3_0_1/schemas/practitionerroleavailabletime.schema.js @@ -1,58 +1,80 @@ -const CodeScalar = require('../scalars/code.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary PractitionerRole.availableTime Schema + * @summary PractitionerRoleavailableTime Schema */ module.exports = new GraphQLObjectType({ - name: 'PractitionerRoleAvailableTime', - description: 'A collection of times that the Service Site is available.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/days-of-week - daysOfWeek: { - type: new GraphQLList(CodeScalar), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - _daysOfWeek: { - type: require('./element.schema'), - description: - 'Indicates which days of the week are available between the start and end Times.', - }, - allDay: { - type: GraphQLBoolean, - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - _allDay: { - type: require('./element.schema'), - description: - 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', - }, - availableStartTime: { - type: TimeScalar, - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableStartTime: { - type: require('./element.schema'), - description: - 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - availableEndTime: { - type: TimeScalar, - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - _availableEndTime: { - type: require('./element.schema'), - description: - 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', - }, - }), + name: 'PractitionerRoleavailableTime', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _daysOfWeek: { + type: require('./element.schema.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/days-of-week + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.schema.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.schema.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.schema.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/practitionerrolenotavailable.schema.js b/src/resources/3_0_1/schemas/practitionerrolenotavailable.schema.js index 95d80a2a..1afdd4cf 100644 --- a/src/resources/3_0_1/schemas/practitionerrolenotavailable.schema.js +++ b/src/resources/3_0_1/schemas/practitionerrolenotavailable.schema.js @@ -1,31 +1,52 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary PractitionerRole.notAvailable Schema + * @summary PractitionerRolenotAvailable Schema */ module.exports = new GraphQLObjectType({ - name: 'PractitionerRoleNotAvailable', - description: - 'The HealthcareService is not available during this period of time due to the provided reason.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - _description: { - type: require('./element.schema'), - description: - 'The reason that can be presented to the user as to why this time is not available.', - }, - during: { - type: require('./period.schema'), - description: - 'Service is not available (seasonally or for a public holiday) from this date.', - }, - }), + name: 'PractitionerRolenotAvailable', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.schema.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/procedure.schema.js b/src/resources/3_0_1/schemas/procedure.schema.js index 9be57736..443159fe 100644 --- a/src/resources/3_0_1/schemas/procedure.schema.js +++ b/src/resources/3_0_1/schemas/procedure.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcedureResourceType = new GraphQLEnumType({ - name: 'ProcedureResourceType', - values: { - Procedure: { value: 'Procedure' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,169 +17,400 @@ let ProcedureResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Procedure', - description: 'Base StructureDefinition for Procedure Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProcedureResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this procedure.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A reference to a resource that contains details of the request for this procedure.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A larger event of which this particular procedure is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', - }, - _status: { - type: require('./element.schema'), - description: - 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', - }, - notDone: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the procedure was NOT performed.', - }, - _notDone: { - type: require('./element.schema'), - description: - 'Set this to true if the record is saying that the procedure was NOT performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-not-performed-reason - notDoneReason: { - type: require('./codeableconcept.schema'), - description: 'A code indicating why the procedure was not performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-category - category: { - type: require('./codeableconcept.schema'), - description: - "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: require('./codeableconcept.schema'), - description: - "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The person, animal or group on which the procedure was performed.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Procedure Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Procedure_Enum_schema', + values: { Procedure: { value: 'Procedure' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Proceduredefinition_definition_Union', + description: + 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this procedure.', + types: () => [ + require('./plandefinition.schema.js'), + require('./activitydefinition.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: + 'A protocol, guideline, orderset or other definition that was adhered to in whole or in part by this procedure.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedurebasedOn_basedOn_Union', + description: + 'A reference to a resource that contains details of the request for this procedure.', + types: () => [ + require('./careplan.schema.js'), + require('./procedurerequest.schema.js'), + require('./referralrequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'A reference to a resource that contains details of the request for this procedure.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedurepartOf_partOf_Union', + description: + 'A larger event of which this particular procedure is a component or step.', + types: () => [ + require('./procedure.schema.js'), + require('./observation.schema.js'), + require('./medicationadministration.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular procedure is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the state of the procedure. Generally this will be in-progress or completed state.', + }, + _notDone: { + type: require('./element.schema.js'), + description: + 'Set this to true if the record is saying that the procedure was NOT performed.', + }, + notDone: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the procedure was NOT performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-not-performed-reason + notDoneReason: { + type: require('./codeableconcept.schema.js'), + description: 'A code indicating why the procedure was not performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-category + category: { + type: require('./codeableconcept.schema.js'), + description: + "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: require('./codeableconcept.schema.js'), + description: + "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Proceduresubject_subject_Union', + description: + 'The person, animal or group on which the procedure was performed.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The person, animal or group on which the procedure was performed.', + }, + context: { + type: new GraphQLUnionType({ + name: 'Procedurecontext_context_Union', description: 'The encounter during which the procedure was performed.', - }, - performedDateTime: { - type: DateTimeScalar, - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - _performedDateTime: { - type: require('./element.schema'), - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - performedPeriod: { - type: require('./period.schema'), - description: - 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', - }, - performer: { - type: new GraphQLList(require('./procedureperformer.schema')), - description: "Limited to 'real' people rather than equipment.", - }, - location: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: 'The encounter during which the procedure was performed.', + }, + _performedDateTime: { + type: require('./element.schema.js'), + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedDateTime: { + type: DateTimeScalar, + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedPeriod: { + type: require('./period.schema.js'), + description: + 'The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performer: { + type: new GraphQLList(require('./procedureperformer.schema.js')), + description: "Limited to 'real' people rather than equipment.", + }, + location: { + type: new GraphQLUnionType({ + name: 'Procedurelocation_location_Union', description: 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The coded reason why the procedure was performed. This may be coded entity of some type, or may simply be present as text.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The condition that is the reason why the procedure was performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: - 'The outcome of the procedure - did it resolve reasons for the procedure being performed?.', - }, - report: { - type: new GraphQLList(require('./reference.schema')), - description: - 'This could be a histology result, pathology report, surgical report, etc..', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/condition-code - complication: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", - }, - complicationDetail: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Any complications that occurred during the procedure, or in the immediate post-performance period.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-followup - followUp: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Any other notes about the procedure. E.g. the operative notes.', - }, - focalDevice: { - type: new GraphQLList(require('./procedurefocaldevice.schema')), - description: - 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', - }, - usedReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Identifies medications, devices and any other substance used as part of the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-kind - usedCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Identifies coded items that were used as part of the procedure.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The coded reason why the procedure was performed. This may be coded entity of some type, or may simply be present as text.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedurereasonReference_reasonReference_Union', + description: + 'The condition that is the reason why the procedure was performed.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'The condition that is the reason why the procedure was performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: + 'The outcome of the procedure - did it resolve reasons for the procedure being performed?', + }, + report: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Procedurereport_report_Union', + description: + 'This could be a histology result, pathology report, surgical report, etc..', + types: () => [require('./diagnosticreport.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + }, + }), + ), + description: + 'This could be a histology result, pathology report, surgical report, etc..', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/condition-code + complication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", + }, + complicationDetail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedurecomplicationDetail_complicationDetail_Union', + description: + 'Any complications that occurred during the procedure, or in the immediate post-performance period.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Any complications that occurred during the procedure, or in the immediate post-performance period.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-followup + followUp: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Any other notes about the procedure. E.g. the operative notes.', + }, + focalDevice: { + type: new GraphQLList(require('./procedurefocaldevice.schema.js')), + description: + 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', + }, + usedReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureusedReference_usedReference_Union', + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + types: () => [ + require('./device.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-kind + usedCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies coded items that were used as part of the procedure.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/procedurefocaldevice.schema.js b/src/resources/3_0_1/schemas/procedurefocaldevice.schema.js index e9b0cc7e..d2bde702 100644 --- a/src/resources/3_0_1/schemas/procedurefocaldevice.schema.js +++ b/src/resources/3_0_1/schemas/procedurefocaldevice.schema.js @@ -1,27 +1,61 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Procedure.focalDevice Schema + * @summary ProcedurefocalDevice Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcedureFocalDevice', - description: - 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/device-action - action: { - type: require('./codeableconcept.schema'), - description: - 'The kind of change that happened to the device during the procedure.', - }, - manipulated: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device that was manipulated (changed) during the procedure.', - }, - }), + name: 'ProcedurefocalDevice', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/device-action + action: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of change that happened to the device during the procedure.', + }, + manipulated: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ProcedurefocalDevicemanipulated_manipulated_Union', + description: + 'The device that was manipulated (changed) during the procedure.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The device that was manipulated (changed) during the procedure.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/procedureperformer.schema.js b/src/resources/3_0_1/schemas/procedureperformer.schema.js index 107ba487..0b2e48d2 100644 --- a/src/resources/3_0_1/schemas/procedureperformer.schema.js +++ b/src/resources/3_0_1/schemas/procedureperformer.schema.js @@ -1,29 +1,91 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Procedure.performer Schema + * @summary Procedureperformer Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcedurePerformer', - description: "Limited to 'real' people rather than equipment.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/performer-role - role: { - type: require('./codeableconcept.schema'), - description: 'For example: surgeon, anaethetist, endoscopist.', - }, - actor: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The practitioner who was involved in the procedure.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'Procedureperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/performer-role + role: { + type: require('./codeableconcept.schema.js'), + description: 'For example: surgeon, anaethetist, endoscopist.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Procedureperformeractor_actor_Union', + description: 'The practitioner who was involved in the procedure.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The practitioner who was involved in the procedure.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'ProcedureperformeronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/procedurerequest.schema.js b/src/resources/3_0_1/schemas/procedurerequest.schema.js index 4aa88356..5e2f63ec 100644 --- a/src/resources/3_0_1/schemas/procedurerequest.schema.js +++ b/src/resources/3_0_1/schemas/procedurerequest.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcedureRequestResourceType = new GraphQLEnumType({ - name: 'ProcedureRequestResourceType', - values: { - ProcedureRequest: { value: 'ProcedureRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,195 +17,420 @@ let ProcedureRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ProcedureRequest', - description: 'Base StructureDefinition for ProcedureRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProcedureRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: 'Protocol or definition followed by this request.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: 'Plan/proposal/order fulfilled by this request.', - }, - replaces: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The request takes the place of the referenced completed or terminated request(s).', - }, - requisition: { - type: require('./identifier.schema'), - description: - 'A shared identifier common to all procedure or diagnostic requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The status of the order.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Whether the request is a proposal, plan, an original order or a reflex order.', - }, - _intent: { - type: require('./element.schema'), - description: - 'Whether the request is a proposal, plan, an original order or a reflex order.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the ProcedureRequest should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.schema'), - description: - 'Indicates how quickly the ProcedureRequest should be addressed with respect to other requests.', - }, - doNotPerform: { - type: GraphQLBoolean, - description: - 'Set this to true if the record is saying that the procedure should NOT be performed.', - }, - _doNotPerform: { - type: require('./element.schema'), - description: - 'Set this to true if the record is saying that the procedure should NOT be performed.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'A code that identifies a particular procedure, diagnostic investigation, or panel of investigations, that have been requested.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'On whom or what the procedure or diagnostic is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ProcedureRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcedureRequest_Enum_schema', + values: { ProcedureRequest: { value: 'ProcedureRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureRequestdefinition_definition_Union', + description: 'Protocol or definition followed by this request.', + types: () => [ + require('./activitydefinition.schema.js'), + require('./plandefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + }, + }), + ), + description: 'Protocol or definition followed by this request.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureRequestbasedOn_basedOn_Union', + description: 'Plan/proposal/order fulfilled by this request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Plan/proposal/order fulfilled by this request.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureRequestreplaces_replaces_Union', + description: + 'The request takes the place of the referenced completed or terminated request(s).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The request takes the place of the referenced completed or terminated request(s).', + }, + requisition: { + type: require('./identifier.schema.js'), + description: + 'A shared identifier common to all procedure or diagnostic requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the order.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the ProcedureRequest should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the ProcedureRequest should be addressed with respect to other requests.', + }, + _doNotPerform: { + type: require('./element.schema.js'), + description: + 'Set this to true if the record is saying that the procedure should NOT be performed.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the procedure should NOT be performed.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code that identifies a particular procedure, diagnostic investigation, or panel of investigations, that have been requested.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ProcedureRequestsubject_subject_Union', + description: + 'On whom or what the procedure or diagnostic is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'On whom or what the procedure or diagnostic is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + }, + context: { + type: new GraphQLUnionType({ + name: 'ProcedureRequestcontext_context_Union', description: 'An encounter or episode of care that provides additional information about the healthcare context in which this request is made.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - 'The date/time at which the diagnostic testing should occur.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: - 'The date/time at which the diagnostic testing should occur.', - }, - occurrencePeriod: { - type: require('./period.schema'), - description: - 'The date/time at which the diagnostic testing should occur.', - }, - occurrenceTiming: { - type: require('./timing.schema'), - description: - 'The date/time at which the diagnostic testing should occur.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason - asNeededBoolean: { - type: GraphQLBoolean, - description: - "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", - }, - _asNeededBoolean: { - type: require('./element.schema'), - description: - "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason - asNeededCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", - }, - authoredOn: { - type: DateTimeScalar, - description: 'When the request transitioned to being actionable.', - }, - _authoredOn: { - type: require('./element.schema'), - description: 'When the request transitioned to being actionable.', - }, - requester: { - type: require('./procedurerequestrequester.schema'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/participant-role - performerType: { - type: require('./codeableconcept.schema'), - description: - 'Desired type of performer for doing the diagnostic testing.', - }, - performer: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'An encounter or episode of care that provides additional information about the healthcare context in which this request is made.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: + 'The date/time at which the diagnostic testing should occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'The date/time at which the diagnostic testing should occur.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: + 'The date/time at which the diagnostic testing should occur.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: + 'The date/time at which the diagnostic testing should occur.', + }, + _asNeededBoolean: { + type: require('./element.schema.js'), + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + asNeededBoolean: { + type: GraphQLBoolean, + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/medication-as-needed-reason + asNeededCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the procedure. For example 'pain', 'on flare-up', etc.", + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'When the request transitioned to being actionable.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request transitioned to being actionable.', + }, + requester: { + type: require('./procedurerequestrequester.schema.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/participant-role + performerType: { + type: require('./codeableconcept.schema.js'), + description: + 'Desired type of performer for doing the diagnostic testing.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'ProcedureRequestperformer_performer_Union', description: 'The desired perfomer for doing the diagnostic testing. For example, the surgeon, dermatopathologist, endoscopist, etc.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'An explanation or justification for why this diagnostic investigation is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates another resource that provides a justification for why this diagnostic investigation is being requested. May relate to the resources referred to in supportingInformation.', - }, - supportingInfo: { - type: new GraphQLList(require('./reference.schema')), - description: - "Additional clinical information about the patient or specimen that may influence the procedure or diagnostics or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", - }, - specimen: { - type: new GraphQLList(require('./reference.schema')), - description: - 'One or more specimens that the laboratory procedure will use.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Anatomic location where the procedure should be performed. This is the target site.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - "Any other notes and comments made about the service request. For example, letting provider know that 'patient hates needles' or other provider instructions.", - }, - relevantHistory: { - type: new GraphQLList(require('./reference.schema')), - description: 'Key events in the history of the request.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + description: + 'The desired perfomer for doing the diagnostic testing. For example, the surgeon, dermatopathologist, endoscopist, etc.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/procedure-reason + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'An explanation or justification for why this diagnostic investigation is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in supportingInformation.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureRequestreasonReference_reasonReference_Union', + description: + 'Indicates another resource that provides a justification for why this diagnostic investigation is being requested. May relate to the resources referred to in supportingInformation.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource that provides a justification for why this diagnostic investigation is being requested. May relate to the resources referred to in supportingInformation.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureRequestsupportingInfo_supportingInfo_Union', + description: + "Additional clinical information about the patient or specimen that may influence the procedure or diagnostics or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Additional clinical information about the patient or specimen that may influence the procedure or diagnostics or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", + }, + specimen: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureRequestspecimen_specimen_Union', + description: + 'One or more specimens that the laboratory procedure will use.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'One or more specimens that the laboratory procedure will use.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Anatomic location where the procedure should be performed. This is the target site.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + "Any other notes and comments made about the service request. For example, letting provider know that 'patient hates needles' or other provider instructions.", + }, + relevantHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureRequestrelevantHistory_relevantHistory_Union', + description: 'Key events in the history of the request.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: 'Key events in the history of the request.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/procedurerequestrequester.schema.js b/src/resources/3_0_1/schemas/procedurerequestrequester.schema.js index a722b837..c57e4b5c 100644 --- a/src/resources/3_0_1/schemas/procedurerequestrequester.schema.js +++ b/src/resources/3_0_1/schemas/procedurerequestrequester.schema.js @@ -1,26 +1,80 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ProcedureRequest.requester Schema + * @summary ProcedureRequestrequester Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcedureRequestRequester', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - agent: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device, practitioner or organization who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'ProcedureRequestrequester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + agent: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ProcedureRequestrequesteragent_agent_Union', + description: + 'The device, practitioner or organization who initiated the request.', + types: () => [ + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The device, practitioner or organization who initiated the request.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'ProcedureRequestrequesteronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/processrequest.schema.js b/src/resources/3_0_1/schemas/processrequest.schema.js index c97d1092..b304cd57 100644 --- a/src/resources/3_0_1/schemas/processrequest.schema.js +++ b/src/resources/3_0_1/schemas/processrequest.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcessRequestResourceType = new GraphQLEnumType({ - name: 'ProcessRequestResourceType', - values: { - ProcessRequest: { value: 'ProcessRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,110 +18,217 @@ let ProcessRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ProcessRequest', - description: 'Base StructureDefinition for ProcessRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProcessRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The ProcessRequest business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/actionlist - action: { - type: CodeScalar, - description: - 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', - }, - _action: { - type: require('./element.schema'), - description: - 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', - }, - target: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ProcessRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcessRequest_Enum_schema', + values: { ProcessRequest: { value: 'ProcessRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The ProcessRequest business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _action: { + type: require('./element.schema.js'), + description: + 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/actionlist + action: { + type: CodeScalar, + description: + 'The type of processing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.', + }, + target: { + type: new GraphQLUnionType({ + name: 'ProcessRequesttarget_target_Union', description: 'The organization which is the target of the request.', - }, - created: { - type: DateTimeScalar, - description: 'The date when this resource was created.', - }, - _created: { - type: require('./element.schema'), - description: 'The date when this resource was created.', - }, - provider: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization which is the target of the request.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'ProcessRequestprovider_provider_Union', description: 'The practitioner who is responsible for the action specified in this request.', - }, - organization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the action specified in this request.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'ProcessRequestorganization_organization_Union', description: 'The organization which is responsible for the action speccified in this request.', - }, - request: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the action speccified in this request.', + }, + request: { + type: new GraphQLUnionType({ + name: 'ProcessRequestrequest_request_Union', description: 'Reference of resource which is the target or subject of this action.', - }, - response: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference of resource which is the target or subject of this action.', + }, + response: { + type: new GraphQLUnionType({ + name: 'ProcessRequestresponse_response_Union', description: 'Reference of a prior response to resource which is the target or subject of this action.', - }, - nullify: { - type: GraphQLBoolean, - description: 'If true remove all history excluding audit.', - }, - _nullify: { - type: require('./element.schema'), - description: 'If true remove all history excluding audit.', - }, - reference: { - type: GraphQLString, - description: 'A reference to supply which authenticates the process.', - }, - _reference: { - type: require('./element.schema'), - description: 'A reference to supply which authenticates the process.', - }, - item: { - type: new GraphQLList(require('./processrequestitem.schema')), - description: - 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', - }, - include: { - type: new GraphQLList(GraphQLString), - description: 'Names of resource types to include.', - }, - _include: { - type: require('./element.schema'), - description: 'Names of resource types to include.', - }, - exclude: { - type: new GraphQLList(GraphQLString), - description: 'Names of resource types to exclude.', - }, - _exclude: { - type: require('./element.schema'), - description: 'Names of resource types to exclude.', - }, - period: { - type: require('./period.schema'), - description: - 'A period of time during which the fulfilling resources would have been created.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference of a prior response to resource which is the target or subject of this action.', + }, + _nullify: { + type: require('./element.schema.js'), + description: 'If true remove all history excluding audit.', + }, + nullify: { + type: GraphQLBoolean, + description: 'If true remove all history excluding audit.', + }, + _reference: { + type: require('./element.schema.js'), + description: 'A reference to supply which authenticates the process.', + }, + reference: { + type: GraphQLString, + description: 'A reference to supply which authenticates the process.', + }, + item: { + type: new GraphQLList(require('./processrequestitem.schema.js')), + description: + 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', + }, + _include: { + type: require('./element.schema.js'), + description: 'Names of resource types to include.', + }, + include: { + type: new GraphQLList(GraphQLString), + description: 'Names of resource types to include.', + }, + _exclude: { + type: require('./element.schema.js'), + description: 'Names of resource types to exclude.', + }, + exclude: { + type: new GraphQLList(GraphQLString), + description: 'Names of resource types to exclude.', + }, + period: { + type: require('./period.schema.js'), + description: + 'A period of time during which the fulfilling resources would have been created.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/processrequestitem.schema.js b/src/resources/3_0_1/schemas/processrequestitem.schema.js index 38e61031..441434ed 100644 --- a/src/resources/3_0_1/schemas/processrequestitem.schema.js +++ b/src/resources/3_0_1/schemas/processrequestitem.schema.js @@ -1,24 +1,46 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLInt } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ProcessRequest.item Schema + * @summary ProcessRequestitem Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcessRequestItem', - description: - 'List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - sequenceLinkId: { - type: new GraphQLNonNull(GraphQLInt), - description: 'A service line number.', - }, - _sequenceLinkId: { - type: require('./element.schema'), - description: 'A service line number.', - }, - }), + name: 'ProcessRequestitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _sequenceLinkId: { + type: require('./element.schema.js'), + description: 'A service line number.', + }, + sequenceLinkId: { + type: new GraphQLNonNull(GraphQLInt), + description: 'A service line number.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/processresponse.schema.js b/src/resources/3_0_1/schemas/processresponse.schema.js index f4d7915b..510ebacc 100644 --- a/src/resources/3_0_1/schemas/processresponse.schema.js +++ b/src/resources/3_0_1/schemas/processresponse.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProcessResponseResourceType = new GraphQLEnumType({ - name: 'ProcessResponseResourceType', - values: { - ProcessResponse: { value: 'ProcessResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,88 +17,197 @@ let ProcessResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ProcessResponse', - description: 'Base StructureDefinition for ProcessResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProcessResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The Response business identifier.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - created: { - type: DateTimeScalar, - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - _created: { - type: require('./element.schema'), - description: - 'The date when the enclosed suite of services were performed or completed.', - }, - organization: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ProcessResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ProcessResponse_Enum_schema', + values: { ProcessResponse: { value: 'ProcessResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'ProcessResponseorganization_organization_Union', description: 'The organization who produced this adjudicated response.', - }, - request: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization who produced this adjudicated response.', + }, + request: { + type: new GraphQLUnionType({ + name: 'ProcessResponserequest_request_Union', description: 'Original request resource reference.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/process-outcome - outcome: { - type: require('./codeableconcept.schema'), - description: 'Transaction status: error, complete, held.', - }, - disposition: { - type: GraphQLString, - description: - 'A description of the status of the adjudication or processing.', - }, - _disposition: { - type: require('./element.schema'), - description: - 'A description of the status of the adjudication or processing.', - }, - requestProvider: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/process-outcome + outcome: { + type: require('./codeableconcept.schema.js'), + description: 'Transaction status: error, complete, held.', + }, + _disposition: { + type: require('./element.schema.js'), + description: + 'A description of the status of the adjudication or processing.', + }, + disposition: { + type: GraphQLString, + description: + 'A description of the status of the adjudication or processing.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'ProcessResponserequestProvider_requestProvider_Union', description: 'The practitioner who is responsible for the services rendered to the patient.', - }, - requestOrganization: { - type: require('./reference.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + requestOrganization: { + type: new GraphQLUnionType({ + name: 'ProcessResponserequestOrganization_requestOrganization_Union', description: 'The organization which is responsible for the services rendered to the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/forms - form: { - type: require('./codeableconcept.schema'), - description: 'The form to be used for printing the content.', - }, - processNote: { - type: new GraphQLList(require('./processresponseprocessnote.schema')), - description: - 'Suite of processing notes or additional requirements if the processing has been held.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error - error: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'Processing errors.', - }, - communicationRequest: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Request for additional supporting or authorizing information, such as: documents, images or resources.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization which is responsible for the services rendered to the patient.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/forms + form: { + type: require('./codeableconcept.schema.js'), + description: 'The form to be used for printing the content.', + }, + processNote: { + type: new GraphQLList(require('./processresponseprocessnote.schema.js')), + description: + 'Suite of processing notes or additional requirements if the processing has been held.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/adjudication-error + error: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Processing errors.', + }, + communicationRequest: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ProcessResponsecommunicationRequest_communicationRequest_Union', + description: + 'Request for additional supporting or authorizing information, such as: documents, images or resources.', + types: () => [require('./communicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + }, + }), + ), + description: + 'Request for additional supporting or authorizing information, such as: documents, images or resources.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/processresponseprocessnote.schema.js b/src/resources/3_0_1/schemas/processresponseprocessnote.schema.js index fb982815..c0670c8f 100644 --- a/src/resources/3_0_1/schemas/processresponseprocessnote.schema.js +++ b/src/resources/3_0_1/schemas/processresponseprocessnote.schema.js @@ -1,29 +1,45 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary ProcessResponse.processNote Schema + * @summary ProcessResponseprocessNote Schema */ module.exports = new GraphQLObjectType({ - name: 'ProcessResponseProcessNote', - description: - 'Suite of processing notes or additional requirements if the processing has been held.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/note-type - type: { - type: require('./codeableconcept.schema'), - description: 'The note purpose: Print/Display.', - }, - text: { - type: GraphQLString, - description: 'The note text.', - }, - _text: { - type: require('./element.schema'), - description: 'The note text.', - }, - }), + name: 'ProcessResponseprocessNote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/note-type + type: { + type: require('./codeableconcept.schema.js'), + description: 'The note purpose: Print/Display.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The note text.', + }, + text: { + type: GraphQLString, + description: 'The note text.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/provenance.schema.js b/src/resources/3_0_1/schemas/provenance.schema.js index 35bece92..b7167cc9 100644 --- a/src/resources/3_0_1/schemas/provenance.schema.js +++ b/src/resources/3_0_1/schemas/provenance.schema.js @@ -1,21 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ProvenanceResourceType = new GraphQLEnumType({ - name: 'ProvenanceResourceType', - values: { - Provenance: { value: 'Provenance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,72 +16,151 @@ let ProvenanceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Provenance', - description: 'Base StructureDefinition for Provenance Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ProvenanceResourceType), - description: 'Type of this resource.', - }, - target: { - type: new GraphQLList( - new GraphQLNonNull(require('./reference.schema')), + description: 'Base StructureDefinition for Provenance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Provenance_Enum_schema', + values: { Provenance: { value: 'Provenance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + target: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Provenancetarget_target_Union', + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), ), - description: - 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', - }, - period: { - type: require('./period.schema'), - description: 'The period during which the activity occurred.', - }, - recorded: { - type: new GraphQLNonNull(InstantScalar), - description: 'The instant of time at which the activity was recorded.', - }, - _recorded: { - type: require('./element.schema'), - description: 'The instant of time at which the activity was recorded.', - }, - policy: { - type: new GraphQLList(UriScalar), - description: - 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', - }, - _policy: { - type: require('./element.schema'), - description: - 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', - }, - location: { - type: require('./reference.schema'), + ), + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + }, + period: { + type: require('./period.schema.js'), + description: 'The period during which the activity occurred.', + }, + _recorded: { + type: require('./element.schema.js'), + description: 'The instant of time at which the activity was recorded.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The instant of time at which the activity was recorded.', + }, + _policy: { + type: require('./element.schema.js'), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Provenancelocation_location_Union', description: 'Where the activity occurred, if relevant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse - reason: { - type: new GraphQLList(require('./coding.schema')), - description: 'The reason that the activity was taking place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/provenance-activity-type - activity: { - type: require('./coding.schema'), - description: - 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', - }, - agent: { - type: new GraphQLList( - new GraphQLNonNull(require('./provenanceagent.schema')), - ), - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - }, - entity: { - type: new GraphQLList(require('./provenanceentity.schema')), - description: 'An entity used in this activity.', - }, - signature: { - type: new GraphQLList(require('./signature.schema')), - description: - 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the activity occurred, if relevant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-PurposeOfUse + reason: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'The reason that the activity was taking place.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provenance-activity-type + activity: { + type: require('./coding.schema.js'), + description: + 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', + }, + agent: { + type: new GraphQLList( + new GraphQLNonNull(require('./provenanceagent.schema.js')), + ), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + entity: { + type: new GraphQLList(require('./provenanceentity.schema.js')), + description: 'An entity used in this activity.', + }, + signature: { + type: new GraphQLList(require('./signature.schema.js')), + description: + 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/provenanceagent.schema.js b/src/resources/3_0_1/schemas/provenanceagent.schema.js index 1479ca31..e1f00ce4 100644 --- a/src/resources/3_0_1/schemas/provenanceagent.schema.js +++ b/src/resources/3_0_1/schemas/provenanceagent.schema.js @@ -1,58 +1,138 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLList, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Provenance.agent Schema + * @summary Provenanceagent Schema */ module.exports = new GraphQLObjectType({ - name: 'ProvenanceAgent', - description: - 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/security-role-type - role: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.', - }, - whoUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The individual, device or organization that participated in the event.', - }, - _whoUri: { - type: require('./element.schema'), - description: - 'The individual, device or organization that participated in the event.', - }, - whoReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The individual, device or organization that participated in the event.', - }, - onBehalfOfUri: { - type: UriScalar, - description: - 'The individual, device, or organization for whom the change was made.', - }, - _onBehalfOfUri: { - type: require('./element.schema'), - description: - 'The individual, device, or organization for whom the change was made.', - }, - onBehalfOfReference: { - type: require('./reference.schema'), + name: 'Provenanceagent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/security-role-type + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.', + }, + _whoUri: { + type: require('./element.schema.js'), + description: + 'The individual, device or organization that participated in the event.', + }, + whoUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The individual, device or organization that participated in the event.', + }, + whoReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ProvenanceagentwhoReference_whoReference_Union', + description: + 'The individual, device or organization that participated in the event.', + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The individual, device or organization that participated in the event.', + }, + _onBehalfOfUri: { + type: require('./element.schema.js'), + description: + 'The individual, device, or organization for whom the change was made.', + }, + onBehalfOfUri: { + type: UriScalar, + description: + 'The individual, device, or organization for whom the change was made.', + }, + onBehalfOfReference: { + type: new GraphQLUnionType({ + name: 'ProvenanceagentonBehalfOfReference_onBehalfOfReference_Union', description: 'The individual, device, or organization for whom the change was made.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v3-RoleLinkType - relatedAgentType: { - type: require('./codeableconcept.schema'), - description: 'The type of relationship between agents.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual, device, or organization for whom the change was made.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v3-RoleLinkType + relatedAgentType: { + type: require('./codeableconcept.schema.js'), + description: 'The type of relationship between agents.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/provenanceentity.schema.js b/src/resources/3_0_1/schemas/provenanceentity.schema.js index 25048641..e87247f4 100644 --- a/src/resources/3_0_1/schemas/provenanceentity.schema.js +++ b/src/resources/3_0_1/schemas/provenanceentity.schema.js @@ -1,46 +1,81 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Provenance.entity Schema + * @summary Provenanceentity Schema */ module.exports = new GraphQLObjectType({ - name: 'ProvenanceEntity', - description: 'An entity used in this activity.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/provenance-entity-role - role: { - type: new GraphQLNonNull(CodeScalar), - description: 'How the entity was used during the activity.', - }, - _role: { - type: require('./element.schema'), - description: 'How the entity was used during the activity.', - }, - whatUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - _whatUri: { - type: require('./element.schema'), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - whatReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - whatIdentifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: - 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', - }, - }), + name: 'Provenanceentity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _role: { + type: require('./element.schema.js'), + description: 'How the entity was used during the activity.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/provenance-entity-role + role: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the entity was used during the activity.', + }, + _whatUri: { + type: require('./element.schema.js'), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + whatUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + whatReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ProvenanceentitywhatReference_whatReference_Union', + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + whatIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/quantity.schema.js b/src/resources/3_0_1/schemas/quantity.schema.js index b16922e4..174a10f6 100644 --- a/src/resources/3_0_1/schemas/quantity.schema.js +++ b/src/resources/3_0_1/schemas/quantity.schema.js @@ -1,8 +1,11 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLFloat, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -10,57 +13,71 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Quantity', - description: 'Base StructureDefinition for Quantity Type.', - fields: () => - extendSchema(require('./element.schema'), { - value: { - type: GraphQLFloat, - description: - 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', - }, - _value: { - type: require('./element.schema'), - description: - 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator - comparator: { - type: CodeScalar, - description: - "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", - }, - _comparator: { - type: require('./element.schema'), - description: - "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", - }, - unit: { - type: GraphQLString, - description: 'A human-readable form of the unit.', - }, - _unit: { - type: require('./element.schema'), - description: 'A human-readable form of the unit.', - }, - system: { - type: UriScalar, - description: - 'The identification of the system that provides the coded form of the unit.', - }, - _system: { - type: require('./element.schema'), - description: - 'The identification of the system that provides the coded form of the unit.', - }, - code: { - type: CodeScalar, - description: - 'A computer processable form of the unit in some unit representation system.', - }, - _code: { - type: require('./element.schema'), - description: - 'A computer processable form of the unit in some unit representation system.', - }, - }), + description: 'Base StructureDefinition for Quantity Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quantity-comparator + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/questionnaire.schema.js b/src/resources/3_0_1/schemas/questionnaire.schema.js index 9538eafc..7c819b4a 100644 --- a/src/resources/3_0_1/schemas/questionnaire.schema.js +++ b/src/resources/3_0_1/schemas/questionnaire.schema.js @@ -1,24 +1,17 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let QuestionnaireResourceType = new GraphQLEnumType({ - name: 'QuestionnaireResourceType', - values: { - Questionnaire: { value: 'Questionnaire' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,191 +19,249 @@ let QuestionnaireResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Questionnaire', - description: 'Base StructureDefinition for Questionnaire Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(QuestionnaireResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the questionnaire.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the questionnaire.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this questionnaire. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this questionnaire. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the questionnaire.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the questionnaire.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the questionnaire from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the questionnaire from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this questionnaire is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this questionnaire is needed and why it has been designed as it has.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.schema'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.schema'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The period during which the questionnaire content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the questionnaire is intended to be used.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions - code: { - type: new GraphQLList(require('./coding.schema')), - description: - 'An identifier for this question or group of questions in a particular terminology such as LOINC.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - subjectType: { - type: new GraphQLList(CodeScalar), - description: - 'The types of subjects that can be the subject of responses created for the questionnaire.', - }, - _subjectType: { - type: require('./element.schema'), - description: - 'The types of subjects that can be the subject of responses created for the questionnaire.', - }, - item: { - type: new GraphQLList(require('./questionnaireitem.schema')), - description: - 'A particular question, question grouping or display text that is part of the questionnaire.', - }, - }), + description: 'Base StructureDefinition for Questionnaire Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Questionnaire_Enum_schema', + values: { Questionnaire: { value: 'Questionnaire' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the questionnaire.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the questionnaire.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this questionnaire. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this questionnaire. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the questionnaire.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the questionnaire.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the questionnaire from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the questionnaire from a consumer's perspective.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this questionnaire is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this questionnaire is needed and why it has been designed as it has.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the questionnaire content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the questionnaire is intended to be used.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'An identifier for this question or group of questions in a particular terminology such as LOINC.', + }, + _subjectType: { + type: require('./element.schema.js'), + description: + 'The types of subjects that can be the subject of responses created for the questionnaire.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + subjectType: { + type: new GraphQLList(CodeScalar), + description: + 'The types of subjects that can be the subject of responses created for the questionnaire.', + }, + item: { + type: new GraphQLList(require('./questionnaireitem.schema.js')), + description: + 'A particular question, question grouping or display text that is part of the questionnaire.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/questionnaireitem.schema.js b/src/resources/3_0_1/schemas/questionnaireitem.schema.js index 4ecc4ede..a4b79331 100644 --- a/src/resources/3_0_1/schemas/questionnaireitem.schema.js +++ b/src/resources/3_0_1/schemas/questionnaireitem.schema.js @@ -1,253 +1,290 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLInt, + GraphQLUnionType, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary Questionnaire.item Schema + * @summary Questionnaireitem Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireItem', - description: - 'A particular question, question grouping or display text that is part of the questionnaire.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - linkId: { - type: new GraphQLNonNull(GraphQLString), - description: - 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.schema'), - description: - 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', - }, - definition: { - type: UriScalar, - description: - 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition.', - }, - _definition: { - type: require('./element.schema'), - description: - 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions - code: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).', - }, - prefix: { - type: GraphQLString, - description: - 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', - }, - _prefix: { - type: require('./element.schema'), - description: - 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', - }, - text: { - type: GraphQLString, - description: - 'The name of a section, the text of a question or text content for a display item.', - }, - _text: { - type: require('./element.schema'), - description: - 'The name of a section, the text of a question or text content for a display item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/item-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', - }, - _type: { - type: require('./element.schema'), - description: - 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', - }, - enableWhen: { - type: new GraphQLList(require('./questionnaireitemenablewhen.schema')), - description: - 'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.', - }, - required: { - type: GraphQLBoolean, - description: - "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", - }, - _required: { - type: require('./element.schema'), - description: - "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", - }, - repeats: { - type: GraphQLBoolean, - description: - 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.', - }, - _repeats: { - type: require('./element.schema'), - description: - 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.', - }, - readOnly: { - type: GraphQLBoolean, - description: - 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', - }, - _readOnly: { - type: require('./element.schema'), - description: - 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', - }, - maxLength: { - type: GraphQLInt, - description: - "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", - }, - _maxLength: { - type: require('./element.schema'), - description: - "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", - }, - options: { - type: require('./reference.schema'), + name: 'Questionnaireitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', + }, + linkId: { + type: new GraphQLNonNull(GraphQLString), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition.', + }, + definition: { + type: UriScalar, + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-questions + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).', + }, + _prefix: { + type: require('./element.schema.js'), + description: + 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', + }, + prefix: { + type: GraphQLString, + description: + 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'The name of a section, the text of a question or text content for a display item.', + }, + text: { + type: GraphQLString, + description: + 'The name of a section, the text of a question or text content for a display item.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/item-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', + }, + enableWhen: { + type: new GraphQLList(require('./questionnaireitemenablewhen.schema.js')), + description: + 'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.', + }, + _required: { + type: require('./element.schema.js'), + description: + "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", + }, + required: { + type: GraphQLBoolean, + description: + "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", + }, + _repeats: { + type: require('./element.schema.js'), + description: + 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.', + }, + repeats: { + type: GraphQLBoolean, + description: + 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.', + }, + _readOnly: { + type: require('./element.schema.js'), + description: + 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', + }, + readOnly: { + type: GraphQLBoolean, + description: + 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', + }, + _maxLength: { + type: require('./element.schema.js'), + description: + "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", + }, + maxLength: { + type: GraphQLInt, + description: + "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", + }, + options: { + type: new GraphQLUnionType({ + name: 'Questionnaireitemoptions_options_Union', description: "A reference to a value set containing a list of codes representing permitted answers for a 'choice' or 'open-choice' question.", - }, - option: { - type: new GraphQLList(require('./questionnaireitemoption.schema')), - description: - "One of the permitted answers for a 'choice' or 'open-choice' question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialBoolean: { - type: GraphQLBoolean, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialBoolean: { - type: require('./element.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialDecimal: { - type: GraphQLFloat, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialDecimal: { - type: require('./element.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialInteger: { - type: GraphQLInt, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialInteger: { - type: require('./element.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialDate: { - type: DateScalar, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialDate: { - type: require('./element.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialDateTime: { - type: DateTimeScalar, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialDateTime: { - type: require('./element.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialTime: { - type: TimeScalar, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialTime: { - type: require('./element.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialString: { - type: GraphQLString, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialString: { - type: require('./element.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialUri: { - type: UriScalar, - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - _initialUri: { - type: require('./element.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialAttachment: { - type: require('./attachment.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialCoding: { - type: require('./coding.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialQuantity: { - type: require('./quantity.schema'), - description: - 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - initialReference: { - type: require('./reference.schema'), + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + "A reference to a value set containing a list of codes representing permitted answers for a 'choice' or 'open-choice' question.", + }, + option: { + type: new GraphQLList(require('./questionnaireitemoption.schema.js')), + description: + "One of the permitted answers for a 'choice' or 'open-choice' question.", + }, + _initialBoolean: { + type: require('./element.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialBoolean: { + type: GraphQLBoolean, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialDecimal: { + type: require('./element.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialDecimal: { + type: GraphQLFloat, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialInteger: { + type: require('./element.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialInteger: { + type: GraphQLInt, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialDate: { + type: require('./element.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialDate: { + type: DateScalar, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialDateTime: { + type: require('./element.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialDateTime: { + type: DateTimeScalar, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialTime: { + type: require('./element.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialTime: { + type: TimeScalar, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialString: { + type: require('./element.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialString: { + type: GraphQLString, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + _initialUri: { + type: require('./element.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialUri: { + type: UriScalar, + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialAttachment: { + type: require('./attachment.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialCoding: { + type: require('./coding.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialQuantity: { + type: require('./quantity.schema.js'), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + initialReference: { + type: new GraphQLUnionType({ + name: 'QuestionnaireiteminitialReference_initialReference_Union', description: 'The value that should be defaulted when initially rendering the questionnaire for user input.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The value that should be defaulted when initially rendering the questionnaire for user input.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/questionnaireitemenablewhen.schema.js b/src/resources/3_0_1/schemas/questionnaireitemenablewhen.schema.js index 7c59b40c..e6fa2afa 100644 --- a/src/resources/3_0_1/schemas/questionnaireitemenablewhen.schema.js +++ b/src/resources/3_0_1/schemas/questionnaireitemenablewhen.schema.js @@ -1,159 +1,188 @@ -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Questionnaire.item.enableWhen Schema + * @summary QuestionnaireitemenableWhen Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireItemEnableWhen', - description: - 'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - question: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', - }, - _question: { - type: require('./element.schema'), - description: - 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', - }, - hasAnswer: { - type: GraphQLBoolean, - description: - 'An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).', - }, - _hasAnswer: { - type: require('./element.schema'), - description: - 'An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerBoolean: { - type: GraphQLBoolean, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerBoolean: { - type: require('./element.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerDecimal: { - type: GraphQLFloat, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerDecimal: { - type: require('./element.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerInteger: { - type: GraphQLInt, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerInteger: { - type: require('./element.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerDate: { - type: DateScalar, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerDate: { - type: require('./element.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerDateTime: { - type: DateTimeScalar, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerDateTime: { - type: require('./element.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerTime: { - type: TimeScalar, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerTime: { - type: require('./element.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerString: { - type: GraphQLString, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerString: { - type: require('./element.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerUri: { - type: UriScalar, - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - _answerUri: { - type: require('./element.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerAttachment: { - type: require('./attachment.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerCoding: { - type: require('./coding.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerQuantity: { - type: require('./quantity.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - answerReference: { - type: require('./reference.schema'), - description: - 'An answer that the referenced question must match in order for the item to be enabled.', - }, - }), + name: 'QuestionnaireitemenableWhen', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _question: { + type: require('./element.schema.js'), + description: + 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', + }, + question: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', + }, + _hasAnswer: { + type: require('./element.schema.js'), + description: + 'An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).', + }, + hasAnswer: { + type: GraphQLBoolean, + description: + 'An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).', + }, + _answerBoolean: { + type: require('./element.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerBoolean: { + type: GraphQLBoolean, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerDecimal: { + type: require('./element.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerDecimal: { + type: GraphQLFloat, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerInteger: { + type: require('./element.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerInteger: { + type: GraphQLInt, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerDate: { + type: require('./element.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerDate: { + type: DateScalar, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerDateTime: { + type: require('./element.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerDateTime: { + type: DateTimeScalar, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerTime: { + type: require('./element.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerTime: { + type: TimeScalar, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerString: { + type: require('./element.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerString: { + type: GraphQLString, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + _answerUri: { + type: require('./element.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerUri: { + type: UriScalar, + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerAttachment: { + type: require('./attachment.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerCoding: { + type: require('./coding.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerQuantity: { + type: require('./quantity.schema.js'), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + answerReference: { + type: new GraphQLUnionType({ + name: + 'QuestionnaireitemenableWhenanswerReference_answerReference_Union', + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'An answer that the referenced question must match in order for the item to be enabled.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/questionnaireitemoption.schema.js b/src/resources/3_0_1/schemas/questionnaireitemoption.schema.js index 942a0760..116135ea 100644 --- a/src/resources/3_0_1/schemas/questionnaireitemoption.schema.js +++ b/src/resources/3_0_1/schemas/questionnaireitemoption.schema.js @@ -1,73 +1,90 @@ -const DateScalar = require('../scalars/date.scalar'); -const TimeScalar = require('../scalars/time.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateScalar = require('../scalars/date.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); /** * @name exports - * @summary Questionnaire.item.option Schema + * @summary Questionnaireitemoption Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireItemOption', - description: - "One of the permitted answers for a 'choice' or 'open-choice' question.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: - "A potential answer that's allowed as the answer to this question.", - }, - _valueInteger: { - type: require('./element.schema'), - description: - "A potential answer that's allowed as the answer to this question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueDate: { - type: new GraphQLNonNull(DateScalar), - description: - "A potential answer that's allowed as the answer to this question.", - }, - _valueDate: { - type: require('./element.schema'), - description: - "A potential answer that's allowed as the answer to this question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueTime: { - type: new GraphQLNonNull(TimeScalar), - description: - "A potential answer that's allowed as the answer to this question.", - }, - _valueTime: { - type: require('./element.schema'), - description: - "A potential answer that's allowed as the answer to this question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: - "A potential answer that's allowed as the answer to this question.", - }, - _valueString: { - type: require('./element.schema'), - description: - "A potential answer that's allowed as the answer to this question.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueCoding: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - "A potential answer that's allowed as the answer to this question.", - }, - }), + name: 'Questionnaireitemoption', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueDate: { + type: require('./element.schema.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueTime: { + type: require('./element.schema.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueString: { + type: require('./element.schema.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + "A potential answer that's allowed as the answer to this question.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + "A potential answer that's allowed as the answer to this question.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/questionnaireresponse.schema.js b/src/resources/3_0_1/schemas/questionnaireresponse.schema.js index 882b80d1..6ca10357 100644 --- a/src/resources/3_0_1/schemas/questionnaireresponse.schema.js +++ b/src/resources/3_0_1/schemas/questionnaireresponse.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let QuestionnaireResponseResourceType = new GraphQLEnumType({ - name: 'QuestionnaireResponseResourceType', - values: { - QuestionnaireResponse: { value: 'QuestionnaireResponse' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,77 +16,254 @@ let QuestionnaireResponseResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'QuestionnaireResponse', - description: 'Base StructureDefinition for QuestionnaireResponse Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(QuestionnaireResponseResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.', - }, - parent: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.', - }, - questionnaire: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for QuestionnaireResponse Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'QuestionnaireResponse_Enum_schema', + values: { QuestionnaireResponse: { value: 'QuestionnaireResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'QuestionnaireResponsebasedOn_basedOn_Union', + description: + 'The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.', + types: () => [ + require('./referralrequest.schema.js'), + require('./careplan.schema.js'), + require('./procedurerequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + }, + }), + ), + description: + 'The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.', + }, + parent: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'QuestionnaireResponseparent_parent_Union', + description: + 'A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.', + types: () => [ + require('./observation.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.', + }, + questionnaire: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsequestionnaire_questionnaire_Union', description: 'The Questionnaire that defines and organizes the questions for which answers are being provided.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The position of the questionnaire response within its overall lifecycle.', - }, - _status: { - type: require('./element.schema'), - description: - 'The position of the questionnaire response within its overall lifecycle.', - }, - subject: { - type: require('./reference.schema'), + types: () => [require('./questionnaire.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); + } + }, + }), + description: + 'The Questionnaire that defines and organizes the questions for which answers are being provided.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The position of the questionnaire response within its overall lifecycle.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The position of the questionnaire response within its overall lifecycle.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsesubject_subject_Union', description: 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', - }, - context: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', + }, + context: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsecontext_context_Union', description: 'The encounter or episode of care with primary association to the questionnaire response.', - }, - authored: { - type: DateTimeScalar, - description: - 'The date and/or time that this set of answers were last changed.', - }, - _authored: { - type: require('./element.schema'), - description: - 'The date and/or time that this set of answers were last changed.', - }, - author: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care with primary association to the questionnaire response.', + }, + _authored: { + type: require('./element.schema.js'), + description: + 'The date and/or time that this set of answers were last changed.', + }, + authored: { + type: DateTimeScalar, + description: + 'The date and/or time that this set of answers were last changed.', + }, + author: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponseauthor_author_Union', description: 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', - }, - source: { - type: require('./reference.schema'), + types: () => [ + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', + }, + source: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsesource_source_Union', description: 'The person who answered the questions about the subject.', - }, - item: { - type: new GraphQLList(require('./questionnaireresponseitem.schema')), - description: - 'A group or question item from the original questionnaire for which answers are provided.', - }, - }), + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The person who answered the questions about the subject.', + }, + item: { + type: new GraphQLList(require('./questionnaireresponseitem.schema.js')), + description: + 'A group or question item from the original questionnaire for which answers are provided.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/questionnaireresponseitem.schema.js b/src/resources/3_0_1/schemas/questionnaireresponseitem.schema.js index 0e79b376..7eb29597 100644 --- a/src/resources/3_0_1/schemas/questionnaireresponseitem.schema.js +++ b/src/resources/3_0_1/schemas/questionnaireresponseitem.schema.js @@ -1,63 +1,90 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.item Schema + * @summary QuestionnaireResponseitem Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireResponseItem', - description: - 'A group or question item from the original questionnaire for which answers are provided.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - linkId: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', - }, - _linkId: { - type: require('./element.schema'), - description: - 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', - }, - definition: { - type: UriScalar, - description: - 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', - }, - _definition: { - type: require('./element.schema'), - description: - 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', - }, - text: { - type: GraphQLString, - description: - 'Text that is displayed above the contents of the group or as the text of the question being answered.', - }, - _text: { - type: require('./element.schema'), - description: - 'Text that is displayed above the contents of the group or as the text of the question being answered.', - }, - subject: { - type: require('./reference.schema'), + name: 'QuestionnaireResponseitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', + }, + linkId: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', + }, + definition: { + type: UriScalar, + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Text that is displayed above the contents of the group or as the text of the question being answered.', + }, + text: { + type: GraphQLString, + description: + 'Text that is displayed above the contents of the group or as the text of the question being answered.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponseitemsubject_subject_Union', description: "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", - }, - answer: { - type: new GraphQLList( - require('./questionnaireresponseitemanswer.schema'), - ), - description: "The respondent's answer(s) to the question.", - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", + }, + answer: { + type: new GraphQLList( + require('./questionnaireresponseitemanswer.schema.js'), + ), + description: "The respondent's answer(s) to the question.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/questionnaireresponseitemanswer.schema.js b/src/resources/3_0_1/schemas/questionnaireresponseitemanswer.schema.js index bdbc6f1b..4fb37780 100644 --- a/src/resources/3_0_1/schemas/questionnaireresponseitemanswer.schema.js +++ b/src/resources/3_0_1/schemas/questionnaireresponseitemanswer.schema.js @@ -1,137 +1,167 @@ -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLBoolean, GraphQLFloat, GraphQLInt, - GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary QuestionnaireResponse.item.answer Schema + * @summary QuestionnaireResponseitemanswer Schema */ module.exports = new GraphQLObjectType({ - name: 'QuestionnaireResponseItemAnswer', - description: "The respondent's answer(s) to the question.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueBoolean: { - type: GraphQLBoolean, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueDecimal: { - type: GraphQLFloat, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueInteger: { - type: GraphQLInt, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueInteger: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueDate: { - type: DateScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDate: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueDateTime: { - type: DateTimeScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueTime: { - type: TimeScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueTime: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueString: { - type: GraphQLString, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueString: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueUri: { - type: UriScalar, - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - _valueUri: { - type: require('./element.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueAttachment: { - type: require('./attachment.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueCoding: { - type: require('./coding.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueQuantity: { - type: require('./quantity.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers - valueReference: { - type: require('./reference.schema'), - description: - 'The answer (or one of the answers) provided by the respondent to the question.', - }, - }), + name: 'QuestionnaireResponseitemanswer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueBoolean: { + type: GraphQLBoolean, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueDecimal: { + type: GraphQLFloat, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueInteger: { + type: GraphQLInt, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueDate: { + type: DateScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueDateTime: { + type: DateTimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueTime: { + type: TimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueString: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueUri: { + type: UriScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueCoding: { + type: require('./coding.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/questionnaire-answers + valueReference: { + type: new GraphQLUnionType({ + name: + 'QuestionnaireResponseitemanswervalueReference_valueReference_Union', + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/range.schema.js b/src/resources/3_0_1/schemas/range.schema.js index 2c1c87a1..99f3c4f7 100644 --- a/src/resources/3_0_1/schemas/range.schema.js +++ b/src/resources/3_0_1/schemas/range.schema.js @@ -1,6 +1,4 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports @@ -8,16 +6,30 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Range', - description: 'Base StructureDefinition for Range Type.', - fields: () => - extendSchema(require('./element.schema'), { - low: { - type: require('./quantity.schema'), - description: 'The low limit. The boundary is inclusive.', - }, - high: { - type: require('./quantity.schema'), - description: 'The high limit. The boundary is inclusive.', - }, - }), + description: 'Base StructureDefinition for Range Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + low: { + type: require('./quantity.schema.js'), + description: 'The low limit. The boundary is inclusive.', + }, + high: { + type: require('./quantity.schema.js'), + description: 'The high limit. The boundary is inclusive.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/ratio.schema.js b/src/resources/3_0_1/schemas/ratio.schema.js index 6dfc4993..3b5f5e5d 100644 --- a/src/resources/3_0_1/schemas/ratio.schema.js +++ b/src/resources/3_0_1/schemas/ratio.schema.js @@ -1,6 +1,4 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports @@ -8,16 +6,30 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Ratio', - description: 'Base StructureDefinition for Ratio Type.', - fields: () => - extendSchema(require('./element.schema'), { - numerator: { - type: require('./quantity.schema'), - description: 'The value of the numerator.', - }, - denominator: { - type: require('./quantity.schema'), - description: 'The value of the denominator.', - }, - }), + description: 'Base StructureDefinition for Ratio Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + numerator: { + type: require('./quantity.schema.js'), + description: 'The value of the numerator.', + }, + denominator: { + type: require('./quantity.schema.js'), + description: 'The value of the denominator.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/reference.schema.js b/src/resources/3_0_1/schemas/reference.schema.js index 2a71f739..c20d195e 100644 --- a/src/resources/3_0_1/schemas/reference.schema.js +++ b/src/resources/3_0_1/schemas/reference.schema.js @@ -1,6 +1,4 @@ -const { GraphQLObjectType, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports @@ -8,33 +6,47 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Reference', - description: 'Base StructureDefinition for Reference Type.', - fields: () => - extendSchema(require('./element.schema'), { - reference: { - type: GraphQLString, - description: - "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", - }, - _reference: { - type: require('./element.schema'), - description: - "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", - }, - identifier: { - type: require('./identifier.schema'), - description: - 'An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.', - }, - display: { - type: GraphQLString, - description: - 'Plain text narrative that identifies the resource in addition to the resource reference.', - }, - _display: { - type: require('./element.schema'), - description: - 'Plain text narrative that identifies the resource in addition to the resource reference.', - }, - }), + description: 'Base StructureDefinition for Reference Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _reference: { + type: require('./element.schema.js'), + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + reference: { + type: GraphQLString, + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + display: { + type: GraphQLString, + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/referralrequest.schema.js b/src/resources/3_0_1/schemas/referralrequest.schema.js index ffe53265..09197cfb 100644 --- a/src/resources/3_0_1/schemas/referralrequest.schema.js +++ b/src/resources/3_0_1/schemas/referralrequest.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ReferralRequestResourceType = new GraphQLEnumType({ - name: 'ReferralRequestResourceType', - values: { - ReferralRequest: { value: 'ReferralRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,169 +17,377 @@ let ReferralRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ReferralRequest', - description: 'Base StructureDefinition for ReferralRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ReferralRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Business identifier that uniquely identifies the referral/care transfer request instance.', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.', - }, - replaces: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Completed or terminated request(s) whose function is taken by this new request.', - }, - groupIdentifier: { - type: require('./identifier.schema'), - description: - "The business identifier of the logical 'grouping' request/order that this referral is a part of.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the authorization/intention reflected by the referral request record.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of the authorization/intention reflected by the referral request record.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - "Distinguishes the 'level' of authorization/demand implicit in this request.", - }, - _intent: { - type: require('./element.schema'), - description: - "Distinguishes the 'level' of authorization/demand implicit in this request.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/referral-type - type: { - type: require('./codeableconcept.schema'), - description: - 'An indication of the type of referral (or where applicable the type of transfer of care) request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', - }, - _priority: { - type: require('./element.schema'), - description: - 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - serviceRequested: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The patient who is the subject of a referral or transfer of care request.', - }, - context: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ReferralRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ReferralRequest_Enum_schema', + values: { ReferralRequest: { value: 'ReferralRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Business identifier that uniquely identifies the referral/care transfer request instance.', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ReferralRequestdefinition_definition_Union', + description: + 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + types: () => [ + require('./activitydefinition.schema.js'), + require('./plandefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + }, + }), + ), + description: + 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ReferralRequestbasedOn_basedOn_Union', + description: + 'Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.', + types: () => [ + require('./referralrequest.schema.js'), + require('./careplan.schema.js'), + require('./procedurerequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + }, + }), + ), + description: + 'Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ReferralRequestreplaces_replaces_Union', + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + types: () => [require('./referralrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); + } + }, + }), + ), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + "The business identifier of the logical 'grouping' request/order that this referral is a part of.", + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of the authorization/intention reflected by the referral request record.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the authorization/intention reflected by the referral request record.', + }, + _intent: { + type: require('./element.schema.js'), + description: + "Distinguishes the 'level' of authorization/demand implicit in this request.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + "Distinguishes the 'level' of authorization/demand implicit in this request.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/referral-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'An indication of the type of referral (or where applicable the type of transfer of care) request.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'An indication of the urgency of referral (or where applicable the type of transfer of care) request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + serviceRequested: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ReferralRequestsubject_subject_Union', + description: + 'The patient who is the subject of a referral or transfer of care request.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The patient who is the subject of a referral or transfer of care request.', + }, + context: { + type: new GraphQLUnionType({ + name: 'ReferralRequestcontext_context_Union', description: 'The encounter at which the request for referral or transfer of care is initiated.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: - 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', - }, - occurrencePeriod: { - type: require('./period.schema'), - description: - 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', - }, - authoredOn: { - type: DateTimeScalar, - description: - 'Date/DateTime of creation for draft requests and date of activation for active requests.', - }, - _authoredOn: { - type: require('./element.schema'), - description: - 'Date/DateTime of creation for draft requests and date of activation for active requests.', - }, - requester: { - type: require('./referralrequestrequester.schema'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty - specialty: { - type: require('./codeableconcept.schema'), - description: - 'Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings - reasonCode: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.', - }, - reasonReference: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates another resource whose existence justifies this request.', - }, - description: { - type: GraphQLString, - description: - 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', - }, - _description: { - type: require('./element.schema'), - description: - 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', - }, - supportingInfo: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Comments made about the referral request by any of the participants.', - }, - relevantHistory: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', - }, - }), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter at which the request for referral or transfer of care is initiated.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: + 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: + 'The period of time within which the services identified in the referral/transfer of care is specified or required to occur.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: + 'Date/DateTime of creation for draft requests and date of activation for active requests.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'Date/DateTime of creation for draft requests and date of activation for active requests.', + }, + requester: { + type: require('./referralrequestrequester.schema.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/practitioner-specialty + specialty: { + type: require('./codeableconcept.schema.js'), + description: + 'Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ReferralRequestrecipient_recipient_Union', + description: + 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: + 'The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/clinical-findings + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ReferralRequestreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies this request.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies this request.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', + }, + description: { + type: GraphQLString, + description: + 'The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ReferralRequestsupportingInfo_supportingInfo_Union', + description: + 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the referral request by any of the participants.', + }, + relevantHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ReferralRequestrelevantHistory_relevantHistory_Union', + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/referralrequestrequester.schema.js b/src/resources/3_0_1/schemas/referralrequestrequester.schema.js index 9892abb7..2a4f5c8e 100644 --- a/src/resources/3_0_1/schemas/referralrequestrequester.schema.js +++ b/src/resources/3_0_1/schemas/referralrequestrequester.schema.js @@ -1,26 +1,87 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ReferralRequest.requester Schema + * @summary ReferralRequestrequester Schema */ module.exports = new GraphQLObjectType({ - name: 'ReferralRequestRequester', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - agent: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device, practitioner, etc. who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'ReferralRequestrequester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + agent: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ReferralRequestrequesteragent_agent_Union', + description: + 'The device, practitioner, etc. who initiated the request.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The device, practitioner, etc. who initiated the request.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'ReferralRequestrequesteronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/relatedartifact.schema.js b/src/resources/3_0_1/schemas/relatedartifact.schema.js index 28c14963..991dda9f 100644 --- a/src/resources/3_0_1/schemas/relatedartifact.schema.js +++ b/src/resources/3_0_1/schemas/relatedartifact.schema.js @@ -1,8 +1,12 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports @@ -10,57 +14,81 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'RelatedArtifact', - description: 'Base StructureDefinition for RelatedArtifact Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/related-artifact-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of relationship to the related artifact.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of relationship to the related artifact.', - }, - display: { - type: GraphQLString, - description: - 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', - }, - _display: { - type: require('./element.schema'), - description: - 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', - }, - citation: { - type: GraphQLString, - description: - 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', - }, - _citation: { - type: require('./element.schema'), - description: - 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', - }, - url: { - type: UriScalar, - description: - 'A url for the artifact that can be followed to access the actual content.', - }, - _url: { - type: require('./element.schema'), - description: - 'A url for the artifact that can be followed to access the actual content.', - }, - document: { - type: require('./attachment.schema'), - description: - 'The document being referenced, represented as an attachment. This is exclusive with the resource element.', - }, - resource: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for RelatedArtifact Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of relationship to the related artifact.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/related-artifact-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of relationship to the related artifact.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', + }, + display: { + type: GraphQLString, + description: + 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', + }, + _citation: { + type: require('./element.schema.js'), + description: + 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', + }, + citation: { + type: GraphQLString, + description: + 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'A url for the artifact that can be followed to access the actual content.', + }, + url: { + type: UriScalar, + description: + 'A url for the artifact that can be followed to access the actual content.', + }, + document: { + type: require('./attachment.schema.js'), + description: + 'The document being referenced, represented as an attachment. This is exclusive with the resource element.', + }, + resource: { + type: new GraphQLUnionType({ + name: 'RelatedArtifactresource_resource_Union', description: 'The related resource, such as a library, value set, profile, or other knowledge resource.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The related resource, such as a library, value set, profile, or other knowledge resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/relatedperson.schema.js b/src/resources/3_0_1/schemas/relatedperson.schema.js index 45cbd17c..b1ab16df 100644 --- a/src/resources/3_0_1/schemas/relatedperson.schema.js +++ b/src/resources/3_0_1/schemas/relatedperson.schema.js @@ -1,22 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let RelatedPersonResourceType = new GraphQLEnumType({ - name: 'RelatedPersonResourceType', - values: { - RelatedPerson: { value: 'RelatedPerson' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -24,76 +17,145 @@ let RelatedPersonResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'RelatedPerson', - description: 'Base StructureDefinition for RelatedPerson Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(RelatedPersonResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Identifier for a person within a particular scope.', - }, - active: { - type: GraphQLBoolean, - description: 'Whether this related person record is in active use.', - }, - _active: { - type: require('./element.schema'), - description: 'Whether this related person record is in active use.', - }, - patient: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The patient this person is related to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype - relationship: { - type: require('./codeableconcept.schema'), - description: - 'The nature of the relationship between a patient and the related person.', - }, - name: { - type: new GraphQLList(require('./humanname.schema')), - description: 'A name associated with the person.', - }, - telecom: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'A contact detail for the person, e.g. a telephone number or an email address.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender - gender: { - type: CodeScalar, - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - _gender: { - type: require('./element.schema'), - description: - 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', - }, - birthDate: { - type: DateScalar, - description: 'The date on which the related person was born.', - }, - _birthDate: { - type: require('./element.schema'), - description: 'The date on which the related person was born.', - }, - address: { - type: new GraphQLList(require('./address.schema')), - description: - 'Address where the related person can be contacted or visited.', - }, - photo: { - type: new GraphQLList(require('./attachment.schema')), - description: 'Image of the person.', - }, - period: { - type: require('./period.schema'), - description: - 'The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.', - }, - }), + description: 'Base StructureDefinition for RelatedPerson Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RelatedPerson_Enum_schema', + values: { RelatedPerson: { value: 'RelatedPerson' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Identifier for a person within a particular scope.', + }, + _active: { + type: require('./element.schema.js'), + description: 'Whether this related person record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this related person record is in active use.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'RelatedPersonpatient_patient_Union', + description: 'The patient this person is related to.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient this person is related to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype + relationship: { + type: require('./codeableconcept.schema.js'), + description: + 'The nature of the relationship between a patient and the related person.', + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/administrative-gender + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date on which the related person was born.', + }, + birthDate: { + type: DateScalar, + description: 'The date on which the related person was born.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: + 'Address where the related person can be contacted or visited.', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the person.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time that this relationship is considered to be valid. If there are no dates defined, then the interval is unknown.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/requestgroup.schema.js b/src/resources/3_0_1/schemas/requestgroup.schema.js index 5aa8abf5..3707ace3 100644 --- a/src/resources/3_0_1/schemas/requestgroup.schema.js +++ b/src/resources/3_0_1/schemas/requestgroup.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let RequestGroupResourceType = new GraphQLEnumType({ - name: 'RequestGroupResourceType', - values: { - RequestGroup: { value: 'RequestGroup' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,110 +16,259 @@ let RequestGroupResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'RequestGroup', - description: 'Base StructureDefinition for RequestGroup Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(RequestGroupResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Allows a service to provide a unique, business identifier for the request.', - }, - definition: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A plan, proposal or order that is fulfilled in whole or in part by this request.', - }, - replaces: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Completed or terminated request(s) whose function is taken by this new request.', - }, - groupIdentifier: { - type: require('./identifier.schema'), - description: - 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', - }, - _status: { - type: require('./element.schema'), - description: - 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', - }, - _intent: { - type: require('./element.schema'), - description: - 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the request should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.schema'), - description: - 'Indicates how quickly the request should be addressed with respect to other requests.', - }, - subject: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for RequestGroup Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RequestGroup_Enum_schema', + values: { RequestGroup: { value: 'RequestGroup' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Allows a service to provide a unique, business identifier for the request.', + }, + definition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RequestGroupdefinition_definition_Union', + description: + 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RequestGroupbasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this request.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RequestGroupreplaces_replaces_Union', + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the request should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the request should be addressed with respect to other requests.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'RequestGroupsubject_subject_Union', description: 'The subject for which the request group was created.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: 'The subject for which the request group was created.', + }, + context: { + type: new GraphQLUnionType({ + name: 'RequestGroupcontext_context_Union', description: 'Describes the context of the request group, if any.', - }, - authoredOn: { - type: DateTimeScalar, - description: 'Indicates when the request group was created.', - }, - _authoredOn: { - type: require('./element.schema'), - description: 'Indicates when the request group was created.', - }, - author: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: 'Describes the context of the request group, if any.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'Indicates when the request group was created.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'Indicates when the request group was created.', + }, + author: { + type: new GraphQLUnionType({ + name: 'RequestGroupauthor_author_Union', description: 'Provides a reference to the author of the request group.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', - }, - reasonReference: { - type: require('./reference.schema'), + types: () => [ + require('./device.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'Provides a reference to the author of the request group.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + reasonReference: { + type: new GraphQLUnionType({ + name: 'RequestGroupreasonReference_reasonReference_Union', description: 'Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Provides a mechanism to communicate additional information about the response.', - }, - action: { - type: new GraphQLList(require('./requestgroupaction.schema')), - description: - 'The actions, if any, produced by the evaluation of the artifact.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Indicates the reason the request group was created. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Provides a mechanism to communicate additional information about the response.', + }, + action: { + type: new GraphQLList(require('./requestgroupaction.schema.js')), + description: + 'The actions, if any, produced by the evaluation of the artifact.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/requestgroupaction.schema.js b/src/resources/3_0_1/schemas/requestgroupaction.schema.js index 1db68542..72f09918 100644 --- a/src/resources/3_0_1/schemas/requestgroupaction.schema.js +++ b/src/resources/3_0_1/schemas/requestgroupaction.schema.js @@ -1,174 +1,227 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary RequestGroup.action Schema + * @summary RequestGroupaction Schema */ module.exports = new GraphQLObjectType({ - name: 'RequestGroupAction', - description: - 'The actions, if any, produced by the evaluation of the artifact.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - label: { - type: GraphQLString, - description: 'A user-visible label for the action.', - }, - _label: { - type: require('./element.schema'), - description: 'A user-visible label for the action.', - }, - title: { - type: GraphQLString, - description: 'The title of the action displayed to a user.', - }, - _title: { - type: require('./element.schema'), - description: 'The title of the action displayed to a user.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the action used to provide a summary to display to the user.', - }, - _description: { - type: require('./element.schema'), - description: - 'A short description of the action used to provide a summary to display to the user.', - }, - textEquivalent: { - type: GraphQLString, - description: - 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', - }, - _textEquivalent: { - type: require('./element.schema'), - description: - 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', - }, - code: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.', - }, - documentation: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: - 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', - }, - condition: { - type: new GraphQLList(require('./requestgroupactioncondition.schema')), - description: - 'An expression that describes applicability criteria, or start/stop conditions for the action.', - }, - relatedAction: { - type: new GraphQLList( - require('./requestgroupactionrelatedaction.schema'), - ), - description: - "A relationship to another action such as 'before' or '30-60 minutes after start of'.", - }, - timingDateTime: { - type: DateTimeScalar, - description: - 'An optional value describing when the action should be performed.', - }, - _timingDateTime: { - type: require('./element.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - timingPeriod: { - type: require('./period.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - timingDuration: { - type: require('./duration.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - timingRange: { - type: require('./range.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - timingTiming: { - type: require('./timing.schema'), - description: - 'An optional value describing when the action should be performed.', - }, - participant: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The participant that should perform or be responsible for this action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-type - type: { - type: require('./coding.schema'), - description: 'The type of action to perform (create, update, remove).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-grouping-behavior - groupingBehavior: { - type: CodeScalar, - description: - 'Defines the grouping behavior for the action and its children.', - }, - _groupingBehavior: { - type: require('./element.schema'), - description: - 'Defines the grouping behavior for the action and its children.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-selection-behavior - selectionBehavior: { - type: CodeScalar, - description: - 'Defines the selection behavior for the action and its children.', - }, - _selectionBehavior: { - type: require('./element.schema'), - description: - 'Defines the selection behavior for the action and its children.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-required-behavior - requiredBehavior: { - type: CodeScalar, - description: 'Defines the requiredness behavior for the action.', - }, - _requiredBehavior: { - type: require('./element.schema'), - description: 'Defines the requiredness behavior for the action.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-precheck-behavior - precheckBehavior: { - type: CodeScalar, - description: - 'Defines whether the action should usually be preselected.', - }, - _precheckBehavior: { - type: require('./element.schema'), - description: - 'Defines whether the action should usually be preselected.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-cardinality-behavior - cardinalityBehavior: { - type: CodeScalar, - description: - 'Defines whether the action can be selected multiple times.', - }, - _cardinalityBehavior: { - type: require('./element.schema'), - description: - 'Defines whether the action can be selected multiple times.', - }, - resource: { - type: require('./reference.schema'), + name: 'RequestGroupaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _label: { + type: require('./element.schema.js'), + description: 'A user-visible label for the action.', + }, + label: { + type: GraphQLString, + description: 'A user-visible label for the action.', + }, + _title: { + type: require('./element.schema.js'), + description: 'The title of the action displayed to a user.', + }, + title: { + type: GraphQLString, + description: 'The title of the action displayed to a user.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + _textEquivalent: { + type: require('./element.schema.js'), + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', + }, + textEquivalent: { + type: GraphQLString, + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', + }, + condition: { + type: new GraphQLList(require('./requestgroupactioncondition.schema.js')), + description: + 'An expression that describes applicability criteria, or start/stop conditions for the action.', + }, + relatedAction: { + type: new GraphQLList( + require('./requestgroupactionrelatedaction.schema.js'), + ), + description: + "A relationship to another action such as 'before' or '30-60 minutes after start of'.", + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'An optional value describing when the action should be performed.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDuration: { + type: require('./duration.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingRange: { + type: require('./range.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + participant: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RequestGroupactionparticipant_participant_Union', + description: + 'The participant that should perform or be responsible for this action.', + types: () => [ + require('./patient.schema.js'), + require('./person.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Person') { + return require('./person.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The participant that should perform or be responsible for this action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-type + type: { + type: require('./coding.schema.js'), + description: 'The type of action to perform (create, update, remove).', + }, + _groupingBehavior: { + type: require('./element.schema.js'), + description: + 'Defines the grouping behavior for the action and its children.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-grouping-behavior + groupingBehavior: { + type: CodeScalar, + description: + 'Defines the grouping behavior for the action and its children.', + }, + _selectionBehavior: { + type: require('./element.schema.js'), + description: + 'Defines the selection behavior for the action and its children.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-selection-behavior + selectionBehavior: { + type: CodeScalar, + description: + 'Defines the selection behavior for the action and its children.', + }, + _requiredBehavior: { + type: require('./element.schema.js'), + description: 'Defines the requiredness behavior for the action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-required-behavior + requiredBehavior: { + type: CodeScalar, + description: 'Defines the requiredness behavior for the action.', + }, + _precheckBehavior: { + type: require('./element.schema.js'), + description: 'Defines whether the action should usually be preselected.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-precheck-behavior + precheckBehavior: { + type: CodeScalar, + description: 'Defines whether the action should usually be preselected.', + }, + _cardinalityBehavior: { + type: require('./element.schema.js'), + description: 'Defines whether the action can be selected multiple times.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-cardinality-behavior + cardinalityBehavior: { + type: CodeScalar, + description: 'Defines whether the action can be selected multiple times.', + }, + resource: { + type: new GraphQLUnionType({ + name: 'RequestGroupactionresource_resource_Union', description: 'The resource that is the target of the action (e.g. CommunicationRequest).', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The resource that is the target of the action (e.g. CommunicationRequest).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/requestgroupactioncondition.schema.js b/src/resources/3_0_1/schemas/requestgroupactioncondition.schema.js index c8ada279..4a3b4f51 100644 --- a/src/resources/3_0_1/schemas/requestgroupactioncondition.schema.js +++ b/src/resources/3_0_1/schemas/requestgroupactioncondition.schema.js @@ -1,54 +1,75 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary RequestGroup.action.condition Schema + * @summary RequestGroupactioncondition Schema */ module.exports = new GraphQLObjectType({ - name: 'RequestGroupActionCondition', - description: - 'An expression that describes applicability criteria, or start/stop conditions for the action.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-condition-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: 'The kind of condition.', - }, - _kind: { - type: require('./element.schema'), - description: 'The kind of condition.', - }, - description: { - type: GraphQLString, - description: - 'A brief, natural language description of the condition that effectively communicates the intended semantics.', - }, - _description: { - type: require('./element.schema'), - description: - 'A brief, natural language description of the condition that effectively communicates the intended semantics.', - }, - language: { - type: GraphQLString, - description: 'The media type of the language for the expression.', - }, - _language: { - type: require('./element.schema'), - description: 'The media type of the language for the expression.', - }, - expression: { - type: GraphQLString, - description: - 'An expression that returns true or false, indicating whether or not the condition is satisfied.', - }, - _expression: { - type: require('./element.schema'), - description: - 'An expression that returns true or false, indicating whether or not the condition is satisfied.', - }, - }), + name: 'RequestGroupactioncondition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _kind: { + type: require('./element.schema.js'), + description: 'The kind of condition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-condition-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'The kind of condition.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: GraphQLString, + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + expression: { + type: GraphQLString, + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/requestgroupactionrelatedaction.schema.js b/src/resources/3_0_1/schemas/requestgroupactionrelatedaction.schema.js index 01f5d3fc..40b69011 100644 --- a/src/resources/3_0_1/schemas/requestgroupactionrelatedaction.schema.js +++ b/src/resources/3_0_1/schemas/requestgroupactionrelatedaction.schema.js @@ -1,45 +1,66 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary RequestGroup.action.relatedAction Schema + * @summary RequestGroupactionrelatedAction Schema */ module.exports = new GraphQLObjectType({ - name: 'RequestGroupActionRelatedAction', - description: - "A relationship to another action such as 'before' or '30-60 minutes after start of'.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - actionId: { - type: new GraphQLNonNull(IdScalar), - description: 'The element id of the action this is related to.', - }, - _actionId: { - type: require('./element.schema'), - description: 'The element id of the action this is related to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/action-relationship-type - relationship: { - type: new GraphQLNonNull(CodeScalar), - description: 'The relationship of this action to the related action.', - }, - _relationship: { - type: require('./element.schema'), - description: 'The relationship of this action to the related action.', - }, - offsetDuration: { - type: require('./duration.schema'), - description: - 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', - }, - offsetRange: { - type: require('./range.schema'), - description: - 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', - }, - }), + name: 'RequestGroupactionrelatedAction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _actionId: { + type: require('./element.schema.js'), + description: 'The element id of the action this is related to.', + }, + actionId: { + type: new GraphQLNonNull(IdScalar), + description: 'The element id of the action this is related to.', + }, + _relationship: { + type: require('./element.schema.js'), + description: 'The relationship of this action to the related action.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/action-relationship-type + relationship: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relationship of this action to the related action.', + }, + offsetDuration: { + type: require('./duration.schema.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + offsetRange: { + type: require('./range.schema.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/researchstudy.schema.js b/src/resources/3_0_1/schemas/researchstudy.schema.js index 6f35a452..814c7ab1 100644 --- a/src/resources/3_0_1/schemas/researchstudy.schema.js +++ b/src/resources/3_0_1/schemas/researchstudy.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ResearchStudyResourceType = new GraphQLEnumType({ - name: 'ResearchStudyResourceType', - values: { - ResearchStudy: { value: 'ResearchStudy' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,122 +16,247 @@ let ResearchStudyResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ResearchStudy', - description: 'Base StructureDefinition for ResearchStudy Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ResearchStudyResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Identifiers assigned to this research study by the sponsor or other systems.', - }, - title: { - type: GraphQLString, - description: 'A short, descriptive user-friendly label for the study.', - }, - _title: { - type: require('./element.schema'), - description: 'A short, descriptive user-friendly label for the study.', - }, - protocol: { - type: new GraphQLList(require('./reference.schema')), - description: - 'The set of steps expected to be performed as part of the execution of the study.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A larger research study of which this particular study is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/research-study-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current state of the study.', - }, - _status: { - type: require('./element.schema'), - description: 'The current state of the study.', - }, - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.', - }, - focus: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The condition(s), medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in learning more about or engaging with the study.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: 'Citations, references and other related documents.', - }, - keyword: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Key terms to aid in searching for or filtering the study.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Indicates a country, state or other region where the study is taking place.', - }, - description: { - type: GraphQLString, - description: 'A full description of how the study is being conducted.', - }, - _description: { - type: require('./element.schema'), - description: 'A full description of how the study is being conducted.', - }, - enrollment: { - type: new GraphQLList(require('./reference.schema')), - description: - "Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. ' 200 female Europeans between the ages of 20 and 45 with early onset diabetes'.", - }, - period: { - type: require('./period.schema'), - description: - 'Identifies the start date and the expected (or actual, depending on status) end date for the study.', - }, - sponsor: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ResearchStudy Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchStudy_Enum_schema', + values: { ResearchStudy: { value: 'ResearchStudy' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Identifiers assigned to this research study by the sponsor or other systems.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A short, descriptive user-friendly label for the study.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive user-friendly label for the study.', + }, + protocol: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ResearchStudyprotocol_protocol_Union', + description: + 'The set of steps expected to be performed as part of the execution of the study.', + types: () => [require('./plandefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + }, + }), + ), + description: + 'The set of steps expected to be performed as part of the execution of the study.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ResearchStudypartOf_partOf_Union', + description: + 'A larger research study of which this particular study is a component or step.', + types: () => [require('./researchstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + }, + }), + ), + description: + 'A larger research study of which this particular study is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the study.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/research-study-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the study.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.', + }, + focus: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The condition(s), medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in learning more about or engaging with the study.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: 'Citations, references and other related documents.', + }, + keyword: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Key terms to aid in searching for or filtering the study.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates a country, state or other region where the study is taking place.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A full description of how the study is being conducted.', + }, + description: { + type: GraphQLString, + description: 'A full description of how the study is being conducted.', + }, + enrollment: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ResearchStudyenrollment_enrollment_Union', + description: + "Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. ' 200 female Europeans between the ages of 20 and 45 with early onset diabetes'.", + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + "Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. ' 200 female Europeans between the ages of 20 and 45 with early onset diabetes'.", + }, + period: { + type: require('./period.schema.js'), + description: + 'Identifies the start date and the expected (or actual, depending on status) end date for the study.', + }, + sponsor: { + type: new GraphQLUnionType({ + name: 'ResearchStudysponsor_sponsor_Union', description: 'The organization responsible for the execution of the study.', - }, - principalInvestigator: { - type: require('./reference.schema'), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization responsible for the execution of the study.', + }, + principalInvestigator: { + type: new GraphQLUnionType({ + name: 'ResearchStudyprincipalInvestigator_principalInvestigator_Union', description: 'Indicates the individual who has primary oversite of the execution of the study.', - }, - site: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Clinic, hospital or other healthcare location that is participating in the study.', - }, - reasonStopped: { - type: require('./codeableconcept.schema'), - description: - 'A description and/or code explaining the premature termination of the study.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Comments made about the event by the performer, subject or other participants.', - }, - arm: { - type: new GraphQLList(require('./researchstudyarm.schema')), - description: - 'Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Indicates the individual who has primary oversite of the execution of the study.', + }, + site: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ResearchStudysite_site_Union', + description: + 'Clinic, hospital or other healthcare location that is participating in the study.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'Clinic, hospital or other healthcare location that is participating in the study.', + }, + reasonStopped: { + type: require('./codeableconcept.schema.js'), + description: + 'A description and/or code explaining the premature termination of the study.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the event by the performer, subject or other participants.', + }, + arm: { + type: new GraphQLList(require('./researchstudyarm.schema.js')), + description: + 'Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/researchstudyarm.schema.js b/src/resources/3_0_1/schemas/researchstudyarm.schema.js index 947e5d31..5dd81faf 100644 --- a/src/resources/3_0_1/schemas/researchstudyarm.schema.js +++ b/src/resources/3_0_1/schemas/researchstudyarm.schema.js @@ -1,39 +1,60 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary ResearchStudy.arm Schema + * @summary ResearchStudyarm Schema */ module.exports = new GraphQLObjectType({ - name: 'ResearchStudyArm', - description: - 'Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Unique, human-readable label for this arm of the study.', - }, - _name: { - type: require('./element.schema'), - description: 'Unique, human-readable label for this arm of the study.', - }, - code: { - type: require('./codeableconcept.schema'), - description: - 'Categorization of study arm, e.g. experimental, active comparator, placebo comparater.', - }, - description: { - type: GraphQLString, - description: - 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', - }, - _description: { - type: require('./element.schema'), - description: - 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', - }, - }), + name: 'ResearchStudyarm', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Unique, human-readable label for this arm of the study.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Unique, human-readable label for this arm of the study.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Categorization of study arm, e.g. experimental, active comparator, placebo comparater.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', + }, + description: { + type: GraphQLString, + description: + 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/researchsubject.schema.js b/src/resources/3_0_1/schemas/researchsubject.schema.js index e29214b2..0f8794df 100644 --- a/src/resources/3_0_1/schemas/researchsubject.schema.js +++ b/src/resources/3_0_1/schemas/researchsubject.schema.js @@ -1,19 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ResearchSubjectResourceType = new GraphQLEnumType({ - name: 'ResearchSubjectResourceType', - values: { - ResearchSubject: { value: 'ResearchSubject' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -21,65 +16,157 @@ let ResearchSubjectResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ResearchSubject', - description: 'Base StructureDefinition for ResearchSubject Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ResearchSubjectResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Identifiers assigned to this research study by the sponsor or other systems.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/research-subject-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current state of the subject.', - }, - _status: { - type: require('./element.schema'), - description: 'The current state of the subject.', - }, - period: { - type: require('./period.schema'), - description: - 'The dates the subject began and ended their participation in the study.', - }, - study: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Reference to the study the subject is participating in.', - }, - individual: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The record of the person or animal who is involved in the study.', - }, - assignedArm: { - type: GraphQLString, - description: - 'The name of the arm in the study the subject is expected to follow as part of this study.', - }, - _assignedArm: { - type: require('./element.schema'), - description: - 'The name of the arm in the study the subject is expected to follow as part of this study.', - }, - actualArm: { - type: GraphQLString, - description: - 'The name of the arm in the study the subject actually followed as part of this study.', - }, - _actualArm: { - type: require('./element.schema'), - description: - 'The name of the arm in the study the subject actually followed as part of this study.', - }, - consent: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ResearchSubject Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchSubject_Enum_schema', + values: { ResearchSubject: { value: 'ResearchSubject' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Identifiers assigned to this research study by the sponsor or other systems.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the subject.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/research-subject-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the subject.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The dates the subject began and ended their participation in the study.', + }, + study: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ResearchSubjectstudy_study_Union', + description: + 'Reference to the study the subject is participating in.', + types: () => [require('./researchstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + }, + }), + ), + description: 'Reference to the study the subject is participating in.', + }, + individual: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ResearchSubjectindividual_individual_Union', + description: + 'The record of the person or animal who is involved in the study.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The record of the person or animal who is involved in the study.', + }, + _assignedArm: { + type: require('./element.schema.js'), + description: + 'The name of the arm in the study the subject is expected to follow as part of this study.', + }, + assignedArm: { + type: GraphQLString, + description: + 'The name of the arm in the study the subject is expected to follow as part of this study.', + }, + _actualArm: { + type: require('./element.schema.js'), + description: + 'The name of the arm in the study the subject actually followed as part of this study.', + }, + actualArm: { + type: GraphQLString, + description: + 'The name of the arm in the study the subject actually followed as part of this study.', + }, + consent: { + type: new GraphQLUnionType({ + name: 'ResearchSubjectconsent_consent_Union', description: "A record of the patient's informed agreement to participate in the study.", - }, - }), + types: () => [require('./consent.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Consent') { + return require('./consent.schema.js'); + } + }, + }), + description: + "A record of the patient's informed agreement to participate in the study.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/resource.schema.js b/src/resources/3_0_1/schemas/resource.schema.js index 6c88649b..44b6a9f8 100644 --- a/src/resources/3_0_1/schemas/resource.schema.js +++ b/src/resources/3_0_1/schemas/resource.schema.js @@ -1,21 +1,11 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ResourceResourceType = new GraphQLEnumType({ - name: 'ResourceResourceType', - values: { - Resource: { value: 'Resource' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,46 +13,50 @@ let ResourceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Resource', - description: 'Base StructureDefinition for Resource Resource.', - fields: () => - extendSchema({ - resourceType: { - type: new GraphQLNonNull(ResourceResourceType), - description: 'Type of this resource.', - }, - id: { - type: IdScalar, - description: - 'The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.', - }, - _id: { - type: require('./element.schema'), - 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.schema'), - 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: 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.', - }, - _implicitRules: { - type: require('./element.schema'), - 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.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The base language in which the resource is written.', - }, - _language: { - type: require('./element.schema'), - description: 'The base language in which the resource is written.', - }, - }), + description: 'Base StructureDefinition for Resource Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Resource_Enum_schema', + values: { Resource: { value: 'Resource' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/resourcelist.schema.js b/src/resources/3_0_1/schemas/resourcelist.schema.js index 94f105a2..0c51c8c7 100644 --- a/src/resources/3_0_1/schemas/resourcelist.schema.js +++ b/src/resources/3_0_1/schemas/resourcelist.schema.js @@ -1,591 +1,490 @@ -const Account = require('../schemas/account.schema'); -const ActivityDefinition = require('../schemas/activitydefinition.schema'); -const AdverseEvent = require('../schemas/adverseevent.schema'); -const AllergyIntolerance = require('../schemas/allergyintolerance.schema'); -const Appointment = require('../schemas/appointment.schema'); -const AppointmentResponse = require('../schemas/appointmentresponse.schema'); -const AuditEvent = require('../schemas/auditevent.schema'); -const Basic = require('../schemas/basic.schema'); -const Binary = require('../schemas/binary.schema'); -const BodySite = require('../schemas/bodysite.schema'); -const Bundle = require('../schemas/bundle.schema'); -const CapabilityStatement = require('../schemas/capabilitystatement.schema'); -const CarePlan = require('../schemas/careplan.schema'); -const CareTeam = require('../schemas/careteam.schema'); -const ChargeItem = require('../schemas/chargeitem.schema'); -const Claim = require('../schemas/claim.schema'); -const ClaimResponse = require('../schemas/claimresponse.schema'); -const ClinicalImpression = require('../schemas/clinicalimpression.schema'); -const CodeSystem = require('../schemas/codesystem.schema'); -const Communication = require('../schemas/communication.schema'); -const CommunicationRequest = require('../schemas/communicationrequest.schema'); -const CompartmentDefinition = require('../schemas/compartmentdefinition.schema'); -const Composition = require('../schemas/composition.schema'); -const ConceptMap = require('../schemas/conceptmap.schema'); -const Condition = require('../schemas/condition.schema'); -const Consent = require('../schemas/consent.schema'); -const Contract = require('../schemas/contract.schema'); -const Coverage = require('../schemas/coverage.schema'); -const DataElement = require('../schemas/dataelement.schema'); -const DetectedIssue = require('../schemas/detectedissue.schema'); -const Device = require('../schemas/device.schema'); -const DeviceComponent = require('../schemas/devicecomponent.schema'); -const DeviceMetric = require('../schemas/devicemetric.schema'); -const DeviceRequest = require('../schemas/devicerequest.schema'); -const DeviceUseStatement = require('../schemas/deviceusestatement.schema'); -const DiagnosticReport = require('../schemas/diagnosticreport.schema'); -const DocumentManifest = require('../schemas/documentmanifest.schema'); -const DocumentReference = require('../schemas/documentreference.schema'); -const EligibilityRequest = require('../schemas/eligibilityrequest.schema'); -const EligibilityResponse = require('../schemas/eligibilityresponse.schema'); -const Encounter = require('../schemas/encounter.schema'); -const Endpoint = require('../schemas/endpoint.schema'); -const EnrollmentRequest = require('../schemas/enrollmentrequest.schema'); -const EnrollmentResponse = require('../schemas/enrollmentresponse.schema'); -const EpisodeOfCare = require('../schemas/episodeofcare.schema'); -const ExpansionProfile = require('../schemas/expansionprofile.schema'); -const ExplanationOfBenefit = require('../schemas/explanationofbenefit.schema'); -const FamilyMemberHistory = require('../schemas/familymemberhistory.schema'); -const Flag = require('../schemas/flag.schema'); -const Goal = require('../schemas/goal.schema'); -const GraphDefinition = require('../schemas/graphdefinition.schema'); -const Group = require('../schemas/group.schema'); -const GuidanceResponse = require('../schemas/guidanceresponse.schema'); -const HealthcareService = require('../schemas/healthcareservice.schema'); -const ImagingManifest = require('../schemas/imagingmanifest.schema'); -const ImagingStudy = require('../schemas/imagingstudy.schema'); -const Immunization = require('../schemas/immunization.schema'); -const ImmunizationRecommendation = require('../schemas/immunizationrecommendation.schema'); -const ImplementationGuide = require('../schemas/implementationguide.schema'); -const Library = require('../schemas/library.schema'); -const Linkage = require('../schemas/linkage.schema'); -const List = require('../schemas/list.schema'); -const Location = require('../schemas/location.schema'); -const Measure = require('../schemas/measure.schema'); -const MeasureReport = require('../schemas/measurereport.schema'); -const Media = require('../schemas/media.schema'); -const Medication = require('../schemas/medication.schema'); -const MedicationAdministration = require('../schemas/medicationadministration.schema'); -const MedicationDispense = require('../schemas/medicationdispense.schema'); -const MedicationRequest = require('../schemas/medicationrequest.schema'); -const MedicationStatement = require('../schemas/medicationstatement.schema'); -const MessageDefinition = require('../schemas/messagedefinition.schema'); -const MessageHeader = require('../schemas/messageheader.schema'); -const NamingSystem = require('../schemas/namingsystem.schema'); -const NutritionOrder = require('../schemas/nutritionorder.schema'); -const Observation = require('../schemas/observation.schema'); -const OperationDefinition = require('../schemas/operationdefinition.schema'); -const Organization = require('../schemas/organization.schema'); -const Patient = require('../schemas/patient.schema'); -const PaymentNotice = require('../schemas/paymentnotice.schema'); -const PaymentReconciliation = require('../schemas/paymentreconciliation.schema'); -const Person = require('../schemas/person.schema'); -const PlanDefinition = require('../schemas/plandefinition.schema'); -const Practitioner = require('../schemas/practitioner.schema'); -const PractitionerRole = require('../schemas/practitionerrole.schema'); -const Procedure = require('../schemas/procedure.schema'); -const ProcedureRequest = require('../schemas/procedurerequest.schema'); -const ProcessRequest = require('../schemas/processrequest.schema'); -const ProcessResponse = require('../schemas/processresponse.schema'); -const Provenance = require('../schemas/provenance.schema'); -const Questionnaire = require('../schemas/questionnaire.schema'); -const QuestionnaireResponse = require('../schemas/questionnaireresponse.schema'); -const ReferralRequest = require('../schemas/referralrequest.schema'); -const RelatedPerson = require('../schemas/relatedperson.schema'); -const RequestGroup = require('../schemas/requestgroup.schema'); -const ResearchStudy = require('../schemas/researchstudy.schema'); -const ResearchSubject = require('../schemas/researchsubject.schema'); -const RiskAssessment = require('../schemas/riskassessment.schema'); -const Schedule = require('../schemas/schedule.schema'); -const SearchParameter = require('../schemas/searchparameter.schema'); -const Sequence = require('../schemas/sequence.schema'); -const ServiceDefinition = require('../schemas/servicedefinition.schema'); -const Slot = require('../schemas/slot.schema'); -const Specimen = require('../schemas/specimen.schema'); -const StructureDefinition = require('../schemas/structuredefinition.schema'); -const StructureMap = require('../schemas/structuremap.schema'); -const Subscription = require('../schemas/subscription.schema'); -const Substance = require('../schemas/substance.schema'); -const SupplyDelivery = require('../schemas/supplydelivery.schema'); -const SupplyRequest = require('../schemas/supplyrequest.schema'); -const Task = require('../schemas/task.schema'); -const TestReport = require('../schemas/testreport.schema'); -const TestScript = require('../schemas/testscript.schema'); -const ValueSet = require('../schemas/valueset.schema'); -const VisionPrescription = require('../schemas/visionprescription.schema'); const { GraphQLUnionType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary ResourceList Union */ module.exports = new GraphQLUnionType({ name: 'ResourceList', - description: 'Union of all available resources.', + description: 'Union of all available resources', types: [ - Account, - ActivityDefinition, - AdverseEvent, - AllergyIntolerance, - Appointment, - AppointmentResponse, - AuditEvent, - Basic, - Binary, - BodySite, - Bundle, - CapabilityStatement, - CarePlan, - CareTeam, - ChargeItem, - Claim, - ClaimResponse, - ClinicalImpression, - CodeSystem, - Communication, - CommunicationRequest, - CompartmentDefinition, - Composition, - ConceptMap, - Condition, - Consent, - Contract, - Coverage, - DataElement, - DetectedIssue, - Device, - DeviceComponent, - DeviceMetric, - DeviceRequest, - DeviceUseStatement, - DiagnosticReport, - DocumentManifest, - DocumentReference, - EligibilityRequest, - EligibilityResponse, - Encounter, - Endpoint, - EnrollmentRequest, - EnrollmentResponse, - EpisodeOfCare, - ExpansionProfile, - ExplanationOfBenefit, - FamilyMemberHistory, - Flag, - Goal, - GraphDefinition, - Group, - GuidanceResponse, - HealthcareService, - ImagingManifest, - ImagingStudy, - Immunization, - ImmunizationRecommendation, - ImplementationGuide, - Library, - Linkage, - List, - Location, - Measure, - MeasureReport, - Media, - Medication, - MedicationAdministration, - MedicationDispense, - MedicationRequest, - MedicationStatement, - MessageDefinition, - MessageHeader, - NamingSystem, - NutritionOrder, - Observation, - OperationDefinition, - Organization, - Patient, - PaymentNotice, - PaymentReconciliation, - Person, - PlanDefinition, - Practitioner, - PractitionerRole, - Procedure, - ProcedureRequest, - ProcessRequest, - ProcessResponse, - Provenance, - Questionnaire, - QuestionnaireResponse, - ReferralRequest, - RelatedPerson, - RequestGroup, - ResearchStudy, - ResearchSubject, - RiskAssessment, - Schedule, - SearchParameter, - Sequence, - ServiceDefinition, - Slot, - Specimen, - StructureDefinition, - StructureMap, - Subscription, - Substance, - SupplyDelivery, - SupplyRequest, - Task, - TestReport, - TestScript, - ValueSet, - VisionPrescription, + require('./resource.schema.js'), + require('./account.schema.js'), + require('./activitydefinition.schema.js'), + require('./adverseevent.schema.js'), + require('./allergyintolerance.schema.js'), + require('./appointment.schema.js'), + require('./appointmentresponse.schema.js'), + require('./auditevent.schema.js'), + require('./basic.schema.js'), + require('./binary.schema.js'), + require('./bodysite.schema.js'), + require('./bundle.schema.js'), + require('./capabilitystatement.schema.js'), + require('./careplan.schema.js'), + require('./careteam.schema.js'), + require('./chargeitem.schema.js'), + require('./claim.schema.js'), + require('./claimresponse.schema.js'), + require('./clinicalimpression.schema.js'), + require('./codesystem.schema.js'), + require('./communication.schema.js'), + require('./communicationrequest.schema.js'), + require('./compartmentdefinition.schema.js'), + require('./composition.schema.js'), + require('./conceptmap.schema.js'), + require('./condition.schema.js'), + require('./consent.schema.js'), + require('./contract.schema.js'), + require('./coverage.schema.js'), + require('./dataelement.schema.js'), + require('./detectedissue.schema.js'), + require('./device.schema.js'), + require('./devicecomponent.schema.js'), + require('./devicemetric.schema.js'), + require('./devicerequest.schema.js'), + require('./deviceusestatement.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentmanifest.schema.js'), + require('./documentreference.schema.js'), + require('./domainresource.schema.js'), + require('./eligibilityrequest.schema.js'), + require('./eligibilityresponse.schema.js'), + require('./encounter.schema.js'), + require('./endpoint.schema.js'), + require('./enrollmentrequest.schema.js'), + require('./enrollmentresponse.schema.js'), + require('./episodeofcare.schema.js'), + require('./expansionprofile.schema.js'), + require('./explanationofbenefit.schema.js'), + require('./familymemberhistory.schema.js'), + require('./flag.schema.js'), + require('./goal.schema.js'), + require('./graphdefinition.schema.js'), + require('./group.schema.js'), + require('./guidanceresponse.schema.js'), + require('./healthcareservice.schema.js'), + require('./imagingmanifest.schema.js'), + require('./imagingstudy.schema.js'), + require('./immunization.schema.js'), + require('./immunizationrecommendation.schema.js'), + require('./implementationguide.schema.js'), + require('./library.schema.js'), + require('./linkage.schema.js'), + require('./list.schema.js'), + require('./location.schema.js'), + require('./measure.schema.js'), + require('./measurereport.schema.js'), + require('./media.schema.js'), + require('./medication.schema.js'), + require('./medicationadministration.schema.js'), + require('./medicationdispense.schema.js'), + require('./medicationrequest.schema.js'), + require('./medicationstatement.schema.js'), + require('./messagedefinition.schema.js'), + require('./messageheader.schema.js'), + require('./namingsystem.schema.js'), + require('./nutritionorder.schema.js'), + require('./observation.schema.js'), + require('./operationdefinition.schema.js'), + require('./operationoutcome.schema.js'), + require('./organization.schema.js'), + require('./parameters.schema.js'), + require('./patient.schema.js'), + require('./paymentnotice.schema.js'), + require('./paymentreconciliation.schema.js'), + require('./person.schema.js'), + require('./plandefinition.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./procedure.schema.js'), + require('./procedurerequest.schema.js'), + require('./processrequest.schema.js'), + require('./processresponse.schema.js'), + require('./provenance.schema.js'), + require('./questionnaire.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./referralrequest.schema.js'), + require('./relatedperson.schema.js'), + require('./requestgroup.schema.js'), + require('./researchstudy.schema.js'), + require('./researchsubject.schema.js'), + require('./riskassessment.schema.js'), + require('./schedule.schema.js'), + require('./searchparameter.schema.js'), + require('./sequence.schema.js'), + require('./servicedefinition.schema.js'), + require('./slot.schema.js'), + require('./specimen.schema.js'), + require('./structuredefinition.schema.js'), + require('./structuremap.schema.js'), + require('./subscription.schema.js'), + require('./substance.schema.js'), + require('./supplydelivery.schema.js'), + require('./supplyrequest.schema.js'), + require('./task.schema.js'), + require('./testreport.schema.js'), + require('./testscript.schema.js'), + require('./valueset.schema.js'), + require('./visionprescription.schema.js'), ], resolveType(value) { - if (value && value.resourceType === 'Account') { - return Account; + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'AdverseEvent') { + return require('./adverseevent.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); } - if (value && value.resourceType === 'ActivityDefinition') { - return ActivityDefinition; + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); } - if (value && value.resourceType === 'AdverseEvent') { - return AdverseEvent; + if (data && data.resourceType === 'AppointmentResponse') { + return require('./appointmentresponse.schema.js'); } - if (value && value.resourceType === 'AllergyIntolerance') { - return AllergyIntolerance; + if (data && data.resourceType === 'AuditEvent') { + return require('./auditevent.schema.js'); } - if (value && value.resourceType === 'Appointment') { - return Appointment; + if (data && data.resourceType === 'Basic') { + return require('./basic.schema.js'); } - if (value && value.resourceType === 'AppointmentResponse') { - return AppointmentResponse; + if (data && data.resourceType === 'Binary') { + return require('./binary.schema.js'); } - if (value && value.resourceType === 'AuditEvent') { - return AuditEvent; + if (data && data.resourceType === 'BodySite') { + return require('./bodysite.schema.js'); } - if (value && value.resourceType === 'Basic') { - return Basic; + if (data && data.resourceType === 'Bundle') { + return require('./bundle.schema.js'); } - if (value && value.resourceType === 'Binary') { - return Binary; + if (data && data.resourceType === 'CapabilityStatement') { + return require('./capabilitystatement.schema.js'); } - if (value && value.resourceType === 'BodySite') { - return BodySite; + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); } - if (value && value.resourceType === 'Bundle') { - return Bundle; + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); } - if (value && value.resourceType === 'CapabilityStatement') { - return CapabilityStatement; + if (data && data.resourceType === 'ChargeItem') { + return require('./chargeitem.schema.js'); } - if (value && value.resourceType === 'CarePlan') { - return CarePlan; + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); } - if (value && value.resourceType === 'CareTeam') { - return CareTeam; + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); } - if (value && value.resourceType === 'ChargeItem') { - return ChargeItem; + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); } - if (value && value.resourceType === 'Claim') { - return Claim; + if (data && data.resourceType === 'CodeSystem') { + return require('./codesystem.schema.js'); } - if (value && value.resourceType === 'ClaimResponse') { - return ClaimResponse; + if (data && data.resourceType === 'Communication') { + return require('./communication.schema.js'); } - if (value && value.resourceType === 'ClinicalImpression') { - return ClinicalImpression; + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); } - if (value && value.resourceType === 'CodeSystem') { - return CodeSystem; + if (data && data.resourceType === 'CompartmentDefinition') { + return require('./compartmentdefinition.schema.js'); } - if (value && value.resourceType === 'Communication') { - return Communication; + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); } - if (value && value.resourceType === 'CommunicationRequest') { - return CommunicationRequest; + if (data && data.resourceType === 'ConceptMap') { + return require('./conceptmap.schema.js'); } - if (value && value.resourceType === 'CompartmentDefinition') { - return CompartmentDefinition; + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); } - if (value && value.resourceType === 'Composition') { - return Composition; + if (data && data.resourceType === 'Consent') { + return require('./consent.schema.js'); } - if (value && value.resourceType === 'ConceptMap') { - return ConceptMap; + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); } - if (value && value.resourceType === 'Condition') { - return Condition; + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); } - if (value && value.resourceType === 'Consent') { - return Consent; + if (data && data.resourceType === 'DataElement') { + return require('./dataelement.schema.js'); } - if (value && value.resourceType === 'Contract') { - return Contract; + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); } - if (value && value.resourceType === 'Coverage') { - return Coverage; + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); } - if (value && value.resourceType === 'DataElement') { - return DataElement; + if (data && data.resourceType === 'DeviceComponent') { + return require('./devicecomponent.schema.js'); } - if (value && value.resourceType === 'DetectedIssue') { - return DetectedIssue; + if (data && data.resourceType === 'DeviceMetric') { + return require('./devicemetric.schema.js'); } - if (value && value.resourceType === 'Device') { - return Device; + if (data && data.resourceType === 'DeviceRequest') { + return require('./devicerequest.schema.js'); } - if (value && value.resourceType === 'DeviceComponent') { - return DeviceComponent; + if (data && data.resourceType === 'DeviceUseStatement') { + return require('./deviceusestatement.schema.js'); } - if (value && value.resourceType === 'DeviceMetric') { - return DeviceMetric; + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); } - if (value && value.resourceType === 'DeviceRequest') { - return DeviceRequest; + if (data && data.resourceType === 'DocumentManifest') { + return require('./documentmanifest.schema.js'); } - if (value && value.resourceType === 'DeviceUseStatement') { - return DeviceUseStatement; + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); } - if (value && value.resourceType === 'DiagnosticReport') { - return DiagnosticReport; + if (data && data.resourceType === 'DomainResource') { + return require('./domainresource.schema.js'); } - if (value && value.resourceType === 'DocumentManifest') { - return DocumentManifest; + if (data && data.resourceType === 'EligibilityRequest') { + return require('./eligibilityrequest.schema.js'); } - if (value && value.resourceType === 'DocumentReference') { - return DocumentReference; + if (data && data.resourceType === 'EligibilityResponse') { + return require('./eligibilityresponse.schema.js'); } - if (value && value.resourceType === 'EligibilityRequest') { - return EligibilityRequest; + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); } - if (value && value.resourceType === 'EligibilityResponse') { - return EligibilityResponse; + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); } - if (value && value.resourceType === 'Encounter') { - return Encounter; + if (data && data.resourceType === 'EnrollmentRequest') { + return require('./enrollmentrequest.schema.js'); } - if (value && value.resourceType === 'Endpoint') { - return Endpoint; + if (data && data.resourceType === 'EnrollmentResponse') { + return require('./enrollmentresponse.schema.js'); } - if (value && value.resourceType === 'EnrollmentRequest') { - return EnrollmentRequest; + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); } - if (value && value.resourceType === 'EnrollmentResponse') { - return EnrollmentResponse; + if (data && data.resourceType === 'ExpansionProfile') { + return require('./expansionprofile.schema.js'); } - if (value && value.resourceType === 'EpisodeOfCare') { - return EpisodeOfCare; + if (data && data.resourceType === 'ExplanationOfBenefit') { + return require('./explanationofbenefit.schema.js'); } - if (value && value.resourceType === 'ExpansionProfile') { - return ExpansionProfile; + if (data && data.resourceType === 'FamilyMemberHistory') { + return require('./familymemberhistory.schema.js'); } - if (value && value.resourceType === 'ExplanationOfBenefit') { - return ExplanationOfBenefit; + if (data && data.resourceType === 'Flag') { + return require('./flag.schema.js'); } - if (value && value.resourceType === 'FamilyMemberHistory') { - return FamilyMemberHistory; + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); } - if (value && value.resourceType === 'Flag') { - return Flag; + if (data && data.resourceType === 'GraphDefinition') { + return require('./graphdefinition.schema.js'); } - if (value && value.resourceType === 'Goal') { - return Goal; + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); } - if (value && value.resourceType === 'GraphDefinition') { - return GraphDefinition; + if (data && data.resourceType === 'GuidanceResponse') { + return require('./guidanceresponse.schema.js'); } - if (value && value.resourceType === 'Group') { - return Group; + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); } - if (value && value.resourceType === 'GuidanceResponse') { - return GuidanceResponse; + if (data && data.resourceType === 'ImagingManifest') { + return require('./imagingmanifest.schema.js'); } - if (value && value.resourceType === 'HealthcareService') { - return HealthcareService; + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); } - if (value && value.resourceType === 'ImagingManifest') { - return ImagingManifest; + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); } - if (value && value.resourceType === 'ImagingStudy') { - return ImagingStudy; + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); } - if (value && value.resourceType === 'Immunization') { - return Immunization; + if (data && data.resourceType === 'ImplementationGuide') { + return require('./implementationguide.schema.js'); } - if (value && value.resourceType === 'ImmunizationRecommendation') { - return ImmunizationRecommendation; + if (data && data.resourceType === 'Library') { + return require('./library.schema.js'); } - if (value && value.resourceType === 'ImplementationGuide') { - return ImplementationGuide; + if (data && data.resourceType === 'Linkage') { + return require('./linkage.schema.js'); } - if (value && value.resourceType === 'Library') { - return Library; + if (data && data.resourceType === 'List') { + return require('./list.schema.js'); } - if (value && value.resourceType === 'Linkage') { - return Linkage; + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); } - if (value && value.resourceType === 'List') { - return List; + if (data && data.resourceType === 'Measure') { + return require('./measure.schema.js'); } - if (value && value.resourceType === 'Location') { - return Location; + if (data && data.resourceType === 'MeasureReport') { + return require('./measurereport.schema.js'); } - if (value && value.resourceType === 'Measure') { - return Measure; + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); } - if (value && value.resourceType === 'MeasureReport') { - return MeasureReport; + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); } - if (value && value.resourceType === 'Media') { - return Media; + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); } - if (value && value.resourceType === 'Medication') { - return Medication; + if (data && data.resourceType === 'MedicationDispense') { + return require('./medicationdispense.schema.js'); } - if (value && value.resourceType === 'MedicationAdministration') { - return MedicationAdministration; + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); } - if (value && value.resourceType === 'MedicationDispense') { - return MedicationDispense; + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); } - if (value && value.resourceType === 'MedicationRequest') { - return MedicationRequest; + if (data && data.resourceType === 'MessageDefinition') { + return require('./messagedefinition.schema.js'); } - if (value && value.resourceType === 'MedicationStatement') { - return MedicationStatement; + if (data && data.resourceType === 'MessageHeader') { + return require('./messageheader.schema.js'); } - if (value && value.resourceType === 'MessageDefinition') { - return MessageDefinition; + if (data && data.resourceType === 'NamingSystem') { + return require('./namingsystem.schema.js'); } - if (value && value.resourceType === 'MessageHeader') { - return MessageHeader; + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); } - if (value && value.resourceType === 'NamingSystem') { - return NamingSystem; + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); } - if (value && value.resourceType === 'NutritionOrder') { - return NutritionOrder; + if (data && data.resourceType === 'OperationDefinition') { + return require('./operationdefinition.schema.js'); } - if (value && value.resourceType === 'Observation') { - return Observation; + if (data && data.resourceType === 'OperationOutcome') { + return require('./operationoutcome.schema.js'); } - if (value && value.resourceType === 'OperationDefinition') { - return OperationDefinition; + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); } - if (value && value.resourceType === 'Organization') { - return Organization; + if (data && data.resourceType === 'Parameters') { + return require('./parameters.schema.js'); } - if (value && value.resourceType === 'Patient') { - return Patient; + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); } - if (value && value.resourceType === 'PaymentNotice') { - return PaymentNotice; + if (data && data.resourceType === 'PaymentNotice') { + return require('./paymentnotice.schema.js'); } - if (value && value.resourceType === 'PaymentReconciliation') { - return PaymentReconciliation; + if (data && data.resourceType === 'PaymentReconciliation') { + return require('./paymentreconciliation.schema.js'); } - if (value && value.resourceType === 'Person') { - return Person; + if (data && data.resourceType === 'Person') { + return require('./person.schema.js'); } - if (value && value.resourceType === 'PlanDefinition') { - return PlanDefinition; + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); } - if (value && value.resourceType === 'Practitioner') { - return Practitioner; + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); } - if (value && value.resourceType === 'PractitionerRole') { - return PractitionerRole; + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); } - if (value && value.resourceType === 'Procedure') { - return Procedure; + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); } - if (value && value.resourceType === 'ProcedureRequest') { - return ProcedureRequest; + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); } - if (value && value.resourceType === 'ProcessRequest') { - return ProcessRequest; + if (data && data.resourceType === 'ProcessRequest') { + return require('./processrequest.schema.js'); } - if (value && value.resourceType === 'ProcessResponse') { - return ProcessResponse; + if (data && data.resourceType === 'ProcessResponse') { + return require('./processresponse.schema.js'); } - if (value && value.resourceType === 'Provenance') { - return Provenance; + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); } - if (value && value.resourceType === 'Questionnaire') { - return Questionnaire; + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); } - if (value && value.resourceType === 'QuestionnaireResponse') { - return QuestionnaireResponse; + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); } - if (value && value.resourceType === 'ReferralRequest') { - return ReferralRequest; + if (data && data.resourceType === 'ReferralRequest') { + return require('./referralrequest.schema.js'); } - if (value && value.resourceType === 'RelatedPerson') { - return RelatedPerson; + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); } - if (value && value.resourceType === 'RequestGroup') { - return RequestGroup; + if (data && data.resourceType === 'RequestGroup') { + return require('./requestgroup.schema.js'); } - if (value && value.resourceType === 'ResearchStudy') { - return ResearchStudy; + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); } - if (value && value.resourceType === 'ResearchSubject') { - return ResearchSubject; + if (data && data.resourceType === 'ResearchSubject') { + return require('./researchsubject.schema.js'); } - if (value && value.resourceType === 'RiskAssessment') { - return RiskAssessment; + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); } - if (value && value.resourceType === 'Schedule') { - return Schedule; + if (data && data.resourceType === 'Schedule') { + return require('./schedule.schema.js'); } - if (value && value.resourceType === 'SearchParameter') { - return SearchParameter; + if (data && data.resourceType === 'SearchParameter') { + return require('./searchparameter.schema.js'); } - if (value && value.resourceType === 'Sequence') { - return Sequence; + if (data && data.resourceType === 'Sequence') { + return require('./sequence.schema.js'); } - if (value && value.resourceType === 'ServiceDefinition') { - return ServiceDefinition; + if (data && data.resourceType === 'ServiceDefinition') { + return require('./servicedefinition.schema.js'); } - if (value && value.resourceType === 'Slot') { - return Slot; + if (data && data.resourceType === 'Slot') { + return require('./slot.schema.js'); } - if (value && value.resourceType === 'Specimen') { - return Specimen; + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); } - if (value && value.resourceType === 'StructureDefinition') { - return StructureDefinition; + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); } - if (value && value.resourceType === 'StructureMap') { - return StructureMap; + if (data && data.resourceType === 'StructureMap') { + return require('./structuremap.schema.js'); } - if (value && value.resourceType === 'Subscription') { - return Subscription; + if (data && data.resourceType === 'Subscription') { + return require('./subscription.schema.js'); } - if (value && value.resourceType === 'Substance') { - return Substance; + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); } - if (value && value.resourceType === 'SupplyDelivery') { - return SupplyDelivery; + if (data && data.resourceType === 'SupplyDelivery') { + return require('./supplydelivery.schema.js'); } - if (value && value.resourceType === 'SupplyRequest') { - return SupplyRequest; + if (data && data.resourceType === 'SupplyRequest') { + return require('./supplyrequest.schema.js'); } - if (value && value.resourceType === 'Task') { - return Task; + if (data && data.resourceType === 'Task') { + return require('./task.schema.js'); } - if (value && value.resourceType === 'TestReport') { - return TestReport; + if (data && data.resourceType === 'TestReport') { + return require('./testreport.schema.js'); } - if (value && value.resourceType === 'TestScript') { - return TestScript; + if (data && data.resourceType === 'TestScript') { + return require('./testscript.schema.js'); } - if (value && value.resourceType === 'ValueSet') { - return ValueSet; + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); } - if (value && value.resourceType === 'VisionPrescription') { - return VisionPrescription; + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); } }, }); diff --git a/src/resources/3_0_1/schemas/riskassessment.schema.js b/src/resources/3_0_1/schemas/riskassessment.schema.js index 78d94283..8dee6d28 100644 --- a/src/resources/3_0_1/schemas/riskassessment.schema.js +++ b/src/resources/3_0_1/schemas/riskassessment.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let RiskAssessmentResourceType = new GraphQLEnumType({ - name: 'RiskAssessmentResourceType', - values: { - RiskAssessment: { value: 'RiskAssessment' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,114 +17,269 @@ let RiskAssessmentResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'RiskAssessment', - description: 'Base StructureDefinition for RiskAssessment Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(RiskAssessmentResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Business identifier assigned to the risk assessment.', - }, - basedOn: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for RiskAssessment Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RiskAssessment_Enum_schema', + values: { RiskAssessment: { value: 'RiskAssessment' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: 'Business identifier assigned to the risk assessment.', + }, + basedOn: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentbasedOn_basedOn_Union', description: 'A reference to the request that is fulfilled by this risk assessment.', - }, - parent: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'A reference to the request that is fulfilled by this risk assessment.', + }, + parent: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentparent_parent_Union', description: 'A reference to a resource that this risk assessment is part of, such as a Procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/observation-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the RiskAssessment, using the same statuses as an Observation.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of the RiskAssessment, using the same statuses as an Observation.', - }, - method: { - type: require('./codeableconcept.schema'), - description: - 'The algorithm, process or mechanism used to evaluate the risk.', - }, - code: { - type: require('./codeableconcept.schema'), - description: 'The type of the risk assessment performed.', - }, - subject: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'A reference to a resource that this risk assessment is part of, such as a Procedure.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of the RiskAssessment, using the same statuses as an Observation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/observation-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the RiskAssessment, using the same statuses as an Observation.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'The algorithm, process or mechanism used to evaluate the risk.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The type of the risk assessment performed.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentsubject_subject_Union', description: 'The patient or group the risk assessment applies to.', - }, - context: { - type: require('./reference.schema'), + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: 'The patient or group the risk assessment applies to.', + }, + context: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentcontext_context_Union', description: 'The encounter where the assessment was performed.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - occurrencePeriod: { - type: require('./period.schema'), - description: - 'The date (and possibly time) the risk assessment was performed.', - }, - condition: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: 'The encounter where the assessment was performed.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + condition: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentcondition_condition_Union', description: 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', - }, - performer: { - type: require('./reference.schema'), + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentperformer_performer_Union', description: 'The provider or software application that performed the assessment.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The provider or software application that performed the assessment.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'The reason the risk assessment was performed.', + }, + reasonReference: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentreasonReference_reasonReference_Union', description: 'The reason the risk assessment was performed.', - }, - reasonReference: { - type: require('./reference.schema'), - description: 'The reason the risk assessment was performed.', - }, - basis: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', - }, - prediction: { - type: new GraphQLList(require('./riskassessmentprediction.schema')), - description: 'Describes the expected outcome for the subject.', - }, - mitigation: { - type: GraphQLString, - description: - 'A description of the steps that might be taken to reduce the identified risk(s).', - }, - _mitigation: { - type: require('./element.schema'), - description: - 'A description of the steps that might be taken to reduce the identified risk(s).', - }, - comment: { - type: GraphQLString, - description: 'Additional comments about the risk assessment.', - }, - _comment: { - type: require('./element.schema'), - description: 'Additional comments about the risk assessment.', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'The reason the risk assessment was performed.', + }, + basis: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RiskAssessmentbasis_basis_Union', + description: + 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Indicates the source data considered as part of the assessment (FamilyHistory, Observations, Procedures, Conditions, etc.).', + }, + prediction: { + type: new GraphQLList(require('./riskassessmentprediction.schema.js')), + description: 'Describes the expected outcome for the subject.', + }, + _mitigation: { + type: require('./element.schema.js'), + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + mitigation: { + type: GraphQLString, + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Additional comments about the risk assessment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the risk assessment.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/riskassessmentprediction.schema.js b/src/resources/3_0_1/schemas/riskassessmentprediction.schema.js index a26f4e2b..6509ed32 100644 --- a/src/resources/3_0_1/schemas/riskassessmentprediction.schema.js +++ b/src/resources/3_0_1/schemas/riskassessmentprediction.schema.js @@ -1,73 +1,91 @@ const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLFloat, - GraphQLString, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary RiskAssessment.prediction Schema + * @summary RiskAssessmentprediction Schema */ module.exports = new GraphQLObjectType({ - name: 'RiskAssessmentPrediction', - description: 'Describes the expected outcome for the subject.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - outcome: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', - }, - probabilityDecimal: { - type: GraphQLFloat, - description: 'How likely is the outcome (in the specified timeframe).', - }, - _probabilityDecimal: { - type: require('./element.schema'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - probabilityRange: { - type: require('./range.schema'), - description: 'How likely is the outcome (in the specified timeframe).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/risk-probability - qualitativeRisk: { - type: require('./codeableconcept.schema'), - description: - 'How likely is the outcome (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, high).', - }, - relativeRisk: { - type: GraphQLFloat, - description: - 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', - }, - _relativeRisk: { - type: require('./element.schema'), - description: - 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', - }, - whenPeriod: { - type: require('./period.schema'), - description: - 'Indicates the period of time or age range of the subject to which the specified probability applies.', - }, - whenRange: { - type: require('./range.schema'), - description: - 'Indicates the period of time or age range of the subject to which the specified probability applies.', - }, - rationale: { - type: GraphQLString, - description: - 'Additional information explaining the basis for the prediction.', - }, - _rationale: { - type: require('./element.schema'), - description: - 'Additional information explaining the basis for the prediction.', - }, - }), + name: 'RiskAssessmentprediction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + outcome: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', + }, + _probabilityDecimal: { + type: require('./element.schema.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + probabilityDecimal: { + type: GraphQLFloat, + description: 'How likely is the outcome (in the specified timeframe).', + }, + probabilityRange: { + type: require('./range.schema.js'), + description: 'How likely is the outcome (in the specified timeframe).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/risk-probability + qualitativeRisk: { + type: require('./codeableconcept.schema.js'), + description: + 'How likely is the outcome (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, high).', + }, + _relativeRisk: { + type: require('./element.schema.js'), + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + relativeRisk: { + type: GraphQLFloat, + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + whenPeriod: { + type: require('./period.schema.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + whenRange: { + type: require('./range.schema.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + _rationale: { + type: require('./element.schema.js'), + description: + 'Additional information explaining the basis for the prediction.', + }, + rationale: { + type: GraphQLString, + description: + 'Additional information explaining the basis for the prediction.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/sampleddata.schema.js b/src/resources/3_0_1/schemas/sampleddata.schema.js index 89b4309e..0dff5564 100644 --- a/src/resources/3_0_1/schemas/sampleddata.schema.js +++ b/src/resources/3_0_1/schemas/sampleddata.schema.js @@ -1,12 +1,11 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLFloat, - GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports @@ -14,73 +13,87 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'SampledData', - description: 'Base StructureDefinition for SampledData Type.', - fields: () => - extendSchema(require('./element.schema'), { - origin: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: - 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', - }, - period: { - type: new GraphQLNonNull(GraphQLFloat), - description: - 'The length of time between sampling times, measured in milliseconds.', - }, - _period: { - type: require('./element.schema'), - description: - 'The length of time between sampling times, measured in milliseconds.', - }, - factor: { - type: GraphQLFloat, - description: - 'A correction factor that is applied to the sampled data points before they are added to the origin.', - }, - _factor: { - type: require('./element.schema'), - description: - 'A correction factor that is applied to the sampled data points before they are added to the origin.', - }, - lowerLimit: { - type: GraphQLFloat, - description: - "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", - }, - _lowerLimit: { - type: require('./element.schema'), - description: - "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", - }, - upperLimit: { - type: GraphQLFloat, - description: - "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", - }, - _upperLimit: { - type: require('./element.schema'), - description: - "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", - }, - dimensions: { - type: new GraphQLNonNull(PositiveIntScalar), - description: - 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', - }, - _dimensions: { - type: require('./element.schema'), - description: - 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', - }, - data: { - type: new GraphQLNonNull(GraphQLString), - description: - "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", - }, - _data: { - type: require('./element.schema'), - description: - "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", - }, - }), + description: 'Base StructureDefinition for SampledData Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + origin: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', + }, + _period: { + type: require('./element.schema.js'), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + period: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + factor: { + type: GraphQLFloat, + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + _lowerLimit: { + type: require('./element.schema.js'), + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + lowerLimit: { + type: GraphQLFloat, + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + _upperLimit: { + type: require('./element.schema.js'), + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + upperLimit: { + type: GraphQLFloat, + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + _dimensions: { + type: require('./element.schema.js'), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + dimensions: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + _data: { + type: require('./element.schema.js'), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + data: { + type: new GraphQLNonNull(GraphQLString), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/schedule.schema.js b/src/resources/3_0_1/schemas/schedule.schema.js index 65d1cf3b..e6ade43a 100644 --- a/src/resources/3_0_1/schemas/schedule.schema.js +++ b/src/resources/3_0_1/schemas/schedule.schema.js @@ -1,20 +1,15 @@ const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ScheduleResourceType = new GraphQLEnumType({ - name: 'ScheduleResourceType', - values: { - Schedule: { value: 'Schedule' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,66 +17,162 @@ let ScheduleResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Schedule', - description: 'Base StructureDefinition for Schedule Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ScheduleResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'External Ids for this item.', - }, - active: { - type: GraphQLBoolean, - description: - 'Whether this schedule record is in active use, or should not be used (such as was entered in error).', - }, - _active: { - type: require('./element.schema'), - description: - 'Whether this schedule record is in active use, or should not be used (such as was entered in error).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-category - serviceCategory: { - type: require('./codeableconcept.schema'), - description: - 'A broad categorisation of the service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-type - serviceType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The specific service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', - }, - actor: { - type: new GraphQLList( - new GraphQLNonNull(require('./reference.schema')), + description: 'Base StructureDefinition for Schedule Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Schedule_Enum_schema', + values: { Schedule: { value: 'Schedule' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'External Ids for this item.', + }, + _active: { + type: require('./element.schema.js'), + description: + 'Whether this schedule record is in active use, or should not be used (such as was entered in error).', + }, + active: { + type: GraphQLBoolean, + description: + 'Whether this schedule record is in active use, or should not be used (such as was entered in error).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-category + serviceCategory: { + type: require('./codeableconcept.schema.js'), + description: + 'A broad categorisation of the service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-type + serviceType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specific service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + actor: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Scheduleactor_actor_Union', + description: + 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, PractitionerRole, Device, Patient or RelatedPerson.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), ), - description: - 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, PractitionerRole, Device, Patient or RelatedPerson.', - }, - planningHorizon: { - type: require('./period.schema'), - description: - "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", - }, - comment: { - type: GraphQLString, - description: - 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', - }, - }), + ), + description: + 'The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, PractitionerRole, Device, Patient or RelatedPerson.', + }, + planningHorizon: { + type: require('./period.schema.js'), + description: + "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/searchparameter.schema.js b/src/resources/3_0_1/schemas/searchparameter.schema.js index 5781b5a0..6fa8b70d 100644 --- a/src/resources/3_0_1/schemas/searchparameter.schema.js +++ b/src/resources/3_0_1/schemas/searchparameter.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SearchParameterResourceType = new GraphQLEnumType({ - name: 'SearchParameterResourceType', - values: { - SearchParameter: { value: 'SearchParameter' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,234 +18,291 @@ let SearchParameterResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'SearchParameter', - description: 'Base StructureDefinition for SearchParameter Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SearchParameterResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions).', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this search parameter. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this search parameter. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the search parameter was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the search parameter was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the search parameter.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the search parameter.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate search parameter instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the search parameter is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this search parameter is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this search parameter is needed and why it has been designed as it has.', - }, - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', - }, - _code: { - type: require('./element.schema'), - description: - 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - base: { - type: new GraphQLList(new GraphQLNonNull(CodeScalar)), - description: - 'The base resource type(s) that this search parameter can be used against.', - }, - _base: { - type: require('./element.schema'), - description: - 'The base resource type(s) that this search parameter can be used against.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-param-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - _type: { - type: require('./element.schema'), - description: - 'The type of value a search parameter refers to, and how the content is interpreted.', - }, - derivedFrom: { - type: UriScalar, - description: - 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. I.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', - }, - _derivedFrom: { - type: require('./element.schema'), - description: - 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. I.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', - }, - description: { - type: new GraphQLNonNull(GraphQLString), - description: - "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", - }, - expression: { - type: GraphQLString, - description: - 'A FHIRPath expression that returns a set of elements for the search parameter.', - }, - _expression: { - type: require('./element.schema'), - description: - 'A FHIRPath expression that returns a set of elements for the search parameter.', - }, - xpath: { - type: GraphQLString, - description: - 'An XPath expression that returns a set of elements for the search parameter.', - }, - _xpath: { - type: require('./element.schema'), - description: - 'An XPath expression that returns a set of elements for the search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-xpath-usage - xpathUsage: { - type: CodeScalar, - description: - 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', - }, - _xpathUsage: { - type: require('./element.schema'), - description: - 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/resource-types - target: { - type: new GraphQLList(CodeScalar), - description: 'Types of resource (if a resource is referenced).', - }, - _target: { - type: require('./element.schema'), - description: 'Types of resource (if a resource is referenced).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-comparator - comparator: { - type: new GraphQLList(CodeScalar), - description: 'Comparators supported for the search parameter.', - }, - _comparator: { - type: require('./element.schema'), - description: 'Comparators supported for the search parameter.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/search-modifier-code - modifier: { - type: new GraphQLList(CodeScalar), - description: 'A modifier supported for the search parameter.', - }, - _modifier: { - type: require('./element.schema'), - description: 'A modifier supported for the search parameter.', - }, - chain: { - type: new GraphQLList(GraphQLString), - description: - 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', - }, - _chain: { - type: require('./element.schema'), - description: - 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', - }, - component: { - type: new GraphQLList(require('./searchparametercomponent.schema')), - description: - 'Used to define the parts of a composite search parameter.', - }, - }), + description: 'Base StructureDefinition for SearchParameter Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SearchParameter_Enum_schema', + values: { SearchParameter: { value: 'SearchParameter' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this search parameter is (or will be) published. The URL SHOULD include the major version of the search parameter. For more information see [Technical and Business Versions](resource.html#versions).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this search parameter. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this search parameter. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the search parameter was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the search parameter was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the search parameter.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the search parameter.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate search parameter instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the search parameter is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this search parameter is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this search parameter is needed and why it has been designed as it has.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + _base: { + type: require('./element.schema.js'), + description: + 'The base resource type(s) that this search parameter can be used against.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + base: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'The base resource type(s) that this search parameter can be used against.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-param-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _derivedFrom: { + type: require('./element.schema.js'), + description: + 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. I.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', + }, + derivedFrom: { + type: UriScalar, + description: + 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. I.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + "A free text natural language description of the search parameter from a consumer's perspective. and how it used.", + }, + _expression: { + type: require('./element.schema.js'), + description: + 'A FHIRPath expression that returns a set of elements for the search parameter.', + }, + expression: { + type: GraphQLString, + description: + 'A FHIRPath expression that returns a set of elements for the search parameter.', + }, + _xpath: { + type: require('./element.schema.js'), + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + _xpathUsage: { + type: require('./element.schema.js'), + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-xpath-usage + xpathUsage: { + type: CodeScalar, + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + _target: { + type: require('./element.schema.js'), + description: 'Types of resource (if a resource is referenced).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/resource-types + target: { + type: new GraphQLList(CodeScalar), + description: 'Types of resource (if a resource is referenced).', + }, + _comparator: { + type: require('./element.schema.js'), + description: 'Comparators supported for the search parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-comparator + comparator: { + type: new GraphQLList(CodeScalar), + description: 'Comparators supported for the search parameter.', + }, + _modifier: { + type: require('./element.schema.js'), + description: 'A modifier supported for the search parameter.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/search-modifier-code + modifier: { + type: new GraphQLList(CodeScalar), + description: 'A modifier supported for the search parameter.', + }, + _chain: { + type: require('./element.schema.js'), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', + }, + chain: { + type: new GraphQLList(GraphQLString), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', + }, + component: { + type: new GraphQLList(require('./searchparametercomponent.schema.js')), + description: 'Used to define the parts of a composite search parameter.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/searchparametercomponent.schema.js b/src/resources/3_0_1/schemas/searchparametercomponent.schema.js index ae048377..ff33ddf9 100644 --- a/src/resources/3_0_1/schemas/searchparametercomponent.schema.js +++ b/src/resources/3_0_1/schemas/searchparametercomponent.schema.js @@ -1,30 +1,65 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary SearchParameter.component Schema + * @summary SearchParametercomponent Schema */ module.exports = new GraphQLObjectType({ - name: 'SearchParameterComponent', - description: 'Used to define the parts of a composite search parameter.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - definition: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The definition of the search parameter that describes this part.', - }, - expression: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', - }, - _expression: { - type: require('./element.schema'), - description: - 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', - }, - }), + name: 'SearchParametercomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + definition: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'SearchParametercomponentdefinition_definition_Union', + description: + 'The definition of the search parameter that describes this part.', + types: () => [require('./searchparameter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SearchParameter') { + return require('./searchparameter.schema.js'); + } + }, + }), + ), + description: + 'The definition of the search parameter that describes this part.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', + }, + expression: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/sequence.schema.js b/src/resources/3_0_1/schemas/sequence.schema.js index df1b5b14..75fb9c0a 100644 --- a/src/resources/3_0_1/schemas/sequence.schema.js +++ b/src/resources/3_0_1/schemas/sequence.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLInt, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SequenceResourceType = new GraphQLEnumType({ - name: 'SequenceResourceType', - values: { - Sequence: { value: 'Sequence' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -23,105 +17,213 @@ let SequenceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Sequence', - description: 'Base StructureDefinition for Sequence Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SequenceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A unique identifier for this particular sequence instance. This is a FHIR-defined id.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/sequence-type - type: { - type: CodeScalar, - description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', - }, - _type: { - type: require('./element.schema'), - description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', - }, - coordinateSystem: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', - }, - _coordinateSystem: { - type: require('./element.schema'), - description: - 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for Sequence Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Sequence_Enum_schema', + values: { Sequence: { value: 'Sequence' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'A unique identifier for this particular sequence instance. This is a FHIR-defined id.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/sequence-type + type: { + type: CodeScalar, + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', + }, + _coordinateSystem: { + type: require('./element.schema.js'), + description: + 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', + }, + coordinateSystem: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', + }, + patient: { + type: new GraphQLUnionType({ + name: 'Sequencepatient_patient_Union', description: 'The patient whose sequencing results are described by this resource.', - }, - specimen: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The patient whose sequencing results are described by this resource.', + }, + specimen: { + type: new GraphQLUnionType({ + name: 'Sequencespecimen_specimen_Union', description: 'Specimen used for sequencing.', - }, - device: { - type: require('./reference.schema'), + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + description: 'Specimen used for sequencing.', + }, + device: { + type: new GraphQLUnionType({ + name: 'Sequencedevice_device_Union', description: 'The method for sequencing, for example, chip information.', - }, - performer: { - type: require('./reference.schema'), + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: 'The method for sequencing, for example, chip information.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'Sequenceperformer_performer_Union', description: 'The organization or lab that should be responsible for this result.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The number of copies of the seqeunce of interest. (RNASeq).', - }, - referenceSeq: { - type: require('./sequencereferenceseq.schema'), - description: - 'A sequence that is used as a reference to describe variants that are present in a sequence analyzed.', - }, - variant: { - type: new GraphQLList(require('./sequencevariant.schema')), - description: - 'The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.', - }, - observedSeq: { - type: GraphQLString, - description: - 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.', - }, - _observedSeq: { - type: require('./element.schema'), - description: - 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.', - }, - quality: { - type: new GraphQLList(require('./sequencequality.schema')), - description: - 'An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).', - }, - readCoverage: { - type: GraphQLInt, - description: - 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', - }, - _readCoverage: { - type: require('./element.schema'), - description: - 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', - }, - repository: { - type: new GraphQLList(require('./sequencerepository.schema')), - description: - "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", - }, - pointer: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Pointer to next atomic sequence which at most contains one variant.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization or lab that should be responsible for this result.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The number of copies of the seqeunce of interest. (RNASeq).', + }, + referenceSeq: { + type: require('./sequencereferenceseq.schema.js'), + description: + 'A sequence that is used as a reference to describe variants that are present in a sequence analyzed.', + }, + variant: { + type: new GraphQLList(require('./sequencevariant.schema.js')), + description: + 'The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.', + }, + _observedSeq: { + type: require('./element.schema.js'), + description: + 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.', + }, + observedSeq: { + type: GraphQLString, + description: + 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall starts from referenceSeq.windowStart and end by referenceSeq.windowEnd.', + }, + quality: { + type: new GraphQLList(require('./sequencequality.schema.js')), + description: + 'An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).', + }, + _readCoverage: { + type: require('./element.schema.js'), + description: + 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', + }, + readCoverage: { + type: GraphQLInt, + description: + 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', + }, + repository: { + type: new GraphQLList(require('./sequencerepository.schema.js')), + description: + "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", + }, + pointer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Sequencepointer_pointer_Union', + description: + 'Pointer to next atomic sequence which at most contains one variant.', + types: () => [require('./sequence.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Sequence') { + return require('./sequence.schema.js'); + } + }, + }), + ), + description: + 'Pointer to next atomic sequence which at most contains one variant.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/sequencequality.schema.js b/src/resources/3_0_1/schemas/sequencequality.schema.js index f9fa1de9..cf9d5c61 100644 --- a/src/resources/3_0_1/schemas/sequencequality.schema.js +++ b/src/resources/3_0_1/schemas/sequencequality.schema.js @@ -1,142 +1,160 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary Sequence.quality Schema + * @summary Sequencequality Schema */ module.exports = new GraphQLObjectType({ - name: 'SequenceQuality', - description: - 'An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/quality-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'INDEL / SNP / Undefined variant.', - }, - _type: { - type: require('./element.schema'), - description: 'INDEL / SNP / Undefined variant.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence - standardSequence: { - type: require('./codeableconcept.schema'), - description: 'Gold standard sequence used for comparing against.', - }, - start: { - type: GraphQLInt, - description: - 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - _start: { - type: require('./element.schema'), - description: - 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - end: { - type: GraphQLInt, - description: - 'End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - _end: { - type: require('./element.schema'), - description: - 'End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - score: { - type: require('./quantity.schema'), - description: - 'The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/sequence-quality-method - method: { - type: require('./codeableconcept.schema'), - description: 'Which method is used to get sequence quality.', - }, - truthTP: { - type: GraphQLFloat, - description: - 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', - }, - _truthTP: { - type: require('./element.schema'), - description: - 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', - }, - queryTP: { - type: GraphQLFloat, - description: - 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', - }, - _queryTP: { - type: require('./element.schema'), - description: - 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', - }, - truthFN: { - type: GraphQLFloat, - description: - 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', - }, - _truthFN: { - type: require('./element.schema'), - description: - 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', - }, - queryFP: { - type: GraphQLFloat, - description: - 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', - }, - _queryFP: { - type: require('./element.schema'), - description: - 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', - }, - gtFP: { - type: GraphQLFloat, - description: - 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', - }, - _gtFP: { - type: require('./element.schema'), - description: - 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', - }, - precision: { - type: GraphQLFloat, - description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', - }, - _precision: { - type: require('./element.schema'), - description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', - }, - recall: { - type: GraphQLFloat, - description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', - }, - _recall: { - type: require('./element.schema'), - description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', - }, - fScore: { - type: GraphQLFloat, - description: - 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', - }, - _fScore: { - type: require('./element.schema'), - description: - 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', - }, - }), + name: 'Sequencequality', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'INDEL / SNP / Undefined variant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/quality-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'INDEL / SNP / Undefined variant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence + standardSequence: { + type: require('./codeableconcept.schema.js'), + description: 'Gold standard sequence used for comparing against.', + }, + _start: { + type: require('./element.schema.js'), + description: + 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'End position of the sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + score: { + type: require('./quantity.schema.js'), + description: + 'The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/sequence-quality-method + method: { + type: require('./codeableconcept.schema.js'), + description: 'Which method is used to get sequence quality.', + }, + _truthTP: { + type: require('./element.schema.js'), + description: + 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + truthTP: { + type: GraphQLFloat, + description: + 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + _queryTP: { + type: require('./element.schema.js'), + description: + 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + queryTP: { + type: GraphQLFloat, + description: + 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + _truthFN: { + type: require('./element.schema.js'), + description: + 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', + }, + truthFN: { + type: GraphQLFloat, + description: + 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', + }, + _queryFP: { + type: require('./element.schema.js'), + description: + 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', + }, + queryFP: { + type: GraphQLFloat, + description: + 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', + }, + _gtFP: { + type: require('./element.schema.js'), + description: + 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', + }, + gtFP: { + type: GraphQLFloat, + description: + 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', + }, + _precision: { + type: require('./element.schema.js'), + description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', + }, + precision: { + type: GraphQLFloat, + description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', + }, + _recall: { + type: require('./element.schema.js'), + description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', + }, + recall: { + type: GraphQLFloat, + description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', + }, + _fScore: { + type: require('./element.schema.js'), + description: + 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', + }, + fScore: { + type: GraphQLFloat, + description: + 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/sequencereferenceseq.schema.js b/src/resources/3_0_1/schemas/sequencereferenceseq.schema.js index 07c5043c..a31f4c7e 100644 --- a/src/resources/3_0_1/schemas/sequencereferenceseq.schema.js +++ b/src/resources/3_0_1/schemas/sequencereferenceseq.schema.js @@ -1,86 +1,115 @@ const { - GraphQLObjectType, GraphQLString, + GraphQLList, + GraphQLUnionType, GraphQLInt, GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary Sequence.referenceSeq Schema + * @summary SequencereferenceSeq Schema */ module.exports = new GraphQLObjectType({ - name: 'SequenceReferenceSeq', - description: - 'A sequence that is used as a reference to describe variants that are present in a sequence analyzed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/chromosome-human - chromosome: { - type: require('./codeableconcept.schema'), - description: - 'Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).', - }, - genomeBuild: { - type: GraphQLString, - description: - "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", - }, - _genomeBuild: { - type: require('./element.schema'), - description: - "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/sequence-referenceSeq - referenceSeqId: { - type: require('./codeableconcept.schema'), - description: - 'Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.', - }, - referenceSeqPointer: { - type: require('./reference.schema'), + name: 'SequencereferenceSeq', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/chromosome-human + chromosome: { + type: require('./codeableconcept.schema.js'), + description: + 'Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).', + }, + _genomeBuild: { + type: require('./element.schema.js'), + description: + "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", + }, + genomeBuild: { + type: GraphQLString, + description: + "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/sequence-referenceSeq + referenceSeqId: { + type: require('./codeableconcept.schema.js'), + description: + 'Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.', + }, + referenceSeqPointer: { + type: new GraphQLUnionType({ + name: + 'SequencereferenceSeqreferenceSeqPointer_referenceSeqPointer_Union', description: 'A Pointer to another Sequence entity as reference sequence.', - }, - referenceSeqString: { - type: GraphQLString, - description: "A string like 'ACGT'.", - }, - _referenceSeqString: { - type: require('./element.schema'), - description: "A string like 'ACGT'.", - }, - strand: { - type: GraphQLInt, - description: - "Directionality of DNA sequence. Available values are '1' for the plus strand (5' to 3')/Watson/Sense/positive and '-1' for the minus strand(3' to 5')/Crick/Antisense/negative.", - }, - _strand: { - type: require('./element.schema'), - description: - "Directionality of DNA sequence. Available values are '1' for the plus strand (5' to 3')/Watson/Sense/positive and '-1' for the minus strand(3' to 5')/Crick/Antisense/negative.", - }, - windowStart: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - _windowStart: { - type: require('./element.schema'), - description: - 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - windowEnd: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - _windowEnd: { - type: require('./element.schema'), - description: - 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - }), + types: () => [require('./sequence.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Sequence') { + return require('./sequence.schema.js'); + } + }, + }), + description: + 'A Pointer to another Sequence entity as reference sequence.', + }, + _referenceSeqString: { + type: require('./element.schema.js'), + description: "A string like 'ACGT'.", + }, + referenceSeqString: { + type: GraphQLString, + description: "A string like 'ACGT'.", + }, + _strand: { + type: require('./element.schema.js'), + description: + "Directionality of DNA sequence. Available values are '1' for the plus strand (5' to 3')/Watson/Sense/positive and '-1' for the minus strand(3' to 5')/Crick/Antisense/negative.", + }, + strand: { + type: GraphQLInt, + description: + "Directionality of DNA sequence. Available values are '1' for the plus strand (5' to 3')/Watson/Sense/positive and '-1' for the minus strand(3' to 5')/Crick/Antisense/negative.", + }, + _windowStart: { + type: require('./element.schema.js'), + description: + 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + windowStart: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _windowEnd: { + type: require('./element.schema.js'), + description: + 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + windowEnd: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/sequencerepository.schema.js b/src/resources/3_0_1/schemas/sequencerepository.schema.js index f3f65d91..0e823168 100644 --- a/src/resources/3_0_1/schemas/sequencerepository.schema.js +++ b/src/resources/3_0_1/schemas/sequencerepository.schema.js @@ -1,77 +1,98 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Sequence.repository Schema + * @summary Sequencerepository Schema */ module.exports = new GraphQLObjectType({ - name: 'SequenceRepository', - description: - "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/repository-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', - }, - _type: { - type: require('./element.schema'), - description: - 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', - }, - url: { - type: UriScalar, - description: - 'URI of an external repository which contains further details about the genetics data.', - }, - _url: { - type: require('./element.schema'), - description: - 'URI of an external repository which contains further details about the genetics data.', - }, - name: { - type: GraphQLString, - description: - 'URI of an external repository which contains further details about the genetics data.', - }, - _name: { - type: require('./element.schema'), - description: - 'URI of an external repository which contains further details about the genetics data.', - }, - datasetId: { - type: GraphQLString, - description: - 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', - }, - _datasetId: { - type: require('./element.schema'), - description: - 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', - }, - variantsetId: { - type: GraphQLString, - description: - 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', - }, - _variantsetId: { - type: require('./element.schema'), - description: - 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', - }, - readsetId: { - type: GraphQLString, - description: 'Id of the read in this external repository.', - }, - _readsetId: { - type: require('./element.schema'), - description: 'Id of the read in this external repository.', - }, - }), + name: 'Sequencerepository', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/repository-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + url: { + type: UriScalar, + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + name: { + type: GraphQLString, + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + _datasetId: { + type: require('./element.schema.js'), + description: + 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', + }, + datasetId: { + type: GraphQLString, + description: + 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', + }, + _variantsetId: { + type: require('./element.schema.js'), + description: + 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', + }, + variantsetId: { + type: GraphQLString, + description: + 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', + }, + _readsetId: { + type: require('./element.schema.js'), + description: 'Id of the read in this external repository.', + }, + readsetId: { + type: GraphQLString, + description: 'Id of the read in this external repository.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/sequencevariant.schema.js b/src/resources/3_0_1/schemas/sequencevariant.schema.js index 51ce7b0d..327596e8 100644 --- a/src/resources/3_0_1/schemas/sequencevariant.schema.js +++ b/src/resources/3_0_1/schemas/sequencevariant.schema.js @@ -1,71 +1,103 @@ -const { GraphQLObjectType, GraphQLInt, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Sequence.variant Schema + * @summary Sequencevariant Schema */ module.exports = new GraphQLObjectType({ - name: 'SequenceVariant', - description: - 'The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - start: { - type: GraphQLInt, - description: - 'Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - _start: { - type: require('./element.schema'), - description: - 'Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.', - }, - end: { - type: GraphQLInt, - description: - 'End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - _end: { - type: require('./element.schema'), - description: - 'End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', - }, - observedAllele: { - type: GraphQLString, - description: - 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', - }, - _observedAllele: { - type: require('./element.schema'), - description: - 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', - }, - referenceAllele: { - type: GraphQLString, - description: - 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', - }, - _referenceAllele: { - type: require('./element.schema'), - description: - 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', - }, - cigar: { - type: GraphQLString, - description: - 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', - }, - _cigar: { - type: require('./element.schema'), - description: - 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', - }, - variantPointer: { - type: require('./reference.schema'), + name: 'Sequencevariant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _start: { + type: require('./element.schema.js'), + description: + 'Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + _observedAllele: { + type: require('./element.schema.js'), + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + observedAllele: { + type: GraphQLString, + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + _referenceAllele: { + type: require('./element.schema.js'), + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + referenceAllele: { + type: GraphQLString, + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + _cigar: { + type: require('./element.schema.js'), + description: + 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', + }, + cigar: { + type: GraphQLString, + description: + 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', + }, + variantPointer: { + type: new GraphQLUnionType({ + name: 'SequencevariantvariantPointer_variantPointer_Union', description: 'A pointer to an Observation containing variant information.', - }, - }), + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + description: + 'A pointer to an Observation containing variant information.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/servicedefinition.schema.js b/src/resources/3_0_1/schemas/servicedefinition.schema.js index f0a76b55..894c603c 100644 --- a/src/resources/3_0_1/schemas/servicedefinition.schema.js +++ b/src/resources/3_0_1/schemas/servicedefinition.schema.js @@ -1,24 +1,17 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ServiceDefinitionResourceType = new GraphQLEnumType({ - name: 'ServiceDefinitionResourceType', - values: { - ServiceDefinition: { value: 'ServiceDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports @@ -26,210 +19,278 @@ let ServiceDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ServiceDefinition', - description: 'Base StructureDefinition for ServiceDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ServiceDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the service definition.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the service definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this service definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this service definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the service definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the service definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the service definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the service definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the service definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the service definition.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the service definition from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the service definition from a consumer's perspective.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this service definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this service definition is needed and why it has been designed as it has.', - }, - usage: { - type: GraphQLString, - description: - 'A detailed description of how the module is used from a clinical perspective.', - }, - _usage: { - type: require('./element.schema'), - description: - 'A detailed description of how the module is used from a clinical perspective.', - }, - approvalDate: { - type: DateScalar, - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - _approvalDate: { - type: require('./element.schema'), - description: - 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', - }, - lastReviewDate: { - type: DateScalar, - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - _lastReviewDate: { - type: require('./element.schema'), - description: - "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", - }, - effectivePeriod: { - type: require('./period.schema'), - description: - 'The period during which the service definition content was or is planned to be in active use.', - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate service definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the service definition is intended to be used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/definition-topic - topic: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.', - }, - contributor: { - type: new GraphQLList(require('./contributor.schema')), - description: - 'A contributor to the content of the module, including authors, editors, reviewers, and endorsers.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.', - }, - relatedArtifact: { - type: new GraphQLList(require('./relatedartifact.schema')), - description: - 'Related resources such as additional documentation, justification, or bibliographic references.', - }, - trigger: { - type: new GraphQLList(require('./triggerdefinition.schema')), - description: - 'The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.', - }, - dataRequirement: { - type: new GraphQLList(require('./datarequirement.schema')), - description: - 'Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.', - }, - operationDefinition: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for ServiceDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ServiceDefinition_Enum_schema', + values: { ServiceDefinition: { value: 'ServiceDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this service definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this service definition is (or will be) published. The URL SHOULD include the major version of the service definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this service definition when it is represented in other formats, or referenced in a specification, model, design or an instance. This is used for CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the service definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the service definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the service definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the service definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the service definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this service definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this service definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this service definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the service definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the service definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the service definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the service definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the service definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the service definition.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the service definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the service definition from a consumer's perspective.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this service definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this service definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the module is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the module is used from a clinical perspective.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + lastReviewDate: { + type: DateScalar, + description: + "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the service definition content was or is planned to be in active use.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate service definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the service definition is intended to be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/definition-topic + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.', + }, + contributor: { + type: new GraphQLList(require('./contributor.schema.js')), + description: + 'A contributor to the content of the module, including authors, editors, reviewers, and endorsers.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the service definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the service definition.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related resources such as additional documentation, justification, or bibliographic references.', + }, + trigger: { + type: new GraphQLList(require('./triggerdefinition.schema.js')), + description: + 'The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: + 'Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.', + }, + operationDefinition: { + type: new GraphQLUnionType({ + name: 'ServiceDefinitionoperationDefinition_operationDefinition_Union', description: 'A reference to the operation that is used to invoke this service.', - }, - }), + types: () => [require('./operationdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationDefinition') { + return require('./operationdefinition.schema.js'); + } + }, + }), + description: + 'A reference to the operation that is used to invoke this service.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/signature.schema.js b/src/resources/3_0_1/schemas/signature.schema.js index 006d93ef..f884e200 100644 --- a/src/resources/3_0_1/schemas/signature.schema.js +++ b/src/resources/3_0_1/schemas/signature.schema.js @@ -1,10 +1,14 @@ -const InstantScalar = require('../scalars/instant.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); /** * @name exports @@ -12,72 +16,144 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Signature', - description: 'Base StructureDefinition for Signature Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/signature-type - type: { - type: new GraphQLList(new GraphQLNonNull(require('./coding.schema'))), - description: - 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', - }, - when: { - type: new GraphQLNonNull(InstantScalar), - description: 'When the digital signature was signed.', - }, - _when: { - type: require('./element.schema'), - description: 'When the digital signature was signed.', - }, - whoUri: { - type: new GraphQLNonNull(UriScalar), - description: - 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', - }, - _whoUri: { - type: require('./element.schema'), - description: - 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', - }, - whoReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', - }, - onBehalfOfUri: { - type: UriScalar, - description: - 'A reference to an application-usable description of the identity that is represented by the signature.', - }, - _onBehalfOfUri: { - type: require('./element.schema'), + description: 'Base StructureDefinition for Signature Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/signature-type + type: { + type: new GraphQLList(new GraphQLNonNull(require('./coding.schema.js'))), + description: + 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', + }, + _when: { + type: require('./element.schema.js'), + description: 'When the digital signature was signed.', + }, + when: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the digital signature was signed.', + }, + _whoUri: { + type: require('./element.schema.js'), + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + }, + whoUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + }, + whoReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'SignaturewhoReference_whoReference_Union', + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + }, + _onBehalfOfUri: { + type: require('./element.schema.js'), + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + }, + onBehalfOfUri: { + type: UriScalar, + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + }, + onBehalfOfReference: { + type: new GraphQLUnionType({ + name: 'SignatureonBehalfOfReference_onBehalfOfReference_Union', description: 'A reference to an application-usable description of the identity that is represented by the signature.', - }, - onBehalfOfReference: { - type: require('./reference.schema'), - description: - 'A reference to an application-usable description of the identity that is represented by the signature.', - }, - contentType: { - type: CodeScalar, - description: - 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.', - }, - _contentType: { - type: require('./element.schema'), - description: - 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.', - }, - blob: { - type: Base64BinaryScalar, - description: - 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', - }, - _blob: { - type: require('./element.schema'), - description: - 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', - }, - }), + types: () => [ + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.', + }, + contentType: { + type: CodeScalar, + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.', + }, + _blob: { + type: require('./element.schema.js'), + description: + 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', + }, + blob: { + type: Base64BinaryScalar, + description: + 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/simplequantity.schema.js b/src/resources/3_0_1/schemas/simplequantity.schema.js index 03143a75..1b9b0e5f 100644 --- a/src/resources/3_0_1/schemas/simplequantity.schema.js +++ b/src/resources/3_0_1/schemas/simplequantity.schema.js @@ -1,13 +1,11 @@ const { GraphQLObjectType } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports * @summary SimpleQuantity Schema */ module.exports = new GraphQLObjectType({ name: 'SimpleQuantity', - description: 'A fixed quantity (no comparator).', - fields: () => extendSchema(require('./quantity.schema')), + description: 'A fixed quantity (no comparator)', + fields: () => ({}), }); diff --git a/src/resources/3_0_1/schemas/slot.schema.js b/src/resources/3_0_1/schemas/slot.schema.js index 59dac6f0..1f6aaccd 100644 --- a/src/resources/3_0_1/schemas/slot.schema.js +++ b/src/resources/3_0_1/schemas/slot.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, GraphQLBoolean, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SlotResourceType = new GraphQLEnumType({ - name: 'SlotResourceType', - values: { - Slot: { value: 'Slot' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -24,92 +18,162 @@ let SlotResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Slot', - description: 'Base StructureDefinition for Slot Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SlotResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'External Ids for this item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-category - serviceCategory: { - type: require('./codeableconcept.schema'), - description: - 'A broad categorisation of the service that is to be performed during this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/service-type - serviceType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes - specialty: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0276 - appointmentType: { - type: require('./codeableconcept.schema'), - description: - 'The style of appointment or patient that may be booked in the slot (not service type).', - }, - schedule: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The schedule resource that this slot defines an interval of status information.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/slotstatus - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', - }, - _status: { - type: require('./element.schema'), - description: - 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', - }, - start: { - type: new GraphQLNonNull(InstantScalar), - description: 'Date/Time that the slot is to begin.', - }, - _start: { - type: require('./element.schema'), - description: 'Date/Time that the slot is to begin.', - }, - end: { - type: new GraphQLNonNull(InstantScalar), - description: 'Date/Time that the slot is to conclude.', - }, - _end: { - type: require('./element.schema'), - description: 'Date/Time that the slot is to conclude.', - }, - overbooked: { - type: GraphQLBoolean, - description: - 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', - }, - _overbooked: { - type: require('./element.schema'), - description: - 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', - }, - comment: { - type: GraphQLString, - description: - 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', - }, - }), + description: 'Base StructureDefinition for Slot Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Slot_Enum_schema', + values: { Slot: { value: 'Slot' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'External Ids for this item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-category + serviceCategory: { + type: require('./codeableconcept.schema.js'), + description: + 'A broad categorisation of the service that is to be performed during this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/service-type + serviceType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/c80-practice-codes + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0276 + appointmentType: { + type: require('./codeableconcept.schema.js'), + description: + 'The style of appointment or patient that may be booked in the slot (not service type).', + }, + schedule: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Slotschedule_schedule_Union', + description: + 'The schedule resource that this slot defines an interval of status information.', + types: () => [require('./schedule.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Schedule') { + return require('./schedule.schema.js'); + } + }, + }), + ), + description: + 'The schedule resource that this slot defines an interval of status information.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/slotstatus + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', + }, + _start: { + type: require('./element.schema.js'), + description: 'Date/Time that the slot is to begin.', + }, + start: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to begin.', + }, + _end: { + type: require('./element.schema.js'), + description: 'Date/Time that the slot is to conclude.', + }, + end: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to conclude.', + }, + _overbooked: { + type: require('./element.schema.js'), + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + overbooked: { + type: GraphQLBoolean, + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/specimen.schema.js b/src/resources/3_0_1/schemas/specimen.schema.js index 8bc19dc2..73c5e373 100644 --- a/src/resources/3_0_1/schemas/specimen.schema.js +++ b/src/resources/3_0_1/schemas/specimen.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SpecimenResourceType = new GraphQLEnumType({ - name: 'SpecimenResourceType', - values: { - Specimen: { value: 'Specimen' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,79 +16,185 @@ let SpecimenResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Specimen', - description: 'Base StructureDefinition for Specimen Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SpecimenResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Id for specimen.', - }, - accessionIdentifier: { - type: require('./identifier.schema'), - description: - 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-status - status: { - type: CodeScalar, - description: 'The availability of the specimen.', - }, - _status: { - type: require('./element.schema'), - description: 'The availability of the specimen.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0487 - type: { - type: require('./codeableconcept.schema'), - description: 'The kind of material that forms the specimen.', - }, - subject: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', - }, - receivedTime: { - type: DateTimeScalar, - description: - 'Time when specimen was received for processing or testing.', - }, - _receivedTime: { - type: require('./element.schema'), - description: - 'Time when specimen was received for processing or testing.', - }, - parent: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', - }, - request: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Details concerning a test or procedure request that required a specimen to be collected.', - }, - collection: { - type: require('./specimencollection.schema'), - description: 'Details concerning the specimen collection.', - }, - processing: { - type: new GraphQLList(require('./specimenprocessing.schema')), - description: - 'Details concerning processing and processing steps for the specimen.', - }, - container: { - type: new GraphQLList(require('./specimencontainer.schema')), - description: - 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).', - }, - }), + description: 'Base StructureDefinition for Specimen Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Specimen_Enum_schema', + values: { Specimen: { value: 'Specimen' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Id for specimen.', + }, + accessionIdentifier: { + type: require('./identifier.schema.js'), + description: + 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The availability of the specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-status + status: { + type: CodeScalar, + description: 'The availability of the specimen.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0487 + type: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of material that forms the specimen.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Specimensubject_subject_Union', + description: + 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'Where the specimen came from. This may be from the patient(s) or from the environment or a device.', + }, + _receivedTime: { + type: require('./element.schema.js'), + description: 'Time when specimen was received for processing or testing.', + }, + receivedTime: { + type: DateTimeScalar, + description: 'Time when specimen was received for processing or testing.', + }, + parent: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Specimenparent_parent_Union', + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + }, + request: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Specimenrequest_request_Union', + description: + 'Details concerning a test or procedure request that required a specimen to be collected.', + types: () => [require('./procedurerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ProcedureRequest') { + return require('./procedurerequest.schema.js'); + } + }, + }), + ), + description: + 'Details concerning a test or procedure request that required a specimen to be collected.', + }, + collection: { + type: require('./specimencollection.schema.js'), + description: 'Details concerning the specimen collection.', + }, + processing: { + type: new GraphQLList(require('./specimenprocessing.schema.js')), + description: + 'Details concerning processing and processing steps for the specimen.', + }, + container: { + type: new GraphQLList(require('./specimencontainer.schema.js')), + description: + 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/specimencollection.schema.js b/src/resources/3_0_1/schemas/specimencollection.schema.js index 49643681..fcb49973 100644 --- a/src/resources/3_0_1/schemas/specimencollection.schema.js +++ b/src/resources/3_0_1/schemas/specimencollection.schema.js @@ -1,52 +1,83 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Specimen.collection Schema + * @summary Specimencollection Schema */ module.exports = new GraphQLObjectType({ - name: 'SpecimenCollection', - description: 'Details concerning the specimen collection.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - collector: { - type: require('./reference.schema'), + name: 'Specimencollection', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + collector: { + type: new GraphQLUnionType({ + name: 'Specimencollectioncollector_collector_Union', description: 'Person who collected the specimen.', - }, - collectedDateTime: { - type: DateTimeScalar, - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - _collectedDateTime: { - type: require('./element.schema'), - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - collectedPeriod: { - type: require('./period.schema'), - description: - 'Time when specimen was collected from subject - the physiologically relevant time.', - }, - quantity: { - type: require('./quantity.schema'), - description: - 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-collection-method - method: { - type: require('./codeableconcept.schema'), - description: - 'A coded value specifying the technique that is used to perform the procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/body-site - bodySite: { - type: require('./codeableconcept.schema'), - description: - 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', - }, - }), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: 'Person who collected the specimen.', + }, + _collectedDateTime: { + type: require('./element.schema.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedDateTime: { + type: DateTimeScalar, + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedPeriod: { + type: require('./period.schema.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-collection-method + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value specifying the technique that is used to perform the procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/body-site + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/specimencontainer.schema.js b/src/resources/3_0_1/schemas/specimencontainer.schema.js index 2b5d0146..50c9909f 100644 --- a/src/resources/3_0_1/schemas/specimencontainer.schema.js +++ b/src/resources/3_0_1/schemas/specimencontainer.schema.js @@ -1,57 +1,88 @@ -const { GraphQLObjectType, GraphQLList, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Specimen.container Schema + * @summary Specimencontainer Schema */ module.exports = new GraphQLObjectType({ - name: 'SpecimenContainer', - description: - 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", - }, - description: { - type: GraphQLString, - description: 'Textual description of the container.', - }, - _description: { - type: require('./element.schema'), - description: 'Textual description of the container.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-container-type - type: { - type: require('./codeableconcept.schema'), - description: - 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', - }, - capacity: { - type: require('./quantity.schema'), - description: - 'The capacity (volume or other measure) the container may contain.', - }, - specimenQuantity: { - type: require('./quantity.schema'), - description: - 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 - additiveCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 - additiveReference: { - type: require('./reference.schema'), + name: 'Specimencontainer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.schema.js')), + description: + "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", + }, + _description: { + type: require('./element.schema.js'), + description: 'Textual description of the container.', + }, + description: { + type: GraphQLString, + description: 'Textual description of the container.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-container-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', + }, + capacity: { + type: require('./quantity.schema.js'), + description: + 'The capacity (volume or other measure) the container may contain.', + }, + specimenQuantity: { + type: require('./quantity.schema.js'), + description: + 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 + additiveCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/v2-0371 + additiveReference: { + type: new GraphQLUnionType({ + name: 'SpecimencontaineradditiveReference_additiveReference_Union', description: 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', - }, - }), + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/specimenprocessing.schema.js b/src/resources/3_0_1/schemas/specimenprocessing.schema.js index 990517be..88d35ac9 100644 --- a/src/resources/3_0_1/schemas/specimenprocessing.schema.js +++ b/src/resources/3_0_1/schemas/specimenprocessing.schema.js @@ -1,50 +1,82 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Specimen.processing Schema + * @summary Specimenprocessing Schema */ module.exports = new GraphQLObjectType({ - name: 'SpecimenProcessing', - description: - 'Details concerning processing and processing steps for the specimen.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - description: { - type: GraphQLString, - description: 'Textual description of procedure.', - }, - _description: { - type: require('./element.schema'), - description: 'Textual description of procedure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/specimen-processing-procedure - procedure: { - type: require('./codeableconcept.schema'), - description: - 'A coded value specifying the procedure used to process the specimen.', - }, - additive: { - type: new GraphQLList(require('./reference.schema')), - description: 'Material used in the processing step.', - }, - timeDateTime: { - type: DateTimeScalar, - description: - 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', - }, - _timeDateTime: { - type: require('./element.schema'), - description: - 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', - }, - timePeriod: { - type: require('./period.schema'), - description: - 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', - }, - }), + name: 'Specimenprocessing', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Textual description of procedure.', + }, + description: { + type: GraphQLString, + description: 'Textual description of procedure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/specimen-processing-procedure + procedure: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value specifying the procedure used to process the specimen.', + }, + additive: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Specimenprocessingadditive_additive_Union', + description: 'Material used in the processing step.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'Material used in the processing step.', + }, + _timeDateTime: { + type: require('./element.schema.js'), + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + timeDateTime: { + type: DateTimeScalar, + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + timePeriod: { + type: require('./period.schema.js'), + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuredefinition.schema.js b/src/resources/3_0_1/schemas/structuredefinition.schema.js index afe63d87..1c940c75 100644 --- a/src/resources/3_0_1/schemas/structuredefinition.schema.js +++ b/src/resources/3_0_1/schemas/structuredefinition.schema.js @@ -1,24 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let StructureDefinitionResourceType = new GraphQLEnumType({ - name: 'StructureDefinitionResourceType', - values: { - StructureDefinition: { value: 'StructureDefinition' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -26,256 +18,314 @@ let StructureDefinitionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'StructureDefinition', - description: 'Base StructureDefinition for StructureDefinition Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(StructureDefinitionResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. The URL SHOULD include the major version of the structure definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. The URL SHOULD include the major version of the structure definition. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the structure definition.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the structure definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this structure definition. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this structure definition. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the structure definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the structure definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the structure definition.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the structure definition.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the structure definition from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the structure definition from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate structure definition instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the structure definition is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this structure definition is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this structure definition is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/profile-code - keyword: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates.', - }, - fhirVersion: { - type: IdScalar, - description: - 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', - }, - _fhirVersion: { - type: require('./element.schema'), - description: - 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', - }, - mapping: { - type: new GraphQLList(require('./structuredefinitionmapping.schema')), - description: 'An external specification that the content is mapped to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/structure-definition-kind - kind: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Defines the kind of structure that this definition is describing.', - }, - _kind: { - type: require('./element.schema'), - description: - 'Defines the kind of structure that this definition is describing.', - }, - abstract: { - type: new GraphQLNonNull(GraphQLBoolean), - description: - 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', - }, - _abstract: { - type: require('./element.schema'), - description: - 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/extension-context - contextType: { - type: CodeScalar, - description: - 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', - }, - _contextType: { - type: require('./element.schema'), - description: - 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', - }, - context: { - type: new GraphQLList(GraphQLString), - description: - 'Identifies the types of resource or data type elements to which the extension can be applied.', - }, - _context: { - type: require('./element.schema'), - description: - 'Identifies the types of resource or data type elements to which the extension can be applied.', - }, - contextInvariant: { - type: new GraphQLList(GraphQLString), - description: - 'A set of rules as Fluent Invariants about when the extension can be used (e.g. co-occurrence variants for the extension).', - }, - _contextInvariant: { - type: require('./element.schema'), - description: - 'A set of rules as Fluent Invariants about when the extension can be used (e.g. co-occurrence variants for the extension).', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - type: { - type: new GraphQLNonNull(CodeScalar), - description: - "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).", - }, - _type: { - type: require('./element.schema'), - description: - "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).", - }, - baseDefinition: { - type: UriScalar, - description: - 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', - }, - _baseDefinition: { - type: require('./element.schema'), - description: - 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/type-derivation-rule - derivation: { - type: CodeScalar, - description: 'How the type relates to the baseDefinition.', - }, - _derivation: { - type: require('./element.schema'), - description: 'How the type relates to the baseDefinition.', - }, - snapshot: { - type: require('./structuredefinitionsnapshot.schema'), - description: - 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', - }, - differential: { - type: require('./structuredefinitiondifferential.schema'), - description: - 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', - }, - }), + description: 'Base StructureDefinition for StructureDefinition Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureDefinition_Enum_schema', + values: { StructureDefinition: { value: 'StructureDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. The URL SHOULD include the major version of the structure definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published. The URL SHOULD include the major version of the structure definition. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the structure definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the structure definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this structure definition. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this structure definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the structure definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the structure definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the structure definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the structure definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the structure definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the structure definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate structure definition instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the structure definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this structure definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this structure definition is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/profile-code + keyword: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', + }, + fhirVersion: { + type: IdScalar, + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 3.0.1 for this version.', + }, + mapping: { + type: new GraphQLList(require('./structuredefinitionmapping.schema.js')), + description: 'An external specification that the content is mapped to.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'Defines the kind of structure that this definition is describing.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/structure-definition-kind + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines the kind of structure that this definition is describing.', + }, + _abstract: { + type: require('./element.schema.js'), + description: + 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', + }, + abstract: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', + }, + _contextType: { + type: require('./element.schema.js'), + description: + 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/extension-context + contextType: { + type: CodeScalar, + description: + 'If this is an extension, Identifies the context within FHIR resources where the extension can be used.', + }, + _context: { + type: require('./element.schema.js'), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + context: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + _contextInvariant: { + type: require('./element.schema.js'), + description: + 'A set of rules as Fluent Invariants about when the extension can be used (e.g. co-occurrence variants for the extension).', + }, + contextInvariant: { + type: new GraphQLList(GraphQLString), + description: + 'A set of rules as Fluent Invariants about when the extension can be used (e.g. co-occurrence variants for the extension).', + }, + _type: { + type: require('./element.schema.js'), + description: + "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).", + }, + _baseDefinition: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', + }, + baseDefinition: { + type: UriScalar, + description: + 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', + }, + _derivation: { + type: require('./element.schema.js'), + description: 'How the type relates to the baseDefinition.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/type-derivation-rule + derivation: { + type: CodeScalar, + description: 'How the type relates to the baseDefinition.', + }, + snapshot: { + type: require('./structuredefinitionsnapshot.schema.js'), + description: + 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', + }, + differential: { + type: require('./structuredefinitiondifferential.schema.js'), + description: + 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuredefinitiondifferential.schema.js b/src/resources/3_0_1/schemas/structuredefinitiondifferential.schema.js index b15988d7..a9ca5d41 100644 --- a/src/resources/3_0_1/schemas/structuredefinitiondifferential.schema.js +++ b/src/resources/3_0_1/schemas/structuredefinitiondifferential.schema.js @@ -1,23 +1,43 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary StructureDefinition.differential Schema + * @summary StructureDefinitiondifferential Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureDefinitionDifferential', - description: - 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.schema')), - ), - description: - 'Captures constraints on each element within the resource.', - }, - }), + name: 'StructureDefinitiondifferential', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.schema.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuredefinitionmapping.schema.js b/src/resources/3_0_1/schemas/structuredefinitionmapping.schema.js index 143e74be..1aee169a 100644 --- a/src/resources/3_0_1/schemas/structuredefinitionmapping.schema.js +++ b/src/resources/3_0_1/schemas/structuredefinitionmapping.schema.js @@ -1,55 +1,77 @@ -const IdScalar = require('../scalars/id.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary StructureDefinition.mapping Schema + * @summary StructureDefinitionmapping Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureDefinitionMapping', - description: 'An external specification that the content is mapped to.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identity: { - type: new GraphQLNonNull(IdScalar), - description: - 'An Internal id that is used to identify this mapping set when specific mappings are made.', - }, - _identity: { - type: require('./element.schema'), - description: - 'An Internal id that is used to identify this mapping set when specific mappings are made.', - }, - uri: { - type: UriScalar, - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - _uri: { - type: require('./element.schema'), - description: - 'An absolute URI that identifies the specification that this mapping is expressed to.', - }, - name: { - type: GraphQLString, - description: 'A name for the specification that is being mapped to.', - }, - _name: { - type: require('./element.schema'), - description: 'A name for the specification that is being mapped to.', - }, - comment: { - type: GraphQLString, - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - _comment: { - type: require('./element.schema'), - description: - 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', - }, - }), + name: 'StructureDefinitionmapping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _identity: { + type: require('./element.schema.js'), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comment: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuredefinitionsnapshot.schema.js b/src/resources/3_0_1/schemas/structuredefinitionsnapshot.schema.js index 907fa136..0592af8b 100644 --- a/src/resources/3_0_1/schemas/structuredefinitionsnapshot.schema.js +++ b/src/resources/3_0_1/schemas/structuredefinitionsnapshot.schema.js @@ -1,23 +1,43 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary StructureDefinition.snapshot Schema + * @summary StructureDefinitionsnapshot Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureDefinitionSnapshot', - description: - 'A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - element: { - type: new GraphQLList( - new GraphQLNonNull(require('./elementdefinition.schema')), - ), - description: - 'Captures constraints on each element within the resource.', - }, - }), + name: 'StructureDefinitionsnapshot', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.schema.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremap.schema.js b/src/resources/3_0_1/schemas/structuremap.schema.js index 5569bb24..3b4d747f 100644 --- a/src/resources/3_0_1/schemas/structuremap.schema.js +++ b/src/resources/3_0_1/schemas/structuremap.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let StructureMapResourceType = new GraphQLEnumType({ - name: 'StructureMapResourceType', - values: { - StructureMap: { value: 'StructureMap' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,164 +18,222 @@ let StructureMapResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'StructureMap', - description: 'Base StructureDefinition for StructureMap Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(StructureMapResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the structure map.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the structure map.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this structure map. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this structure map. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the structure map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the structure map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the structure map.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the structure map.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the structure map from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the structure map from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate structure map instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the structure map is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this structure map is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this structure map is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', - }, - structure: { - type: new GraphQLList(require('./structuremapstructure.schema')), - description: - 'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.', - }, - import: { - type: new GraphQLList(UriScalar), - description: 'Other maps used by this map (canonical URLs).', - }, - _import: { - type: require('./element.schema'), - description: 'Other maps used by this map (canonical URLs).', - }, - group: { - type: new GraphQLList( - new GraphQLNonNull(require('./structuremapgroup.schema')), - ), - description: - 'Organizes the mapping into managable chunks for human review/ease of maintenance.', - }, - }), + description: 'Base StructureDefinition for StructureMap Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureMap_Enum_schema', + values: { StructureMap: { value: 'StructureMap' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the structure map.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the structure map.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this structure map. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this structure map. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the structure map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the structure map was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the structure map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the structure map.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the structure map from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the structure map from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate structure map instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the structure map is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this structure map is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this structure map is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', + }, + structure: { + type: new GraphQLList(require('./structuremapstructure.schema.js')), + description: + 'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.', + }, + _import: { + type: require('./element.schema.js'), + description: 'Other maps used by this map (canonical URLs).', + }, + import: { + type: new GraphQLList(UriScalar), + description: 'Other maps used by this map (canonical URLs).', + }, + group: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgroup.schema.js')), + ), + description: + 'Organizes the mapping into managable chunks for human review/ease of maintenance.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremapgroup.schema.js b/src/resources/3_0_1/schemas/structuremapgroup.schema.js index 89c35e15..15ab2a87 100644 --- a/src/resources/3_0_1/schemas/structuremapgroup.schema.js +++ b/src/resources/3_0_1/schemas/structuremapgroup.schema.js @@ -1,75 +1,91 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary StructureMap.group Schema + * @summary StructureMapgroup Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureMapGroup', - description: - 'Organizes the mapping into managable chunks for human review/ease of maintenance.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(IdScalar), - description: - 'A unique name for the group for the convenience of human readers.', - }, - _name: { - type: require('./element.schema'), - description: - 'A unique name for the group for the convenience of human readers.', - }, - extends: { - type: IdScalar, - description: 'Another group that this group adds rules to.', - }, - _extends: { - type: require('./element.schema'), - description: 'Another group that this group adds rules to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-group-type-mode - typeMode: { - type: new GraphQLNonNull(CodeScalar), - description: - 'If this is the default rule set to apply for thie source type, or this combination of types.', - }, - _typeMode: { - type: require('./element.schema'), - description: - 'If this is the default rule set to apply for thie source type, or this combination of types.', - }, - documentation: { - type: GraphQLString, - description: - 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', - }, - input: { - type: new GraphQLList( - new GraphQLNonNull(require('./structuremapgroupinput.schema')), - ), - description: - 'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.', - }, - rule: { - type: new GraphQLList( - new GraphQLNonNull(require('./structuremapgrouprule.schema')), - ), - description: 'Transform Rule from source to target.', - }, - }), + name: 'StructureMapgroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A unique name for the group for the convenience of human readers.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: + 'A unique name for the group for the convenience of human readers.', + }, + _extends: { + type: require('./element.schema.js'), + description: 'Another group that this group adds rules to.', + }, + extends: { + type: IdScalar, + description: 'Another group that this group adds rules to.', + }, + _typeMode: { + type: require('./element.schema.js'), + description: + 'If this is the default rule set to apply for thie source type, or this combination of types.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-group-type-mode + typeMode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'If this is the default rule set to apply for thie source type, or this combination of types.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', + }, + input: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgroupinput.schema.js')), + ), + description: + 'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.', + }, + rule: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgrouprule.schema.js')), + ), + description: 'Transform Rule from source to target.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremapgroupinput.schema.js b/src/resources/3_0_1/schemas/structuremapgroupinput.schema.js index b04d0286..dc3a9107 100644 --- a/src/resources/3_0_1/schemas/structuremapgroupinput.schema.js +++ b/src/resources/3_0_1/schemas/structuremapgroupinput.schema.js @@ -1,51 +1,72 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary StructureMap.group.input Schema + * @summary StructureMapgroupinput Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureMapGroupInput', - description: - 'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(IdScalar), - description: 'Name for this instance of data.', - }, - _name: { - type: require('./element.schema'), - description: 'Name for this instance of data.', - }, - type: { - type: GraphQLString, - description: 'Type for this instance of data.', - }, - _type: { - type: require('./element.schema'), - description: 'Type for this instance of data.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-input-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: 'Mode for this instance of data.', - }, - _mode: { - type: require('./element.schema'), - description: 'Mode for this instance of data.', - }, - documentation: { - type: GraphQLString, - description: 'Documentation for this instance of data.', - }, - _documentation: { - type: require('./element.schema'), - description: 'Documentation for this instance of data.', - }, - }), + name: 'StructureMapgroupinput', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Name for this instance of data.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name for this instance of data.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Type for this instance of data.', + }, + type: { + type: GraphQLString, + description: 'Type for this instance of data.', + }, + _mode: { + type: require('./element.schema.js'), + description: 'Mode for this instance of data.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-input-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'Mode for this instance of data.', + }, + _documentation: { + type: require('./element.schema.js'), + description: 'Documentation for this instance of data.', + }, + documentation: { + type: GraphQLString, + description: 'Documentation for this instance of data.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremapgrouprule.schema.js b/src/resources/3_0_1/schemas/structuremapgrouprule.schema.js index 1578896e..d8c6c74a 100644 --- a/src/resources/3_0_1/schemas/structuremapgrouprule.schema.js +++ b/src/resources/3_0_1/schemas/structuremapgrouprule.schema.js @@ -1,53 +1,70 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule Schema + * @summary StructureMapgrouprule Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureMapGroupRule', - description: 'Transform Rule from source to target.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(IdScalar), - description: 'Name of the rule for internal references.', - }, - _name: { - type: require('./element.schema'), - description: 'Name of the rule for internal references.', - }, - source: { - type: new GraphQLList( - new GraphQLNonNull(require('./structuremapgrouprulesource.schema')), - ), - description: 'Source inputs to the mapping.', - }, - target: { - type: new GraphQLList(require('./structuremapgroupruletarget.schema')), - description: 'Content to create because of this mapping rule.', - }, - dependent: { - type: new GraphQLList( - require('./structuremapgroupruledependent.schema'), - ), - description: 'Which other rules to apply in the context of this rule.', - }, - documentation: { - type: GraphQLString, - description: 'Documentation for this instance of data.', - }, - _documentation: { - type: require('./element.schema'), - description: 'Documentation for this instance of data.', - }, - }), + name: 'StructureMapgrouprule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Name of the rule for internal references.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name of the rule for internal references.', + }, + source: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgrouprulesource.schema.js')), + ), + description: 'Source inputs to the mapping.', + }, + target: { + type: new GraphQLList(require('./structuremapgroupruletarget.schema.js')), + description: 'Content to create because of this mapping rule.', + }, + dependent: { + type: new GraphQLList( + require('./structuremapgroupruledependent.schema.js'), + ), + description: 'Which other rules to apply in the context of this rule.', + }, + _documentation: { + type: require('./element.schema.js'), + description: 'Documentation for this instance of data.', + }, + documentation: { + type: GraphQLString, + description: 'Documentation for this instance of data.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremapgroupruledependent.schema.js b/src/resources/3_0_1/schemas/structuremapgroupruledependent.schema.js index d5ea7082..9a6d1b7f 100644 --- a/src/resources/3_0_1/schemas/structuremapgroupruledependent.schema.js +++ b/src/resources/3_0_1/schemas/structuremapgroupruledependent.schema.js @@ -1,37 +1,54 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, - GraphQLList, GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule.dependent Schema + * @summary StructureMapgroupruledependent Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureMapGroupRuleDependent', - description: 'Which other rules to apply in the context of this rule.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(IdScalar), - description: 'Name of a rule or group to apply.', - }, - _name: { - type: require('./element.schema'), - description: 'Name of a rule or group to apply.', - }, - variable: { - type: new GraphQLList(new GraphQLNonNull(GraphQLString)), - description: 'Variable to pass to the rule or group.', - }, - _variable: { - type: require('./element.schema'), - description: 'Variable to pass to the rule or group.', - }, - }), + name: 'StructureMapgroupruledependent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Name of a rule or group to apply.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name of a rule or group to apply.', + }, + _variable: { + type: require('./element.schema.js'), + description: 'Variable to pass to the rule or group.', + }, + variable: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: 'Variable to pass to the rule or group.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremapgrouprulesource.schema.js b/src/resources/3_0_1/schemas/structuremapgrouprulesource.schema.js index d890d474..0b7c20d8 100644 --- a/src/resources/3_0_1/schemas/structuremapgrouprulesource.schema.js +++ b/src/resources/3_0_1/schemas/structuremapgrouprulesource.schema.js @@ -1,386 +1,405 @@ -const IdScalar = require('../scalars/id.scalar'); -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLString, GraphQLBoolean, GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule.source Schema + * @summary StructureMapgrouprulesource Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureMapGroupRuleSource', - description: 'Source inputs to the mapping.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - context: { - type: new GraphQLNonNull(IdScalar), - description: 'Type or variable this rule applies to.', - }, - _context: { - type: require('./element.schema'), - description: 'Type or variable this rule applies to.', - }, - min: { - type: GraphQLInt, - description: - 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', - }, - _min: { - type: require('./element.schema'), - description: - 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', - }, - max: { - type: GraphQLString, - description: - "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", - }, - _max: { - type: require('./element.schema'), - description: - "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", - }, - type: { - type: GraphQLString, - description: - 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', - }, - _type: { - type: require('./element.schema'), - description: - 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', - }, - defaultValueBase64Binary: { - type: Base64BinaryScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueBase64Binary: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueBoolean: { - type: GraphQLBoolean, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueBoolean: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueCode: { - type: CodeScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueCode: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDate: { - type: DateScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueDate: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDateTime: { - type: DateTimeScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueDateTime: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDecimal: { - type: GraphQLFloat, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueDecimal: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueId: { - type: IdScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueId: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueInstant: { - type: InstantScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueInstant: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueInteger: { - type: GraphQLInt, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueInteger: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueMarkdown: { - type: GraphQLString, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueMarkdown: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueOid: { - type: OidScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueOid: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValuePositiveInt: { - type: PositiveIntScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValuePositiveInt: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueString: { - type: GraphQLString, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueString: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueTime: { - type: TimeScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueTime: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueUnsignedInt: { - type: UnsignedIntScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueUnsignedInt: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueUri: { - type: UriScalar, - description: - 'A value to use if there is no existing value in the source object.', - }, - _defaultValueUri: { - type: require('./element.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueAddress: { - type: require('./address.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueAge: { - type: require('./age.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueAnnotation: { - type: require('./annotation.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueAttachment: { - type: require('./attachment.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueCoding: { - type: require('./coding.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueContactPoint: { - type: require('./contactpoint.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueCount: { - type: require('./count.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDistance: { - type: require('./distance.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueDuration: { - type: require('./duration.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueHumanName: { - type: require('./humanname.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueIdentifier: { - type: require('./identifier.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueMoney: { - type: require('./money.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValuePeriod: { - type: require('./period.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueQuantity: { - type: require('./quantity.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueRange: { - type: require('./range.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueRatio: { - type: require('./ratio.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueReference: { - type: require('./reference.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueSampledData: { - type: require('./sampleddata.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueSignature: { - type: require('./signature.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueTiming: { - type: require('./timing.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - defaultValueMeta: { - type: require('./meta.schema'), - description: - 'A value to use if there is no existing value in the source object.', - }, - element: { - type: GraphQLString, - description: 'Optional field for this source.', - }, - _element: { - type: require('./element.schema'), - description: 'Optional field for this source.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-source-list-mode - listMode: { - type: CodeScalar, - description: 'How to handle the list mode for this element.', - }, - _listMode: { - type: require('./element.schema'), - description: 'How to handle the list mode for this element.', - }, - variable: { - type: IdScalar, - description: 'Named context for field, if a field is specified.', - }, - _variable: { - type: require('./element.schema'), - description: 'Named context for field, if a field is specified.', - }, - condition: { - type: GraphQLString, - description: - 'FHIRPath expression - must be true or the rule does not apply.', - }, - _condition: { - type: require('./element.schema'), - description: - 'FHIRPath expression - must be true or the rule does not apply.', - }, - check: { - type: GraphQLString, - description: - 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', - }, - _check: { - type: require('./element.schema'), - description: - 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', - }, - }), + name: 'StructureMapgrouprulesource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _context: { + type: require('./element.schema.js'), + description: 'Type or variable this rule applies to.', + }, + context: { + type: new GraphQLNonNull(IdScalar), + description: 'Type or variable this rule applies to.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', + }, + min: { + type: GraphQLInt, + description: + 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', + }, + _max: { + type: require('./element.schema.js'), + description: + "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", + }, + max: { + type: GraphQLString, + description: + "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", + }, + _type: { + type: require('./element.schema.js'), + description: + 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', + }, + type: { + type: GraphQLString, + description: + 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', + }, + _defaultValueBase64Binary: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueBoolean: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueCode: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCode: { + type: CodeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDate: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDate: { + type: DateScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDateTime: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDecimal: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueId: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueId: { + type: IdScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueInstant: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueInstant: { + type: InstantScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueInteger: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueInteger: { + type: GraphQLInt, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueMarkdown: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueOid: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueOid: { + type: OidScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValuePositiveInt: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueString: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueString: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueTime: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTime: { + type: TimeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUri: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUri: { + type: UriScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAddress: { + type: require('./address.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAge: { + type: require('./age.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAnnotation: { + type: require('./annotation.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAttachment: { + type: require('./attachment.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCoding: { + type: require('./coding.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCount: { + type: require('./count.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDistance: { + type: require('./distance.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDuration: { + type: require('./duration.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueHumanName: { + type: require('./humanname.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMoney: { + type: require('./money.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValuePeriod: { + type: require('./period.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueQuantity: { + type: require('./quantity.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRange: { + type: require('./range.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRatio: { + type: require('./ratio.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueReference: { + type: require('./resourcelist.schema'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueSignature: { + type: require('./signature.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTiming: { + type: require('./timing.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMeta: { + type: require('./meta.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + _element: { + type: require('./element.schema.js'), + description: 'Optional field for this source.', + }, + element: { + type: GraphQLString, + description: 'Optional field for this source.', + }, + _listMode: { + type: require('./element.schema.js'), + description: 'How to handle the list mode for this element.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-source-list-mode + listMode: { + type: CodeScalar, + description: 'How to handle the list mode for this element.', + }, + _variable: { + type: require('./element.schema.js'), + description: 'Named context for field, if a field is specified.', + }, + variable: { + type: IdScalar, + description: 'Named context for field, if a field is specified.', + }, + _condition: { + type: require('./element.schema.js'), + description: + 'FHIRPath expression - must be true or the rule does not apply.', + }, + condition: { + type: GraphQLString, + description: + 'FHIRPath expression - must be true or the rule does not apply.', + }, + _check: { + type: require('./element.schema.js'), + description: + 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', + }, + check: { + type: GraphQLString, + description: + 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremapgroupruletarget.schema.js b/src/resources/3_0_1/schemas/structuremapgroupruletarget.schema.js index cd0bb097..a04b94ef 100644 --- a/src/resources/3_0_1/schemas/structuremapgroupruletarget.schema.js +++ b/src/resources/3_0_1/schemas/structuremapgroupruletarget.schema.js @@ -1,84 +1,101 @@ -const IdScalar = require('../scalars/id.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule.target Schema + * @summary StructureMapgroupruletarget Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureMapGroupRuleTarget', - description: 'Content to create because of this mapping rule.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - context: { - type: IdScalar, - description: 'Type or variable this rule applies to.', - }, - _context: { - type: require('./element.schema'), - description: 'Type or variable this rule applies to.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-context-type - contextType: { - type: CodeScalar, - description: 'How to interpret the context.', - }, - _contextType: { - type: require('./element.schema'), - description: 'How to interpret the context.', - }, - element: { - type: GraphQLString, - description: 'Field to create in the context.', - }, - _element: { - type: require('./element.schema'), - description: 'Field to create in the context.', - }, - variable: { - type: IdScalar, - description: - 'Named context for field, if desired, and a field is specified.', - }, - _variable: { - type: require('./element.schema'), - description: - 'Named context for field, if desired, and a field is specified.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-target-list-mode - listMode: { - type: new GraphQLList(CodeScalar), - description: 'If field is a list, how to manage the list.', - }, - _listMode: { - type: require('./element.schema'), - description: 'If field is a list, how to manage the list.', - }, - listRuleId: { - type: IdScalar, - description: 'Internal rule reference for shared list items.', - }, - _listRuleId: { - type: require('./element.schema'), - description: 'Internal rule reference for shared list items.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-transform - transform: { - type: CodeScalar, - description: 'How the data is copied / created.', - }, - _transform: { - type: require('./element.schema'), - description: 'How the data is copied / created.', - }, - parameter: { - type: new GraphQLList( - require('./structuremapgroupruletargetparameter.schema'), - ), - description: 'Parameters to the transform.', - }, - }), + name: 'StructureMapgroupruletarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _context: { + type: require('./element.schema.js'), + description: 'Type or variable this rule applies to.', + }, + context: { + type: IdScalar, + description: 'Type or variable this rule applies to.', + }, + _contextType: { + type: require('./element.schema.js'), + description: 'How to interpret the context.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-context-type + contextType: { + type: CodeScalar, + description: 'How to interpret the context.', + }, + _element: { + type: require('./element.schema.js'), + description: 'Field to create in the context.', + }, + element: { + type: GraphQLString, + description: 'Field to create in the context.', + }, + _variable: { + type: require('./element.schema.js'), + description: + 'Named context for field, if desired, and a field is specified.', + }, + variable: { + type: IdScalar, + description: + 'Named context for field, if desired, and a field is specified.', + }, + _listMode: { + type: require('./element.schema.js'), + description: 'If field is a list, how to manage the list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-target-list-mode + listMode: { + type: new GraphQLList(CodeScalar), + description: 'If field is a list, how to manage the list.', + }, + _listRuleId: { + type: require('./element.schema.js'), + description: 'Internal rule reference for shared list items.', + }, + listRuleId: { + type: IdScalar, + description: 'Internal rule reference for shared list items.', + }, + _transform: { + type: require('./element.schema.js'), + description: 'How the data is copied / created.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-transform + transform: { + type: CodeScalar, + description: 'How the data is copied / created.', + }, + parameter: { + type: new GraphQLList( + require('./structuremapgroupruletargetparameter.schema.js'), + ), + description: 'Parameters to the transform.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremapgroupruletargetparameter.schema.js b/src/resources/3_0_1/schemas/structuremapgroupruletargetparameter.schema.js index 354d6396..9100f8fd 100644 --- a/src/resources/3_0_1/schemas/structuremapgroupruletargetparameter.schema.js +++ b/src/resources/3_0_1/schemas/structuremapgroupruletargetparameter.schema.js @@ -1,63 +1,81 @@ -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary StructureMap.group.rule.target.parameter Schema + * @summary StructureMapgroupruletargetparameter Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureMapGroupRuleTargetParameter', - description: 'Parameters to the transform.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - valueId: { - type: new GraphQLNonNull(IdScalar), - description: 'Parameter value - variable or literal.', - }, - _valueId: { - type: require('./element.schema'), - description: 'Parameter value - variable or literal.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: 'Parameter value - variable or literal.', - }, - _valueString: { - type: require('./element.schema'), - description: 'Parameter value - variable or literal.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'Parameter value - variable or literal.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: 'Parameter value - variable or literal.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: 'Parameter value - variable or literal.', - }, - _valueInteger: { - type: require('./element.schema'), - description: 'Parameter value - variable or literal.', - }, - valueDecimal: { - type: new GraphQLNonNull(GraphQLFloat), - description: 'Parameter value - variable or literal.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: 'Parameter value - variable or literal.', - }, - }), + name: 'StructureMapgroupruletargetparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _valueId: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'Parameter value - variable or literal.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'Parameter value - variable or literal.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Parameter value - variable or literal.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'Parameter value - variable or literal.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'Parameter value - variable or literal.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/structuremapstructure.schema.js b/src/resources/3_0_1/schemas/structuremapstructure.schema.js index 2232a6e3..2516eaee 100644 --- a/src/resources/3_0_1/schemas/structuremapstructure.schema.js +++ b/src/resources/3_0_1/schemas/structuremapstructure.schema.js @@ -1,53 +1,74 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary StructureMap.structure Schema + * @summary StructureMapstructure Schema */ module.exports = new GraphQLObjectType({ - name: 'StructureMapStructure', - description: - 'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: 'The canonical URL that identifies the structure.', - }, - _url: { - type: require('./element.schema'), - description: 'The canonical URL that identifies the structure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/map-model-mode - mode: { - type: new GraphQLNonNull(CodeScalar), - description: 'How the referenced structure is used in this mapping.', - }, - _mode: { - type: require('./element.schema'), - description: 'How the referenced structure is used in this mapping.', - }, - alias: { - type: GraphQLString, - description: 'The name used for this type in the map.', - }, - _alias: { - type: require('./element.schema'), - description: 'The name used for this type in the map.', - }, - documentation: { - type: GraphQLString, - description: - 'Documentation that describes how the structure is used in the mapping.', - }, - _documentation: { - type: require('./element.schema'), - description: - 'Documentation that describes how the structure is used in the mapping.', - }, - }), + name: 'StructureMapstructure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _url: { + type: require('./element.schema.js'), + description: 'The canonical URL that identifies the structure.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'The canonical URL that identifies the structure.', + }, + _mode: { + type: require('./element.schema.js'), + description: 'How the referenced structure is used in this mapping.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/map-model-mode + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the referenced structure is used in this mapping.', + }, + _alias: { + type: require('./element.schema.js'), + description: 'The name used for this type in the map.', + }, + alias: { + type: GraphQLString, + description: 'The name used for this type in the map.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Documentation that describes how the structure is used in the mapping.', + }, + documentation: { + type: GraphQLString, + description: + 'Documentation that describes how the structure is used in the mapping.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/subscription.schema.js b/src/resources/3_0_1/schemas/subscription.schema.js index 40dd5b47..0ec96933 100644 --- a/src/resources/3_0_1/schemas/subscription.schema.js +++ b/src/resources/3_0_1/schemas/subscription.schema.js @@ -1,21 +1,15 @@ -const CodeScalar = require('../scalars/code.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SubscriptionResourceType = new GraphQLEnumType({ - name: 'SubscriptionResourceType', - values: { - Subscription: { value: 'Subscription' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); /** * @name exports @@ -23,75 +17,133 @@ let SubscriptionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Subscription', - description: 'Base StructureDefinition for Subscription Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SubscriptionResourceType), - description: 'Type of this resource.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of the subscription, which marks the server state for managing the subscription.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of the subscription, which marks the server state for managing the subscription.', - }, - contact: { - type: new GraphQLList(require('./contactpoint.schema')), - description: - 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', - }, - end: { - type: InstantScalar, - description: 'The time for the server to turn the subscription off.', - }, - _end: { - type: require('./element.schema'), - description: 'The time for the server to turn the subscription off.', - }, - reason: { - type: new GraphQLNonNull(GraphQLString), - description: 'A description of why this subscription is defined.', - }, - _reason: { - type: require('./element.schema'), - description: 'A description of why this subscription is defined.', - }, - criteria: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The rules that the server should use to determine when to generate notifications for this subscription.', - }, - _criteria: { - type: require('./element.schema'), - description: - 'The rules that the server should use to determine when to generate notifications for this subscription.', - }, - error: { - type: GraphQLString, - description: - 'A record of the last error that occurred when the server processed a notification.', - }, - _error: { - type: require('./element.schema'), - description: - 'A record of the last error that occurred when the server processed a notification.', - }, - channel: { - type: new GraphQLNonNull(require('./subscriptionchannel.schema')), - description: - 'Details where to send notifications when resources are received that meet the criteria.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-tag - tag: { - type: new GraphQLList(require('./coding.schema')), - description: - 'A tag to add to any resource that matches the criteria, after the subscription is processed.', - }, - }), + description: 'Base StructureDefinition for Subscription Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Subscription_Enum_schema', + values: { Subscription: { value: 'Subscription' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + _end: { + type: require('./element.schema.js'), + description: 'The time for the server to turn the subscription off.', + }, + end: { + type: InstantScalar, + description: 'The time for the server to turn the subscription off.', + }, + _reason: { + type: require('./element.schema.js'), + description: 'A description of why this subscription is defined.', + }, + reason: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of why this subscription is defined.', + }, + _criteria: { + type: require('./element.schema.js'), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + criteria: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + _error: { + type: require('./element.schema.js'), + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + error: { + type: GraphQLString, + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + channel: { + type: new GraphQLNonNull(require('./subscriptionchannel.schema.js')), + description: + 'Details where to send notifications when resources are received that meet the criteria.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-tag + tag: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A tag to add to any resource that matches the criteria, after the subscription is processed.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/subscriptionchannel.schema.js b/src/resources/3_0_1/schemas/subscriptionchannel.schema.js index ecb8fdc6..7d030d51 100644 --- a/src/resources/3_0_1/schemas/subscriptionchannel.schema.js +++ b/src/resources/3_0_1/schemas/subscriptionchannel.schema.js @@ -1,62 +1,78 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Subscription.channel Schema + * @summary Subscriptionchannel Schema */ module.exports = new GraphQLObjectType({ - name: 'SubscriptionChannel', - description: - 'Details where to send notifications when resources are received that meet the criteria.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/subscription-channel-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of channel to send notifications on.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of channel to send notifications on.', - }, - endpoint: { - type: UriScalar, - description: - 'The uri that describes the actual end-point to send messages to.', - }, - _endpoint: { - type: require('./element.schema'), - description: - 'The uri that describes the actual end-point to send messages to.', - }, - payload: { - type: GraphQLString, - description: - 'The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification.', - }, - _payload: { - type: require('./element.schema'), - description: - 'The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification.', - }, - header: { - type: new GraphQLList(GraphQLString), - description: - 'Additional headers / information to send as part of the notification.', - }, - _header: { - type: require('./element.schema'), - description: - 'Additional headers / information to send as part of the notification.', - }, - }), + name: 'Subscriptionchannel', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of channel to send notifications on.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/subscription-channel-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of channel to send notifications on.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: + 'The uri that describes the actual end-point to send messages to.', + }, + endpoint: { + type: UriScalar, + description: + 'The uri that describes the actual end-point to send messages to.', + }, + _payload: { + type: require('./element.schema.js'), + description: + 'The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification.', + }, + payload: { + type: GraphQLString, + description: + 'The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification.', + }, + _header: { + type: require('./element.schema.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: new GraphQLList(GraphQLString), + description: + 'Additional headers / information to send as part of the notification.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/substance.schema.js b/src/resources/3_0_1/schemas/substance.schema.js index 0d13bb12..bdec8e81 100644 --- a/src/resources/3_0_1/schemas/substance.schema.js +++ b/src/resources/3_0_1/schemas/substance.schema.js @@ -1,20 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SubstanceResourceType = new GraphQLEnumType({ - name: 'SubstanceResourceType', - values: { - Substance: { value: 'Substance' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports @@ -22,55 +16,113 @@ let SubstanceResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Substance', - description: 'Base StructureDefinition for Substance Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SubstanceResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'Unique identifier for the substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-status - status: { - type: CodeScalar, - description: 'A code to indicate if the substance is actively used.', - }, - _status: { - type: require('./element.schema'), - description: 'A code to indicate if the substance is actively used.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-category - category: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - code: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'A code (or set of codes) that identify this substance.', - }, - description: { - type: GraphQLString, - description: - 'A description of the substance - its appearance, handling requirements, and other usage notes.', - }, - _description: { - type: require('./element.schema'), - description: - 'A description of the substance - its appearance, handling requirements, and other usage notes.', - }, - instance: { - type: new GraphQLList(require('./substanceinstance.schema')), - description: - 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', - }, - ingredient: { - type: new GraphQLList(require('./substanceingredient.schema')), - description: 'A substance can be composed of other substances.', - }, - }), + description: 'Base StructureDefinition for Substance Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Substance_Enum_schema', + values: { Substance: { value: 'Substance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'Unique identifier for the substance.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code to indicate if the substance is actively used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-status + status: { + type: CodeScalar, + description: 'A code to indicate if the substance is actively used.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-category + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code (or set of codes) that identify this substance.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + description: { + type: GraphQLString, + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + instance: { + type: new GraphQLList(require('./substanceinstance.schema.js')), + description: + 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', + }, + ingredient: { + type: new GraphQLList(require('./substanceingredient.schema.js')), + description: 'A substance can be composed of other substances.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/substanceingredient.schema.js b/src/resources/3_0_1/schemas/substanceingredient.schema.js index b29b6d7c..4a98544a 100644 --- a/src/resources/3_0_1/schemas/substanceingredient.schema.js +++ b/src/resources/3_0_1/schemas/substanceingredient.schema.js @@ -1,30 +1,66 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Substance.ingredient Schema + * @summary Substanceingredient Schema */ module.exports = new GraphQLObjectType({ - name: 'SubstanceIngredient', - description: 'A substance can be composed of other substances.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - quantity: { - type: require('./ratio.schema'), - description: - 'The amount of the ingredient in the substance - a concentration ratio.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - substanceCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'Another substance that is a component of this substance.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/substance-code - substanceReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'Another substance that is a component of this substance.', - }, - }), + name: 'Substanceingredient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + quantity: { + type: require('./ratio.schema.js'), + description: + 'The amount of the ingredient in the substance - a concentration ratio.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + substanceCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Another substance that is a component of this substance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/substance-code + substanceReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'SubstanceingredientsubstanceReference_substanceReference_Union', + description: + 'Another substance that is a component of this substance.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'Another substance that is a component of this substance.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/substanceinstance.schema.js b/src/resources/3_0_1/schemas/substanceinstance.schema.js index 4daf0d40..5055478f 100644 --- a/src/resources/3_0_1/schemas/substanceinstance.schema.js +++ b/src/resources/3_0_1/schemas/substanceinstance.schema.js @@ -1,36 +1,52 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary Substance.instance Schema + * @summary Substanceinstance Schema */ module.exports = new GraphQLObjectType({ - name: 'SubstanceInstance', - description: - 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: require('./identifier.schema'), - description: - 'Identifier associated with the package/container (usually a label affixed directly).', - }, - expiry: { - type: DateTimeScalar, - description: - 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', - }, - _expiry: { - type: require('./element.schema'), - description: - 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', - }, - quantity: { - type: require('./quantity.schema'), - description: 'The amount of the substance.', - }, - }), + name: 'Substanceinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./identifier.schema.js'), + description: + 'Identifier associated with the package/container (usually a label affixed directly).', + }, + _expiry: { + type: require('./element.schema.js'), + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + expiry: { + type: DateTimeScalar, + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount of the substance.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/supplydelivery.schema.js b/src/resources/3_0_1/schemas/supplydelivery.schema.js index a1a48634..a81037ac 100644 --- a/src/resources/3_0_1/schemas/supplydelivery.schema.js +++ b/src/resources/3_0_1/schemas/supplydelivery.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SupplyDeliveryResourceType = new GraphQLEnumType({ - name: 'SupplyDeliveryResourceType', - values: { - SupplyDelivery: { value: 'SupplyDelivery' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,81 +16,216 @@ let SupplyDeliveryResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'SupplyDelivery', - description: 'Base StructureDefinition for SupplyDelivery Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SupplyDeliveryResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Identifier assigned by the dispensing facility when the item(s) is dispensed.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A plan, proposal or order that is fulfilled in whole or in part by this event.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: - 'A larger event of which this particular event is a component or step.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-status - status: { - type: CodeScalar, - description: 'A code specifying the state of the dispense event.', - }, - _status: { - type: require('./element.schema'), - description: 'A code specifying the state of the dispense event.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for SupplyDelivery Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyDelivery_Enum_schema', + values: { SupplyDelivery: { value: 'SupplyDelivery' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Identifier assigned by the dispensing facility when the item(s) is dispensed.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyDeliverybasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + types: () => [require('./supplyrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SupplyRequest') { + return require('./supplyrequest.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyDeliverypartOf_partOf_Union', + description: + 'A larger event of which this particular event is a component or step.', + types: () => [ + require('./supplydelivery.schema.js'), + require('./contract.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'SupplyDelivery') { + return require('./supplydelivery.schema.js'); + } + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code specifying the state of the dispense event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-status + status: { + type: CodeScalar, + description: 'A code specifying the state of the dispense event.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverypatient_patient_Union', description: 'A link to a resource representing the person whom the delivered item is for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-type - type: { - type: require('./codeableconcept.schema'), - description: - 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', - }, - suppliedItem: { - type: require('./supplydeliverysupplieditem.schema'), - description: 'The item that is being delivered or has been supplied.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'The date or time(s) the activity occurred.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: 'The date or time(s) the activity occurred.', - }, - occurrencePeriod: { - type: require('./period.schema'), - description: 'The date or time(s) the activity occurred.', - }, - occurrenceTiming: { - type: require('./timing.schema'), - description: 'The date or time(s) the activity occurred.', - }, - supplier: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person whom the delivered item is for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplydelivery-type + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + suppliedItem: { + type: require('./supplydeliverysupplieditem.schema.js'), + description: 'The item that is being delivered or has been supplied.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'The date or time(s) the activity occurred.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The date or time(s) the activity occurred.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'The date or time(s) the activity occurred.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: 'The date or time(s) the activity occurred.', + }, + supplier: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverysupplier_supplier_Union', description: 'The individual responsible for dispensing the medication, supplier or device.', - }, - destination: { - type: require('./reference.schema'), + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual responsible for dispensing the medication, supplier or device.', + }, + destination: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverydestination_destination_Union', description: 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', - }, - receiver: { - type: new GraphQLList(require('./reference.schema')), - description: 'Identifies the person who picked up the Supply.', - }, - }), + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyDeliveryreceiver_receiver_Union', + description: 'Identifies the person who picked up the Supply.', + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: 'Identifies the person who picked up the Supply.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/supplydeliverysupplieditem.schema.js b/src/resources/3_0_1/schemas/supplydeliverysupplieditem.schema.js index faa1329e..fb227a6b 100644 --- a/src/resources/3_0_1/schemas/supplydeliverysupplieditem.schema.js +++ b/src/resources/3_0_1/schemas/supplydeliverysupplieditem.schema.js @@ -1,32 +1,74 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary SupplyDelivery.suppliedItem Schema + * @summary SupplyDeliverysuppliedItem Schema */ module.exports = new GraphQLObjectType({ - name: 'SupplyDeliverySuppliedItem', - description: 'The item that is being delivered or has been supplied.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - quantity: { - type: require('./quantity.schema'), - description: - 'The amount of supply that has been dispensed. Includes unit of measure.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supply-item - itemCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supply-item - itemReference: { - type: require('./reference.schema'), + name: 'SupplyDeliverysuppliedItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of supply that has been dispensed. Includes unit of measure.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supply-item + itemCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supply-item + itemReference: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverysuppliedItemitemReference_itemReference_Union', description: 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', - }, - }), + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/supplyrequest.schema.js b/src/resources/3_0_1/schemas/supplyrequest.schema.js index 932cccca..74ef294d 100644 --- a/src/resources/3_0_1/schemas/supplyrequest.schema.js +++ b/src/resources/3_0_1/schemas/supplyrequest.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let SupplyRequestResourceType = new GraphQLEnumType({ - name: 'SupplyRequestResourceType', - values: { - SupplyRequest: { value: 'SupplyRequest' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,97 +16,209 @@ let SupplyRequestResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'SupplyRequest', - description: 'Base StructureDefinition for SupplyRequest Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(SupplyRequestResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: 'Unique identifier for this supply request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-status - status: { - type: CodeScalar, - description: 'Status of the supply request.', - }, - _status: { - type: require('./element.schema'), - description: 'Status of the supply request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-kind - category: { - type: require('./codeableconcept.schema'), - description: - 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.schema'), - description: - 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', - }, - orderedItem: { - type: require('./supplyrequestordereditem.schema'), - description: 'The item being requested.', - }, - occurrenceDateTime: { - type: DateTimeScalar, - description: 'When the request should be fulfilled.', - }, - _occurrenceDateTime: { - type: require('./element.schema'), - description: 'When the request should be fulfilled.', - }, - occurrencePeriod: { - type: require('./period.schema'), - description: 'When the request should be fulfilled.', - }, - occurrenceTiming: { - type: require('./timing.schema'), - description: 'When the request should be fulfilled.', - }, - authoredOn: { - type: DateTimeScalar, - description: 'When the request was made.', - }, - _authoredOn: { - type: require('./element.schema'), - description: 'When the request was made.', - }, - requester: { - type: require('./supplyrequestrequester.schema'), - description: - 'The individual who initiated the request and has responsibility for its activation.', - }, - supplier: { - type: new GraphQLList(require('./reference.schema')), - description: 'Who is intended to fulfill the request.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), - description: 'Why the supply item was requested.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason - reasonReference: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for SupplyRequest Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyRequest_Enum_schema', + values: { SupplyRequest: { value: 'SupplyRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: 'Unique identifier for this supply request.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Status of the supply request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-status + status: { + type: CodeScalar, + description: 'Status of the supply request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-kind + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', + }, + orderedItem: { + type: require('./supplyrequestordereditem.schema.js'), + description: 'The item being requested.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'When the request should be fulfilled.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'When the request should be fulfilled.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'When the request should be fulfilled.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: 'When the request should be fulfilled.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'When the request was made.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request was made.', + }, + requester: { + type: require('./supplyrequestrequester.schema.js'), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + supplier: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyRequestsupplier_supplier_Union', + description: 'Who is intended to fulfill the request.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Who is intended to fulfill the request.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Why the supply item was requested.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supplyrequest-reason + reasonReference: { + type: new GraphQLUnionType({ + name: 'SupplyRequestreasonReference_reasonReference_Union', description: 'Why the supply item was requested.', - }, - deliverFrom: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Why the supply item was requested.', + }, + deliverFrom: { + type: new GraphQLUnionType({ + name: 'SupplyRequestdeliverFrom_deliverFrom_Union', description: 'Where the supply is expected to come from.', - }, - deliverTo: { - type: require('./reference.schema'), + types: () => [ + require('./organization.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the supply is expected to come from.', + }, + deliverTo: { + type: new GraphQLUnionType({ + name: 'SupplyRequestdeliverTo_deliverTo_Union', description: 'Where the supply is destined to go.', - }, - }), + types: () => [ + require('./organization.schema.js'), + require('./location.schema.js'), + require('./patient.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Where the supply is destined to go.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/supplyrequestordereditem.schema.js b/src/resources/3_0_1/schemas/supplyrequestordereditem.schema.js index 2f021b42..38f8e9bc 100644 --- a/src/resources/3_0_1/schemas/supplyrequestordereditem.schema.js +++ b/src/resources/3_0_1/schemas/supplyrequestordereditem.schema.js @@ -1,31 +1,74 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary SupplyRequest.orderedItem Schema + * @summary SupplyRequestorderedItem Schema */ module.exports = new GraphQLObjectType({ - name: 'SupplyRequestOrderedItem', - description: 'The item being requested.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - quantity: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: 'The amount that is being ordered of the indicated item.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supply-item - itemCodeableConcept: { - type: require('./codeableconcept.schema'), - description: - 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/supply-item - itemReference: { - type: require('./reference.schema'), + name: 'SupplyRequestorderedItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'The amount that is being ordered of the indicated item.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supply-item + itemCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/supply-item + itemReference: { + type: new GraphQLUnionType({ + name: 'SupplyRequestorderedItemitemReference_itemReference_Union', description: 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', - }, - }), + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/supplyrequestrequester.schema.js b/src/resources/3_0_1/schemas/supplyrequestrequester.schema.js index f21dd388..70fc9b2e 100644 --- a/src/resources/3_0_1/schemas/supplyrequestrequester.schema.js +++ b/src/resources/3_0_1/schemas/supplyrequestrequester.schema.js @@ -1,26 +1,87 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary SupplyRequest.requester Schema + * @summary SupplyRequestrequester Schema */ module.exports = new GraphQLObjectType({ - name: 'SupplyRequestRequester', - description: - 'The individual who initiated the request and has responsibility for its activation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - agent: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'The device, practitioner, etc. who initiated the request.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'SupplyRequestrequester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + agent: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'SupplyRequestrequesteragent_agent_Union', + description: + 'The device, practitioner, etc. who initiated the request.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The device, practitioner, etc. who initiated the request.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'SupplyRequestrequesteronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/task.schema.js b/src/resources/3_0_1/schemas/task.schema.js index a1bfff81..a9d17262 100644 --- a/src/resources/3_0_1/schemas/task.schema.js +++ b/src/resources/3_0_1/schemas/task.schema.js @@ -1,22 +1,15 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let TaskResourceType = new GraphQLEnumType({ - name: 'TaskResourceType', - values: { - Task: { value: 'Task' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,178 +17,344 @@ let TaskResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'Task', - description: 'Base StructureDefinition for Task Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(TaskResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: 'The business identifier for this task.', - }, - definitionUri: { - type: UriScalar, - description: - 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', - }, - _definitionUri: { - type: require('./element.schema'), + description: 'Base StructureDefinition for Task Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Task_Enum_schema', + values: { Task: { value: 'Task' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: 'The business identifier for this task.', + }, + _definitionUri: { + type: require('./element.schema.js'), + description: + 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', + }, + definitionUri: { + type: UriScalar, + description: + 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', + }, + definitionReference: { + type: new GraphQLUnionType({ + name: 'TaskdefinitionReference_definitionReference_Union', description: 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', - }, - definitionReference: { - type: require('./reference.schema'), - description: - 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', - }, - basedOn: { - type: new GraphQLList(require('./reference.schema')), - description: - "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a 'request' resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the 'request' resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", - }, - groupIdentifier: { - type: require('./identifier.schema'), - description: - 'An identifier that links together multiple tasks and other requests that were created in the same context.', - }, - partOf: { - type: new GraphQLList(require('./reference.schema')), - description: 'Task that this particular task is part of.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/task-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current status of the task.', - }, - _status: { - type: require('./element.schema'), - description: 'The current status of the task.', - }, - statusReason: { - type: require('./codeableconcept.schema'), - description: - 'An explanation as to why this task is held, failed, was refused, etc.', - }, - businessStatus: { - type: require('./codeableconcept.schema'), - description: - 'Contains business-specific nuances of the business state.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-intent - intent: { - type: new GraphQLNonNull(CodeScalar), - description: - "Indicates the 'level' of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", - }, - _intent: { - type: require('./element.schema'), - description: - "Indicates the 'level' of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/request-priority - priority: { - type: CodeScalar, - description: - 'Indicates how quickly the Task should be addressed with respect to other requests.', - }, - _priority: { - type: require('./element.schema'), - description: - 'Indicates how quickly the Task should be addressed with respect to other requests.', - }, - code: { - type: require('./codeableconcept.schema'), - description: - 'A name or code (or both) briefly describing what the task involves.', - }, - description: { - type: GraphQLString, - description: 'A free-text description of what is to be performed.', - }, - _description: { - type: require('./element.schema'), - description: 'A free-text description of what is to be performed.', - }, - focus: { - type: require('./reference.schema'), + types: () => [require('./activitydefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + }, + }), + description: + 'A reference to a formal or informal definition of the task. For example, a protocol, a step within a defined workflow definition, etc.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TaskbasedOn_basedOn_Union', + description: + "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a 'request' resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the 'request' resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a 'request' resource such as a ProcedureRequest, MedicationRequest, ProcedureRequest, CarePlan, etc. which is distinct from the 'request' resource the task is seeking to fulfil. This latter resource is referenced by FocusOn. For example, based on a ProcedureRequest (= BasedOn), a task is created to fulfil a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + 'An identifier that links together multiple tasks and other requests that were created in the same context.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TaskpartOf_partOf_Union', + description: 'Task that this particular task is part of.', + types: () => [require('./task.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Task') { + return require('./task.schema.js'); + } + }, + }), + ), + description: 'Task that this particular task is part of.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current status of the task.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/task-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current status of the task.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'An explanation as to why this task is held, failed, was refused, etc.', + }, + businessStatus: { + type: require('./codeableconcept.schema.js'), + description: 'Contains business-specific nuances of the business state.', + }, + _intent: { + type: require('./element.schema.js'), + description: + "Indicates the 'level' of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-intent + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + "Indicates the 'level' of actionability associated with the Task. I.e. Is this a proposed task, a planned task, an actionable task, etc.", + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the Task should be addressed with respect to other requests.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/request-priority + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the Task should be addressed with respect to other requests.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A name or code (or both) briefly describing what the task involves.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A free-text description of what is to be performed.', + }, + description: { + type: GraphQLString, + description: 'A free-text description of what is to be performed.', + }, + focus: { + type: new GraphQLUnionType({ + name: 'Taskfocus_focus_Union', description: 'The request being actioned or the resource being manipulated by this task.', - }, - for: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The request being actioned or the resource being manipulated by this task.', + }, + for: { + type: new GraphQLUnionType({ + name: 'Taskfor_for_Union', description: 'The entity who benefits from the performance of the service specified in the task (e.g., the patient).', - }, - context: { - type: require('./reference.schema'), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The entity who benefits from the performance of the service specified in the task (e.g., the patient).', + }, + context: { + type: new GraphQLUnionType({ + name: 'Taskcontext_context_Union', description: 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.', - }, - executionPeriod: { - type: require('./period.schema'), - description: - 'Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).', - }, - authoredOn: { - type: DateTimeScalar, - description: 'The date and time this task was created.', - }, - _authoredOn: { - type: require('./element.schema'), - description: 'The date and time this task was created.', - }, - lastModified: { - type: DateTimeScalar, - description: 'The date and time of last modification to this task.', - }, - _lastModified: { - type: require('./element.schema'), - description: 'The date and time of last modification to this task.', - }, - requester: { - type: require('./taskrequester.schema'), - description: 'The creator of the task.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/task-performer-type - performerType: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: 'The type of participant that can execute the task.', - }, - owner: { - type: require('./reference.schema'), + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.', + }, + executionPeriod: { + type: require('./period.schema.js'), + description: + 'Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'The date and time this task was created.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'The date and time this task was created.', + }, + _lastModified: { + type: require('./element.schema.js'), + description: 'The date and time of last modification to this task.', + }, + lastModified: { + type: DateTimeScalar, + description: 'The date and time of last modification to this task.', + }, + requester: { + type: require('./taskrequester.schema.js'), + description: 'The creator of the task.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/task-performer-type + performerType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The type of participant that can execute the task.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'Taskowner_owner_Union', description: 'Individual organization or Device currently responsible for task execution.', - }, - reason: { - type: require('./codeableconcept.schema'), - description: - 'A description or code indicating why this task needs to be performed.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Free-text information captured about the task as it progresses.', - }, - relevantHistory: { - type: new GraphQLList(require('./reference.schema')), - description: - 'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.', - }, - restriction: { - type: require('./taskrestriction.schema'), - description: - 'If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.', - }, - input: { - type: new GraphQLList(require('./taskinput.schema')), - description: - 'Additional information that may be needed in the execution of the task.', - }, - output: { - type: new GraphQLList(require('./taskoutput.schema')), - description: 'Outputs produced by the Task.', - }, - }), + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Individual organization or Device currently responsible for task execution.', + }, + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'A description or code indicating why this task needs to be performed.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Free-text information captured about the task as it progresses.', + }, + relevantHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TaskrelevantHistory_relevantHistory_Union', + description: + 'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.', + }, + restriction: { + type: require('./taskrestriction.schema.js'), + description: + 'If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.', + }, + input: { + type: new GraphQLList(require('./taskinput.schema.js')), + description: + 'Additional information that may be needed in the execution of the task.', + }, + output: { + type: new GraphQLList(require('./taskoutput.schema.js')), + description: 'Outputs produced by the Task.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/taskinput.schema.js b/src/resources/3_0_1/schemas/taskinput.schema.js index c9edda74..5da47506 100644 --- a/src/resources/3_0_1/schemas/taskinput.schema.js +++ b/src/resources/3_0_1/schemas/taskinput.schema.js @@ -1,255 +1,273 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, - GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Task.input Schema + * @summary Taskinput Schema */ module.exports = new GraphQLObjectType({ - name: 'TaskInput', - description: - 'Additional information that may be needed in the execution of the task.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'A code or description indicating how the input is intended to be used as part of the task execution.', - }, - valueBase64Binary: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueBase64Binary: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'The value of the input parameter as a basic type.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueCode: { - type: new GraphQLNonNull(CodeScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueCode: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueDate: { - type: new GraphQLNonNull(DateScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueDate: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueDecimal: { - type: new GraphQLNonNull(GraphQLFloat), - description: 'The value of the input parameter as a basic type.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueId: { - type: new GraphQLNonNull(IdScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueId: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueInstant: { - type: new GraphQLNonNull(InstantScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueInstant: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: 'The value of the input parameter as a basic type.', - }, - _valueInteger: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueMarkdown: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of the input parameter as a basic type.', - }, - _valueMarkdown: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueOid: { - type: new GraphQLNonNull(OidScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueOid: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valuePositiveInt: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valuePositiveInt: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of the input parameter as a basic type.', - }, - _valueString: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueTime: { - type: new GraphQLNonNull(TimeScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueTime: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueUnsignedInt: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueUnsignedInt: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueUri: { - type: new GraphQLNonNull(UriScalar), - description: 'The value of the input parameter as a basic type.', - }, - _valueUri: { - type: require('./element.schema'), - description: 'The value of the input parameter as a basic type.', - }, - valueAddress: { - type: new GraphQLNonNull(require('./address.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueAge: { - type: new GraphQLNonNull(require('./age.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueAnnotation: { - type: new GraphQLNonNull(require('./annotation.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueCoding: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueContactPoint: { - type: new GraphQLNonNull(require('./contactpoint.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueCount: { - type: new GraphQLNonNull(require('./count.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueDistance: { - type: new GraphQLNonNull(require('./distance.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueDuration: { - type: new GraphQLNonNull(require('./duration.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueHumanName: { - type: new GraphQLNonNull(require('./humanname.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueIdentifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueMoney: { - type: new GraphQLNonNull(require('./money.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valuePeriod: { - type: new GraphQLNonNull(require('./period.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueRange: { - type: new GraphQLNonNull(require('./range.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueRatio: { - type: new GraphQLNonNull(require('./ratio.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueSampledData: { - type: new GraphQLNonNull(require('./sampleddata.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueSignature: { - type: new GraphQLNonNull(require('./signature.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueTiming: { - type: new GraphQLNonNull(require('./timing.schema')), - description: 'The value of the input parameter as a basic type.', - }, - valueMeta: { - type: new GraphQLNonNull(require('./meta.schema')), - description: 'The value of the input parameter as a basic type.', - }, - }), + name: 'Taskinput', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code or description indicating how the input is intended to be used as part of the task execution.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of the input parameter as a basic type.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of the input parameter as a basic type.', + }, + _valueId: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of the input parameter as a basic type.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The value of the input parameter as a basic type.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueReference: { + type: new GraphQLNonNull(require('./resourcelist.schema')), + description: 'The value of the input parameter as a basic type.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueMeta: { + type: new GraphQLNonNull(require('./meta.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/taskoutput.schema.js b/src/resources/3_0_1/schemas/taskoutput.schema.js index d66deabb..626ae50b 100644 --- a/src/resources/3_0_1/schemas/taskoutput.schema.js +++ b/src/resources/3_0_1/schemas/taskoutput.schema.js @@ -1,253 +1,272 @@ -const Base64BinaryScalar = require('../scalars/base64binary.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const InstantScalar = require('../scalars/instant.scalar'); -const OidScalar = require('../scalars/oid.scalar'); -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLBoolean, GraphQLFloat, GraphQLInt, - GraphQLString, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary Task.output Schema + * @summary Taskoutput Schema */ module.exports = new GraphQLObjectType({ - name: 'TaskOutput', - description: 'Outputs produced by the Task.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - type: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The name of the Output parameter.', - }, - valueBase64Binary: { - type: new GraphQLNonNull(Base64BinaryScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueBase64Binary: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueBoolean: { - type: new GraphQLNonNull(GraphQLBoolean), - description: 'The value of the Output parameter as a basic type.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueCode: { - type: new GraphQLNonNull(CodeScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueCode: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueDate: { - type: new GraphQLNonNull(DateScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueDate: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueDateTime: { - type: new GraphQLNonNull(DateTimeScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueDateTime: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueDecimal: { - type: new GraphQLNonNull(GraphQLFloat), - description: 'The value of the Output parameter as a basic type.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueId: { - type: new GraphQLNonNull(IdScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueId: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueInstant: { - type: new GraphQLNonNull(InstantScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueInstant: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueInteger: { - type: new GraphQLNonNull(GraphQLInt), - description: 'The value of the Output parameter as a basic type.', - }, - _valueInteger: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueMarkdown: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of the Output parameter as a basic type.', - }, - _valueMarkdown: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueOid: { - type: new GraphQLNonNull(OidScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueOid: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valuePositiveInt: { - type: new GraphQLNonNull(PositiveIntScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valuePositiveInt: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueString: { - type: new GraphQLNonNull(GraphQLString), - description: 'The value of the Output parameter as a basic type.', - }, - _valueString: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueTime: { - type: new GraphQLNonNull(TimeScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueTime: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueUnsignedInt: { - type: new GraphQLNonNull(UnsignedIntScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueUnsignedInt: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueUri: { - type: new GraphQLNonNull(UriScalar), - description: 'The value of the Output parameter as a basic type.', - }, - _valueUri: { - type: require('./element.schema'), - description: 'The value of the Output parameter as a basic type.', - }, - valueAddress: { - type: new GraphQLNonNull(require('./address.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueAge: { - type: new GraphQLNonNull(require('./age.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueAnnotation: { - type: new GraphQLNonNull(require('./annotation.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueAttachment: { - type: new GraphQLNonNull(require('./attachment.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueCoding: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueContactPoint: { - type: new GraphQLNonNull(require('./contactpoint.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueCount: { - type: new GraphQLNonNull(require('./count.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueDistance: { - type: new GraphQLNonNull(require('./distance.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueDuration: { - type: new GraphQLNonNull(require('./duration.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueHumanName: { - type: new GraphQLNonNull(require('./humanname.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueIdentifier: { - type: new GraphQLNonNull(require('./identifier.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueMoney: { - type: new GraphQLNonNull(require('./money.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valuePeriod: { - type: new GraphQLNonNull(require('./period.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueRange: { - type: new GraphQLNonNull(require('./range.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueRatio: { - type: new GraphQLNonNull(require('./ratio.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueReference: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueSampledData: { - type: new GraphQLNonNull(require('./sampleddata.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueSignature: { - type: new GraphQLNonNull(require('./signature.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueTiming: { - type: new GraphQLNonNull(require('./timing.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - valueMeta: { - type: new GraphQLNonNull(require('./meta.schema')), - description: 'The value of the Output parameter as a basic type.', - }, - }), + name: 'Taskoutput', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The name of the Output parameter.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of the Output parameter as a basic type.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of the Output parameter as a basic type.', + }, + _valueId: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of the Output parameter as a basic type.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The value of the Output parameter as a basic type.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueReference: { + type: new GraphQLNonNull(require('./resourcelist.schema')), + description: 'The value of the Output parameter as a basic type.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueMeta: { + type: new GraphQLNonNull(require('./meta.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/taskrequester.schema.js b/src/resources/3_0_1/schemas/taskrequester.schema.js index 7f10fa19..04bff838 100644 --- a/src/resources/3_0_1/schemas/taskrequester.schema.js +++ b/src/resources/3_0_1/schemas/taskrequester.schema.js @@ -1,24 +1,86 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary Task.requester Schema + * @summary Taskrequester Schema */ module.exports = new GraphQLObjectType({ - name: 'TaskRequester', - description: 'The creator of the task.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - agent: { - type: new GraphQLNonNull(require('./reference.schema')), - description: 'The device, practitioner, etc. who initiated the task.', - }, - onBehalfOf: { - type: require('./reference.schema'), + name: 'Taskrequester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + agent: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Taskrequesteragent_agent_Union', + description: 'The device, practitioner, etc. who initiated the task.', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'The device, practitioner, etc. who initiated the task.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'TaskrequesteronBehalfOf_onBehalfOf_Union', description: 'The organization the device or practitioner was acting on behalf of when they initiated the task.', - }, - }), + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of when they initiated the task.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/taskrestriction.schema.js b/src/resources/3_0_1/schemas/taskrestriction.schema.js index d9a8d21e..d99cf03d 100644 --- a/src/resources/3_0_1/schemas/taskrestriction.schema.js +++ b/src/resources/3_0_1/schemas/taskrestriction.schema.js @@ -1,36 +1,87 @@ -const PositiveIntScalar = require('../scalars/positiveint.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); /** * @name exports - * @summary Task.restriction Schema + * @summary Taskrestriction Schema */ module.exports = new GraphQLObjectType({ - name: 'TaskRestriction', - description: - 'If the Task.focus is a request resource and the task is seeking fulfillment (i.e is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - repetitions: { - type: PositiveIntScalar, - description: - 'Indicates the number of times the requested action should occur.', - }, - _repetitions: { - type: require('./element.schema'), - description: - 'Indicates the number of times the requested action should occur.', - }, - period: { - type: require('./period.schema'), - description: 'Over what time-period is fulfillment sought.', - }, - recipient: { - type: new GraphQLList(require('./reference.schema')), - description: - 'For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?.', - }, - }), + name: 'Taskrestriction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _repetitions: { + type: require('./element.schema.js'), + description: + 'Indicates the number of times the requested action should occur.', + }, + repetitions: { + type: PositiveIntScalar, + description: + 'Indicates the number of times the requested action should occur.', + }, + period: { + type: require('./period.schema.js'), + description: 'Over what time-period is fulfillment sought.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Taskrestrictionrecipient_recipient_Union', + description: + 'For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreport.schema.js b/src/resources/3_0_1/schemas/testreport.schema.js index 949add2e..1af77be7 100644 --- a/src/resources/3_0_1/schemas/testreport.schema.js +++ b/src/resources/3_0_1/schemas/testreport.schema.js @@ -1,22 +1,16 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLFloat, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let TestReportResourceType = new GraphQLEnumType({ - name: 'TestReportResourceType', - values: { - TestReport: { value: 'TestReport' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -24,99 +18,169 @@ let TestReportResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'TestReport', - description: 'Base StructureDefinition for TestReport Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(TestReportResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', - }, - name: { - type: GraphQLString, - description: - 'A free text natural language name identifying the executed TestScript.', - }, - _name: { - type: require('./element.schema'), - description: - 'A free text natural language name identifying the executed TestScript.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-status-codes - status: { - type: new GraphQLNonNull(CodeScalar), - description: 'The current state of this test report.', - }, - _status: { - type: require('./element.schema'), - description: 'The current state of this test report.', - }, - testScript: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-result-codes - result: { - type: new GraphQLNonNull(CodeScalar), - description: 'The overall result from the execution of the TestScript.', - }, - _result: { - type: require('./element.schema'), - description: 'The overall result from the execution of the TestScript.', - }, - score: { - type: GraphQLFloat, - description: - 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', - }, - _score: { - type: require('./element.schema'), - description: - 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', - }, - tester: { - type: GraphQLString, - description: - 'Name of the tester producing this report (Organization or individual).', - }, - _tester: { - type: require('./element.schema'), - description: - 'Name of the tester producing this report (Organization or individual).', - }, - issued: { - type: DateTimeScalar, - description: - 'When the TestScript was executed and this TestReport was generated.', - }, - _issued: { - type: require('./element.schema'), - description: - 'When the TestScript was executed and this TestReport was generated.', - }, - participant: { - type: new GraphQLList(require('./testreportparticipant.schema')), - description: - 'A participant in the test execution, either the execution engine, a client, or a server.', - }, - setup: { - type: require('./testreportsetup.schema'), - description: - 'The results of the series of required setup operations before the tests were executed.', - }, - test: { - type: new GraphQLList(require('./testreporttest.schema')), - description: 'A test executed from the test script.', - }, - teardown: { - type: require('./testreportteardown.schema'), - description: - 'The results of the series of operations required to clean up after the all the tests were executed (successfully or otherwise).', - }, - }), + description: 'Base StructureDefinition for TestReport Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestReport_Enum_schema', + values: { TestReport: { value: 'TestReport' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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: require('./identifier.schema.js'), + description: + 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name identifying the executed TestScript.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name identifying the executed TestScript.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of this test report.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-status-codes + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of this test report.', + }, + testScript: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'TestReporttestScript_testScript_Union', + description: + 'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.', + types: () => [require('./testscript.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'TestScript') { + return require('./testscript.schema.js'); + } + }, + }), + ), + description: + 'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.', + }, + _result: { + type: require('./element.schema.js'), + description: 'The overall result from the execution of the TestScript.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-result-codes + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The overall result from the execution of the TestScript.', + }, + _score: { + type: require('./element.schema.js'), + description: + 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', + }, + score: { + type: GraphQLFloat, + description: + 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', + }, + _tester: { + type: require('./element.schema.js'), + description: + 'Name of the tester producing this report (Organization or individual).', + }, + tester: { + type: GraphQLString, + description: + 'Name of the tester producing this report (Organization or individual).', + }, + _issued: { + type: require('./element.schema.js'), + description: + 'When the TestScript was executed and this TestReport was generated.', + }, + issued: { + type: DateTimeScalar, + description: + 'When the TestScript was executed and this TestReport was generated.', + }, + participant: { + type: new GraphQLList(require('./testreportparticipant.schema.js')), + description: + 'A participant in the test execution, either the execution engine, a client, or a server.', + }, + setup: { + type: require('./testreportsetup.schema.js'), + description: + 'The results of the series of required setup operations before the tests were executed.', + }, + test: { + type: new GraphQLList(require('./testreporttest.schema.js')), + description: 'A test executed from the test script.', + }, + teardown: { + type: require('./testreportteardown.schema.js'), + description: + 'The results of the series of operations required to clean up after the all the tests were executed (successfully or otherwise).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreportparticipant.schema.js b/src/resources/3_0_1/schemas/testreportparticipant.schema.js index 54ef7dc0..bce5383c 100644 --- a/src/resources/3_0_1/schemas/testreportparticipant.schema.js +++ b/src/resources/3_0_1/schemas/testreportparticipant.schema.js @@ -1,45 +1,64 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestReport.participant Schema + * @summary TestReportparticipant Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportParticipant', - description: - 'A participant in the test execution, either the execution engine, a client, or a server.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-participant-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of participant.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of participant.', - }, - uri: { - type: new GraphQLNonNull(UriScalar), - description: - 'The uri of the participant. An absolute URL is preferred.', - }, - _uri: { - type: require('./element.schema'), - description: - 'The uri of the participant. An absolute URL is preferred.', - }, - display: { - type: GraphQLString, - description: 'The display name of the participant.', - }, - _display: { - type: require('./element.schema'), - description: 'The display name of the participant.', - }, - }), + name: 'TestReportparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of participant.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-participant-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant.', + }, + _uri: { + type: require('./element.schema.js'), + description: 'The uri of the participant. An absolute URL is preferred.', + }, + uri: { + type: new GraphQLNonNull(UriScalar), + description: 'The uri of the participant. An absolute URL is preferred.', + }, + _display: { + type: require('./element.schema.js'), + description: 'The display name of the participant.', + }, + display: { + type: GraphQLString, + description: 'The display name of the participant.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreportsetup.schema.js b/src/resources/3_0_1/schemas/testreportsetup.schema.js index 39975ec9..463ce354 100644 --- a/src/resources/3_0_1/schemas/testreportsetup.schema.js +++ b/src/resources/3_0_1/schemas/testreportsetup.schema.js @@ -1,23 +1,43 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestReport.setup Schema + * @summary TestReportsetup Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportSetup', - description: - 'The results of the series of required setup operations before the tests were executed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testreportsetupaction.schema')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestReportsetup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreportsetupaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreportsetupaction.schema.js b/src/resources/3_0_1/schemas/testreportsetupaction.schema.js index e67d2b99..c95da77e 100644 --- a/src/resources/3_0_1/schemas/testreportsetupaction.schema.js +++ b/src/resources/3_0_1/schemas/testreportsetupaction.schema.js @@ -1,24 +1,41 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary TestReport.setup.action Schema + * @summary TestReportsetupaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportSetupAction', - description: 'Action would contain either an operation or an assertion.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - operation: { - type: require('./testreportsetupactionoperation.schema'), - description: 'The operation performed.', - }, - assert: { - type: require('./testreportsetupactionassert.schema'), - description: - 'The results of the assertion performed on the previous operations.', - }, - }), + name: 'TestReportsetupaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + operation: { + type: require('./testreportsetupactionoperation.schema.js'), + description: 'The operation performed.', + }, + assert: { + type: require('./testreportsetupactionassert.schema.js'), + description: + 'The results of the assertion performed on the previous operations.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreportsetupactionassert.schema.js b/src/resources/3_0_1/schemas/testreportsetupactionassert.schema.js index aed7be76..6db6eb41 100644 --- a/src/resources/3_0_1/schemas/testreportsetupactionassert.schema.js +++ b/src/resources/3_0_1/schemas/testreportsetupactionassert.schema.js @@ -1,42 +1,63 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary TestReport.setup.action.assert Schema + * @summary TestReportsetupactionassert Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportSetupActionAssert', - description: - 'The results of the assertion performed on the previous operations.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-action-result-codes - result: { - type: new GraphQLNonNull(CodeScalar), - description: 'The result of this assertion.', - }, - _result: { - type: require('./element.schema'), - description: 'The result of this assertion.', - }, - message: { - type: GraphQLString, - description: 'An explanatory message associated with the result.', - }, - _message: { - type: require('./element.schema'), - description: 'An explanatory message associated with the result.', - }, - detail: { - type: GraphQLString, - description: 'A link to further details on the result.', - }, - _detail: { - type: require('./element.schema'), - description: 'A link to further details on the result.', - }, - }), + name: 'TestReportsetupactionassert', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _result: { + type: require('./element.schema.js'), + description: 'The result of this assertion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-action-result-codes + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The result of this assertion.', + }, + _message: { + type: require('./element.schema.js'), + description: 'An explanatory message associated with the result.', + }, + message: { + type: GraphQLString, + description: 'An explanatory message associated with the result.', + }, + _detail: { + type: require('./element.schema.js'), + description: 'A link to further details on the result.', + }, + detail: { + type: GraphQLString, + description: 'A link to further details on the result.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreportsetupactionoperation.schema.js b/src/resources/3_0_1/schemas/testreportsetupactionoperation.schema.js index 5cdcb023..ea34925c 100644 --- a/src/resources/3_0_1/schemas/testreportsetupactionoperation.schema.js +++ b/src/resources/3_0_1/schemas/testreportsetupactionoperation.schema.js @@ -1,42 +1,64 @@ -const CodeScalar = require('../scalars/code.scalar'); -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestReport.setup.action.operation Schema + * @summary TestReportsetupactionoperation Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportSetupActionOperation', - description: 'The operation performed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/report-action-result-codes - result: { - type: new GraphQLNonNull(CodeScalar), - description: 'The result of this operation.', - }, - _result: { - type: require('./element.schema'), - description: 'The result of this operation.', - }, - message: { - type: GraphQLString, - description: 'An explanatory message associated with the result.', - }, - _message: { - type: require('./element.schema'), - description: 'An explanatory message associated with the result.', - }, - detail: { - type: UriScalar, - description: 'A link to further details on the result.', - }, - _detail: { - type: require('./element.schema'), - description: 'A link to further details on the result.', - }, - }), + name: 'TestReportsetupactionoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _result: { + type: require('./element.schema.js'), + description: 'The result of this operation.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/report-action-result-codes + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The result of this operation.', + }, + _message: { + type: require('./element.schema.js'), + description: 'An explanatory message associated with the result.', + }, + message: { + type: GraphQLString, + description: 'An explanatory message associated with the result.', + }, + _detail: { + type: require('./element.schema.js'), + description: 'A link to further details on the result.', + }, + detail: { + type: UriScalar, + description: 'A link to further details on the result.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreportteardown.schema.js b/src/resources/3_0_1/schemas/testreportteardown.schema.js index 1840f0eb..276818d3 100644 --- a/src/resources/3_0_1/schemas/testreportteardown.schema.js +++ b/src/resources/3_0_1/schemas/testreportteardown.schema.js @@ -1,22 +1,43 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestReport.teardown Schema + * @summary TestReportteardown Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportTeardown', - description: - 'The results of the series of operations required to clean up after the all the tests were executed (successfully or otherwise).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testreportteardownaction.schema')), - ), - description: 'The teardown action will only contain an operation.', - }, - }), + name: 'TestReportteardown', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreportteardownaction.schema.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreportteardownaction.schema.js b/src/resources/3_0_1/schemas/testreportteardownaction.schema.js index 66e0ef76..8a8dc14d 100644 --- a/src/resources/3_0_1/schemas/testreportteardownaction.schema.js +++ b/src/resources/3_0_1/schemas/testreportteardownaction.schema.js @@ -1,13 +1,32 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary TestReport.teardown.action Schema + * @summary TestReportteardownaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportTeardownAction', - description: 'The teardown action will only contain an operation.', - fields: () => extendSchema(require('./backboneelement.schema')), + name: 'TestReportteardownaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreporttest.schema.js b/src/resources/3_0_1/schemas/testreporttest.schema.js index 010ac5dc..ab12e01a 100644 --- a/src/resources/3_0_1/schemas/testreporttest.schema.js +++ b/src/resources/3_0_1/schemas/testreporttest.schema.js @@ -1,47 +1,63 @@ const { - GraphQLObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestReport.test Schema + * @summary TestReporttest Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportTest', - description: 'A test executed from the test script.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.schema'), - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testreporttestaction.schema')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestReporttest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreporttestaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testreporttestaction.schema.js b/src/resources/3_0_1/schemas/testreporttestaction.schema.js index adc646c6..b096f4cf 100644 --- a/src/resources/3_0_1/schemas/testreporttestaction.schema.js +++ b/src/resources/3_0_1/schemas/testreporttestaction.schema.js @@ -1,13 +1,32 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary TestReport.test.action Schema + * @summary TestReporttestaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestReportTestAction', - description: 'Action would contain either an operation or an assertion.', - fields: () => extendSchema(require('./backboneelement.schema')), + name: 'TestReporttestaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscript.schema.js b/src/resources/3_0_1/schemas/testscript.schema.js index ff3ca7a2..032d56ba 100644 --- a/src/resources/3_0_1/schemas/testscript.schema.js +++ b/src/resources/3_0_1/schemas/testscript.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, GraphQLString, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let TestScriptResourceType = new GraphQLEnumType({ - name: 'TestScriptResourceType', - values: { - TestScript: { value: 'TestScript' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,197 +18,266 @@ let TestScriptResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'TestScript', - description: 'Base StructureDefinition for TestScript Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(TestScriptResourceType), - description: 'Type of this resource.', - }, - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: require('./identifier.schema'), - description: - 'A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the test script.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the test script.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this test script. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this test script. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - 'The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', - }, - _date: { - type: require('./element.schema'), - description: - 'The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the test script.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the test script.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the test script from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the test script from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the test script is intended to be used.', - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this test script is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this test script is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', - }, - origin: { - type: new GraphQLList(require('./testscriptorigin.schema')), - description: - 'An abstract server used in operations within this test script in the origin element.', - }, - destination: { - type: new GraphQLList(require('./testscriptdestination.schema')), - description: - 'An abstract server used in operations within this test script in the destination element.', - }, - metadata: { - type: require('./testscriptmetadata.schema'), - description: - 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', - }, - fixture: { - type: new GraphQLList(require('./testscriptfixture.schema')), - description: - 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', - }, - profile: { - type: new GraphQLList(require('./reference.schema')), - description: 'Reference to the profile to be used for validation.', - }, - variable: { - type: new GraphQLList(require('./testscriptvariable.schema')), - description: - 'Variable is set based either on element value in response body or on header field value in the response headers.', - }, - rule: { - type: new GraphQLList(require('./testscriptrule.schema')), - description: - 'Assert rule to be used in one or more asserts within the test script.', - }, - ruleset: { - type: new GraphQLList(require('./testscriptruleset.schema')), - description: - 'Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.', - }, - setup: { - type: require('./testscriptsetup.schema'), - description: - 'A series of required setup operations before tests are executed.', - }, - test: { - type: new GraphQLList(require('./testscripttest.schema')), - description: 'A test in this script.', - }, - teardown: { - type: require('./testscriptteardown.schema'), - description: - 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', - }, - }), + description: 'Base StructureDefinition for TestScript Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestScript_Enum_schema', + values: { TestScript: { value: 'TestScript' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the test script.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the test script.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this test script. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this test script. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the test script.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the test script.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the test script from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the test script from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the test script is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this test script is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this test script is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', + }, + origin: { + type: new GraphQLList(require('./testscriptorigin.schema.js')), + description: + 'An abstract server used in operations within this test script in the origin element.', + }, + destination: { + type: new GraphQLList(require('./testscriptdestination.schema.js')), + description: + 'An abstract server used in operations within this test script in the destination element.', + }, + metadata: { + type: require('./testscriptmetadata.schema.js'), + description: + 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', + }, + fixture: { + type: new GraphQLList(require('./testscriptfixture.schema.js')), + description: + 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', + }, + profile: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TestScriptprofile_profile_Union', + description: 'Reference to the profile to be used for validation.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Reference to the profile to be used for validation.', + }, + variable: { + type: new GraphQLList(require('./testscriptvariable.schema.js')), + description: + 'Variable is set based either on element value in response body or on header field value in the response headers.', + }, + rule: { + type: new GraphQLList(require('./testscriptrule.schema.js')), + description: + 'Assert rule to be used in one or more asserts within the test script.', + }, + ruleset: { + type: new GraphQLList(require('./testscriptruleset.schema.js')), + description: + 'Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.', + }, + setup: { + type: require('./testscriptsetup.schema.js'), + description: + 'A series of required setup operations before tests are executed.', + }, + test: { + type: new GraphQLList(require('./testscripttest.schema.js')), + description: 'A test in this script.', + }, + teardown: { + type: require('./testscriptteardown.schema.js'), + description: + 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptdestination.schema.js b/src/resources/3_0_1/schemas/testscriptdestination.schema.js index fd0dca12..25664766 100644 --- a/src/resources/3_0_1/schemas/testscriptdestination.schema.js +++ b/src/resources/3_0_1/schemas/testscriptdestination.schema.js @@ -1,32 +1,53 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLInt } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.destination Schema + * @summary TestScriptdestination Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptDestination', - description: - 'An abstract server used in operations within this test script in the destination element.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - index: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', - }, - _index: { - type: require('./element.schema'), - description: - 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/testscript-profile-destination-types - profile: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'The type of destination profile the test system supports.', - }, - }), + name: 'TestScriptdestination', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _index: { + type: require('./element.schema.js'), + description: + 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', + }, + index: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/testscript-profile-destination-types + profile: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The type of destination profile the test system supports.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptfixture.schema.js b/src/resources/3_0_1/schemas/testscriptfixture.schema.js index 7eaf9564..3865bca0 100644 --- a/src/resources/3_0_1/schemas/testscriptfixture.schema.js +++ b/src/resources/3_0_1/schemas/testscriptfixture.schema.js @@ -1,41 +1,73 @@ -const { GraphQLObjectType, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.fixture Schema + * @summary TestScriptfixture Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptFixture', - description: - 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - autocreate: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', - }, - _autocreate: { - type: require('./element.schema'), - description: - 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', - }, - autodelete: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', - }, - _autodelete: { - type: require('./element.schema'), - description: - 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', - }, - resource: { - type: require('./reference.schema'), + name: 'TestScriptfixture', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _autocreate: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + autocreate: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + _autodelete: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + autodelete: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + resource: { + type: new GraphQLUnionType({ + name: 'TestScriptfixtureresource_resource_Union', description: 'Reference to the resource (containing the contents of the resource needed for operations).', - }, - }), + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference to the resource (containing the contents of the resource needed for operations).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptmetadata.schema.js b/src/resources/3_0_1/schemas/testscriptmetadata.schema.js index 1cfe3c3f..57d1a6fb 100644 --- a/src/resources/3_0_1/schemas/testscriptmetadata.schema.js +++ b/src/resources/3_0_1/schemas/testscriptmetadata.schema.js @@ -1,28 +1,49 @@ -const { GraphQLObjectType, GraphQLList, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.metadata Schema + * @summary TestScriptmetadata Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptMetadata', - description: - 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - link: { - type: new GraphQLList(require('./testscriptmetadatalink.schema')), - description: - 'A link to the FHIR specification that this test is covering.', - }, - capability: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptmetadatacapability.schema')), - ), - description: - 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', - }, - }), + name: 'TestScriptmetadata', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + link: { + type: new GraphQLList(require('./testscriptmetadatalink.schema.js')), + description: + 'A link to the FHIR specification that this test is covering.', + }, + capability: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptmetadatacapability.schema.js')), + ), + description: + 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptmetadatacapability.schema.js b/src/resources/3_0_1/schemas/testscriptmetadatacapability.schema.js index 55070e82..98ed9ce1 100644 --- a/src/resources/3_0_1/schemas/testscriptmetadatacapability.schema.js +++ b/src/resources/3_0_1/schemas/testscriptmetadatacapability.schema.js @@ -1,85 +1,114 @@ -const UriScalar = require('../scalars/uri.scalar'); const { - GraphQLObjectType, - GraphQLBoolean, GraphQLString, GraphQLList, + GraphQLBoolean, GraphQLInt, GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestScript.metadata.capability Schema + * @summary TestScriptmetadatacapability Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptMetadataCapability', - description: - 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - required: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', - }, - _required: { - type: require('./element.schema'), - description: - 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', - }, - validated: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', - }, - _validated: { - type: require('./element.schema'), - description: - 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', - }, - description: { - type: GraphQLString, - description: - 'Description of the capabilities that this test script is requiring the server to support.', - }, - _description: { - type: require('./element.schema'), - description: - 'Description of the capabilities that this test script is requiring the server to support.', - }, - origin: { - type: new GraphQLList(GraphQLInt), - description: 'Which origin server these requirements apply to.', - }, - _origin: { - type: require('./element.schema'), - description: 'Which origin server these requirements apply to.', - }, - destination: { - type: GraphQLInt, - description: 'Which server these requirements apply to.', - }, - _destination: { - type: require('./element.schema'), - description: 'Which server these requirements apply to.', - }, - link: { - type: new GraphQLList(UriScalar), - description: - 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', - }, - _link: { - type: require('./element.schema'), - description: - 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', - }, - capabilities: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', - }, - }), + name: 'TestScriptmetadatacapability', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _required: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + required: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + _validated: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + validated: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + description: { + type: GraphQLString, + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + _origin: { + type: require('./element.schema.js'), + description: 'Which origin server these requirements apply to.', + }, + origin: { + type: new GraphQLList(GraphQLInt), + description: 'Which origin server these requirements apply to.', + }, + _destination: { + type: require('./element.schema.js'), + description: 'Which server these requirements apply to.', + }, + destination: { + type: GraphQLInt, + description: 'Which server these requirements apply to.', + }, + _link: { + type: require('./element.schema.js'), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + link: { + type: new GraphQLList(UriScalar), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + capabilities: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'TestScriptmetadatacapabilitycapabilities_capabilities_Union', + description: + 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', + types: () => [require('./capabilitystatement.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CapabilityStatement') { + return require('./capabilitystatement.schema.js'); + } + }, + }), + ), + description: + 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptmetadatalink.schema.js b/src/resources/3_0_1/schemas/testscriptmetadatalink.schema.js index 0a3c1367..6030482f 100644 --- a/src/resources/3_0_1/schemas/testscriptmetadatalink.schema.js +++ b/src/resources/3_0_1/schemas/testscriptmetadatalink.schema.js @@ -1,34 +1,56 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary TestScript.metadata.link Schema + * @summary TestScriptmetadatalink Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptMetadataLink', - description: 'A link to the FHIR specification that this test is covering.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - url: { - type: new GraphQLNonNull(UriScalar), - description: - 'URL to a particular requirement or feature within the FHIR specification.', - }, - _url: { - type: require('./element.schema'), - description: - 'URL to a particular requirement or feature within the FHIR specification.', - }, - description: { - type: GraphQLString, - description: 'Short description of the link.', - }, - _description: { - type: require('./element.schema'), - description: 'Short description of the link.', - }, - }), + name: 'TestScriptmetadatalink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Short description of the link.', + }, + description: { + type: GraphQLString, + description: 'Short description of the link.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptorigin.schema.js b/src/resources/3_0_1/schemas/testscriptorigin.schema.js index 5c2f8c49..c44f6658 100644 --- a/src/resources/3_0_1/schemas/testscriptorigin.schema.js +++ b/src/resources/3_0_1/schemas/testscriptorigin.schema.js @@ -1,31 +1,53 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLInt } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.origin Schema + * @summary TestScriptorigin Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptOrigin', - description: - 'An abstract server used in operations within this test script in the origin element.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - index: { - type: new GraphQLNonNull(GraphQLInt), - description: - 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', - }, - _index: { - type: require('./element.schema'), - description: - 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/testscript-profile-origin-types - profile: { - type: new GraphQLNonNull(require('./coding.schema')), - description: 'The type of origin profile the test system supports.', - }, - }), + name: 'TestScriptorigin', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _index: { + type: require('./element.schema.js'), + description: + 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', + }, + index: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/testscript-profile-origin-types + profile: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The type of origin profile the test system supports.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptrule.schema.js b/src/resources/3_0_1/schemas/testscriptrule.schema.js index 8c784015..3dd0fed1 100644 --- a/src/resources/3_0_1/schemas/testscriptrule.schema.js +++ b/src/resources/3_0_1/schemas/testscriptrule.schema.js @@ -1,26 +1,60 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.rule Schema + * @summary TestScriptrule Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptRule', - description: - 'Assert rule to be used in one or more asserts within the test script.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - resource: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Reference to the resource (containing the contents of the rule needed for assertions).', - }, - param: { - type: new GraphQLList(require('./testscriptruleparam.schema')), - description: - 'Each rule template can take one or more parameters for rule evaluation.', - }, - }), + name: 'TestScriptrule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + resource: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'TestScriptruleresource_resource_Union', + description: + 'Reference to the resource (containing the contents of the rule needed for assertions).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Reference to the resource (containing the contents of the rule needed for assertions).', + }, + param: { + type: new GraphQLList(require('./testscriptruleparam.schema.js')), + description: + 'Each rule template can take one or more parameters for rule evaluation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptruleparam.schema.js b/src/resources/3_0_1/schemas/testscriptruleparam.schema.js index c1a8bfe3..c855943f 100644 --- a/src/resources/3_0_1/schemas/testscriptruleparam.schema.js +++ b/src/resources/3_0_1/schemas/testscriptruleparam.schema.js @@ -1,36 +1,57 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.rule.param Schema + * @summary TestScriptruleparam Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptRuleParam', - description: - 'Each rule template can take one or more parameters for rule evaluation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Descriptive name for this parameter that matches the external assert rule parameter name.', - }, - _name: { - type: require('./element.schema'), - description: - 'Descriptive name for this parameter that matches the external assert rule parameter name.', - }, - value: { - type: GraphQLString, - description: - 'The explicit or dynamic value for the parameter that will be passed on to the external rule template.', - }, - _value: { - type: require('./element.schema'), - description: - 'The explicit or dynamic value for the parameter that will be passed on to the external rule template.', - }, - }), + name: 'TestScriptruleparam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Descriptive name for this parameter that matches the external assert rule parameter name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Descriptive name for this parameter that matches the external assert rule parameter name.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The explicit or dynamic value for the parameter that will be passed on to the external rule template.', + }, + value: { + type: GraphQLString, + description: + 'The explicit or dynamic value for the parameter that will be passed on to the external rule template.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptruleset.schema.js b/src/resources/3_0_1/schemas/testscriptruleset.schema.js index c2c8f2be..839533a6 100644 --- a/src/resources/3_0_1/schemas/testscriptruleset.schema.js +++ b/src/resources/3_0_1/schemas/testscriptruleset.schema.js @@ -1,28 +1,61 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.ruleset Schema + * @summary TestScriptruleset Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptRuleset', - description: - 'Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - resource: { - type: new GraphQLNonNull(require('./reference.schema')), - description: - 'Reference to the resource (containing the contents of the ruleset needed for assertions).', - }, - rule: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptrulesetrule.schema')), - ), - description: - 'The referenced rule within the external ruleset template.', - }, - }), + name: 'TestScriptruleset', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + resource: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'TestScriptrulesetresource_resource_Union', + description: + 'Reference to the resource (containing the contents of the ruleset needed for assertions).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Reference to the resource (containing the contents of the ruleset needed for assertions).', + }, + rule: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptrulesetrule.schema.js')), + ), + description: 'The referenced rule within the external ruleset template.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptrulesetrule.schema.js b/src/resources/3_0_1/schemas/testscriptrulesetrule.schema.js index 882f1855..76ce7069 100644 --- a/src/resources/3_0_1/schemas/testscriptrulesetrule.schema.js +++ b/src/resources/3_0_1/schemas/testscriptrulesetrule.schema.js @@ -1,31 +1,53 @@ -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.ruleset.rule Schema + * @summary TestScriptrulesetrule Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptRulesetRule', - description: 'The referenced rule within the external ruleset template.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - ruleId: { - type: new GraphQLNonNull(IdScalar), - description: - 'Id of the referenced rule within the external ruleset template.', - }, - _ruleId: { - type: require('./element.schema'), - description: - 'Id of the referenced rule within the external ruleset template.', - }, - param: { - type: new GraphQLList(require('./testscriptrulesetruleparam.schema')), - description: - 'Each rule template can take one or more parameters for rule evaluation.', - }, - }), + name: 'TestScriptrulesetrule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _ruleId: { + type: require('./element.schema.js'), + description: + 'Id of the referenced rule within the external ruleset template.', + }, + ruleId: { + type: new GraphQLNonNull(IdScalar), + description: + 'Id of the referenced rule within the external ruleset template.', + }, + param: { + type: new GraphQLList(require('./testscriptrulesetruleparam.schema.js')), + description: + 'Each rule template can take one or more parameters for rule evaluation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptrulesetruleparam.schema.js b/src/resources/3_0_1/schemas/testscriptrulesetruleparam.schema.js index b9e193ce..19da6ffe 100644 --- a/src/resources/3_0_1/schemas/testscriptrulesetruleparam.schema.js +++ b/src/resources/3_0_1/schemas/testscriptrulesetruleparam.schema.js @@ -1,36 +1,57 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.ruleset.rule.param Schema + * @summary TestScriptrulesetruleparam Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptRulesetRuleParam', - description: - 'Each rule template can take one or more parameters for rule evaluation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', - }, - _name: { - type: require('./element.schema'), - description: - 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', - }, - value: { - type: GraphQLString, - description: - 'The value for the parameter that will be passed on to the external ruleset rule template.', - }, - _value: { - type: require('./element.schema'), - description: - 'The value for the parameter that will be passed on to the external ruleset rule template.', - }, - }), + name: 'TestScriptrulesetruleparam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value for the parameter that will be passed on to the external ruleset rule template.', + }, + value: { + type: GraphQLString, + description: + 'The value for the parameter that will be passed on to the external ruleset rule template.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetup.schema.js b/src/resources/3_0_1/schemas/testscriptsetup.schema.js index 424e465b..6905426f 100644 --- a/src/resources/3_0_1/schemas/testscriptsetup.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetup.schema.js @@ -1,23 +1,43 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.setup Schema + * @summary TestScriptsetup Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetup', - description: - 'A series of required setup operations before tests are executed.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptsetupaction.schema')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestScriptsetup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptsetupaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupaction.schema.js b/src/resources/3_0_1/schemas/testscriptsetupaction.schema.js index 9ee1da90..dd278874 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupaction.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupaction.schema.js @@ -1,24 +1,41 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary TestScript.setup.action Schema + * @summary TestScriptsetupaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupAction', - description: 'Action would contain either an operation or an assertion.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - operation: { - type: require('./testscriptsetupactionoperation.schema'), - description: 'The operation to perform.', - }, - assert: { - type: require('./testscriptsetupactionassert.schema'), - description: - 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', - }, - }), + name: 'TestScriptsetupaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + operation: { + type: require('./testscriptsetupactionoperation.schema.js'), + description: 'The operation to perform.', + }, + assert: { + type: require('./testscriptsetupactionassert.schema.js'), + description: + 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupactionassert.schema.js b/src/resources/3_0_1/schemas/testscriptsetupactionassert.schema.js index b6056a59..691fa49b 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupactionassert.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupactionassert.schema.js @@ -1,242 +1,263 @@ -const CodeScalar = require('../scalars/code.scalar'); -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLBoolean } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert Schema + * @summary TestScriptsetupactionassert Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionAssert', - description: - 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - label: { - type: GraphQLString, - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - _label: { - type: require('./element.schema'), - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.schema'), - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-direction-codes - direction: { - type: CodeScalar, - description: 'The direction to use for the assertion.', - }, - _direction: { - type: require('./element.schema'), - description: 'The direction to use for the assertion.', - }, - compareToSourceId: { - type: GraphQLString, - description: - "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", - }, - _compareToSourceId: { - type: require('./element.schema'), - description: - "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", - }, - compareToSourceExpression: { - type: GraphQLString, - description: - 'The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', - }, - _compareToSourceExpression: { - type: require('./element.schema'), - description: - 'The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', - }, - compareToSourcePath: { - type: GraphQLString, - description: - 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', - }, - _compareToSourcePath: { - type: require('./element.schema'), - description: - 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - contentType: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - _contentType: { - type: require('./element.schema'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - expression: { - type: GraphQLString, - description: - 'The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.', - }, - _expression: { - type: require('./element.schema'), - description: - 'The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.', - }, - headerField: { - type: GraphQLString, - description: "The HTTP header field name e.g. 'Location'.", - }, - _headerField: { - type: require('./element.schema'), - description: "The HTTP header field name e.g. 'Location'.", - }, - minimumId: { - type: GraphQLString, - description: - 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', - }, - _minimumId: { - type: require('./element.schema'), - description: - 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', - }, - navigationLinks: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution performs validation on the bundle navigation links.', - }, - _navigationLinks: { - type: require('./element.schema'), - description: - 'Whether or not the test execution performs validation on the bundle navigation links.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-operator-codes - operator: { - type: CodeScalar, - description: - 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', - }, - _operator: { - type: require('./element.schema'), - description: - 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', - }, - path: { - type: GraphQLString, - description: - 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', - }, - _path: { - type: require('./element.schema'), - description: - 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/http-operations - requestMethod: { - type: CodeScalar, - description: - 'The request method or HTTP operation code to compare against that used by the client system under test.', - }, - _requestMethod: { - type: require('./element.schema'), - description: - 'The request method or HTTP operation code to compare against that used by the client system under test.', - }, - requestURL: { - type: GraphQLString, - description: - 'The value to use in a comparison against the request URL path string.', - }, - _requestURL: { - type: require('./element.schema'), - description: - 'The value to use in a comparison against the request URL path string.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - resource: { - type: CodeScalar, - description: - 'The type of the resource. See http://build.fhir.org/resourcelist.html.', - }, - _resource: { - type: require('./element.schema'), - description: - 'The type of the resource. See http://build.fhir.org/resourcelist.html.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/assert-response-code-types - response: { - type: CodeScalar, - description: - 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', - }, - _response: { - type: require('./element.schema'), - description: - 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', - }, - responseCode: { - type: GraphQLString, - description: 'The value of the HTTP response code to be tested.', - }, - _responseCode: { - type: require('./element.schema'), - description: 'The value of the HTTP response code to be tested.', - }, - rule: { - type: require('./testscriptsetupactionassertrule.schema'), - description: 'The TestScript.rule this assert will evaluate.', - }, - ruleset: { - type: require('./testscriptsetupactionassertruleset.schema'), - description: 'The TestScript.ruleset this assert will evaluate.', - }, - sourceId: { - type: IdScalar, - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', - }, - _sourceId: { - type: require('./element.schema'), - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', - }, - validateProfileId: { - type: IdScalar, - description: 'The ID of the Profile to validate against.', - }, - _validateProfileId: { - type: require('./element.schema'), - description: 'The ID of the Profile to validate against.', - }, - value: { - type: GraphQLString, - description: 'The value to compare to.', - }, - _value: { - type: require('./element.schema'), - description: 'The value to compare to.', - }, - warningOnly: { - type: GraphQLBoolean, - description: - 'Whether or not the test execution will produce a warning only on error for this assert.', - }, - _warningOnly: { - type: require('./element.schema'), - description: - 'Whether or not the test execution will produce a warning only on error for this assert.', - }, - }), + name: 'TestScriptsetupactionassert', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _direction: { + type: require('./element.schema.js'), + description: 'The direction to use for the assertion.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-direction-codes + direction: { + type: CodeScalar, + description: 'The direction to use for the assertion.', + }, + _compareToSourceId: { + type: require('./element.schema.js'), + description: + "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", + }, + compareToSourceId: { + type: GraphQLString, + description: + "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", + }, + _compareToSourceExpression: { + type: require('./element.schema.js'), + description: + 'The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + compareToSourceExpression: { + type: GraphQLString, + description: + 'The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + _compareToSourcePath: { + type: require('./element.schema.js'), + description: + 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + compareToSourcePath: { + type: GraphQLString, + description: + 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + contentType: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _expression: { + type: require('./element.schema.js'), + description: + 'The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.', + }, + expression: { + type: GraphQLString, + description: + 'The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.', + }, + _headerField: { + type: require('./element.schema.js'), + description: "The HTTP header field name e.g. 'Location'.", + }, + headerField: { + type: GraphQLString, + description: "The HTTP header field name e.g. 'Location'.", + }, + _minimumId: { + type: require('./element.schema.js'), + description: + 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', + }, + minimumId: { + type: GraphQLString, + description: + 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', + }, + _navigationLinks: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + navigationLinks: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + _operator: { + type: require('./element.schema.js'), + description: + 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-operator-codes + operator: { + type: CodeScalar, + description: + 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + path: { + type: GraphQLString, + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + _requestMethod: { + type: require('./element.schema.js'), + description: + 'The request method or HTTP operation code to compare against that used by the client system under test.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/http-operations + requestMethod: { + type: CodeScalar, + description: + 'The request method or HTTP operation code to compare against that used by the client system under test.', + }, + _requestURL: { + type: require('./element.schema.js'), + description: + 'The value to use in a comparison against the request URL path string.', + }, + requestURL: { + type: GraphQLString, + description: + 'The value to use in a comparison against the request URL path string.', + }, + _resource: { + type: require('./element.schema.js'), + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + _response: { + type: require('./element.schema.js'), + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/assert-response-code-types + response: { + type: CodeScalar, + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + _responseCode: { + type: require('./element.schema.js'), + description: 'The value of the HTTP response code to be tested.', + }, + responseCode: { + type: GraphQLString, + description: 'The value of the HTTP response code to be tested.', + }, + rule: { + type: require('./testscriptsetupactionassertrule.schema.js'), + description: 'The TestScript.rule this assert will evaluate.', + }, + ruleset: { + type: require('./testscriptsetupactionassertruleset.schema.js'), + description: 'The TestScript.ruleset this assert will evaluate.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + _validateProfileId: { + type: require('./element.schema.js'), + description: 'The ID of the Profile to validate against.', + }, + validateProfileId: { + type: IdScalar, + description: 'The ID of the Profile to validate against.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The value to compare to.', + }, + value: { + type: GraphQLString, + description: 'The value to compare to.', + }, + _warningOnly: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + warningOnly: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupactionassertrule.schema.js b/src/resources/3_0_1/schemas/testscriptsetupactionassertrule.schema.js index b1219a11..2ea48dfc 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupactionassertrule.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupactionassertrule.schema.js @@ -1,31 +1,53 @@ -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert.rule Schema + * @summary TestScriptsetupactionassertrule Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionAssertRule', - description: 'The TestScript.rule this assert will evaluate.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - ruleId: { - type: new GraphQLNonNull(IdScalar), - description: 'The TestScript.rule id value this assert will evaluate.', - }, - _ruleId: { - type: require('./element.schema'), - description: 'The TestScript.rule id value this assert will evaluate.', - }, - param: { - type: new GraphQLList( - require('./testscriptsetupactionassertruleparam.schema'), - ), - description: - 'Each rule template can take one or more parameters for rule evaluation.', - }, - }), + name: 'TestScriptsetupactionassertrule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _ruleId: { + type: require('./element.schema.js'), + description: 'The TestScript.rule id value this assert will evaluate.', + }, + ruleId: { + type: new GraphQLNonNull(IdScalar), + description: 'The TestScript.rule id value this assert will evaluate.', + }, + param: { + type: new GraphQLList( + require('./testscriptsetupactionassertruleparam.schema.js'), + ), + description: + 'Each rule template can take one or more parameters for rule evaluation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupactionassertruleparam.schema.js b/src/resources/3_0_1/schemas/testscriptsetupactionassertruleparam.schema.js index 5c9c7968..dce8eb3a 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupactionassertruleparam.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupactionassertruleparam.schema.js @@ -1,36 +1,57 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.setup.action.assert.rule.param Schema + * @summary TestScriptsetupactionassertruleparam Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionAssertRuleParam', - description: - 'Each rule template can take one or more parameters for rule evaluation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Descriptive name for this parameter that matches the external assert rule parameter name.', - }, - _name: { - type: require('./element.schema'), - description: - 'Descriptive name for this parameter that matches the external assert rule parameter name.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The value for the parameter that will be passed on to the external rule template.', - }, - _value: { - type: require('./element.schema'), - description: - 'The value for the parameter that will be passed on to the external rule template.', - }, - }), + name: 'TestScriptsetupactionassertruleparam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Descriptive name for this parameter that matches the external assert rule parameter name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Descriptive name for this parameter that matches the external assert rule parameter name.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value for the parameter that will be passed on to the external rule template.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The value for the parameter that will be passed on to the external rule template.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupactionassertruleset.schema.js b/src/resources/3_0_1/schemas/testscriptsetupactionassertruleset.schema.js index 7c3d2310..acaa6577 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupactionassertruleset.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupactionassertruleset.schema.js @@ -1,33 +1,52 @@ -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert.ruleset Schema + * @summary TestScriptsetupactionassertruleset Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionAssertRuleset', - description: 'The TestScript.ruleset this assert will evaluate.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - rulesetId: { - type: new GraphQLNonNull(IdScalar), - description: - 'The TestScript.ruleset id value this assert will evaluate.', - }, - _rulesetId: { - type: require('./element.schema'), - description: - 'The TestScript.ruleset id value this assert will evaluate.', - }, - rule: { - type: new GraphQLList( - require('./testscriptsetupactionassertrulesetrule.schema'), - ), - description: - 'The referenced rule within the external ruleset template.', - }, - }), + name: 'TestScriptsetupactionassertruleset', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _rulesetId: { + type: require('./element.schema.js'), + description: 'The TestScript.ruleset id value this assert will evaluate.', + }, + rulesetId: { + type: new GraphQLNonNull(IdScalar), + description: 'The TestScript.ruleset id value this assert will evaluate.', + }, + rule: { + type: new GraphQLList( + require('./testscriptsetupactionassertrulesetrule.schema.js'), + ), + description: 'The referenced rule within the external ruleset template.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupactionassertrulesetrule.schema.js b/src/resources/3_0_1/schemas/testscriptsetupactionassertrulesetrule.schema.js index aee15d81..93449d83 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupactionassertrulesetrule.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupactionassertrulesetrule.schema.js @@ -1,33 +1,55 @@ -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.assert.ruleset.rule Schema + * @summary TestScriptsetupactionassertrulesetrule Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionAssertRulesetRule', - description: 'The referenced rule within the external ruleset template.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - ruleId: { - type: new GraphQLNonNull(IdScalar), - description: - 'Id of the referenced rule within the external ruleset template.', - }, - _ruleId: { - type: require('./element.schema'), - description: - 'Id of the referenced rule within the external ruleset template.', - }, - param: { - type: new GraphQLList( - require('./testscriptsetupactionassertrulesetruleparam.schema'), - ), - description: - 'Each rule template can take one or more parameters for rule evaluation.', - }, - }), + name: 'TestScriptsetupactionassertrulesetrule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _ruleId: { + type: require('./element.schema.js'), + description: + 'Id of the referenced rule within the external ruleset template.', + }, + ruleId: { + type: new GraphQLNonNull(IdScalar), + description: + 'Id of the referenced rule within the external ruleset template.', + }, + param: { + type: new GraphQLList( + require('./testscriptsetupactionassertrulesetruleparam.schema.js'), + ), + description: + 'Each rule template can take one or more parameters for rule evaluation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupactionassertrulesetruleparam.schema.js b/src/resources/3_0_1/schemas/testscriptsetupactionassertrulesetruleparam.schema.js index 4332c1a9..7e91633c 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupactionassertrulesetruleparam.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupactionassertrulesetruleparam.schema.js @@ -1,36 +1,57 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.setup.action.assert.ruleset.rule.param Schema + * @summary TestScriptsetupactionassertrulesetruleparam Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionAssertRulesetRuleParam', - description: - 'Each rule template can take one or more parameters for rule evaluation.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: - 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', - }, - _name: { - type: require('./element.schema'), - description: - 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: - 'The value for the parameter that will be passed on to the external ruleset rule template.', - }, - _value: { - type: require('./element.schema'), - description: - 'The value for the parameter that will be passed on to the external ruleset rule template.', - }, - }), + name: 'TestScriptsetupactionassertrulesetruleparam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Descriptive name for this parameter that matches the external assert ruleset rule parameter name.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value for the parameter that will be passed on to the external ruleset rule template.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The value for the parameter that will be passed on to the external ruleset rule template.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupactionoperation.schema.js b/src/resources/3_0_1/schemas/testscriptsetupactionoperation.schema.js index 7fb2c2d1..2824fd16 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupactionoperation.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupactionoperation.schema.js @@ -1,171 +1,188 @@ -const CodeScalar = require('../scalars/code.scalar'); -const IdScalar = require('../scalars/id.scalar'); const { - GraphQLObjectType, GraphQLString, + GraphQLList, GraphQLInt, GraphQLBoolean, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.setup.action.operation Schema + * @summary TestScriptsetupactionoperation Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionOperation', - description: 'The operation to perform.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/testscript-operation-codes - type: { - type: require('./coding.schema'), - description: 'Server interaction or operation type.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/defined-types - resource: { - type: CodeScalar, - description: - 'The type of the resource. See http://build.fhir.org/resourcelist.html.', - }, - _resource: { - type: require('./element.schema'), - description: - 'The type of the resource. See http://build.fhir.org/resourcelist.html.', - }, - label: { - type: GraphQLString, - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - _label: { - type: require('./element.schema'), - description: - 'The label would be used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.schema'), - description: - 'The description would be used by test engines for tracking and reporting purposes.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - accept: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", - }, - _accept: { - type: require('./element.schema'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/content-type - contentType: { - type: CodeScalar, - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - _contentType: { - type: require('./element.schema'), - description: - "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", - }, - destination: { - type: GraphQLInt, - description: - 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', - }, - _destination: { - type: require('./element.schema'), - description: - 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', - }, - encodeRequestUrl: { - type: GraphQLBoolean, - description: - 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', - }, - _encodeRequestUrl: { - type: require('./element.schema'), - description: - 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', - }, - origin: { - type: GraphQLInt, - description: - 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', - }, - _origin: { - type: require('./element.schema'), - description: - 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', - }, - params: { - type: GraphQLString, - description: - 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', - }, - _params: { - type: require('./element.schema'), - description: - 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', - }, - requestHeader: { - type: new GraphQLList( - require('./testscriptsetupactionoperationrequestheader.schema'), - ), - description: 'Header elements would be used to set HTTP headers.', - }, - requestId: { - type: IdScalar, - description: 'The fixture id (maybe new) to map to the request.', - }, - _requestId: { - type: require('./element.schema'), - description: 'The fixture id (maybe new) to map to the request.', - }, - responseId: { - type: IdScalar, - description: 'The fixture id (maybe new) to map to the response.', - }, - _responseId: { - type: require('./element.schema'), - description: 'The fixture id (maybe new) to map to the response.', - }, - sourceId: { - type: IdScalar, - description: - 'The id of the fixture used as the body of a PUT or POST request.', - }, - _sourceId: { - type: require('./element.schema'), - description: - 'The id of the fixture used as the body of a PUT or POST request.', - }, - targetId: { - type: IdScalar, - description: - 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', - }, - _targetId: { - type: require('./element.schema'), - description: - 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', - }, - url: { - type: GraphQLString, - description: 'Complete request URL.', - }, - _url: { - type: require('./element.schema'), - description: 'Complete request URL.', - }, - }), + name: 'TestScriptsetupactionoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/testscript-operation-codes + type: { + type: require('./coding.schema.js'), + description: 'Server interaction or operation type.', + }, + _resource: { + type: require('./element.schema.js'), + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/defined-types + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _accept: { + type: require('./element.schema.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + accept: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", + }, + _contentType: { + type: require('./element.schema.js'), + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/content-type + contentType: { + type: CodeScalar, + description: + "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _destination: { + type: require('./element.schema.js'), + description: + 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', + }, + destination: { + type: GraphQLInt, + description: + 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', + }, + _encodeRequestUrl: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + encodeRequestUrl: { + type: GraphQLBoolean, + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + _origin: { + type: require('./element.schema.js'), + description: + 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', + }, + origin: { + type: GraphQLInt, + description: + 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', + }, + _params: { + type: require('./element.schema.js'), + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + params: { + type: GraphQLString, + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + requestHeader: { + type: new GraphQLList( + require('./testscriptsetupactionoperationrequestheader.schema.js'), + ), + description: 'Header elements would be used to set HTTP headers.', + }, + _requestId: { + type: require('./element.schema.js'), + description: 'The fixture id (maybe new) to map to the request.', + }, + requestId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the request.', + }, + _responseId: { + type: require('./element.schema.js'), + description: 'The fixture id (maybe new) to map to the response.', + }, + responseId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the response.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + sourceId: { + type: IdScalar, + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + _targetId: { + type: require('./element.schema.js'), + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + targetId: { + type: IdScalar, + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + _url: { + type: require('./element.schema.js'), + description: 'Complete request URL.', + }, + url: { + type: GraphQLString, + description: 'Complete request URL.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptsetupactionoperationrequestheader.schema.js b/src/resources/3_0_1/schemas/testscriptsetupactionoperationrequestheader.schema.js index cee7a2cf..860144e0 100644 --- a/src/resources/3_0_1/schemas/testscriptsetupactionoperationrequestheader.schema.js +++ b/src/resources/3_0_1/schemas/testscriptsetupactionoperationrequestheader.schema.js @@ -1,31 +1,53 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.setup.action.operation.requestHeader Schema + * @summary TestScriptsetupactionoperationrequestHeader Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptSetupActionOperationRequestHeader', - description: 'Header elements would be used to set HTTP headers.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - field: { - type: new GraphQLNonNull(GraphQLString), - description: "The HTTP header field e.g. 'Accept'.", - }, - _field: { - type: require('./element.schema'), - description: "The HTTP header field e.g. 'Accept'.", - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: "The value of the header e.g. 'application/fhir+xml'.", - }, - _value: { - type: require('./element.schema'), - description: "The value of the header e.g. 'application/fhir+xml'.", - }, - }), + name: 'TestScriptsetupactionoperationrequestHeader', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _field: { + type: require('./element.schema.js'), + description: "The HTTP header field e.g. 'Accept'.", + }, + field: { + type: new GraphQLNonNull(GraphQLString), + description: "The HTTP header field e.g. 'Accept'.", + }, + _value: { + type: require('./element.schema.js'), + description: "The value of the header e.g. 'application/fhir+xml'.", + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: "The value of the header e.g. 'application/fhir+xml'.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptteardown.schema.js b/src/resources/3_0_1/schemas/testscriptteardown.schema.js index 5c597ec7..49734035 100644 --- a/src/resources/3_0_1/schemas/testscriptteardown.schema.js +++ b/src/resources/3_0_1/schemas/testscriptteardown.schema.js @@ -1,22 +1,43 @@ -const { GraphQLObjectType, GraphQLNonNull, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports - * @summary TestScript.teardown Schema + * @summary TestScriptteardown Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptTeardown', - description: - 'A series of operations required to clean up after the all the tests are executed (successfully or otherwise).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscriptteardownaction.schema')), - ), - description: 'The teardown action will only contain an operation.', - }, - }), + name: 'TestScriptteardown', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptteardownaction.schema.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptteardownaction.schema.js b/src/resources/3_0_1/schemas/testscriptteardownaction.schema.js index 4ec634c4..e8d7501d 100644 --- a/src/resources/3_0_1/schemas/testscriptteardownaction.schema.js +++ b/src/resources/3_0_1/schemas/testscriptteardownaction.schema.js @@ -1,13 +1,32 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary TestScript.teardown.action Schema + * @summary TestScriptteardownaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptTeardownAction', - description: 'The teardown action will only contain an operation.', - fields: () => extendSchema(require('./backboneelement.schema')), + name: 'TestScriptteardownaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscripttest.schema.js b/src/resources/3_0_1/schemas/testscripttest.schema.js index f7fe0166..c1fa7200 100644 --- a/src/resources/3_0_1/schemas/testscripttest.schema.js +++ b/src/resources/3_0_1/schemas/testscripttest.schema.js @@ -1,47 +1,63 @@ const { - GraphQLObjectType, GraphQLString, - GraphQLNonNull, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - /** * @name exports - * @summary TestScript.test Schema + * @summary TestScripttest Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptTest', - description: 'A test in this script.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: GraphQLString, - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - _name: { - type: require('./element.schema'), - description: - 'The name of this test used for tracking/logging purposes by test engines.', - }, - description: { - type: GraphQLString, - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - _description: { - type: require('./element.schema'), - description: - 'A short description of the test used by test engines for tracking and reporting purposes.', - }, - action: { - type: new GraphQLList( - new GraphQLNonNull(require('./testscripttestaction.schema')), - ), - description: - 'Action would contain either an operation or an assertion.', - }, - }), + name: 'TestScripttest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscripttestaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscripttestaction.schema.js b/src/resources/3_0_1/schemas/testscripttestaction.schema.js index 550e0373..238b57b4 100644 --- a/src/resources/3_0_1/schemas/testscripttestaction.schema.js +++ b/src/resources/3_0_1/schemas/testscripttestaction.schema.js @@ -1,13 +1,32 @@ -const { GraphQLObjectType } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); /** * @name exports - * @summary TestScript.test.action Schema + * @summary TestScripttestaction Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptTestAction', - description: 'Action would contain either an operation or an assertion.', - fields: () => extendSchema(require('./backboneelement.schema')), + name: 'TestScripttestaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/testscriptvariable.schema.js b/src/resources/3_0_1/schemas/testscriptvariable.schema.js index d12fa363..4a90c827 100644 --- a/src/resources/3_0_1/schemas/testscriptvariable.schema.js +++ b/src/resources/3_0_1/schemas/testscriptvariable.schema.js @@ -1,95 +1,116 @@ -const IdScalar = require('../scalars/id.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); /** * @name exports - * @summary TestScript.variable Schema + * @summary TestScriptvariable Schema */ module.exports = new GraphQLObjectType({ - name: 'TestScriptVariable', - description: - 'Variable is set based either on element value in response body or on header field value in the response headers.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'Descriptive name for this variable.', - }, - _name: { - type: require('./element.schema'), - description: 'Descriptive name for this variable.', - }, - defaultValue: { - type: GraphQLString, - description: - 'A default, hard-coded, or user-defined value for this variable.', - }, - _defaultValue: { - type: require('./element.schema'), - description: - 'A default, hard-coded, or user-defined value for this variable.', - }, - description: { - type: GraphQLString, - description: - 'A free text natural language description of the variable and its purpose.', - }, - _description: { - type: require('./element.schema'), - description: - 'A free text natural language description of the variable and its purpose.', - }, - expression: { - type: GraphQLString, - description: - 'The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', - }, - _expression: { - type: require('./element.schema'), - description: - 'The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', - }, - headerField: { - type: GraphQLString, - description: - 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', - }, - _headerField: { - type: require('./element.schema'), - description: - 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', - }, - hint: { - type: GraphQLString, - description: - 'Displayable text string with hint help information to the user when entering a default value.', - }, - _hint: { - type: require('./element.schema'), - description: - 'Displayable text string with hint help information to the user when entering a default value.', - }, - path: { - type: GraphQLString, - description: - 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', - }, - _path: { - type: require('./element.schema'), - description: - 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', - }, - sourceId: { - type: IdScalar, - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', - }, - _sourceId: { - type: require('./element.schema'), - description: - 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', - }, - }), + name: 'TestScriptvariable', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Descriptive name for this variable.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Descriptive name for this variable.', + }, + _defaultValue: { + type: require('./element.schema.js'), + description: + 'A default, hard-coded, or user-defined value for this variable.', + }, + defaultValue: { + type: GraphQLString, + description: + 'A default, hard-coded, or user-defined value for this variable.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A free text natural language description of the variable and its purpose.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the variable and its purpose.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + expression: { + type: GraphQLString, + description: + 'The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + _headerField: { + type: require('./element.schema.js'), + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + headerField: { + type: GraphQLString, + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + _hint: { + type: require('./element.schema.js'), + description: + 'Displayable text string with hint help information to the user when entering a default value.', + }, + hint: { + type: GraphQLString, + description: + 'Displayable text string with hint help information to the user when entering a default value.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + path: { + type: GraphQLString, + description: + 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/timing.schema.js b/src/resources/3_0_1/schemas/timing.schema.js index 669b5b81..f49d2633 100644 --- a/src/resources/3_0_1/schemas/timing.schema.js +++ b/src/resources/3_0_1/schemas/timing.schema.js @@ -1,7 +1,5 @@ -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -9,27 +7,40 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'Timing', - description: 'Base StructureDefinition for Timing Type.', - fields: () => - extendSchema(require('./element.schema'), { - event: { - type: new GraphQLList(DateTimeScalar), - description: 'Identifies specific times when the event occurs.', - }, - _event: { - type: require('./element.schema'), - description: 'Identifies specific times when the event occurs.', - }, - repeat: { - type: require('./timingrepeat.schema'), - description: - 'A set of rules that describe when the event is scheduled.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/timing-abbreviation - code: { - type: require('./codeableconcept.schema'), - description: - 'A code for the timing schedule. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).', - }, - }), + description: 'Base StructureDefinition for Timing Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _event: { + type: require('./element.schema.js'), + description: 'Identifies specific times when the event occurs.', + }, + event: { + type: new GraphQLList(DateTimeScalar), + description: 'Identifies specific times when the event occurs.', + }, + repeat: { + type: require('./element.schema.js'), + description: 'A set of rules that describe when the event is scheduled.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/timing-abbreviation + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code for the timing schedule. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/timingrepeat.schema.js b/src/resources/3_0_1/schemas/timingrepeat.schema.js index 3ea9ba33..05b1d307 100644 --- a/src/resources/3_0_1/schemas/timingrepeat.schema.js +++ b/src/resources/3_0_1/schemas/timingrepeat.schema.js @@ -1,172 +1,185 @@ -const CodeScalar = require('../scalars/code.scalar'); -const TimeScalar = require('../scalars/time.scalar'); -const UnsignedIntScalar = require('../scalars/unsignedint.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLInt, GraphQLFloat, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); /** * @name exports - * @summary Timing.repeat Schema + * @summary Timingrepeat Schema */ module.exports = new GraphQLObjectType({ - name: 'TimingRepeat', - description: 'A set of rules that describe when the event is scheduled.', - fields: () => - extendSchema(require('./element.schema'), { - boundsDuration: { - type: require('./duration.schema'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - boundsRange: { - type: require('./range.schema'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - boundsPeriod: { - type: require('./period.schema'), - description: - 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', - }, - count: { - type: GraphQLInt, - description: 'A total count of the desired number of repetitions.', - }, - _count: { - type: require('./element.schema'), - description: 'A total count of the desired number of repetitions.', - }, - countMax: { - type: GraphQLInt, - description: - 'A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).', - }, - _countMax: { - type: require('./element.schema'), - description: - 'A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).', - }, - duration: { - type: GraphQLFloat, - description: 'How long this thing happens for when it happens.', - }, - _duration: { - type: require('./element.schema'), - description: 'How long this thing happens for when it happens.', - }, - durationMax: { - type: GraphQLFloat, - description: - 'The upper limit of how long this thing happens for when it happens.', - }, - _durationMax: { - type: require('./element.schema'), - description: - 'The upper limit of how long this thing happens for when it happens.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/units-of-time - durationUnit: { - type: CodeScalar, - description: 'The units of time for the duration, in UCUM units.', - }, - _durationUnit: { - type: require('./element.schema'), - description: 'The units of time for the duration, in UCUM units.', - }, - frequency: { - type: GraphQLInt, - description: - 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', - }, - _frequency: { - type: require('./element.schema'), - description: - 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', - }, - frequencyMax: { - type: GraphQLInt, - description: - 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', - }, - _frequencyMax: { - type: require('./element.schema'), - description: - 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', - }, - period: { - type: GraphQLFloat, - description: - "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", - }, - _period: { - type: require('./element.schema'), - description: - "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", - }, - periodMax: { - type: GraphQLFloat, - description: - "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", - }, - _periodMax: { - type: require('./element.schema'), - description: - "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/units-of-time - periodUnit: { - type: CodeScalar, - description: 'The units of time for the period in UCUM units.', - }, - _periodUnit: { - type: require('./element.schema'), - description: 'The units of time for the period in UCUM units.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/days-of-week - dayOfWeek: { - type: new GraphQLList(CodeScalar), - description: - 'If one or more days of week is provided, then the action happens only on the specified day(s).', - }, - _dayOfWeek: { - type: require('./element.schema'), - description: - 'If one or more days of week is provided, then the action happens only on the specified day(s).', - }, - timeOfDay: { - type: new GraphQLList(TimeScalar), - description: 'Specified time of day for action to take place.', - }, - _timeOfDay: { - type: require('./element.schema'), - description: 'Specified time of day for action to take place.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/event-timing - when: { - type: new GraphQLList(CodeScalar), - description: - 'Real world events that the occurrence of the event should be tied to.', - }, - _when: { - type: require('./element.schema'), - description: - 'Real world events that the occurrence of the event should be tied to.', - }, - offset: { - type: UnsignedIntScalar, - description: - 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', - }, - _offset: { - type: require('./element.schema'), - description: - 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', - }, - }), + name: 'Timingrepeat', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + boundsDuration: { + type: require('./duration.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsRange: { + type: require('./range.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsPeriod: { + type: require('./period.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + _count: { + type: require('./element.schema.js'), + description: 'A total count of the desired number of repetitions.', + }, + count: { + type: GraphQLInt, + description: 'A total count of the desired number of repetitions.', + }, + _countMax: { + type: require('./element.schema.js'), + description: + 'A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).', + }, + countMax: { + type: GraphQLInt, + description: + 'A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).', + }, + _duration: { + type: require('./element.schema.js'), + description: 'How long this thing happens for when it happens.', + }, + duration: { + type: GraphQLFloat, + description: 'How long this thing happens for when it happens.', + }, + _durationMax: { + type: require('./element.schema.js'), + description: + 'The upper limit of how long this thing happens for when it happens.', + }, + durationMax: { + type: GraphQLFloat, + description: + 'The upper limit of how long this thing happens for when it happens.', + }, + _durationUnit: { + type: require('./element.schema.js'), + description: 'The units of time for the duration, in UCUM units.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/units-of-time + durationUnit: { + type: CodeScalar, + description: 'The units of time for the duration, in UCUM units.', + }, + _frequency: { + type: require('./element.schema.js'), + description: + 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', + }, + frequency: { + type: GraphQLInt, + description: + 'The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).', + }, + _frequencyMax: { + type: require('./element.schema.js'), + description: + 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + frequencyMax: { + type: GraphQLInt, + description: + 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + _period: { + type: require('./element.schema.js'), + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", + }, + period: { + type: GraphQLFloat, + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period.", + }, + _periodMax: { + type: require('./element.schema.js'), + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + periodMax: { + type: GraphQLFloat, + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + _periodUnit: { + type: require('./element.schema.js'), + description: 'The units of time for the period in UCUM units.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/units-of-time + periodUnit: { + type: CodeScalar, + description: 'The units of time for the period in UCUM units.', + }, + _dayOfWeek: { + type: require('./element.schema.js'), + description: + 'If one or more days of week is provided, then the action happens only on the specified day(s).', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/days-of-week + dayOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'If one or more days of week is provided, then the action happens only on the specified day(s).', + }, + _timeOfDay: { + type: require('./element.schema.js'), + description: 'Specified time of day for action to take place.', + }, + timeOfDay: { + type: new GraphQLList(TimeScalar), + description: 'Specified time of day for action to take place.', + }, + _when: { + type: require('./element.schema.js'), + description: + 'Real world events that the occurrence of the event should be tied to.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/event-timing + when: { + type: new GraphQLList(CodeScalar), + description: + 'Real world events that the occurrence of the event should be tied to.', + }, + _offset: { + type: require('./element.schema.js'), + description: + 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', + }, + offset: { + type: UnsignedIntScalar, + description: + 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/triggerdefinition.schema.js b/src/resources/3_0_1/schemas/triggerdefinition.schema.js index 36ad28f6..c6fdcacc 100644 --- a/src/resources/3_0_1/schemas/triggerdefinition.schema.js +++ b/src/resources/3_0_1/schemas/triggerdefinition.schema.js @@ -1,9 +1,13 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateScalar = require('../scalars/date.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -11,56 +15,78 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'TriggerDefinition', - description: 'Base StructureDefinition for TriggerDefinition Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/trigger-type - type: { - type: new GraphQLNonNull(CodeScalar), - description: 'The type of triggering event.', - }, - _type: { - type: require('./element.schema'), - description: 'The type of triggering event.', - }, - eventName: { - type: GraphQLString, - description: - 'The name of the event (if this is a named-event trigger).', - }, - _eventName: { - type: require('./element.schema'), - description: - 'The name of the event (if this is a named-event trigger).', - }, - eventTimingTiming: { - type: require('./timing.schema'), - description: 'The timing of the event (if this is a period trigger).', - }, - eventTimingReference: { - type: require('./reference.schema'), - description: 'The timing of the event (if this is a period trigger).', - }, - eventTimingDate: { - type: DateScalar, - description: 'The timing of the event (if this is a period trigger).', - }, - _eventTimingDate: { - type: require('./element.schema'), - description: 'The timing of the event (if this is a period trigger).', - }, - eventTimingDateTime: { - type: DateTimeScalar, - description: 'The timing of the event (if this is a period trigger).', - }, - _eventTimingDateTime: { - type: require('./element.schema'), + description: 'Base StructureDefinition for TriggerDefinition Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of triggering event.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/trigger-type + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of triggering event.', + }, + _eventName: { + type: require('./element.schema.js'), + description: 'The name of the event (if this is a named-event trigger).', + }, + eventName: { + type: GraphQLString, + description: 'The name of the event (if this is a named-event trigger).', + }, + eventTimingTiming: { + type: require('./timing.schema.js'), + description: 'The timing of the event (if this is a period trigger).', + }, + eventTimingReference: { + type: new GraphQLUnionType({ + name: + 'TriggerDefinitioneventTimingReference_eventTimingReference_Union', description: 'The timing of the event (if this is a period trigger).', - }, - eventData: { - type: require('./datarequirement.schema'), - description: - 'The triggering data of the event (if this is a data trigger).', - }, - }), + types: () => [require('./schedule.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Schedule') { + return require('./schedule.schema.js'); + } + }, + }), + description: 'The timing of the event (if this is a period trigger).', + }, + _eventTimingDate: { + type: require('./element.schema.js'), + description: 'The timing of the event (if this is a period trigger).', + }, + eventTimingDate: { + type: DateScalar, + description: 'The timing of the event (if this is a period trigger).', + }, + _eventTimingDateTime: { + type: require('./element.schema.js'), + description: 'The timing of the event (if this is a period trigger).', + }, + eventTimingDateTime: { + type: DateTimeScalar, + description: 'The timing of the event (if this is a period trigger).', + }, + eventData: { + type: require('./datarequirement.schema.js'), + description: + 'The triggering data of the event (if this is a data trigger).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/usagecontext.schema.js b/src/resources/3_0_1/schemas/usagecontext.schema.js index 139b400c..e0e3120d 100644 --- a/src/resources/3_0_1/schemas/usagecontext.schema.js +++ b/src/resources/3_0_1/schemas/usagecontext.schema.js @@ -1,6 +1,9 @@ -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); /** * @name exports @@ -8,32 +11,46 @@ const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); */ module.exports = new GraphQLObjectType({ name: 'UsageContext', - description: 'Base StructureDefinition for UsageContext Type.', - fields: () => - extendSchema(require('./element.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/usage-context-type - code: { - type: new GraphQLNonNull(require('./coding.schema')), - description: - 'A code that identifies the type of context being specified by this usage context.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - valueCodeableConcept: { - type: new GraphQLNonNull(require('./codeableconcept.schema')), - description: - 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - valueQuantity: { - type: new GraphQLNonNull(require('./quantity.schema')), - description: - 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/use-context - valueRange: { - type: new GraphQLNonNull(require('./range.schema')), - description: - 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', - }, - }), + description: 'Base StructureDefinition for UsageContext Type', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/usage-context-type + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A code that identifies the type of context being specified by this usage context.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/use-context + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valueset.schema.js b/src/resources/3_0_1/schemas/valueset.schema.js index db9587fe..7198260d 100644 --- a/src/resources/3_0_1/schemas/valueset.schema.js +++ b/src/resources/3_0_1/schemas/valueset.schema.js @@ -1,23 +1,16 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLString, GraphQLBoolean, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let ValueSetResourceType = new GraphQLEnumType({ - name: 'ValueSetResourceType', - values: { - ValueSet: { value: 'ValueSet' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -25,174 +18,232 @@ let ValueSetResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'ValueSet', - description: 'Base StructureDefinition for ValueSet Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(ValueSetResourceType), - description: 'Type of this resource.', - }, - url: { - type: UriScalar, - description: - 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. The URL SHOULD include the major version of the value set. For more information see [Technical and Business Versions](resource.html#versions).', - }, - _url: { - type: require('./element.schema'), - description: - 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. The URL SHOULD include the major version of the value set. For more information see [Technical and Business Versions](resource.html#versions).', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', - }, - version: { - type: GraphQLString, - description: - 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', - }, - name: { - type: GraphQLString, - description: - 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - _name: { - type: require('./element.schema'), - description: - 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', - }, - title: { - type: GraphQLString, - description: - 'A short, descriptive, user-friendly title for the value set.', - }, - _title: { - type: require('./element.schema'), - description: - 'A short, descriptive, user-friendly title for the value set.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/publication-status - status: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The status of this value set. Enables tracking the life-cycle of the content.', - }, - _status: { - type: require('./element.schema'), - description: - 'The status of this value set. Enables tracking the life-cycle of the content.', - }, - experimental: { - type: GraphQLBoolean, - description: - 'A boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - _experimental: { - type: require('./element.schema'), - description: - 'A boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', - }, - date: { - type: DateTimeScalar, - description: - "The date (and optionally time) when the value set was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the value set changes. (e.g. the 'content logical definition').", - }, - _date: { - type: require('./element.schema'), - description: - "The date (and optionally time) when the value set was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the value set changes. (e.g. the 'content logical definition').", - }, - publisher: { - type: GraphQLString, - description: - 'The name of the individual or organization that published the value set.', - }, - _publisher: { - type: require('./element.schema'), - description: - 'The name of the individual or organization that published the value set.', - }, - contact: { - type: new GraphQLList(require('./contactdetail.schema')), - description: - 'Contact details to assist a user in finding and communicating with the publisher.', - }, - description: { - type: GraphQLString, - description: - "A free text natural language description of the value set from a consumer's perspective.", - }, - _description: { - type: require('./element.schema'), - description: - "A free text natural language description of the value set from a consumer's perspective.", - }, - useContext: { - type: new GraphQLList(require('./usagecontext.schema')), - description: - 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate value set instances.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction - jurisdiction: { - type: new GraphQLList(require('./codeableconcept.schema')), - description: - 'A legal or geographic region in which the value set is intended to be used.', - }, - immutable: { - type: GraphQLBoolean, - description: - "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", - }, - _immutable: { - type: require('./element.schema'), - description: - "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", - }, - purpose: { - type: GraphQLString, - description: - 'Explaination of why this value set is needed and why it has been designed as it has.', - }, - _purpose: { - type: require('./element.schema'), - description: - 'Explaination of why this value set is needed and why it has been designed as it has.', - }, - copyright: { - type: GraphQLString, - description: - 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', - }, - _copyright: { - type: require('./element.schema'), - description: - 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', - }, - extensible: { - type: GraphQLBoolean, - description: - 'Whether this is intended to be used with an extensible binding or not.', - }, - _extensible: { - type: require('./element.schema'), - description: - 'Whether this is intended to be used with an extensible binding or not.', - }, - compose: { - type: require('./valuesetcompose.schema'), - description: - "A set of criteria that define the content logical definition of the value set by including or excluding codes from outside this value set. This I also known as the 'Content Logical Definition' (CLD).", - }, - expansion: { - type: require('./valuesetexpansion.schema'), - description: - "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", - }, - }), + description: 'Base StructureDefinition for ValueSet Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ValueSet_Enum_schema', + values: { ValueSet: { value: 'ValueSet' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. The URL SHOULD include the major version of the value set. For more information see [Technical and Business Versions](resource.html#versions).', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this value set is (or will be) published. The URL SHOULD include the major version of the value set. For more information see [Technical and Business Versions](resource.html#versions).', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the value set.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the value set.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this value set. Enables tracking the life-cycle of the content.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/publication-status + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this value set. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + "The date (and optionally time) when the value set was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the value set changes. (e.g. the 'content logical definition').", + }, + date: { + type: DateTimeScalar, + description: + "The date (and optionally time) when the value set was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the value set changes. (e.g. the 'content logical definition').", + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization that published the value set.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the individual or organization that published the value set.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the value set from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the value set from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate value set instances.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/jurisdiction + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the value set is intended to be used.', + }, + _immutable: { + type: require('./element.schema.js'), + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + immutable: { + type: GraphQLBoolean, + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explaination of why this value set is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explaination of why this value set is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + _extensible: { + type: require('./element.schema.js'), + description: + 'Whether this is intended to be used with an extensible binding or not.', + }, + extensible: { + type: GraphQLBoolean, + description: + 'Whether this is intended to be used with an extensible binding or not.', + }, + compose: { + type: require('./valuesetcompose.schema.js'), + description: + "A set of criteria that define the content logical definition of the value set by including or excluding codes from outside this value set. This I also known as the 'Content Logical Definition' (CLD).", + }, + expansion: { + type: require('./valuesetexpansion.schema.js'), + description: + "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valuesetcompose.schema.js b/src/resources/3_0_1/schemas/valuesetcompose.schema.js index 75cab8df..7b8c0cde 100644 --- a/src/resources/3_0_1/schemas/valuesetcompose.schema.js +++ b/src/resources/3_0_1/schemas/valuesetcompose.schema.js @@ -1,49 +1,66 @@ -const DateScalar = require('../scalars/date.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLBoolean, GraphQLNonNull, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const DateScalar = require('../scalars/date.scalar.js'); /** * @name exports - * @summary ValueSet.compose Schema + * @summary ValueSetcompose Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetCompose', - description: - "A set of criteria that define the content logical definition of the value set by including or excluding codes from outside this value set. This I also known as the 'Content Logical Definition' (CLD).", - fields: () => - extendSchema(require('./backboneelement.schema'), { - lockedDate: { - type: DateScalar, - description: - 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version as of the locked date for referenced code system(s) and value set instances where ValueSet.compose.include.version is not defined.', - }, - _lockedDate: { - type: require('./element.schema'), - description: - 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version as of the locked date for referenced code system(s) and value set instances where ValueSet.compose.include.version is not defined.', - }, - inactive: { - type: GraphQLBoolean, - description: - 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable ExpansionProfile (but generally, inactive codes would be expected to be included).', - }, - _inactive: { - type: require('./element.schema'), - description: - 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable ExpansionProfile (but generally, inactive codes would be expected to be included).', - }, - include: { - type: new GraphQLList( - new GraphQLNonNull(require('./valuesetcomposeinclude.schema')), - ), - description: - 'Include one or more codes from a code system or other value set(s).', - }, - }), + name: 'ValueSetcompose', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _lockedDate: { + type: require('./element.schema.js'), + description: + 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version as of the locked date for referenced code system(s) and value set instances where ValueSet.compose.include.version is not defined.', + }, + lockedDate: { + type: DateScalar, + description: + 'If a locked date is defined, then the Content Logical Definition must be evaluated using the current version as of the locked date for referenced code system(s) and value set instances where ValueSet.compose.include.version is not defined.', + }, + _inactive: { + type: require('./element.schema.js'), + description: + 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable ExpansionProfile (but generally, inactive codes would be expected to be included).', + }, + inactive: { + type: GraphQLBoolean, + description: + 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable ExpansionProfile (but generally, inactive codes would be expected to be included).', + }, + include: { + type: new GraphQLList( + new GraphQLNonNull(require('./valuesetcomposeinclude.schema.js')), + ), + description: + 'Include one or more codes from a code system or other value set(s).', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valuesetcomposeinclude.schema.js b/src/resources/3_0_1/schemas/valuesetcomposeinclude.schema.js index 0718507c..f9e950ac 100644 --- a/src/resources/3_0_1/schemas/valuesetcomposeinclude.schema.js +++ b/src/resources/3_0_1/schemas/valuesetcomposeinclude.schema.js @@ -1,58 +1,76 @@ -const UriScalar = require('../scalars/uri.scalar'); -const { GraphQLObjectType, GraphQLString, GraphQLList } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include Schema + * @summary ValueSetcomposeinclude Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetComposeInclude', - description: - 'Include one or more codes from a code system or other value set(s).', - fields: () => - extendSchema(require('./backboneelement.schema'), { - system: { - type: UriScalar, - description: - 'An absolute URI which is the code system from which the selected codes come from.', - }, - _system: { - type: require('./element.schema'), - description: - 'An absolute URI which is the code system from which the selected codes come from.', - }, - version: { - type: GraphQLString, - description: - 'The version of the code system that the codes are selected from.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of the code system that the codes are selected from.', - }, - concept: { - type: new GraphQLList( - require('./valuesetcomposeincludeconcept.schema'), - ), - description: 'Specifies a concept to be included or excluded.', - }, - filter: { - type: new GraphQLList(require('./valuesetcomposeincludefilter.schema')), - description: - 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', - }, - valueSet: { - type: new GraphQLList(UriScalar), - description: - 'Selects concepts found in this value set. This is an absolute URI that is a reference to ValueSet.url.', - }, - _valueSet: { - type: require('./element.schema'), - description: - 'Selects concepts found in this value set. This is an absolute URI that is a reference to ValueSet.url.', - }, - }), + name: 'ValueSetcomposeinclude', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the code system that the codes are selected from.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system that the codes are selected from.', + }, + concept: { + type: new GraphQLList( + require('./valuesetcomposeincludeconcept.schema.js'), + ), + description: 'Specifies a concept to be included or excluded.', + }, + filter: { + type: new GraphQLList( + require('./valuesetcomposeincludefilter.schema.js'), + ), + description: + 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', + }, + _valueSet: { + type: require('./element.schema.js'), + description: + 'Selects concepts found in this value set. This is an absolute URI that is a reference to ValueSet.url.', + }, + valueSet: { + type: new GraphQLList(UriScalar), + description: + 'Selects concepts found in this value set. This is an absolute URI that is a reference to ValueSet.url.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valuesetcomposeincludeconcept.schema.js b/src/resources/3_0_1/schemas/valuesetcomposeincludeconcept.schema.js index 8c0946b8..b14a2dd2 100644 --- a/src/resources/3_0_1/schemas/valuesetcomposeincludeconcept.schema.js +++ b/src/resources/3_0_1/schemas/valuesetcomposeincludeconcept.schema.js @@ -1,48 +1,65 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, GraphQLList, + GraphQLNonNull, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.concept Schema + * @summary ValueSetcomposeincludeconcept Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetComposeIncludeConcept', - description: 'Specifies a concept to be included or excluded.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - code: { - type: new GraphQLNonNull(CodeScalar), - description: - 'Specifies a code for the concept to be included or excluded.', - }, - _code: { - type: require('./element.schema'), - description: - 'Specifies a code for the concept to be included or excluded.', - }, - display: { - type: GraphQLString, - description: - 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', - }, - _display: { - type: require('./element.schema'), - description: - 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', - }, - designation: { - type: new GraphQLList( - require('./valuesetcomposeincludeconceptdesignation.schema'), - ), - description: - 'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.', - }, - }), + name: 'ValueSetcomposeincludeconcept', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + display: { + type: GraphQLString, + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + designation: { + type: new GraphQLList( + require('./valuesetcomposeincludeconceptdesignation.schema.js'), + ), + description: + 'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valuesetcomposeincludeconceptdesignation.schema.js b/src/resources/3_0_1/schemas/valuesetcomposeincludeconceptdesignation.schema.js index e6ce5ddf..0648dab9 100644 --- a/src/resources/3_0_1/schemas/valuesetcomposeincludeconceptdesignation.schema.js +++ b/src/resources/3_0_1/schemas/valuesetcomposeincludeconceptdesignation.schema.js @@ -1,39 +1,60 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.concept.designation Schema + * @summary ValueSetcomposeincludeconceptdesignation Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetComposeIncludeConceptDesignation', - description: - 'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/languages - language: { - type: CodeScalar, - description: 'The language this designation is defined for.', - }, - _language: { - type: require('./element.schema'), - description: 'The language this designation is defined for.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/designation-use - use: { - type: require('./coding.schema'), - description: 'A code that details how this designation would be used.', - }, - value: { - type: new GraphQLNonNull(GraphQLString), - description: 'The text value for this designation.', - }, - _value: { - type: require('./element.schema'), - description: 'The text value for this designation.', - }, - }), + name: 'ValueSetcomposeincludeconceptdesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/designation-use + use: { + type: require('./coding.schema.js'), + description: 'A code that details how this designation would be used.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valuesetcomposeincludefilter.schema.js b/src/resources/3_0_1/schemas/valuesetcomposeincludefilter.schema.js index a8226f26..945cff89 100644 --- a/src/resources/3_0_1/schemas/valuesetcomposeincludefilter.schema.js +++ b/src/resources/3_0_1/schemas/valuesetcomposeincludefilter.schema.js @@ -1,48 +1,69 @@ -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLNonNull } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.compose.include.filter Schema + * @summary ValueSetcomposeincludefilter Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetComposeIncludeFilter', - description: - 'Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - property: { - type: new GraphQLNonNull(CodeScalar), - description: - 'A code that identifies a property defined in the code system.', - }, - _property: { - type: require('./element.schema'), - description: - 'A code that identifies a property defined in the code system.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/filter-operator - op: { - type: new GraphQLNonNull(CodeScalar), - description: - 'The kind of operation to perform as a part of the filter criteria.', - }, - _op: { - type: require('./element.schema'), - description: - 'The kind of operation to perform as a part of the filter criteria.', - }, - value: { - type: new GraphQLNonNull(CodeScalar), - description: - "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", - }, - _value: { - type: require('./element.schema'), - description: - "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", - }, - }), + name: 'ValueSetcomposeincludefilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _property: { + type: require('./element.schema.js'), + description: + 'A code that identifies a property defined in the code system.', + }, + property: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that identifies a property defined in the code system.', + }, + _op: { + type: require('./element.schema.js'), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/filter-operator + op: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + _value: { + type: require('./element.schema.js'), + description: + "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", + }, + value: { + type: new GraphQLNonNull(CodeScalar), + description: + "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valuesetexpansion.schema.js b/src/resources/3_0_1/schemas/valuesetexpansion.schema.js index 27d3e067..66f78008 100644 --- a/src/resources/3_0_1/schemas/valuesetexpansion.schema.js +++ b/src/resources/3_0_1/schemas/valuesetexpansion.schema.js @@ -1,72 +1,89 @@ -const UriScalar = require('../scalars/uri.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, + GraphQLString, + GraphQLList, GraphQLNonNull, GraphQLInt, - GraphQLList, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports - * @summary ValueSet.expansion Schema + * @summary ValueSetexpansion Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetExpansion', - description: - "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", - fields: () => - extendSchema(require('./backboneelement.schema'), { - identifier: { - type: new GraphQLNonNull(UriScalar), - description: - 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', - }, - _identifier: { - type: require('./element.schema'), - description: - 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', - }, - timestamp: { - type: new GraphQLNonNull(DateTimeScalar), - description: - 'The time at which the expansion was produced by the expanding system.', - }, - _timestamp: { - type: require('./element.schema'), - description: - 'The time at which the expansion was produced by the expanding system.', - }, - total: { - type: GraphQLInt, - description: - 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', - }, - _total: { - type: require('./element.schema'), - description: - 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', - }, - offset: { - type: GraphQLInt, - description: - 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', - }, - _offset: { - type: require('./element.schema'), - description: - 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', - }, - parameter: { - type: new GraphQLList(require('./valuesetexpansionparameter.schema')), - description: - 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', - }, - contains: { - type: new GraphQLList(require('./valuesetexpansioncontains.schema')), - description: 'The codes that are contained in the value set expansion.', - }, - }), + name: 'ValueSetexpansion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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: require('./element.schema.js'), + description: + 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', + }, + identifier: { + type: new GraphQLNonNull(UriScalar), + description: + 'An identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do so.', + }, + _timestamp: { + type: require('./element.schema.js'), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + timestamp: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + _total: { + type: require('./element.schema.js'), + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + total: { + type: GraphQLInt, + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + _offset: { + type: require('./element.schema.js'), + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', + }, + offset: { + type: GraphQLInt, + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL not be present.', + }, + parameter: { + type: new GraphQLList(require('./valuesetexpansionparameter.schema.js')), + description: + 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', + }, + contains: { + type: new GraphQLList(require('./valuesetexpansioncontains.schema.js')), + description: 'The codes that are contained in the value set expansion.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valuesetexpansioncontains.schema.js b/src/resources/3_0_1/schemas/valuesetexpansioncontains.schema.js index 8323e24b..79998e59 100644 --- a/src/resources/3_0_1/schemas/valuesetexpansioncontains.schema.js +++ b/src/resources/3_0_1/schemas/valuesetexpansioncontains.schema.js @@ -1,75 +1,97 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); -const { GraphQLObjectType, GraphQLBoolean, GraphQLString } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.expansion.contains Schema + * @summary ValueSetexpansioncontains Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetExpansionContains', - description: 'The codes that are contained in the value set expansion.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - system: { - type: UriScalar, - description: - 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', - }, - _system: { - type: require('./element.schema'), - description: - 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', - }, - abstract: { - type: GraphQLBoolean, - description: - 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', - }, - _abstract: { - type: require('./element.schema'), - description: - 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', - }, - inactive: { - type: GraphQLBoolean, - description: - 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data.', - }, - _inactive: { - type: require('./element.schema'), - description: - 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data.', - }, - version: { - type: GraphQLString, - description: - 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', - }, - _version: { - type: require('./element.schema'), - description: - 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', - }, - code: { - type: CodeScalar, - description: - 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', - }, - _code: { - type: require('./element.schema'), - description: - 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', - }, - display: { - type: GraphQLString, - description: 'The recommended display for this item in the expansion.', - }, - _display: { - type: require('./element.schema'), - description: 'The recommended display for this item in the expansion.', - }, - }), + name: 'ValueSetexpansioncontains', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + _abstract: { + type: require('./element.schema.js'), + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + abstract: { + type: GraphQLBoolean, + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + _inactive: { + type: require('./element.schema.js'), + description: + 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data.', + }, + inactive: { + type: GraphQLBoolean, + description: + 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', + }, + version: { + type: GraphQLString, + description: + 'The version of this code system that defined this code and/or display. This should only be used with code systems that do not enforce concept permanence.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + code: { + type: CodeScalar, + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + _display: { + type: require('./element.schema.js'), + description: 'The recommended display for this item in the expansion.', + }, + display: { + type: GraphQLString, + description: 'The recommended display for this item in the expansion.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/valuesetexpansionparameter.schema.js b/src/resources/3_0_1/schemas/valuesetexpansionparameter.schema.js index 34f5cffc..e01e404a 100644 --- a/src/resources/3_0_1/schemas/valuesetexpansionparameter.schema.js +++ b/src/resources/3_0_1/schemas/valuesetexpansionparameter.schema.js @@ -1,81 +1,98 @@ -const UriScalar = require('../scalars/uri.scalar'); -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLNonNull, GraphQLString, + GraphQLList, + GraphQLNonNull, GraphQLBoolean, GraphQLInt, GraphQLFloat, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary ValueSet.expansion.parameter Schema + * @summary ValueSetexpansionparameter Schema */ module.exports = new GraphQLObjectType({ - name: 'ValueSetExpansionParameter', - description: - 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - name: { - type: new GraphQLNonNull(GraphQLString), - description: 'The name of the parameter.', - }, - _name: { - type: require('./element.schema'), - description: 'The name of the parameter.', - }, - valueString: { - type: GraphQLString, - description: 'The value of the parameter.', - }, - _valueString: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueBoolean: { - type: GraphQLBoolean, - description: 'The value of the parameter.', - }, - _valueBoolean: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueInteger: { - type: GraphQLInt, - description: 'The value of the parameter.', - }, - _valueInteger: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueDecimal: { - type: GraphQLFloat, - description: 'The value of the parameter.', - }, - _valueDecimal: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueUri: { - type: UriScalar, - description: 'The value of the parameter.', - }, - _valueUri: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - valueCode: { - type: CodeScalar, - description: 'The value of the parameter.', - }, - _valueCode: { - type: require('./element.schema'), - description: 'The value of the parameter.', - }, - }), + name: 'ValueSetexpansionparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of the parameter.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the parameter.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueString: { + type: GraphQLString, + description: 'The value of the parameter.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the parameter.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueInteger: { + type: GraphQLInt, + description: 'The value of the parameter.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'The value of the parameter.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueUri: { + type: UriScalar, + description: 'The value of the parameter.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueCode: { + type: CodeScalar, + description: 'The value of the parameter.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/visionprescription.schema.js b/src/resources/3_0_1/schemas/visionprescription.schema.js index e932623d..35b9f07d 100644 --- a/src/resources/3_0_1/schemas/visionprescription.schema.js +++ b/src/resources/3_0_1/schemas/visionprescription.schema.js @@ -1,21 +1,14 @@ -const CodeScalar = require('../scalars/code.scalar'); -const DateTimeScalar = require('../scalars/datetime.scalar'); const { - GraphQLObjectType, - GraphQLEnumType, GraphQLNonNull, - GraphQLString, + GraphQLEnumType, GraphQLList, + GraphQLUnionType, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); - -let VisionPrescriptionResourceType = new GraphQLEnumType({ - name: 'VisionPrescriptionResourceType', - values: { - VisionPrescription: { value: 'VisionPrescription' }, - }, -}); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); /** * @name exports @@ -23,66 +16,164 @@ let VisionPrescriptionResourceType = new GraphQLEnumType({ */ module.exports = new GraphQLObjectType({ name: 'VisionPrescription', - description: 'Base StructureDefinition for VisionPrescription Resource.', - fields: () => - extendSchema(require('./domainresource.schema'), { - resourceType: { - type: new GraphQLNonNull(VisionPrescriptionResourceType), - description: 'Type of this resource.', - }, - identifier: { - type: new GraphQLList(require('./identifier.schema')), - description: - 'Business identifier which may be used by other parties to reference or identify the prescription.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/fm-status - status: { - type: CodeScalar, - description: 'The status of the resource instance.', - }, - _status: { - type: require('./element.schema'), - description: 'The status of the resource instance.', - }, - patient: { - type: require('./reference.schema'), + description: 'Base StructureDefinition for VisionPrescription Resource', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'VisionPrescription_Enum_schema', + values: { VisionPrescription: { value: 'VisionPrescription' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.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.schema.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.schema.js'), + description: 'The base language in which the resource is written.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/languages + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + text: { + type: require('./narrative.schema.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(require('./resourcelist.schema')), + 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.schema.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.schema.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.schema.js')), + description: + 'Business identifier which may be used by other parties to reference or identify the prescription.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/fm-status + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionpatient_patient_Union', description: 'A link to a resource representing the person to whom the vision products will be supplied.', - }, - encounter: { - type: require('./reference.schema'), + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person to whom the vision products will be supplied.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionencounter_encounter_Union', description: 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', - }, - dateWritten: { - type: DateTimeScalar, - description: - 'The date (and perhaps time) when the prescription was written.', - }, - _dateWritten: { - type: require('./element.schema'), - description: - 'The date (and perhaps time) when the prescription was written.', - }, - prescriber: { - type: require('./reference.schema'), + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'A link to a resource that identifies the particular occurrence of contact between patient and health care provider.', + }, + _dateWritten: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + dateWritten: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was written.', + }, + prescriber: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionprescriber_prescriber_Union', description: 'The healthcare professional responsible for authorizing the prescription.', - }, - reasonCodeableConcept: { - type: require('./codeableconcept.schema'), + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'The healthcare professional responsible for authorizing the prescription.', + }, + reasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + reasonReference: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionreasonReference_reasonReference_Union', description: 'Can be the reason or the indication for writing the prescription.', - }, - reasonReference: { - type: require('./reference.schema'), - description: - 'Can be the reason or the indication for writing the prescription.', - }, - dispense: { - type: new GraphQLList(require('./visionprescriptiondispense.schema')), - description: - 'Deals with details of the dispense part of the supply specification.', - }, - }), + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'Can be the reason or the indication for writing the prescription.', + }, + dispense: { + type: new GraphQLList(require('./visionprescriptiondispense.schema.js')), + description: + 'Deals with details of the dispense part of the supply specification.', + }, + }), }); diff --git a/src/resources/3_0_1/schemas/visionprescriptiondispense.schema.js b/src/resources/3_0_1/schemas/visionprescriptiondispense.schema.js index 08fbc57f..79eef5ab 100644 --- a/src/resources/3_0_1/schemas/visionprescriptiondispense.schema.js +++ b/src/resources/3_0_1/schemas/visionprescriptiondispense.schema.js @@ -1,144 +1,158 @@ -const CodeScalar = require('../scalars/code.scalar'); const { - GraphQLObjectType, - GraphQLFloat, - GraphQLInt, GraphQLString, GraphQLList, + GraphQLFloat, + GraphQLInt, + GraphQLObjectType, } = require('graphql'); - -const { extendSchema } = require('@asymmetrik/fhir-gql-schema-utils'); +const CodeScalar = require('../scalars/code.scalar.js'); /** * @name exports - * @summary VisionPrescription.dispense Schema + * @summary VisionPrescriptiondispense Schema */ module.exports = new GraphQLObjectType({ - name: 'VisionPrescriptionDispense', - description: - 'Deals with details of the dispense part of the supply specification.', - fields: () => - extendSchema(require('./backboneelement.schema'), { - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-product - product: { - type: require('./codeableconcept.schema'), - description: - 'Identifies the type of vision correction product which is required for the patient.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-eye-codes - eye: { - type: CodeScalar, - description: 'The eye for which the lens applies.', - }, - _eye: { - type: require('./element.schema'), - description: 'The eye for which the lens applies.', - }, - sphere: { - type: GraphQLFloat, - description: 'Lens power measured in diopters (0.25 units).', - }, - _sphere: { - type: require('./element.schema'), - description: 'Lens power measured in diopters (0.25 units).', - }, - cylinder: { - type: GraphQLFloat, - description: - 'Power adjustment for astigmatism measured in diopters (0.25 units).', - }, - _cylinder: { - type: require('./element.schema'), - description: - 'Power adjustment for astigmatism measured in diopters (0.25 units).', - }, - axis: { - type: GraphQLInt, - description: 'Adjustment for astigmatism measured in integer degrees.', - }, - _axis: { - type: require('./element.schema'), - description: 'Adjustment for astigmatism measured in integer degrees.', - }, - prism: { - type: GraphQLFloat, - description: - 'Amount of prism to compensate for eye alignment in fractional units.', - }, - _prism: { - type: require('./element.schema'), - description: - 'Amount of prism to compensate for eye alignment in fractional units.', - }, - // ValueSetReference: http://hl7.org/fhir/ValueSet/vision-base-codes - base: { - type: CodeScalar, - description: - 'The relative base, or reference lens edge, for the prism.', - }, - _base: { - type: require('./element.schema'), - description: - 'The relative base, or reference lens edge, for the prism.', - }, - add: { - type: GraphQLFloat, - description: - 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', - }, - _add: { - type: require('./element.schema'), - description: - 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', - }, - power: { - type: GraphQLFloat, - description: 'Contact lens power measured in diopters (0.25 units).', - }, - _power: { - type: require('./element.schema'), - description: 'Contact lens power measured in diopters (0.25 units).', - }, - backCurve: { - type: GraphQLFloat, - description: 'Back curvature measured in millimeters.', - }, - _backCurve: { - type: require('./element.schema'), - description: 'Back curvature measured in millimeters.', - }, - diameter: { - type: GraphQLFloat, - description: 'Contact lens diameter measured in millimeters.', - }, - _diameter: { - type: require('./element.schema'), - description: 'Contact lens diameter measured in millimeters.', - }, - duration: { - type: require('./quantity.schema'), - description: 'The recommended maximum wear period for the lens.', - }, - color: { - type: GraphQLString, - description: 'Special color or pattern.', - }, - _color: { - type: require('./element.schema'), - description: 'Special color or pattern.', - }, - brand: { - type: GraphQLString, - description: 'Brand recommendations or restrictions.', - }, - _brand: { - type: require('./element.schema'), - description: 'Brand recommendations or restrictions.', - }, - note: { - type: new GraphQLList(require('./annotation.schema')), - description: - 'Notes for special requirements such as coatings and lens materials.', - }, - }), + name: 'VisionPrescriptiondispense', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element, 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.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-product + product: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the type of vision correction product which is required for the patient.', + }, + _eye: { + type: require('./element.schema.js'), + description: 'The eye for which the lens applies.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-eye-codes + eye: { + type: CodeScalar, + description: 'The eye for which the lens applies.', + }, + _sphere: { + type: require('./element.schema.js'), + description: 'Lens power measured in diopters (0.25 units).', + }, + sphere: { + type: GraphQLFloat, + description: 'Lens power measured in diopters (0.25 units).', + }, + _cylinder: { + type: require('./element.schema.js'), + description: + 'Power adjustment for astigmatism measured in diopters (0.25 units).', + }, + cylinder: { + type: GraphQLFloat, + description: + 'Power adjustment for astigmatism measured in diopters (0.25 units).', + }, + _axis: { + type: require('./element.schema.js'), + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + axis: { + type: GraphQLInt, + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + _prism: { + type: require('./element.schema.js'), + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + prism: { + type: GraphQLFloat, + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + _base: { + type: require('./element.schema.js'), + description: 'The relative base, or reference lens edge, for the prism.', + }, + // valueSetReference: http://hl7.org/fhir/ValueSet/vision-base-codes + base: { + type: CodeScalar, + description: 'The relative base, or reference lens edge, for the prism.', + }, + _add: { + type: require('./element.schema.js'), + description: + 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', + }, + add: { + type: GraphQLFloat, + description: + 'Power adjustment for multifocal lenses measured in diopters (0.25 units).', + }, + _power: { + type: require('./element.schema.js'), + description: 'Contact lens power measured in diopters (0.25 units).', + }, + power: { + type: GraphQLFloat, + description: 'Contact lens power measured in diopters (0.25 units).', + }, + _backCurve: { + type: require('./element.schema.js'), + description: 'Back curvature measured in millimeters.', + }, + backCurve: { + type: GraphQLFloat, + description: 'Back curvature measured in millimeters.', + }, + _diameter: { + type: require('./element.schema.js'), + description: 'Contact lens diameter measured in millimeters.', + }, + diameter: { + type: GraphQLFloat, + description: 'Contact lens diameter measured in millimeters.', + }, + duration: { + type: require('./quantity.schema.js'), + description: 'The recommended maximum wear period for the lens.', + }, + _color: { + type: require('./element.schema.js'), + description: 'Special color or pattern.', + }, + color: { + type: GraphQLString, + description: 'Special color or pattern.', + }, + _brand: { + type: require('./element.schema.js'), + description: 'Brand recommendations or restrictions.', + }, + brand: { + type: GraphQLString, + description: 'Brand recommendations or restrictions.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Notes for special requirements such as coatings and lens materials.', + }, + }), }); diff --git a/src/resources/4_0_0/inputs/account.input.js b/src/resources/4_0_0/inputs/account.input.js new file mode 100644 index 00000000..7f699287 --- /dev/null +++ b/src/resources/4_0_0/inputs/account.input.js @@ -0,0 +1,152 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +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: + 'A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc.', + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).', + }, + _status: { + type: require('./element.input.js'), + description: + 'Indicates whether the account is presently used/usable or not.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the account is presently used/usable or not.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Categorizes the account for reporting and searching purposes.', + }, + _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.', + }, + subject: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.', + }, + servicePeriod: { + type: require('./period.input.js'), + description: 'The date range of services associated with this account.', + }, + coverage: { + type: new GraphQLList(require('./accountcoverage.input.js')), + description: + 'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.', + }, + owner: { + type: GraphQLString, + description: + 'Indicates the service area, hospital, department, etc. with responsibility for managing 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.', + }, + guarantor: { + type: new GraphQLList(require('./accountguarantor.input.js')), + description: + 'The parties responsible for balancing the account if other payment options fall short.', + }, + partOf: { + type: GraphQLString, + description: 'Reference to a parent Account.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/accountcoverage.input.js b/src/resources/4_0_0/inputs/accountcoverage.input.js new file mode 100644 index 00000000..23286df4 --- /dev/null +++ b/src/resources/4_0_0/inputs/accountcoverage.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Accountcoverage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Accountcoverage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay). A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'The priority of the coverage in the context of this account.', + }, + priority: { + type: PositiveIntScalar, + description: + 'The priority of the coverage in the context of this account.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/accountguarantor.input.js b/src/resources/4_0_0/inputs/accountguarantor.input.js new file mode 100644 index 00000000..04eb7627 --- /dev/null +++ b/src/resources/4_0_0/inputs/accountguarantor.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Accountguarantor Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Accountguarantor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + party: { + type: new GraphQLNonNull(GraphQLString), + description: 'The entity who is responsible.', + }, + _onHold: { + type: require('./element.input.js'), + description: + 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', + }, + onHold: { + type: GraphQLBoolean, + description: + 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', + }, + period: { + type: require('./period.input.js'), + description: + 'The timeframe during which the guarantor accepts responsibility for the account.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/activitydefinition.input.js b/src/resources/4_0_0/inputs/activitydefinition.input.js new file mode 100644 index 00000000..4108435a --- /dev/null +++ b/src/resources/4_0_0/inputs/activitydefinition.input.js @@ -0,0 +1,472 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ActivityDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ActivityDefinition_Input', + description: + 'This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ActivityDefinition_Enum_input', + values: { ActivityDefinition: { value: 'ActivityDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the activity definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the activity definition.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the activity definition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the activity definition giving additional information about its content.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this activity definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this activity definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A code or group definition that describes the intended subject of the activity being defined.', + }, + subjectReference: { + type: GraphQLString, + description: + 'A code or group definition that describes the intended subject of the activity being defined.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the activity definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the activity definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the activity definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the activity definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the activity definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this activity definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this activity definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the activity definition is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the activity definition is used from a clinical perspective.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the activity definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.input.js'), + description: + 'A reference to a Library resource containing any formal logic used by the activity definition.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing any formal logic used by the activity definition.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', + }, + kind: { + type: CodeScalar, + description: + 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'A profile to which the target of the activity definition is expected to conform.', + }, + profile: { + type: CanonicalScalar, + description: + 'A profile to which the target of the activity definition is expected to conform.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.', + }, + intent: { + type: CodeScalar, + description: + 'Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the activity should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the activity should be addressed with respect to other requests.', + }, + _doNotPerform: { + type: require('./element.input.js'), + description: + 'Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _timingDateTime: { + type: require('./element.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingAge: { + type: require('./age.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingRange: { + type: require('./range.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingDuration: { + type: require('./duration.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: GraphQLString, + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + participant: { + type: new GraphQLList( + require('./activitydefinitionparticipant.input.js'), + ), + description: + 'Indicates who should participate in performing the action described.', + }, + productReference: { + type: GraphQLString, + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + }, + productCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).', + }, + dosage: { + type: new GraphQLList(require('./dosage.input.js')), + description: + 'Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.', + }, + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", + }, + specimenRequirement: { + type: new GraphQLList(GraphQLString), + description: + 'Defines specimen requirements for the action to be performed, such as required specimens for a lab test.', + }, + observationRequirement: { + type: new GraphQLList(GraphQLString), + description: + 'Defines observation requirements for the action to be performed, such as body weight or surface area.', + }, + observationResultRequirement: { + type: new GraphQLList(GraphQLString), + description: + 'Defines the observations that are expected to be produced by the action.', + }, + _transform: { + type: require('./element.input.js'), + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + transform: { + type: CanonicalScalar, + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + dynamicValue: { + type: new GraphQLList( + require('./activitydefinitiondynamicvalue.input.js'), + ), + description: + "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/activitydefinitiondynamicvalue.input.js b/src/resources/4_0_0/inputs/activitydefinitiondynamicvalue.input.js new file mode 100644 index 00000000..9a79c61f --- /dev/null +++ b/src/resources/4_0_0/inputs/activitydefinitiondynamicvalue.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ActivityDefinitiondynamicValue Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ActivityDefinitiondynamicValue_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _path: { + type: require('./element.input.js'), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + expression: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: + 'An expression specifying the value of the customized element.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/activitydefinitionparticipant.input.js b/src/resources/4_0_0/inputs/activitydefinitionparticipant.input.js new file mode 100644 index 00000000..bfc680df --- /dev/null +++ b/src/resources/4_0_0/inputs/activitydefinitionparticipant.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ActivityDefinitionparticipant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ActivityDefinitionparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'The type of participant in the action.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant in the action.', + }, + role: { + type: require('./codeableconcept.input.js'), + description: + 'The role the participant should play in performing the described action.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/address.input.js b/src/resources/4_0_0/inputs/address.input.js new file mode 100644 index 00000000..c5b3377d --- /dev/null +++ b/src/resources/4_0_0/inputs/address.input.js @@ -0,0 +1,123 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Address Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Address_Input', + description: + 'Base StructureDefinition for Address Type: An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery. There are a variety of postal address formats defined around the world.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _use: { + type: require('./element.input.js'), + description: 'The purpose of this address.', + }, + use: { + type: CodeScalar, + description: 'The purpose of this address.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + type: { + type: CodeScalar, + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts.', + }, + text: { + type: GraphQLString, + description: + 'Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts.', + }, + _line: { + type: require('./element.input.js'), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + line: { + type: new GraphQLList(GraphQLString), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + _city: { + type: require('./element.input.js'), + description: + 'The name of the city, town, suburb, village or other community or delivery center.', + }, + city: { + type: GraphQLString, + description: + 'The name of the city, town, suburb, village or other community or delivery center.', + }, + _district: { + type: require('./element.input.js'), + description: 'The name of the administrative area (county).', + }, + district: { + type: GraphQLString, + description: 'The name of the administrative area (county).', + }, + _state: { + type: require('./element.input.js'), + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes).', + }, + state: { + type: GraphQLString, + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes).', + }, + _postalCode: { + type: require('./element.input.js'), + description: + 'A postal code designating a region defined by the postal service.', + }, + postalCode: { + type: GraphQLString, + description: + 'A postal code designating a region defined by the postal service.', + }, + _country: { + type: require('./element.input.js'), + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + country: { + type: GraphQLString, + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period when address was/is in use.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/adverseevent.input.js b/src/resources/4_0_0/inputs/adverseevent.input.js new file mode 100644 index 00000000..271be0a7 --- /dev/null +++ b/src/resources/4_0_0/inputs/adverseevent.input.js @@ -0,0 +1,198 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary AdverseEvent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AdverseEvent_Input', + description: + 'Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AdverseEvent_Enum_input', + values: { AdverseEvent: { value: 'AdverseEvent' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _actuality: { + type: require('./element.input.js'), + description: + 'Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely.', + }, + actuality: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The overall type of event, intended for search and filtering purposes.', + }, + event: { + type: require('./codeableconcept.input.js'), + description: + 'This element defines the specific type of event that occurred or that was prevented from occurring.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'This subject or group impacted by the event.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which AdverseEvent was created or to which the creation of this record is tightly associated.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the adverse event occurred.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the adverse event occurred.', + }, + _detected: { + type: require('./element.input.js'), + description: + 'Estimated or actual date the AdverseEvent began, in the opinion of the reporter.', + }, + detected: { + type: DateTimeScalar, + description: + 'Estimated or actual date the AdverseEvent began, in the opinion of the reporter.', + }, + _recordedDate: { + type: require('./element.input.js'), + description: + 'The date on which the existence of the AdverseEvent was first recorded.', + }, + recordedDate: { + type: DateTimeScalar, + description: + 'The date on which the existence of the AdverseEvent was first recorded.', + }, + resultingCondition: { + type: new GraphQLList(GraphQLString), + description: + 'Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).', + }, + location: { + type: GraphQLString, + description: 'The information about where the adverse event occurred.', + }, + seriousness: { + type: require('./codeableconcept.input.js'), + description: 'Assessment whether this event was of real importance.', + }, + severity: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the severity of the adverse event, in relation to the subject. Contrast to AdverseEvent.seriousness - a severe rash might not be serious, but a mild heart problem is.', + }, + outcome: { + type: require('./codeableconcept.input.js'), + description: 'Describes the type of outcome from the adverse event.', + }, + recorder: { + type: GraphQLString, + description: + 'Information on who recorded the adverse event. May be the patient or a practitioner.', + }, + contributor: { + type: new GraphQLList(GraphQLString), + description: + 'Parties that may or should contribute or have contributed information to the adverse event, which can consist of one or more activities. Such information includes information leading to the decision to perform the activity and how to perform the activity (e.g. consultant), information that the activity itself seeks to reveal (e.g. informant of clinical history), or information about what activity was performed (e.g. informant witness).', + }, + suspectEntity: { + type: new GraphQLList(require('./adverseeventsuspectentity.input.js')), + description: + 'Describes the entity that is suspected to have caused the adverse event.', + }, + subjectMedicalHistory: { + type: new GraphQLList(GraphQLString), + description: 'AdverseEvent.subjectMedicalHistory.', + }, + referenceDocument: { + type: new GraphQLList(GraphQLString), + description: 'AdverseEvent.referenceDocument.', + }, + study: { + type: new GraphQLList(GraphQLString), + description: 'AdverseEvent.study.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/adverseeventsuspectentity.input.js b/src/resources/4_0_0/inputs/adverseeventsuspectentity.input.js new file mode 100644 index 00000000..ef48e3ae --- /dev/null +++ b/src/resources/4_0_0/inputs/adverseeventsuspectentity.input.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary AdverseEventsuspectEntity Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AdverseEventsuspectEntity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + instance: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device.', + }, + causality: { + type: new GraphQLList( + require('./adverseeventsuspectentitycausality.input.js'), + ), + description: 'Information on the possible cause of the event.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/adverseeventsuspectentitycausality.input.js b/src/resources/4_0_0/inputs/adverseeventsuspectentitycausality.input.js new file mode 100644 index 00000000..58d047fe --- /dev/null +++ b/src/resources/4_0_0/inputs/adverseeventsuspectentitycausality.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary AdverseEventsuspectEntitycausality Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AdverseEventsuspectEntitycausality_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + assessment: { + type: require('./codeableconcept.input.js'), + description: 'Assessment of if the entity caused the event.', + }, + _productRelatedness: { + type: require('./element.input.js'), + description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', + }, + productRelatedness: { + type: GraphQLString, + description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', + }, + author: { + type: GraphQLString, + description: 'AdverseEvent.suspectEntity.causalityAuthor.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: 'ProbabilityScale | Bayesian | Checklist.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/age.input.js b/src/resources/4_0_0/inputs/age.input.js new file mode 100644 index 00000000..c64f3bfd --- /dev/null +++ b/src/resources/4_0_0/inputs/age.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Age Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Age_Input', + description: + 'Base StructureDefinition for Age Type: A duration of time during which an organism (or a process) has existed.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/allergyintolerance.input.js b/src/resources/4_0_0/inputs/allergyintolerance.input.js new file mode 100644 index 00000000..1653d6dd --- /dev/null +++ b/src/resources/4_0_0/inputs/allergyintolerance.input.js @@ -0,0 +1,216 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary AllergyIntolerance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AllergyIntolerance_Input', + description: + 'Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AllergyIntolerance_Enum_input', + values: { AllergyIntolerance: { value: 'AllergyIntolerance' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + clinicalStatus: { + type: require('./codeableconcept.input.js'), + description: 'The clinical status of the allergy or intolerance.', + }, + verificationStatus: { + type: require('./codeableconcept.input.js'), + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', + }, + _type: { + type: require('./element.input.js'), + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + type: { + type: CodeScalar, + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + _category: { + type: require('./element.input.js'), + description: 'Category of the identified substance.', + }, + category: { + type: new GraphQLList(CodeScalar), + description: 'Category of the identified substance.', + }, + _criticality: { + type: require('./element.input.js'), + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', + }, + criticality: { + type: CodeScalar, + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., 'Latex'), an allergy or intolerance condition (e.g., 'Latex allergy'), or a negated/excluded code for a specific substance or class (e.g., 'No latex allergy') or a general or categorical negated statement (e.g., 'No known allergy', 'No known drug allergies'). Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who has the allergy or intolerance.', + }, + encounter: { + type: GraphQLString, + description: + 'The encounter when the allergy or intolerance was asserted.', + }, + _onsetDateTime: { + type: require('./element.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetAge: { + type: require('./age.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetPeriod: { + type: require('./period.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetRange: { + type: require('./range.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + _onsetString: { + type: require('./element.input.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + _recordedDate: { + type: require('./element.input.js'), + description: + 'The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.', + }, + recordedDate: { + type: DateTimeScalar, + description: + 'The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.', + }, + recorder: { + type: GraphQLString, + description: + 'Individual who recorded the record and takes responsibility for its content.', + }, + asserter: { + type: GraphQLString, + description: + 'The source of the information about the allergy that is recorded.', + }, + _lastOccurrence: { + type: require('./element.input.js'), + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + lastOccurrence: { + type: DateTimeScalar, + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', + }, + reaction: { + type: new GraphQLList(require('./allergyintolerancereaction.input.js')), + description: + 'Details about each adverse reaction event linked to exposure to the identified substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/allergyintolerancereaction.input.js b/src/resources/4_0_0/inputs/allergyintolerancereaction.input.js new file mode 100644 index 00000000..f6d7691e --- /dev/null +++ b/src/resources/4_0_0/inputs/allergyintolerancereaction.input.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary AllergyIntolerancereaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AllergyIntolerancereaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + substance: { + type: require('./codeableconcept.input.js'), + description: + "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", + }, + manifestation: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.input.js')), + ), + description: + 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + description: { + type: GraphQLString, + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + _onset: { + type: require('./element.input.js'), + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + onset: { + type: DateTimeScalar, + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + severity: { + type: CodeScalar, + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + exposureRoute: { + type: require('./codeableconcept.input.js'), + description: + 'Identification of the route by which the subject was exposed to the substance.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Additional text about the adverse reaction event not captured in other fields.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/annotation.input.js b/src/resources/4_0_0/inputs/annotation.input.js new file mode 100644 index 00000000..d8769fc9 --- /dev/null +++ b/src/resources/4_0_0/inputs/annotation.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Annotation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Annotation_Input', + description: + 'Base StructureDefinition for Annotation Type: A text note which also contains information about who made the statement and when.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + authorReference: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _authorString: { + type: require('./element.input.js'), + description: 'The individual responsible for making the annotation.', + }, + authorString: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _time: { + type: require('./element.input.js'), + description: 'Indicates when this particular annotation was made.', + }, + time: { + type: DateTimeScalar, + description: 'Indicates when this particular annotation was made.', + }, + _text: { + type: require('./element.input.js'), + description: 'The text of the annotation in markdown format.', + }, + text: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text of the annotation in markdown format.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/appointment.input.js b/src/resources/4_0_0/inputs/appointment.input.js new file mode 100644 index 00000000..f6482f7a --- /dev/null +++ b/src/resources/4_0_0/inputs/appointment.input.js @@ -0,0 +1,238 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Appointment Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Appointment_Input', + description: + '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).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Appointment_Enum_input', + values: { Appointment: { value: 'Appointment' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _status: { + type: require('./element.input.js'), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + cancelationReason: { + type: require('./codeableconcept.input.js'), + description: + 'The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.', + }, + serviceCategory: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A broad categorization of the service that is to be performed during this appointment.', + }, + serviceType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specific service that is to be performed during this appointment.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + appointmentType: { + type: require('./codeableconcept.input.js'), + description: + 'The style of appointment or patient that has been booked in the slot (not service type).', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The coded reason that this appointment is being scheduled. This is more clinical than administrative.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + priority: { + type: UnsignedIntScalar, + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + _description: { + type: require('./element.input.js'), + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + description: { + type: GraphQLString, + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Additional information to support the appointment provided when making the appointment.', + }, + _start: { + type: require('./element.input.js'), + description: 'Date/Time that the appointment is to take place.', + }, + start: { + type: InstantScalar, + description: 'Date/Time that the appointment is to take place.', + }, + _end: { + type: require('./element.input.js'), + description: 'Date/Time that the appointment is to conclude.', + }, + end: { + type: InstantScalar, + description: 'Date/Time that the appointment is to conclude.', + }, + _minutesDuration: { + type: require('./element.input.js'), + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.', + }, + minutesDuration: { + type: PositiveIntScalar, + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.', + }, + slot: { + type: new GraphQLList(GraphQLString), + description: + "The slots from the participants' schedules that will be filled by the appointment.", + }, + _created: { + type: require('./element.input.js'), + description: + 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', + }, + created: { + type: DateTimeScalar, + description: + 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + _patientInstruction: { + type: require('./element.input.js'), + description: + 'While Appointment.comment contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).', + }, + patientInstruction: { + type: GraphQLString, + description: + 'While Appointment.comment contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'The service request this appointment is allocated to assess (e.g. incoming referral or procedure request).', + }, + participant: { + type: new GraphQLList( + new GraphQLNonNull(require('./appointmentparticipant.input.js')), + ), + description: 'List of participants involved in the appointment.', + }, + requestedPeriod: { + type: new GraphQLList(require('./period.input.js')), + description: + 'A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/appointmentparticipant.input.js b/src/resources/4_0_0/inputs/appointmentparticipant.input.js new file mode 100644 index 00000000..c81fc43b --- /dev/null +++ b/src/resources/4_0_0/inputs/appointmentparticipant.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Appointmentparticipant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Appointmentparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: GraphQLString, + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _required: { + type: require('./element.input.js'), + description: + 'Whether this participant is required to be present at the meeting. This covers a use-case where two doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + required: { + type: CodeScalar, + description: + 'Whether this participant is required to be present at the meeting. This covers a use-case where two doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + _status: { + type: require('./element.input.js'), + description: 'Participation status of the actor.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Participation status of the actor.', + }, + period: { + type: require('./period.input.js'), + description: 'Participation period of the actor.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/appointmentresponse.input.js b/src/resources/4_0_0/inputs/appointmentresponse.input.js new file mode 100644 index 00000000..83f16ea4 --- /dev/null +++ b/src/resources/4_0_0/inputs/appointmentresponse.input.js @@ -0,0 +1,141 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary AppointmentResponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AppointmentResponse_Input', + description: + 'A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AppointmentResponse_Enum_input', + values: { AppointmentResponse: { value: 'AppointmentResponse' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + appointment: { + type: new GraphQLNonNull(GraphQLString), + description: 'Appointment that this response is replying to.', + }, + _start: { + type: require('./element.input.js'), + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + start: { + type: InstantScalar, + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + _end: { + type: require('./element.input.js'), + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + end: { + type: InstantScalar, + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + participantType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: GraphQLString, + description: + 'A Person, Location, HealthcareService, or Device that is participating in the appointment.', + }, + _participantStatus: { + type: require('./element.input.js'), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + participantStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/attachment.input.js b/src/resources/4_0_0/inputs/attachment.input.js new file mode 100644 index 00000000..839bf213 --- /dev/null +++ b/src/resources/4_0_0/inputs/attachment.input.js @@ -0,0 +1,111 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Attachment Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Attachment_Input', + description: + 'Base StructureDefinition for Attachment Type: For referring to data content defined in other formats.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _contentType: { + type: require('./element.input.js'), + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + contentType: { + type: CodeScalar, + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + _language: { + type: require('./element.input.js'), + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + language: { + type: CodeScalar, + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + _data: { + type: require('./element.input.js'), + description: + 'The actual data of the attachment - a sequence of bytes, base64 encoded.', + }, + data: { + type: Base64BinaryScalar, + description: + 'The actual data of the attachment - a sequence of bytes, base64 encoded.', + }, + _url: { + type: require('./element.input.js'), + description: 'A location where the data can be accessed.', + }, + url: { + type: UrlScalar, + description: 'A location where the data can be accessed.', + }, + _size: { + type: require('./element.input.js'), + description: + 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', + }, + size: { + type: UnsignedIntScalar, + description: + 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', + }, + _hash: { + type: require('./element.input.js'), + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + hash: { + type: Base64BinaryScalar, + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + _title: { + type: require('./element.input.js'), + description: 'A label or set of text to display in place of the data.', + }, + title: { + type: GraphQLString, + description: 'A label or set of text to display in place of the data.', + }, + _creation: { + type: require('./element.input.js'), + description: 'The date that the attachment was first created.', + }, + creation: { + type: DateTimeScalar, + description: 'The date that the attachment was first created.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/auditevent.input.js b/src/resources/4_0_0/inputs/auditevent.input.js new file mode 100644 index 00000000..90a027b5 --- /dev/null +++ b/src/resources/4_0_0/inputs/auditevent.input.js @@ -0,0 +1,153 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary AuditEvent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AuditEvent_Input', + description: + 'A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AuditEvent_Enum_input', + values: { AuditEvent: { value: 'AuditEvent' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', + }, + subtype: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Identifier for the category of event.', + }, + _action: { + type: require('./element.input.js'), + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + action: { + type: CodeScalar, + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + period: { + type: require('./period.input.js'), + description: 'The period during which the activity occurred.', + }, + _recorded: { + type: require('./element.input.js'), + description: 'The time when the event was recorded.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time when the event was recorded.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Indicates whether the event succeeded or failed.', + }, + outcome: { + type: CodeScalar, + description: 'Indicates whether the event succeeded or failed.', + }, + _outcomeDesc: { + type: require('./element.input.js'), + description: 'A free text description of the outcome of the event.', + }, + outcomeDesc: { + type: GraphQLString, + description: 'A free text description of the outcome of the event.', + }, + purposeOfEvent: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The purposeOfUse (reason) that was used during the event being recorded.', + }, + agent: { + type: new GraphQLList( + new GraphQLNonNull(require('./auditeventagent.input.js')), + ), + description: + 'An actor taking an active role in the event or activity that is logged.', + }, + source: { + type: new GraphQLNonNull(require('./auditeventsource.input.js')), + description: 'The system that is reporting the event.', + }, + entity: { + type: new GraphQLList(require('./auditevententity.input.js')), + description: + 'Specific instances of data or objects that have been accessed.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/auditeventagent.input.js b/src/resources/4_0_0/inputs/auditeventagent.input.js new file mode 100644 index 00000000..f18d302e --- /dev/null +++ b/src/resources/4_0_0/inputs/auditeventagent.input.js @@ -0,0 +1,111 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary AuditEventagent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AuditEventagent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Specification of the participation type the user plays when performing the event.', + }, + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.', + }, + who: { + type: GraphQLString, + description: + 'Reference to who this agent is that was involved in the event.', + }, + _altId: { + type: require('./element.input.js'), + description: + 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + altId: { + type: GraphQLString, + description: + 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + _name: { + type: require('./element.input.js'), + description: 'Human-meaningful name for the agent.', + }, + name: { + type: GraphQLString, + description: 'Human-meaningful name for the agent.', + }, + _requestor: { + type: require('./element.input.js'), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + requestor: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + location: { + type: GraphQLString, + description: 'Where the event occurred.', + }, + _policy: { + type: require('./element.input.js'), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + media: { + type: require('./coding.input.js'), + description: + 'Type of media involved. Used when the event is about exporting/importing onto media.', + }, + network: { + type: require('./auditeventagentnetwork.input.js'), + description: + 'Logical network location for application activity, if the activity has a network location.', + }, + purposeOfUse: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The reason (purpose of use), specific to this agent, that was used during the event being recorded.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/auditeventagentnetwork.input.js b/src/resources/4_0_0/inputs/auditeventagentnetwork.input.js new file mode 100644 index 00000000..4038405c --- /dev/null +++ b/src/resources/4_0_0/inputs/auditeventagentnetwork.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary AuditEventagentnetwork Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AuditEventagentnetwork_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _address: { + type: require('./element.input.js'), + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + address: { + type: GraphQLString, + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + _type: { + type: require('./element.input.js'), + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + type: { + type: CodeScalar, + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/auditevententity.input.js b/src/resources/4_0_0/inputs/auditevententity.input.js new file mode 100644 index 00000000..b39dbbb2 --- /dev/null +++ b/src/resources/4_0_0/inputs/auditevententity.input.js @@ -0,0 +1,89 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary AuditEvententity Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AuditEvententity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + what: { + type: GraphQLString, + description: + 'Identifies a specific instance of the entity. The reference should be version specific.', + }, + type: { + type: require('./coding.input.js'), + description: + 'The type of the object that was involved in this audit event.', + }, + role: { + type: require('./coding.input.js'), + description: + 'Code representing the role the entity played in the event being audited.', + }, + lifecycle: { + type: require('./coding.input.js'), + description: 'Identifier for the data life-cycle stage for the entity.', + }, + securityLabel: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Security labels for the identified entity.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name of the entity in the audit event.', + }, + name: { + type: GraphQLString, + description: 'A name of the entity in the audit event.', + }, + _description: { + type: require('./element.input.js'), + description: 'Text that describes the entity in more detail.', + }, + description: { + type: GraphQLString, + description: 'Text that describes the entity in more detail.', + }, + _query: { + type: require('./element.input.js'), + description: 'The query parameters for a query-type entities.', + }, + query: { + type: Base64BinaryScalar, + description: 'The query parameters for a query-type entities.', + }, + detail: { + type: new GraphQLList(require('./auditevententitydetail.input.js')), + description: + 'Tagged value pairs for conveying additional information about the entity.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/auditevententitydetail.input.js b/src/resources/4_0_0/inputs/auditevententitydetail.input.js new file mode 100644 index 00000000..4936b97d --- /dev/null +++ b/src/resources/4_0_0/inputs/auditevententitydetail.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary AuditEvententitydetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AuditEvententitydetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'The type of extra detail provided in the value.', + }, + type: { + type: new GraphQLNonNull(GraphQLString), + description: 'The type of extra detail provided in the value.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of the extra detail.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the extra detail.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'The value of the extra detail.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the extra detail.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/auditeventsource.input.js b/src/resources/4_0_0/inputs/auditeventsource.input.js new file mode 100644 index 00000000..be8fee09 --- /dev/null +++ b/src/resources/4_0_0/inputs/auditeventsource.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary AuditEventsource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'AuditEventsource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _site: { + type: require('./element.input.js'), + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + site: { + type: GraphQLString, + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + observer: { + type: new GraphQLNonNull(GraphQLString), + description: 'Identifier of the source where the event was detected.', + }, + type: { + type: new GraphQLList(require('./coding.input.js')), + description: 'Code specifying the type of source where event originated.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/backboneelement.input.js b/src/resources/4_0_0/inputs/backboneelement.input.js new file mode 100644 index 00000000..41a5abad --- /dev/null +++ b/src/resources/4_0_0/inputs/backboneelement.input.js @@ -0,0 +1,37 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary BackboneElement Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'BackboneElement_Input', + description: + 'Base StructureDefinition for BackboneElement Type: Base definition for all elements that are defined inside a resource - but not those in a data type.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/basic.input.js b/src/resources/4_0_0/inputs/basic.input.js new file mode 100644 index 00000000..3b5dd713 --- /dev/null +++ b/src/resources/4_0_0/inputs/basic.input.js @@ -0,0 +1,113 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Basic Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Basic_Input', + description: + "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Basic_Enum_input', + values: { Basic: { value: 'Basic' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Identifies the 'type' of resource - equivalent to the resource name for other resources.", + }, + subject: { + type: GraphQLString, + description: + "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", + }, + _created: { + type: require('./element.input.js'), + description: 'Identifies when the resource was first created.', + }, + created: { + type: DateScalar, + description: 'Identifies when the resource was first created.', + }, + author: { + type: GraphQLString, + description: + 'Indicates who was responsible for creating the resource instance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/binary.input.js b/src/resources/4_0_0/inputs/binary.input.js new file mode 100644 index 00000000..4d782e2f --- /dev/null +++ b/src/resources/4_0_0/inputs/binary.input.js @@ -0,0 +1,87 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary Binary Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Binary_Input', + description: + 'A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Binary_Enum_input', + values: { Binary: { value: 'Binary' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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.', + }, + _contentType: { + type: require('./element.input.js'), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + contentType: { + type: new GraphQLNonNull(CodeScalar), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + securityContext: { + type: GraphQLString, + description: + 'This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.', + }, + _data: { + type: require('./element.input.js'), + description: 'The actual content, base64 encoded.', + }, + data: { + type: Base64BinaryScalar, + description: 'The actual content, base64 encoded.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/biologicallyderivedproduct.input.js b/src/resources/4_0_0/inputs/biologicallyderivedproduct.input.js new file mode 100644 index 00000000..ab249fcd --- /dev/null +++ b/src/resources/4_0_0/inputs/biologicallyderivedproduct.input.js @@ -0,0 +1,152 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProduct Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'BiologicallyDerivedProduct_Input', + description: + 'A material substance originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'BiologicallyDerivedProduct_Enum_input', + values: { + BiologicallyDerivedProduct: { value: 'BiologicallyDerivedProduct' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'This records identifiers associated with this biologically derived product instance that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _productCategory: { + type: require('./element.input.js'), + description: 'Broad category of this product.', + }, + productCategory: { + type: CodeScalar, + description: 'Broad category of this product.', + }, + productCode: { + type: require('./codeableconcept.input.js'), + description: + 'A code that identifies the kind of this biologically derived product (SNOMED Ctcode).', + }, + _status: { + type: require('./element.input.js'), + description: 'Whether the product is currently available.', + }, + status: { + type: CodeScalar, + description: 'Whether the product is currently available.', + }, + request: { + type: new GraphQLList(GraphQLString), + description: + 'Procedure request to obtain this biologically derived product.', + }, + _quantity: { + type: require('./element.input.js'), + description: 'Number of discrete units within this product.', + }, + quantity: { + type: GraphQLInt, + description: 'Number of discrete units within this product.', + }, + parent: { + type: new GraphQLList(GraphQLString), + description: 'Parent product (if any).', + }, + collection: { + type: require('./biologicallyderivedproductcollection.input.js'), + description: 'How this product was collected.', + }, + processing: { + type: new GraphQLList( + require('./biologicallyderivedproductprocessing.input.js'), + ), + description: + 'Any processing of the product during collection that does not change the fundamental nature of the product. For example adding anti-coagulants during the collection of Peripheral Blood Stem Cells.', + }, + manipulation: { + type: require('./biologicallyderivedproductmanipulation.input.js'), + description: + 'Any manipulation of product post-collection that is intended to alter the product. For example a buffy-coat enrichment or CD8 reduction of Peripheral Blood Stem Cells to make it more suitable for infusion.', + }, + storage: { + type: new GraphQLList( + require('./biologicallyderivedproductstorage.input.js'), + ), + description: 'Product storage.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/biologicallyderivedproductcollection.input.js b/src/resources/4_0_0/inputs/biologicallyderivedproductcollection.input.js new file mode 100644 index 00000000..5d7cf6da --- /dev/null +++ b/src/resources/4_0_0/inputs/biologicallyderivedproductcollection.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProductcollection Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'BiologicallyDerivedProductcollection_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + collector: { + type: GraphQLString, + description: 'Healthcare professional who is performing the collection.', + }, + source: { + type: GraphQLString, + description: + 'The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.', + }, + _collectedDateTime: { + type: require('./element.input.js'), + description: 'Time of product collection.', + }, + collectedDateTime: { + type: DateTimeScalar, + description: 'Time of product collection.', + }, + collectedPeriod: { + type: require('./period.input.js'), + description: 'Time of product collection.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/biologicallyderivedproductmanipulation.input.js b/src/resources/4_0_0/inputs/biologicallyderivedproductmanipulation.input.js new file mode 100644 index 00000000..c503d1de --- /dev/null +++ b/src/resources/4_0_0/inputs/biologicallyderivedproductmanipulation.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProductmanipulation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'BiologicallyDerivedProductmanipulation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Description of manipulation.', + }, + description: { + type: GraphQLString, + description: 'Description of manipulation.', + }, + _timeDateTime: { + type: require('./element.input.js'), + description: 'Time of manipulation.', + }, + timeDateTime: { + type: DateTimeScalar, + description: 'Time of manipulation.', + }, + timePeriod: { + type: require('./period.input.js'), + description: 'Time of manipulation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/biologicallyderivedproductprocessing.input.js b/src/resources/4_0_0/inputs/biologicallyderivedproductprocessing.input.js new file mode 100644 index 00000000..d256dff7 --- /dev/null +++ b/src/resources/4_0_0/inputs/biologicallyderivedproductprocessing.input.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProductprocessing Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'BiologicallyDerivedProductprocessing_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Description of of processing.', + }, + description: { + type: GraphQLString, + description: 'Description of of processing.', + }, + procedure: { + type: require('./codeableconcept.input.js'), + description: 'Procesing code.', + }, + additive: { + type: GraphQLString, + description: 'Substance added during processing.', + }, + _timeDateTime: { + type: require('./element.input.js'), + description: 'Time of processing.', + }, + timeDateTime: { + type: DateTimeScalar, + description: 'Time of processing.', + }, + timePeriod: { + type: require('./period.input.js'), + description: 'Time of processing.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/biologicallyderivedproductstorage.input.js b/src/resources/4_0_0/inputs/biologicallyderivedproductstorage.input.js new file mode 100644 index 00000000..a49f713b --- /dev/null +++ b/src/resources/4_0_0/inputs/biologicallyderivedproductstorage.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProductstorage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'BiologicallyDerivedProductstorage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Description of storage.', + }, + description: { + type: GraphQLString, + description: 'Description of storage.', + }, + _temperature: { + type: require('./element.input.js'), + description: 'Storage temperature.', + }, + temperature: { + type: GraphQLFloat, + description: 'Storage temperature.', + }, + _scale: { + type: require('./element.input.js'), + description: 'Temperature scale used.', + }, + scale: { + type: CodeScalar, + description: 'Temperature scale used.', + }, + duration: { + type: require('./period.input.js'), + description: 'Storage timeperiod.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/bodystructure.input.js b/src/resources/4_0_0/inputs/bodystructure.input.js new file mode 100644 index 00000000..89f8c865 --- /dev/null +++ b/src/resources/4_0_0/inputs/bodystructure.input.js @@ -0,0 +1,130 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary BodyStructure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'BodyStructure_Input', + description: + 'Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'BodyStructure_Enum_input', + values: { BodyStructure: { value: 'BodyStructure' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Identifier for this instance of the anatomical structure.', + }, + _active: { + type: require('./element.input.js'), + description: 'Whether this body site is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this body site is in active use.', + }, + morphology: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of structure being represented by the body structure at `BodyStructure.location`. This can define both normal and abnormal morphologies.', + }, + location: { + type: require('./codeableconcept.input.js'), + description: + 'The anatomical location or region of the specimen, lesion, or body structure.', + }, + locationQualifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A summary, characterization or explanation of the body structure.', + }, + description: { + type: GraphQLString, + description: + 'A summary, characterization or explanation of the body structure.', + }, + image: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image or images used to identify a location.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person to which the body site belongs.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/bundle.input.js b/src/resources/4_0_0/inputs/bundle.input.js new file mode 100644 index 00000000..f6b8cee9 --- /dev/null +++ b/src/resources/4_0_0/inputs/bundle.input.js @@ -0,0 +1,112 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Bundle Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Bundle_Input', + description: 'A container for a collection of resources.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Bundle_Enum_input', + values: { Bundle: { value: 'Bundle' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + "A persistent identifier for the bundle that won't change as a bundle is copied from server to server.", + }, + _type: { + type: require('./element.input.js'), + description: + 'Indicates the purpose of this bundle - how it is intended to be used.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose of this bundle - how it is intended to be used.', + }, + _timestamp: { + type: require('./element.input.js'), + description: + 'The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.', + }, + timestamp: { + type: InstantScalar, + description: + 'The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.', + }, + _total: { + type: require('./element.input.js'), + description: + "If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.", + }, + total: { + type: UnsignedIntScalar, + description: + "If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.", + }, + link: { + type: new GraphQLList(require('./bundlelink.input.js')), + description: 'A series of links that provide context to this bundle.', + }, + entry: { + type: new GraphQLList(require('./bundleentry.input.js')), + description: + 'An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).', + }, + signature: { + type: require('./signature.input.js'), + description: 'Digital Signature - base64 encoded. XML-DSig or a JWT.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/bundleentry.input.js b/src/resources/4_0_0/inputs/bundleentry.input.js new file mode 100644 index 00000000..e9b68c2e --- /dev/null +++ b/src/resources/4_0_0/inputs/bundleentry.input.js @@ -0,0 +1,67 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Bundleentry Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Bundleentry_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _fullUrl: { + type: require('./element.input.js'), + description: + 'The Absolute URL for the resource. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', + }, + fullUrl: { + type: UriScalar, + description: + 'The Absolute URL for the resource. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', + }, + resource: { + type: GraphQLString, + description: + 'The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type.', + }, + search: { + type: require('./bundleentrysearch.input.js'), + description: + 'Information about the search process that lead to the creation of this entry.', + }, + request: { + type: require('./bundleentryrequest.input.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.', + }, + response: { + type: require('./bundleentryresponse.input.js'), + description: + "Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/bundleentryrequest.input.js b/src/resources/4_0_0/inputs/bundleentryrequest.input.js new file mode 100644 index 00000000..9570cbf1 --- /dev/null +++ b/src/resources/4_0_0/inputs/bundleentryrequest.input.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Bundleentryrequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Bundleentryrequest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _method: { + type: require('./element.input.js'), + description: + 'In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.', + }, + method: { + type: new GraphQLNonNull(CodeScalar), + description: + 'In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.', + }, + _url: { + type: require('./element.input.js'), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + _ifNoneMatch: { + type: require('./element.input.js'), + description: + "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifNoneMatch: { + type: GraphQLString, + description: + "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifModifiedSince: { + type: require('./element.input.js'), + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifModifiedSince: { + type: InstantScalar, + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifMatch: { + type: require('./element.input.js'), + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + ifMatch: { + type: GraphQLString, + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + _ifNoneExist: { + type: require('./element.input.js'), + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + ifNoneExist: { + type: GraphQLString, + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/bundleentryresponse.input.js b/src/resources/4_0_0/inputs/bundleentryresponse.input.js new file mode 100644 index 00000000..859c2e95 --- /dev/null +++ b/src/resources/4_0_0/inputs/bundleentryresponse.input.js @@ -0,0 +1,84 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Bundleentryresponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Bundleentryresponse_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _status: { + type: require('./element.input.js'), + description: + '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.', + }, + status: { + type: new GraphQLNonNull(GraphQLString), + description: + '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.', + }, + _location: { + type: require('./element.input.js'), + description: + 'The location header created by processing this operation, populated if the operation returns a location.', + }, + location: { + type: UriScalar, + description: + 'The location header created by processing this operation, populated if the operation returns a location.', + }, + _etag: { + type: require('./element.input.js'), + description: + 'The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', + }, + etag: { + type: GraphQLString, + description: + 'The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', + }, + _lastModified: { + type: require('./element.input.js'), + description: + 'The date/time that the resource was modified on the server.', + }, + lastModified: { + type: InstantScalar, + description: + 'The date/time that the resource was modified on the server.', + }, + outcome: { + type: GraphQLString, + description: + 'An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/bundleentrysearch.input.js b/src/resources/4_0_0/inputs/bundleentrysearch.input.js new file mode 100644 index 00000000..4238ab84 --- /dev/null +++ b/src/resources/4_0_0/inputs/bundleentrysearch.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Bundleentrysearch Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Bundleentrysearch_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.input.js'), + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.", + }, + mode: { + type: CodeScalar, + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.", + }, + _score: { + type: require('./element.input.js'), + description: + "When searching, the server's search ranking score for the entry.", + }, + score: { + type: GraphQLFloat, + description: + "When searching, the server's search ranking score for the entry.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/bundlelink.input.js b/src/resources/4_0_0/inputs/bundlelink.input.js new file mode 100644 index 00000000..79a541b2 --- /dev/null +++ b/src/resources/4_0_0/inputs/bundlelink.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Bundlelink Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Bundlelink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _relation: { + type: require('./element.input.js'), + description: + 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', + }, + relation: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', + }, + _url: { + type: require('./element.input.js'), + description: 'The reference details for the link.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'The reference details for the link.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatement.input.js b/src/resources/4_0_0/inputs/capabilitystatement.input.js new file mode 100644 index 00000000..253c9e41 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatement.input.js @@ -0,0 +1,306 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatement Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatement_Input', + description: + 'A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CapabilityStatement_Enum_input', + values: { CapabilityStatement: { value: 'CapabilityStatement' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the capability statement.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the capability statement.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this capability statement. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this capability statement. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the capability statement was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the capability statement was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the capability statement.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the capability statement.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate capability statement instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the capability statement is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this capability statement is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this capability statement is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + _instantiates: { + type: require('./element.input.js'), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.', + }, + instantiates: { + type: new GraphQLList(CanonicalScalar), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.', + }, + _imports: { + type: require('./element.input.js'), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.', + }, + imports: { + type: new GraphQLList(CanonicalScalar), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.', + }, + software: { + type: require('./capabilitystatementsoftware.input.js'), + description: + 'Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.', + }, + implementation: { + type: require('./capabilitystatementimplementation.input.js'), + description: + 'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value.', + }, + fhirVersion: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value.', + }, + _format: { + type: require('./element.input.js'), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + format: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + _patchFormat: { + type: require('./element.input.js'), + description: + 'A list of the patch formats supported by this implementation using their content types.', + }, + patchFormat: { + type: new GraphQLList(CodeScalar), + description: + 'A list of the patch formats supported by this implementation using their content types.', + }, + _implementationGuide: { + type: require('./element.input.js'), + description: + 'A list of implementation guides that the server does (or should) support in their entirety.', + }, + implementationGuide: { + type: new GraphQLList(CanonicalScalar), + description: + 'A list of implementation guides that the server does (or should) support in their entirety.', + }, + rest: { + type: new GraphQLList(require('./capabilitystatementrest.input.js')), + description: + 'A definition of the restful capabilities of the solution, if any.', + }, + messaging: { + type: new GraphQLList(require('./capabilitystatementmessaging.input.js')), + description: + 'A description of the messaging capabilities of the solution.', + }, + document: { + type: new GraphQLList(require('./capabilitystatementdocument.input.js')), + description: 'A document definition.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementdocument.input.js b/src/resources/4_0_0/inputs/capabilitystatementdocument.input.js new file mode 100644 index 00000000..8364a007 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementdocument.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementdocument Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementdocument_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.input.js'), + description: + 'Mode of this document declaration - whether an application is a producer or consumer.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Mode of this document declaration - whether an application is a producer or consumer.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'A profile on the document Bundle that constrains which resources are present, and their contents.', + }, + profile: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A profile on the document Bundle that constrains which resources are present, and their contents.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementimplementation.input.js b/src/resources/4_0_0/inputs/capabilitystatementimplementation.input.js new file mode 100644 index 00000000..0b6cc345 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementimplementation.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementimplementation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementimplementation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: + 'Information about the specific installation that this capability statement relates to.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Information about the specific installation that this capability statement relates to.', + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + url: { + type: UrlScalar, + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + custodian: { + type: GraphQLString, + description: + 'The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementmessaging.input.js b/src/resources/4_0_0/inputs/capabilitystatementmessaging.input.js new file mode 100644 index 00000000..c77f6ad7 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementmessaging.input.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementmessaging Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementmessaging_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + endpoint: { + type: new GraphQLList( + require('./capabilitystatementmessagingendpoint.input.js'), + ), + description: + 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', + }, + _reliableCache: { + type: require('./element.input.js'), + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + reliableCache: { + type: UnsignedIntScalar, + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + _documentation: { + type: require('./element.input.js'), + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", + }, + documentation: { + type: GraphQLString, + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", + }, + supportedMessage: { + type: new GraphQLList( + require('./capabilitystatementmessagingsupportedmessage.input.js'), + ), + description: + 'References to message definitions for messages this system can send or receive.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementmessagingendpoint.input.js b/src/resources/4_0_0/inputs/capabilitystatementmessagingendpoint.input.js new file mode 100644 index 00000000..daf1d908 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementmessagingendpoint.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementmessagingendpoint Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementmessagingendpoint_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + protocol: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', + }, + _address: { + type: require('./element.input.js'), + description: + 'The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + address: { + type: new GraphQLNonNull(UrlScalar), + description: + 'The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementmessagingsupportedmessage.input.js b/src/resources/4_0_0/inputs/capabilitystatementmessagingsupportedmessage.input.js new file mode 100644 index 00000000..8a912194 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementmessagingsupportedmessage.input.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementmessagingsupportedMessage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementmessagingsupportedMessage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.input.js'), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', + }, + definition: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementrest.input.js b/src/resources/4_0_0/inputs/capabilitystatementrest.input.js new file mode 100644 index 00000000..05d90fae --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementrest.input.js @@ -0,0 +1,88 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementrest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.input.js'), + description: + 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', + }, + _documentation: { + type: require('./element.input.js'), + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + documentation: { + type: GraphQLString, + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + security: { + type: require('./capabilitystatementrestsecurity.input.js'), + description: + 'Information about security implementation from an interface perspective - what a client needs to know.', + }, + resource: { + type: new GraphQLList( + require('./capabilitystatementrestresource.input.js'), + ), + description: + 'A specification of the restful capabilities of the solution for a specific resource type.', + }, + interaction: { + type: new GraphQLList( + require('./capabilitystatementrestinteraction.input.js'), + ), + description: + 'A specification of restful operations supported by the system.', + }, + _compartment: { + type: require('./element.input.js'), + description: + 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', + }, + compartment: { + type: new GraphQLList(CanonicalScalar), + description: + 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementrestinteraction.input.js b/src/resources/4_0_0/inputs/capabilitystatementrestinteraction.input.js new file mode 100644 index 00000000..647596d5 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementrestinteraction.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestinteraction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementrestinteraction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'A coded identifier of the operation, supported by the system.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A coded identifier of the operation, supported by the system.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementrestresource.input.js b/src/resources/4_0_0/inputs/capabilitystatementrestresource.input.js new file mode 100644 index 00000000..dd2159d3 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementrestresource.input.js @@ -0,0 +1,194 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestresource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementrestresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'A type of resource exposed via the restful interface.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'A type of resource exposed via the restful interface.', + }, + _profile: { + type: require('./element.input.js'), + description: + "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + profile: { + type: CanonicalScalar, + description: + "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + _supportedProfile: { + type: require('./element.input.js'), + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + supportedProfile: { + type: new GraphQLList(CanonicalScalar), + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Additional information about the resource type used by the system.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional information about the resource type used by the system.', + }, + interaction: { + type: new GraphQLList( + require('./capabilitystatementrestresourceinteraction.input.js'), + ), + description: 'Identifies a restful operation supported by the solution.', + }, + _versioning: { + type: require('./element.input.js'), + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + versioning: { + type: CodeScalar, + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + _readHistory: { + type: require('./element.input.js'), + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + readHistory: { + type: GraphQLBoolean, + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + _updateCreate: { + type: require('./element.input.js'), + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + updateCreate: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + _conditionalCreate: { + type: require('./element.input.js'), + description: + 'A flag that indicates that the server supports conditional create.', + }, + conditionalCreate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional create.', + }, + _conditionalRead: { + type: require('./element.input.js'), + description: + 'A code that indicates how the server supports conditional read.', + }, + conditionalRead: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional read.', + }, + _conditionalUpdate: { + type: require('./element.input.js'), + description: + 'A flag that indicates that the server supports conditional update.', + }, + conditionalUpdate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional update.', + }, + _conditionalDelete: { + type: require('./element.input.js'), + description: + 'A code that indicates how the server supports conditional delete.', + }, + conditionalDelete: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional delete.', + }, + _referencePolicy: { + type: require('./element.input.js'), + description: 'A set of flags that defines how references are supported.', + }, + referencePolicy: { + type: new GraphQLList(CodeScalar), + description: 'A set of flags that defines how references are supported.', + }, + _searchInclude: { + type: require('./element.input.js'), + description: 'A list of _include values supported by the server.', + }, + searchInclude: { + type: new GraphQLList(GraphQLString), + description: 'A list of _include values supported by the server.', + }, + _searchRevInclude: { + type: require('./element.input.js'), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchRevInclude: { + type: new GraphQLList(GraphQLString), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchParam: { + type: new GraphQLList( + require('./capabilitystatementrestresourcesearchparam.input.js'), + ), + description: + 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', + }, + operation: { + type: new GraphQLList( + require('./capabilitystatementrestresourceoperation.input.js'), + ), + description: + 'Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementrestresourceinteraction.input.js b/src/resources/4_0_0/inputs/capabilitystatementrestresourceinteraction.input.js new file mode 100644 index 00000000..90169025 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementrestresourceinteraction.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestresourceinteraction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementrestresourceinteraction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + _documentation: { + type: require('./element.input.js'), + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + documentation: { + type: GraphQLString, + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementrestresourceoperation.input.js b/src/resources/4_0_0/inputs/capabilitystatementrestresourceoperation.input.js new file mode 100644 index 00000000..98cbf255 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementrestresourceoperation.input.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestresourceoperation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementrestresourceoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', + }, + _definition: { + type: require('./element.input.js'), + description: + "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation. If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition. The custom definition would describe the specific subset of functionality supported.", + }, + definition: { + type: new GraphQLNonNull(CanonicalScalar), + description: + "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation. If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition. The custom definition would describe the specific subset of functionality supported.", + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.', + }, + documentation: { + type: GraphQLString, + description: + 'Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementrestresourcesearchparam.input.js b/src/resources/4_0_0/inputs/capabilitystatementrestresourcesearchparam.input.js new file mode 100644 index 00000000..0a93c58e --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementrestresourcesearchparam.input.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestresourcesearchParam Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementrestresourcesearchParam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'The name of the search parameter used in the interface.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the search parameter used in the interface.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.', + }, + definition: { + type: CanonicalScalar, + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + documentation: { + type: GraphQLString, + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementrestsecurity.input.js b/src/resources/4_0_0/inputs/capabilitystatementrestsecurity.input.js new file mode 100644 index 00000000..9d1e6743 --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementrestsecurity.input.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CapabilityStatementrestsecurity Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementrestsecurity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _cors: { + type: require('./element.input.js'), + description: + 'Server adds CORS headers when responding to requests - this enables Javascript applications to use the server.', + }, + cors: { + type: GraphQLBoolean, + description: + 'Server adds CORS headers when responding to requests - this enables Javascript applications to use the server.', + }, + service: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Types of security services that are supported/required by the system.', + }, + _description: { + type: require('./element.input.js'), + description: 'General description of how security works.', + }, + description: { + type: GraphQLString, + description: 'General description of how security works.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/capabilitystatementsoftware.input.js b/src/resources/4_0_0/inputs/capabilitystatementsoftware.input.js new file mode 100644 index 00000000..00eff76d --- /dev/null +++ b/src/resources/4_0_0/inputs/capabilitystatementsoftware.input.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementsoftware Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CapabilityStatementsoftware_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Name the software is known by.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name the software is known by.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version identifier for the software covered by this statement.', + }, + version: { + type: GraphQLString, + description: + 'The version identifier for the software covered by this statement.', + }, + _releaseDate: { + type: require('./element.input.js'), + description: 'Date this version of the software was released.', + }, + releaseDate: { + type: DateTimeScalar, + description: 'Date this version of the software was released.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/careplan.input.js b/src/resources/4_0_0/inputs/careplan.input.js new file mode 100644 index 00000000..87fa4197 --- /dev/null +++ b/src/resources/4_0_0/inputs/careplan.input.js @@ -0,0 +1,231 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CarePlan Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CarePlan_Input', + description: + 'Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CarePlan_Enum_input', + values: { CarePlan: { value: 'CarePlan' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A care plan that is fulfilled in whole or in part by this care plan.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'Completed or terminated care plan whose function is taken by this new care plan.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger care plan of which this particular care plan is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", + }, + _title: { + type: require('./element.input.js'), + description: 'Human-friendly name for the care plan.', + }, + title: { + type: GraphQLString, + description: 'Human-friendly name for the care plan.', + }, + _description: { + type: require('./element.input.js'), + description: 'A description of the scope and nature of the plan.', + }, + description: { + type: GraphQLString, + description: 'A description of the scope and nature of the plan.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the patient or group whose intended care is described by the plan.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates when the plan did (or is intended to) come into effect and end.', + }, + _created: { + type: require('./element.input.js'), + description: + 'Represents when this particular CarePlan record was created in the system, which is often a system-generated date.', + }, + created: { + type: DateTimeScalar, + description: + 'Represents when this particular CarePlan record was created in the system, which is often a system-generated date.', + }, + author: { + type: GraphQLString, + description: + 'When populated, the author is responsible for the care plan. The care plan is attributed to the author.', + }, + contributor: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the individual(s) or organization who provided the contents of the care plan.', + }, + careTeam: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', + }, + addresses: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include comorbidities, recent procedures, limitations, recent assessments, etc.", + }, + goal: { + type: new GraphQLList(GraphQLString), + description: + 'Describes the intended objective(s) of carrying out the care plan.', + }, + activity: { + type: new GraphQLList(require('./careplanactivity.input.js')), + description: + 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'General notes about the care plan not covered elsewhere.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/careplanactivity.input.js b/src/resources/4_0_0/inputs/careplanactivity.input.js new file mode 100644 index 00000000..1f0e4a03 --- /dev/null +++ b/src/resources/4_0_0/inputs/careplanactivity.input.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CarePlanactivity Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CarePlanactivity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + outcomeCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).', + }, + outcomeReference: { + type: new GraphQLList(GraphQLString), + description: + "Details of the outcome or action resulting from the activity. The reference to an 'event' resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).", + }, + progress: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Notes about the adherence/status/progress of the activity.', + }, + reference: { + type: GraphQLString, + description: + 'The details of the proposed activity represented in a specific resource.', + }, + detail: { + type: require('./careplanactivitydetail.input.js'), + description: + "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/careplanactivitydetail.input.js b/src/resources/4_0_0/inputs/careplanactivitydetail.input.js new file mode 100644 index 00000000..da988ac4 --- /dev/null +++ b/src/resources/4_0_0/inputs/careplanactivitydetail.input.js @@ -0,0 +1,175 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary CarePlanactivitydetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CarePlanactivitydetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _kind: { + type: require('./element.input.js'), + description: + 'A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.', + }, + kind: { + type: CodeScalar, + description: + 'A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.', + }, + goal: { + type: new GraphQLList(GraphQLString), + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Identifies what progress is being made for the specific activity.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies what progress is being made for the specific activity.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", + }, + _doNotPerform: { + type: require('./element.input.js'), + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.', + }, + scheduledTiming: { + type: require('./timing.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledPeriod: { + type: require('./period.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _scheduledString: { + type: require('./element.input.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledString: { + type: GraphQLString, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: GraphQLString, + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: "Identifies who's expected to be involved in the activity.", + }, + productCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + productReference: { + type: GraphQLString, + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + dailyAmount: { + type: require('./quantity.input.js'), + description: + 'Identifies the quantity expected to be consumed in a given day.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', + }, + _description: { + type: require('./element.input.js'), + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + description: { + type: GraphQLString, + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/careteam.input.js b/src/resources/4_0_0/inputs/careteam.input.js new file mode 100644 index 00000000..ba7fc3dd --- /dev/null +++ b/src/resources/4_0_0/inputs/careteam.input.js @@ -0,0 +1,153 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CareTeam Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CareTeam_Input', + description: + 'The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CareTeam_Enum_input', + values: { CareTeam: { value: 'CareTeam' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current state of the care team.', + }, + status: { + type: CodeScalar, + description: 'Indicates the current state of the care team.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.', + }, + _name: { + type: require('./element.input.js'), + description: + "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", + }, + name: { + type: GraphQLString, + description: + "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", + }, + subject: { + type: GraphQLString, + description: + 'Identifies the patient or group whose intended care is handled by the team.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates when the team did (or is intended to) come into effect and end.', + }, + participant: { + type: new GraphQLList(require('./careteamparticipant.input.js')), + description: + 'Identifies all people and organizations who are expected to be involved in the care team.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Describes why the care team exists.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: 'Condition(s) that this care team addresses.', + }, + managingOrganization: { + type: new GraphQLList(GraphQLString), + description: 'The organization responsible for the care team.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A central contact detail for the care team (that applies to all members).', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Comments made about the CareTeam.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/careteamparticipant.input.js b/src/resources/4_0_0/inputs/careteamparticipant.input.js new file mode 100644 index 00000000..2346df26 --- /dev/null +++ b/src/resources/4_0_0/inputs/careteamparticipant.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CareTeamparticipant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CareTeamparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Indicates specific responsibility of an individual within the care team, such as 'Primary care physician', 'Trained social worker counselor', 'Caregiver', etc.", + }, + member: { + type: GraphQLString, + description: + 'The specific person or organization who is participating/expected to participate in the care team.', + }, + onBehalfOf: { + type: GraphQLString, + description: 'The organization of the practitioner.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates when the specific member or organization did (or is intended to) come into effect and end.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/catalogentry.input.js b/src/resources/4_0_0/inputs/catalogentry.input.js new file mode 100644 index 00000000..9f063480 --- /dev/null +++ b/src/resources/4_0_0/inputs/catalogentry.input.js @@ -0,0 +1,164 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CatalogEntry Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CatalogEntry_Input', + description: + 'Catalog entries are wrappers that contextualize items included in a catalog.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CatalogEntry_Enum_input', + values: { CatalogEntry: { value: 'CatalogEntry' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of item - medication, device, service, protocol or other.', + }, + _orderable: { + type: require('./element.input.js'), + description: 'Whether the entry represents an orderable item.', + }, + orderable: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether the entry represents an orderable item.', + }, + referencedItem: { + type: new GraphQLNonNull(GraphQLString), + description: 'The item in a catalog or definition.', + }, + additionalIdentifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Used in supporting related concepts, e.g. NDC to RxNorm.', + }, + classification: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Classes of devices, or ATC for medication.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.', + }, + status: { + type: CodeScalar, + description: + 'Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.', + }, + validityPeriod: { + type: require('./period.input.js'), + description: + 'The time period in which this catalog entry is expected to be active.', + }, + _validTo: { + type: require('./element.input.js'), + description: + 'The date until which this catalog entry is expected to be active.', + }, + validTo: { + type: DateTimeScalar, + description: + 'The date until which this catalog entry is expected to be active.', + }, + _lastUpdated: { + type: require('./element.input.js'), + description: + 'Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.', + }, + lastUpdated: { + type: DateTimeScalar, + description: + 'Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.', + }, + additionalCharacteristic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Used for examplefor Out of Formulary, or any specifics.', + }, + additionalClassification: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'User for example for ATC classification, or.', + }, + relatedEntry: { + type: new GraphQLList(require('./catalogentryrelatedentry.input.js')), + description: + 'Used for example, to point to a substance, or to a device used to administer a medication.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/catalogentryrelatedentry.input.js b/src/resources/4_0_0/inputs/catalogentryrelatedentry.input.js new file mode 100644 index 00000000..af25cc73 --- /dev/null +++ b/src/resources/4_0_0/inputs/catalogentryrelatedentry.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CatalogEntryrelatedEntry Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CatalogEntryrelatedEntry_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _relationtype: { + type: require('./element.input.js'), + description: + 'The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.', + }, + relationtype: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.', + }, + item: { + type: new GraphQLNonNull(GraphQLString), + description: 'The reference to the related item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/chargeitem.input.js b/src/resources/4_0_0/inputs/chargeitem.input.js new file mode 100644 index 00000000..3d9d7ed6 --- /dev/null +++ b/src/resources/4_0_0/inputs/chargeitem.input.js @@ -0,0 +1,255 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ChargeItem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ChargeItem_Input', + description: + 'The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ChargeItem_Enum_input', + values: { ChargeItem: { value: 'ChargeItem' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this event performer or other systems.', + }, + _definitionUri: { + type: require('./element.input.js'), + description: + 'References the (external) source of pricing information, rules of application for the code this ChargeItem uses.', + }, + definitionUri: { + type: new GraphQLList(UriScalar), + description: + 'References the (external) source of pricing information, rules of application for the code this ChargeItem uses.', + }, + _definitionCanonical: { + type: require('./element.input.js'), + description: + 'References the source of pricing information, rules of application for the code this ChargeItem uses.', + }, + definitionCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'References the source of pricing information, rules of application for the code this ChargeItem uses.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the ChargeItem.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the ChargeItem.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'ChargeItems can be grouped to larger ChargeItems covering the whole set.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code that identifies the charge, like a billing code.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The individual or set of individuals the action is being or was performed on.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care that establishes the context for this event.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + performer: { + type: new GraphQLList(require('./chargeitemperformer.input.js')), + description: + 'Indicates who or what performed or participated in the charged service.', + }, + performingOrganization: { + type: GraphQLString, + description: 'The organization requesting the service.', + }, + requestingOrganization: { + type: GraphQLString, + description: 'The organization performing the service.', + }, + costCenter: { + type: GraphQLString, + description: + 'The financial cost center permits the tracking of charge attribution.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'Quantity of which the charge item has been serviced.', + }, + bodysite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The anatomical location where the related service has been applied.', + }, + _factorOverride: { + type: require('./element.input.js'), + description: + 'Factor overriding the factor determined by the rules associated with the code.', + }, + factorOverride: { + type: GraphQLFloat, + description: + 'Factor overriding the factor determined by the rules associated with the code.', + }, + priceOverride: { + type: require('./money.input.js'), + description: + 'Total price of the charge overriding the list price associated with the code.', + }, + _overrideReason: { + type: require('./element.input.js'), + description: + 'If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', + }, + overrideReason: { + type: GraphQLString, + description: + 'If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', + }, + enterer: { + type: GraphQLString, + description: + 'The device, practitioner, etc. who entered the charge item.', + }, + _enteredDate: { + type: require('./element.input.js'), + description: 'Date the charge item was entered.', + }, + enteredDate: { + type: DateTimeScalar, + description: 'Date the charge item was entered.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Describes why the event occurred in coded or textual form.', + }, + service: { + type: new GraphQLList(GraphQLString), + description: 'Indicated the rendered service that caused this charge.', + }, + productReference: { + type: GraphQLString, + description: + 'Identifies the device, food, drug or other product being charged either by type code or reference to an instance.', + }, + productCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the device, food, drug or other product being charged either by type code or reference to an instance.', + }, + account: { + type: new GraphQLList(GraphQLString), + description: 'Account into which this ChargeItems belongs.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the event by the performer, subject or other participants.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: 'Further information supporting this charge.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/chargeitemdefinition.input.js b/src/resources/4_0_0/inputs/chargeitemdefinition.input.js new file mode 100644 index 00000000..802f8f48 --- /dev/null +++ b/src/resources/4_0_0/inputs/chargeitemdefinition.input.js @@ -0,0 +1,275 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ChargeItemDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ChargeItemDefinition_Input', + description: + 'The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ChargeItemDefinition_Enum_input', + values: { ChargeItemDefinition: { value: 'ChargeItemDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the charge item definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the charge item definition.', + }, + _derivedFromUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.', + }, + derivedFromUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.', + }, + _partOf: { + type: require('./element.input.js'), + description: + 'A larger definition of which this particular definition is a component or step.', + }, + partOf: { + type: new GraphQLList(CanonicalScalar), + description: + 'A larger definition of which this particular definition is a component or step.', + }, + _replaces: { + type: require('./element.input.js'), + description: + 'As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.', + }, + replaces: { + type: new GraphQLList(CanonicalScalar), + description: + 'As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the ChargeItemDefinition.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the ChargeItemDefinition.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the charge item definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the charge item definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the charge item definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the charge item definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate charge item definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the charge item definition is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the charge item definition content was or is planned to be in active use.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'The defined billing details in this resource pertain to the given billing code.', + }, + instance: { + type: new GraphQLList(GraphQLString), + description: + 'The defined billing details in this resource pertain to the given product instance(s).', + }, + applicability: { + type: new GraphQLList( + require('./chargeitemdefinitionapplicability.input.js'), + ), + description: + 'Expressions that describe applicability criteria for the billing code.', + }, + propertyGroup: { + type: new GraphQLList( + require('./chargeitemdefinitionpropertygroup.input.js'), + ), + description: + 'Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/chargeitemdefinitionapplicability.input.js b/src/resources/4_0_0/inputs/chargeitemdefinitionapplicability.input.js new file mode 100644 index 00000000..3dc3f1ff --- /dev/null +++ b/src/resources/4_0_0/inputs/chargeitemdefinitionapplicability.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ChargeItemDefinitionapplicability Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ChargeItemDefinitionapplicability_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + _language: { + type: require('./element.input.js'), + description: + "The media type of the language for the expression, e.g. 'text/cql' for Clinical Query Language expressions or 'text/fhirpath' for FHIRPath expressions.", + }, + language: { + type: GraphQLString, + description: + "The media type of the language for the expression, e.g. 'text/cql' for Clinical Query Language expressions or 'text/fhirpath' for FHIRPath expressions.", + }, + _expression: { + type: require('./element.input.js'), + description: + 'An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context environment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.', + }, + expression: { + type: GraphQLString, + description: + 'An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context environment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/chargeitemdefinitionpropertygroup.input.js b/src/resources/4_0_0/inputs/chargeitemdefinitionpropertygroup.input.js new file mode 100644 index 00000000..5ce8edf8 --- /dev/null +++ b/src/resources/4_0_0/inputs/chargeitemdefinitionpropertygroup.input.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ChargeItemDefinitionpropertyGroup Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ChargeItemDefinitionpropertyGroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + priceComponent: { + type: new GraphQLList( + require('./chargeitemdefinitionpropertygrouppricecomponent.input.js'), + ), + description: + 'The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/chargeitemdefinitionpropertygrouppricecomponent.input.js b/src/resources/4_0_0/inputs/chargeitemdefinitionpropertygrouppricecomponent.input.js new file mode 100644 index 00000000..048e49ee --- /dev/null +++ b/src/resources/4_0_0/inputs/chargeitemdefinitionpropertygrouppricecomponent.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ChargeItemDefinitionpropertyGrouppriceComponent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ChargeItemDefinitionpropertyGrouppriceComponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'This code identifies the type of the component.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'This code identifies the type of the component.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'The factor that has been applied on the base price for calculating this component.', + }, + factor: { + type: GraphQLFloat, + description: + 'The factor that has been applied on the base price for calculating this component.', + }, + amount: { + type: require('./money.input.js'), + description: 'The amount calculated for this component.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/chargeitemperformer.input.js b/src/resources/4_0_0/inputs/chargeitemperformer.input.js new file mode 100644 index 00000000..7b8d13f2 --- /dev/null +++ b/src/resources/4_0_0/inputs/chargeitemperformer.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ChargeItemperformer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ChargeItemperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device, practitioner, etc. who performed or participated in the service.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claim.input.js b/src/resources/4_0_0/inputs/claim.input.js new file mode 100644 index 00000000..ca294662 --- /dev/null +++ b/src/resources/4_0_0/inputs/claim.input.js @@ -0,0 +1,226 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Claim Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claim_Input', + description: + 'A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Claim_Enum_input', + values: { Claim: { value: 'Claim' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'A unique identifier assigned to this claim.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The category of claim, e.g. oral, pharmacy, vision, institutional, professional.', + }, + subType: { + type: require('./codeableconcept.input.js'), + description: + 'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.', + }, + _use: { + type: require('./element.input.js'), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.', + }, + billablePeriod: { + type: require('./period.input.js'), + description: 'The period for which charges are being submitted.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + enterer: { + type: GraphQLString, + description: + 'Individual who created the claim, predetermination or preauthorization.', + }, + insurer: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + }, + priority: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The provider-required urgency of processing the request. Typical values include: stat, routine deferred.', + }, + fundsReserve: { + type: require('./codeableconcept.input.js'), + description: + 'A code to indicate whether and for whom funds are to be reserved for future claims.', + }, + related: { + type: new GraphQLList(require('./claimrelated.input.js')), + description: + 'Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.', + }, + prescription: { + type: GraphQLString, + description: + 'Prescription to support the dispensing of pharmacy, device or vision products.', + }, + originalPrescription: { + type: GraphQLString, + description: + 'Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.', + }, + payee: { + type: require('./claimpayee.input.js'), + description: + 'The party to be reimbursed for cost of the products and services according to the terms of the policy.', + }, + referral: { + type: GraphQLString, + description: 'A reference to a referral resource.', + }, + facility: { + type: GraphQLString, + description: 'Facility where the services were provided.', + }, + careTeam: { + type: new GraphQLList(require('./claimcareteam.input.js')), + description: + 'The members of the team who provided the products and services.', + }, + supportingInfo: { + type: new GraphQLList(require('./claimsupportinginfo.input.js')), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.', + }, + diagnosis: { + type: new GraphQLList(require('./claimdiagnosis.input.js')), + description: 'Information about diagnoses relevant to the claim items.', + }, + procedure: { + type: new GraphQLList(require('./claimprocedure.input.js')), + description: + 'Procedures performed on the patient relevant to the billing items with the claim.', + }, + insurance: { + type: new GraphQLList( + new GraphQLNonNull(require('./claiminsurance.input.js')), + ), + description: + 'Financial instruments for reimbursement for the health care products and services specified on the claim.', + }, + accident: { + type: require('./claimaccident.input.js'), + description: + 'Details of an accident which resulted in injuries which required the products and services listed in the claim.', + }, + item: { + type: new GraphQLList(require('./claimitem.input.js')), + description: + "A claim line. Either a simple product or service or a 'group' of details which can each be a simple items or groups of sub-details.", + }, + total: { + type: require('./money.input.js'), + description: 'The total value of the all the items in the claim.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimaccident.input.js b/src/resources/4_0_0/inputs/claimaccident.input.js new file mode 100644 index 00000000..e8889963 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimaccident.input.js @@ -0,0 +1,61 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Claimaccident Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claimaccident_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _date: { + type: require('./element.input.js'), + description: + 'Date of an accident event related to the products and services contained in the claim.', + }, + date: { + type: new GraphQLNonNull(DateScalar), + description: + 'Date of an accident event related to the products and services contained in the claim.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.', + }, + locationAddress: { + type: require('./address.input.js'), + description: 'The physical location of the accident event.', + }, + locationReference: { + type: GraphQLString, + description: 'The physical location of the accident event.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimcareteam.input.js b/src/resources/4_0_0/inputs/claimcareteam.input.js new file mode 100644 index 00000000..5ffde031 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimcareteam.input.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimcareTeam Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimcareTeam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify care team entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify care team entries.', + }, + provider: { + type: new GraphQLNonNull(GraphQLString), + description: 'Member of the team who provided the product or service.', + }, + _responsible: { + type: require('./element.input.js'), + description: + 'The party who is billing and/or responsible for the claimed products or services.', + }, + responsible: { + type: GraphQLBoolean, + description: + 'The party who is billing and/or responsible for the claimed products or services.', + }, + role: { + type: require('./codeableconcept.input.js'), + description: + 'The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.', + }, + qualification: { + type: require('./codeableconcept.input.js'), + description: + 'The qualification of the practitioner which is applicable for this service.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimdiagnosis.input.js b/src/resources/4_0_0/inputs/claimdiagnosis.input.js new file mode 100644 index 00000000..311ea491 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimdiagnosis.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Claimdiagnosis Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claimdiagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify diagnosis entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify diagnosis entries.', + }, + diagnosisCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + diagnosisReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'When the condition was observed or the relative ranking.', + }, + onAdmission: { + type: require('./codeableconcept.input.js'), + description: + 'Indication of whether the diagnosis was present on admission to a facility.', + }, + packageCode: { + type: require('./codeableconcept.input.js'), + description: + 'A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claiminsurance.input.js b/src/resources/4_0_0/inputs/claiminsurance.input.js new file mode 100644 index 00000000..12a96ecc --- /dev/null +++ b/src/resources/4_0_0/inputs/claiminsurance.input.js @@ -0,0 +1,94 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Claiminsurance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claiminsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: + 'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.', + }, + _focal: { + type: require('./element.input.js'), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'The business identifier to be used when the claim is sent for adjudication against this insurance policy.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _businessArrangement: { + type: require('./element.input.js'), + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.', + }, + claimResponse: { + type: GraphQLString, + description: + 'The result of the adjudication of the line items for the Coverage specified in this insurance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimitem.input.js b/src/resources/4_0_0/inputs/claimitem.input.js new file mode 100644 index 00000000..c9903be1 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimitem.input.js @@ -0,0 +1,180 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Claimitem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claimitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify item entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify item entries.', + }, + _careTeamSequence: { + type: require('./element.input.js'), + description: 'CareTeam members related to this service or product.', + }, + careTeamSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'CareTeam members related to this service or product.', + }, + _diagnosisSequence: { + type: require('./element.input.js'), + description: 'Diagnosis applicable for this service or product.', + }, + diagnosisSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnosis applicable for this service or product.', + }, + _procedureSequence: { + type: require('./element.input.js'), + description: 'Procedures applicable for this service or product.', + }, + procedureSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Procedures applicable for this service or product.', + }, + _informationSequence: { + type: require('./element.input.js'), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product.', + }, + informationSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product.', + }, + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Identifies the program under which this may be recovered.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + locationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Where the product or service was provided.', + }, + locationAddress: { + type: require('./address.input.js'), + description: 'Where the product or service was provided.', + }, + locationReference: { + type: GraphQLString, + description: 'Where the product or service was provided.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: 'Unique Device Identifiers associated with this line item.', + }, + bodySite: { + type: require('./codeableconcept.input.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + subSite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A region or surface of the bodySite, e.g. limb region or tooth surface(s).', + }, + encounter: { + type: new GraphQLList(GraphQLString), + description: + 'The Encounters during which this Claim was created or to which the creation of this record is tightly associated.', + }, + detail: { + type: new GraphQLList(require('./claimitemdetail.input.js')), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimitemdetail.input.js b/src/resources/4_0_0/inputs/claimitemdetail.input.js new file mode 100644 index 00000000..ab0c8cec --- /dev/null +++ b/src/resources/4_0_0/inputs/claimitemdetail.input.js @@ -0,0 +1,104 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Claimitemdetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claimitemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify item entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify item entries.', + }, + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Identifies the program under which this may be recovered.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: 'Unique Device Identifiers associated with this line item.', + }, + subDetail: { + type: new GraphQLList(require('./claimitemdetailsubdetail.input.js')), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimitemdetailsubdetail.input.js b/src/resources/4_0_0/inputs/claimitemdetailsubdetail.input.js new file mode 100644 index 00000000..19062bc8 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimitemdetailsubdetail.input.js @@ -0,0 +1,99 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimitemdetailsubDetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimitemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify item entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify item entries.', + }, + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Identifies the program under which this may be recovered.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: 'Unique Device Identifiers associated with this line item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimpayee.input.js b/src/resources/4_0_0/inputs/claimpayee.input.js new file mode 100644 index 00000000..bfe639dc --- /dev/null +++ b/src/resources/4_0_0/inputs/claimpayee.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Claimpayee Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claimpayee_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Type of Party to be reimbursed: subscriber, provider, other.', + }, + party: { + type: GraphQLString, + description: + 'Reference to the individual or organization to whom any payment will be made.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimprocedure.input.js b/src/resources/4_0_0/inputs/claimprocedure.input.js new file mode 100644 index 00000000..5e780295 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimprocedure.input.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Claimprocedure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claimprocedure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify procedure entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify procedure entries.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'When the condition was observed or the relative ranking.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date and optionally time the procedure was performed.', + }, + date: { + type: DateTimeScalar, + description: 'Date and optionally time the procedure was performed.', + }, + procedureCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + }, + procedureReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: 'Unique Device Identifiers associated with this line item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimrelated.input.js b/src/resources/4_0_0/inputs/claimrelated.input.js new file mode 100644 index 00000000..e9cfdc7e --- /dev/null +++ b/src/resources/4_0_0/inputs/claimrelated.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Claimrelated Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Claimrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + claim: { + type: GraphQLString, + description: 'Reference to a related claim.', + }, + relationship: { + type: require('./codeableconcept.input.js'), + description: 'A code to convey how the claims are related.', + }, + reference: { + type: require('./identifier.input.js'), + description: + 'An alternate organizational reference to the case or file to which this particular claim pertains.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponse.input.js b/src/resources/4_0_0/inputs/claimresponse.input.js new file mode 100644 index 00000000..49cd508a --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponse.input.js @@ -0,0 +1,236 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ClaimResponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponse_Input', + description: + 'This resource provides the adjudication details from the processing of a Claim resource.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClaimResponse_Enum_input', + values: { ClaimResponse: { value: 'ClaimResponse' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'A unique identifier assigned to this claim response.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.', + }, + subType: { + type: require('./codeableconcept.input.js'), + description: + 'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.', + }, + _use: { + type: require('./element.input.js'), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + insurer: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party responsible for authorization, adjudication and reimbursement.', + }, + requestor: { + type: GraphQLString, + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.input.js'), + description: + 'The outcome of the claim, predetermination, or preauthorization processing.', + }, + outcome: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The outcome of the claim, predetermination, or preauthorization processing.', + }, + _disposition: { + type: require('./element.input.js'), + description: + 'A human readable description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: + 'A human readable description of the status of the adjudication.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'Reference from the Insurer which is used in later communications which refers to this adjudication.', + }, + preAuthRef: { + type: GraphQLString, + description: + 'Reference from the Insurer which is used in later communications which refers to this adjudication.', + }, + preAuthPeriod: { + type: require('./period.input.js'), + description: + 'The time frame during which this authorization is effective.', + }, + payeeType: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Party to be reimbursed: subscriber, provider, other.', + }, + item: { + type: new GraphQLList(require('./claimresponseitem.input.js')), + description: + "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.", + }, + addItem: { + type: new GraphQLList(require('./claimresponseadditem.input.js')), + description: + 'The first-tier service adjudications for payor added product or service lines.', + }, + total: { + type: new GraphQLList(require('./claimresponsetotal.input.js')), + description: 'Categorized monetary totals for the adjudication.', + }, + payment: { + type: require('./claimresponsepayment.input.js'), + description: 'Payment details for the adjudication of the claim.', + }, + fundsReserve: { + type: require('./codeableconcept.input.js'), + description: + 'A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.', + }, + formCode: { + type: require('./codeableconcept.input.js'), + description: 'A code for the form to be used for printing the content.', + }, + form: { + type: require('./attachment.input.js'), + description: + 'The actual form, by reference or inclusion, for printing the content or an EOB.', + }, + processNote: { + type: new GraphQLList(require('./claimresponseprocessnote.input.js')), + description: + 'A note that describes or explains adjudication results in a human readable form.', + }, + communicationRequest: { + type: new GraphQLList(GraphQLString), + description: + 'Request for additional supporting or authorizing information.', + }, + insurance: { + type: new GraphQLList(require('./claimresponseinsurance.input.js')), + description: + 'Financial instruments for reimbursement for the health care products and services specified on the claim.', + }, + error: { + type: new GraphQLList(require('./claimresponseerror.input.js')), + description: + 'Errors encountered during the processing of the adjudication.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseadditem.input.js b/src/resources/4_0_0/inputs/claimresponseadditem.input.js new file mode 100644 index 00000000..7d1e88ec --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseadditem.input.js @@ -0,0 +1,164 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseaddItem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseaddItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _itemSequence: { + type: require('./element.input.js'), + description: + 'Claim items which this service line is intended to replace.', + }, + itemSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Claim items which this service line is intended to replace.', + }, + _detailSequence: { + type: require('./element.input.js'), + description: + 'The sequence number of the details within the claim item which this line is intended to replace.', + }, + detailSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The sequence number of the details within the claim item which this line is intended to replace.', + }, + _subdetailSequence: { + type: require('./element.input.js'), + description: + 'The sequence number of the sub-details within the details within the claim item which this line is intended to replace.', + }, + subdetailSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The sequence number of the sub-details within the details within the claim item which this line is intended to replace.', + }, + provider: { + type: new GraphQLList(GraphQLString), + description: + 'The providers who are authorized for the services rendered to the patient.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Identifies the program under which this may be recovered.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + locationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Where the product or service was provided.', + }, + locationAddress: { + type: require('./address.input.js'), + description: 'Where the product or service was provided.', + }, + locationReference: { + type: GraphQLString, + description: 'Where the product or service was provided.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + bodySite: { + type: require('./codeableconcept.input.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + subSite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A region or surface of the bodySite, e.g. limb region or tooth surface(s).', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + detail: { + type: new GraphQLList(require('./claimresponseadditemdetail.input.js')), + description: + 'The second-tier service adjudications for payor added services.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseadditemdetail.input.js b/src/resources/4_0_0/inputs/claimresponseadditemdetail.input.js new file mode 100644 index 00000000..02f232c5 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseadditemdetail.input.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseaddItemdetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseaddItemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + subDetail: { + type: new GraphQLList( + require('./claimresponseadditemdetailsubdetail.input.js'), + ), + description: + 'The third-tier service adjudications for payor added services.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseadditemdetailsubdetail.input.js b/src/resources/4_0_0/inputs/claimresponseadditemdetailsubdetail.input.js new file mode 100644 index 00000000..77b9fb43 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseadditemdetailsubdetail.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseaddItemdetailsubDetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseaddItemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseerror.input.js b/src/resources/4_0_0/inputs/claimresponseerror.input.js new file mode 100644 index 00000000..59a03c8a --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseerror.input.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseerror Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseerror_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _itemSequence: { + type: require('./element.input.js'), + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + itemSequence: { + type: PositiveIntScalar, + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + _detailSequence: { + type: require('./element.input.js'), + description: + 'The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + detailSequence: { + type: PositiveIntScalar, + description: + 'The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + _subDetailSequence: { + type: require('./element.input.js'), + description: + 'The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + subDetailSequence: { + type: PositiveIntScalar, + description: + 'The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'An error code, from a specified code system, which details why the claim could not be adjudicated.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseinsurance.input.js b/src/resources/4_0_0/inputs/claimresponseinsurance.input.js new file mode 100644 index 00000000..0d4a0251 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseinsurance.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseinsurance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseinsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: + 'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.', + }, + _focal: { + type: require('./element.input.js'), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _businessArrangement: { + type: require('./element.input.js'), + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + claimResponse: { + type: GraphQLString, + description: + 'The result of the adjudication of the line items for the Coverage specified in this insurance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseitem.input.js b/src/resources/4_0_0/inputs/claimresponseitem.input.js new file mode 100644 index 00000000..dc87d21d --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseitem.input.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseitem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _itemSequence: { + type: require('./element.input.js'), + description: 'A number to uniquely reference the claim item entries.', + }, + itemSequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely reference the claim item entries.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + adjudication: { + type: new GraphQLList( + new GraphQLNonNull(require('./claimresponseitemadjudication.input.js')), + ), + description: + 'If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.', + }, + detail: { + type: new GraphQLList(require('./claimresponseitemdetail.input.js')), + description: + "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseitemadjudication.input.js b/src/resources/4_0_0/inputs/claimresponseitemadjudication.input.js new file mode 100644 index 00000000..9dcb9029 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseitemadjudication.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ClaimResponseitemadjudication Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseitemadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.', + }, + reason: { + type: require('./codeableconcept.input.js'), + description: + 'A code supporting the understanding of the adjudication result and explaining variance from expected amount.', + }, + amount: { + type: require('./money.input.js'), + description: 'Monetary amount associated with the category.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value associated with the category. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value associated with the category. Mutually exclusive to the amount element above.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseitemdetail.input.js b/src/resources/4_0_0/inputs/claimresponseitemdetail.input.js new file mode 100644 index 00000000..c6c91801 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseitemdetail.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseitemdetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseitemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _detailSequence: { + type: require('./element.input.js'), + description: 'A number to uniquely reference the claim detail entry.', + }, + detailSequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely reference the claim detail entry.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + subDetail: { + type: new GraphQLList( + require('./claimresponseitemdetailsubdetail.input.js'), + ), + description: 'A sub-detail adjudication of a simple product or service.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseitemdetailsubdetail.input.js b/src/resources/4_0_0/inputs/claimresponseitemdetailsubdetail.input.js new file mode 100644 index 00000000..b44c22e4 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseitemdetailsubdetail.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseitemdetailsubDetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseitemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _subDetailSequence: { + type: require('./element.input.js'), + description: 'A number to uniquely reference the claim sub-detail entry.', + }, + subDetailSequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely reference the claim sub-detail entry.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponsepayment.input.js b/src/resources/4_0_0/inputs/claimresponsepayment.input.js new file mode 100644 index 00000000..9f9f0a6e --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponsepayment.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ClaimResponsepayment Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponsepayment_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Whether this represents partial or complete payment of the benefits payable.', + }, + adjustment: { + type: require('./money.input.js'), + description: + "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", + }, + adjustmentReason: { + type: require('./codeableconcept.input.js'), + description: 'Reason for the payment adjustment.', + }, + _date: { + type: require('./element.input.js'), + description: + 'Estimated date the payment will be issued or the actual issue date of payment.', + }, + date: { + type: DateScalar, + description: + 'Estimated date the payment will be issued or the actual issue date of payment.', + }, + amount: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'Benefits payable less any payment adjustment.', + }, + identifier: { + type: require('./identifier.input.js'), + description: "Issuer's unique identifier for the payment instrument.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponseprocessnote.input.js b/src/resources/4_0_0/inputs/claimresponseprocessnote.input.js new file mode 100644 index 00000000..55eec420 --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponseprocessnote.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseprocessNote Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponseprocessNote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _number: { + type: require('./element.input.js'), + description: 'A number to uniquely identify a note entry.', + }, + number: { + type: PositiveIntScalar, + description: 'A number to uniquely identify a note entry.', + }, + _type: { + type: require('./element.input.js'), + description: 'The business purpose of the note text.', + }, + type: { + type: CodeScalar, + description: 'The business purpose of the note text.', + }, + _text: { + type: require('./element.input.js'), + description: + 'The explanation or description associated with the processing.', + }, + text: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The explanation or description associated with the processing.', + }, + language: { + type: require('./codeableconcept.input.js'), + description: + 'A code to define the language used in the text of the note.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimresponsetotal.input.js b/src/resources/4_0_0/inputs/claimresponsetotal.input.js new file mode 100644 index 00000000..5356596d --- /dev/null +++ b/src/resources/4_0_0/inputs/claimresponsetotal.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ClaimResponsetotal Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimResponsetotal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.', + }, + amount: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'Monetary total amount associated with the category.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/claimsupportinginfo.input.js b/src/resources/4_0_0/inputs/claimsupportinginfo.input.js new file mode 100644 index 00000000..ef48f9ec --- /dev/null +++ b/src/resources/4_0_0/inputs/claimsupportinginfo.input.js @@ -0,0 +1,112 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ClaimsupportingInfo Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClaimsupportingInfo_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: + 'A number to uniquely identify supporting information entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify supporting information entries.', + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.', + }, + _timingDate: { + type: require('./element.input.js'), + description: 'The date when or period to which this information refers.', + }, + timingDate: { + type: DateScalar, + description: 'The date when or period to which this information refers.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: 'The date when or period to which this information refers.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueString: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueReference: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides the reason in the situation where a reason code is required in addition to the content.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/clinicalimpression.input.js b/src/resources/4_0_0/inputs/clinicalimpression.input.js new file mode 100644 index 00000000..bc731ba8 --- /dev/null +++ b/src/resources/4_0_0/inputs/clinicalimpression.input.js @@ -0,0 +1,212 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ClinicalImpression Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClinicalImpression_Input', + description: + "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called 'ClinicalImpression' rather than 'ClinicalAssessment' to avoid confusion with the recording of assessment tools such as Apgar score.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClinicalImpression_Enum_input', + values: { ClinicalImpression: { value: 'ClinicalImpression' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.input.js'), + description: 'Identifies the workflow status of the assessment.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the workflow status of the assessment.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + 'Captures the reason for the current state of the ClinicalImpression.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'Categorizes the type of clinical assessment performed.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.', + }, + description: { + type: GraphQLString, + description: + 'A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient or group of individuals assessed as part of this record.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + 'The point in time or period over which the subject was assessed.', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The point in time or period over which the subject was assessed.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The point in time or period over which the subject was assessed.', + }, + _date: { + type: require('./element.input.js'), + description: + 'Indicates when the documentation of the assessment was complete.', + }, + date: { + type: DateTimeScalar, + description: + 'Indicates when the documentation of the assessment was complete.', + }, + assessor: { + type: GraphQLString, + description: 'The clinician performing the assessment.', + }, + previous: { + type: GraphQLString, + description: + "A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", + }, + problem: { + type: new GraphQLList(GraphQLString), + description: 'A list of the relevant problems/conditions for a patient.', + }, + investigation: { + type: new GraphQLList( + require('./clinicalimpressioninvestigation.input.js'), + ), + description: + 'One or more sets of investigations (signs, symptoms, etc.). The actual grouping of investigations varies greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', + }, + _protocol: { + type: require('./element.input.js'), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + protocol: { + type: new GraphQLList(UriScalar), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + _summary: { + type: require('./element.input.js'), + description: 'A text summary of the investigations and the diagnosis.', + }, + summary: { + type: GraphQLString, + description: 'A text summary of the investigations and the diagnosis.', + }, + finding: { + type: new GraphQLList(require('./clinicalimpressionfinding.input.js')), + description: + 'Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.', + }, + prognosisCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Estimate of likely outcome.', + }, + prognosisReference: { + type: new GraphQLList(GraphQLString), + description: 'RiskAssessment expressing likely outcome.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: 'Information supporting the clinical impression.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/clinicalimpressionfinding.input.js b/src/resources/4_0_0/inputs/clinicalimpressionfinding.input.js new file mode 100644 index 00000000..89f8f76d --- /dev/null +++ b/src/resources/4_0_0/inputs/clinicalimpressionfinding.input.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ClinicalImpressionfinding Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClinicalImpressionfinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + itemCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.', + }, + itemReference: { + type: GraphQLString, + description: + 'Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.', + }, + _basis: { + type: require('./element.input.js'), + description: 'Which investigations support finding or diagnosis.', + }, + basis: { + type: GraphQLString, + description: 'Which investigations support finding or diagnosis.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/clinicalimpressioninvestigation.input.js b/src/resources/4_0_0/inputs/clinicalimpressioninvestigation.input.js new file mode 100644 index 00000000..2d37980d --- /dev/null +++ b/src/resources/4_0_0/inputs/clinicalimpressioninvestigation.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ClinicalImpressioninvestigation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ClinicalImpressioninvestigation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutritional) history may be used.", + }, + item: { + type: new GraphQLList(GraphQLString), + description: 'A record of a specific investigation that was undertaken.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/codeableconcept.input.js b/src/resources/4_0_0/inputs/codeableconcept.input.js new file mode 100644 index 00000000..e731510d --- /dev/null +++ b/src/resources/4_0_0/inputs/codeableconcept.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CodeableConcept Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CodeableConcept_Input', + description: + 'Base StructureDefinition for CodeableConcept Type: A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + coding: { + type: new GraphQLList(require('./coding.input.js')), + description: 'A reference to a code defined by a terminology system.', + }, + _text: { + type: require('./element.input.js'), + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + text: { + type: GraphQLString, + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/codesystem.input.js b/src/resources/4_0_0/inputs/codesystem.input.js new file mode 100644 index 00000000..46e2ac9b --- /dev/null +++ b/src/resources/4_0_0/inputs/codesystem.input.js @@ -0,0 +1,313 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary CodeSystem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CodeSystem_Input', + description: + 'The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CodeSystem_Enum_input', + values: { CodeSystem: { value: 'CodeSystem' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the code system.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the code system.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the code system resource was created or revised.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The date (and optionally time) when the code system resource was created or revised.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the code system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the code system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the code system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the code system.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the code system from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the code system from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate code system instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the code system is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this code system is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this code system is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', + }, + _caseSensitive: { + type: require('./element.input.js'), + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + caseSensitive: { + type: GraphQLBoolean, + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + _valueSet: { + type: require('./element.input.js'), + description: + 'Canonical reference to the value set that contains the entire code system.', + }, + valueSet: { + type: CanonicalScalar, + description: + 'Canonical reference to the value set that contains the entire code system.', + }, + _hierarchyMeaning: { + type: require('./element.input.js'), + description: + 'The meaning of the hierarchy of concepts as represented in this resource.', + }, + hierarchyMeaning: { + type: CodeScalar, + description: + 'The meaning of the hierarchy of concepts as represented in this resource.', + }, + _compositional: { + type: require('./element.input.js'), + description: + 'The code system defines a compositional (post-coordination) grammar.', + }, + compositional: { + type: GraphQLBoolean, + description: + 'The code system defines a compositional (post-coordination) grammar.', + }, + _versionNeeded: { + type: require('./element.input.js'), + description: + 'This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.', + }, + versionNeeded: { + type: GraphQLBoolean, + description: + 'This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.', + }, + _content: { + type: require('./element.input.js'), + description: + 'The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.', + }, + content: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.', + }, + _supplements: { + type: require('./element.input.js'), + description: + 'The canonical URL of the code system that this code system supplement is adding designations and properties to.', + }, + supplements: { + type: CanonicalScalar, + description: + 'The canonical URL of the code system that this code system supplement is adding designations and properties to.', + }, + _count: { + type: require('./element.input.js'), + description: + 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.', + }, + count: { + type: UnsignedIntScalar, + description: + 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.', + }, + filter: { + type: new GraphQLList(require('./codesystemfilter.input.js')), + description: + 'A filter that can be used in a value set compose statement when selecting concepts using a filter.', + }, + property: { + type: new GraphQLList(require('./codesystemproperty.input.js')), + description: + 'A property defines an additional slot through which additional information can be provided about a concept.', + }, + concept: { + type: new GraphQLList(require('./codesystemconcept.input.js')), + description: + 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/codesystemconcept.input.js b/src/resources/4_0_0/inputs/codesystemconcept.input.js new file mode 100644 index 00000000..26d3035f --- /dev/null +++ b/src/resources/4_0_0/inputs/codesystemconcept.input.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CodeSystemconcept Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CodeSystemconcept_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + _display: { + type: require('./element.input.js'), + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + display: { + type: GraphQLString, + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + definition: { + type: GraphQLString, + description: + 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + designation: { + type: new GraphQLList(require('./codesystemconceptdesignation.input.js')), + description: + 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + property: { + type: new GraphQLList(require('./codesystemconceptproperty.input.js')), + description: 'A property value for this concept.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/codesystemconceptdesignation.input.js b/src/resources/4_0_0/inputs/codesystemconceptdesignation.input.js new file mode 100644 index 00000000..0f073a7f --- /dev/null +++ b/src/resources/4_0_0/inputs/codesystemconceptdesignation.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CodeSystemconceptdesignation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CodeSystemconceptdesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _language: { + type: require('./element.input.js'), + description: 'The language this designation is defined for.', + }, + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + use: { + type: require('./coding.input.js'), + description: 'A code that details how this designation would be used.', + }, + _value: { + type: require('./element.input.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/codesystemconceptproperty.input.js b/src/resources/4_0_0/inputs/codesystemconceptproperty.input.js new file mode 100644 index 00000000..2751324c --- /dev/null +++ b/src/resources/4_0_0/inputs/codesystemconceptproperty.input.js @@ -0,0 +1,102 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLBoolean, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CodeSystemconceptproperty Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CodeSystemconceptproperty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: 'A code that is a reference to CodeSystem.property.code.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'A code that is a reference to CodeSystem.property.code.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of this property.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The value of this property.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of this property.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of this property.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of this property.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of this property.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The value of this property.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of this property.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/codesystemfilter.input.js b/src/resources/4_0_0/inputs/codesystemfilter.input.js new file mode 100644 index 00000000..f56a3751 --- /dev/null +++ b/src/resources/4_0_0/inputs/codesystemfilter.input.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CodeSystemfilter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CodeSystemfilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'The code that identifies this filter when it is used as a filter in [ValueSet](valueset.html#).compose.include.filter.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code that identifies this filter when it is used as a filter in [ValueSet](valueset.html#).compose.include.filter.', + }, + _description: { + type: require('./element.input.js'), + description: 'A description of how or why the filter is used.', + }, + description: { + type: GraphQLString, + description: 'A description of how or why the filter is used.', + }, + _operator: { + type: require('./element.input.js'), + description: 'A list of operators that can be used with the filter.', + }, + operator: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'A list of operators that can be used with the filter.', + }, + _value: { + type: require('./element.input.js'), + description: 'A description of what the value for the filter should be.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of what the value for the filter should be.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/codesystemproperty.input.js b/src/resources/4_0_0/inputs/codesystemproperty.input.js new file mode 100644 index 00000000..64de2668 --- /dev/null +++ b/src/resources/4_0_0/inputs/codesystemproperty.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary CodeSystemproperty Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CodeSystemproperty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', + }, + uri: { + type: UriScalar, + description: + 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A description of the property- why it is defined, and how its value might be used.', + }, + description: { + type: GraphQLString, + description: + 'A description of the property- why it is defined, and how its value might be used.', + }, + _type: { + type: require('./element.input.js'), + description: + "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to another defined concept).", + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to another defined concept).", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coding.input.js b/src/resources/4_0_0/inputs/coding.input.js new file mode 100644 index 00000000..75e9a218 --- /dev/null +++ b/src/resources/4_0_0/inputs/coding.input.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Coding Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Coding_Input', + description: + 'Base StructureDefinition for Coding Type: A reference to a code defined by a terminology system.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + system: { + type: UriScalar, + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + code: { + type: CodeScalar, + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + _display: { + type: require('./element.input.js'), + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + display: { + type: GraphQLString, + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + _userSelected: { + type: require('./element.input.js'), + description: + 'Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).', + }, + userSelected: { + type: GraphQLBoolean, + description: + 'Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/communication.input.js b/src/resources/4_0_0/inputs/communication.input.js new file mode 100644 index 00000000..c2954e2e --- /dev/null +++ b/src/resources/4_0_0/inputs/communication.input.js @@ -0,0 +1,225 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Communication Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Communication_Input', + description: + 'An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Communication_Enum_input', + values: { Communication: { value: 'Communication' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'An order, proposal or plan fulfilled in whole or in part by this Communication.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: 'Part of this action.', + }, + inResponseTo: { + type: new GraphQLList(GraphQLString), + description: + 'Prior communication that this communication is in response to.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the transmission.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the transmission.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + 'Captures the reason for the current state of the Communication.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine.', + }, + priority: { + type: CodeScalar, + description: + 'Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine.', + }, + medium: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + subject: { + type: GraphQLString, + description: + 'The patient or group that was the focus of this communication.', + }, + topic: { + type: require('./codeableconcept.input.js'), + description: + 'Description of the purpose/content, similar to a subject line in an email.', + }, + about: { + type: new GraphQLList(GraphQLString), + description: + 'Other resources that pertain to this communication and to which this communication should be associated.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this Communication was created or to which the creation of this record is tightly associated.', + }, + _sent: { + type: require('./element.input.js'), + description: 'The time when this communication was sent.', + }, + sent: { + type: DateTimeScalar, + description: 'The time when this communication was sent.', + }, + _received: { + type: require('./element.input.js'), + description: + 'The time when this communication arrived at the destination.', + }, + received: { + type: DateTimeScalar, + description: + 'The time when this communication arrived at the destination.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'The entity (e.g. person, organization, clinical information system, care team or device) which was the target of the communication. If receipts need to be tracked by an individual, a separate resource instance will need to be created for each recipient. Multiple recipient communications are intended where either receipts are not tracked (e.g. a mass mail-out) or a receipt is captured in aggregate (all emails confirmed received by a particular time).', + }, + sender: { + type: GraphQLString, + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason or justification for the communication.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies this communication.', + }, + payload: { + type: new GraphQLList(require('./communicationpayload.input.js')), + description: + 'Text, attachment(s), or resource(s) that was communicated to the recipient.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Additional notes or commentary about the communication by the sender, receiver or other interested parties.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/communicationpayload.input.js b/src/resources/4_0_0/inputs/communicationpayload.input.js new file mode 100644 index 00000000..58116877 --- /dev/null +++ b/src/resources/4_0_0/inputs/communicationpayload.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Communicationpayload Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Communicationpayload_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _contentString: { + type: require('./element.input.js'), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/communicationrequest.input.js b/src/resources/4_0_0/inputs/communicationrequest.input.js new file mode 100644 index 00000000..2390797a --- /dev/null +++ b/src/resources/4_0_0/inputs/communicationrequest.input.js @@ -0,0 +1,221 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CommunicationRequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CommunicationRequest_Input', + description: + 'A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CommunicationRequest_Enum_input', + values: { CommunicationRequest: { value: 'CommunicationRequest' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan or proposal that is fulfilled in whole or in part by this request.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the proposal or order.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the proposal or order.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + 'Captures the reason for the current state of the CommunicationRequest.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + priority: { + type: CodeScalar, + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + _doNotPerform: { + type: require('./element.input.js'), + description: + 'If true indicates that the CommunicationRequest is asking for the specified action to *not* occur.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'If true indicates that the CommunicationRequest is asking for the specified action to *not* occur.', + }, + medium: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + subject: { + type: GraphQLString, + description: + 'The patient or group that is the focus of this communication request.', + }, + about: { + type: new GraphQLList(GraphQLString), + description: + 'Other resources that pertain to this communication request and to which this communication request should be associated.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this CommunicationRequest was created or to which the creation of this record is tightly associated.', + }, + payload: { + type: new GraphQLList(require('./communicationrequestpayload.input.js')), + description: + 'Text, attachment(s), or resource(s) to be communicated to the recipient.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'The time when this communication is to occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The time when this communication is to occur.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'The time when this communication is to occur.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: + 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', + }, + requester: { + type: GraphQLString, + description: + 'The device, individual, or organization who initiated the request and has responsibility for its activation.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.', + }, + sender: { + type: GraphQLString, + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Describes why the request is being made in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies this request.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the request by the requester, sender, recipient, subject or other participants.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/communicationrequestpayload.input.js b/src/resources/4_0_0/inputs/communicationrequestpayload.input.js new file mode 100644 index 00000000..a4ce819a --- /dev/null +++ b/src/resources/4_0_0/inputs/communicationrequestpayload.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CommunicationRequestpayload Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CommunicationRequestpayload_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _contentString: { + type: require('./element.input.js'), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/compartmentdefinition.input.js b/src/resources/4_0_0/inputs/compartmentdefinition.input.js new file mode 100644 index 00000000..e43cf2aa --- /dev/null +++ b/src/resources/4_0_0/inputs/compartmentdefinition.input.js @@ -0,0 +1,209 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CompartmentDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CompartmentDefinition_Input', + description: + 'A compartment definition that defines how resources are accessed on a server.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CompartmentDefinition_Enum_input', + values: { CompartmentDefinition: { value: 'CompartmentDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this compartment definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this compartment definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the compartment definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the compartment definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the compartment definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the compartment definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this compartment definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this compartment definition is needed and why it has been designed as it has.', + }, + _code: { + type: require('./element.input.js'), + description: 'Which compartment this definition describes.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Which compartment this definition describes.', + }, + _search: { + type: require('./element.input.js'), + description: 'Whether the search syntax is supported,.', + }, + search: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether the search syntax is supported,.', + }, + resource: { + type: new GraphQLList( + require('./compartmentdefinitionresource.input.js'), + ), + description: + 'Information about how a resource is related to the compartment.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/compartmentdefinitionresource.input.js b/src/resources/4_0_0/inputs/compartmentdefinitionresource.input.js new file mode 100644 index 00000000..9a9afc47 --- /dev/null +++ b/src/resources/4_0_0/inputs/compartmentdefinitionresource.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CompartmentDefinitionresource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CompartmentDefinitionresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: 'The name of a resource supported by the server.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of a resource supported by the server.', + }, + _param: { + type: require('./element.input.js'), + description: + 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', + }, + param: { + type: new GraphQLList(GraphQLString), + description: + 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Additional documentation about the resource and compartment.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional documentation about the resource and compartment.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/composition.input.js b/src/resources/4_0_0/inputs/composition.input.js new file mode 100644 index 00000000..15221b9b --- /dev/null +++ b/src/resources/4_0_0/inputs/composition.input.js @@ -0,0 +1,177 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Composition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Composition_Input', + description: + 'A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Composition_Enum_input', + values: { Composition: { value: 'Composition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', + }, + subject: { + type: GraphQLString, + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + }, + encounter: { + type: GraphQLString, + description: + 'Describes the clinical encounter or type of care this documentation is associated with.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + author: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + }, + _title: { + type: require('./element.input.js'), + description: 'Official human-readable label for the composition.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: 'Official human-readable label for the composition.', + }, + _confidentiality: { + type: require('./element.input.js'), + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + confidentiality: { + type: CodeScalar, + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + attester: { + type: new GraphQLList(require('./compositionattester.input.js')), + description: + 'A participant who has attested to the accuracy of the composition/document.', + }, + custodian: { + type: GraphQLString, + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', + }, + relatesTo: { + type: new GraphQLList(require('./compositionrelatesto.input.js')), + description: + 'Relationships that this composition has with other compositions or documents that already exist.', + }, + event: { + type: new GraphQLList(require('./compositionevent.input.js')), + description: + 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', + }, + section: { + type: new GraphQLList(require('./compositionsection.input.js')), + description: 'The root of the sections that make up the composition.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/compositionattester.input.js b/src/resources/4_0_0/inputs/compositionattester.input.js new file mode 100644 index 00000000..5c084439 --- /dev/null +++ b/src/resources/4_0_0/inputs/compositionattester.input.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Compositionattester Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Compositionattester_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.input.js'), + description: 'The type of attestation the authenticator offers.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of attestation the authenticator offers.', + }, + _time: { + type: require('./element.input.js'), + description: 'When the composition was attested by the party.', + }, + time: { + type: DateTimeScalar, + description: 'When the composition was attested by the party.', + }, + party: { + type: GraphQLString, + description: 'Who attested the composition in the specified way.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/compositionevent.input.js b/src/resources/4_0_0/inputs/compositionevent.input.js new file mode 100644 index 00000000..6ab5c2f3 --- /dev/null +++ b/src/resources/4_0_0/inputs/compositionevent.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Compositionevent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Compositionevent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', + }, + detail: { + type: new GraphQLList(GraphQLString), + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/compositionrelatesto.input.js b/src/resources/4_0_0/inputs/compositionrelatesto.input.js new file mode 100644 index 00000000..418d831b --- /dev/null +++ b/src/resources/4_0_0/inputs/compositionrelatesto.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CompositionrelatesTo Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CompositionrelatesTo_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'The type of relationship that this composition has with anther composition or document.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this composition has with anther composition or document.', + }, + targetIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: 'The target composition/document of this relationship.', + }, + targetReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The target composition/document of this relationship.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/compositionsection.input.js b/src/resources/4_0_0/inputs/compositionsection.input.js new file mode 100644 index 00000000..00eac54e --- /dev/null +++ b/src/resources/4_0_0/inputs/compositionsection.input.js @@ -0,0 +1,92 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Compositionsection Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Compositionsection_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _title: { + type: require('./element.input.js'), + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + title: { + type: GraphQLString, + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies who is responsible for the information in this section, not necessarily who typed it in.', + }, + focus: { + type: GraphQLString, + description: + 'The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).', + }, + text: { + type: require('./narrative.input.js'), + description: + "A human-readable narrative that contains the attested content of the section, 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.", + }, + _mode: { + type: require('./element.input.js'), + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + mode: { + type: CodeScalar, + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + orderedBy: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies the order applied to the items in the section entries.', + }, + entry: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + }, + emptyReason: { + type: require('./codeableconcept.input.js'), + description: + 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/conceptmap.input.js b/src/resources/4_0_0/inputs/conceptmap.input.js new file mode 100644 index 00000000..fb326ab9 --- /dev/null +++ b/src/resources/4_0_0/inputs/conceptmap.input.js @@ -0,0 +1,262 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ConceptMap Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ConceptMap_Input', + description: + 'A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ConceptMap_Enum_input', + values: { ConceptMap: { value: 'ConceptMap' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the concept map.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the concept map.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this concept map. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this concept map. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the concept map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the concept map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the concept map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the concept map.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the concept map from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the concept map from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate concept map instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the concept map is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this concept map is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this concept map is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', + }, + _sourceUri: { + type: require('./element.input.js'), + description: + 'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.', + }, + sourceUri: { + type: UriScalar, + description: + 'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.', + }, + _sourceCanonical: { + type: require('./element.input.js'), + description: + 'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.', + }, + sourceCanonical: { + type: CanonicalScalar, + description: + 'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.', + }, + _targetUri: { + type: require('./element.input.js'), + description: + 'The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetUri: { + type: UriScalar, + description: + 'The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + _targetCanonical: { + type: require('./element.input.js'), + description: + 'The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetCanonical: { + type: CanonicalScalar, + description: + 'The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + group: { + type: new GraphQLList(require('./conceptmapgroup.input.js')), + description: + 'A group of mappings that all have the same source and target system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/conceptmapgroup.input.js b/src/resources/4_0_0/inputs/conceptmapgroup.input.js new file mode 100644 index 00000000..800a19eb --- /dev/null +++ b/src/resources/4_0_0/inputs/conceptmapgroup.input.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroup Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ConceptMapgroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _source: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the source system where the concepts to be mapped are defined.', + }, + source: { + type: UriScalar, + description: + 'An absolute URI that identifies the source system where the concepts to be mapped are defined.', + }, + _sourceVersion: { + type: require('./element.input.js'), + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + sourceVersion: { + type: GraphQLString, + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + _target: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the target system that the concepts will be mapped to.', + }, + target: { + type: UriScalar, + description: + 'An absolute URI that identifies the target system that the concepts will be mapped to.', + }, + _targetVersion: { + type: require('./element.input.js'), + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + targetVersion: { + type: GraphQLString, + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./conceptmapgroupelement.input.js')), + ), + description: + 'Mappings for an individual concept in the source to one or more concepts in the target.', + }, + unmapped: { + type: require('./conceptmapgroupunmapped.input.js'), + description: + "What to do when there is no mapping for the source concept. 'Unmapped' does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/conceptmapgroupelement.input.js b/src/resources/4_0_0/inputs/conceptmapgroupelement.input.js new file mode 100644 index 00000000..ffd5e76c --- /dev/null +++ b/src/resources/4_0_0/inputs/conceptmapgroupelement.input.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroupelement Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ConceptMapgroupelement_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: 'Identity (code or path) or the element/item being mapped.', + }, + code: { + type: CodeScalar, + description: 'Identity (code or path) or the element/item being mapped.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + target: { + type: new GraphQLList(require('./conceptmapgroupelementtarget.input.js')), + description: + 'A concept from the target value set that this concept maps to.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/conceptmapgroupelementtarget.input.js b/src/resources/4_0_0/inputs/conceptmapgroupelementtarget.input.js new file mode 100644 index 00000000..625e6ab7 --- /dev/null +++ b/src/resources/4_0_0/inputs/conceptmapgroupelementtarget.input.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroupelementtarget Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ConceptMapgroupelementtarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + code: { + type: CodeScalar, + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + _equivalence: { + type: require('./element.input.js'), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + equivalence: { + type: new GraphQLNonNull(CodeScalar), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + _comment: { + type: require('./element.input.js'), + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + comment: { + type: GraphQLString, + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + dependsOn: { + type: new GraphQLList( + require('./conceptmapgroupelementtargetdependson.input.js'), + ), + description: + 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/conceptmapgroupelementtargetdependson.input.js b/src/resources/4_0_0/inputs/conceptmapgroupelementtargetdependson.input.js new file mode 100644 index 00000000..150c5f4f --- /dev/null +++ b/src/resources/4_0_0/inputs/conceptmapgroupelementtargetdependson.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroupelementtargetdependsOn Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ConceptMapgroupelementtargetdependsOn_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _property: { + type: require('./element.input.js'), + description: + 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property.', + }, + property: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property.', + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + system: { + type: CanonicalScalar, + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + _value: { + type: require('./element.input.js'), + description: + 'Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/conceptmapgroupunmapped.input.js b/src/resources/4_0_0/inputs/conceptmapgroupunmapped.input.js new file mode 100644 index 00000000..dc965b82 --- /dev/null +++ b/src/resources/4_0_0/inputs/conceptmapgroupunmapped.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroupunmapped Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ConceptMapgroupunmapped_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.input.js'), + description: + 'Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', + }, + _code: { + type: require('./element.input.js'), + description: + "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", + }, + code: { + type: CodeScalar, + description: + "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", + }, + _display: { + type: require('./element.input.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + _url: { + type: require('./element.input.js'), + description: + 'The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.', + }, + url: { + type: CanonicalScalar, + description: + 'The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/condition.input.js b/src/resources/4_0_0/inputs/condition.input.js new file mode 100644 index 00000000..8ba64847 --- /dev/null +++ b/src/resources/4_0_0/inputs/condition.input.js @@ -0,0 +1,231 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Condition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Condition_Input', + description: + 'A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Condition_Enum_input', + values: { Condition: { value: 'Condition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + clinicalStatus: { + type: require('./codeableconcept.input.js'), + description: 'The clinical status of the condition.', + }, + verificationStatus: { + type: require('./codeableconcept.input.js'), + description: + 'The verification status to support the clinical status of the condition.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A category assigned to the condition.', + }, + severity: { + type: require('./codeableconcept.input.js'), + description: + 'A subjective assessment of the severity of the condition as evaluated by the clinician.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'Identification of the condition, problem or diagnosis.', + }, + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The anatomical location where this condition manifests itself.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Indicates the patient or group who the condition record is associated with.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this Condition was created or to which the creation of this record is tightly associated.', + }, + _onsetDateTime: { + type: require('./element.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetAge: { + type: require('./age.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetPeriod: { + type: require('./period.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetRange: { + type: require('./range.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _onsetString: { + type: require('./element.input.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _abatementDateTime: { + type: require('./element.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementDateTime: { + type: DateTimeScalar, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementAge: { + type: require('./age.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementPeriod: { + type: require('./period.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementRange: { + type: require('./range.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementString: { + type: require('./element.input.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementString: { + type: GraphQLString, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _recordedDate: { + type: require('./element.input.js'), + description: + 'The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.', + }, + recordedDate: { + type: DateTimeScalar, + description: + 'The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.', + }, + recorder: { + type: GraphQLString, + description: + 'Individual who recorded the record and takes responsibility for its content.', + }, + asserter: { + type: GraphQLString, + description: 'Individual who is making the condition statement.', + }, + stage: { + type: new GraphQLList(require('./conditionstage.input.js')), + description: + 'Clinical stage or grade of a condition. May include formal severity assessments.', + }, + evidence: { + type: new GraphQLList(require('./conditionevidence.input.js')), + description: + "Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition.", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/conditionevidence.input.js b/src/resources/4_0_0/inputs/conditionevidence.input.js new file mode 100644 index 00000000..41886311 --- /dev/null +++ b/src/resources/4_0_0/inputs/conditionevidence.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Conditionevidence Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Conditionevidence_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A manifestation or symptom that led to the recording of this condition.', + }, + detail: { + type: new GraphQLList(GraphQLString), + description: + 'Links to other relevant information, including pathology reports.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/conditionstage.input.js b/src/resources/4_0_0/inputs/conditionstage.input.js new file mode 100644 index 00000000..5c462bb3 --- /dev/null +++ b/src/resources/4_0_0/inputs/conditionstage.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Conditionstage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Conditionstage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + summary: { + type: require('./codeableconcept.input.js'), + description: + "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", + }, + assessment: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of staging, such as pathological or clinical staging.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/consent.input.js b/src/resources/4_0_0/inputs/consent.input.js new file mode 100644 index 00000000..8cfc4d55 --- /dev/null +++ b/src/resources/4_0_0/inputs/consent.input.js @@ -0,0 +1,162 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Consent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Consent_Input', + description: + 'A record of a healthcare consumer’s choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Consent_Enum_input', + values: { Consent: { value: 'Consent' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Unique identifier for this copy of the Consent Statement.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current state of this consent.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this consent.', + }, + scope: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A selector of the type of consent being presented: ADR, Privacy, Treatment, Research. This list is now extensible.', + }, + category: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.input.js')), + ), + description: + 'A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.', + }, + patient: { + type: GraphQLString, + description: + 'The patient/healthcare consumer to whom this consent applies.', + }, + _dateTime: { + type: require('./element.input.js'), + description: 'When this Consent was issued / created / indexed.', + }, + dateTime: { + type: DateTimeScalar, + description: 'When this Consent was issued / created / indexed.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: + 'Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.', + }, + organization: { + type: new GraphQLList(GraphQLString), + description: + 'The organization that manages the consent, and the framework within which it is executed.', + }, + sourceAttachment: { + type: require('./attachment.input.js'), + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + sourceReference: { + type: GraphQLString, + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + policy: { + type: new GraphQLList(require('./consentpolicy.input.js')), + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + policyRule: { + type: require('./codeableconcept.input.js'), + description: + 'A reference to the specific base computable regulation or policy.', + }, + verification: { + type: new GraphQLList(require('./consentverification.input.js')), + description: + 'Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.', + }, + provision: { + type: require('./consentprovision.input.js'), + description: + 'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/consentpolicy.input.js b/src/resources/4_0_0/inputs/consentpolicy.input.js new file mode 100644 index 00000000..99819d3c --- /dev/null +++ b/src/resources/4_0_0/inputs/consentpolicy.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Consentpolicy Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Consentpolicy_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _authority: { + type: require('./element.input.js'), + description: + 'Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.', + }, + authority: { + type: UriScalar, + description: + 'Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + uri: { + type: UriScalar, + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/consentprovision.input.js b/src/resources/4_0_0/inputs/consentprovision.input.js new file mode 100644 index 00000000..9342baa8 --- /dev/null +++ b/src/resources/4_0_0/inputs/consentprovision.input.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Consentprovision Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Consentprovision_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: + 'Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.', + }, + type: { + type: CodeScalar, + description: + 'Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.', + }, + period: { + type: require('./period.input.js'), + description: 'The timeframe in this rule is valid.', + }, + actor: { + type: new GraphQLList(require('./consentprovisionactor.input.js')), + description: + "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + action: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Actions controlled by this Rule.', + }, + securityLabel: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.', + }, + purpose: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.', + }, + class: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'If this code is found in an instance, then the rule applies.', + }, + dataPeriod: { + type: require('./period.input.js'), + description: + 'Clinical or Operational Relevant period of time that bounds the data controlled by this rule.', + }, + data: { + type: new GraphQLList(require('./consentprovisiondata.input.js')), + description: + 'The resources controlled by this rule if specific resources are referenced.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/consentprovisionactor.input.js b/src/resources/4_0_0/inputs/consentprovisionactor.input.js new file mode 100644 index 00000000..f59f7f0a --- /dev/null +++ b/src/resources/4_0_0/inputs/consentprovisionactor.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Consentprovisionactor Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Consentprovisionactor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + role: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'How the individual is involved in the resources content that is described in the exception.', + }, + reference: { + type: new GraphQLNonNull(GraphQLString), + description: + "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/consentprovisiondata.input.js b/src/resources/4_0_0/inputs/consentprovisiondata.input.js new file mode 100644 index 00000000..9c99e9b8 --- /dev/null +++ b/src/resources/4_0_0/inputs/consentprovisiondata.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Consentprovisiondata Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Consentprovisiondata_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _meaning: { + type: require('./element.input.js'), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + meaning: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + reference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/consentverification.input.js b/src/resources/4_0_0/inputs/consentverification.input.js new file mode 100644 index 00000000..cffd66e3 --- /dev/null +++ b/src/resources/4_0_0/inputs/consentverification.input.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Consentverification Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Consentverification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _verified: { + type: require('./element.input.js'), + description: 'Has the instruction been verified.', + }, + verified: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Has the instruction been verified.', + }, + verifiedWith: { + type: GraphQLString, + description: + 'Who verified the instruction (Patient, Relative or other Authorized Person).', + }, + _verificationDate: { + type: require('./element.input.js'), + description: 'Date verification was collected.', + }, + verificationDate: { + type: DateTimeScalar, + description: 'Date verification was collected.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contactdetail.input.js b/src/resources/4_0_0/inputs/contactdetail.input.js new file mode 100644 index 00000000..356837fd --- /dev/null +++ b/src/resources/4_0_0/inputs/contactdetail.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ContactDetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ContactDetail_Input', + description: + 'Base StructureDefinition for ContactDetail Type: Specifies contact information for a person or organization.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of an individual to contact.', + }, + name: { + type: GraphQLString, + description: 'The name of an individual to contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'The contact details for the individual (if a name was provided) or the organization.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contactpoint.input.js b/src/resources/4_0_0/inputs/contactpoint.input.js new file mode 100644 index 00000000..8ed230f4 --- /dev/null +++ b/src/resources/4_0_0/inputs/contactpoint.input.js @@ -0,0 +1,76 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ContactPoint Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ContactPoint_Input', + description: + 'Base StructureDefinition for ContactPoint Type: Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + system: { + type: CodeScalar, + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + value: { + type: GraphQLString, + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + _use: { + type: require('./element.input.js'), + description: 'Identifies the purpose for the contact point.', + }, + use: { + type: CodeScalar, + description: 'Identifies the purpose for the contact point.', + }, + _rank: { + type: require('./element.input.js'), + description: + 'Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.', + }, + rank: { + type: PositiveIntScalar, + description: + 'Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period when the contact point was/is in use.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contract.input.js b/src/resources/4_0_0/inputs/contract.input.js new file mode 100644 index 00000000..499e451e --- /dev/null +++ b/src/resources/4_0_0/inputs/contract.input.js @@ -0,0 +1,301 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Contract Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contract_Input', + description: + 'Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Contract_Enum_input', + values: { Contract: { value: 'Contract' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Unique identifier for this Contract or a derivative that references a Source Contract.', + }, + _url: { + type: require('./element.input.js'), + description: + 'Canonical identifier for this contract, represented as a URI (globally unique).', + }, + url: { + type: UriScalar, + description: + 'Canonical identifier for this contract, represented as a URI (globally unique).', + }, + _version: { + type: require('./element.input.js'), + description: + 'An edition identifier used for business purposes to label business significant variants.', + }, + version: { + type: GraphQLString, + description: + 'An edition identifier used for business purposes to label business significant variants.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + legalState: { + type: require('./codeableconcept.input.js'), + description: + 'Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.', + }, + instantiatesCanonical: { + type: GraphQLString, + description: + 'The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.', + }, + instantiatesUri: { + type: UriScalar, + description: + 'The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.', + }, + contentDerivative: { + type: require('./codeableconcept.input.js'), + description: + 'The minimal content derived from the basal information source at a specific stage in its lifecycle.', + }, + _issued: { + type: require('./element.input.js'), + description: 'When this Contract was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract was issued.', + }, + applies: { + type: require('./period.input.js'), + description: + 'Relevant time or time-period when this Contract is applicable.', + }, + expirationType: { + type: require('./codeableconcept.input.js'), + description: + 'Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.', + }, + subject: { + type: new GraphQLList(GraphQLString), + description: + 'The target entity impacted by or of interest to parties to the agreement.', + }, + authority: { + type: new GraphQLList(GraphQLString), + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + }, + domain: { + type: new GraphQLList(GraphQLString), + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + }, + site: { + type: new GraphQLList(GraphQLString), + description: + 'Sites in which the contract is complied with, exercised, or in force.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.', + }, + author: { + type: GraphQLString, + description: + 'The individual or organization that authored the Contract definition, derivative, or instance in any legal state.', + }, + scope: { + type: require('./codeableconcept.input.js'), + description: + 'A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.', + }, + topicCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.', + }, + topicReference: { + type: GraphQLString, + description: + 'Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + "A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract.", + }, + subType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope.", + }, + contentDefinition: { + type: require('./contractcontentdefinition.input.js'), + description: + 'Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.', + }, + term: { + type: new GraphQLList(require('./contractterm.input.js')), + description: + 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: + 'Information that may be needed by/relevant to the performer in their execution of this term action.', + }, + relevantHistory: { + type: new GraphQLList(GraphQLString), + description: + 'Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.', + }, + signer: { + type: new GraphQLList(require('./contractsigner.input.js')), + description: + 'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.', + }, + friendly: { + type: new GraphQLList(require('./contractfriendly.input.js')), + description: + "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", + }, + legal: { + type: new GraphQLList(require('./contractlegal.input.js')), + description: + 'List of Legal expressions or representations of this Contract.', + }, + rule: { + type: new GraphQLList(require('./contractrule.input.js')), + description: + 'List of Computable Policy Rule Language Representations of this Contract.', + }, + legallyBindingAttachment: { + type: require('./attachment.input.js'), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + legallyBindingReference: { + type: GraphQLString, + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contractcontentdefinition.input.js b/src/resources/4_0_0/inputs/contractcontentdefinition.input.js new file mode 100644 index 00000000..d07a6078 --- /dev/null +++ b/src/resources/4_0_0/inputs/contractcontentdefinition.input.js @@ -0,0 +1,81 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ContractcontentDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ContractcontentDefinition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.', + }, + subType: { + type: require('./codeableconcept.input.js'), + description: 'Detailed Precusory content type.', + }, + publisher: { + type: GraphQLString, + description: + 'The individual or organization that published the Contract precursor content.', + }, + _publicationDate: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.', + }, + publicationDate: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.', + }, + _publicationStatus: { + type: require('./element.input.js'), + description: 'draft | active | retired | unknown.', + }, + publicationStatus: { + type: new GraphQLNonNull(CodeScalar), + description: 'draft | active | retired | unknown.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contractfriendly.input.js b/src/resources/4_0_0/inputs/contractfriendly.input.js new file mode 100644 index 00000000..d4e66f4f --- /dev/null +++ b/src/resources/4_0_0/inputs/contractfriendly.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contractfriendly Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contractfriendly_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contractlegal.input.js b/src/resources/4_0_0/inputs/contractlegal.input.js new file mode 100644 index 00000000..2dd7b7c9 --- /dev/null +++ b/src/resources/4_0_0/inputs/contractlegal.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contractlegal Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contractlegal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: 'Contract legal text in human renderable form.', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Contract legal text in human renderable form.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contractrule.input.js b/src/resources/4_0_0/inputs/contractrule.input.js new file mode 100644 index 00000000..aa17fd87 --- /dev/null +++ b/src/resources/4_0_0/inputs/contractrule.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contractrule Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contractrule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + contentReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contractsigner.input.js b/src/resources/4_0_0/inputs/contractsigner.input.js new file mode 100644 index 00000000..f2f2e904 --- /dev/null +++ b/src/resources/4_0_0/inputs/contractsigner.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contractsigner Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contractsigner_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'Role of this Contract signer, e.g. notary, grantee.', + }, + party: { + type: new GraphQLNonNull(GraphQLString), + description: 'Party which is a signator to this Contract.', + }, + signature: { + type: new GraphQLList( + new GraphQLNonNull(require('./signature.input.js')), + ), + description: + 'Legally binding Contract DSIG signature contents in Base64.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contractterm.input.js b/src/resources/4_0_0/inputs/contractterm.input.js new file mode 100644 index 00000000..111ca299 --- /dev/null +++ b/src/resources/4_0_0/inputs/contractterm.input.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Contractterm Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contractterm_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Unique identifier for this particular Contract Provision.', + }, + _issued: { + type: require('./element.input.js'), + description: 'When this Contract Provision was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract Provision was issued.', + }, + applies: { + type: require('./period.input.js'), + description: + 'Relevant time or time-period when this Contract Provision is applicable.', + }, + topicCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'The entity that the term applies to.', + }, + topicReference: { + type: GraphQLString, + description: 'The entity that the term applies to.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.', + }, + subType: { + type: require('./codeableconcept.input.js'), + description: + 'A specialized legal clause or condition based on overarching contract type.', + }, + _text: { + type: require('./element.input.js'), + description: 'Statement of a provision in a policy or a contract.', + }, + text: { + type: GraphQLString, + description: 'Statement of a provision in a policy or a contract.', + }, + securityLabel: { + type: new GraphQLList(require('./contracttermsecuritylabel.input.js')), + description: + 'Security labels that protect the handling of information about the term and its elements, which may be specifically identified..', + }, + offer: { + type: new GraphQLNonNull(require('./contracttermoffer.input.js')), + description: + 'The matter of concern in the context of this provision of the agrement.', + }, + asset: { + type: new GraphQLList(require('./contracttermasset.input.js')), + description: 'Contract Term Asset List.', + }, + action: { + type: new GraphQLList(require('./contracttermaction.input.js')), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermaction.input.js b/src/resources/4_0_0/inputs/contracttermaction.input.js new file mode 100644 index 00000000..574f051b --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermaction.input.js @@ -0,0 +1,190 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Contracttermaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contracttermaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _doNotPerform: { + type: require('./element.input.js'), + description: 'True if the term prohibits the action.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: 'True if the term prohibits the action.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.', + }, + subject: { + type: new GraphQLList(require('./contracttermactionsubject.input.js')), + description: 'Entity of the action.', + }, + intent: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Reason or purpose for the action stipulated by this Contract Provision.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.', + }, + linkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.', + }, + status: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Current state of the term action.', + }, + context: { + type: GraphQLString, + description: + 'Encounter or Episode with primary association to specified term activity.', + }, + _contextLinkId: { + type: require('./element.input.js'), + description: + 'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.', + }, + contextLinkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'When action happens.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'When action happens.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'When action happens.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: 'When action happens.', + }, + requester: { + type: new GraphQLList(GraphQLString), + description: + 'Who or what initiated the action and has responsibility for its activation.', + }, + _requesterLinkId: { + type: require('./element.input.js'), + description: + 'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.', + }, + requesterLinkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.', + }, + performerType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of individual that is desired or required to perform or not perform the action.', + }, + performerRole: { + type: require('./codeableconcept.input.js'), + description: + 'The type of role or competency of an individual desired or required to perform or not perform the action.', + }, + performer: { + type: GraphQLString, + description: + 'Indicates who or what is being asked to perform (or not perform) the ction.', + }, + _performerLinkId: { + type: require('./element.input.js'), + description: + 'Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.', + }, + performerLinkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies permitting or not permitting this action.', + }, + _reason: { + type: require('./element.input.js'), + description: + 'Describes why the action is to be performed or not performed in textual form.', + }, + reason: { + type: new GraphQLList(GraphQLString), + description: + 'Describes why the action is to be performed or not performed in textual form.', + }, + _reasonLinkId: { + type: require('./element.input.js'), + description: + 'Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.', + }, + reasonLinkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the term action made by the requester, performer, subject or other participants.', + }, + _securityLabelNumber: { + type: require('./element.input.js'), + description: 'Security labels that protects the action.', + }, + securityLabelNumber: { + type: new GraphQLList(UnsignedIntScalar), + description: 'Security labels that protects the action.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermactionsubject.input.js b/src/resources/4_0_0/inputs/contracttermactionsubject.input.js new file mode 100644 index 00000000..dfed89a7 --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermactionsubject.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contracttermactionsubject Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contracttermactionsubject_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'The entity the action is performed or not performed on or for.', + }, + role: { + type: require('./codeableconcept.input.js'), + description: 'Role type of agent assigned roles in this Contract.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermasset.input.js b/src/resources/4_0_0/inputs/contracttermasset.input.js new file mode 100644 index 00000000..fdc06b46 --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermasset.input.js @@ -0,0 +1,116 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Contracttermasset Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contracttermasset_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + scope: { + type: require('./codeableconcept.input.js'), + description: 'Differentiates the kind of the asset .', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Target entity type about which the term may be concerned.', + }, + typeReference: { + type: new GraphQLList(GraphQLString), + description: 'Associated entities.', + }, + subtype: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'May be a subtype or part of an offered asset.', + }, + relationship: { + type: require('./coding.input.js'), + description: + 'Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree.', + }, + context: { + type: new GraphQLList(require('./contracttermassetcontext.input.js')), + description: 'Circumstance of the asset.', + }, + _condition: { + type: require('./element.input.js'), + description: + 'Description of the quality and completeness of the asset that imay be a factor in its valuation.', + }, + condition: { + type: GraphQLString, + description: + 'Description of the quality and completeness of the asset that imay be a factor in its valuation.', + }, + periodType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Type of Asset availability for use or ownership.', + }, + period: { + type: new GraphQLList(require('./period.input.js')), + description: 'Asset relevant contractual time period.', + }, + usePeriod: { + type: new GraphQLList(require('./period.input.js')), + description: 'Time period of asset use.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.', + }, + text: { + type: GraphQLString, + description: + 'Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.', + }, + linkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.', + }, + _securityLabelNumber: { + type: require('./element.input.js'), + description: 'Security labels that protects the asset.', + }, + securityLabelNumber: { + type: new GraphQLList(UnsignedIntScalar), + description: 'Security labels that protects the asset.', + }, + valuedItem: { + type: new GraphQLList(require('./contracttermassetvalueditem.input.js')), + description: 'Contract Valued Item List.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermassetcontext.input.js b/src/resources/4_0_0/inputs/contracttermassetcontext.input.js new file mode 100644 index 00000000..a6a0a2c4 --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermassetcontext.input.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contracttermassetcontext Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contracttermassetcontext_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: GraphQLString, + description: + 'Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.', + }, + _text: { + type: require('./element.input.js'), + description: 'Context description.', + }, + text: { + type: GraphQLString, + description: 'Context description.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermassetvalueditem.input.js b/src/resources/4_0_0/inputs/contracttermassetvalueditem.input.js new file mode 100644 index 00000000..448956fd --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermassetvalueditem.input.js @@ -0,0 +1,139 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ContracttermassetvaluedItem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ContracttermassetvaluedItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + entityCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + entityReference: { + type: GraphQLString, + description: 'Specific type of Contract Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Identifies a Contract Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.input.js'), + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', + }, + unitPrice: { + type: require('./money.input.js'), + description: 'A Contract Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.input.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./money.input.js'), + description: + 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + _payment: { + type: require('./element.input.js'), + description: 'Terms of valuation.', + }, + payment: { + type: GraphQLString, + description: 'Terms of valuation.', + }, + _paymentDate: { + type: require('./element.input.js'), + description: 'When payment is due.', + }, + paymentDate: { + type: DateTimeScalar, + description: 'When payment is due.', + }, + responsible: { + type: GraphQLString, + description: 'Who will make payment.', + }, + recipient: { + type: GraphQLString, + description: 'Who will receive payment.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.', + }, + linkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.', + }, + _securityLabelNumber: { + type: require('./element.input.js'), + description: + 'A set of security labels that define which terms are controlled by this condition.', + }, + securityLabelNumber: { + type: new GraphQLList(UnsignedIntScalar), + description: + 'A set of security labels that define which terms are controlled by this condition.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermoffer.input.js b/src/resources/4_0_0/inputs/contracttermoffer.input.js new file mode 100644 index 00000000..ae839ba4 --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermoffer.input.js @@ -0,0 +1,94 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Contracttermoffer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contracttermoffer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Unique identifier for this particular Contract Provision.', + }, + party: { + type: new GraphQLList(require('./contracttermofferparty.input.js')), + description: 'Offer Recipient.', + }, + topic: { + type: GraphQLString, + description: + 'The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', + }, + decision: { + type: require('./codeableconcept.input.js'), + description: + 'Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.', + }, + decisionMode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'How the decision about a Contract was conveyed.', + }, + answer: { + type: new GraphQLList(require('./contracttermofferanswer.input.js')), + description: 'Response to offer text.', + }, + _text: { + type: require('./element.input.js'), + description: 'Human readable form of this Contract Offer.', + }, + text: { + type: GraphQLString, + description: 'Human readable form of this Contract Offer.', + }, + _linkId: { + type: require('./element.input.js'), + description: + 'The id of the clause or question text of the offer in the referenced questionnaire/response.', + }, + linkId: { + type: new GraphQLList(GraphQLString), + description: + 'The id of the clause or question text of the offer in the referenced questionnaire/response.', + }, + _securityLabelNumber: { + type: require('./element.input.js'), + description: 'Security labels that protects the offer.', + }, + securityLabelNumber: { + type: new GraphQLList(UnsignedIntScalar), + description: 'Security labels that protects the offer.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermofferanswer.input.js b/src/resources/4_0_0/inputs/contracttermofferanswer.input.js new file mode 100644 index 00000000..e74d3477 --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermofferanswer.input.js @@ -0,0 +1,144 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Contracttermofferanswer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contracttermofferanswer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermofferparty.input.js b/src/resources/4_0_0/inputs/contracttermofferparty.input.js new file mode 100644 index 00000000..e2f6fe25 --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermofferparty.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contracttermofferparty Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contracttermofferparty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: 'Participant in the offer.', + }, + role: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'How the party participates in the offer.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contracttermsecuritylabel.input.js b/src/resources/4_0_0/inputs/contracttermsecuritylabel.input.js new file mode 100644 index 00000000..3338750a --- /dev/null +++ b/src/resources/4_0_0/inputs/contracttermsecuritylabel.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ContracttermsecurityLabel Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ContracttermsecurityLabel_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _number: { + type: require('./element.input.js'), + description: + 'Number used to link this term or term element to the applicable Security Label.', + }, + number: { + type: new GraphQLList(UnsignedIntScalar), + description: + 'Number used to link this term or term element to the applicable Security Label.', + }, + classification: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.', + }, + category: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements.', + }, + control: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Security label privacy tag that species the manner in which term and/or term elements are to be protected.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/contributor.input.js b/src/resources/4_0_0/inputs/contributor.input.js new file mode 100644 index 00000000..e33d3895 --- /dev/null +++ b/src/resources/4_0_0/inputs/contributor.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Contributor Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Contributor_Input', + description: + 'Base StructureDefinition for Contributor Type: A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of contributor.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of contributor.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the individual or organization responsible for the contribution.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the individual or organization responsible for the contribution.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the contributor.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/count.input.js b/src/resources/4_0_0/inputs/count.input.js new file mode 100644 index 00000000..b28ec5ac --- /dev/null +++ b/src/resources/4_0_0/inputs/count.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Count Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Count_Input', + description: + 'Base StructureDefinition for Count Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverage.input.js b/src/resources/4_0_0/inputs/coverage.input.js new file mode 100644 index 00000000..57ddcd4f --- /dev/null +++ b/src/resources/4_0_0/inputs/coverage.input.js @@ -0,0 +1,191 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Coverage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Coverage_Input', + description: + 'Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Coverage_Enum_input', + values: { Coverage: { value: 'Coverage' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'A unique identifier assigned to this coverage.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.', + }, + policyHolder: { + type: GraphQLString, + description: "The party who 'owns' the insurance policy.", + }, + subscriber: { + type: GraphQLString, + description: + "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", + }, + _subscriberId: { + type: require('./element.input.js'), + description: 'The insurer assigned ID for the Subscriber.', + }, + subscriberId: { + type: GraphQLString, + description: 'The insurer assigned ID for the Subscriber.', + }, + beneficiary: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party who benefits from the insurance coverage; the patient when products and/or services are provided.', + }, + _dependent: { + type: require('./element.input.js'), + description: 'A unique identifier for a dependent under the coverage.', + }, + dependent: { + type: GraphQLString, + description: 'A unique identifier for a dependent under the coverage.', + }, + relationship: { + type: require('./codeableconcept.input.js'), + description: + 'The relationship of beneficiary (patient) to the subscriber.', + }, + period: { + type: require('./period.input.js'), + description: + "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", + }, + payor: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.', + }, + class: { + type: new GraphQLList(require('./coverageclass.input.js')), + description: 'A suite of underwriter specific classifiers.', + }, + _order: { + type: require('./element.input.js'), + description: + 'The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.', + }, + order: { + type: PositiveIntScalar, + description: + 'The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.', + }, + _network: { + type: require('./element.input.js'), + description: + "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", + }, + network: { + type: GraphQLString, + description: + "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", + }, + costToBeneficiary: { + type: new GraphQLList(require('./coveragecosttobeneficiary.input.js')), + description: + 'A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card.', + }, + _subrogation: { + type: require('./element.input.js'), + description: + "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.", + }, + subrogation: { + type: GraphQLBoolean, + description: + "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.", + }, + contract: { + type: new GraphQLList(GraphQLString), + description: 'The policy(s) which constitute this insurance coverage.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageclass.input.js b/src/resources/4_0_0/inputs/coverageclass.input.js new file mode 100644 index 00000000..9b13ffea --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageclass.input.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Coverageclass Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Coverageclass_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The alphanumeric string value associated with the insurer issued label.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The alphanumeric string value associated with the insurer issued label.', + }, + _name: { + type: require('./element.input.js'), + description: 'A short description for the class.', + }, + name: { + type: GraphQLString, + description: 'A short description for the class.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coveragecosttobeneficiary.input.js b/src/resources/4_0_0/inputs/coveragecosttobeneficiary.input.js new file mode 100644 index 00000000..e4388681 --- /dev/null +++ b/src/resources/4_0_0/inputs/coveragecosttobeneficiary.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoveragecostToBeneficiary Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoveragecostToBeneficiary_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The category of patient centric costs associated with treatment.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'The amount due from the patient for the cost category.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'The amount due from the patient for the cost category.', + }, + exception: { + type: new GraphQLList( + require('./coveragecosttobeneficiaryexception.input.js'), + ), + description: + 'A suite of codes indicating exceptions or reductions to patient costs and their effective periods.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coveragecosttobeneficiaryexception.input.js b/src/resources/4_0_0/inputs/coveragecosttobeneficiaryexception.input.js new file mode 100644 index 00000000..f29a3c6d --- /dev/null +++ b/src/resources/4_0_0/inputs/coveragecosttobeneficiaryexception.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoveragecostToBeneficiaryexception Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoveragecostToBeneficiaryexception_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The code for the specific exception.', + }, + period: { + type: require('./period.input.js'), + description: 'The timeframe during when the exception is in force.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityrequest.input.js b/src/resources/4_0_0/inputs/coverageeligibilityrequest.input.js new file mode 100644 index 00000000..1c11f6b5 --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityrequest.input.js @@ -0,0 +1,182 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityRequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityRequest_Input', + description: + 'The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CoverageEligibilityRequest_Enum_input', + values: { + CoverageEligibilityRequest: { value: 'CoverageEligibilityRequest' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A unique identifier assigned to this coverage eligiblity request.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + priority: { + type: require('./codeableconcept.input.js'), + description: + 'When the requestor expects the processor to complete processing.', + }, + _purpose: { + type: require('./element.input.js'), + description: + "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", + }, + purpose: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date when this resource was created.', + }, + enterer: { + type: GraphQLString, + description: 'Person who created the request.', + }, + provider: { + type: GraphQLString, + description: 'The provider which is responsible for the request.', + }, + insurer: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The Insurer who issued the coverage in question and is the recipient of the request.', + }, + facility: { + type: GraphQLString, + description: 'Facility where the services are intended to be provided.', + }, + supportingInfo: { + type: new GraphQLList( + require('./coverageeligibilityrequestsupportinginfo.input.js'), + ), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.', + }, + insurance: { + type: new GraphQLList( + require('./coverageeligibilityrequestinsurance.input.js'), + ), + description: + 'Financial instruments for reimbursement for the health care products and services.', + }, + item: { + type: new GraphQLList( + require('./coverageeligibilityrequestitem.input.js'), + ), + description: + 'Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityrequestinsurance.input.js b/src/resources/4_0_0/inputs/coverageeligibilityrequestinsurance.input.js new file mode 100644 index 00000000..888ad21f --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityrequestinsurance.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoverageEligibilityRequestinsurance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityRequestinsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _focal: { + type: require('./element.input.js'), + description: + 'A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.', + }, + focal: { + type: GraphQLBoolean, + description: + 'A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _businessArrangement: { + type: require('./element.input.js'), + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityrequestitem.input.js b/src/resources/4_0_0/inputs/coverageeligibilityrequestitem.input.js new file mode 100644 index 00000000..dce324c8 --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityrequestitem.input.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityRequestitem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityRequestitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _supportingInfoSequence: { + type: require('./element.input.js'), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product line.', + }, + supportingInfoSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product line.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: require('./codeableconcept.input.js'), + description: + 'This contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the product or service to be rendered to the patient.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'The amount charged to the patient by the provider for a single unit.', + }, + facility: { + type: GraphQLString, + description: 'Facility where the services will be provided.', + }, + diagnosis: { + type: new GraphQLList( + require('./coverageeligibilityrequestitemdiagnosis.input.js'), + ), + description: 'Patient diagnosis for which care is sought.', + }, + detail: { + type: new GraphQLList(GraphQLString), + description: + 'The plan/proposal/order describing the proposed service in detail.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityrequestitemdiagnosis.input.js b/src/resources/4_0_0/inputs/coverageeligibilityrequestitemdiagnosis.input.js new file mode 100644 index 00000000..8e7c0bce --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityrequestitemdiagnosis.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoverageEligibilityRequestitemdiagnosis Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityRequestitemdiagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + diagnosisCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + diagnosisReference: { + type: GraphQLString, + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityrequestsupportinginfo.input.js b/src/resources/4_0_0/inputs/coverageeligibilityrequestsupportinginfo.input.js new file mode 100644 index 00000000..f471b08b --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityrequestsupportinginfo.input.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityRequestsupportingInfo Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityRequestsupportingInfo_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: + 'A number to uniquely identify supporting information entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify supporting information entries.', + }, + information: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + _appliesToAll: { + type: require('./element.input.js'), + description: + 'The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.', + }, + appliesToAll: { + type: GraphQLBoolean, + description: + 'The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityresponse.input.js b/src/resources/4_0_0/inputs/coverageeligibilityresponse.input.js new file mode 100644 index 00000000..48f28fd8 --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityresponse.input.js @@ -0,0 +1,199 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityResponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityResponse_Input', + description: + 'This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CoverageEligibilityResponse_Enum_input', + values: { + CoverageEligibilityResponse: { + value: 'CoverageEligibilityResponse', + }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A unique identifier assigned to this coverage eligiblity request.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + _purpose: { + type: require('./element.input.js'), + description: + "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", + }, + purpose: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + requestor: { + type: GraphQLString, + description: 'The provider which is responsible for the request.', + }, + request: { + type: new GraphQLNonNull(GraphQLString), + description: 'Reference to the original request resource.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'The outcome of the request processing.', + }, + outcome: { + type: new GraphQLNonNull(CodeScalar), + description: 'The outcome of the request processing.', + }, + _disposition: { + type: require('./element.input.js'), + description: + 'A human readable description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: + 'A human readable description of the status of the adjudication.', + }, + insurer: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The Insurer who issued the coverage in question and is the author of the response.', + }, + insurance: { + type: new GraphQLList( + require('./coverageeligibilityresponseinsurance.input.js'), + ), + description: + 'Financial instruments for reimbursement for the health care products and services.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.', + }, + preAuthRef: { + type: GraphQLString, + description: + 'A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.', + }, + form: { + type: require('./codeableconcept.input.js'), + description: 'A code for the form to be used for printing the content.', + }, + error: { + type: new GraphQLList( + require('./coverageeligibilityresponseerror.input.js'), + ), + description: 'Errors encountered during the processing of the request.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityresponseerror.input.js b/src/resources/4_0_0/inputs/coverageeligibilityresponseerror.input.js new file mode 100644 index 00000000..e15b58dc --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityresponseerror.input.js @@ -0,0 +1,42 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoverageEligibilityResponseerror Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityResponseerror_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'An error code,from a specified code system, which details why the eligibility check could not be performed.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityresponseinsurance.input.js b/src/resources/4_0_0/inputs/coverageeligibilityresponseinsurance.input.js new file mode 100644 index 00000000..da2c4f4c --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityresponseinsurance.input.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoverageEligibilityResponseinsurance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityResponseinsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _inforce: { + type: require('./element.input.js'), + description: + 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', + }, + inforce: { + type: GraphQLBoolean, + description: + 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', + }, + benefitPeriod: { + type: require('./period.input.js'), + description: 'The term of the benefits documented in this response.', + }, + item: { + type: new GraphQLList( + require('./coverageeligibilityresponseinsuranceitem.input.js'), + ), + description: + 'Benefits and optionally current balances, and authorization details by category or service.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityresponseinsuranceitem.input.js b/src/resources/4_0_0/inputs/coverageeligibilityresponseinsuranceitem.input.js new file mode 100644 index 00000000..9e3718f9 --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityresponseinsuranceitem.input.js @@ -0,0 +1,130 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityResponseinsuranceitem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityResponseinsuranceitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: require('./codeableconcept.input.js'), + description: + 'This contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is eligible for the provision of the product or service.', + }, + _excluded: { + type: require('./element.input.js'), + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.', + }, + excluded: { + type: GraphQLBoolean, + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.', + }, + _name: { + type: require('./element.input.js'), + description: 'A short name or tag for the benefit.', + }, + name: { + type: GraphQLString, + description: 'A short name or tag for the benefit.', + }, + _description: { + type: require('./element.input.js'), + description: 'A richer description of the benefit or services covered.', + }, + description: { + type: GraphQLString, + description: 'A richer description of the benefit or services covered.', + }, + network: { + type: require('./codeableconcept.input.js'), + description: + 'Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.', + }, + unit: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates if the benefits apply to an individual or to the family.', + }, + term: { + type: require('./codeableconcept.input.js'), + description: + "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", + }, + benefit: { + type: new GraphQLList( + require('./coverageeligibilityresponseinsuranceitembenefit.input.js'), + ), + description: 'Benefits used to date.', + }, + _authorizationRequired: { + type: require('./element.input.js'), + description: + 'A boolean flag indicating whether a preauthorization is required prior to actual service delivery.', + }, + authorizationRequired: { + type: GraphQLBoolean, + description: + 'A boolean flag indicating whether a preauthorization is required prior to actual service delivery.', + }, + authorizationSupporting: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Codes or comments regarding information or actions associated with the preauthorization.', + }, + _authorizationUrl: { + type: require('./element.input.js'), + description: + 'A web location for obtaining requirements or descriptive information regarding the preauthorization.', + }, + authorizationUrl: { + type: UriScalar, + description: + 'A web location for obtaining requirements or descriptive information regarding the preauthorization.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/coverageeligibilityresponseinsuranceitembenefit.input.js b/src/resources/4_0_0/inputs/coverageeligibilityresponseinsuranceitembenefit.input.js new file mode 100644 index 00000000..0e011c8c --- /dev/null +++ b/src/resources/4_0_0/inputs/coverageeligibilityresponseinsuranceitembenefit.input.js @@ -0,0 +1,92 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityResponseinsuranceitembenefit Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'CoverageEligibilityResponseinsuranceitembenefit_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Classification of benefit being provided.', + }, + _allowedUnsignedInt: { + type: require('./element.input.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + _allowedString: { + type: require('./element.input.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedString: { + type: GraphQLString, + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedMoney: { + type: require('./money.input.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + _usedUnsignedInt: { + type: require('./element.input.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The quantity of the benefit which have been consumed to date.', + }, + _usedString: { + type: require('./element.input.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedString: { + type: GraphQLString, + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedMoney: { + type: require('./money.input.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/datarequirement.input.js b/src/resources/4_0_0/inputs/datarequirement.input.js new file mode 100644 index 00000000..0bf43cca --- /dev/null +++ b/src/resources/4_0_0/inputs/datarequirement.input.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary DataRequirement Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DataRequirement_Input', + description: + 'Base StructureDefinition for DataRequirement Type: Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'The profile of the required data, specified as the uri of the profile definition.', + }, + profile: { + type: new GraphQLList(CanonicalScalar), + description: + 'The profile of the required data, specified as the uri of the profile definition.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.', + }, + subjectReference: { + type: GraphQLString, + description: + 'The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.', + }, + _mustSupport: { + type: require('./element.input.js'), + description: + 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. The value of mustSupport SHALL be a FHIRPath resolveable on the type of the DataRequirement. The path SHALL consist only of identifiers, constant indexers, and .resolve() (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + mustSupport: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. The value of mustSupport SHALL be a FHIRPath resolveable on the type of the DataRequirement. The path SHALL consist only of identifiers, constant indexers, and .resolve() (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + codeFilter: { + type: new GraphQLList(require('./element.input.js')), + description: + "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed.", + }, + dateFilter: { + type: new GraphQLList(require('./element.input.js')), + description: + "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed.", + }, + _limit: { + type: require('./element.input.js'), + description: + 'Specifies a maximum number of results that are required (uses the _count search parameter).', + }, + limit: { + type: PositiveIntScalar, + description: + 'Specifies a maximum number of results that are required (uses the _count search parameter).', + }, + sort: { + type: new GraphQLList(require('./element.input.js')), + description: 'Specifies the order of the results to be returned.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/datarequirementcodefilter.input.js b/src/resources/4_0_0/inputs/datarequirementcodefilter.input.js new file mode 100644 index 00000000..51f9011b --- /dev/null +++ b/src/resources/4_0_0/inputs/datarequirementcodefilter.input.js @@ -0,0 +1,67 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary DataRequirementcodeFilter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DataRequirementcodeFilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', + }, + path: { + type: GraphQLString, + description: + 'The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', + }, + _searchParam: { + type: require('./element.input.js'), + description: + 'A token parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type code, Coding, or CodeableConcept.', + }, + searchParam: { + type: GraphQLString, + description: + 'A token parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type code, Coding, or CodeableConcept.', + }, + _valueSet: { + type: require('./element.input.js'), + description: + 'The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + valueSet: { + type: CanonicalScalar, + description: + 'The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/datarequirementdatefilter.input.js b/src/resources/4_0_0/inputs/datarequirementdatefilter.input.js new file mode 100644 index 00000000..ff48084e --- /dev/null +++ b/src/resources/4_0_0/inputs/datarequirementdatefilter.input.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DataRequirementdateFilter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DataRequirementdateFilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing.', + }, + path: { + type: GraphQLString, + description: + 'The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing.', + }, + _searchParam: { + type: require('./element.input.js'), + description: + 'A date parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type date, dateTime, Period, Schedule, or Timing.', + }, + searchParam: { + type: GraphQLString, + description: + 'A date parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type date, dateTime, Period, Schedule, or Timing.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.', + }, + valueDuration: { + type: require('./duration.input.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/datarequirementsort.input.js b/src/resources/4_0_0/inputs/datarequirementsort.input.js new file mode 100644 index 00000000..7aa07906 --- /dev/null +++ b/src/resources/4_0_0/inputs/datarequirementsort.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DataRequirementsort Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DataRequirementsort_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant.', + }, + _direction: { + type: require('./element.input.js'), + description: 'The direction of the sort, ascending or descending.', + }, + direction: { + type: new GraphQLNonNull(CodeScalar), + description: 'The direction of the sort, ascending or descending.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/detectedissue.input.js b/src/resources/4_0_0/inputs/detectedissue.input.js new file mode 100644 index 00000000..4aab23d6 --- /dev/null +++ b/src/resources/4_0_0/inputs/detectedissue.input.js @@ -0,0 +1,170 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DetectedIssue Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DetectedIssue_Input', + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DetectedIssue_Enum_input', + values: { DetectedIssue: { value: 'DetectedIssue' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifier associated with the detected issue record.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the status of the detected issue.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the status of the detected issue.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'Identifies the general type of issue identified.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + severity: { + type: CodeScalar, + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + patient: { + type: GraphQLString, + description: + 'Indicates the patient whose record the detected issue is associated with.', + }, + _identifiedDateTime: { + type: require('./element.input.js'), + description: + 'The date or period when the detected issue was initially identified.', + }, + identifiedDateTime: { + type: DateTimeScalar, + description: + 'The date or period when the detected issue was initially identified.', + }, + identifiedPeriod: { + type: require('./period.input.js'), + description: + 'The date or period when the detected issue was initially identified.', + }, + author: { + type: GraphQLString, + description: + 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', + }, + implicated: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + }, + evidence: { + type: new GraphQLList(require('./detectedissueevidence.input.js')), + description: + 'Supporting evidence or manifestations that provide the basis for identifying the detected issue such as a GuidanceResponse or MeasureReport.', + }, + _detail: { + type: require('./element.input.js'), + description: 'A textual explanation of the detected issue.', + }, + detail: { + type: GraphQLString, + description: 'A textual explanation of the detected issue.', + }, + _reference: { + type: require('./element.input.js'), + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + reference: { + type: UriScalar, + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + mitigation: { + type: new GraphQLList(require('./detectedissuemitigation.input.js')), + description: + 'Indicates an action that has been taken or is committed to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/detectedissueevidence.input.js b/src/resources/4_0_0/inputs/detectedissueevidence.input.js new file mode 100644 index 00000000..8b7743dc --- /dev/null +++ b/src/resources/4_0_0/inputs/detectedissueevidence.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DetectedIssueevidence Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DetectedIssueevidence_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A manifestation that led to the recording of this detected issue.', + }, + detail: { + type: new GraphQLList(GraphQLString), + description: + 'Links to resources that constitute evidence for the detected issue such as a GuidanceResponse or MeasureReport.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/detectedissuemitigation.input.js b/src/resources/4_0_0/inputs/detectedissuemitigation.input.js new file mode 100644 index 00000000..609e515e --- /dev/null +++ b/src/resources/4_0_0/inputs/detectedissuemitigation.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DetectedIssuemitigation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DetectedIssuemitigation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', + }, + _date: { + type: require('./element.input.js'), + description: 'Indicates when the mitigating action was documented.', + }, + date: { + type: DateTimeScalar, + description: 'Indicates when the mitigating action was documented.', + }, + author: { + type: GraphQLString, + description: + 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/device.input.js b/src/resources/4_0_0/inputs/device.input.js new file mode 100644 index 00000000..e0a2f1a6 --- /dev/null +++ b/src/resources/4_0_0/inputs/device.input.js @@ -0,0 +1,247 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Device Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Device_Input', + description: + 'A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Device_Enum_input', + values: { Device: { value: 'Device' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Unique instance identifiers assigned to a device by manufacturers other organizations or owners.', + }, + definition: { + type: GraphQLString, + description: 'The reference to the definition for the device.', + }, + udiCarrier: { + type: new GraphQLList(require('./deviceudicarrier.input.js')), + description: + 'Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.', + }, + _status: { + type: require('./element.input.js'), + description: 'Status of the Device availability.', + }, + status: { + type: CodeScalar, + description: 'Status of the Device availability.', + }, + statusReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason for the dtatus of the Device availability.', + }, + _distinctIdentifier: { + type: require('./element.input.js'), + description: + 'The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.', + }, + distinctIdentifier: { + type: GraphQLString, + description: + 'The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.', + }, + _manufacturer: { + type: require('./element.input.js'), + description: 'A name of the manufacturer.', + }, + manufacturer: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + _manufactureDate: { + type: require('./element.input.js'), + description: 'The date and time when the device was manufactured.', + }, + manufactureDate: { + type: DateTimeScalar, + description: 'The date and time when the device was manufactured.', + }, + _expirationDate: { + type: require('./element.input.js'), + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + expirationDate: { + type: DateTimeScalar, + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + _lotNumber: { + type: require('./element.input.js'), + description: 'Lot number assigned by the manufacturer.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number assigned by the manufacturer.', + }, + _serialNumber: { + type: require('./element.input.js'), + description: + 'The serial number assigned by the organization when the device was manufactured.', + }, + serialNumber: { + type: GraphQLString, + description: + 'The serial number assigned by the organization when the device was manufactured.', + }, + deviceName: { + type: new GraphQLList(require('./devicedevicename.input.js')), + description: + "This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.", + }, + _modelNumber: { + type: require('./element.input.js'), + description: 'The model number for the device.', + }, + modelNumber: { + type: GraphQLString, + description: 'The model number for the device.', + }, + _partNumber: { + type: require('./element.input.js'), + description: 'The part number of the device.', + }, + partNumber: { + type: GraphQLString, + description: 'The part number of the device.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'The kind or type of device.', + }, + specialization: { + type: new GraphQLList(require('./devicespecialization.input.js')), + description: + 'The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.', + }, + version: { + type: new GraphQLList(require('./deviceversion.input.js')), + description: + 'The actual design of the device or software version running on the device.', + }, + property: { + type: new GraphQLList(require('./deviceproperty.input.js')), + description: + 'The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.', + }, + patient: { + type: GraphQLString, + description: 'Patient information, If the device is affixed to a person.', + }, + owner: { + type: GraphQLString, + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for an organization or a particular human that is responsible for the device.', + }, + location: { + type: GraphQLString, + description: 'The place where the device can be found.', + }, + _url: { + type: require('./element.input.js'), + description: + 'A network address on which the device may be contacted directly.', + }, + url: { + type: UriScalar, + description: + 'A network address on which the device may be contacted directly.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Descriptive information, usage information or implantation information that is not captured in an existing element.', + }, + safety: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Provides additional safety characteristics about a medical device. For example devices containing latex.', + }, + parent: { + type: GraphQLString, + description: 'The parent device.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicedefinition.input.js b/src/resources/4_0_0/inputs/devicedefinition.input.js new file mode 100644 index 00000000..b5fea719 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicedefinition.input.js @@ -0,0 +1,214 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DeviceDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceDefinition_Input', + description: + 'The characteristics, operational status and capabilities of a medical-related component of a medical device.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceDefinition_Enum_input', + values: { DeviceDefinition: { value: 'DeviceDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID.', + }, + udiDeviceIdentifier: { + type: new GraphQLList( + require('./devicedefinitionudideviceidentifier.input.js'), + ), + description: + 'Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.', + }, + _manufacturerString: { + type: require('./element.input.js'), + description: 'A name of the manufacturer.', + }, + manufacturerString: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + manufacturerReference: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + deviceName: { + type: new GraphQLList(require('./devicedefinitiondevicename.input.js')), + description: 'A name given to the device to identify it.', + }, + _modelNumber: { + type: require('./element.input.js'), + description: 'The model number for the device.', + }, + modelNumber: { + type: GraphQLString, + description: 'The model number for the device.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'What kind of device or device system this is.', + }, + specialization: { + type: new GraphQLList( + require('./devicedefinitionspecialization.input.js'), + ), + description: + 'The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The available versions of the device, e.g., software versions.', + }, + version: { + type: new GraphQLList(GraphQLString), + description: + 'The available versions of the device, e.g., software versions.', + }, + safety: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Safety characteristics of the device.', + }, + shelfLifeStorage: { + type: new GraphQLList(require('./productshelflife.input.js')), + description: 'Shelf Life and storage information.', + }, + physicalCharacteristics: { + type: require('./prodcharacteristic.input.js'), + description: 'Dimensions, color etc.', + }, + languageCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Language code for the human-readable text strings produced by the device (all supported).', + }, + capability: { + type: new GraphQLList(require('./devicedefinitioncapability.input.js')), + description: 'Device capabilities.', + }, + property: { + type: new GraphQLList(require('./devicedefinitionproperty.input.js')), + description: + 'The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.', + }, + owner: { + type: GraphQLString, + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for an organization or a particular human that is responsible for the device.', + }, + _url: { + type: require('./element.input.js'), + description: + 'A network address on which the device may be contacted directly.', + }, + url: { + type: UriScalar, + description: + 'A network address on which the device may be contacted directly.', + }, + _onlineInformation: { + type: require('./element.input.js'), + description: 'Access to on-line information about the device.', + }, + onlineInformation: { + type: UriScalar, + description: 'Access to on-line information about the device.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Descriptive information, usage information or implantation information that is not captured in an existing element.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product).', + }, + parentDevice: { + type: GraphQLString, + description: 'The parent device it can be part of.', + }, + material: { + type: new GraphQLList(require('./devicedefinitionmaterial.input.js')), + description: + 'A substance used to create the material(s) of which the device is made.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicedefinitioncapability.input.js b/src/resources/4_0_0/inputs/devicedefinitioncapability.input.js new file mode 100644 index 00000000..3aeb70a4 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicedefinitioncapability.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceDefinitioncapability Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceDefinitioncapability_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Type of capability.', + }, + description: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Description of capability.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicedefinitiondevicename.input.js b/src/resources/4_0_0/inputs/devicedefinitiondevicename.input.js new file mode 100644 index 00000000..913341f7 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicedefinitiondevicename.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DeviceDefinitiondeviceName Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceDefinitiondeviceName_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'The name of the device.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the device.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicedefinitionmaterial.input.js b/src/resources/4_0_0/inputs/devicedefinitionmaterial.input.js new file mode 100644 index 00000000..63691a20 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicedefinitionmaterial.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceDefinitionmaterial Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceDefinitionmaterial_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + substance: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The substance.', + }, + _alternate: { + type: require('./element.input.js'), + description: 'Indicates an alternative material of the device.', + }, + alternate: { + type: GraphQLBoolean, + description: 'Indicates an alternative material of the device.', + }, + _allergenicIndicator: { + type: require('./element.input.js'), + description: 'Whether the substance is a known or suspected allergen.', + }, + allergenicIndicator: { + type: GraphQLBoolean, + description: 'Whether the substance is a known or suspected allergen.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicedefinitionproperty.input.js b/src/resources/4_0_0/inputs/devicedefinitionproperty.input.js new file mode 100644 index 00000000..1867698d --- /dev/null +++ b/src/resources/4_0_0/inputs/devicedefinitionproperty.input.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceDefinitionproperty Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceDefinitionproperty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Code that specifies the property DeviceDefinitionPropetyCode (Extensible).', + }, + valueQuantity: { + type: new GraphQLList(require('./quantity.input.js')), + description: 'Property value as a quantity.', + }, + valueCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Property value as a code, e.g., NTP4 (synced to NTP).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicedefinitionspecialization.input.js b/src/resources/4_0_0/inputs/devicedefinitionspecialization.input.js new file mode 100644 index 00000000..87b16a60 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicedefinitionspecialization.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceDefinitionspecialization Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceDefinitionspecialization_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _systemType: { + type: require('./element.input.js'), + description: 'The standard that is used to operate and communicate.', + }, + systemType: { + type: new GraphQLNonNull(GraphQLString), + description: 'The standard that is used to operate and communicate.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the standard that is used to operate and communicate.', + }, + version: { + type: GraphQLString, + description: + 'The version of the standard that is used to operate and communicate.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicedefinitionudideviceidentifier.input.js b/src/resources/4_0_0/inputs/devicedefinitionudideviceidentifier.input.js new file mode 100644 index 00000000..a93391f9 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicedefinitionudideviceidentifier.input.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary DeviceDefinitionudiDeviceIdentifier Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceDefinitionudiDeviceIdentifier_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _deviceIdentifier: { + type: require('./element.input.js'), + description: + 'The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.', + }, + deviceIdentifier: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.', + }, + _issuer: { + type: require('./element.input.js'), + description: 'The organization that assigns the identifier algorithm.', + }, + issuer: { + type: new GraphQLNonNull(UriScalar), + description: 'The organization that assigns the identifier algorithm.', + }, + _jurisdiction: { + type: require('./element.input.js'), + description: 'The jurisdiction to which the deviceIdentifier applies.', + }, + jurisdiction: { + type: new GraphQLNonNull(UriScalar), + description: 'The jurisdiction to which the deviceIdentifier applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicedevicename.input.js b/src/resources/4_0_0/inputs/devicedevicename.input.js new file mode 100644 index 00000000..41476cb9 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicedevicename.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DevicedeviceName Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DevicedeviceName_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'The name of the device.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the device.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicemetric.input.js b/src/resources/4_0_0/inputs/devicemetric.input.js new file mode 100644 index 00000000..d6453b88 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicemetric.input.js @@ -0,0 +1,149 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DeviceMetric Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceMetric_Input', + description: + 'Describes a measurement, calculation or setting capability of a medical device.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceMetric_Enum_input', + values: { DeviceMetric: { value: 'DeviceMetric' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', + }, + unit: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', + }, + source: { + type: GraphQLString, + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.', + }, + parent: { + type: GraphQLString, + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a Device that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', + }, + _operationalStatus: { + type: require('./element.input.js'), + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + operationalStatus: { + type: CodeScalar, + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + _color: { + type: require('./element.input.js'), + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + color: { + type: CodeScalar, + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + _category: { + type: require('./element.input.js'), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + category: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + measurementPeriod: { + type: require('./timing.input.js'), + description: + 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', + }, + calibration: { + type: new GraphQLList(require('./devicemetriccalibration.input.js')), + description: + 'Describes the calibrations that have been performed or that are required to be performed.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicemetriccalibration.input.js b/src/resources/4_0_0/inputs/devicemetriccalibration.input.js new file mode 100644 index 00000000..67499bf0 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicemetriccalibration.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary DeviceMetriccalibration Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceMetriccalibration_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'Describes the type of the calibration method.', + }, + type: { + type: CodeScalar, + description: 'Describes the type of the calibration method.', + }, + _state: { + type: require('./element.input.js'), + description: 'Describes the state of the calibration.', + }, + state: { + type: CodeScalar, + description: 'Describes the state of the calibration.', + }, + _time: { + type: require('./element.input.js'), + description: 'Describes the time last calibration has been performed.', + }, + time: { + type: InstantScalar, + description: 'Describes the time last calibration has been performed.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/deviceproperty.input.js b/src/resources/4_0_0/inputs/deviceproperty.input.js new file mode 100644 index 00000000..429f6b5b --- /dev/null +++ b/src/resources/4_0_0/inputs/deviceproperty.input.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Deviceproperty Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Deviceproperty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Code that specifies the property DeviceDefinitionPropetyCode (Extensible).', + }, + valueQuantity: { + type: new GraphQLList(require('./quantity.input.js')), + description: 'Property value as a quantity.', + }, + valueCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Property value as a code, e.g., NTP4 (synced to NTP).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicerequest.input.js b/src/resources/4_0_0/inputs/devicerequest.input.js new file mode 100644 index 00000000..9495d981 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicerequest.input.js @@ -0,0 +1,243 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DeviceRequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceRequest_Input', + description: + 'Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceRequest_Enum_input', + values: { DeviceRequest: { value: 'DeviceRequest' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this order by the orderer or by the receiver.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: 'Plan/proposal/order fulfilled by this request.', + }, + priorRequest: { + type: new GraphQLList(GraphQLString), + description: + 'The request takes the place of the referenced completed or terminated request(s).', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: 'Composite request this is part of.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the request.', + }, + status: { + type: CodeScalar, + description: 'The status of the request.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', + }, + codeReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The details of the device to be used.', + }, + codeCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The details of the device to be used.', + }, + parameter: { + type: new GraphQLList(require('./devicerequestparameter.input.js')), + description: + 'Specific parameters for the ordered item. For example, the prism value for lenses.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who will use the device.', + }, + encounter: { + type: GraphQLString, + description: + 'An encounter that provides additional context in which this request is made.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'When the request transitioned to being actionable.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request transitioned to being actionable.', + }, + requester: { + type: GraphQLString, + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + performerType: { + type: require('./codeableconcept.input.js'), + description: + 'Desired type of performer for doing the diagnostic testing.', + }, + performer: { + type: GraphQLString, + description: 'The desired performer for doing the diagnostic testing.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason or justification for the use of this device.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: 'Reason or justification for the use of this device.', + }, + insurance: { + type: new GraphQLList(GraphQLString), + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: + "Additional clinical information about the patient that may influence the request fulfilment. For example, this may include where on the subject's body the device will be used (i.e. the target site).", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + relevantHistory: { + type: new GraphQLList(GraphQLString), + description: 'Key events in the history of the request.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicerequestparameter.input.js b/src/resources/4_0_0/inputs/devicerequestparameter.input.js new file mode 100644 index 00000000..8e39edc5 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicerequestparameter.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceRequestparameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceRequestparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code or string that identifies the device detail being asserted.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'The value of the device detail.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: 'The value of the device detail.', + }, + valueRange: { + type: require('./range.input.js'), + description: 'The value of the device detail.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the device detail.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the device detail.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/devicespecialization.input.js b/src/resources/4_0_0/inputs/devicespecialization.input.js new file mode 100644 index 00000000..43784e89 --- /dev/null +++ b/src/resources/4_0_0/inputs/devicespecialization.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Devicespecialization Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Devicespecialization_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + systemType: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The standard that is used to operate and communicate.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the standard that is used to operate and communicate.', + }, + version: { + type: GraphQLString, + description: + 'The version of the standard that is used to operate and communicate.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/deviceudicarrier.input.js b/src/resources/4_0_0/inputs/deviceudicarrier.input.js new file mode 100644 index 00000000..e450ccaa --- /dev/null +++ b/src/resources/4_0_0/inputs/deviceudicarrier.input.js @@ -0,0 +1,97 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DeviceudiCarrier Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceudiCarrier_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _deviceIdentifier: { + type: require('./element.input.js'), + description: + 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', + }, + deviceIdentifier: { + type: GraphQLString, + description: + 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', + }, + _issuer: { + type: require('./element.input.js'), + description: + 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', + }, + issuer: { + type: UriScalar, + description: + 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', + }, + _jurisdiction: { + type: require('./element.input.js'), + description: + 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', + }, + jurisdiction: { + type: UriScalar, + description: + 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', + }, + _carrierAIDC: { + type: require('./element.input.js'), + description: + 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', + }, + carrierAIDC: { + type: Base64BinaryScalar, + description: + 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', + }, + _carrierHRF: { + type: require('./element.input.js'), + description: + 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', + }, + carrierHRF: { + type: GraphQLString, + description: + 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', + }, + _entryType: { + type: require('./element.input.js'), + description: 'A coded entry to indicate how the data was entered.', + }, + entryType: { + type: CodeScalar, + description: 'A coded entry to indicate how the data was entered.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/deviceusestatement.input.js b/src/resources/4_0_0/inputs/deviceusestatement.input.js new file mode 100644 index 00000000..a6cc238e --- /dev/null +++ b/src/resources/4_0_0/inputs/deviceusestatement.input.js @@ -0,0 +1,164 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DeviceUseStatement Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DeviceUseStatement_Input', + description: + 'A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceUseStatement_Enum_input', + values: { DeviceUseStatement: { value: 'DeviceUseStatement' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'An external identifier for this statement such as an IRI.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this DeviceUseStatement.', + }, + _status: { + type: require('./element.input.js'), + description: + "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who used the device.', + }, + derivedFrom: { + type: new GraphQLList(GraphQLString), + description: + 'Allows linking the DeviceUseStatement to the underlying Request, or to other information that supports or is used to derive the DeviceUseStatement.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: 'How often the device was used.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: 'How often the device was used.', + }, + _timingDateTime: { + type: require('./element.input.js'), + description: 'How often the device was used.', + }, + timingDateTime: { + type: DateTimeScalar, + description: 'How often the device was used.', + }, + _recordedOn: { + type: require('./element.input.js'), + description: 'The time at which the statement was made/recorded.', + }, + recordedOn: { + type: DateTimeScalar, + description: 'The time at which the statement was made/recorded.', + }, + source: { + type: GraphQLString, + description: 'Who reported the device was being used by the patient.', + }, + device: { + type: new GraphQLNonNull(GraphQLString), + description: 'The details of the device used.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason or justification for the use of the device.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies this DeviceUseStatement.', + }, + bodySite: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the anotomic location on the subject's body where the device was used ( i.e. the target).", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/deviceversion.input.js b/src/resources/4_0_0/inputs/deviceversion.input.js new file mode 100644 index 00000000..c4af622c --- /dev/null +++ b/src/resources/4_0_0/inputs/deviceversion.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Deviceversion Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Deviceversion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'The type of the device version.', + }, + component: { + type: require('./identifier.input.js'), + description: 'A single component of the device version.', + }, + _value: { + type: require('./element.input.js'), + description: 'The version text.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The version text.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/diagnosticreport.input.js b/src/resources/4_0_0/inputs/diagnosticreport.input.js new file mode 100644 index 00000000..afd7487f --- /dev/null +++ b/src/resources/4_0_0/inputs/diagnosticreport.input.js @@ -0,0 +1,197 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary DiagnosticReport Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DiagnosticReport_Input', + description: + 'The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DiagnosticReport_Enum_input', + values: { DiagnosticReport: { value: 'DiagnosticReport' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this report by the performer or other systems.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: 'Details concerning a service requested.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the diagnostic report.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the diagnostic report.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code or name that describes this diagnostic report.', + }, + subject: { + type: GraphQLString, + description: + 'The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.', + }, + encounter: { + type: GraphQLString, + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + _issued: { + type: require('./element.input.js'), + description: + 'The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: + 'The diagnostic service that is responsible for issuing the report.', + }, + resultsInterpreter: { + type: new GraphQLList(GraphQLString), + description: + "The practitioner or organization that is responsible for the report's conclusions and interpretations.", + }, + specimen: { + type: new GraphQLList(GraphQLString), + description: + 'Details about the specimens on which this diagnostic report is based.', + }, + result: { + type: new GraphQLList(GraphQLString), + description: + '[Observations](observation.html) that are part of this diagnostic report.', + }, + imagingStudy: { + type: new GraphQLList(GraphQLString), + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + }, + media: { + type: new GraphQLList(require('./diagnosticreportmedia.input.js')), + description: + 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', + }, + _conclusion: { + type: require('./element.input.js'), + description: + 'Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.', + }, + conclusion: { + type: GraphQLString, + description: + 'Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.', + }, + conclusionCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.', + }, + presentedForm: { + type: new GraphQLList(require('./attachment.input.js')), + description: + 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/diagnosticreportmedia.input.js b/src/resources/4_0_0/inputs/diagnosticreportmedia.input.js new file mode 100644 index 00000000..9603a64c --- /dev/null +++ b/src/resources/4_0_0/inputs/diagnosticreportmedia.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DiagnosticReportmedia Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DiagnosticReportmedia_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _comment: { + type: require('./element.input.js'), + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + comment: { + type: GraphQLString, + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + link: { + type: new GraphQLNonNull(GraphQLString), + description: 'Reference to the image source.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/distance.input.js b/src/resources/4_0_0/inputs/distance.input.js new file mode 100644 index 00000000..960659f2 --- /dev/null +++ b/src/resources/4_0_0/inputs/distance.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Distance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Distance_Input', + description: + 'Base StructureDefinition for Distance Type: A length - a value with a unit that is a physical distance.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/documentmanifest.input.js b/src/resources/4_0_0/inputs/documentmanifest.input.js new file mode 100644 index 00000000..0150a821 --- /dev/null +++ b/src/resources/4_0_0/inputs/documentmanifest.input.js @@ -0,0 +1,163 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DocumentManifest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DocumentManifest_Input', + description: + 'A collection of documents compiled for a purpose together with metadata that applies to the collection.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentManifest_Enum_input', + values: { DocumentManifest: { value: 'DocumentManifest' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + masterIdentifier: { + type: require('./identifier.input.js'), + description: + 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Other identifiers associated with the document manifest, including version independent identifiers.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this document manifest.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document manifest.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest.', + }, + subject: { + type: GraphQLString, + description: + 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', + }, + _created: { + type: require('./element.input.js'), + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + created: { + type: DateTimeScalar, + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + }, + _source: { + type: require('./element.input.js'), + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + source: { + type: UriScalar, + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + _description: { + type: require('./element.input.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + content: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'The list of Resources that consist of the parts of this manifest.', + }, + related: { + type: new GraphQLList(require('./documentmanifestrelated.input.js')), + description: + 'Related identifiers or resources associated with the DocumentManifest.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/documentmanifestrelated.input.js b/src/resources/4_0_0/inputs/documentmanifestrelated.input.js new file mode 100644 index 00000000..aef45b7d --- /dev/null +++ b/src/resources/4_0_0/inputs/documentmanifestrelated.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DocumentManifestrelated Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DocumentManifestrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', + }, + ref: { + type: GraphQLString, + description: + 'Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/documentreference.input.js b/src/resources/4_0_0/inputs/documentreference.input.js new file mode 100644 index 00000000..b67112be --- /dev/null +++ b/src/resources/4_0_0/inputs/documentreference.input.js @@ -0,0 +1,178 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary DocumentReference Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DocumentReference_Input', + description: + 'A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentReference_Enum_input', + values: { DocumentReference: { value: 'DocumentReference' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + masterIdentifier: { + type: require('./identifier.input.js'), + description: + 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Other identifiers associated with the document, including version independent identifiers.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of this document reference.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document reference.', + }, + _docStatus: { + type: require('./element.input.js'), + description: 'The status of the underlying document.', + }, + docStatus: { + type: CodeScalar, + description: 'The status of the underlying document.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', + }, + subject: { + type: GraphQLString, + description: + 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', + }, + _date: { + type: require('./element.input.js'), + description: 'When the document reference was created.', + }, + date: { + type: InstantScalar, + description: 'When the document reference was created.', + }, + author: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies who is responsible for adding the information to the document.', + }, + authenticator: { + type: GraphQLString, + description: + 'Which person or organization authenticates that this document is valid.', + }, + custodian: { + type: GraphQLString, + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', + }, + relatesTo: { + type: new GraphQLList(require('./documentreferencerelatesto.input.js')), + description: + 'Relationships that this document has with other document references that already exist.', + }, + _description: { + type: require('./element.input.js'), + description: 'Human-readable description of the source document.', + }, + description: { + type: GraphQLString, + description: 'Human-readable description of the source document.', + }, + securityLabel: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentreferencecontent.input.js')), + ), + description: + 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', + }, + context: { + type: require('./documentreferencecontext.input.js'), + description: 'The clinical context in which the document was prepared.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/documentreferencecontent.input.js b/src/resources/4_0_0/inputs/documentreferencecontent.input.js new file mode 100644 index 00000000..9d16dcb4 --- /dev/null +++ b/src/resources/4_0_0/inputs/documentreferencecontent.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DocumentReferencecontent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DocumentReferencecontent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + attachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The document or URL of the document along with critical metadata to prove content has integrity.', + }, + format: { + type: require('./coding.input.js'), + description: + 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/documentreferencecontext.input.js b/src/resources/4_0_0/inputs/documentreferencecontext.input.js new file mode 100644 index 00000000..86f0305e --- /dev/null +++ b/src/resources/4_0_0/inputs/documentreferencecontext.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DocumentReferencecontext Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DocumentReferencecontext_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + encounter: { + type: new GraphQLList(GraphQLString), + description: + 'Describes the clinical encounter or type of care that the document content is associated with.', + }, + event: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.input.js'), + description: + 'The time period over which the service that is described by the document was provided.', + }, + facilityType: { + type: require('./codeableconcept.input.js'), + description: 'The kind of facility where the patient was seen.', + }, + practiceSetting: { + type: require('./codeableconcept.input.js'), + description: + 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', + }, + sourcePatientInfo: { + type: GraphQLString, + description: + 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', + }, + related: { + type: new GraphQLList(GraphQLString), + description: + 'Related identifiers or resources associated with the DocumentReference.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/documentreferencerelatesto.input.js b/src/resources/4_0_0/inputs/documentreferencerelatesto.input.js new file mode 100644 index 00000000..560e3ccf --- /dev/null +++ b/src/resources/4_0_0/inputs/documentreferencerelatesto.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DocumentReferencerelatesTo Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DocumentReferencerelatesTo_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'The type of relationship that this document has with anther document.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this document has with anther document.', + }, + target: { + type: new GraphQLNonNull(GraphQLString), + description: 'The target document of this relationship.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/domainresource.input.js b/src/resources/4_0_0/inputs/domainresource.input.js new file mode 100644 index 00000000..0c4e8547 --- /dev/null +++ b/src/resources/4_0_0/inputs/domainresource.input.js @@ -0,0 +1,84 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DomainResource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DomainResource_Input', + description: + 'A resource that includes narrative, extensions, and contained resources.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DomainResource_Enum_input', + values: { DomainResource: { value: 'DomainResource' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/dosage.input.js b/src/resources/4_0_0/inputs/dosage.input.js new file mode 100644 index 00000000..57013ca6 --- /dev/null +++ b/src/resources/4_0_0/inputs/dosage.input.js @@ -0,0 +1,119 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Dosage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Dosage_Input', + description: + 'Base StructureDefinition for Dosage Type: Indicates how the medication is/was taken or should be taken by the patient.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: + 'Indicates the order in which the dosage instructions should be applied or interpreted.', + }, + sequence: { + type: GraphQLInt, + description: + 'Indicates the order in which the dosage instructions should be applied or interpreted.', + }, + _text: { + type: require('./element.input.js'), + description: 'Free text dosage instructions e.g. SIG.', + }, + text: { + type: GraphQLString, + description: 'Free text dosage instructions e.g. SIG.', + }, + additionalInstruction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Supplemental instructions to the patient on how to take the medication (e.g. 'with meals' or'take half to one hour before food') or warnings for the patient about the medication (e.g. 'may cause drowsiness' or 'avoid exposure of skin to direct sunlight or sunlamps').", + }, + _patientInstruction: { + type: require('./element.input.js'), + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + patientInstruction: { + type: GraphQLString, + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + timing: { + type: require('./timing.input.js'), + description: 'When medication should be administered.', + }, + _asNeededBoolean: { + type: require('./element.input.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + site: { + type: require('./codeableconcept.input.js'), + description: 'Body site to administer to.', + }, + route: { + type: require('./codeableconcept.input.js'), + description: 'How drug should enter body.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: 'Technique for administering medication.', + }, + doseAndRate: { + type: new GraphQLList(require('./element.input.js')), + description: 'The amount of medication administered.', + }, + maxDosePerPeriod: { + type: require('./ratio.input.js'), + description: 'Upper limit on medication per unit of time.', + }, + maxDosePerAdministration: { + type: require('./quantity.input.js'), + description: 'Upper limit on medication per administration.', + }, + maxDosePerLifetime: { + type: require('./quantity.input.js'), + description: 'Upper limit on medication per lifetime of the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/dosagedoseandrate.input.js b/src/resources/4_0_0/inputs/dosagedoseandrate.input.js new file mode 100644 index 00000000..3fb04653 --- /dev/null +++ b/src/resources/4_0_0/inputs/dosagedoseandrate.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DosagedoseAndRate Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'DosagedoseAndRate_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of dose or rate specified, for example, ordered or calculated.', + }, + doseRange: { + type: require('./range.input.js'), + description: 'Amount of medication per dose.', + }, + doseQuantity: { + type: require('./quantity.input.js'), + description: 'Amount of medication per dose.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: 'Amount of medication per unit of time.', + }, + rateRange: { + type: require('./range.input.js'), + description: 'Amount of medication per unit of time.', + }, + rateQuantity: { + type: require('./quantity.input.js'), + description: 'Amount of medication per unit of time.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/duration.input.js b/src/resources/4_0_0/inputs/duration.input.js new file mode 100644 index 00000000..10e1f79e --- /dev/null +++ b/src/resources/4_0_0/inputs/duration.input.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Duration Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Duration_Input', + description: 'Base StructureDefinition for Duration Type: A length of time.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/effectevidencesynthesis.input.js b/src/resources/4_0_0/inputs/effectevidencesynthesis.input.js new file mode 100644 index 00000000..3efd866b --- /dev/null +++ b/src/resources/4_0_0/inputs/effectevidencesynthesis.input.js @@ -0,0 +1,310 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary EffectEvidenceSynthesis Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EffectEvidenceSynthesis_Input', + description: + 'The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EffectEvidenceSynthesis_Enum_input', + values: { + EffectEvidenceSynthesis: { value: 'EffectEvidenceSynthesis' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this effect evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this effect evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the effect evidence synthesis is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this effect evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this effect evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the effect evidence synthesis is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this effect evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the effect evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the effect evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the effect evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the effect evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the effect evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the effect evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the effect evidence synthesis.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the effect evidence synthesis.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this effect evidence synthesis. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this effect evidence synthesis. Enables tracking the life-cycle of the content.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the effect evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the effect evidence synthesis changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the effect evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the effect evidence synthesis changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the effect evidence synthesis.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the effect evidence synthesis.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the effect evidence synthesis from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the effect evidence synthesis from a consumer's perspective.", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate effect evidence synthesis instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the effect evidence synthesis is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the effect evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the effect evidence synthesis.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the effect evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the effect evidence synthesis.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the effect evidence synthesis content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the EffectEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + synthesisType: { + type: require('./codeableconcept.input.js'), + description: 'Type of synthesis eg meta-analysis.', + }, + studyType: { + type: require('./codeableconcept.input.js'), + description: 'Type of study eg randomized trial.', + }, + population: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + }, + exposure: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + }, + exposureAlternative: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a EvidenceVariable resource that defines the comparison exposure for the research.', + }, + outcome: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + }, + sampleSize: { + type: require('./effectevidencesynthesissamplesize.input.js'), + description: + 'A description of the size of the sample involved in the synthesis.', + }, + resultsByExposure: { + type: new GraphQLList( + require('./effectevidencesynthesisresultsbyexposure.input.js'), + ), + description: + 'A description of the results for each exposure considered in the effect estimate.', + }, + effectEstimate: { + type: new GraphQLList( + require('./effectevidencesynthesiseffectestimate.input.js'), + ), + description: 'The estimated effect of the exposure variant.', + }, + certainty: { + type: new GraphQLList( + require('./effectevidencesynthesiscertainty.input.js'), + ), + description: 'A description of the certainty of the effect estimate.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/effectevidencesynthesiscertainty.input.js b/src/resources/4_0_0/inputs/effectevidencesynthesiscertainty.input.js new file mode 100644 index 00000000..4a884da6 --- /dev/null +++ b/src/resources/4_0_0/inputs/effectevidencesynthesiscertainty.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesiscertainty Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EffectEvidenceSynthesiscertainty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + rating: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A rating of the certainty of the effect estimate.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + certaintySubcomponent: { + type: new GraphQLList( + require('./effectevidencesynthesiscertaintycertaintysubcomponent.input.js'), + ), + description: 'A description of a component of the overall certainty.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/effectevidencesynthesiscertaintycertaintysubcomponent.input.js b/src/resources/4_0_0/inputs/effectevidencesynthesiscertaintycertaintysubcomponent.input.js new file mode 100644 index 00000000..d96dc16e --- /dev/null +++ b/src/resources/4_0_0/inputs/effectevidencesynthesiscertaintycertaintysubcomponent.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesiscertaintycertaintySubcomponent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EffectEvidenceSynthesiscertaintycertaintySubcomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Type of subcomponent of certainty rating.', + }, + rating: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A rating of a subcomponent of rating certainty.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/effectevidencesynthesiseffectestimate.input.js b/src/resources/4_0_0/inputs/effectevidencesynthesiseffectestimate.input.js new file mode 100644 index 00000000..aa0ec9d8 --- /dev/null +++ b/src/resources/4_0_0/inputs/effectevidencesynthesiseffectestimate.input.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesiseffectEstimate Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EffectEvidenceSynthesiseffectEstimate_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Human-readable summary of effect estimate.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of effect estimate.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Examples include relative risk and mean difference.', + }, + variantState: { + type: require('./codeableconcept.input.js'), + description: + 'Used to define variant exposure states such as low-risk state.', + }, + _value: { + type: require('./element.input.js'), + description: 'The point estimate of the effect estimate.', + }, + value: { + type: GraphQLFloat, + description: 'The point estimate of the effect estimate.', + }, + unitOfMeasure: { + type: require('./codeableconcept.input.js'), + description: 'Specifies the UCUM unit for the outcome.', + }, + precisionEstimate: { + type: new GraphQLList( + require('./effectevidencesynthesiseffectestimateprecisionestimate.input.js'), + ), + description: + 'A description of the precision of the estimate for the effect.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/effectevidencesynthesiseffectestimateprecisionestimate.input.js b/src/resources/4_0_0/inputs/effectevidencesynthesiseffectestimateprecisionestimate.input.js new file mode 100644 index 00000000..0051ecba --- /dev/null +++ b/src/resources/4_0_0/inputs/effectevidencesynthesiseffectestimateprecisionestimate.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesiseffectEstimateprecisionEstimate Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EffectEvidenceSynthesiseffectEstimateprecisionEstimate_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Examples include confidence interval and interquartile range.', + }, + _level: { + type: require('./element.input.js'), + description: 'Use 95 for a 95% confidence interval.', + }, + level: { + type: GraphQLFloat, + description: 'Use 95 for a 95% confidence interval.', + }, + _from: { + type: require('./element.input.js'), + description: 'Lower bound of confidence interval.', + }, + from: { + type: GraphQLFloat, + description: 'Lower bound of confidence interval.', + }, + _to: { + type: require('./element.input.js'), + description: 'Upper bound of confidence interval.', + }, + to: { + type: GraphQLFloat, + description: 'Upper bound of confidence interval.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/effectevidencesynthesisresultsbyexposure.input.js b/src/resources/4_0_0/inputs/effectevidencesynthesisresultsbyexposure.input.js new file mode 100644 index 00000000..49f8c100 --- /dev/null +++ b/src/resources/4_0_0/inputs/effectevidencesynthesisresultsbyexposure.input.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EffectEvidenceSynthesisresultsByExposure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EffectEvidenceSynthesisresultsByExposure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Human-readable summary of results by exposure state.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of results by exposure state.', + }, + _exposureState: { + type: require('./element.input.js'), + description: + 'Whether these results are for the exposure state or alternative exposure state.', + }, + exposureState: { + type: CodeScalar, + description: + 'Whether these results are for the exposure state or alternative exposure state.', + }, + variantState: { + type: require('./codeableconcept.input.js'), + description: + 'Used to define variant exposure states such as low-risk state.', + }, + riskEvidenceSynthesis: { + type: new GraphQLNonNull(GraphQLString), + description: 'Reference to a RiskEvidenceSynthesis resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/effectevidencesynthesissamplesize.input.js b/src/resources/4_0_0/inputs/effectevidencesynthesissamplesize.input.js new file mode 100644 index 00000000..ca4716f6 --- /dev/null +++ b/src/resources/4_0_0/inputs/effectevidencesynthesissamplesize.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesissampleSize Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EffectEvidenceSynthesissampleSize_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Human-readable summary of sample size.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of sample size.', + }, + _numberOfStudies: { + type: require('./element.input.js'), + description: 'Number of studies included in this evidence synthesis.', + }, + numberOfStudies: { + type: GraphQLInt, + description: 'Number of studies included in this evidence synthesis.', + }, + _numberOfParticipants: { + type: require('./element.input.js'), + description: + 'Number of participants included in this evidence synthesis.', + }, + numberOfParticipants: { + type: GraphQLInt, + description: + 'Number of participants included in this evidence synthesis.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/element.input.js b/src/resources/4_0_0/inputs/element.input.js new file mode 100644 index 00000000..0bc8c5e4 --- /dev/null +++ b/src/resources/4_0_0/inputs/element.input.js @@ -0,0 +1,32 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Element Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Element_Input', + description: + 'Base StructureDefinition for Element Type: Base definition for all elements in a resource.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinition.input.js b/src/resources/4_0_0/inputs/elementdefinition.input.js new file mode 100644 index 00000000..ca4390ec --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinition.input.js @@ -0,0 +1,1495 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary ElementDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinition_Input', + description: + 'Base StructureDefinition for ElementDefinition Type: Captures constraints on each element within the resource, profile, or extension.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _path: { + type: require('./element.input.js'), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + _representation: { + type: require('./element.input.js'), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + representation: { + type: new GraphQLList(CodeScalar), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + _sliceName: { + type: require('./element.input.js'), + description: + 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', + }, + sliceName: { + type: GraphQLString, + description: + 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', + }, + _sliceIsConstraining: { + type: require('./element.input.js'), + description: + 'If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.', + }, + sliceIsConstraining: { + type: GraphQLBoolean, + description: + 'If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.', + }, + _label: { + type: require('./element.input.js'), + description: + 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + label: { + type: GraphQLString, + description: + 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A code that has the same meaning as the element in a particular terminology.', + }, + slicing: { + type: require('./element.input.js'), + description: + 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', + }, + _short: { + type: require('./element.input.js'), + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + short: { + type: GraphQLString, + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + _definition: { + type: require('./element.input.js'), + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).', + }, + definition: { + type: GraphQLString, + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).', + }, + comment: { + type: GraphQLString, + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).', + }, + _requirements: { + type: require('./element.input.js'), + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + requirements: { + type: GraphQLString, + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'Identifies additional names by which this element might also be known.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies additional names by which this element might also be known.', + }, + _min: { + type: require('./element.input.js'), + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + min: { + type: UnsignedIntScalar, + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + _max: { + type: require('./element.input.js'), + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + base: { + type: require('./element.input.js'), + description: + 'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.', + }, + _contentReference: { + type: require('./element.input.js'), + description: + 'Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.', + }, + contentReference: { + type: UriScalar, + description: + 'Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.', + }, + type: { + type: new GraphQLList(require('./element.input.js')), + description: + 'The data type or resource that the value of this element is permitted to be.', + }, + _defaultValueBase64Binary: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueBoolean: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueCanonical: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCanonical: { + type: CanonicalScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueCode: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCode: { + type: CodeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDate: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDate: { + type: DateScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDateTime: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDecimal: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueId: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueId: { + type: IdScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInstant: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInstant: { + type: InstantScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInteger: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInteger: { + type: GraphQLInt, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueMarkdown: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueOid: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueOid: { + type: OidScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValuePositiveInt: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueString: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueString: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueTime: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTime: { + type: TimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUnsignedInt: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUri: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUri: { + type: UriScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUrl: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUrl: { + type: UrlScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUuid: { + type: require('./element.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUuid: { + type: UuidScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAddress: { + type: require('./address.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAge: { + type: require('./age.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAnnotation: { + type: require('./annotation.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAttachment: { + type: require('./attachment.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCoding: { + type: require('./coding.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContactPoint: { + type: require('./contactpoint.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCount: { + type: require('./count.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDistance: { + type: require('./distance.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDuration: { + type: require('./duration.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueHumanName: { + type: require('./humanname.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueIdentifier: { + type: require('./identifier.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMoney: { + type: require('./money.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePeriod: { + type: require('./period.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueQuantity: { + type: require('./quantity.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRange: { + type: require('./range.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRatio: { + type: require('./ratio.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueReference: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSampledData: { + type: require('./sampleddata.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSignature: { + type: require('./signature.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTiming: { + type: require('./timing.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContactDetail: { + type: require('./contactdetail.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContributor: { + type: require('./contributor.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDataRequirement: { + type: require('./datarequirement.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueExpression: { + type: require('./expression.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueParameterDefinition: { + type: require('./parameterdefinition.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRelatedArtifact: { + type: require('./relatedartifact.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTriggerDefinition: { + type: require('./triggerdefinition.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUsageContext: { + type: require('./usagecontext.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDosage: { + type: require('./dosage.input.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _meaningWhenMissing: { + type: require('./element.input.js'), + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').", + }, + meaningWhenMissing: { + type: GraphQLString, + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').", + }, + _orderMeaning: { + type: require('./element.input.js'), + description: + 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', + }, + orderMeaning: { + type: GraphQLString, + description: + 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', + }, + _fixedBase64Binary: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedBoolean: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedCanonical: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCanonical: { + type: CanonicalScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedCode: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCode: { + type: CodeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDate: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDate: { + type: DateScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDateTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDecimal: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedId: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedId: { + type: IdScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInstant: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInstant: { + type: InstantScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInteger: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInteger: { + type: GraphQLInt, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedMarkdown: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedOid: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedOid: { + type: OidScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedPositiveInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedString: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedString: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTime: { + type: TimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUnsignedInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUri: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUri: { + type: UriScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUrl: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUrl: { + type: UrlScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUuid: { + type: require('./element.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUuid: { + type: UuidScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAddress: { + type: require('./address.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAge: { + type: require('./age.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAnnotation: { + type: require('./annotation.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAttachment: { + type: require('./attachment.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCoding: { + type: require('./coding.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCount: { + type: require('./count.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDistance: { + type: require('./distance.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDuration: { + type: require('./duration.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedHumanName: { + type: require('./humanname.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedIdentifier: { + type: require('./identifier.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMoney: { + type: require('./money.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPeriod: { + type: require('./period.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedQuantity: { + type: require('./quantity.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRange: { + type: require('./range.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRatio: { + type: require('./ratio.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedReference: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSignature: { + type: require('./signature.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTiming: { + type: require('./timing.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContactDetail: { + type: require('./contactdetail.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContributor: { + type: require('./contributor.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDataRequirement: { + type: require('./datarequirement.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedExpression: { + type: require('./expression.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedParameterDefinition: { + type: require('./parameterdefinition.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRelatedArtifact: { + type: require('./relatedartifact.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTriggerDefinition: { + type: require('./triggerdefinition.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUsageContext: { + type: require('./usagecontext.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDosage: { + type: require('./dosage.input.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _patternBase64Binary: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternBoolean: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternCanonical: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCanonical: { + type: CanonicalScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternCode: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCode: { + type: CodeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternDate: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDate: { + type: DateScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternDateTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternDecimal: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternId: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternId: { + type: IdScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternInstant: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternInstant: { + type: InstantScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternInteger: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternInteger: { + type: GraphQLInt, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternMarkdown: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternOid: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternOid: { + type: OidScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternPositiveInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternString: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternString: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternTime: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternTime: { + type: TimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternUnsignedInt: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternUri: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUri: { + type: UriScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternUrl: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUrl: { + type: UrlScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternUuid: { + type: require('./element.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUuid: { + type: UuidScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternAddress: { + type: require('./address.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternAge: { + type: require('./age.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternAnnotation: { + type: require('./annotation.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternAttachment: { + type: require('./attachment.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCoding: { + type: require('./coding.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCount: { + type: require('./count.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDistance: { + type: require('./distance.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDuration: { + type: require('./duration.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternHumanName: { + type: require('./humanname.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternIdentifier: { + type: require('./identifier.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternMoney: { + type: require('./money.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternPeriod: { + type: require('./period.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternQuantity: { + type: require('./quantity.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternRange: { + type: require('./range.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternRatio: { + type: require('./ratio.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternReference: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternSignature: { + type: require('./signature.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternTiming: { + type: require('./timing.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternContactDetail: { + type: require('./contactdetail.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternContributor: { + type: require('./contributor.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDataRequirement: { + type: require('./datarequirement.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternExpression: { + type: require('./expression.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternParameterDefinition: { + type: require('./parameterdefinition.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternRelatedArtifact: { + type: require('./relatedartifact.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternTriggerDefinition: { + type: require('./triggerdefinition.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUsageContext: { + type: require('./usagecontext.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDosage: { + type: require('./dosage.input.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + example: { + type: new GraphQLList(require('./element.input.js')), + description: + 'A sample value for this element demonstrating the type of information that would typically be found in the element.', + }, + _minValueDate: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDate: { + type: DateScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDateTime: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDateTime: { + type: DateTimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInstant: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInstant: { + type: InstantScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueTime: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueTime: { + type: TimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDecimal: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDecimal: { + type: GraphQLFloat, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInteger: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInteger: { + type: GraphQLInt, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValuePositiveInt: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueUnsignedInt: { + type: require('./element.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueQuantity: { + type: require('./quantity.input.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDate: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDate: { + type: DateScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDateTime: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDateTime: { + type: DateTimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInstant: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInstant: { + type: InstantScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueTime: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueTime: { + type: TimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDecimal: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDecimal: { + type: GraphQLFloat, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInteger: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInteger: { + type: GraphQLInt, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValuePositiveInt: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueUnsignedInt: { + type: require('./element.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueQuantity: { + type: require('./quantity.input.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxLength: { + type: require('./element.input.js'), + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + maxLength: { + type: GraphQLInt, + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + _condition: { + type: require('./element.input.js'), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + condition: { + type: new GraphQLList(IdScalar), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + constraint: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', + }, + _mustSupport: { + type: require('./element.input.js'), + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.", + }, + mustSupport: { + type: GraphQLBoolean, + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.", + }, + _isModifier: { + type: require('./element.input.js'), + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + isModifier: { + type: GraphQLBoolean, + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + _isModifierReason: { + type: require('./element.input.js'), + description: + 'Explains how that element affects the interpretation of the resource or element that contains it.', + }, + isModifierReason: { + type: GraphQLString, + description: + 'Explains how that element affects the interpretation of the resource or element that contains it.', + }, + _isSummary: { + type: require('./element.input.js'), + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + isSummary: { + type: GraphQLBoolean, + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + binding: { + type: require('./element.input.js'), + description: + 'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).', + }, + mapping: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Identifies a concept from an external specification that roughly corresponds to this element.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinitionbase.input.js b/src/resources/4_0_0/inputs/elementdefinitionbase.input.js new file mode 100644 index 00000000..1e7caf9b --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinitionbase.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionbase Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinitionbase_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', + }, + _min: { + type: require('./element.input.js'), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + min: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + _max: { + type: require('./element.input.js'), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinitionbinding.input.js b/src/resources/4_0_0/inputs/elementdefinitionbinding.input.js new file mode 100644 index 00000000..4eb411aa --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinitionbinding.input.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionbinding Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinitionbinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _strength: { + type: require('./element.input.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Describes the intended use of this particular set of codes.', + }, + description: { + type: GraphQLString, + description: + 'Describes the intended use of this particular set of codes.', + }, + _valueSet: { + type: require('./element.input.js'), + description: + 'Refers to the value set that identifies the set of codes the binding refers to.', + }, + valueSet: { + type: CanonicalScalar, + description: + 'Refers to the value set that identifies the set of codes the binding refers to.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinitionconstraint.input.js b/src/resources/4_0_0/inputs/elementdefinitionconstraint.input.js new file mode 100644 index 00000000..2c66f6e6 --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinitionconstraint.input.js @@ -0,0 +1,105 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionconstraint Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinitionconstraint_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _key: { + type: require('./element.input.js'), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + key: { + type: new GraphQLNonNull(IdScalar), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + _requirements: { + type: require('./element.input.js'), + description: + 'Description of why this constraint is necessary or appropriate.', + }, + requirements: { + type: GraphQLString, + description: + 'Description of why this constraint is necessary or appropriate.', + }, + _severity: { + type: require('./element.input.js'), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + _human: { + type: require('./element.input.js'), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + human: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.', + }, + expression: { + type: GraphQLString, + description: + 'A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.', + }, + _xpath: { + type: require('./element.input.js'), + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + _source: { + type: require('./element.input.js'), + description: + 'A reference to the original source of the constraint, for traceability purposes.', + }, + source: { + type: CanonicalScalar, + description: + 'A reference to the original source of the constraint, for traceability purposes.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinitionexample.input.js b/src/resources/4_0_0/inputs/elementdefinitionexample.input.js new file mode 100644 index 00000000..b3455c47 --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinitionexample.input.js @@ -0,0 +1,399 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionexample Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinitionexample_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _label: { + type: require('./element.input.js'), + description: + 'Describes the purpose of this example amoung the set of examples.', + }, + label: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Describes the purpose of this example amoung the set of examples.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueCanonical: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueCode: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueId: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueOid: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUrl: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUrl: { + type: new GraphQLNonNull(UrlScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUuid: { + type: require('./element.input.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUuid: { + type: new GraphQLNonNull(UuidScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueContactDetail: { + type: new GraphQLNonNull(require('./contactdetail.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueContributor: { + type: new GraphQLNonNull(require('./contributor.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueExpression: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueParameterDefinition: { + type: new GraphQLNonNull(require('./parameterdefinition.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRelatedArtifact: { + type: new GraphQLNonNull(require('./relatedartifact.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTriggerDefinition: { + type: new GraphQLNonNull(require('./triggerdefinition.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUsageContext: { + type: new GraphQLNonNull(require('./usagecontext.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDosage: { + type: new GraphQLNonNull(require('./dosage.input.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinitionmapping.input.js b/src/resources/4_0_0/inputs/elementdefinitionmapping.input.js new file mode 100644 index 00000000..856478a0 --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinitionmapping.input.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionmapping Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinitionmapping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _identity: { + type: require('./element.input.js'), + description: 'An internal reference to the definition of a mapping.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: 'An internal reference to the definition of a mapping.', + }, + _language: { + type: require('./element.input.js'), + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + language: { + type: CodeScalar, + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + _map: { + type: require('./element.input.js'), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + map: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments that provide information about the mapping or its use.', + }, + comment: { + type: GraphQLString, + description: + 'Comments that provide information about the mapping or its use.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinitionslicing.input.js b/src/resources/4_0_0/inputs/elementdefinitionslicing.input.js new file mode 100644 index 00000000..8656f223 --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinitionslicing.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionslicing Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinitionslicing_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + discriminator: { + type: new GraphQLList(require('./element.input.js')), + description: + 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + description: { + type: GraphQLString, + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + _ordered: { + type: require('./element.input.js'), + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + ordered: { + type: GraphQLBoolean, + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + _rules: { + type: require('./element.input.js'), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + rules: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinitionslicingdiscriminator.input.js b/src/resources/4_0_0/inputs/elementdefinitionslicingdiscriminator.input.js new file mode 100644 index 00000000..bce61225 --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinitionslicingdiscriminator.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionslicingdiscriminator Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinitionslicingdiscriminator_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.input.js'), + description: + 'How the element value is interpreted when discrimination is evaluated.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the element value is interpreted when discrimination is evaluated.', + }, + _path: { + type: require('./element.input.js'), + description: + 'A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/elementdefinitiontype.input.js b/src/resources/4_0_0/inputs/elementdefinitiontype.input.js new file mode 100644 index 00000000..88aa52fa --- /dev/null +++ b/src/resources/4_0_0/inputs/elementdefinitiontype.input.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitiontype Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ElementDefinitiontype_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _code: { + type: require('./element.input.js'), + description: + "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + code: { + type: new GraphQLNonNull(UriScalar), + description: + "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + _profile: { + type: require('./element.input.js'), + description: + 'Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.', + }, + profile: { + type: new GraphQLList(CanonicalScalar), + description: + 'Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.', + }, + _targetProfile: { + type: require('./element.input.js'), + description: + "Used when the type is 'Reference' or 'canonical', and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", + }, + targetProfile: { + type: new GraphQLList(CanonicalScalar), + description: + "Used when the type is 'Reference' or 'canonical', and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", + }, + _aggregation: { + type: require('./element.input.js'), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + aggregation: { + type: new GraphQLList(CodeScalar), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + _versioning: { + type: require('./element.input.js'), + description: + 'Whether this reference needs to be version specific or version independent, or whether either can be used.', + }, + versioning: { + type: CodeScalar, + description: + 'Whether this reference needs to be version specific or version independent, or whether either can be used.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/encounter.input.js b/src/resources/4_0_0/inputs/encounter.input.js new file mode 100644 index 00000000..0c5a7a57 --- /dev/null +++ b/src/resources/4_0_0/inputs/encounter.input.js @@ -0,0 +1,196 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Encounter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Encounter_Input', + description: + 'An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Encounter_Enum_input', + values: { Encounter: { value: 'Encounter' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Identifier(s) by which this encounter is known.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + statusHistory: { + type: new GraphQLList(require('./encounterstatushistory.input.js')), + description: + 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', + }, + class: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.', + }, + classHistory: { + type: new GraphQLList(require('./encounterclasshistory.input.js')), + description: + 'The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transitions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kind of discharge from emergency to inpatient.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', + }, + serviceType: { + type: require('./codeableconcept.input.js'), + description: + 'Broad categorization of the service that is to be provided (e.g. cardiology).', + }, + priority: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the urgency of the encounter.', + }, + subject: { + type: GraphQLString, + description: 'The patient or group present at the encounter.', + }, + episodeOfCare: { + type: new GraphQLList(GraphQLString), + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'The request this encounter satisfies (e.g. incoming referral or procedure request).', + }, + participant: { + type: new GraphQLList(require('./encounterparticipant.input.js')), + description: 'The list of people responsible for providing the service.', + }, + appointment: { + type: new GraphQLList(GraphQLString), + description: 'The appointment that scheduled this encounter.', + }, + period: { + type: require('./period.input.js'), + description: 'The start and end time of the encounter.', + }, + length: { + type: require('./duration.input.js'), + description: + 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + }, + diagnosis: { + type: new GraphQLList(require('./encounterdiagnosis.input.js')), + description: 'The list of diagnosis relevant to this encounter.', + }, + account: { + type: new GraphQLList(GraphQLString), + description: + 'The set of accounts that may be used for billing for this Encounter.', + }, + hospitalization: { + type: require('./encounterhospitalization.input.js'), + description: 'Details about the admission to a healthcare service.', + }, + location: { + type: new GraphQLList(require('./encounterlocation.input.js')), + description: + 'List of locations where the patient has been during this encounter.', + }, + serviceProvider: { + type: GraphQLString, + description: + "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the example bundle showing an abbreviated set of Encounters for a colonoscopy.", + }, + partOf: { + type: GraphQLString, + description: + 'Another Encounter of which this encounter is a part of (administratively or in time).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/encounterclasshistory.input.js b/src/resources/4_0_0/inputs/encounterclasshistory.input.js new file mode 100644 index 00000000..499101a2 --- /dev/null +++ b/src/resources/4_0_0/inputs/encounterclasshistory.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EncounterclassHistory Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EncounterclassHistory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + class: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The time that the episode was in the specified class.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/encounterdiagnosis.input.js b/src/resources/4_0_0/inputs/encounterdiagnosis.input.js new file mode 100644 index 00000000..d89bc2bf --- /dev/null +++ b/src/resources/4_0_0/inputs/encounterdiagnosis.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Encounterdiagnosis Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Encounterdiagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + condition: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + use: { + type: require('./codeableconcept.input.js'), + description: + 'Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).', + }, + _rank: { + type: require('./element.input.js'), + description: 'Ranking of the diagnosis (for each role type).', + }, + rank: { + type: PositiveIntScalar, + description: 'Ranking of the diagnosis (for each role type).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/encounterhospitalization.input.js b/src/resources/4_0_0/inputs/encounterhospitalization.input.js new file mode 100644 index 00000000..9d3b0a10 --- /dev/null +++ b/src/resources/4_0_0/inputs/encounterhospitalization.input.js @@ -0,0 +1,76 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Encounterhospitalization Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Encounterhospitalization_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + preAdmissionIdentifier: { + type: require('./identifier.input.js'), + description: 'Pre-admission identifier.', + }, + origin: { + type: GraphQLString, + description: + 'The location/organization from which the patient came before admission.', + }, + admitSource: { + type: require('./codeableconcept.input.js'), + description: + 'From where patient was admitted (physician referral, transfer).', + }, + reAdmission: { + type: require('./codeableconcept.input.js'), + description: + 'Whether this hospitalization is a readmission and why if known.', + }, + dietPreference: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Diet preferences reported by the patient.', + }, + specialCourtesy: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Special courtesies (VIP, board member).', + }, + specialArrangement: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.', + }, + destination: { + type: GraphQLString, + description: 'Location/organization to which the patient is discharged.', + }, + dischargeDisposition: { + type: require('./codeableconcept.input.js'), + description: 'Category or kind of location after discharge.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/encounterlocation.input.js b/src/resources/4_0_0/inputs/encounterlocation.input.js new file mode 100644 index 00000000..3a9faf90 --- /dev/null +++ b/src/resources/4_0_0/inputs/encounterlocation.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Encounterlocation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Encounterlocation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + location: { + type: new GraphQLNonNull(GraphQLString), + description: 'The location where the encounter takes place.', + }, + _status: { + type: require('./element.input.js'), + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", + }, + status: { + type: CodeScalar, + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", + }, + physicalType: { + type: require('./codeableconcept.input.js'), + description: + 'This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.', + }, + period: { + type: require('./period.input.js'), + description: + 'Time period during which the patient was present at the location.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/encounterparticipant.input.js b/src/resources/4_0_0/inputs/encounterparticipant.input.js new file mode 100644 index 00000000..969e8df6 --- /dev/null +++ b/src/resources/4_0_0/inputs/encounterparticipant.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Encounterparticipant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Encounterparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Role of participant in encounter.', + }, + period: { + type: require('./period.input.js'), + description: + "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", + }, + individual: { + type: GraphQLString, + description: 'Persons involved in the encounter other than the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/encounterstatushistory.input.js b/src/resources/4_0_0/inputs/encounterstatushistory.input.js new file mode 100644 index 00000000..2de7348c --- /dev/null +++ b/src/resources/4_0_0/inputs/encounterstatushistory.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EncounterstatusHistory Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EncounterstatusHistory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The time that the episode was in the specified status.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/endpoint.input.js b/src/resources/4_0_0/inputs/endpoint.input.js new file mode 100644 index 00000000..c4b415a7 --- /dev/null +++ b/src/resources/4_0_0/inputs/endpoint.input.js @@ -0,0 +1,163 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary Endpoint Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Endpoint_Input', + description: + 'The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Endpoint_Enum_input', + values: { Endpoint: { value: 'Endpoint' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifier for the organization that is used to identify the endpoint across multiple disparate systems.', + }, + _status: { + type: require('./element.input.js'), + description: 'active | suspended | error | off | test.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'active | suspended | error | off | test.', + }, + connectionType: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).', + }, + _name: { + type: require('./element.input.js'), + description: + 'A friendly name that this endpoint can be referred to with.', + }, + name: { + type: GraphQLString, + description: + 'A friendly name that this endpoint can be referred to with.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + period: { + type: require('./period.input.js'), + description: + 'The interval during which the endpoint is expected to be operational.', + }, + payloadType: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.input.js')), + ), + description: + 'The payload type describes the acceptable content that can be communicated on the endpoint.', + }, + _payloadMimeType: { + type: require('./element.input.js'), + description: + 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', + }, + payloadMimeType: { + type: new GraphQLList(CodeScalar), + description: + 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', + }, + _address: { + type: require('./element.input.js'), + description: 'The uri that describes the actual end-point to connect to.', + }, + address: { + type: new GraphQLNonNull(UrlScalar), + description: 'The uri that describes the actual end-point to connect to.', + }, + _header: { + type: require('./element.input.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: new GraphQLList(GraphQLString), + description: + 'Additional headers / information to send as part of the notification.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/enrollmentrequest.input.js b/src/resources/4_0_0/inputs/enrollmentrequest.input.js new file mode 100644 index 00000000..b0659d18 --- /dev/null +++ b/src/resources/4_0_0/inputs/enrollmentrequest.input.js @@ -0,0 +1,123 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary EnrollmentRequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EnrollmentRequest_Input', + description: + 'This resource provides the insurance enrollment details to the insurer regarding a specified coverage.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentRequest_Enum_input', + values: { EnrollmentRequest: { value: 'EnrollmentRequest' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + insurer: { + type: GraphQLString, + description: 'The Insurer who is target of the request.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + candidate: { + type: GraphQLString, + description: 'Patient Resource.', + }, + coverage: { + type: GraphQLString, + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/enrollmentresponse.input.js b/src/resources/4_0_0/inputs/enrollmentresponse.input.js new file mode 100644 index 00000000..aef20092 --- /dev/null +++ b/src/resources/4_0_0/inputs/enrollmentresponse.input.js @@ -0,0 +1,136 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary EnrollmentResponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EnrollmentResponse_Input', + description: + 'This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentResponse_Enum_input', + values: { EnrollmentResponse: { value: 'EnrollmentResponse' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'Processing status: error, complete.', + }, + outcome: { + type: CodeScalar, + description: 'Processing status: error, complete.', + }, + _disposition: { + type: require('./element.input.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + _created: { + type: require('./element.input.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: GraphQLString, + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/episodeofcare.input.js b/src/resources/4_0_0/inputs/episodeofcare.input.js new file mode 100644 index 00000000..21dc9794 --- /dev/null +++ b/src/resources/4_0_0/inputs/episodeofcare.input.js @@ -0,0 +1,147 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EpisodeOfCare Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EpisodeOfCare_Input', + description: + 'An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EpisodeOfCare_Enum_input', + values: { EpisodeOfCare: { value: 'EpisodeOfCare' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.', + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + statusHistory: { + type: new GraphQLList(require('./episodeofcarestatushistory.input.js')), + description: + 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.', + }, + diagnosis: { + type: new GraphQLList(require('./episodeofcarediagnosis.input.js')), + description: 'The list of diagnosis relevant to this episode of care.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient who is the focus of this episode of care.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization that has assumed the specific responsibilities for the specified duration.', + }, + period: { + type: require('./period.input.js'), + description: + 'The interval during which the managing organization assumes the defined responsibility.', + }, + referralRequest: { + type: new GraphQLList(GraphQLString), + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + }, + careManager: { + type: GraphQLString, + description: + 'The practitioner that is the care manager/care coordinator for this patient.', + }, + team: { + type: new GraphQLList(GraphQLString), + description: + 'The list of practitioners that may be facilitating this episode of care for specific purposes.', + }, + account: { + type: new GraphQLList(GraphQLString), + description: + 'The set of accounts that may be used for billing for this EpisodeOfCare.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/episodeofcarediagnosis.input.js b/src/resources/4_0_0/inputs/episodeofcarediagnosis.input.js new file mode 100644 index 00000000..cdc84c57 --- /dev/null +++ b/src/resources/4_0_0/inputs/episodeofcarediagnosis.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary EpisodeOfCarediagnosis Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EpisodeOfCarediagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + condition: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + }, + role: { + type: require('./codeableconcept.input.js'), + description: + 'Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).', + }, + _rank: { + type: require('./element.input.js'), + description: 'Ranking of the diagnosis (for each role type).', + }, + rank: { + type: PositiveIntScalar, + description: 'Ranking of the diagnosis (for each role type).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/episodeofcarestatushistory.input.js b/src/resources/4_0_0/inputs/episodeofcarestatushistory.input.js new file mode 100644 index 00000000..f3fed545 --- /dev/null +++ b/src/resources/4_0_0/inputs/episodeofcarestatushistory.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EpisodeOfCarestatusHistory Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EpisodeOfCarestatusHistory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _status: { + type: require('./element.input.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + 'The period during this EpisodeOfCare that the specific status applied.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/eventdefinition.input.js b/src/resources/4_0_0/inputs/eventdefinition.input.js new file mode 100644 index 00000000..97021f28 --- /dev/null +++ b/src/resources/4_0_0/inputs/eventdefinition.input.js @@ -0,0 +1,309 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary EventDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EventDefinition_Input', + description: + 'The EventDefinition resource provides a reusable description of when a particular event can occur.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EventDefinition_Enum_input', + values: { EventDefinition: { value: 'EventDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this event definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the event definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the event definition.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the event definition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the event definition giving additional information about its content.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this event definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this event definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A code or group definition that describes the intended subject of the event definition.', + }, + subjectReference: { + type: GraphQLString, + description: + 'A code or group definition that describes the intended subject of the event definition.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the event definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the event definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the event definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the event definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the event definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the event definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate event definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the event definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this event definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this event definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the event definition is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the event definition is used from a clinical perspective.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the event definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the event definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the event definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the event definition.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the event definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related resources such as additional documentation, justification, or bibliographic references.', + }, + trigger: { + type: new GraphQLList( + new GraphQLNonNull(require('./triggerdefinition.input.js')), + ), + description: + 'The trigger element defines when the event occurs. If more than one trigger condition is specified, the event fires whenever any one of the trigger conditions is met.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/evidence.input.js b/src/resources/4_0_0/inputs/evidence.input.js new file mode 100644 index 00000000..aac5bdfb --- /dev/null +++ b/src/resources/4_0_0/inputs/evidence.input.js @@ -0,0 +1,291 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Evidence Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Evidence_Input', + description: + 'The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Evidence_Enum_input', + values: { Evidence: { value: 'Evidence' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this evidence when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the evidence when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the evidence when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the evidence.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the evidence.', + }, + _shortTitle: { + type: require('./element.input.js'), + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + shortTitle: { + type: GraphQLString, + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the Evidence giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the Evidence giving additional information about its content.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this evidence. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this evidence. Enables tracking the life-cycle of the content.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the evidence was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the evidence was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the evidence.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the evidence.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the evidence from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the evidence from a consumer's perspective.", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the evidence is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the evidence content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the Evidence. Topics provide a high-level categorization grouping types of Evidences that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + exposureBackground: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + }, + exposureVariant: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + }, + outcome: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/evidencevariable.input.js b/src/resources/4_0_0/inputs/evidencevariable.input.js new file mode 100644 index 00000000..363aa331 --- /dev/null +++ b/src/resources/4_0_0/inputs/evidencevariable.input.js @@ -0,0 +1,295 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary EvidenceVariable Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EvidenceVariable_Input', + description: + "The EvidenceVariable resource describes a 'PICO' element that knowledge (evidence, assertion, recommendation) is about.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EvidenceVariable_Enum_input', + values: { EvidenceVariable: { value: 'EvidenceVariable' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the evidence variable.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the evidence variable.', + }, + _shortTitle: { + type: require('./element.input.js'), + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + shortTitle: { + type: GraphQLString, + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the EvidenceVariable giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the EvidenceVariable giving additional information about its content.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this evidence variable. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this evidence variable. Enables tracking the life-cycle of the content.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the evidence variable was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the evidence variable was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the evidence variable.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the evidence variable.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the evidence variable from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the evidence variable from a consumer's perspective.", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the evidence variable is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the evidence variable and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence variable.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the evidence variable and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence variable.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the evidence variable content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the EvidenceVariable. Topics provide a high-level categorization grouping types of EvidenceVariables that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of evidence element, a population, an exposure, or an outcome.', + }, + type: { + type: CodeScalar, + description: + 'The type of evidence element, a population, an exposure, or an outcome.', + }, + characteristic: { + type: new GraphQLList( + new GraphQLNonNull( + require('./evidencevariablecharacteristic.input.js'), + ), + ), + description: + "A characteristic that defines the members of the evidence element. Multiple characteristics are applied with 'and' semantics.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/evidencevariablecharacteristic.input.js b/src/resources/4_0_0/inputs/evidencevariablecharacteristic.input.js new file mode 100644 index 00000000..6fbaaeb1 --- /dev/null +++ b/src/resources/4_0_0/inputs/evidencevariablecharacteristic.input.js @@ -0,0 +1,135 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EvidenceVariablecharacteristic Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'EvidenceVariablecharacteristic_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: + 'A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.', + }, + description: { + type: GraphQLString, + description: + 'A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.', + }, + definitionReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + _definitionCanonical: { + type: require('./element.input.js'), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionExpression: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.input.js')), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionTriggerDefinition: { + type: new GraphQLNonNull(require('./triggerdefinition.input.js')), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + usageContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.', + }, + _exclude: { + type: require('./element.input.js'), + description: + 'When true, members with this characteristic are excluded from the element.', + }, + exclude: { + type: GraphQLBoolean, + description: + 'When true, members with this characteristic are excluded from the element.', + }, + _participantEffectiveDateTime: { + type: require('./element.input.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveDateTime: { + type: DateTimeScalar, + description: 'Indicates what effective period the study covers.', + }, + participantEffectivePeriod: { + type: require('./period.input.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveDuration: { + type: require('./duration.input.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveTiming: { + type: require('./timing.input.js'), + description: 'Indicates what effective period the study covers.', + }, + timeFromStart: { + type: require('./duration.input.js'), + description: "Indicates duration from the participant's study entry.", + }, + _groupMeasure: { + type: require('./element.input.js'), + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + groupMeasure: { + type: CodeScalar, + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenario.input.js b/src/resources/4_0_0/inputs/examplescenario.input.js new file mode 100644 index 00000000..57127cb6 --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenario.input.js @@ -0,0 +1,217 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ExampleScenario Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenario_Input', + description: 'Example of workflow instance.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExampleScenario_Enum_input', + values: { ExampleScenario: { value: 'ExampleScenario' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this example scenario. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this example scenario. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + "The date (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", + }, + date: { + type: DateTimeScalar, + description: + "The date (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the example scenario.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the example scenario.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the example scenario is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.', + }, + purpose: { + type: GraphQLString, + description: + 'What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.', + }, + actor: { + type: new GraphQLList(require('./examplescenarioactor.input.js')), + description: 'Actor participating in the resource.', + }, + instance: { + type: new GraphQLList(require('./examplescenarioinstance.input.js')), + description: + 'Each resource and each version that is present in the workflow.', + }, + process: { + type: new GraphQLList(require('./examplescenarioprocess.input.js')), + description: 'Each major process - a group of operations.', + }, + _workflow: { + type: require('./element.input.js'), + description: 'Another nested workflow.', + }, + workflow: { + type: new GraphQLList(CanonicalScalar), + description: 'Another nested workflow.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenarioactor.input.js b/src/resources/4_0_0/inputs/examplescenarioactor.input.js new file mode 100644 index 00000000..8b92c3ac --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenarioactor.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ExampleScenarioactor Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenarioactor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _actorId: { + type: require('./element.input.js'), + description: 'ID or acronym of actor.', + }, + actorId: { + type: new GraphQLNonNull(GraphQLString), + description: 'ID or acronym of actor.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of actor - person or system.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of actor - person or system.', + }, + _name: { + type: require('./element.input.js'), + description: 'The name of the actor as shown in the page.', + }, + name: { + type: GraphQLString, + description: 'The name of the actor as shown in the page.', + }, + _description: { + type: require('./element.input.js'), + description: 'The description of the actor.', + }, + description: { + type: GraphQLString, + description: 'The description of the actor.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenarioinstance.input.js b/src/resources/4_0_0/inputs/examplescenarioinstance.input.js new file mode 100644 index 00000000..8e666172 --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenarioinstance.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ExampleScenarioinstance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenarioinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _resourceId: { + type: require('./element.input.js'), + description: 'The id of the resource for referencing.', + }, + resourceId: { + type: new GraphQLNonNull(GraphQLString), + description: 'The id of the resource for referencing.', + }, + _resourceType: { + type: require('./element.input.js'), + description: 'The type of the resource.', + }, + resourceType: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of the resource.', + }, + _name: { + type: require('./element.input.js'), + description: 'A short name for the resource instance.', + }, + name: { + type: GraphQLString, + description: 'A short name for the resource instance.', + }, + _description: { + type: require('./element.input.js'), + description: 'Human-friendly description of the resource instance.', + }, + description: { + type: GraphQLString, + description: 'Human-friendly description of the resource instance.', + }, + version: { + type: new GraphQLList( + require('./examplescenarioinstanceversion.input.js'), + ), + description: 'A specific version of the resource.', + }, + containedInstance: { + type: new GraphQLList( + require('./examplescenarioinstancecontainedinstance.input.js'), + ), + description: + 'Resources contained in the instance (e.g. the observations contained in a bundle).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenarioinstancecontainedinstance.input.js b/src/resources/4_0_0/inputs/examplescenarioinstancecontainedinstance.input.js new file mode 100644 index 00000000..c219f22a --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenarioinstancecontainedinstance.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioinstancecontainedInstance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenarioinstancecontainedInstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _resourceId: { + type: require('./element.input.js'), + description: 'Each resource contained in the instance.', + }, + resourceId: { + type: new GraphQLNonNull(GraphQLString), + description: 'Each resource contained in the instance.', + }, + _versionId: { + type: require('./element.input.js'), + description: + 'A specific version of a resource contained in the instance.', + }, + versionId: { + type: GraphQLString, + description: + 'A specific version of a resource contained in the instance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenarioinstanceversion.input.js b/src/resources/4_0_0/inputs/examplescenarioinstanceversion.input.js new file mode 100644 index 00000000..3ff25505 --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenarioinstanceversion.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioinstanceversion Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenarioinstanceversion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _versionId: { + type: require('./element.input.js'), + description: 'The identifier of a specific version of a resource.', + }, + versionId: { + type: new GraphQLNonNull(GraphQLString), + description: 'The identifier of a specific version of a resource.', + }, + _description: { + type: require('./element.input.js'), + description: 'The description of the resource version.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: 'The description of the resource version.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenarioprocess.input.js b/src/resources/4_0_0/inputs/examplescenarioprocess.input.js new file mode 100644 index 00000000..916ec487 --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenarioprocess.input.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioprocess Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenarioprocess_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _title: { + type: require('./element.input.js'), + description: 'The diagram title of the group of operations.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: 'The diagram title of the group of operations.', + }, + _description: { + type: require('./element.input.js'), + description: 'A longer description of the group of operations.', + }, + description: { + type: GraphQLString, + description: 'A longer description of the group of operations.', + }, + _preConditions: { + type: require('./element.input.js'), + description: 'Description of initial status before the process starts.', + }, + preConditions: { + type: GraphQLString, + description: 'Description of initial status before the process starts.', + }, + _postConditions: { + type: require('./element.input.js'), + description: 'Description of final status after the process ends.', + }, + postConditions: { + type: GraphQLString, + description: 'Description of final status after the process ends.', + }, + step: { + type: new GraphQLList(require('./examplescenarioprocessstep.input.js')), + description: 'Each step of the process.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenarioprocessstep.input.js b/src/resources/4_0_0/inputs/examplescenarioprocessstep.input.js new file mode 100644 index 00000000..41d83c88 --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenarioprocessstep.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioprocessstep Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenarioprocessstep_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _pause: { + type: require('./element.input.js'), + description: 'If there is a pause in the flow.', + }, + pause: { + type: GraphQLBoolean, + description: 'If there is a pause in the flow.', + }, + operation: { + type: require('./examplescenarioprocessstepoperation.input.js'), + description: 'Each interaction or action.', + }, + alternative: { + type: new GraphQLList( + require('./examplescenarioprocessstepalternative.input.js'), + ), + description: + 'Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenarioprocessstepalternative.input.js b/src/resources/4_0_0/inputs/examplescenarioprocessstepalternative.input.js new file mode 100644 index 00000000..98b410d7 --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenarioprocessstepalternative.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioprocessstepalternative Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenarioprocessstepalternative_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _title: { + type: require('./element.input.js'), + description: + 'The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A human-readable description of the alternative explaining when the alternative should occur rather than the base step.', + }, + description: { + type: GraphQLString, + description: + 'A human-readable description of the alternative explaining when the alternative should occur rather than the base step.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/examplescenarioprocessstepoperation.input.js b/src/resources/4_0_0/inputs/examplescenarioprocessstepoperation.input.js new file mode 100644 index 00000000..a5430c36 --- /dev/null +++ b/src/resources/4_0_0/inputs/examplescenarioprocessstepoperation.input.js @@ -0,0 +1,106 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioprocessstepoperation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExampleScenarioprocessstepoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _number: { + type: require('./element.input.js'), + description: 'The sequential number of the interaction, e.g. 1.2.5.', + }, + number: { + type: new GraphQLNonNull(GraphQLString), + description: 'The sequential number of the interaction, e.g. 1.2.5.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of operation - CRUD.', + }, + type: { + type: GraphQLString, + description: 'The type of operation - CRUD.', + }, + _name: { + type: require('./element.input.js'), + description: 'The human-friendly name of the interaction.', + }, + name: { + type: GraphQLString, + description: 'The human-friendly name of the interaction.', + }, + _initiator: { + type: require('./element.input.js'), + description: 'Who starts the transaction.', + }, + initiator: { + type: GraphQLString, + description: 'Who starts the transaction.', + }, + _receiver: { + type: require('./element.input.js'), + description: 'Who receives the transaction.', + }, + receiver: { + type: GraphQLString, + description: 'Who receives the transaction.', + }, + _description: { + type: require('./element.input.js'), + description: 'A comment to be inserted in the diagram.', + }, + description: { + type: GraphQLString, + description: 'A comment to be inserted in the diagram.', + }, + _initiatorActive: { + type: require('./element.input.js'), + description: + 'Whether the initiator is deactivated right after the transaction.', + }, + initiatorActive: { + type: GraphQLBoolean, + description: + 'Whether the initiator is deactivated right after the transaction.', + }, + _receiverActive: { + type: require('./element.input.js'), + description: + 'Whether the receiver is deactivated right after the transaction.', + }, + receiverActive: { + type: GraphQLBoolean, + description: + 'Whether the receiver is deactivated right after the transaction.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefit.input.js b/src/resources/4_0_0/inputs/explanationofbenefit.input.js new file mode 100644 index 00000000..44c5323f --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefit.input.js @@ -0,0 +1,330 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefit Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefit_Input', + description: + 'This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExplanationOfBenefit_Enum_input', + values: { ExplanationOfBenefit: { value: 'ExplanationOfBenefit' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A unique identifier assigned to this explanation of benefit.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The category of claim, e.g. oral, pharmacy, vision, institutional, professional.', + }, + subType: { + type: require('./codeableconcept.input.js'), + description: + 'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.', + }, + _use: { + type: require('./element.input.js'), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.', + }, + billablePeriod: { + type: require('./period.input.js'), + description: 'The period for which charges are being submitted.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + enterer: { + type: GraphQLString, + description: + 'Individual who created the claim, predetermination or preauthorization.', + }, + insurer: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The party responsible for authorization, adjudication and reimbursement.', + }, + provider: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + }, + priority: { + type: require('./codeableconcept.input.js'), + description: + 'The provider-required urgency of processing the request. Typical values include: stat, routine deferred.', + }, + fundsReserveRequested: { + type: require('./codeableconcept.input.js'), + description: + 'A code to indicate whether and for whom funds are to be reserved for future claims.', + }, + fundsReserve: { + type: require('./codeableconcept.input.js'), + description: + 'A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.', + }, + related: { + type: new GraphQLList(require('./explanationofbenefitrelated.input.js')), + description: + 'Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.', + }, + prescription: { + type: GraphQLString, + description: + 'Prescription to support the dispensing of pharmacy, device or vision products.', + }, + originalPrescription: { + type: GraphQLString, + description: + 'Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.', + }, + payee: { + type: require('./explanationofbenefitpayee.input.js'), + description: + 'The party to be reimbursed for cost of the products and services according to the terms of the policy.', + }, + referral: { + type: GraphQLString, + description: 'A reference to a referral resource.', + }, + facility: { + type: GraphQLString, + description: 'Facility where the services were provided.', + }, + claim: { + type: GraphQLString, + description: + 'The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.', + }, + claimResponse: { + type: GraphQLString, + description: + 'The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.', + }, + _outcome: { + type: require('./element.input.js'), + description: + 'The outcome of the claim, predetermination, or preauthorization processing.', + }, + outcome: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The outcome of the claim, predetermination, or preauthorization processing.', + }, + _disposition: { + type: require('./element.input.js'), + description: + 'A human readable description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: + 'A human readable description of the status of the adjudication.', + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'Reference from the Insurer which is used in later communications which refers to this adjudication.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'Reference from the Insurer which is used in later communications which refers to this adjudication.', + }, + preAuthRefPeriod: { + type: new GraphQLList(require('./period.input.js')), + description: + 'The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided.', + }, + careTeam: { + type: new GraphQLList(require('./explanationofbenefitcareteam.input.js')), + description: + 'The members of the team who provided the products and services.', + }, + supportingInfo: { + type: new GraphQLList( + require('./explanationofbenefitsupportinginfo.input.js'), + ), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.', + }, + diagnosis: { + type: new GraphQLList( + require('./explanationofbenefitdiagnosis.input.js'), + ), + description: 'Information about diagnoses relevant to the claim items.', + }, + procedure: { + type: new GraphQLList( + require('./explanationofbenefitprocedure.input.js'), + ), + description: + 'Procedures performed on the patient relevant to the billing items with the claim.', + }, + _precedence: { + type: require('./element.input.js'), + description: + 'This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.', + }, + precedence: { + type: PositiveIntScalar, + description: + 'This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.', + }, + insurance: { + type: new GraphQLList( + new GraphQLNonNull(require('./explanationofbenefitinsurance.input.js')), + ), + description: + 'Financial instruments for reimbursement for the health care products and services specified on the claim.', + }, + accident: { + type: require('./explanationofbenefitaccident.input.js'), + description: + 'Details of a accident which resulted in injuries which required the products and services listed in the claim.', + }, + item: { + type: new GraphQLList(require('./explanationofbenefititem.input.js')), + description: + "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.", + }, + addItem: { + type: new GraphQLList(require('./explanationofbenefitadditem.input.js')), + description: + 'The first-tier service adjudications for payor added product or service lines.', + }, + total: { + type: new GraphQLList(require('./explanationofbenefittotal.input.js')), + description: 'Categorized monetary totals for the adjudication.', + }, + payment: { + type: require('./explanationofbenefitpayment.input.js'), + description: 'Payment details for the adjudication of the claim.', + }, + formCode: { + type: require('./codeableconcept.input.js'), + description: 'A code for the form to be used for printing the content.', + }, + form: { + type: require('./attachment.input.js'), + description: + 'The actual form, by reference or inclusion, for printing the content or an EOB.', + }, + processNote: { + type: new GraphQLList( + require('./explanationofbenefitprocessnote.input.js'), + ), + description: + 'A note that describes or explains adjudication results in a human readable form.', + }, + benefitPeriod: { + type: require('./period.input.js'), + description: 'The term of the benefits documented in this response.', + }, + benefitBalance: { + type: new GraphQLList( + require('./explanationofbenefitbenefitbalance.input.js'), + ), + description: 'Balance by Benefit Category.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitaccident.input.js b/src/resources/4_0_0/inputs/explanationofbenefitaccident.input.js new file mode 100644 index 00000000..32ab8d7f --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitaccident.input.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitaccident Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitaccident_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _date: { + type: require('./element.input.js'), + description: + 'Date of an accident event related to the products and services contained in the claim.', + }, + date: { + type: DateScalar, + description: + 'Date of an accident event related to the products and services contained in the claim.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.', + }, + locationAddress: { + type: require('./address.input.js'), + description: 'The physical location of the accident event.', + }, + locationReference: { + type: GraphQLString, + description: 'The physical location of the accident event.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitadditem.input.js b/src/resources/4_0_0/inputs/explanationofbenefitadditem.input.js new file mode 100644 index 00000000..5a8b3b5b --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitadditem.input.js @@ -0,0 +1,166 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitaddItem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitaddItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _itemSequence: { + type: require('./element.input.js'), + description: + 'Claim items which this service line is intended to replace.', + }, + itemSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Claim items which this service line is intended to replace.', + }, + _detailSequence: { + type: require('./element.input.js'), + description: + 'The sequence number of the details within the claim item which this line is intended to replace.', + }, + detailSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The sequence number of the details within the claim item which this line is intended to replace.', + }, + _subDetailSequence: { + type: require('./element.input.js'), + description: + 'The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.', + }, + subDetailSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.', + }, + provider: { + type: new GraphQLList(GraphQLString), + description: + 'The providers who are authorized for the services rendered to the patient.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Identifies the program under which this may be recovered.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + locationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Where the product or service was provided.', + }, + locationAddress: { + type: require('./address.input.js'), + description: 'Where the product or service was provided.', + }, + locationReference: { + type: GraphQLString, + description: 'Where the product or service was provided.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + bodySite: { + type: require('./codeableconcept.input.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + subSite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A region or surface of the bodySite, e.g. limb region or tooth surface(s).', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + detail: { + type: new GraphQLList( + require('./explanationofbenefitadditemdetail.input.js'), + ), + description: + 'The second-tier service adjudications for payor added services.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitadditemdetail.input.js b/src/resources/4_0_0/inputs/explanationofbenefitadditemdetail.input.js new file mode 100644 index 00000000..659ce4c8 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitadditemdetail.input.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitaddItemdetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitaddItemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + subDetail: { + type: new GraphQLList( + require('./explanationofbenefitadditemdetailsubdetail.input.js'), + ), + description: + 'The third-tier service adjudications for payor added services.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitadditemdetailsubdetail.input.js b/src/resources/4_0_0/inputs/explanationofbenefitadditemdetailsubdetail.input.js new file mode 100644 index 00000000..8d99c91f --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitadditemdetailsubdetail.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitaddItemdetailsubDetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitaddItemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitbenefitbalance.input.js b/src/resources/4_0_0/inputs/explanationofbenefitbenefitbalance.input.js new file mode 100644 index 00000000..5ae7c990 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitbenefitbalance.input.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefitbenefitBalance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitbenefitBalance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + _excluded: { + type: require('./element.input.js'), + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.', + }, + excluded: { + type: GraphQLBoolean, + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.', + }, + _name: { + type: require('./element.input.js'), + description: 'A short name or tag for the benefit.', + }, + name: { + type: GraphQLString, + description: 'A short name or tag for the benefit.', + }, + _description: { + type: require('./element.input.js'), + description: 'A richer description of the benefit or services covered.', + }, + description: { + type: GraphQLString, + description: 'A richer description of the benefit or services covered.', + }, + network: { + type: require('./codeableconcept.input.js'), + description: + 'Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.', + }, + unit: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates if the benefits apply to an individual or to the family.', + }, + term: { + type: require('./codeableconcept.input.js'), + description: + "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", + }, + financial: { + type: new GraphQLList( + require('./explanationofbenefitbenefitbalancefinancial.input.js'), + ), + description: 'Benefits Used to date.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitbenefitbalancefinancial.input.js b/src/resources/4_0_0/inputs/explanationofbenefitbenefitbalancefinancial.input.js new file mode 100644 index 00000000..d32d2ff6 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitbenefitbalancefinancial.input.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitbenefitBalancefinancial Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitbenefitBalancefinancial_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Classification of benefit being provided.', + }, + _allowedUnsignedInt: { + type: require('./element.input.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + _allowedString: { + type: require('./element.input.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedString: { + type: GraphQLString, + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedMoney: { + type: require('./money.input.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + _usedUnsignedInt: { + type: require('./element.input.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedMoney: { + type: require('./money.input.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitcareteam.input.js b/src/resources/4_0_0/inputs/explanationofbenefitcareteam.input.js new file mode 100644 index 00000000..c75e55c7 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitcareteam.input.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitcareTeam Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitcareTeam_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify care team entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify care team entries.', + }, + provider: { + type: new GraphQLNonNull(GraphQLString), + description: 'Member of the team who provided the product or service.', + }, + _responsible: { + type: require('./element.input.js'), + description: + 'The party who is billing and/or responsible for the claimed products or services.', + }, + responsible: { + type: GraphQLBoolean, + description: + 'The party who is billing and/or responsible for the claimed products or services.', + }, + role: { + type: require('./codeableconcept.input.js'), + description: + 'The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.', + }, + qualification: { + type: require('./codeableconcept.input.js'), + description: + 'The qualification of the practitioner which is applicable for this service.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitdiagnosis.input.js b/src/resources/4_0_0/inputs/explanationofbenefitdiagnosis.input.js new file mode 100644 index 00000000..e6c2ea7b --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitdiagnosis.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitdiagnosis Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitdiagnosis_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify diagnosis entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify diagnosis entries.', + }, + diagnosisCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + diagnosisReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'When the condition was observed or the relative ranking.', + }, + onAdmission: { + type: require('./codeableconcept.input.js'), + description: + 'Indication of whether the diagnosis was present on admission to a facility.', + }, + packageCode: { + type: require('./codeableconcept.input.js'), + description: + 'A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitinsurance.input.js b/src/resources/4_0_0/inputs/explanationofbenefitinsurance.input.js new file mode 100644 index 00000000..126222bf --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitinsurance.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefitinsurance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitinsurance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _focal: { + type: require('./element.input.js'), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + coverage: { + type: new GraphQLNonNull(GraphQLString), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _preAuthRef: { + type: require('./element.input.js'), + description: + 'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefititem.input.js b/src/resources/4_0_0/inputs/explanationofbenefititem.input.js new file mode 100644 index 00000000..510de89c --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefititem.input.js @@ -0,0 +1,198 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefititem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefititem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify item entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify item entries.', + }, + _careTeamSequence: { + type: require('./element.input.js'), + description: 'Care team members related to this service or product.', + }, + careTeamSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Care team members related to this service or product.', + }, + _diagnosisSequence: { + type: require('./element.input.js'), + description: 'Diagnoses applicable for this service or product.', + }, + diagnosisSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnoses applicable for this service or product.', + }, + _procedureSequence: { + type: require('./element.input.js'), + description: 'Procedures applicable for this service or product.', + }, + procedureSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Procedures applicable for this service or product.', + }, + _informationSequence: { + type: require('./element.input.js'), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product.', + }, + informationSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product.', + }, + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Identifies the program under which this may be recovered.', + }, + _servicedDate: { + type: require('./element.input.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedPeriod: { + type: require('./period.input.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + locationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Where the product or service was provided.', + }, + locationAddress: { + type: require('./address.input.js'), + description: 'Where the product or service was provided.', + }, + locationReference: { + type: GraphQLString, + description: 'Where the product or service was provided.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: 'Unique Device Identifiers associated with this line item.', + }, + bodySite: { + type: require('./codeableconcept.input.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + subSite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A region or surface of the bodySite, e.g. limb region or tooth surface(s).', + }, + encounter: { + type: new GraphQLList(GraphQLString), + description: + 'A billed item may include goods or services provided in multiple encounters.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + adjudication: { + type: new GraphQLList( + require('./explanationofbenefititemadjudication.input.js'), + ), + description: + 'If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.', + }, + detail: { + type: new GraphQLList( + require('./explanationofbenefititemdetail.input.js'), + ), + description: 'Second-tier of goods and services.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefititemadjudication.input.js b/src/resources/4_0_0/inputs/explanationofbenefititemadjudication.input.js new file mode 100644 index 00000000..3cb019db --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefititemadjudication.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefititemadjudication Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefititemadjudication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.', + }, + reason: { + type: require('./codeableconcept.input.js'), + description: + 'A code supporting the understanding of the adjudication result and explaining variance from expected amount.', + }, + amount: { + type: require('./money.input.js'), + description: 'Monetary amount associated with the category.', + }, + _value: { + type: require('./element.input.js'), + description: + 'A non-monetary value associated with the category. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value associated with the category. Mutually exclusive to the amount element above.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefititemdetail.input.js b/src/resources/4_0_0/inputs/explanationofbenefititemdetail.input.js new file mode 100644 index 00000000..0a1a8a7c --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefititemdetail.input.js @@ -0,0 +1,117 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefititemdetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefititemdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Identifies the program under which this may be recovered.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: 'Unique Device Identifiers associated with this line item.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + subDetail: { + type: new GraphQLList( + require('./explanationofbenefititemdetailsubdetail.input.js'), + ), + description: 'Third-tier of goods and services.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefititemdetailsubdetail.input.js b/src/resources/4_0_0/inputs/explanationofbenefititemdetailsubdetail.input.js new file mode 100644 index 00000000..9eb38029 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefititemdetailsubdetail.input.js @@ -0,0 +1,111 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefititemdetailsubDetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefititemdetailsubDetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + revenue: { + type: require('./codeableconcept.input.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Identifies the program under which this may be recovered.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.input.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.input.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: 'Unique Device Identifiers associated with this line item.', + }, + _noteNumber: { + type: require('./element.input.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitpayee.input.js b/src/resources/4_0_0/inputs/explanationofbenefitpayee.input.js new file mode 100644 index 00000000..10c40a78 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitpayee.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefitpayee Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitpayee_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Party to be reimbursed: Subscriber, provider, other.', + }, + party: { + type: GraphQLString, + description: + 'Reference to the individual or organization to whom any payment will be made.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitpayment.input.js b/src/resources/4_0_0/inputs/explanationofbenefitpayment.input.js new file mode 100644 index 00000000..073c9608 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitpayment.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitpayment Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitpayment_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Whether this represents partial or complete payment of the benefits payable.', + }, + adjustment: { + type: require('./money.input.js'), + description: + "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", + }, + adjustmentReason: { + type: require('./codeableconcept.input.js'), + description: 'Reason for the payment adjustment.', + }, + _date: { + type: require('./element.input.js'), + description: + 'Estimated date the payment will be issued or the actual issue date of payment.', + }, + date: { + type: DateScalar, + description: + 'Estimated date the payment will be issued or the actual issue date of payment.', + }, + amount: { + type: require('./money.input.js'), + description: 'Benefits payable less any payment adjustment.', + }, + identifier: { + type: require('./identifier.input.js'), + description: "Issuer's unique identifier for the payment instrument.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitprocedure.input.js b/src/resources/4_0_0/inputs/explanationofbenefitprocedure.input.js new file mode 100644 index 00000000..f04d2317 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitprocedure.input.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitprocedure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitprocedure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'A number to uniquely identify procedure entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify procedure entries.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'When the condition was observed or the relative ranking.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date and optionally time the procedure was performed.', + }, + date: { + type: DateTimeScalar, + description: 'Date and optionally time the procedure was performed.', + }, + procedureCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + }, + procedureReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + }, + udi: { + type: new GraphQLList(GraphQLString), + description: 'Unique Device Identifiers associated with this line item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitprocessnote.input.js b/src/resources/4_0_0/inputs/explanationofbenefitprocessnote.input.js new file mode 100644 index 00000000..e7844276 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitprocessnote.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitprocessNote Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitprocessNote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _number: { + type: require('./element.input.js'), + description: 'A number to uniquely identify a note entry.', + }, + number: { + type: PositiveIntScalar, + description: 'A number to uniquely identify a note entry.', + }, + _type: { + type: require('./element.input.js'), + description: 'The business purpose of the note text.', + }, + type: { + type: CodeScalar, + description: 'The business purpose of the note text.', + }, + _text: { + type: require('./element.input.js'), + description: + 'The explanation or description associated with the processing.', + }, + text: { + type: GraphQLString, + description: + 'The explanation or description associated with the processing.', + }, + language: { + type: require('./codeableconcept.input.js'), + description: + 'A code to define the language used in the text of the note.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitrelated.input.js b/src/resources/4_0_0/inputs/explanationofbenefitrelated.input.js new file mode 100644 index 00000000..b5d7e284 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitrelated.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefitrelated Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitrelated_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + claim: { + type: GraphQLString, + description: 'Reference to a related claim.', + }, + relationship: { + type: require('./codeableconcept.input.js'), + description: 'A code to convey how the claims are related.', + }, + reference: { + type: require('./identifier.input.js'), + description: + 'An alternate organizational reference to the case or file to which this particular claim pertains.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefitsupportinginfo.input.js b/src/resources/4_0_0/inputs/explanationofbenefitsupportinginfo.input.js new file mode 100644 index 00000000..084ca6b4 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefitsupportinginfo.input.js @@ -0,0 +1,112 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitsupportingInfo Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefitsupportingInfo_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: + 'A number to uniquely identify supporting information entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify supporting information entries.', + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.', + }, + _timingDate: { + type: require('./element.input.js'), + description: 'The date when or period to which this information refers.', + }, + timingDate: { + type: DateScalar, + description: 'The date when or period to which this information refers.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: 'The date when or period to which this information refers.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueString: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueReference: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + reason: { + type: require('./coding.input.js'), + description: + 'Provides the reason in the situation where a reason code is required in addition to the content.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/explanationofbenefittotal.input.js b/src/resources/4_0_0/inputs/explanationofbenefittotal.input.js new file mode 100644 index 00000000..9cb9ede8 --- /dev/null +++ b/src/resources/4_0_0/inputs/explanationofbenefittotal.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefittotal Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ExplanationOfBenefittotal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.', + }, + amount: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'Monetary total amount associated with the category.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/expression.input.js b/src/resources/4_0_0/inputs/expression.input.js new file mode 100644 index 00000000..bf15beb9 --- /dev/null +++ b/src/resources/4_0_0/inputs/expression.input.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Expression Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Expression_Input', + description: + 'Base StructureDefinition for Expression Type: A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.', + }, + name: { + type: IdScalar, + description: + 'A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.', + }, + _language: { + type: require('./element.input.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: new GraphQLNonNull(CodeScalar), + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'An expression in the specified language that returns a value.', + }, + expression: { + type: GraphQLString, + description: + 'An expression in the specified language that returns a value.', + }, + _reference: { + type: require('./element.input.js'), + description: 'A URI that defines where the expression is found.', + }, + reference: { + type: UriScalar, + description: 'A URI that defines where the expression is found.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/extension.input.js b/src/resources/4_0_0/inputs/extension.input.js new file mode 100644 index 00000000..a2af9f25 --- /dev/null +++ b/src/resources/4_0_0/inputs/extension.input.js @@ -0,0 +1,400 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary Extension Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Extension_Input', + description: + 'Base StructureDefinition for Extension Type: Optional Extension Element - found in all resources.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _url: { + type: require('./element.input.js'), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + url: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueCanonical: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCanonical: { + type: CanonicalScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueCode: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCode: { + type: CodeScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDate: { + type: DateScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueId: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueId: { + type: IdScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueInstant: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueInstant: { + type: InstantScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueInteger: { + type: GraphQLInt, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueMarkdown: { + type: GraphQLString, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueOid: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueOid: { + type: OidScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueString: { + type: GraphQLString, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueTime: { + type: TimeScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUri: { + type: UriScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueUrl: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUrl: { + type: UrlScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueUuid: { + type: require('./element.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUuid: { + type: UuidScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueAddress: { + type: require('./address.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueAge: { + type: require('./age.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueAnnotation: { + type: require('./annotation.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCoding: { + type: require('./coding.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCount: { + type: require('./count.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDistance: { + type: require('./distance.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDuration: { + type: require('./duration.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueHumanName: { + type: require('./humanname.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueIdentifier: { + type: require('./identifier.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueMoney: { + type: require('./money.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueReference: { + type: GraphQLString, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueSignature: { + type: require('./signature.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueTiming: { + type: require('./timing.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueContactDetail: { + type: require('./contactdetail.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueContributor: { + type: require('./contributor.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDataRequirement: { + type: require('./datarequirement.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueExpression: { + type: require('./expression.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueParameterDefinition: { + type: require('./parameterdefinition.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueRelatedArtifact: { + type: require('./relatedartifact.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueTriggerDefinition: { + type: require('./triggerdefinition.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUsageContext: { + type: require('./usagecontext.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDosage: { + type: require('./dosage.input.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/familymemberhistory.input.js b/src/resources/4_0_0/inputs/familymemberhistory.input.js new file mode 100644 index 00000000..29227e46 --- /dev/null +++ b/src/resources/4_0_0/inputs/familymemberhistory.input.js @@ -0,0 +1,271 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary FamilyMemberHistory Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'FamilyMemberHistory_Input', + description: + 'Significant health conditions for a person related to the patient relevant in the context of care for the patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'FamilyMemberHistory_Enum_input', + values: { FamilyMemberHistory: { value: 'FamilyMemberHistory' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying the status of the record of the family history of a specific family member.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the status of the record of the family history of a specific family member.', + }, + dataAbsentReason: { + type: require('./codeableconcept.input.js'), + description: + "Describes why the family member's history is not available.", + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person who this history concerns.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and possibly time) when the family member history was recorded or last updated.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and possibly time) when the family member history was recorded or last updated.', + }, + _name: { + type: require('./element.input.js'), + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + name: { + type: GraphQLString, + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + relationship: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The type of relationship this person has to the patient (father, mother, brother etc.).', + }, + sex: { + type: require('./codeableconcept.input.js'), + description: 'The birth sex of the family member.', + }, + bornPeriod: { + type: require('./period.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + _bornDate: { + type: require('./element.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornDate: { + type: DateScalar, + description: 'The actual or approximate date of birth of the relative.', + }, + _bornString: { + type: require('./element.input.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornString: { + type: GraphQLString, + description: 'The actual or approximate date of birth of the relative.', + }, + ageAge: { + type: require('./age.input.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + ageRange: { + type: require('./range.input.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + _ageString: { + type: require('./element.input.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + ageString: { + type: GraphQLString, + description: + 'The age of the relative at the time the family member history is recorded.', + }, + _estimatedAge: { + type: require('./element.input.js'), + description: + 'If true, indicates that the age value specified is an estimated value.', + }, + estimatedAge: { + type: GraphQLBoolean, + description: + 'If true, indicates that the age value specified is an estimated value.', + }, + _deceasedBoolean: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedAge: { + type: require('./age.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedRange: { + type: require('./range.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedDate: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedDate: { + type: DateScalar, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedString: { + type: require('./element.input.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedString: { + type: GraphQLString, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Describes why the family member history occurred in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', + }, + condition: { + type: new GraphQLList(require('./familymemberhistorycondition.input.js')), + description: + 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/familymemberhistorycondition.input.js b/src/resources/4_0_0/inputs/familymemberhistorycondition.input.js new file mode 100644 index 00000000..00ebbe37 --- /dev/null +++ b/src/resources/4_0_0/inputs/familymemberhistorycondition.input.js @@ -0,0 +1,88 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary FamilyMemberHistorycondition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'FamilyMemberHistorycondition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", + }, + outcome: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates what happened following the condition. If the condition resulted in death, deceased date is captured on the relation.', + }, + _contributedToDeath: { + type: require('./element.input.js'), + description: + 'This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.', + }, + contributedToDeath: { + type: GraphQLBoolean, + description: + 'This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.', + }, + onsetAge: { + type: require('./age.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetRange: { + type: require('./range.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetPeriod: { + type: require('./period.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + _onsetString: { + type: require('./element.input.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetString: { + type: GraphQLString, + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'An area where general notes can be placed about this specific condition.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/flag.input.js b/src/resources/4_0_0/inputs/flag.input.js new file mode 100644 index 00000000..4d664219 --- /dev/null +++ b/src/resources/4_0_0/inputs/flag.input.js @@ -0,0 +1,125 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Flag Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Flag_Input', + description: + 'Prospective warnings of potential issues when providing care to the patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Flag_Enum_input', + values: { Flag: { value: 'Flag' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.input.js'), + description: 'Supports basic workflow.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Supports basic workflow.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Allows a flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The coded value or textual component of the flag to display to the user.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient, location, group, organization, or practitioner etc. this is about record this flag is associated with.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', + }, + encounter: { + type: GraphQLString, + description: 'This alert is only relevant during the encounter.', + }, + author: { + type: GraphQLString, + description: 'The person, organization or device that created the flag.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/goal.input.js b/src/resources/4_0_0/inputs/goal.input.js new file mode 100644 index 00000000..8d30baed --- /dev/null +++ b/src/resources/4_0_0/inputs/goal.input.js @@ -0,0 +1,182 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Goal Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Goal_Input', + description: + 'Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Goal_Enum_input', + values: { Goal: { value: 'Goal' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _lifecycleStatus: { + type: require('./element.input.js'), + description: 'The state of the goal throughout its lifecycle.', + }, + lifecycleStatus: { + type: new GraphQLNonNull(CodeScalar), + description: 'The state of the goal throughout its lifecycle.', + }, + achievementStatus: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the progression, or lack thereof, towards the goal against the target.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Indicates a category the goal falls within.', + }, + priority: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', + }, + description: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the patient, group or organization for whom the goal is being established.', + }, + _startDate: { + type: require('./element.input.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + startDate: { + type: DateScalar, + description: + 'The date or event after which the goal should begin being pursued.', + }, + startCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + target: { + type: new GraphQLList(require('./goaltarget.input.js')), + description: 'Indicates what should be done by when.', + }, + _statusDate: { + type: require('./element.input.js'), + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + statusDate: { + type: DateScalar, + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + _statusReason: { + type: require('./element.input.js'), + description: 'Captures the reason for the current status.', + }, + statusReason: { + type: GraphQLString, + description: 'Captures the reason for the current status.', + }, + expressedBy: { + type: GraphQLString, + description: + 'Indicates whose goal this is - patient goal, practitioner goal, etc.', + }, + addresses: { + type: new GraphQLList(GraphQLString), + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Any comments related to the goal.', + }, + outcomeCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies the change (or lack of change) at the point when the status of the goal is assessed.', + }, + outcomeReference: { + type: new GraphQLList(GraphQLString), + description: "Details of what's changed (or not changed).", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/goaltarget.input.js b/src/resources/4_0_0/inputs/goaltarget.input.js new file mode 100644 index 00000000..84336fbc --- /dev/null +++ b/src/resources/4_0_0/inputs/goaltarget.input.js @@ -0,0 +1,109 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Goaltarget Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Goaltarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + measure: { + type: require('./codeableconcept.input.js'), + description: + 'The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.', + }, + detailQuantity: { + type: require('./quantity.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailRange: { + type: require('./range.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _detailString: { + type: require('./element.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailString: { + type: GraphQLString, + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _detailBoolean: { + type: require('./element.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailBoolean: { + type: GraphQLBoolean, + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _detailInteger: { + type: require('./element.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailInteger: { + type: GraphQLInt, + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailRatio: { + type: require('./ratio.input.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _dueDate: { + type: require('./element.input.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + dueDate: { + type: DateScalar, + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + dueDuration: { + type: require('./duration.input.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/graphdefinition.input.js b/src/resources/4_0_0/inputs/graphdefinition.input.js new file mode 100644 index 00000000..5f492b87 --- /dev/null +++ b/src/resources/4_0_0/inputs/graphdefinition.input.js @@ -0,0 +1,214 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary GraphDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'GraphDefinition_Input', + description: + 'A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'GraphDefinition_Enum_input', + values: { GraphDefinition: { value: 'GraphDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this graph definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this graph definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the graph definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the graph definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the graph definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the graph definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the graph definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the graph definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate graph definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the graph definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this graph definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this graph definition is needed and why it has been designed as it has.', + }, + _start: { + type: require('./element.input.js'), + description: + 'The type of FHIR resource at which instances of this graph start.', + }, + start: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of FHIR resource at which instances of this graph start.', + }, + _profile: { + type: require('./element.input.js'), + description: 'The profile that describes the use of the base resource.', + }, + profile: { + type: CanonicalScalar, + description: 'The profile that describes the use of the base resource.', + }, + link: { + type: new GraphQLList(require('./graphdefinitionlink.input.js')), + description: 'Links this graph makes rules about.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/graphdefinitionlink.input.js b/src/resources/4_0_0/inputs/graphdefinitionlink.input.js new file mode 100644 index 00000000..d0568551 --- /dev/null +++ b/src/resources/4_0_0/inputs/graphdefinitionlink.input.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary GraphDefinitionlink Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'GraphDefinitionlink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _path: { + type: require('./element.input.js'), + description: + 'A FHIR expression that identifies one of FHIR References to other resources.', + }, + path: { + type: GraphQLString, + description: + 'A FHIR expression that identifies one of FHIR References to other resources.', + }, + _sliceName: { + type: require('./element.input.js'), + description: 'Which slice (if profiled).', + }, + sliceName: { + type: GraphQLString, + description: 'Which slice (if profiled).', + }, + _min: { + type: require('./element.input.js'), + description: 'Minimum occurrences for this link.', + }, + min: { + type: GraphQLInt, + description: 'Minimum occurrences for this link.', + }, + _max: { + type: require('./element.input.js'), + description: 'Maximum occurrences for this link.', + }, + max: { + type: GraphQLString, + description: 'Maximum occurrences for this link.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Information about why this link is of interest in this graph definition.', + }, + description: { + type: GraphQLString, + description: + 'Information about why this link is of interest in this graph definition.', + }, + target: { + type: new GraphQLList(require('./graphdefinitionlinktarget.input.js')), + description: 'Potential target for the link.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/graphdefinitionlinktarget.input.js b/src/resources/4_0_0/inputs/graphdefinitionlinktarget.input.js new file mode 100644 index 00000000..ad90d9aa --- /dev/null +++ b/src/resources/4_0_0/inputs/graphdefinitionlinktarget.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary GraphDefinitionlinktarget Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'GraphDefinitionlinktarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'Type of resource this link refers to.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'Type of resource this link refers to.', + }, + _params: { + type: require('./element.input.js'), + description: 'A set of parameters to look up.', + }, + params: { + type: GraphQLString, + description: 'A set of parameters to look up.', + }, + _profile: { + type: require('./element.input.js'), + description: 'Profile for the target resource.', + }, + profile: { + type: CanonicalScalar, + description: 'Profile for the target resource.', + }, + compartment: { + type: new GraphQLList( + require('./graphdefinitionlinktargetcompartment.input.js'), + ), + description: 'Compartment Consistency Rules.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/graphdefinitionlinktargetcompartment.input.js b/src/resources/4_0_0/inputs/graphdefinitionlinktargetcompartment.input.js new file mode 100644 index 00000000..9e7684fe --- /dev/null +++ b/src/resources/4_0_0/inputs/graphdefinitionlinktargetcompartment.input.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary GraphDefinitionlinktargetcompartment Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'GraphDefinitionlinktargetcompartment_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _use: { + type: require('./element.input.js'), + description: + 'Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.', + }, + _code: { + type: require('./element.input.js'), + description: 'Identifies the compartment.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the compartment.', + }, + _rule: { + type: require('./element.input.js'), + description: 'identical | matching | different | no-rule | custom.', + }, + rule: { + type: new GraphQLNonNull(CodeScalar), + description: 'identical | matching | different | no-rule | custom.', + }, + _expression: { + type: require('./element.input.js'), + description: 'Custom rule, as a FHIRPath expression.', + }, + expression: { + type: GraphQLString, + description: 'Custom rule, as a FHIRPath expression.', + }, + _description: { + type: require('./element.input.js'), + description: 'Documentation for FHIRPath expression.', + }, + description: { + type: GraphQLString, + description: 'Documentation for FHIRPath expression.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/group.input.js b/src/resources/4_0_0/inputs/group.input.js new file mode 100644 index 00000000..365939e0 --- /dev/null +++ b/src/resources/4_0_0/inputs/group.input.js @@ -0,0 +1,160 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Group Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Group_Input', + description: + "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Group_Enum_input', + values: { Group: { value: 'Group' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'A unique business identifier for this group.', + }, + _active: { + type: require('./element.input.js'), + description: + 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', + }, + active: { + type: GraphQLBoolean, + description: + 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', + }, + _type: { + type: require('./element.input.js'), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + _actual: { + type: require('./element.input.js'), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + actual: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", + }, + _name: { + type: require('./element.input.js'), + description: + 'A label assigned to the group for human identification and communication.', + }, + name: { + type: GraphQLString, + description: + 'A label assigned to the group for human identification and communication.', + }, + _quantity: { + type: require('./element.input.js'), + description: + 'A count of the number of resource instances that are part of the group.', + }, + quantity: { + type: UnsignedIntScalar, + description: + 'A count of the number of resource instances that are part of the group.', + }, + managingEntity: { + type: GraphQLString, + description: + 'Entity responsible for defining and maintaining Group characteristics and/or registered members.', + }, + characteristic: { + type: new GraphQLList(require('./groupcharacteristic.input.js')), + description: + 'Identifies traits whose presence r absence is shared by members of the group.', + }, + member: { + type: new GraphQLList(require('./groupmember.input.js')), + description: + 'Identifies the resource instances that are members of the group.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/groupcharacteristic.input.js b/src/resources/4_0_0/inputs/groupcharacteristic.input.js new file mode 100644 index 00000000..9dfedc04 --- /dev/null +++ b/src/resources/4_0_0/inputs/groupcharacteristic.input.js @@ -0,0 +1,87 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Groupcharacteristic Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Groupcharacteristic_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code that identifies the kind of trait being asserted.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _exclude: { + type: require('./element.input.js'), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + exclude: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/groupmember.input.js b/src/resources/4_0_0/inputs/groupmember.input.js new file mode 100644 index 00000000..870fe3a4 --- /dev/null +++ b/src/resources/4_0_0/inputs/groupmember.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Groupmember Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Groupmember_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + entity: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.', + }, + period: { + type: require('./period.input.js'), + description: 'The period that the member was in the group, if known.', + }, + _inactive: { + type: require('./element.input.js'), + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + inactive: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/guidanceresponse.input.js b/src/resources/4_0_0/inputs/guidanceresponse.input.js new file mode 100644 index 00000000..84667a6e --- /dev/null +++ b/src/resources/4_0_0/inputs/guidanceresponse.input.js @@ -0,0 +1,188 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary GuidanceResponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'GuidanceResponse_Input', + description: + 'A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'GuidanceResponse_Enum_input', + values: { GuidanceResponse: { value: 'GuidanceResponse' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + requestIdentifier: { + type: require('./identifier.input.js'), + description: + 'The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Allows a service to provide unique, business identifiers for the response.', + }, + _moduleUri: { + type: require('./element.input.js'), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + moduleUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + _moduleCanonical: { + type: require('./element.input.js'), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + moduleCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + moduleCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', + }, + subject: { + type: GraphQLString, + description: 'The patient for which the request was processed.', + }, + encounter: { + type: GraphQLString, + description: + 'The encounter during which this response was created or to which the creation of this record is tightly associated.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'Indicates when the guidance response was processed.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'Indicates when the guidance response was processed.', + }, + performer: { + type: GraphQLString, + description: + 'Provides a reference to the device that performed the guidance.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Describes the reason for the guidance response in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Provides a mechanism to communicate additional information about the response.', + }, + evaluationMessage: { + type: new GraphQLList(GraphQLString), + description: + 'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.', + }, + outputParameters: { + type: GraphQLString, + description: + 'The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.', + }, + result: { + type: GraphQLString, + description: + 'The actions, if any, produced by the evaluation of the artifact.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: + 'If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/healthcareservice.input.js b/src/resources/4_0_0/inputs/healthcareservice.input.js new file mode 100644 index 00000000..3c86eb7b --- /dev/null +++ b/src/resources/4_0_0/inputs/healthcareservice.input.js @@ -0,0 +1,233 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary HealthcareService Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'HealthcareService_Input', + description: 'The details of a healthcare service available at a location.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'HealthcareService_Enum_input', + values: { HealthcareService: { value: 'HealthcareService' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'External identifiers for this item.', + }, + _active: { + type: require('./element.input.js'), + description: + 'This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.', + }, + active: { + type: GraphQLBoolean, + description: + 'This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.', + }, + providedBy: { + type: GraphQLString, + description: 'The organization that provides this healthcare service.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies the broad category of service being performed or delivered.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specific type of service that may be delivered or performed.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Collection of specialties handled by the service site. This is more of a medical term.', + }, + location: { + type: new GraphQLList(GraphQLString), + description: + 'The location(s) where this healthcare service may be provided.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + name: { + type: GraphQLString, + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + comment: { + type: GraphQLString, + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + _extraDetails: { + type: require('./element.input.js'), + description: + "Extra details about the service that can't be placed in the other fields.", + }, + extraDetails: { + type: GraphQLString, + description: + "Extra details about the service that can't be placed in the other fields.", + }, + photo: { + type: require('./attachment.input.js'), + description: + 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'List of contacts related to this specific healthcare service.', + }, + coverageArea: { + type: new GraphQLList(GraphQLString), + description: + 'The location(s) that this service is available to (not where the service is provided).', + }, + serviceProvisionCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The code(s) that detail the conditions under which the healthcare service is available/offered.', + }, + eligibility: { + type: new GraphQLList(require('./healthcareserviceeligibility.input.js')), + description: + 'Does this service have specific eligibility requirements that need to be met in order to use the service?', + }, + program: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Programs that this service is applicable to.', + }, + characteristic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Collection of characteristics (attributes).', + }, + communication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.', + }, + referralMethod: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', + }, + _appointmentRequired: { + type: require('./element.input.js'), + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + appointmentRequired: { + type: GraphQLBoolean, + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + availableTime: { + type: new GraphQLList( + require('./healthcareserviceavailabletime.input.js'), + ), + description: 'A collection of times that the Service Site is available.', + }, + notAvailable: { + type: new GraphQLList( + require('./healthcareservicenotavailable.input.js'), + ), + description: + 'The HealthcareService is not available during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.input.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/healthcareserviceavailabletime.input.js b/src/resources/4_0_0/inputs/healthcareserviceavailabletime.input.js new file mode 100644 index 00000000..1227ab51 --- /dev/null +++ b/src/resources/4_0_0/inputs/healthcareserviceavailabletime.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary HealthcareServiceavailableTime Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'HealthcareServiceavailableTime_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _daysOfWeek: { + type: require('./element.input.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.input.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.input.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.input.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/healthcareserviceeligibility.input.js b/src/resources/4_0_0/inputs/healthcareserviceeligibility.input.js new file mode 100644 index 00000000..d3760c11 --- /dev/null +++ b/src/resources/4_0_0/inputs/healthcareserviceeligibility.input.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary HealthcareServiceeligibility Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'HealthcareServiceeligibility_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'Coded value for the eligibility.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Describes the eligibility conditions for the service.', + }, + comment: { + type: GraphQLString, + description: 'Describes the eligibility conditions for the service.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/healthcareservicenotavailable.input.js b/src/resources/4_0_0/inputs/healthcareservicenotavailable.input.js new file mode 100644 index 00000000..d7331a5e --- /dev/null +++ b/src/resources/4_0_0/inputs/healthcareservicenotavailable.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary HealthcareServicenotAvailable Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'HealthcareServicenotAvailable_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.input.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/humanname.input.js b/src/resources/4_0_0/inputs/humanname.input.js new file mode 100644 index 00000000..31eb3237 --- /dev/null +++ b/src/resources/4_0_0/inputs/humanname.input.js @@ -0,0 +1,94 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary HumanName Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'HumanName_Input', + description: + "Base StructureDefinition for HumanName Type: A human's name with the ability to identify parts and usage.", + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _use: { + type: require('./element.input.js'), + description: 'Identifies the purpose for this name.', + }, + use: { + type: CodeScalar, + description: 'Identifies the purpose for this name.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.', + }, + text: { + type: GraphQLString, + description: + 'Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.', + }, + _family: { + type: require('./element.input.js'), + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + family: { + type: GraphQLString, + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + _given: { + type: require('./element.input.js'), + description: 'Given name.', + }, + given: { + type: new GraphQLList(GraphQLString), + description: 'Given name.', + }, + _prefix: { + type: require('./element.input.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + prefix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + _suffix: { + type: require('./element.input.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + suffix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + period: { + type: require('./period.input.js'), + description: + 'Indicates the period of time when this name was valid for the named person.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/identifier.input.js b/src/resources/4_0_0/inputs/identifier.input.js new file mode 100644 index 00000000..3d330b7c --- /dev/null +++ b/src/resources/4_0_0/inputs/identifier.input.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Identifier Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Identifier_Input', + description: + 'Base StructureDefinition for Identifier Type: An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _use: { + type: require('./element.input.js'), + description: 'The purpose of this identifier.', + }, + use: { + type: CodeScalar, + description: 'The purpose of this identifier.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', + }, + system: { + type: UriScalar, + description: + 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', + }, + value: { + type: GraphQLString, + description: + 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', + }, + period: { + type: require('./period.input.js'), + description: 'Time period during which identifier is/was valid for use.', + }, + assigner: { + type: GraphQLString, + description: 'Organization that issued/manages the identifier.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/imagingstudy.input.js b/src/resources/4_0_0/inputs/imagingstudy.input.js new file mode 100644 index 00000000..1e4a15bb --- /dev/null +++ b/src/resources/4_0_0/inputs/imagingstudy.input.js @@ -0,0 +1,203 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ImagingStudy Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImagingStudy_Input', + description: + 'Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingStudy_Enum_input', + values: { ImagingStudy: { value: 'ImagingStudy' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers for the ImagingStudy such as DICOM Study Instance UID, and Accession Number.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the ImagingStudy.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the ImagingStudy.', + }, + modality: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A list of all the series.modality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The subject, typically a patient, of the imaging study.', + }, + encounter: { + type: GraphQLString, + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.', + }, + _started: { + type: require('./element.input.js'), + description: 'Date and time the study started.', + }, + started: { + type: DateTimeScalar, + description: 'Date and time the study started.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A list of the diagnostic requests that resulted in this imaging study being performed.', + }, + referrer: { + type: GraphQLString, + description: 'The requesting/referring physician.', + }, + interpreter: { + type: new GraphQLList(GraphQLString), + description: + 'Who read the study and interpreted the images or other content.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.', + }, + _numberOfSeries: { + type: require('./element.input.js'), + description: + 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', + }, + numberOfSeries: { + type: UnsignedIntScalar, + description: + 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', + }, + _numberOfInstances: { + type: require('./element.input.js'), + description: + 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + numberOfInstances: { + type: UnsignedIntScalar, + description: + 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + procedureReference: { + type: GraphQLString, + description: 'The procedure which this ImagingStudy was part of.', + }, + procedureCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The code for the performed procedure type.', + }, + location: { + type: GraphQLString, + description: + 'The principal physical location where the ImagingStudy was performed.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Description of clinical condition indicating why the ImagingStudy was requested.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies this Study.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.', + }, + description: { + type: GraphQLString, + description: + 'The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.', + }, + series: { + type: new GraphQLList(require('./imagingstudyseries.input.js')), + description: + 'Each study has one or more series of images or other content.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/imagingstudyseries.input.js b/src/resources/4_0_0/inputs/imagingstudyseries.input.js new file mode 100644 index 00000000..35e62069 --- /dev/null +++ b/src/resources/4_0_0/inputs/imagingstudyseries.input.js @@ -0,0 +1,116 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ImagingStudyseries Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImagingStudyseries_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _uid: { + type: require('./element.input.js'), + description: 'The DICOM Series Instance UID for the series.', + }, + uid: { + type: new GraphQLNonNull(IdScalar), + description: 'The DICOM Series Instance UID for the series.', + }, + _number: { + type: require('./element.input.js'), + description: 'The numeric identifier of this series in the study.', + }, + number: { + type: UnsignedIntScalar, + description: 'The numeric identifier of this series in the study.', + }, + modality: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The modality of this series sequence.', + }, + _description: { + type: require('./element.input.js'), + description: 'A description of the series.', + }, + description: { + type: GraphQLString, + description: 'A description of the series.', + }, + _numberOfInstances: { + type: require('./element.input.js'), + description: + 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + numberOfInstances: { + type: UnsignedIntScalar, + description: + 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.', + }, + bodySite: { + type: require('./coding.input.js'), + description: + 'The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.', + }, + laterality: { + type: require('./coding.input.js'), + description: + 'The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.', + }, + specimen: { + type: new GraphQLList(GraphQLString), + description: + 'The specimen imaged, e.g., for whole slide imaging of a biopsy.', + }, + _started: { + type: require('./element.input.js'), + description: 'The date and time the series was started.', + }, + started: { + type: DateTimeScalar, + description: 'The date and time the series was started.', + }, + performer: { + type: new GraphQLList(require('./imagingstudyseriesperformer.input.js')), + description: + 'Indicates who or what performed the series and how they were involved.', + }, + instance: { + type: new GraphQLList(require('./imagingstudyseriesinstance.input.js')), + description: + 'A single SOP instance within the series, e.g. an image, or presentation state.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/imagingstudyseriesinstance.input.js b/src/resources/4_0_0/inputs/imagingstudyseriesinstance.input.js new file mode 100644 index 00000000..346253d1 --- /dev/null +++ b/src/resources/4_0_0/inputs/imagingstudyseriesinstance.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ImagingStudyseriesinstance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImagingStudyseriesinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _uid: { + type: require('./element.input.js'), + description: + 'The DICOM SOP Instance UID for this image or other DICOM content.', + }, + uid: { + type: new GraphQLNonNull(IdScalar), + description: + 'The DICOM SOP Instance UID for this image or other DICOM content.', + }, + sopClass: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'DICOM instance type.', + }, + _number: { + type: require('./element.input.js'), + description: 'The number of instance in the series.', + }, + number: { + type: UnsignedIntScalar, + description: 'The number of instance in the series.', + }, + _title: { + type: require('./element.input.js'), + description: 'The description of the instance.', + }, + title: { + type: GraphQLString, + description: 'The description of the instance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/imagingstudyseriesperformer.input.js b/src/resources/4_0_0/inputs/imagingstudyseriesperformer.input.js new file mode 100644 index 00000000..76f6bc7e --- /dev/null +++ b/src/resources/4_0_0/inputs/imagingstudyseriesperformer.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ImagingStudyseriesperformer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImagingStudyseriesperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.input.js'), + description: + 'Distinguishes the type of involvement of the performer in the series.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: 'Indicates who or what performed the series.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunization.input.js b/src/resources/4_0_0/inputs/immunization.input.js new file mode 100644 index 00000000..48b0511f --- /dev/null +++ b/src/resources/4_0_0/inputs/immunization.input.js @@ -0,0 +1,253 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Immunization Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Immunization_Input', + description: + 'Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Immunization_Enum_input', + values: { Immunization: { value: 'Immunization' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'A unique identifier assigned to this immunization record.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current status of the immunization event.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current status of the immunization event.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the reason the immunization event was not performed.', + }, + vaccineCode: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Vaccine that was administered or was to be administered.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The patient who either received or did not receive the immunization.', + }, + encounter: { + type: GraphQLString, + description: + 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'Date vaccine administered or was to be administered.', + }, + occurrenceDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'Date vaccine administered or was to be administered.', + }, + _occurrenceString: { + type: require('./element.input.js'), + description: 'Date vaccine administered or was to be administered.', + }, + occurrenceString: { + type: new GraphQLNonNull(GraphQLString), + description: 'Date vaccine administered or was to be administered.', + }, + _recorded: { + type: require('./element.input.js'), + description: + 'The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event.', + }, + recorded: { + type: DateTimeScalar, + description: + 'The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event.', + }, + _primarySource: { + type: require('./element.input.js'), + description: + 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', + }, + primarySource: { + type: GraphQLBoolean, + description: + 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', + }, + reportOrigin: { + type: require('./codeableconcept.input.js'), + description: + 'The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.', + }, + location: { + type: GraphQLString, + description: + 'The service delivery location where the vaccine administration occurred.', + }, + manufacturer: { + type: GraphQLString, + description: 'Name of vaccine manufacturer.', + }, + _lotNumber: { + type: require('./element.input.js'), + description: 'Lot number of the vaccine product.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number of the vaccine product.', + }, + _expirationDate: { + type: require('./element.input.js'), + description: 'Date vaccine batch expires.', + }, + expirationDate: { + type: DateScalar, + description: 'Date vaccine batch expires.', + }, + site: { + type: require('./codeableconcept.input.js'), + description: 'Body site where vaccine was administered.', + }, + route: { + type: require('./codeableconcept.input.js'), + description: + 'The path by which the vaccine product is taken into the body.', + }, + doseQuantity: { + type: require('./quantity.input.js'), + description: 'The quantity of vaccine product that was administered.', + }, + performer: { + type: new GraphQLList(require('./immunizationperformer.input.js')), + description: 'Indicates who performed the immunization event.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the immunization that is not conveyed by the other attributes.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reasons why the vaccine was administered.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Condition, Observation or DiagnosticReport that supports why the immunization was administered.', + }, + _isSubpotent: { + type: require('./element.input.js'), + description: + 'Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.', + }, + isSubpotent: { + type: GraphQLBoolean, + description: + 'Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.', + }, + subpotentReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Reason why a dose is considered to be subpotent.', + }, + education: { + type: new GraphQLList(require('./immunizationeducation.input.js')), + description: + 'Educational material presented to the patient (or guardian) at the time of vaccine administration.', + }, + programEligibility: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: "Indicates a patient's eligibility for a funding program.", + }, + fundingSource: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).', + }, + reaction: { + type: new GraphQLList(require('./immunizationreaction.input.js')), + description: + 'Categorical data indicating that an adverse event is associated in time to an immunization.', + }, + protocolApplied: { + type: new GraphQLList(require('./immunizationprotocolapplied.input.js')), + description: + 'The protocol (set of recommendations) being followed by the provider who administered the dose.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunizationeducation.input.js b/src/resources/4_0_0/inputs/immunizationeducation.input.js new file mode 100644 index 00000000..d72b0a63 --- /dev/null +++ b/src/resources/4_0_0/inputs/immunizationeducation.input.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Immunizationeducation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Immunizationeducation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _documentType: { + type: require('./element.input.js'), + description: 'Identifier of the material presented to the patient.', + }, + documentType: { + type: GraphQLString, + description: 'Identifier of the material presented to the patient.', + }, + _reference: { + type: require('./element.input.js'), + description: + 'Reference pointer to the educational material given to the patient if the information was on line.', + }, + reference: { + type: UriScalar, + description: + 'Reference pointer to the educational material given to the patient if the information was on line.', + }, + _publicationDate: { + type: require('./element.input.js'), + description: 'Date the educational material was published.', + }, + publicationDate: { + type: DateTimeScalar, + description: 'Date the educational material was published.', + }, + _presentationDate: { + type: require('./element.input.js'), + description: 'Date the educational material was given to the patient.', + }, + presentationDate: { + type: DateTimeScalar, + description: 'Date the educational material was given to the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunizationevaluation.input.js b/src/resources/4_0_0/inputs/immunizationevaluation.input.js new file mode 100644 index 00000000..ce10aa0a --- /dev/null +++ b/src/resources/4_0_0/inputs/immunizationevaluation.input.js @@ -0,0 +1,191 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ImmunizationEvaluation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImmunizationEvaluation_Input', + description: + "Describes a comparison of an immunization event against published recommendations to determine if the administration is 'valid' in relation to those recommendations.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImmunizationEvaluation_Enum_input', + values: { + ImmunizationEvaluation: { value: 'ImmunizationEvaluation' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A unique identifier assigned to this immunization evaluation record.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Indicates the current status of the evaluation of the vaccination administration event.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the current status of the evaluation of the vaccination administration event.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The individual for whom the evaluation is being done.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date the evaluation of the vaccine administration event was performed.', + }, + date: { + type: DateTimeScalar, + description: + 'The date the evaluation of the vaccine administration event was performed.', + }, + authority: { + type: GraphQLString, + description: + 'Indicates the authority who published the protocol (e.g. ACIP).', + }, + targetDisease: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The vaccine preventable disease the dose is being evaluated against.', + }, + immunizationEvent: { + type: new GraphQLNonNull(GraphQLString), + description: 'The vaccine administration event being evaluated.', + }, + doseStatus: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Indicates if the dose is valid or not valid with respect to the published recommendations.', + }, + doseStatusReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.', + }, + _description: { + type: require('./element.input.js'), + description: 'Additional information about the evaluation.', + }, + description: { + type: GraphQLString, + description: 'Additional information about the evaluation.', + }, + _series: { + type: require('./element.input.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + _doseNumberPositiveInt: { + type: require('./element.input.js'), + description: 'Nominal position in a series.', + }, + doseNumberPositiveInt: { + type: PositiveIntScalar, + description: 'Nominal position in a series.', + }, + _doseNumberString: { + type: require('./element.input.js'), + description: 'Nominal position in a series.', + }, + doseNumberString: { + type: GraphQLString, + description: 'Nominal position in a series.', + }, + _seriesDosesPositiveInt: { + type: require('./element.input.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesPositiveInt: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + _seriesDosesString: { + type: require('./element.input.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesString: { + type: GraphQLString, + description: 'The recommended number of doses to achieve immunity.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunizationperformer.input.js b/src/resources/4_0_0/inputs/immunizationperformer.input.js new file mode 100644 index 00000000..a4d3ab43 --- /dev/null +++ b/src/resources/4_0_0/inputs/immunizationperformer.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Immunizationperformer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Immunizationperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the type of performance (e.g. ordering provider, administering provider, etc.).', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: 'The practitioner or organization who performed the action.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunizationprotocolapplied.input.js b/src/resources/4_0_0/inputs/immunizationprotocolapplied.input.js new file mode 100644 index 00000000..d4a61fa5 --- /dev/null +++ b/src/resources/4_0_0/inputs/immunizationprotocolapplied.input.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ImmunizationprotocolApplied Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImmunizationprotocolApplied_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _series: { + type: require('./element.input.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + authority: { + type: GraphQLString, + description: + 'Indicates the authority who published the protocol (e.g. ACIP) that is being followed.', + }, + targetDisease: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The vaccine preventable disease the dose is being administered against.', + }, + _doseNumberPositiveInt: { + type: require('./element.input.js'), + description: 'Nominal position in a series.', + }, + doseNumberPositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'Nominal position in a series.', + }, + _doseNumberString: { + type: require('./element.input.js'), + description: 'Nominal position in a series.', + }, + doseNumberString: { + type: new GraphQLNonNull(GraphQLString), + description: 'Nominal position in a series.', + }, + _seriesDosesPositiveInt: { + type: require('./element.input.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesPositiveInt: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + _seriesDosesString: { + type: require('./element.input.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesString: { + type: GraphQLString, + description: 'The recommended number of doses to achieve immunity.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunizationreaction.input.js b/src/resources/4_0_0/inputs/immunizationreaction.input.js new file mode 100644 index 00000000..eb406c6b --- /dev/null +++ b/src/resources/4_0_0/inputs/immunizationreaction.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Immunizationreaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Immunizationreaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _date: { + type: require('./element.input.js'), + description: 'Date of reaction to the immunization.', + }, + date: { + type: DateTimeScalar, + description: 'Date of reaction to the immunization.', + }, + detail: { + type: GraphQLString, + description: 'Details of the reaction.', + }, + _reported: { + type: require('./element.input.js'), + description: 'Self-reported indicator.', + }, + reported: { + type: GraphQLBoolean, + description: 'Self-reported indicator.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunizationrecommendation.input.js b/src/resources/4_0_0/inputs/immunizationrecommendation.input.js new file mode 100644 index 00000000..9ad7d0d2 --- /dev/null +++ b/src/resources/4_0_0/inputs/immunizationrecommendation.input.js @@ -0,0 +1,117 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ImmunizationRecommendation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImmunizationRecommendation_Input', + description: + "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImmunizationRecommendation_Enum_input', + values: { + ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A unique identifier assigned to this particular recommendation record.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient the recommendation(s) are for.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date the immunization recommendation(s) were created.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date the immunization recommendation(s) were created.', + }, + authority: { + type: GraphQLString, + description: + 'Indicates the authority who published the protocol (e.g. ACIP).', + }, + recommendation: { + type: new GraphQLList( + new GraphQLNonNull( + require('./immunizationrecommendationrecommendation.input.js'), + ), + ), + description: 'Vaccine administration recommendations.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunizationrecommendationrecommendation.input.js b/src/resources/4_0_0/inputs/immunizationrecommendationrecommendation.input.js new file mode 100644 index 00000000..18fd5149 --- /dev/null +++ b/src/resources/4_0_0/inputs/immunizationrecommendationrecommendation.input.js @@ -0,0 +1,134 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ImmunizationRecommendationrecommendation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImmunizationRecommendationrecommendation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + vaccineCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Vaccine(s) or vaccine group that pertain to the recommendation.', + }, + targetDisease: { + type: require('./codeableconcept.input.js'), + description: 'The targeted disease for the recommendation.', + }, + contraindicatedVaccineCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Vaccine(s) which should not be used to fulfill the recommendation.', + }, + forecastStatus: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Indicates the patient status with respect to the path to immunity for the target disease.', + }, + forecastReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason for the assigned forecast status.', + }, + dateCriterion: { + type: new GraphQLList( + require('./immunizationrecommendationrecommendationdatecriterion.input.js'), + ), + description: + 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + _series: { + type: require('./element.input.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + _doseNumberPositiveInt: { + type: require('./element.input.js'), + description: + 'Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).', + }, + doseNumberPositiveInt: { + type: PositiveIntScalar, + description: + 'Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).', + }, + _doseNumberString: { + type: require('./element.input.js'), + description: + 'Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).', + }, + doseNumberString: { + type: GraphQLString, + description: + 'Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).', + }, + _seriesDosesPositiveInt: { + type: require('./element.input.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesPositiveInt: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + _seriesDosesString: { + type: require('./element.input.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesString: { + type: GraphQLString, + description: 'The recommended number of doses to achieve immunity.', + }, + supportingImmunization: { + type: new GraphQLList(GraphQLString), + description: + 'Immunization event history and/or evaluation that supports the status and recommendation.', + }, + supportingPatientInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/immunizationrecommendationrecommendationdatecriterion.input.js b/src/resources/4_0_0/inputs/immunizationrecommendationrecommendationdatecriterion.input.js new file mode 100644 index 00000000..03aa93d9 --- /dev/null +++ b/src/resources/4_0_0/inputs/immunizationrecommendationrecommendationdatecriterion.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ImmunizationRecommendationrecommendationdateCriterion Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImmunizationRecommendationrecommendationdateCriterion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', + }, + _value: { + type: require('./element.input.js'), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + value: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguide.input.js b/src/resources/4_0_0/inputs/implementationguide.input.js new file mode 100644 index 00000000..ab5932ab --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguide.input.js @@ -0,0 +1,251 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuide Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuide_Input', + description: + 'A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImplementationGuide_Enum_input', + values: { ImplementationGuide: { value: 'ImplementationGuide' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the implementation guide.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the implementation guide.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this implementation guide. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this implementation guide. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the implementation guide was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the implementation guide was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the implementation guide.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the implementation guide.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the implementation guide from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the implementation guide from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate implementation guide instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the implementation guide is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', + }, + _packageId: { + type: require('./element.input.js'), + description: + 'The NPM package name for this Implementation Guide, used in the NPM package distribution, which is the primary mechanism by which FHIR based tooling manages IG dependencies. This value must be globally unique, and should be assigned with care.', + }, + packageId: { + type: new GraphQLNonNull(IdScalar), + description: + 'The NPM package name for this Implementation Guide, used in the NPM package distribution, which is the primary mechanism by which FHIR based tooling manages IG dependencies. This value must be globally unique, and should be assigned with care.', + }, + _license: { + type: require('./element.input.js'), + description: + "The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'.", + }, + license: { + type: CodeScalar, + description: + "The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'.", + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version(s) of the FHIR specification that this ImplementationGuide targets - e.g. describes how to use. The value of this element is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.0. for this version.', + }, + fhirVersion: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'The version(s) of the FHIR specification that this ImplementationGuide targets - e.g. describes how to use. The value of this element is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.0. for this version.', + }, + dependsOn: { + type: new GraphQLList(require('./implementationguidedependson.input.js')), + description: + 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', + }, + global: { + type: new GraphQLList(require('./implementationguideglobal.input.js')), + description: + 'A set of profiles that all resources covered by this implementation guide must conform to.', + }, + definition: { + type: require('./implementationguidedefinition.input.js'), + description: + 'The information needed by an IG publisher tool to publish the whole implementation guide.', + }, + manifest: { + type: require('./implementationguidemanifest.input.js'), + description: + 'Information about an assembled implementation guide, created by the publication tooling.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidedefinition.input.js b/src/resources/4_0_0/inputs/implementationguidedefinition.input.js new file mode 100644 index 00000000..dda36101 --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidedefinition.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ImplementationGuidedefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidedefinition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + grouping: { + type: new GraphQLList( + require('./implementationguidedefinitiongrouping.input.js'), + ), + description: + 'A logical group of resources. Logical groups can be used when building pages.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull( + require('./implementationguidedefinitionresource.input.js'), + ), + ), + description: + 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', + }, + page: { + type: require('./implementationguidedefinitionpage.input.js'), + description: + 'A page / section in the implementation guide. The root page is the implementation guide home page.', + }, + parameter: { + type: new GraphQLList( + require('./implementationguidedefinitionparameter.input.js'), + ), + description: 'Defines how IG is built by tools.', + }, + template: { + type: new GraphQLList( + require('./implementationguidedefinitiontemplate.input.js'), + ), + description: 'A template for building resources.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidedefinitiongrouping.input.js b/src/resources/4_0_0/inputs/implementationguidedefinitiongrouping.input.js new file mode 100644 index 00000000..ae1caae0 --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidedefinitiongrouping.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ImplementationGuidedefinitiongrouping Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidedefinitiongrouping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'The human-readable title to display for the package of resources when rendering the implementation guide.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The human-readable title to display for the package of resources when rendering the implementation guide.', + }, + _description: { + type: require('./element.input.js'), + description: 'Human readable text describing the package.', + }, + description: { + type: GraphQLString, + description: 'Human readable text describing the package.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidedefinitionpage.input.js b/src/resources/4_0_0/inputs/implementationguidedefinitionpage.input.js new file mode 100644 index 00000000..2112fb1b --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidedefinitionpage.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedefinitionpage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidedefinitionpage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _nameUrl: { + type: require('./element.input.js'), + description: 'The source address for the page.', + }, + nameUrl: { + type: new GraphQLNonNull(UrlScalar), + description: 'The source address for the page.', + }, + nameReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The source address for the page.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + _generation: { + type: require('./element.input.js'), + description: 'A code that indicates how the page is generated.', + }, + generation: { + type: new GraphQLNonNull(CodeScalar), + description: 'A code that indicates how the page is generated.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidedefinitionparameter.input.js b/src/resources/4_0_0/inputs/implementationguidedefinitionparameter.input.js new file mode 100644 index 00000000..545cabd8 --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidedefinitionparameter.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedefinitionparameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidedefinitionparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'apply | path-resource | path-pages | path-tx-cache | expansion-parameter | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'apply | path-resource | path-pages | path-tx-cache | expansion-parameter | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.', + }, + _value: { + type: require('./element.input.js'), + description: 'Value for named type.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'Value for named type.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidedefinitionresource.input.js b/src/resources/4_0_0/inputs/implementationguidedefinitionresource.input.js new file mode 100644 index 00000000..49b51fde --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidedefinitionresource.input.js @@ -0,0 +1,105 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedefinitionresource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidedefinitionresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Where this resource is found.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'Indicates the FHIR Version(s) this artifact is intended to apply to. If no versions are specified, the resource is assumed to apply to all the versions stated in ImplementationGuide.fhirVersion.', + }, + fhirVersion: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates the FHIR Version(s) this artifact is intended to apply to. If no versions are specified, the resource is assumed to apply to all the versions stated in ImplementationGuide.fhirVersion.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + name: { + type: GraphQLString, + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + _description: { + type: require('./element.input.js'), + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + description: { + type: GraphQLString, + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + _exampleBoolean: { + type: require('./element.input.js'), + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + exampleBoolean: { + type: GraphQLBoolean, + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + _exampleCanonical: { + type: require('./element.input.js'), + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + exampleCanonical: { + type: CanonicalScalar, + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + _groupingId: { + type: require('./element.input.js'), + description: + 'Reference to the id of the grouping this resource appears in.', + }, + groupingId: { + type: IdScalar, + description: + 'Reference to the id of the grouping this resource appears in.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidedefinitiontemplate.input.js b/src/resources/4_0_0/inputs/implementationguidedefinitiontemplate.input.js new file mode 100644 index 00000000..cb5e7821 --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidedefinitiontemplate.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedefinitiontemplate Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidedefinitiontemplate_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: 'Type of template specified.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Type of template specified.', + }, + _source: { + type: require('./element.input.js'), + description: 'The source location for the template.', + }, + source: { + type: new GraphQLNonNull(GraphQLString), + description: 'The source location for the template.', + }, + _scope: { + type: require('./element.input.js'), + description: 'The scope in which the template applies.', + }, + scope: { + type: GraphQLString, + description: 'The scope in which the template applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidedependson.input.js b/src/resources/4_0_0/inputs/implementationguidedependson.input.js new file mode 100644 index 00000000..6832d4a0 --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidedependson.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedependsOn Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidedependsOn_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _uri: { + type: require('./element.input.js'), + description: + 'A canonical reference to the Implementation guide for the dependency.', + }, + uri: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A canonical reference to the Implementation guide for the dependency.', + }, + _packageId: { + type: require('./element.input.js'), + description: + 'The NPM package name for the Implementation Guide that this IG depends on.', + }, + packageId: { + type: IdScalar, + description: + 'The NPM package name for the Implementation Guide that this IG depends on.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the IG that is depended on, when the correct version is required to understand the IG correctly.', + }, + version: { + type: GraphQLString, + description: + 'The version of the IG that is depended on, when the correct version is required to understand the IG correctly.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguideglobal.input.js b/src/resources/4_0_0/inputs/implementationguideglobal.input.js new file mode 100644 index 00000000..543b44ce --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguideglobal.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuideglobal Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuideglobal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'The type of resource that all instances must conform to.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of resource that all instances must conform to.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'A reference to the profile that all instances must conform to.', + }, + profile: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A reference to the profile that all instances must conform to.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidemanifest.input.js b/src/resources/4_0_0/inputs/implementationguidemanifest.input.js new file mode 100644 index 00000000..f8300b74 --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidemanifest.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidemanifest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidemanifest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _rendering: { + type: require('./element.input.js'), + description: + 'A pointer to official web page, PDF or other rendering of the implementation guide.', + }, + rendering: { + type: UrlScalar, + description: + 'A pointer to official web page, PDF or other rendering of the implementation guide.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull( + require('./implementationguidemanifestresource.input.js'), + ), + ), + description: + 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', + }, + page: { + type: new GraphQLList( + require('./implementationguidemanifestpage.input.js'), + ), + description: 'Information about a page within the IG.', + }, + _image: { + type: require('./element.input.js'), + description: + 'Indicates a relative path to an image that exists within the IG.', + }, + image: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates a relative path to an image that exists within the IG.', + }, + _other: { + type: require('./element.input.js'), + description: + 'Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.', + }, + other: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidemanifestpage.input.js b/src/resources/4_0_0/inputs/implementationguidemanifestpage.input.js new file mode 100644 index 00000000..c97b7f2c --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidemanifestpage.input.js @@ -0,0 +1,61 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ImplementationGuidemanifestpage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidemanifestpage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Relative path to the page.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Relative path to the page.', + }, + _title: { + type: require('./element.input.js'), + description: 'Label for the page intended for human display.', + }, + title: { + type: GraphQLString, + description: 'Label for the page intended for human display.', + }, + _anchor: { + type: require('./element.input.js'), + description: 'The name of an anchor available on the page.', + }, + anchor: { + type: new GraphQLList(GraphQLString), + description: 'The name of an anchor available on the page.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/implementationguidemanifestresource.input.js b/src/resources/4_0_0/inputs/implementationguidemanifestresource.input.js new file mode 100644 index 00000000..d8bcb34b --- /dev/null +++ b/src/resources/4_0_0/inputs/implementationguidemanifestresource.input.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidemanifestresource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ImplementationGuidemanifestresource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Where this resource is found.', + }, + _exampleBoolean: { + type: require('./element.input.js'), + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + exampleBoolean: { + type: GraphQLBoolean, + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + _exampleCanonical: { + type: require('./element.input.js'), + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + exampleCanonical: { + type: CanonicalScalar, + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + _relativePath: { + type: require('./element.input.js'), + description: + 'The relative path for primary page for this resource within the IG.', + }, + relativePath: { + type: UrlScalar, + description: + 'The relative path for primary page for this resource within the IG.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplan.input.js b/src/resources/4_0_0/inputs/insuranceplan.input.js new file mode 100644 index 00000000..9f33c841 --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplan.input.js @@ -0,0 +1,165 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary InsurancePlan Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlan_Input', + description: + 'Details of a Health Insurance product/plan provided by an organization.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'InsurancePlan_Enum_input', + values: { InsurancePlan: { value: 'InsurancePlan' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this health insurance product which remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the health insurance product.', + }, + status: { + type: CodeScalar, + description: 'The current state of the health insurance product.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The kind of health insurance product.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Official name of the health insurance product as designated by the owner.', + }, + name: { + type: GraphQLString, + description: + 'Official name of the health insurance product as designated by the owner.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'A list of alternate names that the product is known as, or was known as in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the product is known as, or was known as in the past.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time that the health insurance product is available.', + }, + ownedBy: { + type: GraphQLString, + description: + "The entity that is providing the health insurance product and underwriting the risk. This is typically an insurance carriers, other third-party payers, or health plan sponsors comonly referred to as 'payers'.", + }, + administeredBy: { + type: GraphQLString, + description: + 'An organization which administer other services such as underwriting, customer service and/or claims processing on behalf of the health insurance product owner.', + }, + coverageArea: { + type: new GraphQLList(GraphQLString), + description: + "The geographic region in which a health insurance product's benefits apply.", + }, + contact: { + type: new GraphQLList(require('./insuranceplancontact.input.js')), + description: + 'The contact for the health insurance product for a certain purpose.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'The technical endpoints providing access to services operated for the health insurance product.', + }, + network: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to the network included in the health insurance product.', + }, + coverage: { + type: new GraphQLList(require('./insuranceplancoverage.input.js')), + description: + 'Details about the coverage offered by the insurance product.', + }, + plan: { + type: new GraphQLList(require('./insuranceplanplan.input.js')), + description: 'Details about an insurance plan.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplancontact.input.js b/src/resources/4_0_0/inputs/insuranceplancontact.input.js new file mode 100644 index 00000000..1c81bea5 --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplancontact.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlancontact Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlancontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + purpose: { + type: require('./codeableconcept.input.js'), + description: 'Indicates a purpose for which the contact can be reached.', + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', + }, + address: { + type: require('./address.input.js'), + description: 'Visiting or postal addresses for the contact.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplancoverage.input.js b/src/resources/4_0_0/inputs/insuranceplancoverage.input.js new file mode 100644 index 00000000..6127e798 --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplancoverage.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlancoverage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlancoverage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Type of coverage (Medical; Dental; Mental Health; Substance Abuse; Vision; Drug; Short Term; Long Term Care; Hospice; Home Health).', + }, + network: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to the network that providing the type of coverage.', + }, + benefit: { + type: new GraphQLList( + new GraphQLNonNull(require('./insuranceplancoveragebenefit.input.js')), + ), + description: 'Specific benefits under this type of coverage.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplancoveragebenefit.input.js b/src/resources/4_0_0/inputs/insuranceplancoveragebenefit.input.js new file mode 100644 index 00000000..d3a5b152 --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplancoveragebenefit.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlancoveragebenefit Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlancoveragebenefit_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Type of benefit (primary care; speciality care; inpatient; outpatient).', + }, + _requirement: { + type: require('./element.input.js'), + description: + 'The referral requirements to have access/coverage for this benefit.', + }, + requirement: { + type: GraphQLString, + description: + 'The referral requirements to have access/coverage for this benefit.', + }, + limit: { + type: new GraphQLList( + require('./insuranceplancoveragebenefitlimit.input.js'), + ), + description: 'The specific limits on the benefit.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplancoveragebenefitlimit.input.js b/src/resources/4_0_0/inputs/insuranceplancoveragebenefitlimit.input.js new file mode 100644 index 00000000..8cef0ad2 --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplancoveragebenefitlimit.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlancoveragebenefitlimit Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlancoveragebenefitlimit_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + value: { + type: require('./quantity.input.js'), + description: + 'The maximum amount of a service item a plan will pay for a covered benefit. For examples. wellness visits, or eyeglasses.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The specific limit on the benefit.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplanplan.input.js b/src/resources/4_0_0/inputs/insuranceplanplan.input.js new file mode 100644 index 00000000..d608e8b4 --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplanplan.input.js @@ -0,0 +1,67 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlanplan Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlanplan_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this health insurance plan which remain constant as the resource is updated and propagates from server to server.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + "Type of plan. For example, 'Platinum' or 'High Deductable'.", + }, + coverageArea: { + type: new GraphQLList(GraphQLString), + description: + "The geographic region in which a health insurance plan's benefits apply.", + }, + network: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to the network that providing the type of coverage.', + }, + generalCost: { + type: new GraphQLList(require('./insuranceplanplangeneralcost.input.js')), + description: 'Overall costs associated with the plan.', + }, + specificCost: { + type: new GraphQLList( + require('./insuranceplanplanspecificcost.input.js'), + ), + description: + 'Costs associated with the coverage provided by the product.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplanplangeneralcost.input.js b/src/resources/4_0_0/inputs/insuranceplanplangeneralcost.input.js new file mode 100644 index 00000000..d9488740 --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplanplangeneralcost.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary InsurancePlanplangeneralCost Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlanplangeneralCost_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Type of cost.', + }, + _groupSize: { + type: require('./element.input.js'), + description: 'Number of participants enrolled in the plan.', + }, + groupSize: { + type: PositiveIntScalar, + description: 'Number of participants enrolled in the plan.', + }, + cost: { + type: require('./money.input.js'), + description: 'Value of the cost.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Additional information about the general costs associated with this plan.', + }, + comment: { + type: GraphQLString, + description: + 'Additional information about the general costs associated with this plan.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplanplanspecificcost.input.js b/src/resources/4_0_0/inputs/insuranceplanplanspecificcost.input.js new file mode 100644 index 00000000..c7e2b471 --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplanplanspecificcost.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlanplanspecificCost Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlanplanspecificCost_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'General category of benefit (Medical; Dental; Vision; Drug; Mental Health; Substance Abuse; Hospice, Home Health).', + }, + benefit: { + type: new GraphQLList( + require('./insuranceplanplanspecificcostbenefit.input.js'), + ), + description: + 'List of the specific benefits under this category of benefit.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplanplanspecificcostbenefit.input.js b/src/resources/4_0_0/inputs/insuranceplanplanspecificcostbenefit.input.js new file mode 100644 index 00000000..9529122c --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplanplanspecificcostbenefit.input.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlanplanspecificCostbenefit Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlanplanspecificCostbenefit_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Type of specific benefit (preventative; primary care office visit; speciality office visit; hospitalization; emergency room; urgent care).', + }, + cost: { + type: new GraphQLList( + require('./insuranceplanplanspecificcostbenefitcost.input.js'), + ), + description: 'List of the costs associated with a specific benefit.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/insuranceplanplanspecificcostbenefitcost.input.js b/src/resources/4_0_0/inputs/insuranceplanplanspecificcostbenefitcost.input.js new file mode 100644 index 00000000..69a94c8a --- /dev/null +++ b/src/resources/4_0_0/inputs/insuranceplanplanspecificcostbenefitcost.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlanplanspecificCostbenefitcost Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InsurancePlanplanspecificCostbenefitcost_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Type of cost (copay; individual cap; family cap; coinsurance; deductible).', + }, + applicability: { + type: require('./codeableconcept.input.js'), + description: + 'Whether the cost applies to in-network or out-of-network providers (in-network; out-of-network; other).', + }, + qualifiers: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Additional information about the cost, such as information about funding sources (e.g. HSA, HRA, FSA, RRA).', + }, + value: { + type: require('./quantity.input.js'), + description: + 'The actual cost value. (some of the costs may be represented as percentages rather than currency, e.g. 10% coinsurance).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/invoice.input.js b/src/resources/4_0_0/inputs/invoice.input.js new file mode 100644 index 00000000..41756f81 --- /dev/null +++ b/src/resources/4_0_0/inputs/invoice.input.js @@ -0,0 +1,173 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Invoice Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Invoice_Input', + description: + 'Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Invoice_Enum_input', + values: { Invoice: { value: 'Invoice' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the Invoice.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the Invoice.', + }, + _cancelledReason: { + type: require('./element.input.js'), + description: + 'In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).', + }, + cancelledReason: { + type: GraphQLString, + description: + 'In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).', + }, + subject: { + type: GraphQLString, + description: + 'The individual or set of individuals receiving the goods and services billed in this invoice.', + }, + recipient: { + type: GraphQLString, + description: + 'The individual or Organization responsible for balancing of this invoice.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date/time(s) of when this Invoice was posted.', + }, + date: { + type: DateTimeScalar, + description: 'Date/time(s) of when this Invoice was posted.', + }, + participant: { + type: new GraphQLList(require('./invoiceparticipant.input.js')), + description: + 'Indicates who or what performed or participated in the charged service.', + }, + issuer: { + type: GraphQLString, + description: 'The organizationissuing the Invoice.', + }, + account: { + type: GraphQLString, + description: + 'Account which is supposed to be balanced with this Invoice.', + }, + lineItem: { + type: new GraphQLList(require('./invoicelineitem.input.js')), + description: + 'Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource.', + }, + totalNet: { + type: require('./money.input.js'), + description: 'Invoice total , taxes excluded.', + }, + totalGross: { + type: require('./money.input.js'), + description: 'Invoice total, tax included.', + }, + _paymentTerms: { + type: require('./element.input.js'), + description: + 'Payment details such as banking details, period of payment, deductibles, methods of payment.', + }, + paymentTerms: { + type: GraphQLString, + description: + 'Payment details such as banking details, period of payment, deductibles, methods of payment.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the invoice by the issuer, subject, or other participants.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/invoicelineitem.input.js b/src/resources/4_0_0/inputs/invoicelineitem.input.js new file mode 100644 index 00000000..43d518ec --- /dev/null +++ b/src/resources/4_0_0/inputs/invoicelineitem.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary InvoicelineItem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InvoicelineItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.input.js'), + description: 'Sequence in which the items appear on the invoice.', + }, + sequence: { + type: PositiveIntScalar, + description: 'Sequence in which the items appear on the invoice.', + }, + chargeItemReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.', + }, + chargeItemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.', + }, + priceComponent: { + type: new GraphQLList( + require('./invoicelineitempricecomponent.input.js'), + ), + description: + 'The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/invoicelineitempricecomponent.input.js b/src/resources/4_0_0/inputs/invoicelineitempricecomponent.input.js new file mode 100644 index 00000000..4ee41e35 --- /dev/null +++ b/src/resources/4_0_0/inputs/invoicelineitempricecomponent.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary InvoicelineItempriceComponent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'InvoicelineItempriceComponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'This code identifies the type of the component.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'This code identifies the type of the component.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'The factor that has been applied on the base price for calculating this component.', + }, + factor: { + type: GraphQLFloat, + description: + 'The factor that has been applied on the base price for calculating this component.', + }, + amount: { + type: require('./money.input.js'), + description: 'The amount calculated for this component.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/invoiceparticipant.input.js b/src/resources/4_0_0/inputs/invoiceparticipant.input.js new file mode 100644 index 00000000..c12a1589 --- /dev/null +++ b/src/resources/4_0_0/inputs/invoiceparticipant.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Invoiceparticipant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Invoiceparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + role: { + type: require('./codeableconcept.input.js'), + description: + 'Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device, practitioner, etc. who performed or participated in the service.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/library.input.js b/src/resources/4_0_0/inputs/library.input.js new file mode 100644 index 00000000..f8e221b2 --- /dev/null +++ b/src/resources/4_0_0/inputs/library.input.js @@ -0,0 +1,320 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Library Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Library_Input', + description: + 'The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Library_Enum_input', + values: { Library: { value: 'Library' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: 'A short, descriptive, user-friendly title for the library.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive, user-friendly title for the library.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the library giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the library giving additional information about its content.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this library. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this library. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A code or group definition that describes the intended subject of the contents of the library.', + }, + subjectReference: { + type: GraphQLString, + description: + 'A code or group definition that describes the intended subject of the contents of the library.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the library.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the library.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the library from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the library from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate library instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the library is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this library is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this library is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the library is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the library is used from a clinical perspective.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the library content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + parameter: { + type: new GraphQLList(require('./parameterdefinition.input.js')), + description: + 'The parameter element defines parameters used by the library.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: + 'Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.', + }, + content: { + type: new GraphQLList(require('./attachment.input.js')), + description: + 'The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/linkage.input.js b/src/resources/4_0_0/inputs/linkage.input.js new file mode 100644 index 00000000..17ab1eb5 --- /dev/null +++ b/src/resources/4_0_0/inputs/linkage.input.js @@ -0,0 +1,107 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Linkage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Linkage_Input', + description: + "Identifies two or more records (resource instances) that refer to the same real-world 'occurrence'.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Linkage_Enum_input', + values: { Linkage: { value: 'Linkage' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _active: { + type: require('./element.input.js'), + description: + "Indicates whether the asserted set of linkages are considered to be 'in effect'.", + }, + active: { + type: GraphQLBoolean, + description: + "Indicates whether the asserted set of linkages are considered to be 'in effect'.", + }, + author: { + type: GraphQLString, + description: + 'Identifies the user or organization responsible for asserting the linkages as well as the user or organization who establishes the context in which the nature of each linkage is evaluated.', + }, + item: { + type: new GraphQLList( + new GraphQLNonNull(require('./linkageitem.input.js')), + ), + description: + 'Identifies which record considered as the reference to the same real-world occurrence as well as how the items should be evaluated within the collection of linked items.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/linkageitem.input.js b/src/resources/4_0_0/inputs/linkageitem.input.js new file mode 100644 index 00000000..0350f5df --- /dev/null +++ b/src/resources/4_0_0/inputs/linkageitem.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Linkageitem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Linkageitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: + "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", + }, + resource: { + type: new GraphQLNonNull(GraphQLString), + description: 'The resource instance being linked as part of the group.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/list.input.js b/src/resources/4_0_0/inputs/list.input.js new file mode 100644 index 00000000..1b37ec83 --- /dev/null +++ b/src/resources/4_0_0/inputs/list.input.js @@ -0,0 +1,159 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary List Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'List_Input', + description: 'A list is a curated collection of resources.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'List_Enum_input', + values: { List: { value: 'List' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifier for the List assigned for business purposes outside the context of FHIR.', + }, + _status: { + type: require('./element.input.js'), + description: 'Indicates the current state of this list.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this list.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + _title: { + type: require('./element.input.js'), + description: 'A label for the list assigned by the author.', + }, + title: { + type: GraphQLString, + description: 'A label for the list assigned by the author.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'This code defines the purpose of the list - why it was created.', + }, + subject: { + type: GraphQLString, + description: + 'The common subject (or patient) of the resources that are in the list if there is one.', + }, + encounter: { + type: GraphQLString, + description: + 'The encounter that is the context in which this list was created.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date that the list was prepared.', + }, + date: { + type: DateTimeScalar, + description: 'The date that the list was prepared.', + }, + source: { + type: GraphQLString, + description: + 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', + }, + orderedBy: { + type: require('./codeableconcept.input.js'), + description: 'What order applies to the items in the list.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Comments that apply to the overall list.', + }, + entry: { + type: new GraphQLList(require('./listentry.input.js')), + description: 'Entries in this list.', + }, + emptyReason: { + type: require('./codeableconcept.input.js'), + description: 'If the list is empty, why the list is empty.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/listentry.input.js b/src/resources/4_0_0/inputs/listentry.input.js new file mode 100644 index 00000000..b857de1d --- /dev/null +++ b/src/resources/4_0_0/inputs/listentry.input.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Listentry Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Listentry_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + flag: { + type: require('./codeableconcept.input.js'), + description: + 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', + }, + _deleted: { + type: require('./element.input.js'), + description: 'True if this item is marked as deleted in the list.', + }, + deleted: { + type: GraphQLBoolean, + description: 'True if this item is marked as deleted in the list.', + }, + _date: { + type: require('./element.input.js'), + description: 'When this item was added to the list.', + }, + date: { + type: DateTimeScalar, + description: 'When this item was added to the list.', + }, + item: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the actual resource from which data was derived.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/location.input.js b/src/resources/4_0_0/inputs/location.input.js new file mode 100644 index 00000000..a78cb3e0 --- /dev/null +++ b/src/resources/4_0_0/inputs/location.input.js @@ -0,0 +1,197 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Location Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Location_Input', + description: + 'Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Location_Enum_input', + values: { Location: { value: 'Location' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Unique code or number identifying the location to its users.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', + }, + status: { + type: CodeScalar, + description: + 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', + }, + operationalStatus: { + type: require('./coding.input.js'), + description: + 'The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + name: { + type: GraphQLString, + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'A list of alternate names that the location is known as, or was known as, in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the location is known as, or was known as, in the past.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + description: { + type: GraphQLString, + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + _mode: { + type: require('./element.input.js'), + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + mode: { + type: CodeScalar, + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Indicates the type of function performed at the location.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', + }, + address: { + type: require('./address.input.js'), + description: 'Physical location.', + }, + physicalType: { + type: require('./codeableconcept.input.js'), + description: + 'Physical form of the location, e.g. building, room, vehicle, road.', + }, + position: { + type: require('./locationposition.input.js'), + description: + 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization responsible for the provisioning and upkeep of the location.', + }, + partOf: { + type: GraphQLString, + description: + 'Another Location of which this Location is physically a part of.', + }, + hoursOfOperation: { + type: new GraphQLList(require('./locationhoursofoperation.input.js')), + description: + 'What days/times during a week is this location usually open.', + }, + _availabilityExceptions: { + type: require('./element.input.js'), + description: + 'A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for the location.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/locationhoursofoperation.input.js b/src/resources/4_0_0/inputs/locationhoursofoperation.input.js new file mode 100644 index 00000000..fc625c6b --- /dev/null +++ b/src/resources/4_0_0/inputs/locationhoursofoperation.input.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary LocationhoursOfOperation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'LocationhoursOfOperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _daysOfWeek: { + type: require('./element.input.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.input.js'), + description: 'The Location is open all day.', + }, + allDay: { + type: GraphQLBoolean, + description: 'The Location is open all day.', + }, + _openingTime: { + type: require('./element.input.js'), + description: 'Time that the Location opens.', + }, + openingTime: { + type: TimeScalar, + description: 'Time that the Location opens.', + }, + _closingTime: { + type: require('./element.input.js'), + description: 'Time that the Location closes.', + }, + closingTime: { + type: TimeScalar, + description: 'Time that the Location closes.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/locationposition.input.js b/src/resources/4_0_0/inputs/locationposition.input.js new file mode 100644 index 00000000..c888ed80 --- /dev/null +++ b/src/resources/4_0_0/inputs/locationposition.input.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Locationposition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Locationposition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _longitude: { + type: require('./element.input.js'), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + longitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + _latitude: { + type: require('./element.input.js'), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + latitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + _altitude: { + type: require('./element.input.js'), + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + altitude: { + type: GraphQLFloat, + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/marketingstatus.input.js b/src/resources/4_0_0/inputs/marketingstatus.input.js new file mode 100644 index 00000000..41e8f434 --- /dev/null +++ b/src/resources/4_0_0/inputs/marketingstatus.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MarketingStatus Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MarketingStatus_Input', + description: + 'Base StructureDefinition for MarketingStatus Type: The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + country: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The country in which the marketing authorisation has been granted shall be specified It should be specified using the ISO 3166 ‑ 1 alpha-2 code elements.', + }, + jurisdiction: { + type: require('./codeableconcept.input.js'), + description: + 'Where a Medicines Regulatory Agency has granted a marketing authorisation for which specific provisions within a jurisdiction apply, the jurisdiction can be specified using an appropriate controlled terminology The controlled term and the controlled term identifier shall be specified.', + }, + status: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'This attribute provides information on the status of the marketing of the medicinal product See ISO/TS 20443 for more information and examples.', + }, + dateRange: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + 'The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.', + }, + _restoreDate: { + type: require('./element.input.js'), + description: + 'The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.', + }, + restoreDate: { + type: DateTimeScalar, + description: + 'The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measure.input.js b/src/resources/4_0_0/inputs/measure.input.js new file mode 100644 index 00000000..f3636d06 --- /dev/null +++ b/src/resources/4_0_0/inputs/measure.input.js @@ -0,0 +1,410 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary Measure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Measure_Input', + description: + 'The Measure resource provides the definition of a quality measure.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Measure_Enum_input', + values: { Measure: { value: 'Measure' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: 'A short, descriptive, user-friendly title for the measure.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive, user-friendly title for the measure.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the measure giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the measure giving additional information about its content.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this measure. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this measure. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.', + }, + subjectReference: { + type: GraphQLString, + description: + 'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the measure was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the measure was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the measure.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the measure.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the measure from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the measure from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate measure instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the measure is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this measure is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this measure is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description, from a clinical perspective, of how the measure is used.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description, from a clinical perspective, of how the measure is used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the measure content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.input.js'), + description: + 'A reference to a Library resource containing the formal logic used by the measure.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing the formal logic used by the measure.', + }, + _disclaimer: { + type: require('./element.input.js'), + description: + 'Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.', + }, + disclaimer: { + type: GraphQLString, + description: + 'Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.', + }, + scoring: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.', + }, + compositeScoring: { + type: require('./codeableconcept.input.js'), + description: + 'If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.', + }, + _riskAdjustment: { + type: require('./element.input.js'), + description: + 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', + }, + riskAdjustment: { + type: GraphQLString, + description: + 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', + }, + _rateAggregation: { + type: require('./element.input.js'), + description: + 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', + }, + rateAggregation: { + type: GraphQLString, + description: + 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', + }, + _rationale: { + type: require('./element.input.js'), + description: + 'Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', + }, + rationale: { + type: GraphQLString, + description: + 'Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', + }, + _clinicalRecommendationStatement: { + type: require('./element.input.js'), + description: + 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', + }, + clinicalRecommendationStatement: { + type: GraphQLString, + description: + 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', + }, + improvementNotation: { + type: require('./codeableconcept.input.js'), + description: + 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).', + }, + _definition: { + type: require('./element.input.js'), + description: + 'Provides a description of an individual term used within the measure.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'Provides a description of an individual term used within the measure.', + }, + _guidance: { + type: require('./element.input.js'), + description: + 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', + }, + guidance: { + type: GraphQLString, + description: + 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', + }, + group: { + type: new GraphQLList(require('./measuregroup.input.js')), + description: 'A group of population criteria for the measure.', + }, + supplementalData: { + type: new GraphQLList(require('./measuresupplementaldata.input.js')), + description: + 'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measuregroup.input.js b/src/resources/4_0_0/inputs/measuregroup.input.js new file mode 100644 index 00000000..92e43da1 --- /dev/null +++ b/src/resources/4_0_0/inputs/measuregroup.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Measuregroup Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Measuregroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.', + }, + _description: { + type: require('./element.input.js'), + description: 'The human readable description of this population group.', + }, + description: { + type: GraphQLString, + description: 'The human readable description of this population group.', + }, + population: { + type: new GraphQLList(require('./measuregrouppopulation.input.js')), + description: 'A population criteria for the measure.', + }, + stratifier: { + type: new GraphQLList(require('./measuregroupstratifier.input.js')), + description: + 'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measuregrouppopulation.input.js b/src/resources/4_0_0/inputs/measuregrouppopulation.input.js new file mode 100644 index 00000000..8e950787 --- /dev/null +++ b/src/resources/4_0_0/inputs/measuregrouppopulation.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Measuregrouppopulation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Measuregrouppopulation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The type of population criteria.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The human readable description of this population criteria.', + }, + description: { + type: GraphQLString, + description: + 'The human readable description of this population criteria.', + }, + criteria: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: + 'An expression that specifies the criteria for the population, typically the name of an expression in a library.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measuregroupstratifier.input.js b/src/resources/4_0_0/inputs/measuregroupstratifier.input.js new file mode 100644 index 00000000..09949f68 --- /dev/null +++ b/src/resources/4_0_0/inputs/measuregroupstratifier.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Measuregroupstratifier Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Measuregroupstratifier_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The human readable description of this stratifier criteria.', + }, + description: { + type: GraphQLString, + description: + 'The human readable description of this stratifier criteria.', + }, + criteria: { + type: require('./expression.input.js'), + description: + 'An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.', + }, + component: { + type: new GraphQLList( + require('./measuregroupstratifiercomponent.input.js'), + ), + description: + 'A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measuregroupstratifiercomponent.input.js b/src/resources/4_0_0/inputs/measuregroupstratifiercomponent.input.js new file mode 100644 index 00000000..194938cd --- /dev/null +++ b/src/resources/4_0_0/inputs/measuregroupstratifiercomponent.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Measuregroupstratifiercomponent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Measuregroupstratifiercomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The human readable description of this stratifier criteria component.', + }, + description: { + type: GraphQLString, + description: + 'The human readable description of this stratifier criteria component.', + }, + criteria: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: + 'An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measurereport.input.js b/src/resources/4_0_0/inputs/measurereport.input.js new file mode 100644 index 00000000..eaf64e2f --- /dev/null +++ b/src/resources/4_0_0/inputs/measurereport.input.js @@ -0,0 +1,158 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MeasureReport Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MeasureReport_Input', + description: + 'The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MeasureReport_Enum_input', + values: { MeasureReport: { value: 'MeasureReport' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The MeasureReport status. No data will be available until the MeasureReport status is complete.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The MeasureReport status. No data will be available until the MeasureReport status is complete.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.', + }, + _measure: { + type: require('./element.input.js'), + description: + 'A reference to the Measure that was calculated to produce this report.', + }, + measure: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A reference to the Measure that was calculated to produce this report.', + }, + subject: { + type: GraphQLString, + description: + 'Optional subject identifying the individual or individuals the report is for.', + }, + _date: { + type: require('./element.input.js'), + description: 'The date this measure report was generated.', + }, + date: { + type: DateTimeScalar, + description: 'The date this measure report was generated.', + }, + reporter: { + type: GraphQLString, + description: + 'The individual, location, or organization that is reporting the data.', + }, + period: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The reporting period for which the report was calculated.', + }, + improvementNotation: { + type: require('./codeableconcept.input.js'), + description: + 'Whether improvement in the measure is noted by an increase or decrease in the measure score.', + }, + group: { + type: new GraphQLList(require('./measurereportgroup.input.js')), + description: + 'The results of the calculation, one for each population group in the measure.', + }, + evaluatedResource: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to a Bundle containing the Resources that were used in the calculation of this measure.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measurereportgroup.input.js b/src/resources/4_0_0/inputs/measurereportgroup.input.js new file mode 100644 index 00000000..a61aff63 --- /dev/null +++ b/src/resources/4_0_0/inputs/measurereportgroup.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroup Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MeasureReportgroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'The meaning of the population group as defined in the measure definition.', + }, + population: { + type: new GraphQLList(require('./measurereportgrouppopulation.input.js')), + description: + 'The populations that make up the population group, one for each type of population appropriate for the measure.', + }, + measureScore: { + type: require('./quantity.input.js'), + description: + 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', + }, + stratifier: { + type: new GraphQLList(require('./measurereportgroupstratifier.input.js')), + description: + 'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measurereportgrouppopulation.input.js b/src/resources/4_0_0/inputs/measurereportgrouppopulation.input.js new file mode 100644 index 00000000..cc8f259f --- /dev/null +++ b/src/resources/4_0_0/inputs/measurereportgrouppopulation.input.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgrouppopulation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MeasureReportgrouppopulation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The type of the population.', + }, + _count: { + type: require('./element.input.js'), + description: 'The number of members of the population.', + }, + count: { + type: GraphQLInt, + description: 'The number of members of the population.', + }, + subjectResults: { + type: GraphQLString, + description: + 'This element refers to a List of subject level MeasureReport resources, one for each subject in this population.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measurereportgroupstratifier.input.js b/src/resources/4_0_0/inputs/measurereportgroupstratifier.input.js new file mode 100644 index 00000000..ab459fa0 --- /dev/null +++ b/src/resources/4_0_0/inputs/measurereportgroupstratifier.input.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroupstratifier Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MeasureReportgroupstratifier_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The meaning of this stratifier, as defined in the measure definition.', + }, + stratum: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratum.input.js'), + ), + description: + 'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measurereportgroupstratifierstratum.input.js b/src/resources/4_0_0/inputs/measurereportgroupstratifierstratum.input.js new file mode 100644 index 00000000..fb9c37a0 --- /dev/null +++ b/src/resources/4_0_0/inputs/measurereportgroupstratifierstratum.input.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroupstratifierstratum Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MeasureReportgroupstratifierstratum_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + value: { + type: require('./codeableconcept.input.js'), + description: + 'The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', + }, + component: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratumcomponent.input.js'), + ), + description: 'A stratifier component value.', + }, + population: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratumpopulation.input.js'), + ), + description: + 'The populations that make up the stratum, one for each type of population appropriate to the measure.', + }, + measureScore: { + type: require('./quantity.input.js'), + description: + 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measurereportgroupstratifierstratumcomponent.input.js b/src/resources/4_0_0/inputs/measurereportgroupstratifierstratumcomponent.input.js new file mode 100644 index 00000000..86fdc7ab --- /dev/null +++ b/src/resources/4_0_0/inputs/measurereportgroupstratifierstratumcomponent.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroupstratifierstratumcomponent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MeasureReportgroupstratifierstratumcomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The code for the stratum component value.', + }, + value: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The stratum component value.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measurereportgroupstratifierstratumpopulation.input.js b/src/resources/4_0_0/inputs/measurereportgroupstratifierstratumpopulation.input.js new file mode 100644 index 00000000..cbbb110e --- /dev/null +++ b/src/resources/4_0_0/inputs/measurereportgroupstratifierstratumpopulation.input.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroupstratifierstratumpopulation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MeasureReportgroupstratifierstratumpopulation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The type of the population.', + }, + _count: { + type: require('./element.input.js'), + description: 'The number of members of the population in this stratum.', + }, + count: { + type: GraphQLInt, + description: 'The number of members of the population in this stratum.', + }, + subjectResults: { + type: GraphQLString, + description: + 'This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/measuresupplementaldata.input.js b/src/resources/4_0_0/inputs/measuresupplementaldata.input.js new file mode 100644 index 00000000..29880ffc --- /dev/null +++ b/src/resources/4_0_0/inputs/measuresupplementaldata.input.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasuresupplementalData Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MeasuresupplementalData_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.', + }, + usage: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.', + }, + _description: { + type: require('./element.input.js'), + description: 'The human readable description of this supplemental data.', + }, + description: { + type: GraphQLString, + description: 'The human readable description of this supplemental data.', + }, + criteria: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: + 'The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/media.input.js b/src/resources/4_0_0/inputs/media.input.js new file mode 100644 index 00000000..11525310 --- /dev/null +++ b/src/resources/4_0_0/inputs/media.input.js @@ -0,0 +1,229 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Media Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Media_Input', + description: + 'A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Media_Enum_input', + values: { Media: { value: 'Media' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A procedure that is fulfilled in whole or in part by the creation of this media.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the {{title}}.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the {{title}}.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'A code that classifies whether the media is an image, video or audio recording or some other media category.', + }, + modality: { + type: require('./codeableconcept.input.js'), + description: + 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', + }, + view: { + type: require('./codeableconcept.input.js'), + description: + 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', + }, + subject: { + type: GraphQLString, + description: 'Who/What this Media is a record of.', + }, + encounter: { + type: GraphQLString, + description: 'The encounter that establishes the context for this media.', + }, + _createdDateTime: { + type: require('./element.input.js'), + description: 'The date and time(s) at which the media was collected.', + }, + createdDateTime: { + type: DateTimeScalar, + description: 'The date and time(s) at which the media was collected.', + }, + createdPeriod: { + type: require('./period.input.js'), + description: 'The date and time(s) at which the media was collected.', + }, + _issued: { + type: require('./element.input.js'), + description: + 'The date and time this version of the media was made available to providers, typically after having been reviewed.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time this version of the media was made available to providers, typically after having been reviewed.', + }, + operator: { + type: GraphQLString, + description: 'The person who administered the collection of the image.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Describes why the event occurred in coded or textual form.', + }, + bodySite: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + }, + _deviceName: { + type: require('./element.input.js'), + description: + 'The name of the device / manufacturer of the device that was used to make the recording.', + }, + deviceName: { + type: GraphQLString, + description: + 'The name of the device / manufacturer of the device that was used to make the recording.', + }, + device: { + type: GraphQLString, + description: 'The device used to collect the media.', + }, + _height: { + type: require('./element.input.js'), + description: 'Height of the image in pixels (photo/video).', + }, + height: { + type: PositiveIntScalar, + description: 'Height of the image in pixels (photo/video).', + }, + _width: { + type: require('./element.input.js'), + description: 'Width of the image in pixels (photo/video).', + }, + width: { + type: PositiveIntScalar, + description: 'Width of the image in pixels (photo/video).', + }, + _frames: { + type: require('./element.input.js'), + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + frames: { + type: PositiveIntScalar, + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + _duration: { + type: require('./element.input.js'), + description: + 'The duration of the recording in seconds - for audio and video.', + }, + duration: { + type: GraphQLFloat, + description: + 'The duration of the recording in seconds - for audio and video.', + }, + content: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: + 'The actual content of the media - inline or by direct reference to the media source file.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the media by the performer, subject or other participants.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medication.input.js b/src/resources/4_0_0/inputs/medication.input.js new file mode 100644 index 00000000..f947855a --- /dev/null +++ b/src/resources/4_0_0/inputs/medication.input.js @@ -0,0 +1,124 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Medication Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Medication_Input', + description: + 'This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Medication_Enum_input', + values: { Medication: { value: 'Medication' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Business identifier for this medication.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code to indicate if the medication is in active use.', + }, + status: { + type: CodeScalar, + description: 'A code to indicate if the medication is in active use.', + }, + manufacturer: { + type: GraphQLString, + description: + 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', + }, + form: { + type: require('./codeableconcept.input.js'), + description: 'Describes the form of the item. Powder; tablets; capsule.', + }, + amount: { + type: require('./ratio.input.js'), + description: + 'Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).', + }, + ingredient: { + type: new GraphQLList(require('./medicationingredient.input.js')), + description: + 'Identifies a particular constituent of interest in the product.', + }, + batch: { + type: require('./medicationbatch.input.js'), + description: 'Information that only applies to packages (not products).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationadministration.input.js b/src/resources/4_0_0/inputs/medicationadministration.input.js new file mode 100644 index 00000000..8c0bf7d6 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationadministration.input.js @@ -0,0 +1,207 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicationAdministration Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationAdministration_Input', + description: + 'Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationAdministration_Enum_input', + values: { + MedicationAdministration: { value: 'MedicationAdministration' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.', + }, + _instantiates: { + type: require('./element.input.js'), + description: + 'A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event.', + }, + instantiates: { + type: new GraphQLList(UriScalar), + description: + 'A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + statusReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code indicating why the administration was not performed.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates where the medication is expected to be consumed or administered.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The person or animal or group receiving the medication.', + }, + context: { + type: GraphQLString, + description: + 'The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Additional information (for example, patient height and weight) that supports the administration of the medication.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectiveDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectivePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + performer: { + type: new GraphQLList( + require('./medicationadministrationperformer.input.js'), + ), + description: + 'Indicates who or what performed the medication administration and how they were involved.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A code indicating why the medication was given.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Condition or observation that supports why the medication was administered.', + }, + request: { + type: GraphQLString, + description: + 'The original request, instruction or authority to perform the administration.', + }, + device: { + type: new GraphQLList(GraphQLString), + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the medication administration that is not conveyed by the other attributes.', + }, + dosage: { + type: require('./medicationadministrationdosage.input.js'), + description: + 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', + }, + eventHistory: { + type: new GraphQLList(GraphQLString), + description: + 'A summary of the events of interest that have occurred, such as when the administration was verified.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationadministrationdosage.input.js b/src/resources/4_0_0/inputs/medicationadministrationdosage.input.js new file mode 100644 index 00000000..2af24a74 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationadministrationdosage.input.js @@ -0,0 +1,76 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationAdministrationdosage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationAdministrationdosage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _text: { + type: require('./element.input.js'), + description: + 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', + }, + site: { + type: require('./codeableconcept.input.js'), + description: + "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", + }, + route: { + type: require('./codeableconcept.input.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', + }, + dose: { + type: require('./quantity.input.js'), + description: + 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + 'Identifies the speed with which the medication was or will be introduced into the patient. Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', + }, + rateQuantity: { + type: require('./quantity.input.js'), + description: + 'Identifies the speed with which the medication was or will be introduced into the patient. Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationadministrationperformer.input.js b/src/resources/4_0_0/inputs/medicationadministrationperformer.input.js new file mode 100644 index 00000000..d37215d0 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationadministrationperformer.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationAdministrationperformer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationAdministrationperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.input.js'), + description: + 'Distinguishes the type of involvement of the performer in the medication administration.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Indicates who or what performed the medication administration.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationbatch.input.js b/src/resources/4_0_0/inputs/medicationbatch.input.js new file mode 100644 index 00000000..81131e72 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationbatch.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Medicationbatch Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Medicationbatch_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _lotNumber: { + type: require('./element.input.js'), + description: + 'The assigned lot number of a batch of the specified product.', + }, + lotNumber: { + type: GraphQLString, + description: + 'The assigned lot number of a batch of the specified product.', + }, + _expirationDate: { + type: require('./element.input.js'), + description: 'When this specific batch of product will expire.', + }, + expirationDate: { + type: DateTimeScalar, + description: 'When this specific batch of product will expire.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationdispense.input.js b/src/resources/4_0_0/inputs/medicationdispense.input.js new file mode 100644 index 00000000..005b0783 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationdispense.input.js @@ -0,0 +1,222 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicationDispense Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationDispense_Input', + description: + 'Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationDispense_Enum_input', + values: { MedicationDispense: { value: 'MedicationDispense' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: 'The procedure that trigger the dispense.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code specifying the state of the set of dispense events.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'A code specifying the state of the set of dispense events.', + }, + statusReasonCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the reason why a dispense was not performed.', + }, + statusReasonReference: { + type: GraphQLString, + description: 'Indicates the reason why a dispense was not performed.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of medication dispense (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: GraphQLString, + description: + 'A link to a resource representing the person or the group to whom the medication will be given.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care that establishes the context for this event.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Additional information that supports the medication being dispensed.', + }, + performer: { + type: new GraphQLList(require('./medicationdispenseperformer.input.js')), + description: 'Indicates who or what performed the event.', + }, + location: { + type: GraphQLString, + description: + 'The principal physical location where the dispense was performed.', + }, + authorizingPrescription: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the medication order that is being dispensed against.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The amount of medication that has been dispensed. Includes unit of measure.', + }, + daysSupply: { + type: require('./quantity.input.js'), + description: 'The amount of medication expressed as a timing amount.', + }, + _whenPrepared: { + type: require('./element.input.js'), + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + whenPrepared: { + type: DateTimeScalar, + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + _whenHandedOver: { + type: require('./element.input.js'), + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + whenHandedOver: { + type: DateTimeScalar, + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + destination: { + type: GraphQLString, + description: + 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the dispense that could not be conveyed in the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList(require('./dosage.input.js')), + description: 'Indicates how the medication is to be used by the patient.', + }, + substitution: { + type: require('./medicationdispensesubstitution.input.js'), + description: + 'Indicates whether or not substitution was made as part of the dispense. In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.', + }, + detectedIssue: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. drug-drug interaction, duplicate therapy, dosage alert etc.', + }, + eventHistory: { + type: new GraphQLList(GraphQLString), + description: + 'A summary of the events of interest that have occurred, such as when the dispense was verified.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationdispenseperformer.input.js b/src/resources/4_0_0/inputs/medicationdispenseperformer.input.js new file mode 100644 index 00000000..90d3f50f --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationdispenseperformer.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationDispenseperformer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationDispenseperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.input.js'), + description: + 'Distinguishes the type of performer in the dispense. For example, date enterer, packager, final checker.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationdispensesubstitution.input.js b/src/resources/4_0_0/inputs/medicationdispensesubstitution.input.js new file mode 100644 index 00000000..8b34bb58 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationdispensesubstitution.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationDispensesubstitution Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationDispensesubstitution_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _wasSubstituted: { + type: require('./element.input.js'), + description: + 'True if the dispenser dispensed a different drug or product from what was prescribed.', + }, + wasSubstituted: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if the dispenser dispensed a different drug or product from what was prescribed.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'A code signifying whether a different drug was dispensed from what was prescribed.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates the reason for the substitution (or lack of substitution) from what was prescribed.', + }, + responsibleParty: { + type: new GraphQLList(GraphQLString), + description: + 'The person or organization that has primary responsibility for the substitution.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationingredient.input.js b/src/resources/4_0_0/inputs/medicationingredient.input.js new file mode 100644 index 00000000..0ad4fea5 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationingredient.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Medicationingredient Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Medicationingredient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication of a medication.', + }, + itemReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication of a medication.', + }, + _isActive: { + type: require('./element.input.js'), + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + isActive: { + type: GraphQLBoolean, + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + strength: { + type: require('./ratio.input.js'), + description: + 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledge.input.js b/src/resources/4_0_0/inputs/medicationknowledge.input.js new file mode 100644 index 00000000..4a0996a7 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledge.input.js @@ -0,0 +1,212 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicationKnowledge Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledge_Input', + description: + 'Information about a medication that is used to support knowledge.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationKnowledge_Enum_input', + values: { MedicationKnowledge: { value: 'MedicationKnowledge' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code that specifies this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code to indicate if the medication is in active use. The status refers to the validity about the information of the medication and not to its medicinal properties.', + }, + status: { + type: CodeScalar, + description: + 'A code to indicate if the medication is in active use. The status refers to the validity about the information of the medication and not to its medicinal properties.', + }, + manufacturer: { + type: GraphQLString, + description: + 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', + }, + doseForm: { + type: require('./codeableconcept.input.js'), + description: 'Describes the form of the item. Powder; tablets; capsule.', + }, + amount: { + type: require('./quantity.input.js'), + description: + 'Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).', + }, + _synonym: { + type: require('./element.input.js'), + description: + 'Additional names for a medication, for example, the name(s) given to a medication in different countries. For example, acetaminophen and paracetamol or salbutamol and albuterol.', + }, + synonym: { + type: new GraphQLList(GraphQLString), + description: + 'Additional names for a medication, for example, the name(s) given to a medication in different countries. For example, acetaminophen and paracetamol or salbutamol and albuterol.', + }, + relatedMedicationKnowledge: { + type: new GraphQLList( + require('./medicationknowledgerelatedmedicationknowledge.input.js'), + ), + description: 'Associated or related knowledge about a medication.', + }, + associatedMedication: { + type: new GraphQLList(GraphQLString), + description: + 'Associated or related medications. For example, if the medication is a branded product (e.g. Crestor), this is the Therapeutic Moeity (e.g. Rosuvastatin) or if this is a generic medication (e.g. Rosuvastatin), this would link to a branded product (e.g. Crestor).', + }, + productType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Category of the medication or product (e.g. branded product, therapeutic moeity, generic product, innovator product, etc.).', + }, + monograph: { + type: new GraphQLList(require('./medicationknowledgemonograph.input.js')), + description: 'Associated documentation about the medication.', + }, + ingredient: { + type: new GraphQLList( + require('./medicationknowledgeingredient.input.js'), + ), + description: + 'Identifies a particular constituent of interest in the product.', + }, + _preparationInstruction: { + type: require('./element.input.js'), + description: 'The instructions for preparing the medication.', + }, + preparationInstruction: { + type: GraphQLString, + description: 'The instructions for preparing the medication.', + }, + intendedRoute: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The intended or approved route of administration.', + }, + cost: { + type: new GraphQLList(require('./medicationknowledgecost.input.js')), + description: 'The price of the medication.', + }, + monitoringProgram: { + type: new GraphQLList( + require('./medicationknowledgemonitoringprogram.input.js'), + ), + description: 'The program under which the medication is reviewed.', + }, + administrationGuidelines: { + type: new GraphQLList( + require('./medicationknowledgeadministrationguidelines.input.js'), + ), + description: 'Guidelines for the administration of the medication.', + }, + medicineClassification: { + type: new GraphQLList( + require('./medicationknowledgemedicineclassification.input.js'), + ), + description: + 'Categorization of the medication within a formulary or classification system.', + }, + packaging: { + type: require('./medicationknowledgepackaging.input.js'), + description: 'Information that only applies to packages (not products).', + }, + drugCharacteristic: { + type: new GraphQLList( + require('./medicationknowledgedrugcharacteristic.input.js'), + ), + description: + 'Specifies descriptive properties of the medicine, such as color, shape, imprints, etc.', + }, + contraindication: { + type: new GraphQLList(GraphQLString), + description: + 'Potential clinical issue with or between medication(s) (for example, drug-drug interaction, drug-disease contraindication, drug-allergy interaction, etc.).', + }, + regulatory: { + type: new GraphQLList( + require('./medicationknowledgeregulatory.input.js'), + ), + description: 'Regulatory information about a medication.', + }, + kinetics: { + type: new GraphQLList(require('./medicationknowledgekinetics.input.js')), + description: + 'The time course of drug absorption, distribution, metabolism and excretion of a medication from the body.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelines.input.js b/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelines.input.js new file mode 100644 index 00000000..a7ad7314 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelines.input.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeadministrationGuidelines Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgeadministrationGuidelines_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + dosage: { + type: new GraphQLList( + require('./medicationknowledgeadministrationguidelinesdosage.input.js'), + ), + description: 'Dosage for the medication for the specific guidelines.', + }, + indicationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Indication for use that apply to the specific administration guidelines.', + }, + indicationReference: { + type: GraphQLString, + description: + 'Indication for use that apply to the specific administration guidelines.', + }, + patientCharacteristics: { + type: new GraphQLList( + require('./medicationknowledgeadministrationguidelinespatientcharacteristics.input.js'), + ), + description: + 'Characteristics of the patient that are relevant to the administration guidelines (for example, height, weight, gender, etc.).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelinesdosage.input.js b/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelinesdosage.input.js new file mode 100644 index 00000000..aeb22918 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelinesdosage.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeadministrationGuidelinesdosage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgeadministrationGuidelinesdosage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The type of dosage (for example, prophylaxis, maintenance, therapeutic, etc.).', + }, + dosage: { + type: new GraphQLList(new GraphQLNonNull(require('./dosage.input.js'))), + description: 'Dosage for the medication for the specific guidelines.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelinespatientcharacteristics.input.js b/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelinespatientcharacteristics.input.js new file mode 100644 index 00000000..9fa69282 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgeadministrationguidelinespatientcharacteristics.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeadministrationGuidelinespatientCharacteristics Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: + 'MedicationKnowledgeadministrationGuidelinespatientCharacteristics_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + characteristicCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Specific characteristic that is relevant to the administration guideline (e.g. height, weight, gender).', + }, + characteristicQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'Specific characteristic that is relevant to the administration guideline (e.g. height, weight, gender).', + }, + _value: { + type: require('./element.input.js'), + description: + 'The specific characteristic (e.g. height, weight, gender, etc.).', + }, + value: { + type: new GraphQLList(GraphQLString), + description: + 'The specific characteristic (e.g. height, weight, gender, etc.).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgecost.input.js b/src/resources/4_0_0/inputs/medicationknowledgecost.input.js new file mode 100644 index 00000000..2edb5107 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgecost.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgecost Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgecost_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The category of the cost information. For example, manufacturers' cost, patient cost, claim reimbursement cost, actual acquisition cost.", + }, + _source: { + type: require('./element.input.js'), + description: + 'The source or owner that assigns the price to the medication.', + }, + source: { + type: GraphQLString, + description: + 'The source or owner that assigns the price to the medication.', + }, + cost: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'The price of the medication.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgedrugcharacteristic.input.js b/src/resources/4_0_0/inputs/medicationknowledgedrugcharacteristic.input.js new file mode 100644 index 00000000..848e2200 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgedrugcharacteristic.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary MedicationKnowledgedrugCharacteristic Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgedrugCharacteristic_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'A code specifying which characteristic of the medicine is being described (for example, colour, shape, imprint).', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Description of the characteristic.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'Description of the characteristic.', + }, + valueString: { + type: GraphQLString, + description: 'Description of the characteristic.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: 'Description of the characteristic.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'Description of the characteristic.', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: 'Description of the characteristic.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgeingredient.input.js b/src/resources/4_0_0/inputs/medicationknowledgeingredient.input.js new file mode 100644 index 00000000..598dba9a --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgeingredient.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeingredient Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgeingredient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + itemReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + _isActive: { + type: require('./element.input.js'), + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + isActive: { + type: GraphQLBoolean, + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + strength: { + type: require('./ratio.input.js'), + description: + 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgekinetics.input.js b/src/resources/4_0_0/inputs/medicationknowledgekinetics.input.js new file mode 100644 index 00000000..49947eb4 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgekinetics.input.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgekinetics Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgekinetics_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + areaUnderCurve: { + type: new GraphQLList(require('./quantity.input.js')), + description: + 'The drug concentration measured at certain discrete points in time.', + }, + lethalDose50: { + type: new GraphQLList(require('./quantity.input.js')), + description: 'The median lethal dose of a drug.', + }, + halfLifePeriod: { + type: require('./duration.input.js'), + description: + 'The time required for any specified property (e.g., the concentration of a substance in the body) to decrease by half.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgemedicineclassification.input.js b/src/resources/4_0_0/inputs/medicationknowledgemedicineclassification.input.js new file mode 100644 index 00000000..f5650c06 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgemedicineclassification.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgemedicineClassification Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgemedicineClassification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification).', + }, + classification: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Specific category assigned to the medication (e.g. anti-infective, anti-hypertensive, antibiotic, etc.).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgemonitoringprogram.input.js b/src/resources/4_0_0/inputs/medicationknowledgemonitoringprogram.input.js new file mode 100644 index 00000000..0b50ebd5 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgemonitoringprogram.input.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgemonitoringProgram Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgemonitoringProgram_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Type of program under which the medication is monitored.', + }, + _name: { + type: require('./element.input.js'), + description: 'Name of the reviewing program.', + }, + name: { + type: GraphQLString, + description: 'Name of the reviewing program.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgemonograph.input.js b/src/resources/4_0_0/inputs/medicationknowledgemonograph.input.js new file mode 100644 index 00000000..485bda55 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgemonograph.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgemonograph Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgemonograph_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The category of documentation about the medication. (e.g. professional monograph, patient education monograph).', + }, + source: { + type: GraphQLString, + description: 'Associated documentation about the medication.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgepackaging.input.js b/src/resources/4_0_0/inputs/medicationknowledgepackaging.input.js new file mode 100644 index 00000000..539e575f --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgepackaging.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgepackaging Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgepackaging_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'A code that defines the specific type of packaging that the medication can be found in (e.g. blister sleeve, tube, bottle).', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The number of product units the package would contain if fully loaded.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgeregulatory.input.js b/src/resources/4_0_0/inputs/medicationknowledgeregulatory.input.js new file mode 100644 index 00000000..61711be8 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgeregulatory.input.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeregulatory Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgeregulatory_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + regulatoryAuthority: { + type: new GraphQLNonNull(GraphQLString), + description: 'The authority that is specifying the regulations.', + }, + substitution: { + type: new GraphQLList( + require('./medicationknowledgeregulatorysubstitution.input.js'), + ), + description: + 'Specifies if changes are allowed when dispensing a medication from a regulatory perspective.', + }, + schedule: { + type: new GraphQLList( + require('./medicationknowledgeregulatoryschedule.input.js'), + ), + description: 'Specifies the schedule of a medication in jurisdiction.', + }, + maxDispense: { + type: require('./medicationknowledgeregulatorymaxdispense.input.js'), + description: + 'The maximum number of units of the medication that can be dispensed in a period.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgeregulatorymaxdispense.input.js b/src/resources/4_0_0/inputs/medicationknowledgeregulatorymaxdispense.input.js new file mode 100644 index 00000000..00e6b46a --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgeregulatorymaxdispense.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeregulatorymaxDispense Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgeregulatorymaxDispense_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'The maximum number of units of the medication that can be dispensed.', + }, + period: { + type: require('./duration.input.js'), + description: 'The period that applies to the maximum number of units.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgeregulatoryschedule.input.js b/src/resources/4_0_0/inputs/medicationknowledgeregulatoryschedule.input.js new file mode 100644 index 00000000..d4e16eca --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgeregulatoryschedule.input.js @@ -0,0 +1,41 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeregulatoryschedule Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgeregulatoryschedule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + schedule: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Specifies the specific drug schedule.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgeregulatorysubstitution.input.js b/src/resources/4_0_0/inputs/medicationknowledgeregulatorysubstitution.input.js new file mode 100644 index 00000000..5f088797 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgeregulatorysubstitution.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeregulatorysubstitution Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgeregulatorysubstitution_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Specifies the type of substitution allowed.', + }, + _allowed: { + type: require('./element.input.js'), + description: + 'Specifies if regulation allows for changes in the medication when dispensing.', + }, + allowed: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Specifies if regulation allows for changes in the medication when dispensing.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationknowledgerelatedmedicationknowledge.input.js b/src/resources/4_0_0/inputs/medicationknowledgerelatedmedicationknowledge.input.js new file mode 100644 index 00000000..67e5d929 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationknowledgerelatedmedicationknowledge.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgerelatedMedicationKnowledge Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationKnowledgerelatedMedicationKnowledge_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The category of the associated medication knowledge reference.', + }, + reference: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'Associated documentation about the associated medication knowledge.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationrequest.input.js b/src/resources/4_0_0/inputs/medicationrequest.input.js new file mode 100644 index 00000000..5b13ea01 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationrequest.input.js @@ -0,0 +1,296 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary MedicationRequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationRequest_Input', + description: + "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called 'MedicationRequest' rather than 'MedicationPrescription' or 'MedicationOrder' to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationRequest_Enum_input', + values: { MedicationRequest: { value: 'MedicationRequest' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying the current state of the order. Generally, this will be active or completed state.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the current state of the order. Generally, this will be active or completed state.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + 'Captures the reason for the current state of the MedicationRequest.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Whether the request is a proposal, plan, or an original order.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, or an original order.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', + }, + _doNotPerform: { + type: require('./element.input.js'), + description: + 'If true indicates that the provider is asking for the medication request not to occur.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'If true indicates that the provider is asking for the medication request not to occur.', + }, + _reportedBoolean: { + type: require('./element.input.js'), + description: + "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", + }, + reportedBoolean: { + type: GraphQLBoolean, + description: + "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", + }, + reportedReference: { + type: GraphQLString, + description: + "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A link to a resource representing the person or set of individuals to whom the medication will be given.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this [x] was created or to which the creation of this record is tightly associated.', + }, + supportingInformation: { + type: new GraphQLList(GraphQLString), + description: + 'Include additional information (for example, patient height and weight) that supports the ordering of the medication.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the prescription was initially written or authored on.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was initially written or authored on.', + }, + requester: { + type: GraphQLString, + description: + 'The individual, organization, or device that initiated the request and has responsibility for its activation.', + }, + performer: { + type: GraphQLString, + description: + 'The specified desired performer of the medication treatment (e.g. the performer of the medication administration).', + }, + performerType: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of performer of the administration of the medication.', + }, + recorder: { + type: GraphQLString, + description: + 'The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The reason or the indication for ordering or not ordering the medication.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Condition or observation that supports why the medication was ordered.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan or request that is fulfilled in whole or in part by this medication request.', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.', + }, + courseOfTherapyType: { + type: require('./codeableconcept.input.js'), + description: + 'The description of the overall patte3rn of the administration of the medication to the patient.', + }, + insurance: { + type: new GraphQLList(GraphQLString), + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Extra information about the prescription that could not be conveyed by the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList(require('./dosage.input.js')), + description: 'Indicates how the medication is to be used by the patient.', + }, + dispenseRequest: { + type: require('./medicationrequestdispenserequest.input.js'), + description: + 'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', + }, + substitution: { + type: require('./medicationrequestsubstitution.input.js'), + description: + "Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", + }, + priorPrescription: { + type: GraphQLString, + description: + 'A link to a resource representing an earlier order related order or prescription.', + }, + detectedIssue: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + }, + eventHistory: { + type: new GraphQLList(GraphQLString), + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationrequestdispenserequest.input.js b/src/resources/4_0_0/inputs/medicationrequestdispenserequest.input.js new file mode 100644 index 00000000..de463739 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationrequestdispenserequest.input.js @@ -0,0 +1,76 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary MedicationRequestdispenseRequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationRequestdispenseRequest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + initialFill: { + type: require('./medicationrequestdispenserequestinitialfill.input.js'), + description: + 'Indicates the quantity or duration for the first dispense of the medication.', + }, + dispenseInterval: { + type: require('./duration.input.js'), + description: + 'The minimum period of time that must occur between dispenses of the medication.', + }, + validityPeriod: { + type: require('./period.input.js'), + description: + 'This indicates the validity period of a prescription (stale dating the Prescription).', + }, + _numberOfRepeatsAllowed: { + type: require('./element.input.js'), + description: + "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.", + }, + numberOfRepeatsAllowed: { + type: UnsignedIntScalar, + description: + "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.", + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount that is to be dispensed for one fill.', + }, + expectedSupplyDuration: { + type: require('./duration.input.js'), + description: + 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', + }, + performer: { + type: GraphQLString, + description: + 'Indicates the intended dispensing Organization specified by the prescriber.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationrequestdispenserequestinitialfill.input.js b/src/resources/4_0_0/inputs/medicationrequestdispenserequestinitialfill.input.js new file mode 100644 index 00000000..93b6a048 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationrequestdispenserequestinitialfill.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationRequestdispenseRequestinitialFill Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationRequestdispenseRequestinitialFill_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The amount or quantity to provide as part of the first dispense.', + }, + duration: { + type: require('./duration.input.js'), + description: + 'The length of time that the first dispense is expected to last.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationrequestsubstitution.input.js b/src/resources/4_0_0/inputs/medicationrequestsubstitution.input.js new file mode 100644 index 00000000..407e87d5 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationrequestsubstitution.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationRequestsubstitution Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationRequestsubstitution_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _allowedBoolean: { + type: require('./element.input.js'), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + allowedBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + allowedCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the reason for the substitution, or why substitution must or must not be performed.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicationstatement.input.js b/src/resources/4_0_0/inputs/medicationstatement.input.js new file mode 100644 index 00000000..43583985 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicationstatement.input.js @@ -0,0 +1,194 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicationStatement Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicationStatement_Input', + description: + "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationStatement_Enum_input', + values: { MedicationStatement: { value: 'MedicationStatement' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.", + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.", + }, + statusReason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Captures the reason for the current state of the MedicationStatement.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates where the medication is expected to be consumed or administered.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person, animal or group who is/was taking the medication.', + }, + context: { + type: GraphQLString, + description: + 'The encounter or episode of care that establishes the context for this MedicationStatement.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + 'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).', + }, + _dateAsserted: { + type: require('./element.input.js'), + description: + 'The date when the medication statement was asserted by the information source.', + }, + dateAsserted: { + type: DateTimeScalar, + description: + 'The date when the medication statement was asserted by the information source.', + }, + informationSource: { + type: GraphQLString, + description: + 'The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.', + }, + derivedFrom: { + type: new GraphQLList(GraphQLString), + description: + 'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A reason for why the medication is being/was taken.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Condition or observation that supports why the medication is being/was taken.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Provides extra information about the medication statement that is not conveyed by the other attributes.', + }, + dosage: { + type: new GraphQLList(require('./dosage.input.js')), + description: + 'Indicates how the medication is/was or should be taken by the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproduct.input.js b/src/resources/4_0_0/inputs/medicinalproduct.input.js new file mode 100644 index 00000000..16bb227b --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproduct.input.js @@ -0,0 +1,188 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProduct Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProduct_Input', + description: + 'Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProduct_Enum_input', + values: { MedicinalProduct: { value: 'MedicinalProduct' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Business identifier for this product. Could be an MPID.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Regulatory type, e.g. Investigational or Authorized.', + }, + domain: { + type: require('./coding.input.js'), + description: 'If this medicine applies to human or veterinary uses.', + }, + combinedPharmaceuticalDoseForm: { + type: require('./codeableconcept.input.js'), + description: + 'The dose form for a single part product, or combined form of a multiple part product.', + }, + legalStatusOfSupply: { + type: require('./codeableconcept.input.js'), + description: + 'The legal status of supply of the medicinal product as classified by the regulator.', + }, + additionalMonitoringIndicator: { + type: require('./codeableconcept.input.js'), + description: + 'Whether the Medicinal Product is subject to additional monitoring for regulatory reasons.', + }, + _specialMeasures: { + type: require('./element.input.js'), + description: + 'Whether the Medicinal Product is subject to special measures for regulatory reasons.', + }, + specialMeasures: { + type: new GraphQLList(GraphQLString), + description: + 'Whether the Medicinal Product is subject to special measures for regulatory reasons.', + }, + paediatricUseIndicator: { + type: require('./codeableconcept.input.js'), + description: 'If authorised for use in children.', + }, + productClassification: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Allows the product to be classified by various systems.', + }, + marketingStatus: { + type: new GraphQLList(require('./marketingstatus.input.js')), + description: + 'Marketing status of the medicinal product, in contrast to marketing authorizaton.', + }, + pharmaceuticalProduct: { + type: new GraphQLList(GraphQLString), + description: 'Pharmaceutical aspects of product.', + }, + packagedMedicinalProduct: { + type: new GraphQLList(GraphQLString), + description: 'Package representation for the product.', + }, + attachedDocument: { + type: new GraphQLList(GraphQLString), + description: + 'Supporting documentation, typically for regulatory submission.', + }, + masterFile: { + type: new GraphQLList(GraphQLString), + description: + 'A master file for to the medicinal product (e.g. Pharmacovigilance System Master File).', + }, + contact: { + type: new GraphQLList(GraphQLString), + description: + 'A product specific contact, person (in a role), or an organization.', + }, + clinicalTrial: { + type: new GraphQLList(GraphQLString), + description: + 'Clinical trials or studies that this product is involved in.', + }, + name: { + type: new GraphQLList( + new GraphQLNonNull(require('./medicinalproductname.input.js')), + ), + description: + "The product's name, including full name and possibly coded parts.", + }, + crossReference: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Reference to another product, e.g. for linking authorised to investigational product.', + }, + manufacturingBusinessOperation: { + type: new GraphQLList( + require('./medicinalproductmanufacturingbusinessoperation.input.js'), + ), + description: + 'An operation applied to the product, for manufacturing or adminsitrative purpose.', + }, + specialDesignation: { + type: new GraphQLList( + require('./medicinalproductspecialdesignation.input.js'), + ), + description: + 'Indicates if the medicinal product has an orphan designation for the treatment of a rare disease.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductauthorization.input.js b/src/resources/4_0_0/inputs/medicinalproductauthorization.input.js new file mode 100644 index 00000000..26159d02 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductauthorization.input.js @@ -0,0 +1,182 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductAuthorization Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductAuthorization_Input', + description: 'The regulatory authorization of a medicinal product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductAuthorization_Enum_input', + values: { + MedicinalProductAuthorization: { + value: 'MedicinalProductAuthorization', + }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifier for the marketing authorization, as assigned by a regulator.', + }, + subject: { + type: GraphQLString, + description: 'The medicinal product that is being authorized.', + }, + country: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The country in which the marketing authorization has been granted.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Jurisdiction within a country.', + }, + status: { + type: require('./codeableconcept.input.js'), + description: 'The status of the marketing authorization.', + }, + _statusDate: { + type: require('./element.input.js'), + description: 'The date at which the given status has become applicable.', + }, + statusDate: { + type: DateTimeScalar, + description: 'The date at which the given status has become applicable.', + }, + _restoreDate: { + type: require('./element.input.js'), + description: + 'The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.', + }, + restoreDate: { + type: DateTimeScalar, + description: + 'The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.', + }, + validityPeriod: { + type: require('./period.input.js'), + description: + 'The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format.', + }, + dataExclusivityPeriod: { + type: require('./period.input.js'), + description: + 'A period of time after authorization before generic product applicatiosn can be submitted.', + }, + _dateOfFirstAuthorization: { + type: require('./element.input.js'), + description: + 'The date when the first authorization was granted by a Medicines Regulatory Agency.', + }, + dateOfFirstAuthorization: { + type: DateTimeScalar, + description: + 'The date when the first authorization was granted by a Medicines Regulatory Agency.', + }, + _internationalBirthDate: { + type: require('./element.input.js'), + description: + "Date of first marketing authorization for a company's new medicinal product in any country in the World.", + }, + internationalBirthDate: { + type: DateTimeScalar, + description: + "Date of first marketing authorization for a company's new medicinal product in any country in the World.", + }, + legalBasis: { + type: require('./codeableconcept.input.js'), + description: + 'The legal framework against which this authorization is granted.', + }, + jurisdictionalAuthorization: { + type: new GraphQLList( + require('./medicinalproductauthorizationjurisdictionalauthorization.input.js'), + ), + description: 'Authorization in areas within a country.', + }, + holder: { + type: GraphQLString, + description: 'Marketing Authorization Holder.', + }, + regulator: { + type: GraphQLString, + description: 'Medicines Regulatory Agency.', + }, + procedure: { + type: require('./medicinalproductauthorizationprocedure.input.js'), + description: + 'The regulatory procedure for granting or amending a marketing authorization.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductauthorizationjurisdictionalauthorization.input.js b/src/resources/4_0_0/inputs/medicinalproductauthorizationjurisdictionalauthorization.input.js new file mode 100644 index 00000000..c8974f53 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductauthorizationjurisdictionalauthorization.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductAuthorizationjurisdictionalAuthorization Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductAuthorizationjurisdictionalAuthorization_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'The assigned number for the marketing authorization.', + }, + country: { + type: require('./codeableconcept.input.js'), + description: 'Country of authorization.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Jurisdiction within a country.', + }, + legalStatusOfSupply: { + type: require('./codeableconcept.input.js'), + description: 'The legal status of supply in a jurisdiction or region.', + }, + validityPeriod: { + type: require('./period.input.js'), + description: 'The start and expected end date of the authorization.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductauthorizationprocedure.input.js b/src/resources/4_0_0/inputs/medicinalproductauthorizationprocedure.input.js new file mode 100644 index 00000000..d0b470a5 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductauthorizationprocedure.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductAuthorizationprocedure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductAuthorizationprocedure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Identifier for this procedure.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Type of procedure.', + }, + datePeriod: { + type: require('./period.input.js'), + description: 'Date of procedure.', + }, + _dateDateTime: { + type: require('./element.input.js'), + description: 'Date of procedure.', + }, + dateDateTime: { + type: DateTimeScalar, + description: 'Date of procedure.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductcontraindication.input.js b/src/resources/4_0_0/inputs/medicinalproductcontraindication.input.js new file mode 100644 index 00000000..9bdb7c71 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductcontraindication.input.js @@ -0,0 +1,122 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductContraindication Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductContraindication_Input', + description: + 'The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductContraindication_Enum_input', + values: { + MedicinalProductContraindication: { + value: 'MedicinalProductContraindication', + }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + subject: { + type: new GraphQLList(GraphQLString), + description: 'The medication for which this is an indication.', + }, + disease: { + type: require('./codeableconcept.input.js'), + description: + 'The disease, symptom or procedure for the contraindication.', + }, + diseaseStatus: { + type: require('./codeableconcept.input.js'), + description: + 'The status of the disease or symptom for the contraindication.', + }, + comorbidity: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A comorbidity (concurrent condition) or coinfection.', + }, + therapeuticIndication: { + type: new GraphQLList(GraphQLString), + description: + 'Information about the use of the medicinal product in relation to other therapies as part of the indication.', + }, + otherTherapy: { + type: new GraphQLList( + require('./medicinalproductcontraindicationothertherapy.input.js'), + ), + description: + 'Information about the use of the medicinal product in relation to other therapies described as part of the indication.', + }, + population: { + type: new GraphQLList(require('./population.input.js')), + description: 'The population group to which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductcontraindicationothertherapy.input.js b/src/resources/4_0_0/inputs/medicinalproductcontraindicationothertherapy.input.js new file mode 100644 index 00000000..7fb8aabf --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductcontraindicationothertherapy.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductContraindicationotherTherapy Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductContraindicationotherTherapy_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + therapyRelationshipType: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The type of relationship between the medicinal product indication or contraindication and another therapy.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductindication.input.js b/src/resources/4_0_0/inputs/medicinalproductindication.input.js new file mode 100644 index 00000000..76f8419d --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductindication.input.js @@ -0,0 +1,128 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductIndication Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductIndication_Input', + description: 'Indication for the Medicinal Product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductIndication_Enum_input', + values: { + MedicinalProductIndication: { value: 'MedicinalProductIndication' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + subject: { + type: new GraphQLList(GraphQLString), + description: 'The medication for which this is an indication.', + }, + diseaseSymptomProcedure: { + type: require('./codeableconcept.input.js'), + description: + 'The disease, symptom or procedure that is the indication for treatment.', + }, + diseaseStatus: { + type: require('./codeableconcept.input.js'), + description: + 'The status of the disease or symptom for which the indication applies.', + }, + comorbidity: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Comorbidity (concurrent condition) or co-infection as part of the indication.', + }, + intendedEffect: { + type: require('./codeableconcept.input.js'), + description: + 'The intended effect, aim or strategy to be achieved by the indication.', + }, + duration: { + type: require('./quantity.input.js'), + description: 'Timing or duration information as part of the indication.', + }, + otherTherapy: { + type: new GraphQLList( + require('./medicinalproductindicationothertherapy.input.js'), + ), + description: + 'Information about the use of the medicinal product in relation to other therapies described as part of the indication.', + }, + undesirableEffect: { + type: new GraphQLList(GraphQLString), + description: 'Describe the undesirable effects of the medicinal product.', + }, + population: { + type: new GraphQLList(require('./population.input.js')), + description: 'The population group to which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductindicationothertherapy.input.js b/src/resources/4_0_0/inputs/medicinalproductindicationothertherapy.input.js new file mode 100644 index 00000000..be2336d0 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductindicationothertherapy.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIndicationotherTherapy Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductIndicationotherTherapy_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + therapyRelationshipType: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The type of relationship between the medicinal product indication or contraindication and another therapy.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + }, + medicationReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductingredient.input.js b/src/resources/4_0_0/inputs/medicinalproductingredient.input.js new file mode 100644 index 00000000..17c38566 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductingredient.input.js @@ -0,0 +1,118 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductIngredient Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductIngredient_Input', + description: + 'An ingredient of a manufactured item or pharmaceutical product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductIngredient_Enum_input', + values: { + MedicinalProductIngredient: { value: 'MedicinalProductIngredient' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + role: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Ingredient role e.g. Active ingredient, excipient.', + }, + _allergenicIndicator: { + type: require('./element.input.js'), + description: 'If the ingredient is a known or suspected allergen.', + }, + allergenicIndicator: { + type: GraphQLBoolean, + description: 'If the ingredient is a known or suspected allergen.', + }, + manufacturer: { + type: new GraphQLList(GraphQLString), + description: 'Manufacturer of this Ingredient.', + }, + specifiedSubstance: { + type: new GraphQLList( + require('./medicinalproductingredientspecifiedsubstance.input.js'), + ), + description: 'A specified substance that comprises this ingredient.', + }, + substance: { + type: require('./medicinalproductingredientsubstance.input.js'), + description: 'The ingredient substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstance.input.js b/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstance.input.js new file mode 100644 index 00000000..6a272868 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstance.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIngredientspecifiedSubstance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductIngredientspecifiedSubstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The specified substance.', + }, + group: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The group of specified substance, e.g. group 1 to 4.', + }, + confidentiality: { + type: require('./codeableconcept.input.js'), + description: + 'Confidentiality level of the specified substance as the ingredient.', + }, + strength: { + type: new GraphQLList( + require('./medicinalproductingredientspecifiedsubstancestrength.input.js'), + ), + description: + 'Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstancestrength.input.js b/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstancestrength.input.js new file mode 100644 index 00000000..a004af41 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstancestrength.input.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIngredientspecifiedSubstancestrength Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductIngredientspecifiedSubstancestrength_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + presentation: { + type: new GraphQLNonNull(require('./ratio.input.js')), + description: + 'The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.', + }, + presentationLowLimit: { + type: require('./ratio.input.js'), + description: + 'A lower limit for the quantity of substance in the unit of presentation. For use when there is a range of strengths, this is the lower limit, with the presentation attribute becoming the upper limit.', + }, + concentration: { + type: require('./ratio.input.js'), + description: 'The strength per unitary volume (or mass).', + }, + concentrationLowLimit: { + type: require('./ratio.input.js'), + description: + 'A lower limit for the strength per unitary volume (or mass), for when there is a range. The concentration attribute then becomes the upper limit.', + }, + _measurementPoint: { + type: require('./element.input.js'), + description: + 'For when strength is measured at a particular point or distance.', + }, + measurementPoint: { + type: GraphQLString, + description: + 'For when strength is measured at a particular point or distance.', + }, + country: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The country or countries for which the strength range applies.', + }, + referenceStrength: { + type: new GraphQLList( + require('./medicinalproductingredientspecifiedsubstancestrengthreferencestrength.input.js'), + ), + description: 'Strength expressed in terms of a reference substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstancestrengthreferencestrength.input.js b/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstancestrengthreferencestrength.input.js new file mode 100644 index 00000000..90f52f44 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductingredientspecifiedsubstancestrengthreferencestrength.input.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIngredientspecifiedSubstancestrengthreferenceStrength Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: + 'MedicinalProductIngredientspecifiedSubstancestrengthreferenceStrength_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + substance: { + type: require('./codeableconcept.input.js'), + description: 'Relevant reference substance.', + }, + strength: { + type: new GraphQLNonNull(require('./ratio.input.js')), + description: 'Strength expressed in terms of a reference substance.', + }, + strengthLowLimit: { + type: require('./ratio.input.js'), + description: 'Strength expressed in terms of a reference substance.', + }, + _measurementPoint: { + type: require('./element.input.js'), + description: + 'For when strength is measured at a particular point or distance.', + }, + measurementPoint: { + type: GraphQLString, + description: + 'For when strength is measured at a particular point or distance.', + }, + country: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The country or countries for which the strength range applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductingredientsubstance.input.js b/src/resources/4_0_0/inputs/medicinalproductingredientsubstance.input.js new file mode 100644 index 00000000..c1d6e795 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductingredientsubstance.input.js @@ -0,0 +1,41 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIngredientsubstance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductIngredientsubstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The ingredient substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductinteraction.input.js b/src/resources/4_0_0/inputs/medicinalproductinteraction.input.js new file mode 100644 index 00000000..d604c3d2 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductinteraction.input.js @@ -0,0 +1,126 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductInteraction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductInteraction_Input', + description: + 'The interactions of the medicinal product with other medicinal products, or other forms of interactions.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductInteraction_Enum_input', + values: { + MedicinalProductInteraction: { + value: 'MedicinalProductInteraction', + }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + subject: { + type: new GraphQLList(GraphQLString), + description: 'The medication for which this is a described interaction.', + }, + _description: { + type: require('./element.input.js'), + description: 'The interaction described.', + }, + description: { + type: GraphQLString, + description: 'The interaction described.', + }, + interactant: { + type: new GraphQLList( + require('./medicinalproductinteractioninteractant.input.js'), + ), + description: + 'The specific medication, food or laboratory test that interacts.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.', + }, + effect: { + type: require('./codeableconcept.input.js'), + description: + "The effect of the interaction, for example 'reduced gastric absorption of primary medication'.", + }, + incidence: { + type: require('./codeableconcept.input.js'), + description: + 'The incidence of the interaction, e.g. theoretical, observed.', + }, + management: { + type: require('./codeableconcept.input.js'), + description: 'Actions for managing the interaction.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductinteractioninteractant.input.js b/src/resources/4_0_0/inputs/medicinalproductinteractioninteractant.input.js new file mode 100644 index 00000000..204e3dd9 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductinteractioninteractant.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductInteractioninteractant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductInteractioninteractant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + itemReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The specific medication, food or laboratory test that interacts.', + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The specific medication, food or laboratory test that interacts.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductmanufactured.input.js b/src/resources/4_0_0/inputs/medicinalproductmanufactured.input.js new file mode 100644 index 00000000..ae83b620 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductmanufactured.input.js @@ -0,0 +1,119 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductManufactured Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductManufactured_Input', + description: + 'The manufactured item as contained in the packaged medicinal product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductManufactured_Enum_input', + values: { + MedicinalProductManufactured: { + value: 'MedicinalProductManufactured', + }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + manufacturedDoseForm: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Dose form as manufactured and before any transformation into the pharmaceutical product.', + }, + unitOfPresentation: { + type: require('./codeableconcept.input.js'), + description: + 'The “real world” units in which the quantity of the manufactured item is described.', + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: "The quantity or 'count number' of the manufactured item.", + }, + manufacturer: { + type: new GraphQLList(GraphQLString), + description: + "Manufacturer of the item (Note that this should be named 'manufacturer' but it currently causes technical issues).", + }, + ingredient: { + type: new GraphQLList(GraphQLString), + description: 'Ingredient.', + }, + physicalCharacteristics: { + type: require('./prodcharacteristic.input.js'), + description: 'Dimensions, color etc.', + }, + otherCharacteristics: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Other codeable characteristics.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductmanufacturingbusinessoperation.input.js b/src/resources/4_0_0/inputs/medicinalproductmanufacturingbusinessoperation.input.js new file mode 100644 index 00000000..33691ce3 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductmanufacturingbusinessoperation.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductmanufacturingBusinessOperation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductmanufacturingBusinessOperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + operationType: { + type: require('./codeableconcept.input.js'), + description: 'The type of manufacturing operation.', + }, + authorisationReferenceNumber: { + type: require('./identifier.input.js'), + description: 'Regulatory authorization reference number.', + }, + _effectiveDate: { + type: require('./element.input.js'), + description: 'Regulatory authorization date.', + }, + effectiveDate: { + type: DateTimeScalar, + description: 'Regulatory authorization date.', + }, + confidentialityIndicator: { + type: require('./codeableconcept.input.js'), + description: 'To indicate if this proces is commercially confidential.', + }, + manufacturer: { + type: new GraphQLList(GraphQLString), + description: + 'The manufacturer or establishment associated with the process.', + }, + regulator: { + type: GraphQLString, + description: 'A regulator which oversees the operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductname.input.js b/src/resources/4_0_0/inputs/medicinalproductname.input.js new file mode 100644 index 00000000..97c7a352 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductname.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductname Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductname_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _productName: { + type: require('./element.input.js'), + description: 'The full product name.', + }, + productName: { + type: new GraphQLNonNull(GraphQLString), + description: 'The full product name.', + }, + namePart: { + type: new GraphQLList(require('./medicinalproductnamenamepart.input.js')), + description: 'Coding words or phrases of the name.', + }, + countryLanguage: { + type: new GraphQLList( + require('./medicinalproductnamecountrylanguage.input.js'), + ), + description: 'Country where the name applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductnamecountrylanguage.input.js b/src/resources/4_0_0/inputs/medicinalproductnamecountrylanguage.input.js new file mode 100644 index 00000000..0e940f04 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductnamecountrylanguage.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductnamecountryLanguage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductnamecountryLanguage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + country: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Country code for where this name applies.', + }, + jurisdiction: { + type: require('./codeableconcept.input.js'), + description: 'Jurisdiction code for where this name applies.', + }, + language: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Language code for this name.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductnamenamepart.input.js b/src/resources/4_0_0/inputs/medicinalproductnamenamepart.input.js new file mode 100644 index 00000000..03f32191 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductnamenamepart.input.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductnamenamePart Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductnamenamePart_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _part: { + type: require('./element.input.js'), + description: 'A fragment of a product name.', + }, + part: { + type: new GraphQLNonNull(GraphQLString), + description: 'A fragment of a product name.', + }, + type: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'Idenifying type for this part of the name (e.g. strength part).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductpackaged.input.js b/src/resources/4_0_0/inputs/medicinalproductpackaged.input.js new file mode 100644 index 00000000..2e89352a --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductpackaged.input.js @@ -0,0 +1,133 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductPackaged Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductPackaged_Input', + description: 'A medicinal product in a container or package.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductPackaged_Enum_input', + values: { + MedicinalProductPackaged: { value: 'MedicinalProductPackaged' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Unique identifier.', + }, + subject: { + type: new GraphQLList(GraphQLString), + description: 'The product with this is a pack for.', + }, + _description: { + type: require('./element.input.js'), + description: 'Textual description.', + }, + description: { + type: GraphQLString, + description: 'Textual description.', + }, + legalStatusOfSupply: { + type: require('./codeableconcept.input.js'), + description: + 'The legal status of supply of the medicinal product as classified by the regulator.', + }, + marketingStatus: { + type: new GraphQLList(require('./marketingstatus.input.js')), + description: 'Marketing information.', + }, + marketingAuthorization: { + type: GraphQLString, + description: 'Manufacturer of this Package Item.', + }, + manufacturer: { + type: new GraphQLList(GraphQLString), + description: 'Manufacturer of this Package Item.', + }, + batchIdentifier: { + type: new GraphQLList( + require('./medicinalproductpackagedbatchidentifier.input.js'), + ), + description: 'Batch numbering.', + }, + packageItem: { + type: new GraphQLList( + new GraphQLNonNull( + require('./medicinalproductpackagedpackageitem.input.js'), + ), + ), + description: + 'A packaging item, as a contained for medicine, possibly with other packaging items within.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductpackagedbatchidentifier.input.js b/src/resources/4_0_0/inputs/medicinalproductpackagedbatchidentifier.input.js new file mode 100644 index 00000000..42712222 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductpackagedbatchidentifier.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPackagedbatchIdentifier Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductPackagedbatchIdentifier_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + outerPackaging: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: + 'A number appearing on the outer packaging of a specific batch.', + }, + immediatePackaging: { + type: require('./identifier.input.js'), + description: + 'A number appearing on the immediate packaging (and not the outer packaging).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductpackagedpackageitem.input.js b/src/resources/4_0_0/inputs/medicinalproductpackagedpackageitem.input.js new file mode 100644 index 00000000..1d43fa8b --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductpackagedpackageitem.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPackagedpackageItem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductPackagedpackageItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Including possibly Data Carrier Identifier.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The physical type of the container of the medicine.', + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'The quantity of this package in the medicinal product, at the current level of packaging. The outermost is always 1.', + }, + material: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Material type of the package item.', + }, + alternateMaterial: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A possible alternate material for the packaging.', + }, + device: { + type: new GraphQLList(GraphQLString), + description: 'A device accompanying a medicinal product.', + }, + manufacturedItem: { + type: new GraphQLList(GraphQLString), + description: + 'The manufactured item as contained in the packaged medicinal product.', + }, + physicalCharacteristics: { + type: require('./prodcharacteristic.input.js'), + description: 'Dimensions, color etc.', + }, + otherCharacteristics: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Other codeable characteristics.', + }, + shelfLifeStorage: { + type: new GraphQLList(require('./productshelflife.input.js')), + description: 'Shelf Life and storage information.', + }, + manufacturer: { + type: new GraphQLList(GraphQLString), + description: 'Manufacturer of this Package Item.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductpharmaceutical.input.js b/src/resources/4_0_0/inputs/medicinalproductpharmaceutical.input.js new file mode 100644 index 00000000..2b088243 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductpharmaceutical.input.js @@ -0,0 +1,124 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductPharmaceutical Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductPharmaceutical_Input', + description: + 'A pharmaceutical product described in terms of its composition and dose form.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductPharmaceutical_Enum_input', + values: { + MedicinalProductPharmaceutical: { + value: 'MedicinalProductPharmaceutical', + }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'An identifier for the pharmaceutical medicinal product.', + }, + administrableDoseForm: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The administrable dose form, after necessary reconstitution.', + }, + unitOfPresentation: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + ingredient: { + type: new GraphQLList(GraphQLString), + description: 'Ingredient.', + }, + device: { + type: new GraphQLList(GraphQLString), + description: 'Accompanying device.', + }, + characteristics: { + type: new GraphQLList( + require('./medicinalproductpharmaceuticalcharacteristics.input.js'), + ), + description: 'Characteristics e.g. a products onset of action.', + }, + routeOfAdministration: { + type: new GraphQLList( + new GraphQLNonNull( + require('./medicinalproductpharmaceuticalrouteofadministration.input.js'), + ), + ), + description: + 'The path by which the pharmaceutical product is taken into or makes contact with the body.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalcharacteristics.input.js b/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalcharacteristics.input.js new file mode 100644 index 00000000..a12f6d7b --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalcharacteristics.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPharmaceuticalcharacteristics Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductPharmaceuticalcharacteristics_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A coded characteristic.', + }, + status: { + type: require('./codeableconcept.input.js'), + description: 'The status of characteristic e.g. assigned or pending.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministration.input.js b/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministration.input.js new file mode 100644 index 00000000..5cd19db9 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministration.input.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPharmaceuticalrouteOfAdministration Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductPharmaceuticalrouteOfAdministration_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Coded expression for the route.', + }, + firstDose: { + type: require('./quantity.input.js'), + description: + 'The first dose (dose quantity) administered in humans can be specified, for a product under investigation, using a numerical value and its unit of measurement.', + }, + maxSingleDose: { + type: require('./quantity.input.js'), + description: + 'The maximum single dose that can be administered as per the protocol of a clinical trial can be specified using a numerical value and its unit of measurement.', + }, + maxDosePerDay: { + type: require('./quantity.input.js'), + description: + 'The maximum dose per day (maximum dose quantity to be administered in any one 24-h period) that can be administered as per the protocol referenced in the clinical trial authorisation.', + }, + maxDosePerTreatmentPeriod: { + type: require('./ratio.input.js'), + description: + 'The maximum dose per treatment period that can be administered as per the protocol referenced in the clinical trial authorisation.', + }, + maxTreatmentPeriod: { + type: require('./duration.input.js'), + description: + 'The maximum treatment period during which an Investigational Medicinal Product can be administered as per the protocol referenced in the clinical trial authorisation.', + }, + targetSpecies: { + type: new GraphQLList( + require('./medicinalproductpharmaceuticalrouteofadministrationtargetspecies.input.js'), + ), + description: 'A species for which this route applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministrationtargetspecies.input.js b/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministrationtargetspecies.input.js new file mode 100644 index 00000000..f0b9ca5f --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministrationtargetspecies.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPharmaceuticalrouteOfAdministrationtargetSpecies Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: + 'MedicinalProductPharmaceuticalrouteOfAdministrationtargetSpecies_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Coded expression for the species.', + }, + withdrawalPeriod: { + type: new GraphQLList( + require('./medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.input.js'), + ), + description: + 'A species specific time during which consumption of animal product is not appropriate.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.input.js b/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.input.js new file mode 100644 index 00000000..7a492a32 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPharmaceuticalrouteOfAdministrationtargetSpecieswithdrawalPeriod Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: + 'MedicinalProductPharmaceuticalrouteOfAdministrationtargetSpecieswithdrawalPeriod_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + tissue: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Coded expression for the type of tissue for which the withdrawal period applues, e.g. meat, milk.', + }, + value: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'A value for the time.', + }, + _supportingInformation: { + type: require('./element.input.js'), + description: 'Extra information about the withdrawal period.', + }, + supportingInformation: { + type: GraphQLString, + description: 'Extra information about the withdrawal period.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductspecialdesignation.input.js b/src/resources/4_0_0/inputs/medicinalproductspecialdesignation.input.js new file mode 100644 index 00000000..69a948a1 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductspecialdesignation.input.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductspecialDesignation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductspecialDesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Identifier for the designation, or procedure number.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of special designation, e.g. orphan drug, minor use.', + }, + intendedUse: { + type: require('./codeableconcept.input.js'), + description: + 'The intended use of the product, e.g. prevention, treatment.', + }, + indicationCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'Condition for which the medicinal use applies.', + }, + indicationReference: { + type: GraphQLString, + description: 'Condition for which the medicinal use applies.', + }, + status: { + type: require('./codeableconcept.input.js'), + description: 'For example granted, pending, expired or withdrawn.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date when the designation was granted.', + }, + date: { + type: DateTimeScalar, + description: 'Date when the designation was granted.', + }, + species: { + type: require('./codeableconcept.input.js'), + description: 'Animal species for which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/medicinalproductundesirableeffect.input.js b/src/resources/4_0_0/inputs/medicinalproductundesirableeffect.input.js new file mode 100644 index 00000000..5d9cf676 --- /dev/null +++ b/src/resources/4_0_0/inputs/medicinalproductundesirableeffect.input.js @@ -0,0 +1,107 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductUndesirableEffect Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MedicinalProductUndesirableEffect_Input', + description: 'Describe the undesirable effects of the medicinal product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductUndesirableEffect_Enum_input', + values: { + MedicinalProductUndesirableEffect: { + value: 'MedicinalProductUndesirableEffect', + }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + subject: { + type: new GraphQLList(GraphQLString), + description: 'The medication for which this is an indication.', + }, + symptomConditionEffect: { + type: require('./codeableconcept.input.js'), + description: 'The symptom, condition or undesirable effect.', + }, + classification: { + type: require('./codeableconcept.input.js'), + description: 'Classification of the effect.', + }, + frequencyOfOccurrence: { + type: require('./codeableconcept.input.js'), + description: 'The frequency of occurrence of the effect.', + }, + population: { + type: new GraphQLList(require('./population.input.js')), + description: 'The population group to which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/messagedefinition.input.js b/src/resources/4_0_0/inputs/messagedefinition.input.js new file mode 100644 index 00000000..5348c5e3 --- /dev/null +++ b/src/resources/4_0_0/inputs/messagedefinition.input.js @@ -0,0 +1,297 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MessageDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MessageDefinition_Input', + description: + 'Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageDefinition_Enum_input', + values: { MessageDefinition: { value: 'MessageDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.', + }, + url: { + type: UriScalar, + description: + 'The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the message definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the message definition.', + }, + _replaces: { + type: require('./element.input.js'), + description: 'A MessageDefinition that is superseded by this definition.', + }, + replaces: { + type: new GraphQLList(CanonicalScalar), + description: 'A MessageDefinition that is superseded by this definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this message definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this message definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the message definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the message definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the message definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the message definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the message definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this message definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this message definition is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', + }, + _base: { + type: require('./element.input.js'), + description: + 'The MessageDefinition that is the basis for the contents of this resource.', + }, + base: { + type: CanonicalScalar, + description: + 'The MessageDefinition that is the basis for the contents of this resource.', + }, + _parent: { + type: require('./element.input.js'), + description: + 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', + }, + parent: { + type: new GraphQLList(CanonicalScalar), + description: + 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', + }, + eventCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'Event code or link to the EventDefinition.', + }, + _eventUri: { + type: require('./element.input.js'), + description: 'Event code or link to the EventDefinition.', + }, + eventUri: { + type: new GraphQLNonNull(UriScalar), + description: 'Event code or link to the EventDefinition.', + }, + _category: { + type: require('./element.input.js'), + description: 'The impact of the content of the message.', + }, + category: { + type: CodeScalar, + description: 'The impact of the content of the message.', + }, + focus: { + type: new GraphQLList(require('./messagedefinitionfocus.input.js')), + description: + 'Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.', + }, + _responseRequired: { + type: require('./element.input.js'), + description: + 'Declare at a message definition level whether a response is required or only upon error or success, or never.', + }, + responseRequired: { + type: CodeScalar, + description: + 'Declare at a message definition level whether a response is required or only upon error or success, or never.', + }, + allowedResponse: { + type: new GraphQLList( + require('./messagedefinitionallowedresponse.input.js'), + ), + description: + 'Indicates what types of messages may be sent as an application-level response to this message.', + }, + _graph: { + type: require('./element.input.js'), + description: + 'Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [GraphDefinition](graphdefinition.html) that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.', + }, + graph: { + type: new GraphQLList(CanonicalScalar), + description: + 'Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [GraphDefinition](graphdefinition.html) that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/messagedefinitionallowedresponse.input.js b/src/resources/4_0_0/inputs/messagedefinitionallowedresponse.input.js new file mode 100644 index 00000000..3eab506e --- /dev/null +++ b/src/resources/4_0_0/inputs/messagedefinitionallowedresponse.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary MessageDefinitionallowedResponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MessageDefinitionallowedResponse_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _message: { + type: require('./element.input.js'), + description: + 'A reference to the message definition that must be adhered to by this supported response.', + }, + message: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A reference to the message definition that must be adhered to by this supported response.', + }, + _situation: { + type: require('./element.input.js'), + description: + 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', + }, + situation: { + type: GraphQLString, + description: + 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/messagedefinitionfocus.input.js b/src/resources/4_0_0/inputs/messagedefinitionfocus.input.js new file mode 100644 index 00000000..e6def3d9 --- /dev/null +++ b/src/resources/4_0_0/inputs/messagedefinitionfocus.input.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary MessageDefinitionfocus Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MessageDefinitionfocus_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'The kind of resource that must be the focus for this message.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of resource that must be the focus for this message.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'A profile that reflects constraints for the focal resource (and potentially for related resources).', + }, + profile: { + type: CanonicalScalar, + description: + 'A profile that reflects constraints for the focal resource (and potentially for related resources).', + }, + _min: { + type: require('./element.input.js'), + description: + 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + min: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + _max: { + type: require('./element.input.js'), + description: + 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + max: { + type: GraphQLString, + description: + 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/messageheader.input.js b/src/resources/4_0_0/inputs/messageheader.input.js new file mode 100644 index 00000000..9ca17d55 --- /dev/null +++ b/src/resources/4_0_0/inputs/messageheader.input.js @@ -0,0 +1,152 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary MessageHeader Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MessageHeader_Input', + description: + 'The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageHeader_Enum_input', + values: { MessageHeader: { value: 'MessageHeader' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + eventCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://terminology.hl7.org/CodeSystem/message-events'. Alternatively uri to the EventDefinition.", + }, + _eventUri: { + type: require('./element.input.js'), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://terminology.hl7.org/CodeSystem/message-events'. Alternatively uri to the EventDefinition.", + }, + eventUri: { + type: new GraphQLNonNull(UriScalar), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://terminology.hl7.org/CodeSystem/message-events'. Alternatively uri to the EventDefinition.", + }, + destination: { + type: new GraphQLList(require('./messageheaderdestination.input.js')), + description: + 'The destination application which the message is intended for.', + }, + sender: { + type: GraphQLString, + description: + 'Identifies the sending system to allow the use of a trust relationship.', + }, + enterer: { + type: GraphQLString, + description: + 'The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', + }, + author: { + type: GraphQLString, + description: + 'The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', + }, + source: { + type: new GraphQLNonNull(require('./messageheadersource.input.js')), + description: 'The source application from which this message originated.', + }, + responsible: { + type: GraphQLString, + description: + 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', + }, + reason: { + type: require('./codeableconcept.input.js'), + description: + 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', + }, + response: { + type: require('./messageheaderresponse.input.js'), + description: + 'Information about the message that this message is a response to. Only present if this message is a response.', + }, + focus: { + type: new GraphQLList(GraphQLString), + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + }, + _definition: { + type: require('./element.input.js'), + description: 'Permanent link to the MessageDefinition for this message.', + }, + definition: { + type: CanonicalScalar, + description: 'Permanent link to the MessageDefinition for this message.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/messageheaderdestination.input.js b/src/resources/4_0_0/inputs/messageheaderdestination.input.js new file mode 100644 index 00000000..2641e4d1 --- /dev/null +++ b/src/resources/4_0_0/inputs/messageheaderdestination.input.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary MessageHeaderdestination Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MessageHeaderdestination_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Human-readable name for the target system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the target system.', + }, + target: { + type: GraphQLString, + description: + 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', + }, + _endpoint: { + type: require('./element.input.js'), + description: 'Indicates where the message should be routed to.', + }, + endpoint: { + type: new GraphQLNonNull(UrlScalar), + description: 'Indicates where the message should be routed to.', + }, + receiver: { + type: GraphQLString, + description: + "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/messageheaderresponse.input.js b/src/resources/4_0_0/inputs/messageheaderresponse.input.js new file mode 100644 index 00000000..3b7b4ae7 --- /dev/null +++ b/src/resources/4_0_0/inputs/messageheaderresponse.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MessageHeaderresponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MessageHeaderresponse_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _identifier: { + type: require('./element.input.js'), + description: + 'The MessageHeader.id of the message to which this message is a response.', + }, + identifier: { + type: new GraphQLNonNull(IdScalar), + description: + 'The MessageHeader.id of the message to which this message is a response.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + details: { + type: GraphQLString, + description: 'Full details of any issues found in the message.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/messageheadersource.input.js b/src/resources/4_0_0/inputs/messageheadersource.input.js new file mode 100644 index 00000000..2622c32d --- /dev/null +++ b/src/resources/4_0_0/inputs/messageheadersource.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary MessageHeadersource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MessageHeadersource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Human-readable name for the source system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the source system.', + }, + _software: { + type: require('./element.input.js'), + description: + 'May include configuration or other information useful in debugging.', + }, + software: { + type: GraphQLString, + description: + 'May include configuration or other information useful in debugging.', + }, + _version: { + type: require('./element.input.js'), + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + version: { + type: GraphQLString, + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + contact: { + type: require('./contactpoint.input.js'), + description: + 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', + }, + _endpoint: { + type: require('./element.input.js'), + description: 'Identifies the routing target to send acknowledgements to.', + }, + endpoint: { + type: new GraphQLNonNull(UrlScalar), + description: 'Identifies the routing target to send acknowledgements to.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/meta.input.js b/src/resources/4_0_0/inputs/meta.input.js new file mode 100644 index 00000000..81ad5426 --- /dev/null +++ b/src/resources/4_0_0/inputs/meta.input.js @@ -0,0 +1,86 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary Meta Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Meta_Input', + description: + 'Base StructureDefinition for Meta Type: The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _versionId: { + type: require('./element.input.js'), + description: + 'The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.', + }, + versionId: { + type: IdScalar, + description: + 'The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.', + }, + _lastUpdated: { + type: require('./element.input.js'), + description: + 'When the resource last changed - e.g. when the version changed.', + }, + lastUpdated: { + type: InstantScalar, + description: + 'When the resource last changed - e.g. when the version changed.', + }, + _source: { + type: require('./element.input.js'), + description: + 'A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.', + }, + source: { + type: UriScalar, + description: + 'A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).', + }, + profile: { + type: new GraphQLList(CanonicalScalar), + description: + 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).', + }, + security: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', + }, + tag: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/metadataresource.input.js b/src/resources/4_0_0/inputs/metadataresource.input.js new file mode 100644 index 00000000..8e533789 --- /dev/null +++ b/src/resources/4_0_0/inputs/metadataresource.input.js @@ -0,0 +1,181 @@ +const { + GraphQLList, + GraphQLString, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MetadataResource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MetadataResource_Input', + description: + 'Common Ancestor declaration for conformance and knowledge artifact resources.', + fields: () => ({ + _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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this metadata resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the metadata resource is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this metadata resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the metadata resource is stored on different servers.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the metadata resource.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the metadata resource.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this metadata resource. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this metadata resource. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the metadata resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the metadata resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the metadata resource.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the metadata resource.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the metadata resource from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the metadata resource from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate metadata resource instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the metadata resource is intended to be used.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequence.input.js b/src/resources/4_0_0/inputs/molecularsequence.input.js new file mode 100644 index 00000000..809628dd --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequence.input.js @@ -0,0 +1,181 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MolecularSequence Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequence_Input', + description: 'Raw data describing a biological sequence.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MolecularSequence_Enum_input', + values: { MolecularSequence: { value: 'MolecularSequence' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A unique identifier for this particular sequence instance. This is a FHIR-defined id.', + }, + _type: { + type: require('./element.input.js'), + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', + }, + type: { + type: CodeScalar, + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', + }, + _coordinateSystem: { + type: require('./element.input.js'), + description: + 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', + }, + coordinateSystem: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', + }, + patient: { + type: GraphQLString, + description: + 'The patient whose sequencing results are described by this resource.', + }, + specimen: { + type: GraphQLString, + description: 'Specimen used for sequencing.', + }, + device: { + type: GraphQLString, + description: 'The method for sequencing, for example, chip information.', + }, + performer: { + type: GraphQLString, + description: + 'The organization or lab that should be responsible for this result.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The number of copies of the sequence of interest. (RNASeq).', + }, + referenceSeq: { + type: require('./molecularsequencereferenceseq.input.js'), + description: + 'A sequence that is used as a reference to describe variants that are present in a sequence analyzed.', + }, + variant: { + type: new GraphQLList(require('./molecularsequencevariant.input.js')), + description: + 'The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.', + }, + _observedSeq: { + type: require('./element.input.js'), + description: + 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd.', + }, + observedSeq: { + type: GraphQLString, + description: + 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd.', + }, + quality: { + type: new GraphQLList(require('./molecularsequencequality.input.js')), + description: + 'An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).', + }, + _readCoverage: { + type: require('./element.input.js'), + description: + 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', + }, + readCoverage: { + type: GraphQLInt, + description: + 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', + }, + repository: { + type: new GraphQLList(require('./molecularsequencerepository.input.js')), + description: + "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", + }, + pointer: { + type: new GraphQLList(GraphQLString), + description: + 'Pointer to next atomic sequence which at most contains one variant.', + }, + structureVariant: { + type: new GraphQLList( + require('./molecularsequencestructurevariant.input.js'), + ), + description: 'Information about chromosome structure variation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequencequality.input.js b/src/resources/4_0_0/inputs/molecularsequencequality.input.js new file mode 100644 index 00000000..1024d3a7 --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequencequality.input.js @@ -0,0 +1,162 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MolecularSequencequality Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequencequality_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'INDEL / SNP / Undefined variant.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'INDEL / SNP / Undefined variant.', + }, + standardSequence: { + type: require('./codeableconcept.input.js'), + description: 'Gold standard sequence used for comparing against.', + }, + _start: { + type: require('./element.input.js'), + description: + 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + score: { + type: require('./quantity.input.js'), + description: + 'The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).', + }, + method: { + type: require('./codeableconcept.input.js'), + description: 'Which method is used to get sequence quality.', + }, + _truthTP: { + type: require('./element.input.js'), + description: + 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + truthTP: { + type: GraphQLFloat, + description: + 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + _queryTP: { + type: require('./element.input.js'), + description: + 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + queryTP: { + type: GraphQLFloat, + description: + 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + _truthFN: { + type: require('./element.input.js'), + description: + 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', + }, + truthFN: { + type: GraphQLFloat, + description: + 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', + }, + _queryFP: { + type: require('./element.input.js'), + description: + 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', + }, + queryFP: { + type: GraphQLFloat, + description: + 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', + }, + _gtFP: { + type: require('./element.input.js'), + description: + 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', + }, + gtFP: { + type: GraphQLFloat, + description: + 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', + }, + _precision: { + type: require('./element.input.js'), + description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', + }, + precision: { + type: GraphQLFloat, + description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', + }, + _recall: { + type: require('./element.input.js'), + description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', + }, + recall: { + type: GraphQLFloat, + description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', + }, + _fScore: { + type: require('./element.input.js'), + description: + 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', + }, + fScore: { + type: GraphQLFloat, + description: + 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', + }, + roc: { + type: require('./molecularsequencequalityroc.input.js'), + description: + 'Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequencequalityroc.input.js b/src/resources/4_0_0/inputs/molecularsequencequalityroc.input.js new file mode 100644 index 00000000..3b0694e2 --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequencequalityroc.input.js @@ -0,0 +1,108 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencequalityroc Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequencequalityroc_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _score: { + type: require('./element.input.js'), + description: + 'Invidual data point representing the GQ (genotype quality) score threshold.', + }, + score: { + type: new GraphQLList(GraphQLInt), + description: + 'Invidual data point representing the GQ (genotype quality) score threshold.', + }, + _numTP: { + type: require('./element.input.js'), + description: + "The number of true positives if the GQ score threshold was set to 'score' field value.", + }, + numTP: { + type: new GraphQLList(GraphQLInt), + description: + "The number of true positives if the GQ score threshold was set to 'score' field value.", + }, + _numFP: { + type: require('./element.input.js'), + description: + "The number of false positives if the GQ score threshold was set to 'score' field value.", + }, + numFP: { + type: new GraphQLList(GraphQLInt), + description: + "The number of false positives if the GQ score threshold was set to 'score' field value.", + }, + _numFN: { + type: require('./element.input.js'), + description: + "The number of false negatives if the GQ score threshold was set to 'score' field value.", + }, + numFN: { + type: new GraphQLList(GraphQLInt), + description: + "The number of false negatives if the GQ score threshold was set to 'score' field value.", + }, + _precision: { + type: require('./element.input.js'), + description: + "Calculated precision if the GQ score threshold was set to 'score' field value.", + }, + precision: { + type: new GraphQLList(GraphQLFloat), + description: + "Calculated precision if the GQ score threshold was set to 'score' field value.", + }, + _sensitivity: { + type: require('./element.input.js'), + description: + "Calculated sensitivity if the GQ score threshold was set to 'score' field value.", + }, + sensitivity: { + type: new GraphQLList(GraphQLFloat), + description: + "Calculated sensitivity if the GQ score threshold was set to 'score' field value.", + }, + _fMeasure: { + type: require('./element.input.js'), + description: + "Calculated fScore if the GQ score threshold was set to 'score' field value.", + }, + fMeasure: { + type: new GraphQLList(GraphQLFloat), + description: + "Calculated fScore if the GQ score threshold was set to 'score' field value.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequencereferenceseq.input.js b/src/resources/4_0_0/inputs/molecularsequencereferenceseq.input.js new file mode 100644 index 00000000..0a8a2f9f --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequencereferenceseq.input.js @@ -0,0 +1,111 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MolecularSequencereferenceSeq Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequencereferenceSeq_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + chromosome: { + type: require('./codeableconcept.input.js'), + description: + 'Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).', + }, + _genomeBuild: { + type: require('./element.input.js'), + description: + "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", + }, + genomeBuild: { + type: GraphQLString, + description: + "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", + }, + _orientation: { + type: require('./element.input.js'), + description: + "A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the 'sense' strand, and the opposite complementary strand is the 'antisense' strand.", + }, + orientation: { + type: CodeScalar, + description: + "A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the 'sense' strand, and the opposite complementary strand is the 'antisense' strand.", + }, + referenceSeqId: { + type: require('./codeableconcept.input.js'), + description: + 'Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.', + }, + referenceSeqPointer: { + type: GraphQLString, + description: + 'A pointer to another MolecularSequence entity as reference sequence.', + }, + _referenceSeqString: { + type: require('./element.input.js'), + description: "A string like 'ACGT'.", + }, + referenceSeqString: { + type: GraphQLString, + description: "A string like 'ACGT'.", + }, + _strand: { + type: require('./element.input.js'), + description: + "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", + }, + strand: { + type: CodeScalar, + description: + "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", + }, + _windowStart: { + type: require('./element.input.js'), + description: + 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + windowStart: { + type: GraphQLInt, + description: + 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _windowEnd: { + type: require('./element.input.js'), + description: + 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + windowEnd: { + type: GraphQLInt, + description: + 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequencerepository.input.js b/src/resources/4_0_0/inputs/molecularsequencerepository.input.js new file mode 100644 index 00000000..5cb96805 --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequencerepository.input.js @@ -0,0 +1,97 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary MolecularSequencerepository Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequencerepository_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: + 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', + }, + _url: { + type: require('./element.input.js'), + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + url: { + type: UriScalar, + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + _name: { + type: require('./element.input.js'), + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + name: { + type: GraphQLString, + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + _datasetId: { + type: require('./element.input.js'), + description: + 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', + }, + datasetId: { + type: GraphQLString, + description: + 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', + }, + _variantsetId: { + type: require('./element.input.js'), + description: + 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', + }, + variantsetId: { + type: GraphQLString, + description: + 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', + }, + _readsetId: { + type: require('./element.input.js'), + description: 'Id of the read in this external repository.', + }, + readsetId: { + type: GraphQLString, + description: 'Id of the read in this external repository.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequencestructurevariant.input.js b/src/resources/4_0_0/inputs/molecularsequencestructurevariant.input.js new file mode 100644 index 00000000..92952ced --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequencestructurevariant.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencestructureVariant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequencestructureVariant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + variantType: { + type: require('./codeableconcept.input.js'), + description: + 'Information about chromosome structure variation DNA change type.', + }, + _exact: { + type: require('./element.input.js'), + description: + 'Used to indicate if the outer and inner start-end values have the same meaning.', + }, + exact: { + type: GraphQLBoolean, + description: + 'Used to indicate if the outer and inner start-end values have the same meaning.', + }, + _length: { + type: require('./element.input.js'), + description: 'Length of the variant chromosome.', + }, + length: { + type: GraphQLInt, + description: 'Length of the variant chromosome.', + }, + outer: { + type: require('./molecularsequencestructurevariantouter.input.js'), + description: 'Structural variant outer.', + }, + inner: { + type: require('./molecularsequencestructurevariantinner.input.js'), + description: 'Structural variant inner.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequencestructurevariantinner.input.js b/src/resources/4_0_0/inputs/molecularsequencestructurevariantinner.input.js new file mode 100644 index 00000000..47c7a450 --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequencestructurevariantinner.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencestructureVariantinner Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequencestructureVariantinner_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _start: { + type: require('./element.input.js'), + description: + 'Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequencestructurevariantouter.input.js b/src/resources/4_0_0/inputs/molecularsequencestructurevariantouter.input.js new file mode 100644 index 00000000..2fe642fb --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequencestructurevariantouter.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencestructureVariantouter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequencestructureVariantouter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _start: { + type: require('./element.input.js'), + description: + 'Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/molecularsequencevariant.input.js b/src/resources/4_0_0/inputs/molecularsequencevariant.input.js new file mode 100644 index 00000000..3ab2fb76 --- /dev/null +++ b/src/resources/4_0_0/inputs/molecularsequencevariant.input.js @@ -0,0 +1,92 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencevariant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MolecularSequencevariant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _start: { + type: require('./element.input.js'), + description: + 'Start position of the variant on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Start position of the variant on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + _observedAllele: { + type: require('./element.input.js'), + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + observedAllele: { + type: GraphQLString, + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + _referenceAllele: { + type: require('./element.input.js'), + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + referenceAllele: { + type: GraphQLString, + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + _cigar: { + type: require('./element.input.js'), + description: + 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', + }, + cigar: { + type: GraphQLString, + description: + 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', + }, + variantPointer: { + type: GraphQLString, + description: + 'A pointer to an Observation containing variant information.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/money.input.js b/src/resources/4_0_0/inputs/money.input.js new file mode 100644 index 00000000..4821b23e --- /dev/null +++ b/src/resources/4_0_0/inputs/money.input.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Money Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Money_Input', + description: + 'Base StructureDefinition for Money Type: An amount of economic utility in some recognized currency.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.input.js'), + description: 'Numerical value (with implicit precision).', + }, + value: { + type: GraphQLFloat, + description: 'Numerical value (with implicit precision).', + }, + _currency: { + type: require('./element.input.js'), + description: 'ISO 4217 Currency Code.', + }, + currency: { + type: CodeScalar, + description: 'ISO 4217 Currency Code.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/moneyquantity.input.js b/src/resources/4_0_0/inputs/moneyquantity.input.js new file mode 100644 index 00000000..dd25845a --- /dev/null +++ b/src/resources/4_0_0/inputs/moneyquantity.input.js @@ -0,0 +1,12 @@ +const { GraphQLInputObjectType } = require('graphql'); + +/** + * @name exports + * @summary MoneyQuantity Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'MoneyQuantity_Input', + description: + 'An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision)', + fields: () => ({}), +}); diff --git a/src/resources/4_0_0/inputs/namingsystem.input.js b/src/resources/4_0_0/inputs/namingsystem.input.js new file mode 100644 index 00000000..b0ae0bcd --- /dev/null +++ b/src/resources/4_0_0/inputs/namingsystem.input.js @@ -0,0 +1,192 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary NamingSystem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NamingSystem_Input', + description: + "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a 'System' used within the Identifier and Coding data types.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NamingSystem_Enum_input', + values: { NamingSystem: { value: 'NamingSystem' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this naming system. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this naming system. Enables tracking the life-cycle of the content.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the naming system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the naming system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the naming system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the naming system.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _responsible: { + type: require('./element.input.js'), + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + responsible: { + type: GraphQLString, + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Categorizes a naming system for easier search by grouping related naming systems.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate naming system instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the naming system is intended to be used.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + usage: { + type: GraphQLString, + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + uniqueId: { + type: new GraphQLList( + new GraphQLNonNull(require('./namingsystemuniqueid.input.js')), + ), + description: + 'Indicates how the system may be identified when referenced in electronic exchange.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/namingsystemuniqueid.input.js b/src/resources/4_0_0/inputs/namingsystemuniqueid.input.js new file mode 100644 index 00000000..81c00263 --- /dev/null +++ b/src/resources/4_0_0/inputs/namingsystemuniqueid.input.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary NamingSystemuniqueId Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NamingSystemuniqueId_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + _preferred: { + type: require('./element.input.js'), + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + preferred: { + type: GraphQLBoolean, + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + _comment: { + type: require('./element.input.js'), + description: 'Notes about the past or intended usage of this identifier.', + }, + comment: { + type: GraphQLString, + description: 'Notes about the past or intended usage of this identifier.', + }, + period: { + type: require('./period.input.js'), + description: + 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/narrative.input.js b/src/resources/4_0_0/inputs/narrative.input.js new file mode 100644 index 00000000..03d7141f --- /dev/null +++ b/src/resources/4_0_0/inputs/narrative.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const XhtmlScalar = require('../scalars/xhtml.scalar.js'); + +/** + * @name exports + * @summary Narrative Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Narrative_Input', + description: + 'Base StructureDefinition for Narrative Type: A human-readable summary of the resource conveying the essential clinical and business information for the resource.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _status: { + type: require('./element.input.js'), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + _div: { + type: require('./element.input.js'), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + div: { + type: new GraphQLNonNull(XhtmlScalar), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/nutritionorder.input.js b/src/resources/4_0_0/inputs/nutritionorder.input.js new file mode 100644 index 00000000..103062e7 --- /dev/null +++ b/src/resources/4_0_0/inputs/nutritionorder.input.js @@ -0,0 +1,196 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary NutritionOrder Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NutritionOrder_Input', + description: + 'A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NutritionOrder_Enum_input', + values: { NutritionOrder: { value: 'NutritionOrder' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this order by the order sender or by the order receiver.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + _instantiates: { + type: require('./element.input.js'), + description: + 'The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + instantiates: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + _status: { + type: require('./element.input.js'), + description: 'The workflow status of the nutrition order/request.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The workflow status of the nutrition order/request.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + }, + encounter: { + type: GraphQLString, + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + _dateTime: { + type: require('./element.input.js'), + description: 'The date and time that this nutrition order was requested.', + }, + dateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date and time that this nutrition order was requested.', + }, + orderer: { + type: GraphQLString, + description: + 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', + }, + allergyIntolerance: { + type: new GraphQLList(GraphQLString), + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + }, + foodPreferenceModifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + excludeFoodModifier: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + oralDiet: { + type: require('./nutritionorderoraldiet.input.js'), + description: 'Diet given orally in contrast to enteral (tube) feeding.', + }, + supplement: { + type: new GraphQLList(require('./nutritionordersupplement.input.js')), + description: + "Oral nutritional products given in order to add further nutritional value to the patient's diet.", + }, + enteralFormula: { + type: require('./nutritionorderenteralformula.input.js'), + description: + 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the {{title}} by the requester, performer, subject or other participants.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/nutritionorderenteralformula.input.js b/src/resources/4_0_0/inputs/nutritionorderenteralformula.input.js new file mode 100644 index 00000000..5da2a409 --- /dev/null +++ b/src/resources/4_0_0/inputs/nutritionorderenteralformula.input.js @@ -0,0 +1,98 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderenteralFormula Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NutritionOrderenteralFormula_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + baseFormulaType: { + type: require('./codeableconcept.input.js'), + description: + 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', + }, + _baseFormulaProductName: { + type: require('./element.input.js'), + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + baseFormulaProductName: { + type: GraphQLString, + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + additiveType: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', + }, + _additiveProductName: { + type: require('./element.input.js'), + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + additiveProductName: { + type: GraphQLString, + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + caloricDensity: { + type: require('./quantity.input.js'), + description: + 'The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.', + }, + routeofAdministration: { + type: require('./codeableconcept.input.js'), + description: + "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", + }, + administration: { + type: new GraphQLList( + require('./nutritionorderenteralformulaadministration.input.js'), + ), + description: + 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', + }, + maxVolumeToDeliver: { + type: require('./quantity.input.js'), + description: + 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', + }, + _administrationInstruction: { + type: require('./element.input.js'), + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + administrationInstruction: { + type: GraphQLString, + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/nutritionorderenteralformulaadministration.input.js b/src/resources/4_0_0/inputs/nutritionorderenteralformulaadministration.input.js new file mode 100644 index 00000000..6f446733 --- /dev/null +++ b/src/resources/4_0_0/inputs/nutritionorderenteralformulaadministration.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderenteralFormulaadministration Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NutritionOrderenteralFormulaadministration_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + schedule: { + type: require('./timing.input.js'), + description: + 'The time period and frequency at which the enteral formula should be delivered to the patient.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The volume of formula to provide to the patient per the specified administration schedule.', + }, + rateQuantity: { + type: require('./quantity.input.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + rateRatio: { + type: require('./ratio.input.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/nutritionorderoraldiet.input.js b/src/resources/4_0_0/inputs/nutritionorderoraldiet.input.js new file mode 100644 index 00000000..6316757c --- /dev/null +++ b/src/resources/4_0_0/inputs/nutritionorderoraldiet.input.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderoralDiet Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NutritionOrderoralDiet_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', + }, + schedule: { + type: new GraphQLList(require('./timing.input.js')), + description: + 'The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.', + }, + nutrient: { + type: new GraphQLList( + require('./nutritionorderoraldietnutrient.input.js'), + ), + description: + 'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.', + }, + texture: { + type: new GraphQLList( + require('./nutritionorderoraldiettexture.input.js'), + ), + description: + 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', + }, + fluidConsistencyType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', + }, + _instruction: { + type: require('./element.input.js'), + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/nutritionorderoraldietnutrient.input.js b/src/resources/4_0_0/inputs/nutritionorderoraldietnutrient.input.js new file mode 100644 index 00000000..2c20bd5c --- /dev/null +++ b/src/resources/4_0_0/inputs/nutritionorderoraldietnutrient.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderoralDietnutrient Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NutritionOrderoralDietnutrient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + modifier: { + type: require('./codeableconcept.input.js'), + description: + 'The nutrient that is being modified such as carbohydrate or sodium.', + }, + amount: { + type: require('./quantity.input.js'), + description: 'The quantity of the specified nutrient to include in diet.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/nutritionorderoraldiettexture.input.js b/src/resources/4_0_0/inputs/nutritionorderoraldiettexture.input.js new file mode 100644 index 00000000..7ad3924a --- /dev/null +++ b/src/resources/4_0_0/inputs/nutritionorderoraldiettexture.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderoralDiettexture Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NutritionOrderoralDiettexture_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + modifier: { + type: require('./codeableconcept.input.js'), + description: + 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', + }, + foodType: { + type: require('./codeableconcept.input.js'), + description: + 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/nutritionordersupplement.input.js b/src/resources/4_0_0/inputs/nutritionordersupplement.input.js new file mode 100644 index 00000000..f6985649 --- /dev/null +++ b/src/resources/4_0_0/inputs/nutritionordersupplement.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary NutritionOrdersupplement Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'NutritionOrdersupplement_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', + }, + _productName: { + type: require('./element.input.js'), + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + productName: { + type: GraphQLString, + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + schedule: { + type: new GraphQLList(require('./timing.input.js')), + description: + 'The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount of the nutritional supplement to be given.', + }, + _instruction: { + type: require('./element.input.js'), + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/observation.input.js b/src/resources/4_0_0/inputs/observation.input.js new file mode 100644 index 00000000..84348b27 --- /dev/null +++ b/src/resources/4_0_0/inputs/observation.input.js @@ -0,0 +1,312 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary Observation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Observation_Input', + description: + 'Measurements and simple assertions made about a patient, device or other subject.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Observation_Enum_input', + values: { Observation: { value: 'Observation' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'A unique identifier assigned to this observation.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the result value.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the result value.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that classifies the general type of observation being made.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'name'.", + }, + subject: { + type: GraphQLString, + description: + 'The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.', + }, + focus: { + type: new GraphQLList(GraphQLString), + description: + "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.", + }, + encounter: { + type: GraphQLString, + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', + }, + _effectiveDateTime: { + type: require('./element.input.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveTiming: { + type: require('./timing.input.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + _effectiveInstant: { + type: require('./element.input.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveInstant: { + type: InstantScalar, + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + _issued: { + type: require('./element.input.js'), + description: + 'The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: + "Who was responsible for asserting the observed value as 'true'.", + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueInteger: { + type: GraphQLInt, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + dataAbsentReason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + interpretation: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A categorical assessment of an observation value. For example, high, low, normal.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Comments about the observation or the results.', + }, + bodySite: { + type: require('./codeableconcept.input.js'), + description: + "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + }, + method: { + type: require('./codeableconcept.input.js'), + description: 'Indicates the mechanism used to perform the observation.', + }, + specimen: { + type: GraphQLString, + description: 'The specimen that was used when this observation was made.', + }, + device: { + type: GraphQLString, + description: 'The device used to generate the observation data.', + }, + referenceRange: { + type: new GraphQLList(require('./observationreferencerange.input.js')), + description: + "Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an 'OR'. In other words, to represent two distinct target populations, two `referenceRange` elements would be used.", + }, + hasMember: { + type: new GraphQLList(GraphQLString), + description: + 'This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.', + }, + derivedFrom: { + type: new GraphQLList(GraphQLString), + description: + 'The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.', + }, + component: { + type: new GraphQLList(require('./observationcomponent.input.js')), + description: + 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/observationcomponent.input.js b/src/resources/4_0_0/inputs/observationcomponent.input.js new file mode 100644 index 00000000..2e916214 --- /dev/null +++ b/src/resources/4_0_0/inputs/observationcomponent.input.js @@ -0,0 +1,136 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const TimeScalar = require('../scalars/time.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Observationcomponent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Observationcomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'code'.", + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueInteger: { + type: GraphQLInt, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + dataAbsentReason: { + type: require('./codeableconcept.input.js'), + description: + 'Provides a reason why the expected value in the element Observation.component.value[x] is missing.', + }, + interpretation: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A categorical assessment of an observation value. For example, high, low, normal.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/observationdefinition.input.js b/src/resources/4_0_0/inputs/observationdefinition.input.js new file mode 100644 index 00000000..4eeb94ca --- /dev/null +++ b/src/resources/4_0_0/inputs/observationdefinition.input.js @@ -0,0 +1,165 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ObservationDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ObservationDefinition_Input', + description: + 'Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ObservationDefinition_Enum_input', + values: { ObservationDefinition: { value: 'ObservationDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A code that classifies the general type of observation.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Describes what will be observed. Sometimes this is called the observation 'name'.", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A unique identifier assigned to this ObservationDefinition artifact.', + }, + _permittedDataType: { + type: require('./element.input.js'), + description: + 'The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.', + }, + permittedDataType: { + type: new GraphQLList(CodeScalar), + description: + 'The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.', + }, + _multipleResultsAllowed: { + type: require('./element.input.js'), + description: + 'Multiple results allowed for observations conforming to this ObservationDefinition.', + }, + multipleResultsAllowed: { + type: GraphQLBoolean, + description: + 'Multiple results allowed for observations conforming to this ObservationDefinition.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: 'The method or technique used to perform the observation.', + }, + _preferredReportName: { + type: require('./element.input.js'), + description: + 'The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.', + }, + preferredReportName: { + type: GraphQLString, + description: + 'The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.', + }, + quantitativeDetails: { + type: require('./observationdefinitionquantitativedetails.input.js'), + description: + 'Characteristics for quantitative results of this observation.', + }, + qualifiedInterval: { + type: new GraphQLList( + require('./observationdefinitionqualifiedinterval.input.js'), + ), + description: + 'Multiple ranges of results qualified by different contexts for ordinal or continuous observations conforming to this ObservationDefinition.', + }, + validCodedValueSet: { + type: GraphQLString, + description: + 'The set of valid coded results for the observations conforming to this ObservationDefinition.', + }, + normalCodedValueSet: { + type: GraphQLString, + description: + 'The set of normal coded results for the observations conforming to this ObservationDefinition.', + }, + abnormalCodedValueSet: { + type: GraphQLString, + description: + 'The set of abnormal coded results for the observation conforming to this ObservationDefinition.', + }, + criticalCodedValueSet: { + type: GraphQLString, + description: + 'The set of critical coded results for the observation conforming to this ObservationDefinition.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/observationdefinitionqualifiedinterval.input.js b/src/resources/4_0_0/inputs/observationdefinitionqualifiedinterval.input.js new file mode 100644 index 00000000..68a19146 --- /dev/null +++ b/src/resources/4_0_0/inputs/observationdefinitionqualifiedinterval.input.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ObservationDefinitionqualifiedInterval Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ObservationDefinitionqualifiedInterval_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _category: { + type: require('./element.input.js'), + description: + 'The category of interval of values for continuous or ordinal observations conforming to this ObservationDefinition.', + }, + category: { + type: CodeScalar, + description: + 'The category of interval of values for continuous or ordinal observations conforming to this ObservationDefinition.', + }, + range: { + type: require('./range.input.js'), + description: + 'The low and high values determining the interval. There may be only one of the two.', + }, + context: { + type: require('./codeableconcept.input.js'), + description: + 'Codes to indicate the health context the range applies to. For example, the normal or therapeutic range.', + }, + appliesTo: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Codes to indicate the target population this reference range applies to.', + }, + _gender: { + type: require('./element.input.js'), + description: 'Sex of the population the range applies to.', + }, + gender: { + type: CodeScalar, + description: 'Sex of the population the range applies to.', + }, + age: { + type: require('./range.input.js'), + description: + 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', + }, + gestationalAge: { + type: require('./range.input.js'), + description: + 'The gestational age to which this reference range is applicable, in the context of pregnancy.', + }, + _condition: { + type: require('./element.input.js'), + description: + 'Text based condition for which the reference range is valid.', + }, + condition: { + type: GraphQLString, + description: + 'Text based condition for which the reference range is valid.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/observationdefinitionquantitativedetails.input.js b/src/resources/4_0_0/inputs/observationdefinitionquantitativedetails.input.js new file mode 100644 index 00000000..f71f21be --- /dev/null +++ b/src/resources/4_0_0/inputs/observationdefinitionquantitativedetails.input.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ObservationDefinitionquantitativeDetails Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ObservationDefinitionquantitativeDetails_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + customaryUnit: { + type: require('./codeableconcept.input.js'), + description: + 'Customary unit used to report quantitative results of observations conforming to this ObservationDefinition.', + }, + unit: { + type: require('./codeableconcept.input.js'), + description: + 'SI unit used to report quantitative results of observations conforming to this ObservationDefinition.', + }, + _conversionFactor: { + type: require('./element.input.js'), + description: + 'Factor for converting value expressed with SI unit to value expressed with customary unit.', + }, + conversionFactor: { + type: GraphQLFloat, + description: + 'Factor for converting value expressed with SI unit to value expressed with customary unit.', + }, + _decimalPrecision: { + type: require('./element.input.js'), + description: + 'Number of digits after decimal separator when the results of such observations are of type Quantity.', + }, + decimalPrecision: { + type: GraphQLInt, + description: + 'Number of digits after decimal separator when the results of such observations are of type Quantity.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/observationreferencerange.input.js b/src/resources/4_0_0/inputs/observationreferencerange.input.js new file mode 100644 index 00000000..246b4e33 --- /dev/null +++ b/src/resources/4_0_0/inputs/observationreferencerange.input.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ObservationreferenceRange Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ObservationreferenceRange_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + low: { + type: require('./quantity.input.js'), + description: + 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', + }, + high: { + type: require('./quantity.input.js'), + description: + 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.', + }, + appliesTo: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race. Multiple `appliesTo` are interpreted as an 'AND' of the target populations. For example, to represent a target population of African American females, both a code of female and a code for African American would be used.", + }, + age: { + type: require('./range.input.js'), + description: + 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', + }, + _text: { + type: require('./element.input.js'), + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + text: { + type: GraphQLString, + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/operationdefinition.input.js b/src/resources/4_0_0/inputs/operationdefinition.input.js new file mode 100644 index 00000000..0f5f6e63 --- /dev/null +++ b/src/resources/4_0_0/inputs/operationdefinition.input.js @@ -0,0 +1,315 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary OperationDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'OperationDefinition_Input', + description: + 'A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationDefinition_Enum_input', + values: { OperationDefinition: { value: 'OperationDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the operation definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the operation definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this operation definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this operation definition. Enables tracking the life-cycle of the content.', + }, + _kind: { + type: require('./element.input.js'), + description: 'Whether this is an operation or a named query.', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an operation or a named query.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the operation definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the operation definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the operation definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the operation definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the operation definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the operation definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the operation definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this operation definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this operation definition is needed and why it has been designed as it has.', + }, + _affectsState: { + type: require('./element.input.js'), + description: + "Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting state'.", + }, + affectsState: { + type: GraphQLBoolean, + description: + "Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting state'.", + }, + _code: { + type: require('./element.input.js'), + description: 'The name used to invoke the operation.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name used to invoke the operation.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Additional information about how to use this operation or named query.', + }, + comment: { + type: GraphQLString, + description: + 'Additional information about how to use this operation or named query.', + }, + _base: { + type: require('./element.input.js'), + description: + 'Indicates that this operation definition is a constraining profile on the base.', + }, + base: { + type: CanonicalScalar, + description: + 'Indicates that this operation definition is a constraining profile on the base.', + }, + _resource: { + type: require('./element.input.js'), + description: 'The types on which this operation can be executed.', + }, + resource: { + type: new GraphQLList(CodeScalar), + description: 'The types on which this operation can be executed.', + }, + _system: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + system: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + _type: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', + }, + type: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', + }, + _instance: { + type: require('./element.input.js'), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + instance: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + _inputProfile: { + type: require('./element.input.js'), + description: + 'Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.', + }, + inputProfile: { + type: CanonicalScalar, + description: + 'Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.', + }, + _outputProfile: { + type: require('./element.input.js'), + description: + 'Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.', + }, + outputProfile: { + type: CanonicalScalar, + description: + 'Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.', + }, + parameter: { + type: new GraphQLList(require('./operationdefinitionparameter.input.js')), + description: 'The parameters for the operation/query.', + }, + overload: { + type: new GraphQLList(require('./operationdefinitionoverload.input.js')), + description: + 'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/operationdefinitionoverload.input.js b/src/resources/4_0_0/inputs/operationdefinitionoverload.input.js new file mode 100644 index 00000000..d86929b2 --- /dev/null +++ b/src/resources/4_0_0/inputs/operationdefinitionoverload.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary OperationDefinitionoverload Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'OperationDefinitionoverload_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _parameterName: { + type: require('./element.input.js'), + description: 'Name of parameter to include in overload.', + }, + parameterName: { + type: new GraphQLList(GraphQLString), + description: 'Name of parameter to include in overload.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Comments to go on overload.', + }, + comment: { + type: GraphQLString, + description: 'Comments to go on overload.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/operationdefinitionparameter.input.js b/src/resources/4_0_0/inputs/operationdefinitionparameter.input.js new file mode 100644 index 00000000..08a88571 --- /dev/null +++ b/src/resources/4_0_0/inputs/operationdefinitionparameter.input.js @@ -0,0 +1,124 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary OperationDefinitionparameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'OperationDefinitionparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'The name of used to identify the parameter.', + }, + name: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of used to identify the parameter.', + }, + _use: { + type: require('./element.input.js'), + description: 'Whether this is an input or an output parameter.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an input or an output parameter.', + }, + _min: { + type: require('./element.input.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.input.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.input.js'), + description: 'Describes the meaning or use of this parameter.', + }, + documentation: { + type: GraphQLString, + description: 'Describes the meaning or use of this parameter.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type for this parameter.', + }, + type: { + type: CodeScalar, + description: 'The type for this parameter.', + }, + _targetProfile: { + type: require('./element.input.js'), + description: + "Used when the type is 'Reference' or 'canonical', and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", + }, + targetProfile: { + type: new GraphQLList(CanonicalScalar), + description: + "Used when the type is 'Reference' or 'canonical', and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", + }, + _searchType: { + type: require('./element.input.js'), + description: + "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", + }, + searchType: { + type: CodeScalar, + description: + "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", + }, + binding: { + type: require('./operationdefinitionparameterbinding.input.js'), + description: + 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', + }, + referencedFrom: { + type: new GraphQLList( + require('./operationdefinitionparameterreferencedfrom.input.js'), + ), + description: + 'Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/operationdefinitionparameterbinding.input.js b/src/resources/4_0_0/inputs/operationdefinitionparameterbinding.input.js new file mode 100644 index 00000000..b859acd5 --- /dev/null +++ b/src/resources/4_0_0/inputs/operationdefinitionparameterbinding.input.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary OperationDefinitionparameterbinding Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'OperationDefinitionparameterbinding_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _strength: { + type: require('./element.input.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _valueSet: { + type: require('./element.input.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSet: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/operationdefinitionparameterreferencedfrom.input.js b/src/resources/4_0_0/inputs/operationdefinitionparameterreferencedfrom.input.js new file mode 100644 index 00000000..20428ad3 --- /dev/null +++ b/src/resources/4_0_0/inputs/operationdefinitionparameterreferencedfrom.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary OperationDefinitionparameterreferencedFrom Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'OperationDefinitionparameterreferencedFrom_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _source: { + type: require('./element.input.js'), + description: + 'The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.', + }, + source: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'The id of the element in the referencing resource that is expected to resolve to this resource.', + }, + sourceId: { + type: GraphQLString, + description: + 'The id of the element in the referencing resource that is expected to resolve to this resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/operationoutcome.input.js b/src/resources/4_0_0/inputs/operationoutcome.input.js new file mode 100644 index 00000000..c9e34551 --- /dev/null +++ b/src/resources/4_0_0/inputs/operationoutcome.input.js @@ -0,0 +1,91 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary OperationOutcome Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'OperationOutcome_Input', + description: + 'A collection of error, warning, or information messages that result from a system action.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationOutcome_Enum_input', + values: { OperationOutcome: { value: 'OperationOutcome' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + issue: { + type: new GraphQLList( + new GraphQLNonNull(require('./operationoutcomeissue.input.js')), + ), + description: + 'An error, warning, or information message that results from a system action.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/operationoutcomeissue.input.js b/src/resources/4_0_0/inputs/operationoutcomeissue.input.js new file mode 100644 index 00000000..caf1343c --- /dev/null +++ b/src/resources/4_0_0/inputs/operationoutcomeissue.input.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary OperationOutcomeissue Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'OperationOutcomeissue_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _severity: { + type: require('./element.input.js'), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + _code: { + type: require('./element.input.js'), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + details: { + type: require('./codeableconcept.input.js'), + description: + 'Additional details about the error. This may be a text description of the error or a system code that identifies the error.', + }, + _diagnostics: { + type: require('./element.input.js'), + description: 'Additional diagnostic information about the issue.', + }, + diagnostics: { + type: GraphQLString, + description: 'Additional diagnostic information about the issue.', + }, + _location: { + type: require('./element.input.js'), + description: + "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", + }, + location: { + type: new GraphQLList(GraphQLString), + description: + "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", + }, + _expression: { + type: require('./element.input.js'), + description: + 'A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.', + }, + expression: { + type: new GraphQLList(GraphQLString), + description: + 'A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/organization.input.js b/src/resources/4_0_0/inputs/organization.input.js new file mode 100644 index 00000000..ba783b7d --- /dev/null +++ b/src/resources/4_0_0/inputs/organization.input.js @@ -0,0 +1,141 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Organization Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Organization_Input', + description: + 'A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Organization_Enum_input', + values: { Organization: { value: 'Organization' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether the organization's record is still in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether the organization's record is still in active use.", + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The kind(s) of organization that this is.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name associated with the organization.', + }, + name: { + type: GraphQLString, + description: 'A name associated with the organization.', + }, + _alias: { + type: require('./element.input.js'), + description: + 'A list of alternate names that the organization is known as, or was known as in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the organization is known as, or was known as in the past.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: 'A contact detail for the organization.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'An address for the organization.', + }, + partOf: { + type: GraphQLString, + description: 'The organization of which this organization forms a part.', + }, + contact: { + type: new GraphQLList(require('./organizationcontact.input.js')), + description: 'Contact for the organization for a certain purpose.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for the organization.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/organizationaffiliation.input.js b/src/resources/4_0_0/inputs/organizationaffiliation.input.js new file mode 100644 index 00000000..9fb7eec1 --- /dev/null +++ b/src/resources/4_0_0/inputs/organizationaffiliation.input.js @@ -0,0 +1,149 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary OrganizationAffiliation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'OrganizationAffiliation_Input', + description: + 'Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OrganizationAffiliation_Enum_input', + values: { + OrganizationAffiliation: { value: 'OrganizationAffiliation' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Business identifiers that are specific to this role.', + }, + _active: { + type: require('./element.input.js'), + description: + 'Whether this organization affiliation record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: + 'Whether this organization affiliation record is in active use.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period during which the participatingOrganization is affiliated with the primary organization.', + }, + organization: { + type: GraphQLString, + description: + 'Organization where the role is available (primary organization/has members).', + }, + participatingOrganization: { + type: GraphQLString, + description: + 'The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of).', + }, + network: { + type: new GraphQLList(GraphQLString), + description: + "Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Definition of the role the participatingOrganization plays in the association.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Specific specialty of the participatingOrganization in the context of the role.', + }, + location: { + type: new GraphQLList(GraphQLString), + description: 'The location(s) at which the role occurs.', + }, + healthcareService: { + type: new GraphQLList(GraphQLString), + description: 'Healthcare services provided through the role.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details at the participatingOrganization relevant to this Affiliation.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for this role.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/organizationcontact.input.js b/src/resources/4_0_0/inputs/organizationcontact.input.js new file mode 100644 index 00000000..1527b97c --- /dev/null +++ b/src/resources/4_0_0/inputs/organizationcontact.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Organizationcontact Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Organizationcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + purpose: { + type: require('./codeableconcept.input.js'), + description: 'Indicates a purpose for which the contact can be reached.', + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', + }, + address: { + type: require('./address.input.js'), + description: 'Visiting or postal addresses for the contact.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/parameterdefinition.input.js b/src/resources/4_0_0/inputs/parameterdefinition.input.js new file mode 100644 index 00000000..fb3e821b --- /dev/null +++ b/src/resources/4_0_0/inputs/parameterdefinition.input.js @@ -0,0 +1,102 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ParameterDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ParameterDefinition_Input', + description: + 'Base StructureDefinition for ParameterDefinition Type: The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', + }, + name: { + type: CodeScalar, + description: + 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', + }, + _use: { + type: require('./element.input.js'), + description: 'Whether the parameter is input or output for the module.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether the parameter is input or output for the module.', + }, + _min: { + type: require('./element.input.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: GraphQLInt, + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.input.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'A brief discussion of what the parameter is for and how it is used by the module.', + }, + documentation: { + type: GraphQLString, + description: + 'A brief discussion of what the parameter is for and how it is used by the module.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of the parameter.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of the parameter.', + }, + _profile: { + type: require('./element.input.js'), + description: + 'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.', + }, + profile: { + type: CanonicalScalar, + description: + 'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/parameters.input.js b/src/resources/4_0_0/inputs/parameters.input.js new file mode 100644 index 00000000..a6298a6a --- /dev/null +++ b/src/resources/4_0_0/inputs/parameters.input.js @@ -0,0 +1,67 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Parameters Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Parameters_Input', + description: + 'This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Parameters_Enum_input', + values: { Parameters: { value: 'Parameters' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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.', + }, + parameter: { + type: new GraphQLList(require('./parametersparameter.input.js')), + description: 'A parameter passed to or received from the operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/parametersparameter.input.js b/src/resources/4_0_0/inputs/parametersparameter.input.js new file mode 100644 index 00000000..3c599f22 --- /dev/null +++ b/src/resources/4_0_0/inputs/parametersparameter.input.js @@ -0,0 +1,340 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary Parametersparameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Parametersparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the parameter (reference to the operation definition).', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the parameter (reference to the operation definition).', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: 'If the parameter is a data type.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'If the parameter is a data type.', + }, + _valueCanonical: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueCanonical: { + type: CanonicalScalar, + description: 'If the parameter is a data type.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueCode: { + type: CodeScalar, + description: 'If the parameter is a data type.', + }, + _valueDate: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDate: { + type: DateScalar, + description: 'If the parameter is a data type.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDateTime: { + type: DateTimeScalar, + description: 'If the parameter is a data type.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'If the parameter is a data type.', + }, + _valueId: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueId: { + type: IdScalar, + description: 'If the parameter is a data type.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueInstant: { + type: InstantScalar, + description: 'If the parameter is a data type.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueInteger: { + type: GraphQLInt, + description: 'If the parameter is a data type.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueMarkdown: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueOid: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueOid: { + type: OidScalar, + description: 'If the parameter is a data type.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: 'If the parameter is a data type.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueString: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueTime: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueTime: { + type: TimeScalar, + description: 'If the parameter is a data type.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: 'If the parameter is a data type.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueUri: { + type: UriScalar, + description: 'If the parameter is a data type.', + }, + _valueUrl: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueUrl: { + type: UrlScalar, + description: 'If the parameter is a data type.', + }, + _valueUuid: { + type: require('./element.input.js'), + description: 'If the parameter is a data type.', + }, + valueUuid: { + type: UuidScalar, + description: 'If the parameter is a data type.', + }, + valueAddress: { + type: require('./address.input.js'), + description: 'If the parameter is a data type.', + }, + valueAge: { + type: require('./age.input.js'), + description: 'If the parameter is a data type.', + }, + valueAnnotation: { + type: require('./annotation.input.js'), + description: 'If the parameter is a data type.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: 'If the parameter is a data type.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'If the parameter is a data type.', + }, + valueCoding: { + type: require('./coding.input.js'), + description: 'If the parameter is a data type.', + }, + valueContactPoint: { + type: require('./contactpoint.input.js'), + description: 'If the parameter is a data type.', + }, + valueCount: { + type: require('./count.input.js'), + description: 'If the parameter is a data type.', + }, + valueDistance: { + type: require('./distance.input.js'), + description: 'If the parameter is a data type.', + }, + valueDuration: { + type: require('./duration.input.js'), + description: 'If the parameter is a data type.', + }, + valueHumanName: { + type: require('./humanname.input.js'), + description: 'If the parameter is a data type.', + }, + valueIdentifier: { + type: require('./identifier.input.js'), + description: 'If the parameter is a data type.', + }, + valueMoney: { + type: require('./money.input.js'), + description: 'If the parameter is a data type.', + }, + valuePeriod: { + type: require('./period.input.js'), + description: 'If the parameter is a data type.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: 'If the parameter is a data type.', + }, + valueRange: { + type: require('./range.input.js'), + description: 'If the parameter is a data type.', + }, + valueRatio: { + type: require('./ratio.input.js'), + description: 'If the parameter is a data type.', + }, + valueReference: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + valueSampledData: { + type: require('./sampleddata.input.js'), + description: 'If the parameter is a data type.', + }, + valueSignature: { + type: require('./signature.input.js'), + description: 'If the parameter is a data type.', + }, + valueTiming: { + type: require('./timing.input.js'), + description: 'If the parameter is a data type.', + }, + valueContactDetail: { + type: require('./contactdetail.input.js'), + description: 'If the parameter is a data type.', + }, + valueContributor: { + type: require('./contributor.input.js'), + description: 'If the parameter is a data type.', + }, + valueDataRequirement: { + type: require('./datarequirement.input.js'), + description: 'If the parameter is a data type.', + }, + valueExpression: { + type: require('./expression.input.js'), + description: 'If the parameter is a data type.', + }, + valueParameterDefinition: { + type: require('./parameterdefinition.input.js'), + description: 'If the parameter is a data type.', + }, + valueRelatedArtifact: { + type: require('./relatedartifact.input.js'), + description: 'If the parameter is a data type.', + }, + valueTriggerDefinition: { + type: require('./triggerdefinition.input.js'), + description: 'If the parameter is a data type.', + }, + valueUsageContext: { + type: require('./usagecontext.input.js'), + description: 'If the parameter is a data type.', + }, + valueDosage: { + type: require('./dosage.input.js'), + description: 'If the parameter is a data type.', + }, + resource: { + type: GraphQLString, + description: 'If the parameter is a whole resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/patient.input.js b/src/resources/4_0_0/inputs/patient.input.js new file mode 100644 index 00000000..76281f5a --- /dev/null +++ b/src/resources/4_0_0/inputs/patient.input.js @@ -0,0 +1,201 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Patient Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Patient_Input', + description: + 'Demographics and other administrative information about an individual or animal receiving care or other health-related services.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Patient_Enum_input', + values: { Patient: { value: 'Patient' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'An identifier for this patient.', + }, + _active: { + type: require('./element.input.js'), + description: + "Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", + }, + active: { + type: GraphQLBoolean, + description: + "Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'A name associated with the individual.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date of birth for the individual.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the individual.', + }, + _deceasedBoolean: { + type: require('./element.input.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: 'Indicates if the individual is deceased or not.', + }, + _deceasedDateTime: { + type: require('./element.input.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedDateTime: { + type: DateTimeScalar, + description: 'Indicates if the individual is deceased or not.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'An address for the individual.', + }, + maritalStatus: { + type: require('./codeableconcept.input.js'), + description: + "This field contains a patient's most recent marital (civil) status.", + }, + _multipleBirthBoolean: { + type: require('./element.input.js'), + description: + 'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).', + }, + multipleBirthBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).', + }, + _multipleBirthInteger: { + type: require('./element.input.js'), + description: + 'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).', + }, + multipleBirthInteger: { + type: GraphQLInt, + description: + 'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the patient.', + }, + contact: { + type: new GraphQLList(require('./patientcontact.input.js')), + description: + 'A contact party (e.g. guardian, partner, friend) for the patient.', + }, + communication: { + type: new GraphQLList(require('./patientcommunication.input.js')), + description: + 'A language which may be used to communicate with the patient about his or her health.', + }, + generalPractitioner: { + type: new GraphQLList(GraphQLString), + description: "Patient's nominated care provider.", + }, + managingOrganization: { + type: GraphQLString, + description: 'Organization that is the custodian of the patient record.', + }, + link: { + type: new GraphQLList(require('./patientlink.input.js')), + description: + 'Link to another patient resource that concerns the same actual patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/patientcommunication.input.js b/src/resources/4_0_0/inputs/patientcommunication.input.js new file mode 100644 index 00000000..c07279aa --- /dev/null +++ b/src/resources/4_0_0/inputs/patientcommunication.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Patientcommunication Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Patientcommunication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + language: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + _preferred: { + type: require('./element.input.js'), + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + preferred: { + type: GraphQLBoolean, + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/patientcontact.input.js b/src/resources/4_0_0/inputs/patientcontact.input.js new file mode 100644 index 00000000..33aafb53 --- /dev/null +++ b/src/resources/4_0_0/inputs/patientcontact.input.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Patientcontact Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Patientcontact_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + relationship: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The nature of the relationship between the patient and the contact person.', + }, + name: { + type: require('./humanname.input.js'), + description: 'A name associated with the contact person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + address: { + type: require('./address.input.js'), + description: 'Address for the contact person.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + organization: { + type: GraphQLString, + description: + 'Organization on behalf of which the contact is acting or for which the contact is working.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period during which this contact person or organization is valid to be contacted relating to this patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/patientlink.input.js b/src/resources/4_0_0/inputs/patientlink.input.js new file mode 100644 index 00000000..2843a19c --- /dev/null +++ b/src/resources/4_0_0/inputs/patientlink.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Patientlink Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Patientlink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + other: { + type: new GraphQLNonNull(GraphQLString), + description: 'The other patient resource that the link refers to.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of link between this patient resource and another patient resource.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of link between this patient resource and another patient resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/paymentnotice.input.js b/src/resources/4_0_0/inputs/paymentnotice.input.js new file mode 100644 index 00000000..7558f981 --- /dev/null +++ b/src/resources/4_0_0/inputs/paymentnotice.input.js @@ -0,0 +1,151 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary PaymentNotice Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PaymentNotice_Input', + description: + 'This resource provides the status of the payment for goods and services rendered, and the request and response resource references.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentNotice_Enum_input', + values: { PaymentNotice: { value: 'PaymentNotice' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'A unique identifier assigned to this payment notice.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + request: { + type: GraphQLString, + description: 'Reference of resource for which payment is being made.', + }, + response: { + type: GraphQLString, + description: + 'Reference of response to resource for which payment is being made.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date when this resource was created.', + }, + provider: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + payment: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to the payment which is the subject of this notice.', + }, + _paymentDate: { + type: require('./element.input.js'), + description: 'The date when the above payment action occurred.', + }, + paymentDate: { + type: DateScalar, + description: 'The date when the above payment action occurred.', + }, + payee: { + type: GraphQLString, + description: + 'The party who will receive or has received payment that is the subject of this notification.', + }, + recipient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The party who is notified of the payment status.', + }, + amount: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'The amount sent to the payee.', + }, + paymentStatus: { + type: require('./codeableconcept.input.js'), + description: + 'A code indicating whether payment has been sent or cleared.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/paymentreconciliation.input.js b/src/resources/4_0_0/inputs/paymentreconciliation.input.js new file mode 100644 index 00000000..e5904e6a --- /dev/null +++ b/src/resources/4_0_0/inputs/paymentreconciliation.input.js @@ -0,0 +1,178 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary PaymentReconciliation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PaymentReconciliation_Input', + description: + 'This resource provides the details including amount of a payment and allocates the payment items being paid.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentReconciliation_Enum_input', + values: { PaymentReconciliation: { value: 'PaymentReconciliation' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A unique identifier assigned to this payment reconciliation.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time for which payments have been gathered into this bulk payment for settlement.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date when the resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date when the resource was created.', + }, + paymentIssuer: { + type: GraphQLString, + description: 'The party who generated the payment.', + }, + request: { + type: GraphQLString, + description: 'Original request resource reference.', + }, + requestor: { + type: GraphQLString, + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + _outcome: { + type: require('./element.input.js'), + description: 'The outcome of a request for a reconciliation.', + }, + outcome: { + type: CodeScalar, + description: 'The outcome of a request for a reconciliation.', + }, + _disposition: { + type: require('./element.input.js'), + description: + 'A human readable description of the status of the request for the reconciliation.', + }, + disposition: { + type: GraphQLString, + description: + 'A human readable description of the status of the request for the reconciliation.', + }, + _paymentDate: { + type: require('./element.input.js'), + description: + 'The date of payment as indicated on the financial instrument.', + }, + paymentDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'The date of payment as indicated on the financial instrument.', + }, + paymentAmount: { + type: new GraphQLNonNull(require('./money.input.js')), + description: + 'Total payment amount as indicated on the financial instrument.', + }, + paymentIdentifier: { + type: require('./identifier.input.js'), + description: "Issuer's unique identifier for the payment instrument.", + }, + detail: { + type: new GraphQLList(require('./paymentreconciliationdetail.input.js')), + description: + 'Distribution of the payment amount for a previously acknowledged payable.', + }, + formCode: { + type: require('./codeableconcept.input.js'), + description: 'A code for the form to be used for printing the content.', + }, + processNote: { + type: new GraphQLList( + require('./paymentreconciliationprocessnote.input.js'), + ), + description: + 'A note that describes or explains the processing in a human readable form.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/paymentreconciliationdetail.input.js b/src/resources/4_0_0/inputs/paymentreconciliationdetail.input.js new file mode 100644 index 00000000..034ae0e0 --- /dev/null +++ b/src/resources/4_0_0/inputs/paymentreconciliationdetail.input.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary PaymentReconciliationdetail Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PaymentReconciliationdetail_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Unique identifier for the current payment item for the referenced payable.', + }, + predecessor: { + type: require('./identifier.input.js'), + description: + 'Unique identifier for the prior payment item for the referenced payable.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Code to indicate the nature of the payment.', + }, + request: { + type: GraphQLString, + description: + 'A resource, such as a Claim, the evaluation of which could lead to payment.', + }, + submitter: { + type: GraphQLString, + description: + 'The party which submitted the claim or financial transaction.', + }, + response: { + type: GraphQLString, + description: + 'A resource, such as a ClaimResponse, which contains a commitment to payment.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date from the response resource containing a commitment to pay.', + }, + date: { + type: DateScalar, + description: + 'The date from the response resource containing a commitment to pay.', + }, + responsible: { + type: GraphQLString, + description: + 'A reference to the individual who is responsible for inquiries regarding the response and its payment.', + }, + payee: { + type: GraphQLString, + description: 'The party which is receiving the payment.', + }, + amount: { + type: require('./money.input.js'), + description: + 'The monetary amount allocated from the total payment to the payable.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/paymentreconciliationprocessnote.input.js b/src/resources/4_0_0/inputs/paymentreconciliationprocessnote.input.js new file mode 100644 index 00000000..1ff11e34 --- /dev/null +++ b/src/resources/4_0_0/inputs/paymentreconciliationprocessnote.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PaymentReconciliationprocessNote Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PaymentReconciliationprocessNote_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'The business purpose of the note text.', + }, + type: { + type: CodeScalar, + description: 'The business purpose of the note text.', + }, + _text: { + type: require('./element.input.js'), + description: + 'The explanation or description associated with the processing.', + }, + text: { + type: GraphQLString, + description: + 'The explanation or description associated with the processing.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/period.input.js b/src/resources/4_0_0/inputs/period.input.js new file mode 100644 index 00000000..0c5e9466 --- /dev/null +++ b/src/resources/4_0_0/inputs/period.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Period Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Period_Input', + description: + 'Base StructureDefinition for Period Type: A time period defined by a start and end date and optionally time.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _start: { + type: require('./element.input.js'), + description: 'The start of the period. The boundary is inclusive.', + }, + start: { + type: DateTimeScalar, + description: 'The start of the period. The boundary is inclusive.', + }, + _end: { + type: require('./element.input.js'), + description: + 'The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + end: { + type: DateTimeScalar, + description: + 'The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/person.input.js b/src/resources/4_0_0/inputs/person.input.js new file mode 100644 index 00000000..2e35941a --- /dev/null +++ b/src/resources/4_0_0/inputs/person.input.js @@ -0,0 +1,141 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Person Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Person_Input', + description: + 'Demographics and administrative information about a person independent of a specific health-related context.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Person_Enum_input', + values: { Person: { value: 'Person' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Identifier for a person within a particular scope.', + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.input.js'), + description: 'Administrative Gender.', + }, + gender: { + type: CodeScalar, + description: 'Administrative Gender.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The birth date for the person.', + }, + birthDate: { + type: DateScalar, + description: 'The birth date for the person.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: 'One or more addresses for the person.', + }, + photo: { + type: require('./attachment.input.js'), + description: + 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', + }, + managingOrganization: { + type: GraphQLString, + description: + 'The organization that is the custodian of the person record.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether this person's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this person's record is in active use.", + }, + link: { + type: new GraphQLList(require('./personlink.input.js')), + description: 'Link to a resource that concerns the same actual person.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/personlink.input.js b/src/resources/4_0_0/inputs/personlink.input.js new file mode 100644 index 00000000..f1878551 --- /dev/null +++ b/src/resources/4_0_0/inputs/personlink.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Personlink Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Personlink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + target: { + type: new GraphQLNonNull(GraphQLString), + description: 'The resource to which this actual person is associated.', + }, + _assurance: { + type: require('./element.input.js'), + description: + 'Level of assurance that this link is associated with the target resource.', + }, + assurance: { + type: CodeScalar, + description: + 'Level of assurance that this link is associated with the target resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/plandefinition.input.js b/src/resources/4_0_0/inputs/plandefinition.input.js new file mode 100644 index 00000000..dbd352f2 --- /dev/null +++ b/src/resources/4_0_0/inputs/plandefinition.input.js @@ -0,0 +1,328 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary PlanDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PlanDefinition_Input', + description: + 'This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PlanDefinition_Enum_input', + values: { PlanDefinition: { value: 'PlanDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the plan definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the plan definition.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the plan definition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the plan definition giving additional information about its content.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this plan definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this plan definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A code or group definition that describes the intended subject of the plan definition.', + }, + subjectReference: { + type: GraphQLString, + description: + 'A code or group definition that describes the intended subject of the plan definition.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the plan definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the plan definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the plan definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the plan definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the plan definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this plan definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this plan definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description of how the plan definition is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the plan definition is used from a clinical perspective.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the plan definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.input.js'), + description: + 'A reference to a Library resource containing any formal logic used by the plan definition.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing any formal logic used by the plan definition.', + }, + goal: { + type: new GraphQLList(require('./plandefinitiongoal.input.js')), + description: + 'Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', + }, + action: { + type: new GraphQLList(require('./plandefinitionaction.input.js')), + description: + 'An action or group of actions to be taken as part of the plan.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/plandefinitionaction.input.js b/src/resources/4_0_0/inputs/plandefinitionaction.input.js new file mode 100644 index 00000000..248f0577 --- /dev/null +++ b/src/resources/4_0_0/inputs/plandefinitionaction.input.js @@ -0,0 +1,275 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary PlanDefinitionaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PlanDefinitionaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _prefix: { + type: require('./element.input.js'), + description: 'A user-visible prefix for the action.', + }, + prefix: { + type: GraphQLString, + description: 'A user-visible prefix for the action.', + }, + _title: { + type: require('./element.input.js'), + description: 'The title of the action displayed to a user.', + }, + title: { + type: GraphQLString, + description: 'The title of the action displayed to a user.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A brief description of the action used to provide a summary to display to the user.', + }, + description: { + type: GraphQLString, + description: + 'A brief description of the action used to provide a summary to display to the user.', + }, + _textEquivalent: { + type: require('./element.input.js'), + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.', + }, + textEquivalent: { + type: GraphQLString, + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the action should be addressed with respect to other actions.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the action should be addressed with respect to other actions.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A description of why this action is necessary or appropriate.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', + }, + _goalId: { + type: require('./element.input.js'), + description: + 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', + }, + goalId: { + type: new GraphQLList(IdScalar), + description: + 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A code or group definition that describes the intended subject of the action and its children, if any.', + }, + subjectReference: { + type: GraphQLString, + description: + 'A code or group definition that describes the intended subject of the action and its children, if any.', + }, + trigger: { + type: new GraphQLList(require('./triggerdefinition.input.js')), + description: 'A description of when the action should be triggered.', + }, + condition: { + type: new GraphQLList( + require('./plandefinitionactioncondition.input.js'), + ), + description: + 'An expression that describes applicability criteria or start/stop conditions for the action.', + }, + input: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: 'Defines input data requirements for the action.', + }, + output: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: 'Defines the outputs of the action, if any.', + }, + relatedAction: { + type: new GraphQLList( + require('./plandefinitionactionrelatedaction.input.js'), + ), + description: + "A relationship to another action such as 'before' or '30-60 minutes after start of'.", + }, + _timingDateTime: { + type: require('./element.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'An optional value describing when the action should be performed.', + }, + timingAge: { + type: require('./age.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDuration: { + type: require('./duration.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingRange: { + type: require('./range.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + participant: { + type: new GraphQLList( + require('./plandefinitionactionparticipant.input.js'), + ), + description: + 'Indicates who should participate in performing the action described.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'The type of action to perform (create, update, remove).', + }, + _groupingBehavior: { + type: require('./element.input.js'), + description: + 'Defines the grouping behavior for the action and its children.', + }, + groupingBehavior: { + type: CodeScalar, + description: + 'Defines the grouping behavior for the action and its children.', + }, + _selectionBehavior: { + type: require('./element.input.js'), + description: + 'Defines the selection behavior for the action and its children.', + }, + selectionBehavior: { + type: CodeScalar, + description: + 'Defines the selection behavior for the action and its children.', + }, + _requiredBehavior: { + type: require('./element.input.js'), + description: 'Defines the required behavior for the action.', + }, + requiredBehavior: { + type: CodeScalar, + description: 'Defines the required behavior for the action.', + }, + _precheckBehavior: { + type: require('./element.input.js'), + description: 'Defines whether the action should usually be preselected.', + }, + precheckBehavior: { + type: CodeScalar, + description: 'Defines whether the action should usually be preselected.', + }, + _cardinalityBehavior: { + type: require('./element.input.js'), + description: 'Defines whether the action can be selected multiple times.', + }, + cardinalityBehavior: { + type: CodeScalar, + description: 'Defines whether the action can be selected multiple times.', + }, + _definitionCanonical: { + type: require('./element.input.js'), + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + definitionCanonical: { + type: CanonicalScalar, + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + _definitionUri: { + type: require('./element.input.js'), + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + definitionUri: { + type: UriScalar, + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + _transform: { + type: require('./element.input.js'), + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + transform: { + type: CanonicalScalar, + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + dynamicValue: { + type: new GraphQLList( + require('./plandefinitionactiondynamicvalue.input.js'), + ), + description: + "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/plandefinitionactioncondition.input.js b/src/resources/4_0_0/inputs/plandefinitionactioncondition.input.js new file mode 100644 index 00000000..f3ef3dcf --- /dev/null +++ b/src/resources/4_0_0/inputs/plandefinitionactioncondition.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PlanDefinitionactioncondition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PlanDefinitionactioncondition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _kind: { + type: require('./element.input.js'), + description: 'The kind of condition.', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'The kind of condition.', + }, + expression: { + type: require('./expression.input.js'), + description: + 'An expression that returns true or false, indicating whether the condition is satisfied.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/plandefinitionactiondynamicvalue.input.js b/src/resources/4_0_0/inputs/plandefinitionactiondynamicvalue.input.js new file mode 100644 index 00000000..97ed31d2 --- /dev/null +++ b/src/resources/4_0_0/inputs/plandefinitionactiondynamicvalue.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary PlanDefinitionactiondynamicValue Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PlanDefinitionactiondynamicValue_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _path: { + type: require('./element.input.js'), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + path: { + type: GraphQLString, + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + expression: { + type: require('./expression.input.js'), + description: + 'An expression specifying the value of the customized element.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/plandefinitionactionparticipant.input.js b/src/resources/4_0_0/inputs/plandefinitionactionparticipant.input.js new file mode 100644 index 00000000..eeb0722b --- /dev/null +++ b/src/resources/4_0_0/inputs/plandefinitionactionparticipant.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PlanDefinitionactionparticipant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PlanDefinitionactionparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'The type of participant in the action.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant in the action.', + }, + role: { + type: require('./codeableconcept.input.js'), + description: + 'The role the participant should play in performing the described action.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/plandefinitionactionrelatedaction.input.js b/src/resources/4_0_0/inputs/plandefinitionactionrelatedaction.input.js new file mode 100644 index 00000000..5634b4c1 --- /dev/null +++ b/src/resources/4_0_0/inputs/plandefinitionactionrelatedaction.input.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PlanDefinitionactionrelatedAction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PlanDefinitionactionrelatedAction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _actionId: { + type: require('./element.input.js'), + description: 'The element id of the related action.', + }, + actionId: { + type: new GraphQLNonNull(IdScalar), + description: 'The element id of the related action.', + }, + _relationship: { + type: require('./element.input.js'), + description: 'The relationship of this action to the related action.', + }, + relationship: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relationship of this action to the related action.', + }, + offsetDuration: { + type: require('./duration.input.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + offsetRange: { + type: require('./range.input.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/plandefinitiongoal.input.js b/src/resources/4_0_0/inputs/plandefinitiongoal.input.js new file mode 100644 index 00000000..d8f1e847 --- /dev/null +++ b/src/resources/4_0_0/inputs/plandefinitiongoal.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary PlanDefinitiongoal Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PlanDefinitiongoal_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: require('./codeableconcept.input.js'), + description: 'Indicates a category the goal falls within.', + }, + description: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", + }, + priority: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the expected level of importance associated with reaching/sustaining the defined goal.', + }, + start: { + type: require('./codeableconcept.input.js'), + description: 'The event after which the goal should begin being pursued.', + }, + addresses: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies problems, conditions, issues, or concerns the goal is intended to address.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.', + }, + target: { + type: new GraphQLList(require('./plandefinitiongoaltarget.input.js')), + description: 'Indicates what should be done and within what timeframe.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/plandefinitiongoaltarget.input.js b/src/resources/4_0_0/inputs/plandefinitiongoaltarget.input.js new file mode 100644 index 00000000..3e845def --- /dev/null +++ b/src/resources/4_0_0/inputs/plandefinitiongoaltarget.input.js @@ -0,0 +1,61 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary PlanDefinitiongoaltarget Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PlanDefinitiongoaltarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + measure: { + type: require('./codeableconcept.input.js'), + description: + 'The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.', + }, + detailQuantity: { + type: require('./quantity.input.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + detailRange: { + type: require('./range.input.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + detailCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + due: { + type: require('./duration.input.js'), + description: + 'Indicates the timeframe after the start of the goal in which the goal should be met.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/population.input.js b/src/resources/4_0_0/inputs/population.input.js new file mode 100644 index 00000000..443b79ca --- /dev/null +++ b/src/resources/4_0_0/inputs/population.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Population Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Population_Input', + description: + 'Base StructureDefinition for Population Type: A populatioof people with some set of grouping criteria.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + ageRange: { + type: require('./range.input.js'), + description: 'The age of the specific population.', + }, + ageCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'The age of the specific population.', + }, + gender: { + type: require('./codeableconcept.input.js'), + description: 'The gender of the specific population.', + }, + race: { + type: require('./codeableconcept.input.js'), + description: 'Race of the specific population.', + }, + physiologicalCondition: { + type: require('./codeableconcept.input.js'), + description: + 'The existing physiological conditions of the specific population to which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/practitioner.input.js b/src/resources/4_0_0/inputs/practitioner.input.js new file mode 100644 index 00000000..16bec3e0 --- /dev/null +++ b/src/resources/4_0_0/inputs/practitioner.input.js @@ -0,0 +1,144 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Practitioner Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Practitioner_Input', + description: + 'A person who is directly or indirectly involved in the provisioning of healthcare.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Practitioner_Enum_input', + values: { Practitioner: { value: 'Practitioner' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'An identifier that applies to this person in this role.', + }, + _active: { + type: require('./element.input.js'), + description: "Whether this practitioner's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this practitioner's record is in active use.", + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'The name(s) associated with the practitioner.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the practitioner, e.g. a telephone number or an email address.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: + 'Address(es) of the practitioner that are not role specific (typically home address). Work addresses are not typically entered in this property as they are usually role dependent.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date of birth for the practitioner.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the practitioner.', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the person.', + }, + qualification: { + type: new GraphQLList(require('./practitionerqualification.input.js')), + description: + 'The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner. For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.', + }, + communication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A language the practitioner can use in patient communication.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/practitionerqualification.input.js b/src/resources/4_0_0/inputs/practitionerqualification.input.js new file mode 100644 index 00000000..bd42bfdd --- /dev/null +++ b/src/resources/4_0_0/inputs/practitionerqualification.input.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Practitionerqualification Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Practitionerqualification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + "An identifier that applies to this person's qualification in this role.", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Coded representation of the qualification.', + }, + period: { + type: require('./period.input.js'), + description: 'Period during which the qualification is valid.', + }, + issuer: { + type: GraphQLString, + description: 'Organization that regulates and issues the qualification.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/practitionerrole.input.js b/src/resources/4_0_0/inputs/practitionerrole.input.js new file mode 100644 index 00000000..f8df9ea5 --- /dev/null +++ b/src/resources/4_0_0/inputs/practitionerrole.input.js @@ -0,0 +1,162 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PractitionerRole Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PractitionerRole_Input', + description: + 'A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PractitionerRole_Enum_input', + values: { PractitionerRole: { value: 'PractitionerRole' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Business Identifiers that are specific to a role/location.', + }, + _active: { + type: require('./element.input.js'), + description: 'Whether this practitioner role record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this practitioner role record is in active use.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', + }, + practitioner: { + type: GraphQLString, + description: + 'Practitioner that is able to provide the defined services for the organization.', + }, + organization: { + type: GraphQLString, + description: + 'The organization where the Practitioner performs the roles associated.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Roles which this practitioner is authorized to perform for the organization.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Specific specialty of the practitioner.', + }, + location: { + type: new GraphQLList(GraphQLString), + description: 'The location(s) at which this practitioner provides care.', + }, + healthcareService: { + type: new GraphQLList(GraphQLString), + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details that are specific to the role/location/service.', + }, + availableTime: { + type: new GraphQLList( + require('./practitionerroleavailabletime.input.js'), + ), + description: + 'A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.', + }, + notAvailable: { + type: new GraphQLList(require('./practitionerrolenotavailable.input.js')), + description: + 'The practitioner is not available or performing this role during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.input.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + endpoint: { + type: new GraphQLList(GraphQLString), + description: + 'Technical endpoints providing access to services operated for the practitioner with this role.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/practitionerroleavailabletime.input.js b/src/resources/4_0_0/inputs/practitionerroleavailabletime.input.js new file mode 100644 index 00000000..21ad1b9e --- /dev/null +++ b/src/resources/4_0_0/inputs/practitionerroleavailabletime.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary PractitionerRoleavailableTime Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PractitionerRoleavailableTime_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _daysOfWeek: { + type: require('./element.input.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.input.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.input.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.input.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/practitionerrolenotavailable.input.js b/src/resources/4_0_0/inputs/practitionerrolenotavailable.input.js new file mode 100644 index 00000000..b79b8fa1 --- /dev/null +++ b/src/resources/4_0_0/inputs/practitionerrolenotavailable.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary PractitionerRolenotAvailable Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'PractitionerRolenotAvailable_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.input.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/procedure.input.js b/src/resources/4_0_0/inputs/procedure.input.js new file mode 100644 index 00000000..5d322483 --- /dev/null +++ b/src/resources/4_0_0/inputs/procedure.input.js @@ -0,0 +1,267 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Procedure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Procedure_Input', + description: + 'An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Procedure_Enum_input', + values: { Procedure: { value: 'Procedure' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to a resource that contains details of the request for this procedure.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular procedure is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: + 'A code specifying the state of the procedure. Generally, this will be the in-progress or completed state.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the state of the procedure. Generally, this will be the in-progress or completed state.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + 'Captures the reason for the current state of the procedure.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The person, animal or group on which the procedure was performed.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated.', + }, + _performedDateTime: { + type: require('./element.input.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedPeriod: { + type: require('./period.input.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + _performedString: { + type: require('./element.input.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedString: { + type: GraphQLString, + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedAge: { + type: require('./age.input.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedRange: { + type: require('./range.input.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + recorder: { + type: GraphQLString, + description: + 'Individual who recorded the record and takes responsibility for its content.', + }, + asserter: { + type: GraphQLString, + description: 'Individual who is making the procedure statement.', + }, + performer: { + type: new GraphQLList(require('./procedureperformer.input.js')), + description: "Limited to 'real' people rather than equipment.", + }, + location: { + type: GraphQLString, + description: + 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The coded reason why the procedure was performed. This may be a coded entity of some type, or may simply be present as text.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: 'The justification of why the procedure was performed.', + }, + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', + }, + outcome: { + type: require('./codeableconcept.input.js'), + description: + 'The outcome of the procedure - did it resolve the reasons for the procedure being performed?', + }, + report: { + type: new GraphQLList(GraphQLString), + description: + 'This could be a histology result, pathology report, surgical report, etc.', + }, + complication: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", + }, + complicationDetail: { + type: new GraphQLList(GraphQLString), + description: + 'Any complications that occurred during the procedure, or in the immediate post-performance period.', + }, + followUp: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'If the procedure required specific follow up - e.g. removal of sutures. The follow up may be represented as a simple note or could potentially be more complex, in which case the CarePlan resource can be used.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Any other notes and comments about the procedure.', + }, + focalDevice: { + type: new GraphQLList(require('./procedurefocaldevice.input.js')), + description: + 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', + }, + usedReference: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + }, + usedCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Identifies coded items that were used as part of the procedure.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/procedurefocaldevice.input.js b/src/resources/4_0_0/inputs/procedurefocaldevice.input.js new file mode 100644 index 00000000..f1c8e672 --- /dev/null +++ b/src/resources/4_0_0/inputs/procedurefocaldevice.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ProcedurefocalDevice Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ProcedurefocalDevice_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of change that happened to the device during the procedure.', + }, + manipulated: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The device that was manipulated (changed) during the procedure.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/procedureperformer.input.js b/src/resources/4_0_0/inputs/procedureperformer.input.js new file mode 100644 index 00000000..b1045614 --- /dev/null +++ b/src/resources/4_0_0/inputs/procedureperformer.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Procedureperformer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Procedureperformer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.input.js'), + description: + 'Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist.', + }, + actor: { + type: new GraphQLNonNull(GraphQLString), + description: 'The practitioner who was involved in the procedure.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/prodcharacteristic.input.js b/src/resources/4_0_0/inputs/prodcharacteristic.input.js new file mode 100644 index 00000000..ba77c752 --- /dev/null +++ b/src/resources/4_0_0/inputs/prodcharacteristic.input.js @@ -0,0 +1,105 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ProdCharacteristic Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ProdCharacteristic_Input', + description: + 'Base StructureDefinition for ProdCharacteristic Type: The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + height: { + type: require('./quantity.input.js'), + description: + 'Where applicable, the height can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + width: { + type: require('./quantity.input.js'), + description: + 'Where applicable, the width can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + depth: { + type: require('./quantity.input.js'), + description: + 'Where applicable, the depth can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + weight: { + type: require('./quantity.input.js'), + description: + 'Where applicable, the weight can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + nominalVolume: { + type: require('./quantity.input.js'), + description: + 'Where applicable, the nominal volume can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + externalDiameter: { + type: require('./quantity.input.js'), + description: + 'Where applicable, the external diameter can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + _shape: { + type: require('./element.input.js'), + description: + 'Where applicable, the shape can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + shape: { + type: GraphQLString, + description: + 'Where applicable, the shape can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + _color: { + type: require('./element.input.js'), + description: + 'Where applicable, the color can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + color: { + type: new GraphQLList(GraphQLString), + description: + 'Where applicable, the color can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + _imprint: { + type: require('./element.input.js'), + description: 'Where applicable, the imprint can be specified as text.', + }, + imprint: { + type: new GraphQLList(GraphQLString), + description: 'Where applicable, the imprint can be specified as text.', + }, + image: { + type: new GraphQLList(require('./attachment.input.js')), + description: + 'Where applicable, the image can be provided The format of the image attachment shall be specified by regional implementations.', + }, + scoring: { + type: require('./codeableconcept.input.js'), + description: + 'Where applicable, the scoring can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/productshelflife.input.js b/src/resources/4_0_0/inputs/productshelflife.input.js new file mode 100644 index 00000000..ce42096c --- /dev/null +++ b/src/resources/4_0_0/inputs/productshelflife.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ProductShelfLife Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ProductShelfLife_Input', + description: + 'Base StructureDefinition for ProductShelfLife Type: The shelf-life and storage information for a medicinal product item or container can be described using this class.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Unique identifier for the packaged Medicinal Product.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'This describes the shelf life, taking into account various scenarios such as shelf life of the packaged Medicinal Product itself, shelf life after transformation where necessary and shelf life after the first opening of a bottle, etc. The shelf life type shall be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.', + }, + period: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'The shelf life time period can be specified using a numerical value for the period of time and its unit of time measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + specialPrecautionsForStorage: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Special precautions for storage, if any, can be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/provenance.input.js b/src/resources/4_0_0/inputs/provenance.input.js new file mode 100644 index 00000000..18299b0c --- /dev/null +++ b/src/resources/4_0_0/inputs/provenance.input.js @@ -0,0 +1,150 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Provenance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Provenance_Input', + description: + 'Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Provenance_Enum_input', + values: { Provenance: { value: 'Provenance' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + target: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + }, + occurredPeriod: { + type: require('./period.input.js'), + description: 'The period during which the activity occurred.', + }, + _occurredDateTime: { + type: require('./element.input.js'), + description: 'The period during which the activity occurred.', + }, + occurredDateTime: { + type: DateTimeScalar, + description: 'The period during which the activity occurred.', + }, + _recorded: { + type: require('./element.input.js'), + description: 'The instant of time at which the activity was recorded.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The instant of time at which the activity was recorded.', + }, + _policy: { + type: require('./element.input.js'), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + location: { + type: GraphQLString, + description: 'Where the activity occurred, if relevant.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason that the activity was taking place.', + }, + activity: { + type: require('./codeableconcept.input.js'), + description: + 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', + }, + agent: { + type: new GraphQLList( + new GraphQLNonNull(require('./provenanceagent.input.js')), + ), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + entity: { + type: new GraphQLList(require('./provenanceentity.input.js')), + description: 'An entity used in this activity.', + }, + signature: { + type: new GraphQLList(require('./signature.input.js')), + description: + 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/provenanceagent.input.js b/src/resources/4_0_0/inputs/provenanceagent.input.js new file mode 100644 index 00000000..e26811d1 --- /dev/null +++ b/src/resources/4_0_0/inputs/provenanceagent.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Provenanceagent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Provenanceagent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The participation the agent had with respect to the activity.', + }, + role: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.', + }, + who: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The individual, device or organization that participated in the event.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'The individual, device, or organization for whom the change was made.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/provenanceentity.input.js b/src/resources/4_0_0/inputs/provenanceentity.input.js new file mode 100644 index 00000000..98d877e1 --- /dev/null +++ b/src/resources/4_0_0/inputs/provenanceentity.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Provenanceentity Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Provenanceentity_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _role: { + type: require('./element.input.js'), + description: 'How the entity was used during the activity.', + }, + role: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the entity was used during the activity.', + }, + what: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/quantity.input.js b/src/resources/4_0_0/inputs/quantity.input.js new file mode 100644 index 00000000..bfc4fc4d --- /dev/null +++ b/src/resources/4_0_0/inputs/quantity.input.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Quantity Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Quantity_Input', + description: + 'Base StructureDefinition for Quantity Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.input.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.input.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.input.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.input.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.input.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/questionnaire.input.js b/src/resources/4_0_0/inputs/questionnaire.input.js new file mode 100644 index 00000000..e47d46f2 --- /dev/null +++ b/src/resources/4_0_0/inputs/questionnaire.input.js @@ -0,0 +1,273 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Questionnaire Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Questionnaire_Input', + description: + 'A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Questionnaire_Enum_input', + values: { Questionnaire: { value: 'Questionnaire' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the questionnaire.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the questionnaire.', + }, + _derivedFrom: { + type: require('./element.input.js'), + description: + 'The URL of a Questionnaire that this Questionnaire is based on.', + }, + derivedFrom: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL of a Questionnaire that this Questionnaire is based on.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this questionnaire. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this questionnaire. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _subjectType: { + type: require('./element.input.js'), + description: + 'The types of subjects that can be the subject of responses created for the questionnaire.', + }, + subjectType: { + type: new GraphQLList(CodeScalar), + description: + 'The types of subjects that can be the subject of responses created for the questionnaire.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the questionnaire.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the questionnaire.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the questionnaire from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the questionnaire from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate questionnaire instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the questionnaire is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this questionnaire is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this questionnaire is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the questionnaire content was or is planned to be in active use.', + }, + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'An identifier for this question or group of questions in a particular terminology such as LOINC.', + }, + item: { + type: new GraphQLList(require('./questionnaireitem.input.js')), + description: + 'A particular question, question grouping or display text that is part of the questionnaire.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/questionnaireitem.input.js b/src/resources/4_0_0/inputs/questionnaireitem.input.js new file mode 100644 index 00000000..2ee65e45 --- /dev/null +++ b/src/resources/4_0_0/inputs/questionnaireitem.input.js @@ -0,0 +1,174 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary Questionnaireitem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Questionnaireitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _linkId: { + type: require('./element.input.js'), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', + }, + linkId: { + type: new GraphQLNonNull(GraphQLString), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'This element is a URI that refers to an [ElementDefinition](elementdefinition.html) that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * answerValueSet (ElementDefinition.binding) * options (ElementDefinition.binding).', + }, + definition: { + type: UriScalar, + description: + 'This element is a URI that refers to an [ElementDefinition](elementdefinition.html) that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * answerValueSet (ElementDefinition.binding) * options (ElementDefinition.binding).', + }, + code: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).', + }, + _prefix: { + type: require('./element.input.js'), + description: + 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', + }, + prefix: { + type: GraphQLString, + description: + 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', + }, + _text: { + type: require('./element.input.js'), + description: + 'The name of a section, the text of a question or text content for a display item.', + }, + text: { + type: GraphQLString, + description: + 'The name of a section, the text of a question or text content for a display item.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', + }, + enableWhen: { + type: new GraphQLList(require('./questionnaireitemenablewhen.input.js')), + description: + 'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.', + }, + _enableBehavior: { + type: require('./element.input.js'), + description: + 'Controls how multiple enableWhen values are interpreted - whether all or any must be true.', + }, + enableBehavior: { + type: CodeScalar, + description: + 'Controls how multiple enableWhen values are interpreted - whether all or any must be true.', + }, + _required: { + type: require('./element.input.js'), + description: + "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", + }, + required: { + type: GraphQLBoolean, + description: + "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", + }, + _repeats: { + type: require('./element.input.js'), + description: + 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.', + }, + repeats: { + type: GraphQLBoolean, + description: + 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.', + }, + _readOnly: { + type: require('./element.input.js'), + description: + 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', + }, + readOnly: { + type: GraphQLBoolean, + description: + 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', + }, + _maxLength: { + type: require('./element.input.js'), + description: + "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", + }, + maxLength: { + type: GraphQLInt, + description: + "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", + }, + _answerValueSet: { + type: require('./element.input.js'), + description: + "A reference to a value set containing a list of codes representing permitted answers for a 'choice' or 'open-choice' question.", + }, + answerValueSet: { + type: CanonicalScalar, + description: + "A reference to a value set containing a list of codes representing permitted answers for a 'choice' or 'open-choice' question.", + }, + answerOption: { + type: new GraphQLList( + require('./questionnaireitemansweroption.input.js'), + ), + description: + "One of the permitted answers for a 'choice' or 'open-choice' question.", + }, + initial: { + type: new GraphQLList(require('./questionnaireiteminitial.input.js')), + description: + 'One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/questionnaireitemansweroption.input.js b/src/resources/4_0_0/inputs/questionnaireitemansweroption.input.js new file mode 100644 index 00000000..0c1ed0f5 --- /dev/null +++ b/src/resources/4_0_0/inputs/questionnaireitemansweroption.input.js @@ -0,0 +1,101 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireitemanswerOption Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'QuestionnaireitemanswerOption_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueInteger: { + type: require('./element.input.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueDate: { + type: require('./element.input.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueTime: { + type: require('./element.input.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueString: { + type: require('./element.input.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _initialSelected: { + type: require('./element.input.js'), + description: + 'Indicates whether the answer value is selected when the list of possible answers is initially shown.', + }, + initialSelected: { + type: GraphQLBoolean, + description: + 'Indicates whether the answer value is selected when the list of possible answers is initially shown.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/questionnaireitemenablewhen.input.js b/src/resources/4_0_0/inputs/questionnaireitemenablewhen.input.js new file mode 100644 index 00000000..92372f11 --- /dev/null +++ b/src/resources/4_0_0/inputs/questionnaireitemenablewhen.input.js @@ -0,0 +1,147 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireitemenableWhen Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'QuestionnaireitemenableWhen_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _question: { + type: require('./element.input.js'), + description: + 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', + }, + question: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', + }, + _operator: { + type: require('./element.input.js'), + description: 'Specifies the criteria by which the question is enabled.', + }, + operator: { + type: new GraphQLNonNull(CodeScalar), + description: 'Specifies the criteria by which the question is enabled.', + }, + _answerBoolean: { + type: require('./element.input.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerDecimal: { + type: require('./element.input.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerInteger: { + type: require('./element.input.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerDate: { + type: require('./element.input.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerDateTime: { + type: require('./element.input.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerTime: { + type: require('./element.input.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerTime: { + type: new GraphQLNonNull(TimeScalar), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerString: { + type: require('./element.input.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/questionnaireiteminitial.input.js b/src/resources/4_0_0/inputs/questionnaireiteminitial.input.js new file mode 100644 index 00000000..d65013da --- /dev/null +++ b/src/resources/4_0_0/inputs/questionnaireiteminitial.input.js @@ -0,0 +1,124 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Questionnaireiteminitial Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Questionnaireiteminitial_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The actual value to for an initial answer.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The actual value to for an initial answer.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The actual value to for an initial answer.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The actual value to for an initial answer.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The actual value to for an initial answer.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The actual value to for an initial answer.', + }, + _valueDate: { + type: require('./element.input.js'), + description: 'The actual value to for an initial answer.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The actual value to for an initial answer.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'The actual value to for an initial answer.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The actual value to for an initial answer.', + }, + _valueTime: { + type: require('./element.input.js'), + description: 'The actual value to for an initial answer.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The actual value to for an initial answer.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The actual value to for an initial answer.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The actual value to for an initial answer.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'The actual value to for an initial answer.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The actual value to for an initial answer.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: 'The actual value to for an initial answer.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The actual value to for an initial answer.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'The actual value to for an initial answer.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The actual value to for an initial answer.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/questionnaireresponse.input.js b/src/resources/4_0_0/inputs/questionnaireresponse.input.js new file mode 100644 index 00000000..e7a9523e --- /dev/null +++ b/src/resources/4_0_0/inputs/questionnaireresponse.input.js @@ -0,0 +1,155 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireResponse Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'QuestionnaireResponse_Input', + description: + 'A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'QuestionnaireResponse_Enum_input', + values: { QuestionnaireResponse: { value: 'QuestionnaireResponse' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.', + }, + _questionnaire: { + type: require('./element.input.js'), + description: + 'The Questionnaire that defines and organizes the questions for which answers are being provided.', + }, + questionnaire: { + type: CanonicalScalar, + description: + 'The Questionnaire that defines and organizes the questions for which answers are being provided.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The position of the questionnaire response within its overall lifecycle.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The position of the questionnaire response within its overall lifecycle.', + }, + subject: { + type: GraphQLString, + description: + 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', + }, + encounter: { + type: GraphQLString, + description: + 'The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.', + }, + _authored: { + type: require('./element.input.js'), + description: + 'The date and/or time that this set of answers were last changed.', + }, + authored: { + type: DateTimeScalar, + description: + 'The date and/or time that this set of answers were last changed.', + }, + author: { + type: GraphQLString, + description: + 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', + }, + source: { + type: GraphQLString, + description: 'The person who answered the questions about the subject.', + }, + item: { + type: new GraphQLList(require('./questionnaireresponseitem.input.js')), + description: + 'A group or question item from the original questionnaire for which answers are provided.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/questionnaireresponseitem.input.js b/src/resources/4_0_0/inputs/questionnaireresponseitem.input.js new file mode 100644 index 00000000..14ebbefe --- /dev/null +++ b/src/resources/4_0_0/inputs/questionnaireresponseitem.input.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireResponseitem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'QuestionnaireResponseitem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _linkId: { + type: require('./element.input.js'), + description: + 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', + }, + linkId: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', + }, + _definition: { + type: require('./element.input.js'), + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', + }, + definition: { + type: UriScalar, + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', + }, + _text: { + type: require('./element.input.js'), + description: + 'Text that is displayed above the contents of the group or as the text of the question being answered.', + }, + text: { + type: GraphQLString, + description: + 'Text that is displayed above the contents of the group or as the text of the question being answered.', + }, + answer: { + type: new GraphQLList( + require('./questionnaireresponseitemanswer.input.js'), + ), + description: "The respondent's answer(s) to the question.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/questionnaireresponseitemanswer.input.js b/src/resources/4_0_0/inputs/questionnaireresponseitemanswer.input.js new file mode 100644 index 00000000..a2fc28b9 --- /dev/null +++ b/src/resources/4_0_0/inputs/questionnaireresponseitemanswer.input.js @@ -0,0 +1,143 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireResponseitemanswer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'QuestionnaireResponseitemanswer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueBoolean: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueInteger: { + type: GraphQLInt, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDate: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDate: { + type: DateScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueTime: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueTime: { + type: TimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueString: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueString: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueUri: { + type: require('./element.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueUri: { + type: UriScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueAttachment: { + type: require('./attachment.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueCoding: { + type: require('./coding.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueReference: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/range.input.js b/src/resources/4_0_0/inputs/range.input.js new file mode 100644 index 00000000..00982d2f --- /dev/null +++ b/src/resources/4_0_0/inputs/range.input.js @@ -0,0 +1,40 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Range Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Range_Input', + description: + 'Base StructureDefinition for Range Type: A set of ordered Quantities defined by a low and high limit.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + low: { + type: require('./quantity.input.js'), + description: 'The low limit. The boundary is inclusive.', + }, + high: { + type: require('./quantity.input.js'), + description: 'The high limit. The boundary is inclusive.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/ratio.input.js b/src/resources/4_0_0/inputs/ratio.input.js new file mode 100644 index 00000000..4f4b448f --- /dev/null +++ b/src/resources/4_0_0/inputs/ratio.input.js @@ -0,0 +1,40 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Ratio Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Ratio_Input', + description: + 'Base StructureDefinition for Ratio Type: A relationship of two Quantity values - expressed as a numerator and a denominator.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + numerator: { + type: require('./quantity.input.js'), + description: 'The value of the numerator.', + }, + denominator: { + type: require('./quantity.input.js'), + description: 'The value of the denominator.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/reference.input.js b/src/resources/4_0_0/inputs/reference.input.js new file mode 100644 index 00000000..0dbef441 --- /dev/null +++ b/src/resources/4_0_0/inputs/reference.input.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Reference Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Reference_Input', + description: + 'Base StructureDefinition for Reference Type: A reference from one resource to another.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _reference: { + type: require('./element.input.js'), + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + reference: { + type: GraphQLString, + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + _type: { + type: require('./element.input.js'), + description: + "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. 'Patient' is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + }, + type: { + type: UriScalar, + description: + "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. 'Patient' is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.', + }, + _display: { + type: require('./element.input.js'), + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + display: { + type: GraphQLString, + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/relatedartifact.input.js b/src/resources/4_0_0/inputs/relatedartifact.input.js new file mode 100644 index 00000000..4d48f3e9 --- /dev/null +++ b/src/resources/4_0_0/inputs/relatedartifact.input.js @@ -0,0 +1,99 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary RelatedArtifact Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RelatedArtifact_Input', + description: + 'Base StructureDefinition for RelatedArtifact Type: Related artifacts such as additional documentation, justification, or bibliographic references.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of relationship to the related artifact.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of relationship to the related artifact.', + }, + _label: { + type: require('./element.input.js'), + description: + 'A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index.', + }, + label: { + type: GraphQLString, + description: + 'A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index.', + }, + _display: { + type: require('./element.input.js'), + description: + 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', + }, + display: { + type: GraphQLString, + description: + 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', + }, + _citation: { + type: require('./element.input.js'), + description: + 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', + }, + citation: { + type: GraphQLString, + description: + 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', + }, + _url: { + type: require('./element.input.js'), + description: + 'A url for the artifact that can be followed to access the actual content.', + }, + url: { + type: UrlScalar, + description: + 'A url for the artifact that can be followed to access the actual content.', + }, + document: { + type: require('./attachment.input.js'), + description: + 'The document being referenced, represented as an attachment. This is exclusive with the resource element.', + }, + _resource: { + type: require('./element.input.js'), + description: + 'The related resource, such as a library, value set, profile, or other knowledge resource.', + }, + resource: { + type: CanonicalScalar, + description: + 'The related resource, such as a library, value set, profile, or other knowledge resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/relatedperson.input.js b/src/resources/4_0_0/inputs/relatedperson.input.js new file mode 100644 index 00000000..8a97becd --- /dev/null +++ b/src/resources/4_0_0/inputs/relatedperson.input.js @@ -0,0 +1,153 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary RelatedPerson Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RelatedPerson_Input', + description: + 'Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RelatedPerson_Enum_input', + values: { RelatedPerson: { value: 'RelatedPerson' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Identifier for a person within a particular scope.', + }, + _active: { + type: require('./element.input.js'), + description: 'Whether this related person record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this related person record is in active use.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient this person is related to.', + }, + relationship: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The nature of the relationship between a patient and the related person.', + }, + name: { + type: new GraphQLList(require('./humanname.input.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.input.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.input.js'), + description: 'The date on which the related person was born.', + }, + birthDate: { + type: DateScalar, + description: 'The date on which the related person was born.', + }, + address: { + type: new GraphQLList(require('./address.input.js')), + description: + 'Address where the related person can be contacted or visited.', + }, + photo: { + type: new GraphQLList(require('./attachment.input.js')), + description: 'Image of the person.', + }, + period: { + type: require('./period.input.js'), + description: + 'The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown.', + }, + communication: { + type: new GraphQLList(require('./relatedpersoncommunication.input.js')), + description: + "A language which may be used to communicate with about the patient's health.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/relatedpersoncommunication.input.js b/src/resources/4_0_0/inputs/relatedpersoncommunication.input.js new file mode 100644 index 00000000..e576dc68 --- /dev/null +++ b/src/resources/4_0_0/inputs/relatedpersoncommunication.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RelatedPersoncommunication Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RelatedPersoncommunication_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + language: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + _preferred: { + type: require('./element.input.js'), + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + preferred: { + type: GraphQLBoolean, + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/requestgroup.input.js b/src/resources/4_0_0/inputs/requestgroup.input.js new file mode 100644 index 00000000..0cd748f7 --- /dev/null +++ b/src/resources/4_0_0/inputs/requestgroup.input.js @@ -0,0 +1,200 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary RequestGroup Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RequestGroup_Input', + description: + "A group of related requests that can be used to capture intended activities that have inter-dependencies such as 'give this medication after that one'.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RequestGroup_Enum_input', + values: { RequestGroup: { value: 'RequestGroup' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Allows a service to provide a unique, business identifier for the request.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this request.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the request should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the request should be addressed with respect to other requests.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'A code that identifies what the overall request group is.', + }, + subject: { + type: GraphQLString, + description: 'The subject for which the request group was created.', + }, + encounter: { + type: GraphQLString, + description: 'Describes the context of the request group, if any.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'Indicates when the request group was created.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'Indicates when the request group was created.', + }, + author: { + type: GraphQLString, + description: 'Provides a reference to the author of the request group.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Describes the reason for the request group in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource whose existence justifies this request group.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Provides a mechanism to communicate additional information about the response.', + }, + action: { + type: new GraphQLList(require('./requestgroupaction.input.js')), + description: + 'The actions, if any, produced by the evaluation of the artifact.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/requestgroupaction.input.js b/src/resources/4_0_0/inputs/requestgroupaction.input.js new file mode 100644 index 00000000..8a84cc08 --- /dev/null +++ b/src/resources/4_0_0/inputs/requestgroupaction.input.js @@ -0,0 +1,199 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary RequestGroupaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RequestGroupaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _prefix: { + type: require('./element.input.js'), + description: 'A user-visible prefix for the action.', + }, + prefix: { + type: GraphQLString, + description: 'A user-visible prefix for the action.', + }, + _title: { + type: require('./element.input.js'), + description: 'The title of the action displayed to a user.', + }, + title: { + type: GraphQLString, + description: 'The title of the action displayed to a user.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + _textEquivalent: { + type: require('./element.input.js'), + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.', + }, + textEquivalent: { + type: GraphQLString, + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the action should be addressed with respect to other actions.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the action should be addressed with respect to other actions.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', + }, + condition: { + type: new GraphQLList(require('./requestgroupactioncondition.input.js')), + description: + 'An expression that describes applicability criteria, or start/stop conditions for the action.', + }, + relatedAction: { + type: new GraphQLList( + require('./requestgroupactionrelatedaction.input.js'), + ), + description: + "A relationship to another action such as 'before' or '30-60 minutes after start of'.", + }, + _timingDateTime: { + type: require('./element.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'An optional value describing when the action should be performed.', + }, + timingAge: { + type: require('./age.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingPeriod: { + type: require('./period.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDuration: { + type: require('./duration.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingRange: { + type: require('./range.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: + 'An optional value describing when the action should be performed.', + }, + participant: { + type: new GraphQLList(GraphQLString), + description: + 'The participant that should perform or be responsible for this action.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'The type of action to perform (create, update, remove).', + }, + _groupingBehavior: { + type: require('./element.input.js'), + description: + 'Defines the grouping behavior for the action and its children.', + }, + groupingBehavior: { + type: CodeScalar, + description: + 'Defines the grouping behavior for the action and its children.', + }, + _selectionBehavior: { + type: require('./element.input.js'), + description: + 'Defines the selection behavior for the action and its children.', + }, + selectionBehavior: { + type: CodeScalar, + description: + 'Defines the selection behavior for the action and its children.', + }, + _requiredBehavior: { + type: require('./element.input.js'), + description: 'Defines expectations around whether an action is required.', + }, + requiredBehavior: { + type: CodeScalar, + description: 'Defines expectations around whether an action is required.', + }, + _precheckBehavior: { + type: require('./element.input.js'), + description: 'Defines whether the action should usually be preselected.', + }, + precheckBehavior: { + type: CodeScalar, + description: 'Defines whether the action should usually be preselected.', + }, + _cardinalityBehavior: { + type: require('./element.input.js'), + description: 'Defines whether the action can be selected multiple times.', + }, + cardinalityBehavior: { + type: CodeScalar, + description: 'Defines whether the action can be selected multiple times.', + }, + resource: { + type: GraphQLString, + description: + 'The resource that is the target of the action (e.g. CommunicationRequest).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/requestgroupactioncondition.input.js b/src/resources/4_0_0/inputs/requestgroupactioncondition.input.js new file mode 100644 index 00000000..24c21635 --- /dev/null +++ b/src/resources/4_0_0/inputs/requestgroupactioncondition.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary RequestGroupactioncondition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RequestGroupactioncondition_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _kind: { + type: require('./element.input.js'), + description: 'The kind of condition.', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'The kind of condition.', + }, + expression: { + type: require('./expression.input.js'), + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/requestgroupactionrelatedaction.input.js b/src/resources/4_0_0/inputs/requestgroupactionrelatedaction.input.js new file mode 100644 index 00000000..f7b8f3e5 --- /dev/null +++ b/src/resources/4_0_0/inputs/requestgroupactionrelatedaction.input.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary RequestGroupactionrelatedAction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RequestGroupactionrelatedAction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _actionId: { + type: require('./element.input.js'), + description: 'The element id of the action this is related to.', + }, + actionId: { + type: new GraphQLNonNull(IdScalar), + description: 'The element id of the action this is related to.', + }, + _relationship: { + type: require('./element.input.js'), + description: 'The relationship of this action to the related action.', + }, + relationship: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relationship of this action to the related action.', + }, + offsetDuration: { + type: require('./duration.input.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + offsetRange: { + type: require('./range.input.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/researchdefinition.input.js b/src/resources/4_0_0/inputs/researchdefinition.input.js new file mode 100644 index 00000000..dca385bc --- /dev/null +++ b/src/resources/4_0_0/inputs/researchdefinition.input.js @@ -0,0 +1,353 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ResearchDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ResearchDefinition_Input', + description: + 'The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchDefinition_Enum_input', + values: { ResearchDefinition: { value: 'ResearchDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this research definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this research definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this research definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the research definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the research definition.', + }, + _shortTitle: { + type: require('./element.input.js'), + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + shortTitle: { + type: GraphQLString, + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the ResearchDefinition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the ResearchDefinition giving additional information about its content.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this research definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this research definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.', + }, + subjectReference: { + type: GraphQLString, + description: + 'The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the research definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the research definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the research definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the research definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the research definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the research definition from a consumer's perspective.", + }, + _comment: { + type: require('./element.input.js'), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + comment: { + type: new GraphQLList(GraphQLString), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the research definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this research definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this research definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description, from a clinical perspective, of how the ResearchDefinition is used.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description, from a clinical perspective, of how the ResearchDefinition is used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the research definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.input.js'), + description: + 'A reference to a Library resource containing the formal logic used by the ResearchDefinition.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing the formal logic used by the ResearchDefinition.', + }, + population: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a ResearchElementDefinition resource that defines the population for the research.', + }, + exposure: { + type: GraphQLString, + description: + 'A reference to a ResearchElementDefinition resource that defines the exposure for the research.', + }, + exposureAlternative: { + type: GraphQLString, + description: + 'A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.', + }, + outcome: { + type: GraphQLString, + description: + 'A reference to a ResearchElementDefinition resomece that defines the outcome for the research.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/researchelementdefinition.input.js b/src/resources/4_0_0/inputs/researchelementdefinition.input.js new file mode 100644 index 00000000..c8807e5d --- /dev/null +++ b/src/resources/4_0_0/inputs/researchelementdefinition.input.js @@ -0,0 +1,364 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ResearchElementDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ResearchElementDefinition_Input', + description: + "The ResearchElementDefinition resource describes a 'PICO' element that knowledge (evidence, assertion, recommendation) is about.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchElementDefinition_Enum_input', + values: { + ResearchElementDefinition: { value: 'ResearchElementDefinition' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this research element definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this research element definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the research element definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the research element definition.', + }, + _shortTitle: { + type: require('./element.input.js'), + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + shortTitle: { + type: GraphQLString, + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + _subtitle: { + type: require('./element.input.js'), + description: + 'An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this research element definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this research element definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.', + }, + subjectReference: { + type: GraphQLString, + description: + 'The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the research element definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research element definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the research element definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research element definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the research element definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the research element definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the research element definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the research element definition from a consumer's perspective.", + }, + _comment: { + type: require('./element.input.js'), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + comment: { + type: new GraphQLList(GraphQLString), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research element definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the research element definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this research element definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this research element definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.input.js'), + description: + 'A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the research element definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.input.js'), + description: + 'A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of research element, a population, an exposure, or an outcome.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of research element, a population, an exposure, or an outcome.', + }, + _variableType: { + type: require('./element.input.js'), + description: + 'The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).', + }, + variableType: { + type: CodeScalar, + description: + 'The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).', + }, + characteristic: { + type: new GraphQLList( + new GraphQLNonNull( + require('./researchelementdefinitioncharacteristic.input.js'), + ), + ), + description: + "A characteristic that defines the members of the research element. Multiple characteristics are applied with 'and' semantics.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/researchelementdefinitioncharacteristic.input.js b/src/resources/4_0_0/inputs/researchelementdefinitioncharacteristic.input.js new file mode 100644 index 00000000..be761c7c --- /dev/null +++ b/src/resources/4_0_0/inputs/researchelementdefinitioncharacteristic.input.js @@ -0,0 +1,173 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ResearchElementDefinitioncharacteristic Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ResearchElementDefinitioncharacteristic_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + definitionCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + _definitionCanonical: { + type: require('./element.input.js'), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionExpression: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.input.js')), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + usageContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.', + }, + _exclude: { + type: require('./element.input.js'), + description: + 'When true, members with this characteristic are excluded from the element.', + }, + exclude: { + type: GraphQLBoolean, + description: + 'When true, members with this characteristic are excluded from the element.', + }, + unitOfMeasure: { + type: require('./codeableconcept.input.js'), + description: 'Specifies the UCUM unit for the outcome.', + }, + _studyEffectiveDescription: { + type: require('./element.input.js'), + description: + 'A narrative description of the time period the study covers.', + }, + studyEffectiveDescription: { + type: GraphQLString, + description: + 'A narrative description of the time period the study covers.', + }, + _studyEffectiveDateTime: { + type: require('./element.input.js'), + description: 'Indicates what effective period the study covers.', + }, + studyEffectiveDateTime: { + type: DateTimeScalar, + description: 'Indicates what effective period the study covers.', + }, + studyEffectivePeriod: { + type: require('./period.input.js'), + description: 'Indicates what effective period the study covers.', + }, + studyEffectiveDuration: { + type: require('./duration.input.js'), + description: 'Indicates what effective period the study covers.', + }, + studyEffectiveTiming: { + type: require('./timing.input.js'), + description: 'Indicates what effective period the study covers.', + }, + studyEffectiveTimeFromStart: { + type: require('./duration.input.js'), + description: 'Indicates duration from the study initiation.', + }, + _studyEffectiveGroupMeasure: { + type: require('./element.input.js'), + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + studyEffectiveGroupMeasure: { + type: CodeScalar, + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + _participantEffectiveDescription: { + type: require('./element.input.js'), + description: + 'A narrative description of the time period the study covers.', + }, + participantEffectiveDescription: { + type: GraphQLString, + description: + 'A narrative description of the time period the study covers.', + }, + _participantEffectiveDateTime: { + type: require('./element.input.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveDateTime: { + type: DateTimeScalar, + description: 'Indicates what effective period the study covers.', + }, + participantEffectivePeriod: { + type: require('./period.input.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveDuration: { + type: require('./duration.input.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveTiming: { + type: require('./timing.input.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveTimeFromStart: { + type: require('./duration.input.js'), + description: "Indicates duration from the participant's study entry.", + }, + _participantEffectiveGroupMeasure: { + type: require('./element.input.js'), + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + participantEffectiveGroupMeasure: { + type: CodeScalar, + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/researchstudy.input.js b/src/resources/4_0_0/inputs/researchstudy.input.js new file mode 100644 index 00000000..19f4b739 --- /dev/null +++ b/src/resources/4_0_0/inputs/researchstudy.input.js @@ -0,0 +1,210 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ResearchStudy Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ResearchStudy_Input', + description: + 'A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchStudy_Enum_input', + values: { ResearchStudy: { value: 'ResearchStudy' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this research study by the sponsor or other systems.', + }, + _title: { + type: require('./element.input.js'), + description: 'A short, descriptive user-friendly label for the study.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive user-friendly label for the study.', + }, + protocol: { + type: new GraphQLList(GraphQLString), + description: + 'The set of steps expected to be performed as part of the execution of the study.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger research study of which this particular study is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the study.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the study.', + }, + primaryPurposeType: { + type: require('./codeableconcept.input.js'), + description: + "The type of study based upon the intent of the study's activities. A classification of the intent of the study.", + }, + phase: { + type: require('./codeableconcept.input.js'), + description: + 'The stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.', + }, + focus: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.', + }, + condition: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "The condition that is the focus of the study. For example, In a study to examine risk factors for Lupus, might have as an inclusion criterion 'healthy volunteer', but the target condition code would be a Lupus SNOMED code.", + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in learning more about or engaging with the study.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: 'Citations, references and other related documents.', + }, + keyword: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Key terms to aid in searching for or filtering the study.', + }, + location: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Indicates a country, state or other region where the study is taking place.', + }, + _description: { + type: require('./element.input.js'), + description: 'A full description of how the study is being conducted.', + }, + description: { + type: GraphQLString, + description: 'A full description of how the study is being conducted.', + }, + enrollment: { + type: new GraphQLList(GraphQLString), + description: + "Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. ' 200 female Europeans between the ages of 20 and 45 with early onset diabetes'.", + }, + period: { + type: require('./period.input.js'), + description: + 'Identifies the start date and the expected (or actual, depending on status) end date for the study.', + }, + sponsor: { + type: GraphQLString, + description: + 'An organization that initiates the investigation and is legally responsible for the study.', + }, + principalInvestigator: { + type: GraphQLString, + description: + 'A researcher in a study who oversees multiple aspects of the study, such as concept development, protocol writing, protocol submission for IRB approval, participant recruitment, informed consent, data collection, analysis, interpretation and presentation.', + }, + site: { + type: new GraphQLList(GraphQLString), + description: 'A facility in which study activities are conducted.', + }, + reasonStopped: { + type: require('./codeableconcept.input.js'), + description: + 'A description and/or code explaining the premature termination of the study.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Comments made about the study by the performer, subject or other participants.', + }, + arm: { + type: new GraphQLList(require('./researchstudyarm.input.js')), + description: + 'Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.', + }, + objective: { + type: new GraphQLList(require('./researchstudyobjective.input.js')), + description: + 'A goal that the study is aiming to achieve in terms of a scientific question to be answered by the analysis of data collected during the study.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/researchstudyarm.input.js b/src/resources/4_0_0/inputs/researchstudyarm.input.js new file mode 100644 index 00000000..63ac09cd --- /dev/null +++ b/src/resources/4_0_0/inputs/researchstudyarm.input.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ResearchStudyarm Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ResearchStudyarm_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Unique, human-readable label for this arm of the study.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Unique, human-readable label for this arm of the study.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Categorization of study arm, e.g. experimental, active comparator, placebo comparater.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', + }, + description: { + type: GraphQLString, + description: + 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/researchstudyobjective.input.js b/src/resources/4_0_0/inputs/researchstudyobjective.input.js new file mode 100644 index 00000000..afd91fb9 --- /dev/null +++ b/src/resources/4_0_0/inputs/researchstudyobjective.input.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ResearchStudyobjective Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ResearchStudyobjective_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'Unique, human-readable label for this objective of the study.', + }, + name: { + type: GraphQLString, + description: + 'Unique, human-readable label for this objective of the study.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'The kind of study objective.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/researchsubject.input.js b/src/resources/4_0_0/inputs/researchsubject.input.js new file mode 100644 index 00000000..8f21348b --- /dev/null +++ b/src/resources/4_0_0/inputs/researchsubject.input.js @@ -0,0 +1,135 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ResearchSubject Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ResearchSubject_Input', + description: + 'A physical entity which is the primary unit of operational and/or administrative interest in a study.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchSubject_Enum_input', + values: { ResearchSubject: { value: 'ResearchSubject' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Identifiers assigned to this research subject for a study.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of the subject.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the subject.', + }, + period: { + type: require('./period.input.js'), + description: + 'The dates the subject began and ended their participation in the study.', + }, + study: { + type: new GraphQLNonNull(GraphQLString), + description: 'Reference to the study the subject is participating in.', + }, + individual: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The record of the person or animal who is involved in the study.', + }, + _assignedArm: { + type: require('./element.input.js'), + description: + 'The name of the arm in the study the subject is expected to follow as part of this study.', + }, + assignedArm: { + type: GraphQLString, + description: + 'The name of the arm in the study the subject is expected to follow as part of this study.', + }, + _actualArm: { + type: require('./element.input.js'), + description: + 'The name of the arm in the study the subject actually followed as part of this study.', + }, + actualArm: { + type: GraphQLString, + description: + 'The name of the arm in the study the subject actually followed as part of this study.', + }, + consent: { + type: GraphQLString, + description: + "A record of the patient's informed agreement to participate in the study.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/resource.input.js b/src/resources/4_0_0/inputs/resource.input.js new file mode 100644 index 00000000..6d7e9b79 --- /dev/null +++ b/src/resources/4_0_0/inputs/resource.input.js @@ -0,0 +1,61 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Resource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Resource_Input', + description: 'This is the base resource type for everything.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Resource_Enum_input', + values: { Resource: { value: 'Resource' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/riskassessment.input.js b/src/resources/4_0_0/inputs/riskassessment.input.js new file mode 100644 index 00000000..6c652522 --- /dev/null +++ b/src/resources/4_0_0/inputs/riskassessment.input.js @@ -0,0 +1,183 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary RiskAssessment Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RiskAssessment_Input', + description: + 'An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RiskAssessment_Enum_input', + values: { RiskAssessment: { value: 'RiskAssessment' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Business identifier assigned to the risk assessment.', + }, + basedOn: { + type: GraphQLString, + description: + 'A reference to the request that is fulfilled by this risk assessment.', + }, + parent: { + type: GraphQLString, + description: + 'A reference to a resource that this risk assessment is part of, such as a Procedure.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of the RiskAssessment, using the same statuses as an Observation.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the RiskAssessment, using the same statuses as an Observation.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'The algorithm, process or mechanism used to evaluate the risk.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The type of the risk assessment performed.', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: 'The patient or group the risk assessment applies to.', + }, + encounter: { + type: GraphQLString, + description: 'The encounter where the assessment was performed.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + condition: { + type: GraphQLString, + description: + 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', + }, + performer: { + type: GraphQLString, + description: + 'The provider or software application that performed the assessment.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason the risk assessment was performed.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Resources supporting the reason the risk assessment was performed.', + }, + basis: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).', + }, + prediction: { + type: new GraphQLList(require('./riskassessmentprediction.input.js')), + description: 'Describes the expected outcome for the subject.', + }, + _mitigation: { + type: require('./element.input.js'), + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + mitigation: { + type: GraphQLString, + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: 'Additional comments about the risk assessment.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/riskassessmentprediction.input.js b/src/resources/4_0_0/inputs/riskassessmentprediction.input.js new file mode 100644 index 00000000..b2a9eb98 --- /dev/null +++ b/src/resources/4_0_0/inputs/riskassessmentprediction.input.js @@ -0,0 +1,92 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskAssessmentprediction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RiskAssessmentprediction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + outcome: { + type: require('./codeableconcept.input.js'), + description: + 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', + }, + _probabilityDecimal: { + type: require('./element.input.js'), + description: + 'Indicates how likely the outcome is (in the specified timeframe).', + }, + probabilityDecimal: { + type: GraphQLFloat, + description: + 'Indicates how likely the outcome is (in the specified timeframe).', + }, + probabilityRange: { + type: require('./range.input.js'), + description: + 'Indicates how likely the outcome is (in the specified timeframe).', + }, + qualitativeRisk: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).', + }, + _relativeRisk: { + type: require('./element.input.js'), + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + relativeRisk: { + type: GraphQLFloat, + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + whenPeriod: { + type: require('./period.input.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + whenRange: { + type: require('./range.input.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + _rationale: { + type: require('./element.input.js'), + description: + 'Additional information explaining the basis for the prediction.', + }, + rationale: { + type: GraphQLString, + description: + 'Additional information explaining the basis for the prediction.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/riskevidencesynthesis.input.js b/src/resources/4_0_0/inputs/riskevidencesynthesis.input.js new file mode 100644 index 00000000..38cfbe38 --- /dev/null +++ b/src/resources/4_0_0/inputs/riskevidencesynthesis.input.js @@ -0,0 +1,294 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary RiskEvidenceSynthesis Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RiskEvidenceSynthesis_Input', + description: + 'The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RiskEvidenceSynthesis_Enum_input', + values: { RiskEvidenceSynthesis: { value: 'RiskEvidenceSynthesis' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this risk evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this risk evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the risk evidence synthesis is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this risk evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this risk evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the risk evidence synthesis is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this risk evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the risk evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the risk evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the risk evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the risk evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the risk evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the risk evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the risk evidence synthesis.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the risk evidence synthesis.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this risk evidence synthesis. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this risk evidence synthesis. Enables tracking the life-cycle of the content.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the risk evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the risk evidence synthesis changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the risk evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the risk evidence synthesis changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the risk evidence synthesis.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the risk evidence synthesis.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the risk evidence synthesis from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the risk evidence synthesis from a consumer's perspective.", + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate risk evidence synthesis instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the risk evidence synthesis is intended to be used.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the risk evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the risk evidence synthesis.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the risk evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the risk evidence synthesis.', + }, + _approvalDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.input.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.input.js'), + description: + 'The period during which the risk evidence synthesis content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Descriptive topics related to the content of the RiskEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.input.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + synthesisType: { + type: require('./codeableconcept.input.js'), + description: 'Type of synthesis eg meta-analysis.', + }, + studyType: { + type: require('./codeableconcept.input.js'), + description: 'Type of study eg randomized trial.', + }, + population: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + }, + exposure: { + type: GraphQLString, + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + }, + outcome: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + }, + sampleSize: { + type: require('./riskevidencesynthesissamplesize.input.js'), + description: + 'A description of the size of the sample involved in the synthesis.', + }, + riskEstimate: { + type: require('./riskevidencesynthesisriskestimate.input.js'), + description: 'The estimated risk of the outcome.', + }, + certainty: { + type: new GraphQLList( + require('./riskevidencesynthesiscertainty.input.js'), + ), + description: 'A description of the certainty of the risk estimate.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/riskevidencesynthesiscertainty.input.js b/src/resources/4_0_0/inputs/riskevidencesynthesiscertainty.input.js new file mode 100644 index 00000000..7ef6562f --- /dev/null +++ b/src/resources/4_0_0/inputs/riskevidencesynthesiscertainty.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesiscertainty Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RiskEvidenceSynthesiscertainty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + rating: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A rating of the certainty of the effect estimate.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + certaintySubcomponent: { + type: new GraphQLList( + require('./riskevidencesynthesiscertaintycertaintysubcomponent.input.js'), + ), + description: 'A description of a component of the overall certainty.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/riskevidencesynthesiscertaintycertaintysubcomponent.input.js b/src/resources/4_0_0/inputs/riskevidencesynthesiscertaintycertaintysubcomponent.input.js new file mode 100644 index 00000000..a0604db4 --- /dev/null +++ b/src/resources/4_0_0/inputs/riskevidencesynthesiscertaintycertaintysubcomponent.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesiscertaintycertaintySubcomponent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RiskEvidenceSynthesiscertaintycertaintySubcomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Type of subcomponent of certainty rating.', + }, + rating: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'A rating of a subcomponent of rating certainty.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/riskevidencesynthesisriskestimate.input.js b/src/resources/4_0_0/inputs/riskevidencesynthesisriskestimate.input.js new file mode 100644 index 00000000..3fa676bb --- /dev/null +++ b/src/resources/4_0_0/inputs/riskevidencesynthesisriskestimate.input.js @@ -0,0 +1,87 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesisriskEstimate Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RiskEvidenceSynthesisriskEstimate_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Human-readable summary of risk estimate.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of risk estimate.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Examples include proportion and mean.', + }, + _value: { + type: require('./element.input.js'), + description: 'The point estimate of the risk estimate.', + }, + value: { + type: GraphQLFloat, + description: 'The point estimate of the risk estimate.', + }, + unitOfMeasure: { + type: require('./codeableconcept.input.js'), + description: 'Specifies the UCUM unit for the outcome.', + }, + _denominatorCount: { + type: require('./element.input.js'), + description: + 'The sample size for the group that was measured for this risk estimate.', + }, + denominatorCount: { + type: GraphQLInt, + description: + 'The sample size for the group that was measured for this risk estimate.', + }, + _numeratorCount: { + type: require('./element.input.js'), + description: 'The number of group members with the outcome of interest.', + }, + numeratorCount: { + type: GraphQLInt, + description: 'The number of group members with the outcome of interest.', + }, + precisionEstimate: { + type: new GraphQLList( + require('./riskevidencesynthesisriskestimateprecisionestimate.input.js'), + ), + description: + 'A description of the precision of the estimate for the effect.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/riskevidencesynthesisriskestimateprecisionestimate.input.js b/src/resources/4_0_0/inputs/riskevidencesynthesisriskestimateprecisionestimate.input.js new file mode 100644 index 00000000..0d0fd646 --- /dev/null +++ b/src/resources/4_0_0/inputs/riskevidencesynthesisriskestimateprecisionestimate.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesisriskEstimateprecisionEstimate Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RiskEvidenceSynthesisriskEstimateprecisionEstimate_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Examples include confidence interval and interquartile range.', + }, + _level: { + type: require('./element.input.js'), + description: 'Use 95 for a 95% confidence interval.', + }, + level: { + type: GraphQLFloat, + description: 'Use 95 for a 95% confidence interval.', + }, + _from: { + type: require('./element.input.js'), + description: 'Lower bound of confidence interval.', + }, + from: { + type: GraphQLFloat, + description: 'Lower bound of confidence interval.', + }, + _to: { + type: require('./element.input.js'), + description: 'Upper bound of confidence interval.', + }, + to: { + type: GraphQLFloat, + description: 'Upper bound of confidence interval.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/riskevidencesynthesissamplesize.input.js b/src/resources/4_0_0/inputs/riskevidencesynthesissamplesize.input.js new file mode 100644 index 00000000..e0589d6b --- /dev/null +++ b/src/resources/4_0_0/inputs/riskevidencesynthesissamplesize.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesissampleSize Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'RiskEvidenceSynthesissampleSize_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Human-readable summary of sample size.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of sample size.', + }, + _numberOfStudies: { + type: require('./element.input.js'), + description: 'Number of studies included in this evidence synthesis.', + }, + numberOfStudies: { + type: GraphQLInt, + description: 'Number of studies included in this evidence synthesis.', + }, + _numberOfParticipants: { + type: require('./element.input.js'), + description: + 'Number of participants included in this evidence synthesis.', + }, + numberOfParticipants: { + type: GraphQLInt, + description: + 'Number of participants included in this evidence synthesis.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/sampleddata.input.js b/src/resources/4_0_0/inputs/sampleddata.input.js new file mode 100644 index 00000000..24e9e886 --- /dev/null +++ b/src/resources/4_0_0/inputs/sampleddata.input.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary SampledData Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SampledData_Input', + description: + 'Base StructureDefinition for SampledData Type: A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + origin: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', + }, + _period: { + type: require('./element.input.js'), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + period: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + _factor: { + type: require('./element.input.js'), + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + factor: { + type: GraphQLFloat, + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + _lowerLimit: { + type: require('./element.input.js'), + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + lowerLimit: { + type: GraphQLFloat, + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + _upperLimit: { + type: require('./element.input.js'), + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + upperLimit: { + type: GraphQLFloat, + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + _dimensions: { + type: require('./element.input.js'), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + dimensions: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + _data: { + type: require('./element.input.js'), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + data: { + type: GraphQLString, + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/schedule.input.js b/src/resources/4_0_0/inputs/schedule.input.js new file mode 100644 index 00000000..1cdeb4c3 --- /dev/null +++ b/src/resources/4_0_0/inputs/schedule.input.js @@ -0,0 +1,134 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Schedule Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Schedule_Input', + description: + 'A container for slots of time that may be available for booking appointments.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Schedule_Enum_input', + values: { Schedule: { value: 'Schedule' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'External Ids for this item.', + }, + _active: { + type: require('./element.input.js'), + description: + 'Whether this schedule record is in active use or should not be used (such as was entered in error).', + }, + active: { + type: GraphQLBoolean, + description: + 'Whether this schedule record is in active use or should not be used (such as was entered in error).', + }, + serviceCategory: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A broad categorization of the service that is to be performed during this appointment.', + }, + serviceType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specific service that is to be performed during this appointment.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + actor: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: + 'Slots that reference this schedule resource provide the availability details to these referenced resource(s).', + }, + planningHorizon: { + type: require('./period.input.js'), + description: + "The period of time that the slots that reference this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/searchparameter.input.js b/src/resources/4_0_0/inputs/searchparameter.input.js new file mode 100644 index 00000000..72e7f243 --- /dev/null +++ b/src/resources/4_0_0/inputs/searchparameter.input.js @@ -0,0 +1,318 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SearchParameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SearchParameter_Input', + description: + 'A search parameter that defines a named search item that can be used to search/filter on a resource.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SearchParameter_Enum_input', + values: { SearchParameter: { value: 'SearchParameter' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _derivedFrom: { + type: require('./element.input.js'), + description: + 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', + }, + derivedFrom: { + type: CanonicalScalar, + description: + 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this search parameter. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this search parameter. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the search parameter was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the search parameter was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the search parameter.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the search parameter.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: 'And how it used.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: 'And how it used.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate search parameter instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the search parameter is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this search parameter is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this search parameter is needed and why it has been designed as it has.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + _base: { + type: require('./element.input.js'), + description: + 'The base resource type(s) that this search parameter can be used against.', + }, + base: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'The base resource type(s) that this search parameter can be used against.', + }, + _type: { + type: require('./element.input.js'), + description: + 'The type of value that a search parameter may contain, and how the content is interpreted.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value that a search parameter may contain, and how the content is interpreted.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'A FHIRPath expression that returns a set of elements for the search parameter.', + }, + expression: { + type: GraphQLString, + description: + 'A FHIRPath expression that returns a set of elements for the search parameter.', + }, + _xpath: { + type: require('./element.input.js'), + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + _xpathUsage: { + type: require('./element.input.js'), + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + xpathUsage: { + type: CodeScalar, + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + _target: { + type: require('./element.input.js'), + description: 'Types of resource (if a resource is referenced).', + }, + target: { + type: new GraphQLList(CodeScalar), + description: 'Types of resource (if a resource is referenced).', + }, + _multipleOr: { + type: require('./element.input.js'), + description: + 'Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.', + }, + multipleOr: { + type: GraphQLBoolean, + description: + 'Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.', + }, + _multipleAnd: { + type: require('./element.input.js'), + description: + 'Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.', + }, + multipleAnd: { + type: GraphQLBoolean, + description: + 'Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.', + }, + _comparator: { + type: require('./element.input.js'), + description: 'Comparators supported for the search parameter.', + }, + comparator: { + type: new GraphQLList(CodeScalar), + description: 'Comparators supported for the search parameter.', + }, + _modifier: { + type: require('./element.input.js'), + description: 'A modifier supported for the search parameter.', + }, + modifier: { + type: new GraphQLList(CodeScalar), + description: 'A modifier supported for the search parameter.', + }, + _chain: { + type: require('./element.input.js'), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', + }, + chain: { + type: new GraphQLList(GraphQLString), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', + }, + component: { + type: new GraphQLList(require('./searchparametercomponent.input.js')), + description: 'Used to define the parts of a composite search parameter.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/searchparametercomponent.input.js b/src/resources/4_0_0/inputs/searchparametercomponent.input.js new file mode 100644 index 00000000..45f87812 --- /dev/null +++ b/src/resources/4_0_0/inputs/searchparametercomponent.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary SearchParametercomponent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SearchParametercomponent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _definition: { + type: require('./element.input.js'), + description: + 'The definition of the search parameter that describes this part.', + }, + definition: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'The definition of the search parameter that describes this part.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', + }, + expression: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/servicerequest.input.js b/src/resources/4_0_0/inputs/servicerequest.input.js new file mode 100644 index 00000000..e9aa1901 --- /dev/null +++ b/src/resources/4_0_0/inputs/servicerequest.input.js @@ -0,0 +1,316 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ServiceRequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ServiceRequest_Input', + description: + 'A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ServiceRequest_Enum_input', + values: { ServiceRequest: { value: 'ServiceRequest' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: 'Plan/proposal/order fulfilled by this request.', + }, + replaces: { + type: new GraphQLList(GraphQLString), + description: + 'The request takes the place of the referenced completed or terminated request(s).', + }, + requisition: { + type: require('./identifier.input.js'), + description: + 'A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the order.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the order.', + }, + _intent: { + type: require('./element.input.js'), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + "A code that classifies the service for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the ServiceRequest should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the ServiceRequest should be addressed with respect to other requests.', + }, + _doNotPerform: { + type: require('./element.input.js'), + description: + 'Set this to true if the record is saying that the service/procedure should NOT be performed.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the service/procedure should NOT be performed.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.', + }, + orderDetail: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Additional details and instructions about the how the services are to be delivered. For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied.', + }, + quantityQuantity: { + type: require('./quantity.input.js'), + description: + 'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).', + }, + quantityRatio: { + type: require('./ratio.input.js'), + description: + 'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).', + }, + quantityRange: { + type: require('./range.input.js'), + description: + 'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).', + }, + subject: { + type: new GraphQLNonNull(GraphQLString), + description: + 'On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + }, + encounter: { + type: GraphQLString, + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'The date/time at which the requested service should occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The date/time at which the requested service should occur.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'The date/time at which the requested service should occur.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: 'The date/time at which the requested service should occur.', + }, + _asNeededBoolean: { + type: require('./element.input.js'), + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example 'pain', 'on flare-up', etc.", + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example 'pain', 'on flare-up', etc.", + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example 'pain', 'on flare-up', etc.", + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'When the request transitioned to being actionable.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request transitioned to being actionable.', + }, + requester: { + type: GraphQLString, + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + performerType: { + type: require('./codeableconcept.input.js'), + description: 'Desired type of performer for doing the requested service.', + }, + performer: { + type: new GraphQLList(GraphQLString), + description: + 'The desired performer for doing the requested service. For example, the surgeon, dermatopathologist, endoscopist, etc.', + }, + locationCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.', + }, + locationReference: { + type: new GraphQLList(GraphQLString), + description: + 'A reference to the the preferred location(s) where the procedure should actually happen. E.g. at home or nursing day care center.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'An explanation or justification for why this service is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in `supportingInfo`.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates another resource that provides a justification for why this service is being requested. May relate to the resources referred to in `supportingInfo`.', + }, + insurance: { + type: new GraphQLList(GraphQLString), + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.', + }, + supportingInfo: { + type: new GraphQLList(GraphQLString), + description: + "Additional clinical information about the patient or specimen that may influence the services or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", + }, + specimen: { + type: new GraphQLList(GraphQLString), + description: + 'One or more specimens that the laboratory procedure will use.', + }, + bodySite: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Anatomic location where the procedure should be performed. This is the target site.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Any other notes and comments made about the service request. For example, internal billing notes.', + }, + _patientInstruction: { + type: require('./element.input.js'), + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + patientInstruction: { + type: GraphQLString, + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + relevantHistory: { + type: new GraphQLList(GraphQLString), + description: 'Key events in the history of the request.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/signature.input.js b/src/resources/4_0_0/inputs/signature.input.js new file mode 100644 index 00000000..052fa15f --- /dev/null +++ b/src/resources/4_0_0/inputs/signature.input.js @@ -0,0 +1,89 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary Signature Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Signature_Input', + description: + 'Base StructureDefinition for Signature Type: A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + type: { + type: new GraphQLList(new GraphQLNonNull(require('./coding.input.js'))), + description: + 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', + }, + _when: { + type: require('./element.input.js'), + description: 'When the digital signature was signed.', + }, + when: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the digital signature was signed.', + }, + who: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + }, + _targetFormat: { + type: require('./element.input.js'), + description: + 'A mime type that indicates the technical format of the target resources signed by the signature.', + }, + targetFormat: { + type: CodeScalar, + description: + 'A mime type that indicates the technical format of the target resources signed by the signature.', + }, + _sigFormat: { + type: require('./element.input.js'), + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.', + }, + sigFormat: { + type: CodeScalar, + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.', + }, + _data: { + type: require('./element.input.js'), + description: + 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', + }, + data: { + type: Base64BinaryScalar, + description: + 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/simplequantity.input.js b/src/resources/4_0_0/inputs/simplequantity.input.js new file mode 100644 index 00000000..844250ef --- /dev/null +++ b/src/resources/4_0_0/inputs/simplequantity.input.js @@ -0,0 +1,11 @@ +const { GraphQLInputObjectType } = require('graphql'); + +/** + * @name exports + * @summary SimpleQuantity Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SimpleQuantity_Input', + description: 'A fixed quantity (no comparator)', + fields: () => ({}), +}); diff --git a/src/resources/4_0_0/inputs/slot.input.js b/src/resources/4_0_0/inputs/slot.input.js new file mode 100644 index 00000000..dd9b0154 --- /dev/null +++ b/src/resources/4_0_0/inputs/slot.input.js @@ -0,0 +1,161 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Slot Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Slot_Input', + description: + 'A slot of time on a schedule that may be available for booking appointments.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Slot_Enum_input', + values: { Slot: { value: 'Slot' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'External Ids for this item.', + }, + serviceCategory: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A broad categorization of the service that is to be performed during this appointment.', + }, + serviceType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + appointmentType: { + type: require('./codeableconcept.input.js'), + description: + 'The style of appointment or patient that may be booked in the slot (not service type).', + }, + schedule: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The schedule resource that this slot defines an interval of status information.', + }, + _status: { + type: require('./element.input.js'), + description: + 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', + }, + _start: { + type: require('./element.input.js'), + description: 'Date/Time that the slot is to begin.', + }, + start: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to begin.', + }, + _end: { + type: require('./element.input.js'), + description: 'Date/Time that the slot is to conclude.', + }, + end: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to conclude.', + }, + _overbooked: { + type: require('./element.input.js'), + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + overbooked: { + type: GraphQLBoolean, + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimen.input.js b/src/resources/4_0_0/inputs/specimen.input.js new file mode 100644 index 00000000..20c1832d --- /dev/null +++ b/src/resources/4_0_0/inputs/specimen.input.js @@ -0,0 +1,152 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Specimen Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Specimen_Input', + description: 'A sample to be used for analysis.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Specimen_Enum_input', + values: { Specimen: { value: 'Specimen' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Id for specimen.', + }, + accessionIdentifier: { + type: require('./identifier.input.js'), + description: + 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', + }, + _status: { + type: require('./element.input.js'), + description: 'The availability of the specimen.', + }, + status: { + type: CodeScalar, + description: 'The availability of the specimen.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'The kind of material that forms the specimen.', + }, + subject: { + type: GraphQLString, + description: + 'Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device.', + }, + _receivedTime: { + type: require('./element.input.js'), + description: 'Time when specimen was received for processing or testing.', + }, + receivedTime: { + type: DateTimeScalar, + description: 'Time when specimen was received for processing or testing.', + }, + parent: { + type: new GraphQLList(GraphQLString), + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + }, + request: { + type: new GraphQLList(GraphQLString), + description: + 'Details concerning a service request that required a specimen to be collected.', + }, + collection: { + type: require('./specimencollection.input.js'), + description: 'Details concerning the specimen collection.', + }, + processing: { + type: new GraphQLList(require('./specimenprocessing.input.js')), + description: + 'Details concerning processing and processing steps for the specimen.', + }, + container: { + type: new GraphQLList(require('./specimencontainer.input.js')), + description: + 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', + }, + condition: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A mode or state of being that describes the nature of the specimen.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimencollection.input.js b/src/resources/4_0_0/inputs/specimencollection.input.js new file mode 100644 index 00000000..8b8dd82f --- /dev/null +++ b/src/resources/4_0_0/inputs/specimencollection.input.js @@ -0,0 +1,86 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Specimencollection Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Specimencollection_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + collector: { + type: GraphQLString, + description: 'Person who collected the specimen.', + }, + _collectedDateTime: { + type: require('./element.input.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedDateTime: { + type: DateTimeScalar, + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedPeriod: { + type: require('./period.input.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + duration: { + type: require('./duration.input.js'), + description: + 'The span of time over which the collection of a specimen occurred.', + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', + }, + method: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value specifying the technique that is used to perform the procedure.', + }, + bodySite: { + type: require('./codeableconcept.input.js'), + description: + 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', + }, + fastingStatusCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.', + }, + fastingStatusDuration: { + type: require('./duration.input.js'), + description: + 'Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimencontainer.input.js b/src/resources/4_0_0/inputs/specimencontainer.input.js new file mode 100644 index 00000000..36f0fc67 --- /dev/null +++ b/src/resources/4_0_0/inputs/specimencontainer.input.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Specimencontainer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Specimencontainer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", + }, + _description: { + type: require('./element.input.js'), + description: 'Textual description of the container.', + }, + description: { + type: GraphQLString, + description: 'Textual description of the container.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', + }, + capacity: { + type: require('./quantity.input.js'), + description: + 'The capacity (volume or other measure) the container may contain.', + }, + specimenQuantity: { + type: require('./quantity.input.js'), + description: + 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', + }, + additiveCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + additiveReference: { + type: GraphQLString, + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimendefinition.input.js b/src/resources/4_0_0/inputs/specimendefinition.input.js new file mode 100644 index 00000000..f3a929b1 --- /dev/null +++ b/src/resources/4_0_0/inputs/specimendefinition.input.js @@ -0,0 +1,113 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SpecimenDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SpecimenDefinition_Input', + description: 'A kind of specimen with associated set of requirements.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SpecimenDefinition_Enum_input', + values: { SpecimenDefinition: { value: 'SpecimenDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A business identifier associated with the kind of specimen.', + }, + typeCollected: { + type: require('./codeableconcept.input.js'), + description: 'The kind of material to be collected.', + }, + patientPreparation: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Preparation of the patient for specimen collection.', + }, + _timeAspect: { + type: require('./element.input.js'), + description: 'Time aspect of specimen collection (duration or offset).', + }, + timeAspect: { + type: GraphQLString, + description: 'Time aspect of specimen collection (duration or offset).', + }, + collection: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The action to be performed for collecting the specimen.', + }, + typeTested: { + type: new GraphQLList(require('./specimendefinitiontypetested.input.js')), + description: + 'Specimen conditioned in a container as expected by the testing laboratory.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimendefinitiontypetested.input.js b/src/resources/4_0_0/inputs/specimendefinitiontypetested.input.js new file mode 100644 index 00000000..08458a09 --- /dev/null +++ b/src/resources/4_0_0/inputs/specimendefinitiontypetested.input.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SpecimenDefinitiontypeTested Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SpecimenDefinitiontypeTested_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _isDerived: { + type: require('./element.input.js'), + description: 'Primary of secondary specimen.', + }, + isDerived: { + type: GraphQLBoolean, + description: 'Primary of secondary specimen.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The kind of specimen conditioned for testing expected by lab.', + }, + _preference: { + type: require('./element.input.js'), + description: 'The preference for this type of conditioned specimen.', + }, + preference: { + type: new GraphQLNonNull(CodeScalar), + description: 'The preference for this type of conditioned specimen.', + }, + container: { + type: require('./specimendefinitiontypetestedcontainer.input.js'), + description: "The specimen's container.", + }, + _requirement: { + type: require('./element.input.js'), + description: + 'Requirements for delivery and special handling of this kind of conditioned specimen.', + }, + requirement: { + type: GraphQLString, + description: + 'Requirements for delivery and special handling of this kind of conditioned specimen.', + }, + retentionTime: { + type: require('./duration.input.js'), + description: + 'The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.', + }, + rejectionCriterion: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Criterion for rejection of the specimen in its container by the laboratory.', + }, + handling: { + type: new GraphQLList( + require('./specimendefinitiontypetestedhandling.input.js'), + ), + description: + 'Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimendefinitiontypetestedcontainer.input.js b/src/resources/4_0_0/inputs/specimendefinitiontypetestedcontainer.input.js new file mode 100644 index 00000000..ff60bae4 --- /dev/null +++ b/src/resources/4_0_0/inputs/specimendefinitiontypetestedcontainer.input.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SpecimenDefinitiontypeTestedcontainer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SpecimenDefinitiontypeTestedcontainer_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + material: { + type: require('./codeableconcept.input.js'), + description: 'The type of material of the container.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of container used to contain this kind of specimen.', + }, + cap: { + type: require('./codeableconcept.input.js'), + description: 'Color of container cap.', + }, + _description: { + type: require('./element.input.js'), + description: 'The textual description of the kind of container.', + }, + description: { + type: GraphQLString, + description: 'The textual description of the kind of container.', + }, + capacity: { + type: require('./quantity.input.js'), + description: + 'The capacity (volume or other measure) of this kind of container.', + }, + minimumVolumeQuantity: { + type: require('./quantity.input.js'), + description: 'The minimum volume to be conditioned in the container.', + }, + _minimumVolumeString: { + type: require('./element.input.js'), + description: 'The minimum volume to be conditioned in the container.', + }, + minimumVolumeString: { + type: GraphQLString, + description: 'The minimum volume to be conditioned in the container.', + }, + additive: { + type: new GraphQLList( + require('./specimendefinitiontypetestedcontaineradditive.input.js'), + ), + description: + 'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + _preparation: { + type: require('./element.input.js'), + description: + 'Special processing that should be applied to the container for this kind of specimen.', + }, + preparation: { + type: GraphQLString, + description: + 'Special processing that should be applied to the container for this kind of specimen.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimendefinitiontypetestedcontaineradditive.input.js b/src/resources/4_0_0/inputs/specimendefinitiontypetestedcontaineradditive.input.js new file mode 100644 index 00000000..2f8070cb --- /dev/null +++ b/src/resources/4_0_0/inputs/specimendefinitiontypetestedcontaineradditive.input.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SpecimenDefinitiontypeTestedcontaineradditive Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SpecimenDefinitiontypeTestedcontaineradditive_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + additiveCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + additiveReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimendefinitiontypetestedhandling.input.js b/src/resources/4_0_0/inputs/specimendefinitiontypetestedhandling.input.js new file mode 100644 index 00000000..d8ae585c --- /dev/null +++ b/src/resources/4_0_0/inputs/specimendefinitiontypetestedhandling.input.js @@ -0,0 +1,61 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SpecimenDefinitiontypeTestedhandling Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SpecimenDefinitiontypeTestedhandling_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + temperatureQualifier: { + type: require('./codeableconcept.input.js'), + description: + 'It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.', + }, + temperatureRange: { + type: require('./range.input.js'), + description: + 'The temperature interval for this set of handling instructions.', + }, + maxDuration: { + type: require('./duration.input.js'), + description: + 'The maximum time interval of preservation of the specimen with these conditions.', + }, + _instruction: { + type: require('./element.input.js'), + description: + "Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.", + }, + instruction: { + type: GraphQLString, + description: + "Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/specimenprocessing.input.js b/src/resources/4_0_0/inputs/specimenprocessing.input.js new file mode 100644 index 00000000..0334284b --- /dev/null +++ b/src/resources/4_0_0/inputs/specimenprocessing.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Specimenprocessing Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Specimenprocessing_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: 'Textual description of procedure.', + }, + description: { + type: GraphQLString, + description: 'Textual description of procedure.', + }, + procedure: { + type: require('./codeableconcept.input.js'), + description: + 'A coded value specifying the procedure used to process the specimen.', + }, + additive: { + type: new GraphQLList(GraphQLString), + description: 'Material used in the processing step.', + }, + _timeDateTime: { + type: require('./element.input.js'), + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + timeDateTime: { + type: DateTimeScalar, + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + timePeriod: { + type: require('./period.input.js'), + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuredefinition.input.js b/src/resources/4_0_0/inputs/structuredefinition.input.js new file mode 100644 index 00000000..6effbfa7 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuredefinition.input.js @@ -0,0 +1,309 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary StructureDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureDefinition_Input', + description: + 'A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureDefinition_Enum_input', + values: { StructureDefinition: { value: 'StructureDefinition' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the structure definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the structure definition.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this structure definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this structure definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the structure definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the structure definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the structure definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the structure definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the structure definition is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this structure definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this structure definition is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', + }, + keyword: { + type: new GraphQLList(require('./coding.input.js')), + description: + 'A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes.', + }, + _fhirVersion: { + type: require('./element.input.js'), + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.0. for this version.', + }, + fhirVersion: { + type: CodeScalar, + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.0. for this version.', + }, + mapping: { + type: new GraphQLList(require('./structuredefinitionmapping.input.js')), + description: 'An external specification that the content is mapped to.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'Defines the kind of structure that this definition is describing.', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines the kind of structure that this definition is describing.', + }, + _abstract: { + type: require('./element.input.js'), + description: + 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', + }, + abstract: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', + }, + context: { + type: new GraphQLList(require('./structuredefinitioncontext.input.js')), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + _contextInvariant: { + type: require('./element.input.js'), + description: + 'A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.', + }, + contextInvariant: { + type: new GraphQLList(GraphQLString), + description: + 'A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.', + }, + _type: { + type: require('./element.input.js'), + description: + "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + type: { + type: new GraphQLNonNull(UriScalar), + description: + "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + _baseDefinition: { + type: require('./element.input.js'), + description: + 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', + }, + baseDefinition: { + type: CanonicalScalar, + description: + 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', + }, + _derivation: { + type: require('./element.input.js'), + description: 'How the type relates to the baseDefinition.', + }, + derivation: { + type: CodeScalar, + description: 'How the type relates to the baseDefinition.', + }, + snapshot: { + type: require('./structuredefinitionsnapshot.input.js'), + description: + 'A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.', + }, + differential: { + type: require('./structuredefinitiondifferential.input.js'), + description: + 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuredefinitioncontext.input.js b/src/resources/4_0_0/inputs/structuredefinitioncontext.input.js new file mode 100644 index 00000000..a7fdbb0b --- /dev/null +++ b/src/resources/4_0_0/inputs/structuredefinitioncontext.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureDefinitioncontext Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureDefinitioncontext_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: + 'Defines how to interpret the expression that defines what the context of the extension is.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines how to interpret the expression that defines what the context of the extension is.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'An expression that defines where an extension can be used in resources.', + }, + expression: { + type: new GraphQLNonNull(GraphQLString), + description: + 'An expression that defines where an extension can be used in resources.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuredefinitiondifferential.input.js b/src/resources/4_0_0/inputs/structuredefinitiondifferential.input.js new file mode 100644 index 00000000..17af3e3f --- /dev/null +++ b/src/resources/4_0_0/inputs/structuredefinitiondifferential.input.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary StructureDefinitiondifferential Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureDefinitiondifferential_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.input.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuredefinitionmapping.input.js b/src/resources/4_0_0/inputs/structuredefinitionmapping.input.js new file mode 100644 index 00000000..347d5730 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuredefinitionmapping.input.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary StructureDefinitionmapping Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureDefinitionmapping_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _identity: { + type: require('./element.input.js'), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + _uri: { + type: require('./element.input.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.input.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comment: { + type: require('./element.input.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comment: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuredefinitionsnapshot.input.js b/src/resources/4_0_0/inputs/structuredefinitionsnapshot.input.js new file mode 100644 index 00000000..c0dfd399 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuredefinitionsnapshot.input.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary StructureDefinitionsnapshot Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureDefinitionsnapshot_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.input.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremap.input.js b/src/resources/4_0_0/inputs/structuremap.input.js new file mode 100644 index 00000000..a16a6e4d --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremap.input.js @@ -0,0 +1,237 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary StructureMap Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMap_Input', + description: + 'A Map of relationships between 2 structures that can be used to transform data.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureMap_Enum_input', + values: { StructureMap: { value: 'StructureMap' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the structure map.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the structure map.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this structure map. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this structure map. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the structure map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the structure map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the structure map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the structure map.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the structure map from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the structure map from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure map instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the structure map is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this structure map is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this structure map is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', + }, + structure: { + type: new GraphQLList(require('./structuremapstructure.input.js')), + description: + 'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.', + }, + _import: { + type: require('./element.input.js'), + description: 'Other maps used by this map (canonical URLs).', + }, + import: { + type: new GraphQLList(CanonicalScalar), + description: 'Other maps used by this map (canonical URLs).', + }, + group: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgroup.input.js')), + ), + description: + 'Organizes the mapping into manageable chunks for human review/ease of maintenance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremapgroup.input.js b/src/resources/4_0_0/inputs/structuremapgroup.input.js new file mode 100644 index 00000000..cb222241 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremapgroup.input.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroup Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMapgroup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'A unique name for the group for the convenience of human readers.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: + 'A unique name for the group for the convenience of human readers.', + }, + _extends: { + type: require('./element.input.js'), + description: 'Another group that this group adds rules to.', + }, + extends: { + type: IdScalar, + description: 'Another group that this group adds rules to.', + }, + _typeMode: { + type: require('./element.input.js'), + description: + 'If this is the default rule set to apply for the source type or this combination of types.', + }, + typeMode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'If this is the default rule set to apply for the source type or this combination of types.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', + }, + input: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgroupinput.input.js')), + ), + description: + 'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.', + }, + rule: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgrouprule.input.js')), + ), + description: 'Transform Rule from source to target.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremapgroupinput.input.js b/src/resources/4_0_0/inputs/structuremapgroupinput.input.js new file mode 100644 index 00000000..77c9d85d --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremapgroupinput.input.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroupinput Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMapgroupinput_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Name for this instance of data.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name for this instance of data.', + }, + _type: { + type: require('./element.input.js'), + description: 'Type for this instance of data.', + }, + type: { + type: GraphQLString, + description: 'Type for this instance of data.', + }, + _mode: { + type: require('./element.input.js'), + description: 'Mode for this instance of data.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'Mode for this instance of data.', + }, + _documentation: { + type: require('./element.input.js'), + description: 'Documentation for this instance of data.', + }, + documentation: { + type: GraphQLString, + description: 'Documentation for this instance of data.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremapgrouprule.input.js b/src/resources/4_0_0/inputs/structuremapgrouprule.input.js new file mode 100644 index 00000000..bcbf843c --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremapgrouprule.input.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary StructureMapgrouprule Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMapgrouprule_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Name of the rule for internal references.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name of the rule for internal references.', + }, + source: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgrouprulesource.input.js')), + ), + description: 'Source inputs to the mapping.', + }, + target: { + type: new GraphQLList(require('./structuremapgroupruletarget.input.js')), + description: 'Content to create because of this mapping rule.', + }, + dependent: { + type: new GraphQLList( + require('./structuremapgroupruledependent.input.js'), + ), + description: 'Which other rules to apply in the context of this rule.', + }, + _documentation: { + type: require('./element.input.js'), + description: 'Documentation for this instance of data.', + }, + documentation: { + type: GraphQLString, + description: 'Documentation for this instance of data.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremapgroupruledependent.input.js b/src/resources/4_0_0/inputs/structuremapgroupruledependent.input.js new file mode 100644 index 00000000..d835f779 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremapgroupruledependent.input.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroupruledependent Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMapgroupruledependent_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Name of a rule or group to apply.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name of a rule or group to apply.', + }, + _variable: { + type: require('./element.input.js'), + description: 'Variable to pass to the rule or group.', + }, + variable: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: 'Variable to pass to the rule or group.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremapgrouprulesource.input.js b/src/resources/4_0_0/inputs/structuremapgrouprulesource.input.js new file mode 100644 index 00000000..261269b3 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremapgrouprulesource.input.js @@ -0,0 +1,486 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLBoolean, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary StructureMapgrouprulesource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMapgrouprulesource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _context: { + type: require('./element.input.js'), + description: 'Type or variable this rule applies to.', + }, + context: { + type: new GraphQLNonNull(IdScalar), + description: 'Type or variable this rule applies to.', + }, + _min: { + type: require('./element.input.js'), + description: + 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', + }, + min: { + type: GraphQLInt, + description: + 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', + }, + _max: { + type: require('./element.input.js'), + description: + "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", + }, + max: { + type: GraphQLString, + description: + "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", + }, + _type: { + type: require('./element.input.js'), + description: + 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', + }, + type: { + type: GraphQLString, + description: + 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', + }, + _defaultValueBase64Binary: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueBoolean: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueCanonical: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCanonical: { + type: CanonicalScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueCode: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCode: { + type: CodeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDate: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDate: { + type: DateScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDateTime: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDecimal: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueId: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueId: { + type: IdScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueInstant: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueInstant: { + type: InstantScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueInteger: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueInteger: { + type: GraphQLInt, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueMarkdown: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueOid: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueOid: { + type: OidScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValuePositiveInt: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueString: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueString: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueTime: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTime: { + type: TimeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUnsignedInt: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUri: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUri: { + type: UriScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUrl: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUrl: { + type: UrlScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUuid: { + type: require('./element.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUuid: { + type: UuidScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAddress: { + type: require('./address.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAge: { + type: require('./age.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAnnotation: { + type: require('./annotation.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAttachment: { + type: require('./attachment.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCoding: { + type: require('./coding.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueContactPoint: { + type: require('./contactpoint.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCount: { + type: require('./count.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDistance: { + type: require('./distance.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDuration: { + type: require('./duration.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueHumanName: { + type: require('./humanname.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueIdentifier: { + type: require('./identifier.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMoney: { + type: require('./money.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValuePeriod: { + type: require('./period.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueQuantity: { + type: require('./quantity.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRange: { + type: require('./range.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRatio: { + type: require('./ratio.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueReference: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueSampledData: { + type: require('./sampleddata.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueSignature: { + type: require('./signature.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTiming: { + type: require('./timing.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueContactDetail: { + type: require('./contactdetail.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueContributor: { + type: require('./contributor.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDataRequirement: { + type: require('./datarequirement.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueExpression: { + type: require('./expression.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueParameterDefinition: { + type: require('./parameterdefinition.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRelatedArtifact: { + type: require('./relatedartifact.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTriggerDefinition: { + type: require('./triggerdefinition.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUsageContext: { + type: require('./usagecontext.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDosage: { + type: require('./dosage.input.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + _element: { + type: require('./element.input.js'), + description: 'Optional field for this source.', + }, + element: { + type: GraphQLString, + description: 'Optional field for this source.', + }, + _listMode: { + type: require('./element.input.js'), + description: 'How to handle the list mode for this element.', + }, + listMode: { + type: CodeScalar, + description: 'How to handle the list mode for this element.', + }, + _variable: { + type: require('./element.input.js'), + description: 'Named context for field, if a field is specified.', + }, + variable: { + type: IdScalar, + description: 'Named context for field, if a field is specified.', + }, + _condition: { + type: require('./element.input.js'), + description: + 'FHIRPath expression - must be true or the rule does not apply.', + }, + condition: { + type: GraphQLString, + description: + 'FHIRPath expression - must be true or the rule does not apply.', + }, + _check: { + type: require('./element.input.js'), + description: + 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', + }, + check: { + type: GraphQLString, + description: + 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', + }, + _logMessage: { + type: require('./element.input.js'), + description: + 'A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.', + }, + logMessage: { + type: GraphQLString, + description: + 'A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremapgroupruletarget.input.js b/src/resources/4_0_0/inputs/structuremapgroupruletarget.input.js new file mode 100644 index 00000000..0312aca1 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremapgroupruletarget.input.js @@ -0,0 +1,102 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroupruletarget Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMapgroupruletarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _context: { + type: require('./element.input.js'), + description: 'Type or variable this rule applies to.', + }, + context: { + type: IdScalar, + description: 'Type or variable this rule applies to.', + }, + _contextType: { + type: require('./element.input.js'), + description: 'How to interpret the context.', + }, + contextType: { + type: CodeScalar, + description: 'How to interpret the context.', + }, + _element: { + type: require('./element.input.js'), + description: 'Field to create in the context.', + }, + element: { + type: GraphQLString, + description: 'Field to create in the context.', + }, + _variable: { + type: require('./element.input.js'), + description: + 'Named context for field, if desired, and a field is specified.', + }, + variable: { + type: IdScalar, + description: + 'Named context for field, if desired, and a field is specified.', + }, + _listMode: { + type: require('./element.input.js'), + description: 'If field is a list, how to manage the list.', + }, + listMode: { + type: new GraphQLList(CodeScalar), + description: 'If field is a list, how to manage the list.', + }, + _listRuleId: { + type: require('./element.input.js'), + description: 'Internal rule reference for shared list items.', + }, + listRuleId: { + type: IdScalar, + description: 'Internal rule reference for shared list items.', + }, + _transform: { + type: require('./element.input.js'), + description: 'How the data is copied / created.', + }, + transform: { + type: CodeScalar, + description: 'How the data is copied / created.', + }, + parameter: { + type: new GraphQLList( + require('./structuremapgroupruletargetparameter.input.js'), + ), + description: 'Parameters to the transform.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremapgroupruletargetparameter.input.js b/src/resources/4_0_0/inputs/structuremapgroupruletargetparameter.input.js new file mode 100644 index 00000000..0185b321 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremapgroupruletargetparameter.input.js @@ -0,0 +1,81 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroupruletargetparameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMapgroupruletargetparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueId: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'Parameter value - variable or literal.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'Parameter value - variable or literal.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Parameter value - variable or literal.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'Parameter value - variable or literal.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'Parameter value - variable or literal.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'Parameter value - variable or literal.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/structuremapstructure.input.js b/src/resources/4_0_0/inputs/structuremapstructure.input.js new file mode 100644 index 00000000..94c858d5 --- /dev/null +++ b/src/resources/4_0_0/inputs/structuremapstructure.input.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureMapstructure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'StructureMapstructure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: 'The canonical reference to the structure.', + }, + url: { + type: new GraphQLNonNull(CanonicalScalar), + description: 'The canonical reference to the structure.', + }, + _mode: { + type: require('./element.input.js'), + description: 'How the referenced structure is used in this mapping.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the referenced structure is used in this mapping.', + }, + _alias: { + type: require('./element.input.js'), + description: 'The name used for this type in the map.', + }, + alias: { + type: GraphQLString, + description: 'The name used for this type in the map.', + }, + _documentation: { + type: require('./element.input.js'), + description: + 'Documentation that describes how the structure is used in the mapping.', + }, + documentation: { + type: GraphQLString, + description: + 'Documentation that describes how the structure is used in the mapping.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/subscription.input.js b/src/resources/4_0_0/inputs/subscription.input.js new file mode 100644 index 00000000..086f4817 --- /dev/null +++ b/src/resources/4_0_0/inputs/subscription.input.js @@ -0,0 +1,141 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Subscription Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Subscription_Input', + description: + "The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined 'channel' so that another system can take an appropriate action.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Subscription_Enum_input', + values: { Subscription: { value: 'Subscription' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.input.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + _end: { + type: require('./element.input.js'), + description: 'The time for the server to turn the subscription off.', + }, + end: { + type: InstantScalar, + description: 'The time for the server to turn the subscription off.', + }, + _reason: { + type: require('./element.input.js'), + description: 'A description of why this subscription is defined.', + }, + reason: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of why this subscription is defined.', + }, + _criteria: { + type: require('./element.input.js'), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + criteria: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + _error: { + type: require('./element.input.js'), + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + error: { + type: GraphQLString, + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + channel: { + type: new GraphQLNonNull(require('./subscriptionchannel.input.js')), + description: + 'Details where to send notifications when resources are received that meet the criteria.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/subscriptionchannel.input.js b/src/resources/4_0_0/inputs/subscriptionchannel.input.js new file mode 100644 index 00000000..626cb9ae --- /dev/null +++ b/src/resources/4_0_0/inputs/subscriptionchannel.input.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary Subscriptionchannel Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Subscriptionchannel_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'The type of channel to send notifications on.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of channel to send notifications on.', + }, + _endpoint: { + type: require('./element.input.js'), + description: + 'The url that describes the actual end-point to send messages to.', + }, + endpoint: { + type: UrlScalar, + description: + 'The url that describes the actual end-point to send messages to.', + }, + _payload: { + type: require('./element.input.js'), + description: + "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type 'text/plain' may also be used for Email and SMS subscriptions.", + }, + payload: { + type: CodeScalar, + description: + "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type 'text/plain' may also be used for Email and SMS subscriptions.", + }, + _header: { + type: require('./element.input.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: new GraphQLList(GraphQLString), + description: + 'Additional headers / information to send as part of the notification.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substance.input.js b/src/resources/4_0_0/inputs/substance.input.js new file mode 100644 index 00000000..46b85219 --- /dev/null +++ b/src/resources/4_0_0/inputs/substance.input.js @@ -0,0 +1,123 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Substance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Substance_Input', + description: 'A homogeneous material with a definite composition.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Substance_Enum_input', + values: { Substance: { value: 'Substance' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'Unique identifier for the substance.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code to indicate if the substance is actively used.', + }, + status: { + type: CodeScalar, + description: 'A code to indicate if the substance is actively used.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'A code (or set of codes) that identify this substance.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + description: { + type: GraphQLString, + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + instance: { + type: new GraphQLList(require('./substanceinstance.input.js')), + description: + 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', + }, + ingredient: { + type: new GraphQLList(require('./substanceingredient.input.js')), + description: 'A substance can be composed of other substances.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substanceamount.input.js b/src/resources/4_0_0/inputs/substanceamount.input.js new file mode 100644 index 00000000..dd5eedf9 --- /dev/null +++ b/src/resources/4_0_0/inputs/substanceamount.input.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceAmount Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceAmount_Input', + description: + 'Base StructureDefinition for SubstanceAmount Type: Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + amountQuantity: { + type: require('./quantity.input.js'), + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + amountRange: { + type: require('./range.input.js'), + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + _amountString: { + type: require('./element.input.js'), + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + amountString: { + type: GraphQLString, + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + amountType: { + type: require('./codeableconcept.input.js'), + description: + 'Most elements that require a quantitative value will also have a field called amount type. Amount type should always be specified because the actual value of the amount is often dependent on it. EXAMPLE: In capturing the actual relative amounts of substances or molecular fragments it is essential to indicate whether the amount refers to a mole ratio or weight ratio. For any given element an effort should be made to use same the amount type for all related definitional elements.', + }, + _amountText: { + type: require('./element.input.js'), + description: 'A textual comment on a numeric value.', + }, + amountText: { + type: GraphQLString, + description: 'A textual comment on a numeric value.', + }, + referenceRange: { + type: require('./element.input.js'), + description: 'Reference range of possible or expected values.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substanceamountreferencerange.input.js b/src/resources/4_0_0/inputs/substanceamountreferencerange.input.js new file mode 100644 index 00000000..7d81b442 --- /dev/null +++ b/src/resources/4_0_0/inputs/substanceamountreferencerange.input.js @@ -0,0 +1,39 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceAmountreferenceRange Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceAmountreferenceRange_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + lowLimit: { + type: require('./quantity.input.js'), + description: 'Lower limit possible or expected.', + }, + highLimit: { + type: require('./quantity.input.js'), + description: 'Upper limit possible or expected.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substanceingredient.input.js b/src/resources/4_0_0/inputs/substanceingredient.input.js new file mode 100644 index 00000000..3d2f8a46 --- /dev/null +++ b/src/resources/4_0_0/inputs/substanceingredient.input.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Substanceingredient Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Substanceingredient_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + quantity: { + type: require('./ratio.input.js'), + description: + 'The amount of the ingredient in the substance - a concentration ratio.', + }, + substanceCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'Another substance that is a component of this substance.', + }, + substanceReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'Another substance that is a component of this substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substanceinstance.input.js b/src/resources/4_0_0/inputs/substanceinstance.input.js new file mode 100644 index 00000000..b8aff92b --- /dev/null +++ b/src/resources/4_0_0/inputs/substanceinstance.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Substanceinstance Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Substanceinstance_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Identifier associated with the package/container (usually a label affixed directly).', + }, + _expiry: { + type: require('./element.input.js'), + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + expiry: { + type: DateTimeScalar, + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + quantity: { + type: require('./quantity.input.js'), + description: 'The amount of the substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancenucleicacid.input.js b/src/resources/4_0_0/inputs/substancenucleicacid.input.js new file mode 100644 index 00000000..d786d0c8 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancenucleicacid.input.js @@ -0,0 +1,119 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceNucleicAcid Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceNucleicAcid_Input', + description: + 'Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceNucleicAcid_Enum_input', + values: { SubstanceNucleicAcid: { value: 'SubstanceNucleicAcid' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + sequenceType: { + type: require('./codeableconcept.input.js'), + description: + 'The type of the sequence shall be specified based on a controlled vocabulary.', + }, + _numberOfSubunits: { + type: require('./element.input.js'), + description: + 'The number of linear sequences of nucleotides linked through phosphodiester bonds shall be described. Subunits would be strands of nucleic acids that are tightly associated typically through Watson-Crick base pairing. NOTE: If not specified in the reference source, the assumption is that there is 1 subunit.', + }, + numberOfSubunits: { + type: GraphQLInt, + description: + 'The number of linear sequences of nucleotides linked through phosphodiester bonds shall be described. Subunits would be strands of nucleic acids that are tightly associated typically through Watson-Crick base pairing. NOTE: If not specified in the reference source, the assumption is that there is 1 subunit.', + }, + _areaOfHybridisation: { + type: require('./element.input.js'), + description: + 'The area of hybridisation shall be described if applicable for double stranded RNA or DNA. The number associated with the subunit followed by the number associated to the residue shall be specified in increasing order. The underscore “” shall be used as separator as follows: “Subunitnumber Residue”.', + }, + areaOfHybridisation: { + type: GraphQLString, + description: + 'The area of hybridisation shall be described if applicable for double stranded RNA or DNA. The number associated with the subunit followed by the number associated to the residue shall be specified in increasing order. The underscore “” shall be used as separator as follows: “Subunitnumber Residue”.', + }, + oligoNucleotideType: { + type: require('./codeableconcept.input.js'), + description: '(TBC).', + }, + subunit: { + type: new GraphQLList(require('./substancenucleicacidsubunit.input.js')), + description: + 'Subunits are listed in order of decreasing length; sequences of the same length will be ordered by molecular weight; subunits that have identical sequences will be repeated multiple times.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancenucleicacidsubunit.input.js b/src/resources/4_0_0/inputs/substancenucleicacidsubunit.input.js new file mode 100644 index 00000000..19a47aa3 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancenucleicacidsubunit.input.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceNucleicAcidsubunit Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceNucleicAcidsubunit_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _subunit: { + type: require('./element.input.js'), + description: + 'Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.', + }, + subunit: { + type: GraphQLInt, + description: + 'Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.', + }, + _sequence: { + type: require('./element.input.js'), + description: + "Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured.", + }, + sequence: { + type: GraphQLString, + description: + "Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured.", + }, + _length: { + type: require('./element.input.js'), + description: 'The length of the sequence shall be captured.', + }, + length: { + type: GraphQLInt, + description: 'The length of the sequence shall be captured.', + }, + sequenceAttachment: { + type: require('./attachment.input.js'), + description: '(TBC).', + }, + fivePrime: { + type: require('./codeableconcept.input.js'), + description: + "The nucleotide present at the 5’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the first position in the sequence. A separate representation would be redundant.", + }, + threePrime: { + type: require('./codeableconcept.input.js'), + description: + "The nucleotide present at the 3’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the last position in the sequence. A separate representation would be redundant.", + }, + linkage: { + type: new GraphQLList( + require('./substancenucleicacidsubunitlinkage.input.js'), + ), + description: 'The linkages between sugar residues will also be captured.', + }, + sugar: { + type: new GraphQLList( + require('./substancenucleicacidsubunitsugar.input.js'), + ), + description: '5.3.6.8.1 Sugar ID (Mandatory).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancenucleicacidsubunitlinkage.input.js b/src/resources/4_0_0/inputs/substancenucleicacidsubunitlinkage.input.js new file mode 100644 index 00000000..b9943068 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancenucleicacidsubunitlinkage.input.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceNucleicAcidsubunitlinkage Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceNucleicAcidsubunitlinkage_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _connectivity: { + type: require('./element.input.js'), + description: + 'The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be specified.', + }, + connectivity: { + type: GraphQLString, + description: + 'The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be specified.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Each linkage will be registered as a fragment and have an ID.', + }, + _name: { + type: require('./element.input.js'), + description: + 'Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage.', + }, + name: { + type: GraphQLString, + description: + 'Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage.', + }, + _residueSite: { + type: require('./element.input.js'), + description: 'Residues shall be captured as described in 5.3.6.8.3.', + }, + residueSite: { + type: GraphQLString, + description: 'Residues shall be captured as described in 5.3.6.8.3.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancenucleicacidsubunitsugar.input.js b/src/resources/4_0_0/inputs/substancenucleicacidsubunitsugar.input.js new file mode 100644 index 00000000..a0a10a53 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancenucleicacidsubunitsugar.input.js @@ -0,0 +1,61 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceNucleicAcidsubunitsugar Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceNucleicAcidsubunitsugar_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'The Substance ID of the sugar or sugar-like component that make up the nucleotide.', + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of the sugar or sugar-like component that make up the nucleotide.', + }, + name: { + type: GraphQLString, + description: + 'The name of the sugar or sugar-like component that make up the nucleotide.', + }, + _residueSite: { + type: require('./element.input.js'), + description: + 'The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5‘-3‘direction consistent with the base sequences listed above.', + }, + residueSite: { + type: GraphQLString, + description: + 'The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5‘-3‘direction consistent with the base sequences listed above.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancepolymer.input.js b/src/resources/4_0_0/inputs/substancepolymer.input.js new file mode 100644 index 00000000..e2cb4b00 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancepolymer.input.js @@ -0,0 +1,111 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstancePolymer Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstancePolymer_Input', + description: 'Todo.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstancePolymer_Enum_input', + values: { SubstancePolymer: { value: 'SubstancePolymer' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + class: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + geometry: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + copolymerConnectivity: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Todo.', + }, + _modification: { + type: require('./element.input.js'), + description: 'Todo.', + }, + modification: { + type: new GraphQLList(GraphQLString), + description: 'Todo.', + }, + monomerSet: { + type: new GraphQLList(require('./substancepolymermonomerset.input.js')), + description: 'Todo.', + }, + repeat: { + type: new GraphQLList(require('./substancepolymerrepeat.input.js')), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancepolymermonomerset.input.js b/src/resources/4_0_0/inputs/substancepolymermonomerset.input.js new file mode 100644 index 00000000..898001cc --- /dev/null +++ b/src/resources/4_0_0/inputs/substancepolymermonomerset.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymermonomerSet Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstancePolymermonomerSet_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + ratioType: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + startingMaterial: { + type: new GraphQLList( + require('./substancepolymermonomersetstartingmaterial.input.js'), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancepolymermonomersetstartingmaterial.input.js b/src/resources/4_0_0/inputs/substancepolymermonomersetstartingmaterial.input.js new file mode 100644 index 00000000..d6859a3f --- /dev/null +++ b/src/resources/4_0_0/inputs/substancepolymermonomersetstartingmaterial.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymermonomerSetstartingMaterial Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstancePolymermonomerSetstartingMaterial_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + material: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + _isDefining: { + type: require('./element.input.js'), + description: 'Todo.', + }, + isDefining: { + type: GraphQLBoolean, + description: 'Todo.', + }, + amount: { + type: require('./substanceamount.input.js'), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancepolymerrepeat.input.js b/src/resources/4_0_0/inputs/substancepolymerrepeat.input.js new file mode 100644 index 00000000..6f8f111f --- /dev/null +++ b/src/resources/4_0_0/inputs/substancepolymerrepeat.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymerrepeat Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstancePolymerrepeat_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _numberOfUnits: { + type: require('./element.input.js'), + description: 'Todo.', + }, + numberOfUnits: { + type: GraphQLInt, + description: 'Todo.', + }, + _averageMolecularFormula: { + type: require('./element.input.js'), + description: 'Todo.', + }, + averageMolecularFormula: { + type: GraphQLString, + description: 'Todo.', + }, + repeatUnitAmountType: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + repeatUnit: { + type: new GraphQLList( + require('./substancepolymerrepeatrepeatunit.input.js'), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunit.input.js b/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunit.input.js new file mode 100644 index 00000000..1c0e2976 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunit.input.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymerrepeatrepeatUnit Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstancePolymerrepeatrepeatUnit_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + orientationOfPolymerisation: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + _repeatUnit: { + type: require('./element.input.js'), + description: 'Todo.', + }, + repeatUnit: { + type: GraphQLString, + description: 'Todo.', + }, + amount: { + type: require('./substanceamount.input.js'), + description: 'Todo.', + }, + degreeOfPolymerisation: { + type: new GraphQLList( + require('./substancepolymerrepeatrepeatunitdegreeofpolymerisation.input.js'), + ), + description: 'Todo.', + }, + structuralRepresentation: { + type: new GraphQLList( + require('./substancepolymerrepeatrepeatunitstructuralrepresentation.input.js'), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunitdegreeofpolymerisation.input.js b/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunitdegreeofpolymerisation.input.js new file mode 100644 index 00000000..79675fc2 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunitdegreeofpolymerisation.input.js @@ -0,0 +1,44 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymerrepeatrepeatUnitdegreeOfPolymerisation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstancePolymerrepeatrepeatUnitdegreeOfPolymerisation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + degree: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + amount: { + type: require('./substanceamount.input.js'), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunitstructuralrepresentation.input.js b/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunitstructuralrepresentation.input.js new file mode 100644 index 00000000..2003b28f --- /dev/null +++ b/src/resources/4_0_0/inputs/substancepolymerrepeatrepeatunitstructuralrepresentation.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymerrepeatrepeatUnitstructuralRepresentation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstancePolymerrepeatrepeatUnitstructuralRepresentation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + _representation: { + type: require('./element.input.js'), + description: 'Todo.', + }, + representation: { + type: GraphQLString, + description: 'Todo.', + }, + attachment: { + type: require('./attachment.input.js'), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substanceprotein.input.js b/src/resources/4_0_0/inputs/substanceprotein.input.js new file mode 100644 index 00000000..ad44b552 --- /dev/null +++ b/src/resources/4_0_0/inputs/substanceprotein.input.js @@ -0,0 +1,115 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceProtein Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceProtein_Input', + description: + 'A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceProtein_Enum_input', + values: { SubstanceProtein: { value: 'SubstanceProtein' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + sequenceType: { + type: require('./codeableconcept.input.js'), + description: + 'The SubstanceProtein descriptive elements will only be used when a complete or partial amino acid sequence is available or derivable from a nucleic acid sequence.', + }, + _numberOfSubunits: { + type: require('./element.input.js'), + description: + 'Number of linear sequences of amino acids linked through peptide bonds. The number of subunits constituting the SubstanceProtein shall be described. It is possible that the number of subunits can be variable.', + }, + numberOfSubunits: { + type: GraphQLInt, + description: + 'Number of linear sequences of amino acids linked through peptide bonds. The number of subunits constituting the SubstanceProtein shall be described. It is possible that the number of subunits can be variable.', + }, + _disulfideLinkage: { + type: require('./element.input.js'), + description: + 'The disulphide bond between two cysteine residues either on the same subunit or on two different subunits shall be described. The position of the disulfide bonds in the SubstanceProtein shall be listed in increasing order of subunit number and position within subunit followed by the abbreviation of the amino acids involved. The disulfide linkage positions shall actually contain the amino acid Cysteine at the respective positions.', + }, + disulfideLinkage: { + type: new GraphQLList(GraphQLString), + description: + 'The disulphide bond between two cysteine residues either on the same subunit or on two different subunits shall be described. The position of the disulfide bonds in the SubstanceProtein shall be listed in increasing order of subunit number and position within subunit followed by the abbreviation of the amino acids involved. The disulfide linkage positions shall actually contain the amino acid Cysteine at the respective positions.', + }, + subunit: { + type: new GraphQLList(require('./substanceproteinsubunit.input.js')), + description: + 'This subclause refers to the description of each subunit constituting the SubstanceProtein. A subunit is a linear sequence of amino acids linked through peptide bonds. The Subunit information shall be provided when the finished SubstanceProtein is a complex of multiple sequences; subunits are not used to delineate domains within a single sequence. Subunits are listed in order of decreasing length; sequences of the same length will be ordered by decreasing molecular weight; subunits that have identical sequences will be repeated multiple times.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substanceproteinsubunit.input.js b/src/resources/4_0_0/inputs/substanceproteinsubunit.input.js new file mode 100644 index 00000000..afd176a4 --- /dev/null +++ b/src/resources/4_0_0/inputs/substanceproteinsubunit.input.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceProteinsubunit Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceProteinsubunit_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _subunit: { + type: require('./element.input.js'), + description: + 'Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.', + }, + subunit: { + type: GraphQLInt, + description: + 'Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.', + }, + _sequence: { + type: require('./element.input.js'), + description: + 'The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.', + }, + sequence: { + type: GraphQLString, + description: + 'The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.', + }, + _length: { + type: require('./element.input.js'), + description: + 'Length of linear sequences of amino acids contained in the subunit.', + }, + length: { + type: GraphQLInt, + description: + 'Length of linear sequences of amino acids contained in the subunit.', + }, + sequenceAttachment: { + type: require('./attachment.input.js'), + description: + 'The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.', + }, + nTerminalModificationId: { + type: require('./identifier.input.js'), + description: + 'Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID.', + }, + _nTerminalModification: { + type: require('./element.input.js'), + description: + 'The name of the fragment modified at the N-terminal of the SubstanceProtein shall be specified.', + }, + nTerminalModification: { + type: GraphQLString, + description: + 'The name of the fragment modified at the N-terminal of the SubstanceProtein shall be specified.', + }, + cTerminalModificationId: { + type: require('./identifier.input.js'), + description: + 'Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID.', + }, + _cTerminalModification: { + type: require('./element.input.js'), + description: 'The modification at the C-terminal shall be specified.', + }, + cTerminalModification: { + type: GraphQLString, + description: 'The modification at the C-terminal shall be specified.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancereferenceinformation.input.js b/src/resources/4_0_0/inputs/substancereferenceinformation.input.js new file mode 100644 index 00000000..f9b0652d --- /dev/null +++ b/src/resources/4_0_0/inputs/substancereferenceinformation.input.js @@ -0,0 +1,119 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceReferenceInformation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceReferenceInformation_Input', + description: 'Todo.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceReferenceInformation_Enum_input', + values: { + SubstanceReferenceInformation: { + value: 'SubstanceReferenceInformation', + }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _comment: { + type: require('./element.input.js'), + description: 'Todo.', + }, + comment: { + type: GraphQLString, + description: 'Todo.', + }, + gene: { + type: new GraphQLList( + require('./substancereferenceinformationgene.input.js'), + ), + description: 'Todo.', + }, + geneElement: { + type: new GraphQLList( + require('./substancereferenceinformationgeneelement.input.js'), + ), + description: 'Todo.', + }, + classification: { + type: new GraphQLList( + require('./substancereferenceinformationclassification.input.js'), + ), + description: 'Todo.', + }, + target: { + type: new GraphQLList( + require('./substancereferenceinformationtarget.input.js'), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancereferenceinformationclassification.input.js b/src/resources/4_0_0/inputs/substancereferenceinformationclassification.input.js new file mode 100644 index 00000000..41dd2579 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancereferenceinformationclassification.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceReferenceInformationclassification Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceReferenceInformationclassification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + domain: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + classification: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + subtype: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Todo.', + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancereferenceinformationgene.input.js b/src/resources/4_0_0/inputs/substancereferenceinformationgene.input.js new file mode 100644 index 00000000..b2403c99 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancereferenceinformationgene.input.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceReferenceInformationgene Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceReferenceInformationgene_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + geneSequenceOrigin: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + gene: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancereferenceinformationgeneelement.input.js b/src/resources/4_0_0/inputs/substancereferenceinformationgeneelement.input.js new file mode 100644 index 00000000..3567160a --- /dev/null +++ b/src/resources/4_0_0/inputs/substancereferenceinformationgeneelement.input.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceReferenceInformationgeneElement Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceReferenceInformationgeneElement_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + element: { + type: require('./identifier.input.js'), + description: 'Todo.', + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancereferenceinformationtarget.input.js b/src/resources/4_0_0/inputs/substancereferenceinformationtarget.input.js new file mode 100644 index 00000000..a24b0eb3 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancereferenceinformationtarget.input.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceReferenceInformationtarget Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceReferenceInformationtarget_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + target: { + type: require('./identifier.input.js'), + description: 'Todo.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + interaction: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + organism: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + organismType: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + amountQuantity: { + type: require('./quantity.input.js'), + description: 'Todo.', + }, + amountRange: { + type: require('./range.input.js'), + description: 'Todo.', + }, + _amountString: { + type: require('./element.input.js'), + description: 'Todo.', + }, + amountString: { + type: GraphQLString, + description: 'Todo.', + }, + amountType: { + type: require('./codeableconcept.input.js'), + description: 'Todo.', + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancesourcematerial.input.js b/src/resources/4_0_0/inputs/substancesourcematerial.input.js new file mode 100644 index 00000000..e59fd3c2 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancesourcematerial.input.js @@ -0,0 +1,168 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceSourceMaterial Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSourceMaterial_Input', + description: + 'Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceSourceMaterial_Enum_input', + values: { + SubstanceSourceMaterial: { value: 'SubstanceSourceMaterial' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + sourceMaterialClass: { + type: require('./codeableconcept.input.js'), + description: + 'General high level classification of the source material specific to the origin of the material.', + }, + sourceMaterialType: { + type: require('./codeableconcept.input.js'), + description: + 'The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent.', + }, + sourceMaterialState: { + type: require('./codeableconcept.input.js'), + description: 'The state of the source material when extracted.', + }, + organismId: { + type: require('./identifier.input.js'), + description: + 'The unique identifier associated with the source material parent organism shall be specified.', + }, + _organismName: { + type: require('./element.input.js'), + description: + 'The organism accepted Scientific name shall be provided based on the organism taxonomy.', + }, + organismName: { + type: GraphQLString, + description: + 'The organism accepted Scientific name shall be provided based on the organism taxonomy.', + }, + parentSubstanceId: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant).', + }, + _parentSubstanceName: { + type: require('./element.input.js'), + description: + 'The parent substance of the Herbal Drug, or Herbal preparation.', + }, + parentSubstanceName: { + type: new GraphQLList(GraphQLString), + description: + 'The parent substance of the Herbal Drug, or Herbal preparation.', + }, + countryOfOrigin: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate.', + }, + _geographicalLocation: { + type: require('./element.input.js'), + description: + 'The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.', + }, + geographicalLocation: { + type: new GraphQLList(GraphQLString), + description: + 'The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.', + }, + developmentStage: { + type: require('./codeableconcept.input.js'), + description: + 'Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum).', + }, + fractionDescription: { + type: new GraphQLList( + require('./substancesourcematerialfractiondescription.input.js'), + ), + description: + 'Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels.', + }, + organism: { + type: require('./substancesourcematerialorganism.input.js'), + description: + 'This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf.', + }, + partDescription: { + type: new GraphQLList( + require('./substancesourcematerialpartdescription.input.js'), + ), + description: 'To do.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancesourcematerialfractiondescription.input.js b/src/resources/4_0_0/inputs/substancesourcematerialfractiondescription.input.js new file mode 100644 index 00000000..ec54ae27 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancesourcematerialfractiondescription.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialfractionDescription Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSourceMaterialfractionDescription_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _fraction: { + type: require('./element.input.js'), + description: + 'This element is capturing information about the fraction of a plant part, or human plasma for fractionation.', + }, + fraction: { + type: GraphQLString, + description: + 'This element is capturing information about the fraction of a plant part, or human plasma for fractionation.', + }, + materialType: { + type: require('./codeableconcept.input.js'), + description: + 'The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancesourcematerialorganism.input.js b/src/resources/4_0_0/inputs/substancesourcematerialorganism.input.js new file mode 100644 index 00000000..976886f4 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancesourcematerialorganism.input.js @@ -0,0 +1,78 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialorganism Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSourceMaterialorganism_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + family: { + type: require('./codeableconcept.input.js'), + description: 'The family of an organism shall be specified.', + }, + genus: { + type: require('./codeableconcept.input.js'), + description: + 'The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies.', + }, + species: { + type: require('./codeableconcept.input.js'), + description: + 'The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies.', + }, + intraspecificType: { + type: require('./codeableconcept.input.js'), + description: 'The Intraspecific type of an organism shall be specified.', + }, + _intraspecificDescription: { + type: require('./element.input.js'), + description: + 'The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.', + }, + intraspecificDescription: { + type: GraphQLString, + description: + 'The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.', + }, + author: { + type: new GraphQLList( + require('./substancesourcematerialorganismauthor.input.js'), + ), + description: '4.9.13.6.1 Author type (Conditional).', + }, + hybrid: { + type: require('./substancesourcematerialorganismhybrid.input.js'), + description: '4.9.13.8.1 Hybrid species maternal organism ID (Optional).', + }, + organismGeneral: { + type: require('./substancesourcematerialorganismorganismgeneral.input.js'), + description: '4.9.13.7.1 Kingdom (Conditional).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancesourcematerialorganismauthor.input.js b/src/resources/4_0_0/inputs/substancesourcematerialorganismauthor.input.js new file mode 100644 index 00000000..1be11a42 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancesourcematerialorganismauthor.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialorganismauthor Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSourceMaterialorganismauthor_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + authorType: { + type: require('./codeableconcept.input.js'), + description: + 'The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name.', + }, + _authorDescription: { + type: require('./element.input.js'), + description: + 'The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).', + }, + authorDescription: { + type: GraphQLString, + description: + 'The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancesourcematerialorganismhybrid.input.js b/src/resources/4_0_0/inputs/substancesourcematerialorganismhybrid.input.js new file mode 100644 index 00000000..d76b50b1 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancesourcematerialorganismhybrid.input.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialorganismhybrid Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSourceMaterialorganismhybrid_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _maternalOrganismId: { + type: require('./element.input.js'), + description: + 'The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.', + }, + maternalOrganismId: { + type: GraphQLString, + description: + 'The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.', + }, + _maternalOrganismName: { + type: require('./element.input.js'), + description: + 'The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.', + }, + maternalOrganismName: { + type: GraphQLString, + description: + 'The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.', + }, + _paternalOrganismId: { + type: require('./element.input.js'), + description: + 'The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.', + }, + paternalOrganismId: { + type: GraphQLString, + description: + 'The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.', + }, + _paternalOrganismName: { + type: require('./element.input.js'), + description: + 'The name of the paternal species constituting the hybrid organism shall be specified.', + }, + paternalOrganismName: { + type: GraphQLString, + description: + 'The name of the paternal species constituting the hybrid organism shall be specified.', + }, + hybridType: { + type: require('./codeableconcept.input.js'), + description: 'The hybrid type of an organism shall be specified.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancesourcematerialorganismorganismgeneral.input.js b/src/resources/4_0_0/inputs/substancesourcematerialorganismorganismgeneral.input.js new file mode 100644 index 00000000..412975f8 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancesourcematerialorganismorganismgeneral.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialorganismorganismGeneral Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSourceMaterialorganismorganismGeneral_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + kingdom: { + type: require('./codeableconcept.input.js'), + description: 'The kingdom of an organism shall be specified.', + }, + phylum: { + type: require('./codeableconcept.input.js'), + description: 'The phylum of an organism shall be specified.', + }, + class: { + type: require('./codeableconcept.input.js'), + description: 'The class of an organism shall be specified.', + }, + order: { + type: require('./codeableconcept.input.js'), + description: 'The order of an organism shall be specified,.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancesourcematerialpartdescription.input.js b/src/resources/4_0_0/inputs/substancesourcematerialpartdescription.input.js new file mode 100644 index 00000000..46f5dddd --- /dev/null +++ b/src/resources/4_0_0/inputs/substancesourcematerialpartdescription.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialpartDescription Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSourceMaterialpartDescription_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + part: { + type: require('./codeableconcept.input.js'), + description: + 'Entity of anatomical origin of source material within an organism.', + }, + partLocation: { + type: require('./codeableconcept.input.js'), + description: + 'The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecification.input.js b/src/resources/4_0_0/inputs/substancespecification.input.js new file mode 100644 index 00000000..fc07e249 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecification.input.js @@ -0,0 +1,172 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceSpecification Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecification_Input', + description: + 'The detailed description of a substance, typically at a level beyond what is used for prescribing.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceSpecification_Enum_input', + values: { + SubstanceSpecification: { value: 'SubstanceSpecification' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Identifier by which this substance is known.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'High level categorization, e.g. polymer or nucleic acid.', + }, + status: { + type: require('./codeableconcept.input.js'), + description: 'Status of substance within the catalogue e.g. approved.', + }, + domain: { + type: require('./codeableconcept.input.js'), + description: 'If the substance applies to only human or veterinary use.', + }, + _description: { + type: require('./element.input.js'), + description: 'Textual description of the substance.', + }, + description: { + type: GraphQLString, + description: 'Textual description of the substance.', + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Supporting literature.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Textual comment about this record of a substance.', + }, + comment: { + type: GraphQLString, + description: 'Textual comment about this record of a substance.', + }, + moiety: { + type: new GraphQLList(require('./substancespecificationmoiety.input.js')), + description: 'Moiety, for structural modifications.', + }, + property: { + type: new GraphQLList( + require('./substancespecificationproperty.input.js'), + ), + description: + 'General specifications for this substance, including how it is related to other substances.', + }, + referenceInformation: { + type: GraphQLString, + description: 'General information detailing this substance.', + }, + structure: { + type: require('./substancespecificationstructure.input.js'), + description: 'Structural information.', + }, + code: { + type: new GraphQLList(require('./substancespecificationcode.input.js')), + description: 'Codes associated with the substance.', + }, + name: { + type: new GraphQLList(require('./substancespecificationname.input.js')), + description: 'Names applicable to this substance.', + }, + relationship: { + type: new GraphQLList( + require('./substancespecificationrelationship.input.js'), + ), + description: + 'A link between this substance and another, with details of the relationship.', + }, + nucleicAcid: { + type: GraphQLString, + description: 'Data items specific to nucleic acids.', + }, + polymer: { + type: GraphQLString, + description: 'Data items specific to polymers.', + }, + protein: { + type: GraphQLString, + description: 'Data items specific to proteins.', + }, + sourceMaterial: { + type: GraphQLString, + description: 'Material or taxonomic/anatomical source for the substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationcode.input.js b/src/resources/4_0_0/inputs/substancespecificationcode.input.js new file mode 100644 index 00000000..297cf1e4 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationcode.input.js @@ -0,0 +1,67 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SubstanceSpecificationcode Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationcode_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'The specific code.', + }, + status: { + type: require('./codeableconcept.input.js'), + description: 'Status of the code assignment.', + }, + _statusDate: { + type: require('./element.input.js'), + description: + 'The date at which the code status is changed as part of the terminology maintenance.', + }, + statusDate: { + type: DateTimeScalar, + description: + 'The date at which the code status is changed as part of the terminology maintenance.', + }, + _comment: { + type: require('./element.input.js'), + description: 'Any comment can be provided in this field, if necessary.', + }, + comment: { + type: GraphQLString, + description: 'Any comment can be provided in this field, if necessary.', + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Supporting literature.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationmoiety.input.js b/src/resources/4_0_0/inputs/substancespecificationmoiety.input.js new file mode 100644 index 00000000..b028e619 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationmoiety.input.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationmoiety Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationmoiety_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + role: { + type: require('./codeableconcept.input.js'), + description: 'Role that the moiety is playing.', + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Identifier by which this moiety substance is known.', + }, + _name: { + type: require('./element.input.js'), + description: 'Textual name for this moiety substance.', + }, + name: { + type: GraphQLString, + description: 'Textual name for this moiety substance.', + }, + stereochemistry: { + type: require('./codeableconcept.input.js'), + description: 'Stereochemistry type.', + }, + opticalActivity: { + type: require('./codeableconcept.input.js'), + description: 'Optical activity type.', + }, + _molecularFormula: { + type: require('./element.input.js'), + description: 'Molecular formula.', + }, + molecularFormula: { + type: GraphQLString, + description: 'Molecular formula.', + }, + amountQuantity: { + type: require('./quantity.input.js'), + description: 'Quantitative value for this moiety.', + }, + _amountString: { + type: require('./element.input.js'), + description: 'Quantitative value for this moiety.', + }, + amountString: { + type: GraphQLString, + description: 'Quantitative value for this moiety.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationname.input.js b/src/resources/4_0_0/inputs/substancespecificationname.input.js new file mode 100644 index 00000000..01114357 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationname.input.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationname Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationname_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'The actual name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The actual name.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: 'Name type.', + }, + status: { + type: require('./codeableconcept.input.js'), + description: 'The status of the name.', + }, + _preferred: { + type: require('./element.input.js'), + description: 'If this is the preferred name for this substance.', + }, + preferred: { + type: GraphQLBoolean, + description: 'If this is the preferred name for this substance.', + }, + language: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'Language of the name.', + }, + domain: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The jurisdiction where this name applies.', + }, + official: { + type: new GraphQLList( + require('./substancespecificationnameofficial.input.js'), + ), + description: 'Details of the official nature of this name.', + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Supporting literature.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationnameofficial.input.js b/src/resources/4_0_0/inputs/substancespecificationnameofficial.input.js new file mode 100644 index 00000000..0ad8fabf --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationnameofficial.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SubstanceSpecificationnameofficial Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationnameofficial_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + authority: { + type: require('./codeableconcept.input.js'), + description: 'Which authority uses this official name.', + }, + status: { + type: require('./codeableconcept.input.js'), + description: 'The status of the official name.', + }, + _date: { + type: require('./element.input.js'), + description: 'Date of official name change.', + }, + date: { + type: DateTimeScalar, + description: 'Date of official name change.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationproperty.input.js b/src/resources/4_0_0/inputs/substancespecificationproperty.input.js new file mode 100644 index 00000000..3611ea56 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationproperty.input.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationproperty Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationproperty_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'A category for this property, e.g. Physical, Chemical, Enzymatic.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: 'Property type e.g. viscosity, pH, isoelectric point.', + }, + _parameters: { + type: require('./element.input.js'), + description: + 'Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1).', + }, + parameters: { + type: GraphQLString, + description: + 'Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1).', + }, + definingSubstanceReference: { + type: GraphQLString, + description: + 'A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol).', + }, + definingSubstanceCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol).', + }, + amountQuantity: { + type: require('./quantity.input.js'), + description: 'Quantitative value for this property.', + }, + _amountString: { + type: require('./element.input.js'), + description: 'Quantitative value for this property.', + }, + amountString: { + type: GraphQLString, + description: 'Quantitative value for this property.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationrelationship.input.js b/src/resources/4_0_0/inputs/substancespecificationrelationship.input.js new file mode 100644 index 00000000..23fcca01 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationrelationship.input.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationrelationship Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationrelationship_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + substanceReference: { + type: GraphQLString, + description: + 'A pointer to another substance, as a resource or just a representational code.', + }, + substanceCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'A pointer to another substance, as a resource or just a representational code.', + }, + relationship: { + type: require('./codeableconcept.input.js'), + description: + "For example 'salt to parent', 'active moiety', 'starting material'.", + }, + _isDefining: { + type: require('./element.input.js'), + description: + 'For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.', + }, + isDefining: { + type: GraphQLBoolean, + description: + 'For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.', + }, + amountQuantity: { + type: require('./quantity.input.js'), + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + amountRange: { + type: require('./range.input.js'), + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + amountRatio: { + type: require('./ratio.input.js'), + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + _amountString: { + type: require('./element.input.js'), + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + amountString: { + type: GraphQLString, + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + amountRatioLowLimit: { + type: require('./ratio.input.js'), + description: 'For use when the numeric.', + }, + amountType: { + type: require('./codeableconcept.input.js'), + description: + "An operator for the amount, for example 'average', 'approximately', 'less than'.", + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Supporting literature.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationstructure.input.js b/src/resources/4_0_0/inputs/substancespecificationstructure.input.js new file mode 100644 index 00000000..f63886c3 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationstructure.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationstructure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationstructure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + stereochemistry: { + type: require('./codeableconcept.input.js'), + description: 'Stereochemistry type.', + }, + opticalActivity: { + type: require('./codeableconcept.input.js'), + description: 'Optical activity type.', + }, + _molecularFormula: { + type: require('./element.input.js'), + description: 'Molecular formula.', + }, + molecularFormula: { + type: GraphQLString, + description: 'Molecular formula.', + }, + _molecularFormulaByMoiety: { + type: require('./element.input.js'), + description: + 'Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot.', + }, + molecularFormulaByMoiety: { + type: GraphQLString, + description: + 'Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot.', + }, + isotope: { + type: new GraphQLList( + require('./substancespecificationstructureisotope.input.js'), + ), + description: + 'Applicable for single substances that contain a radionuclide or a non-natural isotopic ratio.', + }, + source: { + type: new GraphQLList(GraphQLString), + description: 'Supporting literature.', + }, + representation: { + type: new GraphQLList( + require('./substancespecificationstructurerepresentation.input.js'), + ), + description: 'Molecular structural representation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationstructureisotope.input.js b/src/resources/4_0_0/inputs/substancespecificationstructureisotope.input.js new file mode 100644 index 00000000..6076343e --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationstructureisotope.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationstructureisotope Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationstructureisotope_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: 'Substance identifier for each non-natural or radioisotope.', + }, + name: { + type: require('./codeableconcept.input.js'), + description: 'Substance name for each non-natural or radioisotope.', + }, + substitution: { + type: require('./codeableconcept.input.js'), + description: + 'The type of isotopic substitution present in a single substance.', + }, + halfLife: { + type: require('./quantity.input.js'), + description: 'Half life - for a non-natural nuclide.', + }, + molecularWeight: { + type: require('./substancespecificationstructureisotopemolecularweight.input.js'), + description: + 'The molecular weight or weight range (for proteins, polymers or nucleic acids).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationstructureisotopemolecularweight.input.js b/src/resources/4_0_0/inputs/substancespecificationstructureisotopemolecularweight.input.js new file mode 100644 index 00000000..fa438533 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationstructureisotopemolecularweight.input.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationstructureisotopemolecularWeight Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationstructureisotopemolecularWeight_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + method: { + type: require('./codeableconcept.input.js'), + description: 'The method by which the molecular weight was determined.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Type of molecular weight such as exact, average (also known as. number average), weight average.', + }, + amount: { + type: require('./quantity.input.js'), + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/substancespecificationstructurerepresentation.input.js b/src/resources/4_0_0/inputs/substancespecificationstructurerepresentation.input.js new file mode 100644 index 00000000..90ea6a48 --- /dev/null +++ b/src/resources/4_0_0/inputs/substancespecificationstructurerepresentation.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationstructurerepresentation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SubstanceSpecificationstructurerepresentation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'The type of structure (e.g. Full, Partial, Representative).', + }, + _representation: { + type: require('./element.input.js'), + description: + 'The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX.', + }, + representation: { + type: GraphQLString, + description: + 'The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX.', + }, + attachment: { + type: require('./attachment.input.js'), + description: 'An attached file with the structural representation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/supplydelivery.input.js b/src/resources/4_0_0/inputs/supplydelivery.input.js new file mode 100644 index 00000000..44aae107 --- /dev/null +++ b/src/resources/4_0_0/inputs/supplydelivery.input.js @@ -0,0 +1,151 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SupplyDelivery Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SupplyDelivery_Input', + description: 'Record of delivery of what is supplied.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyDelivery_Enum_input', + values: { SupplyDelivery: { value: 'SupplyDelivery' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Identifier for the supply delivery event that is used to identify it across multiple disparate systems.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.input.js'), + description: 'A code specifying the state of the dispense event.', + }, + status: { + type: CodeScalar, + description: 'A code specifying the state of the dispense event.', + }, + patient: { + type: GraphQLString, + description: + 'A link to a resource representing the person whom the delivered item is for.', + }, + type: { + type: require('./codeableconcept.input.js'), + description: + 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + suppliedItem: { + type: require('./supplydeliverysupplieditem.input.js'), + description: 'The item that is being delivered or has been supplied.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'The date or time(s) the activity occurred.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The date or time(s) the activity occurred.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'The date or time(s) the activity occurred.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: 'The date or time(s) the activity occurred.', + }, + supplier: { + type: GraphQLString, + description: + 'The individual responsible for dispensing the medication, supplier or device.', + }, + destination: { + type: GraphQLString, + description: + 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList(GraphQLString), + description: 'Identifies the person who picked up the Supply.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/supplydeliverysupplieditem.input.js b/src/resources/4_0_0/inputs/supplydeliverysupplieditem.input.js new file mode 100644 index 00000000..7129b7ff --- /dev/null +++ b/src/resources/4_0_0/inputs/supplydeliverysupplieditem.input.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SupplyDeliverysuppliedItem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SupplyDeliverysuppliedItem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + quantity: { + type: require('./quantity.input.js'), + description: + 'The amount of supply that has been dispensed. Includes unit of measure.', + }, + itemCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + itemReference: { + type: GraphQLString, + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/supplyrequest.input.js b/src/resources/4_0_0/inputs/supplyrequest.input.js new file mode 100644 index 00000000..a0e32ef6 --- /dev/null +++ b/src/resources/4_0_0/inputs/supplyrequest.input.js @@ -0,0 +1,180 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SupplyRequest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SupplyRequest_Input', + description: + 'A record of a request for a medication, substance or device used in the healthcare setting.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyRequest_Enum_input', + values: { SupplyRequest: { value: 'SupplyRequest' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.input.js'), + description: 'Status of the supply request.', + }, + status: { + type: CodeScalar, + description: 'Status of the supply request.', + }, + category: { + type: require('./codeableconcept.input.js'), + description: + 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + itemReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'The amount that is being ordered of the indicated item.', + }, + parameter: { + type: new GraphQLList(require('./supplyrequestparameter.input.js')), + description: + 'Specific parameters for the ordered item. For example, the size of the indicated item.', + }, + _occurrenceDateTime: { + type: require('./element.input.js'), + description: 'When the request should be fulfilled.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'When the request should be fulfilled.', + }, + occurrencePeriod: { + type: require('./period.input.js'), + description: 'When the request should be fulfilled.', + }, + occurrenceTiming: { + type: require('./timing.input.js'), + description: 'When the request should be fulfilled.', + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'When the request was made.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request was made.', + }, + requester: { + type: GraphQLString, + description: 'The device, practitioner, etc. who initiated the request.', + }, + supplier: { + type: new GraphQLList(GraphQLString), + description: 'Who is intended to fulfill the request.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The reason why the supply item was requested.', + }, + reasonReference: { + type: new GraphQLList(GraphQLString), + description: 'The reason why the supply item was requested.', + }, + deliverFrom: { + type: GraphQLString, + description: 'Where the supply is expected to come from.', + }, + deliverTo: { + type: GraphQLString, + description: 'Where the supply is destined to go.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/supplyrequestparameter.input.js b/src/resources/4_0_0/inputs/supplyrequestparameter.input.js new file mode 100644 index 00000000..15b51631 --- /dev/null +++ b/src/resources/4_0_0/inputs/supplyrequestparameter.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SupplyRequestparameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'SupplyRequestparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code or string that identifies the device detail being asserted.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.input.js'), + description: 'The value of the device detail.', + }, + valueQuantity: { + type: require('./quantity.input.js'), + description: 'The value of the device detail.', + }, + valueRange: { + type: require('./range.input.js'), + description: 'The value of the device detail.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the device detail.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the device detail.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/task.input.js b/src/resources/4_0_0/inputs/task.input.js new file mode 100644 index 00000000..12c255c4 --- /dev/null +++ b/src/resources/4_0_0/inputs/task.input.js @@ -0,0 +1,266 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Task Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Task_Input', + description: 'A task to be performed.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Task_Enum_input', + values: { Task: { value: 'Task' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'The business identifier for this task.', + }, + _instantiatesCanonical: { + type: require('./element.input.js'), + description: + 'The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.', + }, + instantiatesCanonical: { + type: CanonicalScalar, + description: + 'The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.', + }, + _instantiatesUri: { + type: require('./element.input.js'), + description: + 'The URL pointing to an *externally* maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.', + }, + instantiatesUri: { + type: UriScalar, + description: + 'The URL pointing to an *externally* maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.', + }, + basedOn: { + type: new GraphQLList(GraphQLString), + description: + "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a 'request' resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the 'request' resource the task is seeking to fulfill. This latter resource is referenced by FocusOn. For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", + }, + groupIdentifier: { + type: require('./identifier.input.js'), + description: + 'An identifier that links together multiple tasks and other requests that were created in the same context.', + }, + partOf: { + type: new GraphQLList(GraphQLString), + description: 'Task that this particular task is part of.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current status of the task.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current status of the task.', + }, + statusReason: { + type: require('./codeableconcept.input.js'), + description: + 'An explanation as to why this task is held, failed, was refused, etc.', + }, + businessStatus: { + type: require('./codeableconcept.input.js'), + description: 'Contains business-specific nuances of the business state.', + }, + _intent: { + type: require('./element.input.js'), + description: + "Indicates the 'level' of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.", + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + "Indicates the 'level' of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.", + }, + _priority: { + type: require('./element.input.js'), + description: + 'Indicates how quickly the Task should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the Task should be addressed with respect to other requests.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A name or code (or both) briefly describing what the task involves.', + }, + _description: { + type: require('./element.input.js'), + description: 'A free-text description of what is to be performed.', + }, + description: { + type: GraphQLString, + description: 'A free-text description of what is to be performed.', + }, + focus: { + type: GraphQLString, + description: + 'The request being actioned or the resource being manipulated by this task.', + }, + for: { + type: GraphQLString, + description: + 'The entity who benefits from the performance of the service specified in the task (e.g., the patient).', + }, + encounter: { + type: GraphQLString, + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.', + }, + executionPeriod: { + type: require('./period.input.js'), + description: + 'Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).', + }, + _authoredOn: { + type: require('./element.input.js'), + description: 'The date and time this task was created.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'The date and time this task was created.', + }, + _lastModified: { + type: require('./element.input.js'), + description: 'The date and time of last modification to this task.', + }, + lastModified: { + type: DateTimeScalar, + description: 'The date and time of last modification to this task.', + }, + requester: { + type: GraphQLString, + description: 'The creator of the task.', + }, + performerType: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: 'The kind of participant that should perform the task.', + }, + owner: { + type: GraphQLString, + description: + 'Individual organization or Device currently responsible for task execution.', + }, + location: { + type: GraphQLString, + description: + 'Principal physical location where the this task is performed.', + }, + reasonCode: { + type: require('./codeableconcept.input.js'), + description: + 'A description or code indicating why this task needs to be performed.', + }, + reasonReference: { + type: GraphQLString, + description: + 'A resource reference indicating why this task needs to be performed.', + }, + insurance: { + type: new GraphQLList(GraphQLString), + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Free-text information captured about the task as it progresses.', + }, + relevantHistory: { + type: new GraphQLList(GraphQLString), + description: + 'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.', + }, + restriction: { + type: require('./taskrestriction.input.js'), + description: + 'If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.', + }, + input: { + type: new GraphQLList(require('./taskinput.input.js')), + description: + 'Additional information that may be needed in the execution of the task.', + }, + output: { + type: new GraphQLList(require('./taskoutput.input.js')), + description: 'Outputs produced by the Task.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/taskinput.input.js b/src/resources/4_0_0/inputs/taskinput.input.js new file mode 100644 index 00000000..1180698d --- /dev/null +++ b/src/resources/4_0_0/inputs/taskinput.input.js @@ -0,0 +1,331 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary Taskinput Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Taskinput_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A code or description indicating how the input is intended to be used as part of the task execution.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of the input parameter as a basic type.', + }, + _valueCanonical: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDate: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of the input parameter as a basic type.', + }, + _valueId: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of the input parameter as a basic type.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + _valueOid: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + _valueTime: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUrl: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUrl: { + type: new GraphQLNonNull(UrlScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUuid: { + type: require('./element.input.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUuid: { + type: new GraphQLNonNull(UuidScalar), + description: 'The value of the input parameter as a basic type.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueContactDetail: { + type: new GraphQLNonNull(require('./contactdetail.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueContributor: { + type: new GraphQLNonNull(require('./contributor.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueExpression: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueParameterDefinition: { + type: new GraphQLNonNull(require('./parameterdefinition.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRelatedArtifact: { + type: new GraphQLNonNull(require('./relatedartifact.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueTriggerDefinition: { + type: new GraphQLNonNull(require('./triggerdefinition.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueUsageContext: { + type: new GraphQLNonNull(require('./usagecontext.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDosage: { + type: new GraphQLNonNull(require('./dosage.input.js')), + description: 'The value of the input parameter as a basic type.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/taskoutput.input.js b/src/resources/4_0_0/inputs/taskoutput.input.js new file mode 100644 index 00000000..7f9a6f3d --- /dev/null +++ b/src/resources/4_0_0/inputs/taskoutput.input.js @@ -0,0 +1,330 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary Taskoutput Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Taskoutput_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The name of the Output parameter.', + }, + _valueBase64Binary: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of the Output parameter as a basic type.', + }, + _valueCanonical: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDate: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of the Output parameter as a basic type.', + }, + _valueId: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueInstant: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of the Output parameter as a basic type.', + }, + _valueMarkdown: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + _valueOid: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valuePositiveInt: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + _valueTime: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUnsignedInt: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUrl: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUrl: { + type: new GraphQLNonNull(UrlScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUuid: { + type: require('./element.input.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUuid: { + type: new GraphQLNonNull(UuidScalar), + description: 'The value of the Output parameter as a basic type.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueContactDetail: { + type: new GraphQLNonNull(require('./contactdetail.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueContributor: { + type: new GraphQLNonNull(require('./contributor.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueExpression: { + type: new GraphQLNonNull(require('./expression.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueParameterDefinition: { + type: new GraphQLNonNull(require('./parameterdefinition.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRelatedArtifact: { + type: new GraphQLNonNull(require('./relatedartifact.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueTriggerDefinition: { + type: new GraphQLNonNull(require('./triggerdefinition.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueUsageContext: { + type: new GraphQLNonNull(require('./usagecontext.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDosage: { + type: new GraphQLNonNull(require('./dosage.input.js')), + description: 'The value of the Output parameter as a basic type.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/taskrestriction.input.js b/src/resources/4_0_0/inputs/taskrestriction.input.js new file mode 100644 index 00000000..12733833 --- /dev/null +++ b/src/resources/4_0_0/inputs/taskrestriction.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Taskrestriction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Taskrestriction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _repetitions: { + type: require('./element.input.js'), + description: + 'Indicates the number of times the requested action should occur.', + }, + repetitions: { + type: PositiveIntScalar, + description: + 'Indicates the number of times the requested action should occur.', + }, + period: { + type: require('./period.input.js'), + description: 'Over what time-period is fulfillment sought.', + }, + recipient: { + type: new GraphQLList(GraphQLString), + description: + 'For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilities.input.js b/src/resources/4_0_0/inputs/terminologycapabilities.input.js new file mode 100644 index 00000000..debb1390 --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilities.input.js @@ -0,0 +1,277 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilities Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilities_Input', + description: + 'A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TerminologyCapabilities_Enum_input', + values: { + TerminologyCapabilities: { value: 'TerminologyCapabilities' }, + }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the terminology capabilities.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the terminology capabilities.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this terminology capabilities. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this terminology capabilities. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the terminology capabilities was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the terminology capabilities was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the terminology capabilities.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the terminology capabilities.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate terminology capabilities instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the terminology capabilities is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this terminology capabilities is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this terminology capabilities is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the terminology capabilities.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the terminology capabilities.', + }, + _kind: { + type: require('./element.input.js'), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + software: { + type: require('./terminologycapabilitiessoftware.input.js'), + description: + 'Software that is covered by this terminology capability statement. It is used when the statement describes the capabilities of a particular software version, independent of an installation.', + }, + implementation: { + type: require('./terminologycapabilitiesimplementation.input.js'), + description: + 'Identifies a specific implementation instance that is described by the terminology capability statement - i.e. a particular installation, rather than the capabilities of a software program.', + }, + _lockedDate: { + type: require('./element.input.js'), + description: 'Whether the server supports lockedDate.', + }, + lockedDate: { + type: GraphQLBoolean, + description: 'Whether the server supports lockedDate.', + }, + codeSystem: { + type: new GraphQLList( + require('./terminologycapabilitiescodesystem.input.js'), + ), + description: + 'Identifies a code system that is supported by the server. If there is a no code system URL, then this declares the general assumptions a client can make about support for any CodeSystem resource.', + }, + expansion: { + type: require('./terminologycapabilitiesexpansion.input.js'), + description: + 'Information about the [ValueSet/$expand](valueset-operation-expand.html) operation.', + }, + _codeSearch: { + type: require('./element.input.js'), + description: + 'The degree to which the server supports the code search parameter on ValueSet, if it is supported.', + }, + codeSearch: { + type: CodeScalar, + description: + 'The degree to which the server supports the code search parameter on ValueSet, if it is supported.', + }, + validateCode: { + type: require('./terminologycapabilitiesvalidatecode.input.js'), + description: + 'Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation.', + }, + translation: { + type: require('./terminologycapabilitiestranslation.input.js'), + description: + 'Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation.', + }, + closure: { + type: require('./terminologycapabilitiesclosure.input.js'), + description: 'Whether the $closure operation is supported.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiesclosure.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiesclosure.input.js new file mode 100644 index 00000000..65fa7aad --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiesclosure.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiesclosure Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiesclosure_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _translation: { + type: require('./element.input.js'), + description: 'If cross-system closure is supported.', + }, + translation: { + type: GraphQLBoolean, + description: 'If cross-system closure is supported.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiescodesystem.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiescodesystem.input.js new file mode 100644 index 00000000..508f5d86 --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiescodesystem.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiescodeSystem Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiescodeSystem_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _uri: { + type: require('./element.input.js'), + description: 'URI for the Code System.', + }, + uri: { + type: CanonicalScalar, + description: 'URI for the Code System.', + }, + version: { + type: new GraphQLList( + require('./terminologycapabilitiescodesystemversion.input.js'), + ), + description: + 'For the code system, a list of versions that are supported by the server.', + }, + _subsumption: { + type: require('./element.input.js'), + description: + 'True if subsumption is supported for this version of the code system.', + }, + subsumption: { + type: GraphQLBoolean, + description: + 'True if subsumption is supported for this version of the code system.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiescodesystemversion.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiescodesystemversion.input.js new file mode 100644 index 00000000..c6991eaf --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiescodesystemversion.input.js @@ -0,0 +1,88 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiescodeSystemversion Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiescodeSystemversion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'For version-less code systems, there should be a single version with no identifier.', + }, + code: { + type: GraphQLString, + description: + 'For version-less code systems, there should be a single version with no identifier.', + }, + _isDefault: { + type: require('./element.input.js'), + description: 'If this is the default version for this code system.', + }, + isDefault: { + type: GraphQLBoolean, + description: 'If this is the default version for this code system.', + }, + _compositional: { + type: require('./element.input.js'), + description: + 'If the compositional grammar defined by the code system is supported.', + }, + compositional: { + type: GraphQLBoolean, + description: + 'If the compositional grammar defined by the code system is supported.', + }, + _language: { + type: require('./element.input.js'), + description: 'Language Displays supported.', + }, + language: { + type: new GraphQLList(CodeScalar), + description: 'Language Displays supported.', + }, + filter: { + type: new GraphQLList( + require('./terminologycapabilitiescodesystemversionfilter.input.js'), + ), + description: 'Filter Properties supported.', + }, + _property: { + type: require('./element.input.js'), + description: 'Properties supported for $lookup.', + }, + property: { + type: new GraphQLList(CodeScalar), + description: 'Properties supported for $lookup.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiescodesystemversionfilter.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiescodesystemversionfilter.input.js new file mode 100644 index 00000000..19b323b1 --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiescodesystemversionfilter.input.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiescodeSystemversionfilter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiescodeSystemversionfilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: 'Code of the property supported.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Code of the property supported.', + }, + _op: { + type: require('./element.input.js'), + description: 'Operations supported for the property.', + }, + op: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'Operations supported for the property.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiesexpansion.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiesexpansion.input.js new file mode 100644 index 00000000..1829e49c --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiesexpansion.input.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiesexpansion Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiesexpansion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _hierarchical: { + type: require('./element.input.js'), + description: 'Whether the server can return nested value sets.', + }, + hierarchical: { + type: GraphQLBoolean, + description: 'Whether the server can return nested value sets.', + }, + _paging: { + type: require('./element.input.js'), + description: 'Whether the server supports paging on expansion.', + }, + paging: { + type: GraphQLBoolean, + description: 'Whether the server supports paging on expansion.', + }, + _incomplete: { + type: require('./element.input.js'), + description: 'Allow request for incomplete expansions?', + }, + incomplete: { + type: GraphQLBoolean, + description: 'Allow request for incomplete expansions?', + }, + parameter: { + type: new GraphQLList( + require('./terminologycapabilitiesexpansionparameter.input.js'), + ), + description: 'Supported expansion parameter.', + }, + _textFilter: { + type: require('./element.input.js'), + description: 'Documentation about text searching works.', + }, + textFilter: { + type: GraphQLString, + description: 'Documentation about text searching works.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiesexpansionparameter.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiesexpansionparameter.input.js new file mode 100644 index 00000000..1c9c4d20 --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiesexpansionparameter.input.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiesexpansionparameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiesexpansionparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Expansion Parameter name.', + }, + name: { + type: new GraphQLNonNull(CodeScalar), + description: 'Expansion Parameter name.', + }, + _documentation: { + type: require('./element.input.js'), + description: 'Description of support for parameter.', + }, + documentation: { + type: GraphQLString, + description: 'Description of support for parameter.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiesimplementation.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiesimplementation.input.js new file mode 100644 index 00000000..bfdddc0d --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiesimplementation.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiesimplementation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiesimplementation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.input.js'), + description: + 'Information about the specific installation that this terminology capability statement relates to.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Information about the specific installation that this terminology capability statement relates to.', + }, + _url: { + type: require('./element.input.js'), + description: 'An absolute base URL for the implementation.', + }, + url: { + type: UrlScalar, + description: 'An absolute base URL for the implementation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiessoftware.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiessoftware.input.js new file mode 100644 index 00000000..83c64b87 --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiessoftware.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiessoftware Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiessoftware_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Name the software is known by.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name the software is known by.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version identifier for the software covered by this statement.', + }, + version: { + type: GraphQLString, + description: + 'The version identifier for the software covered by this statement.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiestranslation.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiestranslation.input.js new file mode 100644 index 00000000..811b0cd5 --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiestranslation.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiestranslation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiestranslation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _needsMap: { + type: require('./element.input.js'), + description: 'Whether the client must identify the map.', + }, + needsMap: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether the client must identify the map.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/terminologycapabilitiesvalidatecode.input.js b/src/resources/4_0_0/inputs/terminologycapabilitiesvalidatecode.input.js new file mode 100644 index 00000000..069ddd2a --- /dev/null +++ b/src/resources/4_0_0/inputs/terminologycapabilitiesvalidatecode.input.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiesvalidateCode Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TerminologyCapabilitiesvalidateCode_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _translations: { + type: require('./element.input.js'), + description: 'Whether translations are validated.', + }, + translations: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether translations are validated.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreport.input.js b/src/resources/4_0_0/inputs/testreport.input.js new file mode 100644 index 00000000..32152287 --- /dev/null +++ b/src/resources/4_0_0/inputs/testreport.input.js @@ -0,0 +1,171 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary TestReport Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReport_Input', + description: + 'A summary of information based on the results of executing a TestScript.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestReport_Enum_input', + values: { TestReport: { value: 'TestReport' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A free text natural language name identifying the executed TestScript.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name identifying the executed TestScript.', + }, + _status: { + type: require('./element.input.js'), + description: 'The current state of this test report.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of this test report.', + }, + testScript: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.', + }, + _result: { + type: require('./element.input.js'), + description: 'The overall result from the execution of the TestScript.', + }, + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The overall result from the execution of the TestScript.', + }, + _score: { + type: require('./element.input.js'), + description: + 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', + }, + score: { + type: GraphQLFloat, + description: + 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', + }, + _tester: { + type: require('./element.input.js'), + description: + 'Name of the tester producing this report (Organization or individual).', + }, + tester: { + type: GraphQLString, + description: + 'Name of the tester producing this report (Organization or individual).', + }, + _issued: { + type: require('./element.input.js'), + description: + 'When the TestScript was executed and this TestReport was generated.', + }, + issued: { + type: DateTimeScalar, + description: + 'When the TestScript was executed and this TestReport was generated.', + }, + participant: { + type: new GraphQLList(require('./testreportparticipant.input.js')), + description: + 'A participant in the test execution, either the execution engine, a client, or a server.', + }, + setup: { + type: require('./testreportsetup.input.js'), + description: + 'The results of the series of required setup operations before the tests were executed.', + }, + test: { + type: new GraphQLList(require('./testreporttest.input.js')), + description: 'A test executed from the test script.', + }, + teardown: { + type: require('./testreportteardown.input.js'), + description: + 'The results of the series of operations required to clean up after all the tests were executed (successfully or otherwise).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreportparticipant.input.js b/src/resources/4_0_0/inputs/testreportparticipant.input.js new file mode 100644 index 00000000..00dcd275 --- /dev/null +++ b/src/resources/4_0_0/inputs/testreportparticipant.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary TestReportparticipant Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReportparticipant_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.input.js'), + description: 'The type of participant.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant.', + }, + _uri: { + type: require('./element.input.js'), + description: 'The uri of the participant. An absolute URL is preferred.', + }, + uri: { + type: new GraphQLNonNull(UriScalar), + description: 'The uri of the participant. An absolute URL is preferred.', + }, + _display: { + type: require('./element.input.js'), + description: 'The display name of the participant.', + }, + display: { + type: GraphQLString, + description: 'The display name of the participant.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreportsetup.input.js b/src/resources/4_0_0/inputs/testreportsetup.input.js new file mode 100644 index 00000000..74419614 --- /dev/null +++ b/src/resources/4_0_0/inputs/testreportsetup.input.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReportsetup Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReportsetup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreportsetupaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreportsetupaction.input.js b/src/resources/4_0_0/inputs/testreportsetupaction.input.js new file mode 100644 index 00000000..b8bb82c4 --- /dev/null +++ b/src/resources/4_0_0/inputs/testreportsetupaction.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReportsetupaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReportsetupaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + operation: { + type: require('./testreportsetupactionoperation.input.js'), + description: 'The operation performed.', + }, + assert: { + type: require('./testreportsetupactionassert.input.js'), + description: + 'The results of the assertion performed on the previous operations.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreportsetupactionassert.input.js b/src/resources/4_0_0/inputs/testreportsetupactionassert.input.js new file mode 100644 index 00000000..390930cf --- /dev/null +++ b/src/resources/4_0_0/inputs/testreportsetupactionassert.input.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary TestReportsetupactionassert Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReportsetupactionassert_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _result: { + type: require('./element.input.js'), + description: 'The result of this assertion.', + }, + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The result of this assertion.', + }, + _message: { + type: require('./element.input.js'), + description: 'An explanatory message associated with the result.', + }, + message: { + type: GraphQLString, + description: 'An explanatory message associated with the result.', + }, + _detail: { + type: require('./element.input.js'), + description: 'A link to further details on the result.', + }, + detail: { + type: GraphQLString, + description: 'A link to further details on the result.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreportsetupactionoperation.input.js b/src/resources/4_0_0/inputs/testreportsetupactionoperation.input.js new file mode 100644 index 00000000..08c1d75c --- /dev/null +++ b/src/resources/4_0_0/inputs/testreportsetupactionoperation.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary TestReportsetupactionoperation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReportsetupactionoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _result: { + type: require('./element.input.js'), + description: 'The result of this operation.', + }, + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The result of this operation.', + }, + _message: { + type: require('./element.input.js'), + description: 'An explanatory message associated with the result.', + }, + message: { + type: GraphQLString, + description: 'An explanatory message associated with the result.', + }, + _detail: { + type: require('./element.input.js'), + description: 'A link to further details on the result.', + }, + detail: { + type: UriScalar, + description: 'A link to further details on the result.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreportteardown.input.js b/src/resources/4_0_0/inputs/testreportteardown.input.js new file mode 100644 index 00000000..08a32b34 --- /dev/null +++ b/src/resources/4_0_0/inputs/testreportteardown.input.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReportteardown Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReportteardown_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreportteardownaction.input.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreportteardownaction.input.js b/src/resources/4_0_0/inputs/testreportteardownaction.input.js new file mode 100644 index 00000000..97f3c948 --- /dev/null +++ b/src/resources/4_0_0/inputs/testreportteardownaction.input.js @@ -0,0 +1,36 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReportteardownaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReportteardownaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreporttest.input.js b/src/resources/4_0_0/inputs/testreporttest.input.js new file mode 100644 index 00000000..c82382b2 --- /dev/null +++ b/src/resources/4_0_0/inputs/testreporttest.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReporttest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReporttest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreporttestaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testreporttestaction.input.js b/src/resources/4_0_0/inputs/testreporttestaction.input.js new file mode 100644 index 00000000..81dc27b2 --- /dev/null +++ b/src/resources/4_0_0/inputs/testreporttestaction.input.js @@ -0,0 +1,36 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReporttestaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestReporttestaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscript.input.js b/src/resources/4_0_0/inputs/testscript.input.js new file mode 100644 index 00000000..466f44de --- /dev/null +++ b/src/resources/4_0_0/inputs/testscript.input.js @@ -0,0 +1,259 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary TestScript Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScript_Input', + description: + 'A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestScript_Enum_input', + values: { TestScript: { value: 'TestScript' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.', + }, + identifier: { + type: require('./identifier.input.js'), + description: + 'A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the test script.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the test script.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this test script. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this test script. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + 'The date (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the test script.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the test script.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the test script from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the test script from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the test script is intended to be used.', + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this test script is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this test script is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', + }, + origin: { + type: new GraphQLList(require('./testscriptorigin.input.js')), + description: + 'An abstract server used in operations within this test script in the origin element.', + }, + destination: { + type: new GraphQLList(require('./testscriptdestination.input.js')), + description: + 'An abstract server used in operations within this test script in the destination element.', + }, + metadata: { + type: require('./testscriptmetadata.input.js'), + description: + 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', + }, + fixture: { + type: new GraphQLList(require('./testscriptfixture.input.js')), + description: + 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', + }, + profile: { + type: new GraphQLList(GraphQLString), + description: 'Reference to the profile to be used for validation.', + }, + variable: { + type: new GraphQLList(require('./testscriptvariable.input.js')), + description: + 'Variable is set based either on element value in response body or on header field value in the response headers.', + }, + setup: { + type: require('./testscriptsetup.input.js'), + description: + 'A series of required setup operations before tests are executed.', + }, + test: { + type: new GraphQLList(require('./testscripttest.input.js')), + description: 'A test in this script.', + }, + teardown: { + type: require('./testscriptteardown.input.js'), + description: + 'A series of operations required to clean up after all the tests are executed (successfully or otherwise).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptdestination.input.js b/src/resources/4_0_0/inputs/testscriptdestination.input.js new file mode 100644 index 00000000..97b46664 --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptdestination.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptdestination Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptdestination_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _index: { + type: require('./element.input.js'), + description: + 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', + }, + index: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', + }, + profile: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The type of destination profile the test system supports.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptfixture.input.js b/src/resources/4_0_0/inputs/testscriptfixture.input.js new file mode 100644 index 00000000..34f6147f --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptfixture.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptfixture Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptfixture_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _autocreate: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + autocreate: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + _autodelete: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + autodelete: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + resource: { + type: GraphQLString, + description: + 'Reference to the resource (containing the contents of the resource needed for operations).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptmetadata.input.js b/src/resources/4_0_0/inputs/testscriptmetadata.input.js new file mode 100644 index 00000000..e31ab09f --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptmetadata.input.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptmetadata Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptmetadata_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + link: { + type: new GraphQLList(require('./testscriptmetadatalink.input.js')), + description: + 'A link to the FHIR specification that this test is covering.', + }, + capability: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptmetadatacapability.input.js')), + ), + description: + 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptmetadatacapability.input.js b/src/resources/4_0_0/inputs/testscriptmetadatacapability.input.js new file mode 100644 index 00000000..ce1cdd14 --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptmetadatacapability.input.js @@ -0,0 +1,107 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary TestScriptmetadatacapability Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptmetadatacapability_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _required: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + required: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + _validated: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + validated: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + _description: { + type: require('./element.input.js'), + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + description: { + type: GraphQLString, + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + _origin: { + type: require('./element.input.js'), + description: 'Which origin server these requirements apply to.', + }, + origin: { + type: new GraphQLList(GraphQLInt), + description: 'Which origin server these requirements apply to.', + }, + _destination: { + type: require('./element.input.js'), + description: 'Which server these requirements apply to.', + }, + destination: { + type: GraphQLInt, + description: 'Which server these requirements apply to.', + }, + _link: { + type: require('./element.input.js'), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + link: { + type: new GraphQLList(UriScalar), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + _capabilities: { + type: require('./element.input.js'), + description: + 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', + }, + capabilities: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptmetadatalink.input.js b/src/resources/4_0_0/inputs/testscriptmetadatalink.input.js new file mode 100644 index 00000000..edd2e40d --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptmetadatalink.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary TestScriptmetadatalink Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptmetadatalink_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + _description: { + type: require('./element.input.js'), + description: 'Short description of the link.', + }, + description: { + type: GraphQLString, + description: 'Short description of the link.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptorigin.input.js b/src/resources/4_0_0/inputs/testscriptorigin.input.js new file mode 100644 index 00000000..c91f53fb --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptorigin.input.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptorigin Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptorigin_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _index: { + type: require('./element.input.js'), + description: + 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', + }, + index: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', + }, + profile: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: 'The type of origin profile the test system supports.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptsetup.input.js b/src/resources/4_0_0/inputs/testscriptsetup.input.js new file mode 100644 index 00000000..f0d41e19 --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptsetup.input.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptsetup Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptsetup_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptsetupaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptsetupaction.input.js b/src/resources/4_0_0/inputs/testscriptsetupaction.input.js new file mode 100644 index 00000000..76c1954a --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptsetupaction.input.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptsetupaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptsetupaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + operation: { + type: require('./testscriptsetupactionoperation.input.js'), + description: 'The operation to perform.', + }, + assert: { + type: require('./testscriptsetupactionassert.input.js'), + description: + 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptsetupactionassert.input.js b/src/resources/4_0_0/inputs/testscriptsetupactionassert.input.js new file mode 100644 index 00000000..23b0c0ee --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptsetupactionassert.input.js @@ -0,0 +1,250 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary TestScriptsetupactionassert Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptsetupactionassert_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _label: { + type: require('./element.input.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _direction: { + type: require('./element.input.js'), + description: 'The direction to use for the assertion.', + }, + direction: { + type: CodeScalar, + description: 'The direction to use for the assertion.', + }, + _compareToSourceId: { + type: require('./element.input.js'), + description: + "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", + }, + compareToSourceId: { + type: GraphQLString, + description: + "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", + }, + _compareToSourceExpression: { + type: require('./element.input.js'), + description: + 'The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + compareToSourceExpression: { + type: GraphQLString, + description: + 'The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + _compareToSourcePath: { + type: require('./element.input.js'), + description: + 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + compareToSourcePath: { + type: GraphQLString, + description: + 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + _contentType: { + type: require('./element.input.js'), + description: + "The mime-type contents to compare against the request or response message 'Content-Type' header.", + }, + contentType: { + type: CodeScalar, + description: + "The mime-type contents to compare against the request or response message 'Content-Type' header.", + }, + _expression: { + type: require('./element.input.js'), + description: + 'The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.', + }, + expression: { + type: GraphQLString, + description: + 'The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.', + }, + _headerField: { + type: require('./element.input.js'), + description: "The HTTP header field name e.g. 'Location'.", + }, + headerField: { + type: GraphQLString, + description: "The HTTP header field name e.g. 'Location'.", + }, + _minimumId: { + type: require('./element.input.js'), + description: + 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', + }, + minimumId: { + type: GraphQLString, + description: + 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', + }, + _navigationLinks: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + navigationLinks: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + _operator: { + type: require('./element.input.js'), + description: + 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', + }, + operator: { + type: CodeScalar, + description: + 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', + }, + _path: { + type: require('./element.input.js'), + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + path: { + type: GraphQLString, + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + _requestMethod: { + type: require('./element.input.js'), + description: + 'The request method or HTTP operation code to compare against that used by the client system under test.', + }, + requestMethod: { + type: CodeScalar, + description: + 'The request method or HTTP operation code to compare against that used by the client system under test.', + }, + _requestURL: { + type: require('./element.input.js'), + description: + 'The value to use in a comparison against the request URL path string.', + }, + requestURL: { + type: GraphQLString, + description: + 'The value to use in a comparison against the request URL path string.', + }, + _resource: { + type: require('./element.input.js'), + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + _response: { + type: require('./element.input.js'), + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + response: { + type: CodeScalar, + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + _responseCode: { + type: require('./element.input.js'), + description: 'The value of the HTTP response code to be tested.', + }, + responseCode: { + type: GraphQLString, + description: 'The value of the HTTP response code to be tested.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + _validateProfileId: { + type: require('./element.input.js'), + description: 'The ID of the Profile to validate against.', + }, + validateProfileId: { + type: IdScalar, + description: 'The ID of the Profile to validate against.', + }, + _value: { + type: require('./element.input.js'), + description: 'The value to compare to.', + }, + value: { + type: GraphQLString, + description: 'The value to compare to.', + }, + _warningOnly: { + type: require('./element.input.js'), + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + warningOnly: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptsetupactionoperation.input.js b/src/resources/4_0_0/inputs/testscriptsetupactionoperation.input.js new file mode 100644 index 00000000..4d099ea3 --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptsetupactionoperation.input.js @@ -0,0 +1,195 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary TestScriptsetupactionoperation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptsetupactionoperation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./coding.input.js'), + description: 'Server interaction or operation type.', + }, + _resource: { + type: require('./element.input.js'), + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + _label: { + type: require('./element.input.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _accept: { + type: require('./element.input.js'), + description: + "The mime-type to use for RESTful operation in the 'Accept' header.", + }, + accept: { + type: CodeScalar, + description: + "The mime-type to use for RESTful operation in the 'Accept' header.", + }, + _contentType: { + type: require('./element.input.js'), + description: + "The mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + contentType: { + type: CodeScalar, + description: + "The mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _destination: { + type: require('./element.input.js'), + description: + 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', + }, + destination: { + type: GraphQLInt, + description: + 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', + }, + _encodeRequestUrl: { + type: require('./element.input.js'), + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + encodeRequestUrl: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + _method: { + type: require('./element.input.js'), + description: + 'The HTTP method the test engine MUST use for this operation regardless of any other operation details.', + }, + method: { + type: CodeScalar, + description: + 'The HTTP method the test engine MUST use for this operation regardless of any other operation details.', + }, + _origin: { + type: require('./element.input.js'), + description: + 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', + }, + origin: { + type: GraphQLInt, + description: + 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', + }, + _params: { + type: require('./element.input.js'), + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + params: { + type: GraphQLString, + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + requestHeader: { + type: new GraphQLList( + require('./testscriptsetupactionoperationrequestheader.input.js'), + ), + description: 'Header elements would be used to set HTTP headers.', + }, + _requestId: { + type: require('./element.input.js'), + description: 'The fixture id (maybe new) to map to the request.', + }, + requestId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the request.', + }, + _responseId: { + type: require('./element.input.js'), + description: 'The fixture id (maybe new) to map to the response.', + }, + responseId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the response.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + sourceId: { + type: IdScalar, + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + _targetId: { + type: require('./element.input.js'), + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + targetId: { + type: IdScalar, + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + _url: { + type: require('./element.input.js'), + description: 'Complete request URL.', + }, + url: { + type: GraphQLString, + description: 'Complete request URL.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptsetupactionoperationrequestheader.input.js b/src/resources/4_0_0/inputs/testscriptsetupactionoperationrequestheader.input.js new file mode 100644 index 00000000..3284cbcc --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptsetupactionoperationrequestheader.input.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptsetupactionoperationrequestHeader Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptsetupactionoperationrequestHeader_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _field: { + type: require('./element.input.js'), + description: "The HTTP header field e.g. 'Accept'.", + }, + field: { + type: new GraphQLNonNull(GraphQLString), + description: "The HTTP header field e.g. 'Accept'.", + }, + _value: { + type: require('./element.input.js'), + description: "The value of the header e.g. 'application/fhir+xml'.", + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: "The value of the header e.g. 'application/fhir+xml'.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptteardown.input.js b/src/resources/4_0_0/inputs/testscriptteardown.input.js new file mode 100644 index 00000000..a5c13903 --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptteardown.input.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptteardown Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptteardown_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptteardownaction.input.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptteardownaction.input.js b/src/resources/4_0_0/inputs/testscriptteardownaction.input.js new file mode 100644 index 00000000..d087c045 --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptteardownaction.input.js @@ -0,0 +1,36 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptteardownaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptteardownaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscripttest.input.js b/src/resources/4_0_0/inputs/testscripttest.input.js new file mode 100644 index 00000000..446ef281 --- /dev/null +++ b/src/resources/4_0_0/inputs/testscripttest.input.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScripttest Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScripttest_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscripttestaction.input.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscripttestaction.input.js b/src/resources/4_0_0/inputs/testscripttestaction.input.js new file mode 100644 index 00000000..ff0c24cc --- /dev/null +++ b/src/resources/4_0_0/inputs/testscripttestaction.input.js @@ -0,0 +1,36 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScripttestaction Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScripttestaction_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/testscriptvariable.input.js b/src/resources/4_0_0/inputs/testscriptvariable.input.js new file mode 100644 index 00000000..96344992 --- /dev/null +++ b/src/resources/4_0_0/inputs/testscriptvariable.input.js @@ -0,0 +1,116 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary TestScriptvariable Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TestScriptvariable_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: 'Descriptive name for this variable.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Descriptive name for this variable.', + }, + _defaultValue: { + type: require('./element.input.js'), + description: + 'A default, hard-coded, or user-defined value for this variable.', + }, + defaultValue: { + type: GraphQLString, + description: + 'A default, hard-coded, or user-defined value for this variable.', + }, + _description: { + type: require('./element.input.js'), + description: + 'A free text natural language description of the variable and its purpose.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the variable and its purpose.', + }, + _expression: { + type: require('./element.input.js'), + description: + 'The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + expression: { + type: GraphQLString, + description: + 'The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + _headerField: { + type: require('./element.input.js'), + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + headerField: { + type: GraphQLString, + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + _hint: { + type: require('./element.input.js'), + description: + 'Displayable text string with hint help information to the user when entering a default value.', + }, + hint: { + type: GraphQLString, + description: + 'Displayable text string with hint help information to the user when entering a default value.', + }, + _path: { + type: require('./element.input.js'), + description: + 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + path: { + type: GraphQLString, + description: + 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + _sourceId: { + type: require('./element.input.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/timing.input.js b/src/resources/4_0_0/inputs/timing.input.js new file mode 100644 index 00000000..e99cbd5f --- /dev/null +++ b/src/resources/4_0_0/inputs/timing.input.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Timing Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Timing_Input', + description: + 'Base StructureDefinition for Timing Type: Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _event: { + type: require('./element.input.js'), + description: 'Identifies specific times when the event occurs.', + }, + event: { + type: new GraphQLList(DateTimeScalar), + description: 'Identifies specific times when the event occurs.', + }, + repeat: { + type: require('./element.input.js'), + description: 'A set of rules that describe when the event is scheduled.', + }, + code: { + type: require('./codeableconcept.input.js'), + description: + 'A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/timingrepeat.input.js b/src/resources/4_0_0/inputs/timingrepeat.input.js new file mode 100644 index 00000000..bc66343e --- /dev/null +++ b/src/resources/4_0_0/inputs/timingrepeat.input.js @@ -0,0 +1,185 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Timingrepeat Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'Timingrepeat_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + boundsDuration: { + type: require('./duration.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsRange: { + type: require('./range.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsPeriod: { + type: require('./period.input.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + _count: { + type: require('./element.input.js'), + description: + 'A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values.', + }, + count: { + type: PositiveIntScalar, + description: + 'A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values.', + }, + _countMax: { + type: require('./element.input.js'), + description: + 'If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.', + }, + countMax: { + type: PositiveIntScalar, + description: + 'If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.', + }, + _duration: { + type: require('./element.input.js'), + description: + 'How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration.', + }, + duration: { + type: GraphQLFloat, + description: + 'How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration.', + }, + _durationMax: { + type: require('./element.input.js'), + description: + 'If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.', + }, + durationMax: { + type: GraphQLFloat, + description: + 'If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.', + }, + _durationUnit: { + type: require('./element.input.js'), + description: 'The units of time for the duration, in UCUM units.', + }, + durationUnit: { + type: CodeScalar, + description: 'The units of time for the duration, in UCUM units.', + }, + _frequency: { + type: require('./element.input.js'), + description: + 'The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency.', + }, + frequency: { + type: PositiveIntScalar, + description: + 'The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency.', + }, + _frequencyMax: { + type: require('./element.input.js'), + description: + 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + frequencyMax: { + type: PositiveIntScalar, + description: + 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + _period: { + type: require('./element.input.js'), + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.", + }, + period: { + type: GraphQLFloat, + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.", + }, + _periodMax: { + type: require('./element.input.js'), + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + periodMax: { + type: GraphQLFloat, + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + _periodUnit: { + type: require('./element.input.js'), + description: 'The units of time for the period in UCUM units.', + }, + periodUnit: { + type: CodeScalar, + description: 'The units of time for the period in UCUM units.', + }, + _dayOfWeek: { + type: require('./element.input.js'), + description: + 'If one or more days of week is provided, then the action happens only on the specified day(s).', + }, + dayOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'If one or more days of week is provided, then the action happens only on the specified day(s).', + }, + _timeOfDay: { + type: require('./element.input.js'), + description: 'Specified time of day for action to take place.', + }, + timeOfDay: { + type: new GraphQLList(TimeScalar), + description: 'Specified time of day for action to take place.', + }, + _when: { + type: require('./element.input.js'), + description: + 'An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.', + }, + when: { + type: new GraphQLList(CodeScalar), + description: + 'An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.', + }, + _offset: { + type: require('./element.input.js'), + description: + 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', + }, + offset: { + type: UnsignedIntScalar, + description: + 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/triggerdefinition.input.js b/src/resources/4_0_0/inputs/triggerdefinition.input.js new file mode 100644 index 00000000..e403a91d --- /dev/null +++ b/src/resources/4_0_0/inputs/triggerdefinition.input.js @@ -0,0 +1,88 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary TriggerDefinition Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'TriggerDefinition_Input', + description: + 'Base StructureDefinition for TriggerDefinition Type: A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.input.js'), + description: 'The type of triggering event.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of triggering event.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.', + }, + name: { + type: GraphQLString, + description: + 'A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.', + }, + timingTiming: { + type: require('./timing.input.js'), + description: 'The timing of the event (if this is a periodic trigger).', + }, + timingReference: { + type: GraphQLString, + description: 'The timing of the event (if this is a periodic trigger).', + }, + _timingDate: { + type: require('./element.input.js'), + description: 'The timing of the event (if this is a periodic trigger).', + }, + timingDate: { + type: DateScalar, + description: 'The timing of the event (if this is a periodic trigger).', + }, + _timingDateTime: { + type: require('./element.input.js'), + description: 'The timing of the event (if this is a periodic trigger).', + }, + timingDateTime: { + type: DateTimeScalar, + description: 'The timing of the event (if this is a periodic trigger).', + }, + data: { + type: new GraphQLList(require('./datarequirement.input.js')), + description: + 'The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true.', + }, + condition: { + type: require('./expression.input.js'), + description: + 'A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/usagecontext.input.js b/src/resources/4_0_0/inputs/usagecontext.input.js new file mode 100644 index 00000000..9d18caf8 --- /dev/null +++ b/src/resources/4_0_0/inputs/usagecontext.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary UsageContext Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'UsageContext_Input', + description: + 'Base StructureDefinition for UsageContext Type: Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + code: { + type: new GraphQLNonNull(require('./coding.input.js')), + description: + 'A code that identifies the type of context being specified by this usage context.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.input.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.input.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + valueReference: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valueset.input.js b/src/resources/4_0_0/inputs/valueset.input.js new file mode 100644 index 00000000..ddde55b5 --- /dev/null +++ b/src/resources/4_0_0/inputs/valueset.input.js @@ -0,0 +1,236 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ValueSet Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSet_Input', + description: + 'A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ValueSet_Enum_input', + values: { ValueSet: { value: 'ValueSet' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.input.js'), + description: + 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: + 'A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.input.js'), + description: + 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.input.js'), + description: + 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.input.js'), + description: + 'A short, descriptive, user-friendly title for the value set.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the value set.', + }, + _status: { + type: require('./element.input.js'), + description: + 'The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.', + }, + _experimental: { + type: require('./element.input.js'), + description: + 'A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.input.js'), + description: + "The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", + }, + date: { + type: DateTimeScalar, + description: + "The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", + }, + _publisher: { + type: require('./element.input.js'), + description: + 'The name of the organization or individual that published the value set.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the value set.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.input.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.input.js'), + description: + "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.input.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'A legal or geographic region in which the value set is intended to be used.', + }, + _immutable: { + type: require('./element.input.js'), + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + immutable: { + type: GraphQLBoolean, + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + _purpose: { + type: require('./element.input.js'), + description: + 'Explanation of why this value set is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this value set is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.input.js'), + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + compose: { + type: require('./valuesetcompose.input.js'), + description: + 'A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).', + }, + expansion: { + type: require('./valuesetexpansion.input.js'), + description: + "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valuesetcompose.input.js b/src/resources/4_0_0/inputs/valuesetcompose.input.js new file mode 100644 index 00000000..da0d753e --- /dev/null +++ b/src/resources/4_0_0/inputs/valuesetcompose.input.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ValueSetcompose Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSetcompose_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _lockedDate: { + type: require('./element.input.js'), + description: + 'The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.', + }, + lockedDate: { + type: DateScalar, + description: + 'The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.', + }, + _inactive: { + type: require('./element.input.js'), + description: + 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).', + }, + inactive: { + type: GraphQLBoolean, + description: + 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).', + }, + include: { + type: new GraphQLList( + new GraphQLNonNull(require('./valuesetcomposeinclude.input.js')), + ), + description: + 'Include one or more codes from a code system or other value set(s).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valuesetcomposeinclude.input.js b/src/resources/4_0_0/inputs/valuesetcomposeinclude.input.js new file mode 100644 index 00000000..f1e00253 --- /dev/null +++ b/src/resources/4_0_0/inputs/valuesetcomposeinclude.input.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ValueSetcomposeinclude Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSetcomposeinclude_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + _version: { + type: require('./element.input.js'), + description: + "The version of the code system that the codes are selected from, or the special version '*' for all versions.", + }, + version: { + type: GraphQLString, + description: + "The version of the code system that the codes are selected from, or the special version '*' for all versions.", + }, + concept: { + type: new GraphQLList( + require('./valuesetcomposeincludeconcept.input.js'), + ), + description: 'Specifies a concept to be included or excluded.', + }, + filter: { + type: new GraphQLList(require('./valuesetcomposeincludefilter.input.js')), + description: + 'Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.', + }, + _valueSet: { + type: require('./element.input.js'), + description: + 'Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.', + }, + valueSet: { + type: new GraphQLList(CanonicalScalar), + description: + 'Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valuesetcomposeincludeconcept.input.js b/src/resources/4_0_0/inputs/valuesetcomposeincludeconcept.input.js new file mode 100644 index 00000000..87420ec1 --- /dev/null +++ b/src/resources/4_0_0/inputs/valuesetcomposeincludeconcept.input.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ValueSetcomposeincludeconcept Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSetcomposeincludeconcept_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.input.js'), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + _display: { + type: require('./element.input.js'), + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + display: { + type: GraphQLString, + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + designation: { + type: new GraphQLList( + require('./valuesetcomposeincludeconceptdesignation.input.js'), + ), + description: + 'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valuesetcomposeincludeconceptdesignation.input.js b/src/resources/4_0_0/inputs/valuesetcomposeincludeconceptdesignation.input.js new file mode 100644 index 00000000..94dfbef8 --- /dev/null +++ b/src/resources/4_0_0/inputs/valuesetcomposeincludeconceptdesignation.input.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ValueSetcomposeincludeconceptdesignation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSetcomposeincludeconceptdesignation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _language: { + type: require('./element.input.js'), + description: 'The language this designation is defined for.', + }, + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + use: { + type: require('./coding.input.js'), + description: 'A code that represents types of uses of designations.', + }, + _value: { + type: require('./element.input.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valuesetcomposeincludefilter.input.js b/src/resources/4_0_0/inputs/valuesetcomposeincludefilter.input.js new file mode 100644 index 00000000..67fafde5 --- /dev/null +++ b/src/resources/4_0_0/inputs/valuesetcomposeincludefilter.input.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ValueSetcomposeincludefilter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSetcomposeincludefilter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _property: { + type: require('./element.input.js'), + description: + 'A code that identifies a property or a filter defined in the code system.', + }, + property: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that identifies a property or a filter defined in the code system.', + }, + _op: { + type: require('./element.input.js'), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + op: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + _value: { + type: require('./element.input.js'), + description: + "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valuesetexpansion.input.js b/src/resources/4_0_0/inputs/valuesetexpansion.input.js new file mode 100644 index 00000000..02eaa6bf --- /dev/null +++ b/src/resources/4_0_0/inputs/valuesetexpansion.input.js @@ -0,0 +1,89 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ValueSetexpansion Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSetexpansion_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _identifier: { + type: require('./element.input.js'), + description: + 'An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.', + }, + identifier: { + type: UriScalar, + description: + 'An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.', + }, + _timestamp: { + type: require('./element.input.js'), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + timestamp: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + _total: { + type: require('./element.input.js'), + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + total: { + type: GraphQLInt, + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + _offset: { + type: require('./element.input.js'), + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.', + }, + offset: { + type: GraphQLInt, + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.', + }, + parameter: { + type: new GraphQLList(require('./valuesetexpansionparameter.input.js')), + description: + 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', + }, + contains: { + type: new GraphQLList(require('./valuesetexpansioncontains.input.js')), + description: 'The codes that are contained in the value set expansion.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valuesetexpansioncontains.input.js b/src/resources/4_0_0/inputs/valuesetexpansioncontains.input.js new file mode 100644 index 00000000..c3023d7b --- /dev/null +++ b/src/resources/4_0_0/inputs/valuesetexpansioncontains.input.js @@ -0,0 +1,97 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ValueSetexpansioncontains Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSetexpansioncontains_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _system: { + type: require('./element.input.js'), + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + _abstract: { + type: require('./element.input.js'), + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + abstract: { + type: GraphQLBoolean, + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + _inactive: { + type: require('./element.input.js'), + description: + 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).', + }, + inactive: { + type: GraphQLBoolean, + description: + 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).', + }, + _version: { + type: require('./element.input.js'), + description: + 'The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + _code: { + type: require('./element.input.js'), + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + code: { + type: CodeScalar, + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + _display: { + type: require('./element.input.js'), + description: 'The recommended display for this item in the expansion.', + }, + display: { + type: GraphQLString, + description: 'The recommended display for this item in the expansion.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/valuesetexpansionparameter.input.js b/src/resources/4_0_0/inputs/valuesetexpansionparameter.input.js new file mode 100644 index 00000000..3659fa20 --- /dev/null +++ b/src/resources/4_0_0/inputs/valuesetexpansionparameter.input.js @@ -0,0 +1,109 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ValueSetexpansionparameter Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'ValueSetexpansionparameter_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.input.js'), + description: + 'Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.', + }, + _valueString: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueString: { + type: GraphQLString, + description: 'The value of the parameter.', + }, + _valueBoolean: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the parameter.', + }, + _valueInteger: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueInteger: { + type: GraphQLInt, + description: 'The value of the parameter.', + }, + _valueDecimal: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'The value of the parameter.', + }, + _valueUri: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueUri: { + type: UriScalar, + description: 'The value of the parameter.', + }, + _valueCode: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueCode: { + type: CodeScalar, + description: 'The value of the parameter.', + }, + _valueDateTime: { + type: require('./element.input.js'), + description: 'The value of the parameter.', + }, + valueDateTime: { + type: DateTimeScalar, + description: 'The value of the parameter.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/verificationresult.input.js b/src/resources/4_0_0/inputs/verificationresult.input.js new file mode 100644 index 00000000..1b88af33 --- /dev/null +++ b/src/resources/4_0_0/inputs/verificationresult.input.js @@ -0,0 +1,175 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary VerificationResult Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'VerificationResult_Input', + description: + 'Describes validation requirements, source(s), status and dates for one or more elements.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'VerificationResult_Enum_input', + values: { VerificationResult: { value: 'VerificationResult' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + target: { + type: new GraphQLList(GraphQLString), + description: 'A resource that was validated.', + }, + _targetLocation: { + type: require('./element.input.js'), + description: + 'The fhirpath location(s) within the resource that was validated.', + }, + targetLocation: { + type: new GraphQLList(GraphQLString), + description: + 'The fhirpath location(s) within the resource that was validated.', + }, + need: { + type: require('./codeableconcept.input.js'), + description: + 'The frequency with which the target must be validated (none; initial; periodic).', + }, + _status: { + type: require('./element.input.js'), + description: + 'The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).', + }, + _statusDate: { + type: require('./element.input.js'), + description: 'When the validation status was updated.', + }, + statusDate: { + type: DateTimeScalar, + description: 'When the validation status was updated.', + }, + validationType: { + type: require('./codeableconcept.input.js'), + description: + 'What the target is validated against (nothing; primary source; multiple sources).', + }, + validationProcess: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).', + }, + frequency: { + type: require('./timing.input.js'), + description: 'Frequency of revalidation.', + }, + _lastPerformed: { + type: require('./element.input.js'), + description: + 'The date/time validation was last completed (including failed validations).', + }, + lastPerformed: { + type: DateTimeScalar, + description: + 'The date/time validation was last completed (including failed validations).', + }, + _nextScheduled: { + type: require('./element.input.js'), + description: 'The date when target is next validated, if appropriate.', + }, + nextScheduled: { + type: DateScalar, + description: 'The date when target is next validated, if appropriate.', + }, + failureAction: { + type: require('./codeableconcept.input.js'), + description: + 'The result if validation fails (fatal; warning; record only; none).', + }, + primarySource: { + type: new GraphQLList( + require('./verificationresultprimarysource.input.js'), + ), + description: + 'Information about the primary source(s) involved in validation.', + }, + attestation: { + type: require('./verificationresultattestation.input.js'), + description: 'Information about the entity attesting to information.', + }, + validator: { + type: new GraphQLList(require('./verificationresultvalidator.input.js')), + description: 'Information about the entity validating information.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/verificationresultattestation.input.js b/src/resources/4_0_0/inputs/verificationresultattestation.input.js new file mode 100644 index 00000000..d8594fe9 --- /dev/null +++ b/src/resources/4_0_0/inputs/verificationresultattestation.input.js @@ -0,0 +1,89 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary VerificationResultattestation Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'VerificationResultattestation_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + who: { + type: GraphQLString, + description: 'The individual or organization attesting to information.', + }, + onBehalfOf: { + type: GraphQLString, + description: + 'When the who is asserting on behalf of another (organization or individual).', + }, + communicationMethod: { + type: require('./codeableconcept.input.js'), + description: + 'The method by which attested information was submitted/retrieved (manual; API; Push).', + }, + _date: { + type: require('./element.input.js'), + description: 'The date the information was attested to.', + }, + date: { + type: DateScalar, + description: 'The date the information was attested to.', + }, + _sourceIdentityCertificate: { + type: require('./element.input.js'), + description: + 'A digital identity certificate associated with the attestation source.', + }, + sourceIdentityCertificate: { + type: GraphQLString, + description: + 'A digital identity certificate associated with the attestation source.', + }, + _proxyIdentityCertificate: { + type: require('./element.input.js'), + description: + 'A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.', + }, + proxyIdentityCertificate: { + type: GraphQLString, + description: + 'A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.', + }, + proxySignature: { + type: require('./signature.input.js'), + description: + 'Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.', + }, + sourceSignature: { + type: require('./signature.input.js'), + description: + 'Signed assertion by the attestation source that they have attested to the information.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/verificationresultprimarysource.input.js b/src/resources/4_0_0/inputs/verificationresultprimarysource.input.js new file mode 100644 index 00000000..53491032 --- /dev/null +++ b/src/resources/4_0_0/inputs/verificationresultprimarysource.input.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInputObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary VerificationResultprimarySource Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'VerificationResultprimarySource_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + who: { + type: GraphQLString, + description: 'Reference to the primary source.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).', + }, + communicationMethod: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Method for communicating with the primary source (manual; API; Push).', + }, + validationStatus: { + type: require('./codeableconcept.input.js'), + description: + 'Status of the validation of the target against the primary source (successful; failed; unknown).', + }, + _validationDate: { + type: require('./element.input.js'), + description: 'When the target was validated against the primary source.', + }, + validationDate: { + type: DateTimeScalar, + description: 'When the target was validated against the primary source.', + }, + canPushUpdates: { + type: require('./codeableconcept.input.js'), + description: + 'Ability of the primary source to push updates/alerts (yes; no; undetermined).', + }, + pushTypeAvailable: { + type: new GraphQLList(require('./codeableconcept.input.js')), + description: + 'Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/verificationresultvalidator.input.js b/src/resources/4_0_0/inputs/verificationresultvalidator.input.js new file mode 100644 index 00000000..4d81d995 --- /dev/null +++ b/src/resources/4_0_0/inputs/verificationresultvalidator.input.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInputObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary VerificationResultvalidator Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'VerificationResultvalidator_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + organization: { + type: new GraphQLNonNull(GraphQLString), + description: 'Reference to the organization validating information.', + }, + _identityCertificate: { + type: require('./element.input.js'), + description: + 'A digital identity certificate associated with the validator.', + }, + identityCertificate: { + type: GraphQLString, + description: + 'A digital identity certificate associated with the validator.', + }, + attestationSignature: { + type: require('./signature.input.js'), + description: + 'Signed assertion by the validator that they have validated the information.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/visionprescription.input.js b/src/resources/4_0_0/inputs/visionprescription.input.js new file mode 100644 index 00000000..84491bfd --- /dev/null +++ b/src/resources/4_0_0/inputs/visionprescription.input.js @@ -0,0 +1,139 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLString, + GraphQLInputObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary VisionPrescription Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'VisionPrescription_Input', + description: + 'An authorization for the provision of glasses and/or contact lenses to a patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'VisionPrescription_Enum_input', + values: { VisionPrescription: { value: 'VisionPrescription' } }, + }), + ), + 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 might 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _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 can 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. 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 can 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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.input.js')), + description: 'A unique identifier assigned to this vision prescription.', + }, + _status: { + type: require('./element.input.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.input.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + patient: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A resource reference to the person to whom the vision prescription applies.', + }, + encounter: { + type: GraphQLString, + description: + 'A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.', + }, + _dateWritten: { + type: require('./element.input.js'), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + dateWritten: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + prescriber: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The healthcare professional responsible for authorizing the prescription.', + }, + lensSpecification: { + type: new GraphQLList( + new GraphQLNonNull( + require('./visionprescriptionlensspecification.input.js'), + ), + ), + description: + 'Contain the details of the individual lens specifications and serves as the authorization for the fullfillment by certified professionals.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/visionprescriptionlensspecification.input.js b/src/resources/4_0_0/inputs/visionprescriptionlensspecification.input.js new file mode 100644 index 00000000..3b59bef2 --- /dev/null +++ b/src/resources/4_0_0/inputs/visionprescriptionlensspecification.input.js @@ -0,0 +1,144 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInt, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary VisionPrescriptionlensSpecification Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'VisionPrescriptionlensSpecification_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + product: { + type: new GraphQLNonNull(require('./codeableconcept.input.js')), + description: + 'Identifies the type of vision correction product which is required for the patient.', + }, + _eye: { + type: require('./element.input.js'), + description: 'The eye for which the lens specification applies.', + }, + eye: { + type: new GraphQLNonNull(CodeScalar), + description: 'The eye for which the lens specification applies.', + }, + _sphere: { + type: require('./element.input.js'), + description: 'Lens power measured in dioptres (0.25 units).', + }, + sphere: { + type: GraphQLFloat, + description: 'Lens power measured in dioptres (0.25 units).', + }, + _cylinder: { + type: require('./element.input.js'), + description: + 'Power adjustment for astigmatism measured in dioptres (0.25 units).', + }, + cylinder: { + type: GraphQLFloat, + description: + 'Power adjustment for astigmatism measured in dioptres (0.25 units).', + }, + _axis: { + type: require('./element.input.js'), + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + axis: { + type: GraphQLInt, + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + prism: { + type: new GraphQLList( + require('./visionprescriptionlensspecificationprism.input.js'), + ), + description: 'Allows for adjustment on two axis.', + }, + _add: { + type: require('./element.input.js'), + description: + 'Power adjustment for multifocal lenses measured in dioptres (0.25 units).', + }, + add: { + type: GraphQLFloat, + description: + 'Power adjustment for multifocal lenses measured in dioptres (0.25 units).', + }, + _power: { + type: require('./element.input.js'), + description: 'Contact lens power measured in dioptres (0.25 units).', + }, + power: { + type: GraphQLFloat, + description: 'Contact lens power measured in dioptres (0.25 units).', + }, + _backCurve: { + type: require('./element.input.js'), + description: 'Back curvature measured in millimetres.', + }, + backCurve: { + type: GraphQLFloat, + description: 'Back curvature measured in millimetres.', + }, + _diameter: { + type: require('./element.input.js'), + description: 'Contact lens diameter measured in millimetres.', + }, + diameter: { + type: GraphQLFloat, + description: 'Contact lens diameter measured in millimetres.', + }, + duration: { + type: require('./quantity.input.js'), + description: 'The recommended maximum wear period for the lens.', + }, + _color: { + type: require('./element.input.js'), + description: 'Special color or pattern.', + }, + color: { + type: GraphQLString, + description: 'Special color or pattern.', + }, + _brand: { + type: require('./element.input.js'), + description: 'Brand recommendations or restrictions.', + }, + brand: { + type: GraphQLString, + description: 'Brand recommendations or restrictions.', + }, + note: { + type: new GraphQLList(require('./annotation.input.js')), + description: + 'Notes for special requirements such as coatings and lens materials.', + }, + }), +}); diff --git a/src/resources/4_0_0/inputs/visionprescriptionlensspecificationprism.input.js b/src/resources/4_0_0/inputs/visionprescriptionlensspecificationprism.input.js new file mode 100644 index 00000000..70f7d96d --- /dev/null +++ b/src/resources/4_0_0/inputs/visionprescriptionlensspecificationprism.input.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInputObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary VisionPrescriptionlensSpecificationprism Input Schema + */ +module.exports = new GraphQLInputObjectType({ + name: 'VisionPrescriptionlensSpecificationprism_Input', + description: '', + fields: () => ({ + _id: { + type: require('./element.input.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + 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 element. 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 can 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 element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _amount: { + type: require('./element.input.js'), + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + amount: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + _base: { + type: require('./element.input.js'), + description: 'The relative base, or reference lens edge, for the prism.', + }, + base: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relative base, or reference lens edge, for the prism.', + }, + }), +}); diff --git a/src/resources/4_0_0/parameters/account.parameters.js b/src/resources/4_0_0/parameters/account.parameters.js new file mode 100644 index 00000000..4b7d5082 --- /dev/null +++ b/src/resources/4_0_0/parameters/account.parameters.js @@ -0,0 +1,67 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the account query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Account-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Account.identifier', + description: 'Account number', + }, + // http://hl7.org/fhir/SearchParameter/Account-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Account.name', + description: 'Human-readable label', + }, + // http://hl7.org/fhir/SearchParameter/Account-owner + owner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Account.owner', + description: 'Entity managing the Account', + }, + // http://hl7.org/fhir/SearchParameter/Account-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Account.subject', + description: 'The entity that caused the expenses', + }, + // http://hl7.org/fhir/SearchParameter/Account-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Account.servicePeriod', + description: 'Transaction window', + }, + // http://hl7.org/fhir/SearchParameter/Account-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Account.status', + description: 'active | inactive | entered-in-error | on-hold | unknown', + }, + // http://hl7.org/fhir/SearchParameter/Account-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Account.subject', + description: 'The entity that caused the expenses', + }, + // http://hl7.org/fhir/SearchParameter/Account-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Account.type', + description: 'E.g. patient, expense, depreciation', + }, +}; diff --git a/src/resources/4_0_0/parameters/activitydefinition.parameters.js b/src/resources/4_0_0/parameters/activitydefinition.parameters.js new file mode 100644 index 00000000..307e079e --- /dev/null +++ b/src/resources/4_0_0/parameters/activitydefinition.parameters.js @@ -0,0 +1,175 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the activitydefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.useContext.valueCodeableConcept', + description: 'A use context assigned to the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ActivityDefinition.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.useContext.code', + description: 'A type of use context assigned to the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ActivityDefinition.date', + description: 'The activity definition publication date', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ActivityDefinition.description', + description: 'The description of the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ActivityDefinition.effectivePeriod', + description: + 'The time during which the activity definition is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.identifier', + description: 'External identifier for the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.jurisdiction', + description: 'Intended jurisdiction for the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ActivityDefinition.name', + description: 'Computationally friendly name of the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ActivityDefinition.publisher', + description: 'Name of the publisher of the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.status', + description: 'The current status of the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ActivityDefinition.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ActivityDefinition.title', + description: 'The human-friendly name of the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.topic', + description: 'Topics associated with the module', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ActivityDefinition.url', + description: 'The uri that identifies the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ActivityDefinition.version', + description: 'The business version of the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the activity definition', + }, + // http://hl7.org/fhir/SearchParameter/ActivityDefinition-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the activity definition', + }, +}; diff --git a/src/resources/4_0_0/parameters/adverseevent.parameters.js b/src/resources/4_0_0/parameters/adverseevent.parameters.js new file mode 100644 index 00000000..732a84f4 --- /dev/null +++ b/src/resources/4_0_0/parameters/adverseevent.parameters.js @@ -0,0 +1,96 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the adverseevent query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/AdverseEvent-actuality + actuality: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AdverseEvent.actuality', + description: 'actual | potential', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AdverseEvent.category', + description: + 'product-problem | product-quality | product-use-error | wrong-dose | incorrect-prescribing-information | wrong-technique | wrong-route-of-administration | wrong-rate | wrong-duration | wrong-time | expired-drug | medical-device-use-error | problem-different-manufacturer | unsafe-physical-environment', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AdverseEvent.date', + description: 'When the event occurred', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-event + event: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AdverseEvent.event', + description: 'Type of the event itself in relation to the subject', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AdverseEvent.location', + description: 'Location where adverse event occurred', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-recorder + recorder: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AdverseEvent.recorder', + description: 'Who recorded the adverse event', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-resultingcondition + resultingcondition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AdverseEvent.resultingCondition', + description: 'Effect on the subject due to this event', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-seriousness + seriousness: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AdverseEvent.seriousness', + description: 'Seriousness of the event', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-severity + severity: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AdverseEvent.severity', + description: 'mild | moderate | severe', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-study + study: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AdverseEvent.study', + description: 'AdverseEvent.study', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AdverseEvent.subject', + description: 'Subject impacted by event', + }, + // http://hl7.org/fhir/SearchParameter/AdverseEvent-substance + substance: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AdverseEvent.suspectEntity.instance', + description: 'Refers to the specific entity that caused the adverse event', + }, +}; diff --git a/src/resources/4_0_0/parameters/allergyintolerance.parameters.js b/src/resources/4_0_0/parameters/allergyintolerance.parameters.js new file mode 100644 index 00000000..ac35cbd1 --- /dev/null +++ b/src/resources/4_0_0/parameters/allergyintolerance.parameters.js @@ -0,0 +1,128 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the allergyintolerance query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-asserter + asserter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AllergyIntolerance.asserter', + description: 'Source of the information about the allergy', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.category', + description: 'food | medication | environment | biologic', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-clinical-status + clinical_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.clinicalStatus', + description: 'active | inactive | resolved', + }, + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-criticality + criticality: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.criticality', + description: 'low | high | unable-to-assess', + }, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AllergyIntolerance.recordedDate', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-last-date + last_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AllergyIntolerance.lastOccurrence', + description: 'Date(/time) of last known occurrence of a reaction', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-manifestation + manifestation: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.manifestation', + description: 'Clinical symptoms/signs associated with the Event', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-onset + onset: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AllergyIntolerance.reaction.onset', + description: 'Date(/time) when manifestations showed', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AllergyIntolerance.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-recorder + recorder: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AllergyIntolerance.recorder', + description: 'Who recorded the sensitivity', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-route + route: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.exposureRoute', + description: 'How the subject was exposed to the substance', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-severity + severity: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.reaction.severity', + description: 'mild | moderate | severe (of event as a whole)', + }, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.type', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [Composition](composition.html): Kind of composition (LOINC if possible) * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management ', + }, + // http://hl7.org/fhir/SearchParameter/AllergyIntolerance-verification-status + verification_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AllergyIntolerance.verificationStatus', + description: 'unconfirmed | confirmed | refuted | entered-in-error', + }, +}; diff --git a/src/resources/4_0_0/parameters/appointment.parameters.js b/src/resources/4_0_0/parameters/appointment.parameters.js new file mode 100644 index 00000000..4440300c --- /dev/null +++ b/src/resources/4_0_0/parameters/appointment.parameters.js @@ -0,0 +1,137 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the appointment query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Appointment-actor + actor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', + description: 'Any one of the individuals participating in the appointment', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-appointment-type + appointment_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.appointmentType', + description: + 'The style of appointment or patient that has been booked in the slot (not service type)', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.basedOn', + description: 'The service request this appointment is allocated to assess', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Appointment.start', + description: 'Appointment date/time.', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.identifier', + description: 'An Identifier of the Appointment', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', + description: + 'This location is listed in the participants of the appointment', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-part-status + part_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.participant.status', + description: + 'The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', + description: 'One of the individuals of the appointment is this patient', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-practitioner + practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.participant.actor', + description: + 'One of the individuals of the appointment is this practitioner', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-reason-code + reason_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.reasonCode', + description: 'Coded reason this appointment is scheduled', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-reason-reference + reason_reference: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.reasonReference', + description: 'Reason the appointment is to take place (resource)', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-service-category + service_category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.serviceCategory', + description: + 'A broad categorization of the service that is to be performed during this appointment', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-service-type + service_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.serviceType', + description: + 'The specific service that is to be performed during this appointment', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-slot + slot: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.slot', + description: 'The slots that this appointment is filling', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-specialty + specialty: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.specialty', + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Appointment.status', + description: 'The overall status of the appointment', + }, + // http://hl7.org/fhir/SearchParameter/Appointment-supporting-info + supporting_info: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Appointment.supportingInformation', + description: 'Additional information to support the appointment', + }, +}; diff --git a/src/resources/4_0_0/parameters/appointmentresponse.parameters.js b/src/resources/4_0_0/parameters/appointmentresponse.parameters.js new file mode 100644 index 00000000..1f48a738 --- /dev/null +++ b/src/resources/4_0_0/parameters/appointmentresponse.parameters.js @@ -0,0 +1,60 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the appointmentresponse query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-actor + actor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: + 'The Person, Location/HealthcareService or Device that this appointment response replies for', + }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-appointment + appointment: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AppointmentResponse.appointment', + description: 'The appointment that the response is attached to', + }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AppointmentResponse.identifier', + description: 'An Identifier in this appointment response', + }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Location', + }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-part-status + part_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AppointmentResponse.participantStatus', + description: 'The participants acceptance status for this appointment', + }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Patient', + }, + // http://hl7.org/fhir/SearchParameter/AppointmentResponse-practitioner + practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AppointmentResponse.actor', + description: 'This Response is for this Practitioner', + }, +}; diff --git a/src/resources/4_0_0/parameters/auditevent.parameters.js b/src/resources/4_0_0/parameters/auditevent.parameters.js new file mode 100644 index 00000000..af3a06b4 --- /dev/null +++ b/src/resources/4_0_0/parameters/auditevent.parameters.js @@ -0,0 +1,138 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the auditevent query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/AuditEvent-action + action: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.action', + description: 'Type of action performed during the event', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'AuditEvent.agent.network.address', + description: 'Identifier for the network access point of the user device', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-agent + agent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AuditEvent.agent.who', + description: 'Identifier of who', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-agent-name + agent_name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'AuditEvent.agent.name', + description: 'Human friendly name for the agent', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-agent-role + agent_role: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.agent.role', + description: 'Agent role in the event', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-altid + altid: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.agent.altId', + description: 'Alternative User identity', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'AuditEvent.recorded', + description: 'Time when the event was recorded', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity + entity: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AuditEvent.entity.what', + description: 'Specific instance of resource', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity-name + entity_name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'AuditEvent.entity.name', + description: 'Descriptor for entity', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity-role + entity_role: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.entity.role', + description: 'What role the entity played', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-entity-type + entity_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.entity.type', + description: 'Type of entity involved', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-outcome + outcome: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.outcome', + description: 'Whether the event succeeded or failed', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AuditEvent.agent.who', + description: 'Identifier of who', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-policy + policy: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'AuditEvent.agent.policy', + description: 'Policy that authorized event', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-site + site: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.source.site', + description: 'Logical source location within the enterprise', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'AuditEvent.source.observer', + description: 'The identity of source detecting the event', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-subtype + subtype: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.subtype', + description: 'More specific type/id for the event', + }, + // http://hl7.org/fhir/SearchParameter/AuditEvent-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'AuditEvent.type', + description: 'Type/identifier of event', + }, +}; diff --git a/src/resources/4_0_0/parameters/basic.parameters.js b/src/resources/4_0_0/parameters/basic.parameters.js new file mode 100644 index 00000000..1fd7d63a --- /dev/null +++ b/src/resources/4_0_0/parameters/basic.parameters.js @@ -0,0 +1,53 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the basic query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Basic-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Basic.author', + description: 'Who created', + }, + // http://hl7.org/fhir/SearchParameter/Basic-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Basic.code', + description: 'Kind of Resource', + }, + // http://hl7.org/fhir/SearchParameter/Basic-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Basic.created', + description: 'When created', + }, + // http://hl7.org/fhir/SearchParameter/Basic-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Basic.identifier', + description: 'Business identifier', + }, + // http://hl7.org/fhir/SearchParameter/Basic-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Basic.subject', + description: 'Identifies the focus of this resource', + }, + // http://hl7.org/fhir/SearchParameter/Basic-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Basic.subject', + description: 'Identifies the focus of this resource', + }, +}; diff --git a/src/resources/4_0_0/parameters/bodystructure.parameters.js b/src/resources/4_0_0/parameters/bodystructure.parameters.js new file mode 100644 index 00000000..97827429 --- /dev/null +++ b/src/resources/4_0_0/parameters/bodystructure.parameters.js @@ -0,0 +1,38 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the bodystructure query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/BodyStructure-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'BodyStructure.identifier', + description: 'Bodystructure identifier', + }, + // http://hl7.org/fhir/SearchParameter/BodyStructure-location + location: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'BodyStructure.location', + description: 'Body site', + }, + // http://hl7.org/fhir/SearchParameter/BodyStructure-morphology + morphology: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'BodyStructure.morphology', + description: 'Kind of Structure', + }, + // http://hl7.org/fhir/SearchParameter/BodyStructure-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'BodyStructure.patient', + description: 'Who this is about', + }, +}; diff --git a/src/resources/4_0_0/parameters/bundle.parameters.js b/src/resources/4_0_0/parameters/bundle.parameters.js new file mode 100644 index 00000000..5c36ec4b --- /dev/null +++ b/src/resources/4_0_0/parameters/bundle.parameters.js @@ -0,0 +1,49 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the bundle query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Bundle-composition + composition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Bundle.entry[0].resource', + description: + "The first resource in the bundle, if the bundle type is 'document' - this is a composition, and this parameter provides access to search its contents", + }, + // http://hl7.org/fhir/SearchParameter/Bundle-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Bundle.identifier', + description: 'Persistent identifier for the bundle', + }, + // http://hl7.org/fhir/SearchParameter/Bundle-message + message: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Bundle.entry[0].resource', + description: + "The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search its contents", + }, + // http://hl7.org/fhir/SearchParameter/Bundle-timestamp + timestamp: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Bundle.timestamp', + description: 'When the bundle was assembled', + }, + // http://hl7.org/fhir/SearchParameter/Bundle-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Bundle.type', + description: + 'document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection', + }, +}; diff --git a/src/resources/4_0_0/parameters/capabilitystatement.parameters.js b/src/resources/4_0_0/parameters/capabilitystatement.parameters.js new file mode 100644 index 00000000..444d6c4c --- /dev/null +++ b/src/resources/4_0_0/parameters/capabilitystatement.parameters.js @@ -0,0 +1,189 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the capabilitystatement query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'CapabilityStatement.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CapabilityStatement.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CapabilityStatement.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-fhirversion + fhirversion: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.version', + description: 'The version of FHIR', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-format + format: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.format', + description: 'formats supported (xml | json | ttl | mime type)', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-guide + guide: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CapabilityStatement.implementationGuide', + description: 'Implementation guides supported', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-mode + mode: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.rest.mode', + description: + 'Mode - restful (server/client) or messaging (sender/receiver)', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CapabilityStatement.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CapabilityStatement.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource + resource: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.rest.resource.type', + description: 'Name of a resource mentioned in a capability statement', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-resource-profile + resource_profile: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CapabilityStatement.rest.resource.profile', + description: 'A profile id invoked in a capability statement', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-security-service + security_service: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.rest.security.service', + description: + 'OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-software + software: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CapabilityStatement.software.name', + description: 'Part of the name of a software application', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/CapabilityStatement-supported-profile + supported_profile: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CapabilityStatement.rest.resource.supportedProfile', + description: 'Profiles for use cases supported', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CapabilityStatement.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'CapabilityStatement.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CapabilityStatement.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, +}; diff --git a/src/resources/4_0_0/parameters/careplan.parameters.js b/src/resources/4_0_0/parameters/careplan.parameters.js new file mode 100644 index 00000000..3deec0a3 --- /dev/null +++ b/src/resources/4_0_0/parameters/careplan.parameters.js @@ -0,0 +1,158 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the careplan query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CarePlan.period', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-activity-code + activity_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.activity.detail.code', + description: 'Detail type of activity', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-activity-date + activity_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CarePlan.activity.detail.scheduledTiming', + description: + 'Specified date occurs within period specified by CarePlan.activity.detail.scheduled[x]', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-activity-reference + activity_reference: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.activity.reference', + description: 'Activity details defined in specific resource', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.basedOn', + description: 'Fulfills CarePlan', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-care-team + care_team: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.careTeam', + description: "Who's involved in plan?", + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.category', + description: 'Type of plan', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-condition + condition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.addresses', + description: 'Health issues this plan addresses', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.encounter', + description: 'Encounter created as part of', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-goal + goal: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.goal', + description: 'Desired outcome of plan', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-instantiates-canonical + instantiates_canonical: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.instantiatesCanonical', + description: 'Instantiates FHIR protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-instantiates-uri + instantiates_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'CarePlan.instantiatesUri', + description: 'Instantiates external protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-intent + intent: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.intent', + description: 'proposal | plan | order | option', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-part-of + part_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.partOf', + description: 'Part of referenced CarePlan', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.activity.detail.performer', + description: + "Matches if the practitioner is listed as a performer in any of the 'simple' activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-replaces + replaces: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.replaces', + description: 'CarePlan replaced by this CarePlan', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CarePlan.status', + description: + 'draft | active | suspended | completed | entered-in-error | cancelled | unknown', + }, + // http://hl7.org/fhir/SearchParameter/CarePlan-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CarePlan.subject', + description: 'Who the care plan is for', + }, +}; diff --git a/src/resources/4_0_0/parameters/careteam.parameters.js b/src/resources/4_0_0/parameters/careteam.parameters.js new file mode 100644 index 00000000..14a9f60c --- /dev/null +++ b/src/resources/4_0_0/parameters/careteam.parameters.js @@ -0,0 +1,70 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the careteam query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CareTeam.period', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CareTeam.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CareTeam.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/CareTeam-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CareTeam.category', + description: 'Type of team', + }, + // http://hl7.org/fhir/SearchParameter/CareTeam-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CareTeam.encounter', + description: 'Encounter created as part of', + }, + // http://hl7.org/fhir/SearchParameter/CareTeam-participant + participant: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CareTeam.participant.member', + description: 'Who is involved', + }, + // http://hl7.org/fhir/SearchParameter/CareTeam-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CareTeam.status', + description: 'proposed | active | suspended | inactive | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/CareTeam-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CareTeam.subject', + description: 'Who care team is for', + }, +}; diff --git a/src/resources/4_0_0/parameters/chargeitem.parameters.js b/src/resources/4_0_0/parameters/chargeitem.parameters.js new file mode 100644 index 00000000..9219c7c2 --- /dev/null +++ b/src/resources/4_0_0/parameters/chargeitem.parameters.js @@ -0,0 +1,130 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the chargeitem query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ChargeItem-account + account: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.account', + description: 'Account to place this charge', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItem.code', + description: 'A code that identifies the charge, like a billing code', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-context + context: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.context', + description: 'Encounter / Episode associated with event', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-entered-date + entered_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ChargeItem.enteredDate', + description: 'Date the charge item was entered', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-enterer + enterer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.enterer', + description: 'Individual who was entering', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-factor-override + factor_override: { + type: GraphQLString, + fhirtype: 'number', + xpath: 'ChargeItem.factorOverride', + description: 'Factor overriding the associated rules', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItem.identifier', + description: 'Business Identifier for item', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-occurrence + occurrence: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ChargeItem.occurrenceDateTime', + description: 'When the charged service was applied', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.subject', + description: 'Individual service was done for/to', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-performer-actor + performer_actor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.performer.actor', + description: 'Individual who was performing', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-performer-function + performer_function: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItem.performer.function', + description: 'What type of performance was done', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-performing-organization + performing_organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.performingOrganization', + description: 'Organization providing the charged service', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-price-override + price_override: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ChargeItem.priceOverride', + description: 'Price overriding the associated rules', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-quantity + quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ChargeItem.quantity', + description: 'Quantity of which the charge item has been serviced', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-requesting-organization + requesting_organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.requestingOrganization', + description: 'Organization requesting the charged service', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-service + service: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.service', + description: 'Which rendered service is being charged?', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItem-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ChargeItem.subject', + description: 'Individual service was done for/to', + }, +}; diff --git a/src/resources/4_0_0/parameters/chargeitemdefinition.parameters.js b/src/resources/4_0_0/parameters/chargeitemdefinition.parameters.js new file mode 100644 index 00000000..7f18acb3 --- /dev/null +++ b/src/resources/4_0_0/parameters/chargeitemdefinition.parameters.js @@ -0,0 +1,121 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the chargeitemdefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItemDefinition.useContext.valueCodeableConcept', + description: 'A use context assigned to the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ChargeItemDefinition.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItemDefinition.useContext.code', + description: 'A type of use context assigned to the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ChargeItemDefinition.date', + description: 'The charge item definition publication date', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ChargeItemDefinition.description', + description: 'The description of the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ChargeItemDefinition.effectivePeriod', + description: + 'The time during which the charge item definition is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItemDefinition.identifier', + description: 'External identifier for the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItemDefinition.jurisdiction', + description: 'Intended jurisdiction for the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ChargeItemDefinition.publisher', + description: 'Name of the publisher of the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItemDefinition.status', + description: 'The current status of the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ChargeItemDefinition.title', + description: 'The human-friendly name of the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ChargeItemDefinition.url', + description: 'The uri that identifies the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ChargeItemDefinition.version', + description: 'The business version of the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the charge item definition', + }, + // http://hl7.org/fhir/SearchParameter/ChargeItemDefinition-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the charge item definition', + }, +}; diff --git a/src/resources/4_0_0/parameters/claim.parameters.js b/src/resources/4_0_0/parameters/claim.parameters.js new file mode 100644 index 00000000..7e5f15f7 --- /dev/null +++ b/src/resources/4_0_0/parameters/claim.parameters.js @@ -0,0 +1,132 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the claim query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Claim-care-team + care_team: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.careTeam.provider', + description: 'Member of the CareTeam', + }, + // http://hl7.org/fhir/SearchParameter/Claim-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Claim.created', + description: 'The creation date for the Claim', + }, + // http://hl7.org/fhir/SearchParameter/Claim-detail-udi + detail_udi: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.item.detail.udi', + description: 'UDI associated with a line item, detail product or service', + }, + // http://hl7.org/fhir/SearchParameter/Claim-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.item.encounter', + description: 'Encounters associated with a billed line item', + }, + // http://hl7.org/fhir/SearchParameter/Claim-enterer + enterer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.enterer', + description: 'The party responsible for the entry of the Claim', + }, + // http://hl7.org/fhir/SearchParameter/Claim-facility + facility: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.facility', + description: + 'Facility where the products or services have been or will be provided', + }, + // http://hl7.org/fhir/SearchParameter/Claim-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Claim.identifier', + description: 'The primary identifier of the financial resource', + }, + // http://hl7.org/fhir/SearchParameter/Claim-insurer + insurer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.insurer', + description: 'The target payor/insurer for the Claim', + }, + // http://hl7.org/fhir/SearchParameter/Claim-item-udi + item_udi: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.item.udi', + description: 'UDI associated with a line item product or service', + }, + // http://hl7.org/fhir/SearchParameter/Claim-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.patient', + description: 'Patient receiving the products or services', + }, + // http://hl7.org/fhir/SearchParameter/Claim-payee + payee: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.payee.party', + description: 'The party receiving any payment for the Claim', + }, + // http://hl7.org/fhir/SearchParameter/Claim-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Claim.priority', + description: 'Processing priority requested', + }, + // http://hl7.org/fhir/SearchParameter/Claim-procedure-udi + procedure_udi: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.procedure.udi', + description: 'UDI associated with a procedure', + }, + // http://hl7.org/fhir/SearchParameter/Claim-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.provider', + description: 'Provider responsible for the Claim', + }, + // http://hl7.org/fhir/SearchParameter/Claim-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Claim.status', + description: 'The status of the Claim instance.', + }, + // http://hl7.org/fhir/SearchParameter/Claim-subdetail-udi + subdetail_udi: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Claim.item.detail.subDetail.udi', + description: + 'UDI associated with a line item, detail, subdetail product or service', + }, + // http://hl7.org/fhir/SearchParameter/Claim-use + use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Claim.use', + description: 'The kind of financial resource', + }, +}; diff --git a/src/resources/4_0_0/parameters/claimresponse.parameters.js b/src/resources/4_0_0/parameters/claimresponse.parameters.js new file mode 100644 index 00000000..b345f810 --- /dev/null +++ b/src/resources/4_0_0/parameters/claimresponse.parameters.js @@ -0,0 +1,88 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the claimresponse query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ClaimResponse-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ClaimResponse.created', + description: 'The creation date', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-disposition + disposition: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ClaimResponse.disposition', + description: 'The contents of the disposition message', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClaimResponse.identifier', + description: 'The identity of the ClaimResponse', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-insurer + insurer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClaimResponse.insurer', + description: 'The organization which generated this resource', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-outcome + outcome: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClaimResponse.outcome', + description: 'The processing outcome', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClaimResponse.patient', + description: 'The subject of care', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-payment-date + payment_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ClaimResponse.payment.date', + description: 'The expected payment date', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClaimResponse.request', + description: 'The claim reference', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-requestor + requestor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClaimResponse.requestor', + description: 'The Provider of the claim', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClaimResponse.status', + description: 'The status of the ClaimResponse', + }, + // http://hl7.org/fhir/SearchParameter/ClaimResponse-use + use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClaimResponse.use', + description: 'The type of claim', + }, +}; diff --git a/src/resources/4_0_0/parameters/clinicalimpression.parameters.js b/src/resources/4_0_0/parameters/clinicalimpression.parameters.js new file mode 100644 index 00000000..2a139d2f --- /dev/null +++ b/src/resources/4_0_0/parameters/clinicalimpression.parameters.js @@ -0,0 +1,104 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the clinicalimpression query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ClinicalImpression.date', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-assessor + assessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.assessor', + description: 'The clinician performing the assessment', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.encounter', + description: 'Encounter created as part of', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-code + finding_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClinicalImpression.finding.itemCodeableConcept', + description: 'What was found', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-finding-ref + finding_ref: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.finding.itemReference', + description: 'What was found', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClinicalImpression.identifier', + description: 'Business identifier', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-investigation + investigation: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.investigation.item', + description: 'Record of a specific investigation', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-previous + previous: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.previous', + description: 'Reference to last assessment', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-problem + problem: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.problem', + description: 'Relevant impressions of patient state', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ClinicalImpression.status', + description: 'draft | completed | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.subject', + description: 'Patient or group assessed', + }, + // http://hl7.org/fhir/SearchParameter/ClinicalImpression-supporting-info + supporting_info: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ClinicalImpression.supportingInfo', + description: 'Information supporting the clinical impression', + }, +}; diff --git a/src/resources/4_0_0/parameters/codesystem.parameters.js b/src/resources/4_0_0/parameters/codesystem.parameters.js new file mode 100644 index 00000000..2d09eb91 --- /dev/null +++ b/src/resources/4_0_0/parameters/codesystem.parameters.js @@ -0,0 +1,168 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the codesystem query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'CodeSystem.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CodeSystem.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CodeSystem.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CodeSystem.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CodeSystem.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CodeSystem.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'CodeSystem.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.concept.code', + description: 'A code defined in the code system', + }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-content-mode + content_mode: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.content', + description: 'not-present | example | fragment | complete | supplement', + }, + // http://hl7.org/fhir/SearchParameter/conformance-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.identifier', + description: + 'Multiple Resources: * [CodeSystem](codesystem.html): External identifier for the code system * [ConceptMap](conceptmap.html): External identifier for the concept map * [MessageDefinition](messagedefinition.html): External identifier for the message definition * [StructureDefinition](structuredefinition.html): External identifier for the structure definition * [StructureMap](structuremap.html): External identifier for the structure map * [ValueSet](valueset.html): External identifier for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-language + language: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CodeSystem.concept.designation.language', + description: 'A language in which a designation is provided', + }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-supplements + supplements: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CodeSystem.supplements', + description: 'Find code system supplements for the referenced code system', + }, + // http://hl7.org/fhir/SearchParameter/CodeSystem-system + system: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'CodeSystem.url', + description: + "The system for any codes defined by this code system (same as 'url')", + }, +}; diff --git a/src/resources/4_0_0/parameters/communication.parameters.js b/src/resources/4_0_0/parameters/communication.parameters.js new file mode 100644 index 00000000..d1f6a982 --- /dev/null +++ b/src/resources/4_0_0/parameters/communication.parameters.js @@ -0,0 +1,118 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the communication query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Communication-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.basedOn', + description: 'Request fulfilled by this communication', + }, + // http://hl7.org/fhir/SearchParameter/Communication-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.category', + description: 'Message category', + }, + // http://hl7.org/fhir/SearchParameter/Communication-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.encounter', + description: 'Encounter created as part of', + }, + // http://hl7.org/fhir/SearchParameter/Communication-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.identifier', + description: 'Unique identifier', + }, + // http://hl7.org/fhir/SearchParameter/Communication-instantiates-canonical + instantiates_canonical: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.instantiatesCanonical', + description: 'Instantiates FHIR protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/Communication-instantiates-uri + instantiates_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Communication.instantiatesUri', + description: 'Instantiates external protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/Communication-medium + medium: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.medium', + description: 'A channel of communication', + }, + // http://hl7.org/fhir/SearchParameter/Communication-part-of + part_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.partOf', + description: 'Part of this action', + }, + // http://hl7.org/fhir/SearchParameter/Communication-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.subject', + description: 'Focus of message', + }, + // http://hl7.org/fhir/SearchParameter/Communication-received + received: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Communication.received', + description: 'When received', + }, + // http://hl7.org/fhir/SearchParameter/Communication-recipient + recipient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.recipient', + description: 'Message recipient', + }, + // http://hl7.org/fhir/SearchParameter/Communication-sender + sender: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.sender', + description: 'Message sender', + }, + // http://hl7.org/fhir/SearchParameter/Communication-sent + sent: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Communication.sent', + description: 'When sent', + }, + // http://hl7.org/fhir/SearchParameter/Communication-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Communication.status', + description: + 'preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/Communication-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Communication.subject', + description: 'Focus of message', + }, +}; diff --git a/src/resources/4_0_0/parameters/communicationrequest.parameters.js b/src/resources/4_0_0/parameters/communicationrequest.parameters.js new file mode 100644 index 00000000..93003a39 --- /dev/null +++ b/src/resources/4_0_0/parameters/communicationrequest.parameters.js @@ -0,0 +1,124 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the communicationrequest query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-authored + authored: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CommunicationRequest.authoredOn', + description: 'When request transitioned to being actionable', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.basedOn', + description: 'Fulfills plan or proposal', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.category', + description: 'Message category', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.encounter', + description: 'Encounter created as part of', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-group-identifier + group_identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.groupIdentifier', + description: 'Composite request this is part of', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.identifier', + description: 'Unique identifier', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-medium + medium: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.medium', + description: 'A channel of communication', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-occurrence + occurrence: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CommunicationRequest.occurrenceDateTime', + description: 'When scheduled', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.subject', + description: 'Focus of message', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.priority', + description: 'Message urgency', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-recipient + recipient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.recipient', + description: 'Message recipient', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-replaces + replaces: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.replaces', + description: 'Request(s) replaced by this request', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.requester', + description: 'Who/what is requesting service', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-sender + sender: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.sender', + description: 'Message sender', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CommunicationRequest.status', + description: + 'draft | active | suspended | cancelled | completed | entered-in-error | unknown', + }, + // http://hl7.org/fhir/SearchParameter/CommunicationRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CommunicationRequest.subject', + description: 'Focus of message', + }, +}; diff --git a/src/resources/4_0_0/parameters/compartmentdefinition.parameters.js b/src/resources/4_0_0/parameters/compartmentdefinition.parameters.js new file mode 100644 index 00000000..0830f350 --- /dev/null +++ b/src/resources/4_0_0/parameters/compartmentdefinition.parameters.js @@ -0,0 +1,122 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the compartmentdefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CompartmentDefinition.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'CompartmentDefinition.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CompartmentDefinition.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CompartmentDefinition.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CompartmentDefinition.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CompartmentDefinition.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CompartmentDefinition.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CompartmentDefinition.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'CompartmentDefinition.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CompartmentDefinition.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CompartmentDefinition.code', + description: 'Patient | Encounter | RelatedPerson | Practitioner | Device', + }, + // http://hl7.org/fhir/SearchParameter/CompartmentDefinition-resource + resource: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CompartmentDefinition.resource.code', + description: 'Name of resource type', + }, +}; diff --git a/src/resources/4_0_0/parameters/composition.parameters.js b/src/resources/4_0_0/parameters/composition.parameters.js new file mode 100644 index 00000000..af6eaffc --- /dev/null +++ b/src/resources/4_0_0/parameters/composition.parameters.js @@ -0,0 +1,142 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the composition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Composition.date', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.type', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [Composition](composition.html): Kind of composition (LOINC if possible) * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management ', + }, + // http://hl7.org/fhir/SearchParameter/Composition-attester + attester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.attester.party', + description: 'Who attested the composition', + }, + // http://hl7.org/fhir/SearchParameter/Composition-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.author', + description: 'Who and/or what authored the composition', + }, + // http://hl7.org/fhir/SearchParameter/Composition-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.category', + description: 'Categorization of Composition', + }, + // http://hl7.org/fhir/SearchParameter/Composition-confidentiality + confidentiality: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.confidentiality', + description: 'As defined by affinity domain', + }, + // http://hl7.org/fhir/SearchParameter/Composition-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.event.code', + description: 'Code(s) that apply to the event being documented', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/Composition-entry + entry: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.section.entry', + description: 'A reference to data that supports this section', + }, + // http://hl7.org/fhir/SearchParameter/Composition-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Composition.event.period', + description: 'The period covered by the documentation', + }, + // http://hl7.org/fhir/SearchParameter/Composition-related-id + related_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.relatesTo.targetIdentifier', + description: 'Target of the relationship', + }, + // http://hl7.org/fhir/SearchParameter/Composition-related-ref + related_ref: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.relatesTo.targetReference', + description: 'Target of the relationship', + }, + // http://hl7.org/fhir/SearchParameter/Composition-section + section: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.section.code', + description: 'Classification of section (recommended)', + }, + // http://hl7.org/fhir/SearchParameter/Composition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Composition.status', + description: 'preliminary | final | amended | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/Composition-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Composition.subject', + description: 'Who and/or what the composition is about', + }, + // http://hl7.org/fhir/SearchParameter/Composition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Composition.title', + description: 'Human Readable name/title', + }, +}; diff --git a/src/resources/4_0_0/parameters/conceptmap.parameters.js b/src/resources/4_0_0/parameters/conceptmap.parameters.js new file mode 100644 index 00000000..9bd36983 --- /dev/null +++ b/src/resources/4_0_0/parameters/conceptmap.parameters.js @@ -0,0 +1,212 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the conceptmap query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ConceptMap.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ConceptMap.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ConceptMap.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ConceptMap.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ConceptMap.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ConceptMap.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.identifier', + description: + 'Multiple Resources: * [CodeSystem](codesystem.html): External identifier for the code system * [ConceptMap](conceptmap.html): External identifier for the concept map * [MessageDefinition](messagedefinition.html): External identifier for the message definition * [StructureDefinition](structuredefinition.html): External identifier for the structure definition * [StructureMap](structuremap.html): External identifier for the structure map * [ValueSet](valueset.html): External identifier for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-dependson + dependson: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.group.element.target.dependsOn.property', + description: 'Reference to property mapping depends on', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-other + other: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ConceptMap.group.unmapped.url', + description: + 'canonical reference to an additional ConceptMap to use for mapping if the source concept is unmapped', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-product + product: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.group.element.target.product.property', + description: 'Reference to property mapping depends on', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ConceptMap.sourceCanonical', + description: + 'The source value set that contains the concepts that are being mapped', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-source-code + source_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.group.element.code', + description: 'Identifies element being mapped', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-source-system + source_system: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.group.source', + description: 'Source system where concepts to be mapped are defined', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-source-uri + source_uri: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ConceptMap.sourceUri', + description: + 'The source value set that contains the concepts that are being mapped', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-target + target: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ConceptMap.targetCanonical', + description: 'The target value set which provides context for the mappings', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-target-code + target_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ConceptMap.group.element.target.code', + description: 'Code that identifies the target element', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-target-system + target_system: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ConceptMap.group.target', + description: 'Target system that the concepts are to be mapped to', + }, + // http://hl7.org/fhir/SearchParameter/ConceptMap-target-uri + target_uri: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ConceptMap.targetUri', + description: 'The target value set which provides context for the mappings', + }, +}; diff --git a/src/resources/4_0_0/parameters/condition.parameters.js b/src/resources/4_0_0/parameters/condition.parameters.js new file mode 100644 index 00000000..63c64dcf --- /dev/null +++ b/src/resources/4_0_0/parameters/condition.parameters.js @@ -0,0 +1,162 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the condition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Condition.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/Condition-abatement-age + abatement_age: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Condition.abatementAge', + description: 'Abatement as age or age range', + }, + // http://hl7.org/fhir/SearchParameter/Condition-abatement-date + abatement_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Condition.abatementDateTime', + description: 'Date-related abatements (dateTime and period)', + }, + // http://hl7.org/fhir/SearchParameter/Condition-abatement-string + abatement_string: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Condition.abatementString', + description: 'Abatement as a string', + }, + // http://hl7.org/fhir/SearchParameter/Condition-asserter + asserter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Condition.asserter', + description: 'Person who asserts this condition', + }, + // http://hl7.org/fhir/SearchParameter/Condition-body-site + body_site: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.bodySite', + description: 'Anatomical location, if relevant', + }, + // http://hl7.org/fhir/SearchParameter/Condition-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.category', + description: 'The category of the condition', + }, + // http://hl7.org/fhir/SearchParameter/Condition-clinical-status + clinical_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.clinicalStatus', + description: 'The clinical status of the condition', + }, + // http://hl7.org/fhir/SearchParameter/Condition-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Condition.encounter', + description: 'Encounter created as part of', + }, + // http://hl7.org/fhir/SearchParameter/Condition-evidence + evidence: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.evidence.code', + description: 'Manifestation/symptom', + }, + // http://hl7.org/fhir/SearchParameter/Condition-evidence-detail + evidence_detail: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Condition.evidence.detail', + description: 'Supporting information found elsewhere', + }, + // http://hl7.org/fhir/SearchParameter/Condition-onset-age + onset_age: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Condition.onsetAge', + description: 'Onsets as age or age range', + }, + // http://hl7.org/fhir/SearchParameter/Condition-onset-date + onset_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Condition.onsetDateTime', + description: 'Date related onsets (dateTime and Period)', + }, + // http://hl7.org/fhir/SearchParameter/Condition-onset-info + onset_info: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Condition.onsetString', + description: 'Onsets as a string', + }, + // http://hl7.org/fhir/SearchParameter/Condition-recorded-date + recorded_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Condition.recordedDate', + description: 'Date record was first recorded', + }, + // http://hl7.org/fhir/SearchParameter/Condition-severity + severity: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.severity', + description: 'The severity of the condition', + }, + // http://hl7.org/fhir/SearchParameter/Condition-stage + stage: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.stage.summary', + description: 'Simple summary (disease specific)', + }, + // http://hl7.org/fhir/SearchParameter/Condition-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Condition.subject', + description: 'Who has the condition?', + }, + // http://hl7.org/fhir/SearchParameter/Condition-verification-status + verification_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Condition.verificationStatus', + description: + 'unconfirmed | provisional | differential | confirmed | refuted | entered-in-error', + }, +}; diff --git a/src/resources/4_0_0/parameters/consent.parameters.js b/src/resources/4_0_0/parameters/consent.parameters.js new file mode 100644 index 00000000..a26ef82a --- /dev/null +++ b/src/resources/4_0_0/parameters/consent.parameters.js @@ -0,0 +1,122 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the consent query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Consent.dateTime', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/Consent-action + action: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.provision.action', + description: 'Actions controlled by this rule', + }, + // http://hl7.org/fhir/SearchParameter/Consent-actor + actor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.provision.actor.reference', + description: 'Resource for the actor (or group, by role)', + }, + // http://hl7.org/fhir/SearchParameter/Consent-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.category', + description: + 'Classification of the consent statement - for indexing/retrieval', + }, + // http://hl7.org/fhir/SearchParameter/Consent-consentor + consentor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.performer', + description: 'Who is agreeing to the policy and rules', + }, + // http://hl7.org/fhir/SearchParameter/Consent-data + data: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.provision.data.reference', + description: 'The actual data reference', + }, + // http://hl7.org/fhir/SearchParameter/Consent-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.organization', + description: 'Custodian of the consent', + }, + // http://hl7.org/fhir/SearchParameter/Consent-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Consent.provision.period', + description: 'Timeframe for this rule', + }, + // http://hl7.org/fhir/SearchParameter/Consent-purpose + purpose: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.provision.purpose', + description: 'Context of activities covered by this rule', + }, + // http://hl7.org/fhir/SearchParameter/Consent-scope + scope: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.scope', + description: 'Which of the four areas this resource covers (extensible)', + }, + // http://hl7.org/fhir/SearchParameter/Consent-security-label + security_label: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.provision.securityLabel', + description: 'Security Labels that define affected resources', + }, + // http://hl7.org/fhir/SearchParameter/Consent-source-reference + source_reference: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Consent.sourceAttachment', + description: + 'Search by reference to a Consent, DocumentReference, Contract or QuestionnaireResponse', + }, + // http://hl7.org/fhir/SearchParameter/Consent-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Consent.status', + description: + 'draft | proposed | active | rejected | inactive | entered-in-error', + }, +}; diff --git a/src/resources/4_0_0/parameters/contract.parameters.js b/src/resources/4_0_0/parameters/contract.parameters.js new file mode 100644 index 00000000..bf1830ff --- /dev/null +++ b/src/resources/4_0_0/parameters/contract.parameters.js @@ -0,0 +1,82 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the contract query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Contract-authority + authority: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Contract.authority', + description: 'The authority of the contract', + }, + // http://hl7.org/fhir/SearchParameter/Contract-domain + domain: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Contract.domain', + description: 'The domain of the contract', + }, + // http://hl7.org/fhir/SearchParameter/Contract-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Contract.identifier', + description: 'The identity of the contract', + }, + // http://hl7.org/fhir/SearchParameter/Contract-instantiates + instantiates: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Contract.instantiatesUri', + description: 'A source definition of the contract', + }, + // http://hl7.org/fhir/SearchParameter/Contract-issued + issued: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Contract.issued', + description: 'The date/time the contract was issued', + }, + // http://hl7.org/fhir/SearchParameter/Contract-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Contract.subject', + description: 'The identity of the subject of the contract (if a patient)', + }, + // http://hl7.org/fhir/SearchParameter/Contract-signer + signer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Contract.signer.party', + description: 'Contract Signatory Party', + }, + // http://hl7.org/fhir/SearchParameter/Contract-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Contract.status', + description: 'The status of the contract', + }, + // http://hl7.org/fhir/SearchParameter/Contract-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Contract.subject', + description: 'The identity of the subject of the contract', + }, + // http://hl7.org/fhir/SearchParameter/Contract-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Contract.url', + description: 'The basal contract definition', + }, +}; diff --git a/src/resources/4_0_0/parameters/coverage.parameters.js b/src/resources/4_0_0/parameters/coverage.parameters.js new file mode 100644 index 00000000..8edaba6f --- /dev/null +++ b/src/resources/4_0_0/parameters/coverage.parameters.js @@ -0,0 +1,88 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the coverage query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Coverage-beneficiary + beneficiary: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Coverage.beneficiary', + description: 'Covered party', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-class-type + class_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Coverage.class.type', + description: 'Coverage class (eg. plan, group)', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-class-value + class_value: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Coverage.class.value', + description: 'Value of the class (eg. Plan number, group number)', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-dependent + dependent: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Coverage.dependent', + description: 'Dependent number', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Coverage.identifier', + description: 'The primary identifier of the insured and the coverage', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Coverage.beneficiary', + description: 'Retrieve coverages for a patient', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-payor + payor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Coverage.payor', + description: 'The identity of the insurer or party paying for services', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-policy-holder + policy_holder: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Coverage.policyHolder', + description: 'Reference to the policyholder', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Coverage.status', + description: 'The status of the Coverage', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-subscriber + subscriber: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Coverage.subscriber', + description: 'Reference to the subscriber', + }, + // http://hl7.org/fhir/SearchParameter/Coverage-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Coverage.type', + description: + 'The kind of coverage (health plan, auto, Workers Compensation)', + }, +}; diff --git a/src/resources/4_0_0/parameters/coverageeligibilityrequest.parameters.js b/src/resources/4_0_0/parameters/coverageeligibilityrequest.parameters.js new file mode 100644 index 00000000..89e0bf01 --- /dev/null +++ b/src/resources/4_0_0/parameters/coverageeligibilityrequest.parameters.js @@ -0,0 +1,60 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the coverageeligibilityrequest query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CoverageEligibilityRequest.created', + description: 'The creation date for the EOB', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-enterer + enterer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CoverageEligibilityRequest.enterer', + description: 'The party who is responsible for the request', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-facility + facility: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CoverageEligibilityRequest.facility', + description: 'Facility responsible for the goods and services', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CoverageEligibilityRequest.identifier', + description: 'The business identifier of the Eligibility', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CoverageEligibilityRequest.patient', + description: 'The reference to the patient', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CoverageEligibilityRequest.provider', + description: 'The reference to the provider', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityRequest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CoverageEligibilityRequest.status', + description: 'The status of the EligibilityRequest', + }, +}; diff --git a/src/resources/4_0_0/parameters/coverageeligibilityresponse.parameters.js b/src/resources/4_0_0/parameters/coverageeligibilityresponse.parameters.js new file mode 100644 index 00000000..89f64d07 --- /dev/null +++ b/src/resources/4_0_0/parameters/coverageeligibilityresponse.parameters.js @@ -0,0 +1,74 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the coverageeligibilityresponse query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'CoverageEligibilityResponse.created', + description: 'The creation date', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-disposition + disposition: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'CoverageEligibilityResponse.disposition', + description: 'The contents of the disposition message', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CoverageEligibilityResponse.identifier', + description: 'The business identifier', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-insurer + insurer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CoverageEligibilityResponse.insurer', + description: 'The organization which generated this resource', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-outcome + outcome: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CoverageEligibilityResponse.outcome', + description: 'The processing outcome', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CoverageEligibilityResponse.patient', + description: 'The reference to the patient', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CoverageEligibilityResponse.request', + description: 'The EligibilityRequest reference', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-requestor + requestor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'CoverageEligibilityResponse.requestor', + description: 'The EligibilityRequest provider', + }, + // http://hl7.org/fhir/SearchParameter/CoverageEligibilityResponse-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'CoverageEligibilityResponse.status', + description: 'The EligibilityRequest status', + }, +}; diff --git a/src/resources/4_0_0/parameters/detectedissue.parameters.js b/src/resources/4_0_0/parameters/detectedissue.parameters.js new file mode 100644 index 00000000..969c34ba --- /dev/null +++ b/src/resources/4_0_0/parameters/detectedissue.parameters.js @@ -0,0 +1,55 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the detectedissue query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DetectedIssue.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DetectedIssue.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DetectedIssue.author', + description: 'The provider or device that identified the issue', + }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DetectedIssue.code', + description: 'Issue Category, e.g. drug-drug, duplicate therapy, etc.', + }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-identified + identified: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DetectedIssue.identifiedDateTime', + description: 'When identified', + }, + // http://hl7.org/fhir/SearchParameter/DetectedIssue-implicated + implicated: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DetectedIssue.implicated', + description: 'Problem resource', + }, +}; diff --git a/src/resources/4_0_0/parameters/device.parameters.js b/src/resources/4_0_0/parameters/device.parameters.js new file mode 100644 index 00000000..7d688f01 --- /dev/null +++ b/src/resources/4_0_0/parameters/device.parameters.js @@ -0,0 +1,97 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the device query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Device-device-name + device_name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Device.deviceName', + description: + 'A server defined search that may match any of the string fields in Device.deviceName or Device.type.', + }, + // http://hl7.org/fhir/SearchParameter/Device-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Device.identifier', + description: 'Instance id from manufacturer, owner, and others', + }, + // http://hl7.org/fhir/SearchParameter/Device-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Device.location', + description: 'A location, where the resource is found', + }, + // http://hl7.org/fhir/SearchParameter/Device-manufacturer + manufacturer: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Device.manufacturer', + description: 'The manufacturer of the device', + }, + // http://hl7.org/fhir/SearchParameter/Device-model + model: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Device.modelNumber', + description: 'The model of the device', + }, + // http://hl7.org/fhir/SearchParameter/Device-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Device.owner', + description: 'The organization responsible for the device', + }, + // http://hl7.org/fhir/SearchParameter/Device-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Device.patient', + description: 'Patient information, if the resource is affixed to a person', + }, + // http://hl7.org/fhir/SearchParameter/Device-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Device.status', + description: 'active | inactive | entered-in-error | unknown', + }, + // http://hl7.org/fhir/SearchParameter/Device-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Device.type', + description: 'The type of the device', + }, + // http://hl7.org/fhir/SearchParameter/Device-udi-carrier + udi_carrier: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Device.udiCarrier', + description: + 'UDI Barcode (RFID or other technology) string in *HRF* format.', + }, + // http://hl7.org/fhir/SearchParameter/Device-udi-di + udi_di: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Device.udiCarrier', + description: 'The udi Device Identifier (DI)', + }, + // http://hl7.org/fhir/SearchParameter/Device-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Device.url', + description: 'Network address to contact device', + }, +}; diff --git a/src/resources/4_0_0/parameters/devicedefinition.parameters.js b/src/resources/4_0_0/parameters/devicedefinition.parameters.js new file mode 100644 index 00000000..cf601044 --- /dev/null +++ b/src/resources/4_0_0/parameters/devicedefinition.parameters.js @@ -0,0 +1,31 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the devicedefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/DeviceDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceDefinition.identifier', + description: 'The identifier of the component', + }, + // http://hl7.org/fhir/SearchParameter/DeviceDefinition-parent + parent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceDefinition.parentDevice', + description: 'The parent DeviceDefinition resource', + }, + // http://hl7.org/fhir/SearchParameter/DeviceDefinition-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceDefinition.type', + description: 'The device component type', + }, +}; diff --git a/src/resources/4_0_0/parameters/devicemetric.parameters.js b/src/resources/4_0_0/parameters/devicemetric.parameters.js new file mode 100644 index 00000000..c1037bfc --- /dev/null +++ b/src/resources/4_0_0/parameters/devicemetric.parameters.js @@ -0,0 +1,45 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the devicemetric query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/DeviceMetric-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceMetric.category', + description: 'The category of the metric', + }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceMetric.identifier', + description: 'The identifier of the metric', + }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-parent + parent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceMetric.parent', + description: 'The parent DeviceMetric resource', + }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceMetric.source', + description: 'The device resource', + }, + // http://hl7.org/fhir/SearchParameter/DeviceMetric-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceMetric.type', + description: 'The component type', + }, +}; diff --git a/src/resources/4_0_0/parameters/devicerequest.parameters.js b/src/resources/4_0_0/parameters/devicerequest.parameters.js new file mode 100644 index 00000000..77dd10fb --- /dev/null +++ b/src/resources/4_0_0/parameters/devicerequest.parameters.js @@ -0,0 +1,143 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the devicerequest query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceRequest.codeCodeableConcept', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceRequest.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-authored-on + authored_on: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DeviceRequest.authoredOn', + description: 'When the request transitioned to being actionable', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.basedOn', + description: 'Plan/proposal/order fulfilled by this request', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-device + device: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.codeReference', + description: 'Reference to resource that is being requested/ordered', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-event-date + event_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DeviceRequest.occurrenceDateTime', + description: 'When service should occur', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-group-identifier + group_identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceRequest.groupIdentifier', + description: 'Composite request this is part of', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-instantiates-canonical + instantiates_canonical: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.instantiatesCanonical', + description: 'Instantiates FHIR protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-instantiates-uri + instantiates_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'DeviceRequest.instantiatesUri', + description: 'Instantiates external protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-insurance + insurance: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.insurance', + description: 'Associated insurance coverage', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-intent + intent: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceRequest.intent', + description: 'proposal | plan | original-order |reflex-order', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.performer', + description: 'Desired performer for service', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-prior-request + prior_request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.priorRequest', + description: + 'Request takes the place of referenced completed or terminated requests', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.requester', + description: 'Who/what is requesting service', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceRequest.status', + description: 'entered-in-error | draft | active |suspended | completed', + }, + // http://hl7.org/fhir/SearchParameter/DeviceRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceRequest.subject', + description: 'Individual the service is ordered for', + }, +}; diff --git a/src/resources/4_0_0/parameters/deviceusestatement.parameters.js b/src/resources/4_0_0/parameters/deviceusestatement.parameters.js new file mode 100644 index 00000000..8a5058da --- /dev/null +++ b/src/resources/4_0_0/parameters/deviceusestatement.parameters.js @@ -0,0 +1,39 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the deviceusestatement query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceUseStatement.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-device + device: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceUseStatement.device', + description: 'Search by device', + }, + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DeviceUseStatement.identifier', + description: 'Search by identifier', + }, + // http://hl7.org/fhir/SearchParameter/DeviceUseStatement-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DeviceUseStatement.subject', + description: 'Search by subject', + }, +}; diff --git a/src/resources/4_0_0/parameters/diagnosticreport.parameters.js b/src/resources/4_0_0/parameters/diagnosticreport.parameters.js new file mode 100644 index 00000000..2581284a --- /dev/null +++ b/src/resources/4_0_0/parameters/diagnosticreport.parameters.js @@ -0,0 +1,128 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the diagnosticreport query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticReport.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DiagnosticReport.effectiveDateTime', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticReport.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.basedOn', + description: 'Reference to the service request.', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticReport.category', + description: 'Which diagnostic discipline/department created the report', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-conclusion + conclusion: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticReport.conclusionCode', + description: 'A coded conclusion (interpretation/impression) on the report', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-issued + issued: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DiagnosticReport.issued', + description: 'When the report was issued', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-media + media: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.media.link', + description: 'A reference to the image source.', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.performer', + description: 'Who is responsible for the report', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-result + result: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.result', + description: 'Link to an atomic result (observation resource)', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-results-interpreter + results_interpreter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.resultsInterpreter', + description: 'Who was the source of the report', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-specimen + specimen: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.specimen', + description: 'The specimen details', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DiagnosticReport.status', + description: 'The status of the report', + }, + // http://hl7.org/fhir/SearchParameter/DiagnosticReport-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DiagnosticReport.subject', + description: 'The subject of the report', + }, +}; diff --git a/src/resources/4_0_0/parameters/documentmanifest.parameters.js b/src/resources/4_0_0/parameters/documentmanifest.parameters.js new file mode 100644 index 00000000..b7ab832c --- /dev/null +++ b/src/resources/4_0_0/parameters/documentmanifest.parameters.js @@ -0,0 +1,106 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the documentmanifest query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentManifest.masterIdentifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentManifest.type', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [Composition](composition.html): Kind of composition (LOINC if possible) * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management ', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.author', + description: 'Who and/or what authored the DocumentManifest', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DocumentManifest.created', + description: 'When this document manifest created', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'DocumentManifest.description', + description: 'Human-readable description (title)', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-item + item: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.content', + description: 'Items in manifest', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-recipient + recipient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.recipient', + description: 'Intended to get notified about this set of documents', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-related-id + related_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentManifest.related.identifier', + description: 'Identifiers of things that are related', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-related-ref + related_ref: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.related.ref', + description: 'Related Resource', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-source + source: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'DocumentManifest.source', + description: 'The source system/application/software', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentManifest.status', + description: 'current | superseded | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/DocumentManifest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentManifest.subject', + description: 'The subject of the set of documents', + }, +}; diff --git a/src/resources/4_0_0/parameters/documentreference.parameters.js b/src/resources/4_0_0/parameters/documentreference.parameters.js new file mode 100644 index 00000000..d40ce767 --- /dev/null +++ b/src/resources/4_0_0/parameters/documentreference.parameters.js @@ -0,0 +1,192 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the documentreference query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.masterIdentifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.type', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [Composition](composition.html): Kind of composition (LOINC if possible) * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.context.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-authenticator + authenticator: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.authenticator', + description: 'Who/what authenticated the document', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.author', + description: 'Who and/or what authored the document', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.category', + description: 'Categorization of document', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-contenttype + contenttype: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.content.attachment.contentType', + description: 'Mime type of the content, with charset etc.', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-custodian + custodian: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.custodian', + description: 'Organization which maintains the document', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DocumentReference.date', + description: 'When this document reference was created', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'DocumentReference.description', + description: 'Human-readable description', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-event + event: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.context.event', + description: 'Main clinical acts documented', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-facility + facility: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.context.facilityType', + description: 'Kind of facility where patient was seen', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-format + format: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.content.format', + description: 'Format/content rules for the document', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-language + language: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.content.attachment.language', + description: 'Human language of the content (BCP-47)', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-location + location: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'DocumentReference.content.attachment.url', + description: 'Uri where the data can be found', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'DocumentReference.context.period', + description: 'Time of service that is being documented', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-related + related: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.context.related', + description: 'Related identifiers or resources', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-relatesto + relatesto: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.relatesTo.target', + description: 'Target of the relationship', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-relation + relation: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.relatesTo.code', + description: 'replaces | transforms | signs | appends', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-security-label + security_label: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.securityLabel', + description: 'Document security-tags', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-setting + setting: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.context.practiceSetting', + description: + 'Additional details about where the content was created (e.g. clinical specialty)', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'DocumentReference.status', + description: 'current | superseded | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'DocumentReference.subject', + description: 'Who/what is the subject of the document', + }, + // http://hl7.org/fhir/SearchParameter/DocumentReference-relationship + relationship: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Combination of relation and relatesTo', + }, +}; diff --git a/src/resources/4_0_0/parameters/domainresource.parameters.js b/src/resources/4_0_0/parameters/domainresource.parameters.js new file mode 100644 index 00000000..2476b42a --- /dev/null +++ b/src/resources/4_0_0/parameters/domainresource.parameters.js @@ -0,0 +1,16 @@ +const { GraphQLString } = require('graphql'); + +/** + * @name exports + * @static + * @summary Arguments for the domainresource query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/DomainResource-text + _text: { + type: GraphQLString, + fhirtype: 'string', + xpath: '', + description: 'Search on the narrative of the resource', + }, +}; diff --git a/src/resources/4_0_0/parameters/effectevidencesynthesis.parameters.js b/src/resources/4_0_0/parameters/effectevidencesynthesis.parameters.js new file mode 100644 index 00000000..ae8bd6ff --- /dev/null +++ b/src/resources/4_0_0/parameters/effectevidencesynthesis.parameters.js @@ -0,0 +1,130 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the effectevidencesynthesis query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EffectEvidenceSynthesis.useContext.valueCodeableConcept', + description: 'A use context assigned to the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'EffectEvidenceSynthesis.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EffectEvidenceSynthesis.useContext.code', + description: + 'A type of use context assigned to the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EffectEvidenceSynthesis.date', + description: 'The effect evidence synthesis publication date', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EffectEvidenceSynthesis.description', + description: 'The description of the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EffectEvidenceSynthesis.effectivePeriod', + description: + 'The time during which the effect evidence synthesis is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EffectEvidenceSynthesis.identifier', + description: 'External identifier for the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EffectEvidenceSynthesis.jurisdiction', + description: 'Intended jurisdiction for the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EffectEvidenceSynthesis.name', + description: + 'Computationally friendly name of the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EffectEvidenceSynthesis.publisher', + description: 'Name of the publisher of the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EffectEvidenceSynthesis.status', + description: 'The current status of the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EffectEvidenceSynthesis.title', + description: 'The human-friendly name of the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'EffectEvidenceSynthesis.url', + description: 'The uri that identifies the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EffectEvidenceSynthesis.version', + description: 'The business version of the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the effect evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/EffectEvidenceSynthesis-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the effect evidence synthesis', + }, +}; diff --git a/src/resources/4_0_0/parameters/encounter.parameters.js b/src/resources/4_0_0/parameters/encounter.parameters.js new file mode 100644 index 00000000..e6c5b67e --- /dev/null +++ b/src/resources/4_0_0/parameters/encounter.parameters.js @@ -0,0 +1,180 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the encounter query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Encounter.period', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.type', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [Composition](composition.html): Kind of composition (LOINC if possible) * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management ', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-account + account: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.account', + description: + 'The set of accounts that may be used for billing for this Encounter', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-appointment + appointment: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.appointment', + description: 'The appointment that scheduled this encounter', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.basedOn', + description: 'The ServiceRequest that initiated this encounter', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-class + class: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.class', + description: 'Classification of patient encounter', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-diagnosis + diagnosis: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.diagnosis.condition', + description: 'The diagnosis or procedure relevant to the encounter', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-episode-of-care + episode_of_care: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.episodeOfCare', + description: + 'Episode(s) of care that this encounter should be recorded against', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-length + length: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Encounter.length', + description: 'Length of encounter in days', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.location.location', + description: 'Location the encounter takes place', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-location-period + location_period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Encounter.location.period', + description: + 'Time period during which the patient was present at the location', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-part-of + part_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.partOf', + description: 'Another Encounter this encounter is part of', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-participant + participant: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.participant.individual', + description: 'Persons involved in the encounter other than the patient', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-participant-type + participant_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.participant.type', + description: 'Role of participant in encounter', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-practitioner + practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.participant.individual', + description: 'Persons involved in the encounter other than the patient', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-reason-code + reason_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.reasonCode', + description: 'Coded reason the encounter takes place', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-reason-reference + reason_reference: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.reasonReference', + description: 'Reason the encounter takes place (reference)', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-service-provider + service_provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.serviceProvider', + description: 'The organization (facility) responsible for this encounter', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-special-arrangement + special_arrangement: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.hospitalization.specialArrangement', + description: 'Wheelchair, translator, stretcher, etc.', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Encounter.status', + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +', + }, + // http://hl7.org/fhir/SearchParameter/Encounter-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Encounter.subject', + description: 'The patient or group present at the encounter', + }, +}; diff --git a/src/resources/4_0_0/parameters/endpoint.parameters.js b/src/resources/4_0_0/parameters/endpoint.parameters.js new file mode 100644 index 00000000..84bae9f8 --- /dev/null +++ b/src/resources/4_0_0/parameters/endpoint.parameters.js @@ -0,0 +1,55 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the endpoint query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Endpoint-connection-type + connection_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Endpoint.connectionType', + description: + 'Protocol/Profile/Standard to be used with this endpoint connection', + }, + // http://hl7.org/fhir/SearchParameter/Endpoint-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Endpoint.identifier', + description: 'Identifies this endpoint across multiple systems', + }, + // http://hl7.org/fhir/SearchParameter/Endpoint-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Endpoint.name', + description: 'A name that this endpoint can be identified by', + }, + // http://hl7.org/fhir/SearchParameter/Endpoint-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Endpoint.managingOrganization', + description: 'The organization that is managing the endpoint', + }, + // http://hl7.org/fhir/SearchParameter/Endpoint-payload-type + payload_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Endpoint.payloadType', + description: + 'The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)', + }, + // http://hl7.org/fhir/SearchParameter/Endpoint-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Endpoint.status', + description: + 'The current status of the Endpoint (usually expected to be active)', + }, +}; diff --git a/src/resources/4_0_0/parameters/enrollmentrequest.parameters.js b/src/resources/4_0_0/parameters/enrollmentrequest.parameters.js new file mode 100644 index 00000000..56da1732 --- /dev/null +++ b/src/resources/4_0_0/parameters/enrollmentrequest.parameters.js @@ -0,0 +1,38 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the enrollmentrequest query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EnrollmentRequest.identifier', + description: 'The business identifier of the Enrollment', + }, + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EnrollmentRequest.candidate', + description: 'The party to be enrolled', + }, + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EnrollmentRequest.status', + description: 'The status of the enrollment', + }, + // http://hl7.org/fhir/SearchParameter/EnrollmentRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EnrollmentRequest.candidate', + description: 'The party to be enrolled', + }, +}; diff --git a/src/resources/4_0_0/parameters/enrollmentresponse.parameters.js b/src/resources/4_0_0/parameters/enrollmentresponse.parameters.js new file mode 100644 index 00000000..d04dbd0d --- /dev/null +++ b/src/resources/4_0_0/parameters/enrollmentresponse.parameters.js @@ -0,0 +1,31 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the enrollmentresponse query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/EnrollmentResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EnrollmentResponse.identifier', + description: 'The business identifier of the EnrollmentResponse', + }, + // http://hl7.org/fhir/SearchParameter/EnrollmentResponse-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EnrollmentResponse.request', + description: 'The reference to the claim', + }, + // http://hl7.org/fhir/SearchParameter/EnrollmentResponse-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EnrollmentResponse.status', + description: 'The status of the enrollment response', + }, +}; diff --git a/src/resources/4_0_0/parameters/episodeofcare.parameters.js b/src/resources/4_0_0/parameters/episodeofcare.parameters.js new file mode 100644 index 00000000..f4fb11e6 --- /dev/null +++ b/src/resources/4_0_0/parameters/episodeofcare.parameters.js @@ -0,0 +1,80 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the episodeofcare query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EpisodeOfCare.period', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EpisodeOfCare.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EpisodeOfCare.type', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) * [Composition](composition.html): Kind of composition (LOINC if possible) * [DocumentManifest](documentmanifest.html): Kind of document set * [DocumentReference](documentreference.html): Kind of document (LOINC if possible) * [Encounter](encounter.html): Specific type of encounter * [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management ', + }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-care-manager + care_manager: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.careManager', + description: 'Care manager/care coordinator for the patient', + }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-condition + condition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.diagnosis.condition', + description: 'Conditions/problems/diagnoses this episode of care is for', + }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-incoming-referral + incoming_referral: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.referralRequest', + description: 'Incoming Referral Request', + }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'EpisodeOfCare.managingOrganization', + description: + 'The organization that has assumed the specific responsibilities of this EpisodeOfCare', + }, + // http://hl7.org/fhir/SearchParameter/EpisodeOfCare-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EpisodeOfCare.status', + description: + 'The current status of the Episode of Care as provided (does not check the status history collection)', + }, +}; diff --git a/src/resources/4_0_0/parameters/eventdefinition.parameters.js b/src/resources/4_0_0/parameters/eventdefinition.parameters.js new file mode 100644 index 00000000..b2674b03 --- /dev/null +++ b/src/resources/4_0_0/parameters/eventdefinition.parameters.js @@ -0,0 +1,173 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the eventdefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/EventDefinition-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "EventDefinition.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EventDefinition.useContext.valueCodeableConcept', + description: 'A use context assigned to the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'EventDefinition.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EventDefinition.useContext.code', + description: 'A type of use context assigned to the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EventDefinition.date', + description: 'The event definition publication date', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "EventDefinition.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "EventDefinition.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EventDefinition.description', + description: 'The description of the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EventDefinition.effectivePeriod', + description: + 'The time during which the event definition is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EventDefinition.identifier', + description: 'External identifier for the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EventDefinition.jurisdiction', + description: 'Intended jurisdiction for the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EventDefinition.name', + description: 'Computationally friendly name of the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "EventDefinition.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EventDefinition.publisher', + description: 'Name of the publisher of the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EventDefinition.status', + description: 'The current status of the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "EventDefinition.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EventDefinition.title', + description: 'The human-friendly name of the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EventDefinition.topic', + description: 'Topics associated with the module', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'EventDefinition.url', + description: 'The uri that identifies the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EventDefinition.version', + description: 'The business version of the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the event definition', + }, + // http://hl7.org/fhir/SearchParameter/EventDefinition-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the event definition', + }, +}; diff --git a/src/resources/4_0_0/parameters/evidence.parameters.js b/src/resources/4_0_0/parameters/evidence.parameters.js new file mode 100644 index 00000000..3dc65ba8 --- /dev/null +++ b/src/resources/4_0_0/parameters/evidence.parameters.js @@ -0,0 +1,168 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the evidence query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Evidence-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Evidence.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Evidence.useContext.valueCodeableConcept', + description: 'A use context assigned to the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Evidence.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Evidence.useContext.code', + description: 'A type of use context assigned to the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Evidence.date', + description: 'The evidence publication date', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Evidence.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Evidence.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Evidence.description', + description: 'The description of the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Evidence.effectivePeriod', + description: 'The time during which the evidence is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Evidence.identifier', + description: 'External identifier for the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Evidence.jurisdiction', + description: 'Intended jurisdiction for the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Evidence.name', + description: 'Computationally friendly name of the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Evidence.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Evidence.publisher', + description: 'Name of the publisher of the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Evidence.status', + description: 'The current status of the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Evidence.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Evidence.title', + description: 'The human-friendly name of the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Evidence.topic', + description: 'Topics associated with the Evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Evidence.url', + description: 'The uri that identifies the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Evidence.version', + description: 'The business version of the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the evidence', + }, + // http://hl7.org/fhir/SearchParameter/Evidence-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'A use context type and value assigned to the evidence', + }, +}; diff --git a/src/resources/4_0_0/parameters/evidencevariable.parameters.js b/src/resources/4_0_0/parameters/evidencevariable.parameters.js new file mode 100644 index 00000000..4aa865a6 --- /dev/null +++ b/src/resources/4_0_0/parameters/evidencevariable.parameters.js @@ -0,0 +1,174 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the evidencevariable query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "EvidenceVariable.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EvidenceVariable.useContext.valueCodeableConcept', + description: 'A use context assigned to the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'EvidenceVariable.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EvidenceVariable.useContext.code', + description: 'A type of use context assigned to the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EvidenceVariable.date', + description: 'The evidence variable publication date', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "EvidenceVariable.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "EvidenceVariable.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EvidenceVariable.description', + description: 'The description of the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'EvidenceVariable.effectivePeriod', + description: + 'The time during which the evidence variable is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EvidenceVariable.identifier', + description: 'External identifier for the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EvidenceVariable.jurisdiction', + description: 'Intended jurisdiction for the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EvidenceVariable.name', + description: 'Computationally friendly name of the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "EvidenceVariable.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EvidenceVariable.publisher', + description: 'Name of the publisher of the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EvidenceVariable.status', + description: 'The current status of the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "EvidenceVariable.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'EvidenceVariable.title', + description: 'The human-friendly name of the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EvidenceVariable.topic', + description: 'Topics associated with the EvidenceVariable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'EvidenceVariable.url', + description: 'The uri that identifies the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'EvidenceVariable.version', + description: 'The business version of the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the evidence variable', + }, + // http://hl7.org/fhir/SearchParameter/EvidenceVariable-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the evidence variable', + }, +}; diff --git a/src/resources/4_0_0/parameters/examplescenario.parameters.js b/src/resources/4_0_0/parameters/examplescenario.parameters.js new file mode 100644 index 00000000..d8c1a95d --- /dev/null +++ b/src/resources/4_0_0/parameters/examplescenario.parameters.js @@ -0,0 +1,106 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the examplescenario query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ExampleScenario-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExampleScenario.useContext.valueCodeableConcept', + description: 'A use context assigned to the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ExampleScenario.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExampleScenario.useContext.code', + description: 'A type of use context assigned to the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ExampleScenario.date', + description: 'The example scenario publication date', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExampleScenario.identifier', + description: 'External identifier for the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExampleScenario.jurisdiction', + description: 'Intended jurisdiction for the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ExampleScenario.name', + description: 'Computationally friendly name of the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ExampleScenario.publisher', + description: 'Name of the publisher of the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExampleScenario.status', + description: 'The current status of the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ExampleScenario.url', + description: 'The uri that identifies the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExampleScenario.version', + description: 'The business version of the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the example scenario', + }, + // http://hl7.org/fhir/SearchParameter/ExampleScenario-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the example scenario', + }, +}; diff --git a/src/resources/4_0_0/parameters/explanationofbenefit.parameters.js b/src/resources/4_0_0/parameters/explanationofbenefit.parameters.js new file mode 100644 index 00000000..44e1d2ea --- /dev/null +++ b/src/resources/4_0_0/parameters/explanationofbenefit.parameters.js @@ -0,0 +1,131 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the explanationofbenefit query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-care-team + care_team: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.careTeam.provider', + description: 'Member of the CareTeam', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-claim + claim: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.claim', + description: 'The reference to the claim', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-coverage + coverage: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.insurance.coverage', + description: 'The plan under which the claim was adjudicated', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ExplanationOfBenefit.created', + description: 'The creation date for the EOB', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-detail-udi + detail_udi: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.item.detail.udi', + description: 'UDI associated with a line item detail product or service', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-disposition + disposition: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ExplanationOfBenefit.disposition', + description: 'The contents of the disposition message', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.item.encounter', + description: 'Encounters associated with a billed line item', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-enterer + enterer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.enterer', + description: 'The party responsible for the entry of the Claim', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-facility + facility: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.facility', + description: 'Facility responsible for the goods and services', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExplanationOfBenefit.identifier', + description: 'The business identifier of the Explanation of Benefit', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-item-udi + item_udi: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.item.udi', + description: 'UDI associated with a line item product or service', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.patient', + description: 'The reference to the patient', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-payee + payee: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.payee.party', + description: 'The party receiving any payment for the Claim', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-procedure-udi + procedure_udi: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.procedure.udi', + description: 'UDI associated with a procedure', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.provider', + description: 'The reference to the provider', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ExplanationOfBenefit.status', + description: 'Status of the instance', + }, + // http://hl7.org/fhir/SearchParameter/ExplanationOfBenefit-subdetail-udi + subdetail_udi: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ExplanationOfBenefit.item.detail.subDetail.udi', + description: + 'UDI associated with a line item detail subdetail product or service', + }, +}; diff --git a/src/resources/4_0_0/parameters/familymemberhistory.parameters.js b/src/resources/4_0_0/parameters/familymemberhistory.parameters.js new file mode 100644 index 00000000..21d3e0e0 --- /dev/null +++ b/src/resources/4_0_0/parameters/familymemberhistory.parameters.js @@ -0,0 +1,79 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the familymemberhistory query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.condition.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'FamilyMemberHistory.date', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'FamilyMemberHistory.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-instantiates-canonical + instantiates_canonical: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'FamilyMemberHistory.instantiatesCanonical', + description: 'Instantiates FHIR protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-instantiates-uri + instantiates_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'FamilyMemberHistory.instantiatesUri', + description: 'Instantiates external protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-relationship + relationship: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.relationship', + description: 'A search by a relationship type', + }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-sex + sex: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.sex', + description: 'A search by a sex code of a family member', + }, + // http://hl7.org/fhir/SearchParameter/FamilyMemberHistory-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'FamilyMemberHistory.status', + description: 'partial | completed | entered-in-error | health-unknown', + }, +}; diff --git a/src/resources/4_0_0/parameters/flag.parameters.js b/src/resources/4_0_0/parameters/flag.parameters.js new file mode 100644 index 00000000..4c127c81 --- /dev/null +++ b/src/resources/4_0_0/parameters/flag.parameters.js @@ -0,0 +1,56 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the flag query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Flag.period', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Flag.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Flag.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/Flag-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Flag.author', + description: 'Flag creator', + }, + // http://hl7.org/fhir/SearchParameter/Flag-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Flag.identifier', + description: 'Business identifier', + }, + // http://hl7.org/fhir/SearchParameter/Flag-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Flag.subject', + description: 'The identity of a subject to list flags for', + }, +}; diff --git a/src/resources/4_0_0/parameters/goal.parameters.js b/src/resources/4_0_0/parameters/goal.parameters.js new file mode 100644 index 00000000..b0b89edd --- /dev/null +++ b/src/resources/4_0_0/parameters/goal.parameters.js @@ -0,0 +1,71 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the goal query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Goal.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/Goal-achievement-status + achievement_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.achievementStatus', + description: + 'in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable', + }, + // http://hl7.org/fhir/SearchParameter/Goal-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.category', + description: 'E.g. Treatment, dietary, behavioral, etc.', + }, + // http://hl7.org/fhir/SearchParameter/Goal-lifecycle-status + lifecycle_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Goal.lifecycleStatus', + description: + 'proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected', + }, + // http://hl7.org/fhir/SearchParameter/Goal-start-date + start_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Goal.startDate', + description: 'When goal pursuit begins', + }, + // http://hl7.org/fhir/SearchParameter/Goal-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Goal.subject', + description: 'Who this goal is intended for', + }, + // http://hl7.org/fhir/SearchParameter/Goal-target-date + target_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Goal.target.dueDate', + description: 'Reach goal on or before', + }, +}; diff --git a/src/resources/4_0_0/parameters/graphdefinition.parameters.js b/src/resources/4_0_0/parameters/graphdefinition.parameters.js new file mode 100644 index 00000000..fcc2947d --- /dev/null +++ b/src/resources/4_0_0/parameters/graphdefinition.parameters.js @@ -0,0 +1,123 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the graphdefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GraphDefinition.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'GraphDefinition.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GraphDefinition.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'GraphDefinition.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'GraphDefinition.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GraphDefinition.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'GraphDefinition.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'GraphDefinition.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GraphDefinition.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'GraphDefinition.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GraphDefinition.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/GraphDefinition-start + start: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GraphDefinition.start', + description: 'Type of resource at which the graph starts', + }, +}; diff --git a/src/resources/4_0_0/parameters/group.parameters.js b/src/resources/4_0_0/parameters/group.parameters.js new file mode 100644 index 00000000..a3cf7262 --- /dev/null +++ b/src/resources/4_0_0/parameters/group.parameters.js @@ -0,0 +1,80 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the group query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Group-actual + actual: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.actual', + description: 'Descriptive or actual', + }, + // http://hl7.org/fhir/SearchParameter/Group-characteristic + characteristic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.characteristic.code', + description: 'Kind of characteristic', + }, + // http://hl7.org/fhir/SearchParameter/Group-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.code', + description: 'The kind of resources contained', + }, + // http://hl7.org/fhir/SearchParameter/Group-exclude + exclude: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.characteristic.exclude', + description: 'Group includes or excludes', + }, + // http://hl7.org/fhir/SearchParameter/Group-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.identifier', + description: 'Unique id', + }, + // http://hl7.org/fhir/SearchParameter/Group-managing-entity + managing_entity: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Group.managingEntity', + description: "Entity that is the custodian of the Group's definition", + }, + // http://hl7.org/fhir/SearchParameter/Group-member + member: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Group.member.entity', + description: 'Reference to the group member', + }, + // http://hl7.org/fhir/SearchParameter/Group-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.type', + description: 'The type of resources the group contains', + }, + // http://hl7.org/fhir/SearchParameter/Group-value + value: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Group.characteristic.valueCodeableConcept', + description: 'Value held by characteristic', + }, + // http://hl7.org/fhir/SearchParameter/Group-characteristic-value + characteristic_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'A composite of both characteristic and value', + }, +}; diff --git a/src/resources/4_0_0/parameters/guidanceresponse.parameters.js b/src/resources/4_0_0/parameters/guidanceresponse.parameters.js new file mode 100644 index 00000000..b6bf171e --- /dev/null +++ b/src/resources/4_0_0/parameters/guidanceresponse.parameters.js @@ -0,0 +1,39 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the guidanceresponse query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/GuidanceResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GuidanceResponse.identifier', + description: 'The identifier of the guidance response', + }, + // http://hl7.org/fhir/SearchParameter/GuidanceResponse-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'GuidanceResponse.subject', + description: + 'The identity of a patient to search for guidance response results', + }, + // http://hl7.org/fhir/SearchParameter/GuidanceResponse-request + request: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'GuidanceResponse.requestIdentifier', + description: 'The identifier of the request associated with the response', + }, + // http://hl7.org/fhir/SearchParameter/GuidanceResponse-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'GuidanceResponse.subject', + description: 'The subject that the guidance response is about', + }, +}; diff --git a/src/resources/4_0_0/parameters/healthcareservice.parameters.js b/src/resources/4_0_0/parameters/healthcareservice.parameters.js new file mode 100644 index 00000000..e40fe60d --- /dev/null +++ b/src/resources/4_0_0/parameters/healthcareservice.parameters.js @@ -0,0 +1,96 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the healthcareservice query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/HealthcareService-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.active', + description: 'The Healthcare Service is currently marked as active', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-characteristic + characteristic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.characteristic', + description: "One of the HealthcareService's characteristics", + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-coverage-area + coverage_area: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'HealthcareService.coverageArea', + description: 'Location(s) service is intended for/available to', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-endpoint + endpoint: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'HealthcareService.endpoint', + description: + 'Technical endpoints providing access to electronic services operated for the healthcare service', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.identifier', + description: 'External identifiers for this item', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'HealthcareService.location', + description: 'The location of the Healthcare Service', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'HealthcareService.name', + description: 'A portion of the Healthcare service name', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'HealthcareService.providedBy', + description: 'The organization that provides this Healthcare Service', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-program + program: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.program', + description: 'One of the Programs supported by this HealthcareService', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-service-category + service_category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.category', + description: 'Service Category of the Healthcare Service', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-service-type + service_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.type', + description: 'The type of service provided by this healthcare service', + }, + // http://hl7.org/fhir/SearchParameter/HealthcareService-specialty + specialty: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'HealthcareService.specialty', + description: + 'The specialty of the service provided by this healthcare service', + }, +}; diff --git a/src/resources/4_0_0/parameters/imagingstudy.parameters.js b/src/resources/4_0_0/parameters/imagingstudy.parameters.js new file mode 100644 index 00000000..4dc619e1 --- /dev/null +++ b/src/resources/4_0_0/parameters/imagingstudy.parameters.js @@ -0,0 +1,132 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the imagingstudy query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-basedon + basedon: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.basedOn', + description: 'The order for the image', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-bodysite + bodysite: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.series.bodySite', + description: 'The body site studied', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-dicom-class + dicom_class: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.series.instance.sopClass', + description: 'The type of the instance', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.encounter', + description: 'The context of the study', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-endpoint + endpoint: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.endpoint', + description: 'The endpoint for the study or series', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-instance + instance: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.series.instance.uid', + description: 'SOP Instance UID for an instance', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-interpreter + interpreter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.interpreter', + description: 'Who interpreted the images', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-modality + modality: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.series.modality', + description: 'The modality of the series', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.series.performer.actor', + description: 'The person who performed the study', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-reason + reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.reasonCode', + description: 'The reason for the study', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-referrer + referrer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.referrer', + description: 'The referring physician', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-series + series: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.series.uid', + description: 'DICOM Series Instance UID for a series', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-started + started: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ImagingStudy.started', + description: 'When the study was started', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImagingStudy.status', + description: 'The status of the study', + }, + // http://hl7.org/fhir/SearchParameter/ImagingStudy-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImagingStudy.subject', + description: 'Who the study is about', + }, +}; diff --git a/src/resources/4_0_0/parameters/immunization.parameters.js b/src/resources/4_0_0/parameters/immunization.parameters.js new file mode 100644 index 00000000..042043f0 --- /dev/null +++ b/src/resources/4_0_0/parameters/immunization.parameters.js @@ -0,0 +1,128 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the immunization query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Immunization.occurrenceDateTime', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.location', + description: + 'The service delivery location or facility in which the vaccine was / was to be administered', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-lot-number + lot_number: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Immunization.lotNumber', + description: 'Vaccine Lot Number', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-manufacturer + manufacturer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.manufacturer', + description: 'Vaccine Manufacturer', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.performer.actor', + description: + 'The practitioner or organization who played a role in the vaccination', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-reaction + reaction: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.reaction.detail', + description: 'Additional information on reaction', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-reaction-date + reaction_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Immunization.reaction.date', + description: 'When reaction started', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-reason-code + reason_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.reasonCode', + description: 'Reason why the vaccine was administered', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-reason-reference + reason_reference: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Immunization.reasonReference', + description: 'Why immunization occurred', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-series + series: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Immunization.protocolApplied.series', + description: 'The series being followed by the provider', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.status', + description: 'Immunization event status', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-status-reason + status_reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.statusReason', + description: 'Reason why the vaccine was not administered', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-target-disease + target_disease: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.protocolApplied.targetDisease', + description: 'The target disease the dose is being administered against', + }, + // http://hl7.org/fhir/SearchParameter/Immunization-vaccine-code + vaccine_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Immunization.vaccineCode', + description: 'Vaccine Product Administered', + }, +}; diff --git a/src/resources/4_0_0/parameters/immunizationevaluation.parameters.js b/src/resources/4_0_0/parameters/immunizationevaluation.parameters.js new file mode 100644 index 00000000..60f6f3d3 --- /dev/null +++ b/src/resources/4_0_0/parameters/immunizationevaluation.parameters.js @@ -0,0 +1,60 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the immunizationevaluation query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ImmunizationEvaluation.date', + description: 'Date the evaluation was generated', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-dose-status + dose_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationEvaluation.doseStatus', + description: 'The status of the dose relative to published recommendations', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationEvaluation.identifier', + description: 'ID of the evaluation', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-immunization-event + immunization_event: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImmunizationEvaluation.immunizationEvent', + description: 'The vaccine administration event being evaluated', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImmunizationEvaluation.patient', + description: 'The patient being evaluated', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationEvaluation.status', + description: 'Immunization evaluation status', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationEvaluation-target-disease + target_disease: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationEvaluation.targetDisease', + description: 'The vaccine preventable disease being evaluated against', + }, +}; diff --git a/src/resources/4_0_0/parameters/immunizationrecommendation.parameters.js b/src/resources/4_0_0/parameters/immunizationrecommendation.parameters.js new file mode 100644 index 00000000..eac38aa2 --- /dev/null +++ b/src/resources/4_0_0/parameters/immunizationrecommendation.parameters.js @@ -0,0 +1,68 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the immunizationrecommendation query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ImmunizationRecommendation.date', + description: 'Date recommendation(s) created', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.identifier', + description: 'Business identifier', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-information + information: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + 'ImmunizationRecommendation.recommendation.supportingPatientInformation', + description: 'Patient observations supporting recommendation', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImmunizationRecommendation.patient', + description: 'Who this profile is for', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.recommendation.forecastStatus', + description: 'Vaccine recommendation status', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-support + support: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImmunizationRecommendation.recommendation.supportingImmunization', + description: 'Past immunizations supporting recommendation', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-target-disease + target_disease: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.recommendation.targetDisease', + description: 'Disease to be immunized against', + }, + // http://hl7.org/fhir/SearchParameter/ImmunizationRecommendation-vaccine-type + vaccine_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImmunizationRecommendation.recommendation.vaccineCode', + description: 'Vaccine or vaccine group recommendation applies to', + }, +}; diff --git a/src/resources/4_0_0/parameters/implementationguide.parameters.js b/src/resources/4_0_0/parameters/implementationguide.parameters.js new file mode 100644 index 00000000..39bd2521 --- /dev/null +++ b/src/resources/4_0_0/parameters/implementationguide.parameters.js @@ -0,0 +1,152 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the implementationguide query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ImplementationGuide.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ImplementationGuide.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ImplementationGuide.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ImplementationGuide.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ImplementationGuide.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ImplementationGuide.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ImplementationGuide.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImplementationGuide.dependsOn.uri', + description: 'Identity of the IG that this depends on', + }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-experimental + experimental: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ImplementationGuide.experimental', + description: 'For testing purposes, not real usage', + }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-global + global: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImplementationGuide.global.profile', + description: 'Profile that all resources must conform to', + }, + // http://hl7.org/fhir/SearchParameter/ImplementationGuide-resource + resource: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ImplementationGuide.definition.resource.reference', + description: 'Location of the resource', + }, +}; diff --git a/src/resources/4_0_0/parameters/insuranceplan.parameters.js b/src/resources/4_0_0/parameters/insuranceplan.parameters.js new file mode 100644 index 00000000..3702cc11 --- /dev/null +++ b/src/resources/4_0_0/parameters/insuranceplan.parameters.js @@ -0,0 +1,111 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the insuranceplan query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/InsurancePlan-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'InsurancePlan.contact.address', + description: + 'A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-address-city + address_city: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'InsurancePlan.contact.address.city', + description: 'A city specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'InsurancePlan.contact.address.country', + description: 'A country specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'InsurancePlan.contact.address.postalCode', + description: 'A postal code specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'InsurancePlan.contact.address.state', + description: 'A state specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'InsurancePlan.contact.address.use', + description: 'A use code specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-administered-by + administered_by: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'InsurancePlan.administeredBy', + description: 'Product administrator', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-endpoint + endpoint: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'InsurancePlan.endpoint', + description: 'Technical endpoint', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'InsurancePlan.identifier', + description: + "Any identifier for the organization (not the accreditation issuer's identifier)", + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'InsurancePlan.name', + description: "A portion of the organization's name or alias", + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-owned-by + owned_by: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'InsurancePlan.ownedBy', + description: 'An organization of which this organization forms a part', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'InsurancePlan.name', + description: + "A portion of the organization's name using some kind of phonetic matching algorithm", + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'InsurancePlan.status', + description: 'Is the Organization record active', + }, + // http://hl7.org/fhir/SearchParameter/InsurancePlan-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'InsurancePlan.type', + description: 'A code for the type of organization', + }, +}; diff --git a/src/resources/4_0_0/parameters/invoice.parameters.js b/src/resources/4_0_0/parameters/invoice.parameters.js new file mode 100644 index 00000000..817fb332 --- /dev/null +++ b/src/resources/4_0_0/parameters/invoice.parameters.js @@ -0,0 +1,102 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the invoice query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Invoice-account + account: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Invoice.account', + description: 'Account that is being balanced', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Invoice.date', + description: 'Invoice date / posting date', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Invoice.identifier', + description: 'Business Identifier for item', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-issuer + issuer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Invoice.issuer', + description: 'Issuing Organization of Invoice', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-participant + participant: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Invoice.participant.actor', + description: 'Individual who was involved', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-participant-role + participant_role: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Invoice.participant.role', + description: 'Type of involvement in creation of this Invoice', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Invoice.subject', + description: 'Recipient(s) of goods and services', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-recipient + recipient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Invoice.recipient', + description: 'Recipient of this invoice', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Invoice.status', + description: 'draft | issued | balanced | cancelled | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Invoice.subject', + description: 'Recipient(s) of goods and services', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-totalgross + totalgross: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Invoice.totalGross', + description: 'Gross total of this Invoice', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-totalnet + totalnet: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Invoice.totalNet', + description: 'Net total of this Invoice', + }, + // http://hl7.org/fhir/SearchParameter/Invoice-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Invoice.type', + description: 'Type of Invoice', + }, +}; diff --git a/src/resources/4_0_0/parameters/library.parameters.js b/src/resources/4_0_0/parameters/library.parameters.js new file mode 100644 index 00000000..eb7437af --- /dev/null +++ b/src/resources/4_0_0/parameters/library.parameters.js @@ -0,0 +1,183 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the library query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Library-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Library-content-type + content_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.content.contentType', + description: 'The type of content in the library (e.g. text/cql)', + }, + // http://hl7.org/fhir/SearchParameter/Library-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.useContext.valueCodeableConcept', + description: 'A use context assigned to the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Library.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.useContext.code', + description: 'A type of use context assigned to the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Library.date', + description: 'The library publication date', + }, + // http://hl7.org/fhir/SearchParameter/Library-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Library-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Library-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Library.description', + description: 'The description of the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Library.effectivePeriod', + description: 'The time during which the library is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/Library-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.identifier', + description: 'External identifier for the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.jurisdiction', + description: 'Intended jurisdiction for the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Library.name', + description: 'Computationally friendly name of the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Library-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Library.publisher', + description: 'Name of the publisher of the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.status', + description: 'The current status of the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Library.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Library-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Library.title', + description: 'The human-friendly name of the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.topic', + description: 'Topics associated with the module', + }, + // http://hl7.org/fhir/SearchParameter/Library-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.type', + description: + 'The type of the library (e.g. logic-library, model-definition, asset-collection, module-definition)', + }, + // http://hl7.org/fhir/SearchParameter/Library-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Library.url', + description: 'The uri that identifies the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Library.version', + description: 'The business version of the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the library', + }, + // http://hl7.org/fhir/SearchParameter/Library-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'A use context type and value assigned to the library', + }, +}; diff --git a/src/resources/4_0_0/parameters/linkage.parameters.js b/src/resources/4_0_0/parameters/linkage.parameters.js new file mode 100644 index 00000000..154f390a --- /dev/null +++ b/src/resources/4_0_0/parameters/linkage.parameters.js @@ -0,0 +1,30 @@ +const { GraphQLString } = require('graphql'); + +/** + * @name exports + * @static + * @summary Arguments for the linkage query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Linkage-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Linkage.author', + description: 'Author of the Linkage', + }, + // http://hl7.org/fhir/SearchParameter/Linkage-item + item: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Linkage.item.resource', + description: 'Matches on any item in the Linkage', + }, + // http://hl7.org/fhir/SearchParameter/Linkage-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Linkage.item.resource', + description: "Matches on any item in the Linkage with a type of 'source'", + }, +}; diff --git a/src/resources/4_0_0/parameters/list.parameters.js b/src/resources/4_0_0/parameters/list.parameters.js new file mode 100644 index 00000000..c20f9435 --- /dev/null +++ b/src/resources/4_0_0/parameters/list.parameters.js @@ -0,0 +1,100 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the list query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'List.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'List.date', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'List.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/List-empty-reason + empty_reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'List.emptyReason', + description: 'Why list is empty', + }, + // http://hl7.org/fhir/SearchParameter/List-item + item: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.entry.item', + description: 'Actual entry', + }, + // http://hl7.org/fhir/SearchParameter/List-notes + notes: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'List.note.text', + description: 'The annotation - text content (as markdown)', + }, + // http://hl7.org/fhir/SearchParameter/List-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.source', + description: 'Who and/or what defined the list contents (aka Author)', + }, + // http://hl7.org/fhir/SearchParameter/List-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'List.status', + description: 'current | retired | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/List-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'List.subject', + description: 'If all resources have the same subject', + }, + // http://hl7.org/fhir/SearchParameter/List-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'List.title', + description: 'Descriptive name for the list', + }, +}; diff --git a/src/resources/4_0_0/parameters/location.parameters.js b/src/resources/4_0_0/parameters/location.parameters.js new file mode 100644 index 00000000..0e8af754 --- /dev/null +++ b/src/resources/4_0_0/parameters/location.parameters.js @@ -0,0 +1,119 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the location query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Location-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Location.address', + description: 'A (part of the) address of the location', + }, + // http://hl7.org/fhir/SearchParameter/Location-address-city + address_city: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Location.address.city', + description: 'A city specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Location-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Location.address.country', + description: 'A country specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Location-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Location.address.postalCode', + description: 'A postal code specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Location-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Location.address.state', + description: 'A state specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Location-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.address.use', + description: 'A use code specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Location-endpoint + endpoint: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Location.endpoint', + description: + 'Technical endpoints providing access to services operated for the location', + }, + // http://hl7.org/fhir/SearchParameter/Location-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.identifier', + description: 'An identifier for the location', + }, + // http://hl7.org/fhir/SearchParameter/Location-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Location.name', + description: "A portion of the location's name or alias", + }, + // http://hl7.org/fhir/SearchParameter/Location-near + near: { + type: GraphQLString, + fhirtype: 'special', + xpath: 'Location.position', + description: + 'Search for locations where the location.position is near to, or within a specified distance of, the provided coordinates expressed as [latitude]|[longitude]|[distance]|[units] (using the WGS84 datum, see notes). If the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant) Servers may search using various techniques that might have differing accuracies, depending on implementation efficiency. Requires the near-distance parameter to be provided also', + }, + // http://hl7.org/fhir/SearchParameter/Location-operational-status + operational_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.operationalStatus', + description: + 'Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)', + }, + // http://hl7.org/fhir/SearchParameter/Location-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Location.managingOrganization', + description: + 'Searches for locations that are managed by the provided organization', + }, + // http://hl7.org/fhir/SearchParameter/Location-partof + partof: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Location.partOf', + description: 'A location of which this location is a part', + }, + // http://hl7.org/fhir/SearchParameter/Location-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.status', + description: 'Searches for locations with a specific kind of status', + }, + // http://hl7.org/fhir/SearchParameter/Location-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Location.type', + description: 'A code for the type of location', + }, +}; diff --git a/src/resources/4_0_0/parameters/measure.parameters.js b/src/resources/4_0_0/parameters/measure.parameters.js new file mode 100644 index 00000000..3e6691ac --- /dev/null +++ b/src/resources/4_0_0/parameters/measure.parameters.js @@ -0,0 +1,168 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the measure query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Measure-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Measure-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.useContext.valueCodeableConcept', + description: 'A use context assigned to the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Measure.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.useContext.code', + description: 'A type of use context assigned to the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Measure.date', + description: 'The measure publication date', + }, + // http://hl7.org/fhir/SearchParameter/Measure-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Measure-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Measure-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Measure.description', + description: 'The description of the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Measure.effectivePeriod', + description: 'The time during which the measure is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/Measure-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.identifier', + description: 'External identifier for the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.jurisdiction', + description: 'Intended jurisdiction for the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Measure.name', + description: 'Computationally friendly name of the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Measure-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Measure.publisher', + description: 'Name of the publisher of the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.status', + description: 'The current status of the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "Measure.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/Measure-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Measure.title', + description: 'The human-friendly name of the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.topic', + description: 'Topics associated with the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Measure.url', + description: 'The uri that identifies the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Measure.version', + description: 'The business version of the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the measure', + }, + // http://hl7.org/fhir/SearchParameter/Measure-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'A use context type and value assigned to the measure', + }, +}; diff --git a/src/resources/4_0_0/parameters/measurereport.parameters.js b/src/resources/4_0_0/parameters/measurereport.parameters.js new file mode 100644 index 00000000..007cd5d0 --- /dev/null +++ b/src/resources/4_0_0/parameters/measurereport.parameters.js @@ -0,0 +1,76 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the measurereport query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MeasureReport-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MeasureReport.date', + description: 'The date of the measure report', + }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-evaluated-resource + evaluated_resource: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MeasureReport.evaluatedResource', + description: 'An evaluated resource referenced by the measure report', + }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MeasureReport.identifier', + description: 'External identifier of the measure report to be returned', + }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-measure + measure: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MeasureReport.measure', + description: 'The measure to return measure report results for', + }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MeasureReport.subject', + description: + 'The identity of a patient to search for individual measure report results for', + }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MeasureReport.period', + description: 'The period of the measure report', + }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-reporter + reporter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MeasureReport.reporter', + description: 'The reporter to return measure report results for', + }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MeasureReport.status', + description: 'The status of the measure report', + }, + // http://hl7.org/fhir/SearchParameter/MeasureReport-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MeasureReport.subject', + description: + 'The identity of a subject to search for individual measure report results for', + }, +}; diff --git a/src/resources/4_0_0/parameters/media.parameters.js b/src/resources/4_0_0/parameters/media.parameters.js new file mode 100644 index 00000000..50b69520 --- /dev/null +++ b/src/resources/4_0_0/parameters/media.parameters.js @@ -0,0 +1,103 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the media query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Media-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.basedOn', + description: 'Procedure that caused this media to be created', + }, + // http://hl7.org/fhir/SearchParameter/Media-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Media.createdDateTime', + description: 'When Media was collected', + }, + // http://hl7.org/fhir/SearchParameter/Media-device + device: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.device', + description: 'Observing Device', + }, + // http://hl7.org/fhir/SearchParameter/Media-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.encounter', + description: 'Encounter associated with media', + }, + // http://hl7.org/fhir/SearchParameter/Media-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.identifier', + description: 'Identifier(s) for the image', + }, + // http://hl7.org/fhir/SearchParameter/Media-modality + modality: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.modality', + description: 'The type of acquisition equipment/process', + }, + // http://hl7.org/fhir/SearchParameter/Media-operator + operator: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.operator', + description: 'The person who generated the image', + }, + // http://hl7.org/fhir/SearchParameter/Media-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.subject', + description: 'Who/What this Media is a record of', + }, + // http://hl7.org/fhir/SearchParameter/Media-site + site: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.bodySite', + description: 'Observed body part', + }, + // http://hl7.org/fhir/SearchParameter/Media-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.status', + description: + 'preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown', + }, + // http://hl7.org/fhir/SearchParameter/Media-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Media.subject', + description: 'Who/What this Media is a record of', + }, + // http://hl7.org/fhir/SearchParameter/Media-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.type', + description: 'Classification of media as image, video, or audio', + }, + // http://hl7.org/fhir/SearchParameter/Media-view + view: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Media.view', + description: 'Imaging view, e.g. Lateral or Antero-posterior', + }, +}; diff --git a/src/resources/4_0_0/parameters/medication.parameters.js b/src/resources/4_0_0/parameters/medication.parameters.js new file mode 100644 index 00000000..361fb4e1 --- /dev/null +++ b/src/resources/4_0_0/parameters/medication.parameters.js @@ -0,0 +1,75 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medication query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/Medication-expiration-date + expiration_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Medication.batch.expirationDate', + description: 'Returns medications in a batch with this expiration date', + }, + // http://hl7.org/fhir/SearchParameter/Medication-form + form: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.form', + description: 'Returns medications for a specific dose form', + }, + // http://hl7.org/fhir/SearchParameter/Medication-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.identifier', + description: 'Returns medications with this external identifier', + }, + // http://hl7.org/fhir/SearchParameter/Medication-ingredient + ingredient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Medication.ingredient.itemReference', + description: 'Returns medications for this ingredient reference', + }, + // http://hl7.org/fhir/SearchParameter/Medication-ingredient-code + ingredient_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.ingredient.itemCodeableConcept', + description: 'Returns medications for this ingredient code', + }, + // http://hl7.org/fhir/SearchParameter/Medication-lot-number + lot_number: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.batch.lotNumber', + description: 'Returns medications in a batch with this lot number', + }, + // http://hl7.org/fhir/SearchParameter/Medication-manufacturer + manufacturer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Medication.manufacturer', + description: 'Returns medications made or sold for this manufacturer', + }, + // http://hl7.org/fhir/SearchParameter/Medication-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Medication.status', + description: 'Returns medications for this status', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicationadministration.parameters.js b/src/resources/4_0_0/parameters/medicationadministration.parameters.js new file mode 100644 index 00000000..4e078737 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicationadministration.parameters.js @@ -0,0 +1,111 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicationadministration query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.medicationCodeableConcept', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-context + context: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.context', + description: + 'Return administrations that share this encounter or episode of care', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-device + device: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.device', + description: + 'Return administrations with this administration device identity', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-effective-time + effective_time: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationAdministration.effectiveDateTime', + description: 'Date administration happened (or did not happen)', + }, + // http://hl7.org/fhir/SearchParameter/medications-medication + medication: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.medicationReference', + description: + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource * [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference * [MedicationStatement](medicationstatement.html): Return statements of this medication reference ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.performer.actor', + description: + 'The identity of the individual who administered the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-given + reason_given: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.reasonCode', + description: 'Reasons for administering the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-reason-not-given + reason_not_given: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.statusReason', + description: 'Reasons for not administering the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.request', + description: 'The identity of a request to list administrations from', + }, + // http://hl7.org/fhir/SearchParameter/medications-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationAdministration.status', + description: + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) * [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status * [MedicationRequest](medicationrequest.html): Status of the prescription * [MedicationStatement](medicationstatement.html): Return statements that match the given status ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationAdministration-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationAdministration.subject', + description: + 'The identity of the individual or group to list administrations for', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicationdispense.parameters.js b/src/resources/4_0_0/parameters/medicationdispense.parameters.js new file mode 100644 index 00000000..c6ccfdb1 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicationdispense.parameters.js @@ -0,0 +1,124 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicationdispense query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationDispense.medicationCodeableConcept', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationDispense.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/medications-medication + medication: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.medicationReference', + description: + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource * [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference * [MedicationStatement](medicationstatement.html): Return statements of this medication reference ', + }, + // http://hl7.org/fhir/SearchParameter/medications-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationDispense.status', + description: + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) * [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status * [MedicationRequest](medicationrequest.html): Status of the prescription * [MedicationStatement](medicationstatement.html): Return statements that match the given status ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-context + context: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.context', + description: + 'Returns dispenses with a specific context (episode or episode of care)', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-destination + destination: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.destination', + description: + 'Returns dispenses that should be sent to a specific destination', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.performer.actor', + description: 'Returns dispenses performed by a specific individual', + }, + // http://hl7.org/fhir/SearchParameter/medications-prescription + prescription: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.authorizingPrescription', + description: + 'Multiple Resources: * [MedicationDispense](medicationdispense.html): The identity of a prescription to list dispenses from ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-receiver + receiver: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.receiver', + description: 'The identity of a receiver to list dispenses for', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-responsibleparty + responsibleparty: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.substitution.responsibleParty', + description: 'Returns dispenses with the specified responsible party', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationDispense.subject', + description: 'The identity of a patient for whom to list dispenses', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationDispense.type', + description: 'Returns dispenses of a specific type', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-whenhandedover + whenhandedover: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationDispense.whenHandedOver', + description: 'Returns dispenses handed over on this date', + }, + // http://hl7.org/fhir/SearchParameter/MedicationDispense-whenprepared + whenprepared: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationDispense.whenPrepared', + description: 'Returns dispenses prepared on this date', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicationknowledge.parameters.js b/src/resources/4_0_0/parameters/medicationknowledge.parameters.js new file mode 100644 index 00000000..2d655cb4 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicationknowledge.parameters.js @@ -0,0 +1,102 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicationknowledge query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-classification + classification: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.medicineClassification.classification', + description: 'Specific category assigned to the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-classification-type + classification_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.medicineClassification.type', + description: + 'The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification)', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.code', + description: 'Code that identifies this medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-doseform + doseform: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.doseForm', + description: 'powder | tablets | capsule +', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-ingredient + ingredient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationKnowledge.ingredient.itemReference', + description: 'Medication(s) or substance(s) contained in the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-ingredient-code + ingredient_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.ingredient.itemCodeableConcept', + description: 'Medication(s) or substance(s) contained in the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-manufacturer + manufacturer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationKnowledge.manufacturer', + description: 'Manufacturer of the item', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monitoring-program-name + monitoring_program_name: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.monitoringProgram.name', + description: 'Name of the reviewing program', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monitoring-program-type + monitoring_program_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.monitoringProgram.type', + description: 'Type of program under which the medication is monitored', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monograph + monograph: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationKnowledge.monograph.source', + description: 'Associated documentation about the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-monograph-type + monograph_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.monograph.type', + description: 'The category of medication document', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-source-cost + source_cost: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.cost.source', + description: 'The source or owner for the price information', + }, + // http://hl7.org/fhir/SearchParameter/MedicationKnowledge-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationKnowledge.status', + description: 'active | inactive | entered-in-error', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicationrequest.parameters.js b/src/resources/4_0_0/parameters/medicationrequest.parameters.js new file mode 100644 index 00000000..2fde30cb --- /dev/null +++ b/src/resources/4_0_0/parameters/medicationrequest.parameters.js @@ -0,0 +1,132 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicationrequest query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.medicationCodeableConcept', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/medications-medication + medication: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.medicationReference', + description: + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource * [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference * [MedicationStatement](medicationstatement.html): Return statements of this medication reference ', + }, + // http://hl7.org/fhir/SearchParameter/medications-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.status', + description: + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) * [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status * [MedicationRequest](medicationrequest.html): Status of the prescription * [MedicationStatement](medicationstatement.html): Return statements that match the given status ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-authoredon + authoredon: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationRequest.authoredOn', + description: 'Return prescriptions written on this date', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.category', + description: 'Returns prescriptions with different categories', + }, + // http://hl7.org/fhir/SearchParameter/medications-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationRequest.dosageInstruction.timing.event', + description: + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Returns medication request to be administered on a specific date ', + }, + // http://hl7.org/fhir/SearchParameter/medications-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.encounter', + description: + 'Multiple Resources: * [MedicationRequest](medicationrequest.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-dispenser + intended_dispenser: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.dispenseRequest.performer', + description: + 'Returns prescriptions intended to be dispensed by this Organization', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-performer + intended_performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.performer', + description: + 'Returns the intended performer of the administration of the medication request', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-intended-performertype + intended_performertype: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.performerType', + description: 'Returns requests for a specific type of performer', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-intent + intent: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.intent', + description: 'Returns prescriptions with different intents', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationRequest.priority', + description: 'Returns prescriptions with different priorities', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.requester', + description: 'Returns prescriptions prescribed by this prescriber', + }, + // http://hl7.org/fhir/SearchParameter/MedicationRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationRequest.subject', + description: 'The identity of a patient to list orders for', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicationstatement.parameters.js b/src/resources/4_0_0/parameters/medicationstatement.parameters.js new file mode 100644 index 00000000..e24c43b5 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicationstatement.parameters.js @@ -0,0 +1,95 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicationstatement query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.medicationCodeableConcept', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/medications-medication + medication: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.medicationReference', + description: + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): Return administrations of this medication resource * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource * [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference * [MedicationStatement](medicationstatement.html): Return statements of this medication reference ', + }, + // http://hl7.org/fhir/SearchParameter/medications-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.status', + description: + 'Multiple Resources: * [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) * [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status * [MedicationRequest](medicationrequest.html): Status of the prescription * [MedicationStatement](medicationstatement.html): Return statements that match the given status ', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicationStatement.category', + description: 'Returns statements of this category of medicationstatement', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-context + context: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.context', + description: + 'Returns statements for a specific context (episode or episode of Care).', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MedicationStatement.effectiveDateTime', + description: 'Date when patient was taking (or not taking) the medication', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-part-of + part_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.partOf', + description: 'Returns statements that are part of another event.', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.informationSource', + description: 'Who or where the information in the statement came from', + }, + // http://hl7.org/fhir/SearchParameter/MedicationStatement-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicationStatement.subject', + description: + 'The identity of a patient, animal or group to list statements for', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicinalproduct.parameters.js b/src/resources/4_0_0/parameters/medicinalproduct.parameters.js new file mode 100644 index 00000000..ccaa3ee9 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicinalproduct.parameters.js @@ -0,0 +1,31 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicinalproduct query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicinalProduct-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicinalProduct.identifier', + description: 'Business identifier for this product. Could be an MPID', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProduct-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MedicinalProduct.name.productName', + description: 'The full product name', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProduct-name-language + name_language: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicinalProduct.name.countryLanguage.language', + description: 'Language code for this name', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicinalproductauthorization.parameters.js b/src/resources/4_0_0/parameters/medicinalproductauthorization.parameters.js new file mode 100644 index 00000000..7b185b46 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicinalproductauthorization.parameters.js @@ -0,0 +1,47 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicinalproductauthorization query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-country + country: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicinalProductAuthorization.country', + description: + 'The country in which the marketing authorization has been granted', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-holder + holder: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicinalProductAuthorization.holder', + description: 'Marketing Authorization Holder', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicinalProductAuthorization.identifier', + description: + 'Business identifier for the marketing authorization, as assigned by a regulator', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicinalProductAuthorization.status', + description: 'The status of the marketing authorization', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProductAuthorization-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicinalProductAuthorization.subject', + description: 'The medicinal product that is being authorized', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicinalproductcontraindication.parameters.js b/src/resources/4_0_0/parameters/medicinalproductcontraindication.parameters.js new file mode 100644 index 00000000..3830b909 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicinalproductcontraindication.parameters.js @@ -0,0 +1,16 @@ +const { GraphQLString } = require('graphql'); + +/** + * @name exports + * @static + * @summary Arguments for the medicinalproductcontraindication query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicinalProductContraindication-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicinalProductContraindication.subject', + description: 'The medication for which this is an contraindication', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicinalproductindication.parameters.js b/src/resources/4_0_0/parameters/medicinalproductindication.parameters.js new file mode 100644 index 00000000..e81413b1 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicinalproductindication.parameters.js @@ -0,0 +1,16 @@ +const { GraphQLString } = require('graphql'); + +/** + * @name exports + * @static + * @summary Arguments for the medicinalproductindication query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicinalProductIndication-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicinalProductIndication.subject', + description: 'The medication for which this is an indication', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicinalproductinteraction.parameters.js b/src/resources/4_0_0/parameters/medicinalproductinteraction.parameters.js new file mode 100644 index 00000000..9dd80209 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicinalproductinteraction.parameters.js @@ -0,0 +1,16 @@ +const { GraphQLString } = require('graphql'); + +/** + * @name exports + * @static + * @summary Arguments for the medicinalproductinteraction query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicinalProductInteraction-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicinalProductInteraction.subject', + description: 'The medication for which this is an interaction', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicinalproductpackaged.parameters.js b/src/resources/4_0_0/parameters/medicinalproductpackaged.parameters.js new file mode 100644 index 00000000..fed11cce --- /dev/null +++ b/src/resources/4_0_0/parameters/medicinalproductpackaged.parameters.js @@ -0,0 +1,24 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicinalproductpackaged query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicinalProductPackaged-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicinalProductPackaged.identifier', + description: 'Unique identifier', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProductPackaged-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicinalProductPackaged.subject', + description: 'The product with this is a pack for', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicinalproductpharmaceutical.parameters.js b/src/resources/4_0_0/parameters/medicinalproductpharmaceutical.parameters.js new file mode 100644 index 00000000..f9615eea --- /dev/null +++ b/src/resources/4_0_0/parameters/medicinalproductpharmaceutical.parameters.js @@ -0,0 +1,31 @@ +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the medicinalproductpharmaceutical query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicinalProductPharmaceutical.identifier', + description: 'An identifier for the pharmaceutical medicinal product', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-route + route: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MedicinalProductPharmaceutical.routeOfAdministration.code', + description: 'Coded expression for the route', + }, + // http://hl7.org/fhir/SearchParameter/MedicinalProductPharmaceutical-target-species + target_species: { + type: TokenScalar, + fhirtype: 'token', + xpath: + 'MedicinalProductPharmaceutical.routeOfAdministration.targetSpecies.code', + description: 'Coded expression for the species', + }, +}; diff --git a/src/resources/4_0_0/parameters/medicinalproductundesirableeffect.parameters.js b/src/resources/4_0_0/parameters/medicinalproductundesirableeffect.parameters.js new file mode 100644 index 00000000..3e94cbf0 --- /dev/null +++ b/src/resources/4_0_0/parameters/medicinalproductundesirableeffect.parameters.js @@ -0,0 +1,16 @@ +const { GraphQLString } = require('graphql'); + +/** + * @name exports + * @static + * @summary Arguments for the medicinalproductundesirableeffect query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MedicinalProductUndesirableEffect-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MedicinalProductUndesirableEffect.subject', + description: 'The medication for which this is an undesirable effect', + }, +}; diff --git a/src/resources/4_0_0/parameters/messagedefinition.parameters.js b/src/resources/4_0_0/parameters/messagedefinition.parameters.js new file mode 100644 index 00000000..38657de2 --- /dev/null +++ b/src/resources/4_0_0/parameters/messagedefinition.parameters.js @@ -0,0 +1,161 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the messagedefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'MessageDefinition.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'MessageDefinition.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MessageDefinition.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MessageDefinition.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MessageDefinition.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MessageDefinition.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'MessageDefinition.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.identifier', + description: + 'Multiple Resources: * [CodeSystem](codesystem.html): External identifier for the code system * [ConceptMap](conceptmap.html): External identifier for the concept map * [MessageDefinition](messagedefinition.html): External identifier for the message definition * [StructureDefinition](structuredefinition.html): External identifier for the structure definition * [StructureMap](structuremap.html): External identifier for the structure map * [ValueSet](valueset.html): External identifier for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/MessageDefinition-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.category', + description: 'The behavior associated with the message', + }, + // http://hl7.org/fhir/SearchParameter/MessageDefinition-event + event: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.eventCoding', + description: + 'The event that triggers the message or link to the event definition.', + }, + // http://hl7.org/fhir/SearchParameter/MessageDefinition-focus + focus: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageDefinition.focus.code', + description: 'A resource that is a permitted focus of the message', + }, + // http://hl7.org/fhir/SearchParameter/MessageDefinition-parent + parent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageDefinition.parent', + description: 'A resource that is the parent of the definition', + }, +}; diff --git a/src/resources/4_0_0/parameters/messageheader.parameters.js b/src/resources/4_0_0/parameters/messageheader.parameters.js new file mode 100644 index 00000000..e32e437f --- /dev/null +++ b/src/resources/4_0_0/parameters/messageheader.parameters.js @@ -0,0 +1,110 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the messageheader query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MessageHeader-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.author', + description: 'The source of the decision', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageHeader.response.code', + description: 'ok | transient-error | fatal-error', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-destination + destination: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MessageHeader.destination.name', + description: 'Name of system', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-destination-uri + destination_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'MessageHeader.destination.endpoint', + description: 'Actual destination address or id', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-enterer + enterer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.enterer', + description: 'The source of the data entry', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-event + event: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageHeader.eventCoding', + description: + 'Code for the event this message represents or link to event definition', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-focus + focus: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.focus', + description: 'The actual content of the message', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-receiver + receiver: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.destination.receiver', + description: "Intended 'real-world' recipient for the data", + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-response-id + response_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MessageHeader.response.identifier', + description: 'Id of original message', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-responsible + responsible: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.responsible', + description: 'Final responsibility for event', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-sender + sender: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.sender', + description: 'Real world sender of the message', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-source + source: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'MessageHeader.source.name', + description: 'Name of system', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-source-uri + source_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'MessageHeader.source.endpoint', + description: 'Actual message source address or id', + }, + // http://hl7.org/fhir/SearchParameter/MessageHeader-target + target: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MessageHeader.destination.target', + description: 'Particular delivery destination within the destination', + }, +}; diff --git a/src/resources/4_0_0/parameters/molecularsequence.parameters.js b/src/resources/4_0_0/parameters/molecularsequence.parameters.js new file mode 100644 index 00000000..66b2e5fc --- /dev/null +++ b/src/resources/4_0_0/parameters/molecularsequence.parameters.js @@ -0,0 +1,109 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the molecularsequence query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome + chromosome: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MolecularSequence.referenceSeq.chromosome', + description: 'Chromosome number of the reference sequence', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MolecularSequence.identifier', + description: 'The unique identity for a particular sequence', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'MolecularSequence.patient', + description: 'The subject that the observation is about', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid + referenceseqid: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MolecularSequence.referenceSeq.referenceSeqId', + description: 'Reference Sequence of the sequence', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'MolecularSequence.type', + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-end + variant_end: { + type: GraphQLString, + fhirtype: 'number', + xpath: 'MolecularSequence.variant.end', + description: + 'End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the variant.', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-variant-start + variant_start: { + type: GraphQLString, + fhirtype: 'number', + xpath: 'MolecularSequence.variant.start', + description: + 'Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the variant.', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-window-end + window_end: { + type: GraphQLString, + fhirtype: 'number', + xpath: 'MolecularSequence.referenceSeq.windowEnd', + description: + 'End position (0-based exclusive, which menas the acid at this position will not be included, 1-based inclusive, which means the acid at this position will be included) of the reference sequence.', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-window-start + window_start: { + type: GraphQLString, + fhirtype: 'number', + xpath: 'MolecularSequence.referenceSeq.windowStart', + description: + 'Start position (0-based inclusive, 1-based inclusive, that means the nucleic acid or amino acid at this position will be included) of the reference sequence.', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome-variant-coordinate + chromosome_variant_coordinate: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Search parameter by chromosome and variant coordinate. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `chromosome-variant-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with variants on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-chromosome-window-coordinate + chromosome_window_coordinate: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Search parameter by chromosome and window. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `chromosome-window-coordinate=1$lt345$gt123`, this means it will search for the MolecularSequence resource with a window on chromosome 1 and with position >123 and <345, where in 1-based system resource, all strings within region 1:124-344 will be revealed, while in 0-based system resource, all strings within region 1:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid-variant-coordinate + referenceseqid_variant_coordinate: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Search parameter by reference sequence and variant coordinate. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `referenceSeqId-variant-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with variants on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.', + }, + // http://hl7.org/fhir/SearchParameter/MolecularSequence-referenceseqid-window-coordinate + referenceseqid_window_coordinate: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Search parameter by reference sequence and window. This will refer to part of a locus or part of a gene where search region will be represented in 1-based system. Since the coordinateSystem can either be 0-based or 1-based, this search query will include the result of both coordinateSystem that contains the equivalent segment of the gene or whole genome sequence. For example, a search for sequence can be represented as `referenceSeqId-window-coordinate=NC_000001.11$lt345$gt123`, this means it will search for the MolecularSequence resource with a window on NC_000001.11 and with position >123 and <345, where in 1-based system resource, all strings within region NC_000001.11:124-344 will be revealed, while in 0-based system resource, all strings within region NC_000001.11:123-344 will be revealed. You may want to check detail about 0-based v.s. 1-based above.', + }, +}; diff --git a/src/resources/4_0_0/parameters/namingsystem.parameters.js b/src/resources/4_0_0/parameters/namingsystem.parameters.js new file mode 100644 index 00000000..8d1d4ecf --- /dev/null +++ b/src/resources/4_0_0/parameters/namingsystem.parameters.js @@ -0,0 +1,155 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the namingsystem query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'NamingSystem.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'NamingSystem.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'NamingSystem.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'NamingSystem.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'NamingSystem.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-contact + contact: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'NamingSystem.contact.name', + description: 'Name of an individual to contact', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-id-type + id_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.uniqueId.type', + description: 'oid | uuid | uri | other', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-kind + kind: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.kind', + description: 'codesystem | identifier | root', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'NamingSystem.uniqueId.period', + description: 'When is identifier valid?', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-responsible + responsible: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'NamingSystem.responsible', + description: 'Who maintains system namespace?', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.contact.telecom', + description: 'Contact details for individual or organization', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NamingSystem.type', + description: 'e.g. driver, provider, patient, bank etc.', + }, + // http://hl7.org/fhir/SearchParameter/NamingSystem-value + value: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'NamingSystem.uniqueId.value', + description: 'The unique identifier', + }, +}; diff --git a/src/resources/4_0_0/parameters/nutritionorder.parameters.js b/src/resources/4_0_0/parameters/nutritionorder.parameters.js new file mode 100644 index 00000000..19e8819b --- /dev/null +++ b/src/resources/4_0_0/parameters/nutritionorder.parameters.js @@ -0,0 +1,100 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the nutritionorder query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'NutritionOrder.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'NutritionOrder.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-additive + additive: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.enteralFormula.additiveType', + description: 'Type of module component to add to the feeding', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-datetime + datetime: { + type: DateScalar, + fhirtype: 'date', + xpath: 'NutritionOrder.dateTime', + description: 'Return nutrition orders requested on this date', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-formula + formula: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.enteralFormula.baseFormulaType', + description: 'Type of enteral or infant formula', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-instantiates-canonical + instantiates_canonical: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'NutritionOrder.instantiatesCanonical', + description: 'Instantiates FHIR protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-instantiates-uri + instantiates_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'NutritionOrder.instantiatesUri', + description: 'Instantiates external protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-oraldiet + oraldiet: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.oralDiet.type', + description: + 'Type of diet that can be consumed orally (i.e., take via the mouth).', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'NutritionOrder.orderer', + description: 'The identity of the provider who placed the nutrition order', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.status', + description: 'Status of the nutrition order.', + }, + // http://hl7.org/fhir/SearchParameter/NutritionOrder-supplement + supplement: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'NutritionOrder.supplement.type', + description: 'Type of supplement product requested', + }, +}; diff --git a/src/resources/4_0_0/parameters/observation.parameters.js b/src/resources/4_0_0/parameters/observation.parameters.js new file mode 100644 index 00000000..fd651b3e --- /dev/null +++ b/src/resources/4_0_0/parameters/observation.parameters.js @@ -0,0 +1,295 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the observation query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Observation.effectiveDateTime', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/Observation-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.basedOn', + description: 'Reference to the service request.', + }, + // http://hl7.org/fhir/SearchParameter/Observation-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.category', + description: 'The classification of the type of observation', + }, + // http://hl7.org/fhir/SearchParameter/Observation-combo-code + combo_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.code', + description: 'The code of the observation type or component type', + }, + // http://hl7.org/fhir/SearchParameter/Observation-combo-data-absent-reason + combo_data_absent_reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.dataAbsentReason', + description: + 'The reason why the expected value in the element Observation.value[x] or Observation.component.value[x] is missing.', + }, + // http://hl7.org/fhir/SearchParameter/Observation-combo-value-concept + combo_value_concept: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.valueCodeableConcept', + description: + 'The value or component value of the observation, if the value is a CodeableConcept', + }, + // http://hl7.org/fhir/SearchParameter/Observation-combo-value-quantity + combo_value_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Observation.valueQuantity', + description: + 'The value or component value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)', + }, + // http://hl7.org/fhir/SearchParameter/Observation-component-code + component_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.component.code', + description: 'The component code of the observation type', + }, + // http://hl7.org/fhir/SearchParameter/Observation-component-data-absent-reason + component_data_absent_reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.component.dataAbsentReason', + description: + 'The reason why the expected value in the element Observation.component.value[x] is missing.', + }, + // http://hl7.org/fhir/SearchParameter/Observation-component-value-concept + component_value_concept: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.component.valueCodeableConcept', + description: + 'The value of the component observation, if the value is a CodeableConcept', + }, + // http://hl7.org/fhir/SearchParameter/Observation-component-value-quantity + component_value_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Observation.component.valueQuantity', + description: + 'The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)', + }, + // http://hl7.org/fhir/SearchParameter/Observation-data-absent-reason + data_absent_reason: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.dataAbsentReason', + description: + 'The reason why the expected value in the element Observation.value[x] is missing.', + }, + // http://hl7.org/fhir/SearchParameter/Observation-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.derivedFrom', + description: 'Related measurements the observation is made from', + }, + // http://hl7.org/fhir/SearchParameter/Observation-device + device: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.device', + description: 'The Device that generated the observation data.', + }, + // http://hl7.org/fhir/SearchParameter/Observation-focus + focus: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.focus', + description: + 'The focus of an observation when the focus is not the patient of record.', + }, + // http://hl7.org/fhir/SearchParameter/Observation-has-member + has_member: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.hasMember', + description: 'Related resource that belongs to the Observation group', + }, + // http://hl7.org/fhir/SearchParameter/Observation-method + method: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.method', + description: 'The method used for the observation', + }, + // http://hl7.org/fhir/SearchParameter/Observation-part-of + part_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.partOf', + description: 'Part of referenced event', + }, + // http://hl7.org/fhir/SearchParameter/Observation-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.performer', + description: 'Who performed the observation', + }, + // http://hl7.org/fhir/SearchParameter/Observation-specimen + specimen: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.specimen', + description: 'Specimen used for this observation', + }, + // http://hl7.org/fhir/SearchParameter/Observation-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.status', + description: 'The status of the observation', + }, + // http://hl7.org/fhir/SearchParameter/Observation-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Observation.subject', + description: 'The subject that the observation is about', + }, + // http://hl7.org/fhir/SearchParameter/Observation-value-concept + value_concept: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Observation.valueCodeableConcept', + description: + 'The value of the observation, if the value is a CodeableConcept', + }, + // http://hl7.org/fhir/SearchParameter/Observation-value-date + value_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Observation.valueDateTime', + description: + 'The value of the observation, if the value is a date or period of time', + }, + // http://hl7.org/fhir/SearchParameter/Observation-value-quantity + value_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Observation.valueQuantity', + description: + 'The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)', + }, + // http://hl7.org/fhir/SearchParameter/Observation-value-string + value_string: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Observation.valueQuantity', + description: + 'The value of the observation, if the value is a string, and also searches in CodeableConcept.text', + }, + // http://hl7.org/fhir/SearchParameter/Observation-code-value-concept + code_value_concept: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Code and coded value parameter pair', + }, + // http://hl7.org/fhir/SearchParameter/Observation-code-value-date + code_value_date: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Code and date/time value parameter pair', + }, + // http://hl7.org/fhir/SearchParameter/Observation-code-value-quantity + code_value_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Code and quantity value parameter pair', + }, + // http://hl7.org/fhir/SearchParameter/Observation-code-value-string + code_value_string: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Code and string value parameter pair', + }, + // http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-concept + combo_code_value_concept: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Code and coded value parameter pair, including in components', + }, + // http://hl7.org/fhir/SearchParameter/Observation-combo-code-value-quantity + combo_code_value_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Code and quantity value parameter pair, including in components', + }, + // http://hl7.org/fhir/SearchParameter/Observation-component-code-value-concept + component_code_value_concept: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Component code and component coded value parameter pair', + }, + // http://hl7.org/fhir/SearchParameter/Observation-component-code-value-quantity + component_code_value_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'Component code and component quantity value parameter pair', + }, +}; diff --git a/src/resources/4_0_0/parameters/operationdefinition.parameters.js b/src/resources/4_0_0/parameters/operationdefinition.parameters.js new file mode 100644 index 00000000..70c8e6be --- /dev/null +++ b/src/resources/4_0_0/parameters/operationdefinition.parameters.js @@ -0,0 +1,180 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the operationdefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'OperationDefinition.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'OperationDefinition.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'OperationDefinition.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'OperationDefinition.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'OperationDefinition.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'OperationDefinition.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'OperationDefinition.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-base + base: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OperationDefinition.base', + description: 'Marks this as a profile of the base', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.code', + description: 'Name used to invoke the operation', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-input-profile + input_profile: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OperationDefinition.inputProfile', + description: 'Validation information for in parameters', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-instance + instance: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.instance', + description: 'Invoke on an instance?', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-kind + kind: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.kind', + description: 'operation | query', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-output-profile + output_profile: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OperationDefinition.outputProfile', + description: 'Validation information for out parameters', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-system + system: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.system', + description: 'Invoke at the system level?', + }, + // http://hl7.org/fhir/SearchParameter/OperationDefinition-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OperationDefinition.type', + description: 'Invoke at the type level?', + }, +}; diff --git a/src/resources/4_0_0/parameters/organization.parameters.js b/src/resources/4_0_0/parameters/organization.parameters.js new file mode 100644 index 00000000..d5b272e1 --- /dev/null +++ b/src/resources/4_0_0/parameters/organization.parameters.js @@ -0,0 +1,105 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the organization query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Organization-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.active', + description: 'Is the Organization record active', + }, + // http://hl7.org/fhir/SearchParameter/Organization-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.address', + description: + 'A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text', + }, + // http://hl7.org/fhir/SearchParameter/Organization-address-city + address_city: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.address.city', + description: 'A city specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Organization-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.address.country', + description: 'A country specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Organization-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.address.postalCode', + description: 'A postal code specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Organization-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.address.state', + description: 'A state specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Organization-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.address.use', + description: 'A use code specified in an address', + }, + // http://hl7.org/fhir/SearchParameter/Organization-endpoint + endpoint: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Organization.endpoint', + description: + 'Technical endpoints providing access to services operated for the organization', + }, + // http://hl7.org/fhir/SearchParameter/Organization-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.identifier', + description: + "Any identifier for the organization (not the accreditation issuer's identifier)", + }, + // http://hl7.org/fhir/SearchParameter/Organization-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.name', + description: "A portion of the organization's name or alias", + }, + // http://hl7.org/fhir/SearchParameter/Organization-partof + partof: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Organization.partOf', + description: 'An organization of which this organization forms a part', + }, + // http://hl7.org/fhir/SearchParameter/Organization-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Organization.name', + description: + "A portion of the organization's name using some kind of phonetic matching algorithm", + }, + // http://hl7.org/fhir/SearchParameter/Organization-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Organization.type', + description: 'A code for the type of organization', + }, +}; diff --git a/src/resources/4_0_0/parameters/organizationaffiliation.parameters.js b/src/resources/4_0_0/parameters/organizationaffiliation.parameters.js new file mode 100644 index 00000000..e6b5c211 --- /dev/null +++ b/src/resources/4_0_0/parameters/organizationaffiliation.parameters.js @@ -0,0 +1,116 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the organizationaffiliation query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OrganizationAffiliation.active', + description: + 'Whether this organization affiliation record is in active use', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'OrganizationAffiliation.period', + description: + 'The period during which the participatingOrganization is affiliated with the primary organization', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "OrganizationAffiliation.telecom[system/@value='email']", + description: 'A value in an email contact', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-endpoint + endpoint: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OrganizationAffiliation.endpoint', + description: + 'Technical endpoints providing access to services operated for this role', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OrganizationAffiliation.identifier', + description: "An organization affiliation's Identifier", + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OrganizationAffiliation.location', + description: 'The location(s) at which the role occurs', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-network + network: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OrganizationAffiliation.network', + description: + "Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined)", + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-participating-organization + participating_organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OrganizationAffiliation.participatingOrganization', + description: + 'The organization that provides services to the primary organization', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-phone + phone: { + type: TokenScalar, + fhirtype: 'token', + xpath: "OrganizationAffiliation.telecom[system/@value='phone']", + description: 'A value in a phone contact', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-primary-organization + primary_organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OrganizationAffiliation.organization', + description: + 'The organization that receives the services from the participating organization', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-role + role: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OrganizationAffiliation.code', + description: 'Definition of the role the participatingOrganization plays', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-service + service: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'OrganizationAffiliation.healthcareService', + description: 'Healthcare services provided through the role', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-specialty + specialty: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OrganizationAffiliation.specialty', + description: + 'Specific specialty of the participatingOrganization in the context of the role', + }, + // http://hl7.org/fhir/SearchParameter/OrganizationAffiliation-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'OrganizationAffiliation.telecom', + description: 'The value in any kind of contact', + }, +}; diff --git a/src/resources/4_0_0/parameters/patient.parameters.js b/src/resources/4_0_0/parameters/patient.parameters.js new file mode 100644 index 00000000..20970156 --- /dev/null +++ b/src/resources/4_0_0/parameters/patient.parameters.js @@ -0,0 +1,190 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the patient query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Patient-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.active', + description: 'Whether the patient record is active', + }, + // http://hl7.org/fhir/SearchParameter/individual-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address', + description: + 'Multiple Resources: * [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-city + address_city: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.city', + description: + 'Multiple Resources: * [Patient](patient.html): A city specified in an address * [Person](person.html): A city specified in an address * [Practitioner](practitioner.html): A city specified in an address * [RelatedPerson](relatedperson.html): A city specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.country', + description: + 'Multiple Resources: * [Patient](patient.html): A country specified in an address * [Person](person.html): A country specified in an address * [Practitioner](practitioner.html): A country specified in an address * [RelatedPerson](relatedperson.html): A country specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.postalCode', + description: + 'Multiple Resources: * [Patient](patient.html): A postalCode specified in an address * [Person](person.html): A postal code specified in an address * [Practitioner](practitioner.html): A postalCode specified in an address * [RelatedPerson](relatedperson.html): A postal code specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.address.state', + description: + 'Multiple Resources: * [Patient](patient.html): A state specified in an address * [Person](person.html): A state specified in an address * [Practitioner](practitioner.html): A state specified in an address * [RelatedPerson](relatedperson.html): A state specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.address.use', + description: + 'Multiple Resources: * [Patient](patient.html): A use code specified in an address * [Person](person.html): A use code specified in an address * [Practitioner](practitioner.html): A use code specified in an address * [RelatedPerson](relatedperson.html): A use code specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-birthdate + birthdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Patient.birthDate', + description: + "Multiple Resources: * [Patient](patient.html): The patient's date of birth * [Person](person.html): The person's date of birth * [RelatedPerson](relatedperson.html): The Related Person's date of birth ", + }, + // http://hl7.org/fhir/SearchParameter/Patient-death-date + death_date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Patient.deceasedDateTime', + description: + 'The date of death has been provided and satisfies this search value', + }, + // http://hl7.org/fhir/SearchParameter/Patient-deceased + deceased: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.deceasedBoolean', + description: + 'This patient has been marked as deceased, or as a death date entered', + }, + // http://hl7.org/fhir/SearchParameter/individual-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "Patient.telecom[system/@value='email']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in an email contact * [Person](person.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-family + family: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name.family', + description: + 'Multiple Resources: * [Patient](patient.html): A portion of the family name of the patient * [Practitioner](practitioner.html): A portion of the family name ', + }, + // http://hl7.org/fhir/SearchParameter/individual-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.gender', + description: + 'Multiple Resources: * [Patient](patient.html): Gender of the patient * [Person](person.html): The gender of the person * [Practitioner](practitioner.html): Gender of the practitioner * [RelatedPerson](relatedperson.html): Gender of the related person ', + }, + // http://hl7.org/fhir/SearchParameter/Patient-general-practitioner + general_practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Patient.generalPractitioner', + description: + "Patient's nominated general practitioner, not the organization that manages the record", + }, + // http://hl7.org/fhir/SearchParameter/individual-given + given: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name.given', + description: + 'Multiple Resources: * [Patient](patient.html): A portion of the given name of the patient * [Practitioner](practitioner.html): A portion of the given name ', + }, + // http://hl7.org/fhir/SearchParameter/Patient-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.identifier', + description: 'A patient identifier', + }, + // http://hl7.org/fhir/SearchParameter/Patient-language + language: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.communication.language', + description: 'Language code (irrespective of use value)', + }, + // http://hl7.org/fhir/SearchParameter/Patient-link + link: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Patient.link.other', + description: 'All patients linked to the given patient', + }, + // http://hl7.org/fhir/SearchParameter/Patient-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name', + description: + 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text', + }, + // http://hl7.org/fhir/SearchParameter/Patient-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Patient.managingOrganization', + description: 'The organization that is the custodian of the patient record', + }, + // http://hl7.org/fhir/SearchParameter/individual-phone + phone: { + type: TokenScalar, + fhirtype: 'token', + xpath: "Patient.telecom[system/@value='phone']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Patient.name', + description: + 'Multiple Resources: * [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm * [Person](person.html): A portion of name using some kind of phonetic matching algorithm * [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm * [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm ', + }, + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Patient.telecom', + description: + 'Multiple Resources: * [Patient](patient.html): The value in any kind of telecom details of the patient * [Person](person.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact ', + }, +}; diff --git a/src/resources/4_0_0/parameters/paymentnotice.parameters.js b/src/resources/4_0_0/parameters/paymentnotice.parameters.js new file mode 100644 index 00000000..c750c755 --- /dev/null +++ b/src/resources/4_0_0/parameters/paymentnotice.parameters.js @@ -0,0 +1,60 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the paymentnotice query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/PaymentNotice-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PaymentNotice.created', + description: 'Creation date fro the notice', + }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentNotice.identifier', + description: 'The business identifier of the notice', + }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-payment-status + payment_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentNotice.paymentStatus', + description: 'The type of payment notice', + }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-provider + provider: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PaymentNotice.provider', + description: 'The reference to the provider', + }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PaymentNotice.request', + description: 'The Claim', + }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-response + response: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PaymentNotice.response', + description: 'The ClaimResponse', + }, + // http://hl7.org/fhir/SearchParameter/PaymentNotice-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentNotice.status', + description: 'The status of the payment notice', + }, +}; diff --git a/src/resources/4_0_0/parameters/paymentreconciliation.parameters.js b/src/resources/4_0_0/parameters/paymentreconciliation.parameters.js new file mode 100644 index 00000000..79036398 --- /dev/null +++ b/src/resources/4_0_0/parameters/paymentreconciliation.parameters.js @@ -0,0 +1,67 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the paymentreconciliation query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-created + created: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PaymentReconciliation.created', + description: 'The creation date', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-disposition + disposition: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'PaymentReconciliation.disposition', + description: 'The contents of the disposition message', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentReconciliation.identifier', + description: 'The business identifier of the ExplanationOfBenefit', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-outcome + outcome: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentReconciliation.outcome', + description: 'The processing outcome', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-payment-issuer + payment_issuer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PaymentReconciliation.paymentIssuer', + description: 'The organization which generated this resource', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-request + request: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PaymentReconciliation.request', + description: 'The reference to the claim', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-requestor + requestor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PaymentReconciliation.requestor', + description: 'The reference to the provider who submitted the claim', + }, + // http://hl7.org/fhir/SearchParameter/PaymentReconciliation-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PaymentReconciliation.status', + description: 'The status of the payment reconciliation', + }, +}; diff --git a/src/resources/4_0_0/parameters/person.parameters.js b/src/resources/4_0_0/parameters/person.parameters.js new file mode 100644 index 00000000..624b266d --- /dev/null +++ b/src/resources/4_0_0/parameters/person.parameters.js @@ -0,0 +1,159 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the person query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/individual-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.address', + description: + 'Multiple Resources: * [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-city + address_city: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.address.city', + description: + 'Multiple Resources: * [Patient](patient.html): A city specified in an address * [Person](person.html): A city specified in an address * [Practitioner](practitioner.html): A city specified in an address * [RelatedPerson](relatedperson.html): A city specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.address.country', + description: + 'Multiple Resources: * [Patient](patient.html): A country specified in an address * [Person](person.html): A country specified in an address * [Practitioner](practitioner.html): A country specified in an address * [RelatedPerson](relatedperson.html): A country specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.address.postalCode', + description: + 'Multiple Resources: * [Patient](patient.html): A postalCode specified in an address * [Person](person.html): A postal code specified in an address * [Practitioner](practitioner.html): A postalCode specified in an address * [RelatedPerson](relatedperson.html): A postal code specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.address.state', + description: + 'Multiple Resources: * [Patient](patient.html): A state specified in an address * [Person](person.html): A state specified in an address * [Practitioner](practitioner.html): A state specified in an address * [RelatedPerson](relatedperson.html): A state specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.address.use', + description: + 'Multiple Resources: * [Patient](patient.html): A use code specified in an address * [Person](person.html): A use code specified in an address * [Practitioner](practitioner.html): A use code specified in an address * [RelatedPerson](relatedperson.html): A use code specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-birthdate + birthdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Person.birthDate', + description: + "Multiple Resources: * [Patient](patient.html): The patient's date of birth * [Person](person.html): The person's date of birth * [RelatedPerson](relatedperson.html): The Related Person's date of birth ", + }, + // http://hl7.org/fhir/SearchParameter/individual-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "Person.telecom[system/@value='email']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in an email contact * [Person](person.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.gender', + description: + 'Multiple Resources: * [Patient](patient.html): Gender of the patient * [Person](person.html): The gender of the person * [Practitioner](practitioner.html): Gender of the practitioner * [RelatedPerson](relatedperson.html): Gender of the related person ', + }, + // http://hl7.org/fhir/SearchParameter/individual-phone + phone: { + type: TokenScalar, + fhirtype: 'token', + xpath: "Person.telecom[system/@value='phone']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.name', + description: + 'Multiple Resources: * [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm * [Person](person.html): A portion of name using some kind of phonetic matching algorithm * [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm * [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm ', + }, + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.telecom', + description: + 'Multiple Resources: * [Patient](patient.html): The value in any kind of telecom details of the patient * [Person](person.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact ', + }, + // http://hl7.org/fhir/SearchParameter/Person-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Person.identifier', + description: 'A person Identifier', + }, + // http://hl7.org/fhir/SearchParameter/Person-link + link: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', + description: + 'Any link has this Patient, Person, RelatedPerson or Practitioner reference', + }, + // http://hl7.org/fhir/SearchParameter/Person-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Person.name', + description: + 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text', + }, + // http://hl7.org/fhir/SearchParameter/Person-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.managingOrganization', + description: + 'The organization at which this person record is being managed', + }, + // http://hl7.org/fhir/SearchParameter/Person-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this Patient', + }, + // http://hl7.org/fhir/SearchParameter/Person-practitioner + practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this Practitioner', + }, + // http://hl7.org/fhir/SearchParameter/Person-relatedperson + relatedperson: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Person.link.target', + description: 'The Person links to this RelatedPerson', + }, +}; diff --git a/src/resources/4_0_0/parameters/plandefinition.parameters.js b/src/resources/4_0_0/parameters/plandefinition.parameters.js new file mode 100644 index 00000000..9e416994 --- /dev/null +++ b/src/resources/4_0_0/parameters/plandefinition.parameters.js @@ -0,0 +1,185 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the plandefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/PlanDefinition-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "PlanDefinition.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.useContext.valueCodeableConcept', + description: 'A use context assigned to the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'PlanDefinition.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.useContext.code', + description: 'A type of use context assigned to the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PlanDefinition.date', + description: 'The plan definition publication date', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-definition + definition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PlanDefinition.action.definitionCanonical', + description: 'Activity or plan definitions used by plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "PlanDefinition.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "PlanDefinition.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'PlanDefinition.description', + description: 'The description of the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PlanDefinition.effectivePeriod', + description: + 'The time during which the plan definition is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.identifier', + description: 'External identifier for the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.jurisdiction', + description: 'Intended jurisdiction for the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'PlanDefinition.name', + description: 'Computationally friendly name of the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "PlanDefinition.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'PlanDefinition.publisher', + description: 'Name of the publisher of the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.status', + description: 'The current status of the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: "PlanDefinition.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'PlanDefinition.title', + description: 'The human-friendly name of the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.topic', + description: 'Topics associated with the module', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.type', + description: + 'The type of artifact the plan (e.g. order-set, eca-rule, protocol)', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'PlanDefinition.url', + description: 'The uri that identifies the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PlanDefinition.version', + description: 'The business version of the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the plan definition', + }, + // http://hl7.org/fhir/SearchParameter/PlanDefinition-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'A use context type and value assigned to the plan definition', + }, +}; diff --git a/src/resources/4_0_0/parameters/practitioner.parameters.js b/src/resources/4_0_0/parameters/practitioner.parameters.js new file mode 100644 index 00000000..3583209e --- /dev/null +++ b/src/resources/4_0_0/parameters/practitioner.parameters.js @@ -0,0 +1,144 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the practitioner query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/individual-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address', + description: + 'Multiple Resources: * [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-city + address_city: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address.city', + description: + 'Multiple Resources: * [Patient](patient.html): A city specified in an address * [Person](person.html): A city specified in an address * [Practitioner](practitioner.html): A city specified in an address * [RelatedPerson](relatedperson.html): A city specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address.country', + description: + 'Multiple Resources: * [Patient](patient.html): A country specified in an address * [Person](person.html): A country specified in an address * [Practitioner](practitioner.html): A country specified in an address * [RelatedPerson](relatedperson.html): A country specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address.postalCode', + description: + 'Multiple Resources: * [Patient](patient.html): A postalCode specified in an address * [Person](person.html): A postal code specified in an address * [Practitioner](practitioner.html): A postalCode specified in an address * [RelatedPerson](relatedperson.html): A postal code specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.address.state', + description: + 'Multiple Resources: * [Patient](patient.html): A state specified in an address * [Person](person.html): A state specified in an address * [Practitioner](practitioner.html): A state specified in an address * [RelatedPerson](relatedperson.html): A state specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.address.use', + description: + 'Multiple Resources: * [Patient](patient.html): A use code specified in an address * [Person](person.html): A use code specified in an address * [Practitioner](practitioner.html): A use code specified in an address * [RelatedPerson](relatedperson.html): A use code specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "Practitioner.telecom[system/@value='email']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in an email contact * [Person](person.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-family + family: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name.family', + description: + 'Multiple Resources: * [Patient](patient.html): A portion of the family name of the patient * [Practitioner](practitioner.html): A portion of the family name ', + }, + // http://hl7.org/fhir/SearchParameter/individual-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.gender', + description: + 'Multiple Resources: * [Patient](patient.html): Gender of the patient * [Person](person.html): The gender of the person * [Practitioner](practitioner.html): Gender of the practitioner * [RelatedPerson](relatedperson.html): Gender of the related person ', + }, + // http://hl7.org/fhir/SearchParameter/individual-given + given: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name.given', + description: + 'Multiple Resources: * [Patient](patient.html): A portion of the given name of the patient * [Practitioner](practitioner.html): A portion of the given name ', + }, + // http://hl7.org/fhir/SearchParameter/individual-phone + phone: { + type: TokenScalar, + fhirtype: 'token', + xpath: "Practitioner.telecom[system/@value='phone']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name', + description: + 'Multiple Resources: * [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm * [Person](person.html): A portion of name using some kind of phonetic matching algorithm * [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm * [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm ', + }, + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.telecom', + description: + 'Multiple Resources: * [Patient](patient.html): The value in any kind of telecom details of the patient * [Person](person.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact ', + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.active', + description: 'Whether the practitioner record is active', + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-communication + communication: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.communication', + description: + 'One of the languages that the practitioner can communicate with', + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Practitioner.identifier', + description: "A practitioner's Identifier", + }, + // http://hl7.org/fhir/SearchParameter/Practitioner-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Practitioner.name', + description: + 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text', + }, +}; diff --git a/src/resources/4_0_0/parameters/practitionerrole.parameters.js b/src/resources/4_0_0/parameters/practitionerrole.parameters.js new file mode 100644 index 00000000..b8aa4a33 --- /dev/null +++ b/src/resources/4_0_0/parameters/practitionerrole.parameters.js @@ -0,0 +1,112 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the practitionerrole query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/individual-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "PractitionerRole.telecom[system/@value='email']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in an email contact * [Person](person.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-phone + phone: { + type: TokenScalar, + fhirtype: 'token', + xpath: "PractitionerRole.telecom[system/@value='phone']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.telecom', + description: + 'Multiple Resources: * [Patient](patient.html): The value in any kind of telecom details of the patient * [Person](person.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact ', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.active', + description: 'Whether this practitioner role record is in active use', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'PractitionerRole.period', + description: + 'The period during which the practitioner is authorized to perform in these role(s)', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-endpoint + endpoint: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.endpoint', + description: + 'Technical endpoints providing access to services operated for the practitioner with this role', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.identifier', + description: "A practitioner's Identifier", + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.location', + description: + 'One of the locations at which this practitioner provides care', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-organization + organization: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.organization', + description: + 'The identity of the organization the practitioner represents / acts on behalf of', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-practitioner + practitioner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.practitioner', + description: + 'Practitioner that is able to provide the defined services for the organization', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-role + role: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.code', + description: + 'The practitioner can perform this role at for the organization', + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-service + service: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'PractitionerRole.healthcareService', + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s)", + }, + // http://hl7.org/fhir/SearchParameter/PractitionerRole-specialty + specialty: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'PractitionerRole.specialty', + description: 'The practitioner has this specialty at an organization', + }, +}; diff --git a/src/resources/4_0_0/parameters/procedure.parameters.js b/src/resources/4_0_0/parameters/procedure.parameters.js new file mode 100644 index 00000000..1033ad50 --- /dev/null +++ b/src/resources/4_0_0/parameters/procedure.parameters.js @@ -0,0 +1,130 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the procedure query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Procedure.performedDateTime', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.basedOn', + description: 'A request for this procedure', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.category', + description: 'Classification of the procedure', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-instantiates-canonical + instantiates_canonical: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.instantiatesCanonical', + description: 'Instantiates FHIR protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-instantiates-uri + instantiates_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Procedure.instantiatesUri', + description: 'Instantiates external protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.location', + description: 'Where the procedure happened', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-part-of + part_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.partOf', + description: 'Part of referenced event', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.performer.actor', + description: 'The reference to the practitioner', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-reason-code + reason_code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.reasonCode', + description: 'Coded reason procedure performed', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-reason-reference + reason_reference: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.reasonReference', + description: 'The justification that the procedure was performed', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Procedure.status', + description: + 'preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown', + }, + // http://hl7.org/fhir/SearchParameter/Procedure-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Procedure.subject', + description: 'Search by subject', + }, +}; diff --git a/src/resources/4_0_0/parameters/provenance.parameters.js b/src/resources/4_0_0/parameters/provenance.parameters.js new file mode 100644 index 00000000..6aeb75fb --- /dev/null +++ b/src/resources/4_0_0/parameters/provenance.parameters.js @@ -0,0 +1,81 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the provenance query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Provenance-agent + agent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Provenance.agent.who', + description: 'Who participated', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-agent-role + agent_role: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Provenance.agent.role', + description: 'What the agents role was', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-agent-type + agent_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Provenance.agent.type', + description: 'How the agent participated', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-entity + entity: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Provenance.entity.what', + description: 'Identity of entity', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-location + location: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Provenance.location', + description: 'Where the activity occurred, if relevant', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Provenance.target', + description: 'Target Reference(s) (usually version specific)', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-recorded + recorded: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Provenance.recorded', + description: 'When the activity was recorded / updated', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-signature-type + signature_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Provenance.signature.type', + description: 'Indication of the reason the entity signed the object(s)', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-target + target: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Provenance.target', + description: 'Target Reference(s) (usually version specific)', + }, + // http://hl7.org/fhir/SearchParameter/Provenance-when + when: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Provenance.occurredDateTime', + description: 'When the activity occurred', + }, +}; diff --git a/src/resources/4_0_0/parameters/questionnaire.parameters.js b/src/resources/4_0_0/parameters/questionnaire.parameters.js new file mode 100644 index 00000000..888fbc01 --- /dev/null +++ b/src/resources/4_0_0/parameters/questionnaire.parameters.js @@ -0,0 +1,149 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the questionnaire query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Questionnaire-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.item.code', + description: + 'A code that corresponds to one of its items in the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.useContext.valueCodeableConcept', + description: 'A use context assigned to the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Questionnaire.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.useContext.code', + description: 'A type of use context assigned to the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Questionnaire.date', + description: 'The questionnaire publication date', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-definition + definition: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Questionnaire.item.definition', + description: 'ElementDefinition - details for the item', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Questionnaire.description', + description: 'The description of the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Questionnaire.effectivePeriod', + description: + 'The time during which the questionnaire is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.identifier', + description: 'External identifier for the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.jurisdiction', + description: 'Intended jurisdiction for the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Questionnaire.name', + description: 'Computationally friendly name of the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Questionnaire.publisher', + description: 'Name of the publisher of the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.status', + description: 'The current status of the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-subject-type + subject_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.subjectType', + description: 'Resource that can be subject of QuestionnaireResponse', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Questionnaire.title', + description: 'The human-friendly name of the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Questionnaire.url', + description: 'The uri that identifies the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Questionnaire.version', + description: 'The business version of the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the questionnaire', + }, + // http://hl7.org/fhir/SearchParameter/Questionnaire-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'A use context type and value assigned to the questionnaire', + }, +}; diff --git a/src/resources/4_0_0/parameters/questionnaireresponse.parameters.js b/src/resources/4_0_0/parameters/questionnaireresponse.parameters.js new file mode 100644 index 00000000..95f23c69 --- /dev/null +++ b/src/resources/4_0_0/parameters/questionnaireresponse.parameters.js @@ -0,0 +1,91 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the questionnaireresponse query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.author', + description: 'The author of the questionnaire response', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-authored + authored: { + type: DateScalar, + fhirtype: 'date', + xpath: 'QuestionnaireResponse.authored', + description: 'When the questionnaire response was last changed', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.basedOn', + description: 'Plan/proposal/order fulfilled by this questionnaire response', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.encounter', + description: 'Encounter associated with the questionnaire response', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'QuestionnaireResponse.identifier', + description: 'The unique identifier for the questionnaire response', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-part-of + part_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.partOf', + description: + 'Procedure or observation this questionnaire response was performed as a part of', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.subject', + description: + 'The patient that is the subject of the questionnaire response', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-questionnaire + questionnaire: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.questionnaire', + description: 'The questionnaire the answers are provided for', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-source + source: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.source', + description: + 'The individual providing the information reflected in the questionnaire respose', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'QuestionnaireResponse.status', + description: 'The status of the questionnaire response', + }, + // http://hl7.org/fhir/SearchParameter/QuestionnaireResponse-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'QuestionnaireResponse.subject', + description: 'The subject of the questionnaire response', + }, +}; diff --git a/src/resources/4_0_0/parameters/relatedperson.parameters.js b/src/resources/4_0_0/parameters/relatedperson.parameters.js new file mode 100644 index 00000000..2a249a0b --- /dev/null +++ b/src/resources/4_0_0/parameters/relatedperson.parameters.js @@ -0,0 +1,143 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the relatedperson query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/individual-address + address: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address', + description: + 'Multiple Resources: * [Patient](patient.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [Person](person.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [Practitioner](practitioner.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text * [RelatedPerson](relatedperson.html): A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-city + address_city: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.city', + description: + 'Multiple Resources: * [Patient](patient.html): A city specified in an address * [Person](person.html): A city specified in an address * [Practitioner](practitioner.html): A city specified in an address * [RelatedPerson](relatedperson.html): A city specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-country + address_country: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.country', + description: + 'Multiple Resources: * [Patient](patient.html): A country specified in an address * [Person](person.html): A country specified in an address * [Practitioner](practitioner.html): A country specified in an address * [RelatedPerson](relatedperson.html): A country specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-postalcode + address_postalcode: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.postalCode', + description: + 'Multiple Resources: * [Patient](patient.html): A postalCode specified in an address * [Person](person.html): A postal code specified in an address * [Practitioner](practitioner.html): A postalCode specified in an address * [RelatedPerson](relatedperson.html): A postal code specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-state + address_state: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.address.state', + description: + 'Multiple Resources: * [Patient](patient.html): A state specified in an address * [Person](person.html): A state specified in an address * [Practitioner](practitioner.html): A state specified in an address * [RelatedPerson](relatedperson.html): A state specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-address-use + address_use: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.address.use', + description: + 'Multiple Resources: * [Patient](patient.html): A use code specified in an address * [Person](person.html): A use code specified in an address * [Practitioner](practitioner.html): A use code specified in an address * [RelatedPerson](relatedperson.html): A use code specified in an address ', + }, + // http://hl7.org/fhir/SearchParameter/individual-birthdate + birthdate: { + type: DateScalar, + fhirtype: 'date', + xpath: 'RelatedPerson.birthDate', + description: + "Multiple Resources: * [Patient](patient.html): The patient's date of birth * [Person](person.html): The person's date of birth * [RelatedPerson](relatedperson.html): The Related Person's date of birth ", + }, + // http://hl7.org/fhir/SearchParameter/individual-email + email: { + type: TokenScalar, + fhirtype: 'token', + xpath: "RelatedPerson.telecom[system/@value='email']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in an email contact * [Person](person.html): A value in an email contact * [Practitioner](practitioner.html): A value in an email contact * [PractitionerRole](practitionerrole.html): A value in an email contact * [RelatedPerson](relatedperson.html): A value in an email contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-gender + gender: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.gender', + description: + 'Multiple Resources: * [Patient](patient.html): Gender of the patient * [Person](person.html): The gender of the person * [Practitioner](practitioner.html): Gender of the practitioner * [RelatedPerson](relatedperson.html): Gender of the related person ', + }, + // http://hl7.org/fhir/SearchParameter/individual-phone + phone: { + type: TokenScalar, + fhirtype: 'token', + xpath: "RelatedPerson.telecom[system/@value='phone']", + description: + 'Multiple Resources: * [Patient](patient.html): A value in a phone contact * [Person](person.html): A value in a phone contact * [Practitioner](practitioner.html): A value in a phone contact * [PractitionerRole](practitionerrole.html): A value in a phone contact * [RelatedPerson](relatedperson.html): A value in a phone contact ', + }, + // http://hl7.org/fhir/SearchParameter/individual-phonetic + phonetic: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.name', + description: + 'Multiple Resources: * [Patient](patient.html): A portion of either family or given name using some kind of phonetic matching algorithm * [Person](person.html): A portion of name using some kind of phonetic matching algorithm * [Practitioner](practitioner.html): A portion of either family or given name using some kind of phonetic matching algorithm * [RelatedPerson](relatedperson.html): A portion of name using some kind of phonetic matching algorithm ', + }, + // http://hl7.org/fhir/SearchParameter/individual-telecom + telecom: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.telecom', + description: + 'Multiple Resources: * [Patient](patient.html): The value in any kind of telecom details of the patient * [Person](person.html): The value in any kind of contact * [Practitioner](practitioner.html): The value in any kind of contact * [PractitionerRole](practitionerrole.html): The value in any kind of contact * [RelatedPerson](relatedperson.html): The value in any kind of contact ', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.active', + description: 'Indicates if the related person record is active', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.identifier', + description: 'An Identifier of the RelatedPerson', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RelatedPerson.name', + description: + 'A server defined search that may match any of the string fields in the HumanName, including family, give, prefix, suffix, suffix, and/or text', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RelatedPerson.patient', + description: 'The patient this related person is related to', + }, + // http://hl7.org/fhir/SearchParameter/RelatedPerson-relationship + relationship: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RelatedPerson.relationship', + description: 'The relationship between the patient and the relatedperson', + }, +}; diff --git a/src/resources/4_0_0/parameters/requestgroup.parameters.js b/src/resources/4_0_0/parameters/requestgroup.parameters.js new file mode 100644 index 00000000..456b8bc5 --- /dev/null +++ b/src/resources/4_0_0/parameters/requestgroup.parameters.js @@ -0,0 +1,112 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the requestgroup query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/RequestGroup-author + author: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RequestGroup.author', + description: 'The author of the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-authored + authored: { + type: DateScalar, + fhirtype: 'date', + xpath: 'RequestGroup.authoredOn', + description: 'The date the request group was authored', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RequestGroup.code', + description: 'The code of the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RequestGroup.encounter', + description: 'The encounter the request group applies to', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-group-identifier + group_identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RequestGroup.groupIdentifier', + description: 'The group identifier for the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RequestGroup.identifier', + description: 'External identifiers for the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-instantiates-canonical + instantiates_canonical: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RequestGroup.instantiatesCanonical', + description: + 'The FHIR-based definition from which the request group is realized', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-instantiates-uri + instantiates_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'RequestGroup.instantiatesUri', + description: + 'The external definition from which the request group is realized', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-intent + intent: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RequestGroup.intent', + description: 'The intent of the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-participant + participant: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RequestGroup.action.participant', + description: 'The participant in the requests in the group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RequestGroup.subject', + description: 'The identity of a patient to search for request groups', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RequestGroup.priority', + description: 'The priority of the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RequestGroup.status', + description: 'The status of the request group', + }, + // http://hl7.org/fhir/SearchParameter/RequestGroup-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RequestGroup.subject', + description: 'The subject that the request group is about', + }, +}; diff --git a/src/resources/4_0_0/parameters/researchdefinition.parameters.js b/src/resources/4_0_0/parameters/researchdefinition.parameters.js new file mode 100644 index 00000000..3b8fcacc --- /dev/null +++ b/src/resources/4_0_0/parameters/researchdefinition.parameters.js @@ -0,0 +1,175 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the researchdefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchDefinition.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchDefinition.useContext.valueCodeableConcept', + description: 'A use context assigned to the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ResearchDefinition.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchDefinition.useContext.code', + description: 'A type of use context assigned to the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ResearchDefinition.date', + description: 'The research definition publication date', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchDefinition.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchDefinition.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchDefinition.description', + description: 'The description of the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ResearchDefinition.effectivePeriod', + description: + 'The time during which the research definition is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchDefinition.identifier', + description: 'External identifier for the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchDefinition.jurisdiction', + description: 'Intended jurisdiction for the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchDefinition.name', + description: 'Computationally friendly name of the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchDefinition.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchDefinition.publisher', + description: 'Name of the publisher of the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchDefinition.status', + description: 'The current status of the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchDefinition.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchDefinition.title', + description: 'The human-friendly name of the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchDefinition.topic', + description: 'Topics associated with the ResearchDefinition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ResearchDefinition.url', + description: 'The uri that identifies the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchDefinition.version', + description: 'The business version of the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the research definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchDefinition-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the research definition', + }, +}; diff --git a/src/resources/4_0_0/parameters/researchelementdefinition.parameters.js b/src/resources/4_0_0/parameters/researchelementdefinition.parameters.js new file mode 100644 index 00000000..c59aa151 --- /dev/null +++ b/src/resources/4_0_0/parameters/researchelementdefinition.parameters.js @@ -0,0 +1,177 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the researchelementdefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-composed-of + composed_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchElementDefinition.relatedArtifact[type/@value='composed-of'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchElementDefinition.useContext.valueCodeableConcept', + description: 'A use context assigned to the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ResearchElementDefinition.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchElementDefinition.useContext.code', + description: + 'A type of use context assigned to the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ResearchElementDefinition.date', + description: 'The research element definition publication date', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-depends-on + depends_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchElementDefinition.relatedArtifact[type/@value='depends-on'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchElementDefinition.relatedArtifact[type/@value='derived-from'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchElementDefinition.description', + description: 'The description of the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ResearchElementDefinition.effectivePeriod', + description: + 'The time during which the research element definition is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchElementDefinition.identifier', + description: 'External identifier for the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchElementDefinition.jurisdiction', + description: 'Intended jurisdiction for the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchElementDefinition.name', + description: + 'Computationally friendly name of the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-predecessor + predecessor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchElementDefinition.relatedArtifact[type/@value='predecessor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchElementDefinition.publisher', + description: 'Name of the publisher of the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchElementDefinition.status', + description: 'The current status of the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-successor + successor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: + "ResearchElementDefinition.relatedArtifact[type/@value='successor'].resource", + description: 'What resource is being referenced', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchElementDefinition.title', + description: 'The human-friendly name of the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-topic + topic: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchElementDefinition.topic', + description: 'Topics associated with the ResearchElementDefinition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ResearchElementDefinition.url', + description: 'The uri that identifies the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchElementDefinition.version', + description: 'The business version of the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the research element definition', + }, + // http://hl7.org/fhir/SearchParameter/ResearchElementDefinition-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the research element definition', + }, +}; diff --git a/src/resources/4_0_0/parameters/researchstudy.parameters.js b/src/resources/4_0_0/parameters/researchstudy.parameters.js new file mode 100644 index 00000000..1c56141a --- /dev/null +++ b/src/resources/4_0_0/parameters/researchstudy.parameters.js @@ -0,0 +1,104 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the researchstudy query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ResearchStudy-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.category', + description: 'Classifications for the study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ResearchStudy.period', + description: 'When the study began and ended', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-focus + focus: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.focus', + description: 'Drugs, devices, etc. under study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.identifier', + description: 'Business Identifier for study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-keyword + keyword: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.keyword', + description: 'Used to search for the study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-location + location: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.location', + description: 'Geographic region(s) for study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-partof + partof: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchStudy.partOf', + description: 'Part of larger study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-principalinvestigator + principalinvestigator: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchStudy.principalInvestigator', + description: 'Researcher who oversees multiple aspects of the study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-protocol + protocol: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchStudy.protocol', + description: 'Steps followed in executing study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-site + site: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchStudy.site', + description: 'Facility where study activities are conducted', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-sponsor + sponsor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchStudy.sponsor', + description: + 'Organization that initiates and is legally responsible for the study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchStudy.status', + description: + 'active | administratively-completed | approved | closed-to-accrual | closed-to-accrual-and-intervention | completed | disapproved | in-review | temporarily-closed-to-accrual | temporarily-closed-to-accrual-and-intervention | withdrawn', + }, + // http://hl7.org/fhir/SearchParameter/ResearchStudy-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ResearchStudy.title', + description: 'Name for this study', + }, +}; diff --git a/src/resources/4_0_0/parameters/researchsubject.parameters.js b/src/resources/4_0_0/parameters/researchsubject.parameters.js new file mode 100644 index 00000000..02769e54 --- /dev/null +++ b/src/resources/4_0_0/parameters/researchsubject.parameters.js @@ -0,0 +1,54 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the researchsubject query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/ResearchSubject-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ResearchSubject.period', + description: 'Start and end of participation', + }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchSubject.identifier', + description: 'Business Identifier for research subject in a study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-individual + individual: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchSubject.individual', + description: 'Who is part of study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchSubject.individual', + description: 'Who is part of study', + }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ResearchSubject.status', + description: + 'candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn', + }, + // http://hl7.org/fhir/SearchParameter/ResearchSubject-study + study: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ResearchSubject.study', + description: 'Study subject is part of', + }, +}; diff --git a/src/resources/4_0_0/parameters/resource.parameters.js b/src/resources/4_0_0/parameters/resource.parameters.js new file mode 100644 index 00000000..71ad0055 --- /dev/null +++ b/src/resources/4_0_0/parameters/resource.parameters.js @@ -0,0 +1,69 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the resource query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Resource-content + _content: { + type: GraphQLString, + fhirtype: 'string', + xpath: '', + description: 'Search on the entire content of the resource', + }, + // http://hl7.org/fhir/SearchParameter/Resource-id + _id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.id', + description: 'Logical id of this artifact', + }, + // http://hl7.org/fhir/SearchParameter/Resource-lastUpdated + _lastUpdated: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Resource.meta.lastUpdated', + description: 'When the resource version last changed', + }, + // http://hl7.org/fhir/SearchParameter/Resource-profile + _profile: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Resource.meta.profile', + description: 'Profiles this resource claims to conform to', + }, + // http://hl7.org/fhir/SearchParameter/Resource-query + _query: { + type: TokenScalar, + fhirtype: 'token', + xpath: '', + description: + 'A custom search profile that describes a specific defined query operation', + }, + // http://hl7.org/fhir/SearchParameter/Resource-security + _security: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.meta.security', + description: 'Security Labels applied to this resource', + }, + // http://hl7.org/fhir/SearchParameter/Resource-source + _source: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Resource.meta.source', + description: 'Identifies where the resource comes from', + }, + // http://hl7.org/fhir/SearchParameter/Resource-tag + _tag: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Resource.meta.tag', + description: 'Tags applied to this resource', + }, +}; diff --git a/src/resources/4_0_0/parameters/riskassessment.parameters.js b/src/resources/4_0_0/parameters/riskassessment.parameters.js new file mode 100644 index 00000000..730c6b28 --- /dev/null +++ b/src/resources/4_0_0/parameters/riskassessment.parameters.js @@ -0,0 +1,85 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the riskassessment query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'RiskAssessment.occurrenceDateTime', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskAssessment.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-condition + condition: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.condition', + description: 'Condition assessed', + }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-method + method: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskAssessment.method', + description: 'Evaluation mechanism', + }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.performer', + description: 'Who did assessment?', + }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-probability + probability: { + type: GraphQLString, + fhirtype: 'number', + xpath: 'RiskAssessment.prediction.probabilityDecimal', + description: 'Likelihood of specified outcome', + }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-risk + risk: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskAssessment.prediction.qualitativeRisk', + description: 'Likelihood of specified outcome as a qualitative value', + }, + // http://hl7.org/fhir/SearchParameter/RiskAssessment-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'RiskAssessment.subject', + description: 'Who/what does assessment apply to?', + }, +}; diff --git a/src/resources/4_0_0/parameters/riskevidencesynthesis.parameters.js b/src/resources/4_0_0/parameters/riskevidencesynthesis.parameters.js new file mode 100644 index 00000000..db509348 --- /dev/null +++ b/src/resources/4_0_0/parameters/riskevidencesynthesis.parameters.js @@ -0,0 +1,129 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the riskevidencesynthesis query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskEvidenceSynthesis.useContext.valueCodeableConcept', + description: 'A use context assigned to the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'RiskEvidenceSynthesis.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskEvidenceSynthesis.useContext.code', + description: + 'A type of use context assigned to the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'RiskEvidenceSynthesis.date', + description: 'The risk evidence synthesis publication date', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RiskEvidenceSynthesis.description', + description: 'The description of the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-effective + effective: { + type: DateScalar, + fhirtype: 'date', + xpath: 'RiskEvidenceSynthesis.effectivePeriod', + description: + 'The time during which the risk evidence synthesis is intended to be in use', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskEvidenceSynthesis.identifier', + description: 'External identifier for the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskEvidenceSynthesis.jurisdiction', + description: 'Intended jurisdiction for the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RiskEvidenceSynthesis.name', + description: 'Computationally friendly name of the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RiskEvidenceSynthesis.publisher', + description: 'Name of the publisher of the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskEvidenceSynthesis.status', + description: 'The current status of the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'RiskEvidenceSynthesis.title', + description: 'The human-friendly name of the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'RiskEvidenceSynthesis.url', + description: 'The uri that identifies the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'RiskEvidenceSynthesis.version', + description: 'The business version of the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the risk evidence synthesis', + }, + // http://hl7.org/fhir/SearchParameter/RiskEvidenceSynthesis-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and value assigned to the risk evidence synthesis', + }, +}; diff --git a/src/resources/4_0_0/parameters/schedule.parameters.js b/src/resources/4_0_0/parameters/schedule.parameters.js new file mode 100644 index 00000000..e8ef9d88 --- /dev/null +++ b/src/resources/4_0_0/parameters/schedule.parameters.js @@ -0,0 +1,63 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the schedule query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Schedule-active + active: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Schedule.active', + description: 'Is the schedule in active use', + }, + // http://hl7.org/fhir/SearchParameter/Schedule-actor + actor: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Schedule.actor', + description: + 'The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for', + }, + // http://hl7.org/fhir/SearchParameter/Schedule-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Schedule.planningHorizon', + description: + 'Search for Schedule resources that have a period that contains this date specified', + }, + // http://hl7.org/fhir/SearchParameter/Schedule-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Schedule.identifier', + description: 'A Schedule Identifier', + }, + // http://hl7.org/fhir/SearchParameter/Schedule-service-category + service_category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Schedule.serviceCategory', + description: 'High-level category', + }, + // http://hl7.org/fhir/SearchParameter/Schedule-service-type + service_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Schedule.serviceType', + description: + 'The type of appointments that can be booked into associated slot(s)', + }, + // http://hl7.org/fhir/SearchParameter/Schedule-specialty + specialty: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Schedule.specialty', + description: 'Type of specialty needed', + }, +}; diff --git a/src/resources/4_0_0/parameters/searchparameter.parameters.js b/src/resources/4_0_0/parameters/searchparameter.parameters.js new file mode 100644 index 00000000..954e1801 --- /dev/null +++ b/src/resources/4_0_0/parameters/searchparameter.parameters.js @@ -0,0 +1,159 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the searchparameter query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'SearchParameter.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'SearchParameter.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'SearchParameter.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'SearchParameter.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'SearchParameter.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'SearchParameter.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-base + base: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.base', + description: 'The resource type(s) this search parameter applies to', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.code', + description: 'Code used in URL', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-component + component: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SearchParameter.component.definition', + description: 'Defines how the part works', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-derived-from + derived_from: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SearchParameter.derivedFrom', + description: 'Original definition for the search parameter', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-target + target: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.target', + description: 'Types of resource (if a resource reference)', + }, + // http://hl7.org/fhir/SearchParameter/SearchParameter-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SearchParameter.type', + description: + 'number | date | string | token | reference | composite | quantity | uri | special', + }, +}; diff --git a/src/resources/4_0_0/parameters/servicerequest.parameters.js b/src/resources/4_0_0/parameters/servicerequest.parameters.js new file mode 100644 index 00000000..057d203e --- /dev/null +++ b/src/resources/4_0_0/parameters/servicerequest.parameters.js @@ -0,0 +1,164 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the servicerequest query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.code', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance * [Condition](condition.html): Code for the condition * [DeviceRequest](devicerequest.html): Code for what is being requested/ordered * [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result * [FamilyMemberHistory](familymemberhistory.html): A search by a condition code * [List](list.html): What the purpose of this list is * [Medication](medication.html): Returns medications for a specific code * [MedicationAdministration](medicationadministration.html): Return administrations of this medication code * [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code * [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code * [MedicationStatement](medicationstatement.html): Return statements of this medication code * [Observation](observation.html): The code of the observation type * [Procedure](procedure.html): A code to identify a procedure * [ServiceRequest](servicerequest.html): What is being requested/ordered ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.subject', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-authored + authored: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ServiceRequest.authoredOn', + description: 'Date request signed', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.basedOn', + description: 'What request fulfills', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-body-site + body_site: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.bodySite', + description: 'Where procedure is going to be done', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.category', + description: 'Classification of service', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-instantiates-canonical + instantiates_canonical: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.instantiatesCanonical', + description: 'Instantiates FHIR protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-instantiates-uri + instantiates_uri: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ServiceRequest.instantiatesUri', + description: 'Instantiates external protocol or definition', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-intent + intent: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.intent', + description: 'proposal | plan | order +', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-occurrence + occurrence: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ServiceRequest.occurrenceDateTime', + description: 'When service should occur', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-performer + performer: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.performer', + description: 'Requested performer', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-performer-type + performer_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.performerType', + description: 'Performer role', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.priority', + description: 'routine | urgent | asap | stat', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-replaces + replaces: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.replaces', + description: 'What request replaces', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.requester', + description: 'Who/what is requesting service', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-requisition + requisition: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.requisition', + description: 'Composite Request ID', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-specimen + specimen: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.specimen', + description: 'Specimen to be tested', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ServiceRequest.status', + description: + 'draft | active | suspended | completed | entered-in-error | cancelled', + }, + // http://hl7.org/fhir/SearchParameter/ServiceRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'ServiceRequest.subject', + description: 'Search by subject', + }, +}; diff --git a/src/resources/4_0_0/parameters/slot.parameters.js b/src/resources/4_0_0/parameters/slot.parameters.js new file mode 100644 index 00000000..319d1599 --- /dev/null +++ b/src/resources/4_0_0/parameters/slot.parameters.js @@ -0,0 +1,70 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the slot query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Slot-appointment-type + appointment_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Slot.appointmentType', + description: + 'The style of appointment or patient that may be booked in the slot (not service type)', + }, + // http://hl7.org/fhir/SearchParameter/Slot-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Slot.identifier', + description: 'A Slot Identifier', + }, + // http://hl7.org/fhir/SearchParameter/Slot-schedule + schedule: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Slot.schedule', + description: 'The Schedule Resource that we are seeking a slot within', + }, + // http://hl7.org/fhir/SearchParameter/Slot-service-category + service_category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Slot.serviceCategory', + description: + 'A broad categorization of the service that is to be performed during this appointment', + }, + // http://hl7.org/fhir/SearchParameter/Slot-service-type + service_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Slot.serviceType', + description: 'The type of appointments that can be booked into the slot', + }, + // http://hl7.org/fhir/SearchParameter/Slot-specialty + specialty: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Slot.specialty', + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment', + }, + // http://hl7.org/fhir/SearchParameter/Slot-start + start: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Slot.start', + description: 'Appointment date/time.', + }, + // http://hl7.org/fhir/SearchParameter/Slot-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Slot.status', + description: 'The free/busy status of the appointment', + }, +}; diff --git a/src/resources/4_0_0/parameters/specimen.parameters.js b/src/resources/4_0_0/parameters/specimen.parameters.js new file mode 100644 index 00000000..3742764c --- /dev/null +++ b/src/resources/4_0_0/parameters/specimen.parameters.js @@ -0,0 +1,96 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the specimen query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Specimen-accession + accession: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.accessionIdentifier', + description: 'The accession number associated with the specimen', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-bodysite + bodysite: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.collection.bodySite', + description: + 'The code for the body site from where the specimen originated', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-collected + collected: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Specimen.collection.collectedDateTime', + description: 'The date the specimen was collected', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-collector + collector: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Specimen.collection.collector', + description: 'Who collected the specimen', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-container + container: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.container.type', + description: 'The kind of specimen container', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-container-id + container_id: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.container.identifier', + description: 'The unique identifier associated with the specimen container', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.identifier', + description: 'The unique identifier associated with the specimen', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-parent + parent: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Specimen.parent', + description: 'The parent of the specimen', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Specimen.subject', + description: 'The patient the specimen comes from', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.status', + description: 'available | unavailable | unsatisfactory | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Specimen.subject', + description: 'The subject of the specimen', + }, + // http://hl7.org/fhir/SearchParameter/Specimen-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Specimen.type', + description: 'The specimen type', + }, +}; diff --git a/src/resources/4_0_0/parameters/specimendefinition.parameters.js b/src/resources/4_0_0/parameters/specimendefinition.parameters.js new file mode 100644 index 00000000..9ffc8e0b --- /dev/null +++ b/src/resources/4_0_0/parameters/specimendefinition.parameters.js @@ -0,0 +1,31 @@ +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the specimendefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/SpecimenDefinition-container + container: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SpecimenDefinition.typeTested.container.type', + description: + 'The type of specimen conditioned in container expected by the lab', + }, + // http://hl7.org/fhir/SearchParameter/SpecimenDefinition-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SpecimenDefinition.identifier', + description: 'The unique identifier associated with the specimen', + }, + // http://hl7.org/fhir/SearchParameter/SpecimenDefinition-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SpecimenDefinition.typeCollected', + description: 'The type of collected specimen', + }, +}; diff --git a/src/resources/4_0_0/parameters/structuredefinition.parameters.js b/src/resources/4_0_0/parameters/structuredefinition.parameters.js new file mode 100644 index 00000000..b2c7b6ec --- /dev/null +++ b/src/resources/4_0_0/parameters/structuredefinition.parameters.js @@ -0,0 +1,210 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the structuredefinition query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'StructureDefinition.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'StructureDefinition.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureDefinition.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'StructureDefinition.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.identifier', + description: + 'Multiple Resources: * [CodeSystem](codesystem.html): External identifier for the code system * [ConceptMap](conceptmap.html): External identifier for the concept map * [MessageDefinition](messagedefinition.html): External identifier for the message definition * [StructureDefinition](structuredefinition.html): External identifier for the structure definition * [StructureMap](structuremap.html): External identifier for the structure map * [ValueSet](valueset.html): External identifier for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-abstract + abstract: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.abstract', + description: 'Whether the structure is abstract', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-base + base: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'StructureDefinition.baseDefinition', + description: 'Definition that this type is constrained/specialized from', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-base-path + base_path: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.snapshot.element.base.path', + description: 'Path that identifies the base element', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-derivation + derivation: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.derivation', + description: 'specialization | constraint - How relates to base definition', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-experimental + experimental: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.experimental', + description: 'For testing purposes, not real usage', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-ext-context + ext_context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.context', + description: + 'The system is the URL for the context-type: e.g. http://hl7.org/fhir/extension-context-type#element|CodeableConcept.text', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-keyword + keyword: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.keyword', + description: 'A code for the StructureDefinition', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-kind + kind: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.kind', + description: 'primitive-type | complex-type | resource | logical', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-path + path: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureDefinition.snapshot.element.path', + description: 'A path that is constrained in the StructureDefinition', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-type + type: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'StructureDefinition.type', + description: 'Type defined or constrained by this structure', + }, + // http://hl7.org/fhir/SearchParameter/StructureDefinition-valueset + valueset: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'StructureDefinition.snapshot.element.binding.valueSet', + description: 'A vocabulary binding reference', + }, +}; diff --git a/src/resources/4_0_0/parameters/structuremap.parameters.js b/src/resources/4_0_0/parameters/structuremap.parameters.js new file mode 100644 index 00000000..a84723e8 --- /dev/null +++ b/src/resources/4_0_0/parameters/structuremap.parameters.js @@ -0,0 +1,132 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the structuremap query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureMap.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'StructureMap.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureMap.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'StructureMap.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureMap.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureMap.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureMap.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureMap.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureMap.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'StructureMap.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'StructureMap.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureMap.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'StructureMap.identifier', + description: + 'Multiple Resources: * [CodeSystem](codesystem.html): External identifier for the code system * [ConceptMap](conceptmap.html): External identifier for the concept map * [MessageDefinition](messagedefinition.html): External identifier for the message definition * [StructureDefinition](structuredefinition.html): External identifier for the structure definition * [StructureMap](structuremap.html): External identifier for the structure map * [ValueSet](valueset.html): External identifier for the value set ', + }, +}; diff --git a/src/resources/4_0_0/parameters/subscription.parameters.js b/src/resources/4_0_0/parameters/subscription.parameters.js new file mode 100644 index 00000000..ea16ba6b --- /dev/null +++ b/src/resources/4_0_0/parameters/subscription.parameters.js @@ -0,0 +1,54 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the subscription query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Subscription-contact + contact: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Subscription.contact', + description: 'Contact details for the subscription', + }, + // http://hl7.org/fhir/SearchParameter/Subscription-criteria + criteria: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'Subscription.criteria', + description: + 'The search rules used to determine when to send a notification', + }, + // http://hl7.org/fhir/SearchParameter/Subscription-payload + payload: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Subscription.channel.payload', + description: 'The mime-type of the notification payload', + }, + // http://hl7.org/fhir/SearchParameter/Subscription-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Subscription.status', + description: 'The current state of the subscription', + }, + // http://hl7.org/fhir/SearchParameter/Subscription-type + type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Subscription.channel.type', + description: 'The type of channel for the sent notifications', + }, + // http://hl7.org/fhir/SearchParameter/Subscription-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'Subscription.channel.endpoint', + description: 'The uri that will receive the notifications', + }, +}; diff --git a/src/resources/4_0_0/parameters/substance.parameters.js b/src/resources/4_0_0/parameters/substance.parameters.js new file mode 100644 index 00000000..b007e015 --- /dev/null +++ b/src/resources/4_0_0/parameters/substance.parameters.js @@ -0,0 +1,67 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the substance query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Substance-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Substance.category', + description: 'The category of the substance', + }, + // http://hl7.org/fhir/SearchParameter/Substance-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Substance.code', + description: 'The code of the substance or ingredient', + }, + // http://hl7.org/fhir/SearchParameter/Substance-container-identifier + container_identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Substance.instance.identifier', + description: 'Identifier of the package/container', + }, + // http://hl7.org/fhir/SearchParameter/Substance-expiry + expiry: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Substance.instance.expiry', + description: 'Expiry date of package or container of substance', + }, + // http://hl7.org/fhir/SearchParameter/Substance-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Substance.identifier', + description: 'Unique identifier for the substance', + }, + // http://hl7.org/fhir/SearchParameter/Substance-quantity + quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'Substance.instance.quantity', + description: 'Amount of substance in the package', + }, + // http://hl7.org/fhir/SearchParameter/Substance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Substance.status', + description: 'active | inactive | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/Substance-substance-reference + substance_reference: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Substance.ingredient.substanceReference', + description: 'A component of the substance', + }, +}; diff --git a/src/resources/4_0_0/parameters/substancespecification.parameters.js b/src/resources/4_0_0/parameters/substancespecification.parameters.js new file mode 100644 index 00000000..6f894712 --- /dev/null +++ b/src/resources/4_0_0/parameters/substancespecification.parameters.js @@ -0,0 +1,16 @@ +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the substancespecification query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/SubstanceSpecification-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SubstanceSpecification.code', + description: 'Codes associated with the substance', + }, +}; diff --git a/src/resources/4_0_0/parameters/supplydelivery.parameters.js b/src/resources/4_0_0/parameters/supplydelivery.parameters.js new file mode 100644 index 00000000..05a81670 --- /dev/null +++ b/src/resources/4_0_0/parameters/supplydelivery.parameters.js @@ -0,0 +1,47 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the supplydelivery query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyDelivery.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyDelivery.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-receiver + receiver: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyDelivery.receiver', + description: 'Who collected the Supply', + }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyDelivery.status', + description: 'in-progress | completed | abandoned | entered-in-error', + }, + // http://hl7.org/fhir/SearchParameter/SupplyDelivery-supplier + supplier: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyDelivery.supplier', + description: 'Dispenser', + }, +}; diff --git a/src/resources/4_0_0/parameters/supplyrequest.parameters.js b/src/resources/4_0_0/parameters/supplyrequest.parameters.js new file mode 100644 index 00000000..4d92a4ff --- /dev/null +++ b/src/resources/4_0_0/parameters/supplyrequest.parameters.js @@ -0,0 +1,62 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the supplyrequest query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'SupplyRequest.authoredOn', + description: + "Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded * [CarePlan](careplan.html): Time period plan covers * [CareTeam](careteam.html): Time period team covers * [ClinicalImpression](clinicalimpression.html): When the assessment was documented * [Composition](composition.html): Composition editing time * [Consent](consent.html): When this Consent was created or indexed * [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report * [Encounter](encounter.html): A date within the period the Encounter lasted * [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period * [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated * [Flag](flag.html): Time period when flag is active * [Immunization](immunization.html): Vaccination (non)-Administration Date * [List](list.html): When the list was prepared * [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period * [Procedure](procedure.html): When the procedure was performed * [RiskAssessment](riskassessment.html): When was assessment made? * [SupplyRequest](supplyrequest.html): When the request was made ", + }, + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyRequest.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-category + category: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyRequest.category', + description: 'The kind of supply (central, non-stock, etc.)', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyRequest.requester', + description: 'Individual making the request', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'SupplyRequest.status', + description: 'draft | active | suspended +', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyRequest.deliverTo', + description: 'The destination of the supply', + }, + // http://hl7.org/fhir/SearchParameter/SupplyRequest-supplier + supplier: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'SupplyRequest.supplier', + description: 'Who is intended to fulfill the request', + }, +}; diff --git a/src/resources/4_0_0/parameters/task.parameters.js b/src/resources/4_0_0/parameters/task.parameters.js new file mode 100644 index 00000000..33ec6bae --- /dev/null +++ b/src/resources/4_0_0/parameters/task.parameters.js @@ -0,0 +1,145 @@ +const { GraphQLString } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TokenScalar = require('../scalars/token.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the task query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/Task-authored-on + authored_on: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Task.authoredOn', + description: 'Search by creation date', + }, + // http://hl7.org/fhir/SearchParameter/Task-based-on + based_on: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.basedOn', + description: 'Search by requests this task is based on', + }, + // http://hl7.org/fhir/SearchParameter/Task-business-status + business_status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.businessStatus', + description: 'Search by business status', + }, + // http://hl7.org/fhir/SearchParameter/Task-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.code', + description: 'Search by task code', + }, + // http://hl7.org/fhir/SearchParameter/Task-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.encounter', + description: 'Search by encounter', + }, + // http://hl7.org/fhir/SearchParameter/Task-focus + focus: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.focus', + description: 'Search by task focus', + }, + // http://hl7.org/fhir/SearchParameter/Task-group-identifier + group_identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.groupIdentifier', + description: 'Search by group identifier', + }, + // http://hl7.org/fhir/SearchParameter/Task-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.identifier', + description: 'Search for a task instance by its business identifier', + }, + // http://hl7.org/fhir/SearchParameter/Task-intent + intent: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.intent', + description: 'Search by task intent', + }, + // http://hl7.org/fhir/SearchParameter/Task-modified + modified: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Task.lastModified', + description: 'Search by last modification date', + }, + // http://hl7.org/fhir/SearchParameter/Task-owner + owner: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.owner', + description: 'Search by task owner', + }, + // http://hl7.org/fhir/SearchParameter/Task-part-of + part_of: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.partOf', + description: 'Search by task this task is part of', + }, + // http://hl7.org/fhir/SearchParameter/Task-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.for', + description: 'Search by patient', + }, + // http://hl7.org/fhir/SearchParameter/Task-performer + performer: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.performerType', + description: + 'Search by recommended type of performer (e.g., Requester, Performer, Scheduler).', + }, + // http://hl7.org/fhir/SearchParameter/Task-period + period: { + type: DateScalar, + fhirtype: 'date', + xpath: 'Task.executionPeriod', + description: 'Search by period Task is/was underway', + }, + // http://hl7.org/fhir/SearchParameter/Task-priority + priority: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.priority', + description: 'Search by task priority', + }, + // http://hl7.org/fhir/SearchParameter/Task-requester + requester: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.requester', + description: 'Search by task requester', + }, + // http://hl7.org/fhir/SearchParameter/Task-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'Task.status', + description: 'Search by task status', + }, + // http://hl7.org/fhir/SearchParameter/Task-subject + subject: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'Task.for', + description: 'Search by subject', + }, +}; diff --git a/src/resources/4_0_0/parameters/terminologycapabilities.parameters.js b/src/resources/4_0_0/parameters/terminologycapabilities.parameters.js new file mode 100644 index 00000000..d648775f --- /dev/null +++ b/src/resources/4_0_0/parameters/terminologycapabilities.parameters.js @@ -0,0 +1,124 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the terminologycapabilities query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TerminologyCapabilities.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'TerminologyCapabilities.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TerminologyCapabilities.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'TerminologyCapabilities.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TerminologyCapabilities.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TerminologyCapabilities.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TerminologyCapabilities.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TerminologyCapabilities.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TerminologyCapabilities.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TerminologyCapabilities.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'TerminologyCapabilities.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TerminologyCapabilities.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, +}; diff --git a/src/resources/4_0_0/parameters/testreport.parameters.js b/src/resources/4_0_0/parameters/testreport.parameters.js new file mode 100644 index 00000000..2795e35f --- /dev/null +++ b/src/resources/4_0_0/parameters/testreport.parameters.js @@ -0,0 +1,54 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the testreport query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/TestReport-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestReport.identifier', + description: 'An external identifier for the test report', + }, + // http://hl7.org/fhir/SearchParameter/TestReport-issued + issued: { + type: DateScalar, + fhirtype: 'date', + xpath: 'TestReport.issued', + description: 'The test report generation date', + }, + // http://hl7.org/fhir/SearchParameter/TestReport-participant + participant: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'TestReport.participant.uri', + description: 'The reference to a participant in the test execution', + }, + // http://hl7.org/fhir/SearchParameter/TestReport-result + result: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestReport.result', + description: 'The result disposition of the test execution', + }, + // http://hl7.org/fhir/SearchParameter/TestReport-tester + tester: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestReport.tester', + description: 'The name of the testing organization', + }, + // http://hl7.org/fhir/SearchParameter/TestReport-testscript + testscript: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'TestReport.testScript', + description: 'The test script executed to produce this report', + }, +}; diff --git a/src/resources/4_0_0/parameters/testscript.parameters.js b/src/resources/4_0_0/parameters/testscript.parameters.js new file mode 100644 index 00000000..f82cce7e --- /dev/null +++ b/src/resources/4_0_0/parameters/testscript.parameters.js @@ -0,0 +1,126 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the testscript query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/TestScript-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestScript.useContext.valueCodeableConcept', + description: 'A use context assigned to the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'TestScript.useContext.valueQuantity', + description: + 'A quantity- or range-valued use context assigned to the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestScript.useContext.code', + description: 'A type of use context assigned to the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'TestScript.date', + description: 'The test script publication date', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestScript.description', + description: 'The description of the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestScript.identifier', + description: 'External identifier for the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestScript.jurisdiction', + description: 'Intended jurisdiction for the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestScript.name', + description: 'Computationally friendly name of the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestScript.publisher', + description: 'Name of the publisher of the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestScript.status', + description: 'The current status of the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-testscript-capability + testscript_capability: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestScript.metadata.capability.description', + description: 'TestScript required and validated capability', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'TestScript.title', + description: 'The human-friendly name of the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'TestScript.url', + description: 'The uri that identifies the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'TestScript.version', + description: 'The business version of the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'A use context type and quantity- or range-based value assigned to the test script', + }, + // http://hl7.org/fhir/SearchParameter/TestScript-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: 'A use context type and value assigned to the test script', + }, +}; diff --git a/src/resources/4_0_0/parameters/valueset.parameters.js b/src/resources/4_0_0/parameters/valueset.parameters.js new file mode 100644 index 00000000..622f433f --- /dev/null +++ b/src/resources/4_0_0/parameters/valueset.parameters.js @@ -0,0 +1,155 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the valueset query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/conformance-context + context: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ValueSet.useContext.valueCodeableConcept', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context assigned to the capability statement * [CodeSystem](codesystem.html): A use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context assigned to the message definition * [NamingSystem](namingsystem.html): A use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context assigned to the operation definition * [SearchParameter](searchparameter.html): A use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context assigned to the structure definition * [StructureMap](structuremap.html): A use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context assigned to the terminology capabilities * [ValueSet](valueset.html): A use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-quantity + context_quantity: { + type: GraphQLString, + fhirtype: 'quantity', + xpath: 'ValueSet.useContext.valueQuantity', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A quantity- or range-valued use context assigned to the capability statement * [CodeSystem](codesystem.html): A quantity- or range-valued use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A quantity- or range-valued use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A quantity- or range-valued use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A quantity- or range-valued use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A quantity- or range-valued use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A quantity- or range-valued use context assigned to the message definition * [NamingSystem](namingsystem.html): A quantity- or range-valued use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A quantity- or range-valued use context assigned to the operation definition * [SearchParameter](searchparameter.html): A quantity- or range-valued use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A quantity- or range-valued use context assigned to the structure definition * [StructureMap](structuremap.html): A quantity- or range-valued use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A quantity- or range-valued use context assigned to the terminology capabilities * [ValueSet](valueset.html): A quantity- or range-valued use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type + context_type: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ValueSet.useContext.code', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A type of use context assigned to the capability statement * [CodeSystem](codesystem.html): A type of use context assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A type of use context assigned to the compartment definition * [ConceptMap](conceptmap.html): A type of use context assigned to the concept map * [GraphDefinition](graphdefinition.html): A type of use context assigned to the graph definition * [ImplementationGuide](implementationguide.html): A type of use context assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A type of use context assigned to the message definition * [NamingSystem](namingsystem.html): A type of use context assigned to the naming system * [OperationDefinition](operationdefinition.html): A type of use context assigned to the operation definition * [SearchParameter](searchparameter.html): A type of use context assigned to the search parameter * [StructureDefinition](structuredefinition.html): A type of use context assigned to the structure definition * [StructureMap](structuremap.html): A type of use context assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A type of use context assigned to the terminology capabilities * [ValueSet](valueset.html): A type of use context assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-date + date: { + type: DateScalar, + fhirtype: 'date', + xpath: 'ValueSet.date', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The capability statement publication date * [CodeSystem](codesystem.html): The code system publication date * [CompartmentDefinition](compartmentdefinition.html): The compartment definition publication date * [ConceptMap](conceptmap.html): The concept map publication date * [GraphDefinition](graphdefinition.html): The graph definition publication date * [ImplementationGuide](implementationguide.html): The implementation guide publication date * [MessageDefinition](messagedefinition.html): The message definition publication date * [NamingSystem](namingsystem.html): The naming system publication date * [OperationDefinition](operationdefinition.html): The operation definition publication date * [SearchParameter](searchparameter.html): The search parameter publication date * [StructureDefinition](structuredefinition.html): The structure definition publication date * [StructureMap](structuremap.html): The structure map publication date * [TerminologyCapabilities](terminologycapabilities.html): The terminology capabilities publication date * [ValueSet](valueset.html): The value set publication date ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-description + description: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ValueSet.description', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The description of the capability statement * [CodeSystem](codesystem.html): The description of the code system * [CompartmentDefinition](compartmentdefinition.html): The description of the compartment definition * [ConceptMap](conceptmap.html): The description of the concept map * [GraphDefinition](graphdefinition.html): The description of the graph definition * [ImplementationGuide](implementationguide.html): The description of the implementation guide * [MessageDefinition](messagedefinition.html): The description of the message definition * [NamingSystem](namingsystem.html): The description of the naming system * [OperationDefinition](operationdefinition.html): The description of the operation definition * [SearchParameter](searchparameter.html): The description of the search parameter * [StructureDefinition](structuredefinition.html): The description of the structure definition * [StructureMap](structuremap.html): The description of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The description of the terminology capabilities * [ValueSet](valueset.html): The description of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-jurisdiction + jurisdiction: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ValueSet.jurisdiction', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Intended jurisdiction for the capability statement * [CodeSystem](codesystem.html): Intended jurisdiction for the code system * [ConceptMap](conceptmap.html): Intended jurisdiction for the concept map * [GraphDefinition](graphdefinition.html): Intended jurisdiction for the graph definition * [ImplementationGuide](implementationguide.html): Intended jurisdiction for the implementation guide * [MessageDefinition](messagedefinition.html): Intended jurisdiction for the message definition * [NamingSystem](namingsystem.html): Intended jurisdiction for the naming system * [OperationDefinition](operationdefinition.html): Intended jurisdiction for the operation definition * [SearchParameter](searchparameter.html): Intended jurisdiction for the search parameter * [StructureDefinition](structuredefinition.html): Intended jurisdiction for the structure definition * [StructureMap](structuremap.html): Intended jurisdiction for the structure map * [TerminologyCapabilities](terminologycapabilities.html): Intended jurisdiction for the terminology capabilities * [ValueSet](valueset.html): Intended jurisdiction for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-name + name: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ValueSet.name', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Computationally friendly name of the capability statement * [CodeSystem](codesystem.html): Computationally friendly name of the code system * [CompartmentDefinition](compartmentdefinition.html): Computationally friendly name of the compartment definition * [ConceptMap](conceptmap.html): Computationally friendly name of the concept map * [GraphDefinition](graphdefinition.html): Computationally friendly name of the graph definition * [ImplementationGuide](implementationguide.html): Computationally friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): Computationally friendly name of the message definition * [NamingSystem](namingsystem.html): Computationally friendly name of the naming system * [OperationDefinition](operationdefinition.html): Computationally friendly name of the operation definition * [SearchParameter](searchparameter.html): Computationally friendly name of the search parameter * [StructureDefinition](structuredefinition.html): Computationally friendly name of the structure definition * [StructureMap](structuremap.html): Computationally friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Computationally friendly name of the terminology capabilities * [ValueSet](valueset.html): Computationally friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-publisher + publisher: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ValueSet.publisher', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): Name of the publisher of the capability statement * [CodeSystem](codesystem.html): Name of the publisher of the code system * [CompartmentDefinition](compartmentdefinition.html): Name of the publisher of the compartment definition * [ConceptMap](conceptmap.html): Name of the publisher of the concept map * [GraphDefinition](graphdefinition.html): Name of the publisher of the graph definition * [ImplementationGuide](implementationguide.html): Name of the publisher of the implementation guide * [MessageDefinition](messagedefinition.html): Name of the publisher of the message definition * [NamingSystem](namingsystem.html): Name of the publisher of the naming system * [OperationDefinition](operationdefinition.html): Name of the publisher of the operation definition * [SearchParameter](searchparameter.html): Name of the publisher of the search parameter * [StructureDefinition](structuredefinition.html): Name of the publisher of the structure definition * [StructureMap](structuremap.html): Name of the publisher of the structure map * [TerminologyCapabilities](terminologycapabilities.html): Name of the publisher of the terminology capabilities * [ValueSet](valueset.html): Name of the publisher of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ValueSet.status', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The current status of the capability statement * [CodeSystem](codesystem.html): The current status of the code system * [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition * [ConceptMap](conceptmap.html): The current status of the concept map * [GraphDefinition](graphdefinition.html): The current status of the graph definition * [ImplementationGuide](implementationguide.html): The current status of the implementation guide * [MessageDefinition](messagedefinition.html): The current status of the message definition * [NamingSystem](namingsystem.html): The current status of the naming system * [OperationDefinition](operationdefinition.html): The current status of the operation definition * [SearchParameter](searchparameter.html): The current status of the search parameter * [StructureDefinition](structuredefinition.html): The current status of the structure definition * [StructureMap](structuremap.html): The current status of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities * [ValueSet](valueset.html): The current status of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-title + title: { + type: GraphQLString, + fhirtype: 'string', + xpath: 'ValueSet.title', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement * [CodeSystem](codesystem.html): The human-friendly name of the code system * [ConceptMap](conceptmap.html): The human-friendly name of the concept map * [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide * [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition * [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition * [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition * [StructureMap](structuremap.html): The human-friendly name of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities * [ValueSet](valueset.html): The human-friendly name of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-url + url: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ValueSet.url', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement * [CodeSystem](codesystem.html): The uri that identifies the code system * [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition * [ConceptMap](conceptmap.html): The uri that identifies the concept map * [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition * [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide * [MessageDefinition](messagedefinition.html): The uri that identifies the message definition * [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition * [SearchParameter](searchparameter.html): The uri that identifies the search parameter * [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition * [StructureMap](structuremap.html): The uri that identifies the structure map * [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities * [ValueSet](valueset.html): The uri that identifies the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-version + version: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ValueSet.version', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): The business version of the capability statement * [CodeSystem](codesystem.html): The business version of the code system * [CompartmentDefinition](compartmentdefinition.html): The business version of the compartment definition * [ConceptMap](conceptmap.html): The business version of the concept map * [GraphDefinition](graphdefinition.html): The business version of the graph definition * [ImplementationGuide](implementationguide.html): The business version of the implementation guide * [MessageDefinition](messagedefinition.html): The business version of the message definition * [OperationDefinition](operationdefinition.html): The business version of the operation definition * [SearchParameter](searchparameter.html): The business version of the search parameter * [StructureDefinition](structuredefinition.html): The business version of the structure definition * [StructureMap](structuremap.html): The business version of the structure map * [TerminologyCapabilities](terminologycapabilities.html): The business version of the terminology capabilities * [ValueSet](valueset.html): The business version of the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-quantity + context_type_quantity: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and quantity- or range-based value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and quantity- or range-based value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and quantity- or range-based value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and quantity- or range-based value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and quantity- or range-based value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and quantity- or range-based value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and quantity- or range-based value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and quantity- or range-based value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and quantity- or range-based value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and quantity- or range-based value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and quantity- or range-based value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and quantity- or range-based value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and quantity- or range-based value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and quantity- or range-based value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-context-type-value + context_type_value: { + type: GraphQLString, + fhirtype: 'composite', + xpath: '', + description: + 'Multiple Resources: * [CapabilityStatement](capabilitystatement.html): A use context type and value assigned to the capability statement * [CodeSystem](codesystem.html): A use context type and value assigned to the code system * [CompartmentDefinition](compartmentdefinition.html): A use context type and value assigned to the compartment definition * [ConceptMap](conceptmap.html): A use context type and value assigned to the concept map * [GraphDefinition](graphdefinition.html): A use context type and value assigned to the graph definition * [ImplementationGuide](implementationguide.html): A use context type and value assigned to the implementation guide * [MessageDefinition](messagedefinition.html): A use context type and value assigned to the message definition * [NamingSystem](namingsystem.html): A use context type and value assigned to the naming system * [OperationDefinition](operationdefinition.html): A use context type and value assigned to the operation definition * [SearchParameter](searchparameter.html): A use context type and value assigned to the search parameter * [StructureDefinition](structuredefinition.html): A use context type and value assigned to the structure definition * [StructureMap](structuremap.html): A use context type and value assigned to the structure map * [TerminologyCapabilities](terminologycapabilities.html): A use context type and value assigned to the terminology capabilities * [ValueSet](valueset.html): A use context type and value assigned to the value set ', + }, + // http://hl7.org/fhir/SearchParameter/conformance-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ValueSet.identifier', + description: + 'Multiple Resources: * [CodeSystem](codesystem.html): External identifier for the code system * [ConceptMap](conceptmap.html): External identifier for the concept map * [MessageDefinition](messagedefinition.html): External identifier for the message definition * [StructureDefinition](structuredefinition.html): External identifier for the structure definition * [StructureMap](structuremap.html): External identifier for the structure map * [ValueSet](valueset.html): External identifier for the value set ', + }, + // http://hl7.org/fhir/SearchParameter/ValueSet-code + code: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'ValueSet.expansion.contains.code', + description: + 'This special parameter searches for codes in the value set. See additional notes on the ValueSet resource', + }, + // http://hl7.org/fhir/SearchParameter/ValueSet-expansion + expansion: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ValueSet.expansion.identifier', + description: 'Identifies the value set expansion (business identifier)', + }, + // http://hl7.org/fhir/SearchParameter/ValueSet-reference + reference: { + type: UriScalar, + fhirtype: 'uri', + xpath: 'ValueSet.compose.include.system', + description: + 'A code system included or excluded in the value set or an imported value set', + }, +}; diff --git a/src/resources/4_0_0/parameters/verificationresult.parameters.js b/src/resources/4_0_0/parameters/verificationresult.parameters.js new file mode 100644 index 00000000..9f83b7fb --- /dev/null +++ b/src/resources/4_0_0/parameters/verificationresult.parameters.js @@ -0,0 +1,16 @@ +const { GraphQLString } = require('graphql'); + +/** + * @name exports + * @static + * @summary Arguments for the verificationresult query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/VerificationResult-target + target: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'VerificationResult.target', + description: 'A resource that was validated', + }, +}; diff --git a/src/resources/4_0_0/parameters/visionprescription.parameters.js b/src/resources/4_0_0/parameters/visionprescription.parameters.js new file mode 100644 index 00000000..21438f13 --- /dev/null +++ b/src/resources/4_0_0/parameters/visionprescription.parameters.js @@ -0,0 +1,56 @@ +const { GraphQLString } = require('graphql'); +const TokenScalar = require('../scalars/token.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @static + * @summary Arguments for the visionprescription query + */ +module.exports = { + // http://hl7.org/fhir/SearchParameter/clinical-identifier + identifier: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'VisionPrescription.identifier', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): External ids for this item * [CarePlan](careplan.html): External Ids for this plan * [CareTeam](careteam.html): External Ids for this team * [Composition](composition.html): Version-independent identifier for the Composition * [Condition](condition.html): A unique identifier of the condition record * [Consent](consent.html): Identifier for this record (external references) * [DetectedIssue](detectedissue.html): Unique id for the detected issue * [DeviceRequest](devicerequest.html): Business identifier for request/order * [DiagnosticReport](diagnosticreport.html): An identifier for the report * [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents * [DocumentReference](documentreference.html): Master Version Specific Identifier * [Encounter](encounter.html): Identifier(s) by which this encounter is known * [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare * [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier * [Goal](goal.html): External Ids for this goal * [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number * [Immunization](immunization.html): Business identifier * [List](list.html): Business identifier * [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier * [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier * [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier * [MedicationStatement](medicationstatement.html): Return statements with this external identifier * [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier * [Observation](observation.html): The unique id for a particular observation * [Procedure](procedure.html): A unique identifier for a procedure * [RiskAssessment](riskassessment.html): Unique identifier for the assessment * [ServiceRequest](servicerequest.html): Identifiers assigned to this order * [SupplyDelivery](supplydelivery.html): External identifier * [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest * [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-patient + patient: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'VisionPrescription.patient', + description: + 'Multiple Resources: * [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for * [CarePlan](careplan.html): Who the care plan is for * [CareTeam](careteam.html): Who care team is for * [ClinicalImpression](clinicalimpression.html): Patient or group assessed * [Composition](composition.html): Who and/or what the composition is about * [Condition](condition.html): Who has the condition? * [Consent](consent.html): Who the consent applies to * [DetectedIssue](detectedissue.html): Associated patient * [DeviceRequest](devicerequest.html): Individual the service is ordered for * [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient * [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient * [DocumentManifest](documentmanifest.html): The subject of the set of documents * [DocumentReference](documentreference.html): Who/what is the subject of the document * [Encounter](encounter.html): The patient or group present at the encounter * [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care * [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for * [Flag](flag.html): The identity of a subject to list flags for * [Goal](goal.html): Who this goal is intended for * [ImagingStudy](imagingstudy.html): Who the study is about * [Immunization](immunization.html): The patient for the vaccination record * [List](list.html): If all resources have the same subject * [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for * [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for * [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient * [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. * [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement * [Observation](observation.html): The subject that the observation is about (if patient) * [Procedure](procedure.html): Search by subject - a patient * [RiskAssessment](riskassessment.html): Who/what does assessment apply to? * [ServiceRequest](servicerequest.html): Search by subject - a patient * [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied * [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for ', + }, + // http://hl7.org/fhir/SearchParameter/clinical-encounter + encounter: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'VisionPrescription.encounter', + description: + 'Multiple Resources: * [Composition](composition.html): Context of the Composition * [DeviceRequest](devicerequest.html): Encounter during which request was created * [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made * [DocumentReference](documentreference.html): Context of the document content * [Flag](flag.html): Alert relevant during encounter * [List](list.html): Context in which list created * [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier * [Observation](observation.html): Encounter related to the observation * [Procedure](procedure.html): Encounter created as part of * [RiskAssessment](riskassessment.html): Where was assessment performed? * [ServiceRequest](servicerequest.html): An encounter in which this request is made * [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier ', + }, + // http://hl7.org/fhir/SearchParameter/VisionPrescription-datewritten + datewritten: { + type: DateScalar, + fhirtype: 'date', + xpath: 'VisionPrescription.dateWritten', + description: 'Return prescriptions written on this date', + }, + // http://hl7.org/fhir/SearchParameter/VisionPrescription-prescriber + prescriber: { + type: GraphQLString, + fhirtype: 'reference', + xpath: 'VisionPrescription.prescriber', + description: 'Who authorized the vision prescription', + }, + // http://hl7.org/fhir/SearchParameter/VisionPrescription-status + status: { + type: TokenScalar, + fhirtype: 'token', + xpath: 'VisionPrescription.status', + description: 'The status of the vision prescription', + }, +}; diff --git a/src/resources/4_0_0/profiles/account/mutation.js b/src/resources/4_0_0/profiles/account/mutation.js new file mode 100644 index 00000000..cee43075 --- /dev/null +++ b/src/resources/4_0_0/profiles/account/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const AccountSchema = require('../../schemas/account.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const AccountInput = require('../../inputs/account.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createAccount, updateAccount, removeAccount } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Account', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Account record.', + }, + resource: { + type: new GraphQLNonNull(AccountInput), + description: 'Account Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Account record for deletion.', + }, +}; + +/** + * @name exports.AccountCreateMutation + * @summary AccountCreate mutation. + */ +module.exports.AccountCreateMutation = { + description: 'Create a Account record', + resolve: scopeInvariant(scopeOptions, createAccount), + type: AccountSchema, + args: WriteArgs, +}; + +/** + * @name exports.AccountUpdateMutation + * @summary AccountUpdate mutation. + */ +module.exports.AccountUpdateMutation = { + description: 'Update a Account record', + resolve: scopeInvariant(scopeOptions, updateAccount), + type: AccountSchema, + args: WriteArgs, +}; + +/** + * @name exports.AccountRemoveMutation + * @summary AccountRemove mutation. + */ +module.exports.AccountRemoveMutation = { + description: 'Remove a Account record', + resolve: scopeInvariant(scopeOptions, removeAccount), + type: AccountSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/account/query.js b/src/resources/4_0_0/profiles/account/query.js new file mode 100644 index 00000000..123ad19d --- /dev/null +++ b/src/resources/4_0_0/profiles/account/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AccountSchema = require('../../schemas/account.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const AccountArgs = require('../../parameters/account.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, AccountArgs); + +// Resolvers +const { + getAccount, + getAccountList, + getAccountInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Account', + action: 'read', +}; + +/** + * @name exports.AccountQuery + * @summary Account query. + */ +module.exports.AccountQuery = { + description: 'Query for a single Account', + resolve: scopeInvariant(scopeOptions, getAccount), + type: AccountSchema, + args: args, +}; + +/** + * @name exports.AccountListQuery + * @summary Account query. + */ +module.exports.AccountListQuery = { + description: 'Query for a more than or just one Account', + resolve: scopeInvariant(scopeOptions, getAccountList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.AccountInstanceQuery + * @summary Account query. + */ +module.exports.AccountInstanceQuery = { + description: 'Access information about a single Account', + resolve: scopeInvariant(scopeOptions, getAccountInstance), + type: AccountSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/account/register.js b/src/resources/4_0_0/profiles/account/register.js new file mode 100644 index 00000000..72648fdb --- /dev/null +++ b/src/resources/4_0_0/profiles/account/register.js @@ -0,0 +1,48 @@ +const { + AccountCreateMutation, + AccountUpdateMutation, + AccountRemoveMutation, +} = require('./mutation'); + +const { + AccountQuery, + AccountListQuery, + AccountInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Account: AccountQuery, + AccountList: AccountListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + AccountCreate: AccountCreateMutation, + AccountUpdate: AccountUpdateMutation, + AccountRemove: AccountRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Account', + path: '/4_0_0/Account/:id', + query: AccountInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/account/resolver.js b/src/resources/4_0_0/profiles/account/resolver.js new file mode 100644 index 00000000..ba0c56d2 --- /dev/null +++ b/src/resources/4_0_0/profiles/account/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getAccount + * @static + * @summary Account resolver. + */ +module.exports.getAccount = function getAccount( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAccountList + * @static + * @summary Account list resolver. + */ +module.exports.getAccountList = function getAccountList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAccountInstance + * @static + * @summary Account instance resolver. + */ +module.exports.getAccountInstance = function getAccountInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createAccount + * @static + * @summary Create Account resolver. + */ +module.exports.createAccount = function createAccount( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateAccount + * @static + * @summary Update Account resolver. + */ +module.exports.updateAccount = function updateAccount( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeAccount + * @static + * @summary Remove Account resolver. + */ +module.exports.removeAccount = function removeAccount( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/activitydefinition/mutation.js b/src/resources/4_0_0/profiles/activitydefinition/mutation.js new file mode 100644 index 00000000..87d1e943 --- /dev/null +++ b/src/resources/4_0_0/profiles/activitydefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ActivityDefinitionSchema = require('../../schemas/activitydefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ActivityDefinitionInput = require('../../inputs/activitydefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createActivityDefinition, + updateActivityDefinition, + removeActivityDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ActivityDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ActivityDefinition record.', + }, + resource: { + type: new GraphQLNonNull(ActivityDefinitionInput), + description: 'ActivityDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ActivityDefinition record for deletion.', + }, +}; + +/** + * @name exports.ActivityDefinitionCreateMutation + * @summary ActivityDefinitionCreate mutation. + */ +module.exports.ActivityDefinitionCreateMutation = { + description: 'Create a ActivityDefinition record', + resolve: scopeInvariant(scopeOptions, createActivityDefinition), + type: ActivityDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ActivityDefinitionUpdateMutation + * @summary ActivityDefinitionUpdate mutation. + */ +module.exports.ActivityDefinitionUpdateMutation = { + description: 'Update a ActivityDefinition record', + resolve: scopeInvariant(scopeOptions, updateActivityDefinition), + type: ActivityDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ActivityDefinitionRemoveMutation + * @summary ActivityDefinitionRemove mutation. + */ +module.exports.ActivityDefinitionRemoveMutation = { + description: 'Remove a ActivityDefinition record', + resolve: scopeInvariant(scopeOptions, removeActivityDefinition), + type: ActivityDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/activitydefinition/query.js b/src/resources/4_0_0/profiles/activitydefinition/query.js new file mode 100644 index 00000000..db0b1360 --- /dev/null +++ b/src/resources/4_0_0/profiles/activitydefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ActivityDefinitionSchema = require('../../schemas/activitydefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ActivityDefinitionArgs = require('../../parameters/activitydefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ActivityDefinitionArgs, +); + +// Resolvers +const { + getActivityDefinition, + getActivityDefinitionList, + getActivityDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ActivityDefinition', + action: 'read', +}; + +/** + * @name exports.ActivityDefinitionQuery + * @summary ActivityDefinition query. + */ +module.exports.ActivityDefinitionQuery = { + description: 'Query for a single ActivityDefinition', + resolve: scopeInvariant(scopeOptions, getActivityDefinition), + type: ActivityDefinitionSchema, + args: args, +}; + +/** + * @name exports.ActivityDefinitionListQuery + * @summary ActivityDefinition query. + */ +module.exports.ActivityDefinitionListQuery = { + description: 'Query for a more than or just one ActivityDefinition', + resolve: scopeInvariant(scopeOptions, getActivityDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ActivityDefinitionInstanceQuery + * @summary ActivityDefinition query. + */ +module.exports.ActivityDefinitionInstanceQuery = { + description: 'Access information about a single ActivityDefinition', + resolve: scopeInvariant(scopeOptions, getActivityDefinitionInstance), + type: ActivityDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/activitydefinition/register.js b/src/resources/4_0_0/profiles/activitydefinition/register.js new file mode 100644 index 00000000..597e69a5 --- /dev/null +++ b/src/resources/4_0_0/profiles/activitydefinition/register.js @@ -0,0 +1,48 @@ +const { + ActivityDefinitionCreateMutation, + ActivityDefinitionUpdateMutation, + ActivityDefinitionRemoveMutation, +} = require('./mutation'); + +const { + ActivityDefinitionQuery, + ActivityDefinitionListQuery, + ActivityDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ActivityDefinition: ActivityDefinitionQuery, + ActivityDefinitionList: ActivityDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ActivityDefinitionCreate: ActivityDefinitionCreateMutation, + ActivityDefinitionUpdate: ActivityDefinitionUpdateMutation, + ActivityDefinitionRemove: ActivityDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ActivityDefinition', + path: '/4_0_0/ActivityDefinition/:id', + query: ActivityDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/activitydefinition/resolver.js b/src/resources/4_0_0/profiles/activitydefinition/resolver.js new file mode 100644 index 00000000..2ef5dc3c --- /dev/null +++ b/src/resources/4_0_0/profiles/activitydefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getActivityDefinition + * @static + * @summary ActivityDefinition resolver. + */ +module.exports.getActivityDefinition = function getActivityDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getActivityDefinitionList + * @static + * @summary ActivityDefinition list resolver. + */ +module.exports.getActivityDefinitionList = function getActivityDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getActivityDefinitionInstance + * @static + * @summary ActivityDefinition instance resolver. + */ +module.exports.getActivityDefinitionInstance = function getActivityDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createActivityDefinition + * @static + * @summary Create ActivityDefinition resolver. + */ +module.exports.createActivityDefinition = function createActivityDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateActivityDefinition + * @static + * @summary Update ActivityDefinition resolver. + */ +module.exports.updateActivityDefinition = function updateActivityDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeActivityDefinition + * @static + * @summary Remove ActivityDefinition resolver. + */ +module.exports.removeActivityDefinition = function removeActivityDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/adverseevent/mutation.js b/src/resources/4_0_0/profiles/adverseevent/mutation.js new file mode 100644 index 00000000..78090b09 --- /dev/null +++ b/src/resources/4_0_0/profiles/adverseevent/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const AdverseEventSchema = require('../../schemas/adverseevent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const AdverseEventInput = require('../../inputs/adverseevent.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createAdverseEvent, + updateAdverseEvent, + removeAdverseEvent, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'AdverseEvent', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a AdverseEvent record.', + }, + resource: { + type: new GraphQLNonNull(AdverseEventInput), + description: 'AdverseEvent Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a AdverseEvent record for deletion.', + }, +}; + +/** + * @name exports.AdverseEventCreateMutation + * @summary AdverseEventCreate mutation. + */ +module.exports.AdverseEventCreateMutation = { + description: 'Create a AdverseEvent record', + resolve: scopeInvariant(scopeOptions, createAdverseEvent), + type: AdverseEventSchema, + args: WriteArgs, +}; + +/** + * @name exports.AdverseEventUpdateMutation + * @summary AdverseEventUpdate mutation. + */ +module.exports.AdverseEventUpdateMutation = { + description: 'Update a AdverseEvent record', + resolve: scopeInvariant(scopeOptions, updateAdverseEvent), + type: AdverseEventSchema, + args: WriteArgs, +}; + +/** + * @name exports.AdverseEventRemoveMutation + * @summary AdverseEventRemove mutation. + */ +module.exports.AdverseEventRemoveMutation = { + description: 'Remove a AdverseEvent record', + resolve: scopeInvariant(scopeOptions, removeAdverseEvent), + type: AdverseEventSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/adverseevent/query.js b/src/resources/4_0_0/profiles/adverseevent/query.js new file mode 100644 index 00000000..14830f33 --- /dev/null +++ b/src/resources/4_0_0/profiles/adverseevent/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AdverseEventSchema = require('../../schemas/adverseevent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const AdverseEventArgs = require('../../parameters/adverseevent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + AdverseEventArgs, +); + +// Resolvers +const { + getAdverseEvent, + getAdverseEventList, + getAdverseEventInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'AdverseEvent', + action: 'read', +}; + +/** + * @name exports.AdverseEventQuery + * @summary AdverseEvent query. + */ +module.exports.AdverseEventQuery = { + description: 'Query for a single AdverseEvent', + resolve: scopeInvariant(scopeOptions, getAdverseEvent), + type: AdverseEventSchema, + args: args, +}; + +/** + * @name exports.AdverseEventListQuery + * @summary AdverseEvent query. + */ +module.exports.AdverseEventListQuery = { + description: 'Query for a more than or just one AdverseEvent', + resolve: scopeInvariant(scopeOptions, getAdverseEventList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.AdverseEventInstanceQuery + * @summary AdverseEvent query. + */ +module.exports.AdverseEventInstanceQuery = { + description: 'Access information about a single AdverseEvent', + resolve: scopeInvariant(scopeOptions, getAdverseEventInstance), + type: AdverseEventSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/adverseevent/register.js b/src/resources/4_0_0/profiles/adverseevent/register.js new file mode 100644 index 00000000..920fc98f --- /dev/null +++ b/src/resources/4_0_0/profiles/adverseevent/register.js @@ -0,0 +1,48 @@ +const { + AdverseEventCreateMutation, + AdverseEventUpdateMutation, + AdverseEventRemoveMutation, +} = require('./mutation'); + +const { + AdverseEventQuery, + AdverseEventListQuery, + AdverseEventInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + AdverseEvent: AdverseEventQuery, + AdverseEventList: AdverseEventListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + AdverseEventCreate: AdverseEventCreateMutation, + AdverseEventUpdate: AdverseEventUpdateMutation, + AdverseEventRemove: AdverseEventRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'AdverseEvent', + path: '/4_0_0/AdverseEvent/:id', + query: AdverseEventInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/adverseevent/resolver.js b/src/resources/4_0_0/profiles/adverseevent/resolver.js new file mode 100644 index 00000000..90c2a45e --- /dev/null +++ b/src/resources/4_0_0/profiles/adverseevent/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getAdverseEvent + * @static + * @summary AdverseEvent resolver. + */ +module.exports.getAdverseEvent = function getAdverseEvent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAdverseEventList + * @static + * @summary AdverseEvent list resolver. + */ +module.exports.getAdverseEventList = function getAdverseEventList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAdverseEventInstance + * @static + * @summary AdverseEvent instance resolver. + */ +module.exports.getAdverseEventInstance = function getAdverseEventInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createAdverseEvent + * @static + * @summary Create AdverseEvent resolver. + */ +module.exports.createAdverseEvent = function createAdverseEvent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateAdverseEvent + * @static + * @summary Update AdverseEvent resolver. + */ +module.exports.updateAdverseEvent = function updateAdverseEvent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeAdverseEvent + * @static + * @summary Remove AdverseEvent resolver. + */ +module.exports.removeAdverseEvent = function removeAdverseEvent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/allergyintolerance/mutation.js b/src/resources/4_0_0/profiles/allergyintolerance/mutation.js new file mode 100644 index 00000000..5ea39a12 --- /dev/null +++ b/src/resources/4_0_0/profiles/allergyintolerance/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const AllergyIntoleranceInput = require('../../inputs/allergyintolerance.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createAllergyIntolerance, + updateAllergyIntolerance, + removeAllergyIntolerance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'AllergyIntolerance', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a AllergyIntolerance record.', + }, + resource: { + type: new GraphQLNonNull(AllergyIntoleranceInput), + description: 'AllergyIntolerance Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a AllergyIntolerance record for deletion.', + }, +}; + +/** + * @name exports.AllergyIntoleranceCreateMutation + * @summary AllergyIntoleranceCreate mutation. + */ +module.exports.AllergyIntoleranceCreateMutation = { + description: 'Create a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, createAllergyIntolerance), + type: AllergyIntoleranceSchema, + args: WriteArgs, +}; + +/** + * @name exports.AllergyIntoleranceUpdateMutation + * @summary AllergyIntoleranceUpdate mutation. + */ +module.exports.AllergyIntoleranceUpdateMutation = { + description: 'Update a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, updateAllergyIntolerance), + type: AllergyIntoleranceSchema, + args: WriteArgs, +}; + +/** + * @name exports.AllergyIntoleranceRemoveMutation + * @summary AllergyIntoleranceRemove mutation. + */ +module.exports.AllergyIntoleranceRemoveMutation = { + description: 'Remove a AllergyIntolerance record', + resolve: scopeInvariant(scopeOptions, removeAllergyIntolerance), + type: AllergyIntoleranceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/allergyintolerance/query.js b/src/resources/4_0_0/profiles/allergyintolerance/query.js new file mode 100644 index 00000000..ef3028ed --- /dev/null +++ b/src/resources/4_0_0/profiles/allergyintolerance/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AllergyIntoleranceSchema = require('../../schemas/allergyintolerance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const AllergyIntoleranceArgs = require('../../parameters/allergyintolerance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + AllergyIntoleranceArgs, +); + +// Resolvers +const { + getAllergyIntolerance, + getAllergyIntoleranceList, + getAllergyIntoleranceInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'AllergyIntolerance', + action: 'read', +}; + +/** + * @name exports.AllergyIntoleranceQuery + * @summary AllergyIntolerance query. + */ +module.exports.AllergyIntoleranceQuery = { + description: 'Query for a single AllergyIntolerance', + resolve: scopeInvariant(scopeOptions, getAllergyIntolerance), + type: AllergyIntoleranceSchema, + args: args, +}; + +/** + * @name exports.AllergyIntoleranceListQuery + * @summary AllergyIntolerance query. + */ +module.exports.AllergyIntoleranceListQuery = { + description: 'Query for a more than or just one AllergyIntolerance', + resolve: scopeInvariant(scopeOptions, getAllergyIntoleranceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.AllergyIntoleranceInstanceQuery + * @summary AllergyIntolerance query. + */ +module.exports.AllergyIntoleranceInstanceQuery = { + description: 'Access information about a single AllergyIntolerance', + resolve: scopeInvariant(scopeOptions, getAllergyIntoleranceInstance), + type: AllergyIntoleranceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/allergyintolerance/register.js b/src/resources/4_0_0/profiles/allergyintolerance/register.js new file mode 100644 index 00000000..8818d972 --- /dev/null +++ b/src/resources/4_0_0/profiles/allergyintolerance/register.js @@ -0,0 +1,48 @@ +const { + AllergyIntoleranceCreateMutation, + AllergyIntoleranceUpdateMutation, + AllergyIntoleranceRemoveMutation, +} = require('./mutation'); + +const { + AllergyIntoleranceQuery, + AllergyIntoleranceListQuery, + AllergyIntoleranceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + AllergyIntolerance: AllergyIntoleranceQuery, + AllergyIntoleranceList: AllergyIntoleranceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + AllergyIntoleranceCreate: AllergyIntoleranceCreateMutation, + AllergyIntoleranceUpdate: AllergyIntoleranceUpdateMutation, + AllergyIntoleranceRemove: AllergyIntoleranceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'AllergyIntolerance', + path: '/4_0_0/AllergyIntolerance/:id', + query: AllergyIntoleranceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/allergyintolerance/resolver.js b/src/resources/4_0_0/profiles/allergyintolerance/resolver.js new file mode 100644 index 00000000..31499802 --- /dev/null +++ b/src/resources/4_0_0/profiles/allergyintolerance/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getAllergyIntolerance + * @static + * @summary AllergyIntolerance resolver. + */ +module.exports.getAllergyIntolerance = function getAllergyIntolerance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAllergyIntoleranceList + * @static + * @summary AllergyIntolerance list resolver. + */ +module.exports.getAllergyIntoleranceList = function getAllergyIntoleranceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAllergyIntoleranceInstance + * @static + * @summary AllergyIntolerance instance resolver. + */ +module.exports.getAllergyIntoleranceInstance = function getAllergyIntoleranceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createAllergyIntolerance + * @static + * @summary Create AllergyIntolerance resolver. + */ +module.exports.createAllergyIntolerance = function createAllergyIntolerance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateAllergyIntolerance + * @static + * @summary Update AllergyIntolerance resolver. + */ +module.exports.updateAllergyIntolerance = function updateAllergyIntolerance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeAllergyIntolerance + * @static + * @summary Remove AllergyIntolerance resolver. + */ +module.exports.removeAllergyIntolerance = function removeAllergyIntolerance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/appointment/mutation.js b/src/resources/4_0_0/profiles/appointment/mutation.js new file mode 100644 index 00000000..0c00949c --- /dev/null +++ b/src/resources/4_0_0/profiles/appointment/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const AppointmentSchema = require('../../schemas/appointment.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const AppointmentInput = require('../../inputs/appointment.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createAppointment, + updateAppointment, + removeAppointment, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Appointment', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Appointment record.', + }, + resource: { + type: new GraphQLNonNull(AppointmentInput), + description: 'Appointment Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Appointment record for deletion.', + }, +}; + +/** + * @name exports.AppointmentCreateMutation + * @summary AppointmentCreate mutation. + */ +module.exports.AppointmentCreateMutation = { + description: 'Create a Appointment record', + resolve: scopeInvariant(scopeOptions, createAppointment), + type: AppointmentSchema, + args: WriteArgs, +}; + +/** + * @name exports.AppointmentUpdateMutation + * @summary AppointmentUpdate mutation. + */ +module.exports.AppointmentUpdateMutation = { + description: 'Update a Appointment record', + resolve: scopeInvariant(scopeOptions, updateAppointment), + type: AppointmentSchema, + args: WriteArgs, +}; + +/** + * @name exports.AppointmentRemoveMutation + * @summary AppointmentRemove mutation. + */ +module.exports.AppointmentRemoveMutation = { + description: 'Remove a Appointment record', + resolve: scopeInvariant(scopeOptions, removeAppointment), + type: AppointmentSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/appointment/query.js b/src/resources/4_0_0/profiles/appointment/query.js new file mode 100644 index 00000000..4d899029 --- /dev/null +++ b/src/resources/4_0_0/profiles/appointment/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AppointmentSchema = require('../../schemas/appointment.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const AppointmentArgs = require('../../parameters/appointment.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, AppointmentArgs); + +// Resolvers +const { + getAppointment, + getAppointmentList, + getAppointmentInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Appointment', + action: 'read', +}; + +/** + * @name exports.AppointmentQuery + * @summary Appointment query. + */ +module.exports.AppointmentQuery = { + description: 'Query for a single Appointment', + resolve: scopeInvariant(scopeOptions, getAppointment), + type: AppointmentSchema, + args: args, +}; + +/** + * @name exports.AppointmentListQuery + * @summary Appointment query. + */ +module.exports.AppointmentListQuery = { + description: 'Query for a more than or just one Appointment', + resolve: scopeInvariant(scopeOptions, getAppointmentList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.AppointmentInstanceQuery + * @summary Appointment query. + */ +module.exports.AppointmentInstanceQuery = { + description: 'Access information about a single Appointment', + resolve: scopeInvariant(scopeOptions, getAppointmentInstance), + type: AppointmentSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/appointment/register.js b/src/resources/4_0_0/profiles/appointment/register.js new file mode 100644 index 00000000..5f3e4eb1 --- /dev/null +++ b/src/resources/4_0_0/profiles/appointment/register.js @@ -0,0 +1,48 @@ +const { + AppointmentCreateMutation, + AppointmentUpdateMutation, + AppointmentRemoveMutation, +} = require('./mutation'); + +const { + AppointmentQuery, + AppointmentListQuery, + AppointmentInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Appointment: AppointmentQuery, + AppointmentList: AppointmentListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + AppointmentCreate: AppointmentCreateMutation, + AppointmentUpdate: AppointmentUpdateMutation, + AppointmentRemove: AppointmentRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Appointment', + path: '/4_0_0/Appointment/:id', + query: AppointmentInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/appointment/resolver.js b/src/resources/4_0_0/profiles/appointment/resolver.js new file mode 100644 index 00000000..421196d5 --- /dev/null +++ b/src/resources/4_0_0/profiles/appointment/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getAppointment + * @static + * @summary Appointment resolver. + */ +module.exports.getAppointment = function getAppointment( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAppointmentList + * @static + * @summary Appointment list resolver. + */ +module.exports.getAppointmentList = function getAppointmentList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAppointmentInstance + * @static + * @summary Appointment instance resolver. + */ +module.exports.getAppointmentInstance = function getAppointmentInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createAppointment + * @static + * @summary Create Appointment resolver. + */ +module.exports.createAppointment = function createAppointment( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateAppointment + * @static + * @summary Update Appointment resolver. + */ +module.exports.updateAppointment = function updateAppointment( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeAppointment + * @static + * @summary Remove Appointment resolver. + */ +module.exports.removeAppointment = function removeAppointment( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/appointmentresponse/mutation.js b/src/resources/4_0_0/profiles/appointmentresponse/mutation.js new file mode 100644 index 00000000..4194d1d9 --- /dev/null +++ b/src/resources/4_0_0/profiles/appointmentresponse/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const AppointmentResponseInput = require('../../inputs/appointmentresponse.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createAppointmentResponse, + updateAppointmentResponse, + removeAppointmentResponse, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'AppointmentResponse', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a AppointmentResponse record.', + }, + resource: { + type: new GraphQLNonNull(AppointmentResponseInput), + description: 'AppointmentResponse Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a AppointmentResponse record for deletion.', + }, +}; + +/** + * @name exports.AppointmentResponseCreateMutation + * @summary AppointmentResponseCreate mutation. + */ +module.exports.AppointmentResponseCreateMutation = { + description: 'Create a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, createAppointmentResponse), + type: AppointmentResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.AppointmentResponseUpdateMutation + * @summary AppointmentResponseUpdate mutation. + */ +module.exports.AppointmentResponseUpdateMutation = { + description: 'Update a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, updateAppointmentResponse), + type: AppointmentResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.AppointmentResponseRemoveMutation + * @summary AppointmentResponseRemove mutation. + */ +module.exports.AppointmentResponseRemoveMutation = { + description: 'Remove a AppointmentResponse record', + resolve: scopeInvariant(scopeOptions, removeAppointmentResponse), + type: AppointmentResponseSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/appointmentresponse/query.js b/src/resources/4_0_0/profiles/appointmentresponse/query.js new file mode 100644 index 00000000..5ebd7bf4 --- /dev/null +++ b/src/resources/4_0_0/profiles/appointmentresponse/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AppointmentResponseSchema = require('../../schemas/appointmentresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const AppointmentResponseArgs = require('../../parameters/appointmentresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + AppointmentResponseArgs, +); + +// Resolvers +const { + getAppointmentResponse, + getAppointmentResponseList, + getAppointmentResponseInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'AppointmentResponse', + action: 'read', +}; + +/** + * @name exports.AppointmentResponseQuery + * @summary AppointmentResponse query. + */ +module.exports.AppointmentResponseQuery = { + description: 'Query for a single AppointmentResponse', + resolve: scopeInvariant(scopeOptions, getAppointmentResponse), + type: AppointmentResponseSchema, + args: args, +}; + +/** + * @name exports.AppointmentResponseListQuery + * @summary AppointmentResponse query. + */ +module.exports.AppointmentResponseListQuery = { + description: 'Query for a more than or just one AppointmentResponse', + resolve: scopeInvariant(scopeOptions, getAppointmentResponseList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.AppointmentResponseInstanceQuery + * @summary AppointmentResponse query. + */ +module.exports.AppointmentResponseInstanceQuery = { + description: 'Access information about a single AppointmentResponse', + resolve: scopeInvariant(scopeOptions, getAppointmentResponseInstance), + type: AppointmentResponseSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/appointmentresponse/register.js b/src/resources/4_0_0/profiles/appointmentresponse/register.js new file mode 100644 index 00000000..b5806fa3 --- /dev/null +++ b/src/resources/4_0_0/profiles/appointmentresponse/register.js @@ -0,0 +1,48 @@ +const { + AppointmentResponseCreateMutation, + AppointmentResponseUpdateMutation, + AppointmentResponseRemoveMutation, +} = require('./mutation'); + +const { + AppointmentResponseQuery, + AppointmentResponseListQuery, + AppointmentResponseInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + AppointmentResponse: AppointmentResponseQuery, + AppointmentResponseList: AppointmentResponseListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + AppointmentResponseCreate: AppointmentResponseCreateMutation, + AppointmentResponseUpdate: AppointmentResponseUpdateMutation, + AppointmentResponseRemove: AppointmentResponseRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'AppointmentResponse', + path: '/4_0_0/AppointmentResponse/:id', + query: AppointmentResponseInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/appointmentresponse/resolver.js b/src/resources/4_0_0/profiles/appointmentresponse/resolver.js new file mode 100644 index 00000000..d8f3c115 --- /dev/null +++ b/src/resources/4_0_0/profiles/appointmentresponse/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getAppointmentResponse + * @static + * @summary AppointmentResponse resolver. + */ +module.exports.getAppointmentResponse = function getAppointmentResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAppointmentResponseList + * @static + * @summary AppointmentResponse list resolver. + */ +module.exports.getAppointmentResponseList = function getAppointmentResponseList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAppointmentResponseInstance + * @static + * @summary AppointmentResponse instance resolver. + */ +module.exports.getAppointmentResponseInstance = function getAppointmentResponseInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createAppointmentResponse + * @static + * @summary Create AppointmentResponse resolver. + */ +module.exports.createAppointmentResponse = function createAppointmentResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateAppointmentResponse + * @static + * @summary Update AppointmentResponse resolver. + */ +module.exports.updateAppointmentResponse = function updateAppointmentResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeAppointmentResponse + * @static + * @summary Remove AppointmentResponse resolver. + */ +module.exports.removeAppointmentResponse = function removeAppointmentResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/auditevent/mutation.js b/src/resources/4_0_0/profiles/auditevent/mutation.js new file mode 100644 index 00000000..5f7fb6bb --- /dev/null +++ b/src/resources/4_0_0/profiles/auditevent/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const AuditEventSchema = require('../../schemas/auditevent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const AuditEventInput = require('../../inputs/auditevent.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createAuditEvent, + updateAuditEvent, + removeAuditEvent, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'AuditEvent', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a AuditEvent record.', + }, + resource: { + type: new GraphQLNonNull(AuditEventInput), + description: 'AuditEvent Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a AuditEvent record for deletion.', + }, +}; + +/** + * @name exports.AuditEventCreateMutation + * @summary AuditEventCreate mutation. + */ +module.exports.AuditEventCreateMutation = { + description: 'Create a AuditEvent record', + resolve: scopeInvariant(scopeOptions, createAuditEvent), + type: AuditEventSchema, + args: WriteArgs, +}; + +/** + * @name exports.AuditEventUpdateMutation + * @summary AuditEventUpdate mutation. + */ +module.exports.AuditEventUpdateMutation = { + description: 'Update a AuditEvent record', + resolve: scopeInvariant(scopeOptions, updateAuditEvent), + type: AuditEventSchema, + args: WriteArgs, +}; + +/** + * @name exports.AuditEventRemoveMutation + * @summary AuditEventRemove mutation. + */ +module.exports.AuditEventRemoveMutation = { + description: 'Remove a AuditEvent record', + resolve: scopeInvariant(scopeOptions, removeAuditEvent), + type: AuditEventSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/auditevent/query.js b/src/resources/4_0_0/profiles/auditevent/query.js new file mode 100644 index 00000000..a0090a1c --- /dev/null +++ b/src/resources/4_0_0/profiles/auditevent/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const AuditEventSchema = require('../../schemas/auditevent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const AuditEventArgs = require('../../parameters/auditevent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, AuditEventArgs); + +// Resolvers +const { + getAuditEvent, + getAuditEventList, + getAuditEventInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'AuditEvent', + action: 'read', +}; + +/** + * @name exports.AuditEventQuery + * @summary AuditEvent query. + */ +module.exports.AuditEventQuery = { + description: 'Query for a single AuditEvent', + resolve: scopeInvariant(scopeOptions, getAuditEvent), + type: AuditEventSchema, + args: args, +}; + +/** + * @name exports.AuditEventListQuery + * @summary AuditEvent query. + */ +module.exports.AuditEventListQuery = { + description: 'Query for a more than or just one AuditEvent', + resolve: scopeInvariant(scopeOptions, getAuditEventList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.AuditEventInstanceQuery + * @summary AuditEvent query. + */ +module.exports.AuditEventInstanceQuery = { + description: 'Access information about a single AuditEvent', + resolve: scopeInvariant(scopeOptions, getAuditEventInstance), + type: AuditEventSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/auditevent/register.js b/src/resources/4_0_0/profiles/auditevent/register.js new file mode 100644 index 00000000..3deb6dd4 --- /dev/null +++ b/src/resources/4_0_0/profiles/auditevent/register.js @@ -0,0 +1,48 @@ +const { + AuditEventCreateMutation, + AuditEventUpdateMutation, + AuditEventRemoveMutation, +} = require('./mutation'); + +const { + AuditEventQuery, + AuditEventListQuery, + AuditEventInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + AuditEvent: AuditEventQuery, + AuditEventList: AuditEventListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + AuditEventCreate: AuditEventCreateMutation, + AuditEventUpdate: AuditEventUpdateMutation, + AuditEventRemove: AuditEventRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'AuditEvent', + path: '/4_0_0/AuditEvent/:id', + query: AuditEventInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/auditevent/resolver.js b/src/resources/4_0_0/profiles/auditevent/resolver.js new file mode 100644 index 00000000..aa8a0228 --- /dev/null +++ b/src/resources/4_0_0/profiles/auditevent/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getAuditEvent + * @static + * @summary AuditEvent resolver. + */ +module.exports.getAuditEvent = function getAuditEvent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAuditEventList + * @static + * @summary AuditEvent list resolver. + */ +module.exports.getAuditEventList = function getAuditEventList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getAuditEventInstance + * @static + * @summary AuditEvent instance resolver. + */ +module.exports.getAuditEventInstance = function getAuditEventInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createAuditEvent + * @static + * @summary Create AuditEvent resolver. + */ +module.exports.createAuditEvent = function createAuditEvent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateAuditEvent + * @static + * @summary Update AuditEvent resolver. + */ +module.exports.updateAuditEvent = function updateAuditEvent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeAuditEvent + * @static + * @summary Remove AuditEvent resolver. + */ +module.exports.removeAuditEvent = function removeAuditEvent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/basic/mutation.js b/src/resources/4_0_0/profiles/basic/mutation.js new file mode 100644 index 00000000..b2e687bc --- /dev/null +++ b/src/resources/4_0_0/profiles/basic/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const BasicSchema = require('../../schemas/basic.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const BasicInput = require('../../inputs/basic.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createBasic, updateBasic, removeBasic } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Basic', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Basic record.', + }, + resource: { + type: new GraphQLNonNull(BasicInput), + description: 'Basic Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a Basic record for deletion.', + }, +}; + +/** + * @name exports.BasicCreateMutation + * @summary BasicCreate mutation. + */ +module.exports.BasicCreateMutation = { + description: 'Create a Basic record', + resolve: scopeInvariant(scopeOptions, createBasic), + type: BasicSchema, + args: WriteArgs, +}; + +/** + * @name exports.BasicUpdateMutation + * @summary BasicUpdate mutation. + */ +module.exports.BasicUpdateMutation = { + description: 'Update a Basic record', + resolve: scopeInvariant(scopeOptions, updateBasic), + type: BasicSchema, + args: WriteArgs, +}; + +/** + * @name exports.BasicRemoveMutation + * @summary BasicRemove mutation. + */ +module.exports.BasicRemoveMutation = { + description: 'Remove a Basic record', + resolve: scopeInvariant(scopeOptions, removeBasic), + type: BasicSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/basic/query.js b/src/resources/4_0_0/profiles/basic/query.js new file mode 100644 index 00000000..00181274 --- /dev/null +++ b/src/resources/4_0_0/profiles/basic/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BasicSchema = require('../../schemas/basic.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const BasicArgs = require('../../parameters/basic.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, BasicArgs); + +// Resolvers +const { getBasic, getBasicList, getBasicInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Basic', + action: 'read', +}; + +/** + * @name exports.BasicQuery + * @summary Basic query. + */ +module.exports.BasicQuery = { + description: 'Query for a single Basic', + resolve: scopeInvariant(scopeOptions, getBasic), + type: BasicSchema, + args: args, +}; + +/** + * @name exports.BasicListQuery + * @summary Basic query. + */ +module.exports.BasicListQuery = { + description: 'Query for a more than or just one Basic', + resolve: scopeInvariant(scopeOptions, getBasicList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.BasicInstanceQuery + * @summary Basic query. + */ +module.exports.BasicInstanceQuery = { + description: 'Access information about a single Basic', + resolve: scopeInvariant(scopeOptions, getBasicInstance), + type: BasicSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/basic/register.js b/src/resources/4_0_0/profiles/basic/register.js new file mode 100644 index 00000000..4a9ba9da --- /dev/null +++ b/src/resources/4_0_0/profiles/basic/register.js @@ -0,0 +1,44 @@ +const { + BasicCreateMutation, + BasicUpdateMutation, + BasicRemoveMutation, +} = require('./mutation'); + +const { BasicQuery, BasicListQuery, BasicInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Basic: BasicQuery, + BasicList: BasicListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + BasicCreate: BasicCreateMutation, + BasicUpdate: BasicUpdateMutation, + BasicRemove: BasicRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Basic', + path: '/4_0_0/Basic/:id', + query: BasicInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/basic/resolver.js b/src/resources/4_0_0/profiles/basic/resolver.js new file mode 100644 index 00000000..6b622b01 --- /dev/null +++ b/src/resources/4_0_0/profiles/basic/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getBasic + * @static + * @summary Basic resolver. + */ +module.exports.getBasic = function getBasic(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getBasicList + * @static + * @summary Basic list resolver. + */ +module.exports.getBasicList = function getBasicList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getBasicInstance + * @static + * @summary Basic instance resolver. + */ +module.exports.getBasicInstance = function getBasicInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createBasic + * @static + * @summary Create Basic resolver. + */ +module.exports.createBasic = function createBasic( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateBasic + * @static + * @summary Update Basic resolver. + */ +module.exports.updateBasic = function updateBasic( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeBasic + * @static + * @summary Remove Basic resolver. + */ +module.exports.removeBasic = function removeBasic( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/bodystructure/mutation.js b/src/resources/4_0_0/profiles/bodystructure/mutation.js new file mode 100644 index 00000000..f7432c9e --- /dev/null +++ b/src/resources/4_0_0/profiles/bodystructure/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const BodyStructureSchema = require('../../schemas/bodystructure.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const BodyStructureInput = require('../../inputs/bodystructure.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createBodyStructure, + updateBodyStructure, + removeBodyStructure, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'BodyStructure', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a BodyStructure record.', + }, + resource: { + type: new GraphQLNonNull(BodyStructureInput), + description: 'BodyStructure Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a BodyStructure record for deletion.', + }, +}; + +/** + * @name exports.BodyStructureCreateMutation + * @summary BodyStructureCreate mutation. + */ +module.exports.BodyStructureCreateMutation = { + description: 'Create a BodyStructure record', + resolve: scopeInvariant(scopeOptions, createBodyStructure), + type: BodyStructureSchema, + args: WriteArgs, +}; + +/** + * @name exports.BodyStructureUpdateMutation + * @summary BodyStructureUpdate mutation. + */ +module.exports.BodyStructureUpdateMutation = { + description: 'Update a BodyStructure record', + resolve: scopeInvariant(scopeOptions, updateBodyStructure), + type: BodyStructureSchema, + args: WriteArgs, +}; + +/** + * @name exports.BodyStructureRemoveMutation + * @summary BodyStructureRemove mutation. + */ +module.exports.BodyStructureRemoveMutation = { + description: 'Remove a BodyStructure record', + resolve: scopeInvariant(scopeOptions, removeBodyStructure), + type: BodyStructureSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/bodystructure/query.js b/src/resources/4_0_0/profiles/bodystructure/query.js new file mode 100644 index 00000000..2dd8d77c --- /dev/null +++ b/src/resources/4_0_0/profiles/bodystructure/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BodyStructureSchema = require('../../schemas/bodystructure.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const BodyStructureArgs = require('../../parameters/bodystructure.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + BodyStructureArgs, +); + +// Resolvers +const { + getBodyStructure, + getBodyStructureList, + getBodyStructureInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'BodyStructure', + action: 'read', +}; + +/** + * @name exports.BodyStructureQuery + * @summary BodyStructure query. + */ +module.exports.BodyStructureQuery = { + description: 'Query for a single BodyStructure', + resolve: scopeInvariant(scopeOptions, getBodyStructure), + type: BodyStructureSchema, + args: args, +}; + +/** + * @name exports.BodyStructureListQuery + * @summary BodyStructure query. + */ +module.exports.BodyStructureListQuery = { + description: 'Query for a more than or just one BodyStructure', + resolve: scopeInvariant(scopeOptions, getBodyStructureList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.BodyStructureInstanceQuery + * @summary BodyStructure query. + */ +module.exports.BodyStructureInstanceQuery = { + description: 'Access information about a single BodyStructure', + resolve: scopeInvariant(scopeOptions, getBodyStructureInstance), + type: BodyStructureSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/bodystructure/register.js b/src/resources/4_0_0/profiles/bodystructure/register.js new file mode 100644 index 00000000..88ee6747 --- /dev/null +++ b/src/resources/4_0_0/profiles/bodystructure/register.js @@ -0,0 +1,48 @@ +const { + BodyStructureCreateMutation, + BodyStructureUpdateMutation, + BodyStructureRemoveMutation, +} = require('./mutation'); + +const { + BodyStructureQuery, + BodyStructureListQuery, + BodyStructureInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + BodyStructure: BodyStructureQuery, + BodyStructureList: BodyStructureListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + BodyStructureCreate: BodyStructureCreateMutation, + BodyStructureUpdate: BodyStructureUpdateMutation, + BodyStructureRemove: BodyStructureRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'BodyStructure', + path: '/4_0_0/BodyStructure/:id', + query: BodyStructureInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/bodystructure/resolver.js b/src/resources/4_0_0/profiles/bodystructure/resolver.js new file mode 100644 index 00000000..a84c3bb5 --- /dev/null +++ b/src/resources/4_0_0/profiles/bodystructure/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getBodyStructure + * @static + * @summary BodyStructure resolver. + */ +module.exports.getBodyStructure = function getBodyStructure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getBodyStructureList + * @static + * @summary BodyStructure list resolver. + */ +module.exports.getBodyStructureList = function getBodyStructureList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getBodyStructureInstance + * @static + * @summary BodyStructure instance resolver. + */ +module.exports.getBodyStructureInstance = function getBodyStructureInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createBodyStructure + * @static + * @summary Create BodyStructure resolver. + */ +module.exports.createBodyStructure = function createBodyStructure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateBodyStructure + * @static + * @summary Update BodyStructure resolver. + */ +module.exports.updateBodyStructure = function updateBodyStructure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeBodyStructure + * @static + * @summary Remove BodyStructure resolver. + */ +module.exports.removeBodyStructure = function removeBodyStructure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/bundle/mutation.js b/src/resources/4_0_0/profiles/bundle/mutation.js new file mode 100644 index 00000000..c63b03c6 --- /dev/null +++ b/src/resources/4_0_0/profiles/bundle/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const BundleSchema = require('../../schemas/bundle.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const BundleInput = require('../../inputs/bundle.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createBundle, updateBundle, removeBundle } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Bundle', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Bundle record.', + }, + resource: { + type: new GraphQLNonNull(BundleInput), + description: 'Bundle Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Bundle record for deletion.', + }, +}; + +/** + * @name exports.BundleCreateMutation + * @summary BundleCreate mutation. + */ +module.exports.BundleCreateMutation = { + description: 'Create a Bundle record', + resolve: scopeInvariant(scopeOptions, createBundle), + type: BundleSchema, + args: WriteArgs, +}; + +/** + * @name exports.BundleUpdateMutation + * @summary BundleUpdate mutation. + */ +module.exports.BundleUpdateMutation = { + description: 'Update a Bundle record', + resolve: scopeInvariant(scopeOptions, updateBundle), + type: BundleSchema, + args: WriteArgs, +}; + +/** + * @name exports.BundleRemoveMutation + * @summary BundleRemove mutation. + */ +module.exports.BundleRemoveMutation = { + description: 'Remove a Bundle record', + resolve: scopeInvariant(scopeOptions, removeBundle), + type: BundleSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/bundle/query.js b/src/resources/4_0_0/profiles/bundle/query.js new file mode 100644 index 00000000..86d986dd --- /dev/null +++ b/src/resources/4_0_0/profiles/bundle/query.js @@ -0,0 +1,55 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const BundleArgs = require('../../parameters/bundle.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, BundleArgs); + +// Resolvers +const { getBundle, getBundleList, getBundleInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Bundle', + action: 'read', +}; + +/** + * @name exports.BundleQuery + * @summary Bundle query. + */ +module.exports.BundleQuery = { + description: 'Query for a single Bundle', + resolve: scopeInvariant(scopeOptions, getBundle), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.BundleListQuery + * @summary Bundle query. + */ +module.exports.BundleListQuery = { + description: 'Query for a more than or just one Bundle', + resolve: scopeInvariant(scopeOptions, getBundleList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.BundleInstanceQuery + * @summary Bundle query. + */ +module.exports.BundleInstanceQuery = { + description: 'Access information about a single Bundle', + resolve: scopeInvariant(scopeOptions, getBundleInstance), + type: BundleSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/bundle/register.js b/src/resources/4_0_0/profiles/bundle/register.js new file mode 100644 index 00000000..e3a91376 --- /dev/null +++ b/src/resources/4_0_0/profiles/bundle/register.js @@ -0,0 +1,48 @@ +const { + BundleCreateMutation, + BundleUpdateMutation, + BundleRemoveMutation, +} = require('./mutation'); + +const { + BundleQuery, + BundleListQuery, + BundleInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Bundle: BundleQuery, + BundleList: BundleListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + BundleCreate: BundleCreateMutation, + BundleUpdate: BundleUpdateMutation, + BundleRemove: BundleRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Bundle', + path: '/4_0_0/Bundle/:id', + query: BundleInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/bundle/resolver.js b/src/resources/4_0_0/profiles/bundle/resolver.js new file mode 100644 index 00000000..b2e60890 --- /dev/null +++ b/src/resources/4_0_0/profiles/bundle/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getBundle + * @static + * @summary Bundle resolver. + */ +module.exports.getBundle = function getBundle(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getBundleList + * @static + * @summary Bundle list resolver. + */ +module.exports.getBundleList = function getBundleList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getBundleInstance + * @static + * @summary Bundle instance resolver. + */ +module.exports.getBundleInstance = function getBundleInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createBundle + * @static + * @summary Create Bundle resolver. + */ +module.exports.createBundle = function createBundle( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateBundle + * @static + * @summary Update Bundle resolver. + */ +module.exports.updateBundle = function updateBundle( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeBundle + * @static + * @summary Remove Bundle resolver. + */ +module.exports.removeBundle = function removeBundle( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/capabilitystatement/mutation.js b/src/resources/4_0_0/profiles/capabilitystatement/mutation.js new file mode 100644 index 00000000..f772bf42 --- /dev/null +++ b/src/resources/4_0_0/profiles/capabilitystatement/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const CapabilityStatementSchema = require('../../schemas/capabilitystatement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CapabilityStatementInput = require('../../inputs/capabilitystatement.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCapabilityStatement, + updateCapabilityStatement, + removeCapabilityStatement, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CapabilityStatement', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a CapabilityStatement record.', + }, + resource: { + type: new GraphQLNonNull(CapabilityStatementInput), + description: 'CapabilityStatement Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a CapabilityStatement record for deletion.', + }, +}; + +/** + * @name exports.CapabilityStatementCreateMutation + * @summary CapabilityStatementCreate mutation. + */ +module.exports.CapabilityStatementCreateMutation = { + description: 'Create a CapabilityStatement record', + resolve: scopeInvariant(scopeOptions, createCapabilityStatement), + type: CapabilityStatementSchema, + args: WriteArgs, +}; + +/** + * @name exports.CapabilityStatementUpdateMutation + * @summary CapabilityStatementUpdate mutation. + */ +module.exports.CapabilityStatementUpdateMutation = { + description: 'Update a CapabilityStatement record', + resolve: scopeInvariant(scopeOptions, updateCapabilityStatement), + type: CapabilityStatementSchema, + args: WriteArgs, +}; + +/** + * @name exports.CapabilityStatementRemoveMutation + * @summary CapabilityStatementRemove mutation. + */ +module.exports.CapabilityStatementRemoveMutation = { + description: 'Remove a CapabilityStatement record', + resolve: scopeInvariant(scopeOptions, removeCapabilityStatement), + type: CapabilityStatementSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/capabilitystatement/query.js b/src/resources/4_0_0/profiles/capabilitystatement/query.js new file mode 100644 index 00000000..931f3826 --- /dev/null +++ b/src/resources/4_0_0/profiles/capabilitystatement/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CapabilityStatementSchema = require('../../schemas/capabilitystatement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CapabilityStatementArgs = require('../../parameters/capabilitystatement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CapabilityStatementArgs, +); + +// Resolvers +const { + getCapabilityStatement, + getCapabilityStatementList, + getCapabilityStatementInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CapabilityStatement', + action: 'read', +}; + +/** + * @name exports.CapabilityStatementQuery + * @summary CapabilityStatement query. + */ +module.exports.CapabilityStatementQuery = { + description: 'Query for a single CapabilityStatement', + resolve: scopeInvariant(scopeOptions, getCapabilityStatement), + type: CapabilityStatementSchema, + args: args, +}; + +/** + * @name exports.CapabilityStatementListQuery + * @summary CapabilityStatement query. + */ +module.exports.CapabilityStatementListQuery = { + description: 'Query for a more than or just one CapabilityStatement', + resolve: scopeInvariant(scopeOptions, getCapabilityStatementList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CapabilityStatementInstanceQuery + * @summary CapabilityStatement query. + */ +module.exports.CapabilityStatementInstanceQuery = { + description: 'Access information about a single CapabilityStatement', + resolve: scopeInvariant(scopeOptions, getCapabilityStatementInstance), + type: CapabilityStatementSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/capabilitystatement/register.js b/src/resources/4_0_0/profiles/capabilitystatement/register.js new file mode 100644 index 00000000..503bc5b2 --- /dev/null +++ b/src/resources/4_0_0/profiles/capabilitystatement/register.js @@ -0,0 +1,48 @@ +const { + CapabilityStatementCreateMutation, + CapabilityStatementUpdateMutation, + CapabilityStatementRemoveMutation, +} = require('./mutation'); + +const { + CapabilityStatementQuery, + CapabilityStatementListQuery, + CapabilityStatementInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + CapabilityStatement: CapabilityStatementQuery, + CapabilityStatementList: CapabilityStatementListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CapabilityStatementCreate: CapabilityStatementCreateMutation, + CapabilityStatementUpdate: CapabilityStatementUpdateMutation, + CapabilityStatementRemove: CapabilityStatementRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'CapabilityStatement', + path: '/4_0_0/CapabilityStatement/:id', + query: CapabilityStatementInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/capabilitystatement/resolver.js b/src/resources/4_0_0/profiles/capabilitystatement/resolver.js new file mode 100644 index 00000000..1c2d3722 --- /dev/null +++ b/src/resources/4_0_0/profiles/capabilitystatement/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCapabilityStatement + * @static + * @summary CapabilityStatement resolver. + */ +module.exports.getCapabilityStatement = function getCapabilityStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCapabilityStatementList + * @static + * @summary CapabilityStatement list resolver. + */ +module.exports.getCapabilityStatementList = function getCapabilityStatementList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCapabilityStatementInstance + * @static + * @summary CapabilityStatement instance resolver. + */ +module.exports.getCapabilityStatementInstance = function getCapabilityStatementInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCapabilityStatement + * @static + * @summary Create CapabilityStatement resolver. + */ +module.exports.createCapabilityStatement = function createCapabilityStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCapabilityStatement + * @static + * @summary Update CapabilityStatement resolver. + */ +module.exports.updateCapabilityStatement = function updateCapabilityStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCapabilityStatement + * @static + * @summary Remove CapabilityStatement resolver. + */ +module.exports.removeCapabilityStatement = function removeCapabilityStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/careplan/mutation.js b/src/resources/4_0_0/profiles/careplan/mutation.js new file mode 100644 index 00000000..554c9949 --- /dev/null +++ b/src/resources/4_0_0/profiles/careplan/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const CarePlanSchema = require('../../schemas/careplan.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CarePlanInput = require('../../inputs/careplan.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCarePlan, + updateCarePlan, + removeCarePlan, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CarePlan', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a CarePlan record.', + }, + resource: { + type: new GraphQLNonNull(CarePlanInput), + description: 'CarePlan Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a CarePlan record for deletion.', + }, +}; + +/** + * @name exports.CarePlanCreateMutation + * @summary CarePlanCreate mutation. + */ +module.exports.CarePlanCreateMutation = { + description: 'Create a CarePlan record', + resolve: scopeInvariant(scopeOptions, createCarePlan), + type: CarePlanSchema, + args: WriteArgs, +}; + +/** + * @name exports.CarePlanUpdateMutation + * @summary CarePlanUpdate mutation. + */ +module.exports.CarePlanUpdateMutation = { + description: 'Update a CarePlan record', + resolve: scopeInvariant(scopeOptions, updateCarePlan), + type: CarePlanSchema, + args: WriteArgs, +}; + +/** + * @name exports.CarePlanRemoveMutation + * @summary CarePlanRemove mutation. + */ +module.exports.CarePlanRemoveMutation = { + description: 'Remove a CarePlan record', + resolve: scopeInvariant(scopeOptions, removeCarePlan), + type: CarePlanSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/careplan/query.js b/src/resources/4_0_0/profiles/careplan/query.js new file mode 100644 index 00000000..00c36db3 --- /dev/null +++ b/src/resources/4_0_0/profiles/careplan/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CarePlanSchema = require('../../schemas/careplan.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CarePlanArgs = require('../../parameters/careplan.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CarePlanArgs); + +// Resolvers +const { + getCarePlan, + getCarePlanList, + getCarePlanInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CarePlan', + action: 'read', +}; + +/** + * @name exports.CarePlanQuery + * @summary CarePlan query. + */ +module.exports.CarePlanQuery = { + description: 'Query for a single CarePlan', + resolve: scopeInvariant(scopeOptions, getCarePlan), + type: CarePlanSchema, + args: args, +}; + +/** + * @name exports.CarePlanListQuery + * @summary CarePlan query. + */ +module.exports.CarePlanListQuery = { + description: 'Query for a more than or just one CarePlan', + resolve: scopeInvariant(scopeOptions, getCarePlanList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CarePlanInstanceQuery + * @summary CarePlan query. + */ +module.exports.CarePlanInstanceQuery = { + description: 'Access information about a single CarePlan', + resolve: scopeInvariant(scopeOptions, getCarePlanInstance), + type: CarePlanSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/careplan/register.js b/src/resources/4_0_0/profiles/careplan/register.js new file mode 100644 index 00000000..b3aef4e4 --- /dev/null +++ b/src/resources/4_0_0/profiles/careplan/register.js @@ -0,0 +1,48 @@ +const { + CarePlanCreateMutation, + CarePlanUpdateMutation, + CarePlanRemoveMutation, +} = require('./mutation'); + +const { + CarePlanQuery, + CarePlanListQuery, + CarePlanInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + CarePlan: CarePlanQuery, + CarePlanList: CarePlanListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CarePlanCreate: CarePlanCreateMutation, + CarePlanUpdate: CarePlanUpdateMutation, + CarePlanRemove: CarePlanRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'CarePlan', + path: '/4_0_0/CarePlan/:id', + query: CarePlanInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/careplan/resolver.js b/src/resources/4_0_0/profiles/careplan/resolver.js new file mode 100644 index 00000000..2fc8ecd0 --- /dev/null +++ b/src/resources/4_0_0/profiles/careplan/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCarePlan + * @static + * @summary CarePlan resolver. + */ +module.exports.getCarePlan = function getCarePlan( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCarePlanList + * @static + * @summary CarePlan list resolver. + */ +module.exports.getCarePlanList = function getCarePlanList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCarePlanInstance + * @static + * @summary CarePlan instance resolver. + */ +module.exports.getCarePlanInstance = function getCarePlanInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCarePlan + * @static + * @summary Create CarePlan resolver. + */ +module.exports.createCarePlan = function createCarePlan( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCarePlan + * @static + * @summary Update CarePlan resolver. + */ +module.exports.updateCarePlan = function updateCarePlan( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCarePlan + * @static + * @summary Remove CarePlan resolver. + */ +module.exports.removeCarePlan = function removeCarePlan( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/careteam/mutation.js b/src/resources/4_0_0/profiles/careteam/mutation.js new file mode 100644 index 00000000..3d7f7fa6 --- /dev/null +++ b/src/resources/4_0_0/profiles/careteam/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const CareTeamSchema = require('../../schemas/careteam.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CareTeamInput = require('../../inputs/careteam.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCareTeam, + updateCareTeam, + removeCareTeam, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CareTeam', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a CareTeam record.', + }, + resource: { + type: new GraphQLNonNull(CareTeamInput), + description: 'CareTeam Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a CareTeam record for deletion.', + }, +}; + +/** + * @name exports.CareTeamCreateMutation + * @summary CareTeamCreate mutation. + */ +module.exports.CareTeamCreateMutation = { + description: 'Create a CareTeam record', + resolve: scopeInvariant(scopeOptions, createCareTeam), + type: CareTeamSchema, + args: WriteArgs, +}; + +/** + * @name exports.CareTeamUpdateMutation + * @summary CareTeamUpdate mutation. + */ +module.exports.CareTeamUpdateMutation = { + description: 'Update a CareTeam record', + resolve: scopeInvariant(scopeOptions, updateCareTeam), + type: CareTeamSchema, + args: WriteArgs, +}; + +/** + * @name exports.CareTeamRemoveMutation + * @summary CareTeamRemove mutation. + */ +module.exports.CareTeamRemoveMutation = { + description: 'Remove a CareTeam record', + resolve: scopeInvariant(scopeOptions, removeCareTeam), + type: CareTeamSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/careteam/query.js b/src/resources/4_0_0/profiles/careteam/query.js new file mode 100644 index 00000000..76710200 --- /dev/null +++ b/src/resources/4_0_0/profiles/careteam/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CareTeamSchema = require('../../schemas/careteam.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CareTeamArgs = require('../../parameters/careteam.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CareTeamArgs); + +// Resolvers +const { + getCareTeam, + getCareTeamList, + getCareTeamInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CareTeam', + action: 'read', +}; + +/** + * @name exports.CareTeamQuery + * @summary CareTeam query. + */ +module.exports.CareTeamQuery = { + description: 'Query for a single CareTeam', + resolve: scopeInvariant(scopeOptions, getCareTeam), + type: CareTeamSchema, + args: args, +}; + +/** + * @name exports.CareTeamListQuery + * @summary CareTeam query. + */ +module.exports.CareTeamListQuery = { + description: 'Query for a more than or just one CareTeam', + resolve: scopeInvariant(scopeOptions, getCareTeamList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CareTeamInstanceQuery + * @summary CareTeam query. + */ +module.exports.CareTeamInstanceQuery = { + description: 'Access information about a single CareTeam', + resolve: scopeInvariant(scopeOptions, getCareTeamInstance), + type: CareTeamSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/careteam/register.js b/src/resources/4_0_0/profiles/careteam/register.js new file mode 100644 index 00000000..02e07960 --- /dev/null +++ b/src/resources/4_0_0/profiles/careteam/register.js @@ -0,0 +1,48 @@ +const { + CareTeamCreateMutation, + CareTeamUpdateMutation, + CareTeamRemoveMutation, +} = require('./mutation'); + +const { + CareTeamQuery, + CareTeamListQuery, + CareTeamInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + CareTeam: CareTeamQuery, + CareTeamList: CareTeamListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CareTeamCreate: CareTeamCreateMutation, + CareTeamUpdate: CareTeamUpdateMutation, + CareTeamRemove: CareTeamRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'CareTeam', + path: '/4_0_0/CareTeam/:id', + query: CareTeamInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/careteam/resolver.js b/src/resources/4_0_0/profiles/careteam/resolver.js new file mode 100644 index 00000000..e634adb1 --- /dev/null +++ b/src/resources/4_0_0/profiles/careteam/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCareTeam + * @static + * @summary CareTeam resolver. + */ +module.exports.getCareTeam = function getCareTeam( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCareTeamList + * @static + * @summary CareTeam list resolver. + */ +module.exports.getCareTeamList = function getCareTeamList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCareTeamInstance + * @static + * @summary CareTeam instance resolver. + */ +module.exports.getCareTeamInstance = function getCareTeamInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCareTeam + * @static + * @summary Create CareTeam resolver. + */ +module.exports.createCareTeam = function createCareTeam( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCareTeam + * @static + * @summary Update CareTeam resolver. + */ +module.exports.updateCareTeam = function updateCareTeam( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCareTeam + * @static + * @summary Remove CareTeam resolver. + */ +module.exports.removeCareTeam = function removeCareTeam( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/chargeitem/mutation.js b/src/resources/4_0_0/profiles/chargeitem/mutation.js new file mode 100644 index 00000000..b2552123 --- /dev/null +++ b/src/resources/4_0_0/profiles/chargeitem/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const ChargeItemSchema = require('../../schemas/chargeitem.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ChargeItemInput = require('../../inputs/chargeitem.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createChargeItem, + updateChargeItem, + removeChargeItem, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ChargeItem', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a ChargeItem record.', + }, + resource: { + type: new GraphQLNonNull(ChargeItemInput), + description: 'ChargeItem Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ChargeItem record for deletion.', + }, +}; + +/** + * @name exports.ChargeItemCreateMutation + * @summary ChargeItemCreate mutation. + */ +module.exports.ChargeItemCreateMutation = { + description: 'Create a ChargeItem record', + resolve: scopeInvariant(scopeOptions, createChargeItem), + type: ChargeItemSchema, + args: WriteArgs, +}; + +/** + * @name exports.ChargeItemUpdateMutation + * @summary ChargeItemUpdate mutation. + */ +module.exports.ChargeItemUpdateMutation = { + description: 'Update a ChargeItem record', + resolve: scopeInvariant(scopeOptions, updateChargeItem), + type: ChargeItemSchema, + args: WriteArgs, +}; + +/** + * @name exports.ChargeItemRemoveMutation + * @summary ChargeItemRemove mutation. + */ +module.exports.ChargeItemRemoveMutation = { + description: 'Remove a ChargeItem record', + resolve: scopeInvariant(scopeOptions, removeChargeItem), + type: ChargeItemSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/chargeitem/query.js b/src/resources/4_0_0/profiles/chargeitem/query.js new file mode 100644 index 00000000..b98ee6a6 --- /dev/null +++ b/src/resources/4_0_0/profiles/chargeitem/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ChargeItemSchema = require('../../schemas/chargeitem.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ChargeItemArgs = require('../../parameters/chargeitem.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ChargeItemArgs); + +// Resolvers +const { + getChargeItem, + getChargeItemList, + getChargeItemInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ChargeItem', + action: 'read', +}; + +/** + * @name exports.ChargeItemQuery + * @summary ChargeItem query. + */ +module.exports.ChargeItemQuery = { + description: 'Query for a single ChargeItem', + resolve: scopeInvariant(scopeOptions, getChargeItem), + type: ChargeItemSchema, + args: args, +}; + +/** + * @name exports.ChargeItemListQuery + * @summary ChargeItem query. + */ +module.exports.ChargeItemListQuery = { + description: 'Query for a more than or just one ChargeItem', + resolve: scopeInvariant(scopeOptions, getChargeItemList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ChargeItemInstanceQuery + * @summary ChargeItem query. + */ +module.exports.ChargeItemInstanceQuery = { + description: 'Access information about a single ChargeItem', + resolve: scopeInvariant(scopeOptions, getChargeItemInstance), + type: ChargeItemSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/chargeitem/register.js b/src/resources/4_0_0/profiles/chargeitem/register.js new file mode 100644 index 00000000..77b946bd --- /dev/null +++ b/src/resources/4_0_0/profiles/chargeitem/register.js @@ -0,0 +1,48 @@ +const { + ChargeItemCreateMutation, + ChargeItemUpdateMutation, + ChargeItemRemoveMutation, +} = require('./mutation'); + +const { + ChargeItemQuery, + ChargeItemListQuery, + ChargeItemInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ChargeItem: ChargeItemQuery, + ChargeItemList: ChargeItemListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ChargeItemCreate: ChargeItemCreateMutation, + ChargeItemUpdate: ChargeItemUpdateMutation, + ChargeItemRemove: ChargeItemRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ChargeItem', + path: '/4_0_0/ChargeItem/:id', + query: ChargeItemInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/chargeitem/resolver.js b/src/resources/4_0_0/profiles/chargeitem/resolver.js new file mode 100644 index 00000000..5e6a7a19 --- /dev/null +++ b/src/resources/4_0_0/profiles/chargeitem/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getChargeItem + * @static + * @summary ChargeItem resolver. + */ +module.exports.getChargeItem = function getChargeItem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getChargeItemList + * @static + * @summary ChargeItem list resolver. + */ +module.exports.getChargeItemList = function getChargeItemList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getChargeItemInstance + * @static + * @summary ChargeItem instance resolver. + */ +module.exports.getChargeItemInstance = function getChargeItemInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createChargeItem + * @static + * @summary Create ChargeItem resolver. + */ +module.exports.createChargeItem = function createChargeItem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateChargeItem + * @static + * @summary Update ChargeItem resolver. + */ +module.exports.updateChargeItem = function updateChargeItem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeChargeItem + * @static + * @summary Remove ChargeItem resolver. + */ +module.exports.removeChargeItem = function removeChargeItem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/chargeitemdefinition/mutation.js b/src/resources/4_0_0/profiles/chargeitemdefinition/mutation.js new file mode 100644 index 00000000..732cf52b --- /dev/null +++ b/src/resources/4_0_0/profiles/chargeitemdefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ChargeItemDefinitionSchema = require('../../schemas/chargeitemdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ChargeItemDefinitionInput = require('../../inputs/chargeitemdefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createChargeItemDefinition, + updateChargeItemDefinition, + removeChargeItemDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ChargeItemDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ChargeItemDefinition record.', + }, + resource: { + type: new GraphQLNonNull(ChargeItemDefinitionInput), + description: 'ChargeItemDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ChargeItemDefinition record for deletion.', + }, +}; + +/** + * @name exports.ChargeItemDefinitionCreateMutation + * @summary ChargeItemDefinitionCreate mutation. + */ +module.exports.ChargeItemDefinitionCreateMutation = { + description: 'Create a ChargeItemDefinition record', + resolve: scopeInvariant(scopeOptions, createChargeItemDefinition), + type: ChargeItemDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ChargeItemDefinitionUpdateMutation + * @summary ChargeItemDefinitionUpdate mutation. + */ +module.exports.ChargeItemDefinitionUpdateMutation = { + description: 'Update a ChargeItemDefinition record', + resolve: scopeInvariant(scopeOptions, updateChargeItemDefinition), + type: ChargeItemDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ChargeItemDefinitionRemoveMutation + * @summary ChargeItemDefinitionRemove mutation. + */ +module.exports.ChargeItemDefinitionRemoveMutation = { + description: 'Remove a ChargeItemDefinition record', + resolve: scopeInvariant(scopeOptions, removeChargeItemDefinition), + type: ChargeItemDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/chargeitemdefinition/query.js b/src/resources/4_0_0/profiles/chargeitemdefinition/query.js new file mode 100644 index 00000000..8ddb2081 --- /dev/null +++ b/src/resources/4_0_0/profiles/chargeitemdefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ChargeItemDefinitionSchema = require('../../schemas/chargeitemdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ChargeItemDefinitionArgs = require('../../parameters/chargeitemdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ChargeItemDefinitionArgs, +); + +// Resolvers +const { + getChargeItemDefinition, + getChargeItemDefinitionList, + getChargeItemDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ChargeItemDefinition', + action: 'read', +}; + +/** + * @name exports.ChargeItemDefinitionQuery + * @summary ChargeItemDefinition query. + */ +module.exports.ChargeItemDefinitionQuery = { + description: 'Query for a single ChargeItemDefinition', + resolve: scopeInvariant(scopeOptions, getChargeItemDefinition), + type: ChargeItemDefinitionSchema, + args: args, +}; + +/** + * @name exports.ChargeItemDefinitionListQuery + * @summary ChargeItemDefinition query. + */ +module.exports.ChargeItemDefinitionListQuery = { + description: 'Query for a more than or just one ChargeItemDefinition', + resolve: scopeInvariant(scopeOptions, getChargeItemDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ChargeItemDefinitionInstanceQuery + * @summary ChargeItemDefinition query. + */ +module.exports.ChargeItemDefinitionInstanceQuery = { + description: 'Access information about a single ChargeItemDefinition', + resolve: scopeInvariant(scopeOptions, getChargeItemDefinitionInstance), + type: ChargeItemDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/chargeitemdefinition/register.js b/src/resources/4_0_0/profiles/chargeitemdefinition/register.js new file mode 100644 index 00000000..c2d1aba1 --- /dev/null +++ b/src/resources/4_0_0/profiles/chargeitemdefinition/register.js @@ -0,0 +1,48 @@ +const { + ChargeItemDefinitionCreateMutation, + ChargeItemDefinitionUpdateMutation, + ChargeItemDefinitionRemoveMutation, +} = require('./mutation'); + +const { + ChargeItemDefinitionQuery, + ChargeItemDefinitionListQuery, + ChargeItemDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ChargeItemDefinition: ChargeItemDefinitionQuery, + ChargeItemDefinitionList: ChargeItemDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ChargeItemDefinitionCreate: ChargeItemDefinitionCreateMutation, + ChargeItemDefinitionUpdate: ChargeItemDefinitionUpdateMutation, + ChargeItemDefinitionRemove: ChargeItemDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ChargeItemDefinition', + path: '/4_0_0/ChargeItemDefinition/:id', + query: ChargeItemDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/chargeitemdefinition/resolver.js b/src/resources/4_0_0/profiles/chargeitemdefinition/resolver.js new file mode 100644 index 00000000..74d1f05a --- /dev/null +++ b/src/resources/4_0_0/profiles/chargeitemdefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getChargeItemDefinition + * @static + * @summary ChargeItemDefinition resolver. + */ +module.exports.getChargeItemDefinition = function getChargeItemDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getChargeItemDefinitionList + * @static + * @summary ChargeItemDefinition list resolver. + */ +module.exports.getChargeItemDefinitionList = function getChargeItemDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getChargeItemDefinitionInstance + * @static + * @summary ChargeItemDefinition instance resolver. + */ +module.exports.getChargeItemDefinitionInstance = function getChargeItemDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createChargeItemDefinition + * @static + * @summary Create ChargeItemDefinition resolver. + */ +module.exports.createChargeItemDefinition = function createChargeItemDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateChargeItemDefinition + * @static + * @summary Update ChargeItemDefinition resolver. + */ +module.exports.updateChargeItemDefinition = function updateChargeItemDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeChargeItemDefinition + * @static + * @summary Remove ChargeItemDefinition resolver. + */ +module.exports.removeChargeItemDefinition = function removeChargeItemDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/claim/mutation.js b/src/resources/4_0_0/profiles/claim/mutation.js new file mode 100644 index 00000000..e495ac5d --- /dev/null +++ b/src/resources/4_0_0/profiles/claim/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const ClaimSchema = require('../../schemas/claim.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ClaimInput = require('../../inputs/claim.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createClaim, updateClaim, removeClaim } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Claim', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Claim record.', + }, + resource: { + type: new GraphQLNonNull(ClaimInput), + description: 'Claim Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a Claim record for deletion.', + }, +}; + +/** + * @name exports.ClaimCreateMutation + * @summary ClaimCreate mutation. + */ +module.exports.ClaimCreateMutation = { + description: 'Create a Claim record', + resolve: scopeInvariant(scopeOptions, createClaim), + type: ClaimSchema, + args: WriteArgs, +}; + +/** + * @name exports.ClaimUpdateMutation + * @summary ClaimUpdate mutation. + */ +module.exports.ClaimUpdateMutation = { + description: 'Update a Claim record', + resolve: scopeInvariant(scopeOptions, updateClaim), + type: ClaimSchema, + args: WriteArgs, +}; + +/** + * @name exports.ClaimRemoveMutation + * @summary ClaimRemove mutation. + */ +module.exports.ClaimRemoveMutation = { + description: 'Remove a Claim record', + resolve: scopeInvariant(scopeOptions, removeClaim), + type: ClaimSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/claim/query.js b/src/resources/4_0_0/profiles/claim/query.js new file mode 100644 index 00000000..50428b4d --- /dev/null +++ b/src/resources/4_0_0/profiles/claim/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClaimSchema = require('../../schemas/claim.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ClaimArgs = require('../../parameters/claim.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ClaimArgs); + +// Resolvers +const { getClaim, getClaimList, getClaimInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Claim', + action: 'read', +}; + +/** + * @name exports.ClaimQuery + * @summary Claim query. + */ +module.exports.ClaimQuery = { + description: 'Query for a single Claim', + resolve: scopeInvariant(scopeOptions, getClaim), + type: ClaimSchema, + args: args, +}; + +/** + * @name exports.ClaimListQuery + * @summary Claim query. + */ +module.exports.ClaimListQuery = { + description: 'Query for a more than or just one Claim', + resolve: scopeInvariant(scopeOptions, getClaimList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ClaimInstanceQuery + * @summary Claim query. + */ +module.exports.ClaimInstanceQuery = { + description: 'Access information about a single Claim', + resolve: scopeInvariant(scopeOptions, getClaimInstance), + type: ClaimSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/claim/register.js b/src/resources/4_0_0/profiles/claim/register.js new file mode 100644 index 00000000..c8e1e337 --- /dev/null +++ b/src/resources/4_0_0/profiles/claim/register.js @@ -0,0 +1,44 @@ +const { + ClaimCreateMutation, + ClaimUpdateMutation, + ClaimRemoveMutation, +} = require('./mutation'); + +const { ClaimQuery, ClaimListQuery, ClaimInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Claim: ClaimQuery, + ClaimList: ClaimListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ClaimCreate: ClaimCreateMutation, + ClaimUpdate: ClaimUpdateMutation, + ClaimRemove: ClaimRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Claim', + path: '/4_0_0/Claim/:id', + query: ClaimInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/claim/resolver.js b/src/resources/4_0_0/profiles/claim/resolver.js new file mode 100644 index 00000000..77268987 --- /dev/null +++ b/src/resources/4_0_0/profiles/claim/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getClaim + * @static + * @summary Claim resolver. + */ +module.exports.getClaim = function getClaim(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getClaimList + * @static + * @summary Claim list resolver. + */ +module.exports.getClaimList = function getClaimList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getClaimInstance + * @static + * @summary Claim instance resolver. + */ +module.exports.getClaimInstance = function getClaimInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createClaim + * @static + * @summary Create Claim resolver. + */ +module.exports.createClaim = function createClaim( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateClaim + * @static + * @summary Update Claim resolver. + */ +module.exports.updateClaim = function updateClaim( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeClaim + * @static + * @summary Remove Claim resolver. + */ +module.exports.removeClaim = function removeClaim( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/claimresponse/mutation.js b/src/resources/4_0_0/profiles/claimresponse/mutation.js new file mode 100644 index 00000000..6edd9a7e --- /dev/null +++ b/src/resources/4_0_0/profiles/claimresponse/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ClaimResponseSchema = require('../../schemas/claimresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ClaimResponseInput = require('../../inputs/claimresponse.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createClaimResponse, + updateClaimResponse, + removeClaimResponse, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ClaimResponse', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ClaimResponse record.', + }, + resource: { + type: new GraphQLNonNull(ClaimResponseInput), + description: 'ClaimResponse Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ClaimResponse record for deletion.', + }, +}; + +/** + * @name exports.ClaimResponseCreateMutation + * @summary ClaimResponseCreate mutation. + */ +module.exports.ClaimResponseCreateMutation = { + description: 'Create a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, createClaimResponse), + type: ClaimResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.ClaimResponseUpdateMutation + * @summary ClaimResponseUpdate mutation. + */ +module.exports.ClaimResponseUpdateMutation = { + description: 'Update a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, updateClaimResponse), + type: ClaimResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.ClaimResponseRemoveMutation + * @summary ClaimResponseRemove mutation. + */ +module.exports.ClaimResponseRemoveMutation = { + description: 'Remove a ClaimResponse record', + resolve: scopeInvariant(scopeOptions, removeClaimResponse), + type: ClaimResponseSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/claimresponse/query.js b/src/resources/4_0_0/profiles/claimresponse/query.js new file mode 100644 index 00000000..46aad672 --- /dev/null +++ b/src/resources/4_0_0/profiles/claimresponse/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClaimResponseSchema = require('../../schemas/claimresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ClaimResponseArgs = require('../../parameters/claimresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ClaimResponseArgs, +); + +// Resolvers +const { + getClaimResponse, + getClaimResponseList, + getClaimResponseInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ClaimResponse', + action: 'read', +}; + +/** + * @name exports.ClaimResponseQuery + * @summary ClaimResponse query. + */ +module.exports.ClaimResponseQuery = { + description: 'Query for a single ClaimResponse', + resolve: scopeInvariant(scopeOptions, getClaimResponse), + type: ClaimResponseSchema, + args: args, +}; + +/** + * @name exports.ClaimResponseListQuery + * @summary ClaimResponse query. + */ +module.exports.ClaimResponseListQuery = { + description: 'Query for a more than or just one ClaimResponse', + resolve: scopeInvariant(scopeOptions, getClaimResponseList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ClaimResponseInstanceQuery + * @summary ClaimResponse query. + */ +module.exports.ClaimResponseInstanceQuery = { + description: 'Access information about a single ClaimResponse', + resolve: scopeInvariant(scopeOptions, getClaimResponseInstance), + type: ClaimResponseSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/claimresponse/register.js b/src/resources/4_0_0/profiles/claimresponse/register.js new file mode 100644 index 00000000..156d774c --- /dev/null +++ b/src/resources/4_0_0/profiles/claimresponse/register.js @@ -0,0 +1,48 @@ +const { + ClaimResponseCreateMutation, + ClaimResponseUpdateMutation, + ClaimResponseRemoveMutation, +} = require('./mutation'); + +const { + ClaimResponseQuery, + ClaimResponseListQuery, + ClaimResponseInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ClaimResponse: ClaimResponseQuery, + ClaimResponseList: ClaimResponseListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ClaimResponseCreate: ClaimResponseCreateMutation, + ClaimResponseUpdate: ClaimResponseUpdateMutation, + ClaimResponseRemove: ClaimResponseRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ClaimResponse', + path: '/4_0_0/ClaimResponse/:id', + query: ClaimResponseInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/claimresponse/resolver.js b/src/resources/4_0_0/profiles/claimresponse/resolver.js new file mode 100644 index 00000000..36363bfd --- /dev/null +++ b/src/resources/4_0_0/profiles/claimresponse/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getClaimResponse + * @static + * @summary ClaimResponse resolver. + */ +module.exports.getClaimResponse = function getClaimResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getClaimResponseList + * @static + * @summary ClaimResponse list resolver. + */ +module.exports.getClaimResponseList = function getClaimResponseList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getClaimResponseInstance + * @static + * @summary ClaimResponse instance resolver. + */ +module.exports.getClaimResponseInstance = function getClaimResponseInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createClaimResponse + * @static + * @summary Create ClaimResponse resolver. + */ +module.exports.createClaimResponse = function createClaimResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateClaimResponse + * @static + * @summary Update ClaimResponse resolver. + */ +module.exports.updateClaimResponse = function updateClaimResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeClaimResponse + * @static + * @summary Remove ClaimResponse resolver. + */ +module.exports.removeClaimResponse = function removeClaimResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/clinicalimpression/mutation.js b/src/resources/4_0_0/profiles/clinicalimpression/mutation.js new file mode 100644 index 00000000..fab28e20 --- /dev/null +++ b/src/resources/4_0_0/profiles/clinicalimpression/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ClinicalImpressionInput = require('../../inputs/clinicalimpression.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createClinicalImpression, + updateClinicalImpression, + removeClinicalImpression, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ClinicalImpression', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ClinicalImpression record.', + }, + resource: { + type: new GraphQLNonNull(ClinicalImpressionInput), + description: 'ClinicalImpression Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ClinicalImpression record for deletion.', + }, +}; + +/** + * @name exports.ClinicalImpressionCreateMutation + * @summary ClinicalImpressionCreate mutation. + */ +module.exports.ClinicalImpressionCreateMutation = { + description: 'Create a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, createClinicalImpression), + type: ClinicalImpressionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ClinicalImpressionUpdateMutation + * @summary ClinicalImpressionUpdate mutation. + */ +module.exports.ClinicalImpressionUpdateMutation = { + description: 'Update a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, updateClinicalImpression), + type: ClinicalImpressionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ClinicalImpressionRemoveMutation + * @summary ClinicalImpressionRemove mutation. + */ +module.exports.ClinicalImpressionRemoveMutation = { + description: 'Remove a ClinicalImpression record', + resolve: scopeInvariant(scopeOptions, removeClinicalImpression), + type: ClinicalImpressionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/clinicalimpression/query.js b/src/resources/4_0_0/profiles/clinicalimpression/query.js new file mode 100644 index 00000000..569b6644 --- /dev/null +++ b/src/resources/4_0_0/profiles/clinicalimpression/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ClinicalImpressionSchema = require('../../schemas/clinicalimpression.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ClinicalImpressionArgs = require('../../parameters/clinicalimpression.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ClinicalImpressionArgs, +); + +// Resolvers +const { + getClinicalImpression, + getClinicalImpressionList, + getClinicalImpressionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ClinicalImpression', + action: 'read', +}; + +/** + * @name exports.ClinicalImpressionQuery + * @summary ClinicalImpression query. + */ +module.exports.ClinicalImpressionQuery = { + description: 'Query for a single ClinicalImpression', + resolve: scopeInvariant(scopeOptions, getClinicalImpression), + type: ClinicalImpressionSchema, + args: args, +}; + +/** + * @name exports.ClinicalImpressionListQuery + * @summary ClinicalImpression query. + */ +module.exports.ClinicalImpressionListQuery = { + description: 'Query for a more than or just one ClinicalImpression', + resolve: scopeInvariant(scopeOptions, getClinicalImpressionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ClinicalImpressionInstanceQuery + * @summary ClinicalImpression query. + */ +module.exports.ClinicalImpressionInstanceQuery = { + description: 'Access information about a single ClinicalImpression', + resolve: scopeInvariant(scopeOptions, getClinicalImpressionInstance), + type: ClinicalImpressionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/clinicalimpression/register.js b/src/resources/4_0_0/profiles/clinicalimpression/register.js new file mode 100644 index 00000000..6ad770f1 --- /dev/null +++ b/src/resources/4_0_0/profiles/clinicalimpression/register.js @@ -0,0 +1,48 @@ +const { + ClinicalImpressionCreateMutation, + ClinicalImpressionUpdateMutation, + ClinicalImpressionRemoveMutation, +} = require('./mutation'); + +const { + ClinicalImpressionQuery, + ClinicalImpressionListQuery, + ClinicalImpressionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ClinicalImpression: ClinicalImpressionQuery, + ClinicalImpressionList: ClinicalImpressionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ClinicalImpressionCreate: ClinicalImpressionCreateMutation, + ClinicalImpressionUpdate: ClinicalImpressionUpdateMutation, + ClinicalImpressionRemove: ClinicalImpressionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ClinicalImpression', + path: '/4_0_0/ClinicalImpression/:id', + query: ClinicalImpressionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/clinicalimpression/resolver.js b/src/resources/4_0_0/profiles/clinicalimpression/resolver.js new file mode 100644 index 00000000..b1d7766a --- /dev/null +++ b/src/resources/4_0_0/profiles/clinicalimpression/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getClinicalImpression + * @static + * @summary ClinicalImpression resolver. + */ +module.exports.getClinicalImpression = function getClinicalImpression( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getClinicalImpressionList + * @static + * @summary ClinicalImpression list resolver. + */ +module.exports.getClinicalImpressionList = function getClinicalImpressionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getClinicalImpressionInstance + * @static + * @summary ClinicalImpression instance resolver. + */ +module.exports.getClinicalImpressionInstance = function getClinicalImpressionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createClinicalImpression + * @static + * @summary Create ClinicalImpression resolver. + */ +module.exports.createClinicalImpression = function createClinicalImpression( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateClinicalImpression + * @static + * @summary Update ClinicalImpression resolver. + */ +module.exports.updateClinicalImpression = function updateClinicalImpression( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeClinicalImpression + * @static + * @summary Remove ClinicalImpression resolver. + */ +module.exports.removeClinicalImpression = function removeClinicalImpression( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/codesystem/mutation.js b/src/resources/4_0_0/profiles/codesystem/mutation.js new file mode 100644 index 00000000..e7806905 --- /dev/null +++ b/src/resources/4_0_0/profiles/codesystem/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const CodeSystemSchema = require('../../schemas/codesystem.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CodeSystemInput = require('../../inputs/codesystem.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCodeSystem, + updateCodeSystem, + removeCodeSystem, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CodeSystem', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a CodeSystem record.', + }, + resource: { + type: new GraphQLNonNull(CodeSystemInput), + description: 'CodeSystem Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a CodeSystem record for deletion.', + }, +}; + +/** + * @name exports.CodeSystemCreateMutation + * @summary CodeSystemCreate mutation. + */ +module.exports.CodeSystemCreateMutation = { + description: 'Create a CodeSystem record', + resolve: scopeInvariant(scopeOptions, createCodeSystem), + type: CodeSystemSchema, + args: WriteArgs, +}; + +/** + * @name exports.CodeSystemUpdateMutation + * @summary CodeSystemUpdate mutation. + */ +module.exports.CodeSystemUpdateMutation = { + description: 'Update a CodeSystem record', + resolve: scopeInvariant(scopeOptions, updateCodeSystem), + type: CodeSystemSchema, + args: WriteArgs, +}; + +/** + * @name exports.CodeSystemRemoveMutation + * @summary CodeSystemRemove mutation. + */ +module.exports.CodeSystemRemoveMutation = { + description: 'Remove a CodeSystem record', + resolve: scopeInvariant(scopeOptions, removeCodeSystem), + type: CodeSystemSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/codesystem/query.js b/src/resources/4_0_0/profiles/codesystem/query.js new file mode 100644 index 00000000..ffd0c9ea --- /dev/null +++ b/src/resources/4_0_0/profiles/codesystem/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CodeSystemSchema = require('../../schemas/codesystem.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CodeSystemArgs = require('../../parameters/codesystem.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CodeSystemArgs); + +// Resolvers +const { + getCodeSystem, + getCodeSystemList, + getCodeSystemInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CodeSystem', + action: 'read', +}; + +/** + * @name exports.CodeSystemQuery + * @summary CodeSystem query. + */ +module.exports.CodeSystemQuery = { + description: 'Query for a single CodeSystem', + resolve: scopeInvariant(scopeOptions, getCodeSystem), + type: CodeSystemSchema, + args: args, +}; + +/** + * @name exports.CodeSystemListQuery + * @summary CodeSystem query. + */ +module.exports.CodeSystemListQuery = { + description: 'Query for a more than or just one CodeSystem', + resolve: scopeInvariant(scopeOptions, getCodeSystemList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CodeSystemInstanceQuery + * @summary CodeSystem query. + */ +module.exports.CodeSystemInstanceQuery = { + description: 'Access information about a single CodeSystem', + resolve: scopeInvariant(scopeOptions, getCodeSystemInstance), + type: CodeSystemSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/codesystem/register.js b/src/resources/4_0_0/profiles/codesystem/register.js new file mode 100644 index 00000000..64d49e19 --- /dev/null +++ b/src/resources/4_0_0/profiles/codesystem/register.js @@ -0,0 +1,48 @@ +const { + CodeSystemCreateMutation, + CodeSystemUpdateMutation, + CodeSystemRemoveMutation, +} = require('./mutation'); + +const { + CodeSystemQuery, + CodeSystemListQuery, + CodeSystemInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + CodeSystem: CodeSystemQuery, + CodeSystemList: CodeSystemListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CodeSystemCreate: CodeSystemCreateMutation, + CodeSystemUpdate: CodeSystemUpdateMutation, + CodeSystemRemove: CodeSystemRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'CodeSystem', + path: '/4_0_0/CodeSystem/:id', + query: CodeSystemInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/codesystem/resolver.js b/src/resources/4_0_0/profiles/codesystem/resolver.js new file mode 100644 index 00000000..8c32c1dd --- /dev/null +++ b/src/resources/4_0_0/profiles/codesystem/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCodeSystem + * @static + * @summary CodeSystem resolver. + */ +module.exports.getCodeSystem = function getCodeSystem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCodeSystemList + * @static + * @summary CodeSystem list resolver. + */ +module.exports.getCodeSystemList = function getCodeSystemList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCodeSystemInstance + * @static + * @summary CodeSystem instance resolver. + */ +module.exports.getCodeSystemInstance = function getCodeSystemInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCodeSystem + * @static + * @summary Create CodeSystem resolver. + */ +module.exports.createCodeSystem = function createCodeSystem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCodeSystem + * @static + * @summary Update CodeSystem resolver. + */ +module.exports.updateCodeSystem = function updateCodeSystem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCodeSystem + * @static + * @summary Remove CodeSystem resolver. + */ +module.exports.removeCodeSystem = function removeCodeSystem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/communication/mutation.js b/src/resources/4_0_0/profiles/communication/mutation.js new file mode 100644 index 00000000..79e1b5b2 --- /dev/null +++ b/src/resources/4_0_0/profiles/communication/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const CommunicationSchema = require('../../schemas/communication.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CommunicationInput = require('../../inputs/communication.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCommunication, + updateCommunication, + removeCommunication, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Communication', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Communication record.', + }, + resource: { + type: new GraphQLNonNull(CommunicationInput), + description: 'Communication Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Communication record for deletion.', + }, +}; + +/** + * @name exports.CommunicationCreateMutation + * @summary CommunicationCreate mutation. + */ +module.exports.CommunicationCreateMutation = { + description: 'Create a Communication record', + resolve: scopeInvariant(scopeOptions, createCommunication), + type: CommunicationSchema, + args: WriteArgs, +}; + +/** + * @name exports.CommunicationUpdateMutation + * @summary CommunicationUpdate mutation. + */ +module.exports.CommunicationUpdateMutation = { + description: 'Update a Communication record', + resolve: scopeInvariant(scopeOptions, updateCommunication), + type: CommunicationSchema, + args: WriteArgs, +}; + +/** + * @name exports.CommunicationRemoveMutation + * @summary CommunicationRemove mutation. + */ +module.exports.CommunicationRemoveMutation = { + description: 'Remove a Communication record', + resolve: scopeInvariant(scopeOptions, removeCommunication), + type: CommunicationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/communication/query.js b/src/resources/4_0_0/profiles/communication/query.js new file mode 100644 index 00000000..88f53a69 --- /dev/null +++ b/src/resources/4_0_0/profiles/communication/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CommunicationSchema = require('../../schemas/communication.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CommunicationArgs = require('../../parameters/communication.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CommunicationArgs, +); + +// Resolvers +const { + getCommunication, + getCommunicationList, + getCommunicationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Communication', + action: 'read', +}; + +/** + * @name exports.CommunicationQuery + * @summary Communication query. + */ +module.exports.CommunicationQuery = { + description: 'Query for a single Communication', + resolve: scopeInvariant(scopeOptions, getCommunication), + type: CommunicationSchema, + args: args, +}; + +/** + * @name exports.CommunicationListQuery + * @summary Communication query. + */ +module.exports.CommunicationListQuery = { + description: 'Query for a more than or just one Communication', + resolve: scopeInvariant(scopeOptions, getCommunicationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CommunicationInstanceQuery + * @summary Communication query. + */ +module.exports.CommunicationInstanceQuery = { + description: 'Access information about a single Communication', + resolve: scopeInvariant(scopeOptions, getCommunicationInstance), + type: CommunicationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/communication/register.js b/src/resources/4_0_0/profiles/communication/register.js new file mode 100644 index 00000000..14db339b --- /dev/null +++ b/src/resources/4_0_0/profiles/communication/register.js @@ -0,0 +1,48 @@ +const { + CommunicationCreateMutation, + CommunicationUpdateMutation, + CommunicationRemoveMutation, +} = require('./mutation'); + +const { + CommunicationQuery, + CommunicationListQuery, + CommunicationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Communication: CommunicationQuery, + CommunicationList: CommunicationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CommunicationCreate: CommunicationCreateMutation, + CommunicationUpdate: CommunicationUpdateMutation, + CommunicationRemove: CommunicationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Communication', + path: '/4_0_0/Communication/:id', + query: CommunicationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/communication/resolver.js b/src/resources/4_0_0/profiles/communication/resolver.js new file mode 100644 index 00000000..6d7bc94b --- /dev/null +++ b/src/resources/4_0_0/profiles/communication/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCommunication + * @static + * @summary Communication resolver. + */ +module.exports.getCommunication = function getCommunication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCommunicationList + * @static + * @summary Communication list resolver. + */ +module.exports.getCommunicationList = function getCommunicationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCommunicationInstance + * @static + * @summary Communication instance resolver. + */ +module.exports.getCommunicationInstance = function getCommunicationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCommunication + * @static + * @summary Create Communication resolver. + */ +module.exports.createCommunication = function createCommunication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCommunication + * @static + * @summary Update Communication resolver. + */ +module.exports.updateCommunication = function updateCommunication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCommunication + * @static + * @summary Remove Communication resolver. + */ +module.exports.removeCommunication = function removeCommunication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/communicationrequest/mutation.js b/src/resources/4_0_0/profiles/communicationrequest/mutation.js new file mode 100644 index 00000000..bcc2cb3c --- /dev/null +++ b/src/resources/4_0_0/profiles/communicationrequest/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CommunicationRequestInput = require('../../inputs/communicationrequest.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCommunicationRequest, + updateCommunicationRequest, + removeCommunicationRequest, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CommunicationRequest', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a CommunicationRequest record.', + }, + resource: { + type: new GraphQLNonNull(CommunicationRequestInput), + description: 'CommunicationRequest Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a CommunicationRequest record for deletion.', + }, +}; + +/** + * @name exports.CommunicationRequestCreateMutation + * @summary CommunicationRequestCreate mutation. + */ +module.exports.CommunicationRequestCreateMutation = { + description: 'Create a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, createCommunicationRequest), + type: CommunicationRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.CommunicationRequestUpdateMutation + * @summary CommunicationRequestUpdate mutation. + */ +module.exports.CommunicationRequestUpdateMutation = { + description: 'Update a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, updateCommunicationRequest), + type: CommunicationRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.CommunicationRequestRemoveMutation + * @summary CommunicationRequestRemove mutation. + */ +module.exports.CommunicationRequestRemoveMutation = { + description: 'Remove a CommunicationRequest record', + resolve: scopeInvariant(scopeOptions, removeCommunicationRequest), + type: CommunicationRequestSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/communicationrequest/query.js b/src/resources/4_0_0/profiles/communicationrequest/query.js new file mode 100644 index 00000000..7a806eb3 --- /dev/null +++ b/src/resources/4_0_0/profiles/communicationrequest/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CommunicationRequestSchema = require('../../schemas/communicationrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CommunicationRequestArgs = require('../../parameters/communicationrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CommunicationRequestArgs, +); + +// Resolvers +const { + getCommunicationRequest, + getCommunicationRequestList, + getCommunicationRequestInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CommunicationRequest', + action: 'read', +}; + +/** + * @name exports.CommunicationRequestQuery + * @summary CommunicationRequest query. + */ +module.exports.CommunicationRequestQuery = { + description: 'Query for a single CommunicationRequest', + resolve: scopeInvariant(scopeOptions, getCommunicationRequest), + type: CommunicationRequestSchema, + args: args, +}; + +/** + * @name exports.CommunicationRequestListQuery + * @summary CommunicationRequest query. + */ +module.exports.CommunicationRequestListQuery = { + description: 'Query for a more than or just one CommunicationRequest', + resolve: scopeInvariant(scopeOptions, getCommunicationRequestList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CommunicationRequestInstanceQuery + * @summary CommunicationRequest query. + */ +module.exports.CommunicationRequestInstanceQuery = { + description: 'Access information about a single CommunicationRequest', + resolve: scopeInvariant(scopeOptions, getCommunicationRequestInstance), + type: CommunicationRequestSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/communicationrequest/register.js b/src/resources/4_0_0/profiles/communicationrequest/register.js new file mode 100644 index 00000000..099fe943 --- /dev/null +++ b/src/resources/4_0_0/profiles/communicationrequest/register.js @@ -0,0 +1,48 @@ +const { + CommunicationRequestCreateMutation, + CommunicationRequestUpdateMutation, + CommunicationRequestRemoveMutation, +} = require('./mutation'); + +const { + CommunicationRequestQuery, + CommunicationRequestListQuery, + CommunicationRequestInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + CommunicationRequest: CommunicationRequestQuery, + CommunicationRequestList: CommunicationRequestListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CommunicationRequestCreate: CommunicationRequestCreateMutation, + CommunicationRequestUpdate: CommunicationRequestUpdateMutation, + CommunicationRequestRemove: CommunicationRequestRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'CommunicationRequest', + path: '/4_0_0/CommunicationRequest/:id', + query: CommunicationRequestInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/communicationrequest/resolver.js b/src/resources/4_0_0/profiles/communicationrequest/resolver.js new file mode 100644 index 00000000..1d68cd3c --- /dev/null +++ b/src/resources/4_0_0/profiles/communicationrequest/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCommunicationRequest + * @static + * @summary CommunicationRequest resolver. + */ +module.exports.getCommunicationRequest = function getCommunicationRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCommunicationRequestList + * @static + * @summary CommunicationRequest list resolver. + */ +module.exports.getCommunicationRequestList = function getCommunicationRequestList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCommunicationRequestInstance + * @static + * @summary CommunicationRequest instance resolver. + */ +module.exports.getCommunicationRequestInstance = function getCommunicationRequestInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCommunicationRequest + * @static + * @summary Create CommunicationRequest resolver. + */ +module.exports.createCommunicationRequest = function createCommunicationRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCommunicationRequest + * @static + * @summary Update CommunicationRequest resolver. + */ +module.exports.updateCommunicationRequest = function updateCommunicationRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCommunicationRequest + * @static + * @summary Remove CommunicationRequest resolver. + */ +module.exports.removeCommunicationRequest = function removeCommunicationRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/compartmentdefinition/mutation.js b/src/resources/4_0_0/profiles/compartmentdefinition/mutation.js new file mode 100644 index 00000000..9ed764b8 --- /dev/null +++ b/src/resources/4_0_0/profiles/compartmentdefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const CompartmentDefinitionSchema = require('../../schemas/compartmentdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CompartmentDefinitionInput = require('../../inputs/compartmentdefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCompartmentDefinition, + updateCompartmentDefinition, + removeCompartmentDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CompartmentDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a CompartmentDefinition record.', + }, + resource: { + type: new GraphQLNonNull(CompartmentDefinitionInput), + description: 'CompartmentDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a CompartmentDefinition record for deletion.', + }, +}; + +/** + * @name exports.CompartmentDefinitionCreateMutation + * @summary CompartmentDefinitionCreate mutation. + */ +module.exports.CompartmentDefinitionCreateMutation = { + description: 'Create a CompartmentDefinition record', + resolve: scopeInvariant(scopeOptions, createCompartmentDefinition), + type: CompartmentDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.CompartmentDefinitionUpdateMutation + * @summary CompartmentDefinitionUpdate mutation. + */ +module.exports.CompartmentDefinitionUpdateMutation = { + description: 'Update a CompartmentDefinition record', + resolve: scopeInvariant(scopeOptions, updateCompartmentDefinition), + type: CompartmentDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.CompartmentDefinitionRemoveMutation + * @summary CompartmentDefinitionRemove mutation. + */ +module.exports.CompartmentDefinitionRemoveMutation = { + description: 'Remove a CompartmentDefinition record', + resolve: scopeInvariant(scopeOptions, removeCompartmentDefinition), + type: CompartmentDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/compartmentdefinition/query.js b/src/resources/4_0_0/profiles/compartmentdefinition/query.js new file mode 100644 index 00000000..b8d5c733 --- /dev/null +++ b/src/resources/4_0_0/profiles/compartmentdefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CompartmentDefinitionSchema = require('../../schemas/compartmentdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CompartmentDefinitionArgs = require('../../parameters/compartmentdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CompartmentDefinitionArgs, +); + +// Resolvers +const { + getCompartmentDefinition, + getCompartmentDefinitionList, + getCompartmentDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CompartmentDefinition', + action: 'read', +}; + +/** + * @name exports.CompartmentDefinitionQuery + * @summary CompartmentDefinition query. + */ +module.exports.CompartmentDefinitionQuery = { + description: 'Query for a single CompartmentDefinition', + resolve: scopeInvariant(scopeOptions, getCompartmentDefinition), + type: CompartmentDefinitionSchema, + args: args, +}; + +/** + * @name exports.CompartmentDefinitionListQuery + * @summary CompartmentDefinition query. + */ +module.exports.CompartmentDefinitionListQuery = { + description: 'Query for a more than or just one CompartmentDefinition', + resolve: scopeInvariant(scopeOptions, getCompartmentDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CompartmentDefinitionInstanceQuery + * @summary CompartmentDefinition query. + */ +module.exports.CompartmentDefinitionInstanceQuery = { + description: 'Access information about a single CompartmentDefinition', + resolve: scopeInvariant(scopeOptions, getCompartmentDefinitionInstance), + type: CompartmentDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/compartmentdefinition/register.js b/src/resources/4_0_0/profiles/compartmentdefinition/register.js new file mode 100644 index 00000000..13957520 --- /dev/null +++ b/src/resources/4_0_0/profiles/compartmentdefinition/register.js @@ -0,0 +1,48 @@ +const { + CompartmentDefinitionCreateMutation, + CompartmentDefinitionUpdateMutation, + CompartmentDefinitionRemoveMutation, +} = require('./mutation'); + +const { + CompartmentDefinitionQuery, + CompartmentDefinitionListQuery, + CompartmentDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + CompartmentDefinition: CompartmentDefinitionQuery, + CompartmentDefinitionList: CompartmentDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CompartmentDefinitionCreate: CompartmentDefinitionCreateMutation, + CompartmentDefinitionUpdate: CompartmentDefinitionUpdateMutation, + CompartmentDefinitionRemove: CompartmentDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'CompartmentDefinition', + path: '/4_0_0/CompartmentDefinition/:id', + query: CompartmentDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/compartmentdefinition/resolver.js b/src/resources/4_0_0/profiles/compartmentdefinition/resolver.js new file mode 100644 index 00000000..0df90044 --- /dev/null +++ b/src/resources/4_0_0/profiles/compartmentdefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCompartmentDefinition + * @static + * @summary CompartmentDefinition resolver. + */ +module.exports.getCompartmentDefinition = function getCompartmentDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCompartmentDefinitionList + * @static + * @summary CompartmentDefinition list resolver. + */ +module.exports.getCompartmentDefinitionList = function getCompartmentDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCompartmentDefinitionInstance + * @static + * @summary CompartmentDefinition instance resolver. + */ +module.exports.getCompartmentDefinitionInstance = function getCompartmentDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCompartmentDefinition + * @static + * @summary Create CompartmentDefinition resolver. + */ +module.exports.createCompartmentDefinition = function createCompartmentDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCompartmentDefinition + * @static + * @summary Update CompartmentDefinition resolver. + */ +module.exports.updateCompartmentDefinition = function updateCompartmentDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCompartmentDefinition + * @static + * @summary Remove CompartmentDefinition resolver. + */ +module.exports.removeCompartmentDefinition = function removeCompartmentDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/composition/mutation.js b/src/resources/4_0_0/profiles/composition/mutation.js new file mode 100644 index 00000000..b43974c2 --- /dev/null +++ b/src/resources/4_0_0/profiles/composition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const CompositionSchema = require('../../schemas/composition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CompositionInput = require('../../inputs/composition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createComposition, + updateComposition, + removeComposition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Composition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Composition record.', + }, + resource: { + type: new GraphQLNonNull(CompositionInput), + description: 'Composition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Composition record for deletion.', + }, +}; + +/** + * @name exports.CompositionCreateMutation + * @summary CompositionCreate mutation. + */ +module.exports.CompositionCreateMutation = { + description: 'Create a Composition record', + resolve: scopeInvariant(scopeOptions, createComposition), + type: CompositionSchema, + args: WriteArgs, +}; + +/** + * @name exports.CompositionUpdateMutation + * @summary CompositionUpdate mutation. + */ +module.exports.CompositionUpdateMutation = { + description: 'Update a Composition record', + resolve: scopeInvariant(scopeOptions, updateComposition), + type: CompositionSchema, + args: WriteArgs, +}; + +/** + * @name exports.CompositionRemoveMutation + * @summary CompositionRemove mutation. + */ +module.exports.CompositionRemoveMutation = { + description: 'Remove a Composition record', + resolve: scopeInvariant(scopeOptions, removeComposition), + type: CompositionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/composition/query.js b/src/resources/4_0_0/profiles/composition/query.js new file mode 100644 index 00000000..698af3db --- /dev/null +++ b/src/resources/4_0_0/profiles/composition/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CompositionSchema = require('../../schemas/composition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CompositionArgs = require('../../parameters/composition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CompositionArgs); + +// Resolvers +const { + getComposition, + getCompositionList, + getCompositionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Composition', + action: 'read', +}; + +/** + * @name exports.CompositionQuery + * @summary Composition query. + */ +module.exports.CompositionQuery = { + description: 'Query for a single Composition', + resolve: scopeInvariant(scopeOptions, getComposition), + type: CompositionSchema, + args: args, +}; + +/** + * @name exports.CompositionListQuery + * @summary Composition query. + */ +module.exports.CompositionListQuery = { + description: 'Query for a more than or just one Composition', + resolve: scopeInvariant(scopeOptions, getCompositionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CompositionInstanceQuery + * @summary Composition query. + */ +module.exports.CompositionInstanceQuery = { + description: 'Access information about a single Composition', + resolve: scopeInvariant(scopeOptions, getCompositionInstance), + type: CompositionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/composition/register.js b/src/resources/4_0_0/profiles/composition/register.js new file mode 100644 index 00000000..8a450f75 --- /dev/null +++ b/src/resources/4_0_0/profiles/composition/register.js @@ -0,0 +1,48 @@ +const { + CompositionCreateMutation, + CompositionUpdateMutation, + CompositionRemoveMutation, +} = require('./mutation'); + +const { + CompositionQuery, + CompositionListQuery, + CompositionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Composition: CompositionQuery, + CompositionList: CompositionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CompositionCreate: CompositionCreateMutation, + CompositionUpdate: CompositionUpdateMutation, + CompositionRemove: CompositionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Composition', + path: '/4_0_0/Composition/:id', + query: CompositionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/composition/resolver.js b/src/resources/4_0_0/profiles/composition/resolver.js new file mode 100644 index 00000000..7b810f94 --- /dev/null +++ b/src/resources/4_0_0/profiles/composition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getComposition + * @static + * @summary Composition resolver. + */ +module.exports.getComposition = function getComposition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCompositionList + * @static + * @summary Composition list resolver. + */ +module.exports.getCompositionList = function getCompositionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCompositionInstance + * @static + * @summary Composition instance resolver. + */ +module.exports.getCompositionInstance = function getCompositionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createComposition + * @static + * @summary Create Composition resolver. + */ +module.exports.createComposition = function createComposition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateComposition + * @static + * @summary Update Composition resolver. + */ +module.exports.updateComposition = function updateComposition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeComposition + * @static + * @summary Remove Composition resolver. + */ +module.exports.removeComposition = function removeComposition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/conceptmap/mutation.js b/src/resources/4_0_0/profiles/conceptmap/mutation.js new file mode 100644 index 00000000..b2babe5e --- /dev/null +++ b/src/resources/4_0_0/profiles/conceptmap/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const ConceptMapSchema = require('../../schemas/conceptmap.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ConceptMapInput = require('../../inputs/conceptmap.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createConceptMap, + updateConceptMap, + removeConceptMap, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ConceptMap', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a ConceptMap record.', + }, + resource: { + type: new GraphQLNonNull(ConceptMapInput), + description: 'ConceptMap Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ConceptMap record for deletion.', + }, +}; + +/** + * @name exports.ConceptMapCreateMutation + * @summary ConceptMapCreate mutation. + */ +module.exports.ConceptMapCreateMutation = { + description: 'Create a ConceptMap record', + resolve: scopeInvariant(scopeOptions, createConceptMap), + type: ConceptMapSchema, + args: WriteArgs, +}; + +/** + * @name exports.ConceptMapUpdateMutation + * @summary ConceptMapUpdate mutation. + */ +module.exports.ConceptMapUpdateMutation = { + description: 'Update a ConceptMap record', + resolve: scopeInvariant(scopeOptions, updateConceptMap), + type: ConceptMapSchema, + args: WriteArgs, +}; + +/** + * @name exports.ConceptMapRemoveMutation + * @summary ConceptMapRemove mutation. + */ +module.exports.ConceptMapRemoveMutation = { + description: 'Remove a ConceptMap record', + resolve: scopeInvariant(scopeOptions, removeConceptMap), + type: ConceptMapSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/conceptmap/query.js b/src/resources/4_0_0/profiles/conceptmap/query.js new file mode 100644 index 00000000..f89dd02b --- /dev/null +++ b/src/resources/4_0_0/profiles/conceptmap/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConceptMapSchema = require('../../schemas/conceptmap.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ConceptMapArgs = require('../../parameters/conceptmap.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ConceptMapArgs); + +// Resolvers +const { + getConceptMap, + getConceptMapList, + getConceptMapInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ConceptMap', + action: 'read', +}; + +/** + * @name exports.ConceptMapQuery + * @summary ConceptMap query. + */ +module.exports.ConceptMapQuery = { + description: 'Query for a single ConceptMap', + resolve: scopeInvariant(scopeOptions, getConceptMap), + type: ConceptMapSchema, + args: args, +}; + +/** + * @name exports.ConceptMapListQuery + * @summary ConceptMap query. + */ +module.exports.ConceptMapListQuery = { + description: 'Query for a more than or just one ConceptMap', + resolve: scopeInvariant(scopeOptions, getConceptMapList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ConceptMapInstanceQuery + * @summary ConceptMap query. + */ +module.exports.ConceptMapInstanceQuery = { + description: 'Access information about a single ConceptMap', + resolve: scopeInvariant(scopeOptions, getConceptMapInstance), + type: ConceptMapSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/conceptmap/register.js b/src/resources/4_0_0/profiles/conceptmap/register.js new file mode 100644 index 00000000..a1a5a255 --- /dev/null +++ b/src/resources/4_0_0/profiles/conceptmap/register.js @@ -0,0 +1,48 @@ +const { + ConceptMapCreateMutation, + ConceptMapUpdateMutation, + ConceptMapRemoveMutation, +} = require('./mutation'); + +const { + ConceptMapQuery, + ConceptMapListQuery, + ConceptMapInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ConceptMap: ConceptMapQuery, + ConceptMapList: ConceptMapListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ConceptMapCreate: ConceptMapCreateMutation, + ConceptMapUpdate: ConceptMapUpdateMutation, + ConceptMapRemove: ConceptMapRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ConceptMap', + path: '/4_0_0/ConceptMap/:id', + query: ConceptMapInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/conceptmap/resolver.js b/src/resources/4_0_0/profiles/conceptmap/resolver.js new file mode 100644 index 00000000..df5d3b51 --- /dev/null +++ b/src/resources/4_0_0/profiles/conceptmap/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getConceptMap + * @static + * @summary ConceptMap resolver. + */ +module.exports.getConceptMap = function getConceptMap( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getConceptMapList + * @static + * @summary ConceptMap list resolver. + */ +module.exports.getConceptMapList = function getConceptMapList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getConceptMapInstance + * @static + * @summary ConceptMap instance resolver. + */ +module.exports.getConceptMapInstance = function getConceptMapInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createConceptMap + * @static + * @summary Create ConceptMap resolver. + */ +module.exports.createConceptMap = function createConceptMap( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateConceptMap + * @static + * @summary Update ConceptMap resolver. + */ +module.exports.updateConceptMap = function updateConceptMap( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeConceptMap + * @static + * @summary Remove ConceptMap resolver. + */ +module.exports.removeConceptMap = function removeConceptMap( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/condition/mutation.js b/src/resources/4_0_0/profiles/condition/mutation.js new file mode 100644 index 00000000..6c5e53da --- /dev/null +++ b/src/resources/4_0_0/profiles/condition/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const ConditionSchema = require('../../schemas/condition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ConditionInput = require('../../inputs/condition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCondition, + updateCondition, + removeCondition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Condition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Condition record.', + }, + resource: { + type: new GraphQLNonNull(ConditionInput), + description: 'Condition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Condition record for deletion.', + }, +}; + +/** + * @name exports.ConditionCreateMutation + * @summary ConditionCreate mutation. + */ +module.exports.ConditionCreateMutation = { + description: 'Create a Condition record', + resolve: scopeInvariant(scopeOptions, createCondition), + type: ConditionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ConditionUpdateMutation + * @summary ConditionUpdate mutation. + */ +module.exports.ConditionUpdateMutation = { + description: 'Update a Condition record', + resolve: scopeInvariant(scopeOptions, updateCondition), + type: ConditionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ConditionRemoveMutation + * @summary ConditionRemove mutation. + */ +module.exports.ConditionRemoveMutation = { + description: 'Remove a Condition record', + resolve: scopeInvariant(scopeOptions, removeCondition), + type: ConditionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/condition/query.js b/src/resources/4_0_0/profiles/condition/query.js new file mode 100644 index 00000000..294dd7e7 --- /dev/null +++ b/src/resources/4_0_0/profiles/condition/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConditionSchema = require('../../schemas/condition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ConditionArgs = require('../../parameters/condition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ConditionArgs); + +// Resolvers +const { + getCondition, + getConditionList, + getConditionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Condition', + action: 'read', +}; + +/** + * @name exports.ConditionQuery + * @summary Condition query. + */ +module.exports.ConditionQuery = { + description: 'Query for a single Condition', + resolve: scopeInvariant(scopeOptions, getCondition), + type: ConditionSchema, + args: args, +}; + +/** + * @name exports.ConditionListQuery + * @summary Condition query. + */ +module.exports.ConditionListQuery = { + description: 'Query for a more than or just one Condition', + resolve: scopeInvariant(scopeOptions, getConditionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ConditionInstanceQuery + * @summary Condition query. + */ +module.exports.ConditionInstanceQuery = { + description: 'Access information about a single Condition', + resolve: scopeInvariant(scopeOptions, getConditionInstance), + type: ConditionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/condition/register.js b/src/resources/4_0_0/profiles/condition/register.js new file mode 100644 index 00000000..20655316 --- /dev/null +++ b/src/resources/4_0_0/profiles/condition/register.js @@ -0,0 +1,48 @@ +const { + ConditionCreateMutation, + ConditionUpdateMutation, + ConditionRemoveMutation, +} = require('./mutation'); + +const { + ConditionQuery, + ConditionListQuery, + ConditionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Condition: ConditionQuery, + ConditionList: ConditionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ConditionCreate: ConditionCreateMutation, + ConditionUpdate: ConditionUpdateMutation, + ConditionRemove: ConditionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Condition', + path: '/4_0_0/Condition/:id', + query: ConditionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/condition/resolver.js b/src/resources/4_0_0/profiles/condition/resolver.js new file mode 100644 index 00000000..868361c3 --- /dev/null +++ b/src/resources/4_0_0/profiles/condition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCondition + * @static + * @summary Condition resolver. + */ +module.exports.getCondition = function getCondition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getConditionList + * @static + * @summary Condition list resolver. + */ +module.exports.getConditionList = function getConditionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getConditionInstance + * @static + * @summary Condition instance resolver. + */ +module.exports.getConditionInstance = function getConditionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCondition + * @static + * @summary Create Condition resolver. + */ +module.exports.createCondition = function createCondition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCondition + * @static + * @summary Update Condition resolver. + */ +module.exports.updateCondition = function updateCondition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCondition + * @static + * @summary Remove Condition resolver. + */ +module.exports.removeCondition = function removeCondition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/consent/mutation.js b/src/resources/4_0_0/profiles/consent/mutation.js new file mode 100644 index 00000000..253c84fc --- /dev/null +++ b/src/resources/4_0_0/profiles/consent/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const ConsentSchema = require('../../schemas/consent.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ConsentInput = require('../../inputs/consent.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createConsent, updateConsent, removeConsent } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Consent', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Consent record.', + }, + resource: { + type: new GraphQLNonNull(ConsentInput), + description: 'Consent Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Consent record for deletion.', + }, +}; + +/** + * @name exports.ConsentCreateMutation + * @summary ConsentCreate mutation. + */ +module.exports.ConsentCreateMutation = { + description: 'Create a Consent record', + resolve: scopeInvariant(scopeOptions, createConsent), + type: ConsentSchema, + args: WriteArgs, +}; + +/** + * @name exports.ConsentUpdateMutation + * @summary ConsentUpdate mutation. + */ +module.exports.ConsentUpdateMutation = { + description: 'Update a Consent record', + resolve: scopeInvariant(scopeOptions, updateConsent), + type: ConsentSchema, + args: WriteArgs, +}; + +/** + * @name exports.ConsentRemoveMutation + * @summary ConsentRemove mutation. + */ +module.exports.ConsentRemoveMutation = { + description: 'Remove a Consent record', + resolve: scopeInvariant(scopeOptions, removeConsent), + type: ConsentSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/consent/query.js b/src/resources/4_0_0/profiles/consent/query.js new file mode 100644 index 00000000..4bd8eeff --- /dev/null +++ b/src/resources/4_0_0/profiles/consent/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ConsentSchema = require('../../schemas/consent.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ConsentArgs = require('../../parameters/consent.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ConsentArgs); + +// Resolvers +const { + getConsent, + getConsentList, + getConsentInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Consent', + action: 'read', +}; + +/** + * @name exports.ConsentQuery + * @summary Consent query. + */ +module.exports.ConsentQuery = { + description: 'Query for a single Consent', + resolve: scopeInvariant(scopeOptions, getConsent), + type: ConsentSchema, + args: args, +}; + +/** + * @name exports.ConsentListQuery + * @summary Consent query. + */ +module.exports.ConsentListQuery = { + description: 'Query for a more than or just one Consent', + resolve: scopeInvariant(scopeOptions, getConsentList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ConsentInstanceQuery + * @summary Consent query. + */ +module.exports.ConsentInstanceQuery = { + description: 'Access information about a single Consent', + resolve: scopeInvariant(scopeOptions, getConsentInstance), + type: ConsentSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/consent/register.js b/src/resources/4_0_0/profiles/consent/register.js new file mode 100644 index 00000000..093e08b0 --- /dev/null +++ b/src/resources/4_0_0/profiles/consent/register.js @@ -0,0 +1,48 @@ +const { + ConsentCreateMutation, + ConsentUpdateMutation, + ConsentRemoveMutation, +} = require('./mutation'); + +const { + ConsentQuery, + ConsentListQuery, + ConsentInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Consent: ConsentQuery, + ConsentList: ConsentListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ConsentCreate: ConsentCreateMutation, + ConsentUpdate: ConsentUpdateMutation, + ConsentRemove: ConsentRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Consent', + path: '/4_0_0/Consent/:id', + query: ConsentInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/consent/resolver.js b/src/resources/4_0_0/profiles/consent/resolver.js new file mode 100644 index 00000000..391342a0 --- /dev/null +++ b/src/resources/4_0_0/profiles/consent/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getConsent + * @static + * @summary Consent resolver. + */ +module.exports.getConsent = function getConsent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getConsentList + * @static + * @summary Consent list resolver. + */ +module.exports.getConsentList = function getConsentList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getConsentInstance + * @static + * @summary Consent instance resolver. + */ +module.exports.getConsentInstance = function getConsentInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createConsent + * @static + * @summary Create Consent resolver. + */ +module.exports.createConsent = function createConsent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateConsent + * @static + * @summary Update Consent resolver. + */ +module.exports.updateConsent = function updateConsent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeConsent + * @static + * @summary Remove Consent resolver. + */ +module.exports.removeConsent = function removeConsent( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/contract/mutation.js b/src/resources/4_0_0/profiles/contract/mutation.js new file mode 100644 index 00000000..90e7e504 --- /dev/null +++ b/src/resources/4_0_0/profiles/contract/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const ContractSchema = require('../../schemas/contract.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ContractInput = require('../../inputs/contract.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createContract, + updateContract, + removeContract, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Contract', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Contract record.', + }, + resource: { + type: new GraphQLNonNull(ContractInput), + description: 'Contract Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Contract record for deletion.', + }, +}; + +/** + * @name exports.ContractCreateMutation + * @summary ContractCreate mutation. + */ +module.exports.ContractCreateMutation = { + description: 'Create a Contract record', + resolve: scopeInvariant(scopeOptions, createContract), + type: ContractSchema, + args: WriteArgs, +}; + +/** + * @name exports.ContractUpdateMutation + * @summary ContractUpdate mutation. + */ +module.exports.ContractUpdateMutation = { + description: 'Update a Contract record', + resolve: scopeInvariant(scopeOptions, updateContract), + type: ContractSchema, + args: WriteArgs, +}; + +/** + * @name exports.ContractRemoveMutation + * @summary ContractRemove mutation. + */ +module.exports.ContractRemoveMutation = { + description: 'Remove a Contract record', + resolve: scopeInvariant(scopeOptions, removeContract), + type: ContractSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/contract/query.js b/src/resources/4_0_0/profiles/contract/query.js new file mode 100644 index 00000000..525c659f --- /dev/null +++ b/src/resources/4_0_0/profiles/contract/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ContractSchema = require('../../schemas/contract.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ContractArgs = require('../../parameters/contract.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ContractArgs); + +// Resolvers +const { + getContract, + getContractList, + getContractInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Contract', + action: 'read', +}; + +/** + * @name exports.ContractQuery + * @summary Contract query. + */ +module.exports.ContractQuery = { + description: 'Query for a single Contract', + resolve: scopeInvariant(scopeOptions, getContract), + type: ContractSchema, + args: args, +}; + +/** + * @name exports.ContractListQuery + * @summary Contract query. + */ +module.exports.ContractListQuery = { + description: 'Query for a more than or just one Contract', + resolve: scopeInvariant(scopeOptions, getContractList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ContractInstanceQuery + * @summary Contract query. + */ +module.exports.ContractInstanceQuery = { + description: 'Access information about a single Contract', + resolve: scopeInvariant(scopeOptions, getContractInstance), + type: ContractSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/contract/register.js b/src/resources/4_0_0/profiles/contract/register.js new file mode 100644 index 00000000..1c97c8e2 --- /dev/null +++ b/src/resources/4_0_0/profiles/contract/register.js @@ -0,0 +1,48 @@ +const { + ContractCreateMutation, + ContractUpdateMutation, + ContractRemoveMutation, +} = require('./mutation'); + +const { + ContractQuery, + ContractListQuery, + ContractInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Contract: ContractQuery, + ContractList: ContractListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ContractCreate: ContractCreateMutation, + ContractUpdate: ContractUpdateMutation, + ContractRemove: ContractRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Contract', + path: '/4_0_0/Contract/:id', + query: ContractInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/contract/resolver.js b/src/resources/4_0_0/profiles/contract/resolver.js new file mode 100644 index 00000000..8c286140 --- /dev/null +++ b/src/resources/4_0_0/profiles/contract/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getContract + * @static + * @summary Contract resolver. + */ +module.exports.getContract = function getContract( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getContractList + * @static + * @summary Contract list resolver. + */ +module.exports.getContractList = function getContractList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getContractInstance + * @static + * @summary Contract instance resolver. + */ +module.exports.getContractInstance = function getContractInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createContract + * @static + * @summary Create Contract resolver. + */ +module.exports.createContract = function createContract( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateContract + * @static + * @summary Update Contract resolver. + */ +module.exports.updateContract = function updateContract( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeContract + * @static + * @summary Remove Contract resolver. + */ +module.exports.removeContract = function removeContract( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/coverage/mutation.js b/src/resources/4_0_0/profiles/coverage/mutation.js new file mode 100644 index 00000000..b303bb42 --- /dev/null +++ b/src/resources/4_0_0/profiles/coverage/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const CoverageSchema = require('../../schemas/coverage.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CoverageInput = require('../../inputs/coverage.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCoverage, + updateCoverage, + removeCoverage, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Coverage', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Coverage record.', + }, + resource: { + type: new GraphQLNonNull(CoverageInput), + description: 'Coverage Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Coverage record for deletion.', + }, +}; + +/** + * @name exports.CoverageCreateMutation + * @summary CoverageCreate mutation. + */ +module.exports.CoverageCreateMutation = { + description: 'Create a Coverage record', + resolve: scopeInvariant(scopeOptions, createCoverage), + type: CoverageSchema, + args: WriteArgs, +}; + +/** + * @name exports.CoverageUpdateMutation + * @summary CoverageUpdate mutation. + */ +module.exports.CoverageUpdateMutation = { + description: 'Update a Coverage record', + resolve: scopeInvariant(scopeOptions, updateCoverage), + type: CoverageSchema, + args: WriteArgs, +}; + +/** + * @name exports.CoverageRemoveMutation + * @summary CoverageRemove mutation. + */ +module.exports.CoverageRemoveMutation = { + description: 'Remove a Coverage record', + resolve: scopeInvariant(scopeOptions, removeCoverage), + type: CoverageSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/coverage/query.js b/src/resources/4_0_0/profiles/coverage/query.js new file mode 100644 index 00000000..461c6f0b --- /dev/null +++ b/src/resources/4_0_0/profiles/coverage/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CoverageSchema = require('../../schemas/coverage.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CoverageArgs = require('../../parameters/coverage.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, CoverageArgs); + +// Resolvers +const { + getCoverage, + getCoverageList, + getCoverageInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Coverage', + action: 'read', +}; + +/** + * @name exports.CoverageQuery + * @summary Coverage query. + */ +module.exports.CoverageQuery = { + description: 'Query for a single Coverage', + resolve: scopeInvariant(scopeOptions, getCoverage), + type: CoverageSchema, + args: args, +}; + +/** + * @name exports.CoverageListQuery + * @summary Coverage query. + */ +module.exports.CoverageListQuery = { + description: 'Query for a more than or just one Coverage', + resolve: scopeInvariant(scopeOptions, getCoverageList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CoverageInstanceQuery + * @summary Coverage query. + */ +module.exports.CoverageInstanceQuery = { + description: 'Access information about a single Coverage', + resolve: scopeInvariant(scopeOptions, getCoverageInstance), + type: CoverageSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/coverage/register.js b/src/resources/4_0_0/profiles/coverage/register.js new file mode 100644 index 00000000..e0a40125 --- /dev/null +++ b/src/resources/4_0_0/profiles/coverage/register.js @@ -0,0 +1,48 @@ +const { + CoverageCreateMutation, + CoverageUpdateMutation, + CoverageRemoveMutation, +} = require('./mutation'); + +const { + CoverageQuery, + CoverageListQuery, + CoverageInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Coverage: CoverageQuery, + CoverageList: CoverageListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CoverageCreate: CoverageCreateMutation, + CoverageUpdate: CoverageUpdateMutation, + CoverageRemove: CoverageRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Coverage', + path: '/4_0_0/Coverage/:id', + query: CoverageInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/coverage/resolver.js b/src/resources/4_0_0/profiles/coverage/resolver.js new file mode 100644 index 00000000..3370c457 --- /dev/null +++ b/src/resources/4_0_0/profiles/coverage/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCoverage + * @static + * @summary Coverage resolver. + */ +module.exports.getCoverage = function getCoverage( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCoverageList + * @static + * @summary Coverage list resolver. + */ +module.exports.getCoverageList = function getCoverageList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCoverageInstance + * @static + * @summary Coverage instance resolver. + */ +module.exports.getCoverageInstance = function getCoverageInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCoverage + * @static + * @summary Create Coverage resolver. + */ +module.exports.createCoverage = function createCoverage( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCoverage + * @static + * @summary Update Coverage resolver. + */ +module.exports.updateCoverage = function updateCoverage( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCoverage + * @static + * @summary Remove Coverage resolver. + */ +module.exports.removeCoverage = function removeCoverage( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/coverageeligibilityrequest/mutation.js b/src/resources/4_0_0/profiles/coverageeligibilityrequest/mutation.js new file mode 100644 index 00000000..078bc5bc --- /dev/null +++ b/src/resources/4_0_0/profiles/coverageeligibilityrequest/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const CoverageEligibilityRequestSchema = require('../../schemas/coverageeligibilityrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CoverageEligibilityRequestInput = require('../../inputs/coverageeligibilityrequest.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCoverageEligibilityRequest, + updateCoverageEligibilityRequest, + removeCoverageEligibilityRequest, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CoverageEligibilityRequest', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a CoverageEligibilityRequest record.', + }, + resource: { + type: new GraphQLNonNull(CoverageEligibilityRequestInput), + description: 'CoverageEligibilityRequest Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a CoverageEligibilityRequest record for deletion.', + }, +}; + +/** + * @name exports.CoverageEligibilityRequestCreateMutation + * @summary CoverageEligibilityRequestCreate mutation. + */ +module.exports.CoverageEligibilityRequestCreateMutation = { + description: 'Create a CoverageEligibilityRequest record', + resolve: scopeInvariant(scopeOptions, createCoverageEligibilityRequest), + type: CoverageEligibilityRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.CoverageEligibilityRequestUpdateMutation + * @summary CoverageEligibilityRequestUpdate mutation. + */ +module.exports.CoverageEligibilityRequestUpdateMutation = { + description: 'Update a CoverageEligibilityRequest record', + resolve: scopeInvariant(scopeOptions, updateCoverageEligibilityRequest), + type: CoverageEligibilityRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.CoverageEligibilityRequestRemoveMutation + * @summary CoverageEligibilityRequestRemove mutation. + */ +module.exports.CoverageEligibilityRequestRemoveMutation = { + description: 'Remove a CoverageEligibilityRequest record', + resolve: scopeInvariant(scopeOptions, removeCoverageEligibilityRequest), + type: CoverageEligibilityRequestSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/coverageeligibilityrequest/query.js b/src/resources/4_0_0/profiles/coverageeligibilityrequest/query.js new file mode 100644 index 00000000..bb716b3a --- /dev/null +++ b/src/resources/4_0_0/profiles/coverageeligibilityrequest/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CoverageEligibilityRequestSchema = require('../../schemas/coverageeligibilityrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CoverageEligibilityRequestArgs = require('../../parameters/coverageeligibilityrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CoverageEligibilityRequestArgs, +); + +// Resolvers +const { + getCoverageEligibilityRequest, + getCoverageEligibilityRequestList, + getCoverageEligibilityRequestInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CoverageEligibilityRequest', + action: 'read', +}; + +/** + * @name exports.CoverageEligibilityRequestQuery + * @summary CoverageEligibilityRequest query. + */ +module.exports.CoverageEligibilityRequestQuery = { + description: 'Query for a single CoverageEligibilityRequest', + resolve: scopeInvariant(scopeOptions, getCoverageEligibilityRequest), + type: CoverageEligibilityRequestSchema, + args: args, +}; + +/** + * @name exports.CoverageEligibilityRequestListQuery + * @summary CoverageEligibilityRequest query. + */ +module.exports.CoverageEligibilityRequestListQuery = { + description: 'Query for a more than or just one CoverageEligibilityRequest', + resolve: scopeInvariant(scopeOptions, getCoverageEligibilityRequestList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CoverageEligibilityRequestInstanceQuery + * @summary CoverageEligibilityRequest query. + */ +module.exports.CoverageEligibilityRequestInstanceQuery = { + description: 'Access information about a single CoverageEligibilityRequest', + resolve: scopeInvariant(scopeOptions, getCoverageEligibilityRequestInstance), + type: CoverageEligibilityRequestSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/coverageeligibilityrequest/register.js b/src/resources/4_0_0/profiles/coverageeligibilityrequest/register.js new file mode 100644 index 00000000..4c215a68 --- /dev/null +++ b/src/resources/4_0_0/profiles/coverageeligibilityrequest/register.js @@ -0,0 +1,48 @@ +const { + CoverageEligibilityRequestCreateMutation, + CoverageEligibilityRequestUpdateMutation, + CoverageEligibilityRequestRemoveMutation, +} = require('./mutation'); + +const { + CoverageEligibilityRequestQuery, + CoverageEligibilityRequestListQuery, + CoverageEligibilityRequestInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + CoverageEligibilityRequest: CoverageEligibilityRequestQuery, + CoverageEligibilityRequestList: CoverageEligibilityRequestListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CoverageEligibilityRequestCreate: CoverageEligibilityRequestCreateMutation, + CoverageEligibilityRequestUpdate: CoverageEligibilityRequestUpdateMutation, + CoverageEligibilityRequestRemove: CoverageEligibilityRequestRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'CoverageEligibilityRequest', + path: '/4_0_0/CoverageEligibilityRequest/:id', + query: CoverageEligibilityRequestInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/coverageeligibilityrequest/resolver.js b/src/resources/4_0_0/profiles/coverageeligibilityrequest/resolver.js new file mode 100644 index 00000000..027b6e71 --- /dev/null +++ b/src/resources/4_0_0/profiles/coverageeligibilityrequest/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCoverageEligibilityRequest + * @static + * @summary CoverageEligibilityRequest resolver. + */ +module.exports.getCoverageEligibilityRequest = function getCoverageEligibilityRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCoverageEligibilityRequestList + * @static + * @summary CoverageEligibilityRequest list resolver. + */ +module.exports.getCoverageEligibilityRequestList = function getCoverageEligibilityRequestList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCoverageEligibilityRequestInstance + * @static + * @summary CoverageEligibilityRequest instance resolver. + */ +module.exports.getCoverageEligibilityRequestInstance = function getCoverageEligibilityRequestInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCoverageEligibilityRequest + * @static + * @summary Create CoverageEligibilityRequest resolver. + */ +module.exports.createCoverageEligibilityRequest = function createCoverageEligibilityRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCoverageEligibilityRequest + * @static + * @summary Update CoverageEligibilityRequest resolver. + */ +module.exports.updateCoverageEligibilityRequest = function updateCoverageEligibilityRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCoverageEligibilityRequest + * @static + * @summary Remove CoverageEligibilityRequest resolver. + */ +module.exports.removeCoverageEligibilityRequest = function removeCoverageEligibilityRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/coverageeligibilityresponse/mutation.js b/src/resources/4_0_0/profiles/coverageeligibilityresponse/mutation.js new file mode 100644 index 00000000..c17a273c --- /dev/null +++ b/src/resources/4_0_0/profiles/coverageeligibilityresponse/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const CoverageEligibilityResponseSchema = require('../../schemas/coverageeligibilityresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const CoverageEligibilityResponseInput = require('../../inputs/coverageeligibilityresponse.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createCoverageEligibilityResponse, + updateCoverageEligibilityResponse, + removeCoverageEligibilityResponse, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CoverageEligibilityResponse', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a CoverageEligibilityResponse record.', + }, + resource: { + type: new GraphQLNonNull(CoverageEligibilityResponseInput), + description: 'CoverageEligibilityResponse Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a CoverageEligibilityResponse record for deletion.', + }, +}; + +/** + * @name exports.CoverageEligibilityResponseCreateMutation + * @summary CoverageEligibilityResponseCreate mutation. + */ +module.exports.CoverageEligibilityResponseCreateMutation = { + description: 'Create a CoverageEligibilityResponse record', + resolve: scopeInvariant(scopeOptions, createCoverageEligibilityResponse), + type: CoverageEligibilityResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.CoverageEligibilityResponseUpdateMutation + * @summary CoverageEligibilityResponseUpdate mutation. + */ +module.exports.CoverageEligibilityResponseUpdateMutation = { + description: 'Update a CoverageEligibilityResponse record', + resolve: scopeInvariant(scopeOptions, updateCoverageEligibilityResponse), + type: CoverageEligibilityResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.CoverageEligibilityResponseRemoveMutation + * @summary CoverageEligibilityResponseRemove mutation. + */ +module.exports.CoverageEligibilityResponseRemoveMutation = { + description: 'Remove a CoverageEligibilityResponse record', + resolve: scopeInvariant(scopeOptions, removeCoverageEligibilityResponse), + type: CoverageEligibilityResponseSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/coverageeligibilityresponse/query.js b/src/resources/4_0_0/profiles/coverageeligibilityresponse/query.js new file mode 100644 index 00000000..47a3fba9 --- /dev/null +++ b/src/resources/4_0_0/profiles/coverageeligibilityresponse/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const CoverageEligibilityResponseSchema = require('../../schemas/coverageeligibilityresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const CoverageEligibilityResponseArgs = require('../../parameters/coverageeligibilityresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + CoverageEligibilityResponseArgs, +); + +// Resolvers +const { + getCoverageEligibilityResponse, + getCoverageEligibilityResponseList, + getCoverageEligibilityResponseInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'CoverageEligibilityResponse', + action: 'read', +}; + +/** + * @name exports.CoverageEligibilityResponseQuery + * @summary CoverageEligibilityResponse query. + */ +module.exports.CoverageEligibilityResponseQuery = { + description: 'Query for a single CoverageEligibilityResponse', + resolve: scopeInvariant(scopeOptions, getCoverageEligibilityResponse), + type: CoverageEligibilityResponseSchema, + args: args, +}; + +/** + * @name exports.CoverageEligibilityResponseListQuery + * @summary CoverageEligibilityResponse query. + */ +module.exports.CoverageEligibilityResponseListQuery = { + description: 'Query for a more than or just one CoverageEligibilityResponse', + resolve: scopeInvariant(scopeOptions, getCoverageEligibilityResponseList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.CoverageEligibilityResponseInstanceQuery + * @summary CoverageEligibilityResponse query. + */ +module.exports.CoverageEligibilityResponseInstanceQuery = { + description: 'Access information about a single CoverageEligibilityResponse', + resolve: scopeInvariant(scopeOptions, getCoverageEligibilityResponseInstance), + type: CoverageEligibilityResponseSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/coverageeligibilityresponse/register.js b/src/resources/4_0_0/profiles/coverageeligibilityresponse/register.js new file mode 100644 index 00000000..fbd9c7f8 --- /dev/null +++ b/src/resources/4_0_0/profiles/coverageeligibilityresponse/register.js @@ -0,0 +1,48 @@ +const { + CoverageEligibilityResponseCreateMutation, + CoverageEligibilityResponseUpdateMutation, + CoverageEligibilityResponseRemoveMutation, +} = require('./mutation'); + +const { + CoverageEligibilityResponseQuery, + CoverageEligibilityResponseListQuery, + CoverageEligibilityResponseInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + CoverageEligibilityResponse: CoverageEligibilityResponseQuery, + CoverageEligibilityResponseList: CoverageEligibilityResponseListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + CoverageEligibilityResponseCreate: CoverageEligibilityResponseCreateMutation, + CoverageEligibilityResponseUpdate: CoverageEligibilityResponseUpdateMutation, + CoverageEligibilityResponseRemove: CoverageEligibilityResponseRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'CoverageEligibilityResponse', + path: '/4_0_0/CoverageEligibilityResponse/:id', + query: CoverageEligibilityResponseInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/coverageeligibilityresponse/resolver.js b/src/resources/4_0_0/profiles/coverageeligibilityresponse/resolver.js new file mode 100644 index 00000000..191cf1e5 --- /dev/null +++ b/src/resources/4_0_0/profiles/coverageeligibilityresponse/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getCoverageEligibilityResponse + * @static + * @summary CoverageEligibilityResponse resolver. + */ +module.exports.getCoverageEligibilityResponse = function getCoverageEligibilityResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCoverageEligibilityResponseList + * @static + * @summary CoverageEligibilityResponse list resolver. + */ +module.exports.getCoverageEligibilityResponseList = function getCoverageEligibilityResponseList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getCoverageEligibilityResponseInstance + * @static + * @summary CoverageEligibilityResponse instance resolver. + */ +module.exports.getCoverageEligibilityResponseInstance = function getCoverageEligibilityResponseInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createCoverageEligibilityResponse + * @static + * @summary Create CoverageEligibilityResponse resolver. + */ +module.exports.createCoverageEligibilityResponse = function createCoverageEligibilityResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateCoverageEligibilityResponse + * @static + * @summary Update CoverageEligibilityResponse resolver. + */ +module.exports.updateCoverageEligibilityResponse = function updateCoverageEligibilityResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeCoverageEligibilityResponse + * @static + * @summary Remove CoverageEligibilityResponse resolver. + */ +module.exports.removeCoverageEligibilityResponse = function removeCoverageEligibilityResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/detectedissue/mutation.js b/src/resources/4_0_0/profiles/detectedissue/mutation.js new file mode 100644 index 00000000..e08b8bc2 --- /dev/null +++ b/src/resources/4_0_0/profiles/detectedissue/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const DetectedIssueSchema = require('../../schemas/detectedissue.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DetectedIssueInput = require('../../inputs/detectedissue.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createDetectedIssue, + updateDetectedIssue, + removeDetectedIssue, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DetectedIssue', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a DetectedIssue record.', + }, + resource: { + type: new GraphQLNonNull(DetectedIssueInput), + description: 'DetectedIssue Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a DetectedIssue record for deletion.', + }, +}; + +/** + * @name exports.DetectedIssueCreateMutation + * @summary DetectedIssueCreate mutation. + */ +module.exports.DetectedIssueCreateMutation = { + description: 'Create a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, createDetectedIssue), + type: DetectedIssueSchema, + args: WriteArgs, +}; + +/** + * @name exports.DetectedIssueUpdateMutation + * @summary DetectedIssueUpdate mutation. + */ +module.exports.DetectedIssueUpdateMutation = { + description: 'Update a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, updateDetectedIssue), + type: DetectedIssueSchema, + args: WriteArgs, +}; + +/** + * @name exports.DetectedIssueRemoveMutation + * @summary DetectedIssueRemove mutation. + */ +module.exports.DetectedIssueRemoveMutation = { + description: 'Remove a DetectedIssue record', + resolve: scopeInvariant(scopeOptions, removeDetectedIssue), + type: DetectedIssueSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/detectedissue/query.js b/src/resources/4_0_0/profiles/detectedissue/query.js new file mode 100644 index 00000000..b1e25aae --- /dev/null +++ b/src/resources/4_0_0/profiles/detectedissue/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DetectedIssueSchema = require('../../schemas/detectedissue.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DetectedIssueArgs = require('../../parameters/detectedissue.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DetectedIssueArgs, +); + +// Resolvers +const { + getDetectedIssue, + getDetectedIssueList, + getDetectedIssueInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DetectedIssue', + action: 'read', +}; + +/** + * @name exports.DetectedIssueQuery + * @summary DetectedIssue query. + */ +module.exports.DetectedIssueQuery = { + description: 'Query for a single DetectedIssue', + resolve: scopeInvariant(scopeOptions, getDetectedIssue), + type: DetectedIssueSchema, + args: args, +}; + +/** + * @name exports.DetectedIssueListQuery + * @summary DetectedIssue query. + */ +module.exports.DetectedIssueListQuery = { + description: 'Query for a more than or just one DetectedIssue', + resolve: scopeInvariant(scopeOptions, getDetectedIssueList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DetectedIssueInstanceQuery + * @summary DetectedIssue query. + */ +module.exports.DetectedIssueInstanceQuery = { + description: 'Access information about a single DetectedIssue', + resolve: scopeInvariant(scopeOptions, getDetectedIssueInstance), + type: DetectedIssueSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/detectedissue/register.js b/src/resources/4_0_0/profiles/detectedissue/register.js new file mode 100644 index 00000000..a9d1847d --- /dev/null +++ b/src/resources/4_0_0/profiles/detectedissue/register.js @@ -0,0 +1,48 @@ +const { + DetectedIssueCreateMutation, + DetectedIssueUpdateMutation, + DetectedIssueRemoveMutation, +} = require('./mutation'); + +const { + DetectedIssueQuery, + DetectedIssueListQuery, + DetectedIssueInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + DetectedIssue: DetectedIssueQuery, + DetectedIssueList: DetectedIssueListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DetectedIssueCreate: DetectedIssueCreateMutation, + DetectedIssueUpdate: DetectedIssueUpdateMutation, + DetectedIssueRemove: DetectedIssueRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'DetectedIssue', + path: '/4_0_0/DetectedIssue/:id', + query: DetectedIssueInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/detectedissue/resolver.js b/src/resources/4_0_0/profiles/detectedissue/resolver.js new file mode 100644 index 00000000..2f049205 --- /dev/null +++ b/src/resources/4_0_0/profiles/detectedissue/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getDetectedIssue + * @static + * @summary DetectedIssue resolver. + */ +module.exports.getDetectedIssue = function getDetectedIssue( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDetectedIssueList + * @static + * @summary DetectedIssue list resolver. + */ +module.exports.getDetectedIssueList = function getDetectedIssueList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDetectedIssueInstance + * @static + * @summary DetectedIssue instance resolver. + */ +module.exports.getDetectedIssueInstance = function getDetectedIssueInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDetectedIssue + * @static + * @summary Create DetectedIssue resolver. + */ +module.exports.createDetectedIssue = function createDetectedIssue( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDetectedIssue + * @static + * @summary Update DetectedIssue resolver. + */ +module.exports.updateDetectedIssue = function updateDetectedIssue( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDetectedIssue + * @static + * @summary Remove DetectedIssue resolver. + */ +module.exports.removeDetectedIssue = function removeDetectedIssue( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/device/mutation.js b/src/resources/4_0_0/profiles/device/mutation.js new file mode 100644 index 00000000..28e8c671 --- /dev/null +++ b/src/resources/4_0_0/profiles/device/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const DeviceSchema = require('../../schemas/device.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DeviceInput = require('../../inputs/device.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createDevice, updateDevice, removeDevice } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Device', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Device record.', + }, + resource: { + type: new GraphQLNonNull(DeviceInput), + description: 'Device Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Device record for deletion.', + }, +}; + +/** + * @name exports.DeviceCreateMutation + * @summary DeviceCreate mutation. + */ +module.exports.DeviceCreateMutation = { + description: 'Create a Device record', + resolve: scopeInvariant(scopeOptions, createDevice), + type: DeviceSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceUpdateMutation + * @summary DeviceUpdate mutation. + */ +module.exports.DeviceUpdateMutation = { + description: 'Update a Device record', + resolve: scopeInvariant(scopeOptions, updateDevice), + type: DeviceSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceRemoveMutation + * @summary DeviceRemove mutation. + */ +module.exports.DeviceRemoveMutation = { + description: 'Remove a Device record', + resolve: scopeInvariant(scopeOptions, removeDevice), + type: DeviceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/device/query.js b/src/resources/4_0_0/profiles/device/query.js new file mode 100644 index 00000000..f6fca767 --- /dev/null +++ b/src/resources/4_0_0/profiles/device/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceSchema = require('../../schemas/device.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DeviceArgs = require('../../parameters/device.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, DeviceArgs); + +// Resolvers +const { getDevice, getDeviceList, getDeviceInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Device', + action: 'read', +}; + +/** + * @name exports.DeviceQuery + * @summary Device query. + */ +module.exports.DeviceQuery = { + description: 'Query for a single Device', + resolve: scopeInvariant(scopeOptions, getDevice), + type: DeviceSchema, + args: args, +}; + +/** + * @name exports.DeviceListQuery + * @summary Device query. + */ +module.exports.DeviceListQuery = { + description: 'Query for a more than or just one Device', + resolve: scopeInvariant(scopeOptions, getDeviceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DeviceInstanceQuery + * @summary Device query. + */ +module.exports.DeviceInstanceQuery = { + description: 'Access information about a single Device', + resolve: scopeInvariant(scopeOptions, getDeviceInstance), + type: DeviceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/device/register.js b/src/resources/4_0_0/profiles/device/register.js new file mode 100644 index 00000000..2ab56b5e --- /dev/null +++ b/src/resources/4_0_0/profiles/device/register.js @@ -0,0 +1,48 @@ +const { + DeviceCreateMutation, + DeviceUpdateMutation, + DeviceRemoveMutation, +} = require('./mutation'); + +const { + DeviceQuery, + DeviceListQuery, + DeviceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Device: DeviceQuery, + DeviceList: DeviceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DeviceCreate: DeviceCreateMutation, + DeviceUpdate: DeviceUpdateMutation, + DeviceRemove: DeviceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Device', + path: '/4_0_0/Device/:id', + query: DeviceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/device/resolver.js b/src/resources/4_0_0/profiles/device/resolver.js new file mode 100644 index 00000000..61c357a8 --- /dev/null +++ b/src/resources/4_0_0/profiles/device/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getDevice + * @static + * @summary Device resolver. + */ +module.exports.getDevice = function getDevice(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceList + * @static + * @summary Device list resolver. + */ +module.exports.getDeviceList = function getDeviceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceInstance + * @static + * @summary Device instance resolver. + */ +module.exports.getDeviceInstance = function getDeviceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDevice + * @static + * @summary Create Device resolver. + */ +module.exports.createDevice = function createDevice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDevice + * @static + * @summary Update Device resolver. + */ +module.exports.updateDevice = function updateDevice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDevice + * @static + * @summary Remove Device resolver. + */ +module.exports.removeDevice = function removeDevice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/devicedefinition/mutation.js b/src/resources/4_0_0/profiles/devicedefinition/mutation.js new file mode 100644 index 00000000..bec21f30 --- /dev/null +++ b/src/resources/4_0_0/profiles/devicedefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const DeviceDefinitionSchema = require('../../schemas/devicedefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DeviceDefinitionInput = require('../../inputs/devicedefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createDeviceDefinition, + updateDeviceDefinition, + removeDeviceDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DeviceDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a DeviceDefinition record.', + }, + resource: { + type: new GraphQLNonNull(DeviceDefinitionInput), + description: 'DeviceDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a DeviceDefinition record for deletion.', + }, +}; + +/** + * @name exports.DeviceDefinitionCreateMutation + * @summary DeviceDefinitionCreate mutation. + */ +module.exports.DeviceDefinitionCreateMutation = { + description: 'Create a DeviceDefinition record', + resolve: scopeInvariant(scopeOptions, createDeviceDefinition), + type: DeviceDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceDefinitionUpdateMutation + * @summary DeviceDefinitionUpdate mutation. + */ +module.exports.DeviceDefinitionUpdateMutation = { + description: 'Update a DeviceDefinition record', + resolve: scopeInvariant(scopeOptions, updateDeviceDefinition), + type: DeviceDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceDefinitionRemoveMutation + * @summary DeviceDefinitionRemove mutation. + */ +module.exports.DeviceDefinitionRemoveMutation = { + description: 'Remove a DeviceDefinition record', + resolve: scopeInvariant(scopeOptions, removeDeviceDefinition), + type: DeviceDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/devicedefinition/query.js b/src/resources/4_0_0/profiles/devicedefinition/query.js new file mode 100644 index 00000000..4f8117dc --- /dev/null +++ b/src/resources/4_0_0/profiles/devicedefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceDefinitionSchema = require('../../schemas/devicedefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DeviceDefinitionArgs = require('../../parameters/devicedefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DeviceDefinitionArgs, +); + +// Resolvers +const { + getDeviceDefinition, + getDeviceDefinitionList, + getDeviceDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DeviceDefinition', + action: 'read', +}; + +/** + * @name exports.DeviceDefinitionQuery + * @summary DeviceDefinition query. + */ +module.exports.DeviceDefinitionQuery = { + description: 'Query for a single DeviceDefinition', + resolve: scopeInvariant(scopeOptions, getDeviceDefinition), + type: DeviceDefinitionSchema, + args: args, +}; + +/** + * @name exports.DeviceDefinitionListQuery + * @summary DeviceDefinition query. + */ +module.exports.DeviceDefinitionListQuery = { + description: 'Query for a more than or just one DeviceDefinition', + resolve: scopeInvariant(scopeOptions, getDeviceDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DeviceDefinitionInstanceQuery + * @summary DeviceDefinition query. + */ +module.exports.DeviceDefinitionInstanceQuery = { + description: 'Access information about a single DeviceDefinition', + resolve: scopeInvariant(scopeOptions, getDeviceDefinitionInstance), + type: DeviceDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/devicedefinition/register.js b/src/resources/4_0_0/profiles/devicedefinition/register.js new file mode 100644 index 00000000..0b61528e --- /dev/null +++ b/src/resources/4_0_0/profiles/devicedefinition/register.js @@ -0,0 +1,48 @@ +const { + DeviceDefinitionCreateMutation, + DeviceDefinitionUpdateMutation, + DeviceDefinitionRemoveMutation, +} = require('./mutation'); + +const { + DeviceDefinitionQuery, + DeviceDefinitionListQuery, + DeviceDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + DeviceDefinition: DeviceDefinitionQuery, + DeviceDefinitionList: DeviceDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DeviceDefinitionCreate: DeviceDefinitionCreateMutation, + DeviceDefinitionUpdate: DeviceDefinitionUpdateMutation, + DeviceDefinitionRemove: DeviceDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'DeviceDefinition', + path: '/4_0_0/DeviceDefinition/:id', + query: DeviceDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/devicedefinition/resolver.js b/src/resources/4_0_0/profiles/devicedefinition/resolver.js new file mode 100644 index 00000000..77b1113a --- /dev/null +++ b/src/resources/4_0_0/profiles/devicedefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getDeviceDefinition + * @static + * @summary DeviceDefinition resolver. + */ +module.exports.getDeviceDefinition = function getDeviceDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceDefinitionList + * @static + * @summary DeviceDefinition list resolver. + */ +module.exports.getDeviceDefinitionList = function getDeviceDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceDefinitionInstance + * @static + * @summary DeviceDefinition instance resolver. + */ +module.exports.getDeviceDefinitionInstance = function getDeviceDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDeviceDefinition + * @static + * @summary Create DeviceDefinition resolver. + */ +module.exports.createDeviceDefinition = function createDeviceDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDeviceDefinition + * @static + * @summary Update DeviceDefinition resolver. + */ +module.exports.updateDeviceDefinition = function updateDeviceDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDeviceDefinition + * @static + * @summary Remove DeviceDefinition resolver. + */ +module.exports.removeDeviceDefinition = function removeDeviceDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/devicemetric/mutation.js b/src/resources/4_0_0/profiles/devicemetric/mutation.js new file mode 100644 index 00000000..223633e9 --- /dev/null +++ b/src/resources/4_0_0/profiles/devicemetric/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const DeviceMetricSchema = require('../../schemas/devicemetric.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DeviceMetricInput = require('../../inputs/devicemetric.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createDeviceMetric, + updateDeviceMetric, + removeDeviceMetric, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DeviceMetric', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a DeviceMetric record.', + }, + resource: { + type: new GraphQLNonNull(DeviceMetricInput), + description: 'DeviceMetric Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a DeviceMetric record for deletion.', + }, +}; + +/** + * @name exports.DeviceMetricCreateMutation + * @summary DeviceMetricCreate mutation. + */ +module.exports.DeviceMetricCreateMutation = { + description: 'Create a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, createDeviceMetric), + type: DeviceMetricSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceMetricUpdateMutation + * @summary DeviceMetricUpdate mutation. + */ +module.exports.DeviceMetricUpdateMutation = { + description: 'Update a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, updateDeviceMetric), + type: DeviceMetricSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceMetricRemoveMutation + * @summary DeviceMetricRemove mutation. + */ +module.exports.DeviceMetricRemoveMutation = { + description: 'Remove a DeviceMetric record', + resolve: scopeInvariant(scopeOptions, removeDeviceMetric), + type: DeviceMetricSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/devicemetric/query.js b/src/resources/4_0_0/profiles/devicemetric/query.js new file mode 100644 index 00000000..c2a713cf --- /dev/null +++ b/src/resources/4_0_0/profiles/devicemetric/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceMetricSchema = require('../../schemas/devicemetric.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DeviceMetricArgs = require('../../parameters/devicemetric.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DeviceMetricArgs, +); + +// Resolvers +const { + getDeviceMetric, + getDeviceMetricList, + getDeviceMetricInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DeviceMetric', + action: 'read', +}; + +/** + * @name exports.DeviceMetricQuery + * @summary DeviceMetric query. + */ +module.exports.DeviceMetricQuery = { + description: 'Query for a single DeviceMetric', + resolve: scopeInvariant(scopeOptions, getDeviceMetric), + type: DeviceMetricSchema, + args: args, +}; + +/** + * @name exports.DeviceMetricListQuery + * @summary DeviceMetric query. + */ +module.exports.DeviceMetricListQuery = { + description: 'Query for a more than or just one DeviceMetric', + resolve: scopeInvariant(scopeOptions, getDeviceMetricList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DeviceMetricInstanceQuery + * @summary DeviceMetric query. + */ +module.exports.DeviceMetricInstanceQuery = { + description: 'Access information about a single DeviceMetric', + resolve: scopeInvariant(scopeOptions, getDeviceMetricInstance), + type: DeviceMetricSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/devicemetric/register.js b/src/resources/4_0_0/profiles/devicemetric/register.js new file mode 100644 index 00000000..1e2be681 --- /dev/null +++ b/src/resources/4_0_0/profiles/devicemetric/register.js @@ -0,0 +1,48 @@ +const { + DeviceMetricCreateMutation, + DeviceMetricUpdateMutation, + DeviceMetricRemoveMutation, +} = require('./mutation'); + +const { + DeviceMetricQuery, + DeviceMetricListQuery, + DeviceMetricInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + DeviceMetric: DeviceMetricQuery, + DeviceMetricList: DeviceMetricListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DeviceMetricCreate: DeviceMetricCreateMutation, + DeviceMetricUpdate: DeviceMetricUpdateMutation, + DeviceMetricRemove: DeviceMetricRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'DeviceMetric', + path: '/4_0_0/DeviceMetric/:id', + query: DeviceMetricInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/devicemetric/resolver.js b/src/resources/4_0_0/profiles/devicemetric/resolver.js new file mode 100644 index 00000000..5e97735b --- /dev/null +++ b/src/resources/4_0_0/profiles/devicemetric/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getDeviceMetric + * @static + * @summary DeviceMetric resolver. + */ +module.exports.getDeviceMetric = function getDeviceMetric( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceMetricList + * @static + * @summary DeviceMetric list resolver. + */ +module.exports.getDeviceMetricList = function getDeviceMetricList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceMetricInstance + * @static + * @summary DeviceMetric instance resolver. + */ +module.exports.getDeviceMetricInstance = function getDeviceMetricInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDeviceMetric + * @static + * @summary Create DeviceMetric resolver. + */ +module.exports.createDeviceMetric = function createDeviceMetric( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDeviceMetric + * @static + * @summary Update DeviceMetric resolver. + */ +module.exports.updateDeviceMetric = function updateDeviceMetric( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDeviceMetric + * @static + * @summary Remove DeviceMetric resolver. + */ +module.exports.removeDeviceMetric = function removeDeviceMetric( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/devicerequest/mutation.js b/src/resources/4_0_0/profiles/devicerequest/mutation.js new file mode 100644 index 00000000..77bb58a7 --- /dev/null +++ b/src/resources/4_0_0/profiles/devicerequest/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const DeviceRequestSchema = require('../../schemas/devicerequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DeviceRequestInput = require('../../inputs/devicerequest.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createDeviceRequest, + updateDeviceRequest, + removeDeviceRequest, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DeviceRequest', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a DeviceRequest record.', + }, + resource: { + type: new GraphQLNonNull(DeviceRequestInput), + description: 'DeviceRequest Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a DeviceRequest record for deletion.', + }, +}; + +/** + * @name exports.DeviceRequestCreateMutation + * @summary DeviceRequestCreate mutation. + */ +module.exports.DeviceRequestCreateMutation = { + description: 'Create a DeviceRequest record', + resolve: scopeInvariant(scopeOptions, createDeviceRequest), + type: DeviceRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceRequestUpdateMutation + * @summary DeviceRequestUpdate mutation. + */ +module.exports.DeviceRequestUpdateMutation = { + description: 'Update a DeviceRequest record', + resolve: scopeInvariant(scopeOptions, updateDeviceRequest), + type: DeviceRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceRequestRemoveMutation + * @summary DeviceRequestRemove mutation. + */ +module.exports.DeviceRequestRemoveMutation = { + description: 'Remove a DeviceRequest record', + resolve: scopeInvariant(scopeOptions, removeDeviceRequest), + type: DeviceRequestSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/devicerequest/query.js b/src/resources/4_0_0/profiles/devicerequest/query.js new file mode 100644 index 00000000..ee3aa996 --- /dev/null +++ b/src/resources/4_0_0/profiles/devicerequest/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceRequestSchema = require('../../schemas/devicerequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DeviceRequestArgs = require('../../parameters/devicerequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DeviceRequestArgs, +); + +// Resolvers +const { + getDeviceRequest, + getDeviceRequestList, + getDeviceRequestInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DeviceRequest', + action: 'read', +}; + +/** + * @name exports.DeviceRequestQuery + * @summary DeviceRequest query. + */ +module.exports.DeviceRequestQuery = { + description: 'Query for a single DeviceRequest', + resolve: scopeInvariant(scopeOptions, getDeviceRequest), + type: DeviceRequestSchema, + args: args, +}; + +/** + * @name exports.DeviceRequestListQuery + * @summary DeviceRequest query. + */ +module.exports.DeviceRequestListQuery = { + description: 'Query for a more than or just one DeviceRequest', + resolve: scopeInvariant(scopeOptions, getDeviceRequestList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DeviceRequestInstanceQuery + * @summary DeviceRequest query. + */ +module.exports.DeviceRequestInstanceQuery = { + description: 'Access information about a single DeviceRequest', + resolve: scopeInvariant(scopeOptions, getDeviceRequestInstance), + type: DeviceRequestSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/devicerequest/register.js b/src/resources/4_0_0/profiles/devicerequest/register.js new file mode 100644 index 00000000..06dd3be0 --- /dev/null +++ b/src/resources/4_0_0/profiles/devicerequest/register.js @@ -0,0 +1,48 @@ +const { + DeviceRequestCreateMutation, + DeviceRequestUpdateMutation, + DeviceRequestRemoveMutation, +} = require('./mutation'); + +const { + DeviceRequestQuery, + DeviceRequestListQuery, + DeviceRequestInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + DeviceRequest: DeviceRequestQuery, + DeviceRequestList: DeviceRequestListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DeviceRequestCreate: DeviceRequestCreateMutation, + DeviceRequestUpdate: DeviceRequestUpdateMutation, + DeviceRequestRemove: DeviceRequestRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'DeviceRequest', + path: '/4_0_0/DeviceRequest/:id', + query: DeviceRequestInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/devicerequest/resolver.js b/src/resources/4_0_0/profiles/devicerequest/resolver.js new file mode 100644 index 00000000..891bec9f --- /dev/null +++ b/src/resources/4_0_0/profiles/devicerequest/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getDeviceRequest + * @static + * @summary DeviceRequest resolver. + */ +module.exports.getDeviceRequest = function getDeviceRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceRequestList + * @static + * @summary DeviceRequest list resolver. + */ +module.exports.getDeviceRequestList = function getDeviceRequestList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceRequestInstance + * @static + * @summary DeviceRequest instance resolver. + */ +module.exports.getDeviceRequestInstance = function getDeviceRequestInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDeviceRequest + * @static + * @summary Create DeviceRequest resolver. + */ +module.exports.createDeviceRequest = function createDeviceRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDeviceRequest + * @static + * @summary Update DeviceRequest resolver. + */ +module.exports.updateDeviceRequest = function updateDeviceRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDeviceRequest + * @static + * @summary Remove DeviceRequest resolver. + */ +module.exports.removeDeviceRequest = function removeDeviceRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/deviceusestatement/mutation.js b/src/resources/4_0_0/profiles/deviceusestatement/mutation.js new file mode 100644 index 00000000..f388e8f1 --- /dev/null +++ b/src/resources/4_0_0/profiles/deviceusestatement/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DeviceUseStatementInput = require('../../inputs/deviceusestatement.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createDeviceUseStatement, + updateDeviceUseStatement, + removeDeviceUseStatement, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DeviceUseStatement', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a DeviceUseStatement record.', + }, + resource: { + type: new GraphQLNonNull(DeviceUseStatementInput), + description: 'DeviceUseStatement Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a DeviceUseStatement record for deletion.', + }, +}; + +/** + * @name exports.DeviceUseStatementCreateMutation + * @summary DeviceUseStatementCreate mutation. + */ +module.exports.DeviceUseStatementCreateMutation = { + description: 'Create a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, createDeviceUseStatement), + type: DeviceUseStatementSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceUseStatementUpdateMutation + * @summary DeviceUseStatementUpdate mutation. + */ +module.exports.DeviceUseStatementUpdateMutation = { + description: 'Update a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, updateDeviceUseStatement), + type: DeviceUseStatementSchema, + args: WriteArgs, +}; + +/** + * @name exports.DeviceUseStatementRemoveMutation + * @summary DeviceUseStatementRemove mutation. + */ +module.exports.DeviceUseStatementRemoveMutation = { + description: 'Remove a DeviceUseStatement record', + resolve: scopeInvariant(scopeOptions, removeDeviceUseStatement), + type: DeviceUseStatementSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/deviceusestatement/query.js b/src/resources/4_0_0/profiles/deviceusestatement/query.js new file mode 100644 index 00000000..3fa40940 --- /dev/null +++ b/src/resources/4_0_0/profiles/deviceusestatement/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DeviceUseStatementSchema = require('../../schemas/deviceusestatement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DeviceUseStatementArgs = require('../../parameters/deviceusestatement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DeviceUseStatementArgs, +); + +// Resolvers +const { + getDeviceUseStatement, + getDeviceUseStatementList, + getDeviceUseStatementInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DeviceUseStatement', + action: 'read', +}; + +/** + * @name exports.DeviceUseStatementQuery + * @summary DeviceUseStatement query. + */ +module.exports.DeviceUseStatementQuery = { + description: 'Query for a single DeviceUseStatement', + resolve: scopeInvariant(scopeOptions, getDeviceUseStatement), + type: DeviceUseStatementSchema, + args: args, +}; + +/** + * @name exports.DeviceUseStatementListQuery + * @summary DeviceUseStatement query. + */ +module.exports.DeviceUseStatementListQuery = { + description: 'Query for a more than or just one DeviceUseStatement', + resolve: scopeInvariant(scopeOptions, getDeviceUseStatementList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DeviceUseStatementInstanceQuery + * @summary DeviceUseStatement query. + */ +module.exports.DeviceUseStatementInstanceQuery = { + description: 'Access information about a single DeviceUseStatement', + resolve: scopeInvariant(scopeOptions, getDeviceUseStatementInstance), + type: DeviceUseStatementSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/deviceusestatement/register.js b/src/resources/4_0_0/profiles/deviceusestatement/register.js new file mode 100644 index 00000000..10c547ee --- /dev/null +++ b/src/resources/4_0_0/profiles/deviceusestatement/register.js @@ -0,0 +1,48 @@ +const { + DeviceUseStatementCreateMutation, + DeviceUseStatementUpdateMutation, + DeviceUseStatementRemoveMutation, +} = require('./mutation'); + +const { + DeviceUseStatementQuery, + DeviceUseStatementListQuery, + DeviceUseStatementInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + DeviceUseStatement: DeviceUseStatementQuery, + DeviceUseStatementList: DeviceUseStatementListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DeviceUseStatementCreate: DeviceUseStatementCreateMutation, + DeviceUseStatementUpdate: DeviceUseStatementUpdateMutation, + DeviceUseStatementRemove: DeviceUseStatementRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'DeviceUseStatement', + path: '/4_0_0/DeviceUseStatement/:id', + query: DeviceUseStatementInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/deviceusestatement/resolver.js b/src/resources/4_0_0/profiles/deviceusestatement/resolver.js new file mode 100644 index 00000000..d584494d --- /dev/null +++ b/src/resources/4_0_0/profiles/deviceusestatement/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getDeviceUseStatement + * @static + * @summary DeviceUseStatement resolver. + */ +module.exports.getDeviceUseStatement = function getDeviceUseStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceUseStatementList + * @static + * @summary DeviceUseStatement list resolver. + */ +module.exports.getDeviceUseStatementList = function getDeviceUseStatementList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDeviceUseStatementInstance + * @static + * @summary DeviceUseStatement instance resolver. + */ +module.exports.getDeviceUseStatementInstance = function getDeviceUseStatementInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDeviceUseStatement + * @static + * @summary Create DeviceUseStatement resolver. + */ +module.exports.createDeviceUseStatement = function createDeviceUseStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDeviceUseStatement + * @static + * @summary Update DeviceUseStatement resolver. + */ +module.exports.updateDeviceUseStatement = function updateDeviceUseStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDeviceUseStatement + * @static + * @summary Remove DeviceUseStatement resolver. + */ +module.exports.removeDeviceUseStatement = function removeDeviceUseStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/diagnosticreport/mutation.js b/src/resources/4_0_0/profiles/diagnosticreport/mutation.js new file mode 100644 index 00000000..5b4c3813 --- /dev/null +++ b/src/resources/4_0_0/profiles/diagnosticreport/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DiagnosticReportInput = require('../../inputs/diagnosticreport.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createDiagnosticReport, + updateDiagnosticReport, + removeDiagnosticReport, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DiagnosticReport', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a DiagnosticReport record.', + }, + resource: { + type: new GraphQLNonNull(DiagnosticReportInput), + description: 'DiagnosticReport Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a DiagnosticReport record for deletion.', + }, +}; + +/** + * @name exports.DiagnosticReportCreateMutation + * @summary DiagnosticReportCreate mutation. + */ +module.exports.DiagnosticReportCreateMutation = { + description: 'Create a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, createDiagnosticReport), + type: DiagnosticReportSchema, + args: WriteArgs, +}; + +/** + * @name exports.DiagnosticReportUpdateMutation + * @summary DiagnosticReportUpdate mutation. + */ +module.exports.DiagnosticReportUpdateMutation = { + description: 'Update a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, updateDiagnosticReport), + type: DiagnosticReportSchema, + args: WriteArgs, +}; + +/** + * @name exports.DiagnosticReportRemoveMutation + * @summary DiagnosticReportRemove mutation. + */ +module.exports.DiagnosticReportRemoveMutation = { + description: 'Remove a DiagnosticReport record', + resolve: scopeInvariant(scopeOptions, removeDiagnosticReport), + type: DiagnosticReportSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/diagnosticreport/query.js b/src/resources/4_0_0/profiles/diagnosticreport/query.js new file mode 100644 index 00000000..ef7bc359 --- /dev/null +++ b/src/resources/4_0_0/profiles/diagnosticreport/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DiagnosticReportSchema = require('../../schemas/diagnosticreport.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DiagnosticReportArgs = require('../../parameters/diagnosticreport.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DiagnosticReportArgs, +); + +// Resolvers +const { + getDiagnosticReport, + getDiagnosticReportList, + getDiagnosticReportInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DiagnosticReport', + action: 'read', +}; + +/** + * @name exports.DiagnosticReportQuery + * @summary DiagnosticReport query. + */ +module.exports.DiagnosticReportQuery = { + description: 'Query for a single DiagnosticReport', + resolve: scopeInvariant(scopeOptions, getDiagnosticReport), + type: DiagnosticReportSchema, + args: args, +}; + +/** + * @name exports.DiagnosticReportListQuery + * @summary DiagnosticReport query. + */ +module.exports.DiagnosticReportListQuery = { + description: 'Query for a more than or just one DiagnosticReport', + resolve: scopeInvariant(scopeOptions, getDiagnosticReportList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DiagnosticReportInstanceQuery + * @summary DiagnosticReport query. + */ +module.exports.DiagnosticReportInstanceQuery = { + description: 'Access information about a single DiagnosticReport', + resolve: scopeInvariant(scopeOptions, getDiagnosticReportInstance), + type: DiagnosticReportSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/diagnosticreport/register.js b/src/resources/4_0_0/profiles/diagnosticreport/register.js new file mode 100644 index 00000000..cbeb811c --- /dev/null +++ b/src/resources/4_0_0/profiles/diagnosticreport/register.js @@ -0,0 +1,48 @@ +const { + DiagnosticReportCreateMutation, + DiagnosticReportUpdateMutation, + DiagnosticReportRemoveMutation, +} = require('./mutation'); + +const { + DiagnosticReportQuery, + DiagnosticReportListQuery, + DiagnosticReportInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + DiagnosticReport: DiagnosticReportQuery, + DiagnosticReportList: DiagnosticReportListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DiagnosticReportCreate: DiagnosticReportCreateMutation, + DiagnosticReportUpdate: DiagnosticReportUpdateMutation, + DiagnosticReportRemove: DiagnosticReportRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'DiagnosticReport', + path: '/4_0_0/DiagnosticReport/:id', + query: DiagnosticReportInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/diagnosticreport/resolver.js b/src/resources/4_0_0/profiles/diagnosticreport/resolver.js new file mode 100644 index 00000000..f6f41b5f --- /dev/null +++ b/src/resources/4_0_0/profiles/diagnosticreport/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getDiagnosticReport + * @static + * @summary DiagnosticReport resolver. + */ +module.exports.getDiagnosticReport = function getDiagnosticReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDiagnosticReportList + * @static + * @summary DiagnosticReport list resolver. + */ +module.exports.getDiagnosticReportList = function getDiagnosticReportList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDiagnosticReportInstance + * @static + * @summary DiagnosticReport instance resolver. + */ +module.exports.getDiagnosticReportInstance = function getDiagnosticReportInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDiagnosticReport + * @static + * @summary Create DiagnosticReport resolver. + */ +module.exports.createDiagnosticReport = function createDiagnosticReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDiagnosticReport + * @static + * @summary Update DiagnosticReport resolver. + */ +module.exports.updateDiagnosticReport = function updateDiagnosticReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDiagnosticReport + * @static + * @summary Remove DiagnosticReport resolver. + */ +module.exports.removeDiagnosticReport = function removeDiagnosticReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/documentmanifest/mutation.js b/src/resources/4_0_0/profiles/documentmanifest/mutation.js new file mode 100644 index 00000000..8f83476c --- /dev/null +++ b/src/resources/4_0_0/profiles/documentmanifest/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const DocumentManifestSchema = require('../../schemas/documentmanifest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DocumentManifestInput = require('../../inputs/documentmanifest.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createDocumentManifest, + updateDocumentManifest, + removeDocumentManifest, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DocumentManifest', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a DocumentManifest record.', + }, + resource: { + type: new GraphQLNonNull(DocumentManifestInput), + description: 'DocumentManifest Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a DocumentManifest record for deletion.', + }, +}; + +/** + * @name exports.DocumentManifestCreateMutation + * @summary DocumentManifestCreate mutation. + */ +module.exports.DocumentManifestCreateMutation = { + description: 'Create a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, createDocumentManifest), + type: DocumentManifestSchema, + args: WriteArgs, +}; + +/** + * @name exports.DocumentManifestUpdateMutation + * @summary DocumentManifestUpdate mutation. + */ +module.exports.DocumentManifestUpdateMutation = { + description: 'Update a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, updateDocumentManifest), + type: DocumentManifestSchema, + args: WriteArgs, +}; + +/** + * @name exports.DocumentManifestRemoveMutation + * @summary DocumentManifestRemove mutation. + */ +module.exports.DocumentManifestRemoveMutation = { + description: 'Remove a DocumentManifest record', + resolve: scopeInvariant(scopeOptions, removeDocumentManifest), + type: DocumentManifestSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/documentmanifest/query.js b/src/resources/4_0_0/profiles/documentmanifest/query.js new file mode 100644 index 00000000..a7752bb7 --- /dev/null +++ b/src/resources/4_0_0/profiles/documentmanifest/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DocumentManifestSchema = require('../../schemas/documentmanifest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DocumentManifestArgs = require('../../parameters/documentmanifest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DocumentManifestArgs, +); + +// Resolvers +const { + getDocumentManifest, + getDocumentManifestList, + getDocumentManifestInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DocumentManifest', + action: 'read', +}; + +/** + * @name exports.DocumentManifestQuery + * @summary DocumentManifest query. + */ +module.exports.DocumentManifestQuery = { + description: 'Query for a single DocumentManifest', + resolve: scopeInvariant(scopeOptions, getDocumentManifest), + type: DocumentManifestSchema, + args: args, +}; + +/** + * @name exports.DocumentManifestListQuery + * @summary DocumentManifest query. + */ +module.exports.DocumentManifestListQuery = { + description: 'Query for a more than or just one DocumentManifest', + resolve: scopeInvariant(scopeOptions, getDocumentManifestList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DocumentManifestInstanceQuery + * @summary DocumentManifest query. + */ +module.exports.DocumentManifestInstanceQuery = { + description: 'Access information about a single DocumentManifest', + resolve: scopeInvariant(scopeOptions, getDocumentManifestInstance), + type: DocumentManifestSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/documentmanifest/register.js b/src/resources/4_0_0/profiles/documentmanifest/register.js new file mode 100644 index 00000000..84c9dee0 --- /dev/null +++ b/src/resources/4_0_0/profiles/documentmanifest/register.js @@ -0,0 +1,48 @@ +const { + DocumentManifestCreateMutation, + DocumentManifestUpdateMutation, + DocumentManifestRemoveMutation, +} = require('./mutation'); + +const { + DocumentManifestQuery, + DocumentManifestListQuery, + DocumentManifestInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + DocumentManifest: DocumentManifestQuery, + DocumentManifestList: DocumentManifestListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DocumentManifestCreate: DocumentManifestCreateMutation, + DocumentManifestUpdate: DocumentManifestUpdateMutation, + DocumentManifestRemove: DocumentManifestRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'DocumentManifest', + path: '/4_0_0/DocumentManifest/:id', + query: DocumentManifestInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/documentmanifest/resolver.js b/src/resources/4_0_0/profiles/documentmanifest/resolver.js new file mode 100644 index 00000000..ef4bbe3a --- /dev/null +++ b/src/resources/4_0_0/profiles/documentmanifest/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getDocumentManifest + * @static + * @summary DocumentManifest resolver. + */ +module.exports.getDocumentManifest = function getDocumentManifest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDocumentManifestList + * @static + * @summary DocumentManifest list resolver. + */ +module.exports.getDocumentManifestList = function getDocumentManifestList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDocumentManifestInstance + * @static + * @summary DocumentManifest instance resolver. + */ +module.exports.getDocumentManifestInstance = function getDocumentManifestInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDocumentManifest + * @static + * @summary Create DocumentManifest resolver. + */ +module.exports.createDocumentManifest = function createDocumentManifest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDocumentManifest + * @static + * @summary Update DocumentManifest resolver. + */ +module.exports.updateDocumentManifest = function updateDocumentManifest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDocumentManifest + * @static + * @summary Remove DocumentManifest resolver. + */ +module.exports.removeDocumentManifest = function removeDocumentManifest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/documentreference/mutation.js b/src/resources/4_0_0/profiles/documentreference/mutation.js new file mode 100644 index 00000000..74a756b7 --- /dev/null +++ b/src/resources/4_0_0/profiles/documentreference/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const DocumentReferenceSchema = require('../../schemas/documentreference.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const DocumentReferenceInput = require('../../inputs/documentreference.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createDocumentReference, + updateDocumentReference, + removeDocumentReference, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DocumentReference', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a DocumentReference record.', + }, + resource: { + type: new GraphQLNonNull(DocumentReferenceInput), + description: 'DocumentReference Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a DocumentReference record for deletion.', + }, +}; + +/** + * @name exports.DocumentReferenceCreateMutation + * @summary DocumentReferenceCreate mutation. + */ +module.exports.DocumentReferenceCreateMutation = { + description: 'Create a DocumentReference record', + resolve: scopeInvariant(scopeOptions, createDocumentReference), + type: DocumentReferenceSchema, + args: WriteArgs, +}; + +/** + * @name exports.DocumentReferenceUpdateMutation + * @summary DocumentReferenceUpdate mutation. + */ +module.exports.DocumentReferenceUpdateMutation = { + description: 'Update a DocumentReference record', + resolve: scopeInvariant(scopeOptions, updateDocumentReference), + type: DocumentReferenceSchema, + args: WriteArgs, +}; + +/** + * @name exports.DocumentReferenceRemoveMutation + * @summary DocumentReferenceRemove mutation. + */ +module.exports.DocumentReferenceRemoveMutation = { + description: 'Remove a DocumentReference record', + resolve: scopeInvariant(scopeOptions, removeDocumentReference), + type: DocumentReferenceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/documentreference/query.js b/src/resources/4_0_0/profiles/documentreference/query.js new file mode 100644 index 00000000..60330547 --- /dev/null +++ b/src/resources/4_0_0/profiles/documentreference/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const DocumentReferenceSchema = require('../../schemas/documentreference.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const DocumentReferenceArgs = require('../../parameters/documentreference.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + DocumentReferenceArgs, +); + +// Resolvers +const { + getDocumentReference, + getDocumentReferenceList, + getDocumentReferenceInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'DocumentReference', + action: 'read', +}; + +/** + * @name exports.DocumentReferenceQuery + * @summary DocumentReference query. + */ +module.exports.DocumentReferenceQuery = { + description: 'Query for a single DocumentReference', + resolve: scopeInvariant(scopeOptions, getDocumentReference), + type: DocumentReferenceSchema, + args: args, +}; + +/** + * @name exports.DocumentReferenceListQuery + * @summary DocumentReference query. + */ +module.exports.DocumentReferenceListQuery = { + description: 'Query for a more than or just one DocumentReference', + resolve: scopeInvariant(scopeOptions, getDocumentReferenceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.DocumentReferenceInstanceQuery + * @summary DocumentReference query. + */ +module.exports.DocumentReferenceInstanceQuery = { + description: 'Access information about a single DocumentReference', + resolve: scopeInvariant(scopeOptions, getDocumentReferenceInstance), + type: DocumentReferenceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/documentreference/register.js b/src/resources/4_0_0/profiles/documentreference/register.js new file mode 100644 index 00000000..094bfec8 --- /dev/null +++ b/src/resources/4_0_0/profiles/documentreference/register.js @@ -0,0 +1,48 @@ +const { + DocumentReferenceCreateMutation, + DocumentReferenceUpdateMutation, + DocumentReferenceRemoveMutation, +} = require('./mutation'); + +const { + DocumentReferenceQuery, + DocumentReferenceListQuery, + DocumentReferenceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + DocumentReference: DocumentReferenceQuery, + DocumentReferenceList: DocumentReferenceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + DocumentReferenceCreate: DocumentReferenceCreateMutation, + DocumentReferenceUpdate: DocumentReferenceUpdateMutation, + DocumentReferenceRemove: DocumentReferenceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'DocumentReference', + path: '/4_0_0/DocumentReference/:id', + query: DocumentReferenceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/documentreference/resolver.js b/src/resources/4_0_0/profiles/documentreference/resolver.js new file mode 100644 index 00000000..8e091616 --- /dev/null +++ b/src/resources/4_0_0/profiles/documentreference/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getDocumentReference + * @static + * @summary DocumentReference resolver. + */ +module.exports.getDocumentReference = function getDocumentReference( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDocumentReferenceList + * @static + * @summary DocumentReference list resolver. + */ +module.exports.getDocumentReferenceList = function getDocumentReferenceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getDocumentReferenceInstance + * @static + * @summary DocumentReference instance resolver. + */ +module.exports.getDocumentReferenceInstance = function getDocumentReferenceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createDocumentReference + * @static + * @summary Create DocumentReference resolver. + */ +module.exports.createDocumentReference = function createDocumentReference( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateDocumentReference + * @static + * @summary Update DocumentReference resolver. + */ +module.exports.updateDocumentReference = function updateDocumentReference( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeDocumentReference + * @static + * @summary Remove DocumentReference resolver. + */ +module.exports.removeDocumentReference = function removeDocumentReference( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/effectevidencesynthesis/mutation.js b/src/resources/4_0_0/profiles/effectevidencesynthesis/mutation.js new file mode 100644 index 00000000..bb5f8a47 --- /dev/null +++ b/src/resources/4_0_0/profiles/effectevidencesynthesis/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const EffectEvidenceSynthesisSchema = require('../../schemas/effectevidencesynthesis.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EffectEvidenceSynthesisInput = require('../../inputs/effectevidencesynthesis.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEffectEvidenceSynthesis, + updateEffectEvidenceSynthesis, + removeEffectEvidenceSynthesis, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EffectEvidenceSynthesis', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a EffectEvidenceSynthesis record.', + }, + resource: { + type: new GraphQLNonNull(EffectEvidenceSynthesisInput), + description: 'EffectEvidenceSynthesis Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a EffectEvidenceSynthesis record for deletion.', + }, +}; + +/** + * @name exports.EffectEvidenceSynthesisCreateMutation + * @summary EffectEvidenceSynthesisCreate mutation. + */ +module.exports.EffectEvidenceSynthesisCreateMutation = { + description: 'Create a EffectEvidenceSynthesis record', + resolve: scopeInvariant(scopeOptions, createEffectEvidenceSynthesis), + type: EffectEvidenceSynthesisSchema, + args: WriteArgs, +}; + +/** + * @name exports.EffectEvidenceSynthesisUpdateMutation + * @summary EffectEvidenceSynthesisUpdate mutation. + */ +module.exports.EffectEvidenceSynthesisUpdateMutation = { + description: 'Update a EffectEvidenceSynthesis record', + resolve: scopeInvariant(scopeOptions, updateEffectEvidenceSynthesis), + type: EffectEvidenceSynthesisSchema, + args: WriteArgs, +}; + +/** + * @name exports.EffectEvidenceSynthesisRemoveMutation + * @summary EffectEvidenceSynthesisRemove mutation. + */ +module.exports.EffectEvidenceSynthesisRemoveMutation = { + description: 'Remove a EffectEvidenceSynthesis record', + resolve: scopeInvariant(scopeOptions, removeEffectEvidenceSynthesis), + type: EffectEvidenceSynthesisSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/effectevidencesynthesis/query.js b/src/resources/4_0_0/profiles/effectevidencesynthesis/query.js new file mode 100644 index 00000000..c711657e --- /dev/null +++ b/src/resources/4_0_0/profiles/effectevidencesynthesis/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EffectEvidenceSynthesisSchema = require('../../schemas/effectevidencesynthesis.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EffectEvidenceSynthesisArgs = require('../../parameters/effectevidencesynthesis.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EffectEvidenceSynthesisArgs, +); + +// Resolvers +const { + getEffectEvidenceSynthesis, + getEffectEvidenceSynthesisList, + getEffectEvidenceSynthesisInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EffectEvidenceSynthesis', + action: 'read', +}; + +/** + * @name exports.EffectEvidenceSynthesisQuery + * @summary EffectEvidenceSynthesis query. + */ +module.exports.EffectEvidenceSynthesisQuery = { + description: 'Query for a single EffectEvidenceSynthesis', + resolve: scopeInvariant(scopeOptions, getEffectEvidenceSynthesis), + type: EffectEvidenceSynthesisSchema, + args: args, +}; + +/** + * @name exports.EffectEvidenceSynthesisListQuery + * @summary EffectEvidenceSynthesis query. + */ +module.exports.EffectEvidenceSynthesisListQuery = { + description: 'Query for a more than or just one EffectEvidenceSynthesis', + resolve: scopeInvariant(scopeOptions, getEffectEvidenceSynthesisList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EffectEvidenceSynthesisInstanceQuery + * @summary EffectEvidenceSynthesis query. + */ +module.exports.EffectEvidenceSynthesisInstanceQuery = { + description: 'Access information about a single EffectEvidenceSynthesis', + resolve: scopeInvariant(scopeOptions, getEffectEvidenceSynthesisInstance), + type: EffectEvidenceSynthesisSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/effectevidencesynthesis/register.js b/src/resources/4_0_0/profiles/effectevidencesynthesis/register.js new file mode 100644 index 00000000..05524a62 --- /dev/null +++ b/src/resources/4_0_0/profiles/effectevidencesynthesis/register.js @@ -0,0 +1,48 @@ +const { + EffectEvidenceSynthesisCreateMutation, + EffectEvidenceSynthesisUpdateMutation, + EffectEvidenceSynthesisRemoveMutation, +} = require('./mutation'); + +const { + EffectEvidenceSynthesisQuery, + EffectEvidenceSynthesisListQuery, + EffectEvidenceSynthesisInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + EffectEvidenceSynthesis: EffectEvidenceSynthesisQuery, + EffectEvidenceSynthesisList: EffectEvidenceSynthesisListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EffectEvidenceSynthesisCreate: EffectEvidenceSynthesisCreateMutation, + EffectEvidenceSynthesisUpdate: EffectEvidenceSynthesisUpdateMutation, + EffectEvidenceSynthesisRemove: EffectEvidenceSynthesisRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'EffectEvidenceSynthesis', + path: '/4_0_0/EffectEvidenceSynthesis/:id', + query: EffectEvidenceSynthesisInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/effectevidencesynthesis/resolver.js b/src/resources/4_0_0/profiles/effectevidencesynthesis/resolver.js new file mode 100644 index 00000000..e5b36b84 --- /dev/null +++ b/src/resources/4_0_0/profiles/effectevidencesynthesis/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEffectEvidenceSynthesis + * @static + * @summary EffectEvidenceSynthesis resolver. + */ +module.exports.getEffectEvidenceSynthesis = function getEffectEvidenceSynthesis( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEffectEvidenceSynthesisList + * @static + * @summary EffectEvidenceSynthesis list resolver. + */ +module.exports.getEffectEvidenceSynthesisList = function getEffectEvidenceSynthesisList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEffectEvidenceSynthesisInstance + * @static + * @summary EffectEvidenceSynthesis instance resolver. + */ +module.exports.getEffectEvidenceSynthesisInstance = function getEffectEvidenceSynthesisInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEffectEvidenceSynthesis + * @static + * @summary Create EffectEvidenceSynthesis resolver. + */ +module.exports.createEffectEvidenceSynthesis = function createEffectEvidenceSynthesis( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEffectEvidenceSynthesis + * @static + * @summary Update EffectEvidenceSynthesis resolver. + */ +module.exports.updateEffectEvidenceSynthesis = function updateEffectEvidenceSynthesis( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEffectEvidenceSynthesis + * @static + * @summary Remove EffectEvidenceSynthesis resolver. + */ +module.exports.removeEffectEvidenceSynthesis = function removeEffectEvidenceSynthesis( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/encounter/mutation.js b/src/resources/4_0_0/profiles/encounter/mutation.js new file mode 100644 index 00000000..d6382a40 --- /dev/null +++ b/src/resources/4_0_0/profiles/encounter/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const EncounterSchema = require('../../schemas/encounter.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EncounterInput = require('../../inputs/encounter.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEncounter, + updateEncounter, + removeEncounter, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Encounter', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Encounter record.', + }, + resource: { + type: new GraphQLNonNull(EncounterInput), + description: 'Encounter Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Encounter record for deletion.', + }, +}; + +/** + * @name exports.EncounterCreateMutation + * @summary EncounterCreate mutation. + */ +module.exports.EncounterCreateMutation = { + description: 'Create a Encounter record', + resolve: scopeInvariant(scopeOptions, createEncounter), + type: EncounterSchema, + args: WriteArgs, +}; + +/** + * @name exports.EncounterUpdateMutation + * @summary EncounterUpdate mutation. + */ +module.exports.EncounterUpdateMutation = { + description: 'Update a Encounter record', + resolve: scopeInvariant(scopeOptions, updateEncounter), + type: EncounterSchema, + args: WriteArgs, +}; + +/** + * @name exports.EncounterRemoveMutation + * @summary EncounterRemove mutation. + */ +module.exports.EncounterRemoveMutation = { + description: 'Remove a Encounter record', + resolve: scopeInvariant(scopeOptions, removeEncounter), + type: EncounterSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/encounter/query.js b/src/resources/4_0_0/profiles/encounter/query.js new file mode 100644 index 00000000..a660bb30 --- /dev/null +++ b/src/resources/4_0_0/profiles/encounter/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EncounterSchema = require('../../schemas/encounter.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EncounterArgs = require('../../parameters/encounter.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, EncounterArgs); + +// Resolvers +const { + getEncounter, + getEncounterList, + getEncounterInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Encounter', + action: 'read', +}; + +/** + * @name exports.EncounterQuery + * @summary Encounter query. + */ +module.exports.EncounterQuery = { + description: 'Query for a single Encounter', + resolve: scopeInvariant(scopeOptions, getEncounter), + type: EncounterSchema, + args: args, +}; + +/** + * @name exports.EncounterListQuery + * @summary Encounter query. + */ +module.exports.EncounterListQuery = { + description: 'Query for a more than or just one Encounter', + resolve: scopeInvariant(scopeOptions, getEncounterList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EncounterInstanceQuery + * @summary Encounter query. + */ +module.exports.EncounterInstanceQuery = { + description: 'Access information about a single Encounter', + resolve: scopeInvariant(scopeOptions, getEncounterInstance), + type: EncounterSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/encounter/register.js b/src/resources/4_0_0/profiles/encounter/register.js new file mode 100644 index 00000000..0b7c6874 --- /dev/null +++ b/src/resources/4_0_0/profiles/encounter/register.js @@ -0,0 +1,48 @@ +const { + EncounterCreateMutation, + EncounterUpdateMutation, + EncounterRemoveMutation, +} = require('./mutation'); + +const { + EncounterQuery, + EncounterListQuery, + EncounterInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Encounter: EncounterQuery, + EncounterList: EncounterListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EncounterCreate: EncounterCreateMutation, + EncounterUpdate: EncounterUpdateMutation, + EncounterRemove: EncounterRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Encounter', + path: '/4_0_0/Encounter/:id', + query: EncounterInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/encounter/resolver.js b/src/resources/4_0_0/profiles/encounter/resolver.js new file mode 100644 index 00000000..e4c048d5 --- /dev/null +++ b/src/resources/4_0_0/profiles/encounter/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEncounter + * @static + * @summary Encounter resolver. + */ +module.exports.getEncounter = function getEncounter( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEncounterList + * @static + * @summary Encounter list resolver. + */ +module.exports.getEncounterList = function getEncounterList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEncounterInstance + * @static + * @summary Encounter instance resolver. + */ +module.exports.getEncounterInstance = function getEncounterInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEncounter + * @static + * @summary Create Encounter resolver. + */ +module.exports.createEncounter = function createEncounter( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEncounter + * @static + * @summary Update Encounter resolver. + */ +module.exports.updateEncounter = function updateEncounter( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEncounter + * @static + * @summary Remove Encounter resolver. + */ +module.exports.removeEncounter = function removeEncounter( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/endpoint/mutation.js b/src/resources/4_0_0/profiles/endpoint/mutation.js new file mode 100644 index 00000000..1723167b --- /dev/null +++ b/src/resources/4_0_0/profiles/endpoint/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const EndpointSchema = require('../../schemas/endpoint.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EndpointInput = require('../../inputs/endpoint.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEndpoint, + updateEndpoint, + removeEndpoint, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Endpoint', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Endpoint record.', + }, + resource: { + type: new GraphQLNonNull(EndpointInput), + description: 'Endpoint Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Endpoint record for deletion.', + }, +}; + +/** + * @name exports.EndpointCreateMutation + * @summary EndpointCreate mutation. + */ +module.exports.EndpointCreateMutation = { + description: 'Create a Endpoint record', + resolve: scopeInvariant(scopeOptions, createEndpoint), + type: EndpointSchema, + args: WriteArgs, +}; + +/** + * @name exports.EndpointUpdateMutation + * @summary EndpointUpdate mutation. + */ +module.exports.EndpointUpdateMutation = { + description: 'Update a Endpoint record', + resolve: scopeInvariant(scopeOptions, updateEndpoint), + type: EndpointSchema, + args: WriteArgs, +}; + +/** + * @name exports.EndpointRemoveMutation + * @summary EndpointRemove mutation. + */ +module.exports.EndpointRemoveMutation = { + description: 'Remove a Endpoint record', + resolve: scopeInvariant(scopeOptions, removeEndpoint), + type: EndpointSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/endpoint/query.js b/src/resources/4_0_0/profiles/endpoint/query.js new file mode 100644 index 00000000..917a88b4 --- /dev/null +++ b/src/resources/4_0_0/profiles/endpoint/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EndpointSchema = require('../../schemas/endpoint.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EndpointArgs = require('../../parameters/endpoint.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, EndpointArgs); + +// Resolvers +const { + getEndpoint, + getEndpointList, + getEndpointInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Endpoint', + action: 'read', +}; + +/** + * @name exports.EndpointQuery + * @summary Endpoint query. + */ +module.exports.EndpointQuery = { + description: 'Query for a single Endpoint', + resolve: scopeInvariant(scopeOptions, getEndpoint), + type: EndpointSchema, + args: args, +}; + +/** + * @name exports.EndpointListQuery + * @summary Endpoint query. + */ +module.exports.EndpointListQuery = { + description: 'Query for a more than or just one Endpoint', + resolve: scopeInvariant(scopeOptions, getEndpointList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EndpointInstanceQuery + * @summary Endpoint query. + */ +module.exports.EndpointInstanceQuery = { + description: 'Access information about a single Endpoint', + resolve: scopeInvariant(scopeOptions, getEndpointInstance), + type: EndpointSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/endpoint/register.js b/src/resources/4_0_0/profiles/endpoint/register.js new file mode 100644 index 00000000..193a35e4 --- /dev/null +++ b/src/resources/4_0_0/profiles/endpoint/register.js @@ -0,0 +1,48 @@ +const { + EndpointCreateMutation, + EndpointUpdateMutation, + EndpointRemoveMutation, +} = require('./mutation'); + +const { + EndpointQuery, + EndpointListQuery, + EndpointInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Endpoint: EndpointQuery, + EndpointList: EndpointListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EndpointCreate: EndpointCreateMutation, + EndpointUpdate: EndpointUpdateMutation, + EndpointRemove: EndpointRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Endpoint', + path: '/4_0_0/Endpoint/:id', + query: EndpointInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/endpoint/resolver.js b/src/resources/4_0_0/profiles/endpoint/resolver.js new file mode 100644 index 00000000..ec6dab47 --- /dev/null +++ b/src/resources/4_0_0/profiles/endpoint/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEndpoint + * @static + * @summary Endpoint resolver. + */ +module.exports.getEndpoint = function getEndpoint( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEndpointList + * @static + * @summary Endpoint list resolver. + */ +module.exports.getEndpointList = function getEndpointList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEndpointInstance + * @static + * @summary Endpoint instance resolver. + */ +module.exports.getEndpointInstance = function getEndpointInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEndpoint + * @static + * @summary Create Endpoint resolver. + */ +module.exports.createEndpoint = function createEndpoint( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEndpoint + * @static + * @summary Update Endpoint resolver. + */ +module.exports.updateEndpoint = function updateEndpoint( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEndpoint + * @static + * @summary Remove Endpoint resolver. + */ +module.exports.removeEndpoint = function removeEndpoint( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/enrollmentrequest/mutation.js b/src/resources/4_0_0/profiles/enrollmentrequest/mutation.js new file mode 100644 index 00000000..78673a4a --- /dev/null +++ b/src/resources/4_0_0/profiles/enrollmentrequest/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EnrollmentRequestInput = require('../../inputs/enrollmentrequest.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEnrollmentRequest, + updateEnrollmentRequest, + removeEnrollmentRequest, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EnrollmentRequest', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a EnrollmentRequest record.', + }, + resource: { + type: new GraphQLNonNull(EnrollmentRequestInput), + description: 'EnrollmentRequest Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a EnrollmentRequest record for deletion.', + }, +}; + +/** + * @name exports.EnrollmentRequestCreateMutation + * @summary EnrollmentRequestCreate mutation. + */ +module.exports.EnrollmentRequestCreateMutation = { + description: 'Create a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, createEnrollmentRequest), + type: EnrollmentRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.EnrollmentRequestUpdateMutation + * @summary EnrollmentRequestUpdate mutation. + */ +module.exports.EnrollmentRequestUpdateMutation = { + description: 'Update a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, updateEnrollmentRequest), + type: EnrollmentRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.EnrollmentRequestRemoveMutation + * @summary EnrollmentRequestRemove mutation. + */ +module.exports.EnrollmentRequestRemoveMutation = { + description: 'Remove a EnrollmentRequest record', + resolve: scopeInvariant(scopeOptions, removeEnrollmentRequest), + type: EnrollmentRequestSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/enrollmentrequest/query.js b/src/resources/4_0_0/profiles/enrollmentrequest/query.js new file mode 100644 index 00000000..141a8bba --- /dev/null +++ b/src/resources/4_0_0/profiles/enrollmentrequest/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EnrollmentRequestSchema = require('../../schemas/enrollmentrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EnrollmentRequestArgs = require('../../parameters/enrollmentrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EnrollmentRequestArgs, +); + +// Resolvers +const { + getEnrollmentRequest, + getEnrollmentRequestList, + getEnrollmentRequestInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EnrollmentRequest', + action: 'read', +}; + +/** + * @name exports.EnrollmentRequestQuery + * @summary EnrollmentRequest query. + */ +module.exports.EnrollmentRequestQuery = { + description: 'Query for a single EnrollmentRequest', + resolve: scopeInvariant(scopeOptions, getEnrollmentRequest), + type: EnrollmentRequestSchema, + args: args, +}; + +/** + * @name exports.EnrollmentRequestListQuery + * @summary EnrollmentRequest query. + */ +module.exports.EnrollmentRequestListQuery = { + description: 'Query for a more than or just one EnrollmentRequest', + resolve: scopeInvariant(scopeOptions, getEnrollmentRequestList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EnrollmentRequestInstanceQuery + * @summary EnrollmentRequest query. + */ +module.exports.EnrollmentRequestInstanceQuery = { + description: 'Access information about a single EnrollmentRequest', + resolve: scopeInvariant(scopeOptions, getEnrollmentRequestInstance), + type: EnrollmentRequestSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/enrollmentrequest/register.js b/src/resources/4_0_0/profiles/enrollmentrequest/register.js new file mode 100644 index 00000000..1cf9e8c9 --- /dev/null +++ b/src/resources/4_0_0/profiles/enrollmentrequest/register.js @@ -0,0 +1,48 @@ +const { + EnrollmentRequestCreateMutation, + EnrollmentRequestUpdateMutation, + EnrollmentRequestRemoveMutation, +} = require('./mutation'); + +const { + EnrollmentRequestQuery, + EnrollmentRequestListQuery, + EnrollmentRequestInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + EnrollmentRequest: EnrollmentRequestQuery, + EnrollmentRequestList: EnrollmentRequestListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EnrollmentRequestCreate: EnrollmentRequestCreateMutation, + EnrollmentRequestUpdate: EnrollmentRequestUpdateMutation, + EnrollmentRequestRemove: EnrollmentRequestRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'EnrollmentRequest', + path: '/4_0_0/EnrollmentRequest/:id', + query: EnrollmentRequestInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/enrollmentrequest/resolver.js b/src/resources/4_0_0/profiles/enrollmentrequest/resolver.js new file mode 100644 index 00000000..f9a1f9a2 --- /dev/null +++ b/src/resources/4_0_0/profiles/enrollmentrequest/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEnrollmentRequest + * @static + * @summary EnrollmentRequest resolver. + */ +module.exports.getEnrollmentRequest = function getEnrollmentRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEnrollmentRequestList + * @static + * @summary EnrollmentRequest list resolver. + */ +module.exports.getEnrollmentRequestList = function getEnrollmentRequestList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEnrollmentRequestInstance + * @static + * @summary EnrollmentRequest instance resolver. + */ +module.exports.getEnrollmentRequestInstance = function getEnrollmentRequestInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEnrollmentRequest + * @static + * @summary Create EnrollmentRequest resolver. + */ +module.exports.createEnrollmentRequest = function createEnrollmentRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEnrollmentRequest + * @static + * @summary Update EnrollmentRequest resolver. + */ +module.exports.updateEnrollmentRequest = function updateEnrollmentRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEnrollmentRequest + * @static + * @summary Remove EnrollmentRequest resolver. + */ +module.exports.removeEnrollmentRequest = function removeEnrollmentRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/enrollmentresponse/mutation.js b/src/resources/4_0_0/profiles/enrollmentresponse/mutation.js new file mode 100644 index 00000000..0c1cd18b --- /dev/null +++ b/src/resources/4_0_0/profiles/enrollmentresponse/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EnrollmentResponseInput = require('../../inputs/enrollmentresponse.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEnrollmentResponse, + updateEnrollmentResponse, + removeEnrollmentResponse, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EnrollmentResponse', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a EnrollmentResponse record.', + }, + resource: { + type: new GraphQLNonNull(EnrollmentResponseInput), + description: 'EnrollmentResponse Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a EnrollmentResponse record for deletion.', + }, +}; + +/** + * @name exports.EnrollmentResponseCreateMutation + * @summary EnrollmentResponseCreate mutation. + */ +module.exports.EnrollmentResponseCreateMutation = { + description: 'Create a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, createEnrollmentResponse), + type: EnrollmentResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.EnrollmentResponseUpdateMutation + * @summary EnrollmentResponseUpdate mutation. + */ +module.exports.EnrollmentResponseUpdateMutation = { + description: 'Update a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, updateEnrollmentResponse), + type: EnrollmentResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.EnrollmentResponseRemoveMutation + * @summary EnrollmentResponseRemove mutation. + */ +module.exports.EnrollmentResponseRemoveMutation = { + description: 'Remove a EnrollmentResponse record', + resolve: scopeInvariant(scopeOptions, removeEnrollmentResponse), + type: EnrollmentResponseSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/enrollmentresponse/query.js b/src/resources/4_0_0/profiles/enrollmentresponse/query.js new file mode 100644 index 00000000..d35a1fce --- /dev/null +++ b/src/resources/4_0_0/profiles/enrollmentresponse/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EnrollmentResponseSchema = require('../../schemas/enrollmentresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EnrollmentResponseArgs = require('../../parameters/enrollmentresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EnrollmentResponseArgs, +); + +// Resolvers +const { + getEnrollmentResponse, + getEnrollmentResponseList, + getEnrollmentResponseInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EnrollmentResponse', + action: 'read', +}; + +/** + * @name exports.EnrollmentResponseQuery + * @summary EnrollmentResponse query. + */ +module.exports.EnrollmentResponseQuery = { + description: 'Query for a single EnrollmentResponse', + resolve: scopeInvariant(scopeOptions, getEnrollmentResponse), + type: EnrollmentResponseSchema, + args: args, +}; + +/** + * @name exports.EnrollmentResponseListQuery + * @summary EnrollmentResponse query. + */ +module.exports.EnrollmentResponseListQuery = { + description: 'Query for a more than or just one EnrollmentResponse', + resolve: scopeInvariant(scopeOptions, getEnrollmentResponseList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EnrollmentResponseInstanceQuery + * @summary EnrollmentResponse query. + */ +module.exports.EnrollmentResponseInstanceQuery = { + description: 'Access information about a single EnrollmentResponse', + resolve: scopeInvariant(scopeOptions, getEnrollmentResponseInstance), + type: EnrollmentResponseSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/enrollmentresponse/register.js b/src/resources/4_0_0/profiles/enrollmentresponse/register.js new file mode 100644 index 00000000..e00d5269 --- /dev/null +++ b/src/resources/4_0_0/profiles/enrollmentresponse/register.js @@ -0,0 +1,48 @@ +const { + EnrollmentResponseCreateMutation, + EnrollmentResponseUpdateMutation, + EnrollmentResponseRemoveMutation, +} = require('./mutation'); + +const { + EnrollmentResponseQuery, + EnrollmentResponseListQuery, + EnrollmentResponseInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + EnrollmentResponse: EnrollmentResponseQuery, + EnrollmentResponseList: EnrollmentResponseListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EnrollmentResponseCreate: EnrollmentResponseCreateMutation, + EnrollmentResponseUpdate: EnrollmentResponseUpdateMutation, + EnrollmentResponseRemove: EnrollmentResponseRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'EnrollmentResponse', + path: '/4_0_0/EnrollmentResponse/:id', + query: EnrollmentResponseInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/enrollmentresponse/resolver.js b/src/resources/4_0_0/profiles/enrollmentresponse/resolver.js new file mode 100644 index 00000000..1db2e2dd --- /dev/null +++ b/src/resources/4_0_0/profiles/enrollmentresponse/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEnrollmentResponse + * @static + * @summary EnrollmentResponse resolver. + */ +module.exports.getEnrollmentResponse = function getEnrollmentResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEnrollmentResponseList + * @static + * @summary EnrollmentResponse list resolver. + */ +module.exports.getEnrollmentResponseList = function getEnrollmentResponseList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEnrollmentResponseInstance + * @static + * @summary EnrollmentResponse instance resolver. + */ +module.exports.getEnrollmentResponseInstance = function getEnrollmentResponseInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEnrollmentResponse + * @static + * @summary Create EnrollmentResponse resolver. + */ +module.exports.createEnrollmentResponse = function createEnrollmentResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEnrollmentResponse + * @static + * @summary Update EnrollmentResponse resolver. + */ +module.exports.updateEnrollmentResponse = function updateEnrollmentResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEnrollmentResponse + * @static + * @summary Remove EnrollmentResponse resolver. + */ +module.exports.removeEnrollmentResponse = function removeEnrollmentResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/episodeofcare/mutation.js b/src/resources/4_0_0/profiles/episodeofcare/mutation.js new file mode 100644 index 00000000..82491f33 --- /dev/null +++ b/src/resources/4_0_0/profiles/episodeofcare/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EpisodeOfCareInput = require('../../inputs/episodeofcare.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEpisodeOfCare, + updateEpisodeOfCare, + removeEpisodeOfCare, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EpisodeOfCare', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a EpisodeOfCare record.', + }, + resource: { + type: new GraphQLNonNull(EpisodeOfCareInput), + description: 'EpisodeOfCare Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a EpisodeOfCare record for deletion.', + }, +}; + +/** + * @name exports.EpisodeOfCareCreateMutation + * @summary EpisodeOfCareCreate mutation. + */ +module.exports.EpisodeOfCareCreateMutation = { + description: 'Create a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, createEpisodeOfCare), + type: EpisodeOfCareSchema, + args: WriteArgs, +}; + +/** + * @name exports.EpisodeOfCareUpdateMutation + * @summary EpisodeOfCareUpdate mutation. + */ +module.exports.EpisodeOfCareUpdateMutation = { + description: 'Update a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, updateEpisodeOfCare), + type: EpisodeOfCareSchema, + args: WriteArgs, +}; + +/** + * @name exports.EpisodeOfCareRemoveMutation + * @summary EpisodeOfCareRemove mutation. + */ +module.exports.EpisodeOfCareRemoveMutation = { + description: 'Remove a EpisodeOfCare record', + resolve: scopeInvariant(scopeOptions, removeEpisodeOfCare), + type: EpisodeOfCareSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/episodeofcare/query.js b/src/resources/4_0_0/profiles/episodeofcare/query.js new file mode 100644 index 00000000..34bda91b --- /dev/null +++ b/src/resources/4_0_0/profiles/episodeofcare/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EpisodeOfCareSchema = require('../../schemas/episodeofcare.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EpisodeOfCareArgs = require('../../parameters/episodeofcare.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EpisodeOfCareArgs, +); + +// Resolvers +const { + getEpisodeOfCare, + getEpisodeOfCareList, + getEpisodeOfCareInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EpisodeOfCare', + action: 'read', +}; + +/** + * @name exports.EpisodeOfCareQuery + * @summary EpisodeOfCare query. + */ +module.exports.EpisodeOfCareQuery = { + description: 'Query for a single EpisodeOfCare', + resolve: scopeInvariant(scopeOptions, getEpisodeOfCare), + type: EpisodeOfCareSchema, + args: args, +}; + +/** + * @name exports.EpisodeOfCareListQuery + * @summary EpisodeOfCare query. + */ +module.exports.EpisodeOfCareListQuery = { + description: 'Query for a more than or just one EpisodeOfCare', + resolve: scopeInvariant(scopeOptions, getEpisodeOfCareList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EpisodeOfCareInstanceQuery + * @summary EpisodeOfCare query. + */ +module.exports.EpisodeOfCareInstanceQuery = { + description: 'Access information about a single EpisodeOfCare', + resolve: scopeInvariant(scopeOptions, getEpisodeOfCareInstance), + type: EpisodeOfCareSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/episodeofcare/register.js b/src/resources/4_0_0/profiles/episodeofcare/register.js new file mode 100644 index 00000000..68d7a64a --- /dev/null +++ b/src/resources/4_0_0/profiles/episodeofcare/register.js @@ -0,0 +1,48 @@ +const { + EpisodeOfCareCreateMutation, + EpisodeOfCareUpdateMutation, + EpisodeOfCareRemoveMutation, +} = require('./mutation'); + +const { + EpisodeOfCareQuery, + EpisodeOfCareListQuery, + EpisodeOfCareInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + EpisodeOfCare: EpisodeOfCareQuery, + EpisodeOfCareList: EpisodeOfCareListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EpisodeOfCareCreate: EpisodeOfCareCreateMutation, + EpisodeOfCareUpdate: EpisodeOfCareUpdateMutation, + EpisodeOfCareRemove: EpisodeOfCareRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'EpisodeOfCare', + path: '/4_0_0/EpisodeOfCare/:id', + query: EpisodeOfCareInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/episodeofcare/resolver.js b/src/resources/4_0_0/profiles/episodeofcare/resolver.js new file mode 100644 index 00000000..673af555 --- /dev/null +++ b/src/resources/4_0_0/profiles/episodeofcare/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEpisodeOfCare + * @static + * @summary EpisodeOfCare resolver. + */ +module.exports.getEpisodeOfCare = function getEpisodeOfCare( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEpisodeOfCareList + * @static + * @summary EpisodeOfCare list resolver. + */ +module.exports.getEpisodeOfCareList = function getEpisodeOfCareList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEpisodeOfCareInstance + * @static + * @summary EpisodeOfCare instance resolver. + */ +module.exports.getEpisodeOfCareInstance = function getEpisodeOfCareInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEpisodeOfCare + * @static + * @summary Create EpisodeOfCare resolver. + */ +module.exports.createEpisodeOfCare = function createEpisodeOfCare( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEpisodeOfCare + * @static + * @summary Update EpisodeOfCare resolver. + */ +module.exports.updateEpisodeOfCare = function updateEpisodeOfCare( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEpisodeOfCare + * @static + * @summary Remove EpisodeOfCare resolver. + */ +module.exports.removeEpisodeOfCare = function removeEpisodeOfCare( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/eventdefinition/mutation.js b/src/resources/4_0_0/profiles/eventdefinition/mutation.js new file mode 100644 index 00000000..fe481bad --- /dev/null +++ b/src/resources/4_0_0/profiles/eventdefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const EventDefinitionSchema = require('../../schemas/eventdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EventDefinitionInput = require('../../inputs/eventdefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEventDefinition, + updateEventDefinition, + removeEventDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EventDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a EventDefinition record.', + }, + resource: { + type: new GraphQLNonNull(EventDefinitionInput), + description: 'EventDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a EventDefinition record for deletion.', + }, +}; + +/** + * @name exports.EventDefinitionCreateMutation + * @summary EventDefinitionCreate mutation. + */ +module.exports.EventDefinitionCreateMutation = { + description: 'Create a EventDefinition record', + resolve: scopeInvariant(scopeOptions, createEventDefinition), + type: EventDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.EventDefinitionUpdateMutation + * @summary EventDefinitionUpdate mutation. + */ +module.exports.EventDefinitionUpdateMutation = { + description: 'Update a EventDefinition record', + resolve: scopeInvariant(scopeOptions, updateEventDefinition), + type: EventDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.EventDefinitionRemoveMutation + * @summary EventDefinitionRemove mutation. + */ +module.exports.EventDefinitionRemoveMutation = { + description: 'Remove a EventDefinition record', + resolve: scopeInvariant(scopeOptions, removeEventDefinition), + type: EventDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/eventdefinition/query.js b/src/resources/4_0_0/profiles/eventdefinition/query.js new file mode 100644 index 00000000..5c413295 --- /dev/null +++ b/src/resources/4_0_0/profiles/eventdefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EventDefinitionSchema = require('../../schemas/eventdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EventDefinitionArgs = require('../../parameters/eventdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EventDefinitionArgs, +); + +// Resolvers +const { + getEventDefinition, + getEventDefinitionList, + getEventDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EventDefinition', + action: 'read', +}; + +/** + * @name exports.EventDefinitionQuery + * @summary EventDefinition query. + */ +module.exports.EventDefinitionQuery = { + description: 'Query for a single EventDefinition', + resolve: scopeInvariant(scopeOptions, getEventDefinition), + type: EventDefinitionSchema, + args: args, +}; + +/** + * @name exports.EventDefinitionListQuery + * @summary EventDefinition query. + */ +module.exports.EventDefinitionListQuery = { + description: 'Query for a more than or just one EventDefinition', + resolve: scopeInvariant(scopeOptions, getEventDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EventDefinitionInstanceQuery + * @summary EventDefinition query. + */ +module.exports.EventDefinitionInstanceQuery = { + description: 'Access information about a single EventDefinition', + resolve: scopeInvariant(scopeOptions, getEventDefinitionInstance), + type: EventDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/eventdefinition/register.js b/src/resources/4_0_0/profiles/eventdefinition/register.js new file mode 100644 index 00000000..9d391fcc --- /dev/null +++ b/src/resources/4_0_0/profiles/eventdefinition/register.js @@ -0,0 +1,48 @@ +const { + EventDefinitionCreateMutation, + EventDefinitionUpdateMutation, + EventDefinitionRemoveMutation, +} = require('./mutation'); + +const { + EventDefinitionQuery, + EventDefinitionListQuery, + EventDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + EventDefinition: EventDefinitionQuery, + EventDefinitionList: EventDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EventDefinitionCreate: EventDefinitionCreateMutation, + EventDefinitionUpdate: EventDefinitionUpdateMutation, + EventDefinitionRemove: EventDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'EventDefinition', + path: '/4_0_0/EventDefinition/:id', + query: EventDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/eventdefinition/resolver.js b/src/resources/4_0_0/profiles/eventdefinition/resolver.js new file mode 100644 index 00000000..580c9d6c --- /dev/null +++ b/src/resources/4_0_0/profiles/eventdefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEventDefinition + * @static + * @summary EventDefinition resolver. + */ +module.exports.getEventDefinition = function getEventDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEventDefinitionList + * @static + * @summary EventDefinition list resolver. + */ +module.exports.getEventDefinitionList = function getEventDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEventDefinitionInstance + * @static + * @summary EventDefinition instance resolver. + */ +module.exports.getEventDefinitionInstance = function getEventDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEventDefinition + * @static + * @summary Create EventDefinition resolver. + */ +module.exports.createEventDefinition = function createEventDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEventDefinition + * @static + * @summary Update EventDefinition resolver. + */ +module.exports.updateEventDefinition = function updateEventDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEventDefinition + * @static + * @summary Remove EventDefinition resolver. + */ +module.exports.removeEventDefinition = function removeEventDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/evidence/mutation.js b/src/resources/4_0_0/profiles/evidence/mutation.js new file mode 100644 index 00000000..86e5a129 --- /dev/null +++ b/src/resources/4_0_0/profiles/evidence/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const EvidenceSchema = require('../../schemas/evidence.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EvidenceInput = require('../../inputs/evidence.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEvidence, + updateEvidence, + removeEvidence, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Evidence', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Evidence record.', + }, + resource: { + type: new GraphQLNonNull(EvidenceInput), + description: 'Evidence Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Evidence record for deletion.', + }, +}; + +/** + * @name exports.EvidenceCreateMutation + * @summary EvidenceCreate mutation. + */ +module.exports.EvidenceCreateMutation = { + description: 'Create a Evidence record', + resolve: scopeInvariant(scopeOptions, createEvidence), + type: EvidenceSchema, + args: WriteArgs, +}; + +/** + * @name exports.EvidenceUpdateMutation + * @summary EvidenceUpdate mutation. + */ +module.exports.EvidenceUpdateMutation = { + description: 'Update a Evidence record', + resolve: scopeInvariant(scopeOptions, updateEvidence), + type: EvidenceSchema, + args: WriteArgs, +}; + +/** + * @name exports.EvidenceRemoveMutation + * @summary EvidenceRemove mutation. + */ +module.exports.EvidenceRemoveMutation = { + description: 'Remove a Evidence record', + resolve: scopeInvariant(scopeOptions, removeEvidence), + type: EvidenceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/evidence/query.js b/src/resources/4_0_0/profiles/evidence/query.js new file mode 100644 index 00000000..99a735bb --- /dev/null +++ b/src/resources/4_0_0/profiles/evidence/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EvidenceSchema = require('../../schemas/evidence.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EvidenceArgs = require('../../parameters/evidence.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, EvidenceArgs); + +// Resolvers +const { + getEvidence, + getEvidenceList, + getEvidenceInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Evidence', + action: 'read', +}; + +/** + * @name exports.EvidenceQuery + * @summary Evidence query. + */ +module.exports.EvidenceQuery = { + description: 'Query for a single Evidence', + resolve: scopeInvariant(scopeOptions, getEvidence), + type: EvidenceSchema, + args: args, +}; + +/** + * @name exports.EvidenceListQuery + * @summary Evidence query. + */ +module.exports.EvidenceListQuery = { + description: 'Query for a more than or just one Evidence', + resolve: scopeInvariant(scopeOptions, getEvidenceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EvidenceInstanceQuery + * @summary Evidence query. + */ +module.exports.EvidenceInstanceQuery = { + description: 'Access information about a single Evidence', + resolve: scopeInvariant(scopeOptions, getEvidenceInstance), + type: EvidenceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/evidence/register.js b/src/resources/4_0_0/profiles/evidence/register.js new file mode 100644 index 00000000..370851ca --- /dev/null +++ b/src/resources/4_0_0/profiles/evidence/register.js @@ -0,0 +1,48 @@ +const { + EvidenceCreateMutation, + EvidenceUpdateMutation, + EvidenceRemoveMutation, +} = require('./mutation'); + +const { + EvidenceQuery, + EvidenceListQuery, + EvidenceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Evidence: EvidenceQuery, + EvidenceList: EvidenceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EvidenceCreate: EvidenceCreateMutation, + EvidenceUpdate: EvidenceUpdateMutation, + EvidenceRemove: EvidenceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Evidence', + path: '/4_0_0/Evidence/:id', + query: EvidenceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/evidence/resolver.js b/src/resources/4_0_0/profiles/evidence/resolver.js new file mode 100644 index 00000000..be160174 --- /dev/null +++ b/src/resources/4_0_0/profiles/evidence/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEvidence + * @static + * @summary Evidence resolver. + */ +module.exports.getEvidence = function getEvidence( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEvidenceList + * @static + * @summary Evidence list resolver. + */ +module.exports.getEvidenceList = function getEvidenceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEvidenceInstance + * @static + * @summary Evidence instance resolver. + */ +module.exports.getEvidenceInstance = function getEvidenceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEvidence + * @static + * @summary Create Evidence resolver. + */ +module.exports.createEvidence = function createEvidence( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEvidence + * @static + * @summary Update Evidence resolver. + */ +module.exports.updateEvidence = function updateEvidence( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEvidence + * @static + * @summary Remove Evidence resolver. + */ +module.exports.removeEvidence = function removeEvidence( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/evidencevariable/mutation.js b/src/resources/4_0_0/profiles/evidencevariable/mutation.js new file mode 100644 index 00000000..a93ed519 --- /dev/null +++ b/src/resources/4_0_0/profiles/evidencevariable/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const EvidenceVariableSchema = require('../../schemas/evidencevariable.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const EvidenceVariableInput = require('../../inputs/evidencevariable.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createEvidenceVariable, + updateEvidenceVariable, + removeEvidenceVariable, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EvidenceVariable', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a EvidenceVariable record.', + }, + resource: { + type: new GraphQLNonNull(EvidenceVariableInput), + description: 'EvidenceVariable Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a EvidenceVariable record for deletion.', + }, +}; + +/** + * @name exports.EvidenceVariableCreateMutation + * @summary EvidenceVariableCreate mutation. + */ +module.exports.EvidenceVariableCreateMutation = { + description: 'Create a EvidenceVariable record', + resolve: scopeInvariant(scopeOptions, createEvidenceVariable), + type: EvidenceVariableSchema, + args: WriteArgs, +}; + +/** + * @name exports.EvidenceVariableUpdateMutation + * @summary EvidenceVariableUpdate mutation. + */ +module.exports.EvidenceVariableUpdateMutation = { + description: 'Update a EvidenceVariable record', + resolve: scopeInvariant(scopeOptions, updateEvidenceVariable), + type: EvidenceVariableSchema, + args: WriteArgs, +}; + +/** + * @name exports.EvidenceVariableRemoveMutation + * @summary EvidenceVariableRemove mutation. + */ +module.exports.EvidenceVariableRemoveMutation = { + description: 'Remove a EvidenceVariable record', + resolve: scopeInvariant(scopeOptions, removeEvidenceVariable), + type: EvidenceVariableSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/evidencevariable/query.js b/src/resources/4_0_0/profiles/evidencevariable/query.js new file mode 100644 index 00000000..732215ac --- /dev/null +++ b/src/resources/4_0_0/profiles/evidencevariable/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const EvidenceVariableSchema = require('../../schemas/evidencevariable.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const EvidenceVariableArgs = require('../../parameters/evidencevariable.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + EvidenceVariableArgs, +); + +// Resolvers +const { + getEvidenceVariable, + getEvidenceVariableList, + getEvidenceVariableInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'EvidenceVariable', + action: 'read', +}; + +/** + * @name exports.EvidenceVariableQuery + * @summary EvidenceVariable query. + */ +module.exports.EvidenceVariableQuery = { + description: 'Query for a single EvidenceVariable', + resolve: scopeInvariant(scopeOptions, getEvidenceVariable), + type: EvidenceVariableSchema, + args: args, +}; + +/** + * @name exports.EvidenceVariableListQuery + * @summary EvidenceVariable query. + */ +module.exports.EvidenceVariableListQuery = { + description: 'Query for a more than or just one EvidenceVariable', + resolve: scopeInvariant(scopeOptions, getEvidenceVariableList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.EvidenceVariableInstanceQuery + * @summary EvidenceVariable query. + */ +module.exports.EvidenceVariableInstanceQuery = { + description: 'Access information about a single EvidenceVariable', + resolve: scopeInvariant(scopeOptions, getEvidenceVariableInstance), + type: EvidenceVariableSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/evidencevariable/register.js b/src/resources/4_0_0/profiles/evidencevariable/register.js new file mode 100644 index 00000000..3caa81b7 --- /dev/null +++ b/src/resources/4_0_0/profiles/evidencevariable/register.js @@ -0,0 +1,48 @@ +const { + EvidenceVariableCreateMutation, + EvidenceVariableUpdateMutation, + EvidenceVariableRemoveMutation, +} = require('./mutation'); + +const { + EvidenceVariableQuery, + EvidenceVariableListQuery, + EvidenceVariableInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + EvidenceVariable: EvidenceVariableQuery, + EvidenceVariableList: EvidenceVariableListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + EvidenceVariableCreate: EvidenceVariableCreateMutation, + EvidenceVariableUpdate: EvidenceVariableUpdateMutation, + EvidenceVariableRemove: EvidenceVariableRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'EvidenceVariable', + path: '/4_0_0/EvidenceVariable/:id', + query: EvidenceVariableInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/evidencevariable/resolver.js b/src/resources/4_0_0/profiles/evidencevariable/resolver.js new file mode 100644 index 00000000..4bbc1bd0 --- /dev/null +++ b/src/resources/4_0_0/profiles/evidencevariable/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getEvidenceVariable + * @static + * @summary EvidenceVariable resolver. + */ +module.exports.getEvidenceVariable = function getEvidenceVariable( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEvidenceVariableList + * @static + * @summary EvidenceVariable list resolver. + */ +module.exports.getEvidenceVariableList = function getEvidenceVariableList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getEvidenceVariableInstance + * @static + * @summary EvidenceVariable instance resolver. + */ +module.exports.getEvidenceVariableInstance = function getEvidenceVariableInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createEvidenceVariable + * @static + * @summary Create EvidenceVariable resolver. + */ +module.exports.createEvidenceVariable = function createEvidenceVariable( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateEvidenceVariable + * @static + * @summary Update EvidenceVariable resolver. + */ +module.exports.updateEvidenceVariable = function updateEvidenceVariable( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeEvidenceVariable + * @static + * @summary Remove EvidenceVariable resolver. + */ +module.exports.removeEvidenceVariable = function removeEvidenceVariable( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/examplescenario/mutation.js b/src/resources/4_0_0/profiles/examplescenario/mutation.js new file mode 100644 index 00000000..485d6227 --- /dev/null +++ b/src/resources/4_0_0/profiles/examplescenario/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ExampleScenarioSchema = require('../../schemas/examplescenario.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ExampleScenarioInput = require('../../inputs/examplescenario.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createExampleScenario, + updateExampleScenario, + removeExampleScenario, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ExampleScenario', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ExampleScenario record.', + }, + resource: { + type: new GraphQLNonNull(ExampleScenarioInput), + description: 'ExampleScenario Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ExampleScenario record for deletion.', + }, +}; + +/** + * @name exports.ExampleScenarioCreateMutation + * @summary ExampleScenarioCreate mutation. + */ +module.exports.ExampleScenarioCreateMutation = { + description: 'Create a ExampleScenario record', + resolve: scopeInvariant(scopeOptions, createExampleScenario), + type: ExampleScenarioSchema, + args: WriteArgs, +}; + +/** + * @name exports.ExampleScenarioUpdateMutation + * @summary ExampleScenarioUpdate mutation. + */ +module.exports.ExampleScenarioUpdateMutation = { + description: 'Update a ExampleScenario record', + resolve: scopeInvariant(scopeOptions, updateExampleScenario), + type: ExampleScenarioSchema, + args: WriteArgs, +}; + +/** + * @name exports.ExampleScenarioRemoveMutation + * @summary ExampleScenarioRemove mutation. + */ +module.exports.ExampleScenarioRemoveMutation = { + description: 'Remove a ExampleScenario record', + resolve: scopeInvariant(scopeOptions, removeExampleScenario), + type: ExampleScenarioSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/examplescenario/query.js b/src/resources/4_0_0/profiles/examplescenario/query.js new file mode 100644 index 00000000..b1b8644a --- /dev/null +++ b/src/resources/4_0_0/profiles/examplescenario/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ExampleScenarioSchema = require('../../schemas/examplescenario.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ExampleScenarioArgs = require('../../parameters/examplescenario.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ExampleScenarioArgs, +); + +// Resolvers +const { + getExampleScenario, + getExampleScenarioList, + getExampleScenarioInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ExampleScenario', + action: 'read', +}; + +/** + * @name exports.ExampleScenarioQuery + * @summary ExampleScenario query. + */ +module.exports.ExampleScenarioQuery = { + description: 'Query for a single ExampleScenario', + resolve: scopeInvariant(scopeOptions, getExampleScenario), + type: ExampleScenarioSchema, + args: args, +}; + +/** + * @name exports.ExampleScenarioListQuery + * @summary ExampleScenario query. + */ +module.exports.ExampleScenarioListQuery = { + description: 'Query for a more than or just one ExampleScenario', + resolve: scopeInvariant(scopeOptions, getExampleScenarioList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ExampleScenarioInstanceQuery + * @summary ExampleScenario query. + */ +module.exports.ExampleScenarioInstanceQuery = { + description: 'Access information about a single ExampleScenario', + resolve: scopeInvariant(scopeOptions, getExampleScenarioInstance), + type: ExampleScenarioSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/examplescenario/register.js b/src/resources/4_0_0/profiles/examplescenario/register.js new file mode 100644 index 00000000..b0a0567f --- /dev/null +++ b/src/resources/4_0_0/profiles/examplescenario/register.js @@ -0,0 +1,48 @@ +const { + ExampleScenarioCreateMutation, + ExampleScenarioUpdateMutation, + ExampleScenarioRemoveMutation, +} = require('./mutation'); + +const { + ExampleScenarioQuery, + ExampleScenarioListQuery, + ExampleScenarioInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ExampleScenario: ExampleScenarioQuery, + ExampleScenarioList: ExampleScenarioListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ExampleScenarioCreate: ExampleScenarioCreateMutation, + ExampleScenarioUpdate: ExampleScenarioUpdateMutation, + ExampleScenarioRemove: ExampleScenarioRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ExampleScenario', + path: '/4_0_0/ExampleScenario/:id', + query: ExampleScenarioInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/examplescenario/resolver.js b/src/resources/4_0_0/profiles/examplescenario/resolver.js new file mode 100644 index 00000000..5ee2cfaa --- /dev/null +++ b/src/resources/4_0_0/profiles/examplescenario/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getExampleScenario + * @static + * @summary ExampleScenario resolver. + */ +module.exports.getExampleScenario = function getExampleScenario( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getExampleScenarioList + * @static + * @summary ExampleScenario list resolver. + */ +module.exports.getExampleScenarioList = function getExampleScenarioList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getExampleScenarioInstance + * @static + * @summary ExampleScenario instance resolver. + */ +module.exports.getExampleScenarioInstance = function getExampleScenarioInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createExampleScenario + * @static + * @summary Create ExampleScenario resolver. + */ +module.exports.createExampleScenario = function createExampleScenario( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateExampleScenario + * @static + * @summary Update ExampleScenario resolver. + */ +module.exports.updateExampleScenario = function updateExampleScenario( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeExampleScenario + * @static + * @summary Remove ExampleScenario resolver. + */ +module.exports.removeExampleScenario = function removeExampleScenario( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/explanationofbenefit/mutation.js b/src/resources/4_0_0/profiles/explanationofbenefit/mutation.js new file mode 100644 index 00000000..6111985e --- /dev/null +++ b/src/resources/4_0_0/profiles/explanationofbenefit/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ExplanationOfBenefitInput = require('../../inputs/explanationofbenefit.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createExplanationOfBenefit, + updateExplanationOfBenefit, + removeExplanationOfBenefit, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ExplanationOfBenefit', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ExplanationOfBenefit record.', + }, + resource: { + type: new GraphQLNonNull(ExplanationOfBenefitInput), + description: 'ExplanationOfBenefit Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ExplanationOfBenefit record for deletion.', + }, +}; + +/** + * @name exports.ExplanationOfBenefitCreateMutation + * @summary ExplanationOfBenefitCreate mutation. + */ +module.exports.ExplanationOfBenefitCreateMutation = { + description: 'Create a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, createExplanationOfBenefit), + type: ExplanationOfBenefitSchema, + args: WriteArgs, +}; + +/** + * @name exports.ExplanationOfBenefitUpdateMutation + * @summary ExplanationOfBenefitUpdate mutation. + */ +module.exports.ExplanationOfBenefitUpdateMutation = { + description: 'Update a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, updateExplanationOfBenefit), + type: ExplanationOfBenefitSchema, + args: WriteArgs, +}; + +/** + * @name exports.ExplanationOfBenefitRemoveMutation + * @summary ExplanationOfBenefitRemove mutation. + */ +module.exports.ExplanationOfBenefitRemoveMutation = { + description: 'Remove a ExplanationOfBenefit record', + resolve: scopeInvariant(scopeOptions, removeExplanationOfBenefit), + type: ExplanationOfBenefitSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/explanationofbenefit/query.js b/src/resources/4_0_0/profiles/explanationofbenefit/query.js new file mode 100644 index 00000000..14eda3da --- /dev/null +++ b/src/resources/4_0_0/profiles/explanationofbenefit/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ExplanationOfBenefitSchema = require('../../schemas/explanationofbenefit.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ExplanationOfBenefitArgs = require('../../parameters/explanationofbenefit.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ExplanationOfBenefitArgs, +); + +// Resolvers +const { + getExplanationOfBenefit, + getExplanationOfBenefitList, + getExplanationOfBenefitInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ExplanationOfBenefit', + action: 'read', +}; + +/** + * @name exports.ExplanationOfBenefitQuery + * @summary ExplanationOfBenefit query. + */ +module.exports.ExplanationOfBenefitQuery = { + description: 'Query for a single ExplanationOfBenefit', + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefit), + type: ExplanationOfBenefitSchema, + args: args, +}; + +/** + * @name exports.ExplanationOfBenefitListQuery + * @summary ExplanationOfBenefit query. + */ +module.exports.ExplanationOfBenefitListQuery = { + description: 'Query for a more than or just one ExplanationOfBenefit', + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefitList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ExplanationOfBenefitInstanceQuery + * @summary ExplanationOfBenefit query. + */ +module.exports.ExplanationOfBenefitInstanceQuery = { + description: 'Access information about a single ExplanationOfBenefit', + resolve: scopeInvariant(scopeOptions, getExplanationOfBenefitInstance), + type: ExplanationOfBenefitSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/explanationofbenefit/register.js b/src/resources/4_0_0/profiles/explanationofbenefit/register.js new file mode 100644 index 00000000..679e37a2 --- /dev/null +++ b/src/resources/4_0_0/profiles/explanationofbenefit/register.js @@ -0,0 +1,48 @@ +const { + ExplanationOfBenefitCreateMutation, + ExplanationOfBenefitUpdateMutation, + ExplanationOfBenefitRemoveMutation, +} = require('./mutation'); + +const { + ExplanationOfBenefitQuery, + ExplanationOfBenefitListQuery, + ExplanationOfBenefitInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ExplanationOfBenefit: ExplanationOfBenefitQuery, + ExplanationOfBenefitList: ExplanationOfBenefitListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ExplanationOfBenefitCreate: ExplanationOfBenefitCreateMutation, + ExplanationOfBenefitUpdate: ExplanationOfBenefitUpdateMutation, + ExplanationOfBenefitRemove: ExplanationOfBenefitRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ExplanationOfBenefit', + path: '/4_0_0/ExplanationOfBenefit/:id', + query: ExplanationOfBenefitInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/explanationofbenefit/resolver.js b/src/resources/4_0_0/profiles/explanationofbenefit/resolver.js new file mode 100644 index 00000000..5f049eb4 --- /dev/null +++ b/src/resources/4_0_0/profiles/explanationofbenefit/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getExplanationOfBenefit + * @static + * @summary ExplanationOfBenefit resolver. + */ +module.exports.getExplanationOfBenefit = function getExplanationOfBenefit( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getExplanationOfBenefitList + * @static + * @summary ExplanationOfBenefit list resolver. + */ +module.exports.getExplanationOfBenefitList = function getExplanationOfBenefitList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getExplanationOfBenefitInstance + * @static + * @summary ExplanationOfBenefit instance resolver. + */ +module.exports.getExplanationOfBenefitInstance = function getExplanationOfBenefitInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createExplanationOfBenefit + * @static + * @summary Create ExplanationOfBenefit resolver. + */ +module.exports.createExplanationOfBenefit = function createExplanationOfBenefit( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateExplanationOfBenefit + * @static + * @summary Update ExplanationOfBenefit resolver. + */ +module.exports.updateExplanationOfBenefit = function updateExplanationOfBenefit( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeExplanationOfBenefit + * @static + * @summary Remove ExplanationOfBenefit resolver. + */ +module.exports.removeExplanationOfBenefit = function removeExplanationOfBenefit( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/familymemberhistory/mutation.js b/src/resources/4_0_0/profiles/familymemberhistory/mutation.js new file mode 100644 index 00000000..b6028350 --- /dev/null +++ b/src/resources/4_0_0/profiles/familymemberhistory/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const FamilyMemberHistoryInput = require('../../inputs/familymemberhistory.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createFamilyMemberHistory, + updateFamilyMemberHistory, + removeFamilyMemberHistory, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'FamilyMemberHistory', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a FamilyMemberHistory record.', + }, + resource: { + type: new GraphQLNonNull(FamilyMemberHistoryInput), + description: 'FamilyMemberHistory Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a FamilyMemberHistory record for deletion.', + }, +}; + +/** + * @name exports.FamilyMemberHistoryCreateMutation + * @summary FamilyMemberHistoryCreate mutation. + */ +module.exports.FamilyMemberHistoryCreateMutation = { + description: 'Create a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, createFamilyMemberHistory), + type: FamilyMemberHistorySchema, + args: WriteArgs, +}; + +/** + * @name exports.FamilyMemberHistoryUpdateMutation + * @summary FamilyMemberHistoryUpdate mutation. + */ +module.exports.FamilyMemberHistoryUpdateMutation = { + description: 'Update a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, updateFamilyMemberHistory), + type: FamilyMemberHistorySchema, + args: WriteArgs, +}; + +/** + * @name exports.FamilyMemberHistoryRemoveMutation + * @summary FamilyMemberHistoryRemove mutation. + */ +module.exports.FamilyMemberHistoryRemoveMutation = { + description: 'Remove a FamilyMemberHistory record', + resolve: scopeInvariant(scopeOptions, removeFamilyMemberHistory), + type: FamilyMemberHistorySchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/familymemberhistory/query.js b/src/resources/4_0_0/profiles/familymemberhistory/query.js new file mode 100644 index 00000000..9d365b62 --- /dev/null +++ b/src/resources/4_0_0/profiles/familymemberhistory/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const FamilyMemberHistorySchema = require('../../schemas/familymemberhistory.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const FamilyMemberHistoryArgs = require('../../parameters/familymemberhistory.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + FamilyMemberHistoryArgs, +); + +// Resolvers +const { + getFamilyMemberHistory, + getFamilyMemberHistoryList, + getFamilyMemberHistoryInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'FamilyMemberHistory', + action: 'read', +}; + +/** + * @name exports.FamilyMemberHistoryQuery + * @summary FamilyMemberHistory query. + */ +module.exports.FamilyMemberHistoryQuery = { + description: 'Query for a single FamilyMemberHistory', + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistory), + type: FamilyMemberHistorySchema, + args: args, +}; + +/** + * @name exports.FamilyMemberHistoryListQuery + * @summary FamilyMemberHistory query. + */ +module.exports.FamilyMemberHistoryListQuery = { + description: 'Query for a more than or just one FamilyMemberHistory', + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistoryList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.FamilyMemberHistoryInstanceQuery + * @summary FamilyMemberHistory query. + */ +module.exports.FamilyMemberHistoryInstanceQuery = { + description: 'Access information about a single FamilyMemberHistory', + resolve: scopeInvariant(scopeOptions, getFamilyMemberHistoryInstance), + type: FamilyMemberHistorySchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/familymemberhistory/register.js b/src/resources/4_0_0/profiles/familymemberhistory/register.js new file mode 100644 index 00000000..520388dd --- /dev/null +++ b/src/resources/4_0_0/profiles/familymemberhistory/register.js @@ -0,0 +1,48 @@ +const { + FamilyMemberHistoryCreateMutation, + FamilyMemberHistoryUpdateMutation, + FamilyMemberHistoryRemoveMutation, +} = require('./mutation'); + +const { + FamilyMemberHistoryQuery, + FamilyMemberHistoryListQuery, + FamilyMemberHistoryInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + FamilyMemberHistory: FamilyMemberHistoryQuery, + FamilyMemberHistoryList: FamilyMemberHistoryListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + FamilyMemberHistoryCreate: FamilyMemberHistoryCreateMutation, + FamilyMemberHistoryUpdate: FamilyMemberHistoryUpdateMutation, + FamilyMemberHistoryRemove: FamilyMemberHistoryRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'FamilyMemberHistory', + path: '/4_0_0/FamilyMemberHistory/:id', + query: FamilyMemberHistoryInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/familymemberhistory/resolver.js b/src/resources/4_0_0/profiles/familymemberhistory/resolver.js new file mode 100644 index 00000000..d042eb2f --- /dev/null +++ b/src/resources/4_0_0/profiles/familymemberhistory/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getFamilyMemberHistory + * @static + * @summary FamilyMemberHistory resolver. + */ +module.exports.getFamilyMemberHistory = function getFamilyMemberHistory( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getFamilyMemberHistoryList + * @static + * @summary FamilyMemberHistory list resolver. + */ +module.exports.getFamilyMemberHistoryList = function getFamilyMemberHistoryList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getFamilyMemberHistoryInstance + * @static + * @summary FamilyMemberHistory instance resolver. + */ +module.exports.getFamilyMemberHistoryInstance = function getFamilyMemberHistoryInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createFamilyMemberHistory + * @static + * @summary Create FamilyMemberHistory resolver. + */ +module.exports.createFamilyMemberHistory = function createFamilyMemberHistory( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateFamilyMemberHistory + * @static + * @summary Update FamilyMemberHistory resolver. + */ +module.exports.updateFamilyMemberHistory = function updateFamilyMemberHistory( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeFamilyMemberHistory + * @static + * @summary Remove FamilyMemberHistory resolver. + */ +module.exports.removeFamilyMemberHistory = function removeFamilyMemberHistory( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/flag/mutation.js b/src/resources/4_0_0/profiles/flag/mutation.js new file mode 100644 index 00000000..5fde8e5a --- /dev/null +++ b/src/resources/4_0_0/profiles/flag/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const FlagSchema = require('../../schemas/flag.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const FlagInput = require('../../inputs/flag.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createFlag, updateFlag, removeFlag } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Flag', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Flag record.', + }, + resource: { + type: new GraphQLNonNull(FlagInput), + description: 'Flag Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a Flag record for deletion.', + }, +}; + +/** + * @name exports.FlagCreateMutation + * @summary FlagCreate mutation. + */ +module.exports.FlagCreateMutation = { + description: 'Create a Flag record', + resolve: scopeInvariant(scopeOptions, createFlag), + type: FlagSchema, + args: WriteArgs, +}; + +/** + * @name exports.FlagUpdateMutation + * @summary FlagUpdate mutation. + */ +module.exports.FlagUpdateMutation = { + description: 'Update a Flag record', + resolve: scopeInvariant(scopeOptions, updateFlag), + type: FlagSchema, + args: WriteArgs, +}; + +/** + * @name exports.FlagRemoveMutation + * @summary FlagRemove mutation. + */ +module.exports.FlagRemoveMutation = { + description: 'Remove a Flag record', + resolve: scopeInvariant(scopeOptions, removeFlag), + type: FlagSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/flag/query.js b/src/resources/4_0_0/profiles/flag/query.js new file mode 100644 index 00000000..56fe2af9 --- /dev/null +++ b/src/resources/4_0_0/profiles/flag/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const FlagSchema = require('../../schemas/flag.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const FlagArgs = require('../../parameters/flag.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, FlagArgs); + +// Resolvers +const { getFlag, getFlagList, getFlagInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Flag', + action: 'read', +}; + +/** + * @name exports.FlagQuery + * @summary Flag query. + */ +module.exports.FlagQuery = { + description: 'Query for a single Flag', + resolve: scopeInvariant(scopeOptions, getFlag), + type: FlagSchema, + args: args, +}; + +/** + * @name exports.FlagListQuery + * @summary Flag query. + */ +module.exports.FlagListQuery = { + description: 'Query for a more than or just one Flag', + resolve: scopeInvariant(scopeOptions, getFlagList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.FlagInstanceQuery + * @summary Flag query. + */ +module.exports.FlagInstanceQuery = { + description: 'Access information about a single Flag', + resolve: scopeInvariant(scopeOptions, getFlagInstance), + type: FlagSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/flag/register.js b/src/resources/4_0_0/profiles/flag/register.js new file mode 100644 index 00000000..c485c5a3 --- /dev/null +++ b/src/resources/4_0_0/profiles/flag/register.js @@ -0,0 +1,44 @@ +const { + FlagCreateMutation, + FlagUpdateMutation, + FlagRemoveMutation, +} = require('./mutation'); + +const { FlagQuery, FlagListQuery, FlagInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Flag: FlagQuery, + FlagList: FlagListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + FlagCreate: FlagCreateMutation, + FlagUpdate: FlagUpdateMutation, + FlagRemove: FlagRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Flag', + path: '/4_0_0/Flag/:id', + query: FlagInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/flag/resolver.js b/src/resources/4_0_0/profiles/flag/resolver.js new file mode 100644 index 00000000..a6301664 --- /dev/null +++ b/src/resources/4_0_0/profiles/flag/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getFlag + * @static + * @summary Flag resolver. + */ +module.exports.getFlag = function getFlag(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getFlagList + * @static + * @summary Flag list resolver. + */ +module.exports.getFlagList = function getFlagList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getFlagInstance + * @static + * @summary Flag instance resolver. + */ +module.exports.getFlagInstance = function getFlagInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createFlag + * @static + * @summary Create Flag resolver. + */ +module.exports.createFlag = function createFlag( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateFlag + * @static + * @summary Update Flag resolver. + */ +module.exports.updateFlag = function updateFlag( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeFlag + * @static + * @summary Remove Flag resolver. + */ +module.exports.removeFlag = function removeFlag( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/goal/mutation.js b/src/resources/4_0_0/profiles/goal/mutation.js new file mode 100644 index 00000000..21b3746c --- /dev/null +++ b/src/resources/4_0_0/profiles/goal/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const GoalSchema = require('../../schemas/goal.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const GoalInput = require('../../inputs/goal.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createGoal, updateGoal, removeGoal } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Goal', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Goal record.', + }, + resource: { + type: new GraphQLNonNull(GoalInput), + description: 'Goal Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a Goal record for deletion.', + }, +}; + +/** + * @name exports.GoalCreateMutation + * @summary GoalCreate mutation. + */ +module.exports.GoalCreateMutation = { + description: 'Create a Goal record', + resolve: scopeInvariant(scopeOptions, createGoal), + type: GoalSchema, + args: WriteArgs, +}; + +/** + * @name exports.GoalUpdateMutation + * @summary GoalUpdate mutation. + */ +module.exports.GoalUpdateMutation = { + description: 'Update a Goal record', + resolve: scopeInvariant(scopeOptions, updateGoal), + type: GoalSchema, + args: WriteArgs, +}; + +/** + * @name exports.GoalRemoveMutation + * @summary GoalRemove mutation. + */ +module.exports.GoalRemoveMutation = { + description: 'Remove a Goal record', + resolve: scopeInvariant(scopeOptions, removeGoal), + type: GoalSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/goal/query.js b/src/resources/4_0_0/profiles/goal/query.js new file mode 100644 index 00000000..3a4392a3 --- /dev/null +++ b/src/resources/4_0_0/profiles/goal/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GoalSchema = require('../../schemas/goal.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const GoalArgs = require('../../parameters/goal.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, GoalArgs); + +// Resolvers +const { getGoal, getGoalList, getGoalInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Goal', + action: 'read', +}; + +/** + * @name exports.GoalQuery + * @summary Goal query. + */ +module.exports.GoalQuery = { + description: 'Query for a single Goal', + resolve: scopeInvariant(scopeOptions, getGoal), + type: GoalSchema, + args: args, +}; + +/** + * @name exports.GoalListQuery + * @summary Goal query. + */ +module.exports.GoalListQuery = { + description: 'Query for a more than or just one Goal', + resolve: scopeInvariant(scopeOptions, getGoalList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.GoalInstanceQuery + * @summary Goal query. + */ +module.exports.GoalInstanceQuery = { + description: 'Access information about a single Goal', + resolve: scopeInvariant(scopeOptions, getGoalInstance), + type: GoalSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/goal/register.js b/src/resources/4_0_0/profiles/goal/register.js new file mode 100644 index 00000000..20ef5fa2 --- /dev/null +++ b/src/resources/4_0_0/profiles/goal/register.js @@ -0,0 +1,44 @@ +const { + GoalCreateMutation, + GoalUpdateMutation, + GoalRemoveMutation, +} = require('./mutation'); + +const { GoalQuery, GoalListQuery, GoalInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Goal: GoalQuery, + GoalList: GoalListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + GoalCreate: GoalCreateMutation, + GoalUpdate: GoalUpdateMutation, + GoalRemove: GoalRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Goal', + path: '/4_0_0/Goal/:id', + query: GoalInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/goal/resolver.js b/src/resources/4_0_0/profiles/goal/resolver.js new file mode 100644 index 00000000..0cfa479d --- /dev/null +++ b/src/resources/4_0_0/profiles/goal/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getGoal + * @static + * @summary Goal resolver. + */ +module.exports.getGoal = function getGoal(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getGoalList + * @static + * @summary Goal list resolver. + */ +module.exports.getGoalList = function getGoalList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getGoalInstance + * @static + * @summary Goal instance resolver. + */ +module.exports.getGoalInstance = function getGoalInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createGoal + * @static + * @summary Create Goal resolver. + */ +module.exports.createGoal = function createGoal( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateGoal + * @static + * @summary Update Goal resolver. + */ +module.exports.updateGoal = function updateGoal( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeGoal + * @static + * @summary Remove Goal resolver. + */ +module.exports.removeGoal = function removeGoal( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/graphdefinition/mutation.js b/src/resources/4_0_0/profiles/graphdefinition/mutation.js new file mode 100644 index 00000000..ccb23427 --- /dev/null +++ b/src/resources/4_0_0/profiles/graphdefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const GraphDefinitionSchema = require('../../schemas/graphdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const GraphDefinitionInput = require('../../inputs/graphdefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createGraphDefinition, + updateGraphDefinition, + removeGraphDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'GraphDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a GraphDefinition record.', + }, + resource: { + type: new GraphQLNonNull(GraphDefinitionInput), + description: 'GraphDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a GraphDefinition record for deletion.', + }, +}; + +/** + * @name exports.GraphDefinitionCreateMutation + * @summary GraphDefinitionCreate mutation. + */ +module.exports.GraphDefinitionCreateMutation = { + description: 'Create a GraphDefinition record', + resolve: scopeInvariant(scopeOptions, createGraphDefinition), + type: GraphDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.GraphDefinitionUpdateMutation + * @summary GraphDefinitionUpdate mutation. + */ +module.exports.GraphDefinitionUpdateMutation = { + description: 'Update a GraphDefinition record', + resolve: scopeInvariant(scopeOptions, updateGraphDefinition), + type: GraphDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.GraphDefinitionRemoveMutation + * @summary GraphDefinitionRemove mutation. + */ +module.exports.GraphDefinitionRemoveMutation = { + description: 'Remove a GraphDefinition record', + resolve: scopeInvariant(scopeOptions, removeGraphDefinition), + type: GraphDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/graphdefinition/query.js b/src/resources/4_0_0/profiles/graphdefinition/query.js new file mode 100644 index 00000000..4f15092b --- /dev/null +++ b/src/resources/4_0_0/profiles/graphdefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GraphDefinitionSchema = require('../../schemas/graphdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const GraphDefinitionArgs = require('../../parameters/graphdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + GraphDefinitionArgs, +); + +// Resolvers +const { + getGraphDefinition, + getGraphDefinitionList, + getGraphDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'GraphDefinition', + action: 'read', +}; + +/** + * @name exports.GraphDefinitionQuery + * @summary GraphDefinition query. + */ +module.exports.GraphDefinitionQuery = { + description: 'Query for a single GraphDefinition', + resolve: scopeInvariant(scopeOptions, getGraphDefinition), + type: GraphDefinitionSchema, + args: args, +}; + +/** + * @name exports.GraphDefinitionListQuery + * @summary GraphDefinition query. + */ +module.exports.GraphDefinitionListQuery = { + description: 'Query for a more than or just one GraphDefinition', + resolve: scopeInvariant(scopeOptions, getGraphDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.GraphDefinitionInstanceQuery + * @summary GraphDefinition query. + */ +module.exports.GraphDefinitionInstanceQuery = { + description: 'Access information about a single GraphDefinition', + resolve: scopeInvariant(scopeOptions, getGraphDefinitionInstance), + type: GraphDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/graphdefinition/register.js b/src/resources/4_0_0/profiles/graphdefinition/register.js new file mode 100644 index 00000000..0610d5c2 --- /dev/null +++ b/src/resources/4_0_0/profiles/graphdefinition/register.js @@ -0,0 +1,48 @@ +const { + GraphDefinitionCreateMutation, + GraphDefinitionUpdateMutation, + GraphDefinitionRemoveMutation, +} = require('./mutation'); + +const { + GraphDefinitionQuery, + GraphDefinitionListQuery, + GraphDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + GraphDefinition: GraphDefinitionQuery, + GraphDefinitionList: GraphDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + GraphDefinitionCreate: GraphDefinitionCreateMutation, + GraphDefinitionUpdate: GraphDefinitionUpdateMutation, + GraphDefinitionRemove: GraphDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'GraphDefinition', + path: '/4_0_0/GraphDefinition/:id', + query: GraphDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/graphdefinition/resolver.js b/src/resources/4_0_0/profiles/graphdefinition/resolver.js new file mode 100644 index 00000000..31093d1c --- /dev/null +++ b/src/resources/4_0_0/profiles/graphdefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getGraphDefinition + * @static + * @summary GraphDefinition resolver. + */ +module.exports.getGraphDefinition = function getGraphDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getGraphDefinitionList + * @static + * @summary GraphDefinition list resolver. + */ +module.exports.getGraphDefinitionList = function getGraphDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getGraphDefinitionInstance + * @static + * @summary GraphDefinition instance resolver. + */ +module.exports.getGraphDefinitionInstance = function getGraphDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createGraphDefinition + * @static + * @summary Create GraphDefinition resolver. + */ +module.exports.createGraphDefinition = function createGraphDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateGraphDefinition + * @static + * @summary Update GraphDefinition resolver. + */ +module.exports.updateGraphDefinition = function updateGraphDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeGraphDefinition + * @static + * @summary Remove GraphDefinition resolver. + */ +module.exports.removeGraphDefinition = function removeGraphDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/group/mutation.js b/src/resources/4_0_0/profiles/group/mutation.js new file mode 100644 index 00000000..4d2a7ca2 --- /dev/null +++ b/src/resources/4_0_0/profiles/group/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const GroupSchema = require('../../schemas/group.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const GroupInput = require('../../inputs/group.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createGroup, updateGroup, removeGroup } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Group', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Group record.', + }, + resource: { + type: new GraphQLNonNull(GroupInput), + description: 'Group Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a Group record for deletion.', + }, +}; + +/** + * @name exports.GroupCreateMutation + * @summary GroupCreate mutation. + */ +module.exports.GroupCreateMutation = { + description: 'Create a Group record', + resolve: scopeInvariant(scopeOptions, createGroup), + type: GroupSchema, + args: WriteArgs, +}; + +/** + * @name exports.GroupUpdateMutation + * @summary GroupUpdate mutation. + */ +module.exports.GroupUpdateMutation = { + description: 'Update a Group record', + resolve: scopeInvariant(scopeOptions, updateGroup), + type: GroupSchema, + args: WriteArgs, +}; + +/** + * @name exports.GroupRemoveMutation + * @summary GroupRemove mutation. + */ +module.exports.GroupRemoveMutation = { + description: 'Remove a Group record', + resolve: scopeInvariant(scopeOptions, removeGroup), + type: GroupSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/group/query.js b/src/resources/4_0_0/profiles/group/query.js new file mode 100644 index 00000000..9c6038b3 --- /dev/null +++ b/src/resources/4_0_0/profiles/group/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GroupSchema = require('../../schemas/group.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const GroupArgs = require('../../parameters/group.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, GroupArgs); + +// Resolvers +const { getGroup, getGroupList, getGroupInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Group', + action: 'read', +}; + +/** + * @name exports.GroupQuery + * @summary Group query. + */ +module.exports.GroupQuery = { + description: 'Query for a single Group', + resolve: scopeInvariant(scopeOptions, getGroup), + type: GroupSchema, + args: args, +}; + +/** + * @name exports.GroupListQuery + * @summary Group query. + */ +module.exports.GroupListQuery = { + description: 'Query for a more than or just one Group', + resolve: scopeInvariant(scopeOptions, getGroupList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.GroupInstanceQuery + * @summary Group query. + */ +module.exports.GroupInstanceQuery = { + description: 'Access information about a single Group', + resolve: scopeInvariant(scopeOptions, getGroupInstance), + type: GroupSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/group/register.js b/src/resources/4_0_0/profiles/group/register.js new file mode 100644 index 00000000..eb44c450 --- /dev/null +++ b/src/resources/4_0_0/profiles/group/register.js @@ -0,0 +1,44 @@ +const { + GroupCreateMutation, + GroupUpdateMutation, + GroupRemoveMutation, +} = require('./mutation'); + +const { GroupQuery, GroupListQuery, GroupInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Group: GroupQuery, + GroupList: GroupListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + GroupCreate: GroupCreateMutation, + GroupUpdate: GroupUpdateMutation, + GroupRemove: GroupRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Group', + path: '/4_0_0/Group/:id', + query: GroupInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/group/resolver.js b/src/resources/4_0_0/profiles/group/resolver.js new file mode 100644 index 00000000..71d604dd --- /dev/null +++ b/src/resources/4_0_0/profiles/group/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getGroup + * @static + * @summary Group resolver. + */ +module.exports.getGroup = function getGroup(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getGroupList + * @static + * @summary Group list resolver. + */ +module.exports.getGroupList = function getGroupList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getGroupInstance + * @static + * @summary Group instance resolver. + */ +module.exports.getGroupInstance = function getGroupInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createGroup + * @static + * @summary Create Group resolver. + */ +module.exports.createGroup = function createGroup( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateGroup + * @static + * @summary Update Group resolver. + */ +module.exports.updateGroup = function updateGroup( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeGroup + * @static + * @summary Remove Group resolver. + */ +module.exports.removeGroup = function removeGroup( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/guidanceresponse/mutation.js b/src/resources/4_0_0/profiles/guidanceresponse/mutation.js new file mode 100644 index 00000000..ba8d0ec7 --- /dev/null +++ b/src/resources/4_0_0/profiles/guidanceresponse/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const GuidanceResponseSchema = require('../../schemas/guidanceresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const GuidanceResponseInput = require('../../inputs/guidanceresponse.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createGuidanceResponse, + updateGuidanceResponse, + removeGuidanceResponse, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'GuidanceResponse', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a GuidanceResponse record.', + }, + resource: { + type: new GraphQLNonNull(GuidanceResponseInput), + description: 'GuidanceResponse Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a GuidanceResponse record for deletion.', + }, +}; + +/** + * @name exports.GuidanceResponseCreateMutation + * @summary GuidanceResponseCreate mutation. + */ +module.exports.GuidanceResponseCreateMutation = { + description: 'Create a GuidanceResponse record', + resolve: scopeInvariant(scopeOptions, createGuidanceResponse), + type: GuidanceResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.GuidanceResponseUpdateMutation + * @summary GuidanceResponseUpdate mutation. + */ +module.exports.GuidanceResponseUpdateMutation = { + description: 'Update a GuidanceResponse record', + resolve: scopeInvariant(scopeOptions, updateGuidanceResponse), + type: GuidanceResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.GuidanceResponseRemoveMutation + * @summary GuidanceResponseRemove mutation. + */ +module.exports.GuidanceResponseRemoveMutation = { + description: 'Remove a GuidanceResponse record', + resolve: scopeInvariant(scopeOptions, removeGuidanceResponse), + type: GuidanceResponseSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/guidanceresponse/query.js b/src/resources/4_0_0/profiles/guidanceresponse/query.js new file mode 100644 index 00000000..4a1f9ae5 --- /dev/null +++ b/src/resources/4_0_0/profiles/guidanceresponse/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const GuidanceResponseSchema = require('../../schemas/guidanceresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const GuidanceResponseArgs = require('../../parameters/guidanceresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + GuidanceResponseArgs, +); + +// Resolvers +const { + getGuidanceResponse, + getGuidanceResponseList, + getGuidanceResponseInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'GuidanceResponse', + action: 'read', +}; + +/** + * @name exports.GuidanceResponseQuery + * @summary GuidanceResponse query. + */ +module.exports.GuidanceResponseQuery = { + description: 'Query for a single GuidanceResponse', + resolve: scopeInvariant(scopeOptions, getGuidanceResponse), + type: GuidanceResponseSchema, + args: args, +}; + +/** + * @name exports.GuidanceResponseListQuery + * @summary GuidanceResponse query. + */ +module.exports.GuidanceResponseListQuery = { + description: 'Query for a more than or just one GuidanceResponse', + resolve: scopeInvariant(scopeOptions, getGuidanceResponseList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.GuidanceResponseInstanceQuery + * @summary GuidanceResponse query. + */ +module.exports.GuidanceResponseInstanceQuery = { + description: 'Access information about a single GuidanceResponse', + resolve: scopeInvariant(scopeOptions, getGuidanceResponseInstance), + type: GuidanceResponseSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/guidanceresponse/register.js b/src/resources/4_0_0/profiles/guidanceresponse/register.js new file mode 100644 index 00000000..9c635f39 --- /dev/null +++ b/src/resources/4_0_0/profiles/guidanceresponse/register.js @@ -0,0 +1,48 @@ +const { + GuidanceResponseCreateMutation, + GuidanceResponseUpdateMutation, + GuidanceResponseRemoveMutation, +} = require('./mutation'); + +const { + GuidanceResponseQuery, + GuidanceResponseListQuery, + GuidanceResponseInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + GuidanceResponse: GuidanceResponseQuery, + GuidanceResponseList: GuidanceResponseListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + GuidanceResponseCreate: GuidanceResponseCreateMutation, + GuidanceResponseUpdate: GuidanceResponseUpdateMutation, + GuidanceResponseRemove: GuidanceResponseRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'GuidanceResponse', + path: '/4_0_0/GuidanceResponse/:id', + query: GuidanceResponseInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/guidanceresponse/resolver.js b/src/resources/4_0_0/profiles/guidanceresponse/resolver.js new file mode 100644 index 00000000..be9c74d4 --- /dev/null +++ b/src/resources/4_0_0/profiles/guidanceresponse/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getGuidanceResponse + * @static + * @summary GuidanceResponse resolver. + */ +module.exports.getGuidanceResponse = function getGuidanceResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getGuidanceResponseList + * @static + * @summary GuidanceResponse list resolver. + */ +module.exports.getGuidanceResponseList = function getGuidanceResponseList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getGuidanceResponseInstance + * @static + * @summary GuidanceResponse instance resolver. + */ +module.exports.getGuidanceResponseInstance = function getGuidanceResponseInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createGuidanceResponse + * @static + * @summary Create GuidanceResponse resolver. + */ +module.exports.createGuidanceResponse = function createGuidanceResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateGuidanceResponse + * @static + * @summary Update GuidanceResponse resolver. + */ +module.exports.updateGuidanceResponse = function updateGuidanceResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeGuidanceResponse + * @static + * @summary Remove GuidanceResponse resolver. + */ +module.exports.removeGuidanceResponse = function removeGuidanceResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/healthcareservice/mutation.js b/src/resources/4_0_0/profiles/healthcareservice/mutation.js new file mode 100644 index 00000000..b8696c2c --- /dev/null +++ b/src/resources/4_0_0/profiles/healthcareservice/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const HealthcareServiceInput = require('../../inputs/healthcareservice.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createHealthcareService, + updateHealthcareService, + removeHealthcareService, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'HealthcareService', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a HealthcareService record.', + }, + resource: { + type: new GraphQLNonNull(HealthcareServiceInput), + description: 'HealthcareService Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a HealthcareService record for deletion.', + }, +}; + +/** + * @name exports.HealthcareServiceCreateMutation + * @summary HealthcareServiceCreate mutation. + */ +module.exports.HealthcareServiceCreateMutation = { + description: 'Create a HealthcareService record', + resolve: scopeInvariant(scopeOptions, createHealthcareService), + type: HealthcareServiceSchema, + args: WriteArgs, +}; + +/** + * @name exports.HealthcareServiceUpdateMutation + * @summary HealthcareServiceUpdate mutation. + */ +module.exports.HealthcareServiceUpdateMutation = { + description: 'Update a HealthcareService record', + resolve: scopeInvariant(scopeOptions, updateHealthcareService), + type: HealthcareServiceSchema, + args: WriteArgs, +}; + +/** + * @name exports.HealthcareServiceRemoveMutation + * @summary HealthcareServiceRemove mutation. + */ +module.exports.HealthcareServiceRemoveMutation = { + description: 'Remove a HealthcareService record', + resolve: scopeInvariant(scopeOptions, removeHealthcareService), + type: HealthcareServiceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/healthcareservice/query.js b/src/resources/4_0_0/profiles/healthcareservice/query.js new file mode 100644 index 00000000..f0079f50 --- /dev/null +++ b/src/resources/4_0_0/profiles/healthcareservice/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const HealthcareServiceSchema = require('../../schemas/healthcareservice.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const HealthcareServiceArgs = require('../../parameters/healthcareservice.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + HealthcareServiceArgs, +); + +// Resolvers +const { + getHealthcareService, + getHealthcareServiceList, + getHealthcareServiceInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'HealthcareService', + action: 'read', +}; + +/** + * @name exports.HealthcareServiceQuery + * @summary HealthcareService query. + */ +module.exports.HealthcareServiceQuery = { + description: 'Query for a single HealthcareService', + resolve: scopeInvariant(scopeOptions, getHealthcareService), + type: HealthcareServiceSchema, + args: args, +}; + +/** + * @name exports.HealthcareServiceListQuery + * @summary HealthcareService query. + */ +module.exports.HealthcareServiceListQuery = { + description: 'Query for a more than or just one HealthcareService', + resolve: scopeInvariant(scopeOptions, getHealthcareServiceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.HealthcareServiceInstanceQuery + * @summary HealthcareService query. + */ +module.exports.HealthcareServiceInstanceQuery = { + description: 'Access information about a single HealthcareService', + resolve: scopeInvariant(scopeOptions, getHealthcareServiceInstance), + type: HealthcareServiceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/healthcareservice/register.js b/src/resources/4_0_0/profiles/healthcareservice/register.js new file mode 100644 index 00000000..7a48502d --- /dev/null +++ b/src/resources/4_0_0/profiles/healthcareservice/register.js @@ -0,0 +1,48 @@ +const { + HealthcareServiceCreateMutation, + HealthcareServiceUpdateMutation, + HealthcareServiceRemoveMutation, +} = require('./mutation'); + +const { + HealthcareServiceQuery, + HealthcareServiceListQuery, + HealthcareServiceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + HealthcareService: HealthcareServiceQuery, + HealthcareServiceList: HealthcareServiceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + HealthcareServiceCreate: HealthcareServiceCreateMutation, + HealthcareServiceUpdate: HealthcareServiceUpdateMutation, + HealthcareServiceRemove: HealthcareServiceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'HealthcareService', + path: '/4_0_0/HealthcareService/:id', + query: HealthcareServiceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/healthcareservice/resolver.js b/src/resources/4_0_0/profiles/healthcareservice/resolver.js new file mode 100644 index 00000000..29c4204d --- /dev/null +++ b/src/resources/4_0_0/profiles/healthcareservice/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getHealthcareService + * @static + * @summary HealthcareService resolver. + */ +module.exports.getHealthcareService = function getHealthcareService( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getHealthcareServiceList + * @static + * @summary HealthcareService list resolver. + */ +module.exports.getHealthcareServiceList = function getHealthcareServiceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getHealthcareServiceInstance + * @static + * @summary HealthcareService instance resolver. + */ +module.exports.getHealthcareServiceInstance = function getHealthcareServiceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createHealthcareService + * @static + * @summary Create HealthcareService resolver. + */ +module.exports.createHealthcareService = function createHealthcareService( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateHealthcareService + * @static + * @summary Update HealthcareService resolver. + */ +module.exports.updateHealthcareService = function updateHealthcareService( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeHealthcareService + * @static + * @summary Remove HealthcareService resolver. + */ +module.exports.removeHealthcareService = function removeHealthcareService( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/imagingstudy/mutation.js b/src/resources/4_0_0/profiles/imagingstudy/mutation.js new file mode 100644 index 00000000..45377c8c --- /dev/null +++ b/src/resources/4_0_0/profiles/imagingstudy/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ImagingStudySchema = require('../../schemas/imagingstudy.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ImagingStudyInput = require('../../inputs/imagingstudy.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createImagingStudy, + updateImagingStudy, + removeImagingStudy, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ImagingStudy', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ImagingStudy record.', + }, + resource: { + type: new GraphQLNonNull(ImagingStudyInput), + description: 'ImagingStudy Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ImagingStudy record for deletion.', + }, +}; + +/** + * @name exports.ImagingStudyCreateMutation + * @summary ImagingStudyCreate mutation. + */ +module.exports.ImagingStudyCreateMutation = { + description: 'Create a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, createImagingStudy), + type: ImagingStudySchema, + args: WriteArgs, +}; + +/** + * @name exports.ImagingStudyUpdateMutation + * @summary ImagingStudyUpdate mutation. + */ +module.exports.ImagingStudyUpdateMutation = { + description: 'Update a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, updateImagingStudy), + type: ImagingStudySchema, + args: WriteArgs, +}; + +/** + * @name exports.ImagingStudyRemoveMutation + * @summary ImagingStudyRemove mutation. + */ +module.exports.ImagingStudyRemoveMutation = { + description: 'Remove a ImagingStudy record', + resolve: scopeInvariant(scopeOptions, removeImagingStudy), + type: ImagingStudySchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/imagingstudy/query.js b/src/resources/4_0_0/profiles/imagingstudy/query.js new file mode 100644 index 00000000..dc1d6d1f --- /dev/null +++ b/src/resources/4_0_0/profiles/imagingstudy/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImagingStudySchema = require('../../schemas/imagingstudy.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ImagingStudyArgs = require('../../parameters/imagingstudy.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImagingStudyArgs, +); + +// Resolvers +const { + getImagingStudy, + getImagingStudyList, + getImagingStudyInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ImagingStudy', + action: 'read', +}; + +/** + * @name exports.ImagingStudyQuery + * @summary ImagingStudy query. + */ +module.exports.ImagingStudyQuery = { + description: 'Query for a single ImagingStudy', + resolve: scopeInvariant(scopeOptions, getImagingStudy), + type: ImagingStudySchema, + args: args, +}; + +/** + * @name exports.ImagingStudyListQuery + * @summary ImagingStudy query. + */ +module.exports.ImagingStudyListQuery = { + description: 'Query for a more than or just one ImagingStudy', + resolve: scopeInvariant(scopeOptions, getImagingStudyList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ImagingStudyInstanceQuery + * @summary ImagingStudy query. + */ +module.exports.ImagingStudyInstanceQuery = { + description: 'Access information about a single ImagingStudy', + resolve: scopeInvariant(scopeOptions, getImagingStudyInstance), + type: ImagingStudySchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/imagingstudy/register.js b/src/resources/4_0_0/profiles/imagingstudy/register.js new file mode 100644 index 00000000..a67150b0 --- /dev/null +++ b/src/resources/4_0_0/profiles/imagingstudy/register.js @@ -0,0 +1,48 @@ +const { + ImagingStudyCreateMutation, + ImagingStudyUpdateMutation, + ImagingStudyRemoveMutation, +} = require('./mutation'); + +const { + ImagingStudyQuery, + ImagingStudyListQuery, + ImagingStudyInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ImagingStudy: ImagingStudyQuery, + ImagingStudyList: ImagingStudyListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ImagingStudyCreate: ImagingStudyCreateMutation, + ImagingStudyUpdate: ImagingStudyUpdateMutation, + ImagingStudyRemove: ImagingStudyRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ImagingStudy', + path: '/4_0_0/ImagingStudy/:id', + query: ImagingStudyInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/imagingstudy/resolver.js b/src/resources/4_0_0/profiles/imagingstudy/resolver.js new file mode 100644 index 00000000..41e899e7 --- /dev/null +++ b/src/resources/4_0_0/profiles/imagingstudy/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getImagingStudy + * @static + * @summary ImagingStudy resolver. + */ +module.exports.getImagingStudy = function getImagingStudy( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImagingStudyList + * @static + * @summary ImagingStudy list resolver. + */ +module.exports.getImagingStudyList = function getImagingStudyList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImagingStudyInstance + * @static + * @summary ImagingStudy instance resolver. + */ +module.exports.getImagingStudyInstance = function getImagingStudyInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createImagingStudy + * @static + * @summary Create ImagingStudy resolver. + */ +module.exports.createImagingStudy = function createImagingStudy( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateImagingStudy + * @static + * @summary Update ImagingStudy resolver. + */ +module.exports.updateImagingStudy = function updateImagingStudy( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeImagingStudy + * @static + * @summary Remove ImagingStudy resolver. + */ +module.exports.removeImagingStudy = function removeImagingStudy( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/immunization/mutation.js b/src/resources/4_0_0/profiles/immunization/mutation.js new file mode 100644 index 00000000..82c6ddbd --- /dev/null +++ b/src/resources/4_0_0/profiles/immunization/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ImmunizationSchema = require('../../schemas/immunization.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ImmunizationInput = require('../../inputs/immunization.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createImmunization, + updateImmunization, + removeImmunization, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Immunization', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Immunization record.', + }, + resource: { + type: new GraphQLNonNull(ImmunizationInput), + description: 'Immunization Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Immunization record for deletion.', + }, +}; + +/** + * @name exports.ImmunizationCreateMutation + * @summary ImmunizationCreate mutation. + */ +module.exports.ImmunizationCreateMutation = { + description: 'Create a Immunization record', + resolve: scopeInvariant(scopeOptions, createImmunization), + type: ImmunizationSchema, + args: WriteArgs, +}; + +/** + * @name exports.ImmunizationUpdateMutation + * @summary ImmunizationUpdate mutation. + */ +module.exports.ImmunizationUpdateMutation = { + description: 'Update a Immunization record', + resolve: scopeInvariant(scopeOptions, updateImmunization), + type: ImmunizationSchema, + args: WriteArgs, +}; + +/** + * @name exports.ImmunizationRemoveMutation + * @summary ImmunizationRemove mutation. + */ +module.exports.ImmunizationRemoveMutation = { + description: 'Remove a Immunization record', + resolve: scopeInvariant(scopeOptions, removeImmunization), + type: ImmunizationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/immunization/query.js b/src/resources/4_0_0/profiles/immunization/query.js new file mode 100644 index 00000000..364aaea3 --- /dev/null +++ b/src/resources/4_0_0/profiles/immunization/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImmunizationSchema = require('../../schemas/immunization.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ImmunizationArgs = require('../../parameters/immunization.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImmunizationArgs, +); + +// Resolvers +const { + getImmunization, + getImmunizationList, + getImmunizationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Immunization', + action: 'read', +}; + +/** + * @name exports.ImmunizationQuery + * @summary Immunization query. + */ +module.exports.ImmunizationQuery = { + description: 'Query for a single Immunization', + resolve: scopeInvariant(scopeOptions, getImmunization), + type: ImmunizationSchema, + args: args, +}; + +/** + * @name exports.ImmunizationListQuery + * @summary Immunization query. + */ +module.exports.ImmunizationListQuery = { + description: 'Query for a more than or just one Immunization', + resolve: scopeInvariant(scopeOptions, getImmunizationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ImmunizationInstanceQuery + * @summary Immunization query. + */ +module.exports.ImmunizationInstanceQuery = { + description: 'Access information about a single Immunization', + resolve: scopeInvariant(scopeOptions, getImmunizationInstance), + type: ImmunizationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/immunization/register.js b/src/resources/4_0_0/profiles/immunization/register.js new file mode 100644 index 00000000..19918494 --- /dev/null +++ b/src/resources/4_0_0/profiles/immunization/register.js @@ -0,0 +1,48 @@ +const { + ImmunizationCreateMutation, + ImmunizationUpdateMutation, + ImmunizationRemoveMutation, +} = require('./mutation'); + +const { + ImmunizationQuery, + ImmunizationListQuery, + ImmunizationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Immunization: ImmunizationQuery, + ImmunizationList: ImmunizationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ImmunizationCreate: ImmunizationCreateMutation, + ImmunizationUpdate: ImmunizationUpdateMutation, + ImmunizationRemove: ImmunizationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Immunization', + path: '/4_0_0/Immunization/:id', + query: ImmunizationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/immunization/resolver.js b/src/resources/4_0_0/profiles/immunization/resolver.js new file mode 100644 index 00000000..bb7be79f --- /dev/null +++ b/src/resources/4_0_0/profiles/immunization/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getImmunization + * @static + * @summary Immunization resolver. + */ +module.exports.getImmunization = function getImmunization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImmunizationList + * @static + * @summary Immunization list resolver. + */ +module.exports.getImmunizationList = function getImmunizationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImmunizationInstance + * @static + * @summary Immunization instance resolver. + */ +module.exports.getImmunizationInstance = function getImmunizationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createImmunization + * @static + * @summary Create Immunization resolver. + */ +module.exports.createImmunization = function createImmunization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateImmunization + * @static + * @summary Update Immunization resolver. + */ +module.exports.updateImmunization = function updateImmunization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeImmunization + * @static + * @summary Remove Immunization resolver. + */ +module.exports.removeImmunization = function removeImmunization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/immunizationevaluation/mutation.js b/src/resources/4_0_0/profiles/immunizationevaluation/mutation.js new file mode 100644 index 00000000..ea566dcb --- /dev/null +++ b/src/resources/4_0_0/profiles/immunizationevaluation/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ImmunizationEvaluationSchema = require('../../schemas/immunizationevaluation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ImmunizationEvaluationInput = require('../../inputs/immunizationevaluation.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createImmunizationEvaluation, + updateImmunizationEvaluation, + removeImmunizationEvaluation, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ImmunizationEvaluation', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ImmunizationEvaluation record.', + }, + resource: { + type: new GraphQLNonNull(ImmunizationEvaluationInput), + description: 'ImmunizationEvaluation Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ImmunizationEvaluation record for deletion.', + }, +}; + +/** + * @name exports.ImmunizationEvaluationCreateMutation + * @summary ImmunizationEvaluationCreate mutation. + */ +module.exports.ImmunizationEvaluationCreateMutation = { + description: 'Create a ImmunizationEvaluation record', + resolve: scopeInvariant(scopeOptions, createImmunizationEvaluation), + type: ImmunizationEvaluationSchema, + args: WriteArgs, +}; + +/** + * @name exports.ImmunizationEvaluationUpdateMutation + * @summary ImmunizationEvaluationUpdate mutation. + */ +module.exports.ImmunizationEvaluationUpdateMutation = { + description: 'Update a ImmunizationEvaluation record', + resolve: scopeInvariant(scopeOptions, updateImmunizationEvaluation), + type: ImmunizationEvaluationSchema, + args: WriteArgs, +}; + +/** + * @name exports.ImmunizationEvaluationRemoveMutation + * @summary ImmunizationEvaluationRemove mutation. + */ +module.exports.ImmunizationEvaluationRemoveMutation = { + description: 'Remove a ImmunizationEvaluation record', + resolve: scopeInvariant(scopeOptions, removeImmunizationEvaluation), + type: ImmunizationEvaluationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/immunizationevaluation/query.js b/src/resources/4_0_0/profiles/immunizationevaluation/query.js new file mode 100644 index 00000000..d282cf8b --- /dev/null +++ b/src/resources/4_0_0/profiles/immunizationevaluation/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImmunizationEvaluationSchema = require('../../schemas/immunizationevaluation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ImmunizationEvaluationArgs = require('../../parameters/immunizationevaluation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImmunizationEvaluationArgs, +); + +// Resolvers +const { + getImmunizationEvaluation, + getImmunizationEvaluationList, + getImmunizationEvaluationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ImmunizationEvaluation', + action: 'read', +}; + +/** + * @name exports.ImmunizationEvaluationQuery + * @summary ImmunizationEvaluation query. + */ +module.exports.ImmunizationEvaluationQuery = { + description: 'Query for a single ImmunizationEvaluation', + resolve: scopeInvariant(scopeOptions, getImmunizationEvaluation), + type: ImmunizationEvaluationSchema, + args: args, +}; + +/** + * @name exports.ImmunizationEvaluationListQuery + * @summary ImmunizationEvaluation query. + */ +module.exports.ImmunizationEvaluationListQuery = { + description: 'Query for a more than or just one ImmunizationEvaluation', + resolve: scopeInvariant(scopeOptions, getImmunizationEvaluationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ImmunizationEvaluationInstanceQuery + * @summary ImmunizationEvaluation query. + */ +module.exports.ImmunizationEvaluationInstanceQuery = { + description: 'Access information about a single ImmunizationEvaluation', + resolve: scopeInvariant(scopeOptions, getImmunizationEvaluationInstance), + type: ImmunizationEvaluationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/immunizationevaluation/register.js b/src/resources/4_0_0/profiles/immunizationevaluation/register.js new file mode 100644 index 00000000..382b8c44 --- /dev/null +++ b/src/resources/4_0_0/profiles/immunizationevaluation/register.js @@ -0,0 +1,48 @@ +const { + ImmunizationEvaluationCreateMutation, + ImmunizationEvaluationUpdateMutation, + ImmunizationEvaluationRemoveMutation, +} = require('./mutation'); + +const { + ImmunizationEvaluationQuery, + ImmunizationEvaluationListQuery, + ImmunizationEvaluationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ImmunizationEvaluation: ImmunizationEvaluationQuery, + ImmunizationEvaluationList: ImmunizationEvaluationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ImmunizationEvaluationCreate: ImmunizationEvaluationCreateMutation, + ImmunizationEvaluationUpdate: ImmunizationEvaluationUpdateMutation, + ImmunizationEvaluationRemove: ImmunizationEvaluationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ImmunizationEvaluation', + path: '/4_0_0/ImmunizationEvaluation/:id', + query: ImmunizationEvaluationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/immunizationevaluation/resolver.js b/src/resources/4_0_0/profiles/immunizationevaluation/resolver.js new file mode 100644 index 00000000..ff2173a0 --- /dev/null +++ b/src/resources/4_0_0/profiles/immunizationevaluation/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getImmunizationEvaluation + * @static + * @summary ImmunizationEvaluation resolver. + */ +module.exports.getImmunizationEvaluation = function getImmunizationEvaluation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImmunizationEvaluationList + * @static + * @summary ImmunizationEvaluation list resolver. + */ +module.exports.getImmunizationEvaluationList = function getImmunizationEvaluationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImmunizationEvaluationInstance + * @static + * @summary ImmunizationEvaluation instance resolver. + */ +module.exports.getImmunizationEvaluationInstance = function getImmunizationEvaluationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createImmunizationEvaluation + * @static + * @summary Create ImmunizationEvaluation resolver. + */ +module.exports.createImmunizationEvaluation = function createImmunizationEvaluation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateImmunizationEvaluation + * @static + * @summary Update ImmunizationEvaluation resolver. + */ +module.exports.updateImmunizationEvaluation = function updateImmunizationEvaluation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeImmunizationEvaluation + * @static + * @summary Remove ImmunizationEvaluation resolver. + */ +module.exports.removeImmunizationEvaluation = function removeImmunizationEvaluation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/immunizationrecommendation/mutation.js b/src/resources/4_0_0/profiles/immunizationrecommendation/mutation.js new file mode 100644 index 00000000..83c4dca3 --- /dev/null +++ b/src/resources/4_0_0/profiles/immunizationrecommendation/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ImmunizationRecommendationInput = require('../../inputs/immunizationrecommendation.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createImmunizationRecommendation, + updateImmunizationRecommendation, + removeImmunizationRecommendation, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ImmunizationRecommendation', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ImmunizationRecommendation record.', + }, + resource: { + type: new GraphQLNonNull(ImmunizationRecommendationInput), + description: 'ImmunizationRecommendation Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ImmunizationRecommendation record for deletion.', + }, +}; + +/** + * @name exports.ImmunizationRecommendationCreateMutation + * @summary ImmunizationRecommendationCreate mutation. + */ +module.exports.ImmunizationRecommendationCreateMutation = { + description: 'Create a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, createImmunizationRecommendation), + type: ImmunizationRecommendationSchema, + args: WriteArgs, +}; + +/** + * @name exports.ImmunizationRecommendationUpdateMutation + * @summary ImmunizationRecommendationUpdate mutation. + */ +module.exports.ImmunizationRecommendationUpdateMutation = { + description: 'Update a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, updateImmunizationRecommendation), + type: ImmunizationRecommendationSchema, + args: WriteArgs, +}; + +/** + * @name exports.ImmunizationRecommendationRemoveMutation + * @summary ImmunizationRecommendationRemove mutation. + */ +module.exports.ImmunizationRecommendationRemoveMutation = { + description: 'Remove a ImmunizationRecommendation record', + resolve: scopeInvariant(scopeOptions, removeImmunizationRecommendation), + type: ImmunizationRecommendationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/immunizationrecommendation/query.js b/src/resources/4_0_0/profiles/immunizationrecommendation/query.js new file mode 100644 index 00000000..c15612f5 --- /dev/null +++ b/src/resources/4_0_0/profiles/immunizationrecommendation/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImmunizationRecommendationSchema = require('../../schemas/immunizationrecommendation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ImmunizationRecommendationArgs = require('../../parameters/immunizationrecommendation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImmunizationRecommendationArgs, +); + +// Resolvers +const { + getImmunizationRecommendation, + getImmunizationRecommendationList, + getImmunizationRecommendationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ImmunizationRecommendation', + action: 'read', +}; + +/** + * @name exports.ImmunizationRecommendationQuery + * @summary ImmunizationRecommendation query. + */ +module.exports.ImmunizationRecommendationQuery = { + description: 'Query for a single ImmunizationRecommendation', + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendation), + type: ImmunizationRecommendationSchema, + args: args, +}; + +/** + * @name exports.ImmunizationRecommendationListQuery + * @summary ImmunizationRecommendation query. + */ +module.exports.ImmunizationRecommendationListQuery = { + description: 'Query for a more than or just one ImmunizationRecommendation', + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ImmunizationRecommendationInstanceQuery + * @summary ImmunizationRecommendation query. + */ +module.exports.ImmunizationRecommendationInstanceQuery = { + description: 'Access information about a single ImmunizationRecommendation', + resolve: scopeInvariant(scopeOptions, getImmunizationRecommendationInstance), + type: ImmunizationRecommendationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/immunizationrecommendation/register.js b/src/resources/4_0_0/profiles/immunizationrecommendation/register.js new file mode 100644 index 00000000..99df1b4c --- /dev/null +++ b/src/resources/4_0_0/profiles/immunizationrecommendation/register.js @@ -0,0 +1,48 @@ +const { + ImmunizationRecommendationCreateMutation, + ImmunizationRecommendationUpdateMutation, + ImmunizationRecommendationRemoveMutation, +} = require('./mutation'); + +const { + ImmunizationRecommendationQuery, + ImmunizationRecommendationListQuery, + ImmunizationRecommendationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ImmunizationRecommendation: ImmunizationRecommendationQuery, + ImmunizationRecommendationList: ImmunizationRecommendationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ImmunizationRecommendationCreate: ImmunizationRecommendationCreateMutation, + ImmunizationRecommendationUpdate: ImmunizationRecommendationUpdateMutation, + ImmunizationRecommendationRemove: ImmunizationRecommendationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ImmunizationRecommendation', + path: '/4_0_0/ImmunizationRecommendation/:id', + query: ImmunizationRecommendationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/immunizationrecommendation/resolver.js b/src/resources/4_0_0/profiles/immunizationrecommendation/resolver.js new file mode 100644 index 00000000..3ad925a4 --- /dev/null +++ b/src/resources/4_0_0/profiles/immunizationrecommendation/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getImmunizationRecommendation + * @static + * @summary ImmunizationRecommendation resolver. + */ +module.exports.getImmunizationRecommendation = function getImmunizationRecommendation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImmunizationRecommendationList + * @static + * @summary ImmunizationRecommendation list resolver. + */ +module.exports.getImmunizationRecommendationList = function getImmunizationRecommendationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImmunizationRecommendationInstance + * @static + * @summary ImmunizationRecommendation instance resolver. + */ +module.exports.getImmunizationRecommendationInstance = function getImmunizationRecommendationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createImmunizationRecommendation + * @static + * @summary Create ImmunizationRecommendation resolver. + */ +module.exports.createImmunizationRecommendation = function createImmunizationRecommendation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateImmunizationRecommendation + * @static + * @summary Update ImmunizationRecommendation resolver. + */ +module.exports.updateImmunizationRecommendation = function updateImmunizationRecommendation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeImmunizationRecommendation + * @static + * @summary Remove ImmunizationRecommendation resolver. + */ +module.exports.removeImmunizationRecommendation = function removeImmunizationRecommendation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/implementationguide/mutation.js b/src/resources/4_0_0/profiles/implementationguide/mutation.js new file mode 100644 index 00000000..8285d3d3 --- /dev/null +++ b/src/resources/4_0_0/profiles/implementationguide/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ImplementationGuideSchema = require('../../schemas/implementationguide.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ImplementationGuideInput = require('../../inputs/implementationguide.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createImplementationGuide, + updateImplementationGuide, + removeImplementationGuide, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ImplementationGuide', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ImplementationGuide record.', + }, + resource: { + type: new GraphQLNonNull(ImplementationGuideInput), + description: 'ImplementationGuide Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ImplementationGuide record for deletion.', + }, +}; + +/** + * @name exports.ImplementationGuideCreateMutation + * @summary ImplementationGuideCreate mutation. + */ +module.exports.ImplementationGuideCreateMutation = { + description: 'Create a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, createImplementationGuide), + type: ImplementationGuideSchema, + args: WriteArgs, +}; + +/** + * @name exports.ImplementationGuideUpdateMutation + * @summary ImplementationGuideUpdate mutation. + */ +module.exports.ImplementationGuideUpdateMutation = { + description: 'Update a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, updateImplementationGuide), + type: ImplementationGuideSchema, + args: WriteArgs, +}; + +/** + * @name exports.ImplementationGuideRemoveMutation + * @summary ImplementationGuideRemove mutation. + */ +module.exports.ImplementationGuideRemoveMutation = { + description: 'Remove a ImplementationGuide record', + resolve: scopeInvariant(scopeOptions, removeImplementationGuide), + type: ImplementationGuideSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/implementationguide/query.js b/src/resources/4_0_0/profiles/implementationguide/query.js new file mode 100644 index 00000000..d72d8042 --- /dev/null +++ b/src/resources/4_0_0/profiles/implementationguide/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ImplementationGuideSchema = require('../../schemas/implementationguide.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ImplementationGuideArgs = require('../../parameters/implementationguide.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ImplementationGuideArgs, +); + +// Resolvers +const { + getImplementationGuide, + getImplementationGuideList, + getImplementationGuideInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ImplementationGuide', + action: 'read', +}; + +/** + * @name exports.ImplementationGuideQuery + * @summary ImplementationGuide query. + */ +module.exports.ImplementationGuideQuery = { + description: 'Query for a single ImplementationGuide', + resolve: scopeInvariant(scopeOptions, getImplementationGuide), + type: ImplementationGuideSchema, + args: args, +}; + +/** + * @name exports.ImplementationGuideListQuery + * @summary ImplementationGuide query. + */ +module.exports.ImplementationGuideListQuery = { + description: 'Query for a more than or just one ImplementationGuide', + resolve: scopeInvariant(scopeOptions, getImplementationGuideList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ImplementationGuideInstanceQuery + * @summary ImplementationGuide query. + */ +module.exports.ImplementationGuideInstanceQuery = { + description: 'Access information about a single ImplementationGuide', + resolve: scopeInvariant(scopeOptions, getImplementationGuideInstance), + type: ImplementationGuideSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/implementationguide/register.js b/src/resources/4_0_0/profiles/implementationguide/register.js new file mode 100644 index 00000000..18dcf402 --- /dev/null +++ b/src/resources/4_0_0/profiles/implementationguide/register.js @@ -0,0 +1,48 @@ +const { + ImplementationGuideCreateMutation, + ImplementationGuideUpdateMutation, + ImplementationGuideRemoveMutation, +} = require('./mutation'); + +const { + ImplementationGuideQuery, + ImplementationGuideListQuery, + ImplementationGuideInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ImplementationGuide: ImplementationGuideQuery, + ImplementationGuideList: ImplementationGuideListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ImplementationGuideCreate: ImplementationGuideCreateMutation, + ImplementationGuideUpdate: ImplementationGuideUpdateMutation, + ImplementationGuideRemove: ImplementationGuideRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ImplementationGuide', + path: '/4_0_0/ImplementationGuide/:id', + query: ImplementationGuideInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/implementationguide/resolver.js b/src/resources/4_0_0/profiles/implementationguide/resolver.js new file mode 100644 index 00000000..cec84931 --- /dev/null +++ b/src/resources/4_0_0/profiles/implementationguide/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getImplementationGuide + * @static + * @summary ImplementationGuide resolver. + */ +module.exports.getImplementationGuide = function getImplementationGuide( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImplementationGuideList + * @static + * @summary ImplementationGuide list resolver. + */ +module.exports.getImplementationGuideList = function getImplementationGuideList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getImplementationGuideInstance + * @static + * @summary ImplementationGuide instance resolver. + */ +module.exports.getImplementationGuideInstance = function getImplementationGuideInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createImplementationGuide + * @static + * @summary Create ImplementationGuide resolver. + */ +module.exports.createImplementationGuide = function createImplementationGuide( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateImplementationGuide + * @static + * @summary Update ImplementationGuide resolver. + */ +module.exports.updateImplementationGuide = function updateImplementationGuide( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeImplementationGuide + * @static + * @summary Remove ImplementationGuide resolver. + */ +module.exports.removeImplementationGuide = function removeImplementationGuide( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/insuranceplan/mutation.js b/src/resources/4_0_0/profiles/insuranceplan/mutation.js new file mode 100644 index 00000000..212dfef6 --- /dev/null +++ b/src/resources/4_0_0/profiles/insuranceplan/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const InsurancePlanSchema = require('../../schemas/insuranceplan.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const InsurancePlanInput = require('../../inputs/insuranceplan.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createInsurancePlan, + updateInsurancePlan, + removeInsurancePlan, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'InsurancePlan', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a InsurancePlan record.', + }, + resource: { + type: new GraphQLNonNull(InsurancePlanInput), + description: 'InsurancePlan Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a InsurancePlan record for deletion.', + }, +}; + +/** + * @name exports.InsurancePlanCreateMutation + * @summary InsurancePlanCreate mutation. + */ +module.exports.InsurancePlanCreateMutation = { + description: 'Create a InsurancePlan record', + resolve: scopeInvariant(scopeOptions, createInsurancePlan), + type: InsurancePlanSchema, + args: WriteArgs, +}; + +/** + * @name exports.InsurancePlanUpdateMutation + * @summary InsurancePlanUpdate mutation. + */ +module.exports.InsurancePlanUpdateMutation = { + description: 'Update a InsurancePlan record', + resolve: scopeInvariant(scopeOptions, updateInsurancePlan), + type: InsurancePlanSchema, + args: WriteArgs, +}; + +/** + * @name exports.InsurancePlanRemoveMutation + * @summary InsurancePlanRemove mutation. + */ +module.exports.InsurancePlanRemoveMutation = { + description: 'Remove a InsurancePlan record', + resolve: scopeInvariant(scopeOptions, removeInsurancePlan), + type: InsurancePlanSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/insuranceplan/query.js b/src/resources/4_0_0/profiles/insuranceplan/query.js new file mode 100644 index 00000000..cdb03204 --- /dev/null +++ b/src/resources/4_0_0/profiles/insuranceplan/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const InsurancePlanSchema = require('../../schemas/insuranceplan.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const InsurancePlanArgs = require('../../parameters/insuranceplan.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + InsurancePlanArgs, +); + +// Resolvers +const { + getInsurancePlan, + getInsurancePlanList, + getInsurancePlanInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'InsurancePlan', + action: 'read', +}; + +/** + * @name exports.InsurancePlanQuery + * @summary InsurancePlan query. + */ +module.exports.InsurancePlanQuery = { + description: 'Query for a single InsurancePlan', + resolve: scopeInvariant(scopeOptions, getInsurancePlan), + type: InsurancePlanSchema, + args: args, +}; + +/** + * @name exports.InsurancePlanListQuery + * @summary InsurancePlan query. + */ +module.exports.InsurancePlanListQuery = { + description: 'Query for a more than or just one InsurancePlan', + resolve: scopeInvariant(scopeOptions, getInsurancePlanList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.InsurancePlanInstanceQuery + * @summary InsurancePlan query. + */ +module.exports.InsurancePlanInstanceQuery = { + description: 'Access information about a single InsurancePlan', + resolve: scopeInvariant(scopeOptions, getInsurancePlanInstance), + type: InsurancePlanSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/insuranceplan/register.js b/src/resources/4_0_0/profiles/insuranceplan/register.js new file mode 100644 index 00000000..1de339c9 --- /dev/null +++ b/src/resources/4_0_0/profiles/insuranceplan/register.js @@ -0,0 +1,48 @@ +const { + InsurancePlanCreateMutation, + InsurancePlanUpdateMutation, + InsurancePlanRemoveMutation, +} = require('./mutation'); + +const { + InsurancePlanQuery, + InsurancePlanListQuery, + InsurancePlanInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + InsurancePlan: InsurancePlanQuery, + InsurancePlanList: InsurancePlanListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + InsurancePlanCreate: InsurancePlanCreateMutation, + InsurancePlanUpdate: InsurancePlanUpdateMutation, + InsurancePlanRemove: InsurancePlanRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'InsurancePlan', + path: '/4_0_0/InsurancePlan/:id', + query: InsurancePlanInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/insuranceplan/resolver.js b/src/resources/4_0_0/profiles/insuranceplan/resolver.js new file mode 100644 index 00000000..bc2d4c09 --- /dev/null +++ b/src/resources/4_0_0/profiles/insuranceplan/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getInsurancePlan + * @static + * @summary InsurancePlan resolver. + */ +module.exports.getInsurancePlan = function getInsurancePlan( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getInsurancePlanList + * @static + * @summary InsurancePlan list resolver. + */ +module.exports.getInsurancePlanList = function getInsurancePlanList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getInsurancePlanInstance + * @static + * @summary InsurancePlan instance resolver. + */ +module.exports.getInsurancePlanInstance = function getInsurancePlanInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createInsurancePlan + * @static + * @summary Create InsurancePlan resolver. + */ +module.exports.createInsurancePlan = function createInsurancePlan( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateInsurancePlan + * @static + * @summary Update InsurancePlan resolver. + */ +module.exports.updateInsurancePlan = function updateInsurancePlan( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeInsurancePlan + * @static + * @summary Remove InsurancePlan resolver. + */ +module.exports.removeInsurancePlan = function removeInsurancePlan( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/invoice/mutation.js b/src/resources/4_0_0/profiles/invoice/mutation.js new file mode 100644 index 00000000..817b0ad8 --- /dev/null +++ b/src/resources/4_0_0/profiles/invoice/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const InvoiceSchema = require('../../schemas/invoice.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const InvoiceInput = require('../../inputs/invoice.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createInvoice, updateInvoice, removeInvoice } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Invoice', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Invoice record.', + }, + resource: { + type: new GraphQLNonNull(InvoiceInput), + description: 'Invoice Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Invoice record for deletion.', + }, +}; + +/** + * @name exports.InvoiceCreateMutation + * @summary InvoiceCreate mutation. + */ +module.exports.InvoiceCreateMutation = { + description: 'Create a Invoice record', + resolve: scopeInvariant(scopeOptions, createInvoice), + type: InvoiceSchema, + args: WriteArgs, +}; + +/** + * @name exports.InvoiceUpdateMutation + * @summary InvoiceUpdate mutation. + */ +module.exports.InvoiceUpdateMutation = { + description: 'Update a Invoice record', + resolve: scopeInvariant(scopeOptions, updateInvoice), + type: InvoiceSchema, + args: WriteArgs, +}; + +/** + * @name exports.InvoiceRemoveMutation + * @summary InvoiceRemove mutation. + */ +module.exports.InvoiceRemoveMutation = { + description: 'Remove a Invoice record', + resolve: scopeInvariant(scopeOptions, removeInvoice), + type: InvoiceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/invoice/query.js b/src/resources/4_0_0/profiles/invoice/query.js new file mode 100644 index 00000000..cbf18367 --- /dev/null +++ b/src/resources/4_0_0/profiles/invoice/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const InvoiceSchema = require('../../schemas/invoice.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const InvoiceArgs = require('../../parameters/invoice.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, InvoiceArgs); + +// Resolvers +const { + getInvoice, + getInvoiceList, + getInvoiceInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Invoice', + action: 'read', +}; + +/** + * @name exports.InvoiceQuery + * @summary Invoice query. + */ +module.exports.InvoiceQuery = { + description: 'Query for a single Invoice', + resolve: scopeInvariant(scopeOptions, getInvoice), + type: InvoiceSchema, + args: args, +}; + +/** + * @name exports.InvoiceListQuery + * @summary Invoice query. + */ +module.exports.InvoiceListQuery = { + description: 'Query for a more than or just one Invoice', + resolve: scopeInvariant(scopeOptions, getInvoiceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.InvoiceInstanceQuery + * @summary Invoice query. + */ +module.exports.InvoiceInstanceQuery = { + description: 'Access information about a single Invoice', + resolve: scopeInvariant(scopeOptions, getInvoiceInstance), + type: InvoiceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/invoice/register.js b/src/resources/4_0_0/profiles/invoice/register.js new file mode 100644 index 00000000..40a642ea --- /dev/null +++ b/src/resources/4_0_0/profiles/invoice/register.js @@ -0,0 +1,48 @@ +const { + InvoiceCreateMutation, + InvoiceUpdateMutation, + InvoiceRemoveMutation, +} = require('./mutation'); + +const { + InvoiceQuery, + InvoiceListQuery, + InvoiceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Invoice: InvoiceQuery, + InvoiceList: InvoiceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + InvoiceCreate: InvoiceCreateMutation, + InvoiceUpdate: InvoiceUpdateMutation, + InvoiceRemove: InvoiceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Invoice', + path: '/4_0_0/Invoice/:id', + query: InvoiceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/invoice/resolver.js b/src/resources/4_0_0/profiles/invoice/resolver.js new file mode 100644 index 00000000..4535ebc6 --- /dev/null +++ b/src/resources/4_0_0/profiles/invoice/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getInvoice + * @static + * @summary Invoice resolver. + */ +module.exports.getInvoice = function getInvoice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getInvoiceList + * @static + * @summary Invoice list resolver. + */ +module.exports.getInvoiceList = function getInvoiceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getInvoiceInstance + * @static + * @summary Invoice instance resolver. + */ +module.exports.getInvoiceInstance = function getInvoiceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createInvoice + * @static + * @summary Create Invoice resolver. + */ +module.exports.createInvoice = function createInvoice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateInvoice + * @static + * @summary Update Invoice resolver. + */ +module.exports.updateInvoice = function updateInvoice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeInvoice + * @static + * @summary Remove Invoice resolver. + */ +module.exports.removeInvoice = function removeInvoice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/library/mutation.js b/src/resources/4_0_0/profiles/library/mutation.js new file mode 100644 index 00000000..22da4caf --- /dev/null +++ b/src/resources/4_0_0/profiles/library/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const LibrarySchema = require('../../schemas/library.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const LibraryInput = require('../../inputs/library.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createLibrary, updateLibrary, removeLibrary } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Library', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Library record.', + }, + resource: { + type: new GraphQLNonNull(LibraryInput), + description: 'Library Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Library record for deletion.', + }, +}; + +/** + * @name exports.LibraryCreateMutation + * @summary LibraryCreate mutation. + */ +module.exports.LibraryCreateMutation = { + description: 'Create a Library record', + resolve: scopeInvariant(scopeOptions, createLibrary), + type: LibrarySchema, + args: WriteArgs, +}; + +/** + * @name exports.LibraryUpdateMutation + * @summary LibraryUpdate mutation. + */ +module.exports.LibraryUpdateMutation = { + description: 'Update a Library record', + resolve: scopeInvariant(scopeOptions, updateLibrary), + type: LibrarySchema, + args: WriteArgs, +}; + +/** + * @name exports.LibraryRemoveMutation + * @summary LibraryRemove mutation. + */ +module.exports.LibraryRemoveMutation = { + description: 'Remove a Library record', + resolve: scopeInvariant(scopeOptions, removeLibrary), + type: LibrarySchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/library/query.js b/src/resources/4_0_0/profiles/library/query.js new file mode 100644 index 00000000..e5d7797c --- /dev/null +++ b/src/resources/4_0_0/profiles/library/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const LibrarySchema = require('../../schemas/library.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const LibraryArgs = require('../../parameters/library.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, LibraryArgs); + +// Resolvers +const { + getLibrary, + getLibraryList, + getLibraryInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Library', + action: 'read', +}; + +/** + * @name exports.LibraryQuery + * @summary Library query. + */ +module.exports.LibraryQuery = { + description: 'Query for a single Library', + resolve: scopeInvariant(scopeOptions, getLibrary), + type: LibrarySchema, + args: args, +}; + +/** + * @name exports.LibraryListQuery + * @summary Library query. + */ +module.exports.LibraryListQuery = { + description: 'Query for a more than or just one Library', + resolve: scopeInvariant(scopeOptions, getLibraryList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.LibraryInstanceQuery + * @summary Library query. + */ +module.exports.LibraryInstanceQuery = { + description: 'Access information about a single Library', + resolve: scopeInvariant(scopeOptions, getLibraryInstance), + type: LibrarySchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/library/register.js b/src/resources/4_0_0/profiles/library/register.js new file mode 100644 index 00000000..517b577e --- /dev/null +++ b/src/resources/4_0_0/profiles/library/register.js @@ -0,0 +1,48 @@ +const { + LibraryCreateMutation, + LibraryUpdateMutation, + LibraryRemoveMutation, +} = require('./mutation'); + +const { + LibraryQuery, + LibraryListQuery, + LibraryInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Library: LibraryQuery, + LibraryList: LibraryListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + LibraryCreate: LibraryCreateMutation, + LibraryUpdate: LibraryUpdateMutation, + LibraryRemove: LibraryRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Library', + path: '/4_0_0/Library/:id', + query: LibraryInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/library/resolver.js b/src/resources/4_0_0/profiles/library/resolver.js new file mode 100644 index 00000000..e52452f3 --- /dev/null +++ b/src/resources/4_0_0/profiles/library/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getLibrary + * @static + * @summary Library resolver. + */ +module.exports.getLibrary = function getLibrary( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getLibraryList + * @static + * @summary Library list resolver. + */ +module.exports.getLibraryList = function getLibraryList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getLibraryInstance + * @static + * @summary Library instance resolver. + */ +module.exports.getLibraryInstance = function getLibraryInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createLibrary + * @static + * @summary Create Library resolver. + */ +module.exports.createLibrary = function createLibrary( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateLibrary + * @static + * @summary Update Library resolver. + */ +module.exports.updateLibrary = function updateLibrary( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeLibrary + * @static + * @summary Remove Library resolver. + */ +module.exports.removeLibrary = function removeLibrary( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/linkage/mutation.js b/src/resources/4_0_0/profiles/linkage/mutation.js new file mode 100644 index 00000000..82d43f08 --- /dev/null +++ b/src/resources/4_0_0/profiles/linkage/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const LinkageSchema = require('../../schemas/linkage.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const LinkageInput = require('../../inputs/linkage.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createLinkage, updateLinkage, removeLinkage } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Linkage', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Linkage record.', + }, + resource: { + type: new GraphQLNonNull(LinkageInput), + description: 'Linkage Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Linkage record for deletion.', + }, +}; + +/** + * @name exports.LinkageCreateMutation + * @summary LinkageCreate mutation. + */ +module.exports.LinkageCreateMutation = { + description: 'Create a Linkage record', + resolve: scopeInvariant(scopeOptions, createLinkage), + type: LinkageSchema, + args: WriteArgs, +}; + +/** + * @name exports.LinkageUpdateMutation + * @summary LinkageUpdate mutation. + */ +module.exports.LinkageUpdateMutation = { + description: 'Update a Linkage record', + resolve: scopeInvariant(scopeOptions, updateLinkage), + type: LinkageSchema, + args: WriteArgs, +}; + +/** + * @name exports.LinkageRemoveMutation + * @summary LinkageRemove mutation. + */ +module.exports.LinkageRemoveMutation = { + description: 'Remove a Linkage record', + resolve: scopeInvariant(scopeOptions, removeLinkage), + type: LinkageSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/linkage/query.js b/src/resources/4_0_0/profiles/linkage/query.js new file mode 100644 index 00000000..2848a407 --- /dev/null +++ b/src/resources/4_0_0/profiles/linkage/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const LinkageSchema = require('../../schemas/linkage.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const LinkageArgs = require('../../parameters/linkage.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, LinkageArgs); + +// Resolvers +const { + getLinkage, + getLinkageList, + getLinkageInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Linkage', + action: 'read', +}; + +/** + * @name exports.LinkageQuery + * @summary Linkage query. + */ +module.exports.LinkageQuery = { + description: 'Query for a single Linkage', + resolve: scopeInvariant(scopeOptions, getLinkage), + type: LinkageSchema, + args: args, +}; + +/** + * @name exports.LinkageListQuery + * @summary Linkage query. + */ +module.exports.LinkageListQuery = { + description: 'Query for a more than or just one Linkage', + resolve: scopeInvariant(scopeOptions, getLinkageList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.LinkageInstanceQuery + * @summary Linkage query. + */ +module.exports.LinkageInstanceQuery = { + description: 'Access information about a single Linkage', + resolve: scopeInvariant(scopeOptions, getLinkageInstance), + type: LinkageSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/linkage/register.js b/src/resources/4_0_0/profiles/linkage/register.js new file mode 100644 index 00000000..8b01f5be --- /dev/null +++ b/src/resources/4_0_0/profiles/linkage/register.js @@ -0,0 +1,48 @@ +const { + LinkageCreateMutation, + LinkageUpdateMutation, + LinkageRemoveMutation, +} = require('./mutation'); + +const { + LinkageQuery, + LinkageListQuery, + LinkageInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Linkage: LinkageQuery, + LinkageList: LinkageListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + LinkageCreate: LinkageCreateMutation, + LinkageUpdate: LinkageUpdateMutation, + LinkageRemove: LinkageRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Linkage', + path: '/4_0_0/Linkage/:id', + query: LinkageInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/linkage/resolver.js b/src/resources/4_0_0/profiles/linkage/resolver.js new file mode 100644 index 00000000..eaf9881d --- /dev/null +++ b/src/resources/4_0_0/profiles/linkage/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getLinkage + * @static + * @summary Linkage resolver. + */ +module.exports.getLinkage = function getLinkage( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getLinkageList + * @static + * @summary Linkage list resolver. + */ +module.exports.getLinkageList = function getLinkageList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getLinkageInstance + * @static + * @summary Linkage instance resolver. + */ +module.exports.getLinkageInstance = function getLinkageInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createLinkage + * @static + * @summary Create Linkage resolver. + */ +module.exports.createLinkage = function createLinkage( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateLinkage + * @static + * @summary Update Linkage resolver. + */ +module.exports.updateLinkage = function updateLinkage( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeLinkage + * @static + * @summary Remove Linkage resolver. + */ +module.exports.removeLinkage = function removeLinkage( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/list/mutation.js b/src/resources/4_0_0/profiles/list/mutation.js new file mode 100644 index 00000000..e23ef148 --- /dev/null +++ b/src/resources/4_0_0/profiles/list/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const ListSchema = require('../../schemas/list.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ListInput = require('../../inputs/list.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createList, updateList, removeList } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'List', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a List record.', + }, + resource: { + type: new GraphQLNonNull(ListInput), + description: 'List Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a List record for deletion.', + }, +}; + +/** + * @name exports.ListCreateMutation + * @summary ListCreate mutation. + */ +module.exports.ListCreateMutation = { + description: 'Create a List record', + resolve: scopeInvariant(scopeOptions, createList), + type: ListSchema, + args: WriteArgs, +}; + +/** + * @name exports.ListUpdateMutation + * @summary ListUpdate mutation. + */ +module.exports.ListUpdateMutation = { + description: 'Update a List record', + resolve: scopeInvariant(scopeOptions, updateList), + type: ListSchema, + args: WriteArgs, +}; + +/** + * @name exports.ListRemoveMutation + * @summary ListRemove mutation. + */ +module.exports.ListRemoveMutation = { + description: 'Remove a List record', + resolve: scopeInvariant(scopeOptions, removeList), + type: ListSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/list/query.js b/src/resources/4_0_0/profiles/list/query.js new file mode 100644 index 00000000..246af79c --- /dev/null +++ b/src/resources/4_0_0/profiles/list/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ListSchema = require('../../schemas/list.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ListArgs = require('../../parameters/list.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ListArgs); + +// Resolvers +const { getList, getListList, getListInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'List', + action: 'read', +}; + +/** + * @name exports.ListQuery + * @summary List query. + */ +module.exports.ListQuery = { + description: 'Query for a single List', + resolve: scopeInvariant(scopeOptions, getList), + type: ListSchema, + args: args, +}; + +/** + * @name exports.ListListQuery + * @summary List query. + */ +module.exports.ListListQuery = { + description: 'Query for a more than or just one List', + resolve: scopeInvariant(scopeOptions, getListList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ListInstanceQuery + * @summary List query. + */ +module.exports.ListInstanceQuery = { + description: 'Access information about a single List', + resolve: scopeInvariant(scopeOptions, getListInstance), + type: ListSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/list/register.js b/src/resources/4_0_0/profiles/list/register.js new file mode 100644 index 00000000..36c8678c --- /dev/null +++ b/src/resources/4_0_0/profiles/list/register.js @@ -0,0 +1,44 @@ +const { + ListCreateMutation, + ListUpdateMutation, + ListRemoveMutation, +} = require('./mutation'); + +const { ListQuery, ListListQuery, ListInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + List: ListQuery, + ListList: ListListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ListCreate: ListCreateMutation, + ListUpdate: ListUpdateMutation, + ListRemove: ListRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'List', + path: '/4_0_0/List/:id', + query: ListInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/list/resolver.js b/src/resources/4_0_0/profiles/list/resolver.js new file mode 100644 index 00000000..5cc5c290 --- /dev/null +++ b/src/resources/4_0_0/profiles/list/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getList + * @static + * @summary List resolver. + */ +module.exports.getList = function getList(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getListList + * @static + * @summary List list resolver. + */ +module.exports.getListList = function getListList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getListInstance + * @static + * @summary List instance resolver. + */ +module.exports.getListInstance = function getListInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createList + * @static + * @summary Create List resolver. + */ +module.exports.createList = function createList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateList + * @static + * @summary Update List resolver. + */ +module.exports.updateList = function updateList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeList + * @static + * @summary Remove List resolver. + */ +module.exports.removeList = function removeList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/location/mutation.js b/src/resources/4_0_0/profiles/location/mutation.js new file mode 100644 index 00000000..7e495221 --- /dev/null +++ b/src/resources/4_0_0/profiles/location/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const LocationSchema = require('../../schemas/location.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const LocationInput = require('../../inputs/location.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createLocation, + updateLocation, + removeLocation, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Location', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Location record.', + }, + resource: { + type: new GraphQLNonNull(LocationInput), + description: 'Location Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Location record for deletion.', + }, +}; + +/** + * @name exports.LocationCreateMutation + * @summary LocationCreate mutation. + */ +module.exports.LocationCreateMutation = { + description: 'Create a Location record', + resolve: scopeInvariant(scopeOptions, createLocation), + type: LocationSchema, + args: WriteArgs, +}; + +/** + * @name exports.LocationUpdateMutation + * @summary LocationUpdate mutation. + */ +module.exports.LocationUpdateMutation = { + description: 'Update a Location record', + resolve: scopeInvariant(scopeOptions, updateLocation), + type: LocationSchema, + args: WriteArgs, +}; + +/** + * @name exports.LocationRemoveMutation + * @summary LocationRemove mutation. + */ +module.exports.LocationRemoveMutation = { + description: 'Remove a Location record', + resolve: scopeInvariant(scopeOptions, removeLocation), + type: LocationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/location/query.js b/src/resources/4_0_0/profiles/location/query.js new file mode 100644 index 00000000..ec0b38b5 --- /dev/null +++ b/src/resources/4_0_0/profiles/location/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const LocationSchema = require('../../schemas/location.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const LocationArgs = require('../../parameters/location.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, LocationArgs); + +// Resolvers +const { + getLocation, + getLocationList, + getLocationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Location', + action: 'read', +}; + +/** + * @name exports.LocationQuery + * @summary Location query. + */ +module.exports.LocationQuery = { + description: 'Query for a single Location', + resolve: scopeInvariant(scopeOptions, getLocation), + type: LocationSchema, + args: args, +}; + +/** + * @name exports.LocationListQuery + * @summary Location query. + */ +module.exports.LocationListQuery = { + description: 'Query for a more than or just one Location', + resolve: scopeInvariant(scopeOptions, getLocationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.LocationInstanceQuery + * @summary Location query. + */ +module.exports.LocationInstanceQuery = { + description: 'Access information about a single Location', + resolve: scopeInvariant(scopeOptions, getLocationInstance), + type: LocationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/location/register.js b/src/resources/4_0_0/profiles/location/register.js new file mode 100644 index 00000000..7a488fcb --- /dev/null +++ b/src/resources/4_0_0/profiles/location/register.js @@ -0,0 +1,48 @@ +const { + LocationCreateMutation, + LocationUpdateMutation, + LocationRemoveMutation, +} = require('./mutation'); + +const { + LocationQuery, + LocationListQuery, + LocationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Location: LocationQuery, + LocationList: LocationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + LocationCreate: LocationCreateMutation, + LocationUpdate: LocationUpdateMutation, + LocationRemove: LocationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Location', + path: '/4_0_0/Location/:id', + query: LocationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/location/resolver.js b/src/resources/4_0_0/profiles/location/resolver.js new file mode 100644 index 00000000..3a4b4712 --- /dev/null +++ b/src/resources/4_0_0/profiles/location/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getLocation + * @static + * @summary Location resolver. + */ +module.exports.getLocation = function getLocation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getLocationList + * @static + * @summary Location list resolver. + */ +module.exports.getLocationList = function getLocationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getLocationInstance + * @static + * @summary Location instance resolver. + */ +module.exports.getLocationInstance = function getLocationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createLocation + * @static + * @summary Create Location resolver. + */ +module.exports.createLocation = function createLocation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateLocation + * @static + * @summary Update Location resolver. + */ +module.exports.updateLocation = function updateLocation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeLocation + * @static + * @summary Remove Location resolver. + */ +module.exports.removeLocation = function removeLocation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/measure/mutation.js b/src/resources/4_0_0/profiles/measure/mutation.js new file mode 100644 index 00000000..9bdc18aa --- /dev/null +++ b/src/resources/4_0_0/profiles/measure/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const MeasureSchema = require('../../schemas/measure.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MeasureInput = require('../../inputs/measure.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createMeasure, updateMeasure, removeMeasure } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Measure', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Measure record.', + }, + resource: { + type: new GraphQLNonNull(MeasureInput), + description: 'Measure Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Measure record for deletion.', + }, +}; + +/** + * @name exports.MeasureCreateMutation + * @summary MeasureCreate mutation. + */ +module.exports.MeasureCreateMutation = { + description: 'Create a Measure record', + resolve: scopeInvariant(scopeOptions, createMeasure), + type: MeasureSchema, + args: WriteArgs, +}; + +/** + * @name exports.MeasureUpdateMutation + * @summary MeasureUpdate mutation. + */ +module.exports.MeasureUpdateMutation = { + description: 'Update a Measure record', + resolve: scopeInvariant(scopeOptions, updateMeasure), + type: MeasureSchema, + args: WriteArgs, +}; + +/** + * @name exports.MeasureRemoveMutation + * @summary MeasureRemove mutation. + */ +module.exports.MeasureRemoveMutation = { + description: 'Remove a Measure record', + resolve: scopeInvariant(scopeOptions, removeMeasure), + type: MeasureSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/measure/query.js b/src/resources/4_0_0/profiles/measure/query.js new file mode 100644 index 00000000..07079a77 --- /dev/null +++ b/src/resources/4_0_0/profiles/measure/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MeasureSchema = require('../../schemas/measure.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MeasureArgs = require('../../parameters/measure.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, MeasureArgs); + +// Resolvers +const { + getMeasure, + getMeasureList, + getMeasureInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Measure', + action: 'read', +}; + +/** + * @name exports.MeasureQuery + * @summary Measure query. + */ +module.exports.MeasureQuery = { + description: 'Query for a single Measure', + resolve: scopeInvariant(scopeOptions, getMeasure), + type: MeasureSchema, + args: args, +}; + +/** + * @name exports.MeasureListQuery + * @summary Measure query. + */ +module.exports.MeasureListQuery = { + description: 'Query for a more than or just one Measure', + resolve: scopeInvariant(scopeOptions, getMeasureList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MeasureInstanceQuery + * @summary Measure query. + */ +module.exports.MeasureInstanceQuery = { + description: 'Access information about a single Measure', + resolve: scopeInvariant(scopeOptions, getMeasureInstance), + type: MeasureSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/measure/register.js b/src/resources/4_0_0/profiles/measure/register.js new file mode 100644 index 00000000..82e1dbb1 --- /dev/null +++ b/src/resources/4_0_0/profiles/measure/register.js @@ -0,0 +1,48 @@ +const { + MeasureCreateMutation, + MeasureUpdateMutation, + MeasureRemoveMutation, +} = require('./mutation'); + +const { + MeasureQuery, + MeasureListQuery, + MeasureInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Measure: MeasureQuery, + MeasureList: MeasureListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MeasureCreate: MeasureCreateMutation, + MeasureUpdate: MeasureUpdateMutation, + MeasureRemove: MeasureRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Measure', + path: '/4_0_0/Measure/:id', + query: MeasureInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/measure/resolver.js b/src/resources/4_0_0/profiles/measure/resolver.js new file mode 100644 index 00000000..35c7ae43 --- /dev/null +++ b/src/resources/4_0_0/profiles/measure/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMeasure + * @static + * @summary Measure resolver. + */ +module.exports.getMeasure = function getMeasure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMeasureList + * @static + * @summary Measure list resolver. + */ +module.exports.getMeasureList = function getMeasureList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMeasureInstance + * @static + * @summary Measure instance resolver. + */ +module.exports.getMeasureInstance = function getMeasureInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMeasure + * @static + * @summary Create Measure resolver. + */ +module.exports.createMeasure = function createMeasure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMeasure + * @static + * @summary Update Measure resolver. + */ +module.exports.updateMeasure = function updateMeasure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMeasure + * @static + * @summary Remove Measure resolver. + */ +module.exports.removeMeasure = function removeMeasure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/measurereport/mutation.js b/src/resources/4_0_0/profiles/measurereport/mutation.js new file mode 100644 index 00000000..de5caa86 --- /dev/null +++ b/src/resources/4_0_0/profiles/measurereport/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MeasureReportSchema = require('../../schemas/measurereport.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MeasureReportInput = require('../../inputs/measurereport.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMeasureReport, + updateMeasureReport, + removeMeasureReport, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MeasureReport', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MeasureReport record.', + }, + resource: { + type: new GraphQLNonNull(MeasureReportInput), + description: 'MeasureReport Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MeasureReport record for deletion.', + }, +}; + +/** + * @name exports.MeasureReportCreateMutation + * @summary MeasureReportCreate mutation. + */ +module.exports.MeasureReportCreateMutation = { + description: 'Create a MeasureReport record', + resolve: scopeInvariant(scopeOptions, createMeasureReport), + type: MeasureReportSchema, + args: WriteArgs, +}; + +/** + * @name exports.MeasureReportUpdateMutation + * @summary MeasureReportUpdate mutation. + */ +module.exports.MeasureReportUpdateMutation = { + description: 'Update a MeasureReport record', + resolve: scopeInvariant(scopeOptions, updateMeasureReport), + type: MeasureReportSchema, + args: WriteArgs, +}; + +/** + * @name exports.MeasureReportRemoveMutation + * @summary MeasureReportRemove mutation. + */ +module.exports.MeasureReportRemoveMutation = { + description: 'Remove a MeasureReport record', + resolve: scopeInvariant(scopeOptions, removeMeasureReport), + type: MeasureReportSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/measurereport/query.js b/src/resources/4_0_0/profiles/measurereport/query.js new file mode 100644 index 00000000..a8c5ad41 --- /dev/null +++ b/src/resources/4_0_0/profiles/measurereport/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MeasureReportSchema = require('../../schemas/measurereport.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MeasureReportArgs = require('../../parameters/measurereport.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MeasureReportArgs, +); + +// Resolvers +const { + getMeasureReport, + getMeasureReportList, + getMeasureReportInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MeasureReport', + action: 'read', +}; + +/** + * @name exports.MeasureReportQuery + * @summary MeasureReport query. + */ +module.exports.MeasureReportQuery = { + description: 'Query for a single MeasureReport', + resolve: scopeInvariant(scopeOptions, getMeasureReport), + type: MeasureReportSchema, + args: args, +}; + +/** + * @name exports.MeasureReportListQuery + * @summary MeasureReport query. + */ +module.exports.MeasureReportListQuery = { + description: 'Query for a more than or just one MeasureReport', + resolve: scopeInvariant(scopeOptions, getMeasureReportList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MeasureReportInstanceQuery + * @summary MeasureReport query. + */ +module.exports.MeasureReportInstanceQuery = { + description: 'Access information about a single MeasureReport', + resolve: scopeInvariant(scopeOptions, getMeasureReportInstance), + type: MeasureReportSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/measurereport/register.js b/src/resources/4_0_0/profiles/measurereport/register.js new file mode 100644 index 00000000..9e3e28cd --- /dev/null +++ b/src/resources/4_0_0/profiles/measurereport/register.js @@ -0,0 +1,48 @@ +const { + MeasureReportCreateMutation, + MeasureReportUpdateMutation, + MeasureReportRemoveMutation, +} = require('./mutation'); + +const { + MeasureReportQuery, + MeasureReportListQuery, + MeasureReportInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MeasureReport: MeasureReportQuery, + MeasureReportList: MeasureReportListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MeasureReportCreate: MeasureReportCreateMutation, + MeasureReportUpdate: MeasureReportUpdateMutation, + MeasureReportRemove: MeasureReportRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MeasureReport', + path: '/4_0_0/MeasureReport/:id', + query: MeasureReportInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/measurereport/resolver.js b/src/resources/4_0_0/profiles/measurereport/resolver.js new file mode 100644 index 00000000..d99a4337 --- /dev/null +++ b/src/resources/4_0_0/profiles/measurereport/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMeasureReport + * @static + * @summary MeasureReport resolver. + */ +module.exports.getMeasureReport = function getMeasureReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMeasureReportList + * @static + * @summary MeasureReport list resolver. + */ +module.exports.getMeasureReportList = function getMeasureReportList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMeasureReportInstance + * @static + * @summary MeasureReport instance resolver. + */ +module.exports.getMeasureReportInstance = function getMeasureReportInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMeasureReport + * @static + * @summary Create MeasureReport resolver. + */ +module.exports.createMeasureReport = function createMeasureReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMeasureReport + * @static + * @summary Update MeasureReport resolver. + */ +module.exports.updateMeasureReport = function updateMeasureReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMeasureReport + * @static + * @summary Remove MeasureReport resolver. + */ +module.exports.removeMeasureReport = function removeMeasureReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/media/mutation.js b/src/resources/4_0_0/profiles/media/mutation.js new file mode 100644 index 00000000..7bf70ac2 --- /dev/null +++ b/src/resources/4_0_0/profiles/media/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const MediaSchema = require('../../schemas/media.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MediaInput = require('../../inputs/media.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createMedia, updateMedia, removeMedia } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Media', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Media record.', + }, + resource: { + type: new GraphQLNonNull(MediaInput), + description: 'Media Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a Media record for deletion.', + }, +}; + +/** + * @name exports.MediaCreateMutation + * @summary MediaCreate mutation. + */ +module.exports.MediaCreateMutation = { + description: 'Create a Media record', + resolve: scopeInvariant(scopeOptions, createMedia), + type: MediaSchema, + args: WriteArgs, +}; + +/** + * @name exports.MediaUpdateMutation + * @summary MediaUpdate mutation. + */ +module.exports.MediaUpdateMutation = { + description: 'Update a Media record', + resolve: scopeInvariant(scopeOptions, updateMedia), + type: MediaSchema, + args: WriteArgs, +}; + +/** + * @name exports.MediaRemoveMutation + * @summary MediaRemove mutation. + */ +module.exports.MediaRemoveMutation = { + description: 'Remove a Media record', + resolve: scopeInvariant(scopeOptions, removeMedia), + type: MediaSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/media/query.js b/src/resources/4_0_0/profiles/media/query.js new file mode 100644 index 00000000..edae55c8 --- /dev/null +++ b/src/resources/4_0_0/profiles/media/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MediaSchema = require('../../schemas/media.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MediaArgs = require('../../parameters/media.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, MediaArgs); + +// Resolvers +const { getMedia, getMediaList, getMediaInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Media', + action: 'read', +}; + +/** + * @name exports.MediaQuery + * @summary Media query. + */ +module.exports.MediaQuery = { + description: 'Query for a single Media', + resolve: scopeInvariant(scopeOptions, getMedia), + type: MediaSchema, + args: args, +}; + +/** + * @name exports.MediaListQuery + * @summary Media query. + */ +module.exports.MediaListQuery = { + description: 'Query for a more than or just one Media', + resolve: scopeInvariant(scopeOptions, getMediaList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MediaInstanceQuery + * @summary Media query. + */ +module.exports.MediaInstanceQuery = { + description: 'Access information about a single Media', + resolve: scopeInvariant(scopeOptions, getMediaInstance), + type: MediaSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/media/register.js b/src/resources/4_0_0/profiles/media/register.js new file mode 100644 index 00000000..2c89247d --- /dev/null +++ b/src/resources/4_0_0/profiles/media/register.js @@ -0,0 +1,44 @@ +const { + MediaCreateMutation, + MediaUpdateMutation, + MediaRemoveMutation, +} = require('./mutation'); + +const { MediaQuery, MediaListQuery, MediaInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Media: MediaQuery, + MediaList: MediaListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MediaCreate: MediaCreateMutation, + MediaUpdate: MediaUpdateMutation, + MediaRemove: MediaRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Media', + path: '/4_0_0/Media/:id', + query: MediaInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/media/resolver.js b/src/resources/4_0_0/profiles/media/resolver.js new file mode 100644 index 00000000..992e07ff --- /dev/null +++ b/src/resources/4_0_0/profiles/media/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getMedia + * @static + * @summary Media resolver. + */ +module.exports.getMedia = function getMedia(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMediaList + * @static + * @summary Media list resolver. + */ +module.exports.getMediaList = function getMediaList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMediaInstance + * @static + * @summary Media instance resolver. + */ +module.exports.getMediaInstance = function getMediaInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedia + * @static + * @summary Create Media resolver. + */ +module.exports.createMedia = function createMedia( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedia + * @static + * @summary Update Media resolver. + */ +module.exports.updateMedia = function updateMedia( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedia + * @static + * @summary Remove Media resolver. + */ +module.exports.removeMedia = function removeMedia( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medication/mutation.js b/src/resources/4_0_0/profiles/medication/mutation.js new file mode 100644 index 00000000..fba0a527 --- /dev/null +++ b/src/resources/4_0_0/profiles/medication/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const MedicationSchema = require('../../schemas/medication.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicationInput = require('../../inputs/medication.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedication, + updateMedication, + removeMedication, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Medication', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Medication record.', + }, + resource: { + type: new GraphQLNonNull(MedicationInput), + description: 'Medication Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Medication record for deletion.', + }, +}; + +/** + * @name exports.MedicationCreateMutation + * @summary MedicationCreate mutation. + */ +module.exports.MedicationCreateMutation = { + description: 'Create a Medication record', + resolve: scopeInvariant(scopeOptions, createMedication), + type: MedicationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationUpdateMutation + * @summary MedicationUpdate mutation. + */ +module.exports.MedicationUpdateMutation = { + description: 'Update a Medication record', + resolve: scopeInvariant(scopeOptions, updateMedication), + type: MedicationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationRemoveMutation + * @summary MedicationRemove mutation. + */ +module.exports.MedicationRemoveMutation = { + description: 'Remove a Medication record', + resolve: scopeInvariant(scopeOptions, removeMedication), + type: MedicationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medication/query.js b/src/resources/4_0_0/profiles/medication/query.js new file mode 100644 index 00000000..ae1be0a1 --- /dev/null +++ b/src/resources/4_0_0/profiles/medication/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationSchema = require('../../schemas/medication.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicationArgs = require('../../parameters/medication.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, MedicationArgs); + +// Resolvers +const { + getMedication, + getMedicationList, + getMedicationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Medication', + action: 'read', +}; + +/** + * @name exports.MedicationQuery + * @summary Medication query. + */ +module.exports.MedicationQuery = { + description: 'Query for a single Medication', + resolve: scopeInvariant(scopeOptions, getMedication), + type: MedicationSchema, + args: args, +}; + +/** + * @name exports.MedicationListQuery + * @summary Medication query. + */ +module.exports.MedicationListQuery = { + description: 'Query for a more than or just one Medication', + resolve: scopeInvariant(scopeOptions, getMedicationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicationInstanceQuery + * @summary Medication query. + */ +module.exports.MedicationInstanceQuery = { + description: 'Access information about a single Medication', + resolve: scopeInvariant(scopeOptions, getMedicationInstance), + type: MedicationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medication/register.js b/src/resources/4_0_0/profiles/medication/register.js new file mode 100644 index 00000000..a4447f2a --- /dev/null +++ b/src/resources/4_0_0/profiles/medication/register.js @@ -0,0 +1,48 @@ +const { + MedicationCreateMutation, + MedicationUpdateMutation, + MedicationRemoveMutation, +} = require('./mutation'); + +const { + MedicationQuery, + MedicationListQuery, + MedicationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Medication: MedicationQuery, + MedicationList: MedicationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicationCreate: MedicationCreateMutation, + MedicationUpdate: MedicationUpdateMutation, + MedicationRemove: MedicationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Medication', + path: '/4_0_0/Medication/:id', + query: MedicationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medication/resolver.js b/src/resources/4_0_0/profiles/medication/resolver.js new file mode 100644 index 00000000..1fd3cb4a --- /dev/null +++ b/src/resources/4_0_0/profiles/medication/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedication + * @static + * @summary Medication resolver. + */ +module.exports.getMedication = function getMedication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationList + * @static + * @summary Medication list resolver. + */ +module.exports.getMedicationList = function getMedicationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationInstance + * @static + * @summary Medication instance resolver. + */ +module.exports.getMedicationInstance = function getMedicationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedication + * @static + * @summary Create Medication resolver. + */ +module.exports.createMedication = function createMedication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedication + * @static + * @summary Update Medication resolver. + */ +module.exports.updateMedication = function updateMedication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedication + * @static + * @summary Remove Medication resolver. + */ +module.exports.removeMedication = function removeMedication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicationadministration/mutation.js b/src/resources/4_0_0/profiles/medicationadministration/mutation.js new file mode 100644 index 00000000..23cefb92 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationadministration/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicationAdministrationInput = require('../../inputs/medicationadministration.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicationAdministration, + updateMedicationAdministration, + removeMedicationAdministration, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationAdministration', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicationAdministration record.', + }, + resource: { + type: new GraphQLNonNull(MedicationAdministrationInput), + description: 'MedicationAdministration Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicationAdministration record for deletion.', + }, +}; + +/** + * @name exports.MedicationAdministrationCreateMutation + * @summary MedicationAdministrationCreate mutation. + */ +module.exports.MedicationAdministrationCreateMutation = { + description: 'Create a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, createMedicationAdministration), + type: MedicationAdministrationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationAdministrationUpdateMutation + * @summary MedicationAdministrationUpdate mutation. + */ +module.exports.MedicationAdministrationUpdateMutation = { + description: 'Update a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, updateMedicationAdministration), + type: MedicationAdministrationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationAdministrationRemoveMutation + * @summary MedicationAdministrationRemove mutation. + */ +module.exports.MedicationAdministrationRemoveMutation = { + description: 'Remove a MedicationAdministration record', + resolve: scopeInvariant(scopeOptions, removeMedicationAdministration), + type: MedicationAdministrationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicationadministration/query.js b/src/resources/4_0_0/profiles/medicationadministration/query.js new file mode 100644 index 00000000..f7bbc6ed --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationadministration/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationAdministrationSchema = require('../../schemas/medicationadministration.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicationAdministrationArgs = require('../../parameters/medicationadministration.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationAdministrationArgs, +); + +// Resolvers +const { + getMedicationAdministration, + getMedicationAdministrationList, + getMedicationAdministrationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationAdministration', + action: 'read', +}; + +/** + * @name exports.MedicationAdministrationQuery + * @summary MedicationAdministration query. + */ +module.exports.MedicationAdministrationQuery = { + description: 'Query for a single MedicationAdministration', + resolve: scopeInvariant(scopeOptions, getMedicationAdministration), + type: MedicationAdministrationSchema, + args: args, +}; + +/** + * @name exports.MedicationAdministrationListQuery + * @summary MedicationAdministration query. + */ +module.exports.MedicationAdministrationListQuery = { + description: 'Query for a more than or just one MedicationAdministration', + resolve: scopeInvariant(scopeOptions, getMedicationAdministrationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicationAdministrationInstanceQuery + * @summary MedicationAdministration query. + */ +module.exports.MedicationAdministrationInstanceQuery = { + description: 'Access information about a single MedicationAdministration', + resolve: scopeInvariant(scopeOptions, getMedicationAdministrationInstance), + type: MedicationAdministrationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicationadministration/register.js b/src/resources/4_0_0/profiles/medicationadministration/register.js new file mode 100644 index 00000000..3e59a6e5 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationadministration/register.js @@ -0,0 +1,48 @@ +const { + MedicationAdministrationCreateMutation, + MedicationAdministrationUpdateMutation, + MedicationAdministrationRemoveMutation, +} = require('./mutation'); + +const { + MedicationAdministrationQuery, + MedicationAdministrationListQuery, + MedicationAdministrationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicationAdministration: MedicationAdministrationQuery, + MedicationAdministrationList: MedicationAdministrationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicationAdministrationCreate: MedicationAdministrationCreateMutation, + MedicationAdministrationUpdate: MedicationAdministrationUpdateMutation, + MedicationAdministrationRemove: MedicationAdministrationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicationAdministration', + path: '/4_0_0/MedicationAdministration/:id', + query: MedicationAdministrationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicationadministration/resolver.js b/src/resources/4_0_0/profiles/medicationadministration/resolver.js new file mode 100644 index 00000000..db9d52cb --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationadministration/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicationAdministration + * @static + * @summary MedicationAdministration resolver. + */ +module.exports.getMedicationAdministration = function getMedicationAdministration( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationAdministrationList + * @static + * @summary MedicationAdministration list resolver. + */ +module.exports.getMedicationAdministrationList = function getMedicationAdministrationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationAdministrationInstance + * @static + * @summary MedicationAdministration instance resolver. + */ +module.exports.getMedicationAdministrationInstance = function getMedicationAdministrationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicationAdministration + * @static + * @summary Create MedicationAdministration resolver. + */ +module.exports.createMedicationAdministration = function createMedicationAdministration( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicationAdministration + * @static + * @summary Update MedicationAdministration resolver. + */ +module.exports.updateMedicationAdministration = function updateMedicationAdministration( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicationAdministration + * @static + * @summary Remove MedicationAdministration resolver. + */ +module.exports.removeMedicationAdministration = function removeMedicationAdministration( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicationdispense/mutation.js b/src/resources/4_0_0/profiles/medicationdispense/mutation.js new file mode 100644 index 00000000..4d5d21ba --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationdispense/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicationDispenseInput = require('../../inputs/medicationdispense.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicationDispense, + updateMedicationDispense, + removeMedicationDispense, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationDispense', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicationDispense record.', + }, + resource: { + type: new GraphQLNonNull(MedicationDispenseInput), + description: 'MedicationDispense Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicationDispense record for deletion.', + }, +}; + +/** + * @name exports.MedicationDispenseCreateMutation + * @summary MedicationDispenseCreate mutation. + */ +module.exports.MedicationDispenseCreateMutation = { + description: 'Create a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, createMedicationDispense), + type: MedicationDispenseSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationDispenseUpdateMutation + * @summary MedicationDispenseUpdate mutation. + */ +module.exports.MedicationDispenseUpdateMutation = { + description: 'Update a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, updateMedicationDispense), + type: MedicationDispenseSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationDispenseRemoveMutation + * @summary MedicationDispenseRemove mutation. + */ +module.exports.MedicationDispenseRemoveMutation = { + description: 'Remove a MedicationDispense record', + resolve: scopeInvariant(scopeOptions, removeMedicationDispense), + type: MedicationDispenseSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicationdispense/query.js b/src/resources/4_0_0/profiles/medicationdispense/query.js new file mode 100644 index 00000000..3dc59b93 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationdispense/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationDispenseSchema = require('../../schemas/medicationdispense.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicationDispenseArgs = require('../../parameters/medicationdispense.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationDispenseArgs, +); + +// Resolvers +const { + getMedicationDispense, + getMedicationDispenseList, + getMedicationDispenseInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationDispense', + action: 'read', +}; + +/** + * @name exports.MedicationDispenseQuery + * @summary MedicationDispense query. + */ +module.exports.MedicationDispenseQuery = { + description: 'Query for a single MedicationDispense', + resolve: scopeInvariant(scopeOptions, getMedicationDispense), + type: MedicationDispenseSchema, + args: args, +}; + +/** + * @name exports.MedicationDispenseListQuery + * @summary MedicationDispense query. + */ +module.exports.MedicationDispenseListQuery = { + description: 'Query for a more than or just one MedicationDispense', + resolve: scopeInvariant(scopeOptions, getMedicationDispenseList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicationDispenseInstanceQuery + * @summary MedicationDispense query. + */ +module.exports.MedicationDispenseInstanceQuery = { + description: 'Access information about a single MedicationDispense', + resolve: scopeInvariant(scopeOptions, getMedicationDispenseInstance), + type: MedicationDispenseSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicationdispense/register.js b/src/resources/4_0_0/profiles/medicationdispense/register.js new file mode 100644 index 00000000..b2fdef22 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationdispense/register.js @@ -0,0 +1,48 @@ +const { + MedicationDispenseCreateMutation, + MedicationDispenseUpdateMutation, + MedicationDispenseRemoveMutation, +} = require('./mutation'); + +const { + MedicationDispenseQuery, + MedicationDispenseListQuery, + MedicationDispenseInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicationDispense: MedicationDispenseQuery, + MedicationDispenseList: MedicationDispenseListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicationDispenseCreate: MedicationDispenseCreateMutation, + MedicationDispenseUpdate: MedicationDispenseUpdateMutation, + MedicationDispenseRemove: MedicationDispenseRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicationDispense', + path: '/4_0_0/MedicationDispense/:id', + query: MedicationDispenseInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicationdispense/resolver.js b/src/resources/4_0_0/profiles/medicationdispense/resolver.js new file mode 100644 index 00000000..8e02c449 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationdispense/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicationDispense + * @static + * @summary MedicationDispense resolver. + */ +module.exports.getMedicationDispense = function getMedicationDispense( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationDispenseList + * @static + * @summary MedicationDispense list resolver. + */ +module.exports.getMedicationDispenseList = function getMedicationDispenseList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationDispenseInstance + * @static + * @summary MedicationDispense instance resolver. + */ +module.exports.getMedicationDispenseInstance = function getMedicationDispenseInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicationDispense + * @static + * @summary Create MedicationDispense resolver. + */ +module.exports.createMedicationDispense = function createMedicationDispense( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicationDispense + * @static + * @summary Update MedicationDispense resolver. + */ +module.exports.updateMedicationDispense = function updateMedicationDispense( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicationDispense + * @static + * @summary Remove MedicationDispense resolver. + */ +module.exports.removeMedicationDispense = function removeMedicationDispense( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicationknowledge/mutation.js b/src/resources/4_0_0/profiles/medicationknowledge/mutation.js new file mode 100644 index 00000000..39ba2030 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationknowledge/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicationKnowledgeSchema = require('../../schemas/medicationknowledge.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicationKnowledgeInput = require('../../inputs/medicationknowledge.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicationKnowledge, + updateMedicationKnowledge, + removeMedicationKnowledge, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationKnowledge', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicationKnowledge record.', + }, + resource: { + type: new GraphQLNonNull(MedicationKnowledgeInput), + description: 'MedicationKnowledge Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicationKnowledge record for deletion.', + }, +}; + +/** + * @name exports.MedicationKnowledgeCreateMutation + * @summary MedicationKnowledgeCreate mutation. + */ +module.exports.MedicationKnowledgeCreateMutation = { + description: 'Create a MedicationKnowledge record', + resolve: scopeInvariant(scopeOptions, createMedicationKnowledge), + type: MedicationKnowledgeSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationKnowledgeUpdateMutation + * @summary MedicationKnowledgeUpdate mutation. + */ +module.exports.MedicationKnowledgeUpdateMutation = { + description: 'Update a MedicationKnowledge record', + resolve: scopeInvariant(scopeOptions, updateMedicationKnowledge), + type: MedicationKnowledgeSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationKnowledgeRemoveMutation + * @summary MedicationKnowledgeRemove mutation. + */ +module.exports.MedicationKnowledgeRemoveMutation = { + description: 'Remove a MedicationKnowledge record', + resolve: scopeInvariant(scopeOptions, removeMedicationKnowledge), + type: MedicationKnowledgeSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicationknowledge/query.js b/src/resources/4_0_0/profiles/medicationknowledge/query.js new file mode 100644 index 00000000..8a2f6cd8 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationknowledge/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationKnowledgeSchema = require('../../schemas/medicationknowledge.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicationKnowledgeArgs = require('../../parameters/medicationknowledge.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationKnowledgeArgs, +); + +// Resolvers +const { + getMedicationKnowledge, + getMedicationKnowledgeList, + getMedicationKnowledgeInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationKnowledge', + action: 'read', +}; + +/** + * @name exports.MedicationKnowledgeQuery + * @summary MedicationKnowledge query. + */ +module.exports.MedicationKnowledgeQuery = { + description: 'Query for a single MedicationKnowledge', + resolve: scopeInvariant(scopeOptions, getMedicationKnowledge), + type: MedicationKnowledgeSchema, + args: args, +}; + +/** + * @name exports.MedicationKnowledgeListQuery + * @summary MedicationKnowledge query. + */ +module.exports.MedicationKnowledgeListQuery = { + description: 'Query for a more than or just one MedicationKnowledge', + resolve: scopeInvariant(scopeOptions, getMedicationKnowledgeList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicationKnowledgeInstanceQuery + * @summary MedicationKnowledge query. + */ +module.exports.MedicationKnowledgeInstanceQuery = { + description: 'Access information about a single MedicationKnowledge', + resolve: scopeInvariant(scopeOptions, getMedicationKnowledgeInstance), + type: MedicationKnowledgeSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicationknowledge/register.js b/src/resources/4_0_0/profiles/medicationknowledge/register.js new file mode 100644 index 00000000..e8f8078e --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationknowledge/register.js @@ -0,0 +1,48 @@ +const { + MedicationKnowledgeCreateMutation, + MedicationKnowledgeUpdateMutation, + MedicationKnowledgeRemoveMutation, +} = require('./mutation'); + +const { + MedicationKnowledgeQuery, + MedicationKnowledgeListQuery, + MedicationKnowledgeInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicationKnowledge: MedicationKnowledgeQuery, + MedicationKnowledgeList: MedicationKnowledgeListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicationKnowledgeCreate: MedicationKnowledgeCreateMutation, + MedicationKnowledgeUpdate: MedicationKnowledgeUpdateMutation, + MedicationKnowledgeRemove: MedicationKnowledgeRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicationKnowledge', + path: '/4_0_0/MedicationKnowledge/:id', + query: MedicationKnowledgeInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicationknowledge/resolver.js b/src/resources/4_0_0/profiles/medicationknowledge/resolver.js new file mode 100644 index 00000000..5fef1b4f --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationknowledge/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicationKnowledge + * @static + * @summary MedicationKnowledge resolver. + */ +module.exports.getMedicationKnowledge = function getMedicationKnowledge( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationKnowledgeList + * @static + * @summary MedicationKnowledge list resolver. + */ +module.exports.getMedicationKnowledgeList = function getMedicationKnowledgeList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationKnowledgeInstance + * @static + * @summary MedicationKnowledge instance resolver. + */ +module.exports.getMedicationKnowledgeInstance = function getMedicationKnowledgeInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicationKnowledge + * @static + * @summary Create MedicationKnowledge resolver. + */ +module.exports.createMedicationKnowledge = function createMedicationKnowledge( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicationKnowledge + * @static + * @summary Update MedicationKnowledge resolver. + */ +module.exports.updateMedicationKnowledge = function updateMedicationKnowledge( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicationKnowledge + * @static + * @summary Remove MedicationKnowledge resolver. + */ +module.exports.removeMedicationKnowledge = function removeMedicationKnowledge( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicationrequest/mutation.js b/src/resources/4_0_0/profiles/medicationrequest/mutation.js new file mode 100644 index 00000000..276b0d70 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationrequest/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicationRequestSchema = require('../../schemas/medicationrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicationRequestInput = require('../../inputs/medicationrequest.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicationRequest, + updateMedicationRequest, + removeMedicationRequest, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationRequest', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicationRequest record.', + }, + resource: { + type: new GraphQLNonNull(MedicationRequestInput), + description: 'MedicationRequest Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicationRequest record for deletion.', + }, +}; + +/** + * @name exports.MedicationRequestCreateMutation + * @summary MedicationRequestCreate mutation. + */ +module.exports.MedicationRequestCreateMutation = { + description: 'Create a MedicationRequest record', + resolve: scopeInvariant(scopeOptions, createMedicationRequest), + type: MedicationRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationRequestUpdateMutation + * @summary MedicationRequestUpdate mutation. + */ +module.exports.MedicationRequestUpdateMutation = { + description: 'Update a MedicationRequest record', + resolve: scopeInvariant(scopeOptions, updateMedicationRequest), + type: MedicationRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationRequestRemoveMutation + * @summary MedicationRequestRemove mutation. + */ +module.exports.MedicationRequestRemoveMutation = { + description: 'Remove a MedicationRequest record', + resolve: scopeInvariant(scopeOptions, removeMedicationRequest), + type: MedicationRequestSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicationrequest/query.js b/src/resources/4_0_0/profiles/medicationrequest/query.js new file mode 100644 index 00000000..4e29d955 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationrequest/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationRequestSchema = require('../../schemas/medicationrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicationRequestArgs = require('../../parameters/medicationrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationRequestArgs, +); + +// Resolvers +const { + getMedicationRequest, + getMedicationRequestList, + getMedicationRequestInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationRequest', + action: 'read', +}; + +/** + * @name exports.MedicationRequestQuery + * @summary MedicationRequest query. + */ +module.exports.MedicationRequestQuery = { + description: 'Query for a single MedicationRequest', + resolve: scopeInvariant(scopeOptions, getMedicationRequest), + type: MedicationRequestSchema, + args: args, +}; + +/** + * @name exports.MedicationRequestListQuery + * @summary MedicationRequest query. + */ +module.exports.MedicationRequestListQuery = { + description: 'Query for a more than or just one MedicationRequest', + resolve: scopeInvariant(scopeOptions, getMedicationRequestList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicationRequestInstanceQuery + * @summary MedicationRequest query. + */ +module.exports.MedicationRequestInstanceQuery = { + description: 'Access information about a single MedicationRequest', + resolve: scopeInvariant(scopeOptions, getMedicationRequestInstance), + type: MedicationRequestSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicationrequest/register.js b/src/resources/4_0_0/profiles/medicationrequest/register.js new file mode 100644 index 00000000..fb12cba4 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationrequest/register.js @@ -0,0 +1,48 @@ +const { + MedicationRequestCreateMutation, + MedicationRequestUpdateMutation, + MedicationRequestRemoveMutation, +} = require('./mutation'); + +const { + MedicationRequestQuery, + MedicationRequestListQuery, + MedicationRequestInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicationRequest: MedicationRequestQuery, + MedicationRequestList: MedicationRequestListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicationRequestCreate: MedicationRequestCreateMutation, + MedicationRequestUpdate: MedicationRequestUpdateMutation, + MedicationRequestRemove: MedicationRequestRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicationRequest', + path: '/4_0_0/MedicationRequest/:id', + query: MedicationRequestInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicationrequest/resolver.js b/src/resources/4_0_0/profiles/medicationrequest/resolver.js new file mode 100644 index 00000000..ace8e39c --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationrequest/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicationRequest + * @static + * @summary MedicationRequest resolver. + */ +module.exports.getMedicationRequest = function getMedicationRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationRequestList + * @static + * @summary MedicationRequest list resolver. + */ +module.exports.getMedicationRequestList = function getMedicationRequestList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationRequestInstance + * @static + * @summary MedicationRequest instance resolver. + */ +module.exports.getMedicationRequestInstance = function getMedicationRequestInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicationRequest + * @static + * @summary Create MedicationRequest resolver. + */ +module.exports.createMedicationRequest = function createMedicationRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicationRequest + * @static + * @summary Update MedicationRequest resolver. + */ +module.exports.updateMedicationRequest = function updateMedicationRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicationRequest + * @static + * @summary Remove MedicationRequest resolver. + */ +module.exports.removeMedicationRequest = function removeMedicationRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicationstatement/mutation.js b/src/resources/4_0_0/profiles/medicationstatement/mutation.js new file mode 100644 index 00000000..39d1e62a --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationstatement/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicationStatementSchema = require('../../schemas/medicationstatement.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicationStatementInput = require('../../inputs/medicationstatement.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicationStatement, + updateMedicationStatement, + removeMedicationStatement, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationStatement', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicationStatement record.', + }, + resource: { + type: new GraphQLNonNull(MedicationStatementInput), + description: 'MedicationStatement Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicationStatement record for deletion.', + }, +}; + +/** + * @name exports.MedicationStatementCreateMutation + * @summary MedicationStatementCreate mutation. + */ +module.exports.MedicationStatementCreateMutation = { + description: 'Create a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, createMedicationStatement), + type: MedicationStatementSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationStatementUpdateMutation + * @summary MedicationStatementUpdate mutation. + */ +module.exports.MedicationStatementUpdateMutation = { + description: 'Update a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, updateMedicationStatement), + type: MedicationStatementSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicationStatementRemoveMutation + * @summary MedicationStatementRemove mutation. + */ +module.exports.MedicationStatementRemoveMutation = { + description: 'Remove a MedicationStatement record', + resolve: scopeInvariant(scopeOptions, removeMedicationStatement), + type: MedicationStatementSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicationstatement/query.js b/src/resources/4_0_0/profiles/medicationstatement/query.js new file mode 100644 index 00000000..e32cd514 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationstatement/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicationStatementSchema = require('../../schemas/medicationstatement.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicationStatementArgs = require('../../parameters/medicationstatement.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicationStatementArgs, +); + +// Resolvers +const { + getMedicationStatement, + getMedicationStatementList, + getMedicationStatementInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicationStatement', + action: 'read', +}; + +/** + * @name exports.MedicationStatementQuery + * @summary MedicationStatement query. + */ +module.exports.MedicationStatementQuery = { + description: 'Query for a single MedicationStatement', + resolve: scopeInvariant(scopeOptions, getMedicationStatement), + type: MedicationStatementSchema, + args: args, +}; + +/** + * @name exports.MedicationStatementListQuery + * @summary MedicationStatement query. + */ +module.exports.MedicationStatementListQuery = { + description: 'Query for a more than or just one MedicationStatement', + resolve: scopeInvariant(scopeOptions, getMedicationStatementList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicationStatementInstanceQuery + * @summary MedicationStatement query. + */ +module.exports.MedicationStatementInstanceQuery = { + description: 'Access information about a single MedicationStatement', + resolve: scopeInvariant(scopeOptions, getMedicationStatementInstance), + type: MedicationStatementSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicationstatement/register.js b/src/resources/4_0_0/profiles/medicationstatement/register.js new file mode 100644 index 00000000..054561ce --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationstatement/register.js @@ -0,0 +1,48 @@ +const { + MedicationStatementCreateMutation, + MedicationStatementUpdateMutation, + MedicationStatementRemoveMutation, +} = require('./mutation'); + +const { + MedicationStatementQuery, + MedicationStatementListQuery, + MedicationStatementInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicationStatement: MedicationStatementQuery, + MedicationStatementList: MedicationStatementListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicationStatementCreate: MedicationStatementCreateMutation, + MedicationStatementUpdate: MedicationStatementUpdateMutation, + MedicationStatementRemove: MedicationStatementRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicationStatement', + path: '/4_0_0/MedicationStatement/:id', + query: MedicationStatementInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicationstatement/resolver.js b/src/resources/4_0_0/profiles/medicationstatement/resolver.js new file mode 100644 index 00000000..bbabc326 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicationstatement/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicationStatement + * @static + * @summary MedicationStatement resolver. + */ +module.exports.getMedicationStatement = function getMedicationStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationStatementList + * @static + * @summary MedicationStatement list resolver. + */ +module.exports.getMedicationStatementList = function getMedicationStatementList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicationStatementInstance + * @static + * @summary MedicationStatement instance resolver. + */ +module.exports.getMedicationStatementInstance = function getMedicationStatementInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicationStatement + * @static + * @summary Create MedicationStatement resolver. + */ +module.exports.createMedicationStatement = function createMedicationStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicationStatement + * @static + * @summary Update MedicationStatement resolver. + */ +module.exports.updateMedicationStatement = function updateMedicationStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicationStatement + * @static + * @summary Remove MedicationStatement resolver. + */ +module.exports.removeMedicationStatement = function removeMedicationStatement( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicinalproduct/mutation.js b/src/resources/4_0_0/profiles/medicinalproduct/mutation.js new file mode 100644 index 00000000..4d146602 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproduct/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicinalProductSchema = require('../../schemas/medicinalproduct.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicinalProductInput = require('../../inputs/medicinalproduct.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicinalProduct, + updateMedicinalProduct, + removeMedicinalProduct, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProduct', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicinalProduct record.', + }, + resource: { + type: new GraphQLNonNull(MedicinalProductInput), + description: 'MedicinalProduct Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicinalProduct record for deletion.', + }, +}; + +/** + * @name exports.MedicinalProductCreateMutation + * @summary MedicinalProductCreate mutation. + */ +module.exports.MedicinalProductCreateMutation = { + description: 'Create a MedicinalProduct record', + resolve: scopeInvariant(scopeOptions, createMedicinalProduct), + type: MedicinalProductSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductUpdateMutation + * @summary MedicinalProductUpdate mutation. + */ +module.exports.MedicinalProductUpdateMutation = { + description: 'Update a MedicinalProduct record', + resolve: scopeInvariant(scopeOptions, updateMedicinalProduct), + type: MedicinalProductSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductRemoveMutation + * @summary MedicinalProductRemove mutation. + */ +module.exports.MedicinalProductRemoveMutation = { + description: 'Remove a MedicinalProduct record', + resolve: scopeInvariant(scopeOptions, removeMedicinalProduct), + type: MedicinalProductSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproduct/query.js b/src/resources/4_0_0/profiles/medicinalproduct/query.js new file mode 100644 index 00000000..fb20e6bf --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproduct/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicinalProductSchema = require('../../schemas/medicinalproduct.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicinalProductArgs = require('../../parameters/medicinalproduct.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicinalProductArgs, +); + +// Resolvers +const { + getMedicinalProduct, + getMedicinalProductList, + getMedicinalProductInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProduct', + action: 'read', +}; + +/** + * @name exports.MedicinalProductQuery + * @summary MedicinalProduct query. + */ +module.exports.MedicinalProductQuery = { + description: 'Query for a single MedicinalProduct', + resolve: scopeInvariant(scopeOptions, getMedicinalProduct), + type: MedicinalProductSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductListQuery + * @summary MedicinalProduct query. + */ +module.exports.MedicinalProductListQuery = { + description: 'Query for a more than or just one MedicinalProduct', + resolve: scopeInvariant(scopeOptions, getMedicinalProductList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductInstanceQuery + * @summary MedicinalProduct query. + */ +module.exports.MedicinalProductInstanceQuery = { + description: 'Access information about a single MedicinalProduct', + resolve: scopeInvariant(scopeOptions, getMedicinalProductInstance), + type: MedicinalProductSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproduct/register.js b/src/resources/4_0_0/profiles/medicinalproduct/register.js new file mode 100644 index 00000000..d335aafc --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproduct/register.js @@ -0,0 +1,48 @@ +const { + MedicinalProductCreateMutation, + MedicinalProductUpdateMutation, + MedicinalProductRemoveMutation, +} = require('./mutation'); + +const { + MedicinalProductQuery, + MedicinalProductListQuery, + MedicinalProductInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicinalProduct: MedicinalProductQuery, + MedicinalProductList: MedicinalProductListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicinalProductCreate: MedicinalProductCreateMutation, + MedicinalProductUpdate: MedicinalProductUpdateMutation, + MedicinalProductRemove: MedicinalProductRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicinalProduct', + path: '/4_0_0/MedicinalProduct/:id', + query: MedicinalProductInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproduct/resolver.js b/src/resources/4_0_0/profiles/medicinalproduct/resolver.js new file mode 100644 index 00000000..06add9fd --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproduct/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicinalProduct + * @static + * @summary MedicinalProduct resolver. + */ +module.exports.getMedicinalProduct = function getMedicinalProduct( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductList + * @static + * @summary MedicinalProduct list resolver. + */ +module.exports.getMedicinalProductList = function getMedicinalProductList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductInstance + * @static + * @summary MedicinalProduct instance resolver. + */ +module.exports.getMedicinalProductInstance = function getMedicinalProductInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicinalProduct + * @static + * @summary Create MedicinalProduct resolver. + */ +module.exports.createMedicinalProduct = function createMedicinalProduct( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicinalProduct + * @static + * @summary Update MedicinalProduct resolver. + */ +module.exports.updateMedicinalProduct = function updateMedicinalProduct( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicinalProduct + * @static + * @summary Remove MedicinalProduct resolver. + */ +module.exports.removeMedicinalProduct = function removeMedicinalProduct( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductauthorization/mutation.js b/src/resources/4_0_0/profiles/medicinalproductauthorization/mutation.js new file mode 100644 index 00000000..bffa323d --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductauthorization/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicinalProductAuthorizationSchema = require('../../schemas/medicinalproductauthorization.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicinalProductAuthorizationInput = require('../../inputs/medicinalproductauthorization.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicinalProductAuthorization, + updateMedicinalProductAuthorization, + removeMedicinalProductAuthorization, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductAuthorization', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicinalProductAuthorization record.', + }, + resource: { + type: new GraphQLNonNull(MedicinalProductAuthorizationInput), + description: 'MedicinalProductAuthorization Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicinalProductAuthorization record for deletion.', + }, +}; + +/** + * @name exports.MedicinalProductAuthorizationCreateMutation + * @summary MedicinalProductAuthorizationCreate mutation. + */ +module.exports.MedicinalProductAuthorizationCreateMutation = { + description: 'Create a MedicinalProductAuthorization record', + resolve: scopeInvariant(scopeOptions, createMedicinalProductAuthorization), + type: MedicinalProductAuthorizationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductAuthorizationUpdateMutation + * @summary MedicinalProductAuthorizationUpdate mutation. + */ +module.exports.MedicinalProductAuthorizationUpdateMutation = { + description: 'Update a MedicinalProductAuthorization record', + resolve: scopeInvariant(scopeOptions, updateMedicinalProductAuthorization), + type: MedicinalProductAuthorizationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductAuthorizationRemoveMutation + * @summary MedicinalProductAuthorizationRemove mutation. + */ +module.exports.MedicinalProductAuthorizationRemoveMutation = { + description: 'Remove a MedicinalProductAuthorization record', + resolve: scopeInvariant(scopeOptions, removeMedicinalProductAuthorization), + type: MedicinalProductAuthorizationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductauthorization/query.js b/src/resources/4_0_0/profiles/medicinalproductauthorization/query.js new file mode 100644 index 00000000..2089d6c9 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductauthorization/query.js @@ -0,0 +1,70 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicinalProductAuthorizationSchema = require('../../schemas/medicinalproductauthorization.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicinalProductAuthorizationArgs = require('../../parameters/medicinalproductauthorization.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicinalProductAuthorizationArgs, +); + +// Resolvers +const { + getMedicinalProductAuthorization, + getMedicinalProductAuthorizationList, + getMedicinalProductAuthorizationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductAuthorization', + action: 'read', +}; + +/** + * @name exports.MedicinalProductAuthorizationQuery + * @summary MedicinalProductAuthorization query. + */ +module.exports.MedicinalProductAuthorizationQuery = { + description: 'Query for a single MedicinalProductAuthorization', + resolve: scopeInvariant(scopeOptions, getMedicinalProductAuthorization), + type: MedicinalProductAuthorizationSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductAuthorizationListQuery + * @summary MedicinalProductAuthorization query. + */ +module.exports.MedicinalProductAuthorizationListQuery = { + description: + 'Query for a more than or just one MedicinalProductAuthorization', + resolve: scopeInvariant(scopeOptions, getMedicinalProductAuthorizationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductAuthorizationInstanceQuery + * @summary MedicinalProductAuthorization query. + */ +module.exports.MedicinalProductAuthorizationInstanceQuery = { + description: + 'Access information about a single MedicinalProductAuthorization', + resolve: scopeInvariant( + scopeOptions, + getMedicinalProductAuthorizationInstance, + ), + type: MedicinalProductAuthorizationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductauthorization/register.js b/src/resources/4_0_0/profiles/medicinalproductauthorization/register.js new file mode 100644 index 00000000..92f7aed7 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductauthorization/register.js @@ -0,0 +1,48 @@ +const { + MedicinalProductAuthorizationCreateMutation, + MedicinalProductAuthorizationUpdateMutation, + MedicinalProductAuthorizationRemoveMutation, +} = require('./mutation'); + +const { + MedicinalProductAuthorizationQuery, + MedicinalProductAuthorizationListQuery, + MedicinalProductAuthorizationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicinalProductAuthorization: MedicinalProductAuthorizationQuery, + MedicinalProductAuthorizationList: MedicinalProductAuthorizationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicinalProductAuthorizationCreate: MedicinalProductAuthorizationCreateMutation, + MedicinalProductAuthorizationUpdate: MedicinalProductAuthorizationUpdateMutation, + MedicinalProductAuthorizationRemove: MedicinalProductAuthorizationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicinalProductAuthorization', + path: '/4_0_0/MedicinalProductAuthorization/:id', + query: MedicinalProductAuthorizationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductauthorization/resolver.js b/src/resources/4_0_0/profiles/medicinalproductauthorization/resolver.js new file mode 100644 index 00000000..4702dc60 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductauthorization/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicinalProductAuthorization + * @static + * @summary MedicinalProductAuthorization resolver. + */ +module.exports.getMedicinalProductAuthorization = function getMedicinalProductAuthorization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductAuthorizationList + * @static + * @summary MedicinalProductAuthorization list resolver. + */ +module.exports.getMedicinalProductAuthorizationList = function getMedicinalProductAuthorizationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductAuthorizationInstance + * @static + * @summary MedicinalProductAuthorization instance resolver. + */ +module.exports.getMedicinalProductAuthorizationInstance = function getMedicinalProductAuthorizationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicinalProductAuthorization + * @static + * @summary Create MedicinalProductAuthorization resolver. + */ +module.exports.createMedicinalProductAuthorization = function createMedicinalProductAuthorization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicinalProductAuthorization + * @static + * @summary Update MedicinalProductAuthorization resolver. + */ +module.exports.updateMedicinalProductAuthorization = function updateMedicinalProductAuthorization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicinalProductAuthorization + * @static + * @summary Remove MedicinalProductAuthorization resolver. + */ +module.exports.removeMedicinalProductAuthorization = function removeMedicinalProductAuthorization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductcontraindication/mutation.js b/src/resources/4_0_0/profiles/medicinalproductcontraindication/mutation.js new file mode 100644 index 00000000..63da60d3 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductcontraindication/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicinalProductContraindicationSchema = require('../../schemas/medicinalproductcontraindication.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicinalProductContraindicationInput = require('../../inputs/medicinalproductcontraindication.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicinalProductContraindication, + updateMedicinalProductContraindication, + removeMedicinalProductContraindication, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductContraindication', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicinalProductContraindication record.', + }, + resource: { + type: new GraphQLNonNull(MedicinalProductContraindicationInput), + description: 'MedicinalProductContraindication Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicinalProductContraindication record for deletion.', + }, +}; + +/** + * @name exports.MedicinalProductContraindicationCreateMutation + * @summary MedicinalProductContraindicationCreate mutation. + */ +module.exports.MedicinalProductContraindicationCreateMutation = { + description: 'Create a MedicinalProductContraindication record', + resolve: scopeInvariant(scopeOptions, createMedicinalProductContraindication), + type: MedicinalProductContraindicationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductContraindicationUpdateMutation + * @summary MedicinalProductContraindicationUpdate mutation. + */ +module.exports.MedicinalProductContraindicationUpdateMutation = { + description: 'Update a MedicinalProductContraindication record', + resolve: scopeInvariant(scopeOptions, updateMedicinalProductContraindication), + type: MedicinalProductContraindicationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductContraindicationRemoveMutation + * @summary MedicinalProductContraindicationRemove mutation. + */ +module.exports.MedicinalProductContraindicationRemoveMutation = { + description: 'Remove a MedicinalProductContraindication record', + resolve: scopeInvariant(scopeOptions, removeMedicinalProductContraindication), + type: MedicinalProductContraindicationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductcontraindication/query.js b/src/resources/4_0_0/profiles/medicinalproductcontraindication/query.js new file mode 100644 index 00000000..3bd40233 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductcontraindication/query.js @@ -0,0 +1,73 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicinalProductContraindicationSchema = require('../../schemas/medicinalproductcontraindication.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicinalProductContraindicationArgs = require('../../parameters/medicinalproductcontraindication.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicinalProductContraindicationArgs, +); + +// Resolvers +const { + getMedicinalProductContraindication, + getMedicinalProductContraindicationList, + getMedicinalProductContraindicationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductContraindication', + action: 'read', +}; + +/** + * @name exports.MedicinalProductContraindicationQuery + * @summary MedicinalProductContraindication query. + */ +module.exports.MedicinalProductContraindicationQuery = { + description: 'Query for a single MedicinalProductContraindication', + resolve: scopeInvariant(scopeOptions, getMedicinalProductContraindication), + type: MedicinalProductContraindicationSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductContraindicationListQuery + * @summary MedicinalProductContraindication query. + */ +module.exports.MedicinalProductContraindicationListQuery = { + description: + 'Query for a more than or just one MedicinalProductContraindication', + resolve: scopeInvariant( + scopeOptions, + getMedicinalProductContraindicationList, + ), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductContraindicationInstanceQuery + * @summary MedicinalProductContraindication query. + */ +module.exports.MedicinalProductContraindicationInstanceQuery = { + description: + 'Access information about a single MedicinalProductContraindication', + resolve: scopeInvariant( + scopeOptions, + getMedicinalProductContraindicationInstance, + ), + type: MedicinalProductContraindicationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductcontraindication/register.js b/src/resources/4_0_0/profiles/medicinalproductcontraindication/register.js new file mode 100644 index 00000000..c4781d22 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductcontraindication/register.js @@ -0,0 +1,48 @@ +const { + MedicinalProductContraindicationCreateMutation, + MedicinalProductContraindicationUpdateMutation, + MedicinalProductContraindicationRemoveMutation, +} = require('./mutation'); + +const { + MedicinalProductContraindicationQuery, + MedicinalProductContraindicationListQuery, + MedicinalProductContraindicationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicinalProductContraindication: MedicinalProductContraindicationQuery, + MedicinalProductContraindicationList: MedicinalProductContraindicationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicinalProductContraindicationCreate: MedicinalProductContraindicationCreateMutation, + MedicinalProductContraindicationUpdate: MedicinalProductContraindicationUpdateMutation, + MedicinalProductContraindicationRemove: MedicinalProductContraindicationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicinalProductContraindication', + path: '/4_0_0/MedicinalProductContraindication/:id', + query: MedicinalProductContraindicationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductcontraindication/resolver.js b/src/resources/4_0_0/profiles/medicinalproductcontraindication/resolver.js new file mode 100644 index 00000000..32e5b80c --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductcontraindication/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicinalProductContraindication + * @static + * @summary MedicinalProductContraindication resolver. + */ +module.exports.getMedicinalProductContraindication = function getMedicinalProductContraindication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductContraindicationList + * @static + * @summary MedicinalProductContraindication list resolver. + */ +module.exports.getMedicinalProductContraindicationList = function getMedicinalProductContraindicationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductContraindicationInstance + * @static + * @summary MedicinalProductContraindication instance resolver. + */ +module.exports.getMedicinalProductContraindicationInstance = function getMedicinalProductContraindicationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicinalProductContraindication + * @static + * @summary Create MedicinalProductContraindication resolver. + */ +module.exports.createMedicinalProductContraindication = function createMedicinalProductContraindication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicinalProductContraindication + * @static + * @summary Update MedicinalProductContraindication resolver. + */ +module.exports.updateMedicinalProductContraindication = function updateMedicinalProductContraindication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicinalProductContraindication + * @static + * @summary Remove MedicinalProductContraindication resolver. + */ +module.exports.removeMedicinalProductContraindication = function removeMedicinalProductContraindication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductindication/mutation.js b/src/resources/4_0_0/profiles/medicinalproductindication/mutation.js new file mode 100644 index 00000000..154e3e5c --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductindication/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicinalProductIndicationSchema = require('../../schemas/medicinalproductindication.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicinalProductIndicationInput = require('../../inputs/medicinalproductindication.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicinalProductIndication, + updateMedicinalProductIndication, + removeMedicinalProductIndication, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductIndication', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicinalProductIndication record.', + }, + resource: { + type: new GraphQLNonNull(MedicinalProductIndicationInput), + description: 'MedicinalProductIndication Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicinalProductIndication record for deletion.', + }, +}; + +/** + * @name exports.MedicinalProductIndicationCreateMutation + * @summary MedicinalProductIndicationCreate mutation. + */ +module.exports.MedicinalProductIndicationCreateMutation = { + description: 'Create a MedicinalProductIndication record', + resolve: scopeInvariant(scopeOptions, createMedicinalProductIndication), + type: MedicinalProductIndicationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductIndicationUpdateMutation + * @summary MedicinalProductIndicationUpdate mutation. + */ +module.exports.MedicinalProductIndicationUpdateMutation = { + description: 'Update a MedicinalProductIndication record', + resolve: scopeInvariant(scopeOptions, updateMedicinalProductIndication), + type: MedicinalProductIndicationSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductIndicationRemoveMutation + * @summary MedicinalProductIndicationRemove mutation. + */ +module.exports.MedicinalProductIndicationRemoveMutation = { + description: 'Remove a MedicinalProductIndication record', + resolve: scopeInvariant(scopeOptions, removeMedicinalProductIndication), + type: MedicinalProductIndicationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductindication/query.js b/src/resources/4_0_0/profiles/medicinalproductindication/query.js new file mode 100644 index 00000000..2c9033db --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductindication/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicinalProductIndicationSchema = require('../../schemas/medicinalproductindication.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicinalProductIndicationArgs = require('../../parameters/medicinalproductindication.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicinalProductIndicationArgs, +); + +// Resolvers +const { + getMedicinalProductIndication, + getMedicinalProductIndicationList, + getMedicinalProductIndicationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductIndication', + action: 'read', +}; + +/** + * @name exports.MedicinalProductIndicationQuery + * @summary MedicinalProductIndication query. + */ +module.exports.MedicinalProductIndicationQuery = { + description: 'Query for a single MedicinalProductIndication', + resolve: scopeInvariant(scopeOptions, getMedicinalProductIndication), + type: MedicinalProductIndicationSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductIndicationListQuery + * @summary MedicinalProductIndication query. + */ +module.exports.MedicinalProductIndicationListQuery = { + description: 'Query for a more than or just one MedicinalProductIndication', + resolve: scopeInvariant(scopeOptions, getMedicinalProductIndicationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductIndicationInstanceQuery + * @summary MedicinalProductIndication query. + */ +module.exports.MedicinalProductIndicationInstanceQuery = { + description: 'Access information about a single MedicinalProductIndication', + resolve: scopeInvariant(scopeOptions, getMedicinalProductIndicationInstance), + type: MedicinalProductIndicationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductindication/register.js b/src/resources/4_0_0/profiles/medicinalproductindication/register.js new file mode 100644 index 00000000..c820f00c --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductindication/register.js @@ -0,0 +1,48 @@ +const { + MedicinalProductIndicationCreateMutation, + MedicinalProductIndicationUpdateMutation, + MedicinalProductIndicationRemoveMutation, +} = require('./mutation'); + +const { + MedicinalProductIndicationQuery, + MedicinalProductIndicationListQuery, + MedicinalProductIndicationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicinalProductIndication: MedicinalProductIndicationQuery, + MedicinalProductIndicationList: MedicinalProductIndicationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicinalProductIndicationCreate: MedicinalProductIndicationCreateMutation, + MedicinalProductIndicationUpdate: MedicinalProductIndicationUpdateMutation, + MedicinalProductIndicationRemove: MedicinalProductIndicationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicinalProductIndication', + path: '/4_0_0/MedicinalProductIndication/:id', + query: MedicinalProductIndicationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductindication/resolver.js b/src/resources/4_0_0/profiles/medicinalproductindication/resolver.js new file mode 100644 index 00000000..eafa7e4c --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductindication/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicinalProductIndication + * @static + * @summary MedicinalProductIndication resolver. + */ +module.exports.getMedicinalProductIndication = function getMedicinalProductIndication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductIndicationList + * @static + * @summary MedicinalProductIndication list resolver. + */ +module.exports.getMedicinalProductIndicationList = function getMedicinalProductIndicationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductIndicationInstance + * @static + * @summary MedicinalProductIndication instance resolver. + */ +module.exports.getMedicinalProductIndicationInstance = function getMedicinalProductIndicationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicinalProductIndication + * @static + * @summary Create MedicinalProductIndication resolver. + */ +module.exports.createMedicinalProductIndication = function createMedicinalProductIndication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicinalProductIndication + * @static + * @summary Update MedicinalProductIndication resolver. + */ +module.exports.updateMedicinalProductIndication = function updateMedicinalProductIndication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicinalProductIndication + * @static + * @summary Remove MedicinalProductIndication resolver. + */ +module.exports.removeMedicinalProductIndication = function removeMedicinalProductIndication( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductinteraction/mutation.js b/src/resources/4_0_0/profiles/medicinalproductinteraction/mutation.js new file mode 100644 index 00000000..5a2f3958 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductinteraction/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicinalProductInteractionSchema = require('../../schemas/medicinalproductinteraction.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicinalProductInteractionInput = require('../../inputs/medicinalproductinteraction.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicinalProductInteraction, + updateMedicinalProductInteraction, + removeMedicinalProductInteraction, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductInteraction', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicinalProductInteraction record.', + }, + resource: { + type: new GraphQLNonNull(MedicinalProductInteractionInput), + description: 'MedicinalProductInteraction Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicinalProductInteraction record for deletion.', + }, +}; + +/** + * @name exports.MedicinalProductInteractionCreateMutation + * @summary MedicinalProductInteractionCreate mutation. + */ +module.exports.MedicinalProductInteractionCreateMutation = { + description: 'Create a MedicinalProductInteraction record', + resolve: scopeInvariant(scopeOptions, createMedicinalProductInteraction), + type: MedicinalProductInteractionSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductInteractionUpdateMutation + * @summary MedicinalProductInteractionUpdate mutation. + */ +module.exports.MedicinalProductInteractionUpdateMutation = { + description: 'Update a MedicinalProductInteraction record', + resolve: scopeInvariant(scopeOptions, updateMedicinalProductInteraction), + type: MedicinalProductInteractionSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductInteractionRemoveMutation + * @summary MedicinalProductInteractionRemove mutation. + */ +module.exports.MedicinalProductInteractionRemoveMutation = { + description: 'Remove a MedicinalProductInteraction record', + resolve: scopeInvariant(scopeOptions, removeMedicinalProductInteraction), + type: MedicinalProductInteractionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductinteraction/query.js b/src/resources/4_0_0/profiles/medicinalproductinteraction/query.js new file mode 100644 index 00000000..47ddeb32 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductinteraction/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicinalProductInteractionSchema = require('../../schemas/medicinalproductinteraction.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicinalProductInteractionArgs = require('../../parameters/medicinalproductinteraction.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicinalProductInteractionArgs, +); + +// Resolvers +const { + getMedicinalProductInteraction, + getMedicinalProductInteractionList, + getMedicinalProductInteractionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductInteraction', + action: 'read', +}; + +/** + * @name exports.MedicinalProductInteractionQuery + * @summary MedicinalProductInteraction query. + */ +module.exports.MedicinalProductInteractionQuery = { + description: 'Query for a single MedicinalProductInteraction', + resolve: scopeInvariant(scopeOptions, getMedicinalProductInteraction), + type: MedicinalProductInteractionSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductInteractionListQuery + * @summary MedicinalProductInteraction query. + */ +module.exports.MedicinalProductInteractionListQuery = { + description: 'Query for a more than or just one MedicinalProductInteraction', + resolve: scopeInvariant(scopeOptions, getMedicinalProductInteractionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductInteractionInstanceQuery + * @summary MedicinalProductInteraction query. + */ +module.exports.MedicinalProductInteractionInstanceQuery = { + description: 'Access information about a single MedicinalProductInteraction', + resolve: scopeInvariant(scopeOptions, getMedicinalProductInteractionInstance), + type: MedicinalProductInteractionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductinteraction/register.js b/src/resources/4_0_0/profiles/medicinalproductinteraction/register.js new file mode 100644 index 00000000..eda22d91 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductinteraction/register.js @@ -0,0 +1,48 @@ +const { + MedicinalProductInteractionCreateMutation, + MedicinalProductInteractionUpdateMutation, + MedicinalProductInteractionRemoveMutation, +} = require('./mutation'); + +const { + MedicinalProductInteractionQuery, + MedicinalProductInteractionListQuery, + MedicinalProductInteractionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicinalProductInteraction: MedicinalProductInteractionQuery, + MedicinalProductInteractionList: MedicinalProductInteractionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicinalProductInteractionCreate: MedicinalProductInteractionCreateMutation, + MedicinalProductInteractionUpdate: MedicinalProductInteractionUpdateMutation, + MedicinalProductInteractionRemove: MedicinalProductInteractionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicinalProductInteraction', + path: '/4_0_0/MedicinalProductInteraction/:id', + query: MedicinalProductInteractionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductinteraction/resolver.js b/src/resources/4_0_0/profiles/medicinalproductinteraction/resolver.js new file mode 100644 index 00000000..a60761e9 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductinteraction/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicinalProductInteraction + * @static + * @summary MedicinalProductInteraction resolver. + */ +module.exports.getMedicinalProductInteraction = function getMedicinalProductInteraction( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductInteractionList + * @static + * @summary MedicinalProductInteraction list resolver. + */ +module.exports.getMedicinalProductInteractionList = function getMedicinalProductInteractionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductInteractionInstance + * @static + * @summary MedicinalProductInteraction instance resolver. + */ +module.exports.getMedicinalProductInteractionInstance = function getMedicinalProductInteractionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicinalProductInteraction + * @static + * @summary Create MedicinalProductInteraction resolver. + */ +module.exports.createMedicinalProductInteraction = function createMedicinalProductInteraction( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicinalProductInteraction + * @static + * @summary Update MedicinalProductInteraction resolver. + */ +module.exports.updateMedicinalProductInteraction = function updateMedicinalProductInteraction( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicinalProductInteraction + * @static + * @summary Remove MedicinalProductInteraction resolver. + */ +module.exports.removeMedicinalProductInteraction = function removeMedicinalProductInteraction( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductpackaged/mutation.js b/src/resources/4_0_0/profiles/medicinalproductpackaged/mutation.js new file mode 100644 index 00000000..e0357ace --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductpackaged/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicinalProductPackagedSchema = require('../../schemas/medicinalproductpackaged.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicinalProductPackagedInput = require('../../inputs/medicinalproductpackaged.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicinalProductPackaged, + updateMedicinalProductPackaged, + removeMedicinalProductPackaged, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductPackaged', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicinalProductPackaged record.', + }, + resource: { + type: new GraphQLNonNull(MedicinalProductPackagedInput), + description: 'MedicinalProductPackaged Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicinalProductPackaged record for deletion.', + }, +}; + +/** + * @name exports.MedicinalProductPackagedCreateMutation + * @summary MedicinalProductPackagedCreate mutation. + */ +module.exports.MedicinalProductPackagedCreateMutation = { + description: 'Create a MedicinalProductPackaged record', + resolve: scopeInvariant(scopeOptions, createMedicinalProductPackaged), + type: MedicinalProductPackagedSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductPackagedUpdateMutation + * @summary MedicinalProductPackagedUpdate mutation. + */ +module.exports.MedicinalProductPackagedUpdateMutation = { + description: 'Update a MedicinalProductPackaged record', + resolve: scopeInvariant(scopeOptions, updateMedicinalProductPackaged), + type: MedicinalProductPackagedSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductPackagedRemoveMutation + * @summary MedicinalProductPackagedRemove mutation. + */ +module.exports.MedicinalProductPackagedRemoveMutation = { + description: 'Remove a MedicinalProductPackaged record', + resolve: scopeInvariant(scopeOptions, removeMedicinalProductPackaged), + type: MedicinalProductPackagedSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductpackaged/query.js b/src/resources/4_0_0/profiles/medicinalproductpackaged/query.js new file mode 100644 index 00000000..5917820b --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductpackaged/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicinalProductPackagedSchema = require('../../schemas/medicinalproductpackaged.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicinalProductPackagedArgs = require('../../parameters/medicinalproductpackaged.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicinalProductPackagedArgs, +); + +// Resolvers +const { + getMedicinalProductPackaged, + getMedicinalProductPackagedList, + getMedicinalProductPackagedInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductPackaged', + action: 'read', +}; + +/** + * @name exports.MedicinalProductPackagedQuery + * @summary MedicinalProductPackaged query. + */ +module.exports.MedicinalProductPackagedQuery = { + description: 'Query for a single MedicinalProductPackaged', + resolve: scopeInvariant(scopeOptions, getMedicinalProductPackaged), + type: MedicinalProductPackagedSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductPackagedListQuery + * @summary MedicinalProductPackaged query. + */ +module.exports.MedicinalProductPackagedListQuery = { + description: 'Query for a more than or just one MedicinalProductPackaged', + resolve: scopeInvariant(scopeOptions, getMedicinalProductPackagedList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductPackagedInstanceQuery + * @summary MedicinalProductPackaged query. + */ +module.exports.MedicinalProductPackagedInstanceQuery = { + description: 'Access information about a single MedicinalProductPackaged', + resolve: scopeInvariant(scopeOptions, getMedicinalProductPackagedInstance), + type: MedicinalProductPackagedSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductpackaged/register.js b/src/resources/4_0_0/profiles/medicinalproductpackaged/register.js new file mode 100644 index 00000000..e56b3dd5 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductpackaged/register.js @@ -0,0 +1,48 @@ +const { + MedicinalProductPackagedCreateMutation, + MedicinalProductPackagedUpdateMutation, + MedicinalProductPackagedRemoveMutation, +} = require('./mutation'); + +const { + MedicinalProductPackagedQuery, + MedicinalProductPackagedListQuery, + MedicinalProductPackagedInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicinalProductPackaged: MedicinalProductPackagedQuery, + MedicinalProductPackagedList: MedicinalProductPackagedListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicinalProductPackagedCreate: MedicinalProductPackagedCreateMutation, + MedicinalProductPackagedUpdate: MedicinalProductPackagedUpdateMutation, + MedicinalProductPackagedRemove: MedicinalProductPackagedRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicinalProductPackaged', + path: '/4_0_0/MedicinalProductPackaged/:id', + query: MedicinalProductPackagedInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductpackaged/resolver.js b/src/resources/4_0_0/profiles/medicinalproductpackaged/resolver.js new file mode 100644 index 00000000..4c303737 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductpackaged/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicinalProductPackaged + * @static + * @summary MedicinalProductPackaged resolver. + */ +module.exports.getMedicinalProductPackaged = function getMedicinalProductPackaged( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductPackagedList + * @static + * @summary MedicinalProductPackaged list resolver. + */ +module.exports.getMedicinalProductPackagedList = function getMedicinalProductPackagedList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductPackagedInstance + * @static + * @summary MedicinalProductPackaged instance resolver. + */ +module.exports.getMedicinalProductPackagedInstance = function getMedicinalProductPackagedInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicinalProductPackaged + * @static + * @summary Create MedicinalProductPackaged resolver. + */ +module.exports.createMedicinalProductPackaged = function createMedicinalProductPackaged( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicinalProductPackaged + * @static + * @summary Update MedicinalProductPackaged resolver. + */ +module.exports.updateMedicinalProductPackaged = function updateMedicinalProductPackaged( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicinalProductPackaged + * @static + * @summary Remove MedicinalProductPackaged resolver. + */ +module.exports.removeMedicinalProductPackaged = function removeMedicinalProductPackaged( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/mutation.js b/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/mutation.js new file mode 100644 index 00000000..98ab088a --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MedicinalProductPharmaceuticalSchema = require('../../schemas/medicinalproductpharmaceutical.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicinalProductPharmaceuticalInput = require('../../inputs/medicinalproductpharmaceutical.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicinalProductPharmaceutical, + updateMedicinalProductPharmaceutical, + removeMedicinalProductPharmaceutical, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductPharmaceutical', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicinalProductPharmaceutical record.', + }, + resource: { + type: new GraphQLNonNull(MedicinalProductPharmaceuticalInput), + description: 'MedicinalProductPharmaceutical Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicinalProductPharmaceutical record for deletion.', + }, +}; + +/** + * @name exports.MedicinalProductPharmaceuticalCreateMutation + * @summary MedicinalProductPharmaceuticalCreate mutation. + */ +module.exports.MedicinalProductPharmaceuticalCreateMutation = { + description: 'Create a MedicinalProductPharmaceutical record', + resolve: scopeInvariant(scopeOptions, createMedicinalProductPharmaceutical), + type: MedicinalProductPharmaceuticalSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductPharmaceuticalUpdateMutation + * @summary MedicinalProductPharmaceuticalUpdate mutation. + */ +module.exports.MedicinalProductPharmaceuticalUpdateMutation = { + description: 'Update a MedicinalProductPharmaceutical record', + resolve: scopeInvariant(scopeOptions, updateMedicinalProductPharmaceutical), + type: MedicinalProductPharmaceuticalSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductPharmaceuticalRemoveMutation + * @summary MedicinalProductPharmaceuticalRemove mutation. + */ +module.exports.MedicinalProductPharmaceuticalRemoveMutation = { + description: 'Remove a MedicinalProductPharmaceutical record', + resolve: scopeInvariant(scopeOptions, removeMedicinalProductPharmaceutical), + type: MedicinalProductPharmaceuticalSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/query.js b/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/query.js new file mode 100644 index 00000000..d4fef407 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/query.js @@ -0,0 +1,70 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicinalProductPharmaceuticalSchema = require('../../schemas/medicinalproductpharmaceutical.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicinalProductPharmaceuticalArgs = require('../../parameters/medicinalproductpharmaceutical.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicinalProductPharmaceuticalArgs, +); + +// Resolvers +const { + getMedicinalProductPharmaceutical, + getMedicinalProductPharmaceuticalList, + getMedicinalProductPharmaceuticalInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductPharmaceutical', + action: 'read', +}; + +/** + * @name exports.MedicinalProductPharmaceuticalQuery + * @summary MedicinalProductPharmaceutical query. + */ +module.exports.MedicinalProductPharmaceuticalQuery = { + description: 'Query for a single MedicinalProductPharmaceutical', + resolve: scopeInvariant(scopeOptions, getMedicinalProductPharmaceutical), + type: MedicinalProductPharmaceuticalSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductPharmaceuticalListQuery + * @summary MedicinalProductPharmaceutical query. + */ +module.exports.MedicinalProductPharmaceuticalListQuery = { + description: + 'Query for a more than or just one MedicinalProductPharmaceutical', + resolve: scopeInvariant(scopeOptions, getMedicinalProductPharmaceuticalList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductPharmaceuticalInstanceQuery + * @summary MedicinalProductPharmaceutical query. + */ +module.exports.MedicinalProductPharmaceuticalInstanceQuery = { + description: + 'Access information about a single MedicinalProductPharmaceutical', + resolve: scopeInvariant( + scopeOptions, + getMedicinalProductPharmaceuticalInstance, + ), + type: MedicinalProductPharmaceuticalSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/register.js b/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/register.js new file mode 100644 index 00000000..b04c0564 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/register.js @@ -0,0 +1,48 @@ +const { + MedicinalProductPharmaceuticalCreateMutation, + MedicinalProductPharmaceuticalUpdateMutation, + MedicinalProductPharmaceuticalRemoveMutation, +} = require('./mutation'); + +const { + MedicinalProductPharmaceuticalQuery, + MedicinalProductPharmaceuticalListQuery, + MedicinalProductPharmaceuticalInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicinalProductPharmaceutical: MedicinalProductPharmaceuticalQuery, + MedicinalProductPharmaceuticalList: MedicinalProductPharmaceuticalListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicinalProductPharmaceuticalCreate: MedicinalProductPharmaceuticalCreateMutation, + MedicinalProductPharmaceuticalUpdate: MedicinalProductPharmaceuticalUpdateMutation, + MedicinalProductPharmaceuticalRemove: MedicinalProductPharmaceuticalRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicinalProductPharmaceutical', + path: '/4_0_0/MedicinalProductPharmaceutical/:id', + query: MedicinalProductPharmaceuticalInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/resolver.js b/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/resolver.js new file mode 100644 index 00000000..f4c03632 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductpharmaceutical/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicinalProductPharmaceutical + * @static + * @summary MedicinalProductPharmaceutical resolver. + */ +module.exports.getMedicinalProductPharmaceutical = function getMedicinalProductPharmaceutical( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductPharmaceuticalList + * @static + * @summary MedicinalProductPharmaceutical list resolver. + */ +module.exports.getMedicinalProductPharmaceuticalList = function getMedicinalProductPharmaceuticalList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductPharmaceuticalInstance + * @static + * @summary MedicinalProductPharmaceutical instance resolver. + */ +module.exports.getMedicinalProductPharmaceuticalInstance = function getMedicinalProductPharmaceuticalInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicinalProductPharmaceutical + * @static + * @summary Create MedicinalProductPharmaceutical resolver. + */ +module.exports.createMedicinalProductPharmaceutical = function createMedicinalProductPharmaceutical( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicinalProductPharmaceutical + * @static + * @summary Update MedicinalProductPharmaceutical resolver. + */ +module.exports.updateMedicinalProductPharmaceutical = function updateMedicinalProductPharmaceutical( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicinalProductPharmaceutical + * @static + * @summary Remove MedicinalProductPharmaceutical resolver. + */ +module.exports.removeMedicinalProductPharmaceutical = function removeMedicinalProductPharmaceutical( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/mutation.js b/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/mutation.js new file mode 100644 index 00000000..9d559adc --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/mutation.js @@ -0,0 +1,91 @@ +// Schemas +const MedicinalProductUndesirableEffectSchema = require('../../schemas/medicinalproductundesirableeffect.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MedicinalProductUndesirableEffectInput = require('../../inputs/medicinalproductundesirableeffect.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMedicinalProductUndesirableEffect, + updateMedicinalProductUndesirableEffect, + removeMedicinalProductUndesirableEffect, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductUndesirableEffect', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MedicinalProductUndesirableEffect record.', + }, + resource: { + type: new GraphQLNonNull(MedicinalProductUndesirableEffectInput), + description: + 'MedicinalProductUndesirableEffect Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MedicinalProductUndesirableEffect record for deletion.', + }, +}; + +/** + * @name exports.MedicinalProductUndesirableEffectCreateMutation + * @summary MedicinalProductUndesirableEffectCreate mutation. + */ +module.exports.MedicinalProductUndesirableEffectCreateMutation = { + description: 'Create a MedicinalProductUndesirableEffect record', + resolve: scopeInvariant( + scopeOptions, + createMedicinalProductUndesirableEffect, + ), + type: MedicinalProductUndesirableEffectSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductUndesirableEffectUpdateMutation + * @summary MedicinalProductUndesirableEffectUpdate mutation. + */ +module.exports.MedicinalProductUndesirableEffectUpdateMutation = { + description: 'Update a MedicinalProductUndesirableEffect record', + resolve: scopeInvariant( + scopeOptions, + updateMedicinalProductUndesirableEffect, + ), + type: MedicinalProductUndesirableEffectSchema, + args: WriteArgs, +}; + +/** + * @name exports.MedicinalProductUndesirableEffectRemoveMutation + * @summary MedicinalProductUndesirableEffectRemove mutation. + */ +module.exports.MedicinalProductUndesirableEffectRemoveMutation = { + description: 'Remove a MedicinalProductUndesirableEffect record', + resolve: scopeInvariant( + scopeOptions, + removeMedicinalProductUndesirableEffect, + ), + type: MedicinalProductUndesirableEffectSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/query.js b/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/query.js new file mode 100644 index 00000000..06c83194 --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/query.js @@ -0,0 +1,73 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MedicinalProductUndesirableEffectSchema = require('../../schemas/medicinalproductundesirableeffect.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MedicinalProductUndesirableEffectArgs = require('../../parameters/medicinalproductundesirableeffect.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MedicinalProductUndesirableEffectArgs, +); + +// Resolvers +const { + getMedicinalProductUndesirableEffect, + getMedicinalProductUndesirableEffectList, + getMedicinalProductUndesirableEffectInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MedicinalProductUndesirableEffect', + action: 'read', +}; + +/** + * @name exports.MedicinalProductUndesirableEffectQuery + * @summary MedicinalProductUndesirableEffect query. + */ +module.exports.MedicinalProductUndesirableEffectQuery = { + description: 'Query for a single MedicinalProductUndesirableEffect', + resolve: scopeInvariant(scopeOptions, getMedicinalProductUndesirableEffect), + type: MedicinalProductUndesirableEffectSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductUndesirableEffectListQuery + * @summary MedicinalProductUndesirableEffect query. + */ +module.exports.MedicinalProductUndesirableEffectListQuery = { + description: + 'Query for a more than or just one MedicinalProductUndesirableEffect', + resolve: scopeInvariant( + scopeOptions, + getMedicinalProductUndesirableEffectList, + ), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MedicinalProductUndesirableEffectInstanceQuery + * @summary MedicinalProductUndesirableEffect query. + */ +module.exports.MedicinalProductUndesirableEffectInstanceQuery = { + description: + 'Access information about a single MedicinalProductUndesirableEffect', + resolve: scopeInvariant( + scopeOptions, + getMedicinalProductUndesirableEffectInstance, + ), + type: MedicinalProductUndesirableEffectSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/register.js b/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/register.js new file mode 100644 index 00000000..6fc3780f --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/register.js @@ -0,0 +1,48 @@ +const { + MedicinalProductUndesirableEffectCreateMutation, + MedicinalProductUndesirableEffectUpdateMutation, + MedicinalProductUndesirableEffectRemoveMutation, +} = require('./mutation'); + +const { + MedicinalProductUndesirableEffectQuery, + MedicinalProductUndesirableEffectListQuery, + MedicinalProductUndesirableEffectInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MedicinalProductUndesirableEffect: MedicinalProductUndesirableEffectQuery, + MedicinalProductUndesirableEffectList: MedicinalProductUndesirableEffectListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MedicinalProductUndesirableEffectCreate: MedicinalProductUndesirableEffectCreateMutation, + MedicinalProductUndesirableEffectUpdate: MedicinalProductUndesirableEffectUpdateMutation, + MedicinalProductUndesirableEffectRemove: MedicinalProductUndesirableEffectRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MedicinalProductUndesirableEffect', + path: '/4_0_0/MedicinalProductUndesirableEffect/:id', + query: MedicinalProductUndesirableEffectInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/resolver.js b/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/resolver.js new file mode 100644 index 00000000..52a652cf --- /dev/null +++ b/src/resources/4_0_0/profiles/medicinalproductundesirableeffect/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMedicinalProductUndesirableEffect + * @static + * @summary MedicinalProductUndesirableEffect resolver. + */ +module.exports.getMedicinalProductUndesirableEffect = function getMedicinalProductUndesirableEffect( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductUndesirableEffectList + * @static + * @summary MedicinalProductUndesirableEffect list resolver. + */ +module.exports.getMedicinalProductUndesirableEffectList = function getMedicinalProductUndesirableEffectList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMedicinalProductUndesirableEffectInstance + * @static + * @summary MedicinalProductUndesirableEffect instance resolver. + */ +module.exports.getMedicinalProductUndesirableEffectInstance = function getMedicinalProductUndesirableEffectInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMedicinalProductUndesirableEffect + * @static + * @summary Create MedicinalProductUndesirableEffect resolver. + */ +module.exports.createMedicinalProductUndesirableEffect = function createMedicinalProductUndesirableEffect( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMedicinalProductUndesirableEffect + * @static + * @summary Update MedicinalProductUndesirableEffect resolver. + */ +module.exports.updateMedicinalProductUndesirableEffect = function updateMedicinalProductUndesirableEffect( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMedicinalProductUndesirableEffect + * @static + * @summary Remove MedicinalProductUndesirableEffect resolver. + */ +module.exports.removeMedicinalProductUndesirableEffect = function removeMedicinalProductUndesirableEffect( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/messagedefinition/mutation.js b/src/resources/4_0_0/profiles/messagedefinition/mutation.js new file mode 100644 index 00000000..1d5b4ce9 --- /dev/null +++ b/src/resources/4_0_0/profiles/messagedefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MessageDefinitionSchema = require('../../schemas/messagedefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MessageDefinitionInput = require('../../inputs/messagedefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMessageDefinition, + updateMessageDefinition, + removeMessageDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MessageDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MessageDefinition record.', + }, + resource: { + type: new GraphQLNonNull(MessageDefinitionInput), + description: 'MessageDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MessageDefinition record for deletion.', + }, +}; + +/** + * @name exports.MessageDefinitionCreateMutation + * @summary MessageDefinitionCreate mutation. + */ +module.exports.MessageDefinitionCreateMutation = { + description: 'Create a MessageDefinition record', + resolve: scopeInvariant(scopeOptions, createMessageDefinition), + type: MessageDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.MessageDefinitionUpdateMutation + * @summary MessageDefinitionUpdate mutation. + */ +module.exports.MessageDefinitionUpdateMutation = { + description: 'Update a MessageDefinition record', + resolve: scopeInvariant(scopeOptions, updateMessageDefinition), + type: MessageDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.MessageDefinitionRemoveMutation + * @summary MessageDefinitionRemove mutation. + */ +module.exports.MessageDefinitionRemoveMutation = { + description: 'Remove a MessageDefinition record', + resolve: scopeInvariant(scopeOptions, removeMessageDefinition), + type: MessageDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/messagedefinition/query.js b/src/resources/4_0_0/profiles/messagedefinition/query.js new file mode 100644 index 00000000..66eaec79 --- /dev/null +++ b/src/resources/4_0_0/profiles/messagedefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MessageDefinitionSchema = require('../../schemas/messagedefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MessageDefinitionArgs = require('../../parameters/messagedefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MessageDefinitionArgs, +); + +// Resolvers +const { + getMessageDefinition, + getMessageDefinitionList, + getMessageDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MessageDefinition', + action: 'read', +}; + +/** + * @name exports.MessageDefinitionQuery + * @summary MessageDefinition query. + */ +module.exports.MessageDefinitionQuery = { + description: 'Query for a single MessageDefinition', + resolve: scopeInvariant(scopeOptions, getMessageDefinition), + type: MessageDefinitionSchema, + args: args, +}; + +/** + * @name exports.MessageDefinitionListQuery + * @summary MessageDefinition query. + */ +module.exports.MessageDefinitionListQuery = { + description: 'Query for a more than or just one MessageDefinition', + resolve: scopeInvariant(scopeOptions, getMessageDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MessageDefinitionInstanceQuery + * @summary MessageDefinition query. + */ +module.exports.MessageDefinitionInstanceQuery = { + description: 'Access information about a single MessageDefinition', + resolve: scopeInvariant(scopeOptions, getMessageDefinitionInstance), + type: MessageDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/messagedefinition/register.js b/src/resources/4_0_0/profiles/messagedefinition/register.js new file mode 100644 index 00000000..5c184193 --- /dev/null +++ b/src/resources/4_0_0/profiles/messagedefinition/register.js @@ -0,0 +1,48 @@ +const { + MessageDefinitionCreateMutation, + MessageDefinitionUpdateMutation, + MessageDefinitionRemoveMutation, +} = require('./mutation'); + +const { + MessageDefinitionQuery, + MessageDefinitionListQuery, + MessageDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MessageDefinition: MessageDefinitionQuery, + MessageDefinitionList: MessageDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MessageDefinitionCreate: MessageDefinitionCreateMutation, + MessageDefinitionUpdate: MessageDefinitionUpdateMutation, + MessageDefinitionRemove: MessageDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MessageDefinition', + path: '/4_0_0/MessageDefinition/:id', + query: MessageDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/messagedefinition/resolver.js b/src/resources/4_0_0/profiles/messagedefinition/resolver.js new file mode 100644 index 00000000..52c29341 --- /dev/null +++ b/src/resources/4_0_0/profiles/messagedefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMessageDefinition + * @static + * @summary MessageDefinition resolver. + */ +module.exports.getMessageDefinition = function getMessageDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMessageDefinitionList + * @static + * @summary MessageDefinition list resolver. + */ +module.exports.getMessageDefinitionList = function getMessageDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMessageDefinitionInstance + * @static + * @summary MessageDefinition instance resolver. + */ +module.exports.getMessageDefinitionInstance = function getMessageDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMessageDefinition + * @static + * @summary Create MessageDefinition resolver. + */ +module.exports.createMessageDefinition = function createMessageDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMessageDefinition + * @static + * @summary Update MessageDefinition resolver. + */ +module.exports.updateMessageDefinition = function updateMessageDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMessageDefinition + * @static + * @summary Remove MessageDefinition resolver. + */ +module.exports.removeMessageDefinition = function removeMessageDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/messageheader/mutation.js b/src/resources/4_0_0/profiles/messageheader/mutation.js new file mode 100644 index 00000000..1b2f5ea8 --- /dev/null +++ b/src/resources/4_0_0/profiles/messageheader/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MessageHeaderSchema = require('../../schemas/messageheader.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MessageHeaderInput = require('../../inputs/messageheader.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMessageHeader, + updateMessageHeader, + removeMessageHeader, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MessageHeader', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MessageHeader record.', + }, + resource: { + type: new GraphQLNonNull(MessageHeaderInput), + description: 'MessageHeader Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MessageHeader record for deletion.', + }, +}; + +/** + * @name exports.MessageHeaderCreateMutation + * @summary MessageHeaderCreate mutation. + */ +module.exports.MessageHeaderCreateMutation = { + description: 'Create a MessageHeader record', + resolve: scopeInvariant(scopeOptions, createMessageHeader), + type: MessageHeaderSchema, + args: WriteArgs, +}; + +/** + * @name exports.MessageHeaderUpdateMutation + * @summary MessageHeaderUpdate mutation. + */ +module.exports.MessageHeaderUpdateMutation = { + description: 'Update a MessageHeader record', + resolve: scopeInvariant(scopeOptions, updateMessageHeader), + type: MessageHeaderSchema, + args: WriteArgs, +}; + +/** + * @name exports.MessageHeaderRemoveMutation + * @summary MessageHeaderRemove mutation. + */ +module.exports.MessageHeaderRemoveMutation = { + description: 'Remove a MessageHeader record', + resolve: scopeInvariant(scopeOptions, removeMessageHeader), + type: MessageHeaderSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/messageheader/query.js b/src/resources/4_0_0/profiles/messageheader/query.js new file mode 100644 index 00000000..dbcb6abf --- /dev/null +++ b/src/resources/4_0_0/profiles/messageheader/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MessageHeaderSchema = require('../../schemas/messageheader.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MessageHeaderArgs = require('../../parameters/messageheader.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MessageHeaderArgs, +); + +// Resolvers +const { + getMessageHeader, + getMessageHeaderList, + getMessageHeaderInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MessageHeader', + action: 'read', +}; + +/** + * @name exports.MessageHeaderQuery + * @summary MessageHeader query. + */ +module.exports.MessageHeaderQuery = { + description: 'Query for a single MessageHeader', + resolve: scopeInvariant(scopeOptions, getMessageHeader), + type: MessageHeaderSchema, + args: args, +}; + +/** + * @name exports.MessageHeaderListQuery + * @summary MessageHeader query. + */ +module.exports.MessageHeaderListQuery = { + description: 'Query for a more than or just one MessageHeader', + resolve: scopeInvariant(scopeOptions, getMessageHeaderList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MessageHeaderInstanceQuery + * @summary MessageHeader query. + */ +module.exports.MessageHeaderInstanceQuery = { + description: 'Access information about a single MessageHeader', + resolve: scopeInvariant(scopeOptions, getMessageHeaderInstance), + type: MessageHeaderSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/messageheader/register.js b/src/resources/4_0_0/profiles/messageheader/register.js new file mode 100644 index 00000000..f0b358a0 --- /dev/null +++ b/src/resources/4_0_0/profiles/messageheader/register.js @@ -0,0 +1,48 @@ +const { + MessageHeaderCreateMutation, + MessageHeaderUpdateMutation, + MessageHeaderRemoveMutation, +} = require('./mutation'); + +const { + MessageHeaderQuery, + MessageHeaderListQuery, + MessageHeaderInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MessageHeader: MessageHeaderQuery, + MessageHeaderList: MessageHeaderListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MessageHeaderCreate: MessageHeaderCreateMutation, + MessageHeaderUpdate: MessageHeaderUpdateMutation, + MessageHeaderRemove: MessageHeaderRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MessageHeader', + path: '/4_0_0/MessageHeader/:id', + query: MessageHeaderInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/messageheader/resolver.js b/src/resources/4_0_0/profiles/messageheader/resolver.js new file mode 100644 index 00000000..4ccd0679 --- /dev/null +++ b/src/resources/4_0_0/profiles/messageheader/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMessageHeader + * @static + * @summary MessageHeader resolver. + */ +module.exports.getMessageHeader = function getMessageHeader( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMessageHeaderList + * @static + * @summary MessageHeader list resolver. + */ +module.exports.getMessageHeaderList = function getMessageHeaderList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMessageHeaderInstance + * @static + * @summary MessageHeader instance resolver. + */ +module.exports.getMessageHeaderInstance = function getMessageHeaderInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMessageHeader + * @static + * @summary Create MessageHeader resolver. + */ +module.exports.createMessageHeader = function createMessageHeader( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMessageHeader + * @static + * @summary Update MessageHeader resolver. + */ +module.exports.updateMessageHeader = function updateMessageHeader( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMessageHeader + * @static + * @summary Remove MessageHeader resolver. + */ +module.exports.removeMessageHeader = function removeMessageHeader( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/molecularsequence/mutation.js b/src/resources/4_0_0/profiles/molecularsequence/mutation.js new file mode 100644 index 00000000..f358afef --- /dev/null +++ b/src/resources/4_0_0/profiles/molecularsequence/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const MolecularSequenceSchema = require('../../schemas/molecularsequence.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const MolecularSequenceInput = require('../../inputs/molecularsequence.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createMolecularSequence, + updateMolecularSequence, + removeMolecularSequence, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MolecularSequence', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a MolecularSequence record.', + }, + resource: { + type: new GraphQLNonNull(MolecularSequenceInput), + description: 'MolecularSequence Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a MolecularSequence record for deletion.', + }, +}; + +/** + * @name exports.MolecularSequenceCreateMutation + * @summary MolecularSequenceCreate mutation. + */ +module.exports.MolecularSequenceCreateMutation = { + description: 'Create a MolecularSequence record', + resolve: scopeInvariant(scopeOptions, createMolecularSequence), + type: MolecularSequenceSchema, + args: WriteArgs, +}; + +/** + * @name exports.MolecularSequenceUpdateMutation + * @summary MolecularSequenceUpdate mutation. + */ +module.exports.MolecularSequenceUpdateMutation = { + description: 'Update a MolecularSequence record', + resolve: scopeInvariant(scopeOptions, updateMolecularSequence), + type: MolecularSequenceSchema, + args: WriteArgs, +}; + +/** + * @name exports.MolecularSequenceRemoveMutation + * @summary MolecularSequenceRemove mutation. + */ +module.exports.MolecularSequenceRemoveMutation = { + description: 'Remove a MolecularSequence record', + resolve: scopeInvariant(scopeOptions, removeMolecularSequence), + type: MolecularSequenceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/molecularsequence/query.js b/src/resources/4_0_0/profiles/molecularsequence/query.js new file mode 100644 index 00000000..c8c2c6e6 --- /dev/null +++ b/src/resources/4_0_0/profiles/molecularsequence/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const MolecularSequenceSchema = require('../../schemas/molecularsequence.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const MolecularSequenceArgs = require('../../parameters/molecularsequence.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + MolecularSequenceArgs, +); + +// Resolvers +const { + getMolecularSequence, + getMolecularSequenceList, + getMolecularSequenceInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'MolecularSequence', + action: 'read', +}; + +/** + * @name exports.MolecularSequenceQuery + * @summary MolecularSequence query. + */ +module.exports.MolecularSequenceQuery = { + description: 'Query for a single MolecularSequence', + resolve: scopeInvariant(scopeOptions, getMolecularSequence), + type: MolecularSequenceSchema, + args: args, +}; + +/** + * @name exports.MolecularSequenceListQuery + * @summary MolecularSequence query. + */ +module.exports.MolecularSequenceListQuery = { + description: 'Query for a more than or just one MolecularSequence', + resolve: scopeInvariant(scopeOptions, getMolecularSequenceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.MolecularSequenceInstanceQuery + * @summary MolecularSequence query. + */ +module.exports.MolecularSequenceInstanceQuery = { + description: 'Access information about a single MolecularSequence', + resolve: scopeInvariant(scopeOptions, getMolecularSequenceInstance), + type: MolecularSequenceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/molecularsequence/register.js b/src/resources/4_0_0/profiles/molecularsequence/register.js new file mode 100644 index 00000000..22a4b596 --- /dev/null +++ b/src/resources/4_0_0/profiles/molecularsequence/register.js @@ -0,0 +1,48 @@ +const { + MolecularSequenceCreateMutation, + MolecularSequenceUpdateMutation, + MolecularSequenceRemoveMutation, +} = require('./mutation'); + +const { + MolecularSequenceQuery, + MolecularSequenceListQuery, + MolecularSequenceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + MolecularSequence: MolecularSequenceQuery, + MolecularSequenceList: MolecularSequenceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + MolecularSequenceCreate: MolecularSequenceCreateMutation, + MolecularSequenceUpdate: MolecularSequenceUpdateMutation, + MolecularSequenceRemove: MolecularSequenceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'MolecularSequence', + path: '/4_0_0/MolecularSequence/:id', + query: MolecularSequenceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/molecularsequence/resolver.js b/src/resources/4_0_0/profiles/molecularsequence/resolver.js new file mode 100644 index 00000000..cdc19d18 --- /dev/null +++ b/src/resources/4_0_0/profiles/molecularsequence/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getMolecularSequence + * @static + * @summary MolecularSequence resolver. + */ +module.exports.getMolecularSequence = function getMolecularSequence( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMolecularSequenceList + * @static + * @summary MolecularSequence list resolver. + */ +module.exports.getMolecularSequenceList = function getMolecularSequenceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getMolecularSequenceInstance + * @static + * @summary MolecularSequence instance resolver. + */ +module.exports.getMolecularSequenceInstance = function getMolecularSequenceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createMolecularSequence + * @static + * @summary Create MolecularSequence resolver. + */ +module.exports.createMolecularSequence = function createMolecularSequence( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateMolecularSequence + * @static + * @summary Update MolecularSequence resolver. + */ +module.exports.updateMolecularSequence = function updateMolecularSequence( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeMolecularSequence + * @static + * @summary Remove MolecularSequence resolver. + */ +module.exports.removeMolecularSequence = function removeMolecularSequence( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/namingsystem/mutation.js b/src/resources/4_0_0/profiles/namingsystem/mutation.js new file mode 100644 index 00000000..c20ef1ad --- /dev/null +++ b/src/resources/4_0_0/profiles/namingsystem/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const NamingSystemSchema = require('../../schemas/namingsystem.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const NamingSystemInput = require('../../inputs/namingsystem.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createNamingSystem, + updateNamingSystem, + removeNamingSystem, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'NamingSystem', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a NamingSystem record.', + }, + resource: { + type: new GraphQLNonNull(NamingSystemInput), + description: 'NamingSystem Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a NamingSystem record for deletion.', + }, +}; + +/** + * @name exports.NamingSystemCreateMutation + * @summary NamingSystemCreate mutation. + */ +module.exports.NamingSystemCreateMutation = { + description: 'Create a NamingSystem record', + resolve: scopeInvariant(scopeOptions, createNamingSystem), + type: NamingSystemSchema, + args: WriteArgs, +}; + +/** + * @name exports.NamingSystemUpdateMutation + * @summary NamingSystemUpdate mutation. + */ +module.exports.NamingSystemUpdateMutation = { + description: 'Update a NamingSystem record', + resolve: scopeInvariant(scopeOptions, updateNamingSystem), + type: NamingSystemSchema, + args: WriteArgs, +}; + +/** + * @name exports.NamingSystemRemoveMutation + * @summary NamingSystemRemove mutation. + */ +module.exports.NamingSystemRemoveMutation = { + description: 'Remove a NamingSystem record', + resolve: scopeInvariant(scopeOptions, removeNamingSystem), + type: NamingSystemSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/namingsystem/query.js b/src/resources/4_0_0/profiles/namingsystem/query.js new file mode 100644 index 00000000..a0227bd9 --- /dev/null +++ b/src/resources/4_0_0/profiles/namingsystem/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const NamingSystemSchema = require('../../schemas/namingsystem.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const NamingSystemArgs = require('../../parameters/namingsystem.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + NamingSystemArgs, +); + +// Resolvers +const { + getNamingSystem, + getNamingSystemList, + getNamingSystemInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'NamingSystem', + action: 'read', +}; + +/** + * @name exports.NamingSystemQuery + * @summary NamingSystem query. + */ +module.exports.NamingSystemQuery = { + description: 'Query for a single NamingSystem', + resolve: scopeInvariant(scopeOptions, getNamingSystem), + type: NamingSystemSchema, + args: args, +}; + +/** + * @name exports.NamingSystemListQuery + * @summary NamingSystem query. + */ +module.exports.NamingSystemListQuery = { + description: 'Query for a more than or just one NamingSystem', + resolve: scopeInvariant(scopeOptions, getNamingSystemList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.NamingSystemInstanceQuery + * @summary NamingSystem query. + */ +module.exports.NamingSystemInstanceQuery = { + description: 'Access information about a single NamingSystem', + resolve: scopeInvariant(scopeOptions, getNamingSystemInstance), + type: NamingSystemSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/namingsystem/register.js b/src/resources/4_0_0/profiles/namingsystem/register.js new file mode 100644 index 00000000..0e5fc89f --- /dev/null +++ b/src/resources/4_0_0/profiles/namingsystem/register.js @@ -0,0 +1,48 @@ +const { + NamingSystemCreateMutation, + NamingSystemUpdateMutation, + NamingSystemRemoveMutation, +} = require('./mutation'); + +const { + NamingSystemQuery, + NamingSystemListQuery, + NamingSystemInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + NamingSystem: NamingSystemQuery, + NamingSystemList: NamingSystemListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + NamingSystemCreate: NamingSystemCreateMutation, + NamingSystemUpdate: NamingSystemUpdateMutation, + NamingSystemRemove: NamingSystemRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'NamingSystem', + path: '/4_0_0/NamingSystem/:id', + query: NamingSystemInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/namingsystem/resolver.js b/src/resources/4_0_0/profiles/namingsystem/resolver.js new file mode 100644 index 00000000..de591f31 --- /dev/null +++ b/src/resources/4_0_0/profiles/namingsystem/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getNamingSystem + * @static + * @summary NamingSystem resolver. + */ +module.exports.getNamingSystem = function getNamingSystem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getNamingSystemList + * @static + * @summary NamingSystem list resolver. + */ +module.exports.getNamingSystemList = function getNamingSystemList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getNamingSystemInstance + * @static + * @summary NamingSystem instance resolver. + */ +module.exports.getNamingSystemInstance = function getNamingSystemInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createNamingSystem + * @static + * @summary Create NamingSystem resolver. + */ +module.exports.createNamingSystem = function createNamingSystem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateNamingSystem + * @static + * @summary Update NamingSystem resolver. + */ +module.exports.updateNamingSystem = function updateNamingSystem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeNamingSystem + * @static + * @summary Remove NamingSystem resolver. + */ +module.exports.removeNamingSystem = function removeNamingSystem( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/nutritionorder/mutation.js b/src/resources/4_0_0/profiles/nutritionorder/mutation.js new file mode 100644 index 00000000..bb3dae4b --- /dev/null +++ b/src/resources/4_0_0/profiles/nutritionorder/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const NutritionOrderSchema = require('../../schemas/nutritionorder.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const NutritionOrderInput = require('../../inputs/nutritionorder.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createNutritionOrder, + updateNutritionOrder, + removeNutritionOrder, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'NutritionOrder', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a NutritionOrder record.', + }, + resource: { + type: new GraphQLNonNull(NutritionOrderInput), + description: 'NutritionOrder Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a NutritionOrder record for deletion.', + }, +}; + +/** + * @name exports.NutritionOrderCreateMutation + * @summary NutritionOrderCreate mutation. + */ +module.exports.NutritionOrderCreateMutation = { + description: 'Create a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, createNutritionOrder), + type: NutritionOrderSchema, + args: WriteArgs, +}; + +/** + * @name exports.NutritionOrderUpdateMutation + * @summary NutritionOrderUpdate mutation. + */ +module.exports.NutritionOrderUpdateMutation = { + description: 'Update a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, updateNutritionOrder), + type: NutritionOrderSchema, + args: WriteArgs, +}; + +/** + * @name exports.NutritionOrderRemoveMutation + * @summary NutritionOrderRemove mutation. + */ +module.exports.NutritionOrderRemoveMutation = { + description: 'Remove a NutritionOrder record', + resolve: scopeInvariant(scopeOptions, removeNutritionOrder), + type: NutritionOrderSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/nutritionorder/query.js b/src/resources/4_0_0/profiles/nutritionorder/query.js new file mode 100644 index 00000000..204278ce --- /dev/null +++ b/src/resources/4_0_0/profiles/nutritionorder/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const NutritionOrderSchema = require('../../schemas/nutritionorder.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const NutritionOrderArgs = require('../../parameters/nutritionorder.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + NutritionOrderArgs, +); + +// Resolvers +const { + getNutritionOrder, + getNutritionOrderList, + getNutritionOrderInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'NutritionOrder', + action: 'read', +}; + +/** + * @name exports.NutritionOrderQuery + * @summary NutritionOrder query. + */ +module.exports.NutritionOrderQuery = { + description: 'Query for a single NutritionOrder', + resolve: scopeInvariant(scopeOptions, getNutritionOrder), + type: NutritionOrderSchema, + args: args, +}; + +/** + * @name exports.NutritionOrderListQuery + * @summary NutritionOrder query. + */ +module.exports.NutritionOrderListQuery = { + description: 'Query for a more than or just one NutritionOrder', + resolve: scopeInvariant(scopeOptions, getNutritionOrderList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.NutritionOrderInstanceQuery + * @summary NutritionOrder query. + */ +module.exports.NutritionOrderInstanceQuery = { + description: 'Access information about a single NutritionOrder', + resolve: scopeInvariant(scopeOptions, getNutritionOrderInstance), + type: NutritionOrderSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/nutritionorder/register.js b/src/resources/4_0_0/profiles/nutritionorder/register.js new file mode 100644 index 00000000..eff39066 --- /dev/null +++ b/src/resources/4_0_0/profiles/nutritionorder/register.js @@ -0,0 +1,48 @@ +const { + NutritionOrderCreateMutation, + NutritionOrderUpdateMutation, + NutritionOrderRemoveMutation, +} = require('./mutation'); + +const { + NutritionOrderQuery, + NutritionOrderListQuery, + NutritionOrderInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + NutritionOrder: NutritionOrderQuery, + NutritionOrderList: NutritionOrderListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + NutritionOrderCreate: NutritionOrderCreateMutation, + NutritionOrderUpdate: NutritionOrderUpdateMutation, + NutritionOrderRemove: NutritionOrderRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'NutritionOrder', + path: '/4_0_0/NutritionOrder/:id', + query: NutritionOrderInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/nutritionorder/resolver.js b/src/resources/4_0_0/profiles/nutritionorder/resolver.js new file mode 100644 index 00000000..e6674684 --- /dev/null +++ b/src/resources/4_0_0/profiles/nutritionorder/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getNutritionOrder + * @static + * @summary NutritionOrder resolver. + */ +module.exports.getNutritionOrder = function getNutritionOrder( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getNutritionOrderList + * @static + * @summary NutritionOrder list resolver. + */ +module.exports.getNutritionOrderList = function getNutritionOrderList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getNutritionOrderInstance + * @static + * @summary NutritionOrder instance resolver. + */ +module.exports.getNutritionOrderInstance = function getNutritionOrderInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createNutritionOrder + * @static + * @summary Create NutritionOrder resolver. + */ +module.exports.createNutritionOrder = function createNutritionOrder( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateNutritionOrder + * @static + * @summary Update NutritionOrder resolver. + */ +module.exports.updateNutritionOrder = function updateNutritionOrder( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeNutritionOrder + * @static + * @summary Remove NutritionOrder resolver. + */ +module.exports.removeNutritionOrder = function removeNutritionOrder( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/observation/mutation.js b/src/resources/4_0_0/profiles/observation/mutation.js new file mode 100644 index 00000000..9fd5d068 --- /dev/null +++ b/src/resources/4_0_0/profiles/observation/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ObservationSchema = require('../../schemas/observation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ObservationInput = require('../../inputs/observation.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createObservation, + updateObservation, + removeObservation, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Observation', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Observation record.', + }, + resource: { + type: new GraphQLNonNull(ObservationInput), + description: 'Observation Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Observation record for deletion.', + }, +}; + +/** + * @name exports.ObservationCreateMutation + * @summary ObservationCreate mutation. + */ +module.exports.ObservationCreateMutation = { + description: 'Create a Observation record', + resolve: scopeInvariant(scopeOptions, createObservation), + type: ObservationSchema, + args: WriteArgs, +}; + +/** + * @name exports.ObservationUpdateMutation + * @summary ObservationUpdate mutation. + */ +module.exports.ObservationUpdateMutation = { + description: 'Update a Observation record', + resolve: scopeInvariant(scopeOptions, updateObservation), + type: ObservationSchema, + args: WriteArgs, +}; + +/** + * @name exports.ObservationRemoveMutation + * @summary ObservationRemove mutation. + */ +module.exports.ObservationRemoveMutation = { + description: 'Remove a Observation record', + resolve: scopeInvariant(scopeOptions, removeObservation), + type: ObservationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/observation/query.js b/src/resources/4_0_0/profiles/observation/query.js new file mode 100644 index 00000000..554748ec --- /dev/null +++ b/src/resources/4_0_0/profiles/observation/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ObservationSchema = require('../../schemas/observation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ObservationArgs = require('../../parameters/observation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ObservationArgs); + +// Resolvers +const { + getObservation, + getObservationList, + getObservationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Observation', + action: 'read', +}; + +/** + * @name exports.ObservationQuery + * @summary Observation query. + */ +module.exports.ObservationQuery = { + description: 'Query for a single Observation', + resolve: scopeInvariant(scopeOptions, getObservation), + type: ObservationSchema, + args: args, +}; + +/** + * @name exports.ObservationListQuery + * @summary Observation query. + */ +module.exports.ObservationListQuery = { + description: 'Query for a more than or just one Observation', + resolve: scopeInvariant(scopeOptions, getObservationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ObservationInstanceQuery + * @summary Observation query. + */ +module.exports.ObservationInstanceQuery = { + description: 'Access information about a single Observation', + resolve: scopeInvariant(scopeOptions, getObservationInstance), + type: ObservationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/observation/register.js b/src/resources/4_0_0/profiles/observation/register.js new file mode 100644 index 00000000..f99c1616 --- /dev/null +++ b/src/resources/4_0_0/profiles/observation/register.js @@ -0,0 +1,48 @@ +const { + ObservationCreateMutation, + ObservationUpdateMutation, + ObservationRemoveMutation, +} = require('./mutation'); + +const { + ObservationQuery, + ObservationListQuery, + ObservationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Observation: ObservationQuery, + ObservationList: ObservationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ObservationCreate: ObservationCreateMutation, + ObservationUpdate: ObservationUpdateMutation, + ObservationRemove: ObservationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Observation', + path: '/4_0_0/Observation/:id', + query: ObservationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/observation/resolver.js b/src/resources/4_0_0/profiles/observation/resolver.js new file mode 100644 index 00000000..da09be65 --- /dev/null +++ b/src/resources/4_0_0/profiles/observation/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getObservation + * @static + * @summary Observation resolver. + */ +module.exports.getObservation = function getObservation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getObservationList + * @static + * @summary Observation list resolver. + */ +module.exports.getObservationList = function getObservationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getObservationInstance + * @static + * @summary Observation instance resolver. + */ +module.exports.getObservationInstance = function getObservationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createObservation + * @static + * @summary Create Observation resolver. + */ +module.exports.createObservation = function createObservation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateObservation + * @static + * @summary Update Observation resolver. + */ +module.exports.updateObservation = function updateObservation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeObservation + * @static + * @summary Remove Observation resolver. + */ +module.exports.removeObservation = function removeObservation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/operationdefinition/mutation.js b/src/resources/4_0_0/profiles/operationdefinition/mutation.js new file mode 100644 index 00000000..3e607b6b --- /dev/null +++ b/src/resources/4_0_0/profiles/operationdefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const OperationDefinitionInput = require('../../inputs/operationdefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createOperationDefinition, + updateOperationDefinition, + removeOperationDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'OperationDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a OperationDefinition record.', + }, + resource: { + type: new GraphQLNonNull(OperationDefinitionInput), + description: 'OperationDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a OperationDefinition record for deletion.', + }, +}; + +/** + * @name exports.OperationDefinitionCreateMutation + * @summary OperationDefinitionCreate mutation. + */ +module.exports.OperationDefinitionCreateMutation = { + description: 'Create a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, createOperationDefinition), + type: OperationDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.OperationDefinitionUpdateMutation + * @summary OperationDefinitionUpdate mutation. + */ +module.exports.OperationDefinitionUpdateMutation = { + description: 'Update a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, updateOperationDefinition), + type: OperationDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.OperationDefinitionRemoveMutation + * @summary OperationDefinitionRemove mutation. + */ +module.exports.OperationDefinitionRemoveMutation = { + description: 'Remove a OperationDefinition record', + resolve: scopeInvariant(scopeOptions, removeOperationDefinition), + type: OperationDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/operationdefinition/query.js b/src/resources/4_0_0/profiles/operationdefinition/query.js new file mode 100644 index 00000000..5179c68b --- /dev/null +++ b/src/resources/4_0_0/profiles/operationdefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OperationDefinitionSchema = require('../../schemas/operationdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const OperationDefinitionArgs = require('../../parameters/operationdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + OperationDefinitionArgs, +); + +// Resolvers +const { + getOperationDefinition, + getOperationDefinitionList, + getOperationDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'OperationDefinition', + action: 'read', +}; + +/** + * @name exports.OperationDefinitionQuery + * @summary OperationDefinition query. + */ +module.exports.OperationDefinitionQuery = { + description: 'Query for a single OperationDefinition', + resolve: scopeInvariant(scopeOptions, getOperationDefinition), + type: OperationDefinitionSchema, + args: args, +}; + +/** + * @name exports.OperationDefinitionListQuery + * @summary OperationDefinition query. + */ +module.exports.OperationDefinitionListQuery = { + description: 'Query for a more than or just one OperationDefinition', + resolve: scopeInvariant(scopeOptions, getOperationDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.OperationDefinitionInstanceQuery + * @summary OperationDefinition query. + */ +module.exports.OperationDefinitionInstanceQuery = { + description: 'Access information about a single OperationDefinition', + resolve: scopeInvariant(scopeOptions, getOperationDefinitionInstance), + type: OperationDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/operationdefinition/register.js b/src/resources/4_0_0/profiles/operationdefinition/register.js new file mode 100644 index 00000000..31974131 --- /dev/null +++ b/src/resources/4_0_0/profiles/operationdefinition/register.js @@ -0,0 +1,48 @@ +const { + OperationDefinitionCreateMutation, + OperationDefinitionUpdateMutation, + OperationDefinitionRemoveMutation, +} = require('./mutation'); + +const { + OperationDefinitionQuery, + OperationDefinitionListQuery, + OperationDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + OperationDefinition: OperationDefinitionQuery, + OperationDefinitionList: OperationDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + OperationDefinitionCreate: OperationDefinitionCreateMutation, + OperationDefinitionUpdate: OperationDefinitionUpdateMutation, + OperationDefinitionRemove: OperationDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'OperationDefinition', + path: '/4_0_0/OperationDefinition/:id', + query: OperationDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/operationdefinition/resolver.js b/src/resources/4_0_0/profiles/operationdefinition/resolver.js new file mode 100644 index 00000000..3760e636 --- /dev/null +++ b/src/resources/4_0_0/profiles/operationdefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getOperationDefinition + * @static + * @summary OperationDefinition resolver. + */ +module.exports.getOperationDefinition = function getOperationDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getOperationDefinitionList + * @static + * @summary OperationDefinition list resolver. + */ +module.exports.getOperationDefinitionList = function getOperationDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getOperationDefinitionInstance + * @static + * @summary OperationDefinition instance resolver. + */ +module.exports.getOperationDefinitionInstance = function getOperationDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createOperationDefinition + * @static + * @summary Create OperationDefinition resolver. + */ +module.exports.createOperationDefinition = function createOperationDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateOperationDefinition + * @static + * @summary Update OperationDefinition resolver. + */ +module.exports.updateOperationDefinition = function updateOperationDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeOperationDefinition + * @static + * @summary Remove OperationDefinition resolver. + */ +module.exports.removeOperationDefinition = function removeOperationDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/organization/mutation.js b/src/resources/4_0_0/profiles/organization/mutation.js new file mode 100644 index 00000000..8c814030 --- /dev/null +++ b/src/resources/4_0_0/profiles/organization/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const OrganizationSchema = require('../../schemas/organization.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const OrganizationInput = require('../../inputs/organization.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createOrganization, + updateOrganization, + removeOrganization, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Organization', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Organization record.', + }, + resource: { + type: new GraphQLNonNull(OrganizationInput), + description: 'Organization Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Organization record for deletion.', + }, +}; + +/** + * @name exports.OrganizationCreateMutation + * @summary OrganizationCreate mutation. + */ +module.exports.OrganizationCreateMutation = { + description: 'Create a Organization record', + resolve: scopeInvariant(scopeOptions, createOrganization), + type: OrganizationSchema, + args: WriteArgs, +}; + +/** + * @name exports.OrganizationUpdateMutation + * @summary OrganizationUpdate mutation. + */ +module.exports.OrganizationUpdateMutation = { + description: 'Update a Organization record', + resolve: scopeInvariant(scopeOptions, updateOrganization), + type: OrganizationSchema, + args: WriteArgs, +}; + +/** + * @name exports.OrganizationRemoveMutation + * @summary OrganizationRemove mutation. + */ +module.exports.OrganizationRemoveMutation = { + description: 'Remove a Organization record', + resolve: scopeInvariant(scopeOptions, removeOrganization), + type: OrganizationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/organization/query.js b/src/resources/4_0_0/profiles/organization/query.js new file mode 100644 index 00000000..4ae4aa63 --- /dev/null +++ b/src/resources/4_0_0/profiles/organization/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OrganizationSchema = require('../../schemas/organization.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const OrganizationArgs = require('../../parameters/organization.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + OrganizationArgs, +); + +// Resolvers +const { + getOrganization, + getOrganizationList, + getOrganizationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Organization', + action: 'read', +}; + +/** + * @name exports.OrganizationQuery + * @summary Organization query. + */ +module.exports.OrganizationQuery = { + description: 'Query for a single Organization', + resolve: scopeInvariant(scopeOptions, getOrganization), + type: OrganizationSchema, + args: args, +}; + +/** + * @name exports.OrganizationListQuery + * @summary Organization query. + */ +module.exports.OrganizationListQuery = { + description: 'Query for a more than or just one Organization', + resolve: scopeInvariant(scopeOptions, getOrganizationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.OrganizationInstanceQuery + * @summary Organization query. + */ +module.exports.OrganizationInstanceQuery = { + description: 'Access information about a single Organization', + resolve: scopeInvariant(scopeOptions, getOrganizationInstance), + type: OrganizationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/organization/register.js b/src/resources/4_0_0/profiles/organization/register.js new file mode 100644 index 00000000..848d9378 --- /dev/null +++ b/src/resources/4_0_0/profiles/organization/register.js @@ -0,0 +1,48 @@ +const { + OrganizationCreateMutation, + OrganizationUpdateMutation, + OrganizationRemoveMutation, +} = require('./mutation'); + +const { + OrganizationQuery, + OrganizationListQuery, + OrganizationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Organization: OrganizationQuery, + OrganizationList: OrganizationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + OrganizationCreate: OrganizationCreateMutation, + OrganizationUpdate: OrganizationUpdateMutation, + OrganizationRemove: OrganizationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Organization', + path: '/4_0_0/Organization/:id', + query: OrganizationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/organization/resolver.js b/src/resources/4_0_0/profiles/organization/resolver.js new file mode 100644 index 00000000..4cba8d20 --- /dev/null +++ b/src/resources/4_0_0/profiles/organization/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getOrganization + * @static + * @summary Organization resolver. + */ +module.exports.getOrganization = function getOrganization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getOrganizationList + * @static + * @summary Organization list resolver. + */ +module.exports.getOrganizationList = function getOrganizationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getOrganizationInstance + * @static + * @summary Organization instance resolver. + */ +module.exports.getOrganizationInstance = function getOrganizationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createOrganization + * @static + * @summary Create Organization resolver. + */ +module.exports.createOrganization = function createOrganization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateOrganization + * @static + * @summary Update Organization resolver. + */ +module.exports.updateOrganization = function updateOrganization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeOrganization + * @static + * @summary Remove Organization resolver. + */ +module.exports.removeOrganization = function removeOrganization( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/organizationaffiliation/mutation.js b/src/resources/4_0_0/profiles/organizationaffiliation/mutation.js new file mode 100644 index 00000000..b019686c --- /dev/null +++ b/src/resources/4_0_0/profiles/organizationaffiliation/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const OrganizationAffiliationSchema = require('../../schemas/organizationaffiliation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const OrganizationAffiliationInput = require('../../inputs/organizationaffiliation.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createOrganizationAffiliation, + updateOrganizationAffiliation, + removeOrganizationAffiliation, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'OrganizationAffiliation', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a OrganizationAffiliation record.', + }, + resource: { + type: new GraphQLNonNull(OrganizationAffiliationInput), + description: 'OrganizationAffiliation Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a OrganizationAffiliation record for deletion.', + }, +}; + +/** + * @name exports.OrganizationAffiliationCreateMutation + * @summary OrganizationAffiliationCreate mutation. + */ +module.exports.OrganizationAffiliationCreateMutation = { + description: 'Create a OrganizationAffiliation record', + resolve: scopeInvariant(scopeOptions, createOrganizationAffiliation), + type: OrganizationAffiliationSchema, + args: WriteArgs, +}; + +/** + * @name exports.OrganizationAffiliationUpdateMutation + * @summary OrganizationAffiliationUpdate mutation. + */ +module.exports.OrganizationAffiliationUpdateMutation = { + description: 'Update a OrganizationAffiliation record', + resolve: scopeInvariant(scopeOptions, updateOrganizationAffiliation), + type: OrganizationAffiliationSchema, + args: WriteArgs, +}; + +/** + * @name exports.OrganizationAffiliationRemoveMutation + * @summary OrganizationAffiliationRemove mutation. + */ +module.exports.OrganizationAffiliationRemoveMutation = { + description: 'Remove a OrganizationAffiliation record', + resolve: scopeInvariant(scopeOptions, removeOrganizationAffiliation), + type: OrganizationAffiliationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/organizationaffiliation/query.js b/src/resources/4_0_0/profiles/organizationaffiliation/query.js new file mode 100644 index 00000000..48c5331e --- /dev/null +++ b/src/resources/4_0_0/profiles/organizationaffiliation/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const OrganizationAffiliationSchema = require('../../schemas/organizationaffiliation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const OrganizationAffiliationArgs = require('../../parameters/organizationaffiliation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + OrganizationAffiliationArgs, +); + +// Resolvers +const { + getOrganizationAffiliation, + getOrganizationAffiliationList, + getOrganizationAffiliationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'OrganizationAffiliation', + action: 'read', +}; + +/** + * @name exports.OrganizationAffiliationQuery + * @summary OrganizationAffiliation query. + */ +module.exports.OrganizationAffiliationQuery = { + description: 'Query for a single OrganizationAffiliation', + resolve: scopeInvariant(scopeOptions, getOrganizationAffiliation), + type: OrganizationAffiliationSchema, + args: args, +}; + +/** + * @name exports.OrganizationAffiliationListQuery + * @summary OrganizationAffiliation query. + */ +module.exports.OrganizationAffiliationListQuery = { + description: 'Query for a more than or just one OrganizationAffiliation', + resolve: scopeInvariant(scopeOptions, getOrganizationAffiliationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.OrganizationAffiliationInstanceQuery + * @summary OrganizationAffiliation query. + */ +module.exports.OrganizationAffiliationInstanceQuery = { + description: 'Access information about a single OrganizationAffiliation', + resolve: scopeInvariant(scopeOptions, getOrganizationAffiliationInstance), + type: OrganizationAffiliationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/organizationaffiliation/register.js b/src/resources/4_0_0/profiles/organizationaffiliation/register.js new file mode 100644 index 00000000..ce7a22c0 --- /dev/null +++ b/src/resources/4_0_0/profiles/organizationaffiliation/register.js @@ -0,0 +1,48 @@ +const { + OrganizationAffiliationCreateMutation, + OrganizationAffiliationUpdateMutation, + OrganizationAffiliationRemoveMutation, +} = require('./mutation'); + +const { + OrganizationAffiliationQuery, + OrganizationAffiliationListQuery, + OrganizationAffiliationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + OrganizationAffiliation: OrganizationAffiliationQuery, + OrganizationAffiliationList: OrganizationAffiliationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + OrganizationAffiliationCreate: OrganizationAffiliationCreateMutation, + OrganizationAffiliationUpdate: OrganizationAffiliationUpdateMutation, + OrganizationAffiliationRemove: OrganizationAffiliationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'OrganizationAffiliation', + path: '/4_0_0/OrganizationAffiliation/:id', + query: OrganizationAffiliationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/organizationaffiliation/resolver.js b/src/resources/4_0_0/profiles/organizationaffiliation/resolver.js new file mode 100644 index 00000000..eb71c55e --- /dev/null +++ b/src/resources/4_0_0/profiles/organizationaffiliation/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getOrganizationAffiliation + * @static + * @summary OrganizationAffiliation resolver. + */ +module.exports.getOrganizationAffiliation = function getOrganizationAffiliation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getOrganizationAffiliationList + * @static + * @summary OrganizationAffiliation list resolver. + */ +module.exports.getOrganizationAffiliationList = function getOrganizationAffiliationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getOrganizationAffiliationInstance + * @static + * @summary OrganizationAffiliation instance resolver. + */ +module.exports.getOrganizationAffiliationInstance = function getOrganizationAffiliationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createOrganizationAffiliation + * @static + * @summary Create OrganizationAffiliation resolver. + */ +module.exports.createOrganizationAffiliation = function createOrganizationAffiliation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateOrganizationAffiliation + * @static + * @summary Update OrganizationAffiliation resolver. + */ +module.exports.updateOrganizationAffiliation = function updateOrganizationAffiliation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeOrganizationAffiliation + * @static + * @summary Remove OrganizationAffiliation resolver. + */ +module.exports.removeOrganizationAffiliation = function removeOrganizationAffiliation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/patient/mutation.js b/src/resources/4_0_0/profiles/patient/mutation.js new file mode 100644 index 00000000..7fb77ec6 --- /dev/null +++ b/src/resources/4_0_0/profiles/patient/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const PatientSchema = require('../../schemas/patient.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const PatientInput = require('../../inputs/patient.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createPatient, updatePatient, removePatient } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Patient', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Patient record.', + }, + resource: { + type: new GraphQLNonNull(PatientInput), + description: 'Patient Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Patient record for deletion.', + }, +}; + +/** + * @name exports.PatientCreateMutation + * @summary PatientCreate mutation. + */ +module.exports.PatientCreateMutation = { + description: 'Create a Patient record', + resolve: scopeInvariant(scopeOptions, createPatient), + type: PatientSchema, + args: WriteArgs, +}; + +/** + * @name exports.PatientUpdateMutation + * @summary PatientUpdate mutation. + */ +module.exports.PatientUpdateMutation = { + description: 'Update a Patient record', + resolve: scopeInvariant(scopeOptions, updatePatient), + type: PatientSchema, + args: WriteArgs, +}; + +/** + * @name exports.PatientRemoveMutation + * @summary PatientRemove mutation. + */ +module.exports.PatientRemoveMutation = { + description: 'Remove a Patient record', + resolve: scopeInvariant(scopeOptions, removePatient), + type: PatientSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/patient/query.js b/src/resources/4_0_0/profiles/patient/query.js new file mode 100644 index 00000000..16031145 --- /dev/null +++ b/src/resources/4_0_0/profiles/patient/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PatientSchema = require('../../schemas/patient.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const PatientArgs = require('../../parameters/patient.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, PatientArgs); + +// Resolvers +const { + getPatient, + getPatientList, + getPatientInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Patient', + action: 'read', +}; + +/** + * @name exports.PatientQuery + * @summary Patient query. + */ +module.exports.PatientQuery = { + description: 'Query for a single Patient', + resolve: scopeInvariant(scopeOptions, getPatient), + type: PatientSchema, + args: args, +}; + +/** + * @name exports.PatientListQuery + * @summary Patient query. + */ +module.exports.PatientListQuery = { + description: 'Query for a more than or just one Patient', + resolve: scopeInvariant(scopeOptions, getPatientList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.PatientInstanceQuery + * @summary Patient query. + */ +module.exports.PatientInstanceQuery = { + description: 'Access information about a single Patient', + resolve: scopeInvariant(scopeOptions, getPatientInstance), + type: PatientSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/patient/register.js b/src/resources/4_0_0/profiles/patient/register.js new file mode 100644 index 00000000..0542d7bb --- /dev/null +++ b/src/resources/4_0_0/profiles/patient/register.js @@ -0,0 +1,48 @@ +const { + PatientCreateMutation, + PatientUpdateMutation, + PatientRemoveMutation, +} = require('./mutation'); + +const { + PatientQuery, + PatientListQuery, + PatientInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Patient: PatientQuery, + PatientList: PatientListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + PatientCreate: PatientCreateMutation, + PatientUpdate: PatientUpdateMutation, + PatientRemove: PatientRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Patient', + path: '/4_0_0/Patient/:id', + query: PatientInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/patient/resolver.js b/src/resources/4_0_0/profiles/patient/resolver.js new file mode 100644 index 00000000..c717b007 --- /dev/null +++ b/src/resources/4_0_0/profiles/patient/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getPatient + * @static + * @summary Patient resolver. + */ +module.exports.getPatient = function getPatient( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPatientList + * @static + * @summary Patient list resolver. + */ +module.exports.getPatientList = function getPatientList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPatientInstance + * @static + * @summary Patient instance resolver. + */ +module.exports.getPatientInstance = function getPatientInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createPatient + * @static + * @summary Create Patient resolver. + */ +module.exports.createPatient = function createPatient( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updatePatient + * @static + * @summary Update Patient resolver. + */ +module.exports.updatePatient = function updatePatient( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removePatient + * @static + * @summary Remove Patient resolver. + */ +module.exports.removePatient = function removePatient( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/paymentnotice/mutation.js b/src/resources/4_0_0/profiles/paymentnotice/mutation.js new file mode 100644 index 00000000..38435974 --- /dev/null +++ b/src/resources/4_0_0/profiles/paymentnotice/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const PaymentNoticeInput = require('../../inputs/paymentnotice.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createPaymentNotice, + updatePaymentNotice, + removePaymentNotice, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'PaymentNotice', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a PaymentNotice record.', + }, + resource: { + type: new GraphQLNonNull(PaymentNoticeInput), + description: 'PaymentNotice Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a PaymentNotice record for deletion.', + }, +}; + +/** + * @name exports.PaymentNoticeCreateMutation + * @summary PaymentNoticeCreate mutation. + */ +module.exports.PaymentNoticeCreateMutation = { + description: 'Create a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, createPaymentNotice), + type: PaymentNoticeSchema, + args: WriteArgs, +}; + +/** + * @name exports.PaymentNoticeUpdateMutation + * @summary PaymentNoticeUpdate mutation. + */ +module.exports.PaymentNoticeUpdateMutation = { + description: 'Update a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, updatePaymentNotice), + type: PaymentNoticeSchema, + args: WriteArgs, +}; + +/** + * @name exports.PaymentNoticeRemoveMutation + * @summary PaymentNoticeRemove mutation. + */ +module.exports.PaymentNoticeRemoveMutation = { + description: 'Remove a PaymentNotice record', + resolve: scopeInvariant(scopeOptions, removePaymentNotice), + type: PaymentNoticeSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/paymentnotice/query.js b/src/resources/4_0_0/profiles/paymentnotice/query.js new file mode 100644 index 00000000..a5cd0ddd --- /dev/null +++ b/src/resources/4_0_0/profiles/paymentnotice/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PaymentNoticeSchema = require('../../schemas/paymentnotice.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const PaymentNoticeArgs = require('../../parameters/paymentnotice.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PaymentNoticeArgs, +); + +// Resolvers +const { + getPaymentNotice, + getPaymentNoticeList, + getPaymentNoticeInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'PaymentNotice', + action: 'read', +}; + +/** + * @name exports.PaymentNoticeQuery + * @summary PaymentNotice query. + */ +module.exports.PaymentNoticeQuery = { + description: 'Query for a single PaymentNotice', + resolve: scopeInvariant(scopeOptions, getPaymentNotice), + type: PaymentNoticeSchema, + args: args, +}; + +/** + * @name exports.PaymentNoticeListQuery + * @summary PaymentNotice query. + */ +module.exports.PaymentNoticeListQuery = { + description: 'Query for a more than or just one PaymentNotice', + resolve: scopeInvariant(scopeOptions, getPaymentNoticeList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.PaymentNoticeInstanceQuery + * @summary PaymentNotice query. + */ +module.exports.PaymentNoticeInstanceQuery = { + description: 'Access information about a single PaymentNotice', + resolve: scopeInvariant(scopeOptions, getPaymentNoticeInstance), + type: PaymentNoticeSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/paymentnotice/register.js b/src/resources/4_0_0/profiles/paymentnotice/register.js new file mode 100644 index 00000000..8e166277 --- /dev/null +++ b/src/resources/4_0_0/profiles/paymentnotice/register.js @@ -0,0 +1,48 @@ +const { + PaymentNoticeCreateMutation, + PaymentNoticeUpdateMutation, + PaymentNoticeRemoveMutation, +} = require('./mutation'); + +const { + PaymentNoticeQuery, + PaymentNoticeListQuery, + PaymentNoticeInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + PaymentNotice: PaymentNoticeQuery, + PaymentNoticeList: PaymentNoticeListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + PaymentNoticeCreate: PaymentNoticeCreateMutation, + PaymentNoticeUpdate: PaymentNoticeUpdateMutation, + PaymentNoticeRemove: PaymentNoticeRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'PaymentNotice', + path: '/4_0_0/PaymentNotice/:id', + query: PaymentNoticeInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/paymentnotice/resolver.js b/src/resources/4_0_0/profiles/paymentnotice/resolver.js new file mode 100644 index 00000000..4522c307 --- /dev/null +++ b/src/resources/4_0_0/profiles/paymentnotice/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getPaymentNotice + * @static + * @summary PaymentNotice resolver. + */ +module.exports.getPaymentNotice = function getPaymentNotice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPaymentNoticeList + * @static + * @summary PaymentNotice list resolver. + */ +module.exports.getPaymentNoticeList = function getPaymentNoticeList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPaymentNoticeInstance + * @static + * @summary PaymentNotice instance resolver. + */ +module.exports.getPaymentNoticeInstance = function getPaymentNoticeInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createPaymentNotice + * @static + * @summary Create PaymentNotice resolver. + */ +module.exports.createPaymentNotice = function createPaymentNotice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updatePaymentNotice + * @static + * @summary Update PaymentNotice resolver. + */ +module.exports.updatePaymentNotice = function updatePaymentNotice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removePaymentNotice + * @static + * @summary Remove PaymentNotice resolver. + */ +module.exports.removePaymentNotice = function removePaymentNotice( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/paymentreconciliation/mutation.js b/src/resources/4_0_0/profiles/paymentreconciliation/mutation.js new file mode 100644 index 00000000..be1e601c --- /dev/null +++ b/src/resources/4_0_0/profiles/paymentreconciliation/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const PaymentReconciliationInput = require('../../inputs/paymentreconciliation.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createPaymentReconciliation, + updatePaymentReconciliation, + removePaymentReconciliation, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'PaymentReconciliation', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a PaymentReconciliation record.', + }, + resource: { + type: new GraphQLNonNull(PaymentReconciliationInput), + description: 'PaymentReconciliation Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a PaymentReconciliation record for deletion.', + }, +}; + +/** + * @name exports.PaymentReconciliationCreateMutation + * @summary PaymentReconciliationCreate mutation. + */ +module.exports.PaymentReconciliationCreateMutation = { + description: 'Create a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, createPaymentReconciliation), + type: PaymentReconciliationSchema, + args: WriteArgs, +}; + +/** + * @name exports.PaymentReconciliationUpdateMutation + * @summary PaymentReconciliationUpdate mutation. + */ +module.exports.PaymentReconciliationUpdateMutation = { + description: 'Update a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, updatePaymentReconciliation), + type: PaymentReconciliationSchema, + args: WriteArgs, +}; + +/** + * @name exports.PaymentReconciliationRemoveMutation + * @summary PaymentReconciliationRemove mutation. + */ +module.exports.PaymentReconciliationRemoveMutation = { + description: 'Remove a PaymentReconciliation record', + resolve: scopeInvariant(scopeOptions, removePaymentReconciliation), + type: PaymentReconciliationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/paymentreconciliation/query.js b/src/resources/4_0_0/profiles/paymentreconciliation/query.js new file mode 100644 index 00000000..11849c62 --- /dev/null +++ b/src/resources/4_0_0/profiles/paymentreconciliation/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PaymentReconciliationSchema = require('../../schemas/paymentreconciliation.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const PaymentReconciliationArgs = require('../../parameters/paymentreconciliation.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PaymentReconciliationArgs, +); + +// Resolvers +const { + getPaymentReconciliation, + getPaymentReconciliationList, + getPaymentReconciliationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'PaymentReconciliation', + action: 'read', +}; + +/** + * @name exports.PaymentReconciliationQuery + * @summary PaymentReconciliation query. + */ +module.exports.PaymentReconciliationQuery = { + description: 'Query for a single PaymentReconciliation', + resolve: scopeInvariant(scopeOptions, getPaymentReconciliation), + type: PaymentReconciliationSchema, + args: args, +}; + +/** + * @name exports.PaymentReconciliationListQuery + * @summary PaymentReconciliation query. + */ +module.exports.PaymentReconciliationListQuery = { + description: 'Query for a more than or just one PaymentReconciliation', + resolve: scopeInvariant(scopeOptions, getPaymentReconciliationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.PaymentReconciliationInstanceQuery + * @summary PaymentReconciliation query. + */ +module.exports.PaymentReconciliationInstanceQuery = { + description: 'Access information about a single PaymentReconciliation', + resolve: scopeInvariant(scopeOptions, getPaymentReconciliationInstance), + type: PaymentReconciliationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/paymentreconciliation/register.js b/src/resources/4_0_0/profiles/paymentreconciliation/register.js new file mode 100644 index 00000000..9a5c46e1 --- /dev/null +++ b/src/resources/4_0_0/profiles/paymentreconciliation/register.js @@ -0,0 +1,48 @@ +const { + PaymentReconciliationCreateMutation, + PaymentReconciliationUpdateMutation, + PaymentReconciliationRemoveMutation, +} = require('./mutation'); + +const { + PaymentReconciliationQuery, + PaymentReconciliationListQuery, + PaymentReconciliationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + PaymentReconciliation: PaymentReconciliationQuery, + PaymentReconciliationList: PaymentReconciliationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + PaymentReconciliationCreate: PaymentReconciliationCreateMutation, + PaymentReconciliationUpdate: PaymentReconciliationUpdateMutation, + PaymentReconciliationRemove: PaymentReconciliationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'PaymentReconciliation', + path: '/4_0_0/PaymentReconciliation/:id', + query: PaymentReconciliationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/paymentreconciliation/resolver.js b/src/resources/4_0_0/profiles/paymentreconciliation/resolver.js new file mode 100644 index 00000000..8b6e5bb1 --- /dev/null +++ b/src/resources/4_0_0/profiles/paymentreconciliation/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getPaymentReconciliation + * @static + * @summary PaymentReconciliation resolver. + */ +module.exports.getPaymentReconciliation = function getPaymentReconciliation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPaymentReconciliationList + * @static + * @summary PaymentReconciliation list resolver. + */ +module.exports.getPaymentReconciliationList = function getPaymentReconciliationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPaymentReconciliationInstance + * @static + * @summary PaymentReconciliation instance resolver. + */ +module.exports.getPaymentReconciliationInstance = function getPaymentReconciliationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createPaymentReconciliation + * @static + * @summary Create PaymentReconciliation resolver. + */ +module.exports.createPaymentReconciliation = function createPaymentReconciliation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updatePaymentReconciliation + * @static + * @summary Update PaymentReconciliation resolver. + */ +module.exports.updatePaymentReconciliation = function updatePaymentReconciliation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removePaymentReconciliation + * @static + * @summary Remove PaymentReconciliation resolver. + */ +module.exports.removePaymentReconciliation = function removePaymentReconciliation( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/person/mutation.js b/src/resources/4_0_0/profiles/person/mutation.js new file mode 100644 index 00000000..0f6cedbd --- /dev/null +++ b/src/resources/4_0_0/profiles/person/mutation.js @@ -0,0 +1,76 @@ +// Schemas +const PersonSchema = require('../../schemas/person.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const PersonInput = require('../../inputs/person.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createPerson, updatePerson, removePerson } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Person', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Person record.', + }, + resource: { + type: new GraphQLNonNull(PersonInput), + description: 'Person Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Person record for deletion.', + }, +}; + +/** + * @name exports.PersonCreateMutation + * @summary PersonCreate mutation. + */ +module.exports.PersonCreateMutation = { + description: 'Create a Person record', + resolve: scopeInvariant(scopeOptions, createPerson), + type: PersonSchema, + args: WriteArgs, +}; + +/** + * @name exports.PersonUpdateMutation + * @summary PersonUpdate mutation. + */ +module.exports.PersonUpdateMutation = { + description: 'Update a Person record', + resolve: scopeInvariant(scopeOptions, updatePerson), + type: PersonSchema, + args: WriteArgs, +}; + +/** + * @name exports.PersonRemoveMutation + * @summary PersonRemove mutation. + */ +module.exports.PersonRemoveMutation = { + description: 'Remove a Person record', + resolve: scopeInvariant(scopeOptions, removePerson), + type: PersonSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/person/query.js b/src/resources/4_0_0/profiles/person/query.js new file mode 100644 index 00000000..310b2990 --- /dev/null +++ b/src/resources/4_0_0/profiles/person/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PersonSchema = require('../../schemas/person.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const PersonArgs = require('../../parameters/person.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, PersonArgs); + +// Resolvers +const { getPerson, getPersonList, getPersonInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Person', + action: 'read', +}; + +/** + * @name exports.PersonQuery + * @summary Person query. + */ +module.exports.PersonQuery = { + description: 'Query for a single Person', + resolve: scopeInvariant(scopeOptions, getPerson), + type: PersonSchema, + args: args, +}; + +/** + * @name exports.PersonListQuery + * @summary Person query. + */ +module.exports.PersonListQuery = { + description: 'Query for a more than or just one Person', + resolve: scopeInvariant(scopeOptions, getPersonList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.PersonInstanceQuery + * @summary Person query. + */ +module.exports.PersonInstanceQuery = { + description: 'Access information about a single Person', + resolve: scopeInvariant(scopeOptions, getPersonInstance), + type: PersonSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/person/register.js b/src/resources/4_0_0/profiles/person/register.js new file mode 100644 index 00000000..acef4190 --- /dev/null +++ b/src/resources/4_0_0/profiles/person/register.js @@ -0,0 +1,48 @@ +const { + PersonCreateMutation, + PersonUpdateMutation, + PersonRemoveMutation, +} = require('./mutation'); + +const { + PersonQuery, + PersonListQuery, + PersonInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Person: PersonQuery, + PersonList: PersonListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + PersonCreate: PersonCreateMutation, + PersonUpdate: PersonUpdateMutation, + PersonRemove: PersonRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Person', + path: '/4_0_0/Person/:id', + query: PersonInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/person/resolver.js b/src/resources/4_0_0/profiles/person/resolver.js new file mode 100644 index 00000000..bfba2b56 --- /dev/null +++ b/src/resources/4_0_0/profiles/person/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getPerson + * @static + * @summary Person resolver. + */ +module.exports.getPerson = function getPerson(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPersonList + * @static + * @summary Person list resolver. + */ +module.exports.getPersonList = function getPersonList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPersonInstance + * @static + * @summary Person instance resolver. + */ +module.exports.getPersonInstance = function getPersonInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createPerson + * @static + * @summary Create Person resolver. + */ +module.exports.createPerson = function createPerson( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updatePerson + * @static + * @summary Update Person resolver. + */ +module.exports.updatePerson = function updatePerson( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removePerson + * @static + * @summary Remove Person resolver. + */ +module.exports.removePerson = function removePerson( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/plandefinition/mutation.js b/src/resources/4_0_0/profiles/plandefinition/mutation.js new file mode 100644 index 00000000..0370a91a --- /dev/null +++ b/src/resources/4_0_0/profiles/plandefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const PlanDefinitionSchema = require('../../schemas/plandefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const PlanDefinitionInput = require('../../inputs/plandefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createPlanDefinition, + updatePlanDefinition, + removePlanDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'PlanDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a PlanDefinition record.', + }, + resource: { + type: new GraphQLNonNull(PlanDefinitionInput), + description: 'PlanDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a PlanDefinition record for deletion.', + }, +}; + +/** + * @name exports.PlanDefinitionCreateMutation + * @summary PlanDefinitionCreate mutation. + */ +module.exports.PlanDefinitionCreateMutation = { + description: 'Create a PlanDefinition record', + resolve: scopeInvariant(scopeOptions, createPlanDefinition), + type: PlanDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.PlanDefinitionUpdateMutation + * @summary PlanDefinitionUpdate mutation. + */ +module.exports.PlanDefinitionUpdateMutation = { + description: 'Update a PlanDefinition record', + resolve: scopeInvariant(scopeOptions, updatePlanDefinition), + type: PlanDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.PlanDefinitionRemoveMutation + * @summary PlanDefinitionRemove mutation. + */ +module.exports.PlanDefinitionRemoveMutation = { + description: 'Remove a PlanDefinition record', + resolve: scopeInvariant(scopeOptions, removePlanDefinition), + type: PlanDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/plandefinition/query.js b/src/resources/4_0_0/profiles/plandefinition/query.js new file mode 100644 index 00000000..cca42b5e --- /dev/null +++ b/src/resources/4_0_0/profiles/plandefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PlanDefinitionSchema = require('../../schemas/plandefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const PlanDefinitionArgs = require('../../parameters/plandefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PlanDefinitionArgs, +); + +// Resolvers +const { + getPlanDefinition, + getPlanDefinitionList, + getPlanDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'PlanDefinition', + action: 'read', +}; + +/** + * @name exports.PlanDefinitionQuery + * @summary PlanDefinition query. + */ +module.exports.PlanDefinitionQuery = { + description: 'Query for a single PlanDefinition', + resolve: scopeInvariant(scopeOptions, getPlanDefinition), + type: PlanDefinitionSchema, + args: args, +}; + +/** + * @name exports.PlanDefinitionListQuery + * @summary PlanDefinition query. + */ +module.exports.PlanDefinitionListQuery = { + description: 'Query for a more than or just one PlanDefinition', + resolve: scopeInvariant(scopeOptions, getPlanDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.PlanDefinitionInstanceQuery + * @summary PlanDefinition query. + */ +module.exports.PlanDefinitionInstanceQuery = { + description: 'Access information about a single PlanDefinition', + resolve: scopeInvariant(scopeOptions, getPlanDefinitionInstance), + type: PlanDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/plandefinition/register.js b/src/resources/4_0_0/profiles/plandefinition/register.js new file mode 100644 index 00000000..3fe5ef01 --- /dev/null +++ b/src/resources/4_0_0/profiles/plandefinition/register.js @@ -0,0 +1,48 @@ +const { + PlanDefinitionCreateMutation, + PlanDefinitionUpdateMutation, + PlanDefinitionRemoveMutation, +} = require('./mutation'); + +const { + PlanDefinitionQuery, + PlanDefinitionListQuery, + PlanDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + PlanDefinition: PlanDefinitionQuery, + PlanDefinitionList: PlanDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + PlanDefinitionCreate: PlanDefinitionCreateMutation, + PlanDefinitionUpdate: PlanDefinitionUpdateMutation, + PlanDefinitionRemove: PlanDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'PlanDefinition', + path: '/4_0_0/PlanDefinition/:id', + query: PlanDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/plandefinition/resolver.js b/src/resources/4_0_0/profiles/plandefinition/resolver.js new file mode 100644 index 00000000..50c6ace3 --- /dev/null +++ b/src/resources/4_0_0/profiles/plandefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getPlanDefinition + * @static + * @summary PlanDefinition resolver. + */ +module.exports.getPlanDefinition = function getPlanDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPlanDefinitionList + * @static + * @summary PlanDefinition list resolver. + */ +module.exports.getPlanDefinitionList = function getPlanDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPlanDefinitionInstance + * @static + * @summary PlanDefinition instance resolver. + */ +module.exports.getPlanDefinitionInstance = function getPlanDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createPlanDefinition + * @static + * @summary Create PlanDefinition resolver. + */ +module.exports.createPlanDefinition = function createPlanDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updatePlanDefinition + * @static + * @summary Update PlanDefinition resolver. + */ +module.exports.updatePlanDefinition = function updatePlanDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removePlanDefinition + * @static + * @summary Remove PlanDefinition resolver. + */ +module.exports.removePlanDefinition = function removePlanDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/practitioner/mutation.js b/src/resources/4_0_0/profiles/practitioner/mutation.js new file mode 100644 index 00000000..8f7a0280 --- /dev/null +++ b/src/resources/4_0_0/profiles/practitioner/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const PractitionerSchema = require('../../schemas/practitioner.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const PractitionerInput = require('../../inputs/practitioner.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createPractitioner, + updatePractitioner, + removePractitioner, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Practitioner', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Practitioner record.', + }, + resource: { + type: new GraphQLNonNull(PractitionerInput), + description: 'Practitioner Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Practitioner record for deletion.', + }, +}; + +/** + * @name exports.PractitionerCreateMutation + * @summary PractitionerCreate mutation. + */ +module.exports.PractitionerCreateMutation = { + description: 'Create a Practitioner record', + resolve: scopeInvariant(scopeOptions, createPractitioner), + type: PractitionerSchema, + args: WriteArgs, +}; + +/** + * @name exports.PractitionerUpdateMutation + * @summary PractitionerUpdate mutation. + */ +module.exports.PractitionerUpdateMutation = { + description: 'Update a Practitioner record', + resolve: scopeInvariant(scopeOptions, updatePractitioner), + type: PractitionerSchema, + args: WriteArgs, +}; + +/** + * @name exports.PractitionerRemoveMutation + * @summary PractitionerRemove mutation. + */ +module.exports.PractitionerRemoveMutation = { + description: 'Remove a Practitioner record', + resolve: scopeInvariant(scopeOptions, removePractitioner), + type: PractitionerSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/practitioner/query.js b/src/resources/4_0_0/profiles/practitioner/query.js new file mode 100644 index 00000000..fec7038a --- /dev/null +++ b/src/resources/4_0_0/profiles/practitioner/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PractitionerSchema = require('../../schemas/practitioner.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const PractitionerArgs = require('../../parameters/practitioner.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PractitionerArgs, +); + +// Resolvers +const { + getPractitioner, + getPractitionerList, + getPractitionerInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Practitioner', + action: 'read', +}; + +/** + * @name exports.PractitionerQuery + * @summary Practitioner query. + */ +module.exports.PractitionerQuery = { + description: 'Query for a single Practitioner', + resolve: scopeInvariant(scopeOptions, getPractitioner), + type: PractitionerSchema, + args: args, +}; + +/** + * @name exports.PractitionerListQuery + * @summary Practitioner query. + */ +module.exports.PractitionerListQuery = { + description: 'Query for a more than or just one Practitioner', + resolve: scopeInvariant(scopeOptions, getPractitionerList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.PractitionerInstanceQuery + * @summary Practitioner query. + */ +module.exports.PractitionerInstanceQuery = { + description: 'Access information about a single Practitioner', + resolve: scopeInvariant(scopeOptions, getPractitionerInstance), + type: PractitionerSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/practitioner/register.js b/src/resources/4_0_0/profiles/practitioner/register.js new file mode 100644 index 00000000..89bd1b11 --- /dev/null +++ b/src/resources/4_0_0/profiles/practitioner/register.js @@ -0,0 +1,48 @@ +const { + PractitionerCreateMutation, + PractitionerUpdateMutation, + PractitionerRemoveMutation, +} = require('./mutation'); + +const { + PractitionerQuery, + PractitionerListQuery, + PractitionerInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Practitioner: PractitionerQuery, + PractitionerList: PractitionerListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + PractitionerCreate: PractitionerCreateMutation, + PractitionerUpdate: PractitionerUpdateMutation, + PractitionerRemove: PractitionerRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Practitioner', + path: '/4_0_0/Practitioner/:id', + query: PractitionerInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/practitioner/resolver.js b/src/resources/4_0_0/profiles/practitioner/resolver.js new file mode 100644 index 00000000..1f36b115 --- /dev/null +++ b/src/resources/4_0_0/profiles/practitioner/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getPractitioner + * @static + * @summary Practitioner resolver. + */ +module.exports.getPractitioner = function getPractitioner( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPractitionerList + * @static + * @summary Practitioner list resolver. + */ +module.exports.getPractitionerList = function getPractitionerList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPractitionerInstance + * @static + * @summary Practitioner instance resolver. + */ +module.exports.getPractitionerInstance = function getPractitionerInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createPractitioner + * @static + * @summary Create Practitioner resolver. + */ +module.exports.createPractitioner = function createPractitioner( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updatePractitioner + * @static + * @summary Update Practitioner resolver. + */ +module.exports.updatePractitioner = function updatePractitioner( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removePractitioner + * @static + * @summary Remove Practitioner resolver. + */ +module.exports.removePractitioner = function removePractitioner( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/practitionerrole/mutation.js b/src/resources/4_0_0/profiles/practitionerrole/mutation.js new file mode 100644 index 00000000..89f7be2c --- /dev/null +++ b/src/resources/4_0_0/profiles/practitionerrole/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const PractitionerRoleSchema = require('../../schemas/practitionerrole.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const PractitionerRoleInput = require('../../inputs/practitionerrole.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createPractitionerRole, + updatePractitionerRole, + removePractitionerRole, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'PractitionerRole', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a PractitionerRole record.', + }, + resource: { + type: new GraphQLNonNull(PractitionerRoleInput), + description: 'PractitionerRole Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a PractitionerRole record for deletion.', + }, +}; + +/** + * @name exports.PractitionerRoleCreateMutation + * @summary PractitionerRoleCreate mutation. + */ +module.exports.PractitionerRoleCreateMutation = { + description: 'Create a PractitionerRole record', + resolve: scopeInvariant(scopeOptions, createPractitionerRole), + type: PractitionerRoleSchema, + args: WriteArgs, +}; + +/** + * @name exports.PractitionerRoleUpdateMutation + * @summary PractitionerRoleUpdate mutation. + */ +module.exports.PractitionerRoleUpdateMutation = { + description: 'Update a PractitionerRole record', + resolve: scopeInvariant(scopeOptions, updatePractitionerRole), + type: PractitionerRoleSchema, + args: WriteArgs, +}; + +/** + * @name exports.PractitionerRoleRemoveMutation + * @summary PractitionerRoleRemove mutation. + */ +module.exports.PractitionerRoleRemoveMutation = { + description: 'Remove a PractitionerRole record', + resolve: scopeInvariant(scopeOptions, removePractitionerRole), + type: PractitionerRoleSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/practitionerrole/query.js b/src/resources/4_0_0/profiles/practitionerrole/query.js new file mode 100644 index 00000000..457e4441 --- /dev/null +++ b/src/resources/4_0_0/profiles/practitionerrole/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const PractitionerRoleSchema = require('../../schemas/practitionerrole.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const PractitionerRoleArgs = require('../../parameters/practitionerrole.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + PractitionerRoleArgs, +); + +// Resolvers +const { + getPractitionerRole, + getPractitionerRoleList, + getPractitionerRoleInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'PractitionerRole', + action: 'read', +}; + +/** + * @name exports.PractitionerRoleQuery + * @summary PractitionerRole query. + */ +module.exports.PractitionerRoleQuery = { + description: 'Query for a single PractitionerRole', + resolve: scopeInvariant(scopeOptions, getPractitionerRole), + type: PractitionerRoleSchema, + args: args, +}; + +/** + * @name exports.PractitionerRoleListQuery + * @summary PractitionerRole query. + */ +module.exports.PractitionerRoleListQuery = { + description: 'Query for a more than or just one PractitionerRole', + resolve: scopeInvariant(scopeOptions, getPractitionerRoleList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.PractitionerRoleInstanceQuery + * @summary PractitionerRole query. + */ +module.exports.PractitionerRoleInstanceQuery = { + description: 'Access information about a single PractitionerRole', + resolve: scopeInvariant(scopeOptions, getPractitionerRoleInstance), + type: PractitionerRoleSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/practitionerrole/register.js b/src/resources/4_0_0/profiles/practitionerrole/register.js new file mode 100644 index 00000000..1b385ed3 --- /dev/null +++ b/src/resources/4_0_0/profiles/practitionerrole/register.js @@ -0,0 +1,48 @@ +const { + PractitionerRoleCreateMutation, + PractitionerRoleUpdateMutation, + PractitionerRoleRemoveMutation, +} = require('./mutation'); + +const { + PractitionerRoleQuery, + PractitionerRoleListQuery, + PractitionerRoleInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + PractitionerRole: PractitionerRoleQuery, + PractitionerRoleList: PractitionerRoleListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + PractitionerRoleCreate: PractitionerRoleCreateMutation, + PractitionerRoleUpdate: PractitionerRoleUpdateMutation, + PractitionerRoleRemove: PractitionerRoleRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'PractitionerRole', + path: '/4_0_0/PractitionerRole/:id', + query: PractitionerRoleInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/practitionerrole/resolver.js b/src/resources/4_0_0/profiles/practitionerrole/resolver.js new file mode 100644 index 00000000..62435aff --- /dev/null +++ b/src/resources/4_0_0/profiles/practitionerrole/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getPractitionerRole + * @static + * @summary PractitionerRole resolver. + */ +module.exports.getPractitionerRole = function getPractitionerRole( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPractitionerRoleList + * @static + * @summary PractitionerRole list resolver. + */ +module.exports.getPractitionerRoleList = function getPractitionerRoleList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getPractitionerRoleInstance + * @static + * @summary PractitionerRole instance resolver. + */ +module.exports.getPractitionerRoleInstance = function getPractitionerRoleInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createPractitionerRole + * @static + * @summary Create PractitionerRole resolver. + */ +module.exports.createPractitionerRole = function createPractitionerRole( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updatePractitionerRole + * @static + * @summary Update PractitionerRole resolver. + */ +module.exports.updatePractitionerRole = function updatePractitionerRole( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removePractitionerRole + * @static + * @summary Remove PractitionerRole resolver. + */ +module.exports.removePractitionerRole = function removePractitionerRole( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/procedure/mutation.js b/src/resources/4_0_0/profiles/procedure/mutation.js new file mode 100644 index 00000000..48e07d9a --- /dev/null +++ b/src/resources/4_0_0/profiles/procedure/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const ProcedureSchema = require('../../schemas/procedure.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ProcedureInput = require('../../inputs/procedure.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createProcedure, + updateProcedure, + removeProcedure, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Procedure', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Procedure record.', + }, + resource: { + type: new GraphQLNonNull(ProcedureInput), + description: 'Procedure Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Procedure record for deletion.', + }, +}; + +/** + * @name exports.ProcedureCreateMutation + * @summary ProcedureCreate mutation. + */ +module.exports.ProcedureCreateMutation = { + description: 'Create a Procedure record', + resolve: scopeInvariant(scopeOptions, createProcedure), + type: ProcedureSchema, + args: WriteArgs, +}; + +/** + * @name exports.ProcedureUpdateMutation + * @summary ProcedureUpdate mutation. + */ +module.exports.ProcedureUpdateMutation = { + description: 'Update a Procedure record', + resolve: scopeInvariant(scopeOptions, updateProcedure), + type: ProcedureSchema, + args: WriteArgs, +}; + +/** + * @name exports.ProcedureRemoveMutation + * @summary ProcedureRemove mutation. + */ +module.exports.ProcedureRemoveMutation = { + description: 'Remove a Procedure record', + resolve: scopeInvariant(scopeOptions, removeProcedure), + type: ProcedureSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/procedure/query.js b/src/resources/4_0_0/profiles/procedure/query.js new file mode 100644 index 00000000..a4b5eff1 --- /dev/null +++ b/src/resources/4_0_0/profiles/procedure/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProcedureSchema = require('../../schemas/procedure.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ProcedureArgs = require('../../parameters/procedure.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ProcedureArgs); + +// Resolvers +const { + getProcedure, + getProcedureList, + getProcedureInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Procedure', + action: 'read', +}; + +/** + * @name exports.ProcedureQuery + * @summary Procedure query. + */ +module.exports.ProcedureQuery = { + description: 'Query for a single Procedure', + resolve: scopeInvariant(scopeOptions, getProcedure), + type: ProcedureSchema, + args: args, +}; + +/** + * @name exports.ProcedureListQuery + * @summary Procedure query. + */ +module.exports.ProcedureListQuery = { + description: 'Query for a more than or just one Procedure', + resolve: scopeInvariant(scopeOptions, getProcedureList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ProcedureInstanceQuery + * @summary Procedure query. + */ +module.exports.ProcedureInstanceQuery = { + description: 'Access information about a single Procedure', + resolve: scopeInvariant(scopeOptions, getProcedureInstance), + type: ProcedureSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/procedure/register.js b/src/resources/4_0_0/profiles/procedure/register.js new file mode 100644 index 00000000..75e2a4fb --- /dev/null +++ b/src/resources/4_0_0/profiles/procedure/register.js @@ -0,0 +1,48 @@ +const { + ProcedureCreateMutation, + ProcedureUpdateMutation, + ProcedureRemoveMutation, +} = require('./mutation'); + +const { + ProcedureQuery, + ProcedureListQuery, + ProcedureInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Procedure: ProcedureQuery, + ProcedureList: ProcedureListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ProcedureCreate: ProcedureCreateMutation, + ProcedureUpdate: ProcedureUpdateMutation, + ProcedureRemove: ProcedureRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Procedure', + path: '/4_0_0/Procedure/:id', + query: ProcedureInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/procedure/resolver.js b/src/resources/4_0_0/profiles/procedure/resolver.js new file mode 100644 index 00000000..a1340247 --- /dev/null +++ b/src/resources/4_0_0/profiles/procedure/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getProcedure + * @static + * @summary Procedure resolver. + */ +module.exports.getProcedure = function getProcedure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getProcedureList + * @static + * @summary Procedure list resolver. + */ +module.exports.getProcedureList = function getProcedureList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getProcedureInstance + * @static + * @summary Procedure instance resolver. + */ +module.exports.getProcedureInstance = function getProcedureInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createProcedure + * @static + * @summary Create Procedure resolver. + */ +module.exports.createProcedure = function createProcedure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateProcedure + * @static + * @summary Update Procedure resolver. + */ +module.exports.updateProcedure = function updateProcedure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeProcedure + * @static + * @summary Remove Procedure resolver. + */ +module.exports.removeProcedure = function removeProcedure( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/provenance/mutation.js b/src/resources/4_0_0/profiles/provenance/mutation.js new file mode 100644 index 00000000..781969d8 --- /dev/null +++ b/src/resources/4_0_0/profiles/provenance/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const ProvenanceSchema = require('../../schemas/provenance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ProvenanceInput = require('../../inputs/provenance.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createProvenance, + updateProvenance, + removeProvenance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Provenance', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Provenance record.', + }, + resource: { + type: new GraphQLNonNull(ProvenanceInput), + description: 'Provenance Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Provenance record for deletion.', + }, +}; + +/** + * @name exports.ProvenanceCreateMutation + * @summary ProvenanceCreate mutation. + */ +module.exports.ProvenanceCreateMutation = { + description: 'Create a Provenance record', + resolve: scopeInvariant(scopeOptions, createProvenance), + type: ProvenanceSchema, + args: WriteArgs, +}; + +/** + * @name exports.ProvenanceUpdateMutation + * @summary ProvenanceUpdate mutation. + */ +module.exports.ProvenanceUpdateMutation = { + description: 'Update a Provenance record', + resolve: scopeInvariant(scopeOptions, updateProvenance), + type: ProvenanceSchema, + args: WriteArgs, +}; + +/** + * @name exports.ProvenanceRemoveMutation + * @summary ProvenanceRemove mutation. + */ +module.exports.ProvenanceRemoveMutation = { + description: 'Remove a Provenance record', + resolve: scopeInvariant(scopeOptions, removeProvenance), + type: ProvenanceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/provenance/query.js b/src/resources/4_0_0/profiles/provenance/query.js new file mode 100644 index 00000000..9dc9b33b --- /dev/null +++ b/src/resources/4_0_0/profiles/provenance/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ProvenanceSchema = require('../../schemas/provenance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ProvenanceArgs = require('../../parameters/provenance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ProvenanceArgs); + +// Resolvers +const { + getProvenance, + getProvenanceList, + getProvenanceInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Provenance', + action: 'read', +}; + +/** + * @name exports.ProvenanceQuery + * @summary Provenance query. + */ +module.exports.ProvenanceQuery = { + description: 'Query for a single Provenance', + resolve: scopeInvariant(scopeOptions, getProvenance), + type: ProvenanceSchema, + args: args, +}; + +/** + * @name exports.ProvenanceListQuery + * @summary Provenance query. + */ +module.exports.ProvenanceListQuery = { + description: 'Query for a more than or just one Provenance', + resolve: scopeInvariant(scopeOptions, getProvenanceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ProvenanceInstanceQuery + * @summary Provenance query. + */ +module.exports.ProvenanceInstanceQuery = { + description: 'Access information about a single Provenance', + resolve: scopeInvariant(scopeOptions, getProvenanceInstance), + type: ProvenanceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/provenance/register.js b/src/resources/4_0_0/profiles/provenance/register.js new file mode 100644 index 00000000..db5ab07d --- /dev/null +++ b/src/resources/4_0_0/profiles/provenance/register.js @@ -0,0 +1,48 @@ +const { + ProvenanceCreateMutation, + ProvenanceUpdateMutation, + ProvenanceRemoveMutation, +} = require('./mutation'); + +const { + ProvenanceQuery, + ProvenanceListQuery, + ProvenanceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Provenance: ProvenanceQuery, + ProvenanceList: ProvenanceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ProvenanceCreate: ProvenanceCreateMutation, + ProvenanceUpdate: ProvenanceUpdateMutation, + ProvenanceRemove: ProvenanceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Provenance', + path: '/4_0_0/Provenance/:id', + query: ProvenanceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/provenance/resolver.js b/src/resources/4_0_0/profiles/provenance/resolver.js new file mode 100644 index 00000000..5359714e --- /dev/null +++ b/src/resources/4_0_0/profiles/provenance/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getProvenance + * @static + * @summary Provenance resolver. + */ +module.exports.getProvenance = function getProvenance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getProvenanceList + * @static + * @summary Provenance list resolver. + */ +module.exports.getProvenanceList = function getProvenanceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getProvenanceInstance + * @static + * @summary Provenance instance resolver. + */ +module.exports.getProvenanceInstance = function getProvenanceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createProvenance + * @static + * @summary Create Provenance resolver. + */ +module.exports.createProvenance = function createProvenance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateProvenance + * @static + * @summary Update Provenance resolver. + */ +module.exports.updateProvenance = function updateProvenance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeProvenance + * @static + * @summary Remove Provenance resolver. + */ +module.exports.removeProvenance = function removeProvenance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/questionnaire/mutation.js b/src/resources/4_0_0/profiles/questionnaire/mutation.js new file mode 100644 index 00000000..abbb5966 --- /dev/null +++ b/src/resources/4_0_0/profiles/questionnaire/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const QuestionnaireSchema = require('../../schemas/questionnaire.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const QuestionnaireInput = require('../../inputs/questionnaire.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createQuestionnaire, + updateQuestionnaire, + removeQuestionnaire, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Questionnaire', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Questionnaire record.', + }, + resource: { + type: new GraphQLNonNull(QuestionnaireInput), + description: 'Questionnaire Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Questionnaire record for deletion.', + }, +}; + +/** + * @name exports.QuestionnaireCreateMutation + * @summary QuestionnaireCreate mutation. + */ +module.exports.QuestionnaireCreateMutation = { + description: 'Create a Questionnaire record', + resolve: scopeInvariant(scopeOptions, createQuestionnaire), + type: QuestionnaireSchema, + args: WriteArgs, +}; + +/** + * @name exports.QuestionnaireUpdateMutation + * @summary QuestionnaireUpdate mutation. + */ +module.exports.QuestionnaireUpdateMutation = { + description: 'Update a Questionnaire record', + resolve: scopeInvariant(scopeOptions, updateQuestionnaire), + type: QuestionnaireSchema, + args: WriteArgs, +}; + +/** + * @name exports.QuestionnaireRemoveMutation + * @summary QuestionnaireRemove mutation. + */ +module.exports.QuestionnaireRemoveMutation = { + description: 'Remove a Questionnaire record', + resolve: scopeInvariant(scopeOptions, removeQuestionnaire), + type: QuestionnaireSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/questionnaire/query.js b/src/resources/4_0_0/profiles/questionnaire/query.js new file mode 100644 index 00000000..b69b52ab --- /dev/null +++ b/src/resources/4_0_0/profiles/questionnaire/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const QuestionnaireSchema = require('../../schemas/questionnaire.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const QuestionnaireArgs = require('../../parameters/questionnaire.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + QuestionnaireArgs, +); + +// Resolvers +const { + getQuestionnaire, + getQuestionnaireList, + getQuestionnaireInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Questionnaire', + action: 'read', +}; + +/** + * @name exports.QuestionnaireQuery + * @summary Questionnaire query. + */ +module.exports.QuestionnaireQuery = { + description: 'Query for a single Questionnaire', + resolve: scopeInvariant(scopeOptions, getQuestionnaire), + type: QuestionnaireSchema, + args: args, +}; + +/** + * @name exports.QuestionnaireListQuery + * @summary Questionnaire query. + */ +module.exports.QuestionnaireListQuery = { + description: 'Query for a more than or just one Questionnaire', + resolve: scopeInvariant(scopeOptions, getQuestionnaireList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.QuestionnaireInstanceQuery + * @summary Questionnaire query. + */ +module.exports.QuestionnaireInstanceQuery = { + description: 'Access information about a single Questionnaire', + resolve: scopeInvariant(scopeOptions, getQuestionnaireInstance), + type: QuestionnaireSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/questionnaire/register.js b/src/resources/4_0_0/profiles/questionnaire/register.js new file mode 100644 index 00000000..b88d949b --- /dev/null +++ b/src/resources/4_0_0/profiles/questionnaire/register.js @@ -0,0 +1,48 @@ +const { + QuestionnaireCreateMutation, + QuestionnaireUpdateMutation, + QuestionnaireRemoveMutation, +} = require('./mutation'); + +const { + QuestionnaireQuery, + QuestionnaireListQuery, + QuestionnaireInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Questionnaire: QuestionnaireQuery, + QuestionnaireList: QuestionnaireListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + QuestionnaireCreate: QuestionnaireCreateMutation, + QuestionnaireUpdate: QuestionnaireUpdateMutation, + QuestionnaireRemove: QuestionnaireRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Questionnaire', + path: '/4_0_0/Questionnaire/:id', + query: QuestionnaireInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/questionnaire/resolver.js b/src/resources/4_0_0/profiles/questionnaire/resolver.js new file mode 100644 index 00000000..f3ecab16 --- /dev/null +++ b/src/resources/4_0_0/profiles/questionnaire/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getQuestionnaire + * @static + * @summary Questionnaire resolver. + */ +module.exports.getQuestionnaire = function getQuestionnaire( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getQuestionnaireList + * @static + * @summary Questionnaire list resolver. + */ +module.exports.getQuestionnaireList = function getQuestionnaireList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getQuestionnaireInstance + * @static + * @summary Questionnaire instance resolver. + */ +module.exports.getQuestionnaireInstance = function getQuestionnaireInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createQuestionnaire + * @static + * @summary Create Questionnaire resolver. + */ +module.exports.createQuestionnaire = function createQuestionnaire( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateQuestionnaire + * @static + * @summary Update Questionnaire resolver. + */ +module.exports.updateQuestionnaire = function updateQuestionnaire( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeQuestionnaire + * @static + * @summary Remove Questionnaire resolver. + */ +module.exports.removeQuestionnaire = function removeQuestionnaire( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/questionnaireresponse/mutation.js b/src/resources/4_0_0/profiles/questionnaireresponse/mutation.js new file mode 100644 index 00000000..d3b85ac2 --- /dev/null +++ b/src/resources/4_0_0/profiles/questionnaireresponse/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const QuestionnaireResponseInput = require('../../inputs/questionnaireresponse.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createQuestionnaireResponse, + updateQuestionnaireResponse, + removeQuestionnaireResponse, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'QuestionnaireResponse', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a QuestionnaireResponse record.', + }, + resource: { + type: new GraphQLNonNull(QuestionnaireResponseInput), + description: 'QuestionnaireResponse Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a QuestionnaireResponse record for deletion.', + }, +}; + +/** + * @name exports.QuestionnaireResponseCreateMutation + * @summary QuestionnaireResponseCreate mutation. + */ +module.exports.QuestionnaireResponseCreateMutation = { + description: 'Create a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, createQuestionnaireResponse), + type: QuestionnaireResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.QuestionnaireResponseUpdateMutation + * @summary QuestionnaireResponseUpdate mutation. + */ +module.exports.QuestionnaireResponseUpdateMutation = { + description: 'Update a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, updateQuestionnaireResponse), + type: QuestionnaireResponseSchema, + args: WriteArgs, +}; + +/** + * @name exports.QuestionnaireResponseRemoveMutation + * @summary QuestionnaireResponseRemove mutation. + */ +module.exports.QuestionnaireResponseRemoveMutation = { + description: 'Remove a QuestionnaireResponse record', + resolve: scopeInvariant(scopeOptions, removeQuestionnaireResponse), + type: QuestionnaireResponseSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/questionnaireresponse/query.js b/src/resources/4_0_0/profiles/questionnaireresponse/query.js new file mode 100644 index 00000000..c7ae0e16 --- /dev/null +++ b/src/resources/4_0_0/profiles/questionnaireresponse/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const QuestionnaireResponseSchema = require('../../schemas/questionnaireresponse.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const QuestionnaireResponseArgs = require('../../parameters/questionnaireresponse.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + QuestionnaireResponseArgs, +); + +// Resolvers +const { + getQuestionnaireResponse, + getQuestionnaireResponseList, + getQuestionnaireResponseInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'QuestionnaireResponse', + action: 'read', +}; + +/** + * @name exports.QuestionnaireResponseQuery + * @summary QuestionnaireResponse query. + */ +module.exports.QuestionnaireResponseQuery = { + description: 'Query for a single QuestionnaireResponse', + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponse), + type: QuestionnaireResponseSchema, + args: args, +}; + +/** + * @name exports.QuestionnaireResponseListQuery + * @summary QuestionnaireResponse query. + */ +module.exports.QuestionnaireResponseListQuery = { + description: 'Query for a more than or just one QuestionnaireResponse', + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponseList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.QuestionnaireResponseInstanceQuery + * @summary QuestionnaireResponse query. + */ +module.exports.QuestionnaireResponseInstanceQuery = { + description: 'Access information about a single QuestionnaireResponse', + resolve: scopeInvariant(scopeOptions, getQuestionnaireResponseInstance), + type: QuestionnaireResponseSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/questionnaireresponse/register.js b/src/resources/4_0_0/profiles/questionnaireresponse/register.js new file mode 100644 index 00000000..d1e8a214 --- /dev/null +++ b/src/resources/4_0_0/profiles/questionnaireresponse/register.js @@ -0,0 +1,48 @@ +const { + QuestionnaireResponseCreateMutation, + QuestionnaireResponseUpdateMutation, + QuestionnaireResponseRemoveMutation, +} = require('./mutation'); + +const { + QuestionnaireResponseQuery, + QuestionnaireResponseListQuery, + QuestionnaireResponseInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + QuestionnaireResponse: QuestionnaireResponseQuery, + QuestionnaireResponseList: QuestionnaireResponseListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + QuestionnaireResponseCreate: QuestionnaireResponseCreateMutation, + QuestionnaireResponseUpdate: QuestionnaireResponseUpdateMutation, + QuestionnaireResponseRemove: QuestionnaireResponseRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'QuestionnaireResponse', + path: '/4_0_0/QuestionnaireResponse/:id', + query: QuestionnaireResponseInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/questionnaireresponse/resolver.js b/src/resources/4_0_0/profiles/questionnaireresponse/resolver.js new file mode 100644 index 00000000..7592bda6 --- /dev/null +++ b/src/resources/4_0_0/profiles/questionnaireresponse/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getQuestionnaireResponse + * @static + * @summary QuestionnaireResponse resolver. + */ +module.exports.getQuestionnaireResponse = function getQuestionnaireResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getQuestionnaireResponseList + * @static + * @summary QuestionnaireResponse list resolver. + */ +module.exports.getQuestionnaireResponseList = function getQuestionnaireResponseList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getQuestionnaireResponseInstance + * @static + * @summary QuestionnaireResponse instance resolver. + */ +module.exports.getQuestionnaireResponseInstance = function getQuestionnaireResponseInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createQuestionnaireResponse + * @static + * @summary Create QuestionnaireResponse resolver. + */ +module.exports.createQuestionnaireResponse = function createQuestionnaireResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateQuestionnaireResponse + * @static + * @summary Update QuestionnaireResponse resolver. + */ +module.exports.updateQuestionnaireResponse = function updateQuestionnaireResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeQuestionnaireResponse + * @static + * @summary Remove QuestionnaireResponse resolver. + */ +module.exports.removeQuestionnaireResponse = function removeQuestionnaireResponse( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/relatedperson/mutation.js b/src/resources/4_0_0/profiles/relatedperson/mutation.js new file mode 100644 index 00000000..2e90ec2f --- /dev/null +++ b/src/resources/4_0_0/profiles/relatedperson/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const RelatedPersonSchema = require('../../schemas/relatedperson.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const RelatedPersonInput = require('../../inputs/relatedperson.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createRelatedPerson, + updateRelatedPerson, + removeRelatedPerson, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'RelatedPerson', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a RelatedPerson record.', + }, + resource: { + type: new GraphQLNonNull(RelatedPersonInput), + description: 'RelatedPerson Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a RelatedPerson record for deletion.', + }, +}; + +/** + * @name exports.RelatedPersonCreateMutation + * @summary RelatedPersonCreate mutation. + */ +module.exports.RelatedPersonCreateMutation = { + description: 'Create a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, createRelatedPerson), + type: RelatedPersonSchema, + args: WriteArgs, +}; + +/** + * @name exports.RelatedPersonUpdateMutation + * @summary RelatedPersonUpdate mutation. + */ +module.exports.RelatedPersonUpdateMutation = { + description: 'Update a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, updateRelatedPerson), + type: RelatedPersonSchema, + args: WriteArgs, +}; + +/** + * @name exports.RelatedPersonRemoveMutation + * @summary RelatedPersonRemove mutation. + */ +module.exports.RelatedPersonRemoveMutation = { + description: 'Remove a RelatedPerson record', + resolve: scopeInvariant(scopeOptions, removeRelatedPerson), + type: RelatedPersonSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/relatedperson/query.js b/src/resources/4_0_0/profiles/relatedperson/query.js new file mode 100644 index 00000000..2930affe --- /dev/null +++ b/src/resources/4_0_0/profiles/relatedperson/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RelatedPersonSchema = require('../../schemas/relatedperson.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const RelatedPersonArgs = require('../../parameters/relatedperson.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + RelatedPersonArgs, +); + +// Resolvers +const { + getRelatedPerson, + getRelatedPersonList, + getRelatedPersonInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'RelatedPerson', + action: 'read', +}; + +/** + * @name exports.RelatedPersonQuery + * @summary RelatedPerson query. + */ +module.exports.RelatedPersonQuery = { + description: 'Query for a single RelatedPerson', + resolve: scopeInvariant(scopeOptions, getRelatedPerson), + type: RelatedPersonSchema, + args: args, +}; + +/** + * @name exports.RelatedPersonListQuery + * @summary RelatedPerson query. + */ +module.exports.RelatedPersonListQuery = { + description: 'Query for a more than or just one RelatedPerson', + resolve: scopeInvariant(scopeOptions, getRelatedPersonList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.RelatedPersonInstanceQuery + * @summary RelatedPerson query. + */ +module.exports.RelatedPersonInstanceQuery = { + description: 'Access information about a single RelatedPerson', + resolve: scopeInvariant(scopeOptions, getRelatedPersonInstance), + type: RelatedPersonSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/relatedperson/register.js b/src/resources/4_0_0/profiles/relatedperson/register.js new file mode 100644 index 00000000..cc1aa703 --- /dev/null +++ b/src/resources/4_0_0/profiles/relatedperson/register.js @@ -0,0 +1,48 @@ +const { + RelatedPersonCreateMutation, + RelatedPersonUpdateMutation, + RelatedPersonRemoveMutation, +} = require('./mutation'); + +const { + RelatedPersonQuery, + RelatedPersonListQuery, + RelatedPersonInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + RelatedPerson: RelatedPersonQuery, + RelatedPersonList: RelatedPersonListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + RelatedPersonCreate: RelatedPersonCreateMutation, + RelatedPersonUpdate: RelatedPersonUpdateMutation, + RelatedPersonRemove: RelatedPersonRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'RelatedPerson', + path: '/4_0_0/RelatedPerson/:id', + query: RelatedPersonInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/relatedperson/resolver.js b/src/resources/4_0_0/profiles/relatedperson/resolver.js new file mode 100644 index 00000000..9302c7ce --- /dev/null +++ b/src/resources/4_0_0/profiles/relatedperson/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getRelatedPerson + * @static + * @summary RelatedPerson resolver. + */ +module.exports.getRelatedPerson = function getRelatedPerson( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getRelatedPersonList + * @static + * @summary RelatedPerson list resolver. + */ +module.exports.getRelatedPersonList = function getRelatedPersonList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getRelatedPersonInstance + * @static + * @summary RelatedPerson instance resolver. + */ +module.exports.getRelatedPersonInstance = function getRelatedPersonInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createRelatedPerson + * @static + * @summary Create RelatedPerson resolver. + */ +module.exports.createRelatedPerson = function createRelatedPerson( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateRelatedPerson + * @static + * @summary Update RelatedPerson resolver. + */ +module.exports.updateRelatedPerson = function updateRelatedPerson( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeRelatedPerson + * @static + * @summary Remove RelatedPerson resolver. + */ +module.exports.removeRelatedPerson = function removeRelatedPerson( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/requestgroup/mutation.js b/src/resources/4_0_0/profiles/requestgroup/mutation.js new file mode 100644 index 00000000..e95627df --- /dev/null +++ b/src/resources/4_0_0/profiles/requestgroup/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const RequestGroupSchema = require('../../schemas/requestgroup.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const RequestGroupInput = require('../../inputs/requestgroup.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createRequestGroup, + updateRequestGroup, + removeRequestGroup, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'RequestGroup', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a RequestGroup record.', + }, + resource: { + type: new GraphQLNonNull(RequestGroupInput), + description: 'RequestGroup Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a RequestGroup record for deletion.', + }, +}; + +/** + * @name exports.RequestGroupCreateMutation + * @summary RequestGroupCreate mutation. + */ +module.exports.RequestGroupCreateMutation = { + description: 'Create a RequestGroup record', + resolve: scopeInvariant(scopeOptions, createRequestGroup), + type: RequestGroupSchema, + args: WriteArgs, +}; + +/** + * @name exports.RequestGroupUpdateMutation + * @summary RequestGroupUpdate mutation. + */ +module.exports.RequestGroupUpdateMutation = { + description: 'Update a RequestGroup record', + resolve: scopeInvariant(scopeOptions, updateRequestGroup), + type: RequestGroupSchema, + args: WriteArgs, +}; + +/** + * @name exports.RequestGroupRemoveMutation + * @summary RequestGroupRemove mutation. + */ +module.exports.RequestGroupRemoveMutation = { + description: 'Remove a RequestGroup record', + resolve: scopeInvariant(scopeOptions, removeRequestGroup), + type: RequestGroupSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/requestgroup/query.js b/src/resources/4_0_0/profiles/requestgroup/query.js new file mode 100644 index 00000000..353378f8 --- /dev/null +++ b/src/resources/4_0_0/profiles/requestgroup/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RequestGroupSchema = require('../../schemas/requestgroup.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const RequestGroupArgs = require('../../parameters/requestgroup.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + RequestGroupArgs, +); + +// Resolvers +const { + getRequestGroup, + getRequestGroupList, + getRequestGroupInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'RequestGroup', + action: 'read', +}; + +/** + * @name exports.RequestGroupQuery + * @summary RequestGroup query. + */ +module.exports.RequestGroupQuery = { + description: 'Query for a single RequestGroup', + resolve: scopeInvariant(scopeOptions, getRequestGroup), + type: RequestGroupSchema, + args: args, +}; + +/** + * @name exports.RequestGroupListQuery + * @summary RequestGroup query. + */ +module.exports.RequestGroupListQuery = { + description: 'Query for a more than or just one RequestGroup', + resolve: scopeInvariant(scopeOptions, getRequestGroupList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.RequestGroupInstanceQuery + * @summary RequestGroup query. + */ +module.exports.RequestGroupInstanceQuery = { + description: 'Access information about a single RequestGroup', + resolve: scopeInvariant(scopeOptions, getRequestGroupInstance), + type: RequestGroupSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/requestgroup/register.js b/src/resources/4_0_0/profiles/requestgroup/register.js new file mode 100644 index 00000000..1380dc52 --- /dev/null +++ b/src/resources/4_0_0/profiles/requestgroup/register.js @@ -0,0 +1,48 @@ +const { + RequestGroupCreateMutation, + RequestGroupUpdateMutation, + RequestGroupRemoveMutation, +} = require('./mutation'); + +const { + RequestGroupQuery, + RequestGroupListQuery, + RequestGroupInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + RequestGroup: RequestGroupQuery, + RequestGroupList: RequestGroupListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + RequestGroupCreate: RequestGroupCreateMutation, + RequestGroupUpdate: RequestGroupUpdateMutation, + RequestGroupRemove: RequestGroupRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'RequestGroup', + path: '/4_0_0/RequestGroup/:id', + query: RequestGroupInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/requestgroup/resolver.js b/src/resources/4_0_0/profiles/requestgroup/resolver.js new file mode 100644 index 00000000..9941fcbd --- /dev/null +++ b/src/resources/4_0_0/profiles/requestgroup/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getRequestGroup + * @static + * @summary RequestGroup resolver. + */ +module.exports.getRequestGroup = function getRequestGroup( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getRequestGroupList + * @static + * @summary RequestGroup list resolver. + */ +module.exports.getRequestGroupList = function getRequestGroupList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getRequestGroupInstance + * @static + * @summary RequestGroup instance resolver. + */ +module.exports.getRequestGroupInstance = function getRequestGroupInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createRequestGroup + * @static + * @summary Create RequestGroup resolver. + */ +module.exports.createRequestGroup = function createRequestGroup( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateRequestGroup + * @static + * @summary Update RequestGroup resolver. + */ +module.exports.updateRequestGroup = function updateRequestGroup( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeRequestGroup + * @static + * @summary Remove RequestGroup resolver. + */ +module.exports.removeRequestGroup = function removeRequestGroup( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/researchdefinition/mutation.js b/src/resources/4_0_0/profiles/researchdefinition/mutation.js new file mode 100644 index 00000000..48fb54bc --- /dev/null +++ b/src/resources/4_0_0/profiles/researchdefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ResearchDefinitionSchema = require('../../schemas/researchdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ResearchDefinitionInput = require('../../inputs/researchdefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createResearchDefinition, + updateResearchDefinition, + removeResearchDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ResearchDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ResearchDefinition record.', + }, + resource: { + type: new GraphQLNonNull(ResearchDefinitionInput), + description: 'ResearchDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ResearchDefinition record for deletion.', + }, +}; + +/** + * @name exports.ResearchDefinitionCreateMutation + * @summary ResearchDefinitionCreate mutation. + */ +module.exports.ResearchDefinitionCreateMutation = { + description: 'Create a ResearchDefinition record', + resolve: scopeInvariant(scopeOptions, createResearchDefinition), + type: ResearchDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ResearchDefinitionUpdateMutation + * @summary ResearchDefinitionUpdate mutation. + */ +module.exports.ResearchDefinitionUpdateMutation = { + description: 'Update a ResearchDefinition record', + resolve: scopeInvariant(scopeOptions, updateResearchDefinition), + type: ResearchDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ResearchDefinitionRemoveMutation + * @summary ResearchDefinitionRemove mutation. + */ +module.exports.ResearchDefinitionRemoveMutation = { + description: 'Remove a ResearchDefinition record', + resolve: scopeInvariant(scopeOptions, removeResearchDefinition), + type: ResearchDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/researchdefinition/query.js b/src/resources/4_0_0/profiles/researchdefinition/query.js new file mode 100644 index 00000000..6b5a918e --- /dev/null +++ b/src/resources/4_0_0/profiles/researchdefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ResearchDefinitionSchema = require('../../schemas/researchdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ResearchDefinitionArgs = require('../../parameters/researchdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ResearchDefinitionArgs, +); + +// Resolvers +const { + getResearchDefinition, + getResearchDefinitionList, + getResearchDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ResearchDefinition', + action: 'read', +}; + +/** + * @name exports.ResearchDefinitionQuery + * @summary ResearchDefinition query. + */ +module.exports.ResearchDefinitionQuery = { + description: 'Query for a single ResearchDefinition', + resolve: scopeInvariant(scopeOptions, getResearchDefinition), + type: ResearchDefinitionSchema, + args: args, +}; + +/** + * @name exports.ResearchDefinitionListQuery + * @summary ResearchDefinition query. + */ +module.exports.ResearchDefinitionListQuery = { + description: 'Query for a more than or just one ResearchDefinition', + resolve: scopeInvariant(scopeOptions, getResearchDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ResearchDefinitionInstanceQuery + * @summary ResearchDefinition query. + */ +module.exports.ResearchDefinitionInstanceQuery = { + description: 'Access information about a single ResearchDefinition', + resolve: scopeInvariant(scopeOptions, getResearchDefinitionInstance), + type: ResearchDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/researchdefinition/register.js b/src/resources/4_0_0/profiles/researchdefinition/register.js new file mode 100644 index 00000000..06166756 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchdefinition/register.js @@ -0,0 +1,48 @@ +const { + ResearchDefinitionCreateMutation, + ResearchDefinitionUpdateMutation, + ResearchDefinitionRemoveMutation, +} = require('./mutation'); + +const { + ResearchDefinitionQuery, + ResearchDefinitionListQuery, + ResearchDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ResearchDefinition: ResearchDefinitionQuery, + ResearchDefinitionList: ResearchDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ResearchDefinitionCreate: ResearchDefinitionCreateMutation, + ResearchDefinitionUpdate: ResearchDefinitionUpdateMutation, + ResearchDefinitionRemove: ResearchDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ResearchDefinition', + path: '/4_0_0/ResearchDefinition/:id', + query: ResearchDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/researchdefinition/resolver.js b/src/resources/4_0_0/profiles/researchdefinition/resolver.js new file mode 100644 index 00000000..dd32e9f5 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchdefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getResearchDefinition + * @static + * @summary ResearchDefinition resolver. + */ +module.exports.getResearchDefinition = function getResearchDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getResearchDefinitionList + * @static + * @summary ResearchDefinition list resolver. + */ +module.exports.getResearchDefinitionList = function getResearchDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getResearchDefinitionInstance + * @static + * @summary ResearchDefinition instance resolver. + */ +module.exports.getResearchDefinitionInstance = function getResearchDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createResearchDefinition + * @static + * @summary Create ResearchDefinition resolver. + */ +module.exports.createResearchDefinition = function createResearchDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateResearchDefinition + * @static + * @summary Update ResearchDefinition resolver. + */ +module.exports.updateResearchDefinition = function updateResearchDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeResearchDefinition + * @static + * @summary Remove ResearchDefinition resolver. + */ +module.exports.removeResearchDefinition = function removeResearchDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/researchelementdefinition/mutation.js b/src/resources/4_0_0/profiles/researchelementdefinition/mutation.js new file mode 100644 index 00000000..980e60ea --- /dev/null +++ b/src/resources/4_0_0/profiles/researchelementdefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ResearchElementDefinitionSchema = require('../../schemas/researchelementdefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ResearchElementDefinitionInput = require('../../inputs/researchelementdefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createResearchElementDefinition, + updateResearchElementDefinition, + removeResearchElementDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ResearchElementDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ResearchElementDefinition record.', + }, + resource: { + type: new GraphQLNonNull(ResearchElementDefinitionInput), + description: 'ResearchElementDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ResearchElementDefinition record for deletion.', + }, +}; + +/** + * @name exports.ResearchElementDefinitionCreateMutation + * @summary ResearchElementDefinitionCreate mutation. + */ +module.exports.ResearchElementDefinitionCreateMutation = { + description: 'Create a ResearchElementDefinition record', + resolve: scopeInvariant(scopeOptions, createResearchElementDefinition), + type: ResearchElementDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ResearchElementDefinitionUpdateMutation + * @summary ResearchElementDefinitionUpdate mutation. + */ +module.exports.ResearchElementDefinitionUpdateMutation = { + description: 'Update a ResearchElementDefinition record', + resolve: scopeInvariant(scopeOptions, updateResearchElementDefinition), + type: ResearchElementDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.ResearchElementDefinitionRemoveMutation + * @summary ResearchElementDefinitionRemove mutation. + */ +module.exports.ResearchElementDefinitionRemoveMutation = { + description: 'Remove a ResearchElementDefinition record', + resolve: scopeInvariant(scopeOptions, removeResearchElementDefinition), + type: ResearchElementDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/researchelementdefinition/query.js b/src/resources/4_0_0/profiles/researchelementdefinition/query.js new file mode 100644 index 00000000..0f5daad0 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchelementdefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ResearchElementDefinitionSchema = require('../../schemas/researchelementdefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ResearchElementDefinitionArgs = require('../../parameters/researchelementdefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ResearchElementDefinitionArgs, +); + +// Resolvers +const { + getResearchElementDefinition, + getResearchElementDefinitionList, + getResearchElementDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ResearchElementDefinition', + action: 'read', +}; + +/** + * @name exports.ResearchElementDefinitionQuery + * @summary ResearchElementDefinition query. + */ +module.exports.ResearchElementDefinitionQuery = { + description: 'Query for a single ResearchElementDefinition', + resolve: scopeInvariant(scopeOptions, getResearchElementDefinition), + type: ResearchElementDefinitionSchema, + args: args, +}; + +/** + * @name exports.ResearchElementDefinitionListQuery + * @summary ResearchElementDefinition query. + */ +module.exports.ResearchElementDefinitionListQuery = { + description: 'Query for a more than or just one ResearchElementDefinition', + resolve: scopeInvariant(scopeOptions, getResearchElementDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ResearchElementDefinitionInstanceQuery + * @summary ResearchElementDefinition query. + */ +module.exports.ResearchElementDefinitionInstanceQuery = { + description: 'Access information about a single ResearchElementDefinition', + resolve: scopeInvariant(scopeOptions, getResearchElementDefinitionInstance), + type: ResearchElementDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/researchelementdefinition/register.js b/src/resources/4_0_0/profiles/researchelementdefinition/register.js new file mode 100644 index 00000000..9b6c830f --- /dev/null +++ b/src/resources/4_0_0/profiles/researchelementdefinition/register.js @@ -0,0 +1,48 @@ +const { + ResearchElementDefinitionCreateMutation, + ResearchElementDefinitionUpdateMutation, + ResearchElementDefinitionRemoveMutation, +} = require('./mutation'); + +const { + ResearchElementDefinitionQuery, + ResearchElementDefinitionListQuery, + ResearchElementDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ResearchElementDefinition: ResearchElementDefinitionQuery, + ResearchElementDefinitionList: ResearchElementDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ResearchElementDefinitionCreate: ResearchElementDefinitionCreateMutation, + ResearchElementDefinitionUpdate: ResearchElementDefinitionUpdateMutation, + ResearchElementDefinitionRemove: ResearchElementDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ResearchElementDefinition', + path: '/4_0_0/ResearchElementDefinition/:id', + query: ResearchElementDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/researchelementdefinition/resolver.js b/src/resources/4_0_0/profiles/researchelementdefinition/resolver.js new file mode 100644 index 00000000..0e575720 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchelementdefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getResearchElementDefinition + * @static + * @summary ResearchElementDefinition resolver. + */ +module.exports.getResearchElementDefinition = function getResearchElementDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getResearchElementDefinitionList + * @static + * @summary ResearchElementDefinition list resolver. + */ +module.exports.getResearchElementDefinitionList = function getResearchElementDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getResearchElementDefinitionInstance + * @static + * @summary ResearchElementDefinition instance resolver. + */ +module.exports.getResearchElementDefinitionInstance = function getResearchElementDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createResearchElementDefinition + * @static + * @summary Create ResearchElementDefinition resolver. + */ +module.exports.createResearchElementDefinition = function createResearchElementDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateResearchElementDefinition + * @static + * @summary Update ResearchElementDefinition resolver. + */ +module.exports.updateResearchElementDefinition = function updateResearchElementDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeResearchElementDefinition + * @static + * @summary Remove ResearchElementDefinition resolver. + */ +module.exports.removeResearchElementDefinition = function removeResearchElementDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/researchstudy/mutation.js b/src/resources/4_0_0/profiles/researchstudy/mutation.js new file mode 100644 index 00000000..53bd7e20 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchstudy/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ResearchStudySchema = require('../../schemas/researchstudy.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ResearchStudyInput = require('../../inputs/researchstudy.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createResearchStudy, + updateResearchStudy, + removeResearchStudy, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ResearchStudy', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ResearchStudy record.', + }, + resource: { + type: new GraphQLNonNull(ResearchStudyInput), + description: 'ResearchStudy Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ResearchStudy record for deletion.', + }, +}; + +/** + * @name exports.ResearchStudyCreateMutation + * @summary ResearchStudyCreate mutation. + */ +module.exports.ResearchStudyCreateMutation = { + description: 'Create a ResearchStudy record', + resolve: scopeInvariant(scopeOptions, createResearchStudy), + type: ResearchStudySchema, + args: WriteArgs, +}; + +/** + * @name exports.ResearchStudyUpdateMutation + * @summary ResearchStudyUpdate mutation. + */ +module.exports.ResearchStudyUpdateMutation = { + description: 'Update a ResearchStudy record', + resolve: scopeInvariant(scopeOptions, updateResearchStudy), + type: ResearchStudySchema, + args: WriteArgs, +}; + +/** + * @name exports.ResearchStudyRemoveMutation + * @summary ResearchStudyRemove mutation. + */ +module.exports.ResearchStudyRemoveMutation = { + description: 'Remove a ResearchStudy record', + resolve: scopeInvariant(scopeOptions, removeResearchStudy), + type: ResearchStudySchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/researchstudy/query.js b/src/resources/4_0_0/profiles/researchstudy/query.js new file mode 100644 index 00000000..e9e30b20 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchstudy/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ResearchStudySchema = require('../../schemas/researchstudy.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ResearchStudyArgs = require('../../parameters/researchstudy.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ResearchStudyArgs, +); + +// Resolvers +const { + getResearchStudy, + getResearchStudyList, + getResearchStudyInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ResearchStudy', + action: 'read', +}; + +/** + * @name exports.ResearchStudyQuery + * @summary ResearchStudy query. + */ +module.exports.ResearchStudyQuery = { + description: 'Query for a single ResearchStudy', + resolve: scopeInvariant(scopeOptions, getResearchStudy), + type: ResearchStudySchema, + args: args, +}; + +/** + * @name exports.ResearchStudyListQuery + * @summary ResearchStudy query. + */ +module.exports.ResearchStudyListQuery = { + description: 'Query for a more than or just one ResearchStudy', + resolve: scopeInvariant(scopeOptions, getResearchStudyList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ResearchStudyInstanceQuery + * @summary ResearchStudy query. + */ +module.exports.ResearchStudyInstanceQuery = { + description: 'Access information about a single ResearchStudy', + resolve: scopeInvariant(scopeOptions, getResearchStudyInstance), + type: ResearchStudySchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/researchstudy/register.js b/src/resources/4_0_0/profiles/researchstudy/register.js new file mode 100644 index 00000000..1036d475 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchstudy/register.js @@ -0,0 +1,48 @@ +const { + ResearchStudyCreateMutation, + ResearchStudyUpdateMutation, + ResearchStudyRemoveMutation, +} = require('./mutation'); + +const { + ResearchStudyQuery, + ResearchStudyListQuery, + ResearchStudyInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ResearchStudy: ResearchStudyQuery, + ResearchStudyList: ResearchStudyListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ResearchStudyCreate: ResearchStudyCreateMutation, + ResearchStudyUpdate: ResearchStudyUpdateMutation, + ResearchStudyRemove: ResearchStudyRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ResearchStudy', + path: '/4_0_0/ResearchStudy/:id', + query: ResearchStudyInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/researchstudy/resolver.js b/src/resources/4_0_0/profiles/researchstudy/resolver.js new file mode 100644 index 00000000..2cf0fb52 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchstudy/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getResearchStudy + * @static + * @summary ResearchStudy resolver. + */ +module.exports.getResearchStudy = function getResearchStudy( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getResearchStudyList + * @static + * @summary ResearchStudy list resolver. + */ +module.exports.getResearchStudyList = function getResearchStudyList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getResearchStudyInstance + * @static + * @summary ResearchStudy instance resolver. + */ +module.exports.getResearchStudyInstance = function getResearchStudyInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createResearchStudy + * @static + * @summary Create ResearchStudy resolver. + */ +module.exports.createResearchStudy = function createResearchStudy( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateResearchStudy + * @static + * @summary Update ResearchStudy resolver. + */ +module.exports.updateResearchStudy = function updateResearchStudy( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeResearchStudy + * @static + * @summary Remove ResearchStudy resolver. + */ +module.exports.removeResearchStudy = function removeResearchStudy( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/researchsubject/mutation.js b/src/resources/4_0_0/profiles/researchsubject/mutation.js new file mode 100644 index 00000000..767aa14d --- /dev/null +++ b/src/resources/4_0_0/profiles/researchsubject/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ResearchSubjectSchema = require('../../schemas/researchsubject.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ResearchSubjectInput = require('../../inputs/researchsubject.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createResearchSubject, + updateResearchSubject, + removeResearchSubject, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ResearchSubject', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ResearchSubject record.', + }, + resource: { + type: new GraphQLNonNull(ResearchSubjectInput), + description: 'ResearchSubject Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ResearchSubject record for deletion.', + }, +}; + +/** + * @name exports.ResearchSubjectCreateMutation + * @summary ResearchSubjectCreate mutation. + */ +module.exports.ResearchSubjectCreateMutation = { + description: 'Create a ResearchSubject record', + resolve: scopeInvariant(scopeOptions, createResearchSubject), + type: ResearchSubjectSchema, + args: WriteArgs, +}; + +/** + * @name exports.ResearchSubjectUpdateMutation + * @summary ResearchSubjectUpdate mutation. + */ +module.exports.ResearchSubjectUpdateMutation = { + description: 'Update a ResearchSubject record', + resolve: scopeInvariant(scopeOptions, updateResearchSubject), + type: ResearchSubjectSchema, + args: WriteArgs, +}; + +/** + * @name exports.ResearchSubjectRemoveMutation + * @summary ResearchSubjectRemove mutation. + */ +module.exports.ResearchSubjectRemoveMutation = { + description: 'Remove a ResearchSubject record', + resolve: scopeInvariant(scopeOptions, removeResearchSubject), + type: ResearchSubjectSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/researchsubject/query.js b/src/resources/4_0_0/profiles/researchsubject/query.js new file mode 100644 index 00000000..4012aea5 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchsubject/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ResearchSubjectSchema = require('../../schemas/researchsubject.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ResearchSubjectArgs = require('../../parameters/researchsubject.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ResearchSubjectArgs, +); + +// Resolvers +const { + getResearchSubject, + getResearchSubjectList, + getResearchSubjectInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ResearchSubject', + action: 'read', +}; + +/** + * @name exports.ResearchSubjectQuery + * @summary ResearchSubject query. + */ +module.exports.ResearchSubjectQuery = { + description: 'Query for a single ResearchSubject', + resolve: scopeInvariant(scopeOptions, getResearchSubject), + type: ResearchSubjectSchema, + args: args, +}; + +/** + * @name exports.ResearchSubjectListQuery + * @summary ResearchSubject query. + */ +module.exports.ResearchSubjectListQuery = { + description: 'Query for a more than or just one ResearchSubject', + resolve: scopeInvariant(scopeOptions, getResearchSubjectList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ResearchSubjectInstanceQuery + * @summary ResearchSubject query. + */ +module.exports.ResearchSubjectInstanceQuery = { + description: 'Access information about a single ResearchSubject', + resolve: scopeInvariant(scopeOptions, getResearchSubjectInstance), + type: ResearchSubjectSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/researchsubject/register.js b/src/resources/4_0_0/profiles/researchsubject/register.js new file mode 100644 index 00000000..1408f6c8 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchsubject/register.js @@ -0,0 +1,48 @@ +const { + ResearchSubjectCreateMutation, + ResearchSubjectUpdateMutation, + ResearchSubjectRemoveMutation, +} = require('./mutation'); + +const { + ResearchSubjectQuery, + ResearchSubjectListQuery, + ResearchSubjectInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ResearchSubject: ResearchSubjectQuery, + ResearchSubjectList: ResearchSubjectListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ResearchSubjectCreate: ResearchSubjectCreateMutation, + ResearchSubjectUpdate: ResearchSubjectUpdateMutation, + ResearchSubjectRemove: ResearchSubjectRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ResearchSubject', + path: '/4_0_0/ResearchSubject/:id', + query: ResearchSubjectInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/researchsubject/resolver.js b/src/resources/4_0_0/profiles/researchsubject/resolver.js new file mode 100644 index 00000000..1d9393d5 --- /dev/null +++ b/src/resources/4_0_0/profiles/researchsubject/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getResearchSubject + * @static + * @summary ResearchSubject resolver. + */ +module.exports.getResearchSubject = function getResearchSubject( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getResearchSubjectList + * @static + * @summary ResearchSubject list resolver. + */ +module.exports.getResearchSubjectList = function getResearchSubjectList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getResearchSubjectInstance + * @static + * @summary ResearchSubject instance resolver. + */ +module.exports.getResearchSubjectInstance = function getResearchSubjectInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createResearchSubject + * @static + * @summary Create ResearchSubject resolver. + */ +module.exports.createResearchSubject = function createResearchSubject( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateResearchSubject + * @static + * @summary Update ResearchSubject resolver. + */ +module.exports.updateResearchSubject = function updateResearchSubject( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeResearchSubject + * @static + * @summary Remove ResearchSubject resolver. + */ +module.exports.removeResearchSubject = function removeResearchSubject( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/riskassessment/mutation.js b/src/resources/4_0_0/profiles/riskassessment/mutation.js new file mode 100644 index 00000000..51966f32 --- /dev/null +++ b/src/resources/4_0_0/profiles/riskassessment/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const RiskAssessmentSchema = require('../../schemas/riskassessment.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const RiskAssessmentInput = require('../../inputs/riskassessment.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createRiskAssessment, + updateRiskAssessment, + removeRiskAssessment, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'RiskAssessment', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a RiskAssessment record.', + }, + resource: { + type: new GraphQLNonNull(RiskAssessmentInput), + description: 'RiskAssessment Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a RiskAssessment record for deletion.', + }, +}; + +/** + * @name exports.RiskAssessmentCreateMutation + * @summary RiskAssessmentCreate mutation. + */ +module.exports.RiskAssessmentCreateMutation = { + description: 'Create a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, createRiskAssessment), + type: RiskAssessmentSchema, + args: WriteArgs, +}; + +/** + * @name exports.RiskAssessmentUpdateMutation + * @summary RiskAssessmentUpdate mutation. + */ +module.exports.RiskAssessmentUpdateMutation = { + description: 'Update a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, updateRiskAssessment), + type: RiskAssessmentSchema, + args: WriteArgs, +}; + +/** + * @name exports.RiskAssessmentRemoveMutation + * @summary RiskAssessmentRemove mutation. + */ +module.exports.RiskAssessmentRemoveMutation = { + description: 'Remove a RiskAssessment record', + resolve: scopeInvariant(scopeOptions, removeRiskAssessment), + type: RiskAssessmentSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/riskassessment/query.js b/src/resources/4_0_0/profiles/riskassessment/query.js new file mode 100644 index 00000000..74e8246b --- /dev/null +++ b/src/resources/4_0_0/profiles/riskassessment/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RiskAssessmentSchema = require('../../schemas/riskassessment.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const RiskAssessmentArgs = require('../../parameters/riskassessment.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + RiskAssessmentArgs, +); + +// Resolvers +const { + getRiskAssessment, + getRiskAssessmentList, + getRiskAssessmentInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'RiskAssessment', + action: 'read', +}; + +/** + * @name exports.RiskAssessmentQuery + * @summary RiskAssessment query. + */ +module.exports.RiskAssessmentQuery = { + description: 'Query for a single RiskAssessment', + resolve: scopeInvariant(scopeOptions, getRiskAssessment), + type: RiskAssessmentSchema, + args: args, +}; + +/** + * @name exports.RiskAssessmentListQuery + * @summary RiskAssessment query. + */ +module.exports.RiskAssessmentListQuery = { + description: 'Query for a more than or just one RiskAssessment', + resolve: scopeInvariant(scopeOptions, getRiskAssessmentList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.RiskAssessmentInstanceQuery + * @summary RiskAssessment query. + */ +module.exports.RiskAssessmentInstanceQuery = { + description: 'Access information about a single RiskAssessment', + resolve: scopeInvariant(scopeOptions, getRiskAssessmentInstance), + type: RiskAssessmentSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/riskassessment/register.js b/src/resources/4_0_0/profiles/riskassessment/register.js new file mode 100644 index 00000000..4ac3dd54 --- /dev/null +++ b/src/resources/4_0_0/profiles/riskassessment/register.js @@ -0,0 +1,48 @@ +const { + RiskAssessmentCreateMutation, + RiskAssessmentUpdateMutation, + RiskAssessmentRemoveMutation, +} = require('./mutation'); + +const { + RiskAssessmentQuery, + RiskAssessmentListQuery, + RiskAssessmentInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + RiskAssessment: RiskAssessmentQuery, + RiskAssessmentList: RiskAssessmentListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + RiskAssessmentCreate: RiskAssessmentCreateMutation, + RiskAssessmentUpdate: RiskAssessmentUpdateMutation, + RiskAssessmentRemove: RiskAssessmentRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'RiskAssessment', + path: '/4_0_0/RiskAssessment/:id', + query: RiskAssessmentInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/riskassessment/resolver.js b/src/resources/4_0_0/profiles/riskassessment/resolver.js new file mode 100644 index 00000000..719040b7 --- /dev/null +++ b/src/resources/4_0_0/profiles/riskassessment/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getRiskAssessment + * @static + * @summary RiskAssessment resolver. + */ +module.exports.getRiskAssessment = function getRiskAssessment( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getRiskAssessmentList + * @static + * @summary RiskAssessment list resolver. + */ +module.exports.getRiskAssessmentList = function getRiskAssessmentList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getRiskAssessmentInstance + * @static + * @summary RiskAssessment instance resolver. + */ +module.exports.getRiskAssessmentInstance = function getRiskAssessmentInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createRiskAssessment + * @static + * @summary Create RiskAssessment resolver. + */ +module.exports.createRiskAssessment = function createRiskAssessment( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateRiskAssessment + * @static + * @summary Update RiskAssessment resolver. + */ +module.exports.updateRiskAssessment = function updateRiskAssessment( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeRiskAssessment + * @static + * @summary Remove RiskAssessment resolver. + */ +module.exports.removeRiskAssessment = function removeRiskAssessment( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/riskevidencesynthesis/mutation.js b/src/resources/4_0_0/profiles/riskevidencesynthesis/mutation.js new file mode 100644 index 00000000..61f26448 --- /dev/null +++ b/src/resources/4_0_0/profiles/riskevidencesynthesis/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const RiskEvidenceSynthesisSchema = require('../../schemas/riskevidencesynthesis.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const RiskEvidenceSynthesisInput = require('../../inputs/riskevidencesynthesis.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createRiskEvidenceSynthesis, + updateRiskEvidenceSynthesis, + removeRiskEvidenceSynthesis, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'RiskEvidenceSynthesis', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a RiskEvidenceSynthesis record.', + }, + resource: { + type: new GraphQLNonNull(RiskEvidenceSynthesisInput), + description: 'RiskEvidenceSynthesis Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a RiskEvidenceSynthesis record for deletion.', + }, +}; + +/** + * @name exports.RiskEvidenceSynthesisCreateMutation + * @summary RiskEvidenceSynthesisCreate mutation. + */ +module.exports.RiskEvidenceSynthesisCreateMutation = { + description: 'Create a RiskEvidenceSynthesis record', + resolve: scopeInvariant(scopeOptions, createRiskEvidenceSynthesis), + type: RiskEvidenceSynthesisSchema, + args: WriteArgs, +}; + +/** + * @name exports.RiskEvidenceSynthesisUpdateMutation + * @summary RiskEvidenceSynthesisUpdate mutation. + */ +module.exports.RiskEvidenceSynthesisUpdateMutation = { + description: 'Update a RiskEvidenceSynthesis record', + resolve: scopeInvariant(scopeOptions, updateRiskEvidenceSynthesis), + type: RiskEvidenceSynthesisSchema, + args: WriteArgs, +}; + +/** + * @name exports.RiskEvidenceSynthesisRemoveMutation + * @summary RiskEvidenceSynthesisRemove mutation. + */ +module.exports.RiskEvidenceSynthesisRemoveMutation = { + description: 'Remove a RiskEvidenceSynthesis record', + resolve: scopeInvariant(scopeOptions, removeRiskEvidenceSynthesis), + type: RiskEvidenceSynthesisSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/riskevidencesynthesis/query.js b/src/resources/4_0_0/profiles/riskevidencesynthesis/query.js new file mode 100644 index 00000000..a54d86b5 --- /dev/null +++ b/src/resources/4_0_0/profiles/riskevidencesynthesis/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const RiskEvidenceSynthesisSchema = require('../../schemas/riskevidencesynthesis.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const RiskEvidenceSynthesisArgs = require('../../parameters/riskevidencesynthesis.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + RiskEvidenceSynthesisArgs, +); + +// Resolvers +const { + getRiskEvidenceSynthesis, + getRiskEvidenceSynthesisList, + getRiskEvidenceSynthesisInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'RiskEvidenceSynthesis', + action: 'read', +}; + +/** + * @name exports.RiskEvidenceSynthesisQuery + * @summary RiskEvidenceSynthesis query. + */ +module.exports.RiskEvidenceSynthesisQuery = { + description: 'Query for a single RiskEvidenceSynthesis', + resolve: scopeInvariant(scopeOptions, getRiskEvidenceSynthesis), + type: RiskEvidenceSynthesisSchema, + args: args, +}; + +/** + * @name exports.RiskEvidenceSynthesisListQuery + * @summary RiskEvidenceSynthesis query. + */ +module.exports.RiskEvidenceSynthesisListQuery = { + description: 'Query for a more than or just one RiskEvidenceSynthesis', + resolve: scopeInvariant(scopeOptions, getRiskEvidenceSynthesisList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.RiskEvidenceSynthesisInstanceQuery + * @summary RiskEvidenceSynthesis query. + */ +module.exports.RiskEvidenceSynthesisInstanceQuery = { + description: 'Access information about a single RiskEvidenceSynthesis', + resolve: scopeInvariant(scopeOptions, getRiskEvidenceSynthesisInstance), + type: RiskEvidenceSynthesisSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/riskevidencesynthesis/register.js b/src/resources/4_0_0/profiles/riskevidencesynthesis/register.js new file mode 100644 index 00000000..2ffb897e --- /dev/null +++ b/src/resources/4_0_0/profiles/riskevidencesynthesis/register.js @@ -0,0 +1,48 @@ +const { + RiskEvidenceSynthesisCreateMutation, + RiskEvidenceSynthesisUpdateMutation, + RiskEvidenceSynthesisRemoveMutation, +} = require('./mutation'); + +const { + RiskEvidenceSynthesisQuery, + RiskEvidenceSynthesisListQuery, + RiskEvidenceSynthesisInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + RiskEvidenceSynthesis: RiskEvidenceSynthesisQuery, + RiskEvidenceSynthesisList: RiskEvidenceSynthesisListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + RiskEvidenceSynthesisCreate: RiskEvidenceSynthesisCreateMutation, + RiskEvidenceSynthesisUpdate: RiskEvidenceSynthesisUpdateMutation, + RiskEvidenceSynthesisRemove: RiskEvidenceSynthesisRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'RiskEvidenceSynthesis', + path: '/4_0_0/RiskEvidenceSynthesis/:id', + query: RiskEvidenceSynthesisInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/riskevidencesynthesis/resolver.js b/src/resources/4_0_0/profiles/riskevidencesynthesis/resolver.js new file mode 100644 index 00000000..73ae6d30 --- /dev/null +++ b/src/resources/4_0_0/profiles/riskevidencesynthesis/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getRiskEvidenceSynthesis + * @static + * @summary RiskEvidenceSynthesis resolver. + */ +module.exports.getRiskEvidenceSynthesis = function getRiskEvidenceSynthesis( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getRiskEvidenceSynthesisList + * @static + * @summary RiskEvidenceSynthesis list resolver. + */ +module.exports.getRiskEvidenceSynthesisList = function getRiskEvidenceSynthesisList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getRiskEvidenceSynthesisInstance + * @static + * @summary RiskEvidenceSynthesis instance resolver. + */ +module.exports.getRiskEvidenceSynthesisInstance = function getRiskEvidenceSynthesisInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createRiskEvidenceSynthesis + * @static + * @summary Create RiskEvidenceSynthesis resolver. + */ +module.exports.createRiskEvidenceSynthesis = function createRiskEvidenceSynthesis( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateRiskEvidenceSynthesis + * @static + * @summary Update RiskEvidenceSynthesis resolver. + */ +module.exports.updateRiskEvidenceSynthesis = function updateRiskEvidenceSynthesis( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeRiskEvidenceSynthesis + * @static + * @summary Remove RiskEvidenceSynthesis resolver. + */ +module.exports.removeRiskEvidenceSynthesis = function removeRiskEvidenceSynthesis( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/schedule/mutation.js b/src/resources/4_0_0/profiles/schedule/mutation.js new file mode 100644 index 00000000..dcf1ff41 --- /dev/null +++ b/src/resources/4_0_0/profiles/schedule/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const ScheduleSchema = require('../../schemas/schedule.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ScheduleInput = require('../../inputs/schedule.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSchedule, + updateSchedule, + removeSchedule, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Schedule', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Schedule record.', + }, + resource: { + type: new GraphQLNonNull(ScheduleInput), + description: 'Schedule Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Schedule record for deletion.', + }, +}; + +/** + * @name exports.ScheduleCreateMutation + * @summary ScheduleCreate mutation. + */ +module.exports.ScheduleCreateMutation = { + description: 'Create a Schedule record', + resolve: scopeInvariant(scopeOptions, createSchedule), + type: ScheduleSchema, + args: WriteArgs, +}; + +/** + * @name exports.ScheduleUpdateMutation + * @summary ScheduleUpdate mutation. + */ +module.exports.ScheduleUpdateMutation = { + description: 'Update a Schedule record', + resolve: scopeInvariant(scopeOptions, updateSchedule), + type: ScheduleSchema, + args: WriteArgs, +}; + +/** + * @name exports.ScheduleRemoveMutation + * @summary ScheduleRemove mutation. + */ +module.exports.ScheduleRemoveMutation = { + description: 'Remove a Schedule record', + resolve: scopeInvariant(scopeOptions, removeSchedule), + type: ScheduleSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/schedule/query.js b/src/resources/4_0_0/profiles/schedule/query.js new file mode 100644 index 00000000..66fbac87 --- /dev/null +++ b/src/resources/4_0_0/profiles/schedule/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ScheduleSchema = require('../../schemas/schedule.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ScheduleArgs = require('../../parameters/schedule.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ScheduleArgs); + +// Resolvers +const { + getSchedule, + getScheduleList, + getScheduleInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Schedule', + action: 'read', +}; + +/** + * @name exports.ScheduleQuery + * @summary Schedule query. + */ +module.exports.ScheduleQuery = { + description: 'Query for a single Schedule', + resolve: scopeInvariant(scopeOptions, getSchedule), + type: ScheduleSchema, + args: args, +}; + +/** + * @name exports.ScheduleListQuery + * @summary Schedule query. + */ +module.exports.ScheduleListQuery = { + description: 'Query for a more than or just one Schedule', + resolve: scopeInvariant(scopeOptions, getScheduleList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ScheduleInstanceQuery + * @summary Schedule query. + */ +module.exports.ScheduleInstanceQuery = { + description: 'Access information about a single Schedule', + resolve: scopeInvariant(scopeOptions, getScheduleInstance), + type: ScheduleSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/schedule/register.js b/src/resources/4_0_0/profiles/schedule/register.js new file mode 100644 index 00000000..8f610e60 --- /dev/null +++ b/src/resources/4_0_0/profiles/schedule/register.js @@ -0,0 +1,48 @@ +const { + ScheduleCreateMutation, + ScheduleUpdateMutation, + ScheduleRemoveMutation, +} = require('./mutation'); + +const { + ScheduleQuery, + ScheduleListQuery, + ScheduleInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Schedule: ScheduleQuery, + ScheduleList: ScheduleListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ScheduleCreate: ScheduleCreateMutation, + ScheduleUpdate: ScheduleUpdateMutation, + ScheduleRemove: ScheduleRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Schedule', + path: '/4_0_0/Schedule/:id', + query: ScheduleInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/schedule/resolver.js b/src/resources/4_0_0/profiles/schedule/resolver.js new file mode 100644 index 00000000..759d0a83 --- /dev/null +++ b/src/resources/4_0_0/profiles/schedule/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSchedule + * @static + * @summary Schedule resolver. + */ +module.exports.getSchedule = function getSchedule( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getScheduleList + * @static + * @summary Schedule list resolver. + */ +module.exports.getScheduleList = function getScheduleList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getScheduleInstance + * @static + * @summary Schedule instance resolver. + */ +module.exports.getScheduleInstance = function getScheduleInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSchedule + * @static + * @summary Create Schedule resolver. + */ +module.exports.createSchedule = function createSchedule( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSchedule + * @static + * @summary Update Schedule resolver. + */ +module.exports.updateSchedule = function updateSchedule( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSchedule + * @static + * @summary Remove Schedule resolver. + */ +module.exports.removeSchedule = function removeSchedule( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/searchparameter/mutation.js b/src/resources/4_0_0/profiles/searchparameter/mutation.js new file mode 100644 index 00000000..acc8e818 --- /dev/null +++ b/src/resources/4_0_0/profiles/searchparameter/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const SearchParameterSchema = require('../../schemas/searchparameter.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SearchParameterInput = require('../../inputs/searchparameter.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSearchParameter, + updateSearchParameter, + removeSearchParameter, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SearchParameter', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a SearchParameter record.', + }, + resource: { + type: new GraphQLNonNull(SearchParameterInput), + description: 'SearchParameter Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a SearchParameter record for deletion.', + }, +}; + +/** + * @name exports.SearchParameterCreateMutation + * @summary SearchParameterCreate mutation. + */ +module.exports.SearchParameterCreateMutation = { + description: 'Create a SearchParameter record', + resolve: scopeInvariant(scopeOptions, createSearchParameter), + type: SearchParameterSchema, + args: WriteArgs, +}; + +/** + * @name exports.SearchParameterUpdateMutation + * @summary SearchParameterUpdate mutation. + */ +module.exports.SearchParameterUpdateMutation = { + description: 'Update a SearchParameter record', + resolve: scopeInvariant(scopeOptions, updateSearchParameter), + type: SearchParameterSchema, + args: WriteArgs, +}; + +/** + * @name exports.SearchParameterRemoveMutation + * @summary SearchParameterRemove mutation. + */ +module.exports.SearchParameterRemoveMutation = { + description: 'Remove a SearchParameter record', + resolve: scopeInvariant(scopeOptions, removeSearchParameter), + type: SearchParameterSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/searchparameter/query.js b/src/resources/4_0_0/profiles/searchparameter/query.js new file mode 100644 index 00000000..c3353844 --- /dev/null +++ b/src/resources/4_0_0/profiles/searchparameter/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SearchParameterSchema = require('../../schemas/searchparameter.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SearchParameterArgs = require('../../parameters/searchparameter.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SearchParameterArgs, +); + +// Resolvers +const { + getSearchParameter, + getSearchParameterList, + getSearchParameterInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SearchParameter', + action: 'read', +}; + +/** + * @name exports.SearchParameterQuery + * @summary SearchParameter query. + */ +module.exports.SearchParameterQuery = { + description: 'Query for a single SearchParameter', + resolve: scopeInvariant(scopeOptions, getSearchParameter), + type: SearchParameterSchema, + args: args, +}; + +/** + * @name exports.SearchParameterListQuery + * @summary SearchParameter query. + */ +module.exports.SearchParameterListQuery = { + description: 'Query for a more than or just one SearchParameter', + resolve: scopeInvariant(scopeOptions, getSearchParameterList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SearchParameterInstanceQuery + * @summary SearchParameter query. + */ +module.exports.SearchParameterInstanceQuery = { + description: 'Access information about a single SearchParameter', + resolve: scopeInvariant(scopeOptions, getSearchParameterInstance), + type: SearchParameterSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/searchparameter/register.js b/src/resources/4_0_0/profiles/searchparameter/register.js new file mode 100644 index 00000000..017b684a --- /dev/null +++ b/src/resources/4_0_0/profiles/searchparameter/register.js @@ -0,0 +1,48 @@ +const { + SearchParameterCreateMutation, + SearchParameterUpdateMutation, + SearchParameterRemoveMutation, +} = require('./mutation'); + +const { + SearchParameterQuery, + SearchParameterListQuery, + SearchParameterInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + SearchParameter: SearchParameterQuery, + SearchParameterList: SearchParameterListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SearchParameterCreate: SearchParameterCreateMutation, + SearchParameterUpdate: SearchParameterUpdateMutation, + SearchParameterRemove: SearchParameterRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'SearchParameter', + path: '/4_0_0/SearchParameter/:id', + query: SearchParameterInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/searchparameter/resolver.js b/src/resources/4_0_0/profiles/searchparameter/resolver.js new file mode 100644 index 00000000..4543ddbf --- /dev/null +++ b/src/resources/4_0_0/profiles/searchparameter/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSearchParameter + * @static + * @summary SearchParameter resolver. + */ +module.exports.getSearchParameter = function getSearchParameter( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSearchParameterList + * @static + * @summary SearchParameter list resolver. + */ +module.exports.getSearchParameterList = function getSearchParameterList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSearchParameterInstance + * @static + * @summary SearchParameter instance resolver. + */ +module.exports.getSearchParameterInstance = function getSearchParameterInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSearchParameter + * @static + * @summary Create SearchParameter resolver. + */ +module.exports.createSearchParameter = function createSearchParameter( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSearchParameter + * @static + * @summary Update SearchParameter resolver. + */ +module.exports.updateSearchParameter = function updateSearchParameter( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSearchParameter + * @static + * @summary Remove SearchParameter resolver. + */ +module.exports.removeSearchParameter = function removeSearchParameter( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/servicerequest/mutation.js b/src/resources/4_0_0/profiles/servicerequest/mutation.js new file mode 100644 index 00000000..565860e7 --- /dev/null +++ b/src/resources/4_0_0/profiles/servicerequest/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const ServiceRequestSchema = require('../../schemas/servicerequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ServiceRequestInput = require('../../inputs/servicerequest.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createServiceRequest, + updateServiceRequest, + removeServiceRequest, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ServiceRequest', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a ServiceRequest record.', + }, + resource: { + type: new GraphQLNonNull(ServiceRequestInput), + description: 'ServiceRequest Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ServiceRequest record for deletion.', + }, +}; + +/** + * @name exports.ServiceRequestCreateMutation + * @summary ServiceRequestCreate mutation. + */ +module.exports.ServiceRequestCreateMutation = { + description: 'Create a ServiceRequest record', + resolve: scopeInvariant(scopeOptions, createServiceRequest), + type: ServiceRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.ServiceRequestUpdateMutation + * @summary ServiceRequestUpdate mutation. + */ +module.exports.ServiceRequestUpdateMutation = { + description: 'Update a ServiceRequest record', + resolve: scopeInvariant(scopeOptions, updateServiceRequest), + type: ServiceRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.ServiceRequestRemoveMutation + * @summary ServiceRequestRemove mutation. + */ +module.exports.ServiceRequestRemoveMutation = { + description: 'Remove a ServiceRequest record', + resolve: scopeInvariant(scopeOptions, removeServiceRequest), + type: ServiceRequestSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/servicerequest/query.js b/src/resources/4_0_0/profiles/servicerequest/query.js new file mode 100644 index 00000000..243c3889 --- /dev/null +++ b/src/resources/4_0_0/profiles/servicerequest/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ServiceRequestSchema = require('../../schemas/servicerequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ServiceRequestArgs = require('../../parameters/servicerequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + ServiceRequestArgs, +); + +// Resolvers +const { + getServiceRequest, + getServiceRequestList, + getServiceRequestInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ServiceRequest', + action: 'read', +}; + +/** + * @name exports.ServiceRequestQuery + * @summary ServiceRequest query. + */ +module.exports.ServiceRequestQuery = { + description: 'Query for a single ServiceRequest', + resolve: scopeInvariant(scopeOptions, getServiceRequest), + type: ServiceRequestSchema, + args: args, +}; + +/** + * @name exports.ServiceRequestListQuery + * @summary ServiceRequest query. + */ +module.exports.ServiceRequestListQuery = { + description: 'Query for a more than or just one ServiceRequest', + resolve: scopeInvariant(scopeOptions, getServiceRequestList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ServiceRequestInstanceQuery + * @summary ServiceRequest query. + */ +module.exports.ServiceRequestInstanceQuery = { + description: 'Access information about a single ServiceRequest', + resolve: scopeInvariant(scopeOptions, getServiceRequestInstance), + type: ServiceRequestSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/servicerequest/register.js b/src/resources/4_0_0/profiles/servicerequest/register.js new file mode 100644 index 00000000..1703429e --- /dev/null +++ b/src/resources/4_0_0/profiles/servicerequest/register.js @@ -0,0 +1,48 @@ +const { + ServiceRequestCreateMutation, + ServiceRequestUpdateMutation, + ServiceRequestRemoveMutation, +} = require('./mutation'); + +const { + ServiceRequestQuery, + ServiceRequestListQuery, + ServiceRequestInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ServiceRequest: ServiceRequestQuery, + ServiceRequestList: ServiceRequestListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ServiceRequestCreate: ServiceRequestCreateMutation, + ServiceRequestUpdate: ServiceRequestUpdateMutation, + ServiceRequestRemove: ServiceRequestRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ServiceRequest', + path: '/4_0_0/ServiceRequest/:id', + query: ServiceRequestInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/servicerequest/resolver.js b/src/resources/4_0_0/profiles/servicerequest/resolver.js new file mode 100644 index 00000000..52ff369e --- /dev/null +++ b/src/resources/4_0_0/profiles/servicerequest/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getServiceRequest + * @static + * @summary ServiceRequest resolver. + */ +module.exports.getServiceRequest = function getServiceRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getServiceRequestList + * @static + * @summary ServiceRequest list resolver. + */ +module.exports.getServiceRequestList = function getServiceRequestList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getServiceRequestInstance + * @static + * @summary ServiceRequest instance resolver. + */ +module.exports.getServiceRequestInstance = function getServiceRequestInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createServiceRequest + * @static + * @summary Create ServiceRequest resolver. + */ +module.exports.createServiceRequest = function createServiceRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateServiceRequest + * @static + * @summary Update ServiceRequest resolver. + */ +module.exports.updateServiceRequest = function updateServiceRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeServiceRequest + * @static + * @summary Remove ServiceRequest resolver. + */ +module.exports.removeServiceRequest = function removeServiceRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/slot/mutation.js b/src/resources/4_0_0/profiles/slot/mutation.js new file mode 100644 index 00000000..8f8d16a8 --- /dev/null +++ b/src/resources/4_0_0/profiles/slot/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const SlotSchema = require('../../schemas/slot.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SlotInput = require('../../inputs/slot.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createSlot, updateSlot, removeSlot } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Slot', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Slot record.', + }, + resource: { + type: new GraphQLNonNull(SlotInput), + description: 'Slot Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a Slot record for deletion.', + }, +}; + +/** + * @name exports.SlotCreateMutation + * @summary SlotCreate mutation. + */ +module.exports.SlotCreateMutation = { + description: 'Create a Slot record', + resolve: scopeInvariant(scopeOptions, createSlot), + type: SlotSchema, + args: WriteArgs, +}; + +/** + * @name exports.SlotUpdateMutation + * @summary SlotUpdate mutation. + */ +module.exports.SlotUpdateMutation = { + description: 'Update a Slot record', + resolve: scopeInvariant(scopeOptions, updateSlot), + type: SlotSchema, + args: WriteArgs, +}; + +/** + * @name exports.SlotRemoveMutation + * @summary SlotRemove mutation. + */ +module.exports.SlotRemoveMutation = { + description: 'Remove a Slot record', + resolve: scopeInvariant(scopeOptions, removeSlot), + type: SlotSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/slot/query.js b/src/resources/4_0_0/profiles/slot/query.js new file mode 100644 index 00000000..e1006d13 --- /dev/null +++ b/src/resources/4_0_0/profiles/slot/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SlotSchema = require('../../schemas/slot.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SlotArgs = require('../../parameters/slot.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, SlotArgs); + +// Resolvers +const { getSlot, getSlotList, getSlotInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Slot', + action: 'read', +}; + +/** + * @name exports.SlotQuery + * @summary Slot query. + */ +module.exports.SlotQuery = { + description: 'Query for a single Slot', + resolve: scopeInvariant(scopeOptions, getSlot), + type: SlotSchema, + args: args, +}; + +/** + * @name exports.SlotListQuery + * @summary Slot query. + */ +module.exports.SlotListQuery = { + description: 'Query for a more than or just one Slot', + resolve: scopeInvariant(scopeOptions, getSlotList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SlotInstanceQuery + * @summary Slot query. + */ +module.exports.SlotInstanceQuery = { + description: 'Access information about a single Slot', + resolve: scopeInvariant(scopeOptions, getSlotInstance), + type: SlotSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/slot/register.js b/src/resources/4_0_0/profiles/slot/register.js new file mode 100644 index 00000000..6bf24830 --- /dev/null +++ b/src/resources/4_0_0/profiles/slot/register.js @@ -0,0 +1,44 @@ +const { + SlotCreateMutation, + SlotUpdateMutation, + SlotRemoveMutation, +} = require('./mutation'); + +const { SlotQuery, SlotListQuery, SlotInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Slot: SlotQuery, + SlotList: SlotListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SlotCreate: SlotCreateMutation, + SlotUpdate: SlotUpdateMutation, + SlotRemove: SlotRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Slot', + path: '/4_0_0/Slot/:id', + query: SlotInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/slot/resolver.js b/src/resources/4_0_0/profiles/slot/resolver.js new file mode 100644 index 00000000..6c533648 --- /dev/null +++ b/src/resources/4_0_0/profiles/slot/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getSlot + * @static + * @summary Slot resolver. + */ +module.exports.getSlot = function getSlot(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSlotList + * @static + * @summary Slot list resolver. + */ +module.exports.getSlotList = function getSlotList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSlotInstance + * @static + * @summary Slot instance resolver. + */ +module.exports.getSlotInstance = function getSlotInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSlot + * @static + * @summary Create Slot resolver. + */ +module.exports.createSlot = function createSlot( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSlot + * @static + * @summary Update Slot resolver. + */ +module.exports.updateSlot = function updateSlot( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSlot + * @static + * @summary Remove Slot resolver. + */ +module.exports.removeSlot = function removeSlot( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/specimen/mutation.js b/src/resources/4_0_0/profiles/specimen/mutation.js new file mode 100644 index 00000000..e6ec47bc --- /dev/null +++ b/src/resources/4_0_0/profiles/specimen/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const SpecimenSchema = require('../../schemas/specimen.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SpecimenInput = require('../../inputs/specimen.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSpecimen, + updateSpecimen, + removeSpecimen, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Specimen', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Specimen record.', + }, + resource: { + type: new GraphQLNonNull(SpecimenInput), + description: 'Specimen Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Specimen record for deletion.', + }, +}; + +/** + * @name exports.SpecimenCreateMutation + * @summary SpecimenCreate mutation. + */ +module.exports.SpecimenCreateMutation = { + description: 'Create a Specimen record', + resolve: scopeInvariant(scopeOptions, createSpecimen), + type: SpecimenSchema, + args: WriteArgs, +}; + +/** + * @name exports.SpecimenUpdateMutation + * @summary SpecimenUpdate mutation. + */ +module.exports.SpecimenUpdateMutation = { + description: 'Update a Specimen record', + resolve: scopeInvariant(scopeOptions, updateSpecimen), + type: SpecimenSchema, + args: WriteArgs, +}; + +/** + * @name exports.SpecimenRemoveMutation + * @summary SpecimenRemove mutation. + */ +module.exports.SpecimenRemoveMutation = { + description: 'Remove a Specimen record', + resolve: scopeInvariant(scopeOptions, removeSpecimen), + type: SpecimenSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/specimen/query.js b/src/resources/4_0_0/profiles/specimen/query.js new file mode 100644 index 00000000..a0e27d71 --- /dev/null +++ b/src/resources/4_0_0/profiles/specimen/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SpecimenSchema = require('../../schemas/specimen.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SpecimenArgs = require('../../parameters/specimen.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, SpecimenArgs); + +// Resolvers +const { + getSpecimen, + getSpecimenList, + getSpecimenInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Specimen', + action: 'read', +}; + +/** + * @name exports.SpecimenQuery + * @summary Specimen query. + */ +module.exports.SpecimenQuery = { + description: 'Query for a single Specimen', + resolve: scopeInvariant(scopeOptions, getSpecimen), + type: SpecimenSchema, + args: args, +}; + +/** + * @name exports.SpecimenListQuery + * @summary Specimen query. + */ +module.exports.SpecimenListQuery = { + description: 'Query for a more than or just one Specimen', + resolve: scopeInvariant(scopeOptions, getSpecimenList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SpecimenInstanceQuery + * @summary Specimen query. + */ +module.exports.SpecimenInstanceQuery = { + description: 'Access information about a single Specimen', + resolve: scopeInvariant(scopeOptions, getSpecimenInstance), + type: SpecimenSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/specimen/register.js b/src/resources/4_0_0/profiles/specimen/register.js new file mode 100644 index 00000000..763b537a --- /dev/null +++ b/src/resources/4_0_0/profiles/specimen/register.js @@ -0,0 +1,48 @@ +const { + SpecimenCreateMutation, + SpecimenUpdateMutation, + SpecimenRemoveMutation, +} = require('./mutation'); + +const { + SpecimenQuery, + SpecimenListQuery, + SpecimenInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Specimen: SpecimenQuery, + SpecimenList: SpecimenListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SpecimenCreate: SpecimenCreateMutation, + SpecimenUpdate: SpecimenUpdateMutation, + SpecimenRemove: SpecimenRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Specimen', + path: '/4_0_0/Specimen/:id', + query: SpecimenInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/specimen/resolver.js b/src/resources/4_0_0/profiles/specimen/resolver.js new file mode 100644 index 00000000..3c829e26 --- /dev/null +++ b/src/resources/4_0_0/profiles/specimen/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSpecimen + * @static + * @summary Specimen resolver. + */ +module.exports.getSpecimen = function getSpecimen( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSpecimenList + * @static + * @summary Specimen list resolver. + */ +module.exports.getSpecimenList = function getSpecimenList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSpecimenInstance + * @static + * @summary Specimen instance resolver. + */ +module.exports.getSpecimenInstance = function getSpecimenInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSpecimen + * @static + * @summary Create Specimen resolver. + */ +module.exports.createSpecimen = function createSpecimen( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSpecimen + * @static + * @summary Update Specimen resolver. + */ +module.exports.updateSpecimen = function updateSpecimen( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSpecimen + * @static + * @summary Remove Specimen resolver. + */ +module.exports.removeSpecimen = function removeSpecimen( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/specimendefinition/mutation.js b/src/resources/4_0_0/profiles/specimendefinition/mutation.js new file mode 100644 index 00000000..4a090036 --- /dev/null +++ b/src/resources/4_0_0/profiles/specimendefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const SpecimenDefinitionSchema = require('../../schemas/specimendefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SpecimenDefinitionInput = require('../../inputs/specimendefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSpecimenDefinition, + updateSpecimenDefinition, + removeSpecimenDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SpecimenDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a SpecimenDefinition record.', + }, + resource: { + type: new GraphQLNonNull(SpecimenDefinitionInput), + description: 'SpecimenDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a SpecimenDefinition record for deletion.', + }, +}; + +/** + * @name exports.SpecimenDefinitionCreateMutation + * @summary SpecimenDefinitionCreate mutation. + */ +module.exports.SpecimenDefinitionCreateMutation = { + description: 'Create a SpecimenDefinition record', + resolve: scopeInvariant(scopeOptions, createSpecimenDefinition), + type: SpecimenDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.SpecimenDefinitionUpdateMutation + * @summary SpecimenDefinitionUpdate mutation. + */ +module.exports.SpecimenDefinitionUpdateMutation = { + description: 'Update a SpecimenDefinition record', + resolve: scopeInvariant(scopeOptions, updateSpecimenDefinition), + type: SpecimenDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.SpecimenDefinitionRemoveMutation + * @summary SpecimenDefinitionRemove mutation. + */ +module.exports.SpecimenDefinitionRemoveMutation = { + description: 'Remove a SpecimenDefinition record', + resolve: scopeInvariant(scopeOptions, removeSpecimenDefinition), + type: SpecimenDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/specimendefinition/query.js b/src/resources/4_0_0/profiles/specimendefinition/query.js new file mode 100644 index 00000000..6a2fcc61 --- /dev/null +++ b/src/resources/4_0_0/profiles/specimendefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SpecimenDefinitionSchema = require('../../schemas/specimendefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SpecimenDefinitionArgs = require('../../parameters/specimendefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SpecimenDefinitionArgs, +); + +// Resolvers +const { + getSpecimenDefinition, + getSpecimenDefinitionList, + getSpecimenDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SpecimenDefinition', + action: 'read', +}; + +/** + * @name exports.SpecimenDefinitionQuery + * @summary SpecimenDefinition query. + */ +module.exports.SpecimenDefinitionQuery = { + description: 'Query for a single SpecimenDefinition', + resolve: scopeInvariant(scopeOptions, getSpecimenDefinition), + type: SpecimenDefinitionSchema, + args: args, +}; + +/** + * @name exports.SpecimenDefinitionListQuery + * @summary SpecimenDefinition query. + */ +module.exports.SpecimenDefinitionListQuery = { + description: 'Query for a more than or just one SpecimenDefinition', + resolve: scopeInvariant(scopeOptions, getSpecimenDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SpecimenDefinitionInstanceQuery + * @summary SpecimenDefinition query. + */ +module.exports.SpecimenDefinitionInstanceQuery = { + description: 'Access information about a single SpecimenDefinition', + resolve: scopeInvariant(scopeOptions, getSpecimenDefinitionInstance), + type: SpecimenDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/specimendefinition/register.js b/src/resources/4_0_0/profiles/specimendefinition/register.js new file mode 100644 index 00000000..10ca5c28 --- /dev/null +++ b/src/resources/4_0_0/profiles/specimendefinition/register.js @@ -0,0 +1,48 @@ +const { + SpecimenDefinitionCreateMutation, + SpecimenDefinitionUpdateMutation, + SpecimenDefinitionRemoveMutation, +} = require('./mutation'); + +const { + SpecimenDefinitionQuery, + SpecimenDefinitionListQuery, + SpecimenDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + SpecimenDefinition: SpecimenDefinitionQuery, + SpecimenDefinitionList: SpecimenDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SpecimenDefinitionCreate: SpecimenDefinitionCreateMutation, + SpecimenDefinitionUpdate: SpecimenDefinitionUpdateMutation, + SpecimenDefinitionRemove: SpecimenDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'SpecimenDefinition', + path: '/4_0_0/SpecimenDefinition/:id', + query: SpecimenDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/specimendefinition/resolver.js b/src/resources/4_0_0/profiles/specimendefinition/resolver.js new file mode 100644 index 00000000..16588a01 --- /dev/null +++ b/src/resources/4_0_0/profiles/specimendefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSpecimenDefinition + * @static + * @summary SpecimenDefinition resolver. + */ +module.exports.getSpecimenDefinition = function getSpecimenDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSpecimenDefinitionList + * @static + * @summary SpecimenDefinition list resolver. + */ +module.exports.getSpecimenDefinitionList = function getSpecimenDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSpecimenDefinitionInstance + * @static + * @summary SpecimenDefinition instance resolver. + */ +module.exports.getSpecimenDefinitionInstance = function getSpecimenDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSpecimenDefinition + * @static + * @summary Create SpecimenDefinition resolver. + */ +module.exports.createSpecimenDefinition = function createSpecimenDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSpecimenDefinition + * @static + * @summary Update SpecimenDefinition resolver. + */ +module.exports.updateSpecimenDefinition = function updateSpecimenDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSpecimenDefinition + * @static + * @summary Remove SpecimenDefinition resolver. + */ +module.exports.removeSpecimenDefinition = function removeSpecimenDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/structuredefinition/mutation.js b/src/resources/4_0_0/profiles/structuredefinition/mutation.js new file mode 100644 index 00000000..4e1ddcec --- /dev/null +++ b/src/resources/4_0_0/profiles/structuredefinition/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const StructureDefinitionInput = require('../../inputs/structuredefinition.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createStructureDefinition, + updateStructureDefinition, + removeStructureDefinition, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'StructureDefinition', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a StructureDefinition record.', + }, + resource: { + type: new GraphQLNonNull(StructureDefinitionInput), + description: 'StructureDefinition Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a StructureDefinition record for deletion.', + }, +}; + +/** + * @name exports.StructureDefinitionCreateMutation + * @summary StructureDefinitionCreate mutation. + */ +module.exports.StructureDefinitionCreateMutation = { + description: 'Create a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, createStructureDefinition), + type: StructureDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.StructureDefinitionUpdateMutation + * @summary StructureDefinitionUpdate mutation. + */ +module.exports.StructureDefinitionUpdateMutation = { + description: 'Update a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, updateStructureDefinition), + type: StructureDefinitionSchema, + args: WriteArgs, +}; + +/** + * @name exports.StructureDefinitionRemoveMutation + * @summary StructureDefinitionRemove mutation. + */ +module.exports.StructureDefinitionRemoveMutation = { + description: 'Remove a StructureDefinition record', + resolve: scopeInvariant(scopeOptions, removeStructureDefinition), + type: StructureDefinitionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/structuredefinition/query.js b/src/resources/4_0_0/profiles/structuredefinition/query.js new file mode 100644 index 00000000..512c2a88 --- /dev/null +++ b/src/resources/4_0_0/profiles/structuredefinition/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const StructureDefinitionSchema = require('../../schemas/structuredefinition.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const StructureDefinitionArgs = require('../../parameters/structuredefinition.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + StructureDefinitionArgs, +); + +// Resolvers +const { + getStructureDefinition, + getStructureDefinitionList, + getStructureDefinitionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'StructureDefinition', + action: 'read', +}; + +/** + * @name exports.StructureDefinitionQuery + * @summary StructureDefinition query. + */ +module.exports.StructureDefinitionQuery = { + description: 'Query for a single StructureDefinition', + resolve: scopeInvariant(scopeOptions, getStructureDefinition), + type: StructureDefinitionSchema, + args: args, +}; + +/** + * @name exports.StructureDefinitionListQuery + * @summary StructureDefinition query. + */ +module.exports.StructureDefinitionListQuery = { + description: 'Query for a more than or just one StructureDefinition', + resolve: scopeInvariant(scopeOptions, getStructureDefinitionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.StructureDefinitionInstanceQuery + * @summary StructureDefinition query. + */ +module.exports.StructureDefinitionInstanceQuery = { + description: 'Access information about a single StructureDefinition', + resolve: scopeInvariant(scopeOptions, getStructureDefinitionInstance), + type: StructureDefinitionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/structuredefinition/register.js b/src/resources/4_0_0/profiles/structuredefinition/register.js new file mode 100644 index 00000000..2bda25cc --- /dev/null +++ b/src/resources/4_0_0/profiles/structuredefinition/register.js @@ -0,0 +1,48 @@ +const { + StructureDefinitionCreateMutation, + StructureDefinitionUpdateMutation, + StructureDefinitionRemoveMutation, +} = require('./mutation'); + +const { + StructureDefinitionQuery, + StructureDefinitionListQuery, + StructureDefinitionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + StructureDefinition: StructureDefinitionQuery, + StructureDefinitionList: StructureDefinitionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + StructureDefinitionCreate: StructureDefinitionCreateMutation, + StructureDefinitionUpdate: StructureDefinitionUpdateMutation, + StructureDefinitionRemove: StructureDefinitionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'StructureDefinition', + path: '/4_0_0/StructureDefinition/:id', + query: StructureDefinitionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/structuredefinition/resolver.js b/src/resources/4_0_0/profiles/structuredefinition/resolver.js new file mode 100644 index 00000000..66e0cc14 --- /dev/null +++ b/src/resources/4_0_0/profiles/structuredefinition/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getStructureDefinition + * @static + * @summary StructureDefinition resolver. + */ +module.exports.getStructureDefinition = function getStructureDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getStructureDefinitionList + * @static + * @summary StructureDefinition list resolver. + */ +module.exports.getStructureDefinitionList = function getStructureDefinitionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getStructureDefinitionInstance + * @static + * @summary StructureDefinition instance resolver. + */ +module.exports.getStructureDefinitionInstance = function getStructureDefinitionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createStructureDefinition + * @static + * @summary Create StructureDefinition resolver. + */ +module.exports.createStructureDefinition = function createStructureDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateStructureDefinition + * @static + * @summary Update StructureDefinition resolver. + */ +module.exports.updateStructureDefinition = function updateStructureDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeStructureDefinition + * @static + * @summary Remove StructureDefinition resolver. + */ +module.exports.removeStructureDefinition = function removeStructureDefinition( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/structuremap/mutation.js b/src/resources/4_0_0/profiles/structuremap/mutation.js new file mode 100644 index 00000000..dbd218ae --- /dev/null +++ b/src/resources/4_0_0/profiles/structuremap/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const StructureMapSchema = require('../../schemas/structuremap.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const StructureMapInput = require('../../inputs/structuremap.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createStructureMap, + updateStructureMap, + removeStructureMap, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'StructureMap', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a StructureMap record.', + }, + resource: { + type: new GraphQLNonNull(StructureMapInput), + description: 'StructureMap Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a StructureMap record for deletion.', + }, +}; + +/** + * @name exports.StructureMapCreateMutation + * @summary StructureMapCreate mutation. + */ +module.exports.StructureMapCreateMutation = { + description: 'Create a StructureMap record', + resolve: scopeInvariant(scopeOptions, createStructureMap), + type: StructureMapSchema, + args: WriteArgs, +}; + +/** + * @name exports.StructureMapUpdateMutation + * @summary StructureMapUpdate mutation. + */ +module.exports.StructureMapUpdateMutation = { + description: 'Update a StructureMap record', + resolve: scopeInvariant(scopeOptions, updateStructureMap), + type: StructureMapSchema, + args: WriteArgs, +}; + +/** + * @name exports.StructureMapRemoveMutation + * @summary StructureMapRemove mutation. + */ +module.exports.StructureMapRemoveMutation = { + description: 'Remove a StructureMap record', + resolve: scopeInvariant(scopeOptions, removeStructureMap), + type: StructureMapSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/structuremap/query.js b/src/resources/4_0_0/profiles/structuremap/query.js new file mode 100644 index 00000000..c6c49523 --- /dev/null +++ b/src/resources/4_0_0/profiles/structuremap/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const StructureMapSchema = require('../../schemas/structuremap.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const StructureMapArgs = require('../../parameters/structuremap.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + StructureMapArgs, +); + +// Resolvers +const { + getStructureMap, + getStructureMapList, + getStructureMapInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'StructureMap', + action: 'read', +}; + +/** + * @name exports.StructureMapQuery + * @summary StructureMap query. + */ +module.exports.StructureMapQuery = { + description: 'Query for a single StructureMap', + resolve: scopeInvariant(scopeOptions, getStructureMap), + type: StructureMapSchema, + args: args, +}; + +/** + * @name exports.StructureMapListQuery + * @summary StructureMap query. + */ +module.exports.StructureMapListQuery = { + description: 'Query for a more than or just one StructureMap', + resolve: scopeInvariant(scopeOptions, getStructureMapList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.StructureMapInstanceQuery + * @summary StructureMap query. + */ +module.exports.StructureMapInstanceQuery = { + description: 'Access information about a single StructureMap', + resolve: scopeInvariant(scopeOptions, getStructureMapInstance), + type: StructureMapSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/structuremap/register.js b/src/resources/4_0_0/profiles/structuremap/register.js new file mode 100644 index 00000000..761833b0 --- /dev/null +++ b/src/resources/4_0_0/profiles/structuremap/register.js @@ -0,0 +1,48 @@ +const { + StructureMapCreateMutation, + StructureMapUpdateMutation, + StructureMapRemoveMutation, +} = require('./mutation'); + +const { + StructureMapQuery, + StructureMapListQuery, + StructureMapInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + StructureMap: StructureMapQuery, + StructureMapList: StructureMapListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + StructureMapCreate: StructureMapCreateMutation, + StructureMapUpdate: StructureMapUpdateMutation, + StructureMapRemove: StructureMapRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'StructureMap', + path: '/4_0_0/StructureMap/:id', + query: StructureMapInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/structuremap/resolver.js b/src/resources/4_0_0/profiles/structuremap/resolver.js new file mode 100644 index 00000000..06b9e453 --- /dev/null +++ b/src/resources/4_0_0/profiles/structuremap/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getStructureMap + * @static + * @summary StructureMap resolver. + */ +module.exports.getStructureMap = function getStructureMap( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getStructureMapList + * @static + * @summary StructureMap list resolver. + */ +module.exports.getStructureMapList = function getStructureMapList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getStructureMapInstance + * @static + * @summary StructureMap instance resolver. + */ +module.exports.getStructureMapInstance = function getStructureMapInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createStructureMap + * @static + * @summary Create StructureMap resolver. + */ +module.exports.createStructureMap = function createStructureMap( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateStructureMap + * @static + * @summary Update StructureMap resolver. + */ +module.exports.updateStructureMap = function updateStructureMap( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeStructureMap + * @static + * @summary Remove StructureMap resolver. + */ +module.exports.removeStructureMap = function removeStructureMap( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/subscription/mutation.js b/src/resources/4_0_0/profiles/subscription/mutation.js new file mode 100644 index 00000000..e23edf53 --- /dev/null +++ b/src/resources/4_0_0/profiles/subscription/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const SubscriptionSchema = require('../../schemas/subscription.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SubscriptionInput = require('../../inputs/subscription.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSubscription, + updateSubscription, + removeSubscription, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Subscription', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a Subscription record.', + }, + resource: { + type: new GraphQLNonNull(SubscriptionInput), + description: 'Subscription Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Subscription record for deletion.', + }, +}; + +/** + * @name exports.SubscriptionCreateMutation + * @summary SubscriptionCreate mutation. + */ +module.exports.SubscriptionCreateMutation = { + description: 'Create a Subscription record', + resolve: scopeInvariant(scopeOptions, createSubscription), + type: SubscriptionSchema, + args: WriteArgs, +}; + +/** + * @name exports.SubscriptionUpdateMutation + * @summary SubscriptionUpdate mutation. + */ +module.exports.SubscriptionUpdateMutation = { + description: 'Update a Subscription record', + resolve: scopeInvariant(scopeOptions, updateSubscription), + type: SubscriptionSchema, + args: WriteArgs, +}; + +/** + * @name exports.SubscriptionRemoveMutation + * @summary SubscriptionRemove mutation. + */ +module.exports.SubscriptionRemoveMutation = { + description: 'Remove a Subscription record', + resolve: scopeInvariant(scopeOptions, removeSubscription), + type: SubscriptionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/subscription/query.js b/src/resources/4_0_0/profiles/subscription/query.js new file mode 100644 index 00000000..ca7cdfc3 --- /dev/null +++ b/src/resources/4_0_0/profiles/subscription/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SubscriptionSchema = require('../../schemas/subscription.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SubscriptionArgs = require('../../parameters/subscription.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SubscriptionArgs, +); + +// Resolvers +const { + getSubscription, + getSubscriptionList, + getSubscriptionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Subscription', + action: 'read', +}; + +/** + * @name exports.SubscriptionQuery + * @summary Subscription query. + */ +module.exports.SubscriptionQuery = { + description: 'Query for a single Subscription', + resolve: scopeInvariant(scopeOptions, getSubscription), + type: SubscriptionSchema, + args: args, +}; + +/** + * @name exports.SubscriptionListQuery + * @summary Subscription query. + */ +module.exports.SubscriptionListQuery = { + description: 'Query for a more than or just one Subscription', + resolve: scopeInvariant(scopeOptions, getSubscriptionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SubscriptionInstanceQuery + * @summary Subscription query. + */ +module.exports.SubscriptionInstanceQuery = { + description: 'Access information about a single Subscription', + resolve: scopeInvariant(scopeOptions, getSubscriptionInstance), + type: SubscriptionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/subscription/register.js b/src/resources/4_0_0/profiles/subscription/register.js new file mode 100644 index 00000000..53eb5e1b --- /dev/null +++ b/src/resources/4_0_0/profiles/subscription/register.js @@ -0,0 +1,48 @@ +const { + SubscriptionCreateMutation, + SubscriptionUpdateMutation, + SubscriptionRemoveMutation, +} = require('./mutation'); + +const { + SubscriptionQuery, + SubscriptionListQuery, + SubscriptionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Subscription: SubscriptionQuery, + SubscriptionList: SubscriptionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SubscriptionCreate: SubscriptionCreateMutation, + SubscriptionUpdate: SubscriptionUpdateMutation, + SubscriptionRemove: SubscriptionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Subscription', + path: '/4_0_0/Subscription/:id', + query: SubscriptionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/subscription/resolver.js b/src/resources/4_0_0/profiles/subscription/resolver.js new file mode 100644 index 00000000..6c5c864a --- /dev/null +++ b/src/resources/4_0_0/profiles/subscription/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSubscription + * @static + * @summary Subscription resolver. + */ +module.exports.getSubscription = function getSubscription( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSubscriptionList + * @static + * @summary Subscription list resolver. + */ +module.exports.getSubscriptionList = function getSubscriptionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSubscriptionInstance + * @static + * @summary Subscription instance resolver. + */ +module.exports.getSubscriptionInstance = function getSubscriptionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSubscription + * @static + * @summary Create Subscription resolver. + */ +module.exports.createSubscription = function createSubscription( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSubscription + * @static + * @summary Update Subscription resolver. + */ +module.exports.updateSubscription = function updateSubscription( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSubscription + * @static + * @summary Remove Subscription resolver. + */ +module.exports.removeSubscription = function removeSubscription( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/substance/mutation.js b/src/resources/4_0_0/profiles/substance/mutation.js new file mode 100644 index 00000000..660b442b --- /dev/null +++ b/src/resources/4_0_0/profiles/substance/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const SubstanceSchema = require('../../schemas/substance.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SubstanceInput = require('../../inputs/substance.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSubstance, + updateSubstance, + removeSubstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Substance', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Substance record.', + }, + resource: { + type: new GraphQLNonNull(SubstanceInput), + description: 'Substance Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a Substance record for deletion.', + }, +}; + +/** + * @name exports.SubstanceCreateMutation + * @summary SubstanceCreate mutation. + */ +module.exports.SubstanceCreateMutation = { + description: 'Create a Substance record', + resolve: scopeInvariant(scopeOptions, createSubstance), + type: SubstanceSchema, + args: WriteArgs, +}; + +/** + * @name exports.SubstanceUpdateMutation + * @summary SubstanceUpdate mutation. + */ +module.exports.SubstanceUpdateMutation = { + description: 'Update a Substance record', + resolve: scopeInvariant(scopeOptions, updateSubstance), + type: SubstanceSchema, + args: WriteArgs, +}; + +/** + * @name exports.SubstanceRemoveMutation + * @summary SubstanceRemove mutation. + */ +module.exports.SubstanceRemoveMutation = { + description: 'Remove a Substance record', + resolve: scopeInvariant(scopeOptions, removeSubstance), + type: SubstanceSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/substance/query.js b/src/resources/4_0_0/profiles/substance/query.js new file mode 100644 index 00000000..6b247192 --- /dev/null +++ b/src/resources/4_0_0/profiles/substance/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SubstanceSchema = require('../../schemas/substance.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SubstanceArgs = require('../../parameters/substance.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, SubstanceArgs); + +// Resolvers +const { + getSubstance, + getSubstanceList, + getSubstanceInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Substance', + action: 'read', +}; + +/** + * @name exports.SubstanceQuery + * @summary Substance query. + */ +module.exports.SubstanceQuery = { + description: 'Query for a single Substance', + resolve: scopeInvariant(scopeOptions, getSubstance), + type: SubstanceSchema, + args: args, +}; + +/** + * @name exports.SubstanceListQuery + * @summary Substance query. + */ +module.exports.SubstanceListQuery = { + description: 'Query for a more than or just one Substance', + resolve: scopeInvariant(scopeOptions, getSubstanceList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SubstanceInstanceQuery + * @summary Substance query. + */ +module.exports.SubstanceInstanceQuery = { + description: 'Access information about a single Substance', + resolve: scopeInvariant(scopeOptions, getSubstanceInstance), + type: SubstanceSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/substance/register.js b/src/resources/4_0_0/profiles/substance/register.js new file mode 100644 index 00000000..f0c49127 --- /dev/null +++ b/src/resources/4_0_0/profiles/substance/register.js @@ -0,0 +1,48 @@ +const { + SubstanceCreateMutation, + SubstanceUpdateMutation, + SubstanceRemoveMutation, +} = require('./mutation'); + +const { + SubstanceQuery, + SubstanceListQuery, + SubstanceInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Substance: SubstanceQuery, + SubstanceList: SubstanceListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SubstanceCreate: SubstanceCreateMutation, + SubstanceUpdate: SubstanceUpdateMutation, + SubstanceRemove: SubstanceRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Substance', + path: '/4_0_0/Substance/:id', + query: SubstanceInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/substance/resolver.js b/src/resources/4_0_0/profiles/substance/resolver.js new file mode 100644 index 00000000..2c04b7f3 --- /dev/null +++ b/src/resources/4_0_0/profiles/substance/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSubstance + * @static + * @summary Substance resolver. + */ +module.exports.getSubstance = function getSubstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSubstanceList + * @static + * @summary Substance list resolver. + */ +module.exports.getSubstanceList = function getSubstanceList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSubstanceInstance + * @static + * @summary Substance instance resolver. + */ +module.exports.getSubstanceInstance = function getSubstanceInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSubstance + * @static + * @summary Create Substance resolver. + */ +module.exports.createSubstance = function createSubstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSubstance + * @static + * @summary Update Substance resolver. + */ +module.exports.updateSubstance = function updateSubstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSubstance + * @static + * @summary Remove Substance resolver. + */ +module.exports.removeSubstance = function removeSubstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/substancespecification/mutation.js b/src/resources/4_0_0/profiles/substancespecification/mutation.js new file mode 100644 index 00000000..c09c7da9 --- /dev/null +++ b/src/resources/4_0_0/profiles/substancespecification/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const SubstanceSpecificationSchema = require('../../schemas/substancespecification.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SubstanceSpecificationInput = require('../../inputs/substancespecification.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSubstanceSpecification, + updateSubstanceSpecification, + removeSubstanceSpecification, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SubstanceSpecification', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a SubstanceSpecification record.', + }, + resource: { + type: new GraphQLNonNull(SubstanceSpecificationInput), + description: 'SubstanceSpecification Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a SubstanceSpecification record for deletion.', + }, +}; + +/** + * @name exports.SubstanceSpecificationCreateMutation + * @summary SubstanceSpecificationCreate mutation. + */ +module.exports.SubstanceSpecificationCreateMutation = { + description: 'Create a SubstanceSpecification record', + resolve: scopeInvariant(scopeOptions, createSubstanceSpecification), + type: SubstanceSpecificationSchema, + args: WriteArgs, +}; + +/** + * @name exports.SubstanceSpecificationUpdateMutation + * @summary SubstanceSpecificationUpdate mutation. + */ +module.exports.SubstanceSpecificationUpdateMutation = { + description: 'Update a SubstanceSpecification record', + resolve: scopeInvariant(scopeOptions, updateSubstanceSpecification), + type: SubstanceSpecificationSchema, + args: WriteArgs, +}; + +/** + * @name exports.SubstanceSpecificationRemoveMutation + * @summary SubstanceSpecificationRemove mutation. + */ +module.exports.SubstanceSpecificationRemoveMutation = { + description: 'Remove a SubstanceSpecification record', + resolve: scopeInvariant(scopeOptions, removeSubstanceSpecification), + type: SubstanceSpecificationSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/substancespecification/query.js b/src/resources/4_0_0/profiles/substancespecification/query.js new file mode 100644 index 00000000..21f952b2 --- /dev/null +++ b/src/resources/4_0_0/profiles/substancespecification/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SubstanceSpecificationSchema = require('../../schemas/substancespecification.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SubstanceSpecificationArgs = require('../../parameters/substancespecification.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SubstanceSpecificationArgs, +); + +// Resolvers +const { + getSubstanceSpecification, + getSubstanceSpecificationList, + getSubstanceSpecificationInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SubstanceSpecification', + action: 'read', +}; + +/** + * @name exports.SubstanceSpecificationQuery + * @summary SubstanceSpecification query. + */ +module.exports.SubstanceSpecificationQuery = { + description: 'Query for a single SubstanceSpecification', + resolve: scopeInvariant(scopeOptions, getSubstanceSpecification), + type: SubstanceSpecificationSchema, + args: args, +}; + +/** + * @name exports.SubstanceSpecificationListQuery + * @summary SubstanceSpecification query. + */ +module.exports.SubstanceSpecificationListQuery = { + description: 'Query for a more than or just one SubstanceSpecification', + resolve: scopeInvariant(scopeOptions, getSubstanceSpecificationList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SubstanceSpecificationInstanceQuery + * @summary SubstanceSpecification query. + */ +module.exports.SubstanceSpecificationInstanceQuery = { + description: 'Access information about a single SubstanceSpecification', + resolve: scopeInvariant(scopeOptions, getSubstanceSpecificationInstance), + type: SubstanceSpecificationSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/substancespecification/register.js b/src/resources/4_0_0/profiles/substancespecification/register.js new file mode 100644 index 00000000..7838fef3 --- /dev/null +++ b/src/resources/4_0_0/profiles/substancespecification/register.js @@ -0,0 +1,48 @@ +const { + SubstanceSpecificationCreateMutation, + SubstanceSpecificationUpdateMutation, + SubstanceSpecificationRemoveMutation, +} = require('./mutation'); + +const { + SubstanceSpecificationQuery, + SubstanceSpecificationListQuery, + SubstanceSpecificationInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + SubstanceSpecification: SubstanceSpecificationQuery, + SubstanceSpecificationList: SubstanceSpecificationListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SubstanceSpecificationCreate: SubstanceSpecificationCreateMutation, + SubstanceSpecificationUpdate: SubstanceSpecificationUpdateMutation, + SubstanceSpecificationRemove: SubstanceSpecificationRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'SubstanceSpecification', + path: '/4_0_0/SubstanceSpecification/:id', + query: SubstanceSpecificationInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/substancespecification/resolver.js b/src/resources/4_0_0/profiles/substancespecification/resolver.js new file mode 100644 index 00000000..2fae3656 --- /dev/null +++ b/src/resources/4_0_0/profiles/substancespecification/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSubstanceSpecification + * @static + * @summary SubstanceSpecification resolver. + */ +module.exports.getSubstanceSpecification = function getSubstanceSpecification( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSubstanceSpecificationList + * @static + * @summary SubstanceSpecification list resolver. + */ +module.exports.getSubstanceSpecificationList = function getSubstanceSpecificationList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSubstanceSpecificationInstance + * @static + * @summary SubstanceSpecification instance resolver. + */ +module.exports.getSubstanceSpecificationInstance = function getSubstanceSpecificationInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSubstanceSpecification + * @static + * @summary Create SubstanceSpecification resolver. + */ +module.exports.createSubstanceSpecification = function createSubstanceSpecification( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSubstanceSpecification + * @static + * @summary Update SubstanceSpecification resolver. + */ +module.exports.updateSubstanceSpecification = function updateSubstanceSpecification( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSubstanceSpecification + * @static + * @summary Remove SubstanceSpecification resolver. + */ +module.exports.removeSubstanceSpecification = function removeSubstanceSpecification( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/supplydelivery/mutation.js b/src/resources/4_0_0/profiles/supplydelivery/mutation.js new file mode 100644 index 00000000..84b89de7 --- /dev/null +++ b/src/resources/4_0_0/profiles/supplydelivery/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SupplyDeliveryInput = require('../../inputs/supplydelivery.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSupplyDelivery, + updateSupplyDelivery, + removeSupplyDelivery, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SupplyDelivery', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a SupplyDelivery record.', + }, + resource: { + type: new GraphQLNonNull(SupplyDeliveryInput), + description: 'SupplyDelivery Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a SupplyDelivery record for deletion.', + }, +}; + +/** + * @name exports.SupplyDeliveryCreateMutation + * @summary SupplyDeliveryCreate mutation. + */ +module.exports.SupplyDeliveryCreateMutation = { + description: 'Create a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, createSupplyDelivery), + type: SupplyDeliverySchema, + args: WriteArgs, +}; + +/** + * @name exports.SupplyDeliveryUpdateMutation + * @summary SupplyDeliveryUpdate mutation. + */ +module.exports.SupplyDeliveryUpdateMutation = { + description: 'Update a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, updateSupplyDelivery), + type: SupplyDeliverySchema, + args: WriteArgs, +}; + +/** + * @name exports.SupplyDeliveryRemoveMutation + * @summary SupplyDeliveryRemove mutation. + */ +module.exports.SupplyDeliveryRemoveMutation = { + description: 'Remove a SupplyDelivery record', + resolve: scopeInvariant(scopeOptions, removeSupplyDelivery), + type: SupplyDeliverySchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/supplydelivery/query.js b/src/resources/4_0_0/profiles/supplydelivery/query.js new file mode 100644 index 00000000..9c82e549 --- /dev/null +++ b/src/resources/4_0_0/profiles/supplydelivery/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SupplyDeliverySchema = require('../../schemas/supplydelivery.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SupplyDeliveryArgs = require('../../parameters/supplydelivery.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SupplyDeliveryArgs, +); + +// Resolvers +const { + getSupplyDelivery, + getSupplyDeliveryList, + getSupplyDeliveryInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SupplyDelivery', + action: 'read', +}; + +/** + * @name exports.SupplyDeliveryQuery + * @summary SupplyDelivery query. + */ +module.exports.SupplyDeliveryQuery = { + description: 'Query for a single SupplyDelivery', + resolve: scopeInvariant(scopeOptions, getSupplyDelivery), + type: SupplyDeliverySchema, + args: args, +}; + +/** + * @name exports.SupplyDeliveryListQuery + * @summary SupplyDelivery query. + */ +module.exports.SupplyDeliveryListQuery = { + description: 'Query for a more than or just one SupplyDelivery', + resolve: scopeInvariant(scopeOptions, getSupplyDeliveryList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SupplyDeliveryInstanceQuery + * @summary SupplyDelivery query. + */ +module.exports.SupplyDeliveryInstanceQuery = { + description: 'Access information about a single SupplyDelivery', + resolve: scopeInvariant(scopeOptions, getSupplyDeliveryInstance), + type: SupplyDeliverySchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/supplydelivery/register.js b/src/resources/4_0_0/profiles/supplydelivery/register.js new file mode 100644 index 00000000..a5c77369 --- /dev/null +++ b/src/resources/4_0_0/profiles/supplydelivery/register.js @@ -0,0 +1,48 @@ +const { + SupplyDeliveryCreateMutation, + SupplyDeliveryUpdateMutation, + SupplyDeliveryRemoveMutation, +} = require('./mutation'); + +const { + SupplyDeliveryQuery, + SupplyDeliveryListQuery, + SupplyDeliveryInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + SupplyDelivery: SupplyDeliveryQuery, + SupplyDeliveryList: SupplyDeliveryListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SupplyDeliveryCreate: SupplyDeliveryCreateMutation, + SupplyDeliveryUpdate: SupplyDeliveryUpdateMutation, + SupplyDeliveryRemove: SupplyDeliveryRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'SupplyDelivery', + path: '/4_0_0/SupplyDelivery/:id', + query: SupplyDeliveryInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/supplydelivery/resolver.js b/src/resources/4_0_0/profiles/supplydelivery/resolver.js new file mode 100644 index 00000000..0ceb2dbf --- /dev/null +++ b/src/resources/4_0_0/profiles/supplydelivery/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSupplyDelivery + * @static + * @summary SupplyDelivery resolver. + */ +module.exports.getSupplyDelivery = function getSupplyDelivery( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSupplyDeliveryList + * @static + * @summary SupplyDelivery list resolver. + */ +module.exports.getSupplyDeliveryList = function getSupplyDeliveryList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSupplyDeliveryInstance + * @static + * @summary SupplyDelivery instance resolver. + */ +module.exports.getSupplyDeliveryInstance = function getSupplyDeliveryInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSupplyDelivery + * @static + * @summary Create SupplyDelivery resolver. + */ +module.exports.createSupplyDelivery = function createSupplyDelivery( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSupplyDelivery + * @static + * @summary Update SupplyDelivery resolver. + */ +module.exports.updateSupplyDelivery = function updateSupplyDelivery( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSupplyDelivery + * @static + * @summary Remove SupplyDelivery resolver. + */ +module.exports.removeSupplyDelivery = function removeSupplyDelivery( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/supplyrequest/mutation.js b/src/resources/4_0_0/profiles/supplyrequest/mutation.js new file mode 100644 index 00000000..836df5e6 --- /dev/null +++ b/src/resources/4_0_0/profiles/supplyrequest/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const SupplyRequestSchema = require('../../schemas/supplyrequest.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const SupplyRequestInput = require('../../inputs/supplyrequest.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createSupplyRequest, + updateSupplyRequest, + removeSupplyRequest, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SupplyRequest', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a SupplyRequest record.', + }, + resource: { + type: new GraphQLNonNull(SupplyRequestInput), + description: 'SupplyRequest Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a SupplyRequest record for deletion.', + }, +}; + +/** + * @name exports.SupplyRequestCreateMutation + * @summary SupplyRequestCreate mutation. + */ +module.exports.SupplyRequestCreateMutation = { + description: 'Create a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, createSupplyRequest), + type: SupplyRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.SupplyRequestUpdateMutation + * @summary SupplyRequestUpdate mutation. + */ +module.exports.SupplyRequestUpdateMutation = { + description: 'Update a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, updateSupplyRequest), + type: SupplyRequestSchema, + args: WriteArgs, +}; + +/** + * @name exports.SupplyRequestRemoveMutation + * @summary SupplyRequestRemove mutation. + */ +module.exports.SupplyRequestRemoveMutation = { + description: 'Remove a SupplyRequest record', + resolve: scopeInvariant(scopeOptions, removeSupplyRequest), + type: SupplyRequestSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/supplyrequest/query.js b/src/resources/4_0_0/profiles/supplyrequest/query.js new file mode 100644 index 00000000..a063853e --- /dev/null +++ b/src/resources/4_0_0/profiles/supplyrequest/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const SupplyRequestSchema = require('../../schemas/supplyrequest.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const SupplyRequestArgs = require('../../parameters/supplyrequest.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + SupplyRequestArgs, +); + +// Resolvers +const { + getSupplyRequest, + getSupplyRequestList, + getSupplyRequestInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'SupplyRequest', + action: 'read', +}; + +/** + * @name exports.SupplyRequestQuery + * @summary SupplyRequest query. + */ +module.exports.SupplyRequestQuery = { + description: 'Query for a single SupplyRequest', + resolve: scopeInvariant(scopeOptions, getSupplyRequest), + type: SupplyRequestSchema, + args: args, +}; + +/** + * @name exports.SupplyRequestListQuery + * @summary SupplyRequest query. + */ +module.exports.SupplyRequestListQuery = { + description: 'Query for a more than or just one SupplyRequest', + resolve: scopeInvariant(scopeOptions, getSupplyRequestList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.SupplyRequestInstanceQuery + * @summary SupplyRequest query. + */ +module.exports.SupplyRequestInstanceQuery = { + description: 'Access information about a single SupplyRequest', + resolve: scopeInvariant(scopeOptions, getSupplyRequestInstance), + type: SupplyRequestSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/supplyrequest/register.js b/src/resources/4_0_0/profiles/supplyrequest/register.js new file mode 100644 index 00000000..31359684 --- /dev/null +++ b/src/resources/4_0_0/profiles/supplyrequest/register.js @@ -0,0 +1,48 @@ +const { + SupplyRequestCreateMutation, + SupplyRequestUpdateMutation, + SupplyRequestRemoveMutation, +} = require('./mutation'); + +const { + SupplyRequestQuery, + SupplyRequestListQuery, + SupplyRequestInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + SupplyRequest: SupplyRequestQuery, + SupplyRequestList: SupplyRequestListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + SupplyRequestCreate: SupplyRequestCreateMutation, + SupplyRequestUpdate: SupplyRequestUpdateMutation, + SupplyRequestRemove: SupplyRequestRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'SupplyRequest', + path: '/4_0_0/SupplyRequest/:id', + query: SupplyRequestInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/supplyrequest/resolver.js b/src/resources/4_0_0/profiles/supplyrequest/resolver.js new file mode 100644 index 00000000..13869b26 --- /dev/null +++ b/src/resources/4_0_0/profiles/supplyrequest/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getSupplyRequest + * @static + * @summary SupplyRequest resolver. + */ +module.exports.getSupplyRequest = function getSupplyRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSupplyRequestList + * @static + * @summary SupplyRequest list resolver. + */ +module.exports.getSupplyRequestList = function getSupplyRequestList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getSupplyRequestInstance + * @static + * @summary SupplyRequest instance resolver. + */ +module.exports.getSupplyRequestInstance = function getSupplyRequestInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createSupplyRequest + * @static + * @summary Create SupplyRequest resolver. + */ +module.exports.createSupplyRequest = function createSupplyRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateSupplyRequest + * @static + * @summary Update SupplyRequest resolver. + */ +module.exports.updateSupplyRequest = function updateSupplyRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeSupplyRequest + * @static + * @summary Remove SupplyRequest resolver. + */ +module.exports.removeSupplyRequest = function removeSupplyRequest( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/task/mutation.js b/src/resources/4_0_0/profiles/task/mutation.js new file mode 100644 index 00000000..c6dc04c3 --- /dev/null +++ b/src/resources/4_0_0/profiles/task/mutation.js @@ -0,0 +1,75 @@ +// Schemas +const TaskSchema = require('../../schemas/task.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const TaskInput = require('../../inputs/task.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { createTask, updateTask, removeTask } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Task', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a Task record.', + }, + resource: { + type: new GraphQLNonNull(TaskInput), + description: 'Task Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: 'Unique identifier for selecting a Task record for deletion.', + }, +}; + +/** + * @name exports.TaskCreateMutation + * @summary TaskCreate mutation. + */ +module.exports.TaskCreateMutation = { + description: 'Create a Task record', + resolve: scopeInvariant(scopeOptions, createTask), + type: TaskSchema, + args: WriteArgs, +}; + +/** + * @name exports.TaskUpdateMutation + * @summary TaskUpdate mutation. + */ +module.exports.TaskUpdateMutation = { + description: 'Update a Task record', + resolve: scopeInvariant(scopeOptions, updateTask), + type: TaskSchema, + args: WriteArgs, +}; + +/** + * @name exports.TaskRemoveMutation + * @summary TaskRemove mutation. + */ +module.exports.TaskRemoveMutation = { + description: 'Remove a Task record', + resolve: scopeInvariant(scopeOptions, removeTask), + type: TaskSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/task/query.js b/src/resources/4_0_0/profiles/task/query.js new file mode 100644 index 00000000..c273ce78 --- /dev/null +++ b/src/resources/4_0_0/profiles/task/query.js @@ -0,0 +1,56 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const TaskSchema = require('../../schemas/task.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const TaskArgs = require('../../parameters/task.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, TaskArgs); + +// Resolvers +const { getTask, getTaskList, getTaskInstance } = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'Task', + action: 'read', +}; + +/** + * @name exports.TaskQuery + * @summary Task query. + */ +module.exports.TaskQuery = { + description: 'Query for a single Task', + resolve: scopeInvariant(scopeOptions, getTask), + type: TaskSchema, + args: args, +}; + +/** + * @name exports.TaskListQuery + * @summary Task query. + */ +module.exports.TaskListQuery = { + description: 'Query for a more than or just one Task', + resolve: scopeInvariant(scopeOptions, getTaskList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.TaskInstanceQuery + * @summary Task query. + */ +module.exports.TaskInstanceQuery = { + description: 'Access information about a single Task', + resolve: scopeInvariant(scopeOptions, getTaskInstance), + type: TaskSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/task/register.js b/src/resources/4_0_0/profiles/task/register.js new file mode 100644 index 00000000..ed00d70e --- /dev/null +++ b/src/resources/4_0_0/profiles/task/register.js @@ -0,0 +1,44 @@ +const { + TaskCreateMutation, + TaskUpdateMutation, + TaskRemoveMutation, +} = require('./mutation'); + +const { TaskQuery, TaskListQuery, TaskInstanceQuery } = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + Task: TaskQuery, + TaskList: TaskListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + TaskCreate: TaskCreateMutation, + TaskUpdate: TaskUpdateMutation, + TaskRemove: TaskRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'Task', + path: '/4_0_0/Task/:id', + query: TaskInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/task/resolver.js b/src/resources/4_0_0/profiles/task/resolver.js new file mode 100644 index 00000000..41357afa --- /dev/null +++ b/src/resources/4_0_0/profiles/task/resolver.js @@ -0,0 +1,84 @@ +/** + * @name exports.getTask + * @static + * @summary Task resolver. + */ +module.exports.getTask = function getTask(root, args, context = {}, info) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getTaskList + * @static + * @summary Task list resolver. + */ +module.exports.getTaskList = function getTaskList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getTaskInstance + * @static + * @summary Task instance resolver. + */ +module.exports.getTaskInstance = function getTaskInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createTask + * @static + * @summary Create Task resolver. + */ +module.exports.createTask = function createTask( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateTask + * @static + * @summary Update Task resolver. + */ +module.exports.updateTask = function updateTask( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeTask + * @static + * @summary Remove Task resolver. + */ +module.exports.removeTask = function removeTask( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/terminologycapabilities/mutation.js b/src/resources/4_0_0/profiles/terminologycapabilities/mutation.js new file mode 100644 index 00000000..21f1905d --- /dev/null +++ b/src/resources/4_0_0/profiles/terminologycapabilities/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const TerminologyCapabilitiesSchema = require('../../schemas/terminologycapabilities.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const TerminologyCapabilitiesInput = require('../../inputs/terminologycapabilities.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createTerminologyCapabilities, + updateTerminologyCapabilities, + removeTerminologyCapabilities, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'TerminologyCapabilities', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a TerminologyCapabilities record.', + }, + resource: { + type: new GraphQLNonNull(TerminologyCapabilitiesInput), + description: 'TerminologyCapabilities Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a TerminologyCapabilities record for deletion.', + }, +}; + +/** + * @name exports.TerminologyCapabilitiesCreateMutation + * @summary TerminologyCapabilitiesCreate mutation. + */ +module.exports.TerminologyCapabilitiesCreateMutation = { + description: 'Create a TerminologyCapabilities record', + resolve: scopeInvariant(scopeOptions, createTerminologyCapabilities), + type: TerminologyCapabilitiesSchema, + args: WriteArgs, +}; + +/** + * @name exports.TerminologyCapabilitiesUpdateMutation + * @summary TerminologyCapabilitiesUpdate mutation. + */ +module.exports.TerminologyCapabilitiesUpdateMutation = { + description: 'Update a TerminologyCapabilities record', + resolve: scopeInvariant(scopeOptions, updateTerminologyCapabilities), + type: TerminologyCapabilitiesSchema, + args: WriteArgs, +}; + +/** + * @name exports.TerminologyCapabilitiesRemoveMutation + * @summary TerminologyCapabilitiesRemove mutation. + */ +module.exports.TerminologyCapabilitiesRemoveMutation = { + description: 'Remove a TerminologyCapabilities record', + resolve: scopeInvariant(scopeOptions, removeTerminologyCapabilities), + type: TerminologyCapabilitiesSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/terminologycapabilities/query.js b/src/resources/4_0_0/profiles/terminologycapabilities/query.js new file mode 100644 index 00000000..ba6a81e4 --- /dev/null +++ b/src/resources/4_0_0/profiles/terminologycapabilities/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const TerminologyCapabilitiesSchema = require('../../schemas/terminologycapabilities.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const TerminologyCapabilitiesArgs = require('../../parameters/terminologycapabilities.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + TerminologyCapabilitiesArgs, +); + +// Resolvers +const { + getTerminologyCapabilities, + getTerminologyCapabilitiesList, + getTerminologyCapabilitiesInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'TerminologyCapabilities', + action: 'read', +}; + +/** + * @name exports.TerminologyCapabilitiesQuery + * @summary TerminologyCapabilities query. + */ +module.exports.TerminologyCapabilitiesQuery = { + description: 'Query for a single TerminologyCapabilities', + resolve: scopeInvariant(scopeOptions, getTerminologyCapabilities), + type: TerminologyCapabilitiesSchema, + args: args, +}; + +/** + * @name exports.TerminologyCapabilitiesListQuery + * @summary TerminologyCapabilities query. + */ +module.exports.TerminologyCapabilitiesListQuery = { + description: 'Query for a more than or just one TerminologyCapabilities', + resolve: scopeInvariant(scopeOptions, getTerminologyCapabilitiesList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.TerminologyCapabilitiesInstanceQuery + * @summary TerminologyCapabilities query. + */ +module.exports.TerminologyCapabilitiesInstanceQuery = { + description: 'Access information about a single TerminologyCapabilities', + resolve: scopeInvariant(scopeOptions, getTerminologyCapabilitiesInstance), + type: TerminologyCapabilitiesSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/terminologycapabilities/register.js b/src/resources/4_0_0/profiles/terminologycapabilities/register.js new file mode 100644 index 00000000..a0f02ccd --- /dev/null +++ b/src/resources/4_0_0/profiles/terminologycapabilities/register.js @@ -0,0 +1,48 @@ +const { + TerminologyCapabilitiesCreateMutation, + TerminologyCapabilitiesUpdateMutation, + TerminologyCapabilitiesRemoveMutation, +} = require('./mutation'); + +const { + TerminologyCapabilitiesQuery, + TerminologyCapabilitiesListQuery, + TerminologyCapabilitiesInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + TerminologyCapabilities: TerminologyCapabilitiesQuery, + TerminologyCapabilitiesList: TerminologyCapabilitiesListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + TerminologyCapabilitiesCreate: TerminologyCapabilitiesCreateMutation, + TerminologyCapabilitiesUpdate: TerminologyCapabilitiesUpdateMutation, + TerminologyCapabilitiesRemove: TerminologyCapabilitiesRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'TerminologyCapabilities', + path: '/4_0_0/TerminologyCapabilities/:id', + query: TerminologyCapabilitiesInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/terminologycapabilities/resolver.js b/src/resources/4_0_0/profiles/terminologycapabilities/resolver.js new file mode 100644 index 00000000..759f3f5c --- /dev/null +++ b/src/resources/4_0_0/profiles/terminologycapabilities/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getTerminologyCapabilities + * @static + * @summary TerminologyCapabilities resolver. + */ +module.exports.getTerminologyCapabilities = function getTerminologyCapabilities( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getTerminologyCapabilitiesList + * @static + * @summary TerminologyCapabilities list resolver. + */ +module.exports.getTerminologyCapabilitiesList = function getTerminologyCapabilitiesList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getTerminologyCapabilitiesInstance + * @static + * @summary TerminologyCapabilities instance resolver. + */ +module.exports.getTerminologyCapabilitiesInstance = function getTerminologyCapabilitiesInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createTerminologyCapabilities + * @static + * @summary Create TerminologyCapabilities resolver. + */ +module.exports.createTerminologyCapabilities = function createTerminologyCapabilities( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateTerminologyCapabilities + * @static + * @summary Update TerminologyCapabilities resolver. + */ +module.exports.updateTerminologyCapabilities = function updateTerminologyCapabilities( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeTerminologyCapabilities + * @static + * @summary Remove TerminologyCapabilities resolver. + */ +module.exports.removeTerminologyCapabilities = function removeTerminologyCapabilities( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/testreport/mutation.js b/src/resources/4_0_0/profiles/testreport/mutation.js new file mode 100644 index 00000000..4f34d0d4 --- /dev/null +++ b/src/resources/4_0_0/profiles/testreport/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const TestReportSchema = require('../../schemas/testreport.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const TestReportInput = require('../../inputs/testreport.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createTestReport, + updateTestReport, + removeTestReport, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'TestReport', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a TestReport record.', + }, + resource: { + type: new GraphQLNonNull(TestReportInput), + description: 'TestReport Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a TestReport record for deletion.', + }, +}; + +/** + * @name exports.TestReportCreateMutation + * @summary TestReportCreate mutation. + */ +module.exports.TestReportCreateMutation = { + description: 'Create a TestReport record', + resolve: scopeInvariant(scopeOptions, createTestReport), + type: TestReportSchema, + args: WriteArgs, +}; + +/** + * @name exports.TestReportUpdateMutation + * @summary TestReportUpdate mutation. + */ +module.exports.TestReportUpdateMutation = { + description: 'Update a TestReport record', + resolve: scopeInvariant(scopeOptions, updateTestReport), + type: TestReportSchema, + args: WriteArgs, +}; + +/** + * @name exports.TestReportRemoveMutation + * @summary TestReportRemove mutation. + */ +module.exports.TestReportRemoveMutation = { + description: 'Remove a TestReport record', + resolve: scopeInvariant(scopeOptions, removeTestReport), + type: TestReportSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/testreport/query.js b/src/resources/4_0_0/profiles/testreport/query.js new file mode 100644 index 00000000..fa76c8b1 --- /dev/null +++ b/src/resources/4_0_0/profiles/testreport/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const TestReportSchema = require('../../schemas/testreport.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const TestReportArgs = require('../../parameters/testreport.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, TestReportArgs); + +// Resolvers +const { + getTestReport, + getTestReportList, + getTestReportInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'TestReport', + action: 'read', +}; + +/** + * @name exports.TestReportQuery + * @summary TestReport query. + */ +module.exports.TestReportQuery = { + description: 'Query for a single TestReport', + resolve: scopeInvariant(scopeOptions, getTestReport), + type: TestReportSchema, + args: args, +}; + +/** + * @name exports.TestReportListQuery + * @summary TestReport query. + */ +module.exports.TestReportListQuery = { + description: 'Query for a more than or just one TestReport', + resolve: scopeInvariant(scopeOptions, getTestReportList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.TestReportInstanceQuery + * @summary TestReport query. + */ +module.exports.TestReportInstanceQuery = { + description: 'Access information about a single TestReport', + resolve: scopeInvariant(scopeOptions, getTestReportInstance), + type: TestReportSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/testreport/register.js b/src/resources/4_0_0/profiles/testreport/register.js new file mode 100644 index 00000000..03b4c497 --- /dev/null +++ b/src/resources/4_0_0/profiles/testreport/register.js @@ -0,0 +1,48 @@ +const { + TestReportCreateMutation, + TestReportUpdateMutation, + TestReportRemoveMutation, +} = require('./mutation'); + +const { + TestReportQuery, + TestReportListQuery, + TestReportInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + TestReport: TestReportQuery, + TestReportList: TestReportListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + TestReportCreate: TestReportCreateMutation, + TestReportUpdate: TestReportUpdateMutation, + TestReportRemove: TestReportRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'TestReport', + path: '/4_0_0/TestReport/:id', + query: TestReportInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/testreport/resolver.js b/src/resources/4_0_0/profiles/testreport/resolver.js new file mode 100644 index 00000000..3260283e --- /dev/null +++ b/src/resources/4_0_0/profiles/testreport/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getTestReport + * @static + * @summary TestReport resolver. + */ +module.exports.getTestReport = function getTestReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getTestReportList + * @static + * @summary TestReport list resolver. + */ +module.exports.getTestReportList = function getTestReportList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getTestReportInstance + * @static + * @summary TestReport instance resolver. + */ +module.exports.getTestReportInstance = function getTestReportInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createTestReport + * @static + * @summary Create TestReport resolver. + */ +module.exports.createTestReport = function createTestReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateTestReport + * @static + * @summary Update TestReport resolver. + */ +module.exports.updateTestReport = function updateTestReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeTestReport + * @static + * @summary Remove TestReport resolver. + */ +module.exports.removeTestReport = function removeTestReport( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/testscript/mutation.js b/src/resources/4_0_0/profiles/testscript/mutation.js new file mode 100644 index 00000000..ce962fd8 --- /dev/null +++ b/src/resources/4_0_0/profiles/testscript/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const TestScriptSchema = require('../../schemas/testscript.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const TestScriptInput = require('../../inputs/testscript.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createTestScript, + updateTestScript, + removeTestScript, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'TestScript', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a TestScript record.', + }, + resource: { + type: new GraphQLNonNull(TestScriptInput), + description: 'TestScript Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a TestScript record for deletion.', + }, +}; + +/** + * @name exports.TestScriptCreateMutation + * @summary TestScriptCreate mutation. + */ +module.exports.TestScriptCreateMutation = { + description: 'Create a TestScript record', + resolve: scopeInvariant(scopeOptions, createTestScript), + type: TestScriptSchema, + args: WriteArgs, +}; + +/** + * @name exports.TestScriptUpdateMutation + * @summary TestScriptUpdate mutation. + */ +module.exports.TestScriptUpdateMutation = { + description: 'Update a TestScript record', + resolve: scopeInvariant(scopeOptions, updateTestScript), + type: TestScriptSchema, + args: WriteArgs, +}; + +/** + * @name exports.TestScriptRemoveMutation + * @summary TestScriptRemove mutation. + */ +module.exports.TestScriptRemoveMutation = { + description: 'Remove a TestScript record', + resolve: scopeInvariant(scopeOptions, removeTestScript), + type: TestScriptSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/testscript/query.js b/src/resources/4_0_0/profiles/testscript/query.js new file mode 100644 index 00000000..75a4152c --- /dev/null +++ b/src/resources/4_0_0/profiles/testscript/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const TestScriptSchema = require('../../schemas/testscript.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const TestScriptArgs = require('../../parameters/testscript.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, TestScriptArgs); + +// Resolvers +const { + getTestScript, + getTestScriptList, + getTestScriptInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'TestScript', + action: 'read', +}; + +/** + * @name exports.TestScriptQuery + * @summary TestScript query. + */ +module.exports.TestScriptQuery = { + description: 'Query for a single TestScript', + resolve: scopeInvariant(scopeOptions, getTestScript), + type: TestScriptSchema, + args: args, +}; + +/** + * @name exports.TestScriptListQuery + * @summary TestScript query. + */ +module.exports.TestScriptListQuery = { + description: 'Query for a more than or just one TestScript', + resolve: scopeInvariant(scopeOptions, getTestScriptList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.TestScriptInstanceQuery + * @summary TestScript query. + */ +module.exports.TestScriptInstanceQuery = { + description: 'Access information about a single TestScript', + resolve: scopeInvariant(scopeOptions, getTestScriptInstance), + type: TestScriptSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/testscript/register.js b/src/resources/4_0_0/profiles/testscript/register.js new file mode 100644 index 00000000..b7913bbd --- /dev/null +++ b/src/resources/4_0_0/profiles/testscript/register.js @@ -0,0 +1,48 @@ +const { + TestScriptCreateMutation, + TestScriptUpdateMutation, + TestScriptRemoveMutation, +} = require('./mutation'); + +const { + TestScriptQuery, + TestScriptListQuery, + TestScriptInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + TestScript: TestScriptQuery, + TestScriptList: TestScriptListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + TestScriptCreate: TestScriptCreateMutation, + TestScriptUpdate: TestScriptUpdateMutation, + TestScriptRemove: TestScriptRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'TestScript', + path: '/4_0_0/TestScript/:id', + query: TestScriptInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/testscript/resolver.js b/src/resources/4_0_0/profiles/testscript/resolver.js new file mode 100644 index 00000000..10514345 --- /dev/null +++ b/src/resources/4_0_0/profiles/testscript/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getTestScript + * @static + * @summary TestScript resolver. + */ +module.exports.getTestScript = function getTestScript( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getTestScriptList + * @static + * @summary TestScript list resolver. + */ +module.exports.getTestScriptList = function getTestScriptList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getTestScriptInstance + * @static + * @summary TestScript instance resolver. + */ +module.exports.getTestScriptInstance = function getTestScriptInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createTestScript + * @static + * @summary Create TestScript resolver. + */ +module.exports.createTestScript = function createTestScript( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateTestScript + * @static + * @summary Update TestScript resolver. + */ +module.exports.updateTestScript = function updateTestScript( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeTestScript + * @static + * @summary Remove TestScript resolver. + */ +module.exports.removeTestScript = function removeTestScript( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/valueset/mutation.js b/src/resources/4_0_0/profiles/valueset/mutation.js new file mode 100644 index 00000000..bec4ef6f --- /dev/null +++ b/src/resources/4_0_0/profiles/valueset/mutation.js @@ -0,0 +1,80 @@ +// Schemas +const ValueSetSchema = require('../../schemas/valueset.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const ValueSetInput = require('../../inputs/valueset.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createValueSet, + updateValueSet, + removeValueSet, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ValueSet', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: 'Unique identifier for creating/updating a ValueSet record.', + }, + resource: { + type: new GraphQLNonNull(ValueSetInput), + description: 'ValueSet Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a ValueSet record for deletion.', + }, +}; + +/** + * @name exports.ValueSetCreateMutation + * @summary ValueSetCreate mutation. + */ +module.exports.ValueSetCreateMutation = { + description: 'Create a ValueSet record', + resolve: scopeInvariant(scopeOptions, createValueSet), + type: ValueSetSchema, + args: WriteArgs, +}; + +/** + * @name exports.ValueSetUpdateMutation + * @summary ValueSetUpdate mutation. + */ +module.exports.ValueSetUpdateMutation = { + description: 'Update a ValueSet record', + resolve: scopeInvariant(scopeOptions, updateValueSet), + type: ValueSetSchema, + args: WriteArgs, +}; + +/** + * @name exports.ValueSetRemoveMutation + * @summary ValueSetRemove mutation. + */ +module.exports.ValueSetRemoveMutation = { + description: 'Remove a ValueSet record', + resolve: scopeInvariant(scopeOptions, removeValueSet), + type: ValueSetSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/valueset/query.js b/src/resources/4_0_0/profiles/valueset/query.js new file mode 100644 index 00000000..08fa9e6b --- /dev/null +++ b/src/resources/4_0_0/profiles/valueset/query.js @@ -0,0 +1,60 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const ValueSetSchema = require('../../schemas/valueset.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const ValueSetArgs = require('../../parameters/valueset.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign({}, DomainResourceArgs, ResourceArgs, ValueSetArgs); + +// Resolvers +const { + getValueSet, + getValueSetList, + getValueSetInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'ValueSet', + action: 'read', +}; + +/** + * @name exports.ValueSetQuery + * @summary ValueSet query. + */ +module.exports.ValueSetQuery = { + description: 'Query for a single ValueSet', + resolve: scopeInvariant(scopeOptions, getValueSet), + type: ValueSetSchema, + args: args, +}; + +/** + * @name exports.ValueSetListQuery + * @summary ValueSet query. + */ +module.exports.ValueSetListQuery = { + description: 'Query for a more than or just one ValueSet', + resolve: scopeInvariant(scopeOptions, getValueSetList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.ValueSetInstanceQuery + * @summary ValueSet query. + */ +module.exports.ValueSetInstanceQuery = { + description: 'Access information about a single ValueSet', + resolve: scopeInvariant(scopeOptions, getValueSetInstance), + type: ValueSetSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/valueset/register.js b/src/resources/4_0_0/profiles/valueset/register.js new file mode 100644 index 00000000..a9280d72 --- /dev/null +++ b/src/resources/4_0_0/profiles/valueset/register.js @@ -0,0 +1,48 @@ +const { + ValueSetCreateMutation, + ValueSetUpdateMutation, + ValueSetRemoveMutation, +} = require('./mutation'); + +const { + ValueSetQuery, + ValueSetListQuery, + ValueSetInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + ValueSet: ValueSetQuery, + ValueSetList: ValueSetListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + ValueSetCreate: ValueSetCreateMutation, + ValueSetUpdate: ValueSetUpdateMutation, + ValueSetRemove: ValueSetRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'ValueSet', + path: '/4_0_0/ValueSet/:id', + query: ValueSetInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/valueset/resolver.js b/src/resources/4_0_0/profiles/valueset/resolver.js new file mode 100644 index 00000000..bda77ba5 --- /dev/null +++ b/src/resources/4_0_0/profiles/valueset/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getValueSet + * @static + * @summary ValueSet resolver. + */ +module.exports.getValueSet = function getValueSet( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getValueSetList + * @static + * @summary ValueSet list resolver. + */ +module.exports.getValueSetList = function getValueSetList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getValueSetInstance + * @static + * @summary ValueSet instance resolver. + */ +module.exports.getValueSetInstance = function getValueSetInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createValueSet + * @static + * @summary Create ValueSet resolver. + */ +module.exports.createValueSet = function createValueSet( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateValueSet + * @static + * @summary Update ValueSet resolver. + */ +module.exports.updateValueSet = function updateValueSet( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeValueSet + * @static + * @summary Remove ValueSet resolver. + */ +module.exports.removeValueSet = function removeValueSet( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/verificationresult/mutation.js b/src/resources/4_0_0/profiles/verificationresult/mutation.js new file mode 100644 index 00000000..ce645a81 --- /dev/null +++ b/src/resources/4_0_0/profiles/verificationresult/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const VerificationResultSchema = require('../../schemas/verificationresult.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const VerificationResultInput = require('../../inputs/verificationresult.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createVerificationResult, + updateVerificationResult, + removeVerificationResult, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'VerificationResult', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a VerificationResult record.', + }, + resource: { + type: new GraphQLNonNull(VerificationResultInput), + description: 'VerificationResult Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a VerificationResult record for deletion.', + }, +}; + +/** + * @name exports.VerificationResultCreateMutation + * @summary VerificationResultCreate mutation. + */ +module.exports.VerificationResultCreateMutation = { + description: 'Create a VerificationResult record', + resolve: scopeInvariant(scopeOptions, createVerificationResult), + type: VerificationResultSchema, + args: WriteArgs, +}; + +/** + * @name exports.VerificationResultUpdateMutation + * @summary VerificationResultUpdate mutation. + */ +module.exports.VerificationResultUpdateMutation = { + description: 'Update a VerificationResult record', + resolve: scopeInvariant(scopeOptions, updateVerificationResult), + type: VerificationResultSchema, + args: WriteArgs, +}; + +/** + * @name exports.VerificationResultRemoveMutation + * @summary VerificationResultRemove mutation. + */ +module.exports.VerificationResultRemoveMutation = { + description: 'Remove a VerificationResult record', + resolve: scopeInvariant(scopeOptions, removeVerificationResult), + type: VerificationResultSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/verificationresult/query.js b/src/resources/4_0_0/profiles/verificationresult/query.js new file mode 100644 index 00000000..3edc3e12 --- /dev/null +++ b/src/resources/4_0_0/profiles/verificationresult/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const VerificationResultSchema = require('../../schemas/verificationresult.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const VerificationResultArgs = require('../../parameters/verificationresult.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + VerificationResultArgs, +); + +// Resolvers +const { + getVerificationResult, + getVerificationResultList, + getVerificationResultInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'VerificationResult', + action: 'read', +}; + +/** + * @name exports.VerificationResultQuery + * @summary VerificationResult query. + */ +module.exports.VerificationResultQuery = { + description: 'Query for a single VerificationResult', + resolve: scopeInvariant(scopeOptions, getVerificationResult), + type: VerificationResultSchema, + args: args, +}; + +/** + * @name exports.VerificationResultListQuery + * @summary VerificationResult query. + */ +module.exports.VerificationResultListQuery = { + description: 'Query for a more than or just one VerificationResult', + resolve: scopeInvariant(scopeOptions, getVerificationResultList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.VerificationResultInstanceQuery + * @summary VerificationResult query. + */ +module.exports.VerificationResultInstanceQuery = { + description: 'Access information about a single VerificationResult', + resolve: scopeInvariant(scopeOptions, getVerificationResultInstance), + type: VerificationResultSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/verificationresult/register.js b/src/resources/4_0_0/profiles/verificationresult/register.js new file mode 100644 index 00000000..163fd23e --- /dev/null +++ b/src/resources/4_0_0/profiles/verificationresult/register.js @@ -0,0 +1,48 @@ +const { + VerificationResultCreateMutation, + VerificationResultUpdateMutation, + VerificationResultRemoveMutation, +} = require('./mutation'); + +const { + VerificationResultQuery, + VerificationResultListQuery, + VerificationResultInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + VerificationResult: VerificationResultQuery, + VerificationResultList: VerificationResultListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + VerificationResultCreate: VerificationResultCreateMutation, + VerificationResultUpdate: VerificationResultUpdateMutation, + VerificationResultRemove: VerificationResultRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'VerificationResult', + path: '/4_0_0/VerificationResult/:id', + query: VerificationResultInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/verificationresult/resolver.js b/src/resources/4_0_0/profiles/verificationresult/resolver.js new file mode 100644 index 00000000..76249067 --- /dev/null +++ b/src/resources/4_0_0/profiles/verificationresult/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getVerificationResult + * @static + * @summary VerificationResult resolver. + */ +module.exports.getVerificationResult = function getVerificationResult( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getVerificationResultList + * @static + * @summary VerificationResult list resolver. + */ +module.exports.getVerificationResultList = function getVerificationResultList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getVerificationResultInstance + * @static + * @summary VerificationResult instance resolver. + */ +module.exports.getVerificationResultInstance = function getVerificationResultInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createVerificationResult + * @static + * @summary Create VerificationResult resolver. + */ +module.exports.createVerificationResult = function createVerificationResult( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateVerificationResult + * @static + * @summary Update VerificationResult resolver. + */ +module.exports.updateVerificationResult = function updateVerificationResult( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeVerificationResult + * @static + * @summary Remove VerificationResult resolver. + */ +module.exports.removeVerificationResult = function removeVerificationResult( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/profiles/visionprescription/mutation.js b/src/resources/4_0_0/profiles/visionprescription/mutation.js new file mode 100644 index 00000000..202c8d04 --- /dev/null +++ b/src/resources/4_0_0/profiles/visionprescription/mutation.js @@ -0,0 +1,81 @@ +// Schemas +const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema.js'); +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); + +// Inputs +const VisionPrescriptionInput = require('../../inputs/visionprescription.input.js'); + +// Scalars +const idScalar = require('../../scalars/id.scalar.js'); + +// GraphQL +const { GraphQLNonNull } = require('graphql'); + +// Resolvers +const { + createVisionPrescription, + updateVisionPrescription, + removeVisionPrescription, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'VisionPrescription', + action: 'write', +}; + +let WriteArgs = { + id: { + type: idScalar, + description: + 'Unique identifier for creating/updating a VisionPrescription record.', + }, + resource: { + type: new GraphQLNonNull(VisionPrescriptionInput), + description: 'VisionPrescription Information for the record.', + }, +}; + +let DeleteArgs = { + id: { + type: new GraphQLNonNull(idScalar), + description: + 'Unique identifier for selecting a VisionPrescription record for deletion.', + }, +}; + +/** + * @name exports.VisionPrescriptionCreateMutation + * @summary VisionPrescriptionCreate mutation. + */ +module.exports.VisionPrescriptionCreateMutation = { + description: 'Create a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, createVisionPrescription), + type: VisionPrescriptionSchema, + args: WriteArgs, +}; + +/** + * @name exports.VisionPrescriptionUpdateMutation + * @summary VisionPrescriptionUpdate mutation. + */ +module.exports.VisionPrescriptionUpdateMutation = { + description: 'Update a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, updateVisionPrescription), + type: VisionPrescriptionSchema, + args: WriteArgs, +}; + +/** + * @name exports.VisionPrescriptionRemoveMutation + * @summary VisionPrescriptionRemove mutation. + */ +module.exports.VisionPrescriptionRemoveMutation = { + description: 'Remove a VisionPrescription record', + resolve: scopeInvariant(scopeOptions, removeVisionPrescription), + type: VisionPrescriptionSchema, + args: DeleteArgs, +}; diff --git a/src/resources/4_0_0/profiles/visionprescription/query.js b/src/resources/4_0_0/profiles/visionprescription/query.js new file mode 100644 index 00000000..31bf02ff --- /dev/null +++ b/src/resources/4_0_0/profiles/visionprescription/query.js @@ -0,0 +1,65 @@ +// Schemas +const OperationOutcome = require('../../inputs/operationoutcome.input.js'); +const VisionPrescriptionSchema = require('../../schemas/visionprescription.schema.js'); +const BundleSchema = require('../../schemas/bundle.schema.js'); + +// Arguments +const VisionPrescriptionArgs = require('../../parameters/visionprescription.parameters.js'); +const ResourceArgs = require('../../parameters/resource.parameters.js'); +const DomainResourceArgs = require('../../parameters/domainresource.parameters.js'); + +let args = Object.assign( + {}, + DomainResourceArgs, + ResourceArgs, + VisionPrescriptionArgs, +); + +// Resolvers +const { + getVisionPrescription, + getVisionPrescriptionList, + getVisionPrescriptionInstance, +} = require('./resolver'); + +// Scope Utilities +const scopeInvariant = require('@asymmetrik/sof-graphql-invariant'); + +let scopeOptions = { + schema: OperationOutcome, + name: 'VisionPrescription', + action: 'read', +}; + +/** + * @name exports.VisionPrescriptionQuery + * @summary VisionPrescription query. + */ +module.exports.VisionPrescriptionQuery = { + description: 'Query for a single VisionPrescription', + resolve: scopeInvariant(scopeOptions, getVisionPrescription), + type: VisionPrescriptionSchema, + args: args, +}; + +/** + * @name exports.VisionPrescriptionListQuery + * @summary VisionPrescription query. + */ +module.exports.VisionPrescriptionListQuery = { + description: 'Query for a more than or just one VisionPrescription', + resolve: scopeInvariant(scopeOptions, getVisionPrescriptionList), + type: BundleSchema, + args: args, +}; + +/** + * @name exports.VisionPrescriptionInstanceQuery + * @summary VisionPrescription query. + */ +module.exports.VisionPrescriptionInstanceQuery = { + description: 'Access information about a single VisionPrescription', + resolve: scopeInvariant(scopeOptions, getVisionPrescriptionInstance), + type: VisionPrescriptionSchema, + args: args, +}; diff --git a/src/resources/4_0_0/profiles/visionprescription/register.js b/src/resources/4_0_0/profiles/visionprescription/register.js new file mode 100644 index 00000000..6dd29fef --- /dev/null +++ b/src/resources/4_0_0/profiles/visionprescription/register.js @@ -0,0 +1,48 @@ +const { + VisionPrescriptionCreateMutation, + VisionPrescriptionUpdateMutation, + VisionPrescriptionRemoveMutation, +} = require('./mutation'); + +const { + VisionPrescriptionQuery, + VisionPrescriptionListQuery, + VisionPrescriptionInstanceQuery, +} = require('./query'); + +/** + * @name exports + * @static + * @summary GraphQL Configurations. This is needed to register this profile + * with the GraphQL server. + */ +module.exports = { + /** + * Define Query Schema's here + * Each profile will need to define the two queries it supports + * and these keys must be unique across the entire application, like routes + */ + query: { + VisionPrescription: VisionPrescriptionQuery, + VisionPrescriptionList: VisionPrescriptionListQuery, + }, + /** + * Define Mutation Schema's here + * Each profile will need to define the supported mutations + * and these keys must be unique across the entire application, like routes + */ + mutation: { + VisionPrescriptionCreate: VisionPrescriptionCreateMutation, + VisionPrescriptionUpdate: VisionPrescriptionUpdateMutation, + VisionPrescriptionRemove: VisionPrescriptionRemoveMutation, + }, + /** + * These properties are so the core router can setup the approriate endpoint + * for a direct query against a resource + */ + instance: { + name: 'VisionPrescription', + path: '/4_0_0/VisionPrescription/:id', + query: VisionPrescriptionInstanceQuery, + }, +}; diff --git a/src/resources/4_0_0/profiles/visionprescription/resolver.js b/src/resources/4_0_0/profiles/visionprescription/resolver.js new file mode 100644 index 00000000..af219e37 --- /dev/null +++ b/src/resources/4_0_0/profiles/visionprescription/resolver.js @@ -0,0 +1,89 @@ +/** + * @name exports.getVisionPrescription + * @static + * @summary VisionPrescription resolver. + */ +module.exports.getVisionPrescription = function getVisionPrescription( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getVisionPrescriptionList + * @static + * @summary VisionPrescription list resolver. + */ +module.exports.getVisionPrescriptionList = function getVisionPrescriptionList( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.getVisionPrescriptionInstance + * @static + * @summary VisionPrescription instance resolver. + */ +module.exports.getVisionPrescriptionInstance = function getVisionPrescriptionInstance( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.createVisionPrescription + * @static + * @summary Create VisionPrescription resolver. + */ +module.exports.createVisionPrescription = function createVisionPrescription( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.updateVisionPrescription + * @static + * @summary Update VisionPrescription resolver. + */ +module.exports.updateVisionPrescription = function updateVisionPrescription( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; + +/** + * @name exports.removeVisionPrescription + * @static + * @summary Remove VisionPrescription resolver. + */ +module.exports.removeVisionPrescription = function removeVisionPrescription( + root, + args, + context = {}, + info, +) { + let { server, version, req, res } = context; + return {}; +}; diff --git a/src/resources/4_0_0/scalars/base64binary.scalar.js b/src/resources/4_0_0/scalars/base64binary.scalar.js new file mode 100644 index 00000000..50474788 --- /dev/null +++ b/src/resources/4_0_0/scalars/base64binary.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary base64Binary scalar + */ +module.exports = new GraphQLScalarType({ + name: 'base64Binary', + description: + 'Base StructureDefinition for base64Binary Type: A stream of bytes', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/boolean.scalar.js b/src/resources/4_0_0/scalars/boolean.scalar.js new file mode 100644 index 00000000..ae43c6a7 --- /dev/null +++ b/src/resources/4_0_0/scalars/boolean.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary boolean scalar + */ +module.exports = new GraphQLScalarType({ + name: 'boolean', + description: + "Base StructureDefinition for boolean Type: Value of 'true' or 'false'", + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/canonical.scalar.js b/src/resources/4_0_0/scalars/canonical.scalar.js new file mode 100644 index 00000000..5e132cf8 --- /dev/null +++ b/src/resources/4_0_0/scalars/canonical.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary canonical scalar + */ +module.exports = new GraphQLScalarType({ + name: 'canonical', + description: + 'Base StructureDefinition for canonical type: A URI that is a reference to a canonical URL on a FHIR resource', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/code.scalar.js b/src/resources/4_0_0/scalars/code.scalar.js new file mode 100644 index 00000000..9c228835 --- /dev/null +++ b/src/resources/4_0_0/scalars/code.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary code scalar + */ +module.exports = new GraphQLScalarType({ + name: 'code', + description: + 'Base StructureDefinition for code type: A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/date.scalar.js b/src/resources/4_0_0/scalars/date.scalar.js new file mode 100644 index 00000000..75c5ccb5 --- /dev/null +++ b/src/resources/4_0_0/scalars/date.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary date scalar + */ +module.exports = new GraphQLScalarType({ + name: 'date', + description: + 'Base StructureDefinition for date Type: A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates.', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/datetime.scalar.js b/src/resources/4_0_0/scalars/datetime.scalar.js new file mode 100644 index 00000000..3beb1940 --- /dev/null +++ b/src/resources/4_0_0/scalars/datetime.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary dateTime scalar + */ +module.exports = new GraphQLScalarType({ + name: 'dateTime', + description: + 'Base StructureDefinition for dateTime Type: A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates.', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/decimal.scalar.js b/src/resources/4_0_0/scalars/decimal.scalar.js new file mode 100644 index 00000000..cc7d0e77 --- /dev/null +++ b/src/resources/4_0_0/scalars/decimal.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary decimal scalar + */ +module.exports = new GraphQLScalarType({ + name: 'decimal', + description: + 'Base StructureDefinition for decimal Type: A rational number with implicit precision', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/id.scalar.js b/src/resources/4_0_0/scalars/id.scalar.js new file mode 100644 index 00000000..cd66d8f5 --- /dev/null +++ b/src/resources/4_0_0/scalars/id.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary id scalar + */ +module.exports = new GraphQLScalarType({ + name: 'id', + description: + "Base StructureDefinition for id type: Any combination of letters, numerals, '-' and '.', with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive.", + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/instant.scalar.js b/src/resources/4_0_0/scalars/instant.scalar.js new file mode 100644 index 00000000..579195b9 --- /dev/null +++ b/src/resources/4_0_0/scalars/instant.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary instant scalar + */ +module.exports = new GraphQLScalarType({ + name: 'instant', + description: + 'Base StructureDefinition for instant Type: An instant in time - known at least to the second', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/integer.scalar.js b/src/resources/4_0_0/scalars/integer.scalar.js new file mode 100644 index 00000000..4e67eb06 --- /dev/null +++ b/src/resources/4_0_0/scalars/integer.scalar.js @@ -0,0 +1,23 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary integer scalar + */ +module.exports = new GraphQLScalarType({ + name: 'integer', + description: 'Base StructureDefinition for integer Type: A whole number', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/markdown.scalar.js b/src/resources/4_0_0/scalars/markdown.scalar.js new file mode 100644 index 00000000..8a47c591 --- /dev/null +++ b/src/resources/4_0_0/scalars/markdown.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary markdown scalar + */ +module.exports = new GraphQLScalarType({ + name: 'markdown', + description: + 'Base StructureDefinition for markdown type: A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/oid.scalar.js b/src/resources/4_0_0/scalars/oid.scalar.js new file mode 100644 index 00000000..ae24c28b --- /dev/null +++ b/src/resources/4_0_0/scalars/oid.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary oid scalar + */ +module.exports = new GraphQLScalarType({ + name: 'oid', + description: + 'Base StructureDefinition for oid type: An OID represented as a URI', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/positiveint.scalar.js b/src/resources/4_0_0/scalars/positiveint.scalar.js new file mode 100644 index 00000000..b32b429c --- /dev/null +++ b/src/resources/4_0_0/scalars/positiveint.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary positiveInt scalar + */ +module.exports = new GraphQLScalarType({ + name: 'positiveInt', + description: + 'Base StructureDefinition for positiveInt type: An integer with a value that is positive (e.g. >0)', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/string.scalar.js b/src/resources/4_0_0/scalars/string.scalar.js new file mode 100644 index 00000000..f1175866 --- /dev/null +++ b/src/resources/4_0_0/scalars/string.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary string scalar + */ +module.exports = new GraphQLScalarType({ + name: 'string', + description: + 'Base StructureDefinition for string Type: A sequence of Unicode characters', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/time.scalar.js b/src/resources/4_0_0/scalars/time.scalar.js new file mode 100644 index 00000000..3f4a8bfe --- /dev/null +++ b/src/resources/4_0_0/scalars/time.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary time scalar + */ +module.exports = new GraphQLScalarType({ + name: 'time', + description: + 'Base StructureDefinition for time Type: A time during the day, with no date specified', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/token.scalar.js b/src/resources/4_0_0/scalars/token.scalar.js new file mode 100644 index 00000000..9d8c25a6 --- /dev/null +++ b/src/resources/4_0_0/scalars/token.scalar.js @@ -0,0 +1,23 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary token scalar + */ +module.exports = new GraphQLScalarType({ + name: 'token', + description: 'Base StructureDefinition for token type', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/unsignedint.scalar.js b/src/resources/4_0_0/scalars/unsignedint.scalar.js new file mode 100644 index 00000000..b90da78c --- /dev/null +++ b/src/resources/4_0_0/scalars/unsignedint.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary unsignedInt scalar + */ +module.exports = new GraphQLScalarType({ + name: 'unsignedInt', + description: + 'Base StructureDefinition for unsignedInt type: An integer with a value that is not negative (e.g. >= 0)', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/uri.scalar.js b/src/resources/4_0_0/scalars/uri.scalar.js new file mode 100644 index 00000000..43a6f136 --- /dev/null +++ b/src/resources/4_0_0/scalars/uri.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary uri scalar + */ +module.exports = new GraphQLScalarType({ + name: 'uri', + description: + 'Base StructureDefinition for uri Type: String of characters used to identify a name or a resource', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/url.scalar.js b/src/resources/4_0_0/scalars/url.scalar.js new file mode 100644 index 00000000..3215a4e0 --- /dev/null +++ b/src/resources/4_0_0/scalars/url.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary url scalar + */ +module.exports = new GraphQLScalarType({ + name: 'url', + description: + 'Base StructureDefinition for url type: A URI that is a literal reference', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/uuid.scalar.js b/src/resources/4_0_0/scalars/uuid.scalar.js new file mode 100644 index 00000000..2fcca56d --- /dev/null +++ b/src/resources/4_0_0/scalars/uuid.scalar.js @@ -0,0 +1,24 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary uuid scalar + */ +module.exports = new GraphQLScalarType({ + name: 'uuid', + description: + 'Base StructureDefinition for uuid type: A UUID, represented as a URI', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/scalars/xhtml.scalar.js b/src/resources/4_0_0/scalars/xhtml.scalar.js new file mode 100644 index 00000000..4a28133c --- /dev/null +++ b/src/resources/4_0_0/scalars/xhtml.scalar.js @@ -0,0 +1,23 @@ +const { GraphQLScalarType } = require('graphql'); +const { GraphQLError } = require('graphql/error'); +const { Kind } = require('graphql/language'); + +/** + * @name exports + * @summary xhtml scalar + */ +module.exports = new GraphQLScalarType({ + name: 'xhtml', + description: 'Base StructureDefinition for xhtml Type', + // TODO: Implement serialization + serialize: value => value, + // TODO: Parse and sanitize here, throw a graphql error if things fail + parseValue: (value, ast) => { + return value; + }, + // TODO: Parse and sanitize here as well, return undefined if unable to parse + parseLiteral: ast => { + let { kind, value } = ast; + return kind === Kind.STRING ? value : undefined; + }, +}); diff --git a/src/resources/4_0_0/schemas/account.schema.js b/src/resources/4_0_0/schemas/account.schema.js new file mode 100644 index 00000000..36654328 --- /dev/null +++ b/src/resources/4_0_0/schemas/account.schema.js @@ -0,0 +1,210 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +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 Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Account', + description: + 'A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Account_Enum_schema', + values: { Account: { value: 'Account' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Indicates whether the account is presently used/usable or not.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the account is presently used/usable or not.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Categorizes the account for reporting and searching purposes.', + }, + _name: { + type: require('./element.schema.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.', + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Accountsubject_subject_Union', + description: + 'Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.', + types: () => [ + require('./patient.schema.js'), + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./location.schema.js'), + require('./healthcareservice.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.', + }, + servicePeriod: { + type: require('./period.schema.js'), + description: 'The date range of services associated with this account.', + }, + coverage: { + type: new GraphQLList(require('./accountcoverage.schema.js')), + description: + 'The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'Accountowner_owner_Union', + description: + 'Indicates the service area, hospital, department, etc. with responsibility for managing the Account.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the service area, hospital, department, etc. with responsibility for managing the Account.', + }, + _description: { + type: require('./element.schema.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.', + }, + guarantor: { + type: new GraphQLList(require('./accountguarantor.schema.js')), + description: + 'The parties responsible for balancing the account if other payment options fall short.', + }, + partOf: { + type: new GraphQLUnionType({ + name: 'AccountpartOf_partOf_Union', + description: 'Reference to a parent Account.', + types: () => [require('./account.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + }, + }), + description: 'Reference to a parent Account.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/accountcoverage.schema.js b/src/resources/4_0_0/schemas/accountcoverage.schema.js new file mode 100644 index 00000000..a4c795b7 --- /dev/null +++ b/src/resources/4_0_0/schemas/accountcoverage.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Accountcoverage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Accountcoverage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Accountcoveragecoverage_coverage_Union', + description: + 'The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay). A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.', + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + 'The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay). A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'The priority of the coverage in the context of this account.', + }, + priority: { + type: PositiveIntScalar, + description: + 'The priority of the coverage in the context of this account.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/accountguarantor.schema.js b/src/resources/4_0_0/schemas/accountguarantor.schema.js new file mode 100644 index 00000000..96566684 --- /dev/null +++ b/src/resources/4_0_0/schemas/accountguarantor.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Accountguarantor Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Accountguarantor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + party: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Accountguarantorparty_party_Union', + description: 'The entity who is responsible.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The entity who is responsible.', + }, + _onHold: { + type: require('./element.schema.js'), + description: + 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', + }, + onHold: { + type: GraphQLBoolean, + description: + 'A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The timeframe during which the guarantor accepts responsibility for the account.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/activitydefinition.schema.js b/src/resources/4_0_0/schemas/activitydefinition.schema.js new file mode 100644 index 00000000..c18fe298 --- /dev/null +++ b/src/resources/4_0_0/schemas/activitydefinition.schema.js @@ -0,0 +1,548 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ActivityDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ActivityDefinition', + description: + 'This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ActivityDefinition_Enum_schema', + values: { ActivityDefinition: { value: 'ActivityDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the activity definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the activity definition.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the activity definition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the activity definition giving additional information about its content.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this activity definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this activity definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A code or group definition that describes the intended subject of the activity being defined.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: 'ActivityDefinitionsubjectReference_subjectReference_Union', + description: + 'A code or group definition that describes the intended subject of the activity being defined.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'A code or group definition that describes the intended subject of the activity being defined.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the activity definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the activity definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the activity definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the activity definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the activity definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this activity definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this activity definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the activity definition is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the activity definition is used from a clinical perspective.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the activity definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.schema.js'), + description: + 'A reference to a Library resource containing any formal logic used by the activity definition.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing any formal logic used by the activity definition.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', + }, + kind: { + type: CodeScalar, + description: + 'A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'A profile to which the target of the activity definition is expected to conform.', + }, + profile: { + type: CanonicalScalar, + description: + 'A profile to which the target of the activity definition is expected to conform.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.', + }, + intent: { + type: CodeScalar, + description: + 'Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the activity should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the activity should be addressed with respect to other requests.', + }, + _doNotPerform: { + type: require('./element.schema.js'), + description: + 'Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingAge: { + type: require('./age.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingRange: { + type: require('./range.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + timingDuration: { + type: require('./duration.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: new GraphQLUnionType({ + name: 'ActivityDefinitionlocation_location_Union', + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + participant: { + type: new GraphQLList( + require('./activitydefinitionparticipant.schema.js'), + ), + description: + 'Indicates who should participate in performing the action described.', + }, + productReference: { + type: new GraphQLUnionType({ + name: 'ActivityDefinitionproductReference_productReference_Union', + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + }, + productCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the food, drug or other product being consumed or supplied in the activity.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).', + }, + dosage: { + type: new GraphQLList(require('./dosage.schema.js')), + description: + 'Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.', + }, + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", + }, + specimenRequirement: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ActivityDefinitionspecimenRequirement_specimenRequirement_Union', + description: + 'Defines specimen requirements for the action to be performed, such as required specimens for a lab test.', + types: () => [require('./specimendefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SpecimenDefinition') { + return require('./specimendefinition.schema.js'); + } + }, + }), + ), + description: + 'Defines specimen requirements for the action to be performed, such as required specimens for a lab test.', + }, + observationRequirement: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ActivityDefinitionobservationRequirement_observationRequirement_Union', + description: + 'Defines observation requirements for the action to be performed, such as body weight or surface area.', + types: () => [require('./observationdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ObservationDefinition') { + return require('./observationdefinition.schema.js'); + } + }, + }), + ), + description: + 'Defines observation requirements for the action to be performed, such as body weight or surface area.', + }, + observationResultRequirement: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ActivityDefinitionobservationResultRequirement_observationResultRequirement_Union', + description: + 'Defines the observations that are expected to be produced by the action.', + types: () => [require('./observationdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ObservationDefinition') { + return require('./observationdefinition.schema.js'); + } + }, + }), + ), + description: + 'Defines the observations that are expected to be produced by the action.', + }, + _transform: { + type: require('./element.schema.js'), + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + transform: { + type: CanonicalScalar, + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + dynamicValue: { + type: new GraphQLList( + require('./activitydefinitiondynamicvalue.schema.js'), + ), + description: + "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/activitydefinitiondynamicvalue.schema.js b/src/resources/4_0_0/schemas/activitydefinitiondynamicvalue.schema.js new file mode 100644 index 00000000..3112f732 --- /dev/null +++ b/src/resources/4_0_0/schemas/activitydefinitiondynamicvalue.schema.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ActivityDefinitiondynamicValue Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ActivityDefinitiondynamicValue', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _path: { + type: require('./element.schema.js'), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + expression: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: + 'An expression specifying the value of the customized element.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/activitydefinitionparticipant.schema.js b/src/resources/4_0_0/schemas/activitydefinitionparticipant.schema.js new file mode 100644 index 00000000..ab26061c --- /dev/null +++ b/src/resources/4_0_0/schemas/activitydefinitionparticipant.schema.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ActivityDefinitionparticipant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ActivityDefinitionparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of participant in the action.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant in the action.', + }, + role: { + type: require('./codeableconcept.schema.js'), + description: + 'The role the participant should play in performing the described action.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/address.schema.js b/src/resources/4_0_0/schemas/address.schema.js new file mode 100644 index 00000000..6ab1d702 --- /dev/null +++ b/src/resources/4_0_0/schemas/address.schema.js @@ -0,0 +1,119 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Address Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Address', + description: + 'Base StructureDefinition for Address Type: An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery. There are a variety of postal address formats defined around the world.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _use: { + type: require('./element.schema.js'), + description: 'The purpose of this address.', + }, + use: { + type: CodeScalar, + description: 'The purpose of this address.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + type: { + type: CodeScalar, + description: + 'Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts.', + }, + text: { + type: GraphQLString, + description: + 'Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts.', + }, + _line: { + type: require('./element.schema.js'), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + line: { + type: new GraphQLList(GraphQLString), + description: + 'This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.', + }, + _city: { + type: require('./element.schema.js'), + description: + 'The name of the city, town, suburb, village or other community or delivery center.', + }, + city: { + type: GraphQLString, + description: + 'The name of the city, town, suburb, village or other community or delivery center.', + }, + _district: { + type: require('./element.schema.js'), + description: 'The name of the administrative area (county).', + }, + district: { + type: GraphQLString, + description: 'The name of the administrative area (county).', + }, + _state: { + type: require('./element.schema.js'), + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes).', + }, + state: { + type: GraphQLString, + description: + 'Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes).', + }, + _postalCode: { + type: require('./element.schema.js'), + description: + 'A postal code designating a region defined by the postal service.', + }, + postalCode: { + type: GraphQLString, + description: + 'A postal code designating a region defined by the postal service.', + }, + _country: { + type: require('./element.schema.js'), + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + country: { + type: GraphQLString, + description: + 'Country - a nation as commonly understood or generally accepted.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period when address was/is in use.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/adverseevent.schema.js b/src/resources/4_0_0/schemas/adverseevent.schema.js new file mode 100644 index 00000000..e8a60c7c --- /dev/null +++ b/src/resources/4_0_0/schemas/adverseevent.schema.js @@ -0,0 +1,363 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary AdverseEvent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AdverseEvent', + description: + 'Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AdverseEvent_Enum_schema', + values: { AdverseEvent: { value: 'AdverseEvent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _actuality: { + type: require('./element.schema.js'), + description: + 'Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely.', + }, + actuality: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The overall type of event, intended for search and filtering purposes.', + }, + event: { + type: require('./codeableconcept.schema.js'), + description: + 'This element defines the specific type of event that occurred or that was prevented from occurring.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AdverseEventsubject_subject_Union', + description: 'This subject or group impacted by the event.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'This subject or group impacted by the event.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'AdverseEventencounter_encounter_Union', + description: + 'The Encounter during which AdverseEvent was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which AdverseEvent was created or to which the creation of this record is tightly associated.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the adverse event occurred.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the adverse event occurred.', + }, + _detected: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date the AdverseEvent began, in the opinion of the reporter.', + }, + detected: { + type: DateTimeScalar, + description: + 'Estimated or actual date the AdverseEvent began, in the opinion of the reporter.', + }, + _recordedDate: { + type: require('./element.schema.js'), + description: + 'The date on which the existence of the AdverseEvent was first recorded.', + }, + recordedDate: { + type: DateTimeScalar, + description: + 'The date on which the existence of the AdverseEvent was first recorded.', + }, + resultingCondition: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventresultingCondition_resultingCondition_Union', + description: + 'Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical).', + }, + location: { + type: new GraphQLUnionType({ + name: 'AdverseEventlocation_location_Union', + description: 'The information about where the adverse event occurred.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The information about where the adverse event occurred.', + }, + seriousness: { + type: require('./codeableconcept.schema.js'), + description: 'Assessment whether this event was of real importance.', + }, + severity: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the severity of the adverse event, in relation to the subject. Contrast to AdverseEvent.seriousness - a severe rash might not be serious, but a mild heart problem is.', + }, + outcome: { + type: require('./codeableconcept.schema.js'), + description: 'Describes the type of outcome from the adverse event.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'AdverseEventrecorder_recorder_Union', + description: + 'Information on who recorded the adverse event. May be the patient or a practitioner.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Information on who recorded the adverse event. May be the patient or a practitioner.', + }, + contributor: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventcontributor_contributor_Union', + description: + 'Parties that may or should contribute or have contributed information to the adverse event, which can consist of one or more activities. Such information includes information leading to the decision to perform the activity and how to perform the activity (e.g. consultant), information that the activity itself seeks to reveal (e.g. informant of clinical history), or information about what activity was performed (e.g. informant witness).', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'Parties that may or should contribute or have contributed information to the adverse event, which can consist of one or more activities. Such information includes information leading to the decision to perform the activity and how to perform the activity (e.g. consultant), information that the activity itself seeks to reveal (e.g. informant of clinical history), or information about what activity was performed (e.g. informant witness).', + }, + suspectEntity: { + type: new GraphQLList(require('./adverseeventsuspectentity.schema.js')), + description: + 'Describes the entity that is suspected to have caused the adverse event.', + }, + subjectMedicalHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventsubjectMedicalHistory_subjectMedicalHistory_Union', + description: 'AdverseEvent.subjectMedicalHistory.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./allergyintolerance.schema.js'), + require('./familymemberhistory.schema.js'), + require('./immunization.schema.js'), + require('./procedure.schema.js'), + require('./media.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + if (data && data.resourceType === 'FamilyMemberHistory') { + return require('./familymemberhistory.schema.js'); + } + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'AdverseEvent.subjectMedicalHistory.', + }, + referenceDocument: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventreferenceDocument_referenceDocument_Union', + description: 'AdverseEvent.referenceDocument.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'AdverseEvent.referenceDocument.', + }, + study: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AdverseEventstudy_study_Union', + description: 'AdverseEvent.study.', + types: () => [require('./researchstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + }, + }), + ), + description: 'AdverseEvent.study.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/adverseeventsuspectentity.schema.js b/src/resources/4_0_0/schemas/adverseeventsuspectentity.schema.js new file mode 100644 index 00000000..10808fb8 --- /dev/null +++ b/src/resources/4_0_0/schemas/adverseeventsuspectentity.schema.js @@ -0,0 +1,87 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary AdverseEventsuspectEntity Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AdverseEventsuspectEntity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + instance: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AdverseEventsuspectEntityinstance_instance_Union', + description: + 'Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device.', + types: () => [ + require('./immunization.schema.js'), + require('./procedure.schema.js'), + require('./substance.schema.js'), + require('./medication.schema.js'), + require('./medicationadministration.schema.js'), + require('./medicationstatement.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'Identifies the actual instance of what caused the adverse event. May be a substance, medication, medication administration, medication statement or a device.', + }, + causality: { + type: new GraphQLList( + require('./adverseeventsuspectentitycausality.schema.js'), + ), + description: 'Information on the possible cause of the event.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/adverseeventsuspectentitycausality.schema.js b/src/resources/4_0_0/schemas/adverseeventsuspectentitycausality.schema.js new file mode 100644 index 00000000..e7f22c2b --- /dev/null +++ b/src/resources/4_0_0/schemas/adverseeventsuspectentitycausality.schema.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary AdverseEventsuspectEntitycausality Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AdverseEventsuspectEntitycausality', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + assessment: { + type: require('./codeableconcept.schema.js'), + description: 'Assessment of if the entity caused the event.', + }, + _productRelatedness: { + type: require('./element.schema.js'), + description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', + }, + productRelatedness: { + type: GraphQLString, + description: 'AdverseEvent.suspectEntity.causalityProductRelatedness.', + }, + author: { + type: new GraphQLUnionType({ + name: 'AdverseEventsuspectEntitycausalityauthor_author_Union', + description: 'AdverseEvent.suspectEntity.causalityAuthor.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'AdverseEvent.suspectEntity.causalityAuthor.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: 'ProbabilityScale | Bayesian | Checklist.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/age.schema.js b/src/resources/4_0_0/schemas/age.schema.js new file mode 100644 index 00000000..500647b9 --- /dev/null +++ b/src/resources/4_0_0/schemas/age.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Age Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Age', + description: + 'Base StructureDefinition for Age Type: A duration of time during which an organism (or a process) has existed.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/allergyintolerance.schema.js b/src/resources/4_0_0/schemas/allergyintolerance.schema.js new file mode 100644 index 00000000..da2fb35b --- /dev/null +++ b/src/resources/4_0_0/schemas/allergyintolerance.schema.js @@ -0,0 +1,286 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary AllergyIntolerance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AllergyIntolerance', + description: + 'Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AllergyIntolerance_Enum_schema', + values: { AllergyIntolerance: { value: 'AllergyIntolerance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + clinicalStatus: { + type: require('./codeableconcept.schema.js'), + description: 'The clinical status of the allergy or intolerance.', + }, + verificationStatus: { + type: require('./codeableconcept.schema.js'), + description: + 'Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + type: { + type: CodeScalar, + description: + 'Identification of the underlying physiological mechanism for the reaction risk.', + }, + _category: { + type: require('./element.schema.js'), + description: 'Category of the identified substance.', + }, + category: { + type: new GraphQLList(CodeScalar), + description: 'Category of the identified substance.', + }, + _criticality: { + type: require('./element.schema.js'), + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', + }, + criticality: { + type: CodeScalar, + description: + 'Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., 'Latex'), an allergy or intolerance condition (e.g., 'Latex allergy'), or a negated/excluded code for a specific substance or class (e.g., 'No latex allergy') or a general or categorical negated statement (e.g., 'No known allergy', 'No known drug allergies'). Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AllergyIntolerancepatient_patient_Union', + description: 'The patient who has the allergy or intolerance.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient who has the allergy or intolerance.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'AllergyIntoleranceencounter_encounter_Union', + description: + 'The encounter when the allergy or intolerance was asserted.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The encounter when the allergy or intolerance was asserted.', + }, + _onsetDateTime: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetAge: { + type: require('./age.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetPeriod: { + type: require('./period.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetRange: { + type: require('./range.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + _onsetString: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date, date-time, or age when allergy or intolerance was identified.', + }, + _recordedDate: { + type: require('./element.schema.js'), + description: + 'The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.', + }, + recordedDate: { + type: DateTimeScalar, + description: + 'The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'AllergyIntolerancerecorder_recorder_Union', + description: + 'Individual who recorded the record and takes responsibility for its content.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Individual who recorded the record and takes responsibility for its content.', + }, + asserter: { + type: new GraphQLUnionType({ + name: 'AllergyIntoleranceasserter_asserter_Union', + description: + 'The source of the information about the allergy that is recorded.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'The source of the information about the allergy that is recorded.', + }, + _lastOccurrence: { + type: require('./element.schema.js'), + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + lastOccurrence: { + type: DateTimeScalar, + description: + 'Represents the date and/or time of the last known occurrence of a reaction event.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.', + }, + reaction: { + type: new GraphQLList(require('./allergyintolerancereaction.schema.js')), + description: + 'Details about each adverse reaction event linked to exposure to the identified substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/allergyintolerancereaction.schema.js b/src/resources/4_0_0/schemas/allergyintolerancereaction.schema.js new file mode 100644 index 00000000..fff6afcd --- /dev/null +++ b/src/resources/4_0_0/schemas/allergyintolerancereaction.schema.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary AllergyIntolerancereaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AllergyIntolerancereaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + substance: { + type: require('./codeableconcept.schema.js'), + description: + "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", + }, + manifestation: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.schema.js')), + ), + description: + 'Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + description: { + type: GraphQLString, + description: + 'Text description about the reaction as a whole, including details of the manifestation if required.', + }, + _onset: { + type: require('./element.schema.js'), + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + onset: { + type: DateTimeScalar, + description: + 'Record of the date and/or time of the onset of the Reaction.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + severity: { + type: CodeScalar, + description: + 'Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.', + }, + exposureRoute: { + type: require('./codeableconcept.schema.js'), + description: + 'Identification of the route by which the subject was exposed to the substance.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Additional text about the adverse reaction event not captured in other fields.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/annotation.schema.js b/src/resources/4_0_0/schemas/annotation.schema.js new file mode 100644 index 00000000..e896b9af --- /dev/null +++ b/src/resources/4_0_0/schemas/annotation.schema.js @@ -0,0 +1,86 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Annotation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Annotation', + description: + 'Base StructureDefinition for Annotation Type: A text note which also contains information about who made the statement and when.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + authorReference: { + type: new GraphQLUnionType({ + name: 'AnnotationauthorReference_authorReference_Union', + description: 'The individual responsible for making the annotation.', + types: () => [ + require('./practitioner.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The individual responsible for making the annotation.', + }, + _authorString: { + type: require('./element.schema.js'), + description: 'The individual responsible for making the annotation.', + }, + authorString: { + type: GraphQLString, + description: 'The individual responsible for making the annotation.', + }, + _time: { + type: require('./element.schema.js'), + description: 'Indicates when this particular annotation was made.', + }, + time: { + type: DateTimeScalar, + description: 'Indicates when this particular annotation was made.', + }, + _text: { + type: require('./element.schema.js'), + description: 'The text of the annotation in markdown format.', + }, + text: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text of the annotation in markdown format.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/appointment.schema.js b/src/resources/4_0_0/schemas/appointment.schema.js new file mode 100644 index 00000000..3089a625 --- /dev/null +++ b/src/resources/4_0_0/schemas/appointment.schema.js @@ -0,0 +1,301 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Appointment Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Appointment', + description: + '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).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Appointment_Enum_schema', + values: { Appointment: { value: 'Appointment' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.', + }, + cancelationReason: { + type: require('./codeableconcept.schema.js'), + description: + 'The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.', + }, + serviceCategory: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A broad categorization of the service that is to be performed during this appointment.', + }, + serviceType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specific service that is to be performed during this appointment.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + appointmentType: { + type: require('./codeableconcept.schema.js'), + description: + 'The style of appointment or patient that has been booked in the slot (not service type).', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The coded reason that this appointment is being scheduled. This is more clinical than administrative.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AppointmentreasonReference_reasonReference_Union', + description: + 'Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + types: () => [ + require('./condition.schema.js'), + require('./procedure.schema.js'), + require('./observation.schema.js'), + require('./immunizationrecommendation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); + } + }, + }), + ), + description: + 'Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + priority: { + type: UnsignedIntScalar, + description: + 'The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + description: { + type: GraphQLString, + description: + 'The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AppointmentsupportingInformation_supportingInformation_Union', + description: + 'Additional information to support the appointment provided when making the appointment.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Additional information to support the appointment provided when making the appointment.', + }, + _start: { + type: require('./element.schema.js'), + description: 'Date/Time that the appointment is to take place.', + }, + start: { + type: InstantScalar, + description: 'Date/Time that the appointment is to take place.', + }, + _end: { + type: require('./element.schema.js'), + description: 'Date/Time that the appointment is to conclude.', + }, + end: { + type: InstantScalar, + description: 'Date/Time that the appointment is to conclude.', + }, + _minutesDuration: { + type: require('./element.schema.js'), + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.', + }, + minutesDuration: { + type: PositiveIntScalar, + description: + 'Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.', + }, + slot: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Appointmentslot_slot_Union', + description: + "The slots from the participants' schedules that will be filled by the appointment.", + types: () => [require('./slot.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Slot') { + return require('./slot.schema.js'); + } + }, + }), + ), + description: + "The slots from the participants' schedules that will be filled by the appointment.", + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', + }, + created: { + type: DateTimeScalar, + description: + 'The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + _patientInstruction: { + type: require('./element.schema.js'), + description: + 'While Appointment.comment contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).', + }, + patientInstruction: { + type: GraphQLString, + description: + 'While Appointment.comment contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'AppointmentbasedOn_basedOn_Union', + description: + 'The service request this appointment is allocated to assess (e.g. incoming referral or procedure request).', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'The service request this appointment is allocated to assess (e.g. incoming referral or procedure request).', + }, + participant: { + type: new GraphQLList( + new GraphQLNonNull(require('./appointmentparticipant.schema.js')), + ), + description: 'List of participants involved in the appointment.', + }, + requestedPeriod: { + type: new GraphQLList(require('./period.schema.js')), + description: + 'A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/appointmentparticipant.schema.js b/src/resources/4_0_0/schemas/appointmentparticipant.schema.js new file mode 100644 index 00000000..f5bcc7b3 --- /dev/null +++ b/src/resources/4_0_0/schemas/appointmentparticipant.schema.js @@ -0,0 +1,106 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Appointmentparticipant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Appointmentparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'Appointmentparticipantactor_actor_Union', + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'A Person, Location/HealthcareService or Device that is participating in the appointment.', + }, + _required: { + type: require('./element.schema.js'), + description: + 'Whether this participant is required to be present at the meeting. This covers a use-case where two doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + required: { + type: CodeScalar, + description: + 'Whether this participant is required to be present at the meeting. This covers a use-case where two doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Participation status of the actor.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Participation status of the actor.', + }, + period: { + type: require('./period.schema.js'), + description: 'Participation period of the actor.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/appointmentresponse.schema.js b/src/resources/4_0_0/schemas/appointmentresponse.schema.js new file mode 100644 index 00000000..72430f1f --- /dev/null +++ b/src/resources/4_0_0/schemas/appointmentresponse.schema.js @@ -0,0 +1,189 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary AppointmentResponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AppointmentResponse', + description: + 'A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AppointmentResponse_Enum_schema', + values: { AppointmentResponse: { value: 'AppointmentResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + appointment: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AppointmentResponseappointment_appointment_Union', + description: 'Appointment that this response is replying to.', + types: () => [require('./appointment.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + }, + }), + ), + description: 'Appointment that this response is replying to.', + }, + _start: { + type: require('./element.schema.js'), + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + start: { + type: InstantScalar, + description: + 'Date/Time that the appointment is to take place, or requested new start time.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + end: { + type: InstantScalar, + description: + 'This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.', + }, + participantType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in the appointment.', + }, + actor: { + type: new GraphQLUnionType({ + name: 'AppointmentResponseactor_actor_Union', + description: + 'A Person, Location, HealthcareService, or Device that is participating in the appointment.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'A Person, Location, HealthcareService, or Device that is participating in the appointment.', + }, + _participantStatus: { + type: require('./element.schema.js'), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + participantStatus: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Additional comments about the appointment.', + }, + comment: { + type: GraphQLString, + description: 'Additional comments about the appointment.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/attachment.schema.js b/src/resources/4_0_0/schemas/attachment.schema.js new file mode 100644 index 00000000..cca48383 --- /dev/null +++ b/src/resources/4_0_0/schemas/attachment.schema.js @@ -0,0 +1,107 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Attachment Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Attachment', + description: + 'Base StructureDefinition for Attachment Type: For referring to data content defined in other formats.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + contentType: { + type: CodeScalar, + description: + 'Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.', + }, + _language: { + type: require('./element.schema.js'), + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + language: { + type: CodeScalar, + description: + 'The human language of the content. The value can be any valid value according to BCP 47.', + }, + _data: { + type: require('./element.schema.js'), + description: + 'The actual data of the attachment - a sequence of bytes, base64 encoded.', + }, + data: { + type: Base64BinaryScalar, + description: + 'The actual data of the attachment - a sequence of bytes, base64 encoded.', + }, + _url: { + type: require('./element.schema.js'), + description: 'A location where the data can be accessed.', + }, + url: { + type: UrlScalar, + description: 'A location where the data can be accessed.', + }, + _size: { + type: require('./element.schema.js'), + description: + 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', + }, + size: { + type: UnsignedIntScalar, + description: + 'The number of bytes of data that make up this attachment (before base64 encoding, if that is done).', + }, + _hash: { + type: require('./element.schema.js'), + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + hash: { + type: Base64BinaryScalar, + description: + 'The calculated hash of the data using SHA-1. Represented using base64.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A label or set of text to display in place of the data.', + }, + title: { + type: GraphQLString, + description: 'A label or set of text to display in place of the data.', + }, + _creation: { + type: require('./element.schema.js'), + description: 'The date that the attachment was first created.', + }, + creation: { + type: DateTimeScalar, + description: 'The date that the attachment was first created.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/auditevent.schema.js b/src/resources/4_0_0/schemas/auditevent.schema.js new file mode 100644 index 00000000..ff0ec82e --- /dev/null +++ b/src/resources/4_0_0/schemas/auditevent.schema.js @@ -0,0 +1,154 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary AuditEvent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AuditEvent', + description: + 'A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'AuditEvent_Enum_schema', + values: { AuditEvent: { value: 'AuditEvent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.', + }, + subtype: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Identifier for the category of event.', + }, + _action: { + type: require('./element.schema.js'), + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + action: { + type: CodeScalar, + description: + 'Indicator for type of action performed during the event that generated the audit.', + }, + period: { + type: require('./period.schema.js'), + description: 'The period during which the activity occurred.', + }, + _recorded: { + type: require('./element.schema.js'), + description: 'The time when the event was recorded.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The time when the event was recorded.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Indicates whether the event succeeded or failed.', + }, + outcome: { + type: CodeScalar, + description: 'Indicates whether the event succeeded or failed.', + }, + _outcomeDesc: { + type: require('./element.schema.js'), + description: 'A free text description of the outcome of the event.', + }, + outcomeDesc: { + type: GraphQLString, + description: 'A free text description of the outcome of the event.', + }, + purposeOfEvent: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The purposeOfUse (reason) that was used during the event being recorded.', + }, + agent: { + type: new GraphQLList( + new GraphQLNonNull(require('./auditeventagent.schema.js')), + ), + description: + 'An actor taking an active role in the event or activity that is logged.', + }, + source: { + type: new GraphQLNonNull(require('./auditeventsource.schema.js')), + description: 'The system that is reporting the event.', + }, + entity: { + type: new GraphQLList(require('./auditevententity.schema.js')), + description: + 'Specific instances of data or objects that have been accessed.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/auditeventagent.schema.js b/src/resources/4_0_0/schemas/auditeventagent.schema.js new file mode 100644 index 00000000..b80f7845 --- /dev/null +++ b/src/resources/4_0_0/schemas/auditeventagent.schema.js @@ -0,0 +1,153 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary AuditEventagent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AuditEventagent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Specification of the participation type the user plays when performing the event.', + }, + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.', + }, + who: { + type: new GraphQLUnionType({ + name: 'AuditEventagentwho_who_Union', + description: + 'Reference to who this agent is that was involved in the event.', + types: () => [ + require('./practitionerrole.schema.js'), + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Reference to who this agent is that was involved in the event.', + }, + _altId: { + type: require('./element.schema.js'), + description: + 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + altId: { + type: GraphQLString, + description: + 'Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-meaningful name for the agent.', + }, + name: { + type: GraphQLString, + description: 'Human-meaningful name for the agent.', + }, + _requestor: { + type: require('./element.schema.js'), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + requestor: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicator that the user is or is not the requestor, or initiator, for the event being audited.', + }, + location: { + type: new GraphQLUnionType({ + name: 'AuditEventagentlocation_location_Union', + description: 'Where the event occurred.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the event occurred.', + }, + _policy: { + type: require('./element.schema.js'), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.', + }, + media: { + type: require('./coding.schema.js'), + description: + 'Type of media involved. Used when the event is about exporting/importing onto media.', + }, + network: { + type: require('./auditeventagentnetwork.schema.js'), + description: + 'Logical network location for application activity, if the activity has a network location.', + }, + purposeOfUse: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The reason (purpose of use), specific to this agent, that was used during the event being recorded.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/auditeventagentnetwork.schema.js b/src/resources/4_0_0/schemas/auditeventagentnetwork.schema.js new file mode 100644 index 00000000..cc335fb3 --- /dev/null +++ b/src/resources/4_0_0/schemas/auditeventagentnetwork.schema.js @@ -0,0 +1,53 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary AuditEventagentnetwork Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AuditEventagentnetwork', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _address: { + type: require('./element.schema.js'), + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + address: { + type: GraphQLString, + description: + 'An identifier for the network access point of the user device for the audit event.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + type: { + type: CodeScalar, + description: + 'An identifier for the type of network access point that originated the audit event.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/auditevententity.schema.js b/src/resources/4_0_0/schemas/auditevententity.schema.js new file mode 100644 index 00000000..890bd98e --- /dev/null +++ b/src/resources/4_0_0/schemas/auditevententity.schema.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary AuditEvententity Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AuditEvententity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + what: { + type: new GraphQLUnionType({ + name: 'AuditEvententitywhat_what_Union', + description: + 'Identifies a specific instance of the entity. The reference should be version specific.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Identifies a specific instance of the entity. The reference should be version specific.', + }, + type: { + type: require('./coding.schema.js'), + description: + 'The type of the object that was involved in this audit event.', + }, + role: { + type: require('./coding.schema.js'), + description: + 'Code representing the role the entity played in the event being audited.', + }, + lifecycle: { + type: require('./coding.schema.js'), + description: 'Identifier for the data life-cycle stage for the entity.', + }, + securityLabel: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Security labels for the identified entity.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name of the entity in the audit event.', + }, + name: { + type: GraphQLString, + description: 'A name of the entity in the audit event.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Text that describes the entity in more detail.', + }, + description: { + type: GraphQLString, + description: 'Text that describes the entity in more detail.', + }, + _query: { + type: require('./element.schema.js'), + description: 'The query parameters for a query-type entities.', + }, + query: { + type: Base64BinaryScalar, + description: 'The query parameters for a query-type entities.', + }, + detail: { + type: new GraphQLList(require('./auditevententitydetail.schema.js')), + description: + 'Tagged value pairs for conveying additional information about the entity.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/auditevententitydetail.schema.js b/src/resources/4_0_0/schemas/auditevententitydetail.schema.js new file mode 100644 index 00000000..7b42e084 --- /dev/null +++ b/src/resources/4_0_0/schemas/auditevententitydetail.schema.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary AuditEvententitydetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AuditEvententitydetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of extra detail provided in the value.', + }, + type: { + type: new GraphQLNonNull(GraphQLString), + description: 'The type of extra detail provided in the value.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of the extra detail.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the extra detail.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'The value of the extra detail.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the extra detail.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/auditeventsource.schema.js b/src/resources/4_0_0/schemas/auditeventsource.schema.js new file mode 100644 index 00000000..2f6d80c6 --- /dev/null +++ b/src/resources/4_0_0/schemas/auditeventsource.schema.js @@ -0,0 +1,89 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary AuditEventsource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'AuditEventsource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _site: { + type: require('./element.schema.js'), + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + site: { + type: GraphQLString, + description: + 'Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.', + }, + observer: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'AuditEventsourceobserver_observer_Union', + description: 'Identifier of the source where the event was detected.', + types: () => [ + require('./practitionerrole.schema.js'), + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'Identifier of the source where the event was detected.', + }, + type: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'Code specifying the type of source where event originated.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/backboneelement.schema.js b/src/resources/4_0_0/schemas/backboneelement.schema.js new file mode 100644 index 00000000..42184446 --- /dev/null +++ b/src/resources/4_0_0/schemas/backboneelement.schema.js @@ -0,0 +1,33 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary BackboneElement Schema + */ +module.exports = new GraphQLObjectType({ + name: 'BackboneElement', + description: + 'Base StructureDefinition for BackboneElement Type: Base definition for all elements that are defined inside a resource - but not those in a data type.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/basic.schema.js b/src/resources/4_0_0/schemas/basic.schema.js new file mode 100644 index 00000000..56a2923c --- /dev/null +++ b/src/resources/4_0_0/schemas/basic.schema.js @@ -0,0 +1,151 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Basic Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Basic', + description: + "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Basic_Enum_schema', + values: { Basic: { value: 'Basic' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifier assigned to the resource for business purposes, outside the context of FHIR.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Identifies the 'type' of resource - equivalent to the resource name for other resources.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'Basicsubject_subject_Union', + description: + "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resource.", + }, + _created: { + type: require('./element.schema.js'), + description: 'Identifies when the resource was first created.', + }, + created: { + type: DateScalar, + description: 'Identifies when the resource was first created.', + }, + author: { + type: new GraphQLUnionType({ + name: 'Basicauthor_author_Union', + description: + 'Indicates who was responsible for creating the resource instance.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates who was responsible for creating the resource instance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/binary.schema.js b/src/resources/4_0_0/schemas/binary.schema.js new file mode 100644 index 00000000..2bf59b3e --- /dev/null +++ b/src/resources/4_0_0/schemas/binary.schema.js @@ -0,0 +1,97 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary Binary Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Binary', + description: + 'A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Binary_Enum_schema', + values: { Binary: { value: 'Binary' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The base language in which the resource is written.', + }, + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + contentType: { + type: new GraphQLNonNull(CodeScalar), + description: + 'MimeType of the binary content represented as a standard MimeType (BCP 13).', + }, + securityContext: { + type: new GraphQLUnionType({ + name: 'BinarysecurityContext_securityContext_Union', + description: + 'This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.', + }, + _data: { + type: require('./element.schema.js'), + description: 'The actual content, base64 encoded.', + }, + data: { + type: Base64BinaryScalar, + description: 'The actual content, base64 encoded.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/biologicallyderivedproduct.schema.js b/src/resources/4_0_0/schemas/biologicallyderivedproduct.schema.js new file mode 100644 index 00000000..00d969e1 --- /dev/null +++ b/src/resources/4_0_0/schemas/biologicallyderivedproduct.schema.js @@ -0,0 +1,175 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProduct Schema + */ +module.exports = new GraphQLObjectType({ + name: 'BiologicallyDerivedProduct', + description: + 'A material substance originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'BiologicallyDerivedProduct_Enum_schema', + values: { + BiologicallyDerivedProduct: { value: 'BiologicallyDerivedProduct' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'This records identifiers associated with this biologically derived product instance that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).', + }, + _productCategory: { + type: require('./element.schema.js'), + description: 'Broad category of this product.', + }, + productCategory: { + type: CodeScalar, + description: 'Broad category of this product.', + }, + productCode: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that identifies the kind of this biologically derived product (SNOMED Ctcode).', + }, + _status: { + type: require('./element.schema.js'), + description: 'Whether the product is currently available.', + }, + status: { + type: CodeScalar, + description: 'Whether the product is currently available.', + }, + request: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'BiologicallyDerivedProductrequest_request_Union', + description: + 'Procedure request to obtain this biologically derived product.', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'Procedure request to obtain this biologically derived product.', + }, + _quantity: { + type: require('./element.schema.js'), + description: 'Number of discrete units within this product.', + }, + quantity: { + type: GraphQLInt, + description: 'Number of discrete units within this product.', + }, + parent: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'BiologicallyDerivedProductparent_parent_Union', + description: 'Parent product (if any).', + types: () => [require('./biologicallyderivedproduct.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'BiologicallyDerivedProduct') { + return require('./biologicallyderivedproduct.schema.js'); + } + }, + }), + ), + description: 'Parent product (if any).', + }, + collection: { + type: require('./biologicallyderivedproductcollection.schema.js'), + description: 'How this product was collected.', + }, + processing: { + type: new GraphQLList( + require('./biologicallyderivedproductprocessing.schema.js'), + ), + description: + 'Any processing of the product during collection that does not change the fundamental nature of the product. For example adding anti-coagulants during the collection of Peripheral Blood Stem Cells.', + }, + manipulation: { + type: require('./biologicallyderivedproductmanipulation.schema.js'), + description: + 'Any manipulation of product post-collection that is intended to alter the product. For example a buffy-coat enrichment or CD8 reduction of Peripheral Blood Stem Cells to make it more suitable for infusion.', + }, + storage: { + type: new GraphQLList( + require('./biologicallyderivedproductstorage.schema.js'), + ), + description: 'Product storage.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/biologicallyderivedproductcollection.schema.js b/src/resources/4_0_0/schemas/biologicallyderivedproductcollection.schema.js new file mode 100644 index 00000000..ec34b09b --- /dev/null +++ b/src/resources/4_0_0/schemas/biologicallyderivedproductcollection.schema.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProductcollection Schema + */ +module.exports = new GraphQLObjectType({ + name: 'BiologicallyDerivedProductcollection', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + collector: { + type: new GraphQLUnionType({ + name: 'BiologicallyDerivedProductcollectioncollector_collector_Union', + description: + 'Healthcare professional who is performing the collection.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'Healthcare professional who is performing the collection.', + }, + source: { + type: new GraphQLUnionType({ + name: 'BiologicallyDerivedProductcollectionsource_source_Union', + description: + 'The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.', + types: () => [ + require('./patient.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.', + }, + _collectedDateTime: { + type: require('./element.schema.js'), + description: 'Time of product collection.', + }, + collectedDateTime: { + type: DateTimeScalar, + description: 'Time of product collection.', + }, + collectedPeriod: { + type: require('./period.schema.js'), + description: 'Time of product collection.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/biologicallyderivedproductmanipulation.schema.js b/src/resources/4_0_0/schemas/biologicallyderivedproductmanipulation.schema.js new file mode 100644 index 00000000..1776feda --- /dev/null +++ b/src/resources/4_0_0/schemas/biologicallyderivedproductmanipulation.schema.js @@ -0,0 +1,53 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProductmanipulation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'BiologicallyDerivedProductmanipulation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Description of manipulation.', + }, + description: { + type: GraphQLString, + description: 'Description of manipulation.', + }, + _timeDateTime: { + type: require('./element.schema.js'), + description: 'Time of manipulation.', + }, + timeDateTime: { + type: DateTimeScalar, + description: 'Time of manipulation.', + }, + timePeriod: { + type: require('./period.schema.js'), + description: 'Time of manipulation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/biologicallyderivedproductprocessing.schema.js b/src/resources/4_0_0/schemas/biologicallyderivedproductprocessing.schema.js new file mode 100644 index 00000000..ae0cbae9 --- /dev/null +++ b/src/resources/4_0_0/schemas/biologicallyderivedproductprocessing.schema.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProductprocessing Schema + */ +module.exports = new GraphQLObjectType({ + name: 'BiologicallyDerivedProductprocessing', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Description of of processing.', + }, + description: { + type: GraphQLString, + description: 'Description of of processing.', + }, + procedure: { + type: require('./codeableconcept.schema.js'), + description: 'Procesing code.', + }, + additive: { + type: new GraphQLUnionType({ + name: 'BiologicallyDerivedProductprocessingadditive_additive_Union', + description: 'Substance added during processing.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: 'Substance added during processing.', + }, + _timeDateTime: { + type: require('./element.schema.js'), + description: 'Time of processing.', + }, + timeDateTime: { + type: DateTimeScalar, + description: 'Time of processing.', + }, + timePeriod: { + type: require('./period.schema.js'), + description: 'Time of processing.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/biologicallyderivedproductstorage.schema.js b/src/resources/4_0_0/schemas/biologicallyderivedproductstorage.schema.js new file mode 100644 index 00000000..f89fef74 --- /dev/null +++ b/src/resources/4_0_0/schemas/biologicallyderivedproductstorage.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary BiologicallyDerivedProductstorage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'BiologicallyDerivedProductstorage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Description of storage.', + }, + description: { + type: GraphQLString, + description: 'Description of storage.', + }, + _temperature: { + type: require('./element.schema.js'), + description: 'Storage temperature.', + }, + temperature: { + type: GraphQLFloat, + description: 'Storage temperature.', + }, + _scale: { + type: require('./element.schema.js'), + description: 'Temperature scale used.', + }, + scale: { + type: CodeScalar, + description: 'Temperature scale used.', + }, + duration: { + type: require('./period.schema.js'), + description: 'Storage timeperiod.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/bodystructure.schema.js b/src/resources/4_0_0/schemas/bodystructure.schema.js new file mode 100644 index 00000000..283a5252 --- /dev/null +++ b/src/resources/4_0_0/schemas/bodystructure.schema.js @@ -0,0 +1,142 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary BodyStructure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'BodyStructure', + description: + 'Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'BodyStructure_Enum_schema', + values: { BodyStructure: { value: 'BodyStructure' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Identifier for this instance of the anatomical structure.', + }, + _active: { + type: require('./element.schema.js'), + description: 'Whether this body site is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this body site is in active use.', + }, + morphology: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of structure being represented by the body structure at `BodyStructure.location`. This can define both normal and abnormal morphologies.', + }, + location: { + type: require('./codeableconcept.schema.js'), + description: + 'The anatomical location or region of the specimen, lesion, or body structure.', + }, + locationQualifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Qualifier to refine the anatomical location. These include qualifiers for laterality, relative location, directionality, number, and plane.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A summary, characterization or explanation of the body structure.', + }, + description: { + type: GraphQLString, + description: + 'A summary, characterization or explanation of the body structure.', + }, + image: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image or images used to identify a location.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'BodyStructurepatient_patient_Union', + description: 'The person to which the body site belongs.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The person to which the body site belongs.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/bundle.schema.js b/src/resources/4_0_0/schemas/bundle.schema.js new file mode 100644 index 00000000..ab4d265f --- /dev/null +++ b/src/resources/4_0_0/schemas/bundle.schema.js @@ -0,0 +1,112 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Bundle Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Bundle', + description: 'A container for a collection of resources.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Bundle_Enum_schema', + values: { Bundle: { value: 'Bundle' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The base language in which the resource is written.', + }, + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + "A persistent identifier for the bundle that won't change as a bundle is copied from server to server.", + }, + _type: { + type: require('./element.schema.js'), + description: + 'Indicates the purpose of this bundle - how it is intended to be used.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose of this bundle - how it is intended to be used.', + }, + _timestamp: { + type: require('./element.schema.js'), + description: + 'The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.', + }, + timestamp: { + type: InstantScalar, + description: + 'The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.', + }, + _total: { + type: require('./element.schema.js'), + description: + "If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.", + }, + total: { + type: UnsignedIntScalar, + description: + "If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.", + }, + link: { + type: new GraphQLList(require('./bundlelink.schema.js')), + description: 'A series of links that provide context to this bundle.', + }, + entry: { + type: new GraphQLList(require('./bundleentry.schema.js')), + description: + 'An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).', + }, + signature: { + type: require('./signature.schema.js'), + description: 'Digital Signature - base64 encoded. XML-DSig or a JWT.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/bundleentry.schema.js b/src/resources/4_0_0/schemas/bundleentry.schema.js new file mode 100644 index 00000000..667cd777 --- /dev/null +++ b/src/resources/4_0_0/schemas/bundleentry.schema.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Bundleentry Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Bundleentry', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _fullUrl: { + type: require('./element.schema.js'), + description: + 'The Absolute URL for the resource. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', + }, + fullUrl: { + type: UriScalar, + description: + 'The Absolute URL for the resource. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified.', + }, + resource: { + type: require('./resourcelist.schema'), + description: + 'The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type.', + }, + search: { + type: require('./bundleentrysearch.schema.js'), + description: + 'Information about the search process that lead to the creation of this entry.', + }, + request: { + type: require('./bundleentryrequest.schema.js'), + description: + 'Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.', + }, + response: { + type: require('./bundleentryresponse.schema.js'), + description: + "Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/bundleentryrequest.schema.js b/src/resources/4_0_0/schemas/bundleentryrequest.schema.js new file mode 100644 index 00000000..48561bf4 --- /dev/null +++ b/src/resources/4_0_0/schemas/bundleentryrequest.schema.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Bundleentryrequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Bundleentryrequest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _method: { + type: require('./element.schema.js'), + description: + 'In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.', + }, + method: { + type: new GraphQLNonNull(CodeScalar), + description: + 'In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'The URL for this entry, relative to the root (the address to which the request is posted).', + }, + _ifNoneMatch: { + type: require('./element.schema.js'), + description: + "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifNoneMatch: { + type: GraphQLString, + description: + "If the ETag values match, return a 304 Not Modified status. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifModifiedSince: { + type: require('./element.schema.js'), + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + ifModifiedSince: { + type: InstantScalar, + description: + "Only perform the operation if the last updated date matches. See the API documentation for ['Conditional Read'](http.html#cread).", + }, + _ifMatch: { + type: require('./element.schema.js'), + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + ifMatch: { + type: GraphQLString, + description: + "Only perform the operation if the Etag value matches. For more information, see the API section ['Managing Resource Contention'](http.html#concurrency).", + }, + _ifNoneExist: { + type: require('./element.schema.js'), + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + ifNoneExist: { + type: GraphQLString, + description: + "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ['Conditional Create'](http.html#ccreate). This is just the query portion of the URL - what follows the '?' (not including the '?').", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/bundleentryresponse.schema.js b/src/resources/4_0_0/schemas/bundleentryresponse.schema.js new file mode 100644 index 00000000..cd26d3fd --- /dev/null +++ b/src/resources/4_0_0/schemas/bundleentryresponse.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Bundleentryresponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Bundleentryresponse', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _status: { + type: require('./element.schema.js'), + description: + '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.', + }, + status: { + type: new GraphQLNonNull(GraphQLString), + description: + '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.', + }, + _location: { + type: require('./element.schema.js'), + description: + 'The location header created by processing this operation, populated if the operation returns a location.', + }, + location: { + type: UriScalar, + description: + 'The location header created by processing this operation, populated if the operation returns a location.', + }, + _etag: { + type: require('./element.schema.js'), + description: + 'The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', + }, + etag: { + type: GraphQLString, + description: + 'The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).', + }, + _lastModified: { + type: require('./element.schema.js'), + description: + 'The date/time that the resource was modified on the server.', + }, + lastModified: { + type: InstantScalar, + description: + 'The date/time that the resource was modified on the server.', + }, + outcome: { + type: require('./resourcelist.schema'), + description: + 'An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/bundleentrysearch.schema.js b/src/resources/4_0_0/schemas/bundleentrysearch.schema.js new file mode 100644 index 00000000..3e1c7a84 --- /dev/null +++ b/src/resources/4_0_0/schemas/bundleentrysearch.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Bundleentrysearch Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Bundleentrysearch', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.schema.js'), + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.", + }, + mode: { + type: CodeScalar, + description: + "Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.", + }, + _score: { + type: require('./element.schema.js'), + description: + "When searching, the server's search ranking score for the entry.", + }, + score: { + type: GraphQLFloat, + description: + "When searching, the server's search ranking score for the entry.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/bundlelink.schema.js b/src/resources/4_0_0/schemas/bundlelink.schema.js new file mode 100644 index 00000000..f82cc893 --- /dev/null +++ b/src/resources/4_0_0/schemas/bundlelink.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Bundlelink Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Bundlelink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _relation: { + type: require('./element.schema.js'), + description: + 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', + }, + relation: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).', + }, + _url: { + type: require('./element.schema.js'), + description: 'The reference details for the link.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: 'The reference details for the link.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatement.schema.js b/src/resources/4_0_0/schemas/capabilitystatement.schema.js new file mode 100644 index 00000000..fc61a093 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatement.schema.js @@ -0,0 +1,309 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatement Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatement', + description: + 'A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CapabilityStatement_Enum_schema', + values: { CapabilityStatement: { value: 'CapabilityStatement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the capability statement.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the capability statement.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this capability statement. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this capability statement. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the capability statement was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the capability statement was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the capability statement.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the capability statement.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate capability statement instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the capability statement is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this capability statement is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this capability statement is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + _instantiates: { + type: require('./element.schema.js'), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.', + }, + instantiates: { + type: new GraphQLList(CanonicalScalar), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details.', + }, + _imports: { + type: require('./element.schema.js'), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.', + }, + imports: { + type: new GraphQLList(CanonicalScalar), + description: + 'Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them.', + }, + software: { + type: require('./capabilitystatementsoftware.schema.js'), + description: + 'Software that is covered by this capability statement. It is used when the capability statement describes the capabilities of a particular software version, independent of an installation.', + }, + implementation: { + type: require('./capabilitystatementimplementation.schema.js'), + description: + 'Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value.', + }, + fhirVersion: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value.', + }, + _format: { + type: require('./element.schema.js'), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + format: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'A list of the formats supported by this implementation using their content types.', + }, + _patchFormat: { + type: require('./element.schema.js'), + description: + 'A list of the patch formats supported by this implementation using their content types.', + }, + patchFormat: { + type: new GraphQLList(CodeScalar), + description: + 'A list of the patch formats supported by this implementation using their content types.', + }, + _implementationGuide: { + type: require('./element.schema.js'), + description: + 'A list of implementation guides that the server does (or should) support in their entirety.', + }, + implementationGuide: { + type: new GraphQLList(CanonicalScalar), + description: + 'A list of implementation guides that the server does (or should) support in their entirety.', + }, + rest: { + type: new GraphQLList(require('./capabilitystatementrest.schema.js')), + description: + 'A definition of the restful capabilities of the solution, if any.', + }, + messaging: { + type: new GraphQLList( + require('./capabilitystatementmessaging.schema.js'), + ), + description: + 'A description of the messaging capabilities of the solution.', + }, + document: { + type: new GraphQLList(require('./capabilitystatementdocument.schema.js')), + description: 'A document definition.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementdocument.schema.js b/src/resources/4_0_0/schemas/capabilitystatementdocument.schema.js new file mode 100644 index 00000000..6752e86b --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementdocument.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementdocument Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementdocument', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Mode of this document declaration - whether an application is a producer or consumer.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Mode of this document declaration - whether an application is a producer or consumer.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', + }, + documentation: { + type: GraphQLString, + description: + 'A description of how the application supports or uses the specified document profile. For example, when documents are created, what action is taken with consumed documents, etc.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'A profile on the document Bundle that constrains which resources are present, and their contents.', + }, + profile: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A profile on the document Bundle that constrains which resources are present, and their contents.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementimplementation.schema.js b/src/resources/4_0_0/schemas/capabilitystatementimplementation.schema.js new file mode 100644 index 00000000..a7c5636a --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementimplementation.schema.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementimplementation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementimplementation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: + 'Information about the specific installation that this capability statement relates to.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Information about the specific installation that this capability statement relates to.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + url: { + type: UrlScalar, + description: + 'An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.', + }, + custodian: { + type: new GraphQLUnionType({ + name: 'CapabilityStatementimplementationcustodian_custodian_Union', + description: + 'The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization responsible for the management of the instance and oversight of the data on the server at the specified URL.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementmessaging.schema.js b/src/resources/4_0_0/schemas/capabilitystatementmessaging.schema.js new file mode 100644 index 00000000..c8e57cdc --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementmessaging.schema.js @@ -0,0 +1,67 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementmessaging Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementmessaging', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + endpoint: { + type: new GraphQLList( + require('./capabilitystatementmessagingendpoint.schema.js'), + ), + description: + 'An endpoint (network accessible address) to which messages and/or replies are to be sent.', + }, + _reliableCache: { + type: require('./element.schema.js'), + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + reliableCache: { + type: UnsignedIntScalar, + description: + "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", + }, + documentation: { + type: GraphQLString, + description: + "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement. For example, the process for becoming an authorized messaging exchange partner.", + }, + supportedMessage: { + type: new GraphQLList( + require('./capabilitystatementmessagingsupportedmessage.schema.js'), + ), + description: + 'References to message definitions for messages this system can send or receive.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementmessagingendpoint.schema.js b/src/resources/4_0_0/schemas/capabilitystatementmessagingendpoint.schema.js new file mode 100644 index 00000000..d9cdd8c2 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementmessagingendpoint.schema.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementmessagingendpoint Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementmessagingendpoint', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + protocol: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A list of the messaging transport protocol(s) identifiers, supported by this endpoint.', + }, + _address: { + type: require('./element.schema.js'), + description: + 'The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + address: { + type: new GraphQLNonNull(UrlScalar), + description: + 'The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementmessagingsupportedmessage.schema.js b/src/resources/4_0_0/schemas/capabilitystatementmessagingsupportedmessage.schema.js new file mode 100644 index 00000000..29e36b19 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementmessagingsupportedmessage.schema.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementmessagingsupportedMessage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementmessagingsupportedMessage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.schema.js'), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The mode of this event declaration - whether application is sender or receiver.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', + }, + definition: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Points to a message definition that identifies the messaging event, message structure, allowed responses, etc.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementrest.schema.js b/src/resources/4_0_0/schemas/capabilitystatementrest.schema.js new file mode 100644 index 00000000..133492d0 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementrest.schema.js @@ -0,0 +1,88 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementrest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + documentation: { + type: GraphQLString, + description: + "Information about the system's restful capabilities that apply across all applications, such as security.", + }, + security: { + type: require('./capabilitystatementrestsecurity.schema.js'), + description: + 'Information about security implementation from an interface perspective - what a client needs to know.', + }, + resource: { + type: new GraphQLList( + require('./capabilitystatementrestresource.schema.js'), + ), + description: + 'A specification of the restful capabilities of the solution for a specific resource type.', + }, + interaction: { + type: new GraphQLList( + require('./capabilitystatementrestinteraction.schema.js'), + ), + description: + 'A specification of restful operations supported by the system.', + }, + _compartment: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', + }, + compartment: { + type: new GraphQLList(CanonicalScalar), + description: + 'An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL .', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementrestinteraction.schema.js b/src/resources/4_0_0/schemas/capabilitystatementrestinteraction.schema.js new file mode 100644 index 00000000..60e3deb3 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementrestinteraction.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestinteraction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementrestinteraction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'A coded identifier of the operation, supported by the system.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A coded identifier of the operation, supported by the system.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + documentation: { + type: GraphQLString, + description: + 'Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementrestresource.schema.js b/src/resources/4_0_0/schemas/capabilitystatementrestresource.schema.js new file mode 100644 index 00000000..25d96eb8 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementrestresource.schema.js @@ -0,0 +1,194 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestresource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementrestresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'A type of resource exposed via the restful interface.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'A type of resource exposed via the restful interface.', + }, + _profile: { + type: require('./element.schema.js'), + description: + "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + profile: { + type: CanonicalScalar, + description: + "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + _supportedProfile: { + type: require('./element.schema.js'), + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + supportedProfile: { + type: new GraphQLList(CanonicalScalar), + description: + "A list of profiles that represent different use cases supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses).", + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Additional information about the resource type used by the system.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional information about the resource type used by the system.', + }, + interaction: { + type: new GraphQLList( + require('./capabilitystatementrestresourceinteraction.schema.js'), + ), + description: 'Identifies a restful operation supported by the solution.', + }, + _versioning: { + type: require('./element.schema.js'), + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + versioning: { + type: CodeScalar, + description: + "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", + }, + _readHistory: { + type: require('./element.schema.js'), + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + readHistory: { + type: GraphQLBoolean, + description: + 'A flag for whether the server is able to return past versions as part of the vRead operation.', + }, + _updateCreate: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + updateCreate: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.', + }, + _conditionalCreate: { + type: require('./element.schema.js'), + description: + 'A flag that indicates that the server supports conditional create.', + }, + conditionalCreate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional create.', + }, + _conditionalRead: { + type: require('./element.schema.js'), + description: + 'A code that indicates how the server supports conditional read.', + }, + conditionalRead: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional read.', + }, + _conditionalUpdate: { + type: require('./element.schema.js'), + description: + 'A flag that indicates that the server supports conditional update.', + }, + conditionalUpdate: { + type: GraphQLBoolean, + description: + 'A flag that indicates that the server supports conditional update.', + }, + _conditionalDelete: { + type: require('./element.schema.js'), + description: + 'A code that indicates how the server supports conditional delete.', + }, + conditionalDelete: { + type: CodeScalar, + description: + 'A code that indicates how the server supports conditional delete.', + }, + _referencePolicy: { + type: require('./element.schema.js'), + description: 'A set of flags that defines how references are supported.', + }, + referencePolicy: { + type: new GraphQLList(CodeScalar), + description: 'A set of flags that defines how references are supported.', + }, + _searchInclude: { + type: require('./element.schema.js'), + description: 'A list of _include values supported by the server.', + }, + searchInclude: { + type: new GraphQLList(GraphQLString), + description: 'A list of _include values supported by the server.', + }, + _searchRevInclude: { + type: require('./element.schema.js'), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchRevInclude: { + type: new GraphQLList(GraphQLString), + description: + 'A list of _revinclude (reverse include) values supported by the server.', + }, + searchParam: { + type: new GraphQLList( + require('./capabilitystatementrestresourcesearchparam.schema.js'), + ), + description: + 'Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.', + }, + operation: { + type: new GraphQLList( + require('./capabilitystatementrestresourceoperation.schema.js'), + ), + description: + 'Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementrestresourceinteraction.schema.js b/src/resources/4_0_0/schemas/capabilitystatementrestresourceinteraction.schema.js new file mode 100644 index 00000000..ee16586e --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementrestresourceinteraction.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestresourceinteraction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementrestresourceinteraction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Coded identifier of the operation, supported by the system resource.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + documentation: { + type: GraphQLString, + description: + "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementrestresourceoperation.schema.js b/src/resources/4_0_0/schemas/capabilitystatementrestresourceoperation.schema.js new file mode 100644 index 00000000..55edd922 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementrestresourceoperation.schema.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestresourceoperation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementrestresourceoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the operation or query. For an operation, this is the name prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called.', + }, + _definition: { + type: require('./element.schema.js'), + description: + "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation. If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition. The custom definition would describe the specific subset of functionality supported.", + }, + definition: { + type: new GraphQLNonNull(CanonicalScalar), + description: + "Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation. If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition. The custom definition would describe the specific subset of functionality supported.", + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.', + }, + documentation: { + type: GraphQLString, + description: + 'Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementrestresourcesearchparam.schema.js b/src/resources/4_0_0/schemas/capabilitystatementrestresourcesearchparam.schema.js new file mode 100644 index 00000000..f2b32462 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementrestresourcesearchparam.schema.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementrestresourcesearchParam Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementrestresourcesearchParam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of the search parameter used in the interface.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the search parameter used in the interface.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.', + }, + definition: { + type: CanonicalScalar, + description: + 'An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value a search parameter refers to, and how the content is interpreted.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + documentation: { + type: GraphQLString, + description: + 'This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementrestsecurity.schema.js b/src/resources/4_0_0/schemas/capabilitystatementrestsecurity.schema.js new file mode 100644 index 00000000..404cd685 --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementrestsecurity.schema.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CapabilityStatementrestsecurity Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementrestsecurity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _cors: { + type: require('./element.schema.js'), + description: + 'Server adds CORS headers when responding to requests - this enables Javascript applications to use the server.', + }, + cors: { + type: GraphQLBoolean, + description: + 'Server adds CORS headers when responding to requests - this enables Javascript applications to use the server.', + }, + service: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Types of security services that are supported/required by the system.', + }, + _description: { + type: require('./element.schema.js'), + description: 'General description of how security works.', + }, + description: { + type: GraphQLString, + description: 'General description of how security works.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/capabilitystatementsoftware.schema.js b/src/resources/4_0_0/schemas/capabilitystatementsoftware.schema.js new file mode 100644 index 00000000..6d34f08d --- /dev/null +++ b/src/resources/4_0_0/schemas/capabilitystatementsoftware.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CapabilityStatementsoftware Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CapabilityStatementsoftware', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Name the software is known by.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name the software is known by.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version identifier for the software covered by this statement.', + }, + version: { + type: GraphQLString, + description: + 'The version identifier for the software covered by this statement.', + }, + _releaseDate: { + type: require('./element.schema.js'), + description: 'Date this version of the software was released.', + }, + releaseDate: { + type: DateTimeScalar, + description: 'Date this version of the software was released.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/careplan.schema.js b/src/resources/4_0_0/schemas/careplan.schema.js new file mode 100644 index 00000000..7fcabc2a --- /dev/null +++ b/src/resources/4_0_0/schemas/careplan.schema.js @@ -0,0 +1,418 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CarePlan Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CarePlan', + description: + 'Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CarePlan_Enum_schema', + values: { CarePlan: { value: 'CarePlan' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanbasedOn_basedOn_Union', + description: + 'A care plan that is fulfilled in whole or in part by this care plan.', + types: () => [require('./careplan.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + }, + }), + ), + description: + 'A care plan that is fulfilled in whole or in part by this care plan.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanreplaces_replaces_Union', + description: + 'Completed or terminated care plan whose function is taken by this new care plan.', + types: () => [require('./careplan.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + }, + }), + ), + description: + 'Completed or terminated care plan whose function is taken by this new care plan.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanpartOf_partOf_Union', + description: + 'A larger care plan of which this particular care plan is a component or step.', + types: () => [require('./careplan.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + }, + }), + ), + description: + 'A larger care plan of which this particular care plan is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Identifies what 'kind' of plan this is to support differentiation between multiple co-existing plans; e.g. 'Home health', 'psychiatric', 'asthma', 'disease management', 'wellness plan', etc.", + }, + _title: { + type: require('./element.schema.js'), + description: 'Human-friendly name for the care plan.', + }, + title: { + type: GraphQLString, + description: 'Human-friendly name for the care plan.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of the scope and nature of the plan.', + }, + description: { + type: GraphQLString, + description: 'A description of the scope and nature of the plan.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CarePlansubject_subject_Union', + description: + 'Identifies the patient or group whose intended care is described by the plan.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'Identifies the patient or group whose intended care is described by the plan.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'CarePlanencounter_encounter_Union', + description: + 'The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates when the plan did (or is intended to) come into effect and end.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'Represents when this particular CarePlan record was created in the system, which is often a system-generated date.', + }, + created: { + type: DateTimeScalar, + description: + 'Represents when this particular CarePlan record was created in the system, which is often a system-generated date.', + }, + author: { + type: new GraphQLUnionType({ + name: 'CarePlanauthor_author_Union', + description: + 'When populated, the author is responsible for the care plan. The care plan is attributed to the author.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + description: + 'When populated, the author is responsible for the care plan. The care plan is attributed to the author.', + }, + contributor: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlancontributor_contributor_Union', + description: + 'Identifies the individual(s) or organization who provided the contents of the care plan.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + 'Identifies the individual(s) or organization who provided the contents of the care plan.', + }, + careTeam: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlancareTeam_careTeam_Union', + description: + 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', + types: () => [require('./careteam.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + 'Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.', + }, + addresses: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanaddresses_addresses_Union', + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlansupportingInfo_supportingInfo_Union', + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include comorbidities, recent procedures, limitations, recent assessments, etc.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Identifies portions of the patient's record that specifically influenced the formation of the plan. These might include comorbidities, recent procedures, limitations, recent assessments, etc.", + }, + goal: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlangoal_goal_Union', + description: + 'Describes the intended objective(s) of carrying out the care plan.', + types: () => [require('./goal.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); + } + }, + }), + ), + description: + 'Describes the intended objective(s) of carrying out the care plan.', + }, + activity: { + type: new GraphQLList(require('./careplanactivity.schema.js')), + description: + 'Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'General notes about the care plan not covered elsewhere.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/careplanactivity.schema.js b/src/resources/4_0_0/schemas/careplanactivity.schema.js new file mode 100644 index 00000000..29196a17 --- /dev/null +++ b/src/resources/4_0_0/schemas/careplanactivity.schema.js @@ -0,0 +1,117 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CarePlanactivity Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CarePlanactivity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + outcomeCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies the outcome at the point when the status of the activity is assessed. For example, the outcome of an education activity could be patient understands (or not).', + }, + outcomeReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivityoutcomeReference_outcomeReference_Union', + description: + "Details of the outcome or action resulting from the activity. The reference to an 'event' resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Details of the outcome or action resulting from the activity. The reference to an 'event' resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself. The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource).", + }, + progress: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Notes about the adherence/status/progress of the activity.', + }, + reference: { + type: new GraphQLUnionType({ + name: 'CarePlanactivityreference_reference_Union', + description: + 'The details of the proposed activity represented in a specific resource.', + types: () => [ + require('./appointment.schema.js'), + require('./communicationrequest.schema.js'), + require('./devicerequest.schema.js'), + require('./medicationrequest.schema.js'), + require('./nutritionorder.schema.js'), + require('./task.schema.js'), + require('./servicerequest.schema.js'), + require('./visionprescription.schema.js'), + require('./requestgroup.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + if (data && data.resourceType === 'DeviceRequest') { + return require('./devicerequest.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'Task') { + return require('./task.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + if (data && data.resourceType === 'RequestGroup') { + return require('./requestgroup.schema.js'); + } + }, + }), + description: + 'The details of the proposed activity represented in a specific resource.', + }, + detail: { + type: require('./careplanactivitydetail.schema.js'), + description: + "A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/careplanactivitydetail.schema.js b/src/resources/4_0_0/schemas/careplanactivitydetail.schema.js new file mode 100644 index 00000000..0b11a8dd --- /dev/null +++ b/src/resources/4_0_0/schemas/careplanactivitydetail.schema.js @@ -0,0 +1,282 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary CarePlanactivitydetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CarePlanactivitydetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _kind: { + type: require('./element.schema.js'), + description: + 'A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.', + }, + kind: { + type: CodeScalar, + description: + 'A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailreasonReference_reasonReference_Union', + description: + 'Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.', + }, + goal: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailgoal_goal_Union', + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + types: () => [require('./goal.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); + } + }, + }), + ), + description: + 'Internal reference that identifies the goals that this activity is intended to contribute towards meeting.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Identifies what progress is being made for the specific activity.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies what progress is being made for the specific activity.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + "Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.", + }, + _doNotPerform: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.', + }, + scheduledTiming: { + type: require('./timing.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledPeriod: { + type: require('./period.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + _scheduledString: { + type: require('./element.schema.js'), + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + scheduledString: { + type: GraphQLString, + description: + 'The period, timing or frequency upon which the described activity is to occur.', + }, + location: { + type: new GraphQLUnionType({ + name: 'CarePlanactivitydetaillocation_location_Union', + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CarePlanactivitydetailperformer_performer_Union', + description: + "Identifies who's expected to be involved in the activity.", + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./careteam.schema.js'), + require('./healthcareservice.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: "Identifies who's expected to be involved in the activity.", + }, + productCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + productReference: { + type: new GraphQLUnionType({ + name: 'CarePlanactivitydetailproductReference_productReference_Union', + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Identifies the food, drug or other product to be consumed or supplied in the activity.', + }, + dailyAmount: { + type: require('./quantity.schema.js'), + description: + 'Identifies the quantity expected to be consumed in a given day.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Identifies the quantity expected to be supplied, administered or consumed by the subject.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + description: { + type: GraphQLString, + description: + 'This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/careteam.schema.js b/src/resources/4_0_0/schemas/careteam.schema.js new file mode 100644 index 00000000..f645d7a3 --- /dev/null +++ b/src/resources/4_0_0/schemas/careteam.schema.js @@ -0,0 +1,202 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CareTeam Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CareTeam', + description: + 'The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CareTeam_Enum_schema', + values: { CareTeam: { value: 'CareTeam' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current state of the care team.', + }, + status: { + type: CodeScalar, + description: 'Indicates the current state of the care team.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.', + }, + _name: { + type: require('./element.schema.js'), + description: + "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", + }, + name: { + type: GraphQLString, + description: + "A label for human use intended to distinguish like teams. E.g. the 'red' vs. 'green' trauma teams.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'CareTeamsubject_subject_Union', + description: + 'Identifies the patient or group whose intended care is handled by the team.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'Identifies the patient or group whose intended care is handled by the team.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'CareTeamencounter_encounter_Union', + description: + 'The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates when the team did (or is intended to) come into effect and end.', + }, + participant: { + type: new GraphQLList(require('./careteamparticipant.schema.js')), + description: + 'Identifies all people and organizations who are expected to be involved in the care team.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Describes why the care team exists.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CareTeamreasonReference_reasonReference_Union', + description: 'Condition(s) that this care team addresses.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: 'Condition(s) that this care team addresses.', + }, + managingOrganization: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CareTeammanagingOrganization_managingOrganization_Union', + description: 'The organization responsible for the care team.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The organization responsible for the care team.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A central contact detail for the care team (that applies to all members).', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Comments made about the CareTeam.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/careteamparticipant.schema.js b/src/resources/4_0_0/schemas/careteamparticipant.schema.js new file mode 100644 index 00000000..28eb3f80 --- /dev/null +++ b/src/resources/4_0_0/schemas/careteamparticipant.schema.js @@ -0,0 +1,97 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CareTeamparticipant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CareTeamparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Indicates specific responsibility of an individual within the care team, such as 'Primary care physician', 'Trained social worker counselor', 'Caregiver', etc.", + }, + member: { + type: new GraphQLUnionType({ + name: 'CareTeamparticipantmember_member_Union', + description: + 'The specific person or organization who is participating/expected to participate in the care team.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + description: + 'The specific person or organization who is participating/expected to participate in the care team.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'CareTeamparticipantonBehalfOf_onBehalfOf_Union', + description: 'The organization of the practitioner.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization of the practitioner.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates when the specific member or organization did (or is intended to) come into effect and end.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/catalogentry.schema.js b/src/resources/4_0_0/schemas/catalogentry.schema.js new file mode 100644 index 00000000..34bab46f --- /dev/null +++ b/src/resources/4_0_0/schemas/catalogentry.schema.js @@ -0,0 +1,217 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CatalogEntry Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CatalogEntry', + description: + 'Catalog entries are wrappers that contextualize items included in a catalog.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CatalogEntry_Enum_schema', + values: { CatalogEntry: { value: 'CatalogEntry' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of item - medication, device, service, protocol or other.', + }, + _orderable: { + type: require('./element.schema.js'), + description: 'Whether the entry represents an orderable item.', + }, + orderable: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether the entry represents an orderable item.', + }, + referencedItem: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CatalogEntryreferencedItem_referencedItem_Union', + description: 'The item in a catalog or definition.', + types: () => [ + require('./medication.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./healthcareservice.schema.js'), + require('./activitydefinition.schema.js'), + require('./plandefinition.schema.js'), + require('./specimendefinition.schema.js'), + require('./observationdefinition.schema.js'), + require('./binary.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'SpecimenDefinition') { + return require('./specimendefinition.schema.js'); + } + if (data && data.resourceType === 'ObservationDefinition') { + return require('./observationdefinition.schema.js'); + } + if (data && data.resourceType === 'Binary') { + return require('./binary.schema.js'); + } + }, + }), + ), + description: 'The item in a catalog or definition.', + }, + additionalIdentifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Used in supporting related concepts, e.g. NDC to RxNorm.', + }, + classification: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Classes of devices, or ATC for medication.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.', + }, + status: { + type: CodeScalar, + description: + 'Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.', + }, + validityPeriod: { + type: require('./period.schema.js'), + description: + 'The time period in which this catalog entry is expected to be active.', + }, + _validTo: { + type: require('./element.schema.js'), + description: + 'The date until which this catalog entry is expected to be active.', + }, + validTo: { + type: DateTimeScalar, + description: + 'The date until which this catalog entry is expected to be active.', + }, + _lastUpdated: { + type: require('./element.schema.js'), + description: + 'Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.', + }, + lastUpdated: { + type: DateTimeScalar, + description: + 'Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated.', + }, + additionalCharacteristic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Used for examplefor Out of Formulary, or any specifics.', + }, + additionalClassification: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'User for example for ATC classification, or.', + }, + relatedEntry: { + type: new GraphQLList(require('./catalogentryrelatedentry.schema.js')), + description: + 'Used for example, to point to a substance, or to a device used to administer a medication.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/catalogentryrelatedentry.schema.js b/src/resources/4_0_0/schemas/catalogentryrelatedentry.schema.js new file mode 100644 index 00000000..da8bcd9a --- /dev/null +++ b/src/resources/4_0_0/schemas/catalogentryrelatedentry.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CatalogEntryrelatedEntry Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CatalogEntryrelatedEntry', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _relationtype: { + type: require('./element.schema.js'), + description: + 'The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.', + }, + relationtype: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.', + }, + item: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CatalogEntryrelatedEntryitem_item_Union', + description: 'The reference to the related item.', + types: () => [require('./catalogentry.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CatalogEntry') { + return require('./catalogentry.schema.js'); + } + }, + }), + ), + description: 'The reference to the related item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/chargeitem.schema.js b/src/resources/4_0_0/schemas/chargeitem.schema.js new file mode 100644 index 00000000..85983760 --- /dev/null +++ b/src/resources/4_0_0/schemas/chargeitem.schema.js @@ -0,0 +1,446 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLFloat, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ChargeItem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ChargeItem', + description: + 'The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ChargeItem_Enum_schema', + values: { ChargeItem: { value: 'ChargeItem' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this event performer or other systems.', + }, + _definitionUri: { + type: require('./element.schema.js'), + description: + 'References the (external) source of pricing information, rules of application for the code this ChargeItem uses.', + }, + definitionUri: { + type: new GraphQLList(UriScalar), + description: + 'References the (external) source of pricing information, rules of application for the code this ChargeItem uses.', + }, + _definitionCanonical: { + type: require('./element.schema.js'), + description: + 'References the source of pricing information, rules of application for the code this ChargeItem uses.', + }, + definitionCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'References the source of pricing information, rules of application for the code this ChargeItem uses.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the ChargeItem.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the ChargeItem.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItempartOf_partOf_Union', + description: + 'ChargeItems can be grouped to larger ChargeItems covering the whole set.', + types: () => [require('./chargeitem.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ChargeItem') { + return require('./chargeitem.schema.js'); + } + }, + }), + ), + description: + 'ChargeItems can be grouped to larger ChargeItems covering the whole set.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code that identifies the charge, like a billing code.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ChargeItemsubject_subject_Union', + description: + 'The individual or set of individuals the action is being or was performed on.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The individual or set of individuals the action is being or was performed on.', + }, + context: { + type: new GraphQLUnionType({ + name: 'ChargeItemcontext_context_Union', + description: + 'The encounter or episode of care that establishes the context for this event.', + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care that establishes the context for this event.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: + 'Date/time(s) or duration when the charged service was applied.', + }, + performer: { + type: new GraphQLList(require('./chargeitemperformer.schema.js')), + description: + 'Indicates who or what performed or participated in the charged service.', + }, + performingOrganization: { + type: new GraphQLUnionType({ + name: 'ChargeItemperformingOrganization_performingOrganization_Union', + description: 'The organization requesting the service.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization requesting the service.', + }, + requestingOrganization: { + type: new GraphQLUnionType({ + name: 'ChargeItemrequestingOrganization_requestingOrganization_Union', + description: 'The organization performing the service.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization performing the service.', + }, + costCenter: { + type: new GraphQLUnionType({ + name: 'ChargeItemcostCenter_costCenter_Union', + description: + 'The financial cost center permits the tracking of charge attribution.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The financial cost center permits the tracking of charge attribution.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'Quantity of which the charge item has been serviced.', + }, + bodysite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The anatomical location where the related service has been applied.', + }, + _factorOverride: { + type: require('./element.schema.js'), + description: + 'Factor overriding the factor determined by the rules associated with the code.', + }, + factorOverride: { + type: GraphQLFloat, + description: + 'Factor overriding the factor determined by the rules associated with the code.', + }, + priceOverride: { + type: require('./money.schema.js'), + description: + 'Total price of the charge overriding the list price associated with the code.', + }, + _overrideReason: { + type: require('./element.schema.js'), + description: + 'If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', + }, + overrideReason: { + type: GraphQLString, + description: + 'If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the reason for this action.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'ChargeItementerer_enterer_Union', + description: + 'The device, practitioner, etc. who entered the charge item.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The device, practitioner, etc. who entered the charge item.', + }, + _enteredDate: { + type: require('./element.schema.js'), + description: 'Date the charge item was entered.', + }, + enteredDate: { + type: DateTimeScalar, + description: 'Date the charge item was entered.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Describes why the event occurred in coded or textual form.', + }, + service: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItemservice_service_Union', + description: + 'Indicated the rendered service that caused this charge.', + types: () => [ + require('./diagnosticreport.schema.js'), + require('./imagingstudy.schema.js'), + require('./immunization.schema.js'), + require('./medicationadministration.schema.js'), + require('./medicationdispense.schema.js'), + require('./observation.schema.js'), + require('./procedure.schema.js'), + require('./supplydelivery.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'MedicationDispense') { + return require('./medicationdispense.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'SupplyDelivery') { + return require('./supplydelivery.schema.js'); + } + }, + }), + ), + description: 'Indicated the rendered service that caused this charge.', + }, + productReference: { + type: new GraphQLUnionType({ + name: 'ChargeItemproductReference_productReference_Union', + description: + 'Identifies the device, food, drug or other product being charged either by type code or reference to an instance.', + types: () => [ + require('./device.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Identifies the device, food, drug or other product being charged either by type code or reference to an instance.', + }, + productCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the device, food, drug or other product being charged either by type code or reference to an instance.', + }, + account: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItemaccount_account_Union', + description: 'Account into which this ChargeItems belongs.', + types: () => [require('./account.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + }, + }), + ), + description: 'Account into which this ChargeItems belongs.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the event by the performer, subject or other participants.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItemsupportingInformation_supportingInformation_Union', + description: 'Further information supporting this charge.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Further information supporting this charge.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/chargeitemdefinition.schema.js b/src/resources/4_0_0/schemas/chargeitemdefinition.schema.js new file mode 100644 index 00000000..f7cfb6e9 --- /dev/null +++ b/src/resources/4_0_0/schemas/chargeitemdefinition.schema.js @@ -0,0 +1,298 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ChargeItemDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ChargeItemDefinition', + description: + 'The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ChargeItemDefinition_Enum_schema', + values: { ChargeItemDefinition: { value: 'ChargeItemDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the charge item definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the charge item definition.', + }, + _derivedFromUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.', + }, + derivedFromUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition.', + }, + _partOf: { + type: require('./element.schema.js'), + description: + 'A larger definition of which this particular definition is a component or step.', + }, + partOf: { + type: new GraphQLList(CanonicalScalar), + description: + 'A larger definition of which this particular definition is a component or step.', + }, + _replaces: { + type: require('./element.schema.js'), + description: + 'As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.', + }, + replaces: { + type: new GraphQLList(CanonicalScalar), + description: + 'As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the ChargeItemDefinition.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the ChargeItemDefinition.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the charge item definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the charge item definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the charge item definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the charge item definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate charge item definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the charge item definition is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the charge item definition content was or is planned to be in active use.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'The defined billing details in this resource pertain to the given billing code.', + }, + instance: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ChargeItemDefinitioninstance_instance_Union', + description: + 'The defined billing details in this resource pertain to the given product instance(s).', + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The defined billing details in this resource pertain to the given product instance(s).', + }, + applicability: { + type: new GraphQLList( + require('./chargeitemdefinitionapplicability.schema.js'), + ), + description: + 'Expressions that describe applicability criteria for the billing code.', + }, + propertyGroup: { + type: new GraphQLList( + require('./chargeitemdefinitionpropertygroup.schema.js'), + ), + description: + 'Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/chargeitemdefinitionapplicability.schema.js b/src/resources/4_0_0/schemas/chargeitemdefinitionapplicability.schema.js new file mode 100644 index 00000000..fd3ae800 --- /dev/null +++ b/src/resources/4_0_0/schemas/chargeitemdefinitionapplicability.schema.js @@ -0,0 +1,62 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary ChargeItemDefinitionapplicability Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ChargeItemDefinitionapplicability', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + _language: { + type: require('./element.schema.js'), + description: + "The media type of the language for the expression, e.g. 'text/cql' for Clinical Query Language expressions or 'text/fhirpath' for FHIRPath expressions.", + }, + language: { + type: GraphQLString, + description: + "The media type of the language for the expression, e.g. 'text/cql' for Clinical Query Language expressions or 'text/fhirpath' for FHIRPath expressions.", + }, + _expression: { + type: require('./element.schema.js'), + description: + 'An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context environment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.', + }, + expression: { + type: GraphQLString, + description: + 'An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context environment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/chargeitemdefinitionpropertygroup.schema.js b/src/resources/4_0_0/schemas/chargeitemdefinitionpropertygroup.schema.js new file mode 100644 index 00000000..153da03b --- /dev/null +++ b/src/resources/4_0_0/schemas/chargeitemdefinitionpropertygroup.schema.js @@ -0,0 +1,39 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary ChargeItemDefinitionpropertyGroup Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ChargeItemDefinitionpropertyGroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + priceComponent: { + type: new GraphQLList( + require('./chargeitemdefinitionpropertygrouppricecomponent.schema.js'), + ), + description: + 'The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/chargeitemdefinitionpropertygrouppricecomponent.schema.js b/src/resources/4_0_0/schemas/chargeitemdefinitionpropertygrouppricecomponent.schema.js new file mode 100644 index 00000000..10f90569 --- /dev/null +++ b/src/resources/4_0_0/schemas/chargeitemdefinitionpropertygrouppricecomponent.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ChargeItemDefinitionpropertyGrouppriceComponent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ChargeItemDefinitionpropertyGrouppriceComponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'This code identifies the type of the component.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'This code identifies the type of the component.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'The factor that has been applied on the base price for calculating this component.', + }, + factor: { + type: GraphQLFloat, + description: + 'The factor that has been applied on the base price for calculating this component.', + }, + amount: { + type: require('./money.schema.js'), + description: 'The amount calculated for this component.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/chargeitemperformer.schema.js b/src/resources/4_0_0/schemas/chargeitemperformer.schema.js new file mode 100644 index 00000000..04ec397b --- /dev/null +++ b/src/resources/4_0_0/schemas/chargeitemperformer.schema.js @@ -0,0 +1,86 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ChargeItemperformer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ChargeItemperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.).', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ChargeItemperformeractor_actor_Union', + description: + 'The device, practitioner, etc. who performed or participated in the service.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The device, practitioner, etc. who performed or participated in the service.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claim.schema.js b/src/resources/4_0_0/schemas/claim.schema.js new file mode 100644 index 00000000..416fb739 --- /dev/null +++ b/src/resources/4_0_0/schemas/claim.schema.js @@ -0,0 +1,343 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Claim Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claim', + description: + 'A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Claim_Enum_schema', + values: { Claim: { value: 'Claim' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'A unique identifier assigned to this claim.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The category of claim, e.g. oral, pharmacy, vision, institutional, professional.', + }, + subType: { + type: require('./codeableconcept.schema.js'), + description: + 'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.', + }, + _use: { + type: require('./element.schema.js'), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Claimpatient_patient_Union', + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.', + }, + billablePeriod: { + type: require('./period.schema.js'), + description: 'The period for which charges are being submitted.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'Claimenterer_enterer_Union', + description: + 'Individual who created the claim, predetermination or preauthorization.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'Individual who created the claim, predetermination or preauthorization.', + }, + insurer: { + type: new GraphQLUnionType({ + name: 'Claiminsurer_insurer_Union', + description: 'The Insurer who is target of the request.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Claimprovider_provider_Union', + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + }, + priority: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The provider-required urgency of processing the request. Typical values include: stat, routine deferred.', + }, + fundsReserve: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to indicate whether and for whom funds are to be reserved for future claims.', + }, + related: { + type: new GraphQLList(require('./claimrelated.schema.js')), + description: + 'Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.', + }, + prescription: { + type: new GraphQLUnionType({ + name: 'Claimprescription_prescription_Union', + description: + 'Prescription to support the dispensing of pharmacy, device or vision products.', + types: () => [ + require('./devicerequest.schema.js'), + require('./medicationrequest.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'DeviceRequest') { + return require('./devicerequest.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, + }), + description: + 'Prescription to support the dispensing of pharmacy, device or vision products.', + }, + originalPrescription: { + type: new GraphQLUnionType({ + name: 'ClaimoriginalPrescription_originalPrescription_Union', + description: + 'Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.', + types: () => [ + require('./devicerequest.schema.js'), + require('./medicationrequest.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'DeviceRequest') { + return require('./devicerequest.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, + }), + description: + 'Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.', + }, + payee: { + type: require('./claimpayee.schema.js'), + description: + 'The party to be reimbursed for cost of the products and services according to the terms of the policy.', + }, + referral: { + type: new GraphQLUnionType({ + name: 'Claimreferral_referral_Union', + description: 'A reference to a referral resource.', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + description: 'A reference to a referral resource.', + }, + facility: { + type: new GraphQLUnionType({ + name: 'Claimfacility_facility_Union', + description: 'Facility where the services were provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Facility where the services were provided.', + }, + careTeam: { + type: new GraphQLList(require('./claimcareteam.schema.js')), + description: + 'The members of the team who provided the products and services.', + }, + supportingInfo: { + type: new GraphQLList(require('./claimsupportinginfo.schema.js')), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.', + }, + diagnosis: { + type: new GraphQLList(require('./claimdiagnosis.schema.js')), + description: 'Information about diagnoses relevant to the claim items.', + }, + procedure: { + type: new GraphQLList(require('./claimprocedure.schema.js')), + description: + 'Procedures performed on the patient relevant to the billing items with the claim.', + }, + insurance: { + type: new GraphQLList( + new GraphQLNonNull(require('./claiminsurance.schema.js')), + ), + description: + 'Financial instruments for reimbursement for the health care products and services specified on the claim.', + }, + accident: { + type: require('./claimaccident.schema.js'), + description: + 'Details of an accident which resulted in injuries which required the products and services listed in the claim.', + }, + item: { + type: new GraphQLList(require('./claimitem.schema.js')), + description: + "A claim line. Either a simple product or service or a 'group' of details which can each be a simple items or groups of sub-details.", + }, + total: { + type: require('./money.schema.js'), + description: 'The total value of the all the items in the claim.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimaccident.schema.js b/src/resources/4_0_0/schemas/claimaccident.schema.js new file mode 100644 index 00000000..6d04459c --- /dev/null +++ b/src/resources/4_0_0/schemas/claimaccident.schema.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Claimaccident Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claimaccident', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _date: { + type: require('./element.schema.js'), + description: + 'Date of an accident event related to the products and services contained in the claim.', + }, + date: { + type: new GraphQLNonNull(DateScalar), + description: + 'Date of an accident event related to the products and services contained in the claim.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.', + }, + locationAddress: { + type: require('./address.schema.js'), + description: 'The physical location of the accident event.', + }, + locationReference: { + type: new GraphQLUnionType({ + name: 'ClaimaccidentlocationReference_locationReference_Union', + description: 'The physical location of the accident event.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The physical location of the accident event.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimcareteam.schema.js b/src/resources/4_0_0/schemas/claimcareteam.schema.js new file mode 100644 index 00000000..e13bea56 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimcareteam.schema.js @@ -0,0 +1,94 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimcareTeam Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimcareTeam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify care team entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify care team entries.', + }, + provider: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimcareTeamprovider_provider_Union', + description: + 'Member of the team who provided the product or service.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Member of the team who provided the product or service.', + }, + _responsible: { + type: require('./element.schema.js'), + description: + 'The party who is billing and/or responsible for the claimed products or services.', + }, + responsible: { + type: GraphQLBoolean, + description: + 'The party who is billing and/or responsible for the claimed products or services.', + }, + role: { + type: require('./codeableconcept.schema.js'), + description: + 'The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.', + }, + qualification: { + type: require('./codeableconcept.schema.js'), + description: + 'The qualification of the practitioner which is applicable for this service.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimdiagnosis.schema.js b/src/resources/4_0_0/schemas/claimdiagnosis.schema.js new file mode 100644 index 00000000..e5cf0c2d --- /dev/null +++ b/src/resources/4_0_0/schemas/claimdiagnosis.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Claimdiagnosis Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claimdiagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify diagnosis entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify diagnosis entries.', + }, + diagnosisCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + diagnosisReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimdiagnosisdiagnosisReference_diagnosisReference_Union', + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'When the condition was observed or the relative ranking.', + }, + onAdmission: { + type: require('./codeableconcept.schema.js'), + description: + 'Indication of whether the diagnosis was present on admission to a facility.', + }, + packageCode: { + type: require('./codeableconcept.schema.js'), + description: + 'A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claiminsurance.schema.js b/src/resources/4_0_0/schemas/claiminsurance.schema.js new file mode 100644 index 00000000..281c7a00 --- /dev/null +++ b/src/resources/4_0_0/schemas/claiminsurance.schema.js @@ -0,0 +1,117 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Claiminsurance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claiminsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.', + }, + _focal: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'The business identifier to be used when the claim is sent for adjudication against this insurance policy.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Claiminsurancecoverage_coverage_Union', + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _businessArrangement: { + type: require('./element.schema.js'), + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.', + }, + claimResponse: { + type: new GraphQLUnionType({ + name: 'ClaiminsuranceclaimResponse_claimResponse_Union', + description: + 'The result of the adjudication of the line items for the Coverage specified in this insurance.', + types: () => [require('./claimresponse.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + description: + 'The result of the adjudication of the line items for the Coverage specified in this insurance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimitem.schema.js b/src/resources/4_0_0/schemas/claimitem.schema.js new file mode 100644 index 00000000..b0c04bd0 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimitem.schema.js @@ -0,0 +1,214 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Claimitem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claimitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify item entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify item entries.', + }, + _careTeamSequence: { + type: require('./element.schema.js'), + description: 'CareTeam members related to this service or product.', + }, + careTeamSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'CareTeam members related to this service or product.', + }, + _diagnosisSequence: { + type: require('./element.schema.js'), + description: 'Diagnosis applicable for this service or product.', + }, + diagnosisSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnosis applicable for this service or product.', + }, + _procedureSequence: { + type: require('./element.schema.js'), + description: 'Procedures applicable for this service or product.', + }, + procedureSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Procedures applicable for this service or product.', + }, + _informationSequence: { + type: require('./element.schema.js'), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product.', + }, + informationSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product.', + }, + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Identifies the program under which this may be recovered.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + locationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Where the product or service was provided.', + }, + locationAddress: { + type: require('./address.schema.js'), + description: 'Where the product or service was provided.', + }, + locationReference: { + type: new GraphQLUnionType({ + name: 'ClaimitemlocationReference_locationReference_Union', + description: 'Where the product or service was provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the product or service was provided.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Claimitemudi_udi_Union', + description: + 'Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'Unique Device Identifiers associated with this line item.', + }, + bodySite: { + type: require('./codeableconcept.schema.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + subSite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A region or surface of the bodySite, e.g. limb region or tooth surface(s).', + }, + encounter: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Claimitemencounter_encounter_Union', + description: + 'The Encounters during which this Claim was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + ), + description: + 'The Encounters during which this Claim was created or to which the creation of this record is tightly associated.', + }, + detail: { + type: new GraphQLList(require('./claimitemdetail.schema.js')), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimitemdetail.schema.js b/src/resources/4_0_0/schemas/claimitemdetail.schema.js new file mode 100644 index 00000000..fa731bdc --- /dev/null +++ b/src/resources/4_0_0/schemas/claimitemdetail.schema.js @@ -0,0 +1,117 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Claimitemdetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claimitemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify item entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify item entries.', + }, + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Identifies the program under which this may be recovered.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Claimitemdetailudi_udi_Union', + description: + 'Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'Unique Device Identifiers associated with this line item.', + }, + subDetail: { + type: new GraphQLList(require('./claimitemdetailsubdetail.schema.js')), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimitemdetailsubdetail.schema.js b/src/resources/4_0_0/schemas/claimitemdetailsubdetail.schema.js new file mode 100644 index 00000000..938cfd3e --- /dev/null +++ b/src/resources/4_0_0/schemas/claimitemdetailsubdetail.schema.js @@ -0,0 +1,112 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimitemdetailsubDetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimitemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify item entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify item entries.', + }, + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Identifies the program under which this may be recovered.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClaimitemdetailsubDetailudi_udi_Union', + description: + 'Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'Unique Device Identifiers associated with this line item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimpayee.schema.js b/src/resources/4_0_0/schemas/claimpayee.schema.js new file mode 100644 index 00000000..7d6ff5cf --- /dev/null +++ b/src/resources/4_0_0/schemas/claimpayee.schema.js @@ -0,0 +1,76 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Claimpayee Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claimpayee', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Type of Party to be reimbursed: subscriber, provider, other.', + }, + party: { + type: new GraphQLUnionType({ + name: 'Claimpayeeparty_party_Union', + description: + 'Reference to the individual or organization to whom any payment will be made.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Reference to the individual or organization to whom any payment will be made.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimprocedure.schema.js b/src/resources/4_0_0/schemas/claimprocedure.schema.js new file mode 100644 index 00000000..594304e7 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimprocedure.schema.js @@ -0,0 +1,98 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Claimprocedure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claimprocedure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify procedure entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify procedure entries.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'When the condition was observed or the relative ranking.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date and optionally time the procedure was performed.', + }, + date: { + type: DateTimeScalar, + description: 'Date and optionally time the procedure was performed.', + }, + procedureCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + }, + procedureReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimprocedureprocedureReference_procedureReference_Union', + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Claimprocedureudi_udi_Union', + description: + 'Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'Unique Device Identifiers associated with this line item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimrelated.schema.js b/src/resources/4_0_0/schemas/claimrelated.schema.js new file mode 100644 index 00000000..47c13762 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimrelated.schema.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Claimrelated Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Claimrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + claim: { + type: new GraphQLUnionType({ + name: 'Claimrelatedclaim_claim_Union', + description: 'Reference to a related claim.', + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: 'Reference to a related claim.', + }, + relationship: { + type: require('./codeableconcept.schema.js'), + description: 'A code to convey how the claims are related.', + }, + reference: { + type: require('./identifier.schema.js'), + description: + 'An alternate organizational reference to the case or file to which this particular claim pertains.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponse.schema.js b/src/resources/4_0_0/schemas/claimresponse.schema.js new file mode 100644 index 00000000..8d5a1cc2 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponse.schema.js @@ -0,0 +1,302 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ClaimResponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponse', + description: + 'This resource provides the adjudication details from the processing of a Claim resource.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClaimResponse_Enum_schema', + values: { ClaimResponse: { value: 'ClaimResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'A unique identifier assigned to this claim response.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.', + }, + subType: { + type: require('./codeableconcept.schema.js'), + description: + 'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.', + }, + _use: { + type: require('./element.schema.js'), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimResponsepatient_patient_Union', + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + insurer: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimResponseinsurer_insurer_Union', + description: + 'The party responsible for authorization, adjudication and reimbursement.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The party responsible for authorization, adjudication and reimbursement.', + }, + requestor: { + type: new GraphQLUnionType({ + name: 'ClaimResponserequestor_requestor_Union', + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + }, + request: { + type: new GraphQLUnionType({ + name: 'ClaimResponserequest_request_Union', + description: 'Original request resource reference.', + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.schema.js'), + description: + 'The outcome of the claim, predetermination, or preauthorization processing.', + }, + outcome: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The outcome of the claim, predetermination, or preauthorization processing.', + }, + _disposition: { + type: require('./element.schema.js'), + description: + 'A human readable description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: + 'A human readable description of the status of the adjudication.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'Reference from the Insurer which is used in later communications which refers to this adjudication.', + }, + preAuthRef: { + type: GraphQLString, + description: + 'Reference from the Insurer which is used in later communications which refers to this adjudication.', + }, + preAuthPeriod: { + type: require('./period.schema.js'), + description: + 'The time frame during which this authorization is effective.', + }, + payeeType: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Party to be reimbursed: subscriber, provider, other.', + }, + item: { + type: new GraphQLList(require('./claimresponseitem.schema.js')), + description: + "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.", + }, + addItem: { + type: new GraphQLList(require('./claimresponseadditem.schema.js')), + description: + 'The first-tier service adjudications for payor added product or service lines.', + }, + total: { + type: new GraphQLList(require('./claimresponsetotal.schema.js')), + description: 'Categorized monetary totals for the adjudication.', + }, + payment: { + type: require('./claimresponsepayment.schema.js'), + description: 'Payment details for the adjudication of the claim.', + }, + fundsReserve: { + type: require('./codeableconcept.schema.js'), + description: + 'A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.', + }, + formCode: { + type: require('./codeableconcept.schema.js'), + description: 'A code for the form to be used for printing the content.', + }, + form: { + type: require('./attachment.schema.js'), + description: + 'The actual form, by reference or inclusion, for printing the content or an EOB.', + }, + processNote: { + type: new GraphQLList(require('./claimresponseprocessnote.schema.js')), + description: + 'A note that describes or explains adjudication results in a human readable form.', + }, + communicationRequest: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClaimResponsecommunicationRequest_communicationRequest_Union', + description: + 'Request for additional supporting or authorizing information.', + types: () => [require('./communicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + }, + }), + ), + description: + 'Request for additional supporting or authorizing information.', + }, + insurance: { + type: new GraphQLList(require('./claimresponseinsurance.schema.js')), + description: + 'Financial instruments for reimbursement for the health care products and services specified on the claim.', + }, + error: { + type: new GraphQLList(require('./claimresponseerror.schema.js')), + description: + 'Errors encountered during the processing of the adjudication.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseadditem.schema.js b/src/resources/4_0_0/schemas/claimresponseadditem.schema.js new file mode 100644 index 00000000..53809ac7 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseadditem.schema.js @@ -0,0 +1,196 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseaddItem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseaddItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _itemSequence: { + type: require('./element.schema.js'), + description: + 'Claim items which this service line is intended to replace.', + }, + itemSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Claim items which this service line is intended to replace.', + }, + _detailSequence: { + type: require('./element.schema.js'), + description: + 'The sequence number of the details within the claim item which this line is intended to replace.', + }, + detailSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The sequence number of the details within the claim item which this line is intended to replace.', + }, + _subdetailSequence: { + type: require('./element.schema.js'), + description: + 'The sequence number of the sub-details within the details within the claim item which this line is intended to replace.', + }, + subdetailSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The sequence number of the sub-details within the details within the claim item which this line is intended to replace.', + }, + provider: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClaimResponseaddItemprovider_provider_Union', + description: + 'The providers who are authorized for the services rendered to the patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The providers who are authorized for the services rendered to the patient.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Identifies the program under which this may be recovered.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + locationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Where the product or service was provided.', + }, + locationAddress: { + type: require('./address.schema.js'), + description: 'Where the product or service was provided.', + }, + locationReference: { + type: new GraphQLUnionType({ + name: 'ClaimResponseaddItemlocationReference_locationReference_Union', + description: 'Where the product or service was provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the product or service was provided.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + bodySite: { + type: require('./codeableconcept.schema.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + subSite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A region or surface of the bodySite, e.g. limb region or tooth surface(s).', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + detail: { + type: new GraphQLList(require('./claimresponseadditemdetail.schema.js')), + description: + 'The second-tier service adjudications for payor added services.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseadditemdetail.schema.js b/src/resources/4_0_0/schemas/claimresponseadditemdetail.schema.js new file mode 100644 index 00000000..05601338 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseadditemdetail.schema.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseaddItemdetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseaddItemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + subDetail: { + type: new GraphQLList( + require('./claimresponseadditemdetailsubdetail.schema.js'), + ), + description: + 'The third-tier service adjudications for payor added services.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseadditemdetailsubdetail.schema.js b/src/resources/4_0_0/schemas/claimresponseadditemdetailsubdetail.schema.js new file mode 100644 index 00000000..bd17c69a --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseadditemdetailsubdetail.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseaddItemdetailsubDetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseaddItemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseerror.schema.js b/src/resources/4_0_0/schemas/claimresponseerror.schema.js new file mode 100644 index 00000000..9e848b2b --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseerror.schema.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseerror Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseerror', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _itemSequence: { + type: require('./element.schema.js'), + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + itemSequence: { + type: PositiveIntScalar, + description: + 'The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + _detailSequence: { + type: require('./element.schema.js'), + description: + 'The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + detailSequence: { + type: PositiveIntScalar, + description: + 'The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + _subDetailSequence: { + type: require('./element.schema.js'), + description: + 'The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + subDetailSequence: { + type: PositiveIntScalar, + description: + 'The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'An error code, from a specified code system, which details why the claim could not be adjudicated.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseinsurance.schema.js b/src/resources/4_0_0/schemas/claimresponseinsurance.schema.js new file mode 100644 index 00000000..6b390c04 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseinsurance.schema.js @@ -0,0 +1,102 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseinsurance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseinsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.', + }, + _focal: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClaimResponseinsurancecoverage_coverage_Union', + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _businessArrangement: { + type: require('./element.schema.js'), + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + claimResponse: { + type: new GraphQLUnionType({ + name: 'ClaimResponseinsuranceclaimResponse_claimResponse_Union', + description: + 'The result of the adjudication of the line items for the Coverage specified in this insurance.', + types: () => [require('./claimresponse.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + description: + 'The result of the adjudication of the line items for the Coverage specified in this insurance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseitem.schema.js b/src/resources/4_0_0/schemas/claimresponseitem.schema.js new file mode 100644 index 00000000..431ad443 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseitem.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseitem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _itemSequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely reference the claim item entries.', + }, + itemSequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely reference the claim item entries.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + adjudication: { + type: new GraphQLList( + new GraphQLNonNull( + require('./claimresponseitemadjudication.schema.js'), + ), + ), + description: + 'If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.', + }, + detail: { + type: new GraphQLList(require('./claimresponseitemdetail.schema.js')), + description: + "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseitemadjudication.schema.js b/src/resources/4_0_0/schemas/claimresponseitemadjudication.schema.js new file mode 100644 index 00000000..de5011a3 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseitemadjudication.schema.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ClaimResponseitemadjudication Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseitemadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.', + }, + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'A code supporting the understanding of the adjudication result and explaining variance from expected amount.', + }, + amount: { + type: require('./money.schema.js'), + description: 'Monetary amount associated with the category.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value associated with the category. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value associated with the category. Mutually exclusive to the amount element above.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseitemdetail.schema.js b/src/resources/4_0_0/schemas/claimresponseitemdetail.schema.js new file mode 100644 index 00000000..76066e83 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseitemdetail.schema.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseitemdetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseitemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _detailSequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely reference the claim detail entry.', + }, + detailSequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely reference the claim detail entry.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + subDetail: { + type: new GraphQLList( + require('./claimresponseitemdetailsubdetail.schema.js'), + ), + description: 'A sub-detail adjudication of a simple product or service.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseitemdetailsubdetail.schema.js b/src/resources/4_0_0/schemas/claimresponseitemdetailsubdetail.schema.js new file mode 100644 index 00000000..1c4c29bc --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseitemdetailsubdetail.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseitemdetailsubDetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseitemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _subDetailSequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely reference the claim sub-detail entry.', + }, + subDetailSequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely reference the claim sub-detail entry.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponsepayment.schema.js b/src/resources/4_0_0/schemas/claimresponsepayment.schema.js new file mode 100644 index 00000000..e6d4dd6f --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponsepayment.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ClaimResponsepayment Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponsepayment', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Whether this represents partial or complete payment of the benefits payable.', + }, + adjustment: { + type: require('./money.schema.js'), + description: + "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", + }, + adjustmentReason: { + type: require('./codeableconcept.schema.js'), + description: 'Reason for the payment adjustment.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'Estimated date the payment will be issued or the actual issue date of payment.', + }, + date: { + type: DateScalar, + description: + 'Estimated date the payment will be issued or the actual issue date of payment.', + }, + amount: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'Benefits payable less any payment adjustment.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: "Issuer's unique identifier for the payment instrument.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponseprocessnote.schema.js b/src/resources/4_0_0/schemas/claimresponseprocessnote.schema.js new file mode 100644 index 00000000..57791caa --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponseprocessnote.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ClaimResponseprocessNote Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponseprocessNote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _number: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify a note entry.', + }, + number: { + type: PositiveIntScalar, + description: 'A number to uniquely identify a note entry.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The business purpose of the note text.', + }, + type: { + type: CodeScalar, + description: 'The business purpose of the note text.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'The explanation or description associated with the processing.', + }, + text: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The explanation or description associated with the processing.', + }, + language: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to define the language used in the text of the note.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimresponsetotal.schema.js b/src/resources/4_0_0/schemas/claimresponsetotal.schema.js new file mode 100644 index 00000000..e6320792 --- /dev/null +++ b/src/resources/4_0_0/schemas/claimresponsetotal.schema.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ClaimResponsetotal Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimResponsetotal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.', + }, + amount: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'Monetary total amount associated with the category.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/claimsupportinginfo.schema.js b/src/resources/4_0_0/schemas/claimsupportinginfo.schema.js new file mode 100644 index 00000000..b2fbc17a --- /dev/null +++ b/src/resources/4_0_0/schemas/claimsupportinginfo.schema.js @@ -0,0 +1,123 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ClaimsupportingInfo Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClaimsupportingInfo', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'A number to uniquely identify supporting information entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify supporting information entries.', + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.', + }, + _timingDate: { + type: require('./element.schema.js'), + description: 'The date when or period to which this information refers.', + }, + timingDate: { + type: DateScalar, + description: 'The date when or period to which this information refers.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: 'The date when or period to which this information refers.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueString: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueReference: { + type: new GraphQLUnionType({ + name: 'ClaimsupportingInfovalueReference_valueReference_Union', + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides the reason in the situation where a reason code is required in addition to the content.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/clinicalimpression.schema.js b/src/resources/4_0_0/schemas/clinicalimpression.schema.js new file mode 100644 index 00000000..eb1105a0 --- /dev/null +++ b/src/resources/4_0_0/schemas/clinicalimpression.schema.js @@ -0,0 +1,306 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ClinicalImpression Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClinicalImpression', + description: + "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called 'ClinicalImpression' rather than 'ClinicalAssessment' to avoid confusion with the recording of assessment tools such as Apgar score.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ClinicalImpression_Enum_schema', + values: { ClinicalImpression: { value: 'ClinicalImpression' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Identifies the workflow status of the assessment.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the workflow status of the assessment.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Captures the reason for the current state of the ClinicalImpression.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'Categorizes the type of clinical assessment performed.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.', + }, + description: { + type: GraphQLString, + description: + 'A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ClinicalImpressionsubject_subject_Union', + description: + 'The patient or group of individuals assessed as part of this record.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The patient or group of individuals assessed as part of this record.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressionencounter_encounter_Union', + description: + 'The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + 'The point in time or period over which the subject was assessed.', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The point in time or period over which the subject was assessed.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The point in time or period over which the subject was assessed.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'Indicates when the documentation of the assessment was complete.', + }, + date: { + type: DateTimeScalar, + description: + 'Indicates when the documentation of the assessment was complete.', + }, + assessor: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressionassessor_assessor_Union', + description: 'The clinician performing the assessment.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'The clinician performing the assessment.', + }, + previous: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressionprevious_previous_Union', + description: + "A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", + types: () => [require('./clinicalimpression.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); + } + }, + }), + description: + "A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", + }, + problem: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionproblem_problem_Union', + description: + 'A list of the relevant problems/conditions for a patient.', + types: () => [ + require('./condition.schema.js'), + require('./allergyintolerance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + }, + }), + ), + description: 'A list of the relevant problems/conditions for a patient.', + }, + investigation: { + type: new GraphQLList( + require('./clinicalimpressioninvestigation.schema.js'), + ), + description: + 'One or more sets of investigations (signs, symptoms, etc.). The actual grouping of investigations varies greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.', + }, + _protocol: { + type: require('./element.schema.js'), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + protocol: { + type: new GraphQLList(UriScalar), + description: + 'Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.', + }, + _summary: { + type: require('./element.schema.js'), + description: 'A text summary of the investigations and the diagnosis.', + }, + summary: { + type: GraphQLString, + description: 'A text summary of the investigations and the diagnosis.', + }, + finding: { + type: new GraphQLList(require('./clinicalimpressionfinding.schema.js')), + description: + 'Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.', + }, + prognosisCodeableConcept: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Estimate of likely outcome.', + }, + prognosisReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionprognosisReference_prognosisReference_Union', + description: 'RiskAssessment expressing likely outcome.', + types: () => [require('./riskassessment.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); + } + }, + }), + ), + description: 'RiskAssessment expressing likely outcome.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressionsupportingInfo_supportingInfo_Union', + description: 'Information supporting the clinical impression.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Information supporting the clinical impression.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/clinicalimpressionfinding.schema.js b/src/resources/4_0_0/schemas/clinicalimpressionfinding.schema.js new file mode 100644 index 00000000..fa1414ae --- /dev/null +++ b/src/resources/4_0_0/schemas/clinicalimpressionfinding.schema.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ClinicalImpressionfinding Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClinicalImpressionfinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + itemCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.', + }, + itemReference: { + type: new GraphQLUnionType({ + name: 'ClinicalImpressionfindingitemReference_itemReference_Union', + description: + 'Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./media.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + }, + }), + description: + 'Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.', + }, + _basis: { + type: require('./element.schema.js'), + description: 'Which investigations support finding or diagnosis.', + }, + basis: { + type: GraphQLString, + description: 'Which investigations support finding or diagnosis.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/clinicalimpressioninvestigation.schema.js b/src/resources/4_0_0/schemas/clinicalimpressioninvestigation.schema.js new file mode 100644 index 00000000..92824c18 --- /dev/null +++ b/src/resources/4_0_0/schemas/clinicalimpressioninvestigation.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ClinicalImpressioninvestigation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ClinicalImpressioninvestigation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutritional) history may be used.", + }, + item: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ClinicalImpressioninvestigationitem_item_Union', + description: + 'A record of a specific investigation that was undertaken.', + types: () => [ + require('./observation.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./familymemberhistory.schema.js'), + require('./diagnosticreport.schema.js'), + require('./riskassessment.schema.js'), + require('./imagingstudy.schema.js'), + require('./media.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'FamilyMemberHistory') { + return require('./familymemberhistory.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); + } + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + }, + }), + ), + description: 'A record of a specific investigation that was undertaken.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/codeableconcept.schema.js b/src/resources/4_0_0/schemas/codeableconcept.schema.js new file mode 100644 index 00000000..8386abcf --- /dev/null +++ b/src/resources/4_0_0/schemas/codeableconcept.schema.js @@ -0,0 +1,42 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary CodeableConcept Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CodeableConcept', + description: + 'Base StructureDefinition for CodeableConcept Type: A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + coding: { + type: new GraphQLList(require('./coding.schema.js')), + description: 'A reference to a code defined by a terminology system.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + text: { + type: GraphQLString, + description: + 'A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/codesystem.schema.js b/src/resources/4_0_0/schemas/codesystem.schema.js new file mode 100644 index 00000000..4760e20c --- /dev/null +++ b/src/resources/4_0_0/schemas/codesystem.schema.js @@ -0,0 +1,314 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary CodeSystem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CodeSystem', + description: + 'The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CodeSystem_Enum_schema', + values: { CodeSystem: { value: 'CodeSystem' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the code system.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the code system.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the code system resource was created or revised.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The date (and optionally time) when the code system resource was created or revised.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the code system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the code system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the code system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the code system.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the code system from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the code system from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate code system instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the code system is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this code system is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this code system is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.', + }, + _caseSensitive: { + type: require('./element.schema.js'), + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + caseSensitive: { + type: GraphQLBoolean, + description: + 'If code comparison is case sensitive when codes within this system are compared to each other.', + }, + _valueSet: { + type: require('./element.schema.js'), + description: + 'Canonical reference to the value set that contains the entire code system.', + }, + valueSet: { + type: CanonicalScalar, + description: + 'Canonical reference to the value set that contains the entire code system.', + }, + _hierarchyMeaning: { + type: require('./element.schema.js'), + description: + 'The meaning of the hierarchy of concepts as represented in this resource.', + }, + hierarchyMeaning: { + type: CodeScalar, + description: + 'The meaning of the hierarchy of concepts as represented in this resource.', + }, + _compositional: { + type: require('./element.schema.js'), + description: + 'The code system defines a compositional (post-coordination) grammar.', + }, + compositional: { + type: GraphQLBoolean, + description: + 'The code system defines a compositional (post-coordination) grammar.', + }, + _versionNeeded: { + type: require('./element.schema.js'), + description: + 'This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.', + }, + versionNeeded: { + type: GraphQLBoolean, + description: + 'This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system.', + }, + _content: { + type: require('./element.schema.js'), + description: + 'The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.', + }, + content: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance.', + }, + _supplements: { + type: require('./element.schema.js'), + description: + 'The canonical URL of the code system that this code system supplement is adding designations and properties to.', + }, + supplements: { + type: CanonicalScalar, + description: + 'The canonical URL of the code system that this code system supplement is adding designations and properties to.', + }, + _count: { + type: require('./element.schema.js'), + description: + 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.', + }, + count: { + type: UnsignedIntScalar, + description: + 'The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward.', + }, + filter: { + type: new GraphQLList(require('./codesystemfilter.schema.js')), + description: + 'A filter that can be used in a value set compose statement when selecting concepts using a filter.', + }, + property: { + type: new GraphQLList(require('./codesystemproperty.schema.js')), + description: + 'A property defines an additional slot through which additional information can be provided about a concept.', + }, + concept: { + type: new GraphQLList(require('./codesystemconcept.schema.js')), + description: + 'Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/codesystemconcept.schema.js b/src/resources/4_0_0/schemas/codesystemconcept.schema.js new file mode 100644 index 00000000..5e28162f --- /dev/null +++ b/src/resources/4_0_0/schemas/codesystemconcept.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CodeSystemconcept Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CodeSystemconcept', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code - a text symbol - that uniquely identifies the concept within the code system.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + display: { + type: GraphQLString, + description: + 'A human readable string that is the recommended default way to present this concept to a user.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + definition: { + type: GraphQLString, + description: + 'The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.', + }, + designation: { + type: new GraphQLList( + require('./codesystemconceptdesignation.schema.js'), + ), + description: + 'Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + property: { + type: new GraphQLList(require('./codesystemconceptproperty.schema.js')), + description: 'A property value for this concept.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/codesystemconceptdesignation.schema.js b/src/resources/4_0_0/schemas/codesystemconceptdesignation.schema.js new file mode 100644 index 00000000..b27f681d --- /dev/null +++ b/src/resources/4_0_0/schemas/codesystemconceptdesignation.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CodeSystemconceptdesignation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CodeSystemconceptdesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _language: { + type: require('./element.schema.js'), + description: 'The language this designation is defined for.', + }, + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + use: { + type: require('./coding.schema.js'), + description: 'A code that details how this designation would be used.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/codesystemconceptproperty.schema.js b/src/resources/4_0_0/schemas/codesystemconceptproperty.schema.js new file mode 100644 index 00000000..70180a75 --- /dev/null +++ b/src/resources/4_0_0/schemas/codesystemconceptproperty.schema.js @@ -0,0 +1,102 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLBoolean, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CodeSystemconceptproperty Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CodeSystemconceptproperty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: 'A code that is a reference to CodeSystem.property.code.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'A code that is a reference to CodeSystem.property.code.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of this property.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The value of this property.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of this property.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of this property.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of this property.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of this property.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The value of this property.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of this property.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/codesystemfilter.schema.js b/src/resources/4_0_0/schemas/codesystemfilter.schema.js new file mode 100644 index 00000000..e51c85d9 --- /dev/null +++ b/src/resources/4_0_0/schemas/codesystemfilter.schema.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CodeSystemfilter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CodeSystemfilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'The code that identifies this filter when it is used as a filter in [ValueSet](valueset.html#).compose.include.filter.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code that identifies this filter when it is used as a filter in [ValueSet](valueset.html#).compose.include.filter.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of how or why the filter is used.', + }, + description: { + type: GraphQLString, + description: 'A description of how or why the filter is used.', + }, + _operator: { + type: require('./element.schema.js'), + description: 'A list of operators that can be used with the filter.', + }, + operator: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'A list of operators that can be used with the filter.', + }, + _value: { + type: require('./element.schema.js'), + description: 'A description of what the value for the filter should be.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of what the value for the filter should be.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/codesystemproperty.schema.js b/src/resources/4_0_0/schemas/codesystemproperty.schema.js new file mode 100644 index 00000000..3c91b971 --- /dev/null +++ b/src/resources/4_0_0/schemas/codesystemproperty.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary CodeSystemproperty Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CodeSystemproperty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', + }, + uri: { + type: UriScalar, + description: + 'Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A description of the property- why it is defined, and how its value might be used.', + }, + description: { + type: GraphQLString, + description: + 'A description of the property- why it is defined, and how its value might be used.', + }, + _type: { + type: require('./element.schema.js'), + description: + "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to another defined concept).", + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "The type of the property value. Properties of type 'code' contain a code defined by the code system (e.g. a reference to another defined concept).", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coding.schema.js b/src/resources/4_0_0/schemas/coding.schema.js new file mode 100644 index 00000000..c30fce16 --- /dev/null +++ b/src/resources/4_0_0/schemas/coding.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Coding Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Coding', + description: + 'Base StructureDefinition for Coding Type: A reference to a code defined by a terminology system.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + system: { + type: UriScalar, + description: + 'The identification of the code system that defines the meaning of the symbol in the code.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + code: { + type: CodeScalar, + description: + 'A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).', + }, + _display: { + type: require('./element.schema.js'), + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + display: { + type: GraphQLString, + description: + 'A representation of the meaning of the code in the system, following the rules of the system.', + }, + _userSelected: { + type: require('./element.schema.js'), + description: + 'Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).', + }, + userSelected: { + type: GraphQLBoolean, + description: + 'Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/communication.schema.js b/src/resources/4_0_0/schemas/communication.schema.js new file mode 100644 index 00000000..5989520d --- /dev/null +++ b/src/resources/4_0_0/schemas/communication.schema.js @@ -0,0 +1,406 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Communication Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Communication', + description: + 'An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Communication_Enum_schema', + values: { Communication: { value: 'Communication' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationbasedOn_basedOn_Union', + description: + 'An order, proposal or plan fulfilled in whole or in part by this Communication.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'An order, proposal or plan fulfilled in whole or in part by this Communication.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationpartOf_partOf_Union', + description: 'Part of this action.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Part of this action.', + }, + inResponseTo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationinResponseTo_inResponseTo_Union', + description: + 'Prior communication that this communication is in response to.', + types: () => [require('./communication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Communication') { + return require('./communication.schema.js'); + } + }, + }), + ), + description: + 'Prior communication that this communication is in response to.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the transmission.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the transmission.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Captures the reason for the current state of the Communication.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of message conveyed such as alert, notification, reminder, instruction, etc.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine.', + }, + priority: { + type: CodeScalar, + description: + 'Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine.', + }, + medium: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Communicationsubject_subject_Union', + description: + 'The patient or group that was the focus of this communication.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The patient or group that was the focus of this communication.', + }, + topic: { + type: require('./codeableconcept.schema.js'), + description: + 'Description of the purpose/content, similar to a subject line in an email.', + }, + about: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Communicationabout_about_Union', + description: + 'Other resources that pertain to this communication and to which this communication should be associated.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Other resources that pertain to this communication and to which this communication should be associated.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Communicationencounter_encounter_Union', + description: + 'The Encounter during which this Communication was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this Communication was created or to which the creation of this record is tightly associated.', + }, + _sent: { + type: require('./element.schema.js'), + description: 'The time when this communication was sent.', + }, + sent: { + type: DateTimeScalar, + description: 'The time when this communication was sent.', + }, + _received: { + type: require('./element.schema.js'), + description: + 'The time when this communication arrived at the destination.', + }, + received: { + type: DateTimeScalar, + description: + 'The time when this communication arrived at the destination.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Communicationrecipient_recipient_Union', + description: + 'The entity (e.g. person, organization, clinical information system, care team or device) which was the target of the communication. If receipts need to be tracked by an individual, a separate resource instance will need to be created for each recipient. Multiple recipient communications are intended where either receipts are not tracked (e.g. a mass mail-out) or a receipt is captured in aggregate (all emails confirmed received by a particular time).', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./group.schema.js'), + require('./careteam.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: + 'The entity (e.g. person, organization, clinical information system, care team or device) which was the target of the communication. If receipts need to be tracked by an individual, a separate resource instance will need to be created for each recipient. Multiple recipient communications are intended where either receipts are not tracked (e.g. a mass mail-out) or a receipt is captured in aggregate (all emails confirmed received by a particular time).', + }, + sender: { + type: new GraphQLUnionType({ + name: 'Communicationsender_sender_Union', + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason or justification for the communication.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies this communication.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies this communication.', + }, + payload: { + type: new GraphQLList(require('./communicationpayload.schema.js')), + description: + 'Text, attachment(s), or resource(s) that was communicated to the recipient.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Additional notes or commentary about the communication by the sender, receiver or other interested parties.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/communicationpayload.schema.js b/src/resources/4_0_0/schemas/communicationpayload.schema.js new file mode 100644 index 00000000..ab844b3c --- /dev/null +++ b/src/resources/4_0_0/schemas/communicationpayload.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Communicationpayload Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Communicationpayload', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _contentString: { + type: require('./element.schema.js'), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CommunicationpayloadcontentReference_contentReference_Union', + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A communicated content (or for multi-part communications, one portion of the communication).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/communicationrequest.schema.js b/src/resources/4_0_0/schemas/communicationrequest.schema.js new file mode 100644 index 00000000..d625faf1 --- /dev/null +++ b/src/resources/4_0_0/schemas/communicationrequest.schema.js @@ -0,0 +1,423 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CommunicationRequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CommunicationRequest', + description: + 'A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CommunicationRequest_Enum_schema', + values: { CommunicationRequest: { value: 'CommunicationRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestbasedOn_basedOn_Union', + description: + 'A plan or proposal that is fulfilled in whole or in part by this request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A plan or proposal that is fulfilled in whole or in part by this request.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestreplaces_replaces_Union', + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + types: () => [require('./communicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + }, + }), + ), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the proposal or order.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the proposal or order.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Captures the reason for the current state of the CommunicationRequest.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of message to be sent such as alert, notification, reminder, instruction, etc.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + priority: { + type: CodeScalar, + description: + 'Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.', + }, + _doNotPerform: { + type: require('./element.schema.js'), + description: + 'If true indicates that the CommunicationRequest is asking for the specified action to *not* occur.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'If true indicates that the CommunicationRequest is asking for the specified action to *not* occur.', + }, + medium: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A channel that was used for this communication (e.g. email, fax).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestsubject_subject_Union', + description: + 'The patient or group that is the focus of this communication request.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The patient or group that is the focus of this communication request.', + }, + about: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestabout_about_Union', + description: + 'Other resources that pertain to this communication request and to which this communication request should be associated.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Other resources that pertain to this communication request and to which this communication request should be associated.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestencounter_encounter_Union', + description: + 'The Encounter during which this CommunicationRequest was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this CommunicationRequest was created or to which the creation of this record is tightly associated.', + }, + payload: { + type: new GraphQLList(require('./communicationrequestpayload.schema.js')), + description: + 'Text, attachment(s), or resource(s) to be communicated to the recipient.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'The time when this communication is to occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The time when this communication is to occur.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'The time when this communication is to occur.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: + 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'For draft requests, indicates the date of initial creation. For requests with other statuses, indicates the date of activation.', + }, + requester: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestrequester_requester_Union', + description: + 'The device, individual, or organization who initiated the request and has responsibility for its activation.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The device, individual, or organization who initiated the request and has responsibility for its activation.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestrecipient_recipient_Union', + description: + 'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./group.schema.js'), + require('./careteam.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: + 'The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.', + }, + sender: { + type: new GraphQLUnionType({ + name: 'CommunicationRequestsender_sender_Union', + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + description: + 'The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Describes why the request is being made in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CommunicationRequestreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies this request.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies this request.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the request by the requester, sender, recipient, subject or other participants.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/communicationrequestpayload.schema.js b/src/resources/4_0_0/schemas/communicationrequestpayload.schema.js new file mode 100644 index 00000000..adb2df95 --- /dev/null +++ b/src/resources/4_0_0/schemas/communicationrequestpayload.schema.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CommunicationRequestpayload Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CommunicationRequestpayload', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _contentString: { + type: require('./element.schema.js'), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'CommunicationRequestpayloadcontentReference_contentReference_Union', + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The communicated content (or for multi-part communications, one portion of the communication).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/compartmentdefinition.schema.js b/src/resources/4_0_0/schemas/compartmentdefinition.schema.js new file mode 100644 index 00000000..c6c99c48 --- /dev/null +++ b/src/resources/4_0_0/schemas/compartmentdefinition.schema.js @@ -0,0 +1,210 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CompartmentDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CompartmentDefinition', + description: + 'A compartment definition that defines how resources are accessed on a server.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CompartmentDefinition_Enum_schema', + values: { CompartmentDefinition: { value: 'CompartmentDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this compartment definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this compartment definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the compartment definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the compartment definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the compartment definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the compartment definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this compartment definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this compartment definition is needed and why it has been designed as it has.', + }, + _code: { + type: require('./element.schema.js'), + description: 'Which compartment this definition describes.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Which compartment this definition describes.', + }, + _search: { + type: require('./element.schema.js'), + description: 'Whether the search syntax is supported,.', + }, + search: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether the search syntax is supported,.', + }, + resource: { + type: new GraphQLList( + require('./compartmentdefinitionresource.schema.js'), + ), + description: + 'Information about how a resource is related to the compartment.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/compartmentdefinitionresource.schema.js b/src/resources/4_0_0/schemas/compartmentdefinitionresource.schema.js new file mode 100644 index 00000000..9c090be7 --- /dev/null +++ b/src/resources/4_0_0/schemas/compartmentdefinitionresource.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CompartmentDefinitionresource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CompartmentDefinitionresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: 'The name of a resource supported by the server.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of a resource supported by the server.', + }, + _param: { + type: require('./element.schema.js'), + description: + 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', + }, + param: { + type: new GraphQLList(GraphQLString), + description: + 'The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Additional documentation about the resource and compartment.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional documentation about the resource and compartment.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/composition.schema.js b/src/resources/4_0_0/schemas/composition.schema.js new file mode 100644 index 00000000..d0a487d7 --- /dev/null +++ b/src/resources/4_0_0/schemas/composition.schema.js @@ -0,0 +1,244 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Composition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Composition', + description: + 'A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Composition_Enum_schema', + values: { Composition: { value: 'Composition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Compositionsubject_subject_Union', + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Compositionencounter_encounter_Union', + description: + 'Describes the clinical encounter or type of care this documentation is associated with.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Describes the clinical encounter or type of care this documentation is associated with.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The composition editing time, when the composition was last logically changed by the author.', + }, + author: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Compositionauthor_author_Union', + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + ), + description: + 'Identifies who is responsible for the information in the composition, not necessarily who typed it in.', + }, + _title: { + type: require('./element.schema.js'), + description: 'Official human-readable label for the composition.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: 'Official human-readable label for the composition.', + }, + _confidentiality: { + type: require('./element.schema.js'), + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + confidentiality: { + type: CodeScalar, + description: + 'The code specifying the level of confidentiality of the Composition.', + }, + attester: { + type: new GraphQLList(require('./compositionattester.schema.js')), + description: + 'A participant who has attested to the accuracy of the composition/document.', + }, + custodian: { + type: new GraphQLUnionType({ + name: 'Compositioncustodian_custodian_Union', + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.', + }, + relatesTo: { + type: new GraphQLList(require('./compositionrelatesto.schema.js')), + description: + 'Relationships that this composition has with other compositions or documents that already exist.', + }, + event: { + type: new GraphQLList(require('./compositionevent.schema.js')), + description: + 'The clinical service, such as a colonoscopy or an appendectomy, being documented.', + }, + section: { + type: new GraphQLList(require('./compositionsection.schema.js')), + description: 'The root of the sections that make up the composition.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/compositionattester.schema.js b/src/resources/4_0_0/schemas/compositionattester.schema.js new file mode 100644 index 00000000..aaa5324a --- /dev/null +++ b/src/resources/4_0_0/schemas/compositionattester.schema.js @@ -0,0 +1,87 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Compositionattester Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Compositionattester', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.schema.js'), + description: 'The type of attestation the authenticator offers.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of attestation the authenticator offers.', + }, + _time: { + type: require('./element.schema.js'), + description: 'When the composition was attested by the party.', + }, + time: { + type: DateTimeScalar, + description: 'When the composition was attested by the party.', + }, + party: { + type: new GraphQLUnionType({ + name: 'Compositionattesterparty_party_Union', + description: 'Who attested the composition in the specified way.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Who attested the composition in the specified way.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/compositionevent.schema.js b/src/resources/4_0_0/schemas/compositionevent.schema.js new file mode 100644 index 00000000..1a472dd5 --- /dev/null +++ b/src/resources/4_0_0/schemas/compositionevent.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Compositionevent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Compositionevent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.', + }, + detail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Compositioneventdetail_detail_Union', + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/compositionrelatesto.schema.js b/src/resources/4_0_0/schemas/compositionrelatesto.schema.js new file mode 100644 index 00000000..ca8b4135 --- /dev/null +++ b/src/resources/4_0_0/schemas/compositionrelatesto.schema.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary CompositionrelatesTo Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CompositionrelatesTo', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'The type of relationship that this composition has with anther composition or document.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this composition has with anther composition or document.', + }, + targetIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: 'The target composition/document of this relationship.', + }, + targetReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CompositionrelatesTotargetReference_targetReference_Union', + description: 'The target composition/document of this relationship.', + types: () => [require('./composition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + }, + }), + ), + description: 'The target composition/document of this relationship.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/compositionsection.schema.js b/src/resources/4_0_0/schemas/compositionsection.schema.js new file mode 100644 index 00000000..3e01c192 --- /dev/null +++ b/src/resources/4_0_0/schemas/compositionsection.schema.js @@ -0,0 +1,149 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Compositionsection Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Compositionsection', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _title: { + type: require('./element.schema.js'), + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + title: { + type: GraphQLString, + description: + 'The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code identifying the kind of content contained within the section. This must be consistent with the section title.', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Compositionsectionauthor_author_Union', + description: + 'Identifies who is responsible for the information in this section, not necessarily who typed it in.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'Identifies who is responsible for the information in this section, not necessarily who typed it in.', + }, + focus: { + type: new GraphQLUnionType({ + name: 'Compositionsectionfocus_focus_Union', + description: + 'The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).', + }, + text: { + type: require('./narrative.schema.js'), + description: + "A human-readable narrative that contains the attested content of the section, 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.", + }, + _mode: { + type: require('./element.schema.js'), + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + mode: { + type: CodeScalar, + description: + 'How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + orderedBy: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies the order applied to the items in the section entries.', + }, + entry: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Compositionsectionentry_entry_Union', + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to the actual resource from which the narrative in the section is derived.', + }, + emptyReason: { + type: require('./codeableconcept.schema.js'), + description: + 'If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/conceptmap.schema.js b/src/resources/4_0_0/schemas/conceptmap.schema.js new file mode 100644 index 00000000..b90b5b51 --- /dev/null +++ b/src/resources/4_0_0/schemas/conceptmap.schema.js @@ -0,0 +1,263 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ConceptMap Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ConceptMap', + description: + 'A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ConceptMap_Enum_schema', + values: { ConceptMap: { value: 'ConceptMap' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the concept map.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the concept map.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this concept map. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this concept map. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the concept map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the concept map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the concept map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the concept map.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the concept map from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the concept map from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate concept map instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the concept map is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this concept map is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this concept map is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.', + }, + _sourceUri: { + type: require('./element.schema.js'), + description: + 'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.', + }, + sourceUri: { + type: UriScalar, + description: + 'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.', + }, + _sourceCanonical: { + type: require('./element.schema.js'), + description: + 'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.', + }, + sourceCanonical: { + type: CanonicalScalar, + description: + 'Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.', + }, + _targetUri: { + type: require('./element.schema.js'), + description: + 'The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetUri: { + type: UriScalar, + description: + 'The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + _targetCanonical: { + type: require('./element.schema.js'), + description: + 'The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + targetCanonical: { + type: CanonicalScalar, + description: + 'The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.', + }, + group: { + type: new GraphQLList(require('./conceptmapgroup.schema.js')), + description: + 'A group of mappings that all have the same source and target system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/conceptmapgroup.schema.js b/src/resources/4_0_0/schemas/conceptmapgroup.schema.js new file mode 100644 index 00000000..b8a24cb0 --- /dev/null +++ b/src/resources/4_0_0/schemas/conceptmapgroup.schema.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroup Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ConceptMapgroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _source: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the source system where the concepts to be mapped are defined.', + }, + source: { + type: UriScalar, + description: + 'An absolute URI that identifies the source system where the concepts to be mapped are defined.', + }, + _sourceVersion: { + type: require('./element.schema.js'), + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + sourceVersion: { + type: GraphQLString, + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + _target: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the target system that the concepts will be mapped to.', + }, + target: { + type: UriScalar, + description: + 'An absolute URI that identifies the target system that the concepts will be mapped to.', + }, + _targetVersion: { + type: require('./element.schema.js'), + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + targetVersion: { + type: GraphQLString, + description: + 'The specific version of the code system, as determined by the code system authority.', + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./conceptmapgroupelement.schema.js')), + ), + description: + 'Mappings for an individual concept in the source to one or more concepts in the target.', + }, + unmapped: { + type: require('./conceptmapgroupunmapped.schema.js'), + description: + "What to do when there is no mapping for the source concept. 'Unmapped' does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/conceptmapgroupelement.schema.js b/src/resources/4_0_0/schemas/conceptmapgroupelement.schema.js new file mode 100644 index 00000000..5b498228 --- /dev/null +++ b/src/resources/4_0_0/schemas/conceptmapgroupelement.schema.js @@ -0,0 +1,58 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroupelement Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ConceptMapgroupelement', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: 'Identity (code or path) or the element/item being mapped.', + }, + code: { + type: CodeScalar, + description: 'Identity (code or path) or the element/item being mapped.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + target: { + type: new GraphQLList( + require('./conceptmapgroupelementtarget.schema.js'), + ), + description: + 'A concept from the target value set that this concept maps to.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/conceptmapgroupelementtarget.schema.js b/src/resources/4_0_0/schemas/conceptmapgroupelementtarget.schema.js new file mode 100644 index 00000000..f04b9639 --- /dev/null +++ b/src/resources/4_0_0/schemas/conceptmapgroupelementtarget.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroupelementtarget Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ConceptMapgroupelementtarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + code: { + type: CodeScalar, + description: + 'Identity (code or path) or the element/item that the map refers to.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + _equivalence: { + type: require('./element.schema.js'), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + equivalence: { + type: new GraphQLNonNull(CodeScalar), + description: + "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", + }, + _comment: { + type: require('./element.schema.js'), + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + comment: { + type: GraphQLString, + description: + 'A description of status/issues in mapping that conveys additional information not represented in the structured data.', + }, + dependsOn: { + type: new GraphQLList( + require('./conceptmapgroupelementtargetdependson.schema.js'), + ), + description: + 'A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/conceptmapgroupelementtargetdependson.schema.js b/src/resources/4_0_0/schemas/conceptmapgroupelementtargetdependson.schema.js new file mode 100644 index 00000000..73ff602e --- /dev/null +++ b/src/resources/4_0_0/schemas/conceptmapgroupelementtargetdependson.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroupelementtargetdependsOn Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ConceptMapgroupelementtargetdependsOn', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _property: { + type: require('./element.schema.js'), + description: + 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property.', + }, + property: { + type: new GraphQLNonNull(UriScalar), + description: + 'A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + system: { + type: CanonicalScalar, + description: + 'An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).', + }, + _value: { + type: require('./element.schema.js'), + description: + 'Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/conceptmapgroupunmapped.schema.js b/src/resources/4_0_0/schemas/conceptmapgroupunmapped.schema.js new file mode 100644 index 00000000..34a0a6ba --- /dev/null +++ b/src/resources/4_0_0/schemas/conceptmapgroupunmapped.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ConceptMapgroupunmapped Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ConceptMapgroupunmapped', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).', + }, + _code: { + type: require('./element.schema.js'), + description: + "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", + }, + code: { + type: CodeScalar, + description: + "The fixed code to use when the mode = 'fixed' - all unmapped codes are mapped to a single fixed code.", + }, + _display: { + type: require('./element.schema.js'), + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + display: { + type: GraphQLString, + description: + 'The display for the code. The display is only provided to help editors when editing the concept map.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.', + }, + url: { + type: CanonicalScalar, + description: + 'The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/condition.schema.js b/src/resources/4_0_0/schemas/condition.schema.js new file mode 100644 index 00000000..1a4bb9b6 --- /dev/null +++ b/src/resources/4_0_0/schemas/condition.schema.js @@ -0,0 +1,307 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Condition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Condition', + description: + 'A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Condition_Enum_schema', + values: { Condition: { value: 'Condition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + clinicalStatus: { + type: require('./codeableconcept.schema.js'), + description: 'The clinical status of the condition.', + }, + verificationStatus: { + type: require('./codeableconcept.schema.js'), + description: + 'The verification status to support the clinical status of the condition.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A category assigned to the condition.', + }, + severity: { + type: require('./codeableconcept.schema.js'), + description: + 'A subjective assessment of the severity of the condition as evaluated by the clinician.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'Identification of the condition, problem or diagnosis.', + }, + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The anatomical location where this condition manifests itself.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Conditionsubject_subject_Union', + description: + 'Indicates the patient or group who the condition record is associated with.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'Indicates the patient or group who the condition record is associated with.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Conditionencounter_encounter_Union', + description: + 'The Encounter during which this Condition was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this Condition was created or to which the creation of this record is tightly associated.', + }, + _onsetDateTime: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetAge: { + type: require('./age.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetPeriod: { + type: require('./period.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetRange: { + type: require('./range.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _onsetString: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + onsetString: { + type: GraphQLString, + description: + 'Estimated or actual date or date-time the condition began, in the opinion of the clinician.', + }, + _abatementDateTime: { + type: require('./element.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementDateTime: { + type: DateTimeScalar, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementAge: { + type: require('./age.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementPeriod: { + type: require('./period.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementRange: { + type: require('./range.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _abatementString: { + type: require('./element.schema.js'), + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + abatementString: { + type: GraphQLString, + description: + "The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate.", + }, + _recordedDate: { + type: require('./element.schema.js'), + description: + 'The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.', + }, + recordedDate: { + type: DateTimeScalar, + description: + 'The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'Conditionrecorder_recorder_Union', + description: + 'Individual who recorded the record and takes responsibility for its content.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Individual who recorded the record and takes responsibility for its content.', + }, + asserter: { + type: new GraphQLUnionType({ + name: 'Conditionasserter_asserter_Union', + description: 'Individual who is making the condition statement.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Individual who is making the condition statement.', + }, + stage: { + type: new GraphQLList(require('./conditionstage.schema.js')), + description: + 'Clinical stage or grade of a condition. May include formal severity assessments.', + }, + evidence: { + type: new GraphQLList(require('./conditionevidence.schema.js')), + description: + "Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition.", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/conditionevidence.schema.js b/src/resources/4_0_0/schemas/conditionevidence.schema.js new file mode 100644 index 00000000..9ae97510 --- /dev/null +++ b/src/resources/4_0_0/schemas/conditionevidence.schema.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Conditionevidence Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Conditionevidence', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A manifestation or symptom that led to the recording of this condition.', + }, + detail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Conditionevidencedetail_detail_Union', + description: + 'Links to other relevant information, including pathology reports.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Links to other relevant information, including pathology reports.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/conditionstage.schema.js b/src/resources/4_0_0/schemas/conditionstage.schema.js new file mode 100644 index 00000000..da6f7a7c --- /dev/null +++ b/src/resources/4_0_0/schemas/conditionstage.schema.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Conditionstage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Conditionstage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + summary: { + type: require('./codeableconcept.schema.js'), + description: + "A simple summary of the stage such as 'Stage 3'. The determination of the stage is disease-specific.", + }, + assessment: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Conditionstageassessment_assessment_Union', + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + types: () => [ + require('./clinicalimpression.schema.js'), + require('./diagnosticreport.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Reference to a formal record of the evidence on which the staging assessment is based.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of staging, such as pathological or clinical staging.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/consent.schema.js b/src/resources/4_0_0/schemas/consent.schema.js new file mode 100644 index 00000000..07a8c8a8 --- /dev/null +++ b/src/resources/4_0_0/schemas/consent.schema.js @@ -0,0 +1,238 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Consent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Consent', + description: + 'A record of a healthcare consumer’s choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Consent_Enum_schema', + values: { Consent: { value: 'Consent' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Unique identifier for this copy of the Consent Statement.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current state of this consent.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this consent.', + }, + scope: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A selector of the type of consent being presented: ADR, Privacy, Treatment, Research. This list is now extensible.', + }, + category: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.schema.js')), + ), + description: + 'A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'Consentpatient_patient_Union', + description: + 'The patient/healthcare consumer to whom this consent applies.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The patient/healthcare consumer to whom this consent applies.', + }, + _dateTime: { + type: require('./element.schema.js'), + description: 'When this Consent was issued / created / indexed.', + }, + dateTime: { + type: DateTimeScalar, + description: 'When this Consent was issued / created / indexed.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Consentperformer_performer_Union', + description: + 'Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + ), + description: + 'Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.', + }, + organization: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Consentorganization_organization_Union', + description: + 'The organization that manages the consent, and the framework within which it is executed.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The organization that manages the consent, and the framework within which it is executed.', + }, + sourceAttachment: { + type: require('./attachment.schema.js'), + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + sourceReference: { + type: new GraphQLUnionType({ + name: 'ConsentsourceReference_sourceReference_Union', + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + types: () => [ + require('./consent.schema.js'), + require('./documentreference.schema.js'), + require('./contract.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Consent') { + return require('./consent.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + description: + 'The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.', + }, + policy: { + type: new GraphQLList(require('./consentpolicy.schema.js')), + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + policyRule: { + type: require('./codeableconcept.schema.js'), + description: + 'A reference to the specific base computable regulation or policy.', + }, + verification: { + type: new GraphQLList(require('./consentverification.schema.js')), + description: + 'Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.', + }, + provision: { + type: require('./consentprovision.schema.js'), + description: + 'An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/consentpolicy.schema.js b/src/resources/4_0_0/schemas/consentpolicy.schema.js new file mode 100644 index 00000000..0acd3816 --- /dev/null +++ b/src/resources/4_0_0/schemas/consentpolicy.schema.js @@ -0,0 +1,53 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Consentpolicy Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Consentpolicy', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _authority: { + type: require('./element.schema.js'), + description: + 'Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.', + }, + authority: { + type: UriScalar, + description: + 'Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + uri: { + type: UriScalar, + description: + 'The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/consentprovision.schema.js b/src/resources/4_0_0/schemas/consentprovision.schema.js new file mode 100644 index 00000000..ccb940ab --- /dev/null +++ b/src/resources/4_0_0/schemas/consentprovision.schema.js @@ -0,0 +1,86 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Consentprovision Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Consentprovision', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: + 'Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.', + }, + type: { + type: CodeScalar, + description: + 'Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.', + }, + period: { + type: require('./period.schema.js'), + description: 'The timeframe in this rule is valid.', + }, + actor: { + type: new GraphQLList(require('./consentprovisionactor.schema.js')), + description: + "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + action: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Actions controlled by this Rule.', + }, + securityLabel: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.', + }, + purpose: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.', + }, + class: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'If this code is found in an instance, then the rule applies.', + }, + dataPeriod: { + type: require('./period.schema.js'), + description: + 'Clinical or Operational Relevant period of time that bounds the data controlled by this rule.', + }, + data: { + type: new GraphQLList(require('./consentprovisiondata.schema.js')), + description: + 'The resources controlled by this rule if specific resources are referenced.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/consentprovisionactor.schema.js b/src/resources/4_0_0/schemas/consentprovisionactor.schema.js new file mode 100644 index 00000000..a13aaccb --- /dev/null +++ b/src/resources/4_0_0/schemas/consentprovisionactor.schema.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Consentprovisionactor Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Consentprovisionactor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + role: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'How the individual is involved in the resources content that is described in the exception.', + }, + reference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Consentprovisionactorreference_reference_Union', + description: + "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + types: () => [ + require('./device.schema.js'), + require('./group.schema.js'), + require('./careteam.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + ), + description: + "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/consentprovisiondata.schema.js b/src/resources/4_0_0/schemas/consentprovisiondata.schema.js new file mode 100644 index 00000000..ba17ea28 --- /dev/null +++ b/src/resources/4_0_0/schemas/consentprovisiondata.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Consentprovisiondata Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Consentprovisiondata', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _meaning: { + type: require('./element.schema.js'), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + meaning: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the resource reference is interpreted when testing consent restrictions.', + }, + reference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Consentprovisiondatareference_reference_Union', + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to a specific resource that defines which resources are covered by this consent.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/consentverification.schema.js b/src/resources/4_0_0/schemas/consentverification.schema.js new file mode 100644 index 00000000..3270c758 --- /dev/null +++ b/src/resources/4_0_0/schemas/consentverification.schema.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Consentverification Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Consentverification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _verified: { + type: require('./element.schema.js'), + description: 'Has the instruction been verified.', + }, + verified: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Has the instruction been verified.', + }, + verifiedWith: { + type: new GraphQLUnionType({ + name: 'ConsentverificationverifiedWith_verifiedWith_Union', + description: + 'Who verified the instruction (Patient, Relative or other Authorized Person).', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Who verified the instruction (Patient, Relative or other Authorized Person).', + }, + _verificationDate: { + type: require('./element.schema.js'), + description: 'Date verification was collected.', + }, + verificationDate: { + type: DateTimeScalar, + description: 'Date verification was collected.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contactdetail.schema.js b/src/resources/4_0_0/schemas/contactdetail.schema.js new file mode 100644 index 00000000..a40c947a --- /dev/null +++ b/src/resources/4_0_0/schemas/contactdetail.schema.js @@ -0,0 +1,41 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary ContactDetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ContactDetail', + description: + 'Base StructureDefinition for ContactDetail Type: Specifies contact information for a person or organization.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of an individual to contact.', + }, + name: { + type: GraphQLString, + description: 'The name of an individual to contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'The contact details for the individual (if a name was provided) or the organization.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contactpoint.schema.js b/src/resources/4_0_0/schemas/contactpoint.schema.js new file mode 100644 index 00000000..2a2a6ef8 --- /dev/null +++ b/src/resources/4_0_0/schemas/contactpoint.schema.js @@ -0,0 +1,72 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ContactPoint Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ContactPoint', + description: + 'Base StructureDefinition for ContactPoint Type: Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + system: { + type: CodeScalar, + description: + 'Telecommunications form for contact point - what communications system is required to make use of the contact.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + value: { + type: GraphQLString, + description: + 'The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).', + }, + _use: { + type: require('./element.schema.js'), + description: 'Identifies the purpose for the contact point.', + }, + use: { + type: CodeScalar, + description: 'Identifies the purpose for the contact point.', + }, + _rank: { + type: require('./element.schema.js'), + description: + 'Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.', + }, + rank: { + type: PositiveIntScalar, + description: + 'Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period when the contact point was/is in use.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contract.schema.js b/src/resources/4_0_0/schemas/contract.schema.js new file mode 100644 index 00000000..a4476957 --- /dev/null +++ b/src/resources/4_0_0/schemas/contract.schema.js @@ -0,0 +1,442 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Contract Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contract', + description: + 'Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Contract_Enum_schema', + values: { Contract: { value: 'Contract' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Unique identifier for this Contract or a derivative that references a Source Contract.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'Canonical identifier for this contract, represented as a URI (globally unique).', + }, + url: { + type: UriScalar, + description: + 'Canonical identifier for this contract, represented as a URI (globally unique).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'An edition identifier used for business purposes to label business significant variants.', + }, + version: { + type: GraphQLString, + description: + 'An edition identifier used for business purposes to label business significant variants.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + legalState: { + type: require('./codeableconcept.schema.js'), + description: + 'Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement.', + }, + instantiatesCanonical: { + type: new GraphQLUnionType({ + name: 'ContractinstantiatesCanonical_instantiatesCanonical_Union', + description: + 'The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.', + types: () => [require('./contract.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + }, + }), + description: + 'The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.', + }, + instantiatesUri: { + type: UriScalar, + description: + 'The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.', + }, + contentDerivative: { + type: require('./codeableconcept.schema.js'), + description: + 'The minimal content derived from the basal information source at a specific stage in its lifecycle.', + }, + _issued: { + type: require('./element.schema.js'), + description: 'When this Contract was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract was issued.', + }, + applies: { + type: require('./period.schema.js'), + description: + 'Relevant time or time-period when this Contract is applicable.', + }, + expirationType: { + type: require('./codeableconcept.schema.js'), + description: + 'Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.', + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractsubject_subject_Union', + description: + 'The target entity impacted by or of interest to parties to the agreement.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The target entity impacted by or of interest to parties to the agreement.', + }, + authority: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractauthority_authority_Union', + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.', + }, + domain: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractdomain_domain_Union', + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.', + }, + site: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contractsite_site_Union', + description: + 'Sites in which the contract is complied with, exercised, or in force.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'Sites in which the contract is complied with, exercised, or in force.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.', + }, + author: { + type: new GraphQLUnionType({ + name: 'Contractauthor_author_Union', + description: + 'The individual or organization that authored the Contract definition, derivative, or instance in any legal state.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual or organization that authored the Contract definition, derivative, or instance in any legal state.', + }, + scope: { + type: require('./codeableconcept.schema.js'), + description: + 'A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.', + }, + topicCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.', + }, + topicReference: { + type: new GraphQLUnionType({ + name: 'ContracttopicReference_topicReference_Union', + description: + 'Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Narrows the range of legal concerns to focus on the achievement of specific contractual objectives.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + "A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state. Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract.", + }, + subType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope.", + }, + contentDefinition: { + type: require('./contractcontentdefinition.schema.js'), + description: + 'Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.', + }, + term: { + type: new GraphQLList(require('./contractterm.schema.js')), + description: + 'One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ContractsupportingInfo_supportingInfo_Union', + description: + 'Information that may be needed by/relevant to the performer in their execution of this term action.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Information that may be needed by/relevant to the performer in their execution of this term action.', + }, + relevantHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ContractrelevantHistory_relevantHistory_Union', + description: + 'Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract. The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.', + }, + signer: { + type: new GraphQLList(require('./contractsigner.schema.js')), + description: + 'Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.', + }, + friendly: { + type: new GraphQLList(require('./contractfriendly.schema.js')), + description: + "The 'patient friendly language' versionof the Contract in whole or in parts. 'Patient friendly language' means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", + }, + legal: { + type: new GraphQLList(require('./contractlegal.schema.js')), + description: + 'List of Legal expressions or representations of this Contract.', + }, + rule: { + type: new GraphQLList(require('./contractrule.schema.js')), + description: + 'List of Computable Policy Rule Language Representations of this Contract.', + }, + legallyBindingAttachment: { + type: require('./attachment.schema.js'), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + legallyBindingReference: { + type: new GraphQLUnionType({ + name: 'ContractlegallyBindingReference_legallyBindingReference_Union', + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./contract.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + }, + }), + description: + "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the 'source of truth' and which would be the basis for legal action related to enforcement of this Contract.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contractcontentdefinition.schema.js b/src/resources/4_0_0/schemas/contractcontentdefinition.schema.js new file mode 100644 index 00000000..841bf275 --- /dev/null +++ b/src/resources/4_0_0/schemas/contractcontentdefinition.schema.js @@ -0,0 +1,102 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ContractcontentDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ContractcontentDefinition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.', + }, + subType: { + type: require('./codeableconcept.schema.js'), + description: 'Detailed Precusory content type.', + }, + publisher: { + type: new GraphQLUnionType({ + name: 'ContractcontentDefinitionpublisher_publisher_Union', + description: + 'The individual or organization that published the Contract precursor content.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual or organization that published the Contract precursor content.', + }, + _publicationDate: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.', + }, + publicationDate: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.', + }, + _publicationStatus: { + type: require('./element.schema.js'), + description: 'draft | active | retired | unknown.', + }, + publicationStatus: { + type: new GraphQLNonNull(CodeScalar), + description: 'draft | active | retired | unknown.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contractfriendly.schema.js b/src/resources/4_0_0/schemas/contractfriendly.schema.js new file mode 100644 index 00000000..bdd01c56 --- /dev/null +++ b/src/resources/4_0_0/schemas/contractfriendly.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contractfriendly Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contractfriendly', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractfriendlycontentReference_contentReference_Union', + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: + 'Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contractlegal.schema.js b/src/resources/4_0_0/schemas/contractlegal.schema.js new file mode 100644 index 00000000..4e09e2fa --- /dev/null +++ b/src/resources/4_0_0/schemas/contractlegal.schema.js @@ -0,0 +1,67 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contractlegal Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contractlegal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: 'Contract legal text in human renderable form.', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractlegalcontentReference_contentReference_Union', + description: 'Contract legal text in human renderable form.', + types: () => [ + require('./composition.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: 'Contract legal text in human renderable form.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contractrule.schema.js b/src/resources/4_0_0/schemas/contractrule.schema.js new file mode 100644 index 00000000..3df0d863 --- /dev/null +++ b/src/resources/4_0_0/schemas/contractrule.schema.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contractrule Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contractrule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + contentAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + contentReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContractrulecontentReference_contentReference_Union', + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contractsigner.schema.js b/src/resources/4_0_0/schemas/contractsigner.schema.js new file mode 100644 index 00000000..ab8a7edf --- /dev/null +++ b/src/resources/4_0_0/schemas/contractsigner.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contractsigner Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contractsigner', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'Role of this Contract signer, e.g. notary, grantee.', + }, + party: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contractsignerparty_party_Union', + description: 'Party which is a signator to this Contract.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'Party which is a signator to this Contract.', + }, + signature: { + type: new GraphQLList( + new GraphQLNonNull(require('./signature.schema.js')), + ), + description: + 'Legally binding Contract DSIG signature contents in Base64.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contractterm.schema.js b/src/resources/4_0_0/schemas/contractterm.schema.js new file mode 100644 index 00000000..309297b2 --- /dev/null +++ b/src/resources/4_0_0/schemas/contractterm.schema.js @@ -0,0 +1,110 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Contractterm Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contractterm', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Unique identifier for this particular Contract Provision.', + }, + _issued: { + type: require('./element.schema.js'), + description: 'When this Contract Provision was issued.', + }, + issued: { + type: DateTimeScalar, + description: 'When this Contract Provision was issued.', + }, + applies: { + type: require('./period.schema.js'), + description: + 'Relevant time or time-period when this Contract Provision is applicable.', + }, + topicCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'The entity that the term applies to.', + }, + topicReference: { + type: new GraphQLUnionType({ + name: 'ContracttermtopicReference_topicReference_Union', + description: 'The entity that the term applies to.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'The entity that the term applies to.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.', + }, + subType: { + type: require('./codeableconcept.schema.js'), + description: + 'A specialized legal clause or condition based on overarching contract type.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Statement of a provision in a policy or a contract.', + }, + text: { + type: GraphQLString, + description: 'Statement of a provision in a policy or a contract.', + }, + securityLabel: { + type: new GraphQLList(require('./contracttermsecuritylabel.schema.js')), + description: + 'Security labels that protect the handling of information about the term and its elements, which may be specifically identified..', + }, + offer: { + type: new GraphQLNonNull(require('./contracttermoffer.schema.js')), + description: + 'The matter of concern in the context of this provision of the agrement.', + }, + asset: { + type: new GraphQLList(require('./contracttermasset.schema.js')), + description: 'Contract Term Asset List.', + }, + action: { + type: new GraphQLList(require('./contracttermaction.schema.js')), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermaction.schema.js b/src/resources/4_0_0/schemas/contracttermaction.schema.js new file mode 100644 index 00000000..cd97e3a0 --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermaction.schema.js @@ -0,0 +1,323 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Contracttermaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contracttermaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _doNotPerform: { + type: require('./element.schema.js'), + description: 'True if the term prohibits the action.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: 'True if the term prohibits the action.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.', + }, + subject: { + type: new GraphQLList(require('./contracttermactionsubject.schema.js')), + description: 'Entity of the action.', + }, + intent: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Reason or purpose for the action stipulated by this Contract Provision.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.', + }, + linkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.', + }, + status: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Current state of the term action.', + }, + context: { + type: new GraphQLUnionType({ + name: 'Contracttermactioncontext_context_Union', + description: + 'Encounter or Episode with primary association to specified term activity.', + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'Encounter or Episode with primary association to specified term activity.', + }, + _contextLinkId: { + type: require('./element.schema.js'), + description: + 'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.', + }, + contextLinkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'When action happens.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'When action happens.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'When action happens.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: 'When action happens.', + }, + requester: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Contracttermactionrequester_requester_Union', + description: + 'Who or what initiated the action and has responsibility for its activation.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'Who or what initiated the action and has responsibility for its activation.', + }, + _requesterLinkId: { + type: require('./element.schema.js'), + description: + 'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.', + }, + requesterLinkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.', + }, + performerType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of individual that is desired or required to perform or not perform the action.', + }, + performerRole: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of role or competency of an individual desired or required to perform or not perform the action.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'Contracttermactionperformer_performer_Union', + description: + 'Indicates who or what is being asked to perform (or not perform) the ction.', + types: () => [ + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./careteam.schema.js'), + require('./device.schema.js'), + require('./substance.schema.js'), + require('./organization.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Indicates who or what is being asked to perform (or not perform) the ction.', + }, + _performerLinkId: { + type: require('./element.schema.js'), + description: + 'Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.', + }, + performerLinkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ContracttermactionreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies permitting or not permitting this action.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + require('./questionnaire.schema.js'), + require('./questionnaireresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies permitting or not permitting this action.', + }, + _reason: { + type: require('./element.schema.js'), + description: + 'Describes why the action is to be performed or not performed in textual form.', + }, + reason: { + type: new GraphQLList(GraphQLString), + description: + 'Describes why the action is to be performed or not performed in textual form.', + }, + _reasonLinkId: { + type: require('./element.schema.js'), + description: + 'Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.', + }, + reasonLinkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text related to the reason type or reference of this action in the referenced form or QuestionnaireResponse.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the term action made by the requester, performer, subject or other participants.', + }, + _securityLabelNumber: { + type: require('./element.schema.js'), + description: 'Security labels that protects the action.', + }, + securityLabelNumber: { + type: new GraphQLList(UnsignedIntScalar), + description: 'Security labels that protects the action.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermactionsubject.schema.js b/src/resources/4_0_0/schemas/contracttermactionsubject.schema.js new file mode 100644 index 00000000..a74397fd --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermactionsubject.schema.js @@ -0,0 +1,87 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contracttermactionsubject Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contracttermactionsubject', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contracttermactionsubjectreference_reference_Union', + description: + 'The entity the action is performed or not performed on or for.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + ), + description: + 'The entity the action is performed or not performed on or for.', + }, + role: { + type: require('./codeableconcept.schema.js'), + description: 'Role type of agent assigned roles in this Contract.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermasset.schema.js b/src/resources/4_0_0/schemas/contracttermasset.schema.js new file mode 100644 index 00000000..733e50c5 --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermasset.schema.js @@ -0,0 +1,128 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Contracttermasset Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contracttermasset', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + scope: { + type: require('./codeableconcept.schema.js'), + description: 'Differentiates the kind of the asset .', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Target entity type about which the term may be concerned.', + }, + typeReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ContracttermassettypeReference_typeReference_Union', + description: 'Associated entities.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Associated entities.', + }, + subtype: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'May be a subtype or part of an offered asset.', + }, + relationship: { + type: require('./coding.schema.js'), + description: + 'Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree.', + }, + context: { + type: new GraphQLList(require('./contracttermassetcontext.schema.js')), + description: 'Circumstance of the asset.', + }, + _condition: { + type: require('./element.schema.js'), + description: + 'Description of the quality and completeness of the asset that imay be a factor in its valuation.', + }, + condition: { + type: GraphQLString, + description: + 'Description of the quality and completeness of the asset that imay be a factor in its valuation.', + }, + periodType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Type of Asset availability for use or ownership.', + }, + period: { + type: new GraphQLList(require('./period.schema.js')), + description: 'Asset relevant contractual time period.', + }, + usePeriod: { + type: new GraphQLList(require('./period.schema.js')), + description: 'Time period of asset use.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.', + }, + text: { + type: GraphQLString, + description: + 'Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.', + }, + linkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.', + }, + _securityLabelNumber: { + type: require('./element.schema.js'), + description: 'Security labels that protects the asset.', + }, + securityLabelNumber: { + type: new GraphQLList(UnsignedIntScalar), + description: 'Security labels that protects the asset.', + }, + valuedItem: { + type: new GraphQLList(require('./contracttermassetvalueditem.schema.js')), + description: 'Contract Valued Item List.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermassetcontext.schema.js b/src/resources/4_0_0/schemas/contracttermassetcontext.schema.js new file mode 100644 index 00000000..7e679615 --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermassetcontext.schema.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contracttermassetcontext Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contracttermassetcontext', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLUnionType({ + name: 'Contracttermassetcontextreference_reference_Union', + description: + 'Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository), location held, e.g., building, jurisdiction.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Context description.', + }, + text: { + type: GraphQLString, + description: 'Context description.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermassetvalueditem.schema.js b/src/resources/4_0_0/schemas/contracttermassetvalueditem.schema.js new file mode 100644 index 00000000..aac47905 --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermassetvalueditem.schema.js @@ -0,0 +1,205 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ContracttermassetvaluedItem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ContracttermassetvaluedItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + entityCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + entityReference: { + type: new GraphQLUnionType({ + name: + 'ContracttermassetvaluedItementityReference_entityReference_Union', + description: + 'Specific type of Contract Valued Item that may be priced.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Specific type of Contract Valued Item that may be priced.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Identifies a Contract Valued Item instance.', + }, + _effectiveTime: { + type: require('./element.schema.js'), + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + effectiveTime: { + type: DateTimeScalar, + description: + 'Indicates the time during which this Contract ValuedItem information is effective.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: 'A Contract Valued Item unit valuation measure.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + _points: { + type: require('./element.schema.js'), + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + points: { + type: GraphQLFloat, + description: + 'An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.', + }, + net: { + type: require('./money.schema.js'), + description: + 'Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.', + }, + _payment: { + type: require('./element.schema.js'), + description: 'Terms of valuation.', + }, + payment: { + type: GraphQLString, + description: 'Terms of valuation.', + }, + _paymentDate: { + type: require('./element.schema.js'), + description: 'When payment is due.', + }, + paymentDate: { + type: DateTimeScalar, + description: 'When payment is due.', + }, + responsible: { + type: new GraphQLUnionType({ + name: 'ContracttermassetvaluedItemresponsible_responsible_Union', + description: 'Who will make payment.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Who will make payment.', + }, + recipient: { + type: new GraphQLUnionType({ + name: 'ContracttermassetvaluedItemrecipient_recipient_Union', + description: 'Who will receive payment.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Who will receive payment.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.', + }, + linkId: { + type: new GraphQLList(GraphQLString), + description: + 'Id of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.', + }, + _securityLabelNumber: { + type: require('./element.schema.js'), + description: + 'A set of security labels that define which terms are controlled by this condition.', + }, + securityLabelNumber: { + type: new GraphQLList(UnsignedIntScalar), + description: + 'A set of security labels that define which terms are controlled by this condition.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermoffer.schema.js b/src/resources/4_0_0/schemas/contracttermoffer.schema.js new file mode 100644 index 00000000..873de10e --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermoffer.schema.js @@ -0,0 +1,105 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Contracttermoffer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contracttermoffer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Unique identifier for this particular Contract Provision.', + }, + party: { + type: new GraphQLList(require('./contracttermofferparty.schema.js')), + description: 'Offer Recipient.', + }, + topic: { + type: new GraphQLUnionType({ + name: 'Contracttermoffertopic_topic_Union', + description: + 'The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30).', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.', + }, + decision: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of choice made by accepting party with respect to an offer made by an offeror/ grantee.', + }, + decisionMode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'How the decision about a Contract was conveyed.', + }, + answer: { + type: new GraphQLList(require('./contracttermofferanswer.schema.js')), + description: 'Response to offer text.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Human readable form of this Contract Offer.', + }, + text: { + type: GraphQLString, + description: 'Human readable form of this Contract Offer.', + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'The id of the clause or question text of the offer in the referenced questionnaire/response.', + }, + linkId: { + type: new GraphQLList(GraphQLString), + description: + 'The id of the clause or question text of the offer in the referenced questionnaire/response.', + }, + _securityLabelNumber: { + type: require('./element.schema.js'), + description: 'Security labels that protects the offer.', + }, + securityLabelNumber: { + type: new GraphQLList(UnsignedIntScalar), + description: 'Security labels that protects the offer.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermofferanswer.schema.js b/src/resources/4_0_0/schemas/contracttermofferanswer.schema.js new file mode 100644 index 00000000..d032a151 --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermofferanswer.schema.js @@ -0,0 +1,157 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Contracttermofferanswer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contracttermofferanswer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + valueReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ContracttermofferanswervalueReference_valueReference_Union', + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Response to an offer clause or question text, which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermofferparty.schema.js b/src/resources/4_0_0/schemas/contracttermofferparty.schema.js new file mode 100644 index 00000000..0ddfeb8a --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermofferparty.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Contracttermofferparty Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contracttermofferparty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Contracttermofferpartyreference_reference_Union', + description: 'Participant in the offer.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + ), + description: 'Participant in the offer.', + }, + role: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'How the party participates in the offer.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contracttermsecuritylabel.schema.js b/src/resources/4_0_0/schemas/contracttermsecuritylabel.schema.js new file mode 100644 index 00000000..97dd2fbc --- /dev/null +++ b/src/resources/4_0_0/schemas/contracttermsecuritylabel.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ContracttermsecurityLabel Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ContracttermsecurityLabel', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _number: { + type: require('./element.schema.js'), + description: + 'Number used to link this term or term element to the applicable Security Label.', + }, + number: { + type: new GraphQLList(UnsignedIntScalar), + description: + 'Number used to link this term or term element to the applicable Security Label.', + }, + classification: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.', + }, + category: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements.', + }, + control: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Security label privacy tag that species the manner in which term and/or term elements are to be protected.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/contributor.schema.js b/src/resources/4_0_0/schemas/contributor.schema.js new file mode 100644 index 00000000..d8914993 --- /dev/null +++ b/src/resources/4_0_0/schemas/contributor.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Contributor Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Contributor', + description: + 'Base StructureDefinition for Contributor Type: A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of contributor.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of contributor.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the individual or organization responsible for the contribution.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the individual or organization responsible for the contribution.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the contributor.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/count.schema.js b/src/resources/4_0_0/schemas/count.schema.js new file mode 100644 index 00000000..0e3ff985 --- /dev/null +++ b/src/resources/4_0_0/schemas/count.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Count Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Count', + description: + 'Base StructureDefinition for Count Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverage.schema.js b/src/resources/4_0_0/schemas/coverage.schema.js new file mode 100644 index 00000000..7a440553 --- /dev/null +++ b/src/resources/4_0_0/schemas/coverage.schema.js @@ -0,0 +1,275 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Coverage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Coverage', + description: + 'Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Coverage_Enum_schema', + values: { Coverage: { value: 'Coverage' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'A unique identifier assigned to this coverage.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.', + }, + policyHolder: { + type: new GraphQLUnionType({ + name: 'CoveragepolicyHolder_policyHolder_Union', + description: "The party who 'owns' the insurance policy.", + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: "The party who 'owns' the insurance policy.", + }, + subscriber: { + type: new GraphQLUnionType({ + name: 'Coveragesubscriber_subscriber_Union', + description: + "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + "The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due.", + }, + _subscriberId: { + type: require('./element.schema.js'), + description: 'The insurer assigned ID for the Subscriber.', + }, + subscriberId: { + type: GraphQLString, + description: 'The insurer assigned ID for the Subscriber.', + }, + beneficiary: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Coveragebeneficiary_beneficiary_Union', + description: + 'The party who benefits from the insurance coverage; the patient when products and/or services are provided.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The party who benefits from the insurance coverage; the patient when products and/or services are provided.', + }, + _dependent: { + type: require('./element.schema.js'), + description: 'A unique identifier for a dependent under the coverage.', + }, + dependent: { + type: GraphQLString, + description: 'A unique identifier for a dependent under the coverage.', + }, + relationship: { + type: require('./codeableconcept.schema.js'), + description: + 'The relationship of beneficiary (patient) to the subscriber.', + }, + period: { + type: require('./period.schema.js'), + description: + "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", + }, + payor: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Coveragepayor_payor_Union', + description: + 'The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + ), + description: + 'The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements.', + }, + class: { + type: new GraphQLList(require('./coverageclass.schema.js')), + description: 'A suite of underwriter specific classifiers.', + }, + _order: { + type: require('./element.schema.js'), + description: + 'The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.', + }, + order: { + type: PositiveIntScalar, + description: + 'The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care.', + }, + _network: { + type: require('./element.schema.js'), + description: + "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", + }, + network: { + type: GraphQLString, + description: + "The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply.", + }, + costToBeneficiary: { + type: new GraphQLList(require('./coveragecosttobeneficiary.schema.js')), + description: + 'A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card.', + }, + _subrogation: { + type: require('./element.schema.js'), + description: + "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.", + }, + subrogation: { + type: GraphQLBoolean, + description: + "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.", + }, + contract: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Coveragecontract_contract_Union', + description: + 'The policy(s) which constitute this insurance coverage.', + types: () => [require('./contract.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + }, + }), + ), + description: 'The policy(s) which constitute this insurance coverage.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageclass.schema.js b/src/resources/4_0_0/schemas/coverageclass.schema.js new file mode 100644 index 00000000..d01ebd44 --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageclass.schema.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Coverageclass Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Coverageclass', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The alphanumeric string value associated with the insurer issued label.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The alphanumeric string value associated with the insurer issued label.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A short description for the class.', + }, + name: { + type: GraphQLString, + description: 'A short description for the class.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coveragecosttobeneficiary.schema.js b/src/resources/4_0_0/schemas/coveragecosttobeneficiary.schema.js new file mode 100644 index 00000000..868286c4 --- /dev/null +++ b/src/resources/4_0_0/schemas/coveragecosttobeneficiary.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoveragecostToBeneficiary Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoveragecostToBeneficiary', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The category of patient centric costs associated with treatment.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'The amount due from the patient for the cost category.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'The amount due from the patient for the cost category.', + }, + exception: { + type: new GraphQLList( + require('./coveragecosttobeneficiaryexception.schema.js'), + ), + description: + 'A suite of codes indicating exceptions or reductions to patient costs and their effective periods.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coveragecosttobeneficiaryexception.schema.js b/src/resources/4_0_0/schemas/coveragecosttobeneficiaryexception.schema.js new file mode 100644 index 00000000..87cb3360 --- /dev/null +++ b/src/resources/4_0_0/schemas/coveragecosttobeneficiaryexception.schema.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoveragecostToBeneficiaryexception Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoveragecostToBeneficiaryexception', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The code for the specific exception.', + }, + period: { + type: require('./period.schema.js'), + description: 'The timeframe during when the exception is in force.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityrequest.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityrequest.schema.js new file mode 100644 index 00000000..2c81106f --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityrequest.schema.js @@ -0,0 +1,249 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityRequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityRequest', + description: + 'The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CoverageEligibilityRequest_Enum_schema', + values: { + CoverageEligibilityRequest: { value: 'CoverageEligibilityRequest' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A unique identifier assigned to this coverage eligiblity request.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'When the requestor expects the processor to complete processing.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", + }, + purpose: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CoverageEligibilityRequestpatient_patient_Union', + description: + 'The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date when this resource was created.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'CoverageEligibilityRequestenterer_enterer_Union', + description: 'Person who created the request.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'Person who created the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'CoverageEligibilityRequestprovider_provider_Union', + description: 'The provider which is responsible for the request.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The provider which is responsible for the request.', + }, + insurer: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CoverageEligibilityRequestinsurer_insurer_Union', + description: + 'The Insurer who issued the coverage in question and is the recipient of the request.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The Insurer who issued the coverage in question and is the recipient of the request.', + }, + facility: { + type: new GraphQLUnionType({ + name: 'CoverageEligibilityRequestfacility_facility_Union', + description: 'Facility where the services are intended to be provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Facility where the services are intended to be provided.', + }, + supportingInfo: { + type: new GraphQLList( + require('./coverageeligibilityrequestsupportinginfo.schema.js'), + ), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.', + }, + insurance: { + type: new GraphQLList( + require('./coverageeligibilityrequestinsurance.schema.js'), + ), + description: + 'Financial instruments for reimbursement for the health care products and services.', + }, + item: { + type: new GraphQLList( + require('./coverageeligibilityrequestitem.schema.js'), + ), + description: + 'Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityrequestinsurance.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityrequestinsurance.schema.js new file mode 100644 index 00000000..adf17150 --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityrequestinsurance.schema.js @@ -0,0 +1,76 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoverageEligibilityRequestinsurance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityRequestinsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _focal: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.', + }, + focal: { + type: GraphQLBoolean, + description: + 'A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CoverageEligibilityRequestinsurancecoverage_coverage_Union', + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _businessArrangement: { + type: require('./element.schema.js'), + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + businessArrangement: { + type: GraphQLString, + description: + 'A business agreement number established between the provider and the insurer for special business processing purposes.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityrequestitem.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityrequestitem.schema.js new file mode 100644 index 00000000..a8c84a9d --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityrequestitem.schema.js @@ -0,0 +1,135 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityRequestitem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityRequestitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _supportingInfoSequence: { + type: require('./element.schema.js'), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product line.', + }, + supportingInfoSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product line.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: require('./codeableconcept.schema.js'), + description: + 'This contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'CoverageEligibilityRequestitemprovider_provider_Union', + description: + 'The practitioner who is responsible for the product or service to be rendered to the patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the product or service to be rendered to the patient.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'The amount charged to the patient by the provider for a single unit.', + }, + facility: { + type: new GraphQLUnionType({ + name: 'CoverageEligibilityRequestitemfacility_facility_Union', + description: 'Facility where the services will be provided.', + types: () => [ + require('./location.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Facility where the services will be provided.', + }, + diagnosis: { + type: new GraphQLList( + require('./coverageeligibilityrequestitemdiagnosis.schema.js'), + ), + description: 'Patient diagnosis for which care is sought.', + }, + detail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'CoverageEligibilityRequestitemdetail_detail_Union', + description: + 'The plan/proposal/order describing the proposed service in detail.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The plan/proposal/order describing the proposed service in detail.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityrequestitemdiagnosis.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityrequestitemdiagnosis.schema.js new file mode 100644 index 00000000..19ae6fac --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityrequestitemdiagnosis.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoverageEligibilityRequestitemdiagnosis Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityRequestitemdiagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + diagnosisCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + diagnosisReference: { + type: new GraphQLUnionType({ + name: + 'CoverageEligibilityRequestitemdiagnosisdiagnosisReference_diagnosisReference_Union', + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityrequestsupportinginfo.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityrequestsupportinginfo.schema.js new file mode 100644 index 00000000..889fbe29 --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityrequestsupportinginfo.schema.js @@ -0,0 +1,78 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityRequestsupportingInfo Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityRequestsupportingInfo', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'A number to uniquely identify supporting information entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify supporting information entries.', + }, + information: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'CoverageEligibilityRequestsupportingInfoinformation_information_Union', + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + _appliesToAll: { + type: require('./element.schema.js'), + description: + 'The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.', + }, + appliesToAll: { + type: GraphQLBoolean, + description: + 'The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityresponse.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityresponse.schema.js new file mode 100644 index 00000000..c9e92860 --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityresponse.schema.js @@ -0,0 +1,254 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityResponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityResponse', + description: + 'This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'CoverageEligibilityResponse_Enum_schema', + values: { + CoverageEligibilityResponse: { + value: 'CoverageEligibilityResponse', + }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A unique identifier assigned to this coverage eligiblity request.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", + }, + purpose: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CoverageEligibilityResponsepatient_patient_Union', + description: + 'The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the enclosed suite of services were performed or completed.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + requestor: { + type: new GraphQLUnionType({ + name: 'CoverageEligibilityResponserequestor_requestor_Union', + description: 'The provider which is responsible for the request.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The provider which is responsible for the request.', + }, + request: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CoverageEligibilityResponserequest_request_Union', + description: 'Reference to the original request resource.', + types: () => [require('./coverageeligibilityrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CoverageEligibilityRequest') { + return require('./coverageeligibilityrequest.schema.js'); + } + }, + }), + ), + description: 'Reference to the original request resource.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'The outcome of the request processing.', + }, + outcome: { + type: new GraphQLNonNull(CodeScalar), + description: 'The outcome of the request processing.', + }, + _disposition: { + type: require('./element.schema.js'), + description: + 'A human readable description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: + 'A human readable description of the status of the adjudication.', + }, + insurer: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CoverageEligibilityResponseinsurer_insurer_Union', + description: + 'The Insurer who issued the coverage in question and is the author of the response.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The Insurer who issued the coverage in question and is the author of the response.', + }, + insurance: { + type: new GraphQLList( + require('./coverageeligibilityresponseinsurance.schema.js'), + ), + description: + 'Financial instruments for reimbursement for the health care products and services.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.', + }, + preAuthRef: { + type: GraphQLString, + description: + 'A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.', + }, + form: { + type: require('./codeableconcept.schema.js'), + description: 'A code for the form to be used for printing the content.', + }, + error: { + type: new GraphQLList( + require('./coverageeligibilityresponseerror.schema.js'), + ), + description: 'Errors encountered during the processing of the request.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityresponseerror.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityresponseerror.schema.js new file mode 100644 index 00000000..5ae312c7 --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityresponseerror.schema.js @@ -0,0 +1,42 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoverageEligibilityResponseerror Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityResponseerror', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'An error code,from a specified code system, which details why the eligibility check could not be performed.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityresponseinsurance.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityresponseinsurance.schema.js new file mode 100644 index 00000000..43c8db5e --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityresponseinsurance.schema.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary CoverageEligibilityResponseinsurance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityResponseinsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'CoverageEligibilityResponseinsurancecoverage_coverage_Union', + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _inforce: { + type: require('./element.schema.js'), + description: + 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', + }, + inforce: { + type: GraphQLBoolean, + description: + 'Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.', + }, + benefitPeriod: { + type: require('./period.schema.js'), + description: 'The term of the benefits documented in this response.', + }, + item: { + type: new GraphQLList( + require('./coverageeligibilityresponseinsuranceitem.schema.js'), + ), + description: + 'Benefits and optionally current balances, and authorization details by category or service.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityresponseinsuranceitem.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityresponseinsuranceitem.schema.js new file mode 100644 index 00000000..4247ee2c --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityresponseinsuranceitem.schema.js @@ -0,0 +1,147 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityResponseinsuranceitem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityResponseinsuranceitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: require('./codeableconcept.schema.js'), + description: + 'This contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'CoverageEligibilityResponseinsuranceitemprovider_provider_Union', + description: + 'The practitioner who is eligible for the provision of the product or service.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'The practitioner who is eligible for the provision of the product or service.', + }, + _excluded: { + type: require('./element.schema.js'), + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.', + }, + excluded: { + type: GraphQLBoolean, + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A short name or tag for the benefit.', + }, + name: { + type: GraphQLString, + description: 'A short name or tag for the benefit.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A richer description of the benefit or services covered.', + }, + description: { + type: GraphQLString, + description: 'A richer description of the benefit or services covered.', + }, + network: { + type: require('./codeableconcept.schema.js'), + description: + 'Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.', + }, + unit: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates if the benefits apply to an individual or to the family.', + }, + term: { + type: require('./codeableconcept.schema.js'), + description: + "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", + }, + benefit: { + type: new GraphQLList( + require('./coverageeligibilityresponseinsuranceitembenefit.schema.js'), + ), + description: 'Benefits used to date.', + }, + _authorizationRequired: { + type: require('./element.schema.js'), + description: + 'A boolean flag indicating whether a preauthorization is required prior to actual service delivery.', + }, + authorizationRequired: { + type: GraphQLBoolean, + description: + 'A boolean flag indicating whether a preauthorization is required prior to actual service delivery.', + }, + authorizationSupporting: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Codes or comments regarding information or actions associated with the preauthorization.', + }, + _authorizationUrl: { + type: require('./element.schema.js'), + description: + 'A web location for obtaining requirements or descriptive information regarding the preauthorization.', + }, + authorizationUrl: { + type: UriScalar, + description: + 'A web location for obtaining requirements or descriptive information regarding the preauthorization.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/coverageeligibilityresponseinsuranceitembenefit.schema.js b/src/resources/4_0_0/schemas/coverageeligibilityresponseinsuranceitembenefit.schema.js new file mode 100644 index 00000000..c254037a --- /dev/null +++ b/src/resources/4_0_0/schemas/coverageeligibilityresponseinsuranceitembenefit.schema.js @@ -0,0 +1,92 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary CoverageEligibilityResponseinsuranceitembenefit Schema + */ +module.exports = new GraphQLObjectType({ + name: 'CoverageEligibilityResponseinsuranceitembenefit', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Classification of benefit being provided.', + }, + _allowedUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + _allowedString: { + type: require('./element.schema.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedString: { + type: GraphQLString, + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedMoney: { + type: require('./money.schema.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + _usedUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The quantity of the benefit which have been consumed to date.', + }, + _usedString: { + type: require('./element.schema.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedString: { + type: GraphQLString, + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedMoney: { + type: require('./money.schema.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/datarequirement.schema.js b/src/resources/4_0_0/schemas/datarequirement.schema.js new file mode 100644 index 00000000..4a83aacf --- /dev/null +++ b/src/resources/4_0_0/schemas/datarequirement.schema.js @@ -0,0 +1,111 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary DataRequirement Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DataRequirement', + description: + 'Base StructureDefinition for DataRequirement Type: Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'The profile of the required data, specified as the uri of the profile definition.', + }, + profile: { + type: new GraphQLList(CanonicalScalar), + description: + 'The profile of the required data, specified as the uri of the profile definition.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: 'DataRequirementsubjectReference_subjectReference_Union', + description: + 'The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The intended subjects of the data requirement. If this element is not provided, a Patient subject is assumed.', + }, + _mustSupport: { + type: require('./element.schema.js'), + description: + 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. The value of mustSupport SHALL be a FHIRPath resolveable on the type of the DataRequirement. The path SHALL consist only of identifiers, constant indexers, and .resolve() (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + mustSupport: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. The value of mustSupport SHALL be a FHIRPath resolveable on the type of the DataRequirement. The path SHALL consist only of identifiers, constant indexers, and .resolve() (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + codeFilter: { + type: new GraphQLList(require('./element.schema.js')), + description: + "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. Each code filter defines an additional constraint on the data, i.e. code filters are AND'ed, not OR'ed.", + }, + dateFilter: { + type: new GraphQLList(require('./element.schema.js')), + description: + "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. Each date filter specifies an additional constraint on the data, i.e. date filters are AND'ed, not OR'ed.", + }, + _limit: { + type: require('./element.schema.js'), + description: + 'Specifies a maximum number of results that are required (uses the _count search parameter).', + }, + limit: { + type: PositiveIntScalar, + description: + 'Specifies a maximum number of results that are required (uses the _count search parameter).', + }, + sort: { + type: new GraphQLList(require('./element.schema.js')), + description: 'Specifies the order of the results to be returned.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/datarequirementcodefilter.schema.js b/src/resources/4_0_0/schemas/datarequirementcodefilter.schema.js new file mode 100644 index 00000000..aa7d0493 --- /dev/null +++ b/src/resources/4_0_0/schemas/datarequirementcodefilter.schema.js @@ -0,0 +1,63 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary DataRequirementcodeFilter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DataRequirementcodeFilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', + }, + path: { + type: GraphQLString, + description: + 'The code-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.', + }, + _searchParam: { + type: require('./element.schema.js'), + description: + 'A token parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type code, Coding, or CodeableConcept.', + }, + searchParam: { + type: GraphQLString, + description: + 'A token parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type code, Coding, or CodeableConcept.', + }, + _valueSet: { + type: require('./element.schema.js'), + description: + 'The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + valueSet: { + type: CanonicalScalar, + description: + 'The valueset for the code filter. The valueSet and code elements are additive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.', + }, + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'The codes for the code filter. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. If codes are specified in addition to a value set, the filter returns items matching a code in the value set or one of the specified codes.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/datarequirementdatefilter.schema.js b/src/resources/4_0_0/schemas/datarequirementdatefilter.schema.js new file mode 100644 index 00000000..e231ccda --- /dev/null +++ b/src/resources/4_0_0/schemas/datarequirementdatefilter.schema.js @@ -0,0 +1,68 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DataRequirementdateFilter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DataRequirementdateFilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing.', + }, + path: { + type: GraphQLString, + description: + 'The date-valued attribute of the filter. The specified path SHALL be a FHIRPath resolveable on the specified type of the DataRequirement, and SHALL consist only of identifiers, constant indexers, and .resolve(). The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details). Note that the index must be an integer constant. The path must resolve to an element of type date, dateTime, Period, Schedule, or Timing.', + }, + _searchParam: { + type: require('./element.schema.js'), + description: + 'A date parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type date, dateTime, Period, Schedule, or Timing.', + }, + searchParam: { + type: GraphQLString, + description: + 'A date parameter that refers to a search parameter defined on the specified type of the DataRequirement, and which searches on elements of type date, dateTime, Period, Schedule, or Timing.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.', + }, + valueDuration: { + type: require('./duration.schema.js'), + description: + 'The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. If a Duration is specified, the filter will return only those data items that fall within Duration before now.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/datarequirementsort.schema.js b/src/resources/4_0_0/schemas/datarequirementsort.schema.js new file mode 100644 index 00000000..0456ac81 --- /dev/null +++ b/src/resources/4_0_0/schemas/datarequirementsort.schema.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DataRequirementsort Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DataRequirementsort', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The attribute of the sort. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant.', + }, + _direction: { + type: require('./element.schema.js'), + description: 'The direction of the sort, ascending or descending.', + }, + direction: { + type: new GraphQLNonNull(CodeScalar), + description: 'The direction of the sort, ascending or descending.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/detectedissue.schema.js b/src/resources/4_0_0/schemas/detectedissue.schema.js new file mode 100644 index 00000000..3cca64f6 --- /dev/null +++ b/src/resources/4_0_0/schemas/detectedissue.schema.js @@ -0,0 +1,213 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DetectedIssue Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DetectedIssue', + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DetectedIssue_Enum_schema', + values: { DetectedIssue: { value: 'DetectedIssue' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifier associated with the detected issue record.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the status of the detected issue.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the status of the detected issue.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'Identifies the general type of issue identified.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + severity: { + type: CodeScalar, + description: + 'Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'DetectedIssuepatient_patient_Union', + description: + 'Indicates the patient whose record the detected issue is associated with.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'Indicates the patient whose record the detected issue is associated with.', + }, + _identifiedDateTime: { + type: require('./element.schema.js'), + description: + 'The date or period when the detected issue was initially identified.', + }, + identifiedDateTime: { + type: DateTimeScalar, + description: + 'The date or period when the detected issue was initially identified.', + }, + identifiedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or period when the detected issue was initially identified.', + }, + author: { + type: new GraphQLUnionType({ + name: 'DetectedIssueauthor_author_Union', + description: + 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Individual or device responsible for the issue being raised. For example, a decision support application or a pharmacist conducting a medication review.', + }, + implicated: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DetectedIssueimplicated_implicated_Union', + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Indicates the resource representing the current activity or proposed activity that is potentially problematic.', + }, + evidence: { + type: new GraphQLList(require('./detectedissueevidence.schema.js')), + description: + 'Supporting evidence or manifestations that provide the basis for identifying the detected issue such as a GuidanceResponse or MeasureReport.', + }, + _detail: { + type: require('./element.schema.js'), + description: 'A textual explanation of the detected issue.', + }, + detail: { + type: GraphQLString, + description: 'A textual explanation of the detected issue.', + }, + _reference: { + type: require('./element.schema.js'), + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + reference: { + type: UriScalar, + description: + 'The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.', + }, + mitigation: { + type: new GraphQLList(require('./detectedissuemitigation.schema.js')), + description: + 'Indicates an action that has been taken or is committed to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/detectedissueevidence.schema.js b/src/resources/4_0_0/schemas/detectedissueevidence.schema.js new file mode 100644 index 00000000..4024606a --- /dev/null +++ b/src/resources/4_0_0/schemas/detectedissueevidence.schema.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DetectedIssueevidence Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DetectedIssueevidence', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A manifestation that led to the recording of this detected issue.', + }, + detail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DetectedIssueevidencedetail_detail_Union', + description: + 'Links to resources that constitute evidence for the detected issue such as a GuidanceResponse or MeasureReport.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Links to resources that constitute evidence for the detected issue such as a GuidanceResponse or MeasureReport.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/detectedissuemitigation.schema.js b/src/resources/4_0_0/schemas/detectedissuemitigation.schema.js new file mode 100644 index 00000000..e4cc8a85 --- /dev/null +++ b/src/resources/4_0_0/schemas/detectedissuemitigation.schema.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DetectedIssuemitigation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DetectedIssuemitigation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Indicates when the mitigating action was documented.', + }, + date: { + type: DateTimeScalar, + description: 'Indicates when the mitigating action was documented.', + }, + author: { + type: new GraphQLUnionType({ + name: 'DetectedIssuemitigationauthor_author_Union', + description: + 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/device.schema.js b/src/resources/4_0_0/schemas/device.schema.js new file mode 100644 index 00000000..2223c16a --- /dev/null +++ b/src/resources/4_0_0/schemas/device.schema.js @@ -0,0 +1,295 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Device Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Device', + description: + 'A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Device_Enum_schema', + values: { Device: { value: 'Device' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Unique instance identifiers assigned to a device by manufacturers other organizations or owners.', + }, + definition: { + type: new GraphQLUnionType({ + name: 'Devicedefinition_definition_Union', + description: 'The reference to the definition for the device.', + types: () => [require('./devicedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DeviceDefinition') { + return require('./devicedefinition.schema.js'); + } + }, + }), + description: 'The reference to the definition for the device.', + }, + udiCarrier: { + type: new GraphQLList(require('./deviceudicarrier.schema.js')), + description: + 'Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Status of the Device availability.', + }, + status: { + type: CodeScalar, + description: 'Status of the Device availability.', + }, + statusReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason for the dtatus of the Device availability.', + }, + _distinctIdentifier: { + type: require('./element.schema.js'), + description: + 'The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.', + }, + distinctIdentifier: { + type: GraphQLString, + description: + 'The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product.', + }, + _manufacturer: { + type: require('./element.schema.js'), + description: 'A name of the manufacturer.', + }, + manufacturer: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + _manufactureDate: { + type: require('./element.schema.js'), + description: 'The date and time when the device was manufactured.', + }, + manufactureDate: { + type: DateTimeScalar, + description: 'The date and time when the device was manufactured.', + }, + _expirationDate: { + type: require('./element.schema.js'), + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + expirationDate: { + type: DateTimeScalar, + description: + 'The date and time beyond which this device is no longer valid or should not be used (if applicable).', + }, + _lotNumber: { + type: require('./element.schema.js'), + description: 'Lot number assigned by the manufacturer.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number assigned by the manufacturer.', + }, + _serialNumber: { + type: require('./element.schema.js'), + description: + 'The serial number assigned by the organization when the device was manufactured.', + }, + serialNumber: { + type: GraphQLString, + description: + 'The serial number assigned by the organization when the device was manufactured.', + }, + deviceName: { + type: new GraphQLList(require('./devicedevicename.schema.js')), + description: + "This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device. This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.", + }, + _modelNumber: { + type: require('./element.schema.js'), + description: 'The model number for the device.', + }, + modelNumber: { + type: GraphQLString, + description: 'The model number for the device.', + }, + _partNumber: { + type: require('./element.schema.js'), + description: 'The part number of the device.', + }, + partNumber: { + type: GraphQLString, + description: 'The part number of the device.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'The kind or type of device.', + }, + specialization: { + type: new GraphQLList(require('./devicespecialization.schema.js')), + description: + 'The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.', + }, + version: { + type: new GraphQLList(require('./deviceversion.schema.js')), + description: + 'The actual design of the device or software version running on the device.', + }, + property: { + type: new GraphQLList(require('./deviceproperty.schema.js')), + description: + 'The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'Devicepatient_patient_Union', + description: + 'Patient information, If the device is affixed to a person.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Patient information, If the device is affixed to a person.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'Deviceowner_owner_Union', + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for an organization or a particular human that is responsible for the device.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Devicelocation_location_Union', + description: 'The place where the device can be found.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The place where the device can be found.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'A network address on which the device may be contacted directly.', + }, + url: { + type: UriScalar, + description: + 'A network address on which the device may be contacted directly.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Descriptive information, usage information or implantation information that is not captured in an existing element.', + }, + safety: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Provides additional safety characteristics about a medical device. For example devices containing latex.', + }, + parent: { + type: new GraphQLUnionType({ + name: 'Deviceparent_parent_Union', + description: 'The parent device.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: 'The parent device.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicedefinition.schema.js b/src/resources/4_0_0/schemas/devicedefinition.schema.js new file mode 100644 index 00000000..f4e71c18 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicedefinition.schema.js @@ -0,0 +1,244 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DeviceDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceDefinition', + description: + 'The characteristics, operational status and capabilities of a medical-related component of a medical device.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceDefinition_Enum_schema', + values: { DeviceDefinition: { value: 'DeviceDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID.', + }, + udiDeviceIdentifier: { + type: new GraphQLList( + require('./devicedefinitionudideviceidentifier.schema.js'), + ), + description: + 'Unique device identifier (UDI) assigned to device label or package. Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.', + }, + _manufacturerString: { + type: require('./element.schema.js'), + description: 'A name of the manufacturer.', + }, + manufacturerString: { + type: GraphQLString, + description: 'A name of the manufacturer.', + }, + manufacturerReference: { + type: new GraphQLUnionType({ + name: + 'DeviceDefinitionmanufacturerReference_manufacturerReference_Union', + description: 'A name of the manufacturer.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'A name of the manufacturer.', + }, + deviceName: { + type: new GraphQLList(require('./devicedefinitiondevicename.schema.js')), + description: 'A name given to the device to identify it.', + }, + _modelNumber: { + type: require('./element.schema.js'), + description: 'The model number for the device.', + }, + modelNumber: { + type: GraphQLString, + description: 'The model number for the device.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'What kind of device or device system this is.', + }, + specialization: { + type: new GraphQLList( + require('./devicedefinitionspecialization.schema.js'), + ), + description: + 'The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The available versions of the device, e.g., software versions.', + }, + version: { + type: new GraphQLList(GraphQLString), + description: + 'The available versions of the device, e.g., software versions.', + }, + safety: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Safety characteristics of the device.', + }, + shelfLifeStorage: { + type: new GraphQLList(require('./productshelflife.schema.js')), + description: 'Shelf Life and storage information.', + }, + physicalCharacteristics: { + type: require('./prodcharacteristic.schema.js'), + description: 'Dimensions, color etc.', + }, + languageCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Language code for the human-readable text strings produced by the device (all supported).', + }, + capability: { + type: new GraphQLList(require('./devicedefinitioncapability.schema.js')), + description: 'Device capabilities.', + }, + property: { + type: new GraphQLList(require('./devicedefinitionproperty.schema.js')), + description: + 'The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'DeviceDefinitionowner_owner_Union', + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'An organization that is responsible for the provision and ongoing maintenance of the device.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for an organization or a particular human that is responsible for the device.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'A network address on which the device may be contacted directly.', + }, + url: { + type: UriScalar, + description: + 'A network address on which the device may be contacted directly.', + }, + _onlineInformation: { + type: require('./element.schema.js'), + description: 'Access to on-line information about the device.', + }, + onlineInformation: { + type: UriScalar, + description: 'Access to on-line information about the device.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Descriptive information, usage information or implantation information that is not captured in an existing element.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product).', + }, + parentDevice: { + type: new GraphQLUnionType({ + name: 'DeviceDefinitionparentDevice_parentDevice_Union', + description: 'The parent device it can be part of.', + types: () => [require('./devicedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DeviceDefinition') { + return require('./devicedefinition.schema.js'); + } + }, + }), + description: 'The parent device it can be part of.', + }, + material: { + type: new GraphQLList(require('./devicedefinitionmaterial.schema.js')), + description: + 'A substance used to create the material(s) of which the device is made.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicedefinitioncapability.schema.js b/src/resources/4_0_0/schemas/devicedefinitioncapability.schema.js new file mode 100644 index 00000000..2856fb3c --- /dev/null +++ b/src/resources/4_0_0/schemas/devicedefinitioncapability.schema.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceDefinitioncapability Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceDefinitioncapability', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Type of capability.', + }, + description: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Description of capability.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicedefinitiondevicename.schema.js b/src/resources/4_0_0/schemas/devicedefinitiondevicename.schema.js new file mode 100644 index 00000000..028e55f9 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicedefinitiondevicename.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DeviceDefinitiondeviceName Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceDefinitiondeviceName', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of the device.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the device.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicedefinitionmaterial.schema.js b/src/resources/4_0_0/schemas/devicedefinitionmaterial.schema.js new file mode 100644 index 00000000..a91860f0 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicedefinitionmaterial.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceDefinitionmaterial Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceDefinitionmaterial', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + substance: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The substance.', + }, + _alternate: { + type: require('./element.schema.js'), + description: 'Indicates an alternative material of the device.', + }, + alternate: { + type: GraphQLBoolean, + description: 'Indicates an alternative material of the device.', + }, + _allergenicIndicator: { + type: require('./element.schema.js'), + description: 'Whether the substance is a known or suspected allergen.', + }, + allergenicIndicator: { + type: GraphQLBoolean, + description: 'Whether the substance is a known or suspected allergen.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicedefinitionproperty.schema.js b/src/resources/4_0_0/schemas/devicedefinitionproperty.schema.js new file mode 100644 index 00000000..eaedbe45 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicedefinitionproperty.schema.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceDefinitionproperty Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceDefinitionproperty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Code that specifies the property DeviceDefinitionPropetyCode (Extensible).', + }, + valueQuantity: { + type: new GraphQLList(require('./quantity.schema.js')), + description: 'Property value as a quantity.', + }, + valueCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Property value as a code, e.g., NTP4 (synced to NTP).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicedefinitionspecialization.schema.js b/src/resources/4_0_0/schemas/devicedefinitionspecialization.schema.js new file mode 100644 index 00000000..9036bda1 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicedefinitionspecialization.schema.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceDefinitionspecialization Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceDefinitionspecialization', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _systemType: { + type: require('./element.schema.js'), + description: 'The standard that is used to operate and communicate.', + }, + systemType: { + type: new GraphQLNonNull(GraphQLString), + description: 'The standard that is used to operate and communicate.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the standard that is used to operate and communicate.', + }, + version: { + type: GraphQLString, + description: + 'The version of the standard that is used to operate and communicate.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicedefinitionudideviceidentifier.schema.js b/src/resources/4_0_0/schemas/devicedefinitionudideviceidentifier.schema.js new file mode 100644 index 00000000..642d18d1 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicedefinitionudideviceidentifier.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary DeviceDefinitionudiDeviceIdentifier Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceDefinitionudiDeviceIdentifier', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _deviceIdentifier: { + type: require('./element.schema.js'), + description: + 'The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.', + }, + deviceIdentifier: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.', + }, + _issuer: { + type: require('./element.schema.js'), + description: 'The organization that assigns the identifier algorithm.', + }, + issuer: { + type: new GraphQLNonNull(UriScalar), + description: 'The organization that assigns the identifier algorithm.', + }, + _jurisdiction: { + type: require('./element.schema.js'), + description: 'The jurisdiction to which the deviceIdentifier applies.', + }, + jurisdiction: { + type: new GraphQLNonNull(UriScalar), + description: 'The jurisdiction to which the deviceIdentifier applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicedevicename.schema.js b/src/resources/4_0_0/schemas/devicedevicename.schema.js new file mode 100644 index 00000000..26a3c45a --- /dev/null +++ b/src/resources/4_0_0/schemas/devicedevicename.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DevicedeviceName Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DevicedeviceName', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of the device.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The name of the device.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of deviceName. UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicemetric.schema.js b/src/resources/4_0_0/schemas/devicemetric.schema.js new file mode 100644 index 00000000..68ae6b68 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicemetric.schema.js @@ -0,0 +1,169 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DeviceMetric Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceMetric', + description: + 'Describes a measurement, calculation or setting capability of a medical device.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceMetric_Enum_schema', + values: { DeviceMetric: { value: 'DeviceMetric' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc.', + }, + unit: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc.', + }, + source: { + type: new GraphQLUnionType({ + name: 'DeviceMetricsource_source_Union', + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc.', + }, + parent: { + type: new GraphQLUnionType({ + name: 'DeviceMetricparent_parent_Union', + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a Device that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Describes the link to the Device that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a Device that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location.', + }, + _operationalStatus: { + type: require('./element.schema.js'), + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + operationalStatus: { + type: CodeScalar, + description: + 'Indicates current operational state of the device. For example: On, Off, Standby, etc.', + }, + _color: { + type: require('./element.schema.js'), + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + color: { + type: CodeScalar, + description: + 'Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta.', + }, + _category: { + type: require('./element.schema.js'), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + category: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation.', + }, + measurementPeriod: { + type: require('./timing.schema.js'), + description: + 'Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured.', + }, + calibration: { + type: new GraphQLList(require('./devicemetriccalibration.schema.js')), + description: + 'Describes the calibrations that have been performed or that are required to be performed.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicemetriccalibration.schema.js b/src/resources/4_0_0/schemas/devicemetriccalibration.schema.js new file mode 100644 index 00000000..ea0f7b10 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicemetriccalibration.schema.js @@ -0,0 +1,58 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary DeviceMetriccalibration Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceMetriccalibration', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'Describes the type of the calibration method.', + }, + type: { + type: CodeScalar, + description: 'Describes the type of the calibration method.', + }, + _state: { + type: require('./element.schema.js'), + description: 'Describes the state of the calibration.', + }, + state: { + type: CodeScalar, + description: 'Describes the state of the calibration.', + }, + _time: { + type: require('./element.schema.js'), + description: 'Describes the time last calibration has been performed.', + }, + time: { + type: InstantScalar, + description: 'Describes the time last calibration has been performed.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/deviceproperty.schema.js b/src/resources/4_0_0/schemas/deviceproperty.schema.js new file mode 100644 index 00000000..d89ff119 --- /dev/null +++ b/src/resources/4_0_0/schemas/deviceproperty.schema.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Deviceproperty Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Deviceproperty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Code that specifies the property DeviceDefinitionPropetyCode (Extensible).', + }, + valueQuantity: { + type: new GraphQLList(require('./quantity.schema.js')), + description: 'Property value as a quantity.', + }, + valueCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Property value as a code, e.g., NTP4 (synced to NTP).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicerequest.schema.js b/src/resources/4_0_0/schemas/devicerequest.schema.js new file mode 100644 index 00000000..7e6337e1 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicerequest.schema.js @@ -0,0 +1,441 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DeviceRequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceRequest', + description: + 'Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceRequest_Enum_schema', + values: { DeviceRequest: { value: 'DeviceRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this order by the orderer or by the receiver.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestbasedOn_basedOn_Union', + description: 'Plan/proposal/order fulfilled by this request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Plan/proposal/order fulfilled by this request.', + }, + priorRequest: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestpriorRequest_priorRequest_Union', + description: + 'The request takes the place of the referenced completed or terminated request(s).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The request takes the place of the referenced completed or terminated request(s).', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: 'Composite request this is part of.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the request.', + }, + status: { + type: CodeScalar, + description: 'The status of the request.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the {{title}} should be addressed with respect to other requests.', + }, + codeReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceRequestcodeReference_codeReference_Union', + description: 'The details of the device to be used.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The details of the device to be used.', + }, + codeCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The details of the device to be used.', + }, + parameter: { + type: new GraphQLList(require('./devicerequestparameter.schema.js')), + description: + 'Specific parameters for the ordered item. For example, the prism value for lenses.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceRequestsubject_subject_Union', + description: 'The patient who will use the device.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The patient who will use the device.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'DeviceRequestencounter_encounter_Union', + description: + 'An encounter that provides additional context in which this request is made.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'An encounter that provides additional context in which this request is made.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: + "The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. 'Every 8 hours'; 'Three times a day'; '1/2 an hour before breakfast for 10 days from 23-Dec 2011:'; '15 Oct 2013, 17 Oct 2013 and 1 Nov 2013'.", + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'When the request transitioned to being actionable.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request transitioned to being actionable.', + }, + requester: { + type: new GraphQLUnionType({ + name: 'DeviceRequestrequester_requester_Union', + description: + 'The individual who initiated the request and has responsibility for its activation.', + types: () => [ + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + performerType: { + type: require('./codeableconcept.schema.js'), + description: + 'Desired type of performer for doing the diagnostic testing.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'DeviceRequestperformer_performer_Union', + description: 'The desired performer for doing the diagnostic testing.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + require('./healthcareservice.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The desired performer for doing the diagnostic testing.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason or justification for the use of this device.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestreasonReference_reasonReference_Union', + description: 'Reason or justification for the use of this device.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Reason or justification for the use of this device.', + }, + insurance: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestinsurance_insurance_Union', + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.', + types: () => [ + require('./coverage.schema.js'), + require('./claimresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + ), + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestsupportingInfo_supportingInfo_Union', + description: + "Additional clinical information about the patient that may influence the request fulfilment. For example, this may include where on the subject's body the device will be used (i.e. the target site).", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Additional clinical information about the patient that may influence the request fulfilment. For example, this may include where on the subject's body the device will be used (i.e. the target site).", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + relevantHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceRequestrelevantHistory_relevantHistory_Union', + description: 'Key events in the history of the request.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: 'Key events in the history of the request.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicerequestparameter.schema.js b/src/resources/4_0_0/schemas/devicerequestparameter.schema.js new file mode 100644 index 00000000..a619248e --- /dev/null +++ b/src/resources/4_0_0/schemas/devicerequestparameter.schema.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DeviceRequestparameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceRequestparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code or string that identifies the device detail being asserted.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'The value of the device detail.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: 'The value of the device detail.', + }, + valueRange: { + type: require('./range.schema.js'), + description: 'The value of the device detail.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the device detail.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the device detail.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/devicespecialization.schema.js b/src/resources/4_0_0/schemas/devicespecialization.schema.js new file mode 100644 index 00000000..276eba62 --- /dev/null +++ b/src/resources/4_0_0/schemas/devicespecialization.schema.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Devicespecialization Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Devicespecialization', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + systemType: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The standard that is used to operate and communicate.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the standard that is used to operate and communicate.', + }, + version: { + type: GraphQLString, + description: + 'The version of the standard that is used to operate and communicate.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/deviceudicarrier.schema.js b/src/resources/4_0_0/schemas/deviceudicarrier.schema.js new file mode 100644 index 00000000..1dced7a2 --- /dev/null +++ b/src/resources/4_0_0/schemas/deviceudicarrier.schema.js @@ -0,0 +1,93 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DeviceudiCarrier Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceudiCarrier', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _deviceIdentifier: { + type: require('./element.schema.js'), + description: + 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', + }, + deviceIdentifier: { + type: GraphQLString, + description: + 'The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.', + }, + _issuer: { + type: require('./element.schema.js'), + description: + 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', + }, + issuer: { + type: UriScalar, + description: + 'Organization that is charged with issuing UDIs for devices. For example, the US FDA issuers include : 1) GS1: http://hl7.org/fhir/NamingSystem/gs1-di, 2) HIBCC: http://hl7.org/fhir/NamingSystem/hibcc-dI, 3) ICCBBA for blood containers: http://hl7.org/fhir/NamingSystem/iccbba-blood-di, 4) ICCBA for other devices: http://hl7.org/fhir/NamingSystem/iccbba-other-di.', + }, + _jurisdiction: { + type: require('./element.schema.js'), + description: + 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', + }, + jurisdiction: { + type: UriScalar, + description: + 'The identity of the authoritative source for UDI generation within a jurisdiction. All UDIs are globally unique within a single namespace with the appropriate repository uri as the system. For example, UDIs of devices managed in the U.S. by the FDA, the value is http://hl7.org/fhir/NamingSystem/fda-udi.', + }, + _carrierAIDC: { + type: require('./element.schema.js'), + description: + 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', + }, + carrierAIDC: { + type: Base64BinaryScalar, + description: + 'The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID. Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.', + }, + _carrierHRF: { + type: require('./element.schema.js'), + description: + 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', + }, + carrierHRF: { + type: GraphQLString, + description: + 'The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.', + }, + _entryType: { + type: require('./element.schema.js'), + description: 'A coded entry to indicate how the data was entered.', + }, + entryType: { + type: CodeScalar, + description: 'A coded entry to indicate how the data was entered.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/deviceusestatement.schema.js b/src/resources/4_0_0/schemas/deviceusestatement.schema.js new file mode 100644 index 00000000..b647ac0b --- /dev/null +++ b/src/resources/4_0_0/schemas/deviceusestatement.schema.js @@ -0,0 +1,291 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DeviceUseStatement Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DeviceUseStatement', + description: + 'A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DeviceUseStatement_Enum_schema', + values: { DeviceUseStatement: { value: 'DeviceUseStatement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'An external identifier for this statement such as an IRI.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceUseStatementbasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this DeviceUseStatement.', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this DeviceUseStatement.', + }, + _status: { + type: require('./element.schema.js'), + description: + "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the device used that this statement is about. Generally this will be active or completed.", + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceUseStatementsubject_subject_Union', + description: 'The patient who used the device.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: 'The patient who used the device.', + }, + derivedFrom: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceUseStatementderivedFrom_derivedFrom_Union', + description: + 'Allows linking the DeviceUseStatement to the underlying Request, or to other information that supports or is used to derive the DeviceUseStatement.', + types: () => [ + require('./servicerequest.schema.js'), + require('./procedure.schema.js'), + require('./claim.schema.js'), + require('./observation.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Allows linking the DeviceUseStatement to the underlying Request, or to other information that supports or is used to derive the DeviceUseStatement.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: 'How often the device was used.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: 'How often the device was used.', + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: 'How often the device was used.', + }, + timingDateTime: { + type: DateTimeScalar, + description: 'How often the device was used.', + }, + _recordedOn: { + type: require('./element.schema.js'), + description: 'The time at which the statement was made/recorded.', + }, + recordedOn: { + type: DateTimeScalar, + description: 'The time at which the statement was made/recorded.', + }, + source: { + type: new GraphQLUnionType({ + name: 'DeviceUseStatementsource_source_Union', + description: 'Who reported the device was being used by the patient.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Who reported the device was being used by the patient.', + }, + device: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DeviceUseStatementdevice_device_Union', + description: 'The details of the device used.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The details of the device used.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason or justification for the use of the device.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DeviceUseStatementreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies this DeviceUseStatement.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + require('./media.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies this DeviceUseStatement.', + }, + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the anotomic location on the subject's body where the device was used ( i.e. the target).", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/deviceversion.schema.js b/src/resources/4_0_0/schemas/deviceversion.schema.js new file mode 100644 index 00000000..607c58c7 --- /dev/null +++ b/src/resources/4_0_0/schemas/deviceversion.schema.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Deviceversion Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Deviceversion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'The type of the device version.', + }, + component: { + type: require('./identifier.schema.js'), + description: 'A single component of the device version.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The version text.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The version text.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/diagnosticreport.schema.js b/src/resources/4_0_0/schemas/diagnosticreport.schema.js new file mode 100644 index 00000000..889bf8c4 --- /dev/null +++ b/src/resources/4_0_0/schemas/diagnosticreport.schema.js @@ -0,0 +1,349 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary DiagnosticReport Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DiagnosticReport', + description: + 'The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DiagnosticReport_Enum_schema', + values: { DiagnosticReport: { value: 'DiagnosticReport' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this report by the performer or other systems.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportbasedOn_basedOn_Union', + description: 'Details concerning a service requested.', + types: () => [ + require('./careplan.schema.js'), + require('./immunizationrecommendation.schema.js'), + require('./medicationrequest.schema.js'), + require('./nutritionorder.schema.js'), + require('./servicerequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: 'Details concerning a service requested.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the diagnostic report.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the diagnostic report.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code or name that describes this diagnostic report.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'DiagnosticReportsubject_subject_Union', + description: + 'The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'DiagnosticReportencounter_encounter_Union', + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.', + }, + _issued: { + type: require('./element.schema.js'), + description: + 'The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportperformer_performer_Union', + description: + 'The diagnostic service that is responsible for issuing the report.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + 'The diagnostic service that is responsible for issuing the report.', + }, + resultsInterpreter: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportresultsInterpreter_resultsInterpreter_Union', + description: + "The practitioner or organization that is responsible for the report's conclusions and interpretations.", + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + "The practitioner or organization that is responsible for the report's conclusions and interpretations.", + }, + specimen: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportspecimen_specimen_Union', + description: + 'Details about the specimens on which this diagnostic report is based.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'Details about the specimens on which this diagnostic report is based.', + }, + result: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportresult_result_Union', + description: + '[Observations](observation.html) that are part of this diagnostic report.', + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + '[Observations](observation.html) that are part of this diagnostic report.', + }, + imagingStudy: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DiagnosticReportimagingStudy_imagingStudy_Union', + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + types: () => [require('./imagingstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + }, + }), + ), + description: + 'One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.', + }, + media: { + type: new GraphQLList(require('./diagnosticreportmedia.schema.js')), + description: + 'A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).', + }, + _conclusion: { + type: require('./element.schema.js'), + description: + 'Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.', + }, + conclusion: { + type: GraphQLString, + description: + 'Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.', + }, + conclusionCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.', + }, + presentedForm: { + type: new GraphQLList(require('./attachment.schema.js')), + description: + 'Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/diagnosticreportmedia.schema.js b/src/resources/4_0_0/schemas/diagnosticreportmedia.schema.js new file mode 100644 index 00000000..21629a84 --- /dev/null +++ b/src/resources/4_0_0/schemas/diagnosticreportmedia.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DiagnosticReportmedia Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DiagnosticReportmedia', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _comment: { + type: require('./element.schema.js'), + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + comment: { + type: GraphQLString, + description: + "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", + }, + link: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DiagnosticReportmedialink_link_Union', + description: 'Reference to the image source.', + types: () => [require('./media.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + }, + }), + ), + description: 'Reference to the image source.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/distance.schema.js b/src/resources/4_0_0/schemas/distance.schema.js new file mode 100644 index 00000000..572e407a --- /dev/null +++ b/src/resources/4_0_0/schemas/distance.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Distance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Distance', + description: + 'Base StructureDefinition for Distance Type: A length - a value with a unit that is a physical distance.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/documentmanifest.schema.js b/src/resources/4_0_0/schemas/documentmanifest.schema.js new file mode 100644 index 00000000..0e294da4 --- /dev/null +++ b/src/resources/4_0_0/schemas/documentmanifest.schema.js @@ -0,0 +1,266 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary DocumentManifest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DocumentManifest', + description: + 'A collection of documents compiled for a purpose together with metadata that applies to the collection.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentManifest_Enum_schema', + values: { DocumentManifest: { value: 'DocumentManifest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + masterIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Other identifiers associated with the document manifest, including version independent identifiers.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this document manifest.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document manifest.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'DocumentManifestsubject_subject_Union', + description: + 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).', + }, + _created: { + type: require('./element.schema.js'), + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + created: { + type: DateTimeScalar, + description: + 'When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentManifestauthor_author_Union', + description: + 'Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentManifestrecipient_recipient_Union', + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A patient, practitioner, or organization for which this set of documents is intended.', + }, + _source: { + type: require('./element.schema.js'), + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + source: { + type: UriScalar, + description: + 'Identifies the source system, application, or software that produced the document manifest.', + }, + _description: { + type: require('./element.schema.js'), + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + description: { + type: GraphQLString, + description: + "Human-readable description of the source document. This is sometimes known as the 'title'.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DocumentManifestcontent_content_Union', + description: + 'The list of Resources that consist of the parts of this manifest.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + ), + description: + 'The list of Resources that consist of the parts of this manifest.', + }, + related: { + type: new GraphQLList(require('./documentmanifestrelated.schema.js')), + description: + 'Related identifiers or resources associated with the DocumentManifest.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/documentmanifestrelated.schema.js b/src/resources/4_0_0/schemas/documentmanifestrelated.schema.js new file mode 100644 index 00000000..786bda1b --- /dev/null +++ b/src/resources/4_0_0/schemas/documentmanifestrelated.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DocumentManifestrelated Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DocumentManifestrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Related identifier to this DocumentManifest. For example, Order numbers, accession numbers, XDW workflow numbers.', + }, + ref: { + type: new GraphQLUnionType({ + name: 'DocumentManifestrelatedref_ref_Union', + description: + 'Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Related Resource to this DocumentManifest. For example, Order, ServiceRequest, Procedure, EligibilityRequest, etc.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/documentreference.schema.js b/src/resources/4_0_0/schemas/documentreference.schema.js new file mode 100644 index 00000000..ef1a6347 --- /dev/null +++ b/src/resources/4_0_0/schemas/documentreference.schema.js @@ -0,0 +1,267 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary DocumentReference Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DocumentReference', + description: + 'A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DocumentReference_Enum_schema', + values: { DocumentReference: { value: 'DocumentReference' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + masterIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Other identifiers associated with the document, including version independent identifiers.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of this document reference.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of this document reference.', + }, + _docStatus: { + type: require('./element.schema.js'), + description: 'The status of the underlying document.', + }, + docStatus: { + type: CodeScalar, + description: 'The status of the underlying document.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'DocumentReferencesubject_subject_Union', + description: + 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).', + }, + _date: { + type: require('./element.schema.js'), + description: 'When the document reference was created.', + }, + date: { + type: InstantScalar, + description: 'When the document reference was created.', + }, + author: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentReferenceauthor_author_Union', + description: + 'Identifies who is responsible for adding the information to the document.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./device.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'Identifies who is responsible for adding the information to the document.', + }, + authenticator: { + type: new GraphQLUnionType({ + name: 'DocumentReferenceauthenticator_authenticator_Union', + description: + 'Which person or organization authenticates that this document is valid.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Which person or organization authenticates that this document is valid.', + }, + custodian: { + type: new GraphQLUnionType({ + name: 'DocumentReferencecustodian_custodian_Union', + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.', + }, + relatesTo: { + type: new GraphQLList(require('./documentreferencerelatesto.schema.js')), + description: + 'Relationships that this document has with other document references that already exist.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Human-readable description of the source document.', + }, + description: { + type: GraphQLString, + description: 'Human-readable description of the source document.', + }, + securityLabel: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the 'reference' to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", + }, + content: { + type: new GraphQLList( + new GraphQLNonNull(require('./documentreferencecontent.schema.js')), + ), + description: + 'The document and format referenced. There may be multiple content element repetitions, each with a different format.', + }, + context: { + type: require('./documentreferencecontext.schema.js'), + description: 'The clinical context in which the document was prepared.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/documentreferencecontent.schema.js b/src/resources/4_0_0/schemas/documentreferencecontent.schema.js new file mode 100644 index 00000000..075930cc --- /dev/null +++ b/src/resources/4_0_0/schemas/documentreferencecontent.schema.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DocumentReferencecontent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DocumentReferencecontent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + attachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The document or URL of the document along with critical metadata to prove content has integrity.', + }, + format: { + type: require('./coding.schema.js'), + description: + 'An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/documentreferencecontext.schema.js b/src/resources/4_0_0/schemas/documentreferencecontext.schema.js new file mode 100644 index 00000000..52f30691 --- /dev/null +++ b/src/resources/4_0_0/schemas/documentreferencecontext.schema.js @@ -0,0 +1,112 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary DocumentReferencecontext Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DocumentReferencecontext', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + encounter: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentReferencecontextencounter_encounter_Union', + description: + 'Describes the clinical encounter or type of care that the document content is associated with.', + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + ), + description: + 'Describes the clinical encounter or type of care that the document content is associated with.', + }, + event: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a 'History and Physical Report' in which the procedure being documented is necessarily a 'History and Physical' act.", + }, + period: { + type: require('./period.schema.js'), + description: + 'The time period over which the service that is described by the document was provided.', + }, + facilityType: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of facility where the patient was seen.', + }, + practiceSetting: { + type: require('./codeableconcept.schema.js'), + description: + 'This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.', + }, + sourcePatientInfo: { + type: new GraphQLUnionType({ + name: + 'DocumentReferencecontextsourcePatientInfo_sourcePatientInfo_Union', + description: + 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The Patient Information as known when the document was published. May be a reference to a version specific, or contained.', + }, + related: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'DocumentReferencecontextrelated_related_Union', + description: + 'Related identifiers or resources associated with the DocumentReference.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Related identifiers or resources associated with the DocumentReference.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/documentreferencerelatesto.schema.js b/src/resources/4_0_0/schemas/documentreferencerelatesto.schema.js new file mode 100644 index 00000000..a3f3ee51 --- /dev/null +++ b/src/resources/4_0_0/schemas/documentreferencerelatesto.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DocumentReferencerelatesTo Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DocumentReferencerelatesTo', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'The type of relationship that this document has with anther document.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of relationship that this document has with anther document.', + }, + target: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'DocumentReferencerelatesTotarget_target_Union', + description: 'The target document of this relationship.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'The target document of this relationship.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/domainresource.schema.js b/src/resources/4_0_0/schemas/domainresource.schema.js new file mode 100644 index 00000000..bd44b772 --- /dev/null +++ b/src/resources/4_0_0/schemas/domainresource.schema.js @@ -0,0 +1,84 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary DomainResource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DomainResource', + description: + 'A resource that includes narrative, extensions, and contained resources.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'DomainResource_Enum_schema', + values: { DomainResource: { value: 'DomainResource' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/dosage.schema.js b/src/resources/4_0_0/schemas/dosage.schema.js new file mode 100644 index 00000000..553af405 --- /dev/null +++ b/src/resources/4_0_0/schemas/dosage.schema.js @@ -0,0 +1,119 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Dosage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Dosage', + description: + 'Base StructureDefinition for Dosage Type: Indicates how the medication is/was taken or should be taken by the patient.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'Indicates the order in which the dosage instructions should be applied or interpreted.', + }, + sequence: { + type: GraphQLInt, + description: + 'Indicates the order in which the dosage instructions should be applied or interpreted.', + }, + _text: { + type: require('./element.schema.js'), + description: 'Free text dosage instructions e.g. SIG.', + }, + text: { + type: GraphQLString, + description: 'Free text dosage instructions e.g. SIG.', + }, + additionalInstruction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Supplemental instructions to the patient on how to take the medication (e.g. 'with meals' or'take half to one hour before food') or warnings for the patient about the medication (e.g. 'may cause drowsiness' or 'avoid exposure of skin to direct sunlight or sunlamps').", + }, + _patientInstruction: { + type: require('./element.schema.js'), + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + patientInstruction: { + type: GraphQLString, + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + timing: { + type: require('./timing.schema.js'), + description: 'When medication should be administered.', + }, + _asNeededBoolean: { + type: require('./element.schema.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).', + }, + site: { + type: require('./codeableconcept.schema.js'), + description: 'Body site to administer to.', + }, + route: { + type: require('./codeableconcept.schema.js'), + description: 'How drug should enter body.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: 'Technique for administering medication.', + }, + doseAndRate: { + type: new GraphQLList(require('./element.schema.js')), + description: 'The amount of medication administered.', + }, + maxDosePerPeriod: { + type: require('./ratio.schema.js'), + description: 'Upper limit on medication per unit of time.', + }, + maxDosePerAdministration: { + type: require('./quantity.schema.js'), + description: 'Upper limit on medication per administration.', + }, + maxDosePerLifetime: { + type: require('./quantity.schema.js'), + description: 'Upper limit on medication per lifetime of the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/dosagedoseandrate.schema.js b/src/resources/4_0_0/schemas/dosagedoseandrate.schema.js new file mode 100644 index 00000000..5f7f4018 --- /dev/null +++ b/src/resources/4_0_0/schemas/dosagedoseandrate.schema.js @@ -0,0 +1,52 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary DosagedoseAndRate Schema + */ +module.exports = new GraphQLObjectType({ + name: 'DosagedoseAndRate', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of dose or rate specified, for example, ordered or calculated.', + }, + doseRange: { + type: require('./range.schema.js'), + description: 'Amount of medication per dose.', + }, + doseQuantity: { + type: require('./quantity.schema.js'), + description: 'Amount of medication per dose.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: 'Amount of medication per unit of time.', + }, + rateRange: { + type: require('./range.schema.js'), + description: 'Amount of medication per unit of time.', + }, + rateQuantity: { + type: require('./quantity.schema.js'), + description: 'Amount of medication per unit of time.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/duration.schema.js b/src/resources/4_0_0/schemas/duration.schema.js new file mode 100644 index 00000000..4c4db934 --- /dev/null +++ b/src/resources/4_0_0/schemas/duration.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Duration Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Duration', + description: 'Base StructureDefinition for Duration Type: A length of time.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/effectevidencesynthesis.schema.js b/src/resources/4_0_0/schemas/effectevidencesynthesis.schema.js new file mode 100644 index 00000000..082c68d7 --- /dev/null +++ b/src/resources/4_0_0/schemas/effectevidencesynthesis.schema.js @@ -0,0 +1,360 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary EffectEvidenceSynthesis Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EffectEvidenceSynthesis', + description: + 'The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EffectEvidenceSynthesis_Enum_schema', + values: { + EffectEvidenceSynthesis: { value: 'EffectEvidenceSynthesis' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this effect evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this effect evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the effect evidence synthesis is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this effect evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this effect evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the effect evidence synthesis is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this effect evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the effect evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the effect evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the effect evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the effect evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the effect evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the effect evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the effect evidence synthesis.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the effect evidence synthesis.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this effect evidence synthesis. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this effect evidence synthesis. Enables tracking the life-cycle of the content.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the effect evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the effect evidence synthesis changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the effect evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the effect evidence synthesis changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the effect evidence synthesis.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the effect evidence synthesis.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the effect evidence synthesis from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the effect evidence synthesis from a consumer's perspective.", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate effect evidence synthesis instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the effect evidence synthesis is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the effect evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the effect evidence synthesis.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the effect evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the effect evidence synthesis.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the effect evidence synthesis content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the EffectEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + synthesisType: { + type: require('./codeableconcept.schema.js'), + description: 'Type of synthesis eg meta-analysis.', + }, + studyType: { + type: require('./codeableconcept.schema.js'), + description: 'Type of study eg randomized trial.', + }, + population: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EffectEvidenceSynthesispopulation_population_Union', + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + }, + exposure: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EffectEvidenceSynthesisexposure_exposure_Union', + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + }, + exposureAlternative: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'EffectEvidenceSynthesisexposureAlternative_exposureAlternative_Union', + description: + 'A reference to a EvidenceVariable resource that defines the comparison exposure for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resource that defines the comparison exposure for the research.', + }, + outcome: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EffectEvidenceSynthesisoutcome_outcome_Union', + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + }, + sampleSize: { + type: require('./effectevidencesynthesissamplesize.schema.js'), + description: + 'A description of the size of the sample involved in the synthesis.', + }, + resultsByExposure: { + type: new GraphQLList( + require('./effectevidencesynthesisresultsbyexposure.schema.js'), + ), + description: + 'A description of the results for each exposure considered in the effect estimate.', + }, + effectEstimate: { + type: new GraphQLList( + require('./effectevidencesynthesiseffectestimate.schema.js'), + ), + description: 'The estimated effect of the exposure variant.', + }, + certainty: { + type: new GraphQLList( + require('./effectevidencesynthesiscertainty.schema.js'), + ), + description: 'A description of the certainty of the effect estimate.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/effectevidencesynthesiscertainty.schema.js b/src/resources/4_0_0/schemas/effectevidencesynthesiscertainty.schema.js new file mode 100644 index 00000000..b303cb73 --- /dev/null +++ b/src/resources/4_0_0/schemas/effectevidencesynthesiscertainty.schema.js @@ -0,0 +1,47 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesiscertainty Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EffectEvidenceSynthesiscertainty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + rating: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A rating of the certainty of the effect estimate.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + certaintySubcomponent: { + type: new GraphQLList( + require('./effectevidencesynthesiscertaintycertaintysubcomponent.schema.js'), + ), + description: 'A description of a component of the overall certainty.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/effectevidencesynthesiscertaintycertaintysubcomponent.schema.js b/src/resources/4_0_0/schemas/effectevidencesynthesiscertaintycertaintysubcomponent.schema.js new file mode 100644 index 00000000..4bfe4be0 --- /dev/null +++ b/src/resources/4_0_0/schemas/effectevidencesynthesiscertaintycertaintysubcomponent.schema.js @@ -0,0 +1,45 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesiscertaintycertaintySubcomponent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EffectEvidenceSynthesiscertaintycertaintySubcomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Type of subcomponent of certainty rating.', + }, + rating: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A rating of a subcomponent of rating certainty.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/effectevidencesynthesiseffectestimate.schema.js b/src/resources/4_0_0/schemas/effectevidencesynthesiseffectestimate.schema.js new file mode 100644 index 00000000..1405bb99 --- /dev/null +++ b/src/resources/4_0_0/schemas/effectevidencesynthesiseffectestimate.schema.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesiseffectEstimate Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EffectEvidenceSynthesiseffectEstimate', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Human-readable summary of effect estimate.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of effect estimate.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Examples include relative risk and mean difference.', + }, + variantState: { + type: require('./codeableconcept.schema.js'), + description: + 'Used to define variant exposure states such as low-risk state.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The point estimate of the effect estimate.', + }, + value: { + type: GraphQLFloat, + description: 'The point estimate of the effect estimate.', + }, + unitOfMeasure: { + type: require('./codeableconcept.schema.js'), + description: 'Specifies the UCUM unit for the outcome.', + }, + precisionEstimate: { + type: new GraphQLList( + require('./effectevidencesynthesiseffectestimateprecisionestimate.schema.js'), + ), + description: + 'A description of the precision of the estimate for the effect.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/effectevidencesynthesiseffectestimateprecisionestimate.schema.js b/src/resources/4_0_0/schemas/effectevidencesynthesiseffectestimateprecisionestimate.schema.js new file mode 100644 index 00000000..a6cc3301 --- /dev/null +++ b/src/resources/4_0_0/schemas/effectevidencesynthesiseffectestimateprecisionestimate.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesiseffectEstimateprecisionEstimate Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EffectEvidenceSynthesiseffectEstimateprecisionEstimate', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Examples include confidence interval and interquartile range.', + }, + _level: { + type: require('./element.schema.js'), + description: 'Use 95 for a 95% confidence interval.', + }, + level: { + type: GraphQLFloat, + description: 'Use 95 for a 95% confidence interval.', + }, + _from: { + type: require('./element.schema.js'), + description: 'Lower bound of confidence interval.', + }, + from: { + type: GraphQLFloat, + description: 'Lower bound of confidence interval.', + }, + _to: { + type: require('./element.schema.js'), + description: 'Upper bound of confidence interval.', + }, + to: { + type: GraphQLFloat, + description: 'Upper bound of confidence interval.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/effectevidencesynthesisresultsbyexposure.schema.js b/src/resources/4_0_0/schemas/effectevidencesynthesisresultsbyexposure.schema.js new file mode 100644 index 00000000..c720aef0 --- /dev/null +++ b/src/resources/4_0_0/schemas/effectevidencesynthesisresultsbyexposure.schema.js @@ -0,0 +1,78 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EffectEvidenceSynthesisresultsByExposure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EffectEvidenceSynthesisresultsByExposure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Human-readable summary of results by exposure state.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of results by exposure state.', + }, + _exposureState: { + type: require('./element.schema.js'), + description: + 'Whether these results are for the exposure state or alternative exposure state.', + }, + exposureState: { + type: CodeScalar, + description: + 'Whether these results are for the exposure state or alternative exposure state.', + }, + variantState: { + type: require('./codeableconcept.schema.js'), + description: + 'Used to define variant exposure states such as low-risk state.', + }, + riskEvidenceSynthesis: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'EffectEvidenceSynthesisresultsByExposureriskEvidenceSynthesis_riskEvidenceSynthesis_Union', + description: 'Reference to a RiskEvidenceSynthesis resource.', + types: () => [require('./riskevidencesynthesis.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'RiskEvidenceSynthesis') { + return require('./riskevidencesynthesis.schema.js'); + } + }, + }), + ), + description: 'Reference to a RiskEvidenceSynthesis resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/effectevidencesynthesissamplesize.schema.js b/src/resources/4_0_0/schemas/effectevidencesynthesissamplesize.schema.js new file mode 100644 index 00000000..13378a70 --- /dev/null +++ b/src/resources/4_0_0/schemas/effectevidencesynthesissamplesize.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EffectEvidenceSynthesissampleSize Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EffectEvidenceSynthesissampleSize', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Human-readable summary of sample size.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of sample size.', + }, + _numberOfStudies: { + type: require('./element.schema.js'), + description: 'Number of studies included in this evidence synthesis.', + }, + numberOfStudies: { + type: GraphQLInt, + description: 'Number of studies included in this evidence synthesis.', + }, + _numberOfParticipants: { + type: require('./element.schema.js'), + description: + 'Number of participants included in this evidence synthesis.', + }, + numberOfParticipants: { + type: GraphQLInt, + description: + 'Number of participants included in this evidence synthesis.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/element.schema.js b/src/resources/4_0_0/schemas/element.schema.js new file mode 100644 index 00000000..fd880735 --- /dev/null +++ b/src/resources/4_0_0/schemas/element.schema.js @@ -0,0 +1,28 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary Element Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Element', + description: + 'Base StructureDefinition for Element Type: Base definition for all elements in a resource.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinition.schema.js b/src/resources/4_0_0/schemas/elementdefinition.schema.js new file mode 100644 index 00000000..eb58e8e5 --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinition.schema.js @@ -0,0 +1,1496 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary ElementDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinition', + description: + 'Base StructureDefinition for ElementDefinition Type: Captures constraints on each element within the resource, profile, or extension.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _path: { + type: require('./element.schema.js'), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + "The path identifies the element and is expressed as a '.'-separated list of ancestor elements, beginning with the name of the resource or extension.", + }, + _representation: { + type: require('./element.schema.js'), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + representation: { + type: new GraphQLList(CodeScalar), + description: + 'Codes that define how this element is represented in instances, when the deviation varies from the normal case.', + }, + _sliceName: { + type: require('./element.schema.js'), + description: + 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', + }, + sliceName: { + type: GraphQLString, + description: + 'The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.', + }, + _sliceIsConstraining: { + type: require('./element.schema.js'), + description: + 'If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.', + }, + sliceIsConstraining: { + type: GraphQLBoolean, + description: + 'If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + label: { + type: GraphQLString, + description: + 'A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.', + }, + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A code that has the same meaning as the element in a particular terminology.', + }, + slicing: { + type: require('./element.schema.js'), + description: + 'Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).', + }, + _short: { + type: require('./element.schema.js'), + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + short: { + type: GraphQLString, + description: + 'A concise description of what this element means (e.g. for use in autogenerated summaries).', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).', + }, + definition: { + type: GraphQLString, + description: + 'Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).', + }, + comment: { + type: GraphQLString, + description: + 'Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).', + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + requirements: { + type: GraphQLString, + description: + 'This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'Identifies additional names by which this element might also be known.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'Identifies additional names by which this element might also be known.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + min: { + type: UnsignedIntScalar, + description: + 'The minimum number of times this element SHALL appear in the instance.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the instance.', + }, + base: { + type: require('./element.schema.js'), + description: + 'Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - i.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.', + }, + _contentReference: { + type: require('./element.schema.js'), + description: + 'Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.', + }, + contentReference: { + type: UriScalar, + description: + 'Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.', + }, + type: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'The data type or resource that the value of this element is permitted to be.', + }, + _defaultValueBase64Binary: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueBoolean: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueCanonical: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCanonical: { + type: CanonicalScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueCode: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCode: { + type: CodeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDate: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDate: { + type: DateScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDateTime: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueDecimal: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueId: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueId: { + type: IdScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInstant: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInstant: { + type: InstantScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueInteger: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueInteger: { + type: GraphQLInt, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueMarkdown: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueOid: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueOid: { + type: OidScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValuePositiveInt: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueString: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueString: { + type: GraphQLString, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueTime: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTime: { + type: TimeScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUnsignedInt: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUri: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUri: { + type: UriScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUrl: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUrl: { + type: UrlScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _defaultValueUuid: { + type: require('./element.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUuid: { + type: UuidScalar, + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAddress: { + type: require('./address.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAge: { + type: require('./age.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAnnotation: { + type: require('./annotation.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueAttachment: { + type: require('./attachment.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCoding: { + type: require('./coding.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueCount: { + type: require('./count.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDistance: { + type: require('./distance.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDuration: { + type: require('./duration.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueHumanName: { + type: require('./humanname.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueIdentifier: { + type: require('./identifier.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueMoney: { + type: require('./money.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValuePeriod: { + type: require('./period.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueQuantity: { + type: require('./quantity.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRange: { + type: require('./range.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRatio: { + type: require('./ratio.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueReference: { + type: require('./resourcelist.schema'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSampledData: { + type: require('./sampleddata.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueSignature: { + type: require('./signature.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTiming: { + type: require('./timing.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContactDetail: { + type: require('./contactdetail.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueContributor: { + type: require('./contributor.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDataRequirement: { + type: require('./datarequirement.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueExpression: { + type: require('./expression.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueParameterDefinition: { + type: require('./parameterdefinition.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueRelatedArtifact: { + type: require('./relatedartifact.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueTriggerDefinition: { + type: require('./triggerdefinition.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueUsageContext: { + type: require('./usagecontext.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + defaultValueDosage: { + type: require('./dosage.schema.js'), + description: + "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", + }, + _meaningWhenMissing: { + type: require('./element.schema.js'), + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').", + }, + meaningWhenMissing: { + type: GraphQLString, + description: + "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing').", + }, + _orderMeaning: { + type: require('./element.schema.js'), + description: + 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', + }, + orderMeaning: { + type: GraphQLString, + description: + 'If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.', + }, + _fixedBase64Binary: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedBoolean: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedCanonical: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCanonical: { + type: CanonicalScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedCode: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCode: { + type: CodeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDate: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDate: { + type: DateScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDateTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedDecimal: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedId: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedId: { + type: IdScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInstant: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInstant: { + type: InstantScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedInteger: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedInteger: { + type: GraphQLInt, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedMarkdown: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedOid: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedOid: { + type: OidScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedPositiveInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedString: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedString: { + type: GraphQLString, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTime: { + type: TimeScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUri: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUri: { + type: UriScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUrl: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUrl: { + type: UrlScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _fixedUuid: { + type: require('./element.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUuid: { + type: UuidScalar, + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAddress: { + type: require('./address.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAge: { + type: require('./age.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedAttachment: { + type: require('./attachment.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCoding: { + type: require('./coding.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedCount: { + type: require('./count.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDistance: { + type: require('./distance.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDuration: { + type: require('./duration.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedHumanName: { + type: require('./humanname.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedMoney: { + type: require('./money.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedPeriod: { + type: require('./period.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedQuantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRange: { + type: require('./range.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRatio: { + type: require('./ratio.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedReference: { + type: require('./resourcelist.schema'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedSignature: { + type: require('./signature.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTiming: { + type: require('./timing.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContactDetail: { + type: require('./contactdetail.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedContributor: { + type: require('./contributor.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDataRequirement: { + type: require('./datarequirement.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedExpression: { + type: require('./expression.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedParameterDefinition: { + type: require('./parameterdefinition.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedRelatedArtifact: { + type: require('./relatedartifact.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedTriggerDefinition: { + type: require('./triggerdefinition.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedUsageContext: { + type: require('./usagecontext.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + fixedDosage: { + type: require('./dosage.schema.js'), + description: + 'Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.', + }, + _patternBase64Binary: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternBase64Binary: { + type: Base64BinaryScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternBoolean: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternBoolean: { + type: GraphQLBoolean, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternCanonical: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCanonical: { + type: CanonicalScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternCode: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCode: { + type: CodeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternDate: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDate: { + type: DateScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternDateTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDateTime: { + type: DateTimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternDecimal: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDecimal: { + type: GraphQLFloat, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternId: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternId: { + type: IdScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternInstant: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternInstant: { + type: InstantScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternInteger: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternInteger: { + type: GraphQLInt, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternMarkdown: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternMarkdown: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternOid: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternOid: { + type: OidScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternPositiveInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternPositiveInt: { + type: PositiveIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternString: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternString: { + type: GraphQLString, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternTime: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternTime: { + type: TimeScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternUri: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUri: { + type: UriScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternUrl: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUrl: { + type: UrlScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + _patternUuid: { + type: require('./element.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUuid: { + type: UuidScalar, + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternAddress: { + type: require('./address.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternAge: { + type: require('./age.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternAttachment: { + type: require('./attachment.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCoding: { + type: require('./coding.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternCount: { + type: require('./count.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDistance: { + type: require('./distance.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDuration: { + type: require('./duration.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternHumanName: { + type: require('./humanname.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternMoney: { + type: require('./money.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternPeriod: { + type: require('./period.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternQuantity: { + type: require('./quantity.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternRange: { + type: require('./range.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternRatio: { + type: require('./ratio.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternReference: { + type: require('./resourcelist.schema'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternSignature: { + type: require('./signature.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternTiming: { + type: require('./timing.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternContactDetail: { + type: require('./contactdetail.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternContributor: { + type: require('./contributor.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDataRequirement: { + type: require('./datarequirement.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternExpression: { + type: require('./expression.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternParameterDefinition: { + type: require('./parameterdefinition.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternRelatedArtifact: { + type: require('./relatedartifact.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternTriggerDefinition: { + type: require('./triggerdefinition.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternUsageContext: { + type: require('./usagecontext.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + patternDosage: { + type: require('./dosage.schema.js'), + description: + 'Specifies a value that the value in the instance SHALL follow - that is, any value in the pattern must be found in the instance. Other additional values may be found too. This is effectively constraint by example. When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly. When pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] array must (recursively) match at least one element from the instance array. When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match -- i.e., 1. If primitive: it must match exactly the pattern value 2. If a complex object: it must match (recursively) the pattern value 3. If an array: it must match (recursively) the pattern value.', + }, + example: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'A sample value for this element demonstrating the type of information that would typically be found in the element.', + }, + _minValueDate: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDate: { + type: DateScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDateTime: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDateTime: { + type: DateTimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInstant: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInstant: { + type: InstantScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueTime: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueTime: { + type: TimeScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueDecimal: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueDecimal: { + type: GraphQLFloat, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueInteger: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueInteger: { + type: GraphQLInt, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValuePositiveInt: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _minValueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + minValueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDate: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDate: { + type: DateScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDateTime: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDateTime: { + type: DateTimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInstant: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInstant: { + type: InstantScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueTime: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueTime: { + type: TimeScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueDecimal: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueDecimal: { + type: GraphQLFloat, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueInteger: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueInteger: { + type: GraphQLInt, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValuePositiveInt: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValuePositiveInt: { + type: PositiveIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxValueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + maxValueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.', + }, + _maxLength: { + type: require('./element.schema.js'), + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + maxLength: { + type: GraphQLInt, + description: + 'Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element.', + }, + _condition: { + type: require('./element.schema.js'), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + condition: { + type: new GraphQLList(IdScalar), + description: + 'A reference to an invariant that may make additional statements about the cardinality or value in the instance.', + }, + constraint: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.', + }, + _mustSupport: { + type: require('./element.schema.js'), + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.", + }, + mustSupport: { + type: GraphQLBoolean, + description: + "If true, implementations that produce or consume resources SHALL provide 'support' for the element in some meaningful way. If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.", + }, + _isModifier: { + type: require('./element.schema.js'), + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + isModifier: { + type: GraphQLBoolean, + description: + 'If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.', + }, + _isModifierReason: { + type: require('./element.schema.js'), + description: + 'Explains how that element affects the interpretation of the resource or element that contains it.', + }, + isModifierReason: { + type: GraphQLString, + description: + 'Explains how that element affects the interpretation of the resource or element that contains it.', + }, + _isSummary: { + type: require('./element.schema.js'), + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + isSummary: { + type: GraphQLBoolean, + description: + 'Whether the element should be included if a client requests a search with the parameter _summary=true.', + }, + binding: { + type: require('./element.schema.js'), + description: + 'Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).', + }, + mapping: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Identifies a concept from an external specification that roughly corresponds to this element.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinitionbase.schema.js b/src/resources/4_0_0/schemas/elementdefinitionbase.schema.js new file mode 100644 index 00000000..615f5cbf --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinitionbase.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionbase Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinitionbase', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The Path that identifies the base element - this matches the ElementDefinition.path for that element. Across FHIR, there is only one base definition of any element - that is, an element definition on a [StructureDefinition](structuredefinition.html#) without a StructureDefinition.base.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + min: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'Minimum cardinality of the base element identified by the path.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Maximum cardinality of the base element identified by the path.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinitionbinding.schema.js b/src/resources/4_0_0/schemas/elementdefinitionbinding.schema.js new file mode 100644 index 00000000..51426605 --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinitionbinding.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionbinding Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinitionbinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _strength: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Describes the intended use of this particular set of codes.', + }, + description: { + type: GraphQLString, + description: + 'Describes the intended use of this particular set of codes.', + }, + _valueSet: { + type: require('./element.schema.js'), + description: + 'Refers to the value set that identifies the set of codes the binding refers to.', + }, + valueSet: { + type: CanonicalScalar, + description: + 'Refers to the value set that identifies the set of codes the binding refers to.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinitionconstraint.schema.js b/src/resources/4_0_0/schemas/elementdefinitionconstraint.schema.js new file mode 100644 index 00000000..018222b9 --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinitionconstraint.schema.js @@ -0,0 +1,105 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionconstraint Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinitionconstraint', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _key: { + type: require('./element.schema.js'), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + key: { + type: new GraphQLNonNull(IdScalar), + description: + 'Allows identification of which elements have their cardinalities impacted by the constraint. Will not be referenced for constraints that do not affect cardinality.', + }, + _requirements: { + type: require('./element.schema.js'), + description: + 'Description of why this constraint is necessary or appropriate.', + }, + requirements: { + type: GraphQLString, + description: + 'Description of why this constraint is necessary or appropriate.', + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the impact constraint violation has on the conformance of the instance.', + }, + _human: { + type: require('./element.schema.js'), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + human: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Text that can be used to describe the constraint in messages identifying that the constraint has been violated.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.', + }, + expression: { + type: GraphQLString, + description: + 'A [FHIRPath](fhirpath.html) expression of constraint that can be executed to see if this constraint is met.', + }, + _xpath: { + type: require('./element.schema.js'), + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression of constraint that can be executed to see if this constraint is met.', + }, + _source: { + type: require('./element.schema.js'), + description: + 'A reference to the original source of the constraint, for traceability purposes.', + }, + source: { + type: CanonicalScalar, + description: + 'A reference to the original source of the constraint, for traceability purposes.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinitionexample.schema.js b/src/resources/4_0_0/schemas/elementdefinitionexample.schema.js new file mode 100644 index 00000000..ac9c6506 --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinitionexample.schema.js @@ -0,0 +1,400 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionexample Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinitionexample', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'Describes the purpose of this example amoung the set of examples.', + }, + label: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Describes the purpose of this example amoung the set of examples.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueCanonical: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueId: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUrl: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUrl: { + type: new GraphQLNonNull(UrlScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + _valueUuid: { + type: require('./element.schema.js'), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUuid: { + type: new GraphQLNonNull(UuidScalar), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueReference: { + type: new GraphQLNonNull(require('./resourcelist.schema')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueContactDetail: { + type: new GraphQLNonNull(require('./contactdetail.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueContributor: { + type: new GraphQLNonNull(require('./contributor.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueExpression: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueParameterDefinition: { + type: new GraphQLNonNull(require('./parameterdefinition.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueRelatedArtifact: { + type: new GraphQLNonNull(require('./relatedartifact.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueTriggerDefinition: { + type: new GraphQLNonNull(require('./triggerdefinition.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueUsageContext: { + type: new GraphQLNonNull(require('./usagecontext.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + valueDosage: { + type: new GraphQLNonNull(require('./dosage.schema.js')), + description: + 'The actual value for the element, which must be one of the types allowed for this element.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinitionmapping.schema.js b/src/resources/4_0_0/schemas/elementdefinitionmapping.schema.js new file mode 100644 index 00000000..f61b8370 --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinitionmapping.schema.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionmapping Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinitionmapping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _identity: { + type: require('./element.schema.js'), + description: 'An internal reference to the definition of a mapping.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: 'An internal reference to the definition of a mapping.', + }, + _language: { + type: require('./element.schema.js'), + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + language: { + type: CodeScalar, + description: + 'Identifies the computable language in which mapping.map is expressed.', + }, + _map: { + type: require('./element.schema.js'), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + map: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Expresses what part of the target specification corresponds to this element.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments that provide information about the mapping or its use.', + }, + comment: { + type: GraphQLString, + description: + 'Comments that provide information about the mapping or its use.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinitionslicing.schema.js b/src/resources/4_0_0/schemas/elementdefinitionslicing.schema.js new file mode 100644 index 00000000..f1e5d5f1 --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinitionslicing.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionslicing Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinitionslicing', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + discriminator: { + type: new GraphQLList(require('./element.schema.js')), + description: + 'Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + description: { + type: GraphQLString, + description: + 'A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.', + }, + _ordered: { + type: require('./element.schema.js'), + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + ordered: { + type: GraphQLBoolean, + description: + 'If the matching elements have to occur in the same order as defined in the profile.', + }, + _rules: { + type: require('./element.schema.js'), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + rules: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinitionslicingdiscriminator.schema.js b/src/resources/4_0_0/schemas/elementdefinitionslicingdiscriminator.schema.js new file mode 100644 index 00000000..ef05810e --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinitionslicingdiscriminator.schema.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitionslicingdiscriminator Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinitionslicingdiscriminator', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'How the element value is interpreted when discrimination is evaluated.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How the element value is interpreted when discrimination is evaluated.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.', + }, + path: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A FHIRPath expression, using [the simple subset of FHIRPath](fhirpath.html#simple), that is used to identify the element on which discrimination is based.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/elementdefinitiontype.schema.js b/src/resources/4_0_0/schemas/elementdefinitiontype.schema.js new file mode 100644 index 00000000..cc371f21 --- /dev/null +++ b/src/resources/4_0_0/schemas/elementdefinitiontype.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ElementDefinitiontype Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ElementDefinitiontype', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _code: { + type: require('./element.schema.js'), + description: + "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + code: { + type: new GraphQLNonNull(UriScalar), + description: + "URL of Data type or Resource that is a(or the) type used for this element. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + _profile: { + type: require('./element.schema.js'), + description: + 'Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.', + }, + profile: { + type: new GraphQLList(CanonicalScalar), + description: + 'Identifies a profile structure or implementation Guide that applies to the datatype this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the type SHALL conform to at least one profile defined in the implementation guide.', + }, + _targetProfile: { + type: require('./element.schema.js'), + description: + "Used when the type is 'Reference' or 'canonical', and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", + }, + targetProfile: { + type: new GraphQLList(CanonicalScalar), + description: + "Used when the type is 'Reference' or 'canonical', and identifies a profile structure or implementation Guide that applies to the target of the reference this element refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", + }, + _aggregation: { + type: require('./element.schema.js'), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + aggregation: { + type: new GraphQLList(CodeScalar), + description: + 'If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.', + }, + _versioning: { + type: require('./element.schema.js'), + description: + 'Whether this reference needs to be version specific or version independent, or whether either can be used.', + }, + versioning: { + type: CodeScalar, + description: + 'Whether this reference needs to be version specific or version independent, or whether either can be used.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/encounter.schema.js b/src/resources/4_0_0/schemas/encounter.schema.js new file mode 100644 index 00000000..39898fe7 --- /dev/null +++ b/src/resources/4_0_0/schemas/encounter.schema.js @@ -0,0 +1,304 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Encounter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Encounter', + description: + 'An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Encounter_Enum_schema', + values: { Encounter: { value: 'Encounter' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Identifier(s) by which this encounter is known.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + statusHistory: { + type: new GraphQLList(require('./encounterstatushistory.schema.js')), + description: + 'The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them.', + }, + class: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.', + }, + classHistory: { + type: new GraphQLList(require('./encounterclasshistory.schema.js')), + description: + 'The class history permits the tracking of the encounters transitions without needing to go through the resource history. This would be used for a case where an admission starts of as an emergency encounter, then transitions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kind of discharge from emergency to inpatient.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).', + }, + serviceType: { + type: require('./codeableconcept.schema.js'), + description: + 'Broad categorization of the service that is to be provided (e.g. cardiology).', + }, + priority: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the urgency of the encounter.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Encountersubject_subject_Union', + description: 'The patient or group present at the encounter.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: 'The patient or group present at the encounter.', + }, + episodeOfCare: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EncounterepisodeOfCare_episodeOfCare_Union', + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + types: () => [require('./episodeofcare.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + ), + description: + 'Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EncounterbasedOn_basedOn_Union', + description: + 'The request this encounter satisfies (e.g. incoming referral or procedure request).', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'The request this encounter satisfies (e.g. incoming referral or procedure request).', + }, + participant: { + type: new GraphQLList(require('./encounterparticipant.schema.js')), + description: 'The list of people responsible for providing the service.', + }, + appointment: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Encounterappointment_appointment_Union', + description: 'The appointment that scheduled this encounter.', + types: () => [require('./appointment.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + }, + }), + ), + description: 'The appointment that scheduled this encounter.', + }, + period: { + type: require('./period.schema.js'), + description: 'The start and end time of the encounter.', + }, + length: { + type: require('./duration.schema.js'), + description: + 'Quantity of time the encounter lasted. This excludes the time during leaves of absence.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EncounterreasonReference_reasonReference_Union', + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + types: () => [ + require('./condition.schema.js'), + require('./procedure.schema.js'), + require('./observation.schema.js'), + require('./immunizationrecommendation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); + } + }, + }), + ), + description: + 'Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis.', + }, + diagnosis: { + type: new GraphQLList(require('./encounterdiagnosis.schema.js')), + description: 'The list of diagnosis relevant to this encounter.', + }, + account: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Encounteraccount_account_Union', + description: + 'The set of accounts that may be used for billing for this Encounter.', + types: () => [require('./account.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + }, + }), + ), + description: + 'The set of accounts that may be used for billing for this Encounter.', + }, + hospitalization: { + type: require('./encounterhospitalization.schema.js'), + description: 'Details about the admission to a healthcare service.', + }, + location: { + type: new GraphQLList(require('./encounterlocation.schema.js')), + description: + 'List of locations where the patient has been during this encounter.', + }, + serviceProvider: { + type: new GraphQLUnionType({ + name: 'EncounterserviceProvider_serviceProvider_Union', + description: + "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the example bundle showing an abbreviated set of Encounters for a colonoscopy.", + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the example bundle showing an abbreviated set of Encounters for a colonoscopy.", + }, + partOf: { + type: new GraphQLUnionType({ + name: 'EncounterpartOf_partOf_Union', + description: + 'Another Encounter of which this encounter is a part of (administratively or in time).', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'Another Encounter of which this encounter is a part of (administratively or in time).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/encounterclasshistory.schema.js b/src/resources/4_0_0/schemas/encounterclasshistory.schema.js new file mode 100644 index 00000000..4f7a75ba --- /dev/null +++ b/src/resources/4_0_0/schemas/encounterclasshistory.schema.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary EncounterclassHistory Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EncounterclassHistory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + class: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'inpatient | outpatient | ambulatory | emergency +.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The time that the episode was in the specified class.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/encounterdiagnosis.schema.js b/src/resources/4_0_0/schemas/encounterdiagnosis.schema.js new file mode 100644 index 00000000..36fd0d17 --- /dev/null +++ b/src/resources/4_0_0/schemas/encounterdiagnosis.schema.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Encounterdiagnosis Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Encounterdiagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + condition: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Encounterdiagnosiscondition_condition_Union', + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + types: () => [ + require('./condition.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.', + }, + use: { + type: require('./codeableconcept.schema.js'), + description: + 'Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).', + }, + _rank: { + type: require('./element.schema.js'), + description: 'Ranking of the diagnosis (for each role type).', + }, + rank: { + type: PositiveIntScalar, + description: 'Ranking of the diagnosis (for each role type).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/encounterhospitalization.schema.js b/src/resources/4_0_0/schemas/encounterhospitalization.schema.js new file mode 100644 index 00000000..0c4a05b1 --- /dev/null +++ b/src/resources/4_0_0/schemas/encounterhospitalization.schema.js @@ -0,0 +1,109 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Encounterhospitalization Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Encounterhospitalization', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + preAdmissionIdentifier: { + type: require('./identifier.schema.js'), + description: 'Pre-admission identifier.', + }, + origin: { + type: new GraphQLUnionType({ + name: 'Encounterhospitalizationorigin_origin_Union', + description: + 'The location/organization from which the patient came before admission.', + types: () => [ + require('./location.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The location/organization from which the patient came before admission.', + }, + admitSource: { + type: require('./codeableconcept.schema.js'), + description: + 'From where patient was admitted (physician referral, transfer).', + }, + reAdmission: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether this hospitalization is a readmission and why if known.', + }, + dietPreference: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Diet preferences reported by the patient.', + }, + specialCourtesy: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Special courtesies (VIP, board member).', + }, + specialArrangement: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.', + }, + destination: { + type: new GraphQLUnionType({ + name: 'Encounterhospitalizationdestination_destination_Union', + description: + 'Location/organization to which the patient is discharged.', + types: () => [ + require('./location.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Location/organization to which the patient is discharged.', + }, + dischargeDisposition: { + type: require('./codeableconcept.schema.js'), + description: 'Category or kind of location after discharge.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/encounterlocation.schema.js b/src/resources/4_0_0/schemas/encounterlocation.schema.js new file mode 100644 index 00000000..bd806da8 --- /dev/null +++ b/src/resources/4_0_0/schemas/encounterlocation.schema.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Encounterlocation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Encounterlocation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + location: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Encounterlocationlocation_location_Union', + description: 'The location where the encounter takes place.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: 'The location where the encounter takes place.', + }, + _status: { + type: require('./element.schema.js'), + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", + }, + status: { + type: CodeScalar, + description: + "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", + }, + physicalType: { + type: require('./codeableconcept.schema.js'), + description: + 'This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Time period during which the patient was present at the location.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/encounterparticipant.schema.js b/src/resources/4_0_0/schemas/encounterparticipant.schema.js new file mode 100644 index 00000000..de31a976 --- /dev/null +++ b/src/resources/4_0_0/schemas/encounterparticipant.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Encounterparticipant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Encounterparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Role of participant in encounter.', + }, + period: { + type: require('./period.schema.js'), + description: + "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", + }, + individual: { + type: new GraphQLUnionType({ + name: 'Encounterparticipantindividual_individual_Union', + description: + 'Persons involved in the encounter other than the patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'Persons involved in the encounter other than the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/encounterstatushistory.schema.js b/src/resources/4_0_0/schemas/encounterstatushistory.schema.js new file mode 100644 index 00000000..d1bfb60d --- /dev/null +++ b/src/resources/4_0_0/schemas/encounterstatushistory.schema.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EncounterstatusHistory Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EncounterstatusHistory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | arrived | triaged | in-progress | onleave | finished | cancelled +.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The time that the episode was in the specified status.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/endpoint.schema.js b/src/resources/4_0_0/schemas/endpoint.schema.js new file mode 100644 index 00000000..e9fe5503 --- /dev/null +++ b/src/resources/4_0_0/schemas/endpoint.schema.js @@ -0,0 +1,174 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary Endpoint Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Endpoint', + description: + 'The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Endpoint_Enum_schema', + values: { Endpoint: { value: 'Endpoint' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifier for the organization that is used to identify the endpoint across multiple disparate systems.', + }, + _status: { + type: require('./element.schema.js'), + description: 'active | suspended | error | off | test.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'active | suspended | error | off | test.', + }, + connectionType: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A friendly name that this endpoint can be referred to with.', + }, + name: { + type: GraphQLString, + description: + 'A friendly name that this endpoint can be referred to with.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'EndpointmanagingOrganization_managingOrganization_Union', + description: + 'The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The interval during which the endpoint is expected to be operational.', + }, + payloadType: { + type: new GraphQLList( + new GraphQLNonNull(require('./codeableconcept.schema.js')), + ), + description: + 'The payload type describes the acceptable content that can be communicated on the endpoint.', + }, + _payloadMimeType: { + type: require('./element.schema.js'), + description: + 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', + }, + payloadMimeType: { + type: new GraphQLList(CodeScalar), + description: + 'The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).', + }, + _address: { + type: require('./element.schema.js'), + description: 'The uri that describes the actual end-point to connect to.', + }, + address: { + type: new GraphQLNonNull(UrlScalar), + description: 'The uri that describes the actual end-point to connect to.', + }, + _header: { + type: require('./element.schema.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: new GraphQLList(GraphQLString), + description: + 'Additional headers / information to send as part of the notification.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/enrollmentrequest.schema.js b/src/resources/4_0_0/schemas/enrollmentrequest.schema.js new file mode 100644 index 00000000..a4486f4f --- /dev/null +++ b/src/resources/4_0_0/schemas/enrollmentrequest.schema.js @@ -0,0 +1,171 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary EnrollmentRequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EnrollmentRequest', + description: + 'This resource provides the insurance enrollment details to the insurer regarding a specified coverage.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentRequest_Enum_schema', + values: { EnrollmentRequest: { value: 'EnrollmentRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: DateTimeScalar, + description: 'The date when this resource was created.', + }, + insurer: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestinsurer_insurer_Union', + description: 'The Insurer who is target of the request.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who is target of the request.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestprovider_provider_Union', + description: + 'The practitioner who is responsible for the services rendered to the patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + candidate: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestcandidate_candidate_Union', + description: 'Patient Resource.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Patient Resource.', + }, + coverage: { + type: new GraphQLUnionType({ + name: 'EnrollmentRequestcoverage_coverage_Union', + description: + 'Reference to the program or plan identification, underwriter or payor.', + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + description: + 'Reference to the program or plan identification, underwriter or payor.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/enrollmentresponse.schema.js b/src/resources/4_0_0/schemas/enrollmentresponse.schema.js new file mode 100644 index 00000000..292774b5 --- /dev/null +++ b/src/resources/4_0_0/schemas/enrollmentresponse.schema.js @@ -0,0 +1,175 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary EnrollmentResponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EnrollmentResponse', + description: + 'This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EnrollmentResponse_Enum_schema', + values: { EnrollmentResponse: { value: 'EnrollmentResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'The Response business identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: CodeScalar, + description: 'The status of the resource instance.', + }, + request: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponserequest_request_Union', + description: 'Original request resource reference.', + types: () => [require('./enrollmentrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EnrollmentRequest') { + return require('./enrollmentrequest.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'Processing status: error, complete.', + }, + outcome: { + type: CodeScalar, + description: 'Processing status: error, complete.', + }, + _disposition: { + type: require('./element.schema.js'), + description: 'A description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: 'A description of the status of the adjudication.', + }, + _created: { + type: require('./element.schema.js'), + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + created: { + type: DateTimeScalar, + description: + 'The date when the enclosed suite of services were performed or completed.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponseorganization_organization_Union', + description: 'The Insurer who produced this adjudicated response.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The Insurer who produced this adjudicated response.', + }, + requestProvider: { + type: new GraphQLUnionType({ + name: 'EnrollmentResponserequestProvider_requestProvider_Union', + description: + 'The practitioner who is responsible for the services rendered to the patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/episodeofcare.schema.js b/src/resources/4_0_0/schemas/episodeofcare.schema.js new file mode 100644 index 00000000..fb4bbb9b --- /dev/null +++ b/src/resources/4_0_0/schemas/episodeofcare.schema.js @@ -0,0 +1,220 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EpisodeOfCare Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EpisodeOfCare', + description: + 'An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EpisodeOfCare_Enum_schema', + values: { EpisodeOfCare: { value: 'EpisodeOfCare' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + statusHistory: { + type: new GraphQLList(require('./episodeofcarestatushistory.schema.js')), + description: + 'The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.', + }, + diagnosis: { + type: new GraphQLList(require('./episodeofcarediagnosis.schema.js')), + description: 'The list of diagnosis relevant to this episode of care.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EpisodeOfCarepatient_patient_Union', + description: 'The patient who is the focus of this episode of care.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient who is the focus of this episode of care.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'EpisodeOfCaremanagingOrganization_managingOrganization_Union', + description: + 'The organization that has assumed the specific responsibilities for the specified duration.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization that has assumed the specific responsibilities for the specified duration.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The interval during which the managing organization assumes the defined responsibility.', + }, + referralRequest: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EpisodeOfCarereferralRequest_referralRequest_Union', + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.', + }, + careManager: { + type: new GraphQLUnionType({ + name: 'EpisodeOfCarecareManager_careManager_Union', + description: + 'The practitioner that is the care manager/care coordinator for this patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'The practitioner that is the care manager/care coordinator for this patient.', + }, + team: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EpisodeOfCareteam_team_Union', + description: + 'The list of practitioners that may be facilitating this episode of care for specific purposes.', + types: () => [require('./careteam.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + ), + description: + 'The list of practitioners that may be facilitating this episode of care for specific purposes.', + }, + account: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EpisodeOfCareaccount_account_Union', + description: + 'The set of accounts that may be used for billing for this EpisodeOfCare.', + types: () => [require('./account.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + }, + }), + ), + description: + 'The set of accounts that may be used for billing for this EpisodeOfCare.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/episodeofcarediagnosis.schema.js b/src/resources/4_0_0/schemas/episodeofcarediagnosis.schema.js new file mode 100644 index 00000000..32f19a11 --- /dev/null +++ b/src/resources/4_0_0/schemas/episodeofcarediagnosis.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary EpisodeOfCarediagnosis Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EpisodeOfCarediagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + condition: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EpisodeOfCarediagnosiscondition_condition_Union', + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.', + }, + role: { + type: require('./codeableconcept.schema.js'), + description: + 'Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …).', + }, + _rank: { + type: require('./element.schema.js'), + description: 'Ranking of the diagnosis (for each role type).', + }, + rank: { + type: PositiveIntScalar, + description: 'Ranking of the diagnosis (for each role type).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/episodeofcarestatushistory.schema.js b/src/resources/4_0_0/schemas/episodeofcarestatushistory.schema.js new file mode 100644 index 00000000..7442cd71 --- /dev/null +++ b/src/resources/4_0_0/schemas/episodeofcarestatushistory.schema.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EpisodeOfCarestatusHistory Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EpisodeOfCarestatusHistory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _status: { + type: require('./element.schema.js'), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'planned | waitlist | active | onhold | finished | cancelled.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + 'The period during this EpisodeOfCare that the specific status applied.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/eventdefinition.schema.js b/src/resources/4_0_0/schemas/eventdefinition.schema.js new file mode 100644 index 00000000..89755422 --- /dev/null +++ b/src/resources/4_0_0/schemas/eventdefinition.schema.js @@ -0,0 +1,320 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary EventDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EventDefinition', + description: + 'The EventDefinition resource provides a reusable description of when a particular event can occur.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EventDefinition_Enum_schema', + values: { EventDefinition: { value: 'EventDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this event definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the event definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the event definition.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the event definition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the event definition giving additional information about its content.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this event definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this event definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A code or group definition that describes the intended subject of the event definition.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: 'EventDefinitionsubjectReference_subjectReference_Union', + description: + 'A code or group definition that describes the intended subject of the event definition.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'A code or group definition that describes the intended subject of the event definition.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the event definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the event definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the event definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the event definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the event definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the event definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate event definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the event definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this event definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this event definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the event definition is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the event definition is used from a clinical perspective.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the event definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the event definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the event definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the event definition.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the event definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related resources such as additional documentation, justification, or bibliographic references.', + }, + trigger: { + type: new GraphQLList( + new GraphQLNonNull(require('./triggerdefinition.schema.js')), + ), + description: + 'The trigger element defines when the event occurs. If more than one trigger condition is specified, the event fires whenever any one of the trigger conditions is met.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/evidence.schema.js b/src/resources/4_0_0/schemas/evidence.schema.js new file mode 100644 index 00000000..0d5bacf0 --- /dev/null +++ b/src/resources/4_0_0/schemas/evidence.schema.js @@ -0,0 +1,328 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Evidence Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Evidence', + description: + 'The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Evidence_Enum_schema', + values: { Evidence: { value: 'Evidence' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this evidence when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the evidence when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the evidence when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the evidence.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the evidence.', + }, + _shortTitle: { + type: require('./element.schema.js'), + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + shortTitle: { + type: GraphQLString, + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the Evidence giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the Evidence giving additional information about its content.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this evidence. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this evidence. Enables tracking the life-cycle of the content.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the evidence was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the evidence was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the evidence.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the evidence.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the evidence from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the evidence from a consumer's perspective.", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the evidence is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the evidence content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the Evidence. Topics provide a high-level categorization grouping types of Evidences that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + exposureBackground: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'EvidenceexposureBackground_exposureBackground_Union', + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + }, + exposureVariant: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'EvidenceexposureVariant_exposureVariant_Union', + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + }, + outcome: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Evidenceoutcome_outcome_Union', + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/evidencevariable.schema.js b/src/resources/4_0_0/schemas/evidencevariable.schema.js new file mode 100644 index 00000000..9fc65b6e --- /dev/null +++ b/src/resources/4_0_0/schemas/evidencevariable.schema.js @@ -0,0 +1,296 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary EvidenceVariable Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EvidenceVariable', + description: + "The EvidenceVariable resource describes a 'PICO' element that knowledge (evidence, assertion, recommendation) is about.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'EvidenceVariable_Enum_schema', + values: { EvidenceVariable: { value: 'EvidenceVariable' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the evidence variable.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the evidence variable.', + }, + _shortTitle: { + type: require('./element.schema.js'), + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + shortTitle: { + type: GraphQLString, + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the EvidenceVariable giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the EvidenceVariable giving additional information about its content.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this evidence variable. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this evidence variable. Enables tracking the life-cycle of the content.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the evidence variable was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the evidence variable was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the evidence variable.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the evidence variable.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the evidence variable from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the evidence variable from a consumer's perspective.", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the evidence variable is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the evidence variable and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence variable.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the evidence variable and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence variable.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the evidence variable content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the EvidenceVariable. Topics provide a high-level categorization grouping types of EvidenceVariables that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of evidence element, a population, an exposure, or an outcome.', + }, + type: { + type: CodeScalar, + description: + 'The type of evidence element, a population, an exposure, or an outcome.', + }, + characteristic: { + type: new GraphQLList( + new GraphQLNonNull( + require('./evidencevariablecharacteristic.schema.js'), + ), + ), + description: + "A characteristic that defines the members of the evidence element. Multiple characteristics are applied with 'and' semantics.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/evidencevariablecharacteristic.schema.js b/src/resources/4_0_0/schemas/evidencevariablecharacteristic.schema.js new file mode 100644 index 00000000..75c98b5c --- /dev/null +++ b/src/resources/4_0_0/schemas/evidencevariablecharacteristic.schema.js @@ -0,0 +1,155 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary EvidenceVariablecharacteristic Schema + */ +module.exports = new GraphQLObjectType({ + name: 'EvidenceVariablecharacteristic', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.', + }, + description: { + type: GraphQLString, + description: + 'A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user.', + }, + definitionReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'EvidenceVariablecharacteristicdefinitionReference_definitionReference_Union', + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + types: () => [ + require('./group.schema.js'), + require('./activitydefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + }, + }), + ), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + _definitionCanonical: { + type: require('./element.schema.js'), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionExpression: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.schema.js')), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionTriggerDefinition: { + type: new GraphQLNonNull(require('./triggerdefinition.schema.js')), + description: + 'Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + usageContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.', + }, + _exclude: { + type: require('./element.schema.js'), + description: + 'When true, members with this characteristic are excluded from the element.', + }, + exclude: { + type: GraphQLBoolean, + description: + 'When true, members with this characteristic are excluded from the element.', + }, + _participantEffectiveDateTime: { + type: require('./element.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveDateTime: { + type: DateTimeScalar, + description: 'Indicates what effective period the study covers.', + }, + participantEffectivePeriod: { + type: require('./period.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveDuration: { + type: require('./duration.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveTiming: { + type: require('./timing.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + timeFromStart: { + type: require('./duration.schema.js'), + description: "Indicates duration from the participant's study entry.", + }, + _groupMeasure: { + type: require('./element.schema.js'), + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + groupMeasure: { + type: CodeScalar, + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenario.schema.js b/src/resources/4_0_0/schemas/examplescenario.schema.js new file mode 100644 index 00000000..ad169190 --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenario.schema.js @@ -0,0 +1,218 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ExampleScenario Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenario', + description: 'Example of workflow instance.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExampleScenario_Enum_schema', + values: { ExampleScenario: { value: 'ExampleScenario' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this example scenario. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this example scenario. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + "The date (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", + }, + date: { + type: DateTimeScalar, + description: + "The date (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the example scenario.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the example scenario.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the example scenario is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.', + }, + purpose: { + type: GraphQLString, + description: + 'What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.', + }, + actor: { + type: new GraphQLList(require('./examplescenarioactor.schema.js')), + description: 'Actor participating in the resource.', + }, + instance: { + type: new GraphQLList(require('./examplescenarioinstance.schema.js')), + description: + 'Each resource and each version that is present in the workflow.', + }, + process: { + type: new GraphQLList(require('./examplescenarioprocess.schema.js')), + description: 'Each major process - a group of operations.', + }, + _workflow: { + type: require('./element.schema.js'), + description: 'Another nested workflow.', + }, + workflow: { + type: new GraphQLList(CanonicalScalar), + description: 'Another nested workflow.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenarioactor.schema.js b/src/resources/4_0_0/schemas/examplescenarioactor.schema.js new file mode 100644 index 00000000..756f5c50 --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenarioactor.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ExampleScenarioactor Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenarioactor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _actorId: { + type: require('./element.schema.js'), + description: 'ID or acronym of actor.', + }, + actorId: { + type: new GraphQLNonNull(GraphQLString), + description: 'ID or acronym of actor.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of actor - person or system.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of actor - person or system.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of the actor as shown in the page.', + }, + name: { + type: GraphQLString, + description: 'The name of the actor as shown in the page.', + }, + _description: { + type: require('./element.schema.js'), + description: 'The description of the actor.', + }, + description: { + type: GraphQLString, + description: 'The description of the actor.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenarioinstance.schema.js b/src/resources/4_0_0/schemas/examplescenarioinstance.schema.js new file mode 100644 index 00000000..3a772622 --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenarioinstance.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ExampleScenarioinstance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenarioinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _resourceId: { + type: require('./element.schema.js'), + description: 'The id of the resource for referencing.', + }, + resourceId: { + type: new GraphQLNonNull(GraphQLString), + description: 'The id of the resource for referencing.', + }, + _resourceType: { + type: require('./element.schema.js'), + description: 'The type of the resource.', + }, + resourceType: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of the resource.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A short name for the resource instance.', + }, + name: { + type: GraphQLString, + description: 'A short name for the resource instance.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Human-friendly description of the resource instance.', + }, + description: { + type: GraphQLString, + description: 'Human-friendly description of the resource instance.', + }, + version: { + type: new GraphQLList( + require('./examplescenarioinstanceversion.schema.js'), + ), + description: 'A specific version of the resource.', + }, + containedInstance: { + type: new GraphQLList( + require('./examplescenarioinstancecontainedinstance.schema.js'), + ), + description: + 'Resources contained in the instance (e.g. the observations contained in a bundle).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenarioinstancecontainedinstance.schema.js b/src/resources/4_0_0/schemas/examplescenarioinstancecontainedinstance.schema.js new file mode 100644 index 00000000..2662ec8e --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenarioinstancecontainedinstance.schema.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioinstancecontainedInstance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenarioinstancecontainedInstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _resourceId: { + type: require('./element.schema.js'), + description: 'Each resource contained in the instance.', + }, + resourceId: { + type: new GraphQLNonNull(GraphQLString), + description: 'Each resource contained in the instance.', + }, + _versionId: { + type: require('./element.schema.js'), + description: + 'A specific version of a resource contained in the instance.', + }, + versionId: { + type: GraphQLString, + description: + 'A specific version of a resource contained in the instance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenarioinstanceversion.schema.js b/src/resources/4_0_0/schemas/examplescenarioinstanceversion.schema.js new file mode 100644 index 00000000..f3714d1e --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenarioinstanceversion.schema.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioinstanceversion Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenarioinstanceversion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _versionId: { + type: require('./element.schema.js'), + description: 'The identifier of a specific version of a resource.', + }, + versionId: { + type: new GraphQLNonNull(GraphQLString), + description: 'The identifier of a specific version of a resource.', + }, + _description: { + type: require('./element.schema.js'), + description: 'The description of the resource version.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: 'The description of the resource version.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenarioprocess.schema.js b/src/resources/4_0_0/schemas/examplescenarioprocess.schema.js new file mode 100644 index 00000000..f35c7789 --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenarioprocess.schema.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioprocess Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenarioprocess', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _title: { + type: require('./element.schema.js'), + description: 'The diagram title of the group of operations.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: 'The diagram title of the group of operations.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A longer description of the group of operations.', + }, + description: { + type: GraphQLString, + description: 'A longer description of the group of operations.', + }, + _preConditions: { + type: require('./element.schema.js'), + description: 'Description of initial status before the process starts.', + }, + preConditions: { + type: GraphQLString, + description: 'Description of initial status before the process starts.', + }, + _postConditions: { + type: require('./element.schema.js'), + description: 'Description of final status after the process ends.', + }, + postConditions: { + type: GraphQLString, + description: 'Description of final status after the process ends.', + }, + step: { + type: new GraphQLList(require('./examplescenarioprocessstep.schema.js')), + description: 'Each step of the process.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenarioprocessstep.schema.js b/src/resources/4_0_0/schemas/examplescenarioprocessstep.schema.js new file mode 100644 index 00000000..85355453 --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenarioprocessstep.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioprocessstep Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenarioprocessstep', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _pause: { + type: require('./element.schema.js'), + description: 'If there is a pause in the flow.', + }, + pause: { + type: GraphQLBoolean, + description: 'If there is a pause in the flow.', + }, + operation: { + type: require('./examplescenarioprocessstepoperation.schema.js'), + description: 'Each interaction or action.', + }, + alternative: { + type: new GraphQLList( + require('./examplescenarioprocessstepalternative.schema.js'), + ), + description: + 'Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenarioprocessstepalternative.schema.js b/src/resources/4_0_0/schemas/examplescenarioprocessstepalternative.schema.js new file mode 100644 index 00000000..e0627fc8 --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenarioprocessstepalternative.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioprocessstepalternative Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenarioprocessstepalternative', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _title: { + type: require('./element.schema.js'), + description: + 'The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A human-readable description of the alternative explaining when the alternative should occur rather than the base step.', + }, + description: { + type: GraphQLString, + description: + 'A human-readable description of the alternative explaining when the alternative should occur rather than the base step.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/examplescenarioprocessstepoperation.schema.js b/src/resources/4_0_0/schemas/examplescenarioprocessstepoperation.schema.js new file mode 100644 index 00000000..cea4b9ef --- /dev/null +++ b/src/resources/4_0_0/schemas/examplescenarioprocessstepoperation.schema.js @@ -0,0 +1,106 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExampleScenarioprocessstepoperation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExampleScenarioprocessstepoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _number: { + type: require('./element.schema.js'), + description: 'The sequential number of the interaction, e.g. 1.2.5.', + }, + number: { + type: new GraphQLNonNull(GraphQLString), + description: 'The sequential number of the interaction, e.g. 1.2.5.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of operation - CRUD.', + }, + type: { + type: GraphQLString, + description: 'The type of operation - CRUD.', + }, + _name: { + type: require('./element.schema.js'), + description: 'The human-friendly name of the interaction.', + }, + name: { + type: GraphQLString, + description: 'The human-friendly name of the interaction.', + }, + _initiator: { + type: require('./element.schema.js'), + description: 'Who starts the transaction.', + }, + initiator: { + type: GraphQLString, + description: 'Who starts the transaction.', + }, + _receiver: { + type: require('./element.schema.js'), + description: 'Who receives the transaction.', + }, + receiver: { + type: GraphQLString, + description: 'Who receives the transaction.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A comment to be inserted in the diagram.', + }, + description: { + type: GraphQLString, + description: 'A comment to be inserted in the diagram.', + }, + _initiatorActive: { + type: require('./element.schema.js'), + description: + 'Whether the initiator is deactivated right after the transaction.', + }, + initiatorActive: { + type: GraphQLBoolean, + description: + 'Whether the initiator is deactivated right after the transaction.', + }, + _receiverActive: { + type: require('./element.schema.js'), + description: + 'Whether the receiver is deactivated right after the transaction.', + }, + receiverActive: { + type: GraphQLBoolean, + description: + 'Whether the receiver is deactivated right after the transaction.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefit.schema.js b/src/resources/4_0_0/schemas/explanationofbenefit.schema.js new file mode 100644 index 00000000..99932af8 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefit.schema.js @@ -0,0 +1,462 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefit Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefit', + description: + 'This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ExplanationOfBenefit_Enum_schema', + values: { ExplanationOfBenefit: { value: 'ExplanationOfBenefit' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A unique identifier assigned to this explanation of benefit.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The category of claim, e.g. oral, pharmacy, vision, institutional, professional.', + }, + subType: { + type: require('./codeableconcept.schema.js'), + description: + 'A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.', + }, + _use: { + type: require('./element.schema.js'), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ExplanationOfBenefitpatient_patient_Union', + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought.', + }, + billablePeriod: { + type: require('./period.schema.js'), + description: 'The period for which charges are being submitted.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitenterer_enterer_Union', + description: + 'Individual who created the claim, predetermination or preauthorization.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'Individual who created the claim, predetermination or preauthorization.', + }, + insurer: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ExplanationOfBenefitinsurer_insurer_Union', + description: + 'The party responsible for authorization, adjudication and reimbursement.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The party responsible for authorization, adjudication and reimbursement.', + }, + provider: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ExplanationOfBenefitprovider_provider_Union', + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The provider which is responsible for the claim, predetermination or preauthorization.', + }, + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'The provider-required urgency of processing the request. Typical values include: stat, routine deferred.', + }, + fundsReserveRequested: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to indicate whether and for whom funds are to be reserved for future claims.', + }, + fundsReserve: { + type: require('./codeableconcept.schema.js'), + description: + 'A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.', + }, + related: { + type: new GraphQLList(require('./explanationofbenefitrelated.schema.js')), + description: + 'Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.', + }, + prescription: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitprescription_prescription_Union', + description: + 'Prescription to support the dispensing of pharmacy, device or vision products.', + types: () => [ + require('./medicationrequest.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, + }), + description: + 'Prescription to support the dispensing of pharmacy, device or vision products.', + }, + originalPrescription: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefitoriginalPrescription_originalPrescription_Union', + description: + 'Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.', + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + description: + 'Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.', + }, + payee: { + type: require('./explanationofbenefitpayee.schema.js'), + description: + 'The party to be reimbursed for cost of the products and services according to the terms of the policy.', + }, + referral: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitreferral_referral_Union', + description: 'A reference to a referral resource.', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + description: 'A reference to a referral resource.', + }, + facility: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitfacility_facility_Union', + description: 'Facility where the services were provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Facility where the services were provided.', + }, + claim: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitclaim_claim_Union', + description: + 'The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.', + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: + 'The business identifier for the instance of the adjudication request: claim predetermination or preauthorization.', + }, + claimResponse: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitclaimResponse_claimResponse_Union', + description: + 'The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.', + types: () => [require('./claimresponse.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + description: + 'The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response.', + }, + _outcome: { + type: require('./element.schema.js'), + description: + 'The outcome of the claim, predetermination, or preauthorization processing.', + }, + outcome: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The outcome of the claim, predetermination, or preauthorization processing.', + }, + _disposition: { + type: require('./element.schema.js'), + description: + 'A human readable description of the status of the adjudication.', + }, + disposition: { + type: GraphQLString, + description: + 'A human readable description of the status of the adjudication.', + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'Reference from the Insurer which is used in later communications which refers to this adjudication.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'Reference from the Insurer which is used in later communications which refers to this adjudication.', + }, + preAuthRefPeriod: { + type: new GraphQLList(require('./period.schema.js')), + description: + 'The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided.', + }, + careTeam: { + type: new GraphQLList( + require('./explanationofbenefitcareteam.schema.js'), + ), + description: + 'The members of the team who provided the products and services.', + }, + supportingInfo: { + type: new GraphQLList( + require('./explanationofbenefitsupportinginfo.schema.js'), + ), + description: + 'Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.', + }, + diagnosis: { + type: new GraphQLList( + require('./explanationofbenefitdiagnosis.schema.js'), + ), + description: 'Information about diagnoses relevant to the claim items.', + }, + procedure: { + type: new GraphQLList( + require('./explanationofbenefitprocedure.schema.js'), + ), + description: + 'Procedures performed on the patient relevant to the billing items with the claim.', + }, + _precedence: { + type: require('./element.schema.js'), + description: + 'This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.', + }, + precedence: { + type: PositiveIntScalar, + description: + 'This indicates the relative order of a series of EOBs related to different coverages for the same suite of services.', + }, + insurance: { + type: new GraphQLList( + new GraphQLNonNull( + require('./explanationofbenefitinsurance.schema.js'), + ), + ), + description: + 'Financial instruments for reimbursement for the health care products and services specified on the claim.', + }, + accident: { + type: require('./explanationofbenefitaccident.schema.js'), + description: + 'Details of a accident which resulted in injuries which required the products and services listed in the claim.', + }, + item: { + type: new GraphQLList(require('./explanationofbenefititem.schema.js')), + description: + "A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.", + }, + addItem: { + type: new GraphQLList(require('./explanationofbenefitadditem.schema.js')), + description: + 'The first-tier service adjudications for payor added product or service lines.', + }, + total: { + type: new GraphQLList(require('./explanationofbenefittotal.schema.js')), + description: 'Categorized monetary totals for the adjudication.', + }, + payment: { + type: require('./explanationofbenefitpayment.schema.js'), + description: 'Payment details for the adjudication of the claim.', + }, + formCode: { + type: require('./codeableconcept.schema.js'), + description: 'A code for the form to be used for printing the content.', + }, + form: { + type: require('./attachment.schema.js'), + description: + 'The actual form, by reference or inclusion, for printing the content or an EOB.', + }, + processNote: { + type: new GraphQLList( + require('./explanationofbenefitprocessnote.schema.js'), + ), + description: + 'A note that describes or explains adjudication results in a human readable form.', + }, + benefitPeriod: { + type: require('./period.schema.js'), + description: 'The term of the benefits documented in this response.', + }, + benefitBalance: { + type: new GraphQLList( + require('./explanationofbenefitbenefitbalance.schema.js'), + ), + description: 'Balance by Benefit Category.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitaccident.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitaccident.schema.js new file mode 100644 index 00000000..eff8cd3d --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitaccident.schema.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitaccident Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitaccident', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _date: { + type: require('./element.schema.js'), + description: + 'Date of an accident event related to the products and services contained in the claim.', + }, + date: { + type: DateScalar, + description: + 'Date of an accident event related to the products and services contained in the claim.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.', + }, + locationAddress: { + type: require('./address.schema.js'), + description: 'The physical location of the accident event.', + }, + locationReference: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefitaccidentlocationReference_locationReference_Union', + description: 'The physical location of the accident event.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'The physical location of the accident event.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitadditem.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitadditem.schema.js new file mode 100644 index 00000000..cd798501 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitadditem.schema.js @@ -0,0 +1,199 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitaddItem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitaddItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _itemSequence: { + type: require('./element.schema.js'), + description: + 'Claim items which this service line is intended to replace.', + }, + itemSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Claim items which this service line is intended to replace.', + }, + _detailSequence: { + type: require('./element.schema.js'), + description: + 'The sequence number of the details within the claim item which this line is intended to replace.', + }, + detailSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The sequence number of the details within the claim item which this line is intended to replace.', + }, + _subDetailSequence: { + type: require('./element.schema.js'), + description: + 'The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.', + }, + subDetailSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace.', + }, + provider: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefitaddItemprovider_provider_Union', + description: + 'The providers who are authorized for the services rendered to the patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The providers who are authorized for the services rendered to the patient.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Identifies the program under which this may be recovered.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + locationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Where the product or service was provided.', + }, + locationAddress: { + type: require('./address.schema.js'), + description: 'Where the product or service was provided.', + }, + locationReference: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefitaddItemlocationReference_locationReference_Union', + description: 'Where the product or service was provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the product or service was provided.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + bodySite: { + type: require('./codeableconcept.schema.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + subSite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A region or surface of the bodySite, e.g. limb region or tooth surface(s).', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + detail: { + type: new GraphQLList( + require('./explanationofbenefitadditemdetail.schema.js'), + ), + description: + 'The second-tier service adjudications for payor added services.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitadditemdetail.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitadditemdetail.schema.js new file mode 100644 index 00000000..132499b6 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitadditemdetail.schema.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitaddItemdetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitaddItemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + subDetail: { + type: new GraphQLList( + require('./explanationofbenefitadditemdetailsubdetail.schema.js'), + ), + description: + 'The third-tier service adjudications for payor added services.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitadditemdetailsubdetail.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitadditemdetailsubdetail.schema.js new file mode 100644 index 00000000..131babbc --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitadditemdetailsubdetail.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitaddItemdetailsubDetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitaddItemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitbenefitbalance.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitbenefitbalance.schema.js new file mode 100644 index 00000000..9004af94 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitbenefitbalance.schema.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefitbenefitBalance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitbenefitBalance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + _excluded: { + type: require('./element.schema.js'), + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.', + }, + excluded: { + type: GraphQLBoolean, + description: + 'True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A short name or tag for the benefit.', + }, + name: { + type: GraphQLString, + description: 'A short name or tag for the benefit.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A richer description of the benefit or services covered.', + }, + description: { + type: GraphQLString, + description: 'A richer description of the benefit or services covered.', + }, + network: { + type: require('./codeableconcept.schema.js'), + description: + 'Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.', + }, + unit: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates if the benefits apply to an individual or to the family.', + }, + term: { + type: require('./codeableconcept.schema.js'), + description: + "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", + }, + financial: { + type: new GraphQLList( + require('./explanationofbenefitbenefitbalancefinancial.schema.js'), + ), + description: 'Benefits Used to date.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitbenefitbalancefinancial.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitbenefitbalancefinancial.schema.js new file mode 100644 index 00000000..581c3dbb --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitbenefitbalancefinancial.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitbenefitBalancefinancial Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitbenefitBalancefinancial', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Classification of benefit being provided.', + }, + _allowedUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + _allowedString: { + type: require('./element.schema.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedString: { + type: GraphQLString, + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + allowedMoney: { + type: require('./money.schema.js'), + description: + 'The quantity of the benefit which is permitted under the coverage.', + }, + _usedUnsignedInt: { + type: require('./element.schema.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedUnsignedInt: { + type: UnsignedIntScalar, + description: + 'The quantity of the benefit which have been consumed to date.', + }, + usedMoney: { + type: require('./money.schema.js'), + description: + 'The quantity of the benefit which have been consumed to date.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitcareteam.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitcareteam.schema.js new file mode 100644 index 00000000..5332fa55 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitcareteam.schema.js @@ -0,0 +1,94 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitcareTeam Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitcareTeam', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify care team entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify care team entries.', + }, + provider: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ExplanationOfBenefitcareTeamprovider_provider_Union', + description: + 'Member of the team who provided the product or service.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Member of the team who provided the product or service.', + }, + _responsible: { + type: require('./element.schema.js'), + description: + 'The party who is billing and/or responsible for the claimed products or services.', + }, + responsible: { + type: GraphQLBoolean, + description: + 'The party who is billing and/or responsible for the claimed products or services.', + }, + role: { + type: require('./codeableconcept.schema.js'), + description: + 'The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.', + }, + qualification: { + type: require('./codeableconcept.schema.js'), + description: + 'The qualification of the practitioner which is applicable for this service.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitdiagnosis.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitdiagnosis.schema.js new file mode 100644 index 00000000..4349a413 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitdiagnosis.schema.js @@ -0,0 +1,84 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitdiagnosis Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitdiagnosis', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify diagnosis entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify diagnosis entries.', + }, + diagnosisCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + diagnosisReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ExplanationOfBenefitdiagnosisdiagnosisReference_diagnosisReference_Union', + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'The nature of illness or problem in a coded form or as a reference to an external defined Condition.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'When the condition was observed or the relative ranking.', + }, + onAdmission: { + type: require('./codeableconcept.schema.js'), + description: + 'Indication of whether the diagnosis was present on admission to a facility.', + }, + packageCode: { + type: require('./codeableconcept.schema.js'), + description: + 'A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitinsurance.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitinsurance.schema.js new file mode 100644 index 00000000..e5938101 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitinsurance.schema.js @@ -0,0 +1,76 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefitinsurance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitinsurance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _focal: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + focal: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.', + }, + coverage: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ExplanationOfBenefitinsurancecoverage_coverage_Union', + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + types: () => [require('./coverage.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + }, + }), + ), + description: + "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + }, + _preAuthRef: { + type: require('./element.schema.js'), + description: + 'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.', + }, + preAuthRef: { + type: new GraphQLList(GraphQLString), + description: + 'Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefititem.schema.js b/src/resources/4_0_0/schemas/explanationofbenefititem.schema.js new file mode 100644 index 00000000..0d27c98c --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefititem.schema.js @@ -0,0 +1,233 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefititem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefititem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify item entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify item entries.', + }, + _careTeamSequence: { + type: require('./element.schema.js'), + description: 'Care team members related to this service or product.', + }, + careTeamSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Care team members related to this service or product.', + }, + _diagnosisSequence: { + type: require('./element.schema.js'), + description: 'Diagnoses applicable for this service or product.', + }, + diagnosisSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Diagnoses applicable for this service or product.', + }, + _procedureSequence: { + type: require('./element.schema.js'), + description: 'Procedures applicable for this service or product.', + }, + procedureSequence: { + type: new GraphQLList(PositiveIntScalar), + description: 'Procedures applicable for this service or product.', + }, + _informationSequence: { + type: require('./element.schema.js'), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product.', + }, + informationSequence: { + type: new GraphQLList(PositiveIntScalar), + description: + 'Exceptions, special conditions and supporting information applicable for this service or product.', + }, + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Identifies the program under which this may be recovered.', + }, + _servicedDate: { + type: require('./element.schema.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedDate: { + type: DateScalar, + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + servicedPeriod: { + type: require('./period.schema.js'), + description: + 'The date or dates when the service or product was supplied, performed or completed.', + }, + locationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Where the product or service was provided.', + }, + locationAddress: { + type: require('./address.schema.js'), + description: 'Where the product or service was provided.', + }, + locationReference: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefititemlocationReference_locationReference_Union', + description: 'Where the product or service was provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the product or service was provided.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefititemudi_udi_Union', + description: + 'Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'Unique Device Identifiers associated with this line item.', + }, + bodySite: { + type: require('./codeableconcept.schema.js'), + description: 'Physical service site on the patient (limb, tooth, etc.).', + }, + subSite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A region or surface of the bodySite, e.g. limb region or tooth surface(s).', + }, + encounter: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefititemencounter_encounter_Union', + description: + 'A billed item may include goods or services provided in multiple encounters.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + ), + description: + 'A billed item may include goods or services provided in multiple encounters.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + adjudication: { + type: new GraphQLList( + require('./explanationofbenefititemadjudication.schema.js'), + ), + description: + 'If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.', + }, + detail: { + type: new GraphQLList( + require('./explanationofbenefititemdetail.schema.js'), + ), + description: 'Second-tier of goods and services.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefititemadjudication.schema.js b/src/resources/4_0_0/schemas/explanationofbenefititemadjudication.schema.js new file mode 100644 index 00000000..04f4ffa7 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefititemadjudication.schema.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefititemadjudication Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefititemadjudication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.', + }, + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'A code supporting the understanding of the adjudication result and explaining variance from expected amount.', + }, + amount: { + type: require('./money.schema.js'), + description: 'Monetary amount associated with the category.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'A non-monetary value associated with the category. Mutually exclusive to the amount element above.', + }, + value: { + type: GraphQLFloat, + description: + 'A non-monetary value associated with the category. Mutually exclusive to the amount element above.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefititemdetail.schema.js b/src/resources/4_0_0/schemas/explanationofbenefititemdetail.schema.js new file mode 100644 index 00000000..5369b3f4 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefititemdetail.schema.js @@ -0,0 +1,130 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefititemdetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefititemdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Identifies the program under which this may be recovered.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefititemdetailudi_udi_Union', + description: + 'Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'Unique Device Identifiers associated with this line item.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + subDetail: { + type: new GraphQLList( + require('./explanationofbenefititemdetailsubdetail.schema.js'), + ), + description: 'Third-tier of goods and services.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefititemdetailsubdetail.schema.js b/src/resources/4_0_0/schemas/explanationofbenefititemdetailsubdetail.schema.js new file mode 100644 index 00000000..a717ac5a --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefititemdetailsubdetail.schema.js @@ -0,0 +1,124 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefititemdetailsubDetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefititemdetailsubDetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + }, + revenue: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of revenue or cost center providing the product and/or service.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Code to identify the general type of benefits under which products and services are provided.', + }, + productOrService: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.', + }, + modifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Item typification or modifiers codes to convey additional context for the product or service.', + }, + programCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Identifies the program under which this may be recovered.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The number of repetitions of a service or product.', + }, + unitPrice: { + type: require('./money.schema.js'), + description: + 'If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + factor: { + type: GraphQLFloat, + description: + 'A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.', + }, + net: { + type: require('./money.schema.js'), + description: + 'The quantity times the unit price for an additional service or product or charge.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefititemdetailsubDetailudi_udi_Union', + description: + 'Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'Unique Device Identifiers associated with this line item.', + }, + _noteNumber: { + type: require('./element.schema.js'), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + noteNumber: { + type: new GraphQLList(PositiveIntScalar), + description: + 'The numbers associated with notes below which apply to the adjudication of this item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitpayee.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitpayee.schema.js new file mode 100644 index 00000000..8ba1a683 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitpayee.schema.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefitpayee Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitpayee', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Party to be reimbursed: Subscriber, provider, other.', + }, + party: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitpayeeparty_party_Union', + description: + 'Reference to the individual or organization to whom any payment will be made.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Reference to the individual or organization to whom any payment will be made.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitpayment.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitpayment.schema.js new file mode 100644 index 00000000..63d15e4c --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitpayment.schema.js @@ -0,0 +1,65 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitpayment Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitpayment', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether this represents partial or complete payment of the benefits payable.', + }, + adjustment: { + type: require('./money.schema.js'), + description: + "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", + }, + adjustmentReason: { + type: require('./codeableconcept.schema.js'), + description: 'Reason for the payment adjustment.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'Estimated date the payment will be issued or the actual issue date of payment.', + }, + date: { + type: DateScalar, + description: + 'Estimated date the payment will be issued or the actual issue date of payment.', + }, + amount: { + type: require('./money.schema.js'), + description: 'Benefits payable less any payment adjustment.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: "Issuer's unique identifier for the payment instrument.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitprocedure.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitprocedure.schema.js new file mode 100644 index 00000000..1d1bae32 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitprocedure.schema.js @@ -0,0 +1,99 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitprocedure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitprocedure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify procedure entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'A number to uniquely identify procedure entries.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'When the condition was observed or the relative ranking.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date and optionally time the procedure was performed.', + }, + date: { + type: DateTimeScalar, + description: 'Date and optionally time the procedure was performed.', + }, + procedureCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + }, + procedureReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ExplanationOfBenefitprocedureprocedureReference_procedureReference_Union', + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'The code or reference to a Procedure resource which identifies the clinical intervention performed.', + }, + udi: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ExplanationOfBenefitprocedureudi_udi_Union', + description: + 'Unique Device Identifiers associated with this line item.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'Unique Device Identifiers associated with this line item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitprocessnote.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitprocessnote.schema.js new file mode 100644 index 00000000..9267deac --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitprocessnote.schema.js @@ -0,0 +1,65 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitprocessNote Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitprocessNote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _number: { + type: require('./element.schema.js'), + description: 'A number to uniquely identify a note entry.', + }, + number: { + type: PositiveIntScalar, + description: 'A number to uniquely identify a note entry.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The business purpose of the note text.', + }, + type: { + type: CodeScalar, + description: 'The business purpose of the note text.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'The explanation or description associated with the processing.', + }, + text: { + type: GraphQLString, + description: + 'The explanation or description associated with the processing.', + }, + language: { + type: require('./codeableconcept.schema.js'), + description: + 'A code to define the language used in the text of the note.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitrelated.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitrelated.schema.js new file mode 100644 index 00000000..866e9ecb --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitrelated.schema.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefitrelated Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitrelated', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + claim: { + type: new GraphQLUnionType({ + name: 'ExplanationOfBenefitrelatedclaim_claim_Union', + description: 'Reference to a related claim.', + types: () => [require('./claim.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + }, + }), + description: 'Reference to a related claim.', + }, + relationship: { + type: require('./codeableconcept.schema.js'), + description: 'A code to convey how the claims are related.', + }, + reference: { + type: require('./identifier.schema.js'), + description: + 'An alternate organizational reference to the case or file to which this particular claim pertains.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefitsupportinginfo.schema.js b/src/resources/4_0_0/schemas/explanationofbenefitsupportinginfo.schema.js new file mode 100644 index 00000000..cdbedae4 --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefitsupportinginfo.schema.js @@ -0,0 +1,124 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ExplanationOfBenefitsupportingInfo Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefitsupportingInfo', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'A number to uniquely identify supporting information entries.', + }, + sequence: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'A number to uniquely identify supporting information entries.', + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The general class of the information supplied: information; exception; accident, employment; onset, etc.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.', + }, + _timingDate: { + type: require('./element.schema.js'), + description: 'The date when or period to which this information refers.', + }, + timingDate: { + type: DateScalar, + description: 'The date when or period to which this information refers.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: 'The date when or period to which this information refers.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueString: { + type: GraphQLString, + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + valueReference: { + type: new GraphQLUnionType({ + name: + 'ExplanationOfBenefitsupportingInfovalueReference_valueReference_Union', + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.', + }, + reason: { + type: require('./coding.schema.js'), + description: + 'Provides the reason in the situation where a reason code is required in addition to the content.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/explanationofbenefittotal.schema.js b/src/resources/4_0_0/schemas/explanationofbenefittotal.schema.js new file mode 100644 index 00000000..c835b09d --- /dev/null +++ b/src/resources/4_0_0/schemas/explanationofbenefittotal.schema.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ExplanationOfBenefittotal Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ExplanationOfBenefittotal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.', + }, + amount: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'Monetary total amount associated with the category.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/expression.schema.js b/src/resources/4_0_0/schemas/expression.schema.js new file mode 100644 index 00000000..ce47be72 --- /dev/null +++ b/src/resources/4_0_0/schemas/expression.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Expression Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Expression', + description: + 'Base StructureDefinition for Expression Type: A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + description: { + type: GraphQLString, + description: + 'A brief, natural language description of the condition that effectively communicates the intended semantics.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.', + }, + name: { + type: IdScalar, + description: + 'A short name assigned to the expression to allow for multiple reuse of the expression in the context where it is defined.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The media type of the language for the expression.', + }, + language: { + type: new GraphQLNonNull(CodeScalar), + description: 'The media type of the language for the expression.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'An expression in the specified language that returns a value.', + }, + expression: { + type: GraphQLString, + description: + 'An expression in the specified language that returns a value.', + }, + _reference: { + type: require('./element.schema.js'), + description: 'A URI that defines where the expression is found.', + }, + reference: { + type: UriScalar, + description: 'A URI that defines where the expression is found.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/extension.schema.js b/src/resources/4_0_0/schemas/extension.schema.js new file mode 100644 index 00000000..5d0d998b --- /dev/null +++ b/src/resources/4_0_0/schemas/extension.schema.js @@ -0,0 +1,401 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary Extension Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Extension', + description: + 'Base StructureDefinition for Extension Type: Optional Extension Element - found in all resources.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + url: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Source of the definition for the extension code - a logical name or a URL.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueCanonical: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCanonical: { + type: CanonicalScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueCode: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCode: { + type: CodeScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDate: { + type: DateScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueId: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueId: { + type: IdScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueInstant: { + type: InstantScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueInteger: { + type: GraphQLInt, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueMarkdown: { + type: GraphQLString, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueOid: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueOid: { + type: OidScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueString: { + type: GraphQLString, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueTime: { + type: TimeScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUri: { + type: UriScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueUrl: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUrl: { + type: UrlScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + _valueUuid: { + type: require('./element.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUuid: { + type: UuidScalar, + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueAddress: { + type: require('./address.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueAge: { + type: require('./age.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueAnnotation: { + type: require('./annotation.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCoding: { + type: require('./coding.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueCount: { + type: require('./count.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDistance: { + type: require('./distance.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDuration: { + type: require('./duration.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueHumanName: { + type: require('./humanname.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueIdentifier: { + type: require('./identifier.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueMoney: { + type: require('./money.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueReference: { + type: require('./resourcelist.schema'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueSignature: { + type: require('./signature.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueTiming: { + type: require('./timing.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueContactDetail: { + type: require('./contactdetail.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueContributor: { + type: require('./contributor.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDataRequirement: { + type: require('./datarequirement.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueExpression: { + type: require('./expression.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueParameterDefinition: { + type: require('./parameterdefinition.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueRelatedArtifact: { + type: require('./relatedartifact.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueTriggerDefinition: { + type: require('./triggerdefinition.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueUsageContext: { + type: require('./usagecontext.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + valueDosage: { + type: require('./dosage.schema.js'), + description: + 'Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/familymemberhistory.schema.js b/src/resources/4_0_0/schemas/familymemberhistory.schema.js new file mode 100644 index 00000000..33ce8aad --- /dev/null +++ b/src/resources/4_0_0/schemas/familymemberhistory.schema.js @@ -0,0 +1,319 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary FamilyMemberHistory Schema + */ +module.exports = new GraphQLObjectType({ + name: 'FamilyMemberHistory', + description: + 'Significant health conditions for a person related to the patient relevant in the context of care for the patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'FamilyMemberHistory_Enum_schema', + values: { FamilyMemberHistory: { value: 'FamilyMemberHistory' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying the status of the record of the family history of a specific family member.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the status of the record of the family history of a specific family member.', + }, + dataAbsentReason: { + type: require('./codeableconcept.schema.js'), + description: + "Describes why the family member's history is not available.", + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'FamilyMemberHistorypatient_patient_Union', + description: 'The person who this history concerns.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The person who this history concerns.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and possibly time) when the family member history was recorded or last updated.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and possibly time) when the family member history was recorded or last updated.', + }, + _name: { + type: require('./element.schema.js'), + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + name: { + type: GraphQLString, + description: + "This will either be a name or a description; e.g. 'Aunt Susan', 'my cousin with the red hair'.", + }, + relationship: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The type of relationship this person has to the patient (father, mother, brother etc.).', + }, + sex: { + type: require('./codeableconcept.schema.js'), + description: 'The birth sex of the family member.', + }, + bornPeriod: { + type: require('./period.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + _bornDate: { + type: require('./element.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornDate: { + type: DateScalar, + description: 'The actual or approximate date of birth of the relative.', + }, + _bornString: { + type: require('./element.schema.js'), + description: 'The actual or approximate date of birth of the relative.', + }, + bornString: { + type: GraphQLString, + description: 'The actual or approximate date of birth of the relative.', + }, + ageAge: { + type: require('./age.schema.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + ageRange: { + type: require('./range.schema.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + _ageString: { + type: require('./element.schema.js'), + description: + 'The age of the relative at the time the family member history is recorded.', + }, + ageString: { + type: GraphQLString, + description: + 'The age of the relative at the time the family member history is recorded.', + }, + _estimatedAge: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the age value specified is an estimated value.', + }, + estimatedAge: { + type: GraphQLBoolean, + description: + 'If true, indicates that the age value specified is an estimated value.', + }, + _deceasedBoolean: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedAge: { + type: require('./age.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedRange: { + type: require('./range.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedDate: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedDate: { + type: DateScalar, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + _deceasedString: { + type: require('./element.schema.js'), + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + deceasedString: { + type: GraphQLString, + description: + 'Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Describes why the family member history occurred in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'FamilyMemberHistoryreasonReference_reasonReference_Union', + description: + 'Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./allergyintolerance.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.', + }, + condition: { + type: new GraphQLList( + require('./familymemberhistorycondition.schema.js'), + ), + description: + 'The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/familymemberhistorycondition.schema.js b/src/resources/4_0_0/schemas/familymemberhistorycondition.schema.js new file mode 100644 index 00000000..9702a26a --- /dev/null +++ b/src/resources/4_0_0/schemas/familymemberhistorycondition.schema.js @@ -0,0 +1,88 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary FamilyMemberHistorycondition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'FamilyMemberHistorycondition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", + }, + outcome: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates what happened following the condition. If the condition resulted in death, deceased date is captured on the relation.', + }, + _contributedToDeath: { + type: require('./element.schema.js'), + description: + 'This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.', + }, + contributedToDeath: { + type: GraphQLBoolean, + description: + 'This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.', + }, + onsetAge: { + type: require('./age.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetRange: { + type: require('./range.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetPeriod: { + type: require('./period.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + _onsetString: { + type: require('./element.schema.js'), + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + onsetString: { + type: GraphQLString, + description: + 'Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'An area where general notes can be placed about this specific condition.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/flag.schema.js b/src/resources/4_0_0/schemas/flag.schema.js new file mode 100644 index 00000000..767f6d42 --- /dev/null +++ b/src/resources/4_0_0/schemas/flag.schema.js @@ -0,0 +1,204 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Flag Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Flag', + description: + 'Prospective warnings of potential issues when providing care to the patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Flag_Enum_schema', + values: { Flag: { value: 'Flag' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Supports basic workflow.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Supports basic workflow.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Allows a flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The coded value or textual component of the flag to display to the user.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Flagsubject_subject_Union', + description: + 'The patient, location, group, organization, or practitioner etc. this is about record this flag is associated with.', + types: () => [ + require('./patient.schema.js'), + require('./location.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + require('./practitioner.schema.js'), + require('./plandefinition.schema.js'), + require('./medication.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'The patient, location, group, organization, or practitioner etc. this is about record this flag is associated with.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Flagencounter_encounter_Union', + description: 'This alert is only relevant during the encounter.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'This alert is only relevant during the encounter.', + }, + author: { + type: new GraphQLUnionType({ + name: 'Flagauthor_author_Union', + description: + 'The person, organization or device that created the flag.', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'The person, organization or device that created the flag.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/goal.schema.js b/src/resources/4_0_0/schemas/goal.schema.js new file mode 100644 index 00000000..32c3d48c --- /dev/null +++ b/src/resources/4_0_0/schemas/goal.schema.js @@ -0,0 +1,274 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Goal Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Goal', + description: + 'Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Goal_Enum_schema', + values: { Goal: { value: 'Goal' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.', + }, + _lifecycleStatus: { + type: require('./element.schema.js'), + description: 'The state of the goal throughout its lifecycle.', + }, + lifecycleStatus: { + type: new GraphQLNonNull(CodeScalar), + description: 'The state of the goal throughout its lifecycle.', + }, + achievementStatus: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the progression, or lack thereof, towards the goal against the target.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Indicates a category the goal falls within.', + }, + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.', + }, + description: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Goalsubject_subject_Union', + description: + 'Identifies the patient, group or organization for whom the goal is being established.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'Identifies the patient, group or organization for whom the goal is being established.', + }, + _startDate: { + type: require('./element.schema.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + startDate: { + type: DateScalar, + description: + 'The date or event after which the goal should begin being pursued.', + }, + startCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The date or event after which the goal should begin being pursued.', + }, + target: { + type: new GraphQLList(require('./goaltarget.schema.js')), + description: 'Indicates what should be done by when.', + }, + _statusDate: { + type: require('./element.schema.js'), + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + statusDate: { + type: DateScalar, + description: + 'Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.', + }, + _statusReason: { + type: require('./element.schema.js'), + description: 'Captures the reason for the current status.', + }, + statusReason: { + type: GraphQLString, + description: 'Captures the reason for the current status.', + }, + expressedBy: { + type: new GraphQLUnionType({ + name: 'GoalexpressedBy_expressedBy_Union', + description: + 'Indicates whose goal this is - patient goal, practitioner goal, etc.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Indicates whose goal this is - patient goal, practitioner goal, etc.', + }, + addresses: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Goaladdresses_addresses_Union', + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./medicationstatement.schema.js'), + require('./nutritionorder.schema.js'), + require('./servicerequest.schema.js'), + require('./riskassessment.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); + } + }, + }), + ), + description: + 'The identified conditions and other health record elements that are intended to be addressed by the goal.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Any comments related to the goal.', + }, + outcomeCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies the change (or lack of change) at the point when the status of the goal is assessed.', + }, + outcomeReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'GoaloutcomeReference_outcomeReference_Union', + description: "Details of what's changed (or not changed).", + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: "Details of what's changed (or not changed).", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/goaltarget.schema.js b/src/resources/4_0_0/schemas/goaltarget.schema.js new file mode 100644 index 00000000..7c4823d2 --- /dev/null +++ b/src/resources/4_0_0/schemas/goaltarget.schema.js @@ -0,0 +1,109 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Goaltarget Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Goaltarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + measure: { + type: require('./codeableconcept.schema.js'), + description: + 'The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.', + }, + detailQuantity: { + type: require('./quantity.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailRange: { + type: require('./range.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _detailString: { + type: require('./element.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailString: { + type: GraphQLString, + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _detailBoolean: { + type: require('./element.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailBoolean: { + type: GraphQLBoolean, + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _detailInteger: { + type: require('./element.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailInteger: { + type: GraphQLInt, + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + detailRatio: { + type: require('./ratio.schema.js'), + description: + 'The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.', + }, + _dueDate: { + type: require('./element.schema.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + dueDate: { + type: DateScalar, + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + dueDuration: { + type: require('./duration.schema.js'), + description: + 'Indicates either the date or the duration after start by which the goal should be met.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/graphdefinition.schema.js b/src/resources/4_0_0/schemas/graphdefinition.schema.js new file mode 100644 index 00000000..9c706cf9 --- /dev/null +++ b/src/resources/4_0_0/schemas/graphdefinition.schema.js @@ -0,0 +1,215 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary GraphDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'GraphDefinition', + description: + 'A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'GraphDefinition_Enum_schema', + values: { GraphDefinition: { value: 'GraphDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this graph definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this graph definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the graph definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the graph definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the graph definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the graph definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the graph definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the graph definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate graph definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the graph definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this graph definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this graph definition is needed and why it has been designed as it has.', + }, + _start: { + type: require('./element.schema.js'), + description: + 'The type of FHIR resource at which instances of this graph start.', + }, + start: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of FHIR resource at which instances of this graph start.', + }, + _profile: { + type: require('./element.schema.js'), + description: 'The profile that describes the use of the base resource.', + }, + profile: { + type: CanonicalScalar, + description: 'The profile that describes the use of the base resource.', + }, + link: { + type: new GraphQLList(require('./graphdefinitionlink.schema.js')), + description: 'Links this graph makes rules about.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/graphdefinitionlink.schema.js b/src/resources/4_0_0/schemas/graphdefinitionlink.schema.js new file mode 100644 index 00000000..8b786011 --- /dev/null +++ b/src/resources/4_0_0/schemas/graphdefinitionlink.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary GraphDefinitionlink Schema + */ +module.exports = new GraphQLObjectType({ + name: 'GraphDefinitionlink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _path: { + type: require('./element.schema.js'), + description: + 'A FHIR expression that identifies one of FHIR References to other resources.', + }, + path: { + type: GraphQLString, + description: + 'A FHIR expression that identifies one of FHIR References to other resources.', + }, + _sliceName: { + type: require('./element.schema.js'), + description: 'Which slice (if profiled).', + }, + sliceName: { + type: GraphQLString, + description: 'Which slice (if profiled).', + }, + _min: { + type: require('./element.schema.js'), + description: 'Minimum occurrences for this link.', + }, + min: { + type: GraphQLInt, + description: 'Minimum occurrences for this link.', + }, + _max: { + type: require('./element.schema.js'), + description: 'Maximum occurrences for this link.', + }, + max: { + type: GraphQLString, + description: 'Maximum occurrences for this link.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Information about why this link is of interest in this graph definition.', + }, + description: { + type: GraphQLString, + description: + 'Information about why this link is of interest in this graph definition.', + }, + target: { + type: new GraphQLList(require('./graphdefinitionlinktarget.schema.js')), + description: 'Potential target for the link.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/graphdefinitionlinktarget.schema.js b/src/resources/4_0_0/schemas/graphdefinitionlinktarget.schema.js new file mode 100644 index 00000000..42563bfa --- /dev/null +++ b/src/resources/4_0_0/schemas/graphdefinitionlinktarget.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary GraphDefinitionlinktarget Schema + */ +module.exports = new GraphQLObjectType({ + name: 'GraphDefinitionlinktarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'Type of resource this link refers to.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'Type of resource this link refers to.', + }, + _params: { + type: require('./element.schema.js'), + description: 'A set of parameters to look up.', + }, + params: { + type: GraphQLString, + description: 'A set of parameters to look up.', + }, + _profile: { + type: require('./element.schema.js'), + description: 'Profile for the target resource.', + }, + profile: { + type: CanonicalScalar, + description: 'Profile for the target resource.', + }, + compartment: { + type: new GraphQLList( + require('./graphdefinitionlinktargetcompartment.schema.js'), + ), + description: 'Compartment Consistency Rules.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/graphdefinitionlinktargetcompartment.schema.js b/src/resources/4_0_0/schemas/graphdefinitionlinktargetcompartment.schema.js new file mode 100644 index 00000000..20b25967 --- /dev/null +++ b/src/resources/4_0_0/schemas/graphdefinitionlinktargetcompartment.schema.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary GraphDefinitionlinktargetcompartment Schema + */ +module.exports = new GraphQLObjectType({ + name: 'GraphDefinitionlinktargetcompartment', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _use: { + type: require('./element.schema.js'), + description: + 'Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed.', + }, + _code: { + type: require('./element.schema.js'), + description: 'Identifies the compartment.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Identifies the compartment.', + }, + _rule: { + type: require('./element.schema.js'), + description: 'identical | matching | different | no-rule | custom.', + }, + rule: { + type: new GraphQLNonNull(CodeScalar), + description: 'identical | matching | different | no-rule | custom.', + }, + _expression: { + type: require('./element.schema.js'), + description: 'Custom rule, as a FHIRPath expression.', + }, + expression: { + type: GraphQLString, + description: 'Custom rule, as a FHIRPath expression.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Documentation for FHIRPath expression.', + }, + description: { + type: GraphQLString, + description: 'Documentation for FHIRPath expression.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/group.schema.js b/src/resources/4_0_0/schemas/group.schema.js new file mode 100644 index 00000000..31800a76 --- /dev/null +++ b/src/resources/4_0_0/schemas/group.schema.js @@ -0,0 +1,185 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Group Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Group', + description: + "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Group_Enum_schema', + values: { Group: { value: 'Group' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'A unique business identifier for this group.', + }, + _active: { + type: require('./element.schema.js'), + description: + 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', + }, + active: { + type: GraphQLBoolean, + description: + 'Indicates whether the record for the group is available for use or is merely being retained for historical purposes.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the broad classification of the kind of resources the group includes.', + }, + _actual: { + type: require('./element.schema.js'), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + actual: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + "Provides a specific type of resource the group includes; e.g. 'cow', 'syringe', etc.", + }, + _name: { + type: require('./element.schema.js'), + description: + 'A label assigned to the group for human identification and communication.', + }, + name: { + type: GraphQLString, + description: + 'A label assigned to the group for human identification and communication.', + }, + _quantity: { + type: require('./element.schema.js'), + description: + 'A count of the number of resource instances that are part of the group.', + }, + quantity: { + type: UnsignedIntScalar, + description: + 'A count of the number of resource instances that are part of the group.', + }, + managingEntity: { + type: new GraphQLUnionType({ + name: 'GroupmanagingEntity_managingEntity_Union', + description: + 'Entity responsible for defining and maintaining Group characteristics and/or registered members.', + types: () => [ + require('./organization.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'Entity responsible for defining and maintaining Group characteristics and/or registered members.', + }, + characteristic: { + type: new GraphQLList(require('./groupcharacteristic.schema.js')), + description: + 'Identifies traits whose presence r absence is shared by members of the group.', + }, + member: { + type: new GraphQLList(require('./groupmember.schema.js')), + description: + 'Identifies the resource instances that are members of the group.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/groupcharacteristic.schema.js b/src/resources/4_0_0/schemas/groupcharacteristic.schema.js new file mode 100644 index 00000000..c441d59e --- /dev/null +++ b/src/resources/4_0_0/schemas/groupcharacteristic.schema.js @@ -0,0 +1,88 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Groupcharacteristic Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Groupcharacteristic', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code that identifies the kind of trait being asserted.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + valueReference: { + type: new GraphQLNonNull(require('./resourcelist.schema')), + description: + "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", + }, + _exclude: { + type: require('./element.schema.js'), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + exclude: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'If true, indicates the characteristic is one that is NOT held by members of the group.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/groupmember.schema.js b/src/resources/4_0_0/schemas/groupmember.schema.js new file mode 100644 index 00000000..926ba7f1 --- /dev/null +++ b/src/resources/4_0_0/schemas/groupmember.schema.js @@ -0,0 +1,96 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Groupmember Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Groupmember', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + entity: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Groupmemberentity_entity_Union', + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.', + }, + period: { + type: require('./period.schema.js'), + description: 'The period that the member was in the group, if known.', + }, + _inactive: { + type: require('./element.schema.js'), + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + inactive: { + type: GraphQLBoolean, + description: + 'A flag to indicate that the member is no longer in the group, but previously may have been a member.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/guidanceresponse.schema.js b/src/resources/4_0_0/schemas/guidanceresponse.schema.js new file mode 100644 index 00000000..a4c0b66d --- /dev/null +++ b/src/resources/4_0_0/schemas/guidanceresponse.schema.js @@ -0,0 +1,287 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary GuidanceResponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'GuidanceResponse', + description: + 'A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'GuidanceResponse_Enum_schema', + values: { GuidanceResponse: { value: 'GuidanceResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + requestIdentifier: { + type: require('./identifier.schema.js'), + description: + 'The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Allows a service to provide unique, business identifiers for the response.', + }, + _moduleUri: { + type: require('./element.schema.js'), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + moduleUri: { + type: new GraphQLNonNull(UriScalar), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + _moduleCanonical: { + type: require('./element.schema.js'), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + moduleCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + moduleCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'An identifier, CodeableConcept or canonical reference to the guidance that was requested.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'GuidanceResponsesubject_subject_Union', + description: 'The patient for which the request was processed.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: 'The patient for which the request was processed.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'GuidanceResponseencounter_encounter_Union', + description: + 'The encounter during which this response was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The encounter during which this response was created or to which the creation of this record is tightly associated.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'Indicates when the guidance response was processed.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'Indicates when the guidance response was processed.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'GuidanceResponseperformer_performer_Union', + description: + 'Provides a reference to the device that performed the guidance.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Provides a reference to the device that performed the guidance.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Describes the reason for the guidance response in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'GuidanceResponsereasonReference_reasonReference_Union', + description: + 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Provides a mechanism to communicate additional information about the response.', + }, + evaluationMessage: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'GuidanceResponseevaluationMessage_evaluationMessage_Union', + description: + 'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.', + types: () => [require('./operationoutcome.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationOutcome') { + return require('./operationoutcome.schema.js'); + } + }, + }), + ), + description: + 'Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.', + }, + outputParameters: { + type: new GraphQLUnionType({ + name: 'GuidanceResponseoutputParameters_outputParameters_Union', + description: + 'The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.', + types: () => [require('./parameters.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Parameters') { + return require('./parameters.schema.js'); + } + }, + }), + description: + 'The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.', + }, + result: { + type: new GraphQLUnionType({ + name: 'GuidanceResponseresult_result_Union', + description: + 'The actions, if any, produced by the evaluation of the artifact.', + types: () => [ + require('./careplan.schema.js'), + require('./requestgroup.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'RequestGroup') { + return require('./requestgroup.schema.js'); + } + }, + }), + description: + 'The actions, if any, produced by the evaluation of the artifact.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: + 'If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/healthcareservice.schema.js b/src/resources/4_0_0/schemas/healthcareservice.schema.js new file mode 100644 index 00000000..5144fff8 --- /dev/null +++ b/src/resources/4_0_0/schemas/healthcareservice.schema.js @@ -0,0 +1,281 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary HealthcareService Schema + */ +module.exports = new GraphQLObjectType({ + name: 'HealthcareService', + description: 'The details of a healthcare service available at a location.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'HealthcareService_Enum_schema', + values: { HealthcareService: { value: 'HealthcareService' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'External identifiers for this item.', + }, + _active: { + type: require('./element.schema.js'), + description: + 'This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.', + }, + active: { + type: GraphQLBoolean, + description: + 'This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.', + }, + providedBy: { + type: new GraphQLUnionType({ + name: 'HealthcareServiceprovidedBy_providedBy_Union', + description: 'The organization that provides this healthcare service.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization that provides this healthcare service.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies the broad category of service being performed or delivered.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specific type of service that may be delivered or performed.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Collection of specialties handled by the service site. This is more of a medical term.', + }, + location: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'HealthcareServicelocation_location_Union', + description: + 'The location(s) where this healthcare service may be provided.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'The location(s) where this healthcare service may be provided.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + name: { + type: GraphQLString, + description: + 'Further description of the service as it would be presented to a consumer while searching.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + comment: { + type: GraphQLString, + description: + 'Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.', + }, + _extraDetails: { + type: require('./element.schema.js'), + description: + "Extra details about the service that can't be placed in the other fields.", + }, + extraDetails: { + type: GraphQLString, + description: + "Extra details about the service that can't be placed in the other fields.", + }, + photo: { + type: require('./attachment.schema.js'), + description: + 'If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'List of contacts related to this specific healthcare service.', + }, + coverageArea: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'HealthcareServicecoverageArea_coverageArea_Union', + description: + 'The location(s) that this service is available to (not where the service is provided).', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'The location(s) that this service is available to (not where the service is provided).', + }, + serviceProvisionCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The code(s) that detail the conditions under which the healthcare service is available/offered.', + }, + eligibility: { + type: new GraphQLList( + require('./healthcareserviceeligibility.schema.js'), + ), + description: + 'Does this service have specific eligibility requirements that need to be met in order to use the service?', + }, + program: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Programs that this service is applicable to.', + }, + characteristic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Collection of characteristics (attributes).', + }, + communication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.', + }, + referralMethod: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.', + }, + _appointmentRequired: { + type: require('./element.schema.js'), + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + appointmentRequired: { + type: GraphQLBoolean, + description: + 'Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.', + }, + availableTime: { + type: new GraphQLList( + require('./healthcareserviceavailabletime.schema.js'), + ), + description: 'A collection of times that the Service Site is available.', + }, + notAvailable: { + type: new GraphQLList( + require('./healthcareservicenotavailable.schema.js'), + ), + description: + 'The HealthcareService is not available during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.schema.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'HealthcareServiceendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/healthcareserviceavailabletime.schema.js b/src/resources/4_0_0/schemas/healthcareserviceavailabletime.schema.js new file mode 100644 index 00000000..07c8ba68 --- /dev/null +++ b/src/resources/4_0_0/schemas/healthcareserviceavailabletime.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary HealthcareServiceavailableTime Schema + */ +module.exports = new GraphQLObjectType({ + name: 'HealthcareServiceavailableTime', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _daysOfWeek: { + type: require('./element.schema.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.schema.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.schema.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.schema.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/healthcareserviceeligibility.schema.js b/src/resources/4_0_0/schemas/healthcareserviceeligibility.schema.js new file mode 100644 index 00000000..beb7f90b --- /dev/null +++ b/src/resources/4_0_0/schemas/healthcareserviceeligibility.schema.js @@ -0,0 +1,44 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary HealthcareServiceeligibility Schema + */ +module.exports = new GraphQLObjectType({ + name: 'HealthcareServiceeligibility', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'Coded value for the eligibility.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Describes the eligibility conditions for the service.', + }, + comment: { + type: GraphQLString, + description: 'Describes the eligibility conditions for the service.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/healthcareservicenotavailable.schema.js b/src/resources/4_0_0/schemas/healthcareservicenotavailable.schema.js new file mode 100644 index 00000000..17cd3514 --- /dev/null +++ b/src/resources/4_0_0/schemas/healthcareservicenotavailable.schema.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary HealthcareServicenotAvailable Schema + */ +module.exports = new GraphQLObjectType({ + name: 'HealthcareServicenotAvailable', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.schema.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/humanname.schema.js b/src/resources/4_0_0/schemas/humanname.schema.js new file mode 100644 index 00000000..3ba06e2f --- /dev/null +++ b/src/resources/4_0_0/schemas/humanname.schema.js @@ -0,0 +1,90 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary HumanName Schema + */ +module.exports = new GraphQLObjectType({ + name: 'HumanName', + description: + "Base StructureDefinition for HumanName Type: A human's name with the ability to identify parts and usage.", + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _use: { + type: require('./element.schema.js'), + description: 'Identifies the purpose for this name.', + }, + use: { + type: CodeScalar, + description: 'Identifies the purpose for this name.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.', + }, + text: { + type: GraphQLString, + description: + 'Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.', + }, + _family: { + type: require('./element.schema.js'), + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + family: { + type: GraphQLString, + description: + 'The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.', + }, + _given: { + type: require('./element.schema.js'), + description: 'Given name.', + }, + given: { + type: new GraphQLList(GraphQLString), + description: 'Given name.', + }, + _prefix: { + type: require('./element.schema.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + prefix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.', + }, + _suffix: { + type: require('./element.schema.js'), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + suffix: { + type: new GraphQLList(GraphQLString), + description: + 'Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Indicates the period of time when this name was valid for the named person.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/identifier.schema.js b/src/resources/4_0_0/schemas/identifier.schema.js new file mode 100644 index 00000000..e9e36032 --- /dev/null +++ b/src/resources/4_0_0/schemas/identifier.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Identifier Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Identifier', + description: + 'Base StructureDefinition for Identifier Type: An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _use: { + type: require('./element.schema.js'), + description: 'The purpose of this identifier.', + }, + use: { + type: CodeScalar, + description: 'The purpose of this identifier.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', + }, + system: { + type: UriScalar, + description: + 'Establishes the namespace for the value - that is, a URL that describes a set values that are unique.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', + }, + value: { + type: GraphQLString, + description: + 'The portion of the identifier typically relevant to the user and which is unique within the context of the system.', + }, + period: { + type: require('./period.schema.js'), + description: 'Time period during which identifier is/was valid for use.', + }, + assigner: { + type: new GraphQLUnionType({ + name: 'Identifierassigner_assigner_Union', + description: 'Organization that issued/manages the identifier.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that issued/manages the identifier.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/imagingstudy.schema.js b/src/resources/4_0_0/schemas/imagingstudy.schema.js new file mode 100644 index 00000000..407661f8 --- /dev/null +++ b/src/resources/4_0_0/schemas/imagingstudy.schema.js @@ -0,0 +1,360 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ImagingStudy Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImagingStudy', + description: + 'Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImagingStudy_Enum_schema', + values: { ImagingStudy: { value: 'ImagingStudy' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers for the ImagingStudy such as DICOM Study Instance UID, and Accession Number.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the ImagingStudy.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the ImagingStudy.', + }, + modality: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A list of all the series.modality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImagingStudysubject_subject_Union', + description: + 'The subject, typically a patient, of the imaging study.', + types: () => [ + require('./patient.schema.js'), + require('./device.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: 'The subject, typically a patient, of the imaging study.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'ImagingStudyencounter_encounter_Union', + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.', + }, + _started: { + type: require('./element.schema.js'), + description: 'Date and time the study started.', + }, + started: { + type: DateTimeScalar, + description: 'Date and time the study started.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudybasedOn_basedOn_Union', + description: + 'A list of the diagnostic requests that resulted in this imaging study being performed.', + types: () => [ + require('./careplan.schema.js'), + require('./servicerequest.schema.js'), + require('./appointment.schema.js'), + require('./appointmentresponse.schema.js'), + require('./task.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + if (data && data.resourceType === 'AppointmentResponse') { + return require('./appointmentresponse.schema.js'); + } + if (data && data.resourceType === 'Task') { + return require('./task.schema.js'); + } + }, + }), + ), + description: + 'A list of the diagnostic requests that resulted in this imaging study being performed.', + }, + referrer: { + type: new GraphQLUnionType({ + name: 'ImagingStudyreferrer_referrer_Union', + description: 'The requesting/referring physician.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'The requesting/referring physician.', + }, + interpreter: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyinterpreter_interpreter_Union', + description: + 'Who read the study and interpreted the images or other content.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + ), + description: + 'Who read the study and interpreted the images or other content.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyendpoint_endpoint_Union', + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.', + }, + _numberOfSeries: { + type: require('./element.schema.js'), + description: + 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', + }, + numberOfSeries: { + type: UnsignedIntScalar, + description: + 'Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.', + }, + _numberOfInstances: { + type: require('./element.schema.js'), + description: + 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + numberOfInstances: { + type: UnsignedIntScalar, + description: + 'Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + procedureReference: { + type: new GraphQLUnionType({ + name: 'ImagingStudyprocedureReference_procedureReference_Union', + description: 'The procedure which this ImagingStudy was part of.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + description: 'The procedure which this ImagingStudy was part of.', + }, + procedureCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The code for the performed procedure type.', + }, + location: { + type: new GraphQLUnionType({ + name: 'ImagingStudylocation_location_Union', + description: + 'The principal physical location where the ImagingStudy was performed.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The principal physical location where the ImagingStudy was performed.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Description of clinical condition indicating why the ImagingStudy was requested.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies this Study.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./media.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies this Study.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.', + }, + description: { + type: GraphQLString, + description: + 'The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.', + }, + series: { + type: new GraphQLList(require('./imagingstudyseries.schema.js')), + description: + 'Each study has one or more series of images or other content.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/imagingstudyseries.schema.js b/src/resources/4_0_0/schemas/imagingstudyseries.schema.js new file mode 100644 index 00000000..15d1e826 --- /dev/null +++ b/src/resources/4_0_0/schemas/imagingstudyseries.schema.js @@ -0,0 +1,141 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ImagingStudyseries Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImagingStudyseries', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _uid: { + type: require('./element.schema.js'), + description: 'The DICOM Series Instance UID for the series.', + }, + uid: { + type: new GraphQLNonNull(IdScalar), + description: 'The DICOM Series Instance UID for the series.', + }, + _number: { + type: require('./element.schema.js'), + description: 'The numeric identifier of this series in the study.', + }, + number: { + type: UnsignedIntScalar, + description: 'The numeric identifier of this series in the study.', + }, + modality: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The modality of this series sequence.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A description of the series.', + }, + description: { + type: GraphQLString, + description: 'A description of the series.', + }, + _numberOfInstances: { + type: require('./element.schema.js'), + description: + 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + numberOfInstances: { + type: UnsignedIntScalar, + description: + 'Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyseriesendpoint_endpoint_Union', + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.', + }, + bodySite: { + type: require('./coding.schema.js'), + description: + 'The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.', + }, + laterality: { + type: require('./coding.schema.js'), + description: + 'The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.', + }, + specimen: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImagingStudyseriesspecimen_specimen_Union', + description: + 'The specimen imaged, e.g., for whole slide imaging of a biopsy.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'The specimen imaged, e.g., for whole slide imaging of a biopsy.', + }, + _started: { + type: require('./element.schema.js'), + description: 'The date and time the series was started.', + }, + started: { + type: DateTimeScalar, + description: 'The date and time the series was started.', + }, + performer: { + type: new GraphQLList(require('./imagingstudyseriesperformer.schema.js')), + description: + 'Indicates who or what performed the series and how they were involved.', + }, + instance: { + type: new GraphQLList(require('./imagingstudyseriesinstance.schema.js')), + description: + 'A single SOP instance within the series, e.g. an image, or presentation state.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/imagingstudyseriesinstance.schema.js b/src/resources/4_0_0/schemas/imagingstudyseriesinstance.schema.js new file mode 100644 index 00000000..278c711e --- /dev/null +++ b/src/resources/4_0_0/schemas/imagingstudyseriesinstance.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary ImagingStudyseriesinstance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImagingStudyseriesinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _uid: { + type: require('./element.schema.js'), + description: + 'The DICOM SOP Instance UID for this image or other DICOM content.', + }, + uid: { + type: new GraphQLNonNull(IdScalar), + description: + 'The DICOM SOP Instance UID for this image or other DICOM content.', + }, + sopClass: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'DICOM instance type.', + }, + _number: { + type: require('./element.schema.js'), + description: 'The number of instance in the series.', + }, + number: { + type: UnsignedIntScalar, + description: 'The number of instance in the series.', + }, + _title: { + type: require('./element.schema.js'), + description: 'The description of the instance.', + }, + title: { + type: GraphQLString, + description: 'The description of the instance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/imagingstudyseriesperformer.schema.js b/src/resources/4_0_0/schemas/imagingstudyseriesperformer.schema.js new file mode 100644 index 00000000..82337b61 --- /dev/null +++ b/src/resources/4_0_0/schemas/imagingstudyseriesperformer.schema.js @@ -0,0 +1,84 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ImagingStudyseriesperformer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImagingStudyseriesperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.schema.js'), + description: + 'Distinguishes the type of involvement of the performer in the series.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImagingStudyseriesperformeractor_actor_Union', + description: 'Indicates who or what performed the series.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'Indicates who or what performed the series.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunization.schema.js b/src/resources/4_0_0/schemas/immunization.schema.js new file mode 100644 index 00000000..59681b0c --- /dev/null +++ b/src/resources/4_0_0/schemas/immunization.schema.js @@ -0,0 +1,317 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Immunization Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Immunization', + description: + 'Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Immunization_Enum_schema', + values: { Immunization: { value: 'Immunization' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'A unique identifier assigned to this immunization record.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current status of the immunization event.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current status of the immunization event.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the reason the immunization event was not performed.', + }, + vaccineCode: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Vaccine that was administered or was to be administered.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Immunizationpatient_patient_Union', + description: + 'The patient who either received or did not receive the immunization.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The patient who either received or did not receive the immunization.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Immunizationencounter_encounter_Union', + description: + 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The visit or admission or other contact between patient and health care provider the immunization was performed as part of.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'Date vaccine administered or was to be administered.', + }, + occurrenceDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'Date vaccine administered or was to be administered.', + }, + _occurrenceString: { + type: require('./element.schema.js'), + description: 'Date vaccine administered or was to be administered.', + }, + occurrenceString: { + type: new GraphQLNonNull(GraphQLString), + description: 'Date vaccine administered or was to be administered.', + }, + _recorded: { + type: require('./element.schema.js'), + description: + 'The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event.', + }, + recorded: { + type: DateTimeScalar, + description: + 'The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event.', + }, + _primarySource: { + type: require('./element.schema.js'), + description: + 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', + }, + primarySource: { + type: GraphQLBoolean, + description: + 'An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded.', + }, + reportOrigin: { + type: require('./codeableconcept.schema.js'), + description: + 'The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Immunizationlocation_location_Union', + description: + 'The service delivery location where the vaccine administration occurred.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The service delivery location where the vaccine administration occurred.', + }, + manufacturer: { + type: new GraphQLUnionType({ + name: 'Immunizationmanufacturer_manufacturer_Union', + description: 'Name of vaccine manufacturer.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Name of vaccine manufacturer.', + }, + _lotNumber: { + type: require('./element.schema.js'), + description: 'Lot number of the vaccine product.', + }, + lotNumber: { + type: GraphQLString, + description: 'Lot number of the vaccine product.', + }, + _expirationDate: { + type: require('./element.schema.js'), + description: 'Date vaccine batch expires.', + }, + expirationDate: { + type: DateScalar, + description: 'Date vaccine batch expires.', + }, + site: { + type: require('./codeableconcept.schema.js'), + description: 'Body site where vaccine was administered.', + }, + route: { + type: require('./codeableconcept.schema.js'), + description: + 'The path by which the vaccine product is taken into the body.', + }, + doseQuantity: { + type: require('./quantity.schema.js'), + description: 'The quantity of vaccine product that was administered.', + }, + performer: { + type: new GraphQLList(require('./immunizationperformer.schema.js')), + description: 'Indicates who performed the immunization event.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the immunization that is not conveyed by the other attributes.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reasons why the vaccine was administered.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ImmunizationreasonReference_reasonReference_Union', + description: + 'Condition, Observation or DiagnosticReport that supports why the immunization was administered.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + }, + }), + ), + description: + 'Condition, Observation or DiagnosticReport that supports why the immunization was administered.', + }, + _isSubpotent: { + type: require('./element.schema.js'), + description: + 'Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.', + }, + isSubpotent: { + type: GraphQLBoolean, + description: + 'Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent.', + }, + subpotentReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Reason why a dose is considered to be subpotent.', + }, + education: { + type: new GraphQLList(require('./immunizationeducation.schema.js')), + description: + 'Educational material presented to the patient (or guardian) at the time of vaccine administration.', + }, + programEligibility: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: "Indicates a patient's eligibility for a funding program.", + }, + fundingSource: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).', + }, + reaction: { + type: new GraphQLList(require('./immunizationreaction.schema.js')), + description: + 'Categorical data indicating that an adverse event is associated in time to an immunization.', + }, + protocolApplied: { + type: new GraphQLList(require('./immunizationprotocolapplied.schema.js')), + description: + 'The protocol (set of recommendations) being followed by the provider who administered the dose.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunizationeducation.schema.js b/src/resources/4_0_0/schemas/immunizationeducation.schema.js new file mode 100644 index 00000000..a3b0978f --- /dev/null +++ b/src/resources/4_0_0/schemas/immunizationeducation.schema.js @@ -0,0 +1,68 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Immunizationeducation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Immunizationeducation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _documentType: { + type: require('./element.schema.js'), + description: 'Identifier of the material presented to the patient.', + }, + documentType: { + type: GraphQLString, + description: 'Identifier of the material presented to the patient.', + }, + _reference: { + type: require('./element.schema.js'), + description: + 'Reference pointer to the educational material given to the patient if the information was on line.', + }, + reference: { + type: UriScalar, + description: + 'Reference pointer to the educational material given to the patient if the information was on line.', + }, + _publicationDate: { + type: require('./element.schema.js'), + description: 'Date the educational material was published.', + }, + publicationDate: { + type: DateTimeScalar, + description: 'Date the educational material was published.', + }, + _presentationDate: { + type: require('./element.schema.js'), + description: 'Date the educational material was given to the patient.', + }, + presentationDate: { + type: DateTimeScalar, + description: 'Date the educational material was given to the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunizationevaluation.schema.js b/src/resources/4_0_0/schemas/immunizationevaluation.schema.js new file mode 100644 index 00000000..0cf68ffe --- /dev/null +++ b/src/resources/4_0_0/schemas/immunizationevaluation.schema.js @@ -0,0 +1,225 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ImmunizationEvaluation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImmunizationEvaluation', + description: + "Describes a comparison of an immunization event against published recommendations to determine if the administration is 'valid' in relation to those recommendations.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImmunizationEvaluation_Enum_schema', + values: { + ImmunizationEvaluation: { value: 'ImmunizationEvaluation' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A unique identifier assigned to this immunization evaluation record.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Indicates the current status of the evaluation of the vaccination administration event.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the current status of the evaluation of the vaccination administration event.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImmunizationEvaluationpatient_patient_Union', + description: 'The individual for whom the evaluation is being done.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The individual for whom the evaluation is being done.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date the evaluation of the vaccine administration event was performed.', + }, + date: { + type: DateTimeScalar, + description: + 'The date the evaluation of the vaccine administration event was performed.', + }, + authority: { + type: new GraphQLUnionType({ + name: 'ImmunizationEvaluationauthority_authority_Union', + description: + 'Indicates the authority who published the protocol (e.g. ACIP).', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the authority who published the protocol (e.g. ACIP).', + }, + targetDisease: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The vaccine preventable disease the dose is being evaluated against.', + }, + immunizationEvent: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ImmunizationEvaluationimmunizationEvent_immunizationEvent_Union', + description: 'The vaccine administration event being evaluated.', + types: () => [require('./immunization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + }, + }), + ), + description: 'The vaccine administration event being evaluated.', + }, + doseStatus: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Indicates if the dose is valid or not valid with respect to the published recommendations.', + }, + doseStatusReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Additional information about the evaluation.', + }, + description: { + type: GraphQLString, + description: 'Additional information about the evaluation.', + }, + _series: { + type: require('./element.schema.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + _doseNumberPositiveInt: { + type: require('./element.schema.js'), + description: 'Nominal position in a series.', + }, + doseNumberPositiveInt: { + type: PositiveIntScalar, + description: 'Nominal position in a series.', + }, + _doseNumberString: { + type: require('./element.schema.js'), + description: 'Nominal position in a series.', + }, + doseNumberString: { + type: GraphQLString, + description: 'Nominal position in a series.', + }, + _seriesDosesPositiveInt: { + type: require('./element.schema.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesPositiveInt: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + _seriesDosesString: { + type: require('./element.schema.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesString: { + type: GraphQLString, + description: 'The recommended number of doses to achieve immunity.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunizationperformer.schema.js b/src/resources/4_0_0/schemas/immunizationperformer.schema.js new file mode 100644 index 00000000..d97bf29d --- /dev/null +++ b/src/resources/4_0_0/schemas/immunizationperformer.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Immunizationperformer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Immunizationperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the type of performance (e.g. ordering provider, administering provider, etc.).', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Immunizationperformeractor_actor_Union', + description: + 'The practitioner or organization who performed the action.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The practitioner or organization who performed the action.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunizationprotocolapplied.schema.js b/src/resources/4_0_0/schemas/immunizationprotocolapplied.schema.js new file mode 100644 index 00000000..9bc3ab27 --- /dev/null +++ b/src/resources/4_0_0/schemas/immunizationprotocolapplied.schema.js @@ -0,0 +1,101 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ImmunizationprotocolApplied Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImmunizationprotocolApplied', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _series: { + type: require('./element.schema.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + authority: { + type: new GraphQLUnionType({ + name: 'ImmunizationprotocolAppliedauthority_authority_Union', + description: + 'Indicates the authority who published the protocol (e.g. ACIP) that is being followed.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the authority who published the protocol (e.g. ACIP) that is being followed.', + }, + targetDisease: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The vaccine preventable disease the dose is being administered against.', + }, + _doseNumberPositiveInt: { + type: require('./element.schema.js'), + description: 'Nominal position in a series.', + }, + doseNumberPositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'Nominal position in a series.', + }, + _doseNumberString: { + type: require('./element.schema.js'), + description: 'Nominal position in a series.', + }, + doseNumberString: { + type: new GraphQLNonNull(GraphQLString), + description: 'Nominal position in a series.', + }, + _seriesDosesPositiveInt: { + type: require('./element.schema.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesPositiveInt: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + _seriesDosesString: { + type: require('./element.schema.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesString: { + type: GraphQLString, + description: 'The recommended number of doses to achieve immunity.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunizationreaction.schema.js b/src/resources/4_0_0/schemas/immunizationreaction.schema.js new file mode 100644 index 00000000..99f5eff7 --- /dev/null +++ b/src/resources/4_0_0/schemas/immunizationreaction.schema.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Immunizationreaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Immunizationreaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _date: { + type: require('./element.schema.js'), + description: 'Date of reaction to the immunization.', + }, + date: { + type: DateTimeScalar, + description: 'Date of reaction to the immunization.', + }, + detail: { + type: new GraphQLUnionType({ + name: 'Immunizationreactiondetail_detail_Union', + description: 'Details of the reaction.', + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + description: 'Details of the reaction.', + }, + _reported: { + type: require('./element.schema.js'), + description: 'Self-reported indicator.', + }, + reported: { + type: GraphQLBoolean, + description: 'Self-reported indicator.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunizationrecommendation.schema.js b/src/resources/4_0_0/schemas/immunizationrecommendation.schema.js new file mode 100644 index 00000000..4ad1bcdd --- /dev/null +++ b/src/resources/4_0_0/schemas/immunizationrecommendation.schema.js @@ -0,0 +1,138 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ImmunizationRecommendation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImmunizationRecommendation', + description: + "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImmunizationRecommendation_Enum_schema', + values: { + ImmunizationRecommendation: { value: 'ImmunizationRecommendation' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A unique identifier assigned to this particular recommendation record.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImmunizationRecommendationpatient_patient_Union', + description: 'The patient the recommendation(s) are for.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient the recommendation(s) are for.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date the immunization recommendation(s) were created.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date the immunization recommendation(s) were created.', + }, + authority: { + type: new GraphQLUnionType({ + name: 'ImmunizationRecommendationauthority_authority_Union', + description: + 'Indicates the authority who published the protocol (e.g. ACIP).', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the authority who published the protocol (e.g. ACIP).', + }, + recommendation: { + type: new GraphQLList( + new GraphQLNonNull( + require('./immunizationrecommendationrecommendation.schema.js'), + ), + ), + description: 'Vaccine administration recommendations.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunizationrecommendationrecommendation.schema.js b/src/resources/4_0_0/schemas/immunizationrecommendationrecommendation.schema.js new file mode 100644 index 00000000..cea0df43 --- /dev/null +++ b/src/resources/4_0_0/schemas/immunizationrecommendationrecommendation.schema.js @@ -0,0 +1,167 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary ImmunizationRecommendationrecommendation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImmunizationRecommendationrecommendation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + vaccineCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Vaccine(s) or vaccine group that pertain to the recommendation.', + }, + targetDisease: { + type: require('./codeableconcept.schema.js'), + description: 'The targeted disease for the recommendation.', + }, + contraindicatedVaccineCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Vaccine(s) which should not be used to fulfill the recommendation.', + }, + forecastStatus: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Indicates the patient status with respect to the path to immunity for the target disease.', + }, + forecastReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason for the assigned forecast status.', + }, + dateCriterion: { + type: new GraphQLList( + require('./immunizationrecommendationrecommendationdatecriterion.schema.js'), + ), + description: + 'Vaccine date recommendations. For example, earliest date to administer, latest date to administer, etc.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + description: { + type: GraphQLString, + description: + 'Contains the description about the protocol under which the vaccine was administered.', + }, + _series: { + type: require('./element.schema.js'), + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + series: { + type: GraphQLString, + description: + 'One possible path to achieve presumed immunity against a disease - within the context of an authority.', + }, + _doseNumberPositiveInt: { + type: require('./element.schema.js'), + description: + 'Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).', + }, + doseNumberPositiveInt: { + type: PositiveIntScalar, + description: + 'Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).', + }, + _doseNumberString: { + type: require('./element.schema.js'), + description: + 'Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).', + }, + doseNumberString: { + type: GraphQLString, + description: + 'Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose).', + }, + _seriesDosesPositiveInt: { + type: require('./element.schema.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesPositiveInt: { + type: PositiveIntScalar, + description: 'The recommended number of doses to achieve immunity.', + }, + _seriesDosesString: { + type: require('./element.schema.js'), + description: 'The recommended number of doses to achieve immunity.', + }, + seriesDosesString: { + type: GraphQLString, + description: 'The recommended number of doses to achieve immunity.', + }, + supportingImmunization: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ImmunizationRecommendationrecommendationsupportingImmunization_supportingImmunization_Union', + description: + 'Immunization event history and/or evaluation that supports the status and recommendation.', + types: () => [ + require('./immunization.schema.js'), + require('./immunizationevaluation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + if (data && data.resourceType === 'ImmunizationEvaluation') { + return require('./immunizationevaluation.schema.js'); + } + }, + }), + ), + description: + 'Immunization event history and/or evaluation that supports the status and recommendation.', + }, + supportingPatientInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'ImmunizationRecommendationrecommendationsupportingPatientInformation_supportingPatientInformation_Union', + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Patient Information that supports the status and recommendation. This includes patient observations, adverse reactions and allergy/intolerance information.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js b/src/resources/4_0_0/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js new file mode 100644 index 00000000..9e32412c --- /dev/null +++ b/src/resources/4_0_0/schemas/immunizationrecommendationrecommendationdatecriterion.schema.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ImmunizationRecommendationrecommendationdateCriterion Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImmunizationRecommendationrecommendationdateCriterion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Date classification of recommendation. For example, earliest date to give, latest date to give, etc.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + value: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date whose meaning is specified by dateCriterion.code.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguide.schema.js b/src/resources/4_0_0/schemas/implementationguide.schema.js new file mode 100644 index 00000000..c099b3c1 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguide.schema.js @@ -0,0 +1,254 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuide Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuide', + description: + 'A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ImplementationGuide_Enum_schema', + values: { ImplementationGuide: { value: 'ImplementationGuide' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the implementation guide.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the implementation guide.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this implementation guide. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this implementation guide. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the implementation guide was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the implementation guide was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the implementation guide.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the implementation guide.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the implementation guide from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the implementation guide from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate implementation guide instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the implementation guide is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide.', + }, + _packageId: { + type: require('./element.schema.js'), + description: + 'The NPM package name for this Implementation Guide, used in the NPM package distribution, which is the primary mechanism by which FHIR based tooling manages IG dependencies. This value must be globally unique, and should be assigned with care.', + }, + packageId: { + type: new GraphQLNonNull(IdScalar), + description: + 'The NPM package name for this Implementation Guide, used in the NPM package distribution, which is the primary mechanism by which FHIR based tooling manages IG dependencies. This value must be globally unique, and should be assigned with care.', + }, + _license: { + type: require('./element.schema.js'), + description: + "The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'.", + }, + license: { + type: CodeScalar, + description: + "The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'.", + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version(s) of the FHIR specification that this ImplementationGuide targets - e.g. describes how to use. The value of this element is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.0. for this version.', + }, + fhirVersion: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'The version(s) of the FHIR specification that this ImplementationGuide targets - e.g. describes how to use. The value of this element is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.0. for this version.', + }, + dependsOn: { + type: new GraphQLList( + require('./implementationguidedependson.schema.js'), + ), + description: + 'Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.', + }, + global: { + type: new GraphQLList(require('./implementationguideglobal.schema.js')), + description: + 'A set of profiles that all resources covered by this implementation guide must conform to.', + }, + definition: { + type: require('./implementationguidedefinition.schema.js'), + description: + 'The information needed by an IG publisher tool to publish the whole implementation guide.', + }, + manifest: { + type: require('./implementationguidemanifest.schema.js'), + description: + 'Information about an assembled implementation guide, created by the publication tooling.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidedefinition.schema.js b/src/resources/4_0_0/schemas/implementationguidedefinition.schema.js new file mode 100644 index 00000000..9ccacf0e --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidedefinition.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ImplementationGuidedefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidedefinition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + grouping: { + type: new GraphQLList( + require('./implementationguidedefinitiongrouping.schema.js'), + ), + description: + 'A logical group of resources. Logical groups can be used when building pages.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull( + require('./implementationguidedefinitionresource.schema.js'), + ), + ), + description: + 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', + }, + page: { + type: require('./implementationguidedefinitionpage.schema.js'), + description: + 'A page / section in the implementation guide. The root page is the implementation guide home page.', + }, + parameter: { + type: new GraphQLList( + require('./implementationguidedefinitionparameter.schema.js'), + ), + description: 'Defines how IG is built by tools.', + }, + template: { + type: new GraphQLList( + require('./implementationguidedefinitiontemplate.schema.js'), + ), + description: 'A template for building resources.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidedefinitiongrouping.schema.js b/src/resources/4_0_0/schemas/implementationguidedefinitiongrouping.schema.js new file mode 100644 index 00000000..96752ba2 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidedefinitiongrouping.schema.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ImplementationGuidedefinitiongrouping Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidedefinitiongrouping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'The human-readable title to display for the package of resources when rendering the implementation guide.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The human-readable title to display for the package of resources when rendering the implementation guide.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Human readable text describing the package.', + }, + description: { + type: GraphQLString, + description: 'Human readable text describing the package.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidedefinitionpage.schema.js b/src/resources/4_0_0/schemas/implementationguidedefinitionpage.schema.js new file mode 100644 index 00000000..fc77d427 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidedefinitionpage.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedefinitionpage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidedefinitionpage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _nameUrl: { + type: require('./element.schema.js'), + description: 'The source address for the page.', + }, + nameUrl: { + type: new GraphQLNonNull(UrlScalar), + description: 'The source address for the page.', + }, + nameReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ImplementationGuidedefinitionpagenameReference_nameReference_Union', + description: 'The source address for the page.', + types: () => [require('./binary.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Binary') { + return require('./binary.schema.js'); + } + }, + }), + ), + description: 'The source address for the page.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + title: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.', + }, + _generation: { + type: require('./element.schema.js'), + description: 'A code that indicates how the page is generated.', + }, + generation: { + type: new GraphQLNonNull(CodeScalar), + description: 'A code that indicates how the page is generated.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidedefinitionparameter.schema.js b/src/resources/4_0_0/schemas/implementationguidedefinitionparameter.schema.js new file mode 100644 index 00000000..d1d6993a --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidedefinitionparameter.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedefinitionparameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidedefinitionparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'apply | path-resource | path-pages | path-tx-cache | expansion-parameter | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'apply | path-resource | path-pages | path-tx-cache | expansion-parameter | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.', + }, + _value: { + type: require('./element.schema.js'), + description: 'Value for named type.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'Value for named type.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidedefinitionresource.schema.js b/src/resources/4_0_0/schemas/implementationguidedefinitionresource.schema.js new file mode 100644 index 00000000..34aed271 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidedefinitionresource.schema.js @@ -0,0 +1,118 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedefinitionresource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidedefinitionresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'ImplementationGuidedefinitionresourcereference_reference_Union', + description: 'Where this resource is found.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Where this resource is found.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'Indicates the FHIR Version(s) this artifact is intended to apply to. If no versions are specified, the resource is assumed to apply to all the versions stated in ImplementationGuide.fhirVersion.', + }, + fhirVersion: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates the FHIR Version(s) this artifact is intended to apply to. If no versions are specified, the resource is assumed to apply to all the versions stated in ImplementationGuide.fhirVersion.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + name: { + type: GraphQLString, + description: + 'A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + description: { + type: GraphQLString, + description: + 'A description of the reason that a resource has been included in the implementation guide.', + }, + _exampleBoolean: { + type: require('./element.schema.js'), + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + exampleBoolean: { + type: GraphQLBoolean, + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + _exampleCanonical: { + type: require('./element.schema.js'), + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + exampleCanonical: { + type: CanonicalScalar, + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + _groupingId: { + type: require('./element.schema.js'), + description: + 'Reference to the id of the grouping this resource appears in.', + }, + groupingId: { + type: IdScalar, + description: + 'Reference to the id of the grouping this resource appears in.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidedefinitiontemplate.schema.js b/src/resources/4_0_0/schemas/implementationguidedefinitiontemplate.schema.js new file mode 100644 index 00000000..74cbb128 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidedefinitiontemplate.schema.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedefinitiontemplate Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidedefinitiontemplate', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: 'Type of template specified.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Type of template specified.', + }, + _source: { + type: require('./element.schema.js'), + description: 'The source location for the template.', + }, + source: { + type: new GraphQLNonNull(GraphQLString), + description: 'The source location for the template.', + }, + _scope: { + type: require('./element.schema.js'), + description: 'The scope in which the template applies.', + }, + scope: { + type: GraphQLString, + description: 'The scope in which the template applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidedependson.schema.js b/src/resources/4_0_0/schemas/implementationguidedependson.schema.js new file mode 100644 index 00000000..50f65527 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidedependson.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidedependsOn Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidedependsOn', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _uri: { + type: require('./element.schema.js'), + description: + 'A canonical reference to the Implementation guide for the dependency.', + }, + uri: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A canonical reference to the Implementation guide for the dependency.', + }, + _packageId: { + type: require('./element.schema.js'), + description: + 'The NPM package name for the Implementation Guide that this IG depends on.', + }, + packageId: { + type: IdScalar, + description: + 'The NPM package name for the Implementation Guide that this IG depends on.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the IG that is depended on, when the correct version is required to understand the IG correctly.', + }, + version: { + type: GraphQLString, + description: + 'The version of the IG that is depended on, when the correct version is required to understand the IG correctly.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguideglobal.schema.js b/src/resources/4_0_0/schemas/implementationguideglobal.schema.js new file mode 100644 index 00000000..2a593441 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguideglobal.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuideglobal Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuideglobal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of resource that all instances must conform to.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of resource that all instances must conform to.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'A reference to the profile that all instances must conform to.', + }, + profile: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A reference to the profile that all instances must conform to.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidemanifest.schema.js b/src/resources/4_0_0/schemas/implementationguidemanifest.schema.js new file mode 100644 index 00000000..4c155e98 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidemanifest.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidemanifest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidemanifest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _rendering: { + type: require('./element.schema.js'), + description: + 'A pointer to official web page, PDF or other rendering of the implementation guide.', + }, + rendering: { + type: UrlScalar, + description: + 'A pointer to official web page, PDF or other rendering of the implementation guide.', + }, + resource: { + type: new GraphQLList( + new GraphQLNonNull( + require('./implementationguidemanifestresource.schema.js'), + ), + ), + description: + 'A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.', + }, + page: { + type: new GraphQLList( + require('./implementationguidemanifestpage.schema.js'), + ), + description: 'Information about a page within the IG.', + }, + _image: { + type: require('./element.schema.js'), + description: + 'Indicates a relative path to an image that exists within the IG.', + }, + image: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates a relative path to an image that exists within the IG.', + }, + _other: { + type: require('./element.schema.js'), + description: + 'Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.', + }, + other: { + type: new GraphQLList(GraphQLString), + description: + 'Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidemanifestpage.schema.js b/src/resources/4_0_0/schemas/implementationguidemanifestpage.schema.js new file mode 100644 index 00000000..3d501d51 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidemanifestpage.schema.js @@ -0,0 +1,61 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ImplementationGuidemanifestpage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidemanifestpage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Relative path to the page.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Relative path to the page.', + }, + _title: { + type: require('./element.schema.js'), + description: 'Label for the page intended for human display.', + }, + title: { + type: GraphQLString, + description: 'Label for the page intended for human display.', + }, + _anchor: { + type: require('./element.schema.js'), + description: 'The name of an anchor available on the page.', + }, + anchor: { + type: new GraphQLList(GraphQLString), + description: 'The name of an anchor available on the page.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/implementationguidemanifestresource.schema.js b/src/resources/4_0_0/schemas/implementationguidemanifestresource.schema.js new file mode 100644 index 00000000..802e87d8 --- /dev/null +++ b/src/resources/4_0_0/schemas/implementationguidemanifestresource.schema.js @@ -0,0 +1,86 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary ImplementationGuidemanifestresource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ImplementationGuidemanifestresource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + reference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ImplementationGuidemanifestresourcereference_reference_Union', + description: 'Where this resource is found.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Where this resource is found.', + }, + _exampleBoolean: { + type: require('./element.schema.js'), + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + exampleBoolean: { + type: GraphQLBoolean, + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + _exampleCanonical: { + type: require('./element.schema.js'), + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + exampleCanonical: { + type: CanonicalScalar, + description: + 'If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.', + }, + _relativePath: { + type: require('./element.schema.js'), + description: + 'The relative path for primary page for this resource within the IG.', + }, + relativePath: { + type: UrlScalar, + description: + 'The relative path for primary page for this resource within the IG.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplan.schema.js b/src/resources/4_0_0/schemas/insuranceplan.schema.js new file mode 100644 index 00000000..296e9f03 --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplan.schema.js @@ -0,0 +1,222 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary InsurancePlan Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlan', + description: + 'Details of a Health Insurance product/plan provided by an organization.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'InsurancePlan_Enum_schema', + values: { InsurancePlan: { value: 'InsurancePlan' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this health insurance product which remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the health insurance product.', + }, + status: { + type: CodeScalar, + description: 'The current state of the health insurance product.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The kind of health insurance product.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Official name of the health insurance product as designated by the owner.', + }, + name: { + type: GraphQLString, + description: + 'Official name of the health insurance product as designated by the owner.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'A list of alternate names that the product is known as, or was known as in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the product is known as, or was known as in the past.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time that the health insurance product is available.', + }, + ownedBy: { + type: new GraphQLUnionType({ + name: 'InsurancePlanownedBy_ownedBy_Union', + description: + "The entity that is providing the health insurance product and underwriting the risk. This is typically an insurance carriers, other third-party payers, or health plan sponsors comonly referred to as 'payers'.", + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "The entity that is providing the health insurance product and underwriting the risk. This is typically an insurance carriers, other third-party payers, or health plan sponsors comonly referred to as 'payers'.", + }, + administeredBy: { + type: new GraphQLUnionType({ + name: 'InsurancePlanadministeredBy_administeredBy_Union', + description: + 'An organization which administer other services such as underwriting, customer service and/or claims processing on behalf of the health insurance product owner.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'An organization which administer other services such as underwriting, customer service and/or claims processing on behalf of the health insurance product owner.', + }, + coverageArea: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'InsurancePlancoverageArea_coverageArea_Union', + description: + "The geographic region in which a health insurance product's benefits apply.", + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + "The geographic region in which a health insurance product's benefits apply.", + }, + contact: { + type: new GraphQLList(require('./insuranceplancontact.schema.js')), + description: + 'The contact for the health insurance product for a certain purpose.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'InsurancePlanendpoint_endpoint_Union', + description: + 'The technical endpoints providing access to services operated for the health insurance product.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'The technical endpoints providing access to services operated for the health insurance product.', + }, + network: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'InsurancePlannetwork_network_Union', + description: + 'Reference to the network included in the health insurance product.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'Reference to the network included in the health insurance product.', + }, + coverage: { + type: new GraphQLList(require('./insuranceplancoverage.schema.js')), + description: + 'Details about the coverage offered by the insurance product.', + }, + plan: { + type: new GraphQLList(require('./insuranceplanplan.schema.js')), + description: 'Details about an insurance plan.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplancontact.schema.js b/src/resources/4_0_0/schemas/insuranceplancontact.schema.js new file mode 100644 index 00000000..b355eda6 --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplancontact.schema.js @@ -0,0 +1,49 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary InsurancePlancontact Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlancontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + purpose: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates a purpose for which the contact can be reached.', + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', + }, + address: { + type: require('./address.schema.js'), + description: 'Visiting or postal addresses for the contact.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplancoverage.schema.js b/src/resources/4_0_0/schemas/insuranceplancoverage.schema.js new file mode 100644 index 00000000..5c2d87a2 --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplancoverage.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlancoverage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlancoverage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Type of coverage (Medical; Dental; Mental Health; Substance Abuse; Vision; Drug; Short Term; Long Term Care; Hospice; Home Health).', + }, + network: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'InsurancePlancoveragenetwork_network_Union', + description: + 'Reference to the network that providing the type of coverage.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'Reference to the network that providing the type of coverage.', + }, + benefit: { + type: new GraphQLList( + new GraphQLNonNull(require('./insuranceplancoveragebenefit.schema.js')), + ), + description: 'Specific benefits under this type of coverage.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplancoveragebenefit.schema.js b/src/resources/4_0_0/schemas/insuranceplancoveragebenefit.schema.js new file mode 100644 index 00000000..db7be33e --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplancoveragebenefit.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlancoveragebenefit Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlancoveragebenefit', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Type of benefit (primary care; speciality care; inpatient; outpatient).', + }, + _requirement: { + type: require('./element.schema.js'), + description: + 'The referral requirements to have access/coverage for this benefit.', + }, + requirement: { + type: GraphQLString, + description: + 'The referral requirements to have access/coverage for this benefit.', + }, + limit: { + type: new GraphQLList( + require('./insuranceplancoveragebenefitlimit.schema.js'), + ), + description: 'The specific limits on the benefit.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplancoveragebenefitlimit.schema.js b/src/resources/4_0_0/schemas/insuranceplancoveragebenefitlimit.schema.js new file mode 100644 index 00000000..5319207e --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplancoveragebenefitlimit.schema.js @@ -0,0 +1,41 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary InsurancePlancoveragebenefitlimit Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlancoveragebenefitlimit', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + value: { + type: require('./quantity.schema.js'), + description: + 'The maximum amount of a service item a plan will pay for a covered benefit. For examples. wellness visits, or eyeglasses.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The specific limit on the benefit.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplanplan.schema.js b/src/resources/4_0_0/schemas/insuranceplanplan.schema.js new file mode 100644 index 00000000..97610e1b --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplanplan.schema.js @@ -0,0 +1,94 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlanplan Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlanplan', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this health insurance plan which remain constant as the resource is updated and propagates from server to server.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + "Type of plan. For example, 'Platinum' or 'High Deductable'.", + }, + coverageArea: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'InsurancePlanplancoverageArea_coverageArea_Union', + description: + "The geographic region in which a health insurance plan's benefits apply.", + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + "The geographic region in which a health insurance plan's benefits apply.", + }, + network: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'InsurancePlanplannetwork_network_Union', + description: + 'Reference to the network that providing the type of coverage.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'Reference to the network that providing the type of coverage.', + }, + generalCost: { + type: new GraphQLList( + require('./insuranceplanplangeneralcost.schema.js'), + ), + description: 'Overall costs associated with the plan.', + }, + specificCost: { + type: new GraphQLList( + require('./insuranceplanplanspecificcost.schema.js'), + ), + description: + 'Costs associated with the coverage provided by the product.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplanplangeneralcost.schema.js b/src/resources/4_0_0/schemas/insuranceplanplangeneralcost.schema.js new file mode 100644 index 00000000..24986091 --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplanplangeneralcost.schema.js @@ -0,0 +1,59 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary InsurancePlanplangeneralCost Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlanplangeneralCost', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Type of cost.', + }, + _groupSize: { + type: require('./element.schema.js'), + description: 'Number of participants enrolled in the plan.', + }, + groupSize: { + type: PositiveIntScalar, + description: 'Number of participants enrolled in the plan.', + }, + cost: { + type: require('./money.schema.js'), + description: 'Value of the cost.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Additional information about the general costs associated with this plan.', + }, + comment: { + type: GraphQLString, + description: + 'Additional information about the general costs associated with this plan.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplanplanspecificcost.schema.js b/src/resources/4_0_0/schemas/insuranceplanplanspecificcost.schema.js new file mode 100644 index 00000000..a042200e --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplanplanspecificcost.schema.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlanplanspecificCost Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlanplanspecificCost', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'General category of benefit (Medical; Dental; Vision; Drug; Mental Health; Substance Abuse; Hospice, Home Health).', + }, + benefit: { + type: new GraphQLList( + require('./insuranceplanplanspecificcostbenefit.schema.js'), + ), + description: + 'List of the specific benefits under this category of benefit.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplanplanspecificcostbenefit.schema.js b/src/resources/4_0_0/schemas/insuranceplanplanspecificcostbenefit.schema.js new file mode 100644 index 00000000..ba80d09f --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplanplanspecificcostbenefit.schema.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlanplanspecificCostbenefit Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlanplanspecificCostbenefit', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Type of specific benefit (preventative; primary care office visit; speciality office visit; hospitalization; emergency room; urgent care).', + }, + cost: { + type: new GraphQLList( + require('./insuranceplanplanspecificcostbenefitcost.schema.js'), + ), + description: 'List of the costs associated with a specific benefit.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/insuranceplanplanspecificcostbenefitcost.schema.js b/src/resources/4_0_0/schemas/insuranceplanplanspecificcostbenefitcost.schema.js new file mode 100644 index 00000000..0a36a811 --- /dev/null +++ b/src/resources/4_0_0/schemas/insuranceplanplanspecificcostbenefitcost.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary InsurancePlanplanspecificCostbenefitcost Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InsurancePlanplanspecificCostbenefitcost', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Type of cost (copay; individual cap; family cap; coinsurance; deductible).', + }, + applicability: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether the cost applies to in-network or out-of-network providers (in-network; out-of-network; other).', + }, + qualifiers: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Additional information about the cost, such as information about funding sources (e.g. HSA, HRA, FSA, RRA).', + }, + value: { + type: require('./quantity.schema.js'), + description: + 'The actual cost value. (some of the costs may be represented as percentages rather than currency, e.g. 10% coinsurance).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/invoice.schema.js b/src/resources/4_0_0/schemas/invoice.schema.js new file mode 100644 index 00000000..7eaeda34 --- /dev/null +++ b/src/resources/4_0_0/schemas/invoice.schema.js @@ -0,0 +1,229 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Invoice Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Invoice', + description: + 'Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Invoice_Enum_schema', + values: { Invoice: { value: 'Invoice' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the Invoice.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the Invoice.', + }, + _cancelledReason: { + type: require('./element.schema.js'), + description: + 'In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).', + }, + cancelledReason: { + type: GraphQLString, + description: + 'In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Invoicesubject_subject_Union', + description: + 'The individual or set of individuals receiving the goods and services billed in this invoice.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The individual or set of individuals receiving the goods and services billed in this invoice.', + }, + recipient: { + type: new GraphQLUnionType({ + name: 'Invoicerecipient_recipient_Union', + description: + 'The individual or Organization responsible for balancing of this invoice.', + types: () => [ + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'The individual or Organization responsible for balancing of this invoice.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date/time(s) of when this Invoice was posted.', + }, + date: { + type: DateTimeScalar, + description: 'Date/time(s) of when this Invoice was posted.', + }, + participant: { + type: new GraphQLList(require('./invoiceparticipant.schema.js')), + description: + 'Indicates who or what performed or participated in the charged service.', + }, + issuer: { + type: new GraphQLUnionType({ + name: 'Invoiceissuer_issuer_Union', + description: 'The organizationissuing the Invoice.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organizationissuing the Invoice.', + }, + account: { + type: new GraphQLUnionType({ + name: 'Invoiceaccount_account_Union', + description: + 'Account which is supposed to be balanced with this Invoice.', + types: () => [require('./account.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + }, + }), + description: + 'Account which is supposed to be balanced with this Invoice.', + }, + lineItem: { + type: new GraphQLList(require('./invoicelineitem.schema.js')), + description: + 'Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource.', + }, + totalNet: { + type: require('./money.schema.js'), + description: 'Invoice total , taxes excluded.', + }, + totalGross: { + type: require('./money.schema.js'), + description: 'Invoice total, tax included.', + }, + _paymentTerms: { + type: require('./element.schema.js'), + description: + 'Payment details such as banking details, period of payment, deductibles, methods of payment.', + }, + paymentTerms: { + type: GraphQLString, + description: + 'Payment details such as banking details, period of payment, deductibles, methods of payment.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the invoice by the issuer, subject, or other participants.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/invoicelineitem.schema.js b/src/resources/4_0_0/schemas/invoicelineitem.schema.js new file mode 100644 index 00000000..f225d8ab --- /dev/null +++ b/src/resources/4_0_0/schemas/invoicelineitem.schema.js @@ -0,0 +1,76 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary InvoicelineItem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InvoicelineItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _sequence: { + type: require('./element.schema.js'), + description: 'Sequence in which the items appear on the invoice.', + }, + sequence: { + type: PositiveIntScalar, + description: 'Sequence in which the items appear on the invoice.', + }, + chargeItemReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'InvoicelineItemchargeItemReference_chargeItemReference_Union', + description: + 'The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.', + types: () => [require('./chargeitem.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ChargeItem') { + return require('./chargeitem.schema.js'); + } + }, + }), + ), + description: + 'The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.', + }, + chargeItemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.', + }, + priceComponent: { + type: new GraphQLList( + require('./invoicelineitempricecomponent.schema.js'), + ), + description: + 'The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/invoicelineitempricecomponent.schema.js b/src/resources/4_0_0/schemas/invoicelineitempricecomponent.schema.js new file mode 100644 index 00000000..260304b8 --- /dev/null +++ b/src/resources/4_0_0/schemas/invoicelineitempricecomponent.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary InvoicelineItempriceComponent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'InvoicelineItempriceComponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'This code identifies the type of the component.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'This code identifies the type of the component.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'The factor that has been applied on the base price for calculating this component.', + }, + factor: { + type: GraphQLFloat, + description: + 'The factor that has been applied on the base price for calculating this component.', + }, + amount: { + type: require('./money.schema.js'), + description: 'The amount calculated for this component.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/invoiceparticipant.schema.js b/src/resources/4_0_0/schemas/invoiceparticipant.schema.js new file mode 100644 index 00000000..770fd887 --- /dev/null +++ b/src/resources/4_0_0/schemas/invoiceparticipant.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Invoiceparticipant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Invoiceparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + role: { + type: require('./codeableconcept.schema.js'), + description: + 'Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Invoiceparticipantactor_actor_Union', + description: + 'The device, practitioner, etc. who performed or participated in the service.', + types: () => [ + require('./practitioner.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The device, practitioner, etc. who performed or participated in the service.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/library.schema.js b/src/resources/4_0_0/schemas/library.schema.js new file mode 100644 index 00000000..5551f13b --- /dev/null +++ b/src/resources/4_0_0/schemas/library.schema.js @@ -0,0 +1,331 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Library Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Library', + description: + 'The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Library_Enum_schema', + values: { Library: { value: 'Library' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A short, descriptive, user-friendly title for the library.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive, user-friendly title for the library.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the library giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the library giving additional information about its content.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this library. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this library. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A code or group definition that describes the intended subject of the contents of the library.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: 'LibrarysubjectReference_subjectReference_Union', + description: + 'A code or group definition that describes the intended subject of the contents of the library.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'A code or group definition that describes the intended subject of the contents of the library.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the library.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the library.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the library from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the library from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate library instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the library is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this library is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this library is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the library is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the library is used from a clinical perspective.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the library content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + parameter: { + type: new GraphQLList(require('./parameterdefinition.schema.js')), + description: + 'The parameter element defines parameters used by the library.', + }, + dataRequirement: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: + 'Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.', + }, + content: { + type: new GraphQLList(require('./attachment.schema.js')), + description: + 'The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/linkage.schema.js b/src/resources/4_0_0/schemas/linkage.schema.js new file mode 100644 index 00000000..cd88e988 --- /dev/null +++ b/src/resources/4_0_0/schemas/linkage.schema.js @@ -0,0 +1,127 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Linkage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Linkage', + description: + "Identifies two or more records (resource instances) that refer to the same real-world 'occurrence'.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Linkage_Enum_schema', + values: { Linkage: { value: 'Linkage' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _active: { + type: require('./element.schema.js'), + description: + "Indicates whether the asserted set of linkages are considered to be 'in effect'.", + }, + active: { + type: GraphQLBoolean, + description: + "Indicates whether the asserted set of linkages are considered to be 'in effect'.", + }, + author: { + type: new GraphQLUnionType({ + name: 'Linkageauthor_author_Union', + description: + 'Identifies the user or organization responsible for asserting the linkages as well as the user or organization who establishes the context in which the nature of each linkage is evaluated.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the user or organization responsible for asserting the linkages as well as the user or organization who establishes the context in which the nature of each linkage is evaluated.', + }, + item: { + type: new GraphQLList( + new GraphQLNonNull(require('./linkageitem.schema.js')), + ), + description: + 'Identifies which record considered as the reference to the same real-world occurrence as well as how the items should be evaluated within the collection of linked items.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/linkageitem.schema.js b/src/resources/4_0_0/schemas/linkageitem.schema.js new file mode 100644 index 00000000..5e14c709 --- /dev/null +++ b/src/resources/4_0_0/schemas/linkageitem.schema.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Linkageitem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Linkageitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: + "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + "Distinguishes which item is 'source of truth' (if any) and which items are no longer considered to be current representations.", + }, + resource: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Linkageitemresource_resource_Union', + description: + 'The resource instance being linked as part of the group.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'The resource instance being linked as part of the group.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/list.schema.js b/src/resources/4_0_0/schemas/list.schema.js new file mode 100644 index 00000000..9861dd4d --- /dev/null +++ b/src/resources/4_0_0/schemas/list.schema.js @@ -0,0 +1,218 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary List Schema + */ +module.exports = new GraphQLObjectType({ + name: 'List', + description: 'A list is a curated collection of resources.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'List_Enum_schema', + values: { List: { value: 'List' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifier for the List assigned for business purposes outside the context of FHIR.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Indicates the current state of this list.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'Indicates the current state of this list.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A label for the list assigned by the author.', + }, + title: { + type: GraphQLString, + description: 'A label for the list assigned by the author.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'This code defines the purpose of the list - why it was created.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Listsubject_subject_Union', + description: + 'The common subject (or patient) of the resources that are in the list if there is one.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The common subject (or patient) of the resources that are in the list if there is one.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Listencounter_encounter_Union', + description: + 'The encounter that is the context in which this list was created.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The encounter that is the context in which this list was created.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date that the list was prepared.', + }, + date: { + type: DateTimeScalar, + description: 'The date that the list was prepared.', + }, + source: { + type: new GraphQLUnionType({ + name: 'Listsource_source_Union', + description: + 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.', + }, + orderedBy: { + type: require('./codeableconcept.schema.js'), + description: 'What order applies to the items in the list.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Comments that apply to the overall list.', + }, + entry: { + type: new GraphQLList(require('./listentry.schema.js')), + description: 'Entries in this list.', + }, + emptyReason: { + type: require('./codeableconcept.schema.js'), + description: 'If the list is empty, why the list is empty.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/listentry.schema.js b/src/resources/4_0_0/schemas/listentry.schema.js new file mode 100644 index 00000000..8a4ff7e8 --- /dev/null +++ b/src/resources/4_0_0/schemas/listentry.schema.js @@ -0,0 +1,78 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Listentry Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Listentry', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + flag: { + type: require('./codeableconcept.schema.js'), + description: + 'The flag allows the system constructing the list to indicate the role and significance of the item in the list.', + }, + _deleted: { + type: require('./element.schema.js'), + description: 'True if this item is marked as deleted in the list.', + }, + deleted: { + type: GraphQLBoolean, + description: 'True if this item is marked as deleted in the list.', + }, + _date: { + type: require('./element.schema.js'), + description: 'When this item was added to the list.', + }, + date: { + type: DateTimeScalar, + description: 'When this item was added to the list.', + }, + item: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Listentryitem_item_Union', + description: + 'A reference to the actual resource from which data was derived.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to the actual resource from which data was derived.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/location.schema.js b/src/resources/4_0_0/schemas/location.schema.js new file mode 100644 index 00000000..6961ee04 --- /dev/null +++ b/src/resources/4_0_0/schemas/location.schema.js @@ -0,0 +1,230 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Location Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Location', + description: + 'Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Location_Enum_schema', + values: { Location: { value: 'Location' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Unique code or number identifying the location to its users.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', + }, + status: { + type: CodeScalar, + description: + 'The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.', + }, + operationalStatus: { + type: require('./coding.schema.js'), + description: + 'The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + name: { + type: GraphQLString, + description: + 'Name of the location as used by humans. Does not need to be unique.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'A list of alternate names that the location is known as, or was known as, in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the location is known as, or was known as, in the past.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + description: { + type: GraphQLString, + description: + 'Description of the Location, which helps in finding or referencing the place.', + }, + _mode: { + type: require('./element.schema.js'), + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + mode: { + type: CodeScalar, + description: + 'Indicates whether a resource instance represents a specific location or a class of locations.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Indicates the type of function performed at the location.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.', + }, + address: { + type: require('./address.schema.js'), + description: 'Physical location.', + }, + physicalType: { + type: require('./codeableconcept.schema.js'), + description: + 'Physical form of the location, e.g. building, room, vehicle, road.', + }, + position: { + type: require('./locationposition.schema.js'), + description: + 'The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'LocationmanagingOrganization_managingOrganization_Union', + description: + 'The organization responsible for the provisioning and upkeep of the location.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization responsible for the provisioning and upkeep of the location.', + }, + partOf: { + type: new GraphQLUnionType({ + name: 'LocationpartOf_partOf_Union', + description: + 'Another Location of which this Location is physically a part of.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Another Location of which this Location is physically a part of.', + }, + hoursOfOperation: { + type: new GraphQLList(require('./locationhoursofoperation.schema.js')), + description: + 'What days/times during a week is this location usually open.', + }, + _availabilityExceptions: { + type: require('./element.schema.js'), + description: + 'A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Locationendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for the location.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for the location.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/locationhoursofoperation.schema.js b/src/resources/4_0_0/schemas/locationhoursofoperation.schema.js new file mode 100644 index 00000000..f41fc82e --- /dev/null +++ b/src/resources/4_0_0/schemas/locationhoursofoperation.schema.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary LocationhoursOfOperation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'LocationhoursOfOperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _daysOfWeek: { + type: require('./element.schema.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.schema.js'), + description: 'The Location is open all day.', + }, + allDay: { + type: GraphQLBoolean, + description: 'The Location is open all day.', + }, + _openingTime: { + type: require('./element.schema.js'), + description: 'Time that the Location opens.', + }, + openingTime: { + type: TimeScalar, + description: 'Time that the Location opens.', + }, + _closingTime: { + type: require('./element.schema.js'), + description: 'Time that the Location closes.', + }, + closingTime: { + type: TimeScalar, + description: 'Time that the Location closes.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/locationposition.schema.js b/src/resources/4_0_0/schemas/locationposition.schema.js new file mode 100644 index 00000000..ab56d403 --- /dev/null +++ b/src/resources/4_0_0/schemas/locationposition.schema.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Locationposition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Locationposition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _longitude: { + type: require('./element.schema.js'), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + longitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).', + }, + _latitude: { + type: require('./element.schema.js'), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + latitude: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).', + }, + _altitude: { + type: require('./element.schema.js'), + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + altitude: { + type: GraphQLFloat, + description: + 'Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/marketingstatus.schema.js b/src/resources/4_0_0/schemas/marketingstatus.schema.js new file mode 100644 index 00000000..990fabfa --- /dev/null +++ b/src/resources/4_0_0/schemas/marketingstatus.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MarketingStatus Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MarketingStatus', + description: + 'Base StructureDefinition for MarketingStatus Type: The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + country: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The country in which the marketing authorisation has been granted shall be specified It should be specified using the ISO 3166 ‑ 1 alpha-2 code elements.', + }, + jurisdiction: { + type: require('./codeableconcept.schema.js'), + description: + 'Where a Medicines Regulatory Agency has granted a marketing authorisation for which specific provisions within a jurisdiction apply, the jurisdiction can be specified using an appropriate controlled terminology The controlled term and the controlled term identifier shall be specified.', + }, + status: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'This attribute provides information on the status of the marketing of the medicinal product See ISO/TS 20443 for more information and examples.', + }, + dateRange: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + 'The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.', + }, + _restoreDate: { + type: require('./element.schema.js'), + description: + 'The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.', + }, + restoreDate: { + type: DateTimeScalar, + description: + 'The date when the Medicinal Product is placed on the market by the Marketing Authorisation Holder (or where applicable, the manufacturer/distributor) in a country and/or jurisdiction shall be provided A complete date consisting of day, month and year shall be specified using the ISO 8601 date format NOTE “Placed on the market” refers to the release of the Medicinal Product into the distribution chain.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measure.schema.js b/src/resources/4_0_0/schemas/measure.schema.js new file mode 100644 index 00000000..fc91c945 --- /dev/null +++ b/src/resources/4_0_0/schemas/measure.schema.js @@ -0,0 +1,421 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary Measure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Measure', + description: + 'The Measure resource provides the definition of a quality measure.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Measure_Enum_schema', + values: { Measure: { value: 'Measure' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A short, descriptive, user-friendly title for the measure.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive, user-friendly title for the measure.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the measure giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the measure giving additional information about its content.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this measure. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this measure. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: 'MeasuresubjectReference_subjectReference_Union', + description: + 'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the measure was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the measure was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the measure.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the measure.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the measure from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the measure from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate measure instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the measure is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this measure is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this measure is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description, from a clinical perspective, of how the measure is used.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description, from a clinical perspective, of how the measure is used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the measure content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.schema.js'), + description: + 'A reference to a Library resource containing the formal logic used by the measure.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing the formal logic used by the measure.', + }, + _disclaimer: { + type: require('./element.schema.js'), + description: + 'Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.', + }, + disclaimer: { + type: GraphQLString, + description: + 'Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure.', + }, + scoring: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented.', + }, + compositeScoring: { + type: require('./codeableconcept.schema.js'), + description: + 'If this is a composite measure, the scoring method used to combine the component measures to determine the composite score.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization.', + }, + _riskAdjustment: { + type: require('./element.schema.js'), + description: + 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', + }, + riskAdjustment: { + type: GraphQLString, + description: + 'A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.', + }, + _rateAggregation: { + type: require('./element.schema.js'), + description: + 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', + }, + rateAggregation: { + type: GraphQLString, + description: + 'Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result.', + }, + _rationale: { + type: require('./element.schema.js'), + description: + 'Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', + }, + rationale: { + type: GraphQLString, + description: + 'Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence.', + }, + _clinicalRecommendationStatement: { + type: require('./element.schema.js'), + description: + 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', + }, + clinicalRecommendationStatement: { + type: GraphQLString, + description: + 'Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure.', + }, + improvementNotation: { + type: require('./codeableconcept.schema.js'), + description: + 'Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range).', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'Provides a description of an individual term used within the measure.', + }, + definition: { + type: new GraphQLList(GraphQLString), + description: + 'Provides a description of an individual term used within the measure.', + }, + _guidance: { + type: require('./element.schema.js'), + description: + 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', + }, + guidance: { + type: GraphQLString, + description: + 'Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.', + }, + group: { + type: new GraphQLList(require('./measuregroup.schema.js')), + description: 'A group of population criteria for the measure.', + }, + supplementalData: { + type: new GraphQLList(require('./measuresupplementaldata.schema.js')), + description: + 'The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measuregroup.schema.js b/src/resources/4_0_0/schemas/measuregroup.schema.js new file mode 100644 index 00000000..106d6670 --- /dev/null +++ b/src/resources/4_0_0/schemas/measuregroup.schema.js @@ -0,0 +1,54 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary Measuregroup Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Measuregroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.', + }, + _description: { + type: require('./element.schema.js'), + description: 'The human readable description of this population group.', + }, + description: { + type: GraphQLString, + description: 'The human readable description of this population group.', + }, + population: { + type: new GraphQLList(require('./measuregrouppopulation.schema.js')), + description: 'A population criteria for the measure.', + }, + stratifier: { + type: new GraphQLList(require('./measuregroupstratifier.schema.js')), + description: + 'The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measuregrouppopulation.schema.js b/src/resources/4_0_0/schemas/measuregrouppopulation.schema.js new file mode 100644 index 00000000..277ae6ea --- /dev/null +++ b/src/resources/4_0_0/schemas/measuregrouppopulation.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Measuregrouppopulation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Measuregrouppopulation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The type of population criteria.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The human readable description of this population criteria.', + }, + description: { + type: GraphQLString, + description: + 'The human readable description of this population criteria.', + }, + criteria: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: + 'An expression that specifies the criteria for the population, typically the name of an expression in a library.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measuregroupstratifier.schema.js b/src/resources/4_0_0/schemas/measuregroupstratifier.schema.js new file mode 100644 index 00000000..0ec7dee0 --- /dev/null +++ b/src/resources/4_0_0/schemas/measuregroupstratifier.schema.js @@ -0,0 +1,59 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary Measuregroupstratifier Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Measuregroupstratifier', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The human readable description of this stratifier criteria.', + }, + description: { + type: GraphQLString, + description: + 'The human readable description of this stratifier criteria.', + }, + criteria: { + type: require('./expression.schema.js'), + description: + 'An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.', + }, + component: { + type: new GraphQLList( + require('./measuregroupstratifiercomponent.schema.js'), + ), + description: + 'A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measuregroupstratifiercomponent.schema.js b/src/resources/4_0_0/schemas/measuregroupstratifiercomponent.schema.js new file mode 100644 index 00000000..3bf11822 --- /dev/null +++ b/src/resources/4_0_0/schemas/measuregroupstratifiercomponent.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Measuregroupstratifiercomponent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Measuregroupstratifiercomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The human readable description of this stratifier criteria component.', + }, + description: { + type: GraphQLString, + description: + 'The human readable description of this stratifier criteria component.', + }, + criteria: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: + 'An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measurereport.schema.js b/src/resources/4_0_0/schemas/measurereport.schema.js new file mode 100644 index 00000000..10a34da7 --- /dev/null +++ b/src/resources/4_0_0/schemas/measurereport.schema.js @@ -0,0 +1,230 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MeasureReport Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MeasureReport', + description: + 'The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MeasureReport_Enum_schema', + values: { MeasureReport: { value: 'MeasureReport' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The MeasureReport status. No data will be available until the MeasureReport status is complete.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The MeasureReport status. No data will be available until the MeasureReport status is complete.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure.', + }, + _measure: { + type: require('./element.schema.js'), + description: + 'A reference to the Measure that was calculated to produce this report.', + }, + measure: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A reference to the Measure that was calculated to produce this report.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'MeasureReportsubject_subject_Union', + description: + 'Optional subject identifying the individual or individuals the report is for.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./location.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'Optional subject identifying the individual or individuals the report is for.', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date this measure report was generated.', + }, + date: { + type: DateTimeScalar, + description: 'The date this measure report was generated.', + }, + reporter: { + type: new GraphQLUnionType({ + name: 'MeasureReportreporter_reporter_Union', + description: + 'The individual, location, or organization that is reporting the data.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./location.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual, location, or organization that is reporting the data.', + }, + period: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The reporting period for which the report was calculated.', + }, + improvementNotation: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether improvement in the measure is noted by an increase or decrease in the measure score.', + }, + group: { + type: new GraphQLList(require('./measurereportgroup.schema.js')), + description: + 'The results of the calculation, one for each population group in the measure.', + }, + evaluatedResource: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MeasureReportevaluatedResource_evaluatedResource_Union', + description: + 'A reference to a Bundle containing the Resources that were used in the calculation of this measure.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A reference to a Bundle containing the Resources that were used in the calculation of this measure.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measurereportgroup.schema.js b/src/resources/4_0_0/schemas/measurereportgroup.schema.js new file mode 100644 index 00000000..a42725ee --- /dev/null +++ b/src/resources/4_0_0/schemas/measurereportgroup.schema.js @@ -0,0 +1,56 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroup Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MeasureReportgroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'The meaning of the population group as defined in the measure definition.', + }, + population: { + type: new GraphQLList( + require('./measurereportgrouppopulation.schema.js'), + ), + description: + 'The populations that make up the population group, one for each type of population appropriate for the measure.', + }, + measureScore: { + type: require('./quantity.schema.js'), + description: + 'The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group.', + }, + stratifier: { + type: new GraphQLList( + require('./measurereportgroupstratifier.schema.js'), + ), + description: + 'When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measurereportgrouppopulation.schema.js b/src/resources/4_0_0/schemas/measurereportgrouppopulation.schema.js new file mode 100644 index 00000000..e5a51524 --- /dev/null +++ b/src/resources/4_0_0/schemas/measurereportgrouppopulation.schema.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgrouppopulation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MeasureReportgrouppopulation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The type of the population.', + }, + _count: { + type: require('./element.schema.js'), + description: 'The number of members of the population.', + }, + count: { + type: GraphQLInt, + description: 'The number of members of the population.', + }, + subjectResults: { + type: new GraphQLUnionType({ + name: 'MeasureReportgrouppopulationsubjectResults_subjectResults_Union', + description: + 'This element refers to a List of subject level MeasureReport resources, one for each subject in this population.', + types: () => [require('./list.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'List') { + return require('./list.schema.js'); + } + }, + }), + description: + 'This element refers to a List of subject level MeasureReport resources, one for each subject in this population.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measurereportgroupstratifier.schema.js b/src/resources/4_0_0/schemas/measurereportgroupstratifier.schema.js new file mode 100644 index 00000000..21602162 --- /dev/null +++ b/src/resources/4_0_0/schemas/measurereportgroupstratifier.schema.js @@ -0,0 +1,44 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroupstratifier Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MeasureReportgroupstratifier', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The meaning of this stratifier, as defined in the measure definition.', + }, + stratum: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratum.schema.js'), + ), + description: + 'This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measurereportgroupstratifierstratum.schema.js b/src/resources/4_0_0/schemas/measurereportgroupstratifierstratum.schema.js new file mode 100644 index 00000000..d9d73c0f --- /dev/null +++ b/src/resources/4_0_0/schemas/measurereportgroupstratifierstratum.schema.js @@ -0,0 +1,55 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroupstratifierstratum Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MeasureReportgroupstratifierstratum', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + value: { + type: require('./codeableconcept.schema.js'), + description: + 'The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.', + }, + component: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratumcomponent.schema.js'), + ), + description: 'A stratifier component value.', + }, + population: { + type: new GraphQLList( + require('./measurereportgroupstratifierstratumpopulation.schema.js'), + ), + description: + 'The populations that make up the stratum, one for each type of population appropriate to the measure.', + }, + measureScore: { + type: require('./quantity.schema.js'), + description: + 'The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measurereportgroupstratifierstratumcomponent.schema.js b/src/resources/4_0_0/schemas/measurereportgroupstratifierstratumcomponent.schema.js new file mode 100644 index 00000000..530402e0 --- /dev/null +++ b/src/resources/4_0_0/schemas/measurereportgroupstratifierstratumcomponent.schema.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroupstratifierstratumcomponent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MeasureReportgroupstratifierstratumcomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The code for the stratum component value.', + }, + value: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The stratum component value.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measurereportgroupstratifierstratumpopulation.schema.js b/src/resources/4_0_0/schemas/measurereportgroupstratifierstratumpopulation.schema.js new file mode 100644 index 00000000..9f87fe8f --- /dev/null +++ b/src/resources/4_0_0/schemas/measurereportgroupstratifierstratumpopulation.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasureReportgroupstratifierstratumpopulation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MeasureReportgroupstratifierstratumpopulation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The type of the population.', + }, + _count: { + type: require('./element.schema.js'), + description: 'The number of members of the population in this stratum.', + }, + count: { + type: GraphQLInt, + description: 'The number of members of the population in this stratum.', + }, + subjectResults: { + type: new GraphQLUnionType({ + name: + 'MeasureReportgroupstratifierstratumpopulationsubjectResults_subjectResults_Union', + description: + 'This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.', + types: () => [require('./list.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'List') { + return require('./list.schema.js'); + } + }, + }), + description: + 'This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/measuresupplementaldata.schema.js b/src/resources/4_0_0/schemas/measuresupplementaldata.schema.js new file mode 100644 index 00000000..39cc5903 --- /dev/null +++ b/src/resources/4_0_0/schemas/measuresupplementaldata.schema.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MeasuresupplementalData Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MeasuresupplementalData', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.', + }, + usage: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.', + }, + _description: { + type: require('./element.schema.js'), + description: 'The human readable description of this supplemental data.', + }, + description: { + type: GraphQLString, + description: 'The human readable description of this supplemental data.', + }, + criteria: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: + 'The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/media.schema.js b/src/resources/4_0_0/schemas/media.schema.js new file mode 100644 index 00000000..7f9f17ed --- /dev/null +++ b/src/resources/4_0_0/schemas/media.schema.js @@ -0,0 +1,355 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Media Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Media', + description: + 'A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Media_Enum_schema', + values: { Media: { value: 'Media' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MediabasedOn_basedOn_Union', + description: + 'A procedure that is fulfilled in whole or in part by the creation of this media.', + types: () => [ + require('./servicerequest.schema.js'), + require('./careplan.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + }, + }), + ), + description: + 'A procedure that is fulfilled in whole or in part by the creation of this media.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MediapartOf_partOf_Union', + description: + 'A larger event of which this particular event is a component or step.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the {{title}}.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the {{title}}.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that classifies whether the media is an image, video or audio recording or some other media category.', + }, + modality: { + type: require('./codeableconcept.schema.js'), + description: + 'Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.', + }, + view: { + type: require('./codeableconcept.schema.js'), + description: + 'The name of the imaging view e.g. Lateral or Antero-posterior (AP).', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Mediasubject_subject_Union', + description: 'Who/What this Media is a record of.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./specimen.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Who/What this Media is a record of.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Mediaencounter_encounter_Union', + description: + 'The encounter that establishes the context for this media.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'The encounter that establishes the context for this media.', + }, + _createdDateTime: { + type: require('./element.schema.js'), + description: 'The date and time(s) at which the media was collected.', + }, + createdDateTime: { + type: DateTimeScalar, + description: 'The date and time(s) at which the media was collected.', + }, + createdPeriod: { + type: require('./period.schema.js'), + description: 'The date and time(s) at which the media was collected.', + }, + _issued: { + type: require('./element.schema.js'), + description: + 'The date and time this version of the media was made available to providers, typically after having been reviewed.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time this version of the media was made available to providers, typically after having been reviewed.', + }, + operator: { + type: new GraphQLUnionType({ + name: 'Mediaoperator_operator_Union', + description: 'The person who administered the collection of the image.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The person who administered the collection of the image.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Describes why the event occurred in coded or textual form.', + }, + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + }, + _deviceName: { + type: require('./element.schema.js'), + description: + 'The name of the device / manufacturer of the device that was used to make the recording.', + }, + deviceName: { + type: GraphQLString, + description: + 'The name of the device / manufacturer of the device that was used to make the recording.', + }, + device: { + type: new GraphQLUnionType({ + name: 'Mediadevice_device_Union', + description: 'The device used to collect the media.', + types: () => [ + require('./device.schema.js'), + require('./devicemetric.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'DeviceMetric') { + return require('./devicemetric.schema.js'); + } + }, + }), + description: 'The device used to collect the media.', + }, + _height: { + type: require('./element.schema.js'), + description: 'Height of the image in pixels (photo/video).', + }, + height: { + type: PositiveIntScalar, + description: 'Height of the image in pixels (photo/video).', + }, + _width: { + type: require('./element.schema.js'), + description: 'Width of the image in pixels (photo/video).', + }, + width: { + type: PositiveIntScalar, + description: 'Width of the image in pixels (photo/video).', + }, + _frames: { + type: require('./element.schema.js'), + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + frames: { + type: PositiveIntScalar, + description: + 'The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.', + }, + _duration: { + type: require('./element.schema.js'), + description: + 'The duration of the recording in seconds - for audio and video.', + }, + duration: { + type: GraphQLFloat, + description: + 'The duration of the recording in seconds - for audio and video.', + }, + content: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: + 'The actual content of the media - inline or by direct reference to the media source file.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the media by the performer, subject or other participants.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medication.schema.js b/src/resources/4_0_0/schemas/medication.schema.js new file mode 100644 index 00000000..8c48600a --- /dev/null +++ b/src/resources/4_0_0/schemas/medication.schema.js @@ -0,0 +1,134 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Medication Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Medication', + description: + 'This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Medication_Enum_schema', + values: { Medication: { value: 'Medication' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Business identifier for this medication.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code to indicate if the medication is in active use.', + }, + status: { + type: CodeScalar, + description: 'A code to indicate if the medication is in active use.', + }, + manufacturer: { + type: new GraphQLUnionType({ + name: 'Medicationmanufacturer_manufacturer_Union', + description: + 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', + }, + form: { + type: require('./codeableconcept.schema.js'), + description: 'Describes the form of the item. Powder; tablets; capsule.', + }, + amount: { + type: require('./ratio.schema.js'), + description: + 'Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).', + }, + ingredient: { + type: new GraphQLList(require('./medicationingredient.schema.js')), + description: + 'Identifies a particular constituent of interest in the product.', + }, + batch: { + type: require('./medicationbatch.schema.js'), + description: 'Information that only applies to packages (not products).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationadministration.schema.js b/src/resources/4_0_0/schemas/medicationadministration.schema.js new file mode 100644 index 00000000..d683c3d3 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationadministration.schema.js @@ -0,0 +1,341 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicationAdministration Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationAdministration', + description: + 'Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationAdministration_Enum_schema', + values: { + MedicationAdministration: { value: 'MedicationAdministration' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.', + }, + _instantiates: { + type: require('./element.schema.js'), + description: + 'A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event.', + }, + instantiates: { + type: new GraphQLList(UriScalar), + description: + 'A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationpartOf_partOf_Union', + description: + 'A larger event of which this particular event is a component or step.', + types: () => [ + require('./medicationadministration.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.', + }, + statusReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code indicating why the administration was not performed.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates where the medication is expected to be consumed or administered.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationAdministrationmedicationReference_medicationReference_Union', + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationAdministrationsubject_subject_Union', + description: + 'The person or animal or group receiving the medication.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: 'The person or animal or group receiving the medication.', + }, + context: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationcontext_context_Union', + description: + 'The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.', + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationAdministrationsupportingInformation_supportingInformation_Union', + description: + 'Additional information (for example, patient height and weight) that supports the administration of the medication.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Additional information (for example, patient height and weight) that supports the administration of the medication.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectiveDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + effectivePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: + "A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", + }, + performer: { + type: new GraphQLList( + require('./medicationadministrationperformer.schema.js'), + ), + description: + 'Indicates who or what performed the medication administration and how they were involved.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A code indicating why the medication was given.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationreasonReference_reasonReference_Union', + description: + 'Condition or observation that supports why the medication was administered.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + }, + }), + ), + description: + 'Condition or observation that supports why the medication was administered.', + }, + request: { + type: new GraphQLUnionType({ + name: 'MedicationAdministrationrequest_request_Union', + description: + 'The original request, instruction or authority to perform the administration.', + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + description: + 'The original request, instruction or authority to perform the administration.', + }, + device: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationdevice_device_Union', + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The device used in administering the medication to the patient. For example, a particular infusion pump.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the medication administration that is not conveyed by the other attributes.', + }, + dosage: { + type: require('./medicationadministrationdosage.schema.js'), + description: + 'Describes the medication dosage information details e.g. dose, rate, site, route, etc.', + }, + eventHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationAdministrationeventHistory_eventHistory_Union', + description: + 'A summary of the events of interest that have occurred, such as when the administration was verified.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'A summary of the events of interest that have occurred, such as when the administration was verified.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationadministrationdosage.schema.js b/src/resources/4_0_0/schemas/medicationadministrationdosage.schema.js new file mode 100644 index 00000000..4a2720b8 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationadministrationdosage.schema.js @@ -0,0 +1,72 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MedicationAdministrationdosage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationAdministrationdosage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _text: { + type: require('./element.schema.js'), + description: + 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', + }, + text: { + type: GraphQLString, + description: + 'Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.', + }, + site: { + type: require('./codeableconcept.schema.js'), + description: + "A coded specification of the anatomic site where the medication first entered the body. For example, 'left arm'.", + }, + route: { + type: require('./codeableconcept.schema.js'), + description: + 'A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.', + }, + dose: { + type: require('./quantity.schema.js'), + description: + 'The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + 'Identifies the speed with which the medication was or will be introduced into the patient. Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', + }, + rateQuantity: { + type: require('./quantity.schema.js'), + description: + 'Identifies the speed with which the medication was or will be introduced into the patient. Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationadministrationperformer.schema.js b/src/resources/4_0_0/schemas/medicationadministrationperformer.schema.js new file mode 100644 index 00000000..0ffa994b --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationadministrationperformer.schema.js @@ -0,0 +1,78 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationAdministrationperformer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationAdministrationperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.schema.js'), + description: + 'Distinguishes the type of involvement of the performer in the medication administration.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationAdministrationperformeractor_actor_Union', + description: + 'Indicates who or what performed the medication administration.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'Indicates who or what performed the medication administration.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationbatch.schema.js b/src/resources/4_0_0/schemas/medicationbatch.schema.js new file mode 100644 index 00000000..ad451a58 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationbatch.schema.js @@ -0,0 +1,51 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Medicationbatch Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Medicationbatch', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _lotNumber: { + type: require('./element.schema.js'), + description: + 'The assigned lot number of a batch of the specified product.', + }, + lotNumber: { + type: GraphQLString, + description: + 'The assigned lot number of a batch of the specified product.', + }, + _expirationDate: { + type: require('./element.schema.js'), + description: 'When this specific batch of product will expire.', + }, + expirationDate: { + type: DateTimeScalar, + description: 'When this specific batch of product will expire.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationdispense.schema.js b/src/resources/4_0_0/schemas/medicationdispense.schema.js new file mode 100644 index 00000000..4d215c8b --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationdispense.schema.js @@ -0,0 +1,376 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicationDispense Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationDispense', + description: + 'Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationDispense_Enum_schema', + values: { MedicationDispense: { value: 'MedicationDispense' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispensepartOf_partOf_Union', + description: 'The procedure that trigger the dispense.', + types: () => [require('./procedure.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: 'The procedure that trigger the dispense.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code specifying the state of the set of dispense events.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'A code specifying the state of the set of dispense events.', + }, + statusReasonCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the reason why a dispense was not performed.', + }, + statusReasonReference: { + type: new GraphQLUnionType({ + name: + 'MedicationDispensestatusReasonReference_statusReasonReference_Union', + description: 'Indicates the reason why a dispense was not performed.', + types: () => [require('./detectedissue.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); + } + }, + }), + description: 'Indicates the reason why a dispense was not performed.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of medication dispense (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationDispensemedicationReference_medicationReference_Union', + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'MedicationDispensesubject_subject_Union', + description: + 'A link to a resource representing the person or the group to whom the medication will be given.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person or the group to whom the medication will be given.', + }, + context: { + type: new GraphQLUnionType({ + name: 'MedicationDispensecontext_context_Union', + description: + 'The encounter or episode of care that establishes the context for this event.', + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care that establishes the context for this event.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationDispensesupportingInformation_supportingInformation_Union', + description: + 'Additional information that supports the medication being dispensed.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Additional information that supports the medication being dispensed.', + }, + performer: { + type: new GraphQLList(require('./medicationdispenseperformer.schema.js')), + description: 'Indicates who or what performed the event.', + }, + location: { + type: new GraphQLUnionType({ + name: 'MedicationDispenselocation_location_Union', + description: + 'The principal physical location where the dispense was performed.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The principal physical location where the dispense was performed.', + }, + authorizingPrescription: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationDispenseauthorizingPrescription_authorizingPrescription_Union', + description: + 'Indicates the medication order that is being dispensed against.', + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + ), + description: + 'Indicates the medication order that is being dispensed against.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of medication that has been dispensed. Includes unit of measure.', + }, + daysSupply: { + type: require('./quantity.schema.js'), + description: 'The amount of medication expressed as a timing amount.', + }, + _whenPrepared: { + type: require('./element.schema.js'), + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + whenPrepared: { + type: DateTimeScalar, + description: + 'The time when the dispensed product was packaged and reviewed.', + }, + _whenHandedOver: { + type: require('./element.schema.js'), + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + whenHandedOver: { + type: DateTimeScalar, + description: + 'The time the dispensed product was provided to the patient or their representative.', + }, + destination: { + type: new GraphQLUnionType({ + name: 'MedicationDispensedestination_destination_Union', + description: + 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identification of the facility/location where the medication was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispensereceiver_receiver_Union', + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + ), + description: + 'Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the dispense that could not be conveyed in the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList(require('./dosage.schema.js')), + description: 'Indicates how the medication is to be used by the patient.', + }, + substitution: { + type: require('./medicationdispensesubstitution.schema.js'), + description: + 'Indicates whether or not substitution was made as part of the dispense. In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why. If nothing is specified, substitution was not done.', + }, + detectedIssue: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispensedetectedIssue_detectedIssue_Union', + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. drug-drug interaction, duplicate therapy, dosage alert etc.', + types: () => [require('./detectedissue.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); + } + }, + }), + ), + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. drug-drug interaction, duplicate therapy, dosage alert etc.', + }, + eventHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationDispenseeventHistory_eventHistory_Union', + description: + 'A summary of the events of interest that have occurred, such as when the dispense was verified.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'A summary of the events of interest that have occurred, such as when the dispense was verified.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationdispenseperformer.schema.js b/src/resources/4_0_0/schemas/medicationdispenseperformer.schema.js new file mode 100644 index 00000000..8eb2303b --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationdispenseperformer.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationDispenseperformer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationDispenseperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.schema.js'), + description: + 'Distinguishes the type of performer in the dispense. For example, date enterer, packager, final checker.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationDispenseperformeractor_actor_Union', + description: + 'The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The device, practitioner, etc. who performed the action. It should be assumed that the actor is the dispenser of the medication.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationdispensesubstitution.schema.js b/src/resources/4_0_0/schemas/medicationdispensesubstitution.schema.js new file mode 100644 index 00000000..84e8b15b --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationdispensesubstitution.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationDispensesubstitution Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationDispensesubstitution', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _wasSubstituted: { + type: require('./element.schema.js'), + description: + 'True if the dispenser dispensed a different drug or product from what was prescribed.', + }, + wasSubstituted: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if the dispenser dispensed a different drug or product from what was prescribed.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A code signifying whether a different drug was dispensed from what was prescribed.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates the reason for the substitution (or lack of substitution) from what was prescribed.', + }, + responsibleParty: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationDispensesubstitutionresponsibleParty_responsibleParty_Union', + description: + 'The person or organization that has primary responsibility for the substitution.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + ), + description: + 'The person or organization that has primary responsibility for the substitution.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationingredient.schema.js b/src/resources/4_0_0/schemas/medicationingredient.schema.js new file mode 100644 index 00000000..834d121b --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationingredient.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Medicationingredient Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Medicationingredient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication of a medication.', + }, + itemReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationingredientitemReference_itemReference_Union', + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication of a medication.', + types: () => [ + require('./substance.schema.js'), + require('./medication.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication of a medication.', + }, + _isActive: { + type: require('./element.schema.js'), + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + isActive: { + type: GraphQLBoolean, + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + strength: { + type: require('./ratio.schema.js'), + description: + 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledge.schema.js b/src/resources/4_0_0/schemas/medicationknowledge.schema.js new file mode 100644 index 00000000..f73e052b --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledge.schema.js @@ -0,0 +1,250 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicationKnowledge Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledge', + description: + 'Information about a medication that is used to support knowledge.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationKnowledge_Enum_schema', + values: { MedicationKnowledge: { value: 'MedicationKnowledge' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that specifies this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code to indicate if the medication is in active use. The status refers to the validity about the information of the medication and not to its medicinal properties.', + }, + status: { + type: CodeScalar, + description: + 'A code to indicate if the medication is in active use. The status refers to the validity about the information of the medication and not to its medicinal properties.', + }, + manufacturer: { + type: new GraphQLUnionType({ + name: 'MedicationKnowledgemanufacturer_manufacturer_Union', + description: + 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.', + }, + doseForm: { + type: require('./codeableconcept.schema.js'), + description: 'Describes the form of the item. Powder; tablets; capsule.', + }, + amount: { + type: require('./quantity.schema.js'), + description: + 'Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).', + }, + _synonym: { + type: require('./element.schema.js'), + description: + 'Additional names for a medication, for example, the name(s) given to a medication in different countries. For example, acetaminophen and paracetamol or salbutamol and albuterol.', + }, + synonym: { + type: new GraphQLList(GraphQLString), + description: + 'Additional names for a medication, for example, the name(s) given to a medication in different countries. For example, acetaminophen and paracetamol or salbutamol and albuterol.', + }, + relatedMedicationKnowledge: { + type: new GraphQLList( + require('./medicationknowledgerelatedmedicationknowledge.schema.js'), + ), + description: 'Associated or related knowledge about a medication.', + }, + associatedMedication: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationKnowledgeassociatedMedication_associatedMedication_Union', + description: + 'Associated or related medications. For example, if the medication is a branded product (e.g. Crestor), this is the Therapeutic Moeity (e.g. Rosuvastatin) or if this is a generic medication (e.g. Rosuvastatin), this would link to a branded product (e.g. Crestor).', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Associated or related medications. For example, if the medication is a branded product (e.g. Crestor), this is the Therapeutic Moeity (e.g. Rosuvastatin) or if this is a generic medication (e.g. Rosuvastatin), this would link to a branded product (e.g. Crestor).', + }, + productType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Category of the medication or product (e.g. branded product, therapeutic moeity, generic product, innovator product, etc.).', + }, + monograph: { + type: new GraphQLList( + require('./medicationknowledgemonograph.schema.js'), + ), + description: 'Associated documentation about the medication.', + }, + ingredient: { + type: new GraphQLList( + require('./medicationknowledgeingredient.schema.js'), + ), + description: + 'Identifies a particular constituent of interest in the product.', + }, + _preparationInstruction: { + type: require('./element.schema.js'), + description: 'The instructions for preparing the medication.', + }, + preparationInstruction: { + type: GraphQLString, + description: 'The instructions for preparing the medication.', + }, + intendedRoute: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The intended or approved route of administration.', + }, + cost: { + type: new GraphQLList(require('./medicationknowledgecost.schema.js')), + description: 'The price of the medication.', + }, + monitoringProgram: { + type: new GraphQLList( + require('./medicationknowledgemonitoringprogram.schema.js'), + ), + description: 'The program under which the medication is reviewed.', + }, + administrationGuidelines: { + type: new GraphQLList( + require('./medicationknowledgeadministrationguidelines.schema.js'), + ), + description: 'Guidelines for the administration of the medication.', + }, + medicineClassification: { + type: new GraphQLList( + require('./medicationknowledgemedicineclassification.schema.js'), + ), + description: + 'Categorization of the medication within a formulary or classification system.', + }, + packaging: { + type: require('./medicationknowledgepackaging.schema.js'), + description: 'Information that only applies to packages (not products).', + }, + drugCharacteristic: { + type: new GraphQLList( + require('./medicationknowledgedrugcharacteristic.schema.js'), + ), + description: + 'Specifies descriptive properties of the medicine, such as color, shape, imprints, etc.', + }, + contraindication: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationKnowledgecontraindication_contraindication_Union', + description: + 'Potential clinical issue with or between medication(s) (for example, drug-drug interaction, drug-disease contraindication, drug-allergy interaction, etc.).', + types: () => [require('./detectedissue.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); + } + }, + }), + ), + description: + 'Potential clinical issue with or between medication(s) (for example, drug-drug interaction, drug-disease contraindication, drug-allergy interaction, etc.).', + }, + regulatory: { + type: new GraphQLList( + require('./medicationknowledgeregulatory.schema.js'), + ), + description: 'Regulatory information about a medication.', + }, + kinetics: { + type: new GraphQLList(require('./medicationknowledgekinetics.schema.js')), + description: + 'The time course of drug absorption, distribution, metabolism and excretion of a medication from the body.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelines.schema.js b/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelines.schema.js new file mode 100644 index 00000000..804fa6a3 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelines.schema.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeadministrationGuidelines Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgeadministrationGuidelines', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + dosage: { + type: new GraphQLList( + require('./medicationknowledgeadministrationguidelinesdosage.schema.js'), + ), + description: 'Dosage for the medication for the specific guidelines.', + }, + indicationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Indication for use that apply to the specific administration guidelines.', + }, + indicationReference: { + type: new GraphQLUnionType({ + name: + 'MedicationKnowledgeadministrationGuidelinesindicationReference_indicationReference_Union', + description: + 'Indication for use that apply to the specific administration guidelines.', + types: () => [require('./observationdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ObservationDefinition') { + return require('./observationdefinition.schema.js'); + } + }, + }), + description: + 'Indication for use that apply to the specific administration guidelines.', + }, + patientCharacteristics: { + type: new GraphQLList( + require('./medicationknowledgeadministrationguidelinespatientcharacteristics.schema.js'), + ), + description: + 'Characteristics of the patient that are relevant to the administration guidelines (for example, height, weight, gender, etc.).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelinesdosage.schema.js b/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelinesdosage.schema.js new file mode 100644 index 00000000..32ff2bd2 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelinesdosage.schema.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeadministrationGuidelinesdosage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgeadministrationGuidelinesdosage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The type of dosage (for example, prophylaxis, maintenance, therapeutic, etc.).', + }, + dosage: { + type: new GraphQLList(new GraphQLNonNull(require('./dosage.schema.js'))), + description: 'Dosage for the medication for the specific guidelines.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelinespatientcharacteristics.schema.js b/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelinespatientcharacteristics.schema.js new file mode 100644 index 00000000..21736f94 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgeadministrationguidelinespatientcharacteristics.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeadministrationGuidelinespatientCharacteristics Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgeadministrationGuidelinespatientCharacteristics', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + characteristicCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Specific characteristic that is relevant to the administration guideline (e.g. height, weight, gender).', + }, + characteristicQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'Specific characteristic that is relevant to the administration guideline (e.g. height, weight, gender).', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The specific characteristic (e.g. height, weight, gender, etc.).', + }, + value: { + type: new GraphQLList(GraphQLString), + description: + 'The specific characteristic (e.g. height, weight, gender, etc.).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgecost.schema.js b/src/resources/4_0_0/schemas/medicationknowledgecost.schema.js new file mode 100644 index 00000000..54a5d594 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgecost.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgecost Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgecost', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The category of the cost information. For example, manufacturers' cost, patient cost, claim reimbursement cost, actual acquisition cost.", + }, + _source: { + type: require('./element.schema.js'), + description: + 'The source or owner that assigns the price to the medication.', + }, + source: { + type: GraphQLString, + description: + 'The source or owner that assigns the price to the medication.', + }, + cost: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'The price of the medication.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgedrugcharacteristic.schema.js b/src/resources/4_0_0/schemas/medicationknowledgedrugcharacteristic.schema.js new file mode 100644 index 00000000..2298b9d6 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgedrugcharacteristic.schema.js @@ -0,0 +1,62 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary MedicationKnowledgedrugCharacteristic Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgedrugCharacteristic', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A code specifying which characteristic of the medicine is being described (for example, colour, shape, imprint).', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Description of the characteristic.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'Description of the characteristic.', + }, + valueString: { + type: GraphQLString, + description: 'Description of the characteristic.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: 'Description of the characteristic.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'Description of the characteristic.', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: 'Description of the characteristic.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgeingredient.schema.js b/src/resources/4_0_0/schemas/medicationknowledgeingredient.schema.js new file mode 100644 index 00000000..46e3c69b --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgeingredient.schema.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeingredient Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgeingredient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + itemReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationKnowledgeingredientitemReference_itemReference_Union', + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'The actual ingredient - either a substance (simple ingredient) or another medication.', + }, + _isActive: { + type: require('./element.schema.js'), + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + isActive: { + type: GraphQLBoolean, + description: + 'Indication of whether this ingredient affects the therapeutic action of the drug.', + }, + strength: { + type: require('./ratio.schema.js'), + description: + 'Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgekinetics.schema.js b/src/resources/4_0_0/schemas/medicationknowledgekinetics.schema.js new file mode 100644 index 00000000..8d5a150f --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgekinetics.schema.js @@ -0,0 +1,46 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgekinetics Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgekinetics', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + areaUnderCurve: { + type: new GraphQLList(require('./quantity.schema.js')), + description: + 'The drug concentration measured at certain discrete points in time.', + }, + lethalDose50: { + type: new GraphQLList(require('./quantity.schema.js')), + description: 'The median lethal dose of a drug.', + }, + halfLifePeriod: { + type: require('./duration.schema.js'), + description: + 'The time required for any specified property (e.g., the concentration of a substance in the body) to decrease by half.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgemedicineclassification.schema.js b/src/resources/4_0_0/schemas/medicationknowledgemedicineclassification.schema.js new file mode 100644 index 00000000..af61e3dd --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgemedicineclassification.schema.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgemedicineClassification Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgemedicineClassification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification).', + }, + classification: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Specific category assigned to the medication (e.g. anti-infective, anti-hypertensive, antibiotic, etc.).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgemonitoringprogram.schema.js b/src/resources/4_0_0/schemas/medicationknowledgemonitoringprogram.schema.js new file mode 100644 index 00000000..ebad16cf --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgemonitoringprogram.schema.js @@ -0,0 +1,44 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgemonitoringProgram Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgemonitoringProgram', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Type of program under which the medication is monitored.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Name of the reviewing program.', + }, + name: { + type: GraphQLString, + description: 'Name of the reviewing program.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgemonograph.schema.js b/src/resources/4_0_0/schemas/medicationknowledgemonograph.schema.js new file mode 100644 index 00000000..3a70040e --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgemonograph.schema.js @@ -0,0 +1,61 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgemonograph Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgemonograph', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The category of documentation about the medication. (e.g. professional monograph, patient education monograph).', + }, + source: { + type: new GraphQLUnionType({ + name: 'MedicationKnowledgemonographsource_source_Union', + description: 'Associated documentation about the medication.', + types: () => [ + require('./documentreference.schema.js'), + require('./media.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + }, + }), + description: 'Associated documentation about the medication.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgepackaging.schema.js b/src/resources/4_0_0/schemas/medicationknowledgepackaging.schema.js new file mode 100644 index 00000000..d42a47d3 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgepackaging.schema.js @@ -0,0 +1,42 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgepackaging Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgepackaging', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that defines the specific type of packaging that the medication can be found in (e.g. blister sleeve, tube, bottle).', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The number of product units the package would contain if fully loaded.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgeregulatory.schema.js b/src/resources/4_0_0/schemas/medicationknowledgeregulatory.schema.js new file mode 100644 index 00000000..0e1d70a2 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgeregulatory.schema.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeregulatory Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgeregulatory', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + regulatoryAuthority: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationKnowledgeregulatoryregulatoryAuthority_regulatoryAuthority_Union', + description: 'The authority that is specifying the regulations.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The authority that is specifying the regulations.', + }, + substitution: { + type: new GraphQLList( + require('./medicationknowledgeregulatorysubstitution.schema.js'), + ), + description: + 'Specifies if changes are allowed when dispensing a medication from a regulatory perspective.', + }, + schedule: { + type: new GraphQLList( + require('./medicationknowledgeregulatoryschedule.schema.js'), + ), + description: 'Specifies the schedule of a medication in jurisdiction.', + }, + maxDispense: { + type: require('./medicationknowledgeregulatorymaxdispense.schema.js'), + description: + 'The maximum number of units of the medication that can be dispensed in a period.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgeregulatorymaxdispense.schema.js b/src/resources/4_0_0/schemas/medicationknowledgeregulatorymaxdispense.schema.js new file mode 100644 index 00000000..d306c340 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgeregulatorymaxdispense.schema.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeregulatorymaxDispense Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgeregulatorymaxDispense', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'The maximum number of units of the medication that can be dispensed.', + }, + period: { + type: require('./duration.schema.js'), + description: 'The period that applies to the maximum number of units.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgeregulatoryschedule.schema.js b/src/resources/4_0_0/schemas/medicationknowledgeregulatoryschedule.schema.js new file mode 100644 index 00000000..d465b48e --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgeregulatoryschedule.schema.js @@ -0,0 +1,41 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeregulatoryschedule Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgeregulatoryschedule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + schedule: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Specifies the specific drug schedule.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgeregulatorysubstitution.schema.js b/src/resources/4_0_0/schemas/medicationknowledgeregulatorysubstitution.schema.js new file mode 100644 index 00000000..af682caf --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgeregulatorysubstitution.schema.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgeregulatorysubstitution Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgeregulatorysubstitution', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Specifies the type of substitution allowed.', + }, + _allowed: { + type: require('./element.schema.js'), + description: + 'Specifies if regulation allows for changes in the medication when dispensing.', + }, + allowed: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Specifies if regulation allows for changes in the medication when dispensing.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationknowledgerelatedmedicationknowledge.schema.js b/src/resources/4_0_0/schemas/medicationknowledgerelatedmedicationknowledge.schema.js new file mode 100644 index 00000000..88af6439 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationknowledgerelatedmedicationknowledge.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationKnowledgerelatedMedicationKnowledge Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationKnowledgerelatedMedicationKnowledge', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The category of the associated medication knowledge reference.', + }, + reference: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationKnowledgerelatedMedicationKnowledgereference_reference_Union', + description: + 'Associated documentation about the associated medication knowledge.', + types: () => [require('./medicationknowledge.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationKnowledge') { + return require('./medicationknowledge.schema.js'); + } + }, + }), + ), + ), + description: + 'Associated documentation about the associated medication knowledge.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationrequest.schema.js b/src/resources/4_0_0/schemas/medicationrequest.schema.js new file mode 100644 index 00000000..c193c7cf --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationrequest.schema.js @@ -0,0 +1,558 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary MedicationRequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationRequest', + description: + "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called 'MedicationRequest' rather than 'MedicationPrescription' or 'MedicationOrder' to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationRequest_Enum_schema', + values: { MedicationRequest: { value: 'MedicationRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying the current state of the order. Generally, this will be active or completed state.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the current state of the order. Generally, this will be active or completed state.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Captures the reason for the current state of the MedicationRequest.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Whether the request is a proposal, plan, or an original order.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, or an original order.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)).', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the Medication Request should be addressed with respect to other requests.', + }, + _doNotPerform: { + type: require('./element.schema.js'), + description: + 'If true indicates that the provider is asking for the medication request not to occur.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'If true indicates that the provider is asking for the medication request not to occur.', + }, + _reportedBoolean: { + type: require('./element.schema.js'), + description: + "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", + }, + reportedBoolean: { + type: GraphQLBoolean, + description: + "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", + }, + reportedReference: { + type: new GraphQLUnionType({ + name: 'MedicationRequestreportedReference_reportedReference_Union', + description: + "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record. It may also indicate the source of the report.", + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationRequestmedicationReference_medicationReference_Union', + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationRequestsubject_subject_Union', + description: + 'A link to a resource representing the person or set of individuals to whom the medication will be given.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'A link to a resource representing the person or set of individuals to whom the medication will be given.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'MedicationRequestencounter_encounter_Union', + description: + 'The Encounter during which this [x] was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this [x] was created or to which the creation of this record is tightly associated.', + }, + supportingInformation: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicationRequestsupportingInformation_supportingInformation_Union', + description: + 'Include additional information (for example, patient height and weight) that supports the ordering of the medication.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Include additional information (for example, patient height and weight) that supports the ordering of the medication.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the prescription was initially written or authored on.', + }, + authoredOn: { + type: DateTimeScalar, + description: + 'The date (and perhaps time) when the prescription was initially written or authored on.', + }, + requester: { + type: new GraphQLUnionType({ + name: 'MedicationRequestrequester_requester_Union', + description: + 'The individual, organization, or device that initiated the request and has responsibility for its activation.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The individual, organization, or device that initiated the request and has responsibility for its activation.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'MedicationRequestperformer_performer_Union', + description: + 'The specified desired performer of the medication treatment (e.g. the performer of the medication administration).', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + require('./careteam.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + }, + }), + description: + 'The specified desired performer of the medication treatment (e.g. the performer of the medication administration).', + }, + performerType: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of performer of the administration of the medication.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'MedicationRequestrecorder_recorder_Union', + description: + 'The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The reason or the indication for ordering or not ordering the medication.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequestreasonReference_reasonReference_Union', + description: + 'Condition or observation that supports why the medication was ordered.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'Condition or observation that supports why the medication was ordered.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequestbasedOn_basedOn_Union', + description: + 'A plan or request that is fulfilled in whole or in part by this medication request.', + types: () => [ + require('./careplan.schema.js'), + require('./medicationrequest.schema.js'), + require('./servicerequest.schema.js'), + require('./immunizationrecommendation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); + } + }, + }), + ), + description: + 'A plan or request that is fulfilled in whole or in part by this medication request.', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription.', + }, + courseOfTherapyType: { + type: require('./codeableconcept.schema.js'), + description: + 'The description of the overall patte3rn of the administration of the medication to the patient.', + }, + insurance: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequestinsurance_insurance_Union', + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.', + types: () => [ + require('./coverage.schema.js'), + require('./claimresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + ), + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Extra information about the prescription that could not be conveyed by the other attributes.', + }, + dosageInstruction: { + type: new GraphQLList(require('./dosage.schema.js')), + description: 'Indicates how the medication is to be used by the patient.', + }, + dispenseRequest: { + type: require('./medicationrequestdispenserequest.schema.js'), + description: + 'Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order). Note that this information is not always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.', + }, + substitution: { + type: require('./medicationrequestsubstitution.schema.js'), + description: + "Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.", + }, + priorPrescription: { + type: new GraphQLUnionType({ + name: 'MedicationRequestpriorPrescription_priorPrescription_Union', + description: + 'A link to a resource representing an earlier order related order or prescription.', + types: () => [require('./medicationrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + description: + 'A link to a resource representing an earlier order related order or prescription.', + }, + detectedIssue: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequestdetectedIssue_detectedIssue_Union', + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + types: () => [require('./detectedissue.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); + } + }, + }), + ), + description: + 'Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc.', + }, + eventHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationRequesteventHistory_eventHistory_Union', + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationrequestdispenserequest.schema.js b/src/resources/4_0_0/schemas/medicationrequestdispenserequest.schema.js new file mode 100644 index 00000000..39a013a7 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationrequestdispenserequest.schema.js @@ -0,0 +1,87 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary MedicationRequestdispenseRequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationRequestdispenseRequest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + initialFill: { + type: require('./medicationrequestdispenserequestinitialfill.schema.js'), + description: + 'Indicates the quantity or duration for the first dispense of the medication.', + }, + dispenseInterval: { + type: require('./duration.schema.js'), + description: + 'The minimum period of time that must occur between dispenses of the medication.', + }, + validityPeriod: { + type: require('./period.schema.js'), + description: + 'This indicates the validity period of a prescription (stale dating the Prescription).', + }, + _numberOfRepeatsAllowed: { + type: require('./element.schema.js'), + description: + "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.", + }, + numberOfRepeatsAllowed: { + type: UnsignedIntScalar, + description: + "An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus '3 repeats', then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.", + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount that is to be dispensed for one fill.', + }, + expectedSupplyDuration: { + type: require('./duration.schema.js'), + description: + 'Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'MedicationRequestdispenseRequestperformer_performer_Union', + description: + 'Indicates the intended dispensing Organization specified by the prescriber.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Indicates the intended dispensing Organization specified by the prescriber.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationrequestdispenserequestinitialfill.schema.js b/src/resources/4_0_0/schemas/medicationrequestdispenserequestinitialfill.schema.js new file mode 100644 index 00000000..bd001fce --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationrequestdispenserequestinitialfill.schema.js @@ -0,0 +1,42 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MedicationRequestdispenseRequestinitialFill Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationRequestdispenseRequestinitialFill', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The amount or quantity to provide as part of the first dispense.', + }, + duration: { + type: require('./duration.schema.js'), + description: + 'The length of time that the first dispense is expected to last.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationrequestsubstitution.schema.js b/src/resources/4_0_0/schemas/medicationrequestsubstitution.schema.js new file mode 100644 index 00000000..45d02c43 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationrequestsubstitution.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicationRequestsubstitution Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationRequestsubstitution', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _allowedBoolean: { + type: require('./element.schema.js'), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + allowedBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + allowedCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'True if the prescriber allows a different drug to be dispensed from what was prescribed.', + }, + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the reason for the substitution, or why substitution must or must not be performed.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicationstatement.schema.js b/src/resources/4_0_0/schemas/medicationstatement.schema.js new file mode 100644 index 00000000..0754664c --- /dev/null +++ b/src/resources/4_0_0/schemas/medicationstatement.schema.js @@ -0,0 +1,355 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicationStatement Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicationStatement', + description: + "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicationStatement_Enum_schema', + values: { MedicationStatement: { value: 'MedicationStatement' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationStatementbasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + types: () => [ + require('./medicationrequest.schema.js'), + require('./careplan.schema.js'), + require('./servicerequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationStatementpartOf_partOf_Union', + description: + 'A larger event of which this particular event is a component or step.', + types: () => [ + require('./medicationadministration.schema.js'), + require('./medicationdispense.schema.js'), + require('./medicationstatement.schema.js'), + require('./procedure.schema.js'), + require('./observation.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'MedicationDispense') { + return require('./medicationdispense.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.", + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally, this will be active or completed.", + }, + statusReason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Captures the reason for the current state of the MedicationStatement.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates where the medication is expected to be consumed or administered.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicationStatementmedicationReference_medicationReference_Union', + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + types: () => [require('./medication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: + 'Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'MedicationStatementsubject_subject_Union', + description: + 'The person, animal or group who is/was taking the medication.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The person, animal or group who is/was taking the medication.', + }, + context: { + type: new GraphQLUnionType({ + name: 'MedicationStatementcontext_context_Union', + description: + 'The encounter or episode of care that establishes the context for this MedicationStatement.', + types: () => [ + require('./encounter.schema.js'), + require('./episodeofcare.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + }, + }), + description: + 'The encounter or episode of care that establishes the context for this MedicationStatement.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + 'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).', + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + 'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No).', + }, + _dateAsserted: { + type: require('./element.schema.js'), + description: + 'The date when the medication statement was asserted by the information source.', + }, + dateAsserted: { + type: DateTimeScalar, + description: + 'The date when the medication statement was asserted by the information source.', + }, + informationSource: { + type: new GraphQLUnionType({ + name: 'MedicationStatementinformationSource_informationSource_Union', + description: + 'The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.', + }, + derivedFrom: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationStatementderivedFrom_derivedFrom_Union', + description: + 'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A reason for why the medication is being/was taken.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicationStatementreasonReference_reasonReference_Union', + description: + 'Condition or observation that supports why the medication is being/was taken.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + }, + }), + ), + description: + 'Condition or observation that supports why the medication is being/was taken.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Provides extra information about the medication statement that is not conveyed by the other attributes.', + }, + dosage: { + type: new GraphQLList(require('./dosage.schema.js')), + description: + 'Indicates how the medication is/was or should be taken by the patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproduct.schema.js b/src/resources/4_0_0/schemas/medicinalproduct.schema.js new file mode 100644 index 00000000..4ce8c088 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproduct.schema.js @@ -0,0 +1,270 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProduct Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProduct', + description: + 'Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProduct_Enum_schema', + values: { MedicinalProduct: { value: 'MedicinalProduct' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Business identifier for this product. Could be an MPID.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Regulatory type, e.g. Investigational or Authorized.', + }, + domain: { + type: require('./coding.schema.js'), + description: 'If this medicine applies to human or veterinary uses.', + }, + combinedPharmaceuticalDoseForm: { + type: require('./codeableconcept.schema.js'), + description: + 'The dose form for a single part product, or combined form of a multiple part product.', + }, + legalStatusOfSupply: { + type: require('./codeableconcept.schema.js'), + description: + 'The legal status of supply of the medicinal product as classified by the regulator.', + }, + additionalMonitoringIndicator: { + type: require('./codeableconcept.schema.js'), + description: + 'Whether the Medicinal Product is subject to additional monitoring for regulatory reasons.', + }, + _specialMeasures: { + type: require('./element.schema.js'), + description: + 'Whether the Medicinal Product is subject to special measures for regulatory reasons.', + }, + specialMeasures: { + type: new GraphQLList(GraphQLString), + description: + 'Whether the Medicinal Product is subject to special measures for regulatory reasons.', + }, + paediatricUseIndicator: { + type: require('./codeableconcept.schema.js'), + description: 'If authorised for use in children.', + }, + productClassification: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Allows the product to be classified by various systems.', + }, + marketingStatus: { + type: new GraphQLList(require('./marketingstatus.schema.js')), + description: + 'Marketing status of the medicinal product, in contrast to marketing authorizaton.', + }, + pharmaceuticalProduct: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicinalProductpharmaceuticalProduct_pharmaceuticalProduct_Union', + description: 'Pharmaceutical aspects of product.', + types: () => [require('./medicinalproductpharmaceutical.schema.js')], + resolveType(data) { + if ( + data && + data.resourceType === 'MedicinalProductPharmaceutical' + ) { + return require('./medicinalproductpharmaceutical.schema.js'); + } + }, + }), + ), + description: 'Pharmaceutical aspects of product.', + }, + packagedMedicinalProduct: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicinalProductpackagedMedicinalProduct_packagedMedicinalProduct_Union', + description: 'Package representation for the product.', + types: () => [require('./medicinalproductpackaged.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProductPackaged') { + return require('./medicinalproductpackaged.schema.js'); + } + }, + }), + ), + description: 'Package representation for the product.', + }, + attachedDocument: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductattachedDocument_attachedDocument_Union', + description: + 'Supporting documentation, typically for regulatory submission.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Supporting documentation, typically for regulatory submission.', + }, + masterFile: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductmasterFile_masterFile_Union', + description: + 'A master file for to the medicinal product (e.g. Pharmacovigilance System Master File).', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'A master file for to the medicinal product (e.g. Pharmacovigilance System Master File).', + }, + contact: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductcontact_contact_Union', + description: + 'A product specific contact, person (in a role), or an organization.', + types: () => [ + require('./organization.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + ), + description: + 'A product specific contact, person (in a role), or an organization.', + }, + clinicalTrial: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductclinicalTrial_clinicalTrial_Union', + description: + 'Clinical trials or studies that this product is involved in.', + types: () => [require('./researchstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + }, + }), + ), + description: + 'Clinical trials or studies that this product is involved in.', + }, + name: { + type: new GraphQLList( + new GraphQLNonNull(require('./medicinalproductname.schema.js')), + ), + description: + "The product's name, including full name and possibly coded parts.", + }, + crossReference: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Reference to another product, e.g. for linking authorised to investigational product.', + }, + manufacturingBusinessOperation: { + type: new GraphQLList( + require('./medicinalproductmanufacturingbusinessoperation.schema.js'), + ), + description: + 'An operation applied to the product, for manufacturing or adminsitrative purpose.', + }, + specialDesignation: { + type: new GraphQLList( + require('./medicinalproductspecialdesignation.schema.js'), + ), + description: + 'Indicates if the medicinal product has an orphan designation for the treatment of a rare disease.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductauthorization.schema.js b/src/resources/4_0_0/schemas/medicinalproductauthorization.schema.js new file mode 100644 index 00000000..2c8f8aa5 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductauthorization.schema.js @@ -0,0 +1,215 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductAuthorization Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductAuthorization', + description: 'The regulatory authorization of a medicinal product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductAuthorization_Enum_schema', + values: { + MedicinalProductAuthorization: { + value: 'MedicinalProductAuthorization', + }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifier for the marketing authorization, as assigned by a regulator.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'MedicinalProductAuthorizationsubject_subject_Union', + description: 'The medicinal product that is being authorized.', + types: () => [ + require('./medicinalproduct.schema.js'), + require('./medicinalproductpackaged.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductPackaged') { + return require('./medicinalproductpackaged.schema.js'); + } + }, + }), + description: 'The medicinal product that is being authorized.', + }, + country: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The country in which the marketing authorization has been granted.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Jurisdiction within a country.', + }, + status: { + type: require('./codeableconcept.schema.js'), + description: 'The status of the marketing authorization.', + }, + _statusDate: { + type: require('./element.schema.js'), + description: 'The date at which the given status has become applicable.', + }, + statusDate: { + type: DateTimeScalar, + description: 'The date at which the given status has become applicable.', + }, + _restoreDate: { + type: require('./element.schema.js'), + description: + 'The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.', + }, + restoreDate: { + type: DateTimeScalar, + description: + 'The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.', + }, + validityPeriod: { + type: require('./period.schema.js'), + description: + 'The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format.', + }, + dataExclusivityPeriod: { + type: require('./period.schema.js'), + description: + 'A period of time after authorization before generic product applicatiosn can be submitted.', + }, + _dateOfFirstAuthorization: { + type: require('./element.schema.js'), + description: + 'The date when the first authorization was granted by a Medicines Regulatory Agency.', + }, + dateOfFirstAuthorization: { + type: DateTimeScalar, + description: + 'The date when the first authorization was granted by a Medicines Regulatory Agency.', + }, + _internationalBirthDate: { + type: require('./element.schema.js'), + description: + "Date of first marketing authorization for a company's new medicinal product in any country in the World.", + }, + internationalBirthDate: { + type: DateTimeScalar, + description: + "Date of first marketing authorization for a company's new medicinal product in any country in the World.", + }, + legalBasis: { + type: require('./codeableconcept.schema.js'), + description: + 'The legal framework against which this authorization is granted.', + }, + jurisdictionalAuthorization: { + type: new GraphQLList( + require('./medicinalproductauthorizationjurisdictionalauthorization.schema.js'), + ), + description: 'Authorization in areas within a country.', + }, + holder: { + type: new GraphQLUnionType({ + name: 'MedicinalProductAuthorizationholder_holder_Union', + description: 'Marketing Authorization Holder.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Marketing Authorization Holder.', + }, + regulator: { + type: new GraphQLUnionType({ + name: 'MedicinalProductAuthorizationregulator_regulator_Union', + description: 'Medicines Regulatory Agency.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Medicines Regulatory Agency.', + }, + procedure: { + type: require('./medicinalproductauthorizationprocedure.schema.js'), + description: + 'The regulatory procedure for granting or amending a marketing authorization.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductauthorizationjurisdictionalauthorization.schema.js b/src/resources/4_0_0/schemas/medicinalproductauthorizationjurisdictionalauthorization.schema.js new file mode 100644 index 00000000..56b18018 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductauthorizationjurisdictionalauthorization.schema.js @@ -0,0 +1,52 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductAuthorizationjurisdictionalAuthorization Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductAuthorizationjurisdictionalAuthorization', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'The assigned number for the marketing authorization.', + }, + country: { + type: require('./codeableconcept.schema.js'), + description: 'Country of authorization.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Jurisdiction within a country.', + }, + legalStatusOfSupply: { + type: require('./codeableconcept.schema.js'), + description: 'The legal status of supply in a jurisdiction or region.', + }, + validityPeriod: { + type: require('./period.schema.js'), + description: 'The start and expected end date of the authorization.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductauthorizationprocedure.schema.js b/src/resources/4_0_0/schemas/medicinalproductauthorizationprocedure.schema.js new file mode 100644 index 00000000..dc223615 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductauthorizationprocedure.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductAuthorizationprocedure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductAuthorizationprocedure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Identifier for this procedure.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Type of procedure.', + }, + datePeriod: { + type: require('./period.schema.js'), + description: 'Date of procedure.', + }, + _dateDateTime: { + type: require('./element.schema.js'), + description: 'Date of procedure.', + }, + dateDateTime: { + type: DateTimeScalar, + description: 'Date of procedure.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductcontraindication.schema.js b/src/resources/4_0_0/schemas/medicinalproductcontraindication.schema.js new file mode 100644 index 00000000..971f4b96 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductcontraindication.schema.js @@ -0,0 +1,152 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductContraindication Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductContraindication', + description: + 'The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductContraindication_Enum_schema', + values: { + MedicinalProductContraindication: { + value: 'MedicinalProductContraindication', + }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductContraindicationsubject_subject_Union', + description: 'The medication for which this is an indication.', + types: () => [ + require('./medicinalproduct.schema.js'), + require('./medication.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: 'The medication for which this is an indication.', + }, + disease: { + type: require('./codeableconcept.schema.js'), + description: + 'The disease, symptom or procedure for the contraindication.', + }, + diseaseStatus: { + type: require('./codeableconcept.schema.js'), + description: + 'The status of the disease or symptom for the contraindication.', + }, + comorbidity: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A comorbidity (concurrent condition) or coinfection.', + }, + therapeuticIndication: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicinalProductContraindicationtherapeuticIndication_therapeuticIndication_Union', + description: + 'Information about the use of the medicinal product in relation to other therapies as part of the indication.', + types: () => [require('./medicinalproductindication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProductIndication') { + return require('./medicinalproductindication.schema.js'); + } + }, + }), + ), + description: + 'Information about the use of the medicinal product in relation to other therapies as part of the indication.', + }, + otherTherapy: { + type: new GraphQLList( + require('./medicinalproductcontraindicationothertherapy.schema.js'), + ), + description: + 'Information about the use of the medicinal product in relation to other therapies described as part of the indication.', + }, + population: { + type: new GraphQLList(require('./population.schema.js')), + description: 'The population group to which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductcontraindicationothertherapy.schema.js b/src/resources/4_0_0/schemas/medicinalproductcontraindicationothertherapy.schema.js new file mode 100644 index 00000000..6b0d3dbd --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductcontraindicationothertherapy.schema.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductContraindicationotherTherapy Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductContraindicationotherTherapy', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + therapyRelationshipType: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The type of relationship between the medicinal product indication or contraindication and another therapy.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicinalProductContraindicationotherTherapymedicationReference_medicationReference_Union', + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + types: () => [ + require('./medicinalproduct.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./substancespecification.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'SubstanceSpecification') { + return require('./substancespecification.schema.js'); + } + }, + }), + ), + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductindication.schema.js b/src/resources/4_0_0/schemas/medicinalproductindication.schema.js new file mode 100644 index 00000000..b6d5e0dd --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductindication.schema.js @@ -0,0 +1,163 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductIndication Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductIndication', + description: 'Indication for the Medicinal Product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductIndication_Enum_schema', + values: { + MedicinalProductIndication: { value: 'MedicinalProductIndication' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductIndicationsubject_subject_Union', + description: 'The medication for which this is an indication.', + types: () => [ + require('./medicinalproduct.schema.js'), + require('./medication.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: 'The medication for which this is an indication.', + }, + diseaseSymptomProcedure: { + type: require('./codeableconcept.schema.js'), + description: + 'The disease, symptom or procedure that is the indication for treatment.', + }, + diseaseStatus: { + type: require('./codeableconcept.schema.js'), + description: + 'The status of the disease or symptom for which the indication applies.', + }, + comorbidity: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Comorbidity (concurrent condition) or co-infection as part of the indication.', + }, + intendedEffect: { + type: require('./codeableconcept.schema.js'), + description: + 'The intended effect, aim or strategy to be achieved by the indication.', + }, + duration: { + type: require('./quantity.schema.js'), + description: 'Timing or duration information as part of the indication.', + }, + otherTherapy: { + type: new GraphQLList( + require('./medicinalproductindicationothertherapy.schema.js'), + ), + description: + 'Information about the use of the medicinal product in relation to other therapies described as part of the indication.', + }, + undesirableEffect: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicinalProductIndicationundesirableEffect_undesirableEffect_Union', + description: + 'Describe the undesirable effects of the medicinal product.', + types: () => [ + require('./medicinalproductundesirableeffect.schema.js'), + ], + resolveType(data) { + if ( + data && + data.resourceType === 'MedicinalProductUndesirableEffect' + ) { + return require('./medicinalproductundesirableeffect.schema.js'); + } + }, + }), + ), + description: 'Describe the undesirable effects of the medicinal product.', + }, + population: { + type: new GraphQLList(require('./population.schema.js')), + description: 'The population group to which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductindicationothertherapy.schema.js b/src/resources/4_0_0/schemas/medicinalproductindicationothertherapy.schema.js new file mode 100644 index 00000000..39c013b1 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductindicationothertherapy.schema.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIndicationotherTherapy Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductIndicationotherTherapy', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + therapyRelationshipType: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The type of relationship between the medicinal product indication or contraindication and another therapy.', + }, + medicationCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + }, + medicationReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicinalProductIndicationotherTherapymedicationReference_medicationReference_Union', + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + types: () => [ + require('./medicinalproduct.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./substancespecification.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'SubstanceSpecification') { + return require('./substancespecification.schema.js'); + } + }, + }), + ), + description: + 'Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductingredient.schema.js b/src/resources/4_0_0/schemas/medicinalproductingredient.schema.js new file mode 100644 index 00000000..de10ec77 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductingredient.schema.js @@ -0,0 +1,129 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductIngredient Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductIngredient', + description: + 'An ingredient of a manufactured item or pharmaceutical product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductIngredient_Enum_schema', + values: { + MedicinalProductIngredient: { value: 'MedicinalProductIngredient' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.', + }, + role: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Ingredient role e.g. Active ingredient, excipient.', + }, + _allergenicIndicator: { + type: require('./element.schema.js'), + description: 'If the ingredient is a known or suspected allergen.', + }, + allergenicIndicator: { + type: GraphQLBoolean, + description: 'If the ingredient is a known or suspected allergen.', + }, + manufacturer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductIngredientmanufacturer_manufacturer_Union', + description: 'Manufacturer of this Ingredient.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Manufacturer of this Ingredient.', + }, + specifiedSubstance: { + type: new GraphQLList( + require('./medicinalproductingredientspecifiedsubstance.schema.js'), + ), + description: 'A specified substance that comprises this ingredient.', + }, + substance: { + type: require('./medicinalproductingredientsubstance.schema.js'), + description: 'The ingredient substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstance.schema.js b/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstance.schema.js new file mode 100644 index 00000000..3a954aeb --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstance.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIngredientspecifiedSubstance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductIngredientspecifiedSubstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The specified substance.', + }, + group: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The group of specified substance, e.g. group 1 to 4.', + }, + confidentiality: { + type: require('./codeableconcept.schema.js'), + description: + 'Confidentiality level of the specified substance as the ingredient.', + }, + strength: { + type: new GraphQLList( + require('./medicinalproductingredientspecifiedsubstancestrength.schema.js'), + ), + description: + 'Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstancestrength.schema.js b/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstancestrength.schema.js new file mode 100644 index 00000000..affde368 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstancestrength.schema.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIngredientspecifiedSubstancestrength Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductIngredientspecifiedSubstancestrength', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + presentation: { + type: new GraphQLNonNull(require('./ratio.schema.js')), + description: + 'The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item.', + }, + presentationLowLimit: { + type: require('./ratio.schema.js'), + description: + 'A lower limit for the quantity of substance in the unit of presentation. For use when there is a range of strengths, this is the lower limit, with the presentation attribute becoming the upper limit.', + }, + concentration: { + type: require('./ratio.schema.js'), + description: 'The strength per unitary volume (or mass).', + }, + concentrationLowLimit: { + type: require('./ratio.schema.js'), + description: + 'A lower limit for the strength per unitary volume (or mass), for when there is a range. The concentration attribute then becomes the upper limit.', + }, + _measurementPoint: { + type: require('./element.schema.js'), + description: + 'For when strength is measured at a particular point or distance.', + }, + measurementPoint: { + type: GraphQLString, + description: + 'For when strength is measured at a particular point or distance.', + }, + country: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The country or countries for which the strength range applies.', + }, + referenceStrength: { + type: new GraphQLList( + require('./medicinalproductingredientspecifiedsubstancestrengthreferencestrength.schema.js'), + ), + description: 'Strength expressed in terms of a reference substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstancestrengthreferencestrength.schema.js b/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstancestrengthreferencestrength.schema.js new file mode 100644 index 00000000..c5296ef9 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductingredientspecifiedsubstancestrengthreferencestrength.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIngredientspecifiedSubstancestrengthreferenceStrength Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductIngredientspecifiedSubstancestrengthreferenceStrength', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + substance: { + type: require('./codeableconcept.schema.js'), + description: 'Relevant reference substance.', + }, + strength: { + type: new GraphQLNonNull(require('./ratio.schema.js')), + description: 'Strength expressed in terms of a reference substance.', + }, + strengthLowLimit: { + type: require('./ratio.schema.js'), + description: 'Strength expressed in terms of a reference substance.', + }, + _measurementPoint: { + type: require('./element.schema.js'), + description: + 'For when strength is measured at a particular point or distance.', + }, + measurementPoint: { + type: GraphQLString, + description: + 'For when strength is measured at a particular point or distance.', + }, + country: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The country or countries for which the strength range applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductingredientsubstance.schema.js b/src/resources/4_0_0/schemas/medicinalproductingredientsubstance.schema.js new file mode 100644 index 00000000..3b5ad9d4 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductingredientsubstance.schema.js @@ -0,0 +1,41 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductIngredientsubstance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductIngredientsubstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The ingredient substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductinteraction.schema.js b/src/resources/4_0_0/schemas/medicinalproductinteraction.schema.js new file mode 100644 index 00000000..aaeee1a5 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductinteraction.schema.js @@ -0,0 +1,149 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductInteraction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductInteraction', + description: + 'The interactions of the medicinal product with other medicinal products, or other forms of interactions.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductInteraction_Enum_schema', + values: { + MedicinalProductInteraction: { + value: 'MedicinalProductInteraction', + }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductInteractionsubject_subject_Union', + description: + 'The medication for which this is a described interaction.', + types: () => [ + require('./medicinalproduct.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'The medication for which this is a described interaction.', + }, + _description: { + type: require('./element.schema.js'), + description: 'The interaction described.', + }, + description: { + type: GraphQLString, + description: 'The interaction described.', + }, + interactant: { + type: new GraphQLList( + require('./medicinalproductinteractioninteractant.schema.js'), + ), + description: + 'The specific medication, food or laboratory test that interacts.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction.', + }, + effect: { + type: require('./codeableconcept.schema.js'), + description: + "The effect of the interaction, for example 'reduced gastric absorption of primary medication'.", + }, + incidence: { + type: require('./codeableconcept.schema.js'), + description: + 'The incidence of the interaction, e.g. theoretical, observed.', + }, + management: { + type: require('./codeableconcept.schema.js'), + description: 'Actions for managing the interaction.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductinteractioninteractant.schema.js b/src/resources/4_0_0/schemas/medicinalproductinteractioninteractant.schema.js new file mode 100644 index 00000000..c701852b --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductinteractioninteractant.schema.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductInteractioninteractant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductInteractioninteractant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + itemReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'MedicinalProductInteractioninteractantitemReference_itemReference_Union', + description: + 'The specific medication, food or laboratory test that interacts.', + types: () => [ + require('./medicinalproduct.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./observationdefinition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'ObservationDefinition') { + return require('./observationdefinition.schema.js'); + } + }, + }), + ), + description: + 'The specific medication, food or laboratory test that interacts.', + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The specific medication, food or laboratory test that interacts.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductmanufactured.schema.js b/src/resources/4_0_0/schemas/medicinalproductmanufactured.schema.js new file mode 100644 index 00000000..3fe35dd8 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductmanufactured.schema.js @@ -0,0 +1,142 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductManufactured Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductManufactured', + description: + 'The manufactured item as contained in the packaged medicinal product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductManufactured_Enum_schema', + values: { + MedicinalProductManufactured: { + value: 'MedicinalProductManufactured', + }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + manufacturedDoseForm: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Dose form as manufactured and before any transformation into the pharmaceutical product.', + }, + unitOfPresentation: { + type: require('./codeableconcept.schema.js'), + description: + 'The “real world” units in which the quantity of the manufactured item is described.', + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: "The quantity or 'count number' of the manufactured item.", + }, + manufacturer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductManufacturedmanufacturer_manufacturer_Union', + description: + "Manufacturer of the item (Note that this should be named 'manufacturer' but it currently causes technical issues).", + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + "Manufacturer of the item (Note that this should be named 'manufacturer' but it currently causes technical issues).", + }, + ingredient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductManufacturedingredient_ingredient_Union', + description: 'Ingredient.', + types: () => [require('./medicinalproductingredient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProductIngredient') { + return require('./medicinalproductingredient.schema.js'); + } + }, + }), + ), + description: 'Ingredient.', + }, + physicalCharacteristics: { + type: require('./prodcharacteristic.schema.js'), + description: 'Dimensions, color etc.', + }, + otherCharacteristics: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Other codeable characteristics.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductmanufacturingbusinessoperation.schema.js b/src/resources/4_0_0/schemas/medicinalproductmanufacturingbusinessoperation.schema.js new file mode 100644 index 00000000..0410a615 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductmanufacturingbusinessoperation.schema.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductmanufacturingBusinessOperation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductmanufacturingBusinessOperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + operationType: { + type: require('./codeableconcept.schema.js'), + description: 'The type of manufacturing operation.', + }, + authorisationReferenceNumber: { + type: require('./identifier.schema.js'), + description: 'Regulatory authorization reference number.', + }, + _effectiveDate: { + type: require('./element.schema.js'), + description: 'Regulatory authorization date.', + }, + effectiveDate: { + type: DateTimeScalar, + description: 'Regulatory authorization date.', + }, + confidentialityIndicator: { + type: require('./codeableconcept.schema.js'), + description: 'To indicate if this proces is commercially confidential.', + }, + manufacturer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicinalProductmanufacturingBusinessOperationmanufacturer_manufacturer_Union', + description: + 'The manufacturer or establishment associated with the process.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The manufacturer or establishment associated with the process.', + }, + regulator: { + type: new GraphQLUnionType({ + name: + 'MedicinalProductmanufacturingBusinessOperationregulator_regulator_Union', + description: 'A regulator which oversees the operation.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'A regulator which oversees the operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductname.schema.js b/src/resources/4_0_0/schemas/medicinalproductname.schema.js new file mode 100644 index 00000000..0b159486 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductname.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductname Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductname', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _productName: { + type: require('./element.schema.js'), + description: 'The full product name.', + }, + productName: { + type: new GraphQLNonNull(GraphQLString), + description: 'The full product name.', + }, + namePart: { + type: new GraphQLList( + require('./medicinalproductnamenamepart.schema.js'), + ), + description: 'Coding words or phrases of the name.', + }, + countryLanguage: { + type: new GraphQLList( + require('./medicinalproductnamecountrylanguage.schema.js'), + ), + description: 'Country where the name applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductnamecountrylanguage.schema.js b/src/resources/4_0_0/schemas/medicinalproductnamecountrylanguage.schema.js new file mode 100644 index 00000000..6ea015ef --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductnamecountrylanguage.schema.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductnamecountryLanguage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductnamecountryLanguage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + country: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Country code for where this name applies.', + }, + jurisdiction: { + type: require('./codeableconcept.schema.js'), + description: 'Jurisdiction code for where this name applies.', + }, + language: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Language code for this name.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductnamenamepart.schema.js b/src/resources/4_0_0/schemas/medicinalproductnamenamepart.schema.js new file mode 100644 index 00000000..5f89f2a2 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductnamenamepart.schema.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductnamenamePart Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductnamenamePart', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _part: { + type: require('./element.schema.js'), + description: 'A fragment of a product name.', + }, + part: { + type: new GraphQLNonNull(GraphQLString), + description: 'A fragment of a product name.', + }, + type: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'Idenifying type for this part of the name (e.g. strength part).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductpackaged.schema.js b/src/resources/4_0_0/schemas/medicinalproductpackaged.schema.js new file mode 100644 index 00000000..c5dcacd4 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductpackaged.schema.js @@ -0,0 +1,166 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductPackaged Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductPackaged', + description: 'A medicinal product in a container or package.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductPackaged_Enum_schema', + values: { + MedicinalProductPackaged: { value: 'MedicinalProductPackaged' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Unique identifier.', + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductPackagedsubject_subject_Union', + description: 'The product with this is a pack for.', + types: () => [require('./medicinalproduct.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + }, + }), + ), + description: 'The product with this is a pack for.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Textual description.', + }, + description: { + type: GraphQLString, + description: 'Textual description.', + }, + legalStatusOfSupply: { + type: require('./codeableconcept.schema.js'), + description: + 'The legal status of supply of the medicinal product as classified by the regulator.', + }, + marketingStatus: { + type: new GraphQLList(require('./marketingstatus.schema.js')), + description: 'Marketing information.', + }, + marketingAuthorization: { + type: new GraphQLUnionType({ + name: + 'MedicinalProductPackagedmarketingAuthorization_marketingAuthorization_Union', + description: 'Manufacturer of this Package Item.', + types: () => [require('./medicinalproductauthorization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProductAuthorization') { + return require('./medicinalproductauthorization.schema.js'); + } + }, + }), + description: 'Manufacturer of this Package Item.', + }, + manufacturer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductPackagedmanufacturer_manufacturer_Union', + description: 'Manufacturer of this Package Item.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Manufacturer of this Package Item.', + }, + batchIdentifier: { + type: new GraphQLList( + require('./medicinalproductpackagedbatchidentifier.schema.js'), + ), + description: 'Batch numbering.', + }, + packageItem: { + type: new GraphQLList( + new GraphQLNonNull( + require('./medicinalproductpackagedpackageitem.schema.js'), + ), + ), + description: + 'A packaging item, as a contained for medicine, possibly with other packaging items within.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductpackagedbatchidentifier.schema.js b/src/resources/4_0_0/schemas/medicinalproductpackagedbatchidentifier.schema.js new file mode 100644 index 00000000..8798367a --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductpackagedbatchidentifier.schema.js @@ -0,0 +1,47 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPackagedbatchIdentifier Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductPackagedbatchIdentifier', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + outerPackaging: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: + 'A number appearing on the outer packaging of a specific batch.', + }, + immediatePackaging: { + type: require('./identifier.schema.js'), + description: + 'A number appearing on the immediate packaging (and not the outer packaging).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductpackagedpackageitem.schema.js b/src/resources/4_0_0/schemas/medicinalproductpackagedpackageitem.schema.js new file mode 100644 index 00000000..b36c483a --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductpackagedpackageitem.schema.js @@ -0,0 +1,120 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPackagedpackageItem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductPackagedpackageItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Including possibly Data Carrier Identifier.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The physical type of the container of the medicine.', + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'The quantity of this package in the medicinal product, at the current level of packaging. The outermost is always 1.', + }, + material: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Material type of the package item.', + }, + alternateMaterial: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A possible alternate material for the packaging.', + }, + device: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductPackagedpackageItemdevice_device_Union', + description: 'A device accompanying a medicinal product.', + types: () => [require('./devicedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DeviceDefinition') { + return require('./devicedefinition.schema.js'); + } + }, + }), + ), + description: 'A device accompanying a medicinal product.', + }, + manufacturedItem: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicinalProductPackagedpackageItemmanufacturedItem_manufacturedItem_Union', + description: + 'The manufactured item as contained in the packaged medicinal product.', + types: () => [require('./medicinalproductmanufactured.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProductManufactured') { + return require('./medicinalproductmanufactured.schema.js'); + } + }, + }), + ), + description: + 'The manufactured item as contained in the packaged medicinal product.', + }, + physicalCharacteristics: { + type: require('./prodcharacteristic.schema.js'), + description: 'Dimensions, color etc.', + }, + otherCharacteristics: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Other codeable characteristics.', + }, + shelfLifeStorage: { + type: new GraphQLList(require('./productshelflife.schema.js')), + description: 'Shelf Life and storage information.', + }, + manufacturer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'MedicinalProductPackagedpackageItemmanufacturer_manufacturer_Union', + description: 'Manufacturer of this Package Item.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Manufacturer of this Package Item.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductpharmaceutical.schema.js b/src/resources/4_0_0/schemas/medicinalproductpharmaceutical.schema.js new file mode 100644 index 00000000..316cd9f9 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductpharmaceutical.schema.js @@ -0,0 +1,146 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductPharmaceutical Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductPharmaceutical', + description: + 'A pharmaceutical product described in terms of its composition and dose form.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductPharmaceutical_Enum_schema', + values: { + MedicinalProductPharmaceutical: { + value: 'MedicinalProductPharmaceutical', + }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'An identifier for the pharmaceutical medicinal product.', + }, + administrableDoseForm: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The administrable dose form, after necessary reconstitution.', + }, + unitOfPresentation: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + ingredient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductPharmaceuticalingredient_ingredient_Union', + description: 'Ingredient.', + types: () => [require('./medicinalproductingredient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProductIngredient') { + return require('./medicinalproductingredient.schema.js'); + } + }, + }), + ), + description: 'Ingredient.', + }, + device: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductPharmaceuticaldevice_device_Union', + description: 'Accompanying device.', + types: () => [require('./devicedefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DeviceDefinition') { + return require('./devicedefinition.schema.js'); + } + }, + }), + ), + description: 'Accompanying device.', + }, + characteristics: { + type: new GraphQLList( + require('./medicinalproductpharmaceuticalcharacteristics.schema.js'), + ), + description: 'Characteristics e.g. a products onset of action.', + }, + routeOfAdministration: { + type: new GraphQLList( + new GraphQLNonNull( + require('./medicinalproductpharmaceuticalrouteofadministration.schema.js'), + ), + ), + description: + 'The path by which the pharmaceutical product is taken into or makes contact with the body.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalcharacteristics.schema.js b/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalcharacteristics.schema.js new file mode 100644 index 00000000..ced37337 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalcharacteristics.schema.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPharmaceuticalcharacteristics Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductPharmaceuticalcharacteristics', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A coded characteristic.', + }, + status: { + type: require('./codeableconcept.schema.js'), + description: 'The status of characteristic e.g. assigned or pending.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministration.schema.js b/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministration.schema.js new file mode 100644 index 00000000..97ca1df6 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministration.schema.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPharmaceuticalrouteOfAdministration Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductPharmaceuticalrouteOfAdministration', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Coded expression for the route.', + }, + firstDose: { + type: require('./quantity.schema.js'), + description: + 'The first dose (dose quantity) administered in humans can be specified, for a product under investigation, using a numerical value and its unit of measurement.', + }, + maxSingleDose: { + type: require('./quantity.schema.js'), + description: + 'The maximum single dose that can be administered as per the protocol of a clinical trial can be specified using a numerical value and its unit of measurement.', + }, + maxDosePerDay: { + type: require('./quantity.schema.js'), + description: + 'The maximum dose per day (maximum dose quantity to be administered in any one 24-h period) that can be administered as per the protocol referenced in the clinical trial authorisation.', + }, + maxDosePerTreatmentPeriod: { + type: require('./ratio.schema.js'), + description: + 'The maximum dose per treatment period that can be administered as per the protocol referenced in the clinical trial authorisation.', + }, + maxTreatmentPeriod: { + type: require('./duration.schema.js'), + description: + 'The maximum treatment period during which an Investigational Medicinal Product can be administered as per the protocol referenced in the clinical trial authorisation.', + }, + targetSpecies: { + type: new GraphQLList( + require('./medicinalproductpharmaceuticalrouteofadministrationtargetspecies.schema.js'), + ), + description: 'A species for which this route applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministrationtargetspecies.schema.js b/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministrationtargetspecies.schema.js new file mode 100644 index 00000000..02046387 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministrationtargetspecies.schema.js @@ -0,0 +1,48 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPharmaceuticalrouteOfAdministrationtargetSpecies Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductPharmaceuticalrouteOfAdministrationtargetSpecies', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Coded expression for the species.', + }, + withdrawalPeriod: { + type: new GraphQLList( + require('./medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.schema.js'), + ), + description: + 'A species specific time during which consumption of animal product is not appropriate.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.schema.js b/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.schema.js new file mode 100644 index 00000000..c068d230 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductpharmaceuticalrouteofadministrationtargetspecieswithdrawalperiod.schema.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MedicinalProductPharmaceuticalrouteOfAdministrationtargetSpecieswithdrawalPeriod Schema + */ +module.exports = new GraphQLObjectType({ + name: + 'MedicinalProductPharmaceuticalrouteOfAdministrationtargetSpecieswithdrawalPeriod', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + tissue: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Coded expression for the type of tissue for which the withdrawal period applues, e.g. meat, milk.', + }, + value: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'A value for the time.', + }, + _supportingInformation: { + type: require('./element.schema.js'), + description: 'Extra information about the withdrawal period.', + }, + supportingInformation: { + type: GraphQLString, + description: 'Extra information about the withdrawal period.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductspecialdesignation.schema.js b/src/resources/4_0_0/schemas/medicinalproductspecialdesignation.schema.js new file mode 100644 index 00000000..38ac435f --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductspecialdesignation.schema.js @@ -0,0 +1,86 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductspecialDesignation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductspecialDesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Identifier for the designation, or procedure number.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of special designation, e.g. orphan drug, minor use.', + }, + intendedUse: { + type: require('./codeableconcept.schema.js'), + description: + 'The intended use of the product, e.g. prevention, treatment.', + }, + indicationCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'Condition for which the medicinal use applies.', + }, + indicationReference: { + type: new GraphQLUnionType({ + name: + 'MedicinalProductspecialDesignationindicationReference_indicationReference_Union', + description: 'Condition for which the medicinal use applies.', + types: () => [require('./medicinalproductindication.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProductIndication') { + return require('./medicinalproductindication.schema.js'); + } + }, + }), + description: 'Condition for which the medicinal use applies.', + }, + status: { + type: require('./codeableconcept.schema.js'), + description: 'For example granted, pending, expired or withdrawn.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date when the designation was granted.', + }, + date: { + type: DateTimeScalar, + description: 'Date when the designation was granted.', + }, + species: { + type: require('./codeableconcept.schema.js'), + description: 'Animal species for which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/medicinalproductundesirableeffect.schema.js b/src/resources/4_0_0/schemas/medicinalproductundesirableeffect.schema.js new file mode 100644 index 00000000..4c74e3b7 --- /dev/null +++ b/src/resources/4_0_0/schemas/medicinalproductundesirableeffect.schema.js @@ -0,0 +1,124 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MedicinalProductUndesirableEffect Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MedicinalProductUndesirableEffect', + description: 'Describe the undesirable effects of the medicinal product.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MedicinalProductUndesirableEffect_Enum_schema', + values: { + MedicinalProductUndesirableEffect: { + value: 'MedicinalProductUndesirableEffect', + }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + subject: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MedicinalProductUndesirableEffectsubject_subject_Union', + description: 'The medication for which this is an indication.', + types: () => [ + require('./medicinalproduct.schema.js'), + require('./medication.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + }, + }), + ), + description: 'The medication for which this is an indication.', + }, + symptomConditionEffect: { + type: require('./codeableconcept.schema.js'), + description: 'The symptom, condition or undesirable effect.', + }, + classification: { + type: require('./codeableconcept.schema.js'), + description: 'Classification of the effect.', + }, + frequencyOfOccurrence: { + type: require('./codeableconcept.schema.js'), + description: 'The frequency of occurrence of the effect.', + }, + population: { + type: new GraphQLList(require('./population.schema.js')), + description: 'The population group to which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/messagedefinition.schema.js b/src/resources/4_0_0/schemas/messagedefinition.schema.js new file mode 100644 index 00000000..8a6edf4d --- /dev/null +++ b/src/resources/4_0_0/schemas/messagedefinition.schema.js @@ -0,0 +1,298 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MessageDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MessageDefinition', + description: + 'Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageDefinition_Enum_schema', + values: { MessageDefinition: { value: 'MessageDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.', + }, + url: { + type: UriScalar, + description: + 'The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the message definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the message definition.', + }, + _replaces: { + type: require('./element.schema.js'), + description: 'A MessageDefinition that is superseded by this definition.', + }, + replaces: { + type: new GraphQLList(CanonicalScalar), + description: 'A MessageDefinition that is superseded by this definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this message definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this message definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the message definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the message definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the message definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the message definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the message definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this message definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this message definition is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition.', + }, + _base: { + type: require('./element.schema.js'), + description: + 'The MessageDefinition that is the basis for the contents of this resource.', + }, + base: { + type: CanonicalScalar, + description: + 'The MessageDefinition that is the basis for the contents of this resource.', + }, + _parent: { + type: require('./element.schema.js'), + description: + 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', + }, + parent: { + type: new GraphQLList(CanonicalScalar), + description: + 'Identifies a protocol or workflow that this MessageDefinition represents a step in.', + }, + eventCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'Event code or link to the EventDefinition.', + }, + _eventUri: { + type: require('./element.schema.js'), + description: 'Event code or link to the EventDefinition.', + }, + eventUri: { + type: new GraphQLNonNull(UriScalar), + description: 'Event code or link to the EventDefinition.', + }, + _category: { + type: require('./element.schema.js'), + description: 'The impact of the content of the message.', + }, + category: { + type: CodeScalar, + description: 'The impact of the content of the message.', + }, + focus: { + type: new GraphQLList(require('./messagedefinitionfocus.schema.js')), + description: + 'Identifies the resource (or resources) that are being addressed by the event. For example, the Encounter for an admit message or two Account records for a merge.', + }, + _responseRequired: { + type: require('./element.schema.js'), + description: + 'Declare at a message definition level whether a response is required or only upon error or success, or never.', + }, + responseRequired: { + type: CodeScalar, + description: + 'Declare at a message definition level whether a response is required or only upon error or success, or never.', + }, + allowedResponse: { + type: new GraphQLList( + require('./messagedefinitionallowedresponse.schema.js'), + ), + description: + 'Indicates what types of messages may be sent as an application-level response to this message.', + }, + _graph: { + type: require('./element.schema.js'), + description: + 'Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [GraphDefinition](graphdefinition.html) that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.', + }, + graph: { + type: new GraphQLList(CanonicalScalar), + description: + 'Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [GraphDefinition](graphdefinition.html) that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/messagedefinitionallowedresponse.schema.js b/src/resources/4_0_0/schemas/messagedefinitionallowedresponse.schema.js new file mode 100644 index 00000000..9b3170a8 --- /dev/null +++ b/src/resources/4_0_0/schemas/messagedefinitionallowedresponse.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary MessageDefinitionallowedResponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MessageDefinitionallowedResponse', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _message: { + type: require('./element.schema.js'), + description: + 'A reference to the message definition that must be adhered to by this supported response.', + }, + message: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'A reference to the message definition that must be adhered to by this supported response.', + }, + _situation: { + type: require('./element.schema.js'), + description: + 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', + }, + situation: { + type: GraphQLString, + description: + 'Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/messagedefinitionfocus.schema.js b/src/resources/4_0_0/schemas/messagedefinitionfocus.schema.js new file mode 100644 index 00000000..5718834e --- /dev/null +++ b/src/resources/4_0_0/schemas/messagedefinitionfocus.schema.js @@ -0,0 +1,80 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary MessageDefinitionfocus Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MessageDefinitionfocus', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'The kind of resource that must be the focus for this message.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of resource that must be the focus for this message.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'A profile that reflects constraints for the focal resource (and potentially for related resources).', + }, + profile: { + type: CanonicalScalar, + description: + 'A profile that reflects constraints for the focal resource (and potentially for related resources).', + }, + _min: { + type: require('./element.schema.js'), + description: + 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + min: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: + 'Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + max: { + type: GraphQLString, + description: + 'Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/messageheader.schema.js b/src/resources/4_0_0/schemas/messageheader.schema.js new file mode 100644 index 00000000..a2c0e8b4 --- /dev/null +++ b/src/resources/4_0_0/schemas/messageheader.schema.js @@ -0,0 +1,236 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary MessageHeader Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MessageHeader', + description: + 'The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MessageHeader_Enum_schema', + values: { MessageHeader: { value: 'MessageHeader' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + eventCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://terminology.hl7.org/CodeSystem/message-events'. Alternatively uri to the EventDefinition.", + }, + _eventUri: { + type: require('./element.schema.js'), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://terminology.hl7.org/CodeSystem/message-events'. Alternatively uri to the EventDefinition.", + }, + eventUri: { + type: new GraphQLNonNull(UriScalar), + description: + "Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value 'http://terminology.hl7.org/CodeSystem/message-events'. Alternatively uri to the EventDefinition.", + }, + destination: { + type: new GraphQLList(require('./messageheaderdestination.schema.js')), + description: + 'The destination application which the message is intended for.', + }, + sender: { + type: new GraphQLUnionType({ + name: 'MessageHeadersender_sender_Union', + description: + 'Identifies the sending system to allow the use of a trust relationship.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Identifies the sending system to allow the use of a trust relationship.', + }, + enterer: { + type: new GraphQLUnionType({ + name: 'MessageHeaderenterer_enterer_Union', + description: + 'The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions.', + }, + author: { + type: new GraphQLUnionType({ + name: 'MessageHeaderauthor_author_Union', + description: + 'The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions.', + }, + source: { + type: new GraphQLNonNull(require('./messageheadersource.schema.js')), + description: 'The source application from which this message originated.', + }, + responsible: { + type: new GraphQLUnionType({ + name: 'MessageHeaderresponsible_responsible_Union', + description: + 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party.', + }, + reason: { + type: require('./codeableconcept.schema.js'), + description: + 'Coded indication of the cause for the event - indicates a reason for the occurrence of the event that is a focus of this message.', + }, + response: { + type: require('./messageheaderresponse.schema.js'), + description: + 'Information about the message that this message is a response to. Only present if this message is a response.', + }, + focus: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MessageHeaderfocus_focus_Union', + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'The actual data of the message - a reference to the root/focus class of the event.', + }, + _definition: { + type: require('./element.schema.js'), + description: 'Permanent link to the MessageDefinition for this message.', + }, + definition: { + type: CanonicalScalar, + description: 'Permanent link to the MessageDefinition for this message.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/messageheaderdestination.schema.js b/src/resources/4_0_0/schemas/messageheaderdestination.schema.js new file mode 100644 index 00000000..14065a7e --- /dev/null +++ b/src/resources/4_0_0/schemas/messageheaderdestination.schema.js @@ -0,0 +1,95 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary MessageHeaderdestination Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MessageHeaderdestination', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-readable name for the target system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the target system.', + }, + target: { + type: new GraphQLUnionType({ + name: 'MessageHeaderdestinationtarget_target_Union', + description: + 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Identifies the target end system in situations where the initial message transmission is to an intermediary system.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: 'Indicates where the message should be routed to.', + }, + endpoint: { + type: new GraphQLNonNull(UrlScalar), + description: 'Indicates where the message should be routed to.', + }, + receiver: { + type: new GraphQLUnionType({ + name: 'MessageHeaderdestinationreceiver_receiver_Union', + description: + "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + "Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/messageheaderresponse.schema.js b/src/resources/4_0_0/schemas/messageheaderresponse.schema.js new file mode 100644 index 00000000..63367602 --- /dev/null +++ b/src/resources/4_0_0/schemas/messageheaderresponse.schema.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MessageHeaderresponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MessageHeaderresponse', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _identifier: { + type: require('./element.schema.js'), + description: + 'The MessageHeader.id of the message to which this message is a response.', + }, + identifier: { + type: new GraphQLNonNull(IdScalar), + description: + 'The MessageHeader.id of the message to which this message is a response.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not.', + }, + details: { + type: new GraphQLUnionType({ + name: 'MessageHeaderresponsedetails_details_Union', + description: 'Full details of any issues found in the message.', + types: () => [require('./operationoutcome.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'OperationOutcome') { + return require('./operationoutcome.schema.js'); + } + }, + }), + description: 'Full details of any issues found in the message.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/messageheadersource.schema.js b/src/resources/4_0_0/schemas/messageheadersource.schema.js new file mode 100644 index 00000000..98e60e46 --- /dev/null +++ b/src/resources/4_0_0/schemas/messageheadersource.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary MessageHeadersource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MessageHeadersource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Human-readable name for the source system.', + }, + name: { + type: GraphQLString, + description: 'Human-readable name for the source system.', + }, + _software: { + type: require('./element.schema.js'), + description: + 'May include configuration or other information useful in debugging.', + }, + software: { + type: GraphQLString, + description: + 'May include configuration or other information useful in debugging.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + version: { + type: GraphQLString, + description: + 'Can convey versions of multiple systems in situations where a message passes through multiple hands.', + }, + contact: { + type: require('./contactpoint.schema.js'), + description: + 'An e-mail, phone, website or other contact point to use to resolve issues with message communications.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: 'Identifies the routing target to send acknowledgements to.', + }, + endpoint: { + type: new GraphQLNonNull(UrlScalar), + description: 'Identifies the routing target to send acknowledgements to.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/meta.schema.js b/src/resources/4_0_0/schemas/meta.schema.js new file mode 100644 index 00000000..166296ed --- /dev/null +++ b/src/resources/4_0_0/schemas/meta.schema.js @@ -0,0 +1,82 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary Meta Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Meta', + description: + 'Base StructureDefinition for Meta Type: The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _versionId: { + type: require('./element.schema.js'), + description: + 'The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.', + }, + versionId: { + type: IdScalar, + description: + 'The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.', + }, + _lastUpdated: { + type: require('./element.schema.js'), + description: + 'When the resource last changed - e.g. when the version changed.', + }, + lastUpdated: { + type: InstantScalar, + description: + 'When the resource last changed - e.g. when the version changed.', + }, + _source: { + type: require('./element.schema.js'), + description: + 'A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.', + }, + source: { + type: UriScalar, + description: + 'A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).', + }, + profile: { + type: new GraphQLList(CanonicalScalar), + description: + 'A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).', + }, + security: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.', + }, + tag: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/metadataresource.schema.js b/src/resources/4_0_0/schemas/metadataresource.schema.js new file mode 100644 index 00000000..0f097f46 --- /dev/null +++ b/src/resources/4_0_0/schemas/metadataresource.schema.js @@ -0,0 +1,182 @@ +const { + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary MetadataResource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MetadataResource', + description: + 'Common Ancestor declaration for conformance and knowledge artifact resources.', + fields: () => ({ + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this metadata resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the metadata resource is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this metadata resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this metadata resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the metadata resource is stored on different servers.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the metadata resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the metadata resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the metadata resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the metadata resource.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the metadata resource.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this metadata resource. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this metadata resource. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this metadata resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the metadata resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the metadata resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the metadata resource changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the metadata resource.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the metadata resource.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the metadata resource from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the metadata resource from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate metadata resource instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the metadata resource is intended to be used.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequence.schema.js b/src/resources/4_0_0/schemas/molecularsequence.schema.js new file mode 100644 index 00000000..2bdcc9d7 --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequence.schema.js @@ -0,0 +1,233 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLInt, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MolecularSequence Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequence', + description: 'Raw data describing a biological sequence.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'MolecularSequence_Enum_schema', + values: { MolecularSequence: { value: 'MolecularSequence' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A unique identifier for this particular sequence instance. This is a FHIR-defined id.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', + }, + type: { + type: CodeScalar, + description: 'Amino Acid Sequence/ DNA Sequence / RNA Sequence.', + }, + _coordinateSystem: { + type: require('./element.schema.js'), + description: + 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', + }, + coordinateSystem: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end).', + }, + patient: { + type: new GraphQLUnionType({ + name: 'MolecularSequencepatient_patient_Union', + description: + 'The patient whose sequencing results are described by this resource.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'The patient whose sequencing results are described by this resource.', + }, + specimen: { + type: new GraphQLUnionType({ + name: 'MolecularSequencespecimen_specimen_Union', + description: 'Specimen used for sequencing.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + description: 'Specimen used for sequencing.', + }, + device: { + type: new GraphQLUnionType({ + name: 'MolecularSequencedevice_device_Union', + description: + 'The method for sequencing, for example, chip information.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: 'The method for sequencing, for example, chip information.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'MolecularSequenceperformer_performer_Union', + description: + 'The organization or lab that should be responsible for this result.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization or lab that should be responsible for this result.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The number of copies of the sequence of interest. (RNASeq).', + }, + referenceSeq: { + type: require('./molecularsequencereferenceseq.schema.js'), + description: + 'A sequence that is used as a reference to describe variants that are present in a sequence analyzed.', + }, + variant: { + type: new GraphQLList(require('./molecularsequencevariant.schema.js')), + description: + 'The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.) It can represent some complex mutation or segment variation with the assist of CIGAR string.', + }, + _observedSeq: { + type: require('./element.schema.js'), + description: + 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd.', + }, + observedSeq: { + type: GraphQLString, + description: + 'Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd.', + }, + quality: { + type: new GraphQLList(require('./molecularsequencequality.schema.js')), + description: + 'An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686)).', + }, + _readCoverage: { + type: require('./element.schema.js'), + description: + 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', + }, + readCoverage: { + type: GraphQLInt, + description: + 'Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.', + }, + repository: { + type: new GraphQLList(require('./molecularsequencerepository.schema.js')), + description: + "Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq.", + }, + pointer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'MolecularSequencepointer_pointer_Union', + description: + 'Pointer to next atomic sequence which at most contains one variant.', + types: () => [require('./molecularsequence.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MolecularSequence') { + return require('./molecularsequence.schema.js'); + } + }, + }), + ), + description: + 'Pointer to next atomic sequence which at most contains one variant.', + }, + structureVariant: { + type: new GraphQLList( + require('./molecularsequencestructurevariant.schema.js'), + ), + description: 'Information about chromosome structure variation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequencequality.schema.js b/src/resources/4_0_0/schemas/molecularsequencequality.schema.js new file mode 100644 index 00000000..1e07a09f --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequencequality.schema.js @@ -0,0 +1,162 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MolecularSequencequality Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequencequality', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'INDEL / SNP / Undefined variant.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'INDEL / SNP / Undefined variant.', + }, + standardSequence: { + type: require('./codeableconcept.schema.js'), + description: 'Gold standard sequence used for comparing against.', + }, + _start: { + type: require('./element.schema.js'), + description: + 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + score: { + type: require('./quantity.schema.js'), + description: + 'The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685)).', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: 'Which method is used to get sequence quality.', + }, + _truthTP: { + type: require('./element.schema.js'), + description: + 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + truthTP: { + type: GraphQLFloat, + description: + 'True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + _queryTP: { + type: require('./element.schema.js'), + description: + 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + queryTP: { + type: GraphQLFloat, + description: + 'True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event.', + }, + _truthFN: { + type: require('./element.schema.js'), + description: + 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', + }, + truthFN: { + type: GraphQLFloat, + description: + 'False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here.', + }, + _queryFP: { + type: require('./element.schema.js'), + description: + 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', + }, + queryFP: { + type: GraphQLFloat, + description: + 'False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here.', + }, + _gtFP: { + type: require('./element.schema.js'), + description: + 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', + }, + gtFP: { + type: GraphQLFloat, + description: + 'The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar).', + }, + _precision: { + type: require('./element.schema.js'), + description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', + }, + precision: { + type: GraphQLFloat, + description: 'QUERY.TP / (QUERY.TP + QUERY.FP).', + }, + _recall: { + type: require('./element.schema.js'), + description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', + }, + recall: { + type: GraphQLFloat, + description: 'TRUTH.TP / (TRUTH.TP + TRUTH.FN).', + }, + _fScore: { + type: require('./element.schema.js'), + description: + 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', + }, + fScore: { + type: GraphQLFloat, + description: + 'Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall).', + }, + roc: { + type: require('./molecularsequencequalityroc.schema.js'), + description: + 'Receiver Operator Characteristic (ROC) Curve to give sensitivity/specificity tradeoff.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequencequalityroc.schema.js b/src/resources/4_0_0/schemas/molecularsequencequalityroc.schema.js new file mode 100644 index 00000000..2e605755 --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequencequalityroc.schema.js @@ -0,0 +1,108 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencequalityroc Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequencequalityroc', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _score: { + type: require('./element.schema.js'), + description: + 'Invidual data point representing the GQ (genotype quality) score threshold.', + }, + score: { + type: new GraphQLList(GraphQLInt), + description: + 'Invidual data point representing the GQ (genotype quality) score threshold.', + }, + _numTP: { + type: require('./element.schema.js'), + description: + "The number of true positives if the GQ score threshold was set to 'score' field value.", + }, + numTP: { + type: new GraphQLList(GraphQLInt), + description: + "The number of true positives if the GQ score threshold was set to 'score' field value.", + }, + _numFP: { + type: require('./element.schema.js'), + description: + "The number of false positives if the GQ score threshold was set to 'score' field value.", + }, + numFP: { + type: new GraphQLList(GraphQLInt), + description: + "The number of false positives if the GQ score threshold was set to 'score' field value.", + }, + _numFN: { + type: require('./element.schema.js'), + description: + "The number of false negatives if the GQ score threshold was set to 'score' field value.", + }, + numFN: { + type: new GraphQLList(GraphQLInt), + description: + "The number of false negatives if the GQ score threshold was set to 'score' field value.", + }, + _precision: { + type: require('./element.schema.js'), + description: + "Calculated precision if the GQ score threshold was set to 'score' field value.", + }, + precision: { + type: new GraphQLList(GraphQLFloat), + description: + "Calculated precision if the GQ score threshold was set to 'score' field value.", + }, + _sensitivity: { + type: require('./element.schema.js'), + description: + "Calculated sensitivity if the GQ score threshold was set to 'score' field value.", + }, + sensitivity: { + type: new GraphQLList(GraphQLFloat), + description: + "Calculated sensitivity if the GQ score threshold was set to 'score' field value.", + }, + _fMeasure: { + type: require('./element.schema.js'), + description: + "Calculated fScore if the GQ score threshold was set to 'score' field value.", + }, + fMeasure: { + type: new GraphQLList(GraphQLFloat), + description: + "Calculated fScore if the GQ score threshold was set to 'score' field value.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequencereferenceseq.schema.js b/src/resources/4_0_0/schemas/molecularsequencereferenceseq.schema.js new file mode 100644 index 00000000..1575157a --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequencereferenceseq.schema.js @@ -0,0 +1,123 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary MolecularSequencereferenceSeq Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequencereferenceSeq', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + chromosome: { + type: require('./codeableconcept.schema.js'), + description: + 'Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340)).', + }, + _genomeBuild: { + type: require('./element.schema.js'), + description: + "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", + }, + genomeBuild: { + type: GraphQLString, + description: + "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", + }, + _orientation: { + type: require('./element.schema.js'), + description: + "A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the 'sense' strand, and the opposite complementary strand is the 'antisense' strand.", + }, + orientation: { + type: CodeScalar, + description: + "A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the 'sense' strand, and the opposite complementary strand is the 'antisense' strand.", + }, + referenceSeqId: { + type: require('./codeableconcept.schema.js'), + description: + 'Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.', + }, + referenceSeqPointer: { + type: new GraphQLUnionType({ + name: + 'MolecularSequencereferenceSeqreferenceSeqPointer_referenceSeqPointer_Union', + description: + 'A pointer to another MolecularSequence entity as reference sequence.', + types: () => [require('./molecularsequence.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'MolecularSequence') { + return require('./molecularsequence.schema.js'); + } + }, + }), + description: + 'A pointer to another MolecularSequence entity as reference sequence.', + }, + _referenceSeqString: { + type: require('./element.schema.js'), + description: "A string like 'ACGT'.", + }, + referenceSeqString: { + type: GraphQLString, + description: "A string like 'ACGT'.", + }, + _strand: { + type: require('./element.schema.js'), + description: + "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", + }, + strand: { + type: CodeScalar, + description: + "An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm.", + }, + _windowStart: { + type: require('./element.schema.js'), + description: + 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + windowStart: { + type: GraphQLInt, + description: + 'Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _windowEnd: { + type: require('./element.schema.js'), + description: + 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + windowEnd: { + type: GraphQLInt, + description: + 'End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequencerepository.schema.js b/src/resources/4_0_0/schemas/molecularsequencerepository.schema.js new file mode 100644 index 00000000..e16699ed --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequencerepository.schema.js @@ -0,0 +1,97 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary MolecularSequencerepository Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequencerepository', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: + 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + url: { + type: UriScalar, + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + name: { + type: GraphQLString, + description: + 'URI of an external repository which contains further details about the genetics data.', + }, + _datasetId: { + type: require('./element.schema.js'), + description: + 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', + }, + datasetId: { + type: GraphQLString, + description: + 'Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository.', + }, + _variantsetId: { + type: require('./element.schema.js'), + description: + 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', + }, + variantsetId: { + type: GraphQLString, + description: + 'Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository.', + }, + _readsetId: { + type: require('./element.schema.js'), + description: 'Id of the read in this external repository.', + }, + readsetId: { + type: GraphQLString, + description: 'Id of the read in this external repository.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequencestructurevariant.schema.js b/src/resources/4_0_0/schemas/molecularsequencestructurevariant.schema.js new file mode 100644 index 00000000..2700d270 --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequencestructurevariant.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencestructureVariant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequencestructureVariant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + variantType: { + type: require('./codeableconcept.schema.js'), + description: + 'Information about chromosome structure variation DNA change type.', + }, + _exact: { + type: require('./element.schema.js'), + description: + 'Used to indicate if the outer and inner start-end values have the same meaning.', + }, + exact: { + type: GraphQLBoolean, + description: + 'Used to indicate if the outer and inner start-end values have the same meaning.', + }, + _length: { + type: require('./element.schema.js'), + description: 'Length of the variant chromosome.', + }, + length: { + type: GraphQLInt, + description: 'Length of the variant chromosome.', + }, + outer: { + type: require('./molecularsequencestructurevariantouter.schema.js'), + description: 'Structural variant outer.', + }, + inner: { + type: require('./molecularsequencestructurevariantinner.schema.js'), + description: 'Structural variant inner.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequencestructurevariantinner.schema.js b/src/resources/4_0_0/schemas/molecularsequencestructurevariantinner.schema.js new file mode 100644 index 00000000..cf038340 --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequencestructurevariantinner.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencestructureVariantinner Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequencestructureVariantinner', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _start: { + type: require('./element.schema.js'), + description: + 'Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequencestructurevariantouter.schema.js b/src/resources/4_0_0/schemas/molecularsequencestructurevariantouter.schema.js new file mode 100644 index 00000000..3f397cdf --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequencestructurevariantouter.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencestructureVariantouter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequencestructureVariantouter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _start: { + type: require('./element.schema.js'), + description: + 'Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/molecularsequencevariant.schema.js b/src/resources/4_0_0/schemas/molecularsequencevariant.schema.js new file mode 100644 index 00000000..51c0737b --- /dev/null +++ b/src/resources/4_0_0/schemas/molecularsequencevariant.schema.js @@ -0,0 +1,103 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary MolecularSequencevariant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MolecularSequencevariant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _start: { + type: require('./element.schema.js'), + description: + 'Start position of the variant on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + start: { + type: GraphQLInt, + description: + 'Start position of the variant on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + end: { + type: GraphQLInt, + description: + 'End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.', + }, + _observedAllele: { + type: require('./element.schema.js'), + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + observedAllele: { + type: GraphQLString, + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + _referenceAllele: { + type: require('./element.schema.js'), + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + referenceAllele: { + type: GraphQLString, + description: + 'An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.', + }, + _cigar: { + type: require('./element.schema.js'), + description: + 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', + }, + cigar: { + type: GraphQLString, + description: + 'Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).', + }, + variantPointer: { + type: new GraphQLUnionType({ + name: 'MolecularSequencevariantvariantPointer_variantPointer_Union', + description: + 'A pointer to an Observation containing variant information.', + types: () => [require('./observation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + }, + }), + description: + 'A pointer to an Observation containing variant information.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/money.schema.js b/src/resources/4_0_0/schemas/money.schema.js new file mode 100644 index 00000000..3793f4ce --- /dev/null +++ b/src/resources/4_0_0/schemas/money.schema.js @@ -0,0 +1,50 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Money Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Money', + description: + 'Base StructureDefinition for Money Type: An amount of economic utility in some recognized currency.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.schema.js'), + description: 'Numerical value (with implicit precision).', + }, + value: { + type: GraphQLFloat, + description: 'Numerical value (with implicit precision).', + }, + _currency: { + type: require('./element.schema.js'), + description: 'ISO 4217 Currency Code.', + }, + currency: { + type: CodeScalar, + description: 'ISO 4217 Currency Code.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/moneyquantity.schema.js b/src/resources/4_0_0/schemas/moneyquantity.schema.js new file mode 100644 index 00000000..e26828bd --- /dev/null +++ b/src/resources/4_0_0/schemas/moneyquantity.schema.js @@ -0,0 +1,12 @@ +const { GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary MoneyQuantity Schema + */ +module.exports = new GraphQLObjectType({ + name: 'MoneyQuantity', + description: + 'An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision)', + fields: () => ({}), +}); diff --git a/src/resources/4_0_0/schemas/namingsystem.schema.js b/src/resources/4_0_0/schemas/namingsystem.schema.js new file mode 100644 index 00000000..c09be587 --- /dev/null +++ b/src/resources/4_0_0/schemas/namingsystem.schema.js @@ -0,0 +1,193 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary NamingSystem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NamingSystem', + description: + "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a 'System' used within the Identifier and Coding data types.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NamingSystem_Enum_schema', + values: { NamingSystem: { value: 'NamingSystem' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this naming system. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this naming system. Enables tracking the life-cycle of the content.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the purpose for the naming system - what kinds of things does it make unique?', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the naming system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the naming system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the naming system.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the naming system.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _responsible: { + type: require('./element.schema.js'), + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + responsible: { + type: GraphQLString, + description: + 'The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Categorizes a naming system for easier search by grouping related naming systems.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate naming system instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the naming system is intended to be used.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + usage: { + type: GraphQLString, + description: + 'Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.', + }, + uniqueId: { + type: new GraphQLList( + new GraphQLNonNull(require('./namingsystemuniqueid.schema.js')), + ), + description: + 'Indicates how the system may be identified when referenced in electronic exchange.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/namingsystemuniqueid.schema.js b/src/resources/4_0_0/schemas/namingsystemuniqueid.schema.js new file mode 100644 index 00000000..d96c81a8 --- /dev/null +++ b/src/resources/4_0_0/schemas/namingsystemuniqueid.schema.js @@ -0,0 +1,82 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary NamingSystemuniqueId Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NamingSystemuniqueId', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Identifies the unique identifier scheme used for this particular identifier.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The string that should be sent over the wire to identify the code system or identifier system.', + }, + _preferred: { + type: require('./element.schema.js'), + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + preferred: { + type: GraphQLBoolean, + description: + "Indicates whether this identifier is the 'preferred' identifier of this type.", + }, + _comment: { + type: require('./element.schema.js'), + description: 'Notes about the past or intended usage of this identifier.', + }, + comment: { + type: GraphQLString, + description: 'Notes about the past or intended usage of this identifier.', + }, + period: { + type: require('./period.schema.js'), + description: + 'Identifies the period of time over which this identifier is considered appropriate to refer to the naming system. Outside of this window, the identifier might be non-deterministic.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/narrative.schema.js b/src/resources/4_0_0/schemas/narrative.schema.js new file mode 100644 index 00000000..2dca037d --- /dev/null +++ b/src/resources/4_0_0/schemas/narrative.schema.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const XhtmlScalar = require('../scalars/xhtml.scalar.js'); + +/** + * @name exports + * @summary Narrative Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Narrative', + description: + 'Base StructureDefinition for Narrative Type: A human-readable summary of the resource conveying the essential clinical and business information for the resource.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _status: { + type: require('./element.schema.js'), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", + }, + _div: { + type: require('./element.schema.js'), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + div: { + type: new GraphQLNonNull(XhtmlScalar), + description: + 'The actual narrative content, a stripped down version of XHTML.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/nutritionorder.schema.js b/src/resources/4_0_0/schemas/nutritionorder.schema.js new file mode 100644 index 00000000..a371aeae --- /dev/null +++ b/src/resources/4_0_0/schemas/nutritionorder.schema.js @@ -0,0 +1,246 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary NutritionOrder Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NutritionOrder', + description: + 'A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'NutritionOrder_Enum_schema', + values: { NutritionOrder: { value: 'NutritionOrder' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this order by the order sender or by the order receiver.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + _instantiates: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + instantiates: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The workflow status of the nutrition order/request.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The workflow status of the nutrition order/request.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'NutritionOrderpatient_patient_Union', + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'NutritionOrderencounter_encounter_Union', + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + _dateTime: { + type: require('./element.schema.js'), + description: 'The date and time that this nutrition order was requested.', + }, + dateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date and time that this nutrition order was requested.', + }, + orderer: { + type: new GraphQLUnionType({ + name: 'NutritionOrderorderer_orderer_Union', + description: + 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.', + }, + allergyIntolerance: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'NutritionOrderallergyIntolerance_allergyIntolerance_Union', + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + types: () => [require('./allergyintolerance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + }, + }), + ), + description: + 'A link to a record of allergies or intolerances which should be included in the nutrition order.', + }, + foodPreferenceModifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + excludeFoodModifier: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.', + }, + oralDiet: { + type: require('./nutritionorderoraldiet.schema.js'), + description: 'Diet given orally in contrast to enteral (tube) feeding.', + }, + supplement: { + type: new GraphQLList(require('./nutritionordersupplement.schema.js')), + description: + "Oral nutritional products given in order to add further nutritional value to the patient's diet.", + }, + enteralFormula: { + type: require('./nutritionorderenteralformula.schema.js'), + description: + 'Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the {{title}} by the requester, performer, subject or other participants.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/nutritionorderenteralformula.schema.js b/src/resources/4_0_0/schemas/nutritionorderenteralformula.schema.js new file mode 100644 index 00000000..8789a2cd --- /dev/null +++ b/src/resources/4_0_0/schemas/nutritionorderenteralformula.schema.js @@ -0,0 +1,94 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderenteralFormula Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NutritionOrderenteralFormula', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + baseFormulaType: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.', + }, + _baseFormulaProductName: { + type: require('./element.schema.js'), + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + baseFormulaProductName: { + type: GraphQLString, + description: + "The product or brand name of the enteral or infant formula product such as 'ACME Adult Standard Formula'.", + }, + additiveType: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.', + }, + _additiveProductName: { + type: require('./element.schema.js'), + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + additiveProductName: { + type: GraphQLString, + description: + 'The product or brand name of the type of modular component to be added to the formula.', + }, + caloricDensity: { + type: require('./quantity.schema.js'), + description: + 'The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.', + }, + routeofAdministration: { + type: require('./codeableconcept.schema.js'), + description: + "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", + }, + administration: { + type: new GraphQLList( + require('./nutritionorderenteralformulaadministration.schema.js'), + ), + description: + 'Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.', + }, + maxVolumeToDeliver: { + type: require('./quantity.schema.js'), + description: + 'The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.', + }, + _administrationInstruction: { + type: require('./element.schema.js'), + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + administrationInstruction: { + type: GraphQLString, + description: + 'Free text formula administration, feeding instructions or additional instructions or information.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/nutritionorderenteralformulaadministration.schema.js b/src/resources/4_0_0/schemas/nutritionorderenteralformulaadministration.schema.js new file mode 100644 index 00000000..e06b81cb --- /dev/null +++ b/src/resources/4_0_0/schemas/nutritionorderenteralformulaadministration.schema.js @@ -0,0 +1,52 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderenteralFormulaadministration Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NutritionOrderenteralFormulaadministration', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + schedule: { + type: require('./timing.schema.js'), + description: + 'The time period and frequency at which the enteral formula should be delivered to the patient.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The volume of formula to provide to the patient per the specified administration schedule.', + }, + rateQuantity: { + type: require('./quantity.schema.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + rateRatio: { + type: require('./ratio.schema.js'), + description: + 'The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/nutritionorderoraldiet.schema.js b/src/resources/4_0_0/schemas/nutritionorderoraldiet.schema.js new file mode 100644 index 00000000..fa86149c --- /dev/null +++ b/src/resources/4_0_0/schemas/nutritionorderoraldiet.schema.js @@ -0,0 +1,71 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderoralDiet Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NutritionOrderoralDiet', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.', + }, + schedule: { + type: new GraphQLList(require('./timing.schema.js')), + description: + 'The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.', + }, + nutrient: { + type: new GraphQLList( + require('./nutritionorderoraldietnutrient.schema.js'), + ), + description: + 'Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.', + }, + texture: { + type: new GraphQLList( + require('./nutritionorderoraldiettexture.schema.js'), + ), + description: + 'Class that describes any texture modifications required for the patient to safely consume various types of solid foods.', + }, + fluidConsistencyType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.', + }, + _instruction: { + type: require('./element.schema.js'), + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral diet.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/nutritionorderoraldietnutrient.schema.js b/src/resources/4_0_0/schemas/nutritionorderoraldietnutrient.schema.js new file mode 100644 index 00000000..9f1fa5a1 --- /dev/null +++ b/src/resources/4_0_0/schemas/nutritionorderoraldietnutrient.schema.js @@ -0,0 +1,41 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderoralDietnutrient Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NutritionOrderoralDietnutrient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + modifier: { + type: require('./codeableconcept.schema.js'), + description: + 'The nutrient that is being modified such as carbohydrate or sodium.', + }, + amount: { + type: require('./quantity.schema.js'), + description: 'The quantity of the specified nutrient to include in diet.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/nutritionorderoraldiettexture.schema.js b/src/resources/4_0_0/schemas/nutritionorderoraldiettexture.schema.js new file mode 100644 index 00000000..745cae8b --- /dev/null +++ b/src/resources/4_0_0/schemas/nutritionorderoraldiettexture.schema.js @@ -0,0 +1,42 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary NutritionOrderoralDiettexture Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NutritionOrderoralDiettexture', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + modifier: { + type: require('./codeableconcept.schema.js'), + description: + 'Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.', + }, + foodType: { + type: require('./codeableconcept.schema.js'), + description: + 'The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/nutritionordersupplement.schema.js b/src/resources/4_0_0/schemas/nutritionordersupplement.schema.js new file mode 100644 index 00000000..fd695725 --- /dev/null +++ b/src/resources/4_0_0/schemas/nutritionordersupplement.schema.js @@ -0,0 +1,66 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary NutritionOrdersupplement Schema + */ +module.exports = new GraphQLObjectType({ + name: 'NutritionOrdersupplement', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.', + }, + _productName: { + type: require('./element.schema.js'), + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + productName: { + type: GraphQLString, + description: + "The product or brand name of the nutritional supplement such as 'Acme Protein Shake'.", + }, + schedule: { + type: new GraphQLList(require('./timing.schema.js')), + description: + 'The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount of the nutritional supplement to be given.', + }, + _instruction: { + type: require('./element.schema.js'), + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + instruction: { + type: GraphQLString, + description: + 'Free text or additional instructions or information pertaining to the oral supplement.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/observation.schema.js b/src/resources/4_0_0/schemas/observation.schema.js new file mode 100644 index 00000000..62bef39f --- /dev/null +++ b/src/resources/4_0_0/schemas/observation.schema.js @@ -0,0 +1,542 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary Observation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Observation', + description: + 'Measurements and simple assertions made about a patient, device or other subject.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Observation_Enum_schema', + values: { Observation: { value: 'Observation' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'A unique identifier assigned to this observation.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ObservationbasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.', + types: () => [ + require('./careplan.schema.js'), + require('./devicerequest.schema.js'), + require('./immunizationrecommendation.schema.js'), + require('./medicationrequest.schema.js'), + require('./nutritionorder.schema.js'), + require('./servicerequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'DeviceRequest') { + return require('./devicerequest.schema.js'); + } + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ObservationpartOf_partOf_Union', + description: + 'A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.', + types: () => [ + require('./medicationadministration.schema.js'), + require('./medicationdispense.schema.js'), + require('./medicationstatement.schema.js'), + require('./procedure.schema.js'), + require('./immunization.schema.js'), + require('./imagingstudy.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'MedicationDispense') { + return require('./medicationdispense.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the result value.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the result value.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that classifies the general type of observation being made.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'name'.", + }, + subject: { + type: new GraphQLUnionType({ + name: 'Observationsubject_subject_Union', + description: + 'The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation.', + }, + focus: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Observationfocus_focus_Union', + description: + "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record. The focus of an observation could also be an existing condition, an intervention, the subject's diet, another observation of the subject, or a body structure such as tumor or implanted device. An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus.", + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Observationencounter_encounter_Union', + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.', + }, + _effectiveDateTime: { + type: require('./element.schema.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveDateTime: { + type: DateTimeScalar, + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveTiming: { + type: require('./timing.schema.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + _effectiveInstant: { + type: require('./element.schema.js'), + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + effectiveInstant: { + type: InstantScalar, + description: + "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the 'physiologically relevant time'. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + }, + _issued: { + type: require('./element.schema.js'), + description: + 'The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.', + }, + issued: { + type: InstantScalar, + description: + 'The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Observationperformer_performer_Union', + description: + "Who was responsible for asserting the observed value as 'true'.", + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + "Who was responsible for asserting the observed value as 'true'.", + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueInteger: { + type: GraphQLInt, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + dataAbsentReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides a reason why the expected value in the element Observation.value[x] is missing.', + }, + interpretation: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A categorical assessment of an observation value. For example, high, low, normal.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Comments about the observation or the results.', + }, + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + }, + method: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates the mechanism used to perform the observation.', + }, + specimen: { + type: new GraphQLUnionType({ + name: 'Observationspecimen_specimen_Union', + description: + 'The specimen that was used when this observation was made.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + description: 'The specimen that was used when this observation was made.', + }, + device: { + type: new GraphQLUnionType({ + name: 'Observationdevice_device_Union', + description: 'The device used to generate the observation data.', + types: () => [ + require('./device.schema.js'), + require('./devicemetric.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'DeviceMetric') { + return require('./devicemetric.schema.js'); + } + }, + }), + description: 'The device used to generate the observation data.', + }, + referenceRange: { + type: new GraphQLList(require('./observationreferencerange.schema.js')), + description: + "Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an 'OR'. In other words, to represent two distinct target populations, two `referenceRange` elements would be used.", + }, + hasMember: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ObservationhasMember_hasMember_Union', + description: + 'This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.', + types: () => [ + require('./observation.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./molecularsequence.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'MolecularSequence') { + return require('./molecularsequence.schema.js'); + } + }, + }), + ), + description: + 'This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.', + }, + derivedFrom: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ObservationderivedFrom_derivedFrom_Union', + description: + 'The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.', + types: () => [ + require('./documentreference.schema.js'), + require('./imagingstudy.schema.js'), + require('./media.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./observation.schema.js'), + require('./molecularsequence.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'MolecularSequence') { + return require('./molecularsequence.schema.js'); + } + }, + }), + ), + description: + 'The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image.', + }, + component: { + type: new GraphQLList(require('./observationcomponent.schema.js')), + description: + 'Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/observationcomponent.schema.js b/src/resources/4_0_0/schemas/observationcomponent.schema.js new file mode 100644 index 00000000..58381c8b --- /dev/null +++ b/src/resources/4_0_0/schemas/observationcomponent.schema.js @@ -0,0 +1,136 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const TimeScalar = require('../scalars/time.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Observationcomponent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Observationcomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Describes what was observed. Sometimes this is called the observation 'code'.", + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueString: { + type: GraphQLString, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueInteger: { + type: GraphQLInt, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRange: { + type: require('./range.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueTime: { + type: TimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: + 'The information determined as a result of making the observation, if the information has a simple value.', + }, + dataAbsentReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Provides a reason why the expected value in the element Observation.component.value[x] is missing.', + }, + interpretation: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A categorical assessment of an observation value. For example, high, low, normal.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/observationdefinition.schema.js b/src/resources/4_0_0/schemas/observationdefinition.schema.js new file mode 100644 index 00000000..92f3aff9 --- /dev/null +++ b/src/resources/4_0_0/schemas/observationdefinition.schema.js @@ -0,0 +1,210 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ObservationDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ObservationDefinition', + description: + 'Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ObservationDefinition_Enum_schema', + values: { ObservationDefinition: { value: 'ObservationDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A code that classifies the general type of observation.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Describes what will be observed. Sometimes this is called the observation 'name'.", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A unique identifier assigned to this ObservationDefinition artifact.', + }, + _permittedDataType: { + type: require('./element.schema.js'), + description: + 'The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.', + }, + permittedDataType: { + type: new GraphQLList(CodeScalar), + description: + 'The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.', + }, + _multipleResultsAllowed: { + type: require('./element.schema.js'), + description: + 'Multiple results allowed for observations conforming to this ObservationDefinition.', + }, + multipleResultsAllowed: { + type: GraphQLBoolean, + description: + 'Multiple results allowed for observations conforming to this ObservationDefinition.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: 'The method or technique used to perform the observation.', + }, + _preferredReportName: { + type: require('./element.schema.js'), + description: + 'The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.', + }, + preferredReportName: { + type: GraphQLString, + description: + 'The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.', + }, + quantitativeDetails: { + type: require('./observationdefinitionquantitativedetails.schema.js'), + description: + 'Characteristics for quantitative results of this observation.', + }, + qualifiedInterval: { + type: new GraphQLList( + require('./observationdefinitionqualifiedinterval.schema.js'), + ), + description: + 'Multiple ranges of results qualified by different contexts for ordinal or continuous observations conforming to this ObservationDefinition.', + }, + validCodedValueSet: { + type: new GraphQLUnionType({ + name: + 'ObservationDefinitionvalidCodedValueSet_validCodedValueSet_Union', + description: + 'The set of valid coded results for the observations conforming to this ObservationDefinition.', + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'The set of valid coded results for the observations conforming to this ObservationDefinition.', + }, + normalCodedValueSet: { + type: new GraphQLUnionType({ + name: + 'ObservationDefinitionnormalCodedValueSet_normalCodedValueSet_Union', + description: + 'The set of normal coded results for the observations conforming to this ObservationDefinition.', + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'The set of normal coded results for the observations conforming to this ObservationDefinition.', + }, + abnormalCodedValueSet: { + type: new GraphQLUnionType({ + name: + 'ObservationDefinitionabnormalCodedValueSet_abnormalCodedValueSet_Union', + description: + 'The set of abnormal coded results for the observation conforming to this ObservationDefinition.', + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'The set of abnormal coded results for the observation conforming to this ObservationDefinition.', + }, + criticalCodedValueSet: { + type: new GraphQLUnionType({ + name: + 'ObservationDefinitioncriticalCodedValueSet_criticalCodedValueSet_Union', + description: + 'The set of critical coded results for the observation conforming to this ObservationDefinition.', + types: () => [require('./valueset.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + }, + }), + description: + 'The set of critical coded results for the observation conforming to this ObservationDefinition.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/observationdefinitionqualifiedinterval.schema.js b/src/resources/4_0_0/schemas/observationdefinitionqualifiedinterval.schema.js new file mode 100644 index 00000000..80cdd8cc --- /dev/null +++ b/src/resources/4_0_0/schemas/observationdefinitionqualifiedinterval.schema.js @@ -0,0 +1,86 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ObservationDefinitionqualifiedInterval Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ObservationDefinitionqualifiedInterval', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _category: { + type: require('./element.schema.js'), + description: + 'The category of interval of values for continuous or ordinal observations conforming to this ObservationDefinition.', + }, + category: { + type: CodeScalar, + description: + 'The category of interval of values for continuous or ordinal observations conforming to this ObservationDefinition.', + }, + range: { + type: require('./range.schema.js'), + description: + 'The low and high values determining the interval. There may be only one of the two.', + }, + context: { + type: require('./codeableconcept.schema.js'), + description: + 'Codes to indicate the health context the range applies to. For example, the normal or therapeutic range.', + }, + appliesTo: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Codes to indicate the target population this reference range applies to.', + }, + _gender: { + type: require('./element.schema.js'), + description: 'Sex of the population the range applies to.', + }, + gender: { + type: CodeScalar, + description: 'Sex of the population the range applies to.', + }, + age: { + type: require('./range.schema.js'), + description: + 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', + }, + gestationalAge: { + type: require('./range.schema.js'), + description: + 'The gestational age to which this reference range is applicable, in the context of pregnancy.', + }, + _condition: { + type: require('./element.schema.js'), + description: + 'Text based condition for which the reference range is valid.', + }, + condition: { + type: GraphQLString, + description: + 'Text based condition for which the reference range is valid.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/observationdefinitionquantitativedetails.schema.js b/src/resources/4_0_0/schemas/observationdefinitionquantitativedetails.schema.js new file mode 100644 index 00000000..4b140fb3 --- /dev/null +++ b/src/resources/4_0_0/schemas/observationdefinitionquantitativedetails.schema.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ObservationDefinitionquantitativeDetails Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ObservationDefinitionquantitativeDetails', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + customaryUnit: { + type: require('./codeableconcept.schema.js'), + description: + 'Customary unit used to report quantitative results of observations conforming to this ObservationDefinition.', + }, + unit: { + type: require('./codeableconcept.schema.js'), + description: + 'SI unit used to report quantitative results of observations conforming to this ObservationDefinition.', + }, + _conversionFactor: { + type: require('./element.schema.js'), + description: + 'Factor for converting value expressed with SI unit to value expressed with customary unit.', + }, + conversionFactor: { + type: GraphQLFloat, + description: + 'Factor for converting value expressed with SI unit to value expressed with customary unit.', + }, + _decimalPrecision: { + type: require('./element.schema.js'), + description: + 'Number of digits after decimal separator when the results of such observations are of type Quantity.', + }, + decimalPrecision: { + type: GraphQLInt, + description: + 'Number of digits after decimal separator when the results of such observations are of type Quantity.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/observationreferencerange.schema.js b/src/resources/4_0_0/schemas/observationreferencerange.schema.js new file mode 100644 index 00000000..7c8dd68e --- /dev/null +++ b/src/resources/4_0_0/schemas/observationreferencerange.schema.js @@ -0,0 +1,67 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary ObservationreferenceRange Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ObservationreferenceRange', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + low: { + type: require('./quantity.schema.js'), + description: + 'The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).', + }, + high: { + type: require('./quantity.schema.js'), + description: + 'The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.', + }, + appliesTo: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race. Multiple `appliesTo` are interpreted as an 'AND' of the target populations. For example, to represent a target population of African American females, both a code of female and a code for African American would be used.", + }, + age: { + type: require('./range.schema.js'), + description: + 'The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.', + }, + _text: { + type: require('./element.schema.js'), + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + text: { + type: GraphQLString, + description: + "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of 'Negative' or a list or table of 'normals'.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/operationdefinition.schema.js b/src/resources/4_0_0/schemas/operationdefinition.schema.js new file mode 100644 index 00000000..da376eb0 --- /dev/null +++ b/src/resources/4_0_0/schemas/operationdefinition.schema.js @@ -0,0 +1,318 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary OperationDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'OperationDefinition', + description: + 'A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationDefinition_Enum_schema', + values: { OperationDefinition: { value: 'OperationDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the operation definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the operation definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this operation definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this operation definition. Enables tracking the life-cycle of the content.', + }, + _kind: { + type: require('./element.schema.js'), + description: 'Whether this is an operation or a named query.', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an operation or a named query.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the operation definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the operation definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the operation definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the operation definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the operation definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the operation definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the operation definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this operation definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this operation definition is needed and why it has been designed as it has.', + }, + _affectsState: { + type: require('./element.schema.js'), + description: + "Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting state'.", + }, + affectsState: { + type: GraphQLBoolean, + description: + "Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting state'.", + }, + _code: { + type: require('./element.schema.js'), + description: 'The name used to invoke the operation.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name used to invoke the operation.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Additional information about how to use this operation or named query.', + }, + comment: { + type: GraphQLString, + description: + 'Additional information about how to use this operation or named query.', + }, + _base: { + type: require('./element.schema.js'), + description: + 'Indicates that this operation definition is a constraining profile on the base.', + }, + base: { + type: CanonicalScalar, + description: + 'Indicates that this operation definition is a constraining profile on the base.', + }, + _resource: { + type: require('./element.schema.js'), + description: 'The types on which this operation can be executed.', + }, + resource: { + type: new GraphQLList(CodeScalar), + description: 'The types on which this operation can be executed.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + system: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).', + }, + _type: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', + }, + type: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).', + }, + _instance: { + type: require('./element.schema.js'), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + instance: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Indicates whether this operation can be invoked on a particular instance of one of the given types.', + }, + _inputProfile: { + type: require('./element.schema.js'), + description: + 'Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.', + }, + inputProfile: { + type: CanonicalScalar, + description: + 'Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.', + }, + _outputProfile: { + type: require('./element.schema.js'), + description: + 'Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.', + }, + outputProfile: { + type: CanonicalScalar, + description: + 'Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.', + }, + parameter: { + type: new GraphQLList( + require('./operationdefinitionparameter.schema.js'), + ), + description: 'The parameters for the operation/query.', + }, + overload: { + type: new GraphQLList(require('./operationdefinitionoverload.schema.js')), + description: + 'Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/operationdefinitionoverload.schema.js b/src/resources/4_0_0/schemas/operationdefinitionoverload.schema.js new file mode 100644 index 00000000..d6e49cfc --- /dev/null +++ b/src/resources/4_0_0/schemas/operationdefinitionoverload.schema.js @@ -0,0 +1,48 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary OperationDefinitionoverload Schema + */ +module.exports = new GraphQLObjectType({ + name: 'OperationDefinitionoverload', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _parameterName: { + type: require('./element.schema.js'), + description: 'Name of parameter to include in overload.', + }, + parameterName: { + type: new GraphQLList(GraphQLString), + description: 'Name of parameter to include in overload.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Comments to go on overload.', + }, + comment: { + type: GraphQLString, + description: 'Comments to go on overload.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/operationdefinitionparameter.schema.js b/src/resources/4_0_0/schemas/operationdefinitionparameter.schema.js new file mode 100644 index 00000000..da03c7a9 --- /dev/null +++ b/src/resources/4_0_0/schemas/operationdefinitionparameter.schema.js @@ -0,0 +1,124 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary OperationDefinitionparameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'OperationDefinitionparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'The name of used to identify the parameter.', + }, + name: { + type: new GraphQLNonNull(CodeScalar), + description: 'The name of used to identify the parameter.', + }, + _use: { + type: require('./element.schema.js'), + description: 'Whether this is an input or an output parameter.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether this is an input or an output parameter.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.schema.js'), + description: 'Describes the meaning or use of this parameter.', + }, + documentation: { + type: GraphQLString, + description: 'Describes the meaning or use of this parameter.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type for this parameter.', + }, + type: { + type: CodeScalar, + description: 'The type for this parameter.', + }, + _targetProfile: { + type: require('./element.schema.js'), + description: + "Used when the type is 'Reference' or 'canonical', and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", + }, + targetProfile: { + type: new GraphQLList(CanonicalScalar), + description: + "Used when the type is 'Reference' or 'canonical', and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", + }, + _searchType: { + type: require('./element.schema.js'), + description: + "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", + }, + searchType: { + type: CodeScalar, + description: + "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", + }, + binding: { + type: require('./operationdefinitionparameterbinding.schema.js'), + description: + 'Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).', + }, + referencedFrom: { + type: new GraphQLList( + require('./operationdefinitionparameterreferencedfrom.schema.js'), + ), + description: + 'Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/operationdefinitionparameterbinding.schema.js b/src/resources/4_0_0/schemas/operationdefinitionparameterbinding.schema.js new file mode 100644 index 00000000..3ec5bbd4 --- /dev/null +++ b/src/resources/4_0_0/schemas/operationdefinitionparameterbinding.schema.js @@ -0,0 +1,59 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary OperationDefinitionparameterbinding Schema + */ +module.exports = new GraphQLObjectType({ + name: 'OperationDefinitionparameterbinding', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _strength: { + type: require('./element.schema.js'), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + strength: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.', + }, + _valueSet: { + type: require('./element.schema.js'), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + valueSet: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/operationdefinitionparameterreferencedfrom.schema.js b/src/resources/4_0_0/schemas/operationdefinitionparameterreferencedfrom.schema.js new file mode 100644 index 00000000..a133cbbc --- /dev/null +++ b/src/resources/4_0_0/schemas/operationdefinitionparameterreferencedfrom.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary OperationDefinitionparameterreferencedFrom Schema + */ +module.exports = new GraphQLObjectType({ + name: 'OperationDefinitionparameterreferencedFrom', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _source: { + type: require('./element.schema.js'), + description: + 'The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.', + }, + source: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'The id of the element in the referencing resource that is expected to resolve to this resource.', + }, + sourceId: { + type: GraphQLString, + description: + 'The id of the element in the referencing resource that is expected to resolve to this resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/operationoutcome.schema.js b/src/resources/4_0_0/schemas/operationoutcome.schema.js new file mode 100644 index 00000000..74e2610f --- /dev/null +++ b/src/resources/4_0_0/schemas/operationoutcome.schema.js @@ -0,0 +1,91 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary OperationOutcome Schema + */ +module.exports = new GraphQLObjectType({ + name: 'OperationOutcome', + description: + 'A collection of error, warning, or information messages that result from a system action.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OperationOutcome_Enum_schema', + values: { OperationOutcome: { value: 'OperationOutcome' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + issue: { + type: new GraphQLList( + new GraphQLNonNull(require('./operationoutcomeissue.schema.js')), + ), + description: + 'An error, warning, or information message that results from a system action.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/operationoutcomeissue.schema.js b/src/resources/4_0_0/schemas/operationoutcomeissue.schema.js new file mode 100644 index 00000000..928eb06c --- /dev/null +++ b/src/resources/4_0_0/schemas/operationoutcomeissue.schema.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary OperationOutcomeissue Schema + */ +module.exports = new GraphQLObjectType({ + name: 'OperationOutcomeissue', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _severity: { + type: require('./element.schema.js'), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + severity: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates whether the issue indicates a variation from successful processing.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.', + }, + details: { + type: require('./codeableconcept.schema.js'), + description: + 'Additional details about the error. This may be a text description of the error or a system code that identifies the error.', + }, + _diagnostics: { + type: require('./element.schema.js'), + description: 'Additional diagnostic information about the issue.', + }, + diagnostics: { + type: GraphQLString, + description: 'Additional diagnostic information about the issue.', + }, + _location: { + type: require('./element.schema.js'), + description: + "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", + }, + location: { + type: new GraphQLList(GraphQLString), + description: + "This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be 'http.' + the parameter name.", + }, + _expression: { + type: require('./element.schema.js'), + description: + 'A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.', + }, + expression: { + type: new GraphQLList(GraphQLString), + description: + 'A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/organization.schema.js b/src/resources/4_0_0/schemas/organization.schema.js new file mode 100644 index 00000000..abe77d4c --- /dev/null +++ b/src/resources/4_0_0/schemas/organization.schema.js @@ -0,0 +1,164 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Organization Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Organization', + description: + 'A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Organization_Enum_schema', + values: { Organization: { value: 'Organization' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifier for the organization that is used to identify the organization across multiple disparate systems.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether the organization's record is still in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether the organization's record is still in active use.", + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The kind(s) of organization that this is.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name associated with the organization.', + }, + name: { + type: GraphQLString, + description: 'A name associated with the organization.', + }, + _alias: { + type: require('./element.schema.js'), + description: + 'A list of alternate names that the organization is known as, or was known as in the past.', + }, + alias: { + type: new GraphQLList(GraphQLString), + description: + 'A list of alternate names that the organization is known as, or was known as in the past.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: 'A contact detail for the organization.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'An address for the organization.', + }, + partOf: { + type: new GraphQLUnionType({ + name: 'OrganizationpartOf_partOf_Union', + description: + 'The organization of which this organization forms a part.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The organization of which this organization forms a part.', + }, + contact: { + type: new GraphQLList(require('./organizationcontact.schema.js')), + description: 'Contact for the organization for a certain purpose.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Organizationendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for the organization.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for the organization.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/organizationaffiliation.schema.js b/src/resources/4_0_0/schemas/organizationaffiliation.schema.js new file mode 100644 index 00000000..e21ab519 --- /dev/null +++ b/src/resources/4_0_0/schemas/organizationaffiliation.schema.js @@ -0,0 +1,217 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary OrganizationAffiliation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'OrganizationAffiliation', + description: + 'Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'OrganizationAffiliation_Enum_schema', + values: { + OrganizationAffiliation: { value: 'OrganizationAffiliation' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Business identifiers that are specific to this role.', + }, + _active: { + type: require('./element.schema.js'), + description: + 'Whether this organization affiliation record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: + 'Whether this organization affiliation record is in active use.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period during which the participatingOrganization is affiliated with the primary organization.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'OrganizationAffiliationorganization_organization_Union', + description: + 'Organization where the role is available (primary organization/has members).', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Organization where the role is available (primary organization/has members).', + }, + participatingOrganization: { + type: new GraphQLUnionType({ + name: + 'OrganizationAffiliationparticipatingOrganization_participatingOrganization_Union', + description: + 'The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of).', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of).', + }, + network: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'OrganizationAffiliationnetwork_network_Union', + description: + "Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined).", + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + "Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined).", + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Definition of the role the participatingOrganization plays in the association.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Specific specialty of the participatingOrganization in the context of the role.', + }, + location: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'OrganizationAffiliationlocation_location_Union', + description: 'The location(s) at which the role occurs.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: 'The location(s) at which the role occurs.', + }, + healthcareService: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'OrganizationAffiliationhealthcareService_healthcareService_Union', + description: 'Healthcare services provided through the role.', + types: () => [require('./healthcareservice.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: 'Healthcare services provided through the role.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details at the participatingOrganization relevant to this Affiliation.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'OrganizationAffiliationendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for this role.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for this role.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/organizationcontact.schema.js b/src/resources/4_0_0/schemas/organizationcontact.schema.js new file mode 100644 index 00000000..2a156b3e --- /dev/null +++ b/src/resources/4_0_0/schemas/organizationcontact.schema.js @@ -0,0 +1,49 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary Organizationcontact Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Organizationcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + purpose: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates a purpose for which the contact can be reached.', + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the contact.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.', + }, + address: { + type: require('./address.schema.js'), + description: 'Visiting or postal addresses for the contact.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/parameterdefinition.schema.js b/src/resources/4_0_0/schemas/parameterdefinition.schema.js new file mode 100644 index 00000000..cc6a3f9f --- /dev/null +++ b/src/resources/4_0_0/schemas/parameterdefinition.schema.js @@ -0,0 +1,102 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ParameterDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ParameterDefinition', + description: + 'Base StructureDefinition for ParameterDefinition Type: The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', + }, + name: { + type: CodeScalar, + description: + 'The name of the parameter used to allow access to the value of the parameter in evaluation contexts.', + }, + _use: { + type: require('./element.schema.js'), + description: 'Whether the parameter is input or output for the module.', + }, + use: { + type: new GraphQLNonNull(CodeScalar), + description: 'Whether the parameter is input or output for the module.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + min: { + type: GraphQLInt, + description: + 'The minimum number of times this parameter SHALL appear in the request or response.', + }, + _max: { + type: require('./element.schema.js'), + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + max: { + type: GraphQLString, + description: + 'The maximum number of times this element is permitted to appear in the request or response.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'A brief discussion of what the parameter is for and how it is used by the module.', + }, + documentation: { + type: GraphQLString, + description: + 'A brief discussion of what the parameter is for and how it is used by the module.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of the parameter.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of the parameter.', + }, + _profile: { + type: require('./element.schema.js'), + description: + 'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.', + }, + profile: { + type: CanonicalScalar, + description: + 'If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/parameters.schema.js b/src/resources/4_0_0/schemas/parameters.schema.js new file mode 100644 index 00000000..65012da1 --- /dev/null +++ b/src/resources/4_0_0/schemas/parameters.schema.js @@ -0,0 +1,67 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Parameters Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Parameters', + description: + 'This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Parameters_Enum_schema', + values: { Parameters: { value: 'Parameters' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The base language in which the resource is written.', + }, + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + parameter: { + type: new GraphQLList(require('./parametersparameter.schema.js')), + description: 'A parameter passed to or received from the operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/parametersparameter.schema.js b/src/resources/4_0_0/schemas/parametersparameter.schema.js new file mode 100644 index 00000000..9dd90d4d --- /dev/null +++ b/src/resources/4_0_0/schemas/parametersparameter.schema.js @@ -0,0 +1,341 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary Parametersparameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Parametersparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the parameter (reference to the operation definition).', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The name of the parameter (reference to the operation definition).', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueBase64Binary: { + type: Base64BinaryScalar, + description: 'If the parameter is a data type.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'If the parameter is a data type.', + }, + _valueCanonical: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCanonical: { + type: CanonicalScalar, + description: 'If the parameter is a data type.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCode: { + type: CodeScalar, + description: 'If the parameter is a data type.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDate: { + type: DateScalar, + description: 'If the parameter is a data type.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDateTime: { + type: DateTimeScalar, + description: 'If the parameter is a data type.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'If the parameter is a data type.', + }, + _valueId: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueId: { + type: IdScalar, + description: 'If the parameter is a data type.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueInstant: { + type: InstantScalar, + description: 'If the parameter is a data type.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueInteger: { + type: GraphQLInt, + description: 'If the parameter is a data type.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueMarkdown: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueOid: { + type: OidScalar, + description: 'If the parameter is a data type.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valuePositiveInt: { + type: PositiveIntScalar, + description: 'If the parameter is a data type.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueString: { + type: GraphQLString, + description: 'If the parameter is a data type.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueTime: { + type: TimeScalar, + description: 'If the parameter is a data type.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUnsignedInt: { + type: UnsignedIntScalar, + description: 'If the parameter is a data type.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUri: { + type: UriScalar, + description: 'If the parameter is a data type.', + }, + _valueUrl: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUrl: { + type: UrlScalar, + description: 'If the parameter is a data type.', + }, + _valueUuid: { + type: require('./element.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUuid: { + type: UuidScalar, + description: 'If the parameter is a data type.', + }, + valueAddress: { + type: require('./address.schema.js'), + description: 'If the parameter is a data type.', + }, + valueAge: { + type: require('./age.schema.js'), + description: 'If the parameter is a data type.', + }, + valueAnnotation: { + type: require('./annotation.schema.js'), + description: 'If the parameter is a data type.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCoding: { + type: require('./coding.schema.js'), + description: 'If the parameter is a data type.', + }, + valueContactPoint: { + type: require('./contactpoint.schema.js'), + description: 'If the parameter is a data type.', + }, + valueCount: { + type: require('./count.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDistance: { + type: require('./distance.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDuration: { + type: require('./duration.schema.js'), + description: 'If the parameter is a data type.', + }, + valueHumanName: { + type: require('./humanname.schema.js'), + description: 'If the parameter is a data type.', + }, + valueIdentifier: { + type: require('./identifier.schema.js'), + description: 'If the parameter is a data type.', + }, + valueMoney: { + type: require('./money.schema.js'), + description: 'If the parameter is a data type.', + }, + valuePeriod: { + type: require('./period.schema.js'), + description: 'If the parameter is a data type.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: 'If the parameter is a data type.', + }, + valueRange: { + type: require('./range.schema.js'), + description: 'If the parameter is a data type.', + }, + valueRatio: { + type: require('./ratio.schema.js'), + description: 'If the parameter is a data type.', + }, + valueReference: { + type: require('./resourcelist.schema'), + description: 'If the parameter is a data type.', + }, + valueSampledData: { + type: require('./sampleddata.schema.js'), + description: 'If the parameter is a data type.', + }, + valueSignature: { + type: require('./signature.schema.js'), + description: 'If the parameter is a data type.', + }, + valueTiming: { + type: require('./timing.schema.js'), + description: 'If the parameter is a data type.', + }, + valueContactDetail: { + type: require('./contactdetail.schema.js'), + description: 'If the parameter is a data type.', + }, + valueContributor: { + type: require('./contributor.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDataRequirement: { + type: require('./datarequirement.schema.js'), + description: 'If the parameter is a data type.', + }, + valueExpression: { + type: require('./expression.schema.js'), + description: 'If the parameter is a data type.', + }, + valueParameterDefinition: { + type: require('./parameterdefinition.schema.js'), + description: 'If the parameter is a data type.', + }, + valueRelatedArtifact: { + type: require('./relatedartifact.schema.js'), + description: 'If the parameter is a data type.', + }, + valueTriggerDefinition: { + type: require('./triggerdefinition.schema.js'), + description: 'If the parameter is a data type.', + }, + valueUsageContext: { + type: require('./usagecontext.schema.js'), + description: 'If the parameter is a data type.', + }, + valueDosage: { + type: require('./dosage.schema.js'), + description: 'If the parameter is a data type.', + }, + resource: { + type: require('./resourcelist.schema'), + description: 'If the parameter is a whole resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/patient.schema.js b/src/resources/4_0_0/schemas/patient.schema.js new file mode 100644 index 00000000..18d48d0e --- /dev/null +++ b/src/resources/4_0_0/schemas/patient.schema.js @@ -0,0 +1,232 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Patient Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Patient', + description: + 'Demographics and other administrative information about an individual or animal receiving care or other health-related services.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Patient_Enum_schema', + values: { Patient: { value: 'Patient' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'An identifier for this patient.', + }, + _active: { + type: require('./element.schema.js'), + description: + "Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", + }, + active: { + type: GraphQLBoolean, + description: + "Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'A name associated with the individual.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date of birth for the individual.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the individual.', + }, + _deceasedBoolean: { + type: require('./element.schema.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedBoolean: { + type: GraphQLBoolean, + description: 'Indicates if the individual is deceased or not.', + }, + _deceasedDateTime: { + type: require('./element.schema.js'), + description: 'Indicates if the individual is deceased or not.', + }, + deceasedDateTime: { + type: DateTimeScalar, + description: 'Indicates if the individual is deceased or not.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'An address for the individual.', + }, + maritalStatus: { + type: require('./codeableconcept.schema.js'), + description: + "This field contains a patient's most recent marital (civil) status.", + }, + _multipleBirthBoolean: { + type: require('./element.schema.js'), + description: + 'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).', + }, + multipleBirthBoolean: { + type: GraphQLBoolean, + description: + 'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).', + }, + _multipleBirthInteger: { + type: require('./element.schema.js'), + description: + 'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).', + }, + multipleBirthInteger: { + type: GraphQLInt, + description: + 'Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the patient.', + }, + contact: { + type: new GraphQLList(require('./patientcontact.schema.js')), + description: + 'A contact party (e.g. guardian, partner, friend) for the patient.', + }, + communication: { + type: new GraphQLList(require('./patientcommunication.schema.js')), + description: + 'A language which may be used to communicate with the patient about his or her health.', + }, + generalPractitioner: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PatientgeneralPractitioner_generalPractitioner_Union', + description: "Patient's nominated care provider.", + types: () => [ + require('./organization.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + ), + description: "Patient's nominated care provider.", + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'PatientmanagingOrganization_managingOrganization_Union', + description: + 'Organization that is the custodian of the patient record.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that is the custodian of the patient record.', + }, + link: { + type: new GraphQLList(require('./patientlink.schema.js')), + description: + 'Link to another patient resource that concerns the same actual patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/patientcommunication.schema.js b/src/resources/4_0_0/schemas/patientcommunication.schema.js new file mode 100644 index 00000000..15a0fa42 --- /dev/null +++ b/src/resources/4_0_0/schemas/patientcommunication.schema.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Patientcommunication Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Patientcommunication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + language: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + _preferred: { + type: require('./element.schema.js'), + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + preferred: { + type: GraphQLBoolean, + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/patientcontact.schema.js b/src/resources/4_0_0/schemas/patientcontact.schema.js new file mode 100644 index 00000000..de4bbf2d --- /dev/null +++ b/src/resources/4_0_0/schemas/patientcontact.schema.js @@ -0,0 +1,86 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Patientcontact Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Patientcontact', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + relationship: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The nature of the relationship between the patient and the contact person.', + }, + name: { + type: require('./humanname.schema.js'), + description: 'A name associated with the contact person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + address: { + type: require('./address.schema.js'), + description: 'Address for the contact person.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'Patientcontactorganization_organization_Union', + description: + 'Organization on behalf of which the contact is acting or for which the contact is working.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Organization on behalf of which the contact is acting or for which the contact is working.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period during which this contact person or organization is valid to be contacted relating to this patient.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/patientlink.schema.js b/src/resources/4_0_0/schemas/patientlink.schema.js new file mode 100644 index 00000000..1bac600b --- /dev/null +++ b/src/resources/4_0_0/schemas/patientlink.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Patientlink Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Patientlink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + other: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Patientlinkother_other_Union', + description: 'The other patient resource that the link refers to.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: 'The other patient resource that the link refers to.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of link between this patient resource and another patient resource.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of link between this patient resource and another patient resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/paymentnotice.schema.js b/src/resources/4_0_0/schemas/paymentnotice.schema.js new file mode 100644 index 00000000..acf4d2a7 --- /dev/null +++ b/src/resources/4_0_0/schemas/paymentnotice.schema.js @@ -0,0 +1,233 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary PaymentNotice Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PaymentNotice', + description: + 'This resource provides the status of the payment for goods and services rendered, and the request and response resource references.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentNotice_Enum_schema', + values: { PaymentNotice: { value: 'PaymentNotice' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'A unique identifier assigned to this payment notice.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentNoticerequest_request_Union', + description: 'Reference of resource for which payment is being made.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: 'Reference of resource for which payment is being made.', + }, + response: { + type: new GraphQLUnionType({ + name: 'PaymentNoticeresponse_response_Union', + description: + 'Reference of response to resource for which payment is being made.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference of response to resource for which payment is being made.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date when this resource was created.', + }, + provider: { + type: new GraphQLUnionType({ + name: 'PaymentNoticeprovider_provider_Union', + description: + 'The practitioner who is responsible for the services rendered to the patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + payment: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'PaymentNoticepayment_payment_Union', + description: + 'A reference to the payment which is the subject of this notice.', + types: () => [require('./paymentreconciliation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'PaymentReconciliation') { + return require('./paymentreconciliation.schema.js'); + } + }, + }), + ), + description: + 'A reference to the payment which is the subject of this notice.', + }, + _paymentDate: { + type: require('./element.schema.js'), + description: 'The date when the above payment action occurred.', + }, + paymentDate: { + type: DateScalar, + description: 'The date when the above payment action occurred.', + }, + payee: { + type: new GraphQLUnionType({ + name: 'PaymentNoticepayee_payee_Union', + description: + 'The party who will receive or has received payment that is the subject of this notification.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The party who will receive or has received payment that is the subject of this notification.', + }, + recipient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'PaymentNoticerecipient_recipient_Union', + description: 'The party who is notified of the payment status.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'The party who is notified of the payment status.', + }, + amount: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'The amount sent to the payee.', + }, + paymentStatus: { + type: require('./codeableconcept.schema.js'), + description: + 'A code indicating whether payment has been sent or cleared.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/paymentreconciliation.schema.js b/src/resources/4_0_0/schemas/paymentreconciliation.schema.js new file mode 100644 index 00000000..4bfa9909 --- /dev/null +++ b/src/resources/4_0_0/schemas/paymentreconciliation.schema.js @@ -0,0 +1,217 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary PaymentReconciliation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PaymentReconciliation', + description: + 'This resource provides the details including amount of a payment and allocates the payment items being paid.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PaymentReconciliation_Enum_schema', + values: { PaymentReconciliation: { value: 'PaymentReconciliation' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A unique identifier assigned to this payment reconciliation.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time for which payments have been gathered into this bulk payment for settlement.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date when the resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date when the resource was created.', + }, + paymentIssuer: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationpaymentIssuer_paymentIssuer_Union', + description: 'The party who generated the payment.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The party who generated the payment.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationrequest_request_Union', + description: 'Original request resource reference.', + types: () => [require('./task.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Task') { + return require('./task.schema.js'); + } + }, + }), + description: 'Original request resource reference.', + }, + requestor: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationrequestor_requestor_Union', + description: + 'The practitioner who is responsible for the services rendered to the patient.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The practitioner who is responsible for the services rendered to the patient.', + }, + _outcome: { + type: require('./element.schema.js'), + description: 'The outcome of a request for a reconciliation.', + }, + outcome: { + type: CodeScalar, + description: 'The outcome of a request for a reconciliation.', + }, + _disposition: { + type: require('./element.schema.js'), + description: + 'A human readable description of the status of the request for the reconciliation.', + }, + disposition: { + type: GraphQLString, + description: + 'A human readable description of the status of the request for the reconciliation.', + }, + _paymentDate: { + type: require('./element.schema.js'), + description: + 'The date of payment as indicated on the financial instrument.', + }, + paymentDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'The date of payment as indicated on the financial instrument.', + }, + paymentAmount: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: + 'Total payment amount as indicated on the financial instrument.', + }, + paymentIdentifier: { + type: require('./identifier.schema.js'), + description: "Issuer's unique identifier for the payment instrument.", + }, + detail: { + type: new GraphQLList(require('./paymentreconciliationdetail.schema.js')), + description: + 'Distribution of the payment amount for a previously acknowledged payable.', + }, + formCode: { + type: require('./codeableconcept.schema.js'), + description: 'A code for the form to be used for printing the content.', + }, + processNote: { + type: new GraphQLList( + require('./paymentreconciliationprocessnote.schema.js'), + ), + description: + 'A note that describes or explains the processing in a human readable form.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/paymentreconciliationdetail.schema.js b/src/resources/4_0_0/schemas/paymentreconciliationdetail.schema.js new file mode 100644 index 00000000..88910edf --- /dev/null +++ b/src/resources/4_0_0/schemas/paymentreconciliationdetail.schema.js @@ -0,0 +1,161 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary PaymentReconciliationdetail Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PaymentReconciliationdetail', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Unique identifier for the current payment item for the referenced payable.', + }, + predecessor: { + type: require('./identifier.schema.js'), + description: + 'Unique identifier for the prior payment item for the referenced payable.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Code to indicate the nature of the payment.', + }, + request: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailrequest_request_Union', + description: + 'A resource, such as a Claim, the evaluation of which could lead to payment.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'A resource, such as a Claim, the evaluation of which could lead to payment.', + }, + submitter: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailsubmitter_submitter_Union', + description: + 'The party which submitted the claim or financial transaction.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The party which submitted the claim or financial transaction.', + }, + response: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailresponse_response_Union', + description: + 'A resource, such as a ClaimResponse, which contains a commitment to payment.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'A resource, such as a ClaimResponse, which contains a commitment to payment.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date from the response resource containing a commitment to pay.', + }, + date: { + type: DateScalar, + description: + 'The date from the response resource containing a commitment to pay.', + }, + responsible: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailresponsible_responsible_Union', + description: + 'A reference to the individual who is responsible for inquiries regarding the response and its payment.', + types: () => [require('./practitionerrole.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'A reference to the individual who is responsible for inquiries regarding the response and its payment.', + }, + payee: { + type: new GraphQLUnionType({ + name: 'PaymentReconciliationdetailpayee_payee_Union', + description: 'The party which is receiving the payment.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The party which is receiving the payment.', + }, + amount: { + type: require('./money.schema.js'), + description: + 'The monetary amount allocated from the total payment to the payable.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/paymentreconciliationprocessnote.schema.js b/src/resources/4_0_0/schemas/paymentreconciliationprocessnote.schema.js new file mode 100644 index 00000000..87b1a2b7 --- /dev/null +++ b/src/resources/4_0_0/schemas/paymentreconciliationprocessnote.schema.js @@ -0,0 +1,51 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PaymentReconciliationprocessNote Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PaymentReconciliationprocessNote', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'The business purpose of the note text.', + }, + type: { + type: CodeScalar, + description: 'The business purpose of the note text.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'The explanation or description associated with the processing.', + }, + text: { + type: GraphQLString, + description: + 'The explanation or description associated with the processing.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/period.schema.js b/src/resources/4_0_0/schemas/period.schema.js new file mode 100644 index 00000000..bd1e2a09 --- /dev/null +++ b/src/resources/4_0_0/schemas/period.schema.js @@ -0,0 +1,47 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Period Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Period', + description: + 'Base StructureDefinition for Period Type: A time period defined by a start and end date and optionally time.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _start: { + type: require('./element.schema.js'), + description: 'The start of the period. The boundary is inclusive.', + }, + start: { + type: DateTimeScalar, + description: 'The start of the period. The boundary is inclusive.', + }, + _end: { + type: require('./element.schema.js'), + description: + 'The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + end: { + type: DateTimeScalar, + description: + 'The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/person.schema.js b/src/resources/4_0_0/schemas/person.schema.js new file mode 100644 index 00000000..558b7810 --- /dev/null +++ b/src/resources/4_0_0/schemas/person.schema.js @@ -0,0 +1,151 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Person Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Person', + description: + 'Demographics and administrative information about a person independent of a specific health-related context.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Person_Enum_schema', + values: { Person: { value: 'Person' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Identifier for a person within a particular scope.', + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.schema.js'), + description: 'Administrative Gender.', + }, + gender: { + type: CodeScalar, + description: 'Administrative Gender.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The birth date for the person.', + }, + birthDate: { + type: DateScalar, + description: 'The birth date for the person.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: 'One or more addresses for the person.', + }, + photo: { + type: require('./attachment.schema.js'), + description: + 'An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.', + }, + managingOrganization: { + type: new GraphQLUnionType({ + name: 'PersonmanagingOrganization_managingOrganization_Union', + description: + 'The organization that is the custodian of the person record.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization that is the custodian of the person record.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether this person's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this person's record is in active use.", + }, + link: { + type: new GraphQLList(require('./personlink.schema.js')), + description: 'Link to a resource that concerns the same actual person.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/personlink.schema.js b/src/resources/4_0_0/schemas/personlink.schema.js new file mode 100644 index 00000000..c274203d --- /dev/null +++ b/src/resources/4_0_0/schemas/personlink.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Personlink Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Personlink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + target: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Personlinktarget_target_Union', + description: + 'The resource to which this actual person is associated.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./relatedperson.schema.js'), + require('./person.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Person') { + return require('./person.schema.js'); + } + }, + }), + ), + description: 'The resource to which this actual person is associated.', + }, + _assurance: { + type: require('./element.schema.js'), + description: + 'Level of assurance that this link is associated with the target resource.', + }, + assurance: { + type: CodeScalar, + description: + 'Level of assurance that this link is associated with the target resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/plandefinition.schema.js b/src/resources/4_0_0/schemas/plandefinition.schema.js new file mode 100644 index 00000000..a9c5d109 --- /dev/null +++ b/src/resources/4_0_0/schemas/plandefinition.schema.js @@ -0,0 +1,339 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary PlanDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PlanDefinition', + description: + 'This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PlanDefinition_Enum_schema', + values: { PlanDefinition: { value: 'PlanDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the plan definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the plan definition.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the plan definition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the plan definition giving additional information about its content.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this plan definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this plan definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A code or group definition that describes the intended subject of the plan definition.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: 'PlanDefinitionsubjectReference_subjectReference_Union', + description: + 'A code or group definition that describes the intended subject of the plan definition.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'A code or group definition that describes the intended subject of the plan definition.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the plan definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the plan definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the plan definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the plan definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the plan definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this plan definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this plan definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description of how the plan definition is used from a clinical perspective.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description of how the plan definition is used from a clinical perspective.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the plan definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.schema.js'), + description: + 'A reference to a Library resource containing any formal logic used by the plan definition.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing any formal logic used by the plan definition.', + }, + goal: { + type: new GraphQLList(require('./plandefinitiongoal.schema.js')), + description: + 'Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.', + }, + action: { + type: new GraphQLList(require('./plandefinitionaction.schema.js')), + description: + 'An action or group of actions to be taken as part of the plan.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/plandefinitionaction.schema.js b/src/resources/4_0_0/schemas/plandefinitionaction.schema.js new file mode 100644 index 00000000..c73c151c --- /dev/null +++ b/src/resources/4_0_0/schemas/plandefinitionaction.schema.js @@ -0,0 +1,286 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary PlanDefinitionaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PlanDefinitionaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _prefix: { + type: require('./element.schema.js'), + description: 'A user-visible prefix for the action.', + }, + prefix: { + type: GraphQLString, + description: 'A user-visible prefix for the action.', + }, + _title: { + type: require('./element.schema.js'), + description: 'The title of the action displayed to a user.', + }, + title: { + type: GraphQLString, + description: 'The title of the action displayed to a user.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A brief description of the action used to provide a summary to display to the user.', + }, + description: { + type: GraphQLString, + description: + 'A brief description of the action used to provide a summary to display to the user.', + }, + _textEquivalent: { + type: require('./element.schema.js'), + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.', + }, + textEquivalent: { + type: GraphQLString, + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the action should be addressed with respect to other actions.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the action should be addressed with respect to other actions.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A description of why this action is necessary or appropriate.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', + }, + _goalId: { + type: require('./element.schema.js'), + description: + 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', + }, + goalId: { + type: new GraphQLList(IdScalar), + description: + 'Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A code or group definition that describes the intended subject of the action and its children, if any.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: 'PlanDefinitionactionsubjectReference_subjectReference_Union', + description: + 'A code or group definition that describes the intended subject of the action and its children, if any.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'A code or group definition that describes the intended subject of the action and its children, if any.', + }, + trigger: { + type: new GraphQLList(require('./triggerdefinition.schema.js')), + description: 'A description of when the action should be triggered.', + }, + condition: { + type: new GraphQLList( + require('./plandefinitionactioncondition.schema.js'), + ), + description: + 'An expression that describes applicability criteria or start/stop conditions for the action.', + }, + input: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: 'Defines input data requirements for the action.', + }, + output: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: 'Defines the outputs of the action, if any.', + }, + relatedAction: { + type: new GraphQLList( + require('./plandefinitionactionrelatedaction.schema.js'), + ), + description: + "A relationship to another action such as 'before' or '30-60 minutes after start of'.", + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'An optional value describing when the action should be performed.', + }, + timingAge: { + type: require('./age.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDuration: { + type: require('./duration.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingRange: { + type: require('./range.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + participant: { + type: new GraphQLList( + require('./plandefinitionactionparticipant.schema.js'), + ), + description: + 'Indicates who should participate in performing the action described.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'The type of action to perform (create, update, remove).', + }, + _groupingBehavior: { + type: require('./element.schema.js'), + description: + 'Defines the grouping behavior for the action and its children.', + }, + groupingBehavior: { + type: CodeScalar, + description: + 'Defines the grouping behavior for the action and its children.', + }, + _selectionBehavior: { + type: require('./element.schema.js'), + description: + 'Defines the selection behavior for the action and its children.', + }, + selectionBehavior: { + type: CodeScalar, + description: + 'Defines the selection behavior for the action and its children.', + }, + _requiredBehavior: { + type: require('./element.schema.js'), + description: 'Defines the required behavior for the action.', + }, + requiredBehavior: { + type: CodeScalar, + description: 'Defines the required behavior for the action.', + }, + _precheckBehavior: { + type: require('./element.schema.js'), + description: 'Defines whether the action should usually be preselected.', + }, + precheckBehavior: { + type: CodeScalar, + description: 'Defines whether the action should usually be preselected.', + }, + _cardinalityBehavior: { + type: require('./element.schema.js'), + description: 'Defines whether the action can be selected multiple times.', + }, + cardinalityBehavior: { + type: CodeScalar, + description: 'Defines whether the action can be selected multiple times.', + }, + _definitionCanonical: { + type: require('./element.schema.js'), + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + definitionCanonical: { + type: CanonicalScalar, + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + _definitionUri: { + type: require('./element.schema.js'), + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + definitionUri: { + type: UriScalar, + description: + 'A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.', + }, + _transform: { + type: require('./element.schema.js'), + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + transform: { + type: CanonicalScalar, + description: + 'A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.', + }, + dynamicValue: { + type: new GraphQLList( + require('./plandefinitionactiondynamicvalue.schema.js'), + ), + description: + "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/plandefinitionactioncondition.schema.js b/src/resources/4_0_0/schemas/plandefinitionactioncondition.schema.js new file mode 100644 index 00000000..21b81da0 --- /dev/null +++ b/src/resources/4_0_0/schemas/plandefinitionactioncondition.schema.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PlanDefinitionactioncondition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PlanDefinitionactioncondition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _kind: { + type: require('./element.schema.js'), + description: 'The kind of condition.', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'The kind of condition.', + }, + expression: { + type: require('./expression.schema.js'), + description: + 'An expression that returns true or false, indicating whether the condition is satisfied.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/plandefinitionactiondynamicvalue.schema.js b/src/resources/4_0_0/schemas/plandefinitionactiondynamicvalue.schema.js new file mode 100644 index 00000000..91de6c4a --- /dev/null +++ b/src/resources/4_0_0/schemas/plandefinitionactiondynamicvalue.schema.js @@ -0,0 +1,47 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary PlanDefinitionactiondynamicValue Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PlanDefinitionactiondynamicValue', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _path: { + type: require('./element.schema.js'), + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + path: { + type: GraphQLString, + description: + 'The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).', + }, + expression: { + type: require('./expression.schema.js'), + description: + 'An expression specifying the value of the customized element.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/plandefinitionactionparticipant.schema.js b/src/resources/4_0_0/schemas/plandefinitionactionparticipant.schema.js new file mode 100644 index 00000000..e737e10e --- /dev/null +++ b/src/resources/4_0_0/schemas/plandefinitionactionparticipant.schema.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PlanDefinitionactionparticipant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PlanDefinitionactionparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of participant in the action.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant in the action.', + }, + role: { + type: require('./codeableconcept.schema.js'), + description: + 'The role the participant should play in performing the described action.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/plandefinitionactionrelatedaction.schema.js b/src/resources/4_0_0/schemas/plandefinitionactionrelatedaction.schema.js new file mode 100644 index 00000000..b9e2ade9 --- /dev/null +++ b/src/resources/4_0_0/schemas/plandefinitionactionrelatedaction.schema.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PlanDefinitionactionrelatedAction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PlanDefinitionactionrelatedAction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _actionId: { + type: require('./element.schema.js'), + description: 'The element id of the related action.', + }, + actionId: { + type: new GraphQLNonNull(IdScalar), + description: 'The element id of the related action.', + }, + _relationship: { + type: require('./element.schema.js'), + description: 'The relationship of this action to the related action.', + }, + relationship: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relationship of this action to the related action.', + }, + offsetDuration: { + type: require('./duration.schema.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + offsetRange: { + type: require('./range.schema.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/plandefinitiongoal.schema.js b/src/resources/4_0_0/schemas/plandefinitiongoal.schema.js new file mode 100644 index 00000000..ab10c2f9 --- /dev/null +++ b/src/resources/4_0_0/schemas/plandefinitiongoal.schema.js @@ -0,0 +1,69 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary PlanDefinitiongoal Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PlanDefinitiongoal', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: require('./codeableconcept.schema.js'), + description: 'Indicates a category the goal falls within.', + }, + description: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "Human-readable and/or coded description of a specific desired objective of care, such as 'control blood pressure' or 'negotiate an obstacle course' or 'dance with child at wedding'.", + }, + priority: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the expected level of importance associated with reaching/sustaining the defined goal.', + }, + start: { + type: require('./codeableconcept.schema.js'), + description: 'The event after which the goal should begin being pursued.', + }, + addresses: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies problems, conditions, issues, or concerns the goal is intended to address.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.', + }, + target: { + type: new GraphQLList(require('./plandefinitiongoaltarget.schema.js')), + description: 'Indicates what should be done and within what timeframe.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/plandefinitiongoaltarget.schema.js b/src/resources/4_0_0/schemas/plandefinitiongoaltarget.schema.js new file mode 100644 index 00000000..ba3f4cab --- /dev/null +++ b/src/resources/4_0_0/schemas/plandefinitiongoaltarget.schema.js @@ -0,0 +1,57 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary PlanDefinitiongoaltarget Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PlanDefinitiongoaltarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + measure: { + type: require('./codeableconcept.schema.js'), + description: + 'The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.', + }, + detailQuantity: { + type: require('./quantity.schema.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + detailRange: { + type: require('./range.schema.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + detailCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.', + }, + due: { + type: require('./duration.schema.js'), + description: + 'Indicates the timeframe after the start of the goal in which the goal should be met.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/population.schema.js b/src/resources/4_0_0/schemas/population.schema.js new file mode 100644 index 00000000..ee3b685a --- /dev/null +++ b/src/resources/4_0_0/schemas/population.schema.js @@ -0,0 +1,54 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary Population Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Population', + description: + 'Base StructureDefinition for Population Type: A populatioof people with some set of grouping criteria.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + ageRange: { + type: require('./range.schema.js'), + description: 'The age of the specific population.', + }, + ageCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'The age of the specific population.', + }, + gender: { + type: require('./codeableconcept.schema.js'), + description: 'The gender of the specific population.', + }, + race: { + type: require('./codeableconcept.schema.js'), + description: 'Race of the specific population.', + }, + physiologicalCondition: { + type: require('./codeableconcept.schema.js'), + description: + 'The existing physiological conditions of the specific population to which this applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/practitioner.schema.js b/src/resources/4_0_0/schemas/practitioner.schema.js new file mode 100644 index 00000000..3a7f4f36 --- /dev/null +++ b/src/resources/4_0_0/schemas/practitioner.schema.js @@ -0,0 +1,144 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Practitioner Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Practitioner', + description: + 'A person who is directly or indirectly involved in the provisioning of healthcare.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Practitioner_Enum_schema', + values: { Practitioner: { value: 'Practitioner' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'An identifier that applies to this person in this role.', + }, + _active: { + type: require('./element.schema.js'), + description: "Whether this practitioner's record is in active use.", + }, + active: { + type: GraphQLBoolean, + description: "Whether this practitioner's record is in active use.", + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'The name(s) associated with the practitioner.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the practitioner, e.g. a telephone number or an email address.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: + 'Address(es) of the practitioner that are not role specific (typically home address). Work addresses are not typically entered in this property as they are usually role dependent.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date of birth for the practitioner.', + }, + birthDate: { + type: DateScalar, + description: 'The date of birth for the practitioner.', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the person.', + }, + qualification: { + type: new GraphQLList(require('./practitionerqualification.schema.js')), + description: + 'The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner. For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.', + }, + communication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A language the practitioner can use in patient communication.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/practitionerqualification.schema.js b/src/resources/4_0_0/schemas/practitionerqualification.schema.js new file mode 100644 index 00000000..bc532c88 --- /dev/null +++ b/src/resources/4_0_0/schemas/practitionerqualification.schema.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Practitionerqualification Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Practitionerqualification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + "An identifier that applies to this person's qualification in this role.", + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Coded representation of the qualification.', + }, + period: { + type: require('./period.schema.js'), + description: 'Period during which the qualification is valid.', + }, + issuer: { + type: new GraphQLUnionType({ + name: 'Practitionerqualificationissuer_issuer_Union', + description: + 'Organization that regulates and issues the qualification.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'Organization that regulates and issues the qualification.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/practitionerrole.schema.js b/src/resources/4_0_0/schemas/practitionerrole.schema.js new file mode 100644 index 00000000..51926c38 --- /dev/null +++ b/src/resources/4_0_0/schemas/practitionerrole.schema.js @@ -0,0 +1,221 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary PractitionerRole Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PractitionerRole', + description: + 'A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'PractitionerRole_Enum_schema', + values: { PractitionerRole: { value: 'PractitionerRole' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Business Identifiers that are specific to a role/location.', + }, + _active: { + type: require('./element.schema.js'), + description: 'Whether this practitioner role record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this practitioner role record is in active use.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period during which the person is authorized to act as a practitioner in these role(s) for the organization.', + }, + practitioner: { + type: new GraphQLUnionType({ + name: 'PractitionerRolepractitioner_practitioner_Union', + description: + 'Practitioner that is able to provide the defined services for the organization.', + types: () => [require('./practitioner.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + }, + }), + description: + 'Practitioner that is able to provide the defined services for the organization.', + }, + organization: { + type: new GraphQLUnionType({ + name: 'PractitionerRoleorganization_organization_Union', + description: + 'The organization where the Practitioner performs the roles associated.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization where the Practitioner performs the roles associated.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Roles which this practitioner is authorized to perform for the organization.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Specific specialty of the practitioner.', + }, + location: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PractitionerRolelocation_location_Union', + description: + 'The location(s) at which this practitioner provides care.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: 'The location(s) at which this practitioner provides care.', + }, + healthcareService: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PractitionerRolehealthcareService_healthcareService_Union', + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + types: () => [require('./healthcareservice.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: + "The list of healthcare services that this worker provides for this role's Organization/Location(s).", + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details that are specific to the role/location/service.', + }, + availableTime: { + type: new GraphQLList( + require('./practitionerroleavailabletime.schema.js'), + ), + description: + 'A collection of times the practitioner is available or performing this role at the location and/or healthcareservice.', + }, + notAvailable: { + type: new GraphQLList( + require('./practitionerrolenotavailable.schema.js'), + ), + description: + 'The practitioner is not available or performing this role during this period of time due to the provided reason.', + }, + _availabilityExceptions: { + type: require('./element.schema.js'), + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + availabilityExceptions: { + type: GraphQLString, + description: + 'A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.', + }, + endpoint: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'PractitionerRoleendpoint_endpoint_Union', + description: + 'Technical endpoints providing access to services operated for the practitioner with this role.', + types: () => [require('./endpoint.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + }, + }), + ), + description: + 'Technical endpoints providing access to services operated for the practitioner with this role.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/practitionerroleavailabletime.schema.js b/src/resources/4_0_0/schemas/practitionerroleavailabletime.schema.js new file mode 100644 index 00000000..7506f055 --- /dev/null +++ b/src/resources/4_0_0/schemas/practitionerroleavailabletime.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary PractitionerRoleavailableTime Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PractitionerRoleavailableTime', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _daysOfWeek: { + type: require('./element.schema.js'), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + daysOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'Indicates which days of the week are available between the start and end Times.', + }, + _allDay: { + type: require('./element.schema.js'), + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + allDay: { + type: GraphQLBoolean, + description: + 'Is this always available? (hence times are irrelevant) e.g. 24 hour service.', + }, + _availableStartTime: { + type: require('./element.schema.js'), + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableStartTime: { + type: TimeScalar, + description: + 'The opening time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + _availableEndTime: { + type: require('./element.schema.js'), + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + availableEndTime: { + type: TimeScalar, + description: + 'The closing time of day. Note: If the AllDay flag is set, then this time is ignored.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/practitionerrolenotavailable.schema.js b/src/resources/4_0_0/schemas/practitionerrolenotavailable.schema.js new file mode 100644 index 00000000..1434fdfc --- /dev/null +++ b/src/resources/4_0_0/schemas/practitionerrolenotavailable.schema.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary PractitionerRolenotAvailable Schema + */ +module.exports = new GraphQLObjectType({ + name: 'PractitionerRolenotAvailable', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The reason that can be presented to the user as to why this time is not available.', + }, + during: { + type: require('./period.schema.js'), + description: + 'Service is not available (seasonally or for a public holiday) from this date.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/procedure.schema.js b/src/resources/4_0_0/schemas/procedure.schema.js new file mode 100644 index 00000000..ba74ff81 --- /dev/null +++ b/src/resources/4_0_0/schemas/procedure.schema.js @@ -0,0 +1,478 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Procedure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Procedure', + description: + 'An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Procedure_Enum_schema', + values: { Procedure: { value: 'Procedure' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedurebasedOn_basedOn_Union', + description: + 'A reference to a resource that contains details of the request for this procedure.', + types: () => [ + require('./careplan.schema.js'), + require('./servicerequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'A reference to a resource that contains details of the request for this procedure.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedurepartOf_partOf_Union', + description: + 'A larger event of which this particular procedure is a component or step.', + types: () => [ + require('./procedure.schema.js'), + require('./observation.schema.js'), + require('./medicationadministration.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular procedure is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'A code specifying the state of the procedure. Generally, this will be the in-progress or completed state.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code specifying the state of the procedure. Generally, this will be the in-progress or completed state.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'Captures the reason for the current state of the procedure.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + "A code that classifies the procedure for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + "The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. 'Laparoscopic Appendectomy').", + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Proceduresubject_subject_Union', + description: + 'The person, animal or group on which the procedure was performed.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + 'The person, animal or group on which the procedure was performed.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Procedureencounter_encounter_Union', + description: + 'The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated.', + }, + _performedDateTime: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedDateTime: { + type: DateTimeScalar, + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedPeriod: { + type: require('./period.schema.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + _performedString: { + type: require('./element.schema.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedString: { + type: GraphQLString, + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedAge: { + type: require('./age.schema.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + performedRange: { + type: require('./range.schema.js'), + description: + 'Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.', + }, + recorder: { + type: new GraphQLUnionType({ + name: 'Procedurerecorder_recorder_Union', + description: + 'Individual who recorded the record and takes responsibility for its content.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'Individual who recorded the record and takes responsibility for its content.', + }, + asserter: { + type: new GraphQLUnionType({ + name: 'Procedureasserter_asserter_Union', + description: 'Individual who is making the procedure statement.', + types: () => [ + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'Individual who is making the procedure statement.', + }, + performer: { + type: new GraphQLList(require('./procedureperformer.schema.js')), + description: "Limited to 'real' people rather than equipment.", + }, + location: { + type: new GraphQLUnionType({ + name: 'Procedurelocation_location_Union', + description: + 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'The location where the procedure actually happened. E.g. a newborn at home, a tracheostomy at a restaurant.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The coded reason why the procedure was performed. This may be a coded entity of some type, or may simply be present as text.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedurereasonReference_reasonReference_Union', + description: 'The justification of why the procedure was performed.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./procedure.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'The justification of why the procedure was performed.', + }, + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.', + }, + outcome: { + type: require('./codeableconcept.schema.js'), + description: + 'The outcome of the procedure - did it resolve the reasons for the procedure being performed?', + }, + report: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Procedurereport_report_Union', + description: + 'This could be a histology result, pathology report, surgical report, etc.', + types: () => [ + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + require('./composition.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + }, + }), + ), + description: + 'This could be a histology result, pathology report, surgical report, etc.', + }, + complication: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues.", + }, + complicationDetail: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedurecomplicationDetail_complicationDetail_Union', + description: + 'Any complications that occurred during the procedure, or in the immediate post-performance period.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + ), + description: + 'Any complications that occurred during the procedure, or in the immediate post-performance period.', + }, + followUp: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'If the procedure required specific follow up - e.g. removal of sutures. The follow up may be represented as a simple note or could potentially be more complex, in which case the CarePlan resource can be used.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Any other notes and comments about the procedure.', + }, + focalDevice: { + type: new GraphQLList(require('./procedurefocaldevice.schema.js')), + description: + 'A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.', + }, + usedReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ProcedureusedReference_usedReference_Union', + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + types: () => [ + require('./device.schema.js'), + require('./medication.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'Identifies medications, devices and any other substance used as part of the procedure.', + }, + usedCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Identifies coded items that were used as part of the procedure.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/procedurefocaldevice.schema.js b/src/resources/4_0_0/schemas/procedurefocaldevice.schema.js new file mode 100644 index 00000000..972cd36b --- /dev/null +++ b/src/resources/4_0_0/schemas/procedurefocaldevice.schema.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ProcedurefocalDevice Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ProcedurefocalDevice', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of change that happened to the device during the procedure.', + }, + manipulated: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ProcedurefocalDevicemanipulated_manipulated_Union', + description: + 'The device that was manipulated (changed) during the procedure.', + types: () => [require('./device.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The device that was manipulated (changed) during the procedure.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/procedureperformer.schema.js b/src/resources/4_0_0/schemas/procedureperformer.schema.js new file mode 100644 index 00000000..4e313631 --- /dev/null +++ b/src/resources/4_0_0/schemas/procedureperformer.schema.js @@ -0,0 +1,95 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Procedureperformer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Procedureperformer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + function: { + type: require('./codeableconcept.schema.js'), + description: + 'Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist.', + }, + actor: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Procedureperformeractor_actor_Union', + description: 'The practitioner who was involved in the procedure.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: 'The practitioner who was involved in the procedure.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'ProcedureperformeronBehalfOf_onBehalfOf_Union', + description: + 'The organization the device or practitioner was acting on behalf of.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The organization the device or practitioner was acting on behalf of.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/prodcharacteristic.schema.js b/src/resources/4_0_0/schemas/prodcharacteristic.schema.js new file mode 100644 index 00000000..70d3db18 --- /dev/null +++ b/src/resources/4_0_0/schemas/prodcharacteristic.schema.js @@ -0,0 +1,101 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary ProdCharacteristic Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ProdCharacteristic', + description: + 'Base StructureDefinition for ProdCharacteristic Type: The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + height: { + type: require('./quantity.schema.js'), + description: + 'Where applicable, the height can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + width: { + type: require('./quantity.schema.js'), + description: + 'Where applicable, the width can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + depth: { + type: require('./quantity.schema.js'), + description: + 'Where applicable, the depth can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + weight: { + type: require('./quantity.schema.js'), + description: + 'Where applicable, the weight can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + nominalVolume: { + type: require('./quantity.schema.js'), + description: + 'Where applicable, the nominal volume can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + externalDiameter: { + type: require('./quantity.schema.js'), + description: + 'Where applicable, the external diameter can be specified using a numerical value and its unit of measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + _shape: { + type: require('./element.schema.js'), + description: + 'Where applicable, the shape can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + shape: { + type: GraphQLString, + description: + 'Where applicable, the shape can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + _color: { + type: require('./element.schema.js'), + description: + 'Where applicable, the color can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + color: { + type: new GraphQLList(GraphQLString), + description: + 'Where applicable, the color can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + _imprint: { + type: require('./element.schema.js'), + description: 'Where applicable, the imprint can be specified as text.', + }, + imprint: { + type: new GraphQLList(GraphQLString), + description: 'Where applicable, the imprint can be specified as text.', + }, + image: { + type: new GraphQLList(require('./attachment.schema.js')), + description: + 'Where applicable, the image can be provided The format of the image attachment shall be specified by regional implementations.', + }, + scoring: { + type: require('./codeableconcept.schema.js'), + description: + 'Where applicable, the scoring can be specified An appropriate controlled vocabulary shall be used The term and the term identifier shall be used.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/productshelflife.schema.js b/src/resources/4_0_0/schemas/productshelflife.schema.js new file mode 100644 index 00000000..20e8fd57 --- /dev/null +++ b/src/resources/4_0_0/schemas/productshelflife.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ProductShelfLife Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ProductShelfLife', + description: + 'Base StructureDefinition for ProductShelfLife Type: The shelf-life and storage information for a medicinal product item or container can be described using this class.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Unique identifier for the packaged Medicinal Product.', + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'This describes the shelf life, taking into account various scenarios such as shelf life of the packaged Medicinal Product itself, shelf life after transformation where necessary and shelf life after the first opening of a bottle, etc. The shelf life type shall be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.', + }, + period: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'The shelf life time period can be specified using a numerical value for the period of time and its unit of time measurement The unit of measurement shall be specified in accordance with ISO 11240 and the resulting terminology The symbol and the symbol identifier shall be used.', + }, + specialPrecautionsForStorage: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Special precautions for storage, if any, can be specified using an appropriate controlled vocabulary The controlled term and the controlled term identifier shall be specified.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/provenance.schema.js b/src/resources/4_0_0/schemas/provenance.schema.js new file mode 100644 index 00000000..fe5fa667 --- /dev/null +++ b/src/resources/4_0_0/schemas/provenance.schema.js @@ -0,0 +1,173 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Provenance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Provenance', + description: + 'Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Provenance_Enum_schema', + values: { Provenance: { value: 'Provenance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + target: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Provenancetarget_target_Union', + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + ), + description: + 'The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.', + }, + occurredPeriod: { + type: require('./period.schema.js'), + description: 'The period during which the activity occurred.', + }, + _occurredDateTime: { + type: require('./element.schema.js'), + description: 'The period during which the activity occurred.', + }, + occurredDateTime: { + type: DateTimeScalar, + description: 'The period during which the activity occurred.', + }, + _recorded: { + type: require('./element.schema.js'), + description: 'The instant of time at which the activity was recorded.', + }, + recorded: { + type: new GraphQLNonNull(InstantScalar), + description: 'The instant of time at which the activity was recorded.', + }, + _policy: { + type: require('./element.schema.js'), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + policy: { + type: new GraphQLList(UriScalar), + description: + 'Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Provenancelocation_location_Union', + description: 'Where the activity occurred, if relevant.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the activity occurred, if relevant.', + }, + reason: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason that the activity was taking place.', + }, + activity: { + type: require('./codeableconcept.schema.js'), + description: + 'An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.', + }, + agent: { + type: new GraphQLList( + new GraphQLNonNull(require('./provenanceagent.schema.js')), + ), + description: + 'An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.', + }, + entity: { + type: new GraphQLList(require('./provenanceentity.schema.js')), + description: 'An entity used in this activity.', + }, + signature: { + type: new GraphQLList(require('./signature.schema.js')), + description: + 'A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/provenanceagent.schema.js b/src/resources/4_0_0/schemas/provenanceagent.schema.js new file mode 100644 index 00000000..ef79ac26 --- /dev/null +++ b/src/resources/4_0_0/schemas/provenanceagent.schema.js @@ -0,0 +1,124 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Provenanceagent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Provenanceagent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The participation the agent had with respect to the activity.', + }, + role: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.', + }, + who: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Provenanceagentwho_who_Union', + description: + 'The individual, device or organization that participated in the event.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'The individual, device or organization that participated in the event.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'ProvenanceagentonBehalfOf_onBehalfOf_Union', + description: + 'The individual, device, or organization for whom the change was made.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual, device, or organization for whom the change was made.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/provenanceentity.schema.js b/src/resources/4_0_0/schemas/provenanceentity.schema.js new file mode 100644 index 00000000..23bbcb38 --- /dev/null +++ b/src/resources/4_0_0/schemas/provenanceentity.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Provenanceentity Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Provenanceentity', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _role: { + type: require('./element.schema.js'), + description: 'How the entity was used during the activity.', + }, + role: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the entity was used during the activity.', + }, + what: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Provenanceentitywhat_what_Union', + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/quantity.schema.js b/src/resources/4_0_0/schemas/quantity.schema.js new file mode 100644 index 00000000..72e50a1c --- /dev/null +++ b/src/resources/4_0_0/schemas/quantity.schema.js @@ -0,0 +1,83 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Quantity Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Quantity', + description: + 'Base StructureDefinition for Quantity Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _value: { + type: require('./element.schema.js'), + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + value: { + type: GraphQLFloat, + description: + 'The value of the measured amount. The value includes an implicit precision in the presentation of the value.', + }, + _comparator: { + type: require('./element.schema.js'), + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + comparator: { + type: CodeScalar, + description: + "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is '<' , then the real value is < stated value.", + }, + _unit: { + type: require('./element.schema.js'), + description: 'A human-readable form of the unit.', + }, + unit: { + type: GraphQLString, + description: 'A human-readable form of the unit.', + }, + _system: { + type: require('./element.schema.js'), + description: + 'The identification of the system that provides the coded form of the unit.', + }, + system: { + type: UriScalar, + description: + 'The identification of the system that provides the coded form of the unit.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'A computer processable form of the unit in some unit representation system.', + }, + code: { + type: CodeScalar, + description: + 'A computer processable form of the unit in some unit representation system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/questionnaire.schema.js b/src/resources/4_0_0/schemas/questionnaire.schema.js new file mode 100644 index 00000000..f744e59c --- /dev/null +++ b/src/resources/4_0_0/schemas/questionnaire.schema.js @@ -0,0 +1,274 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary Questionnaire Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Questionnaire', + description: + 'A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Questionnaire_Enum_schema', + values: { Questionnaire: { value: 'Questionnaire' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the questionnaire.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the questionnaire.', + }, + _derivedFrom: { + type: require('./element.schema.js'), + description: + 'The URL of a Questionnaire that this Questionnaire is based on.', + }, + derivedFrom: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL of a Questionnaire that this Questionnaire is based on.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this questionnaire. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this questionnaire. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _subjectType: { + type: require('./element.schema.js'), + description: + 'The types of subjects that can be the subject of responses created for the questionnaire.', + }, + subjectType: { + type: new GraphQLList(CodeScalar), + description: + 'The types of subjects that can be the subject of responses created for the questionnaire.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the questionnaire.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the questionnaire.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the questionnaire from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the questionnaire from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate questionnaire instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the questionnaire is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this questionnaire is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this questionnaire is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the questionnaire content was or is planned to be in active use.', + }, + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'An identifier for this question or group of questions in a particular terminology such as LOINC.', + }, + item: { + type: new GraphQLList(require('./questionnaireitem.schema.js')), + description: + 'A particular question, question grouping or display text that is part of the questionnaire.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/questionnaireitem.schema.js b/src/resources/4_0_0/schemas/questionnaireitem.schema.js new file mode 100644 index 00000000..3c05255f --- /dev/null +++ b/src/resources/4_0_0/schemas/questionnaireitem.schema.js @@ -0,0 +1,174 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary Questionnaireitem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Questionnaireitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', + }, + linkId: { + type: new GraphQLNonNull(GraphQLString), + description: + 'An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'This element is a URI that refers to an [ElementDefinition](elementdefinition.html) that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * answerValueSet (ElementDefinition.binding) * options (ElementDefinition.binding).', + }, + definition: { + type: UriScalar, + description: + 'This element is a URI that refers to an [ElementDefinition](elementdefinition.html) that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * answerValueSet (ElementDefinition.binding) * options (ElementDefinition.binding).', + }, + code: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).', + }, + _prefix: { + type: require('./element.schema.js'), + description: + 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', + }, + prefix: { + type: GraphQLString, + description: + 'A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'The name of a section, the text of a question or text content for a display item.', + }, + text: { + type: GraphQLString, + description: + 'The name of a section, the text of a question or text content for a display item.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).', + }, + enableWhen: { + type: new GraphQLList(require('./questionnaireitemenablewhen.schema.js')), + description: + 'A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.', + }, + _enableBehavior: { + type: require('./element.schema.js'), + description: + 'Controls how multiple enableWhen values are interpreted - whether all or any must be true.', + }, + enableBehavior: { + type: CodeScalar, + description: + 'Controls how multiple enableWhen values are interpreted - whether all or any must be true.', + }, + _required: { + type: require('./element.schema.js'), + description: + "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", + }, + required: { + type: GraphQLBoolean, + description: + "An indication, if true, that the item must be present in a 'completed' QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", + }, + _repeats: { + type: require('./element.schema.js'), + description: + 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.', + }, + repeats: { + type: GraphQLBoolean, + description: + 'An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.', + }, + _readOnly: { + type: require('./element.schema.js'), + description: + 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', + }, + readOnly: { + type: GraphQLBoolean, + description: + 'An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.', + }, + _maxLength: { + type: require('./element.schema.js'), + description: + "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", + }, + maxLength: { + type: GraphQLInt, + description: + "The maximum number of characters that are permitted in the answer to be considered a 'valid' QuestionnaireResponse.", + }, + _answerValueSet: { + type: require('./element.schema.js'), + description: + "A reference to a value set containing a list of codes representing permitted answers for a 'choice' or 'open-choice' question.", + }, + answerValueSet: { + type: CanonicalScalar, + description: + "A reference to a value set containing a list of codes representing permitted answers for a 'choice' or 'open-choice' question.", + }, + answerOption: { + type: new GraphQLList( + require('./questionnaireitemansweroption.schema.js'), + ), + description: + "One of the permitted answers for a 'choice' or 'open-choice' question.", + }, + initial: { + type: new GraphQLList(require('./questionnaireiteminitial.schema.js')), + description: + 'One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/questionnaireitemansweroption.schema.js b/src/resources/4_0_0/schemas/questionnaireitemansweroption.schema.js new file mode 100644 index 00000000..08fc1426 --- /dev/null +++ b/src/resources/4_0_0/schemas/questionnaireitemansweroption.schema.js @@ -0,0 +1,115 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireitemanswerOption Schema + */ +module.exports = new GraphQLObjectType({ + name: 'QuestionnaireitemanswerOption', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueDate: { + type: require('./element.schema.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueTime: { + type: require('./element.schema.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _valueString: { + type: require('./element.schema.js'), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + "A potential answer that's allowed as the answer to this question.", + }, + valueReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'QuestionnaireitemanswerOptionvalueReference_valueReference_Union', + description: + "A potential answer that's allowed as the answer to this question.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "A potential answer that's allowed as the answer to this question.", + }, + _initialSelected: { + type: require('./element.schema.js'), + description: + 'Indicates whether the answer value is selected when the list of possible answers is initially shown.', + }, + initialSelected: { + type: GraphQLBoolean, + description: + 'Indicates whether the answer value is selected when the list of possible answers is initially shown.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/questionnaireitemenablewhen.schema.js b/src/resources/4_0_0/schemas/questionnaireitemenablewhen.schema.js new file mode 100644 index 00000000..8c194cac --- /dev/null +++ b/src/resources/4_0_0/schemas/questionnaireitemenablewhen.schema.js @@ -0,0 +1,161 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireitemenableWhen Schema + */ +module.exports = new GraphQLObjectType({ + name: 'QuestionnaireitemenableWhen', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _question: { + type: require('./element.schema.js'), + description: + 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', + }, + question: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.', + }, + _operator: { + type: require('./element.schema.js'), + description: 'Specifies the criteria by which the question is enabled.', + }, + operator: { + type: new GraphQLNonNull(CodeScalar), + description: 'Specifies the criteria by which the question is enabled.', + }, + _answerBoolean: { + type: require('./element.schema.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerDecimal: { + type: require('./element.schema.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerInteger: { + type: require('./element.schema.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerDate: { + type: require('./element.schema.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerDate: { + type: new GraphQLNonNull(DateScalar), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerDateTime: { + type: require('./element.schema.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerTime: { + type: require('./element.schema.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerTime: { + type: new GraphQLNonNull(TimeScalar), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + _answerString: { + type: require('./element.schema.js'), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerString: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + answerReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'QuestionnaireitemenableWhenanswerReference_answerReference_Union', + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A value that the referenced question is tested using the specified operator in order for the item to be enabled.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/questionnaireiteminitial.schema.js b/src/resources/4_0_0/schemas/questionnaireiteminitial.schema.js new file mode 100644 index 00000000..9e153bbb --- /dev/null +++ b/src/resources/4_0_0/schemas/questionnaireiteminitial.schema.js @@ -0,0 +1,136 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Questionnaireiteminitial Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Questionnaireiteminitial', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The actual value to for an initial answer.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The actual value to for an initial answer.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The actual value to for an initial answer.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The actual value to for an initial answer.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The actual value to for an initial answer.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The actual value to for an initial answer.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: 'The actual value to for an initial answer.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The actual value to for an initial answer.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'The actual value to for an initial answer.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The actual value to for an initial answer.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: 'The actual value to for an initial answer.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The actual value to for an initial answer.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The actual value to for an initial answer.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The actual value to for an initial answer.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'The actual value to for an initial answer.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The actual value to for an initial answer.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: 'The actual value to for an initial answer.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The actual value to for an initial answer.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'The actual value to for an initial answer.', + }, + valueReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'QuestionnaireiteminitialvalueReference_valueReference_Union', + description: 'The actual value to for an initial answer.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'The actual value to for an initial answer.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/questionnaireresponse.schema.js b/src/resources/4_0_0/schemas/questionnaireresponse.schema.js new file mode 100644 index 00000000..a9cdd737 --- /dev/null +++ b/src/resources/4_0_0/schemas/questionnaireresponse.schema.js @@ -0,0 +1,266 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireResponse Schema + */ +module.exports = new GraphQLObjectType({ + name: 'QuestionnaireResponse', + description: + 'A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'QuestionnaireResponse_Enum_schema', + values: { QuestionnaireResponse: { value: 'QuestionnaireResponse' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A business identifier assigned to a particular completed (or partially completed) questionnaire.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'QuestionnaireResponsebasedOn_basedOn_Union', + description: + 'The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.', + types: () => [ + require('./careplan.schema.js'), + require('./servicerequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'QuestionnaireResponsepartOf_partOf_Union', + description: + 'A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.', + types: () => [ + require('./observation.schema.js'), + require('./procedure.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + }, + }), + ), + description: + 'A procedure or observation that this questionnaire was performed as part of the execution of. For example, the surgery a checklist was executed as part of.', + }, + _questionnaire: { + type: require('./element.schema.js'), + description: + 'The Questionnaire that defines and organizes the questions for which answers are being provided.', + }, + questionnaire: { + type: CanonicalScalar, + description: + 'The Questionnaire that defines and organizes the questions for which answers are being provided.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The position of the questionnaire response within its overall lifecycle.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The position of the questionnaire response within its overall lifecycle.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsesubject_subject_Union', + description: + 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponseencounter_encounter_Union', + description: + 'The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.', + }, + _authored: { + type: require('./element.schema.js'), + description: + 'The date and/or time that this set of answers were last changed.', + }, + authored: { + type: DateTimeScalar, + description: + 'The date and/or time that this set of answers were last changed.', + }, + author: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponseauthor_author_Union', + description: + 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', + types: () => [ + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.', + }, + source: { + type: new GraphQLUnionType({ + name: 'QuestionnaireResponsesource_source_Union', + description: 'The person who answered the questions about the subject.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The person who answered the questions about the subject.', + }, + item: { + type: new GraphQLList(require('./questionnaireresponseitem.schema.js')), + description: + 'A group or question item from the original questionnaire for which answers are provided.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/questionnaireresponseitem.schema.js b/src/resources/4_0_0/schemas/questionnaireresponseitem.schema.js new file mode 100644 index 00000000..161e3d48 --- /dev/null +++ b/src/resources/4_0_0/schemas/questionnaireresponseitem.schema.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireResponseitem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'QuestionnaireResponseitem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _linkId: { + type: require('./element.schema.js'), + description: + 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', + }, + linkId: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.', + }, + _definition: { + type: require('./element.schema.js'), + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', + }, + definition: { + type: UriScalar, + description: + 'A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.', + }, + _text: { + type: require('./element.schema.js'), + description: + 'Text that is displayed above the contents of the group or as the text of the question being answered.', + }, + text: { + type: GraphQLString, + description: + 'Text that is displayed above the contents of the group or as the text of the question being answered.', + }, + answer: { + type: new GraphQLList( + require('./questionnaireresponseitemanswer.schema.js'), + ), + description: "The respondent's answer(s) to the question.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/questionnaireresponseitemanswer.schema.js b/src/resources/4_0_0/schemas/questionnaireresponseitemanswer.schema.js new file mode 100644 index 00000000..98bd0a71 --- /dev/null +++ b/src/resources/4_0_0/schemas/questionnaireresponseitemanswer.schema.js @@ -0,0 +1,155 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary QuestionnaireResponseitemanswer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'QuestionnaireResponseitemanswer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDecimal: { + type: GraphQLFloat, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueInteger: { + type: GraphQLInt, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDate: { + type: DateScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueDateTime: { + type: DateTimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueTime: { + type: TimeScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueString: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueString: { + type: GraphQLString, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueUri: { + type: UriScalar, + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueAttachment: { + type: require('./attachment.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueCoding: { + type: require('./coding.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + valueReference: { + type: new GraphQLUnionType({ + name: + 'QuestionnaireResponseitemanswervalueReference_valueReference_Union', + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The answer (or one of the answers) provided by the respondent to the question.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/range.schema.js b/src/resources/4_0_0/schemas/range.schema.js new file mode 100644 index 00000000..90857c1f --- /dev/null +++ b/src/resources/4_0_0/schemas/range.schema.js @@ -0,0 +1,36 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary Range Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Range', + description: + 'Base StructureDefinition for Range Type: A set of ordered Quantities defined by a low and high limit.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + low: { + type: require('./quantity.schema.js'), + description: 'The low limit. The boundary is inclusive.', + }, + high: { + type: require('./quantity.schema.js'), + description: 'The high limit. The boundary is inclusive.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/ratio.schema.js b/src/resources/4_0_0/schemas/ratio.schema.js new file mode 100644 index 00000000..6b96b2ba --- /dev/null +++ b/src/resources/4_0_0/schemas/ratio.schema.js @@ -0,0 +1,36 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary Ratio Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Ratio', + description: + 'Base StructureDefinition for Ratio Type: A relationship of two Quantity values - expressed as a numerator and a denominator.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + numerator: { + type: require('./quantity.schema.js'), + description: 'The value of the numerator.', + }, + denominator: { + type: require('./quantity.schema.js'), + description: 'The value of the denominator.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/reference.schema.js b/src/resources/4_0_0/schemas/reference.schema.js new file mode 100644 index 00000000..dbdf83c7 --- /dev/null +++ b/src/resources/4_0_0/schemas/reference.schema.js @@ -0,0 +1,64 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary Reference Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Reference', + description: + 'Base StructureDefinition for Reference Type: A reference from one resource to another.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _reference: { + type: require('./element.schema.js'), + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + reference: { + type: GraphQLString, + description: + "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + }, + _type: { + type: require('./element.schema.js'), + description: + "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. 'Patient' is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + }, + type: { + type: UriScalar, + description: + "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. 'Patient' is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + display: { + type: GraphQLString, + description: + 'Plain text narrative that identifies the resource in addition to the resource reference.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/relatedartifact.schema.js b/src/resources/4_0_0/schemas/relatedartifact.schema.js new file mode 100644 index 00000000..69448934 --- /dev/null +++ b/src/resources/4_0_0/schemas/relatedartifact.schema.js @@ -0,0 +1,99 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary RelatedArtifact Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RelatedArtifact', + description: + 'Base StructureDefinition for RelatedArtifact Type: Related artifacts such as additional documentation, justification, or bibliographic references.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of relationship to the related artifact.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of relationship to the related artifact.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index.', + }, + label: { + type: GraphQLString, + description: + 'A short label that can be used to reference the citation from elsewhere in the containing artifact, such as a footnote index.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', + }, + display: { + type: GraphQLString, + description: + 'A brief description of the document or knowledge resource being referenced, suitable for display to a consumer.', + }, + _citation: { + type: require('./element.schema.js'), + description: + 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', + }, + citation: { + type: GraphQLString, + description: + 'A bibliographic citation for the related artifact. This text SHOULD be formatted according to an accepted citation format.', + }, + _url: { + type: require('./element.schema.js'), + description: + 'A url for the artifact that can be followed to access the actual content.', + }, + url: { + type: UrlScalar, + description: + 'A url for the artifact that can be followed to access the actual content.', + }, + document: { + type: require('./attachment.schema.js'), + description: + 'The document being referenced, represented as an attachment. This is exclusive with the resource element.', + }, + _resource: { + type: require('./element.schema.js'), + description: + 'The related resource, such as a library, value set, profile, or other knowledge resource.', + }, + resource: { + type: CanonicalScalar, + description: + 'The related resource, such as a library, value set, profile, or other knowledge resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/relatedperson.schema.js b/src/resources/4_0_0/schemas/relatedperson.schema.js new file mode 100644 index 00000000..1305bfbd --- /dev/null +++ b/src/resources/4_0_0/schemas/relatedperson.schema.js @@ -0,0 +1,164 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary RelatedPerson Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RelatedPerson', + description: + 'Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RelatedPerson_Enum_schema', + values: { RelatedPerson: { value: 'RelatedPerson' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Identifier for a person within a particular scope.', + }, + _active: { + type: require('./element.schema.js'), + description: 'Whether this related person record is in active use.', + }, + active: { + type: GraphQLBoolean, + description: 'Whether this related person record is in active use.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'RelatedPersonpatient_patient_Union', + description: 'The patient this person is related to.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: 'The patient this person is related to.', + }, + relationship: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The nature of the relationship between a patient and the related person.', + }, + name: { + type: new GraphQLList(require('./humanname.schema.js')), + description: 'A name associated with the person.', + }, + telecom: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'A contact detail for the person, e.g. a telephone number or an email address.', + }, + _gender: { + type: require('./element.schema.js'), + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + gender: { + type: CodeScalar, + description: + 'Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.', + }, + _birthDate: { + type: require('./element.schema.js'), + description: 'The date on which the related person was born.', + }, + birthDate: { + type: DateScalar, + description: 'The date on which the related person was born.', + }, + address: { + type: new GraphQLList(require('./address.schema.js')), + description: + 'Address where the related person can be contacted or visited.', + }, + photo: { + type: new GraphQLList(require('./attachment.schema.js')), + description: 'Image of the person.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown.', + }, + communication: { + type: new GraphQLList(require('./relatedpersoncommunication.schema.js')), + description: + "A language which may be used to communicate with about the patient's health.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/relatedpersoncommunication.schema.js b/src/resources/4_0_0/schemas/relatedpersoncommunication.schema.js new file mode 100644 index 00000000..f3945eab --- /dev/null +++ b/src/resources/4_0_0/schemas/relatedpersoncommunication.schema.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RelatedPersoncommunication Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RelatedPersoncommunication', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + language: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. 'en' for English, or 'en-US' for American English versus 'en-EN' for England English.", + }, + _preferred: { + type: require('./element.schema.js'), + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + preferred: { + type: GraphQLBoolean, + description: + 'Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/requestgroup.schema.js b/src/resources/4_0_0/schemas/requestgroup.schema.js new file mode 100644 index 00000000..56b4abfc --- /dev/null +++ b/src/resources/4_0_0/schemas/requestgroup.schema.js @@ -0,0 +1,293 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary RequestGroup Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RequestGroup', + description: + "A group of related requests that can be used to capture intended activities that have inter-dependencies such as 'give this medication after that one'.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RequestGroup_Enum_schema', + values: { RequestGroup: { value: 'RequestGroup' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Allows a service to provide a unique, business identifier for the request.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RequestGroupbasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this request.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RequestGroupreplaces_replaces_Union', + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Completed or terminated request(s) whose function is taken by this new request.', + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The current state of the request. For request groups, the status reflects the status of all the requests in the group.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the request should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the request should be addressed with respect to other requests.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'A code that identifies what the overall request group is.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'RequestGroupsubject_subject_Union', + description: 'The subject for which the request group was created.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: 'The subject for which the request group was created.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'RequestGroupencounter_encounter_Union', + description: 'Describes the context of the request group, if any.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'Describes the context of the request group, if any.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'Indicates when the request group was created.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'Indicates when the request group was created.', + }, + author: { + type: new GraphQLUnionType({ + name: 'RequestGroupauthor_author_Union', + description: 'Provides a reference to the author of the request group.', + types: () => [ + require('./device.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'Provides a reference to the author of the request group.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Describes the reason for the request group in coded or textual form.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RequestGroupreasonReference_reasonReference_Union', + description: + 'Indicates another resource whose existence justifies this request group.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource whose existence justifies this request group.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Provides a mechanism to communicate additional information about the response.', + }, + action: { + type: new GraphQLList(require('./requestgroupaction.schema.js')), + description: + 'The actions, if any, produced by the evaluation of the artifact.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/requestgroupaction.schema.js b/src/resources/4_0_0/schemas/requestgroupaction.schema.js new file mode 100644 index 00000000..782e7c39 --- /dev/null +++ b/src/resources/4_0_0/schemas/requestgroupaction.schema.js @@ -0,0 +1,240 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary RequestGroupaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RequestGroupaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _prefix: { + type: require('./element.schema.js'), + description: 'A user-visible prefix for the action.', + }, + prefix: { + type: GraphQLString, + description: 'A user-visible prefix for the action.', + }, + _title: { + type: require('./element.schema.js'), + description: 'The title of the action displayed to a user.', + }, + title: { + type: GraphQLString, + description: 'The title of the action displayed to a user.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the action used to provide a summary to display to the user.', + }, + _textEquivalent: { + type: require('./element.schema.js'), + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.', + }, + textEquivalent: { + type: GraphQLString, + description: + 'A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the action should be addressed with respect to other actions.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the action should be addressed with respect to other actions.', + }, + code: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.', + }, + documentation: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.', + }, + condition: { + type: new GraphQLList(require('./requestgroupactioncondition.schema.js')), + description: + 'An expression that describes applicability criteria, or start/stop conditions for the action.', + }, + relatedAction: { + type: new GraphQLList( + require('./requestgroupactionrelatedaction.schema.js'), + ), + description: + "A relationship to another action such as 'before' or '30-60 minutes after start of'.", + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDateTime: { + type: DateTimeScalar, + description: + 'An optional value describing when the action should be performed.', + }, + timingAge: { + type: require('./age.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingPeriod: { + type: require('./period.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingDuration: { + type: require('./duration.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingRange: { + type: require('./range.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: + 'An optional value describing when the action should be performed.', + }, + participant: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RequestGroupactionparticipant_participant_Union', + description: + 'The participant that should perform or be responsible for this action.', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The participant that should perform or be responsible for this action.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'The type of action to perform (create, update, remove).', + }, + _groupingBehavior: { + type: require('./element.schema.js'), + description: + 'Defines the grouping behavior for the action and its children.', + }, + groupingBehavior: { + type: CodeScalar, + description: + 'Defines the grouping behavior for the action and its children.', + }, + _selectionBehavior: { + type: require('./element.schema.js'), + description: + 'Defines the selection behavior for the action and its children.', + }, + selectionBehavior: { + type: CodeScalar, + description: + 'Defines the selection behavior for the action and its children.', + }, + _requiredBehavior: { + type: require('./element.schema.js'), + description: 'Defines expectations around whether an action is required.', + }, + requiredBehavior: { + type: CodeScalar, + description: 'Defines expectations around whether an action is required.', + }, + _precheckBehavior: { + type: require('./element.schema.js'), + description: 'Defines whether the action should usually be preselected.', + }, + precheckBehavior: { + type: CodeScalar, + description: 'Defines whether the action should usually be preselected.', + }, + _cardinalityBehavior: { + type: require('./element.schema.js'), + description: 'Defines whether the action can be selected multiple times.', + }, + cardinalityBehavior: { + type: CodeScalar, + description: 'Defines whether the action can be selected multiple times.', + }, + resource: { + type: new GraphQLUnionType({ + name: 'RequestGroupactionresource_resource_Union', + description: + 'The resource that is the target of the action (e.g. CommunicationRequest).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The resource that is the target of the action (e.g. CommunicationRequest).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/requestgroupactioncondition.schema.js b/src/resources/4_0_0/schemas/requestgroupactioncondition.schema.js new file mode 100644 index 00000000..36e33f8d --- /dev/null +++ b/src/resources/4_0_0/schemas/requestgroupactioncondition.schema.js @@ -0,0 +1,51 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary RequestGroupactioncondition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RequestGroupactioncondition', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _kind: { + type: require('./element.schema.js'), + description: 'The kind of condition.', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: 'The kind of condition.', + }, + expression: { + type: require('./expression.schema.js'), + description: + 'An expression that returns true or false, indicating whether or not the condition is satisfied.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/requestgroupactionrelatedaction.schema.js b/src/resources/4_0_0/schemas/requestgroupactionrelatedaction.schema.js new file mode 100644 index 00000000..6f259c2e --- /dev/null +++ b/src/resources/4_0_0/schemas/requestgroupactionrelatedaction.schema.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary RequestGroupactionrelatedAction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RequestGroupactionrelatedAction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _actionId: { + type: require('./element.schema.js'), + description: 'The element id of the action this is related to.', + }, + actionId: { + type: new GraphQLNonNull(IdScalar), + description: 'The element id of the action this is related to.', + }, + _relationship: { + type: require('./element.schema.js'), + description: 'The relationship of this action to the related action.', + }, + relationship: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relationship of this action to the related action.', + }, + offsetDuration: { + type: require('./duration.schema.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + offsetRange: { + type: require('./range.schema.js'), + description: + 'A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/researchdefinition.schema.js b/src/resources/4_0_0/schemas/researchdefinition.schema.js new file mode 100644 index 00000000..34a518b2 --- /dev/null +++ b/src/resources/4_0_0/schemas/researchdefinition.schema.js @@ -0,0 +1,406 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ResearchDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ResearchDefinition', + description: + 'The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchDefinition_Enum_schema', + values: { ResearchDefinition: { value: 'ResearchDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this research definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this research definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this research definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the research definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the research definition.', + }, + _shortTitle: { + type: require('./element.schema.js'), + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + shortTitle: { + type: GraphQLString, + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the ResearchDefinition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the ResearchDefinition giving additional information about its content.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this research definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this research definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: 'ResearchDefinitionsubjectReference_subjectReference_Union', + description: + 'The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the research definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the research definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the research definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the research definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the research definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the research definition from a consumer's perspective.", + }, + _comment: { + type: require('./element.schema.js'), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + comment: { + type: new GraphQLList(GraphQLString), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the research definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this research definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this research definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description, from a clinical perspective, of how the ResearchDefinition is used.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description, from a clinical perspective, of how the ResearchDefinition is used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the research definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.schema.js'), + description: + 'A reference to a Library resource containing the formal logic used by the ResearchDefinition.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing the formal logic used by the ResearchDefinition.', + }, + population: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ResearchDefinitionpopulation_population_Union', + description: + 'A reference to a ResearchElementDefinition resource that defines the population for the research.', + types: () => [require('./researchelementdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchElementDefinition') { + return require('./researchelementdefinition.schema.js'); + } + }, + }), + ), + description: + 'A reference to a ResearchElementDefinition resource that defines the population for the research.', + }, + exposure: { + type: new GraphQLUnionType({ + name: 'ResearchDefinitionexposure_exposure_Union', + description: + 'A reference to a ResearchElementDefinition resource that defines the exposure for the research.', + types: () => [require('./researchelementdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchElementDefinition') { + return require('./researchelementdefinition.schema.js'); + } + }, + }), + description: + 'A reference to a ResearchElementDefinition resource that defines the exposure for the research.', + }, + exposureAlternative: { + type: new GraphQLUnionType({ + name: 'ResearchDefinitionexposureAlternative_exposureAlternative_Union', + description: + 'A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.', + types: () => [require('./researchelementdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchElementDefinition') { + return require('./researchelementdefinition.schema.js'); + } + }, + }), + description: + 'A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research.', + }, + outcome: { + type: new GraphQLUnionType({ + name: 'ResearchDefinitionoutcome_outcome_Union', + description: + 'A reference to a ResearchElementDefinition resomece that defines the outcome for the research.', + types: () => [require('./researchelementdefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchElementDefinition') { + return require('./researchelementdefinition.schema.js'); + } + }, + }), + description: + 'A reference to a ResearchElementDefinition resomece that defines the outcome for the research.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/researchelementdefinition.schema.js b/src/resources/4_0_0/schemas/researchelementdefinition.schema.js new file mode 100644 index 00000000..06bb878e --- /dev/null +++ b/src/resources/4_0_0/schemas/researchelementdefinition.schema.js @@ -0,0 +1,376 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ResearchElementDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ResearchElementDefinition', + description: + "The ResearchElementDefinition resource describes a 'PICO' element that knowledge (evidence, assertion, recommendation) is about.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchElementDefinition_Enum_schema', + values: { + ResearchElementDefinition: { value: 'ResearchElementDefinition' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this research element definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this research element definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the research element definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the research element definition.', + }, + _shortTitle: { + type: require('./element.schema.js'), + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + shortTitle: { + type: GraphQLString, + description: + 'The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary.', + }, + _subtitle: { + type: require('./element.schema.js'), + description: + 'An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.', + }, + subtitle: { + type: GraphQLString, + description: + 'An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this research element definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this research element definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + subjectCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.', + }, + subjectReference: { + type: new GraphQLUnionType({ + name: + 'ResearchElementDefinitionsubjectReference_subjectReference_Union', + description: + 'The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.', + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + description: + 'The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the research element definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research element definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the research element definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research element definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the research element definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the research element definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the research element definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the research element definition from a consumer's perspective.", + }, + _comment: { + type: require('./element.schema.js'), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + comment: { + type: new GraphQLList(GraphQLString), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research element definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the research element definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this research element definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this research element definition is needed and why it has been designed as it has.', + }, + _usage: { + type: require('./element.schema.js'), + description: + 'A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.', + }, + usage: { + type: GraphQLString, + description: + 'A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the research element definition content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + _library: { + type: require('./element.schema.js'), + description: + 'A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.', + }, + library: { + type: new GraphQLList(CanonicalScalar), + description: + 'A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of research element, a population, an exposure, or an outcome.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of research element, a population, an exposure, or an outcome.', + }, + _variableType: { + type: require('./element.schema.js'), + description: + 'The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).', + }, + variableType: { + type: CodeScalar, + description: + 'The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).', + }, + characteristic: { + type: new GraphQLList( + new GraphQLNonNull( + require('./researchelementdefinitioncharacteristic.schema.js'), + ), + ), + description: + "A characteristic that defines the members of the research element. Multiple characteristics are applied with 'and' semantics.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/researchelementdefinitioncharacteristic.schema.js b/src/resources/4_0_0/schemas/researchelementdefinitioncharacteristic.schema.js new file mode 100644 index 00000000..9b0286df --- /dev/null +++ b/src/resources/4_0_0/schemas/researchelementdefinitioncharacteristic.schema.js @@ -0,0 +1,173 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ResearchElementDefinitioncharacteristic Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ResearchElementDefinitioncharacteristic', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + definitionCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + _definitionCanonical: { + type: require('./element.schema.js'), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionExpression: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + definitionDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.schema.js')), + description: + 'Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year).', + }, + usageContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings.', + }, + _exclude: { + type: require('./element.schema.js'), + description: + 'When true, members with this characteristic are excluded from the element.', + }, + exclude: { + type: GraphQLBoolean, + description: + 'When true, members with this characteristic are excluded from the element.', + }, + unitOfMeasure: { + type: require('./codeableconcept.schema.js'), + description: 'Specifies the UCUM unit for the outcome.', + }, + _studyEffectiveDescription: { + type: require('./element.schema.js'), + description: + 'A narrative description of the time period the study covers.', + }, + studyEffectiveDescription: { + type: GraphQLString, + description: + 'A narrative description of the time period the study covers.', + }, + _studyEffectiveDateTime: { + type: require('./element.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + studyEffectiveDateTime: { + type: DateTimeScalar, + description: 'Indicates what effective period the study covers.', + }, + studyEffectivePeriod: { + type: require('./period.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + studyEffectiveDuration: { + type: require('./duration.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + studyEffectiveTiming: { + type: require('./timing.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + studyEffectiveTimeFromStart: { + type: require('./duration.schema.js'), + description: 'Indicates duration from the study initiation.', + }, + _studyEffectiveGroupMeasure: { + type: require('./element.schema.js'), + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + studyEffectiveGroupMeasure: { + type: CodeScalar, + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + _participantEffectiveDescription: { + type: require('./element.schema.js'), + description: + 'A narrative description of the time period the study covers.', + }, + participantEffectiveDescription: { + type: GraphQLString, + description: + 'A narrative description of the time period the study covers.', + }, + _participantEffectiveDateTime: { + type: require('./element.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveDateTime: { + type: DateTimeScalar, + description: 'Indicates what effective period the study covers.', + }, + participantEffectivePeriod: { + type: require('./period.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveDuration: { + type: require('./duration.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveTiming: { + type: require('./timing.schema.js'), + description: 'Indicates what effective period the study covers.', + }, + participantEffectiveTimeFromStart: { + type: require('./duration.schema.js'), + description: "Indicates duration from the participant's study entry.", + }, + _participantEffectiveGroupMeasure: { + type: require('./element.schema.js'), + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + participantEffectiveGroupMeasure: { + type: CodeScalar, + description: + 'Indicates how elements are aggregated within the study effective period.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/researchstudy.schema.js b/src/resources/4_0_0/schemas/researchstudy.schema.js new file mode 100644 index 00000000..c0c7bce9 --- /dev/null +++ b/src/resources/4_0_0/schemas/researchstudy.schema.js @@ -0,0 +1,284 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ResearchStudy Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ResearchStudy', + description: + 'A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchStudy_Enum_schema', + values: { ResearchStudy: { value: 'ResearchStudy' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this research study by the sponsor or other systems.', + }, + _title: { + type: require('./element.schema.js'), + description: 'A short, descriptive user-friendly label for the study.', + }, + title: { + type: GraphQLString, + description: 'A short, descriptive user-friendly label for the study.', + }, + protocol: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ResearchStudyprotocol_protocol_Union', + description: + 'The set of steps expected to be performed as part of the execution of the study.', + types: () => [require('./plandefinition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + }, + }), + ), + description: + 'The set of steps expected to be performed as part of the execution of the study.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ResearchStudypartOf_partOf_Union', + description: + 'A larger research study of which this particular study is a component or step.', + types: () => [require('./researchstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + }, + }), + ), + description: + 'A larger research study of which this particular study is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the study.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the study.', + }, + primaryPurposeType: { + type: require('./codeableconcept.schema.js'), + description: + "The type of study based upon the intent of the study's activities. A classification of the intent of the study.", + }, + phase: { + type: require('./codeableconcept.schema.js'), + description: + 'The stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc.', + }, + focus: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about.', + }, + condition: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "The condition that is the focus of the study. For example, In a study to examine risk factors for Lupus, might have as an inclusion criterion 'healthy volunteer', but the target condition code would be a Lupus SNOMED code.", + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in learning more about or engaging with the study.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: 'Citations, references and other related documents.', + }, + keyword: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Key terms to aid in searching for or filtering the study.', + }, + location: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Indicates a country, state or other region where the study is taking place.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A full description of how the study is being conducted.', + }, + description: { + type: GraphQLString, + description: 'A full description of how the study is being conducted.', + }, + enrollment: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ResearchStudyenrollment_enrollment_Union', + description: + "Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. ' 200 female Europeans between the ages of 20 and 45 with early onset diabetes'.", + types: () => [require('./group.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: + "Reference to a Group that defines the criteria for and quantity of subjects participating in the study. E.g. ' 200 female Europeans between the ages of 20 and 45 with early onset diabetes'.", + }, + period: { + type: require('./period.schema.js'), + description: + 'Identifies the start date and the expected (or actual, depending on status) end date for the study.', + }, + sponsor: { + type: new GraphQLUnionType({ + name: 'ResearchStudysponsor_sponsor_Union', + description: + 'An organization that initiates the investigation and is legally responsible for the study.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'An organization that initiates the investigation and is legally responsible for the study.', + }, + principalInvestigator: { + type: new GraphQLUnionType({ + name: 'ResearchStudyprincipalInvestigator_principalInvestigator_Union', + description: + 'A researcher in a study who oversees multiple aspects of the study, such as concept development, protocol writing, protocol submission for IRB approval, participant recruitment, informed consent, data collection, analysis, interpretation and presentation.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'A researcher in a study who oversees multiple aspects of the study, such as concept development, protocol writing, protocol submission for IRB approval, participant recruitment, informed consent, data collection, analysis, interpretation and presentation.', + }, + site: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ResearchStudysite_site_Union', + description: 'A facility in which study activities are conducted.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: 'A facility in which study activities are conducted.', + }, + reasonStopped: { + type: require('./codeableconcept.schema.js'), + description: + 'A description and/or code explaining the premature termination of the study.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Comments made about the study by the performer, subject or other participants.', + }, + arm: { + type: new GraphQLList(require('./researchstudyarm.schema.js')), + description: + 'Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.', + }, + objective: { + type: new GraphQLList(require('./researchstudyobjective.schema.js')), + description: + 'A goal that the study is aiming to achieve in terms of a scientific question to be answered by the analysis of data collected during the study.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/researchstudyarm.schema.js b/src/resources/4_0_0/schemas/researchstudyarm.schema.js new file mode 100644 index 00000000..6fa112e3 --- /dev/null +++ b/src/resources/4_0_0/schemas/researchstudyarm.schema.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary ResearchStudyarm Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ResearchStudyarm', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Unique, human-readable label for this arm of the study.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Unique, human-readable label for this arm of the study.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Categorization of study arm, e.g. experimental, active comparator, placebo comparater.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', + }, + description: { + type: GraphQLString, + description: + 'A succinct description of the path through the study that would be followed by a subject adhering to this arm.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/researchstudyobjective.schema.js b/src/resources/4_0_0/schemas/researchstudyobjective.schema.js new file mode 100644 index 00000000..8cae582e --- /dev/null +++ b/src/resources/4_0_0/schemas/researchstudyobjective.schema.js @@ -0,0 +1,46 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary ResearchStudyobjective Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ResearchStudyobjective', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'Unique, human-readable label for this objective of the study.', + }, + name: { + type: GraphQLString, + description: + 'Unique, human-readable label for this objective of the study.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of study objective.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/researchsubject.schema.js b/src/resources/4_0_0/schemas/researchsubject.schema.js new file mode 100644 index 00000000..71fe6ad0 --- /dev/null +++ b/src/resources/4_0_0/schemas/researchsubject.schema.js @@ -0,0 +1,170 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ResearchSubject Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ResearchSubject', + description: + 'A physical entity which is the primary unit of operational and/or administrative interest in a study.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ResearchSubject_Enum_schema', + values: { ResearchSubject: { value: 'ResearchSubject' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Identifiers assigned to this research subject for a study.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of the subject.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of the subject.', + }, + period: { + type: require('./period.schema.js'), + description: + 'The dates the subject began and ended their participation in the study.', + }, + study: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ResearchSubjectstudy_study_Union', + description: + 'Reference to the study the subject is participating in.', + types: () => [require('./researchstudy.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + }, + }), + ), + description: 'Reference to the study the subject is participating in.', + }, + individual: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ResearchSubjectindividual_individual_Union', + description: + 'The record of the person or animal who is involved in the study.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'The record of the person or animal who is involved in the study.', + }, + _assignedArm: { + type: require('./element.schema.js'), + description: + 'The name of the arm in the study the subject is expected to follow as part of this study.', + }, + assignedArm: { + type: GraphQLString, + description: + 'The name of the arm in the study the subject is expected to follow as part of this study.', + }, + _actualArm: { + type: require('./element.schema.js'), + description: + 'The name of the arm in the study the subject actually followed as part of this study.', + }, + actualArm: { + type: GraphQLString, + description: + 'The name of the arm in the study the subject actually followed as part of this study.', + }, + consent: { + type: new GraphQLUnionType({ + name: 'ResearchSubjectconsent_consent_Union', + description: + "A record of the patient's informed agreement to participate in the study.", + types: () => [require('./consent.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Consent') { + return require('./consent.schema.js'); + } + }, + }), + description: + "A record of the patient's informed agreement to participate in the study.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/resource.schema.js b/src/resources/4_0_0/schemas/resource.schema.js new file mode 100644 index 00000000..04e0ae48 --- /dev/null +++ b/src/resources/4_0_0/schemas/resource.schema.js @@ -0,0 +1,61 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Resource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Resource', + description: 'This is the base resource type for everything.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Resource_Enum_schema', + values: { Resource: { value: 'Resource' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.js'), + description: 'The base language in which the resource is written.', + }, + language: { + type: CodeScalar, + description: 'The base language in which the resource is written.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/resourcelist.schema.js b/src/resources/4_0_0/schemas/resourcelist.schema.js new file mode 100644 index 00000000..113f728f --- /dev/null +++ b/src/resources/4_0_0/schemas/resourcelist.schema.js @@ -0,0 +1,606 @@ +const { GraphQLUnionType } = require('graphql'); + +/** + * @name exports + * @summary ResourceList Union + */ +module.exports = new GraphQLUnionType({ + name: 'ResourceList', + description: 'Union of all available resources', + types: [ + require('./resource.schema.js'), + require('./account.schema.js'), + require('./activitydefinition.schema.js'), + require('./adverseevent.schema.js'), + require('./allergyintolerance.schema.js'), + require('./appointment.schema.js'), + require('./appointmentresponse.schema.js'), + require('./auditevent.schema.js'), + require('./basic.schema.js'), + require('./binary.schema.js'), + require('./biologicallyderivedproduct.schema.js'), + require('./bodystructure.schema.js'), + require('./bundle.schema.js'), + require('./capabilitystatement.schema.js'), + require('./careplan.schema.js'), + require('./careteam.schema.js'), + require('./catalogentry.schema.js'), + require('./chargeitem.schema.js'), + require('./chargeitemdefinition.schema.js'), + require('./claim.schema.js'), + require('./claimresponse.schema.js'), + require('./clinicalimpression.schema.js'), + require('./codesystem.schema.js'), + require('./communication.schema.js'), + require('./communicationrequest.schema.js'), + require('./compartmentdefinition.schema.js'), + require('./composition.schema.js'), + require('./conceptmap.schema.js'), + require('./condition.schema.js'), + require('./consent.schema.js'), + require('./contract.schema.js'), + require('./coverage.schema.js'), + require('./coverageeligibilityrequest.schema.js'), + require('./coverageeligibilityresponse.schema.js'), + require('./detectedissue.schema.js'), + require('./device.schema.js'), + require('./devicedefinition.schema.js'), + require('./devicemetric.schema.js'), + require('./devicerequest.schema.js'), + require('./deviceusestatement.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentmanifest.schema.js'), + require('./documentreference.schema.js'), + require('./domainresource.schema.js'), + require('./effectevidencesynthesis.schema.js'), + require('./encounter.schema.js'), + require('./endpoint.schema.js'), + require('./enrollmentrequest.schema.js'), + require('./enrollmentresponse.schema.js'), + require('./episodeofcare.schema.js'), + require('./eventdefinition.schema.js'), + require('./evidence.schema.js'), + require('./evidencevariable.schema.js'), + require('./examplescenario.schema.js'), + require('./explanationofbenefit.schema.js'), + require('./familymemberhistory.schema.js'), + require('./flag.schema.js'), + require('./goal.schema.js'), + require('./graphdefinition.schema.js'), + require('./group.schema.js'), + require('./guidanceresponse.schema.js'), + require('./healthcareservice.schema.js'), + require('./imagingstudy.schema.js'), + require('./immunization.schema.js'), + require('./immunizationevaluation.schema.js'), + require('./immunizationrecommendation.schema.js'), + require('./implementationguide.schema.js'), + require('./insuranceplan.schema.js'), + require('./invoice.schema.js'), + require('./library.schema.js'), + require('./linkage.schema.js'), + require('./list.schema.js'), + require('./location.schema.js'), + require('./measure.schema.js'), + require('./measurereport.schema.js'), + require('./media.schema.js'), + require('./medication.schema.js'), + require('./medicationadministration.schema.js'), + require('./medicationdispense.schema.js'), + require('./medicationknowledge.schema.js'), + require('./medicationrequest.schema.js'), + require('./medicationstatement.schema.js'), + require('./medicinalproduct.schema.js'), + require('./medicinalproductauthorization.schema.js'), + require('./medicinalproductcontraindication.schema.js'), + require('./medicinalproductindication.schema.js'), + require('./medicinalproductingredient.schema.js'), + require('./medicinalproductinteraction.schema.js'), + require('./medicinalproductmanufactured.schema.js'), + require('./medicinalproductpackaged.schema.js'), + require('./medicinalproductpharmaceutical.schema.js'), + require('./medicinalproductundesirableeffect.schema.js'), + require('./messagedefinition.schema.js'), + require('./messageheader.schema.js'), + require('./molecularsequence.schema.js'), + require('./namingsystem.schema.js'), + require('./nutritionorder.schema.js'), + require('./observation.schema.js'), + require('./observationdefinition.schema.js'), + require('./operationdefinition.schema.js'), + require('./operationoutcome.schema.js'), + require('./organization.schema.js'), + require('./organizationaffiliation.schema.js'), + require('./parameters.schema.js'), + require('./patient.schema.js'), + require('./paymentnotice.schema.js'), + require('./paymentreconciliation.schema.js'), + require('./person.schema.js'), + require('./plandefinition.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./procedure.schema.js'), + require('./provenance.schema.js'), + require('./questionnaire.schema.js'), + require('./questionnaireresponse.schema.js'), + require('./relatedperson.schema.js'), + require('./requestgroup.schema.js'), + require('./researchdefinition.schema.js'), + require('./researchelementdefinition.schema.js'), + require('./researchstudy.schema.js'), + require('./researchsubject.schema.js'), + require('./riskassessment.schema.js'), + require('./riskevidencesynthesis.schema.js'), + require('./schedule.schema.js'), + require('./searchparameter.schema.js'), + require('./servicerequest.schema.js'), + require('./slot.schema.js'), + require('./specimen.schema.js'), + require('./specimendefinition.schema.js'), + require('./structuredefinition.schema.js'), + require('./structuremap.schema.js'), + require('./subscription.schema.js'), + require('./substance.schema.js'), + require('./substancenucleicacid.schema.js'), + require('./substancepolymer.schema.js'), + require('./substanceprotein.schema.js'), + require('./substancereferenceinformation.schema.js'), + require('./substancesourcematerial.schema.js'), + require('./substancespecification.schema.js'), + require('./supplydelivery.schema.js'), + require('./supplyrequest.schema.js'), + require('./task.schema.js'), + require('./terminologycapabilities.schema.js'), + require('./testreport.schema.js'), + require('./testscript.schema.js'), + require('./valueset.schema.js'), + require('./verificationresult.schema.js'), + require('./visionprescription.schema.js'), + ], + resolveType(value) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + if (data && data.resourceType === 'Account') { + return require('./account.schema.js'); + } + if (data && data.resourceType === 'ActivityDefinition') { + return require('./activitydefinition.schema.js'); + } + if (data && data.resourceType === 'AdverseEvent') { + return require('./adverseevent.schema.js'); + } + if (data && data.resourceType === 'AllergyIntolerance') { + return require('./allergyintolerance.schema.js'); + } + if (data && data.resourceType === 'Appointment') { + return require('./appointment.schema.js'); + } + if (data && data.resourceType === 'AppointmentResponse') { + return require('./appointmentresponse.schema.js'); + } + if (data && data.resourceType === 'AuditEvent') { + return require('./auditevent.schema.js'); + } + if (data && data.resourceType === 'Basic') { + return require('./basic.schema.js'); + } + if (data && data.resourceType === 'Binary') { + return require('./binary.schema.js'); + } + if (data && data.resourceType === 'BiologicallyDerivedProduct') { + return require('./biologicallyderivedproduct.schema.js'); + } + if (data && data.resourceType === 'BodyStructure') { + return require('./bodystructure.schema.js'); + } + if (data && data.resourceType === 'Bundle') { + return require('./bundle.schema.js'); + } + if (data && data.resourceType === 'CapabilityStatement') { + return require('./capabilitystatement.schema.js'); + } + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'CatalogEntry') { + return require('./catalogentry.schema.js'); + } + if (data && data.resourceType === 'ChargeItem') { + return require('./chargeitem.schema.js'); + } + if (data && data.resourceType === 'ChargeItemDefinition') { + return require('./chargeitemdefinition.schema.js'); + } + if (data && data.resourceType === 'Claim') { + return require('./claim.schema.js'); + } + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + if (data && data.resourceType === 'ClinicalImpression') { + return require('./clinicalimpression.schema.js'); + } + if (data && data.resourceType === 'CodeSystem') { + return require('./codesystem.schema.js'); + } + if (data && data.resourceType === 'Communication') { + return require('./communication.schema.js'); + } + if (data && data.resourceType === 'CommunicationRequest') { + return require('./communicationrequest.schema.js'); + } + if (data && data.resourceType === 'CompartmentDefinition') { + return require('./compartmentdefinition.schema.js'); + } + if (data && data.resourceType === 'Composition') { + return require('./composition.schema.js'); + } + if (data && data.resourceType === 'ConceptMap') { + return require('./conceptmap.schema.js'); + } + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Consent') { + return require('./consent.schema.js'); + } + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + if (data && data.resourceType === 'CoverageEligibilityRequest') { + return require('./coverageeligibilityrequest.schema.js'); + } + if (data && data.resourceType === 'CoverageEligibilityResponse') { + return require('./coverageeligibilityresponse.schema.js'); + } + if (data && data.resourceType === 'DetectedIssue') { + return require('./detectedissue.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'DeviceDefinition') { + return require('./devicedefinition.schema.js'); + } + if (data && data.resourceType === 'DeviceMetric') { + return require('./devicemetric.schema.js'); + } + if (data && data.resourceType === 'DeviceRequest') { + return require('./devicerequest.schema.js'); + } + if (data && data.resourceType === 'DeviceUseStatement') { + return require('./deviceusestatement.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentManifest') { + return require('./documentmanifest.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + if (data && data.resourceType === 'DomainResource') { + return require('./domainresource.schema.js'); + } + if (data && data.resourceType === 'EffectEvidenceSynthesis') { + return require('./effectevidencesynthesis.schema.js'); + } + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + if (data && data.resourceType === 'Endpoint') { + return require('./endpoint.schema.js'); + } + if (data && data.resourceType === 'EnrollmentRequest') { + return require('./enrollmentrequest.schema.js'); + } + if (data && data.resourceType === 'EnrollmentResponse') { + return require('./enrollmentresponse.schema.js'); + } + if (data && data.resourceType === 'EpisodeOfCare') { + return require('./episodeofcare.schema.js'); + } + if (data && data.resourceType === 'EventDefinition') { + return require('./eventdefinition.schema.js'); + } + if (data && data.resourceType === 'Evidence') { + return require('./evidence.schema.js'); + } + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + if (data && data.resourceType === 'ExampleScenario') { + return require('./examplescenario.schema.js'); + } + if (data && data.resourceType === 'ExplanationOfBenefit') { + return require('./explanationofbenefit.schema.js'); + } + if (data && data.resourceType === 'FamilyMemberHistory') { + return require('./familymemberhistory.schema.js'); + } + if (data && data.resourceType === 'Flag') { + return require('./flag.schema.js'); + } + if (data && data.resourceType === 'Goal') { + return require('./goal.schema.js'); + } + if (data && data.resourceType === 'GraphDefinition') { + return require('./graphdefinition.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'GuidanceResponse') { + return require('./guidanceresponse.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'ImagingStudy') { + return require('./imagingstudy.schema.js'); + } + if (data && data.resourceType === 'Immunization') { + return require('./immunization.schema.js'); + } + if (data && data.resourceType === 'ImmunizationEvaluation') { + return require('./immunizationevaluation.schema.js'); + } + if (data && data.resourceType === 'ImmunizationRecommendation') { + return require('./immunizationrecommendation.schema.js'); + } + if (data && data.resourceType === 'ImplementationGuide') { + return require('./implementationguide.schema.js'); + } + if (data && data.resourceType === 'InsurancePlan') { + return require('./insuranceplan.schema.js'); + } + if (data && data.resourceType === 'Invoice') { + return require('./invoice.schema.js'); + } + if (data && data.resourceType === 'Library') { + return require('./library.schema.js'); + } + if (data && data.resourceType === 'Linkage') { + return require('./linkage.schema.js'); + } + if (data && data.resourceType === 'List') { + return require('./list.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Measure') { + return require('./measure.schema.js'); + } + if (data && data.resourceType === 'MeasureReport') { + return require('./measurereport.schema.js'); + } + if (data && data.resourceType === 'Media') { + return require('./media.schema.js'); + } + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'MedicationAdministration') { + return require('./medicationadministration.schema.js'); + } + if (data && data.resourceType === 'MedicationDispense') { + return require('./medicationdispense.schema.js'); + } + if (data && data.resourceType === 'MedicationKnowledge') { + return require('./medicationknowledge.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + if (data && data.resourceType === 'MedicationStatement') { + return require('./medicationstatement.schema.js'); + } + if (data && data.resourceType === 'MedicinalProduct') { + return require('./medicinalproduct.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductAuthorization') { + return require('./medicinalproductauthorization.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductContraindication') { + return require('./medicinalproductcontraindication.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductIndication') { + return require('./medicinalproductindication.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductIngredient') { + return require('./medicinalproductingredient.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductInteraction') { + return require('./medicinalproductinteraction.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductManufactured') { + return require('./medicinalproductmanufactured.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductPackaged') { + return require('./medicinalproductpackaged.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductPharmaceutical') { + return require('./medicinalproductpharmaceutical.schema.js'); + } + if (data && data.resourceType === 'MedicinalProductUndesirableEffect') { + return require('./medicinalproductundesirableeffect.schema.js'); + } + if (data && data.resourceType === 'MessageDefinition') { + return require('./messagedefinition.schema.js'); + } + if (data && data.resourceType === 'MessageHeader') { + return require('./messageheader.schema.js'); + } + if (data && data.resourceType === 'MolecularSequence') { + return require('./molecularsequence.schema.js'); + } + if (data && data.resourceType === 'NamingSystem') { + return require('./namingsystem.schema.js'); + } + if (data && data.resourceType === 'NutritionOrder') { + return require('./nutritionorder.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'ObservationDefinition') { + return require('./observationdefinition.schema.js'); + } + if (data && data.resourceType === 'OperationDefinition') { + return require('./operationdefinition.schema.js'); + } + if (data && data.resourceType === 'OperationOutcome') { + return require('./operationoutcome.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'OrganizationAffiliation') { + return require('./organizationaffiliation.schema.js'); + } + if (data && data.resourceType === 'Parameters') { + return require('./parameters.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'PaymentNotice') { + return require('./paymentnotice.schema.js'); + } + if (data && data.resourceType === 'PaymentReconciliation') { + return require('./paymentreconciliation.schema.js'); + } + if (data && data.resourceType === 'Person') { + return require('./person.schema.js'); + } + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Procedure') { + return require('./procedure.schema.js'); + } + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + if (data && data.resourceType === 'Questionnaire') { + return require('./questionnaire.schema.js'); + } + if (data && data.resourceType === 'QuestionnaireResponse') { + return require('./questionnaireresponse.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'RequestGroup') { + return require('./requestgroup.schema.js'); + } + if (data && data.resourceType === 'ResearchDefinition') { + return require('./researchdefinition.schema.js'); + } + if (data && data.resourceType === 'ResearchElementDefinition') { + return require('./researchelementdefinition.schema.js'); + } + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + if (data && data.resourceType === 'ResearchSubject') { + return require('./researchsubject.schema.js'); + } + if (data && data.resourceType === 'RiskAssessment') { + return require('./riskassessment.schema.js'); + } + if (data && data.resourceType === 'RiskEvidenceSynthesis') { + return require('./riskevidencesynthesis.schema.js'); + } + if (data && data.resourceType === 'Schedule') { + return require('./schedule.schema.js'); + } + if (data && data.resourceType === 'SearchParameter') { + return require('./searchparameter.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + if (data && data.resourceType === 'Slot') { + return require('./slot.schema.js'); + } + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + if (data && data.resourceType === 'SpecimenDefinition') { + return require('./specimendefinition.schema.js'); + } + if (data && data.resourceType === 'StructureDefinition') { + return require('./structuredefinition.schema.js'); + } + if (data && data.resourceType === 'StructureMap') { + return require('./structuremap.schema.js'); + } + if (data && data.resourceType === 'Subscription') { + return require('./subscription.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'SubstanceNucleicAcid') { + return require('./substancenucleicacid.schema.js'); + } + if (data && data.resourceType === 'SubstancePolymer') { + return require('./substancepolymer.schema.js'); + } + if (data && data.resourceType === 'SubstanceProtein') { + return require('./substanceprotein.schema.js'); + } + if (data && data.resourceType === 'SubstanceReferenceInformation') { + return require('./substancereferenceinformation.schema.js'); + } + if (data && data.resourceType === 'SubstanceSourceMaterial') { + return require('./substancesourcematerial.schema.js'); + } + if (data && data.resourceType === 'SubstanceSpecification') { + return require('./substancespecification.schema.js'); + } + if (data && data.resourceType === 'SupplyDelivery') { + return require('./supplydelivery.schema.js'); + } + if (data && data.resourceType === 'SupplyRequest') { + return require('./supplyrequest.schema.js'); + } + if (data && data.resourceType === 'Task') { + return require('./task.schema.js'); + } + if (data && data.resourceType === 'TerminologyCapabilities') { + return require('./terminologycapabilities.schema.js'); + } + if (data && data.resourceType === 'TestReport') { + return require('./testreport.schema.js'); + } + if (data && data.resourceType === 'TestScript') { + return require('./testscript.schema.js'); + } + if (data && data.resourceType === 'ValueSet') { + return require('./valueset.schema.js'); + } + if (data && data.resourceType === 'VerificationResult') { + return require('./verificationresult.schema.js'); + } + if (data && data.resourceType === 'VisionPrescription') { + return require('./visionprescription.schema.js'); + } + }, +}); diff --git a/src/resources/4_0_0/schemas/riskassessment.schema.js b/src/resources/4_0_0/schemas/riskassessment.schema.js new file mode 100644 index 00000000..29040900 --- /dev/null +++ b/src/resources/4_0_0/schemas/riskassessment.schema.js @@ -0,0 +1,298 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary RiskAssessment Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RiskAssessment', + description: + 'An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RiskAssessment_Enum_schema', + values: { RiskAssessment: { value: 'RiskAssessment' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Business identifier assigned to the risk assessment.', + }, + basedOn: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentbasedOn_basedOn_Union', + description: + 'A reference to the request that is fulfilled by this risk assessment.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'A reference to the request that is fulfilled by this risk assessment.', + }, + parent: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentparent_parent_Union', + description: + 'A reference to a resource that this risk assessment is part of, such as a Procedure.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'A reference to a resource that this risk assessment is part of, such as a Procedure.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of the RiskAssessment, using the same statuses as an Observation.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the RiskAssessment, using the same statuses as an Observation.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'The algorithm, process or mechanism used to evaluate the risk.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The type of the risk assessment performed.', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'RiskAssessmentsubject_subject_Union', + description: 'The patient or group the risk assessment applies to.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + }, + }), + ), + description: 'The patient or group the risk assessment applies to.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentencounter_encounter_Union', + description: 'The encounter where the assessment was performed.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: 'The encounter where the assessment was performed.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: + 'The date (and possibly time) the risk assessment was performed.', + }, + condition: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentcondition_condition_Union', + description: + 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', + types: () => [require('./condition.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + }, + }), + description: + 'For assessments or prognosis specific to a particular condition, indicates the condition being assessed.', + }, + performer: { + type: new GraphQLUnionType({ + name: 'RiskAssessmentperformer_performer_Union', + description: + 'The provider or software application that performed the assessment.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The provider or software application that performed the assessment.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason the risk assessment was performed.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RiskAssessmentreasonReference_reasonReference_Union', + description: + 'Resources supporting the reason the risk assessment was performed.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Resources supporting the reason the risk assessment was performed.', + }, + basis: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'RiskAssessmentbasis_basis_Union', + description: + 'Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + 'Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).', + }, + prediction: { + type: new GraphQLList(require('./riskassessmentprediction.schema.js')), + description: 'Describes the expected outcome for the subject.', + }, + _mitigation: { + type: require('./element.schema.js'), + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + mitigation: { + type: GraphQLString, + description: + 'A description of the steps that might be taken to reduce the identified risk(s).', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: 'Additional comments about the risk assessment.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/riskassessmentprediction.schema.js b/src/resources/4_0_0/schemas/riskassessmentprediction.schema.js new file mode 100644 index 00000000..19dd8e6f --- /dev/null +++ b/src/resources/4_0_0/schemas/riskassessmentprediction.schema.js @@ -0,0 +1,92 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskAssessmentprediction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RiskAssessmentprediction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + outcome: { + type: require('./codeableconcept.schema.js'), + description: + 'One of the potential outcomes for the patient (e.g. remission, death, a particular condition).', + }, + _probabilityDecimal: { + type: require('./element.schema.js'), + description: + 'Indicates how likely the outcome is (in the specified timeframe).', + }, + probabilityDecimal: { + type: GraphQLFloat, + description: + 'Indicates how likely the outcome is (in the specified timeframe).', + }, + probabilityRange: { + type: require('./range.schema.js'), + description: + 'Indicates how likely the outcome is (in the specified timeframe).', + }, + qualitativeRisk: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).', + }, + _relativeRisk: { + type: require('./element.schema.js'), + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + relativeRisk: { + type: GraphQLFloat, + description: + 'Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general. (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.).', + }, + whenPeriod: { + type: require('./period.schema.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + whenRange: { + type: require('./range.schema.js'), + description: + 'Indicates the period of time or age range of the subject to which the specified probability applies.', + }, + _rationale: { + type: require('./element.schema.js'), + description: + 'Additional information explaining the basis for the prediction.', + }, + rationale: { + type: GraphQLString, + description: + 'Additional information explaining the basis for the prediction.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/riskevidencesynthesis.schema.js b/src/resources/4_0_0/schemas/riskevidencesynthesis.schema.js new file mode 100644 index 00000000..29abfbe1 --- /dev/null +++ b/src/resources/4_0_0/schemas/riskevidencesynthesis.schema.js @@ -0,0 +1,329 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary RiskEvidenceSynthesis Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RiskEvidenceSynthesis', + description: + 'The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'RiskEvidenceSynthesis_Enum_schema', + values: { RiskEvidenceSynthesis: { value: 'RiskEvidenceSynthesis' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this risk evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this risk evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the risk evidence synthesis is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this risk evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this risk evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the risk evidence synthesis is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this risk evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the risk evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the risk evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the risk evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the risk evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the risk evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the risk evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the risk evidence synthesis.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the risk evidence synthesis.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this risk evidence synthesis. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this risk evidence synthesis. Enables tracking the life-cycle of the content.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the risk evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the risk evidence synthesis changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the risk evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the risk evidence synthesis changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the risk evidence synthesis.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the risk evidence synthesis.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the risk evidence synthesis from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the risk evidence synthesis from a consumer's perspective.", + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate risk evidence synthesis instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the risk evidence synthesis is intended to be used.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the risk evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the risk evidence synthesis.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the risk evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the risk evidence synthesis.', + }, + _approvalDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + approvalDate: { + type: DateScalar, + description: + 'The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.', + }, + _lastReviewDate: { + type: require('./element.schema.js'), + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + lastReviewDate: { + type: DateScalar, + description: + 'The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.', + }, + effectivePeriod: { + type: require('./period.schema.js'), + description: + 'The period during which the risk evidence synthesis content was or is planned to be in active use.', + }, + topic: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Descriptive topics related to the content of the RiskEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching.', + }, + author: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individiual or organization primarily involved in the creation and maintenance of the content.', + }, + editor: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for internal coherence of the content.', + }, + reviewer: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization primarily responsible for review of some aspect of the content.', + }, + endorser: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'An individual or organization responsible for officially endorsing the content for use in some setting.', + }, + relatedArtifact: { + type: new GraphQLList(require('./relatedartifact.schema.js')), + description: + 'Related artifacts such as additional documentation, justification, or bibliographic references.', + }, + synthesisType: { + type: require('./codeableconcept.schema.js'), + description: 'Type of synthesis eg meta-analysis.', + }, + studyType: { + type: require('./codeableconcept.schema.js'), + description: 'Type of study eg randomized trial.', + }, + population: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'RiskEvidenceSynthesispopulation_population_Union', + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resource that defines the population for the research.', + }, + exposure: { + type: new GraphQLUnionType({ + name: 'RiskEvidenceSynthesisexposure_exposure_Union', + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + description: + 'A reference to a EvidenceVariable resource that defines the exposure for the research.', + }, + outcome: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'RiskEvidenceSynthesisoutcome_outcome_Union', + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + types: () => [require('./evidencevariable.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'EvidenceVariable') { + return require('./evidencevariable.schema.js'); + } + }, + }), + ), + description: + 'A reference to a EvidenceVariable resomece that defines the outcome for the research.', + }, + sampleSize: { + type: require('./riskevidencesynthesissamplesize.schema.js'), + description: + 'A description of the size of the sample involved in the synthesis.', + }, + riskEstimate: { + type: require('./riskevidencesynthesisriskestimate.schema.js'), + description: 'The estimated risk of the outcome.', + }, + certainty: { + type: new GraphQLList( + require('./riskevidencesynthesiscertainty.schema.js'), + ), + description: 'A description of the certainty of the risk estimate.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/riskevidencesynthesiscertainty.schema.js b/src/resources/4_0_0/schemas/riskevidencesynthesiscertainty.schema.js new file mode 100644 index 00000000..a8f5b042 --- /dev/null +++ b/src/resources/4_0_0/schemas/riskevidencesynthesiscertainty.schema.js @@ -0,0 +1,47 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesiscertainty Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RiskEvidenceSynthesiscertainty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + rating: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A rating of the certainty of the effect estimate.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + certaintySubcomponent: { + type: new GraphQLList( + require('./riskevidencesynthesiscertaintycertaintysubcomponent.schema.js'), + ), + description: 'A description of a component of the overall certainty.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/riskevidencesynthesiscertaintycertaintysubcomponent.schema.js b/src/resources/4_0_0/schemas/riskevidencesynthesiscertaintycertaintysubcomponent.schema.js new file mode 100644 index 00000000..9520287f --- /dev/null +++ b/src/resources/4_0_0/schemas/riskevidencesynthesiscertaintycertaintysubcomponent.schema.js @@ -0,0 +1,45 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesiscertaintycertaintySubcomponent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RiskEvidenceSynthesiscertaintycertaintySubcomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Type of subcomponent of certainty rating.', + }, + rating: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'A rating of a subcomponent of rating certainty.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'A human-readable string to clarify or explain concepts about the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/riskevidencesynthesisriskestimate.schema.js b/src/resources/4_0_0/schemas/riskevidencesynthesisriskestimate.schema.js new file mode 100644 index 00000000..ff3982b7 --- /dev/null +++ b/src/resources/4_0_0/schemas/riskevidencesynthesisriskestimate.schema.js @@ -0,0 +1,87 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesisriskEstimate Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RiskEvidenceSynthesisriskEstimate', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Human-readable summary of risk estimate.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of risk estimate.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Examples include proportion and mean.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The point estimate of the risk estimate.', + }, + value: { + type: GraphQLFloat, + description: 'The point estimate of the risk estimate.', + }, + unitOfMeasure: { + type: require('./codeableconcept.schema.js'), + description: 'Specifies the UCUM unit for the outcome.', + }, + _denominatorCount: { + type: require('./element.schema.js'), + description: + 'The sample size for the group that was measured for this risk estimate.', + }, + denominatorCount: { + type: GraphQLInt, + description: + 'The sample size for the group that was measured for this risk estimate.', + }, + _numeratorCount: { + type: require('./element.schema.js'), + description: 'The number of group members with the outcome of interest.', + }, + numeratorCount: { + type: GraphQLInt, + description: 'The number of group members with the outcome of interest.', + }, + precisionEstimate: { + type: new GraphQLList( + require('./riskevidencesynthesisriskestimateprecisionestimate.schema.js'), + ), + description: + 'A description of the precision of the estimate for the effect.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/riskevidencesynthesisriskestimateprecisionestimate.schema.js b/src/resources/4_0_0/schemas/riskevidencesynthesisriskestimateprecisionestimate.schema.js new file mode 100644 index 00000000..3cb1c229 --- /dev/null +++ b/src/resources/4_0_0/schemas/riskevidencesynthesisriskestimateprecisionestimate.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesisriskEstimateprecisionEstimate Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RiskEvidenceSynthesisriskEstimateprecisionEstimate', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Examples include confidence interval and interquartile range.', + }, + _level: { + type: require('./element.schema.js'), + description: 'Use 95 for a 95% confidence interval.', + }, + level: { + type: GraphQLFloat, + description: 'Use 95 for a 95% confidence interval.', + }, + _from: { + type: require('./element.schema.js'), + description: 'Lower bound of confidence interval.', + }, + from: { + type: GraphQLFloat, + description: 'Lower bound of confidence interval.', + }, + _to: { + type: require('./element.schema.js'), + description: 'Upper bound of confidence interval.', + }, + to: { + type: GraphQLFloat, + description: 'Upper bound of confidence interval.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/riskevidencesynthesissamplesize.schema.js b/src/resources/4_0_0/schemas/riskevidencesynthesissamplesize.schema.js new file mode 100644 index 00000000..2491ce3a --- /dev/null +++ b/src/resources/4_0_0/schemas/riskevidencesynthesissamplesize.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary RiskEvidenceSynthesissampleSize Schema + */ +module.exports = new GraphQLObjectType({ + name: 'RiskEvidenceSynthesissampleSize', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Human-readable summary of sample size.', + }, + description: { + type: GraphQLString, + description: 'Human-readable summary of sample size.', + }, + _numberOfStudies: { + type: require('./element.schema.js'), + description: 'Number of studies included in this evidence synthesis.', + }, + numberOfStudies: { + type: GraphQLInt, + description: 'Number of studies included in this evidence synthesis.', + }, + _numberOfParticipants: { + type: require('./element.schema.js'), + description: + 'Number of participants included in this evidence synthesis.', + }, + numberOfParticipants: { + type: GraphQLInt, + description: + 'Number of participants included in this evidence synthesis.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/sampleddata.schema.js b/src/resources/4_0_0/schemas/sampleddata.schema.js new file mode 100644 index 00000000..d62e8800 --- /dev/null +++ b/src/resources/4_0_0/schemas/sampleddata.schema.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary SampledData Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SampledData', + description: + 'Base StructureDefinition for SampledData Type: A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + origin: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series.', + }, + _period: { + type: require('./element.schema.js'), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + period: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'The length of time between sampling times, measured in milliseconds.', + }, + _factor: { + type: require('./element.schema.js'), + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + factor: { + type: GraphQLFloat, + description: + 'A correction factor that is applied to the sampled data points before they are added to the origin.', + }, + _lowerLimit: { + type: require('./element.schema.js'), + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + lowerLimit: { + type: GraphQLFloat, + description: + "The lower limit of detection of the measured points. This is needed if any of the data points have the value 'L' (lower than detection limit).", + }, + _upperLimit: { + type: require('./element.schema.js'), + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + upperLimit: { + type: GraphQLFloat, + description: + "The upper limit of detection of the measured points. This is needed if any of the data points have the value 'U' (higher than detection limit).", + }, + _dimensions: { + type: require('./element.schema.js'), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + dimensions: { + type: new GraphQLNonNull(PositiveIntScalar), + description: + 'The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once.', + }, + _data: { + type: require('./element.schema.js'), + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + data: { + type: GraphQLString, + description: + "A series of data points which are decimal values separated by a single space (character u20). The special values 'E' (error), 'L' (below detection limit) and 'U' (above detection limit) can also be used in place of a decimal value.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/schedule.schema.js b/src/resources/4_0_0/schemas/schedule.schema.js new file mode 100644 index 00000000..b881e201 --- /dev/null +++ b/src/resources/4_0_0/schemas/schedule.schema.js @@ -0,0 +1,175 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Schedule Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Schedule', + description: + 'A container for slots of time that may be available for booking appointments.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Schedule_Enum_schema', + values: { Schedule: { value: 'Schedule' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'External Ids for this item.', + }, + _active: { + type: require('./element.schema.js'), + description: + 'Whether this schedule record is in active use or should not be used (such as was entered in error).', + }, + active: { + type: GraphQLBoolean, + description: + 'Whether this schedule record is in active use or should not be used (such as was entered in error).', + }, + serviceCategory: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A broad categorization of the service that is to be performed during this appointment.', + }, + serviceType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specific service that is to be performed during this appointment.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + actor: { + type: new GraphQLList( + new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Scheduleactor_actor_Union', + description: + 'Slots that reference this schedule resource provide the availability details to these referenced resource(s).', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + require('./healthcareservice.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + ), + description: + 'Slots that reference this schedule resource provide the availability details to these referenced resource(s).', + }, + planningHorizon: { + type: require('./period.schema.js'), + description: + "The period of time that the slots that reference this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a 'template' for planning outside these dates.", + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/searchparameter.schema.js b/src/resources/4_0_0/schemas/searchparameter.schema.js new file mode 100644 index 00000000..14a4bff6 --- /dev/null +++ b/src/resources/4_0_0/schemas/searchparameter.schema.js @@ -0,0 +1,319 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SearchParameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SearchParameter', + description: + 'A search parameter that defines a named search item that can be used to search/filter on a resource.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SearchParameter_Enum_schema', + values: { SearchParameter: { value: 'SearchParameter' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _derivedFrom: { + type: require('./element.schema.js'), + description: + 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', + }, + derivedFrom: { + type: CanonicalScalar, + description: + 'Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this search parameter. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this search parameter. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the search parameter was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the search parameter was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the search parameter.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the search parameter.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: 'And how it used.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: 'And how it used.', + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate search parameter instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the search parameter is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this search parameter is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this search parameter is needed and why it has been designed as it has.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The code used in the URL or the parameter name in a parameters resource for this search parameter.', + }, + _base: { + type: require('./element.schema.js'), + description: + 'The base resource type(s) that this search parameter can be used against.', + }, + base: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: + 'The base resource type(s) that this search parameter can be used against.', + }, + _type: { + type: require('./element.schema.js'), + description: + 'The type of value that a search parameter may contain, and how the content is interpreted.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The type of value that a search parameter may contain, and how the content is interpreted.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'A FHIRPath expression that returns a set of elements for the search parameter.', + }, + expression: { + type: GraphQLString, + description: + 'A FHIRPath expression that returns a set of elements for the search parameter.', + }, + _xpath: { + type: require('./element.schema.js'), + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + xpath: { + type: GraphQLString, + description: + 'An XPath expression that returns a set of elements for the search parameter.', + }, + _xpathUsage: { + type: require('./element.schema.js'), + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + xpathUsage: { + type: CodeScalar, + description: + 'How the search parameter relates to the set of elements returned by evaluating the xpath query.', + }, + _target: { + type: require('./element.schema.js'), + description: 'Types of resource (if a resource is referenced).', + }, + target: { + type: new GraphQLList(CodeScalar), + description: 'Types of resource (if a resource is referenced).', + }, + _multipleOr: { + type: require('./element.schema.js'), + description: + 'Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.', + }, + multipleOr: { + type: GraphQLBoolean, + description: + 'Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.', + }, + _multipleAnd: { + type: require('./element.schema.js'), + description: + 'Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.', + }, + multipleAnd: { + type: GraphQLBoolean, + description: + 'Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.', + }, + _comparator: { + type: require('./element.schema.js'), + description: 'Comparators supported for the search parameter.', + }, + comparator: { + type: new GraphQLList(CodeScalar), + description: 'Comparators supported for the search parameter.', + }, + _modifier: { + type: require('./element.schema.js'), + description: 'A modifier supported for the search parameter.', + }, + modifier: { + type: new GraphQLList(CodeScalar), + description: 'A modifier supported for the search parameter.', + }, + _chain: { + type: require('./element.schema.js'), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', + }, + chain: { + type: new GraphQLList(GraphQLString), + description: + 'Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.', + }, + component: { + type: new GraphQLList(require('./searchparametercomponent.schema.js')), + description: 'Used to define the parts of a composite search parameter.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/searchparametercomponent.schema.js b/src/resources/4_0_0/schemas/searchparametercomponent.schema.js new file mode 100644 index 00000000..1f84caca --- /dev/null +++ b/src/resources/4_0_0/schemas/searchparametercomponent.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary SearchParametercomponent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SearchParametercomponent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _definition: { + type: require('./element.schema.js'), + description: + 'The definition of the search parameter that describes this part.', + }, + definition: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'The definition of the search parameter that describes this part.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', + }, + expression: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/servicerequest.schema.js b/src/resources/4_0_0/schemas/servicerequest.schema.js new file mode 100644 index 00000000..502cff8a --- /dev/null +++ b/src/resources/4_0_0/schemas/servicerequest.schema.js @@ -0,0 +1,551 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ServiceRequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ServiceRequest', + description: + 'A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ServiceRequest_Enum_schema', + values: { ServiceRequest: { value: 'ServiceRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.', + }, + instantiatesCanonical: { + type: new GraphQLList(CanonicalScalar), + description: + 'The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.', + }, + instantiatesUri: { + type: new GraphQLList(UriScalar), + description: + 'The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestbasedOn_basedOn_Union', + description: 'Plan/proposal/order fulfilled by this request.', + types: () => [ + require('./careplan.schema.js'), + require('./servicerequest.schema.js'), + require('./medicationrequest.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'CarePlan') { + return require('./careplan.schema.js'); + } + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + if (data && data.resourceType === 'MedicationRequest') { + return require('./medicationrequest.schema.js'); + } + }, + }), + ), + description: 'Plan/proposal/order fulfilled by this request.', + }, + replaces: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestreplaces_replaces_Union', + description: + 'The request takes the place of the referenced completed or terminated request(s).', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'The request takes the place of the referenced completed or terminated request(s).', + }, + requisition: { + type: require('./identifier.schema.js'), + description: + 'A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the order.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the order.', + }, + _intent: { + type: require('./element.schema.js'), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Whether the request is a proposal, plan, an original order or a reflex order.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + "A code that classifies the service for searching, sorting and display purposes (e.g. 'Surgical Procedure').", + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the ServiceRequest should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the ServiceRequest should be addressed with respect to other requests.', + }, + _doNotPerform: { + type: require('./element.schema.js'), + description: + 'Set this to true if the record is saying that the service/procedure should NOT be performed.', + }, + doNotPerform: { + type: GraphQLBoolean, + description: + 'Set this to true if the record is saying that the service/procedure should NOT be performed.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.', + }, + orderDetail: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Additional details and instructions about the how the services are to be delivered. For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied.', + }, + quantityQuantity: { + type: require('./quantity.schema.js'), + description: + 'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).', + }, + quantityRatio: { + type: require('./ratio.schema.js'), + description: + 'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).', + }, + quantityRange: { + type: require('./range.schema.js'), + description: + 'An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).', + }, + subject: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'ServiceRequestsubject_subject_Union', + description: + 'On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'ServiceRequestencounter_encounter_Union', + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'An encounter that provides additional information about the healthcare context in which this request is made.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'The date/time at which the requested service should occur.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The date/time at which the requested service should occur.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'The date/time at which the requested service should occur.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: 'The date/time at which the requested service should occur.', + }, + _asNeededBoolean: { + type: require('./element.schema.js'), + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example 'pain', 'on flare-up', etc.", + }, + asNeededBoolean: { + type: GraphQLBoolean, + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example 'pain', 'on flare-up', etc.", + }, + asNeededCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + "If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example 'pain', 'on flare-up', etc.", + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'When the request transitioned to being actionable.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request transitioned to being actionable.', + }, + requester: { + type: new GraphQLUnionType({ + name: 'ServiceRequestrequester_requester_Union', + description: + 'The individual who initiated the request and has responsibility for its activation.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'The individual who initiated the request and has responsibility for its activation.', + }, + performerType: { + type: require('./codeableconcept.schema.js'), + description: 'Desired type of performer for doing the requested service.', + }, + performer: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestperformer_performer_Union', + description: + 'The desired performer for doing the requested service. For example, the surgeon, dermatopathologist, endoscopist, etc.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + require('./healthcareservice.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + ), + description: + 'The desired performer for doing the requested service. For example, the surgeon, dermatopathologist, endoscopist, etc.', + }, + locationCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.', + }, + locationReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestlocationReference_locationReference_Union', + description: + 'A reference to the the preferred location(s) where the procedure should actually happen. E.g. at home or nursing day care center.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + ), + description: + 'A reference to the the preferred location(s) where the procedure should actually happen. E.g. at home or nursing day care center.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'An explanation or justification for why this service is being requested in coded or textual form. This is often for billing purposes. May relate to the resources referred to in `supportingInfo`.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestreasonReference_reasonReference_Union', + description: + 'Indicates another resource that provides a justification for why this service is being requested. May relate to the resources referred to in `supportingInfo`.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: + 'Indicates another resource that provides a justification for why this service is being requested. May relate to the resources referred to in `supportingInfo`.', + }, + insurance: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestinsurance_insurance_Union', + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.', + types: () => [ + require('./coverage.schema.js'), + require('./claimresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + ), + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.', + }, + supportingInfo: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestsupportingInfo_supportingInfo_Union', + description: + "Additional clinical information about the patient or specimen that may influence the services or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "Additional clinical information about the patient or specimen that may influence the services or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements.", + }, + specimen: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestspecimen_specimen_Union', + description: + 'One or more specimens that the laboratory procedure will use.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'One or more specimens that the laboratory procedure will use.', + }, + bodySite: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Anatomic location where the procedure should be performed. This is the target site.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Any other notes and comments made about the service request. For example, internal billing notes.', + }, + _patientInstruction: { + type: require('./element.schema.js'), + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + patientInstruction: { + type: GraphQLString, + description: + 'Instructions in terms that are understood by the patient or consumer.', + }, + relevantHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'ServiceRequestrelevantHistory_relevantHistory_Union', + description: 'Key events in the history of the request.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: 'Key events in the history of the request.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/signature.schema.js b/src/resources/4_0_0/schemas/signature.schema.js new file mode 100644 index 00000000..ec0b778f --- /dev/null +++ b/src/resources/4_0_0/schemas/signature.schema.js @@ -0,0 +1,156 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); + +/** + * @name exports + * @summary Signature Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Signature', + description: + 'Base StructureDefinition for Signature Type: A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + type: { + type: new GraphQLList(new GraphQLNonNull(require('./coding.schema.js'))), + description: + 'An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.', + }, + _when: { + type: require('./element.schema.js'), + description: 'When the digital signature was signed.', + }, + when: { + type: new GraphQLNonNull(InstantScalar), + description: 'When the digital signature was signed.', + }, + who: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Signaturewho_who_Union', + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'SignatureonBehalfOf_onBehalfOf_Union', + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'A reference to an application-usable description of the identity that is represented by the signature.', + }, + _targetFormat: { + type: require('./element.schema.js'), + description: + 'A mime type that indicates the technical format of the target resources signed by the signature.', + }, + targetFormat: { + type: CodeScalar, + description: + 'A mime type that indicates the technical format of the target resources signed by the signature.', + }, + _sigFormat: { + type: require('./element.schema.js'), + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.', + }, + sigFormat: { + type: CodeScalar, + description: + 'A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.', + }, + _data: { + type: require('./element.schema.js'), + description: + 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', + }, + data: { + type: Base64BinaryScalar, + description: + 'The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/simplequantity.schema.js b/src/resources/4_0_0/schemas/simplequantity.schema.js new file mode 100644 index 00000000..1b9b0e5f --- /dev/null +++ b/src/resources/4_0_0/schemas/simplequantity.schema.js @@ -0,0 +1,11 @@ +const { GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SimpleQuantity Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SimpleQuantity', + description: 'A fixed quantity (no comparator)', + fields: () => ({}), +}); diff --git a/src/resources/4_0_0/schemas/slot.schema.js b/src/resources/4_0_0/schemas/slot.schema.js new file mode 100644 index 00000000..8e95e59a --- /dev/null +++ b/src/resources/4_0_0/schemas/slot.schema.js @@ -0,0 +1,174 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Slot Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Slot', + description: + 'A slot of time on a schedule that may be available for booking appointments.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Slot_Enum_schema', + values: { Slot: { value: 'Slot' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'External Ids for this item.', + }, + serviceCategory: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A broad categorization of the service that is to be performed during this appointment.', + }, + serviceType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.', + }, + specialty: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The specialty of a practitioner that would be required to perform the service requested in this appointment.', + }, + appointmentType: { + type: require('./codeableconcept.schema.js'), + description: + 'The style of appointment or patient that may be booked in the slot (not service type).', + }, + schedule: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'Slotschedule_schedule_Union', + description: + 'The schedule resource that this slot defines an interval of status information.', + types: () => [require('./schedule.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Schedule') { + return require('./schedule.schema.js'); + } + }, + }), + ), + description: + 'The schedule resource that this slot defines an interval of status information.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'busy | free | busy-unavailable | busy-tentative | entered-in-error.', + }, + _start: { + type: require('./element.schema.js'), + description: 'Date/Time that the slot is to begin.', + }, + start: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to begin.', + }, + _end: { + type: require('./element.schema.js'), + description: 'Date/Time that the slot is to conclude.', + }, + end: { + type: new GraphQLNonNull(InstantScalar), + description: 'Date/Time that the slot is to conclude.', + }, + _overbooked: { + type: require('./element.schema.js'), + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + overbooked: { + type: GraphQLBoolean, + description: + 'This slot has already been overbooked, appointments are unlikely to be accepted for this time.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + comment: { + type: GraphQLString, + description: + 'Comments on the slot to describe any extended information. Such as custom constraints on the slot.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimen.schema.js b/src/resources/4_0_0/schemas/specimen.schema.js new file mode 100644 index 00000000..b93d3337 --- /dev/null +++ b/src/resources/4_0_0/schemas/specimen.schema.js @@ -0,0 +1,204 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Specimen Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Specimen', + description: 'A sample to be used for analysis.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Specimen_Enum_schema', + values: { Specimen: { value: 'Specimen' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Id for specimen.', + }, + accessionIdentifier: { + type: require('./identifier.schema.js'), + description: + 'The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The availability of the specimen.', + }, + status: { + type: CodeScalar, + description: 'The availability of the specimen.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of material that forms the specimen.', + }, + subject: { + type: new GraphQLUnionType({ + name: 'Specimensubject_subject_Union', + description: + 'Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device.', + types: () => [ + require('./patient.schema.js'), + require('./group.schema.js'), + require('./device.schema.js'), + require('./substance.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device.', + }, + _receivedTime: { + type: require('./element.schema.js'), + description: 'Time when specimen was received for processing or testing.', + }, + receivedTime: { + type: DateTimeScalar, + description: 'Time when specimen was received for processing or testing.', + }, + parent: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Specimenparent_parent_Union', + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + types: () => [require('./specimen.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Specimen') { + return require('./specimen.schema.js'); + } + }, + }), + ), + description: + 'Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.', + }, + request: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Specimenrequest_request_Union', + description: + 'Details concerning a service request that required a specimen to be collected.', + types: () => [require('./servicerequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'ServiceRequest') { + return require('./servicerequest.schema.js'); + } + }, + }), + ), + description: + 'Details concerning a service request that required a specimen to be collected.', + }, + collection: { + type: require('./specimencollection.schema.js'), + description: 'Details concerning the specimen collection.', + }, + processing: { + type: new GraphQLList(require('./specimenprocessing.schema.js')), + description: + 'Details concerning processing and processing steps for the specimen.', + }, + container: { + type: new GraphQLList(require('./specimencontainer.schema.js')), + description: + 'The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.', + }, + condition: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A mode or state of being that describes the nature of the specimen.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimencollection.schema.js b/src/resources/4_0_0/schemas/specimencollection.schema.js new file mode 100644 index 00000000..d1dc4553 --- /dev/null +++ b/src/resources/4_0_0/schemas/specimencollection.schema.js @@ -0,0 +1,102 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Specimencollection Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Specimencollection', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + collector: { + type: new GraphQLUnionType({ + name: 'Specimencollectioncollector_collector_Union', + description: 'Person who collected the specimen.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'Person who collected the specimen.', + }, + _collectedDateTime: { + type: require('./element.schema.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedDateTime: { + type: DateTimeScalar, + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + collectedPeriod: { + type: require('./period.schema.js'), + description: + 'Time when specimen was collected from subject - the physiologically relevant time.', + }, + duration: { + type: require('./duration.schema.js'), + description: + 'The span of time over which the collection of a specimen occurred.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.', + }, + method: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value specifying the technique that is used to perform the procedure.', + }, + bodySite: { + type: require('./codeableconcept.schema.js'), + description: + 'Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens.', + }, + fastingStatusCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.', + }, + fastingStatusDuration: { + type: require('./duration.schema.js'), + description: + 'Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimencontainer.schema.js b/src/resources/4_0_0/schemas/specimencontainer.schema.js new file mode 100644 index 00000000..405f642c --- /dev/null +++ b/src/resources/4_0_0/schemas/specimencontainer.schema.js @@ -0,0 +1,85 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Specimencontainer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Specimencontainer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + "Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances.", + }, + _description: { + type: require('./element.schema.js'), + description: 'Textual description of the container.', + }, + description: { + type: GraphQLString, + description: 'Textual description of the container.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of container associated with the specimen (e.g. slide, aliquot, etc.).', + }, + capacity: { + type: require('./quantity.schema.js'), + description: + 'The capacity (volume or other measure) the container may contain.', + }, + specimenQuantity: { + type: require('./quantity.schema.js'), + description: + 'The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.', + }, + additiveCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + additiveReference: { + type: new GraphQLUnionType({ + name: 'SpecimencontaineradditiveReference_additiveReference_Union', + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimendefinition.schema.js b/src/resources/4_0_0/schemas/specimendefinition.schema.js new file mode 100644 index 00000000..f672643a --- /dev/null +++ b/src/resources/4_0_0/schemas/specimendefinition.schema.js @@ -0,0 +1,116 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SpecimenDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SpecimenDefinition', + description: 'A kind of specimen with associated set of requirements.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SpecimenDefinition_Enum_schema', + values: { SpecimenDefinition: { value: 'SpecimenDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A business identifier associated with the kind of specimen.', + }, + typeCollected: { + type: require('./codeableconcept.schema.js'), + description: 'The kind of material to be collected.', + }, + patientPreparation: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Preparation of the patient for specimen collection.', + }, + _timeAspect: { + type: require('./element.schema.js'), + description: 'Time aspect of specimen collection (duration or offset).', + }, + timeAspect: { + type: GraphQLString, + description: 'Time aspect of specimen collection (duration or offset).', + }, + collection: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The action to be performed for collecting the specimen.', + }, + typeTested: { + type: new GraphQLList( + require('./specimendefinitiontypetested.schema.js'), + ), + description: + 'Specimen conditioned in a container as expected by the testing laboratory.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimendefinitiontypetested.schema.js b/src/resources/4_0_0/schemas/specimendefinitiontypetested.schema.js new file mode 100644 index 00000000..85e6529d --- /dev/null +++ b/src/resources/4_0_0/schemas/specimendefinitiontypetested.schema.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SpecimenDefinitiontypeTested Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SpecimenDefinitiontypeTested', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _isDerived: { + type: require('./element.schema.js'), + description: 'Primary of secondary specimen.', + }, + isDerived: { + type: GraphQLBoolean, + description: 'Primary of secondary specimen.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The kind of specimen conditioned for testing expected by lab.', + }, + _preference: { + type: require('./element.schema.js'), + description: 'The preference for this type of conditioned specimen.', + }, + preference: { + type: new GraphQLNonNull(CodeScalar), + description: 'The preference for this type of conditioned specimen.', + }, + container: { + type: require('./specimendefinitiontypetestedcontainer.schema.js'), + description: "The specimen's container.", + }, + _requirement: { + type: require('./element.schema.js'), + description: + 'Requirements for delivery and special handling of this kind of conditioned specimen.', + }, + requirement: { + type: GraphQLString, + description: + 'Requirements for delivery and special handling of this kind of conditioned specimen.', + }, + retentionTime: { + type: require('./duration.schema.js'), + description: + 'The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.', + }, + rejectionCriterion: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Criterion for rejection of the specimen in its container by the laboratory.', + }, + handling: { + type: new GraphQLList( + require('./specimendefinitiontypetestedhandling.schema.js'), + ), + description: + 'Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimendefinitiontypetestedcontainer.schema.js b/src/resources/4_0_0/schemas/specimendefinitiontypetestedcontainer.schema.js new file mode 100644 index 00000000..ec527818 --- /dev/null +++ b/src/resources/4_0_0/schemas/specimendefinitiontypetestedcontainer.schema.js @@ -0,0 +1,87 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SpecimenDefinitiontypeTestedcontainer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SpecimenDefinitiontypeTestedcontainer', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + material: { + type: require('./codeableconcept.schema.js'), + description: 'The type of material of the container.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of container used to contain this kind of specimen.', + }, + cap: { + type: require('./codeableconcept.schema.js'), + description: 'Color of container cap.', + }, + _description: { + type: require('./element.schema.js'), + description: 'The textual description of the kind of container.', + }, + description: { + type: GraphQLString, + description: 'The textual description of the kind of container.', + }, + capacity: { + type: require('./quantity.schema.js'), + description: + 'The capacity (volume or other measure) of this kind of container.', + }, + minimumVolumeQuantity: { + type: require('./quantity.schema.js'), + description: 'The minimum volume to be conditioned in the container.', + }, + _minimumVolumeString: { + type: require('./element.schema.js'), + description: 'The minimum volume to be conditioned in the container.', + }, + minimumVolumeString: { + type: GraphQLString, + description: 'The minimum volume to be conditioned in the container.', + }, + additive: { + type: new GraphQLList( + require('./specimendefinitiontypetestedcontaineradditive.schema.js'), + ), + description: + 'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + _preparation: { + type: require('./element.schema.js'), + description: + 'Special processing that should be applied to the container for this kind of specimen.', + }, + preparation: { + type: GraphQLString, + description: + 'Special processing that should be applied to the container for this kind of specimen.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimendefinitiontypetestedcontaineradditive.schema.js b/src/resources/4_0_0/schemas/specimendefinitiontypetestedcontaineradditive.schema.js new file mode 100644 index 00000000..6b22d046 --- /dev/null +++ b/src/resources/4_0_0/schemas/specimendefinitiontypetestedcontaineradditive.schema.js @@ -0,0 +1,61 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SpecimenDefinitiontypeTestedcontaineradditive Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SpecimenDefinitiontypeTestedcontaineradditive', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + additiveCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + additiveReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'SpecimenDefinitiontypeTestedcontaineradditiveadditiveReference_additiveReference_Union', + description: + 'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: + 'Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimendefinitiontypetestedhandling.schema.js b/src/resources/4_0_0/schemas/specimendefinitiontypetestedhandling.schema.js new file mode 100644 index 00000000..fdf5a290 --- /dev/null +++ b/src/resources/4_0_0/schemas/specimendefinitiontypetestedhandling.schema.js @@ -0,0 +1,57 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SpecimenDefinitiontypeTestedhandling Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SpecimenDefinitiontypeTestedhandling', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + temperatureQualifier: { + type: require('./codeableconcept.schema.js'), + description: + 'It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.', + }, + temperatureRange: { + type: require('./range.schema.js'), + description: + 'The temperature interval for this set of handling instructions.', + }, + maxDuration: { + type: require('./duration.schema.js'), + description: + 'The maximum time interval of preservation of the specimen with these conditions.', + }, + _instruction: { + type: require('./element.schema.js'), + description: + "Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.", + }, + instruction: { + type: GraphQLString, + description: + "Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/specimenprocessing.schema.js b/src/resources/4_0_0/schemas/specimenprocessing.schema.js new file mode 100644 index 00000000..919b57df --- /dev/null +++ b/src/resources/4_0_0/schemas/specimenprocessing.schema.js @@ -0,0 +1,81 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Specimenprocessing Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Specimenprocessing', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: 'Textual description of procedure.', + }, + description: { + type: GraphQLString, + description: 'Textual description of procedure.', + }, + procedure: { + type: require('./codeableconcept.schema.js'), + description: + 'A coded value specifying the procedure used to process the specimen.', + }, + additive: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Specimenprocessingadditive_additive_Union', + description: 'Material used in the processing step.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'Material used in the processing step.', + }, + _timeDateTime: { + type: require('./element.schema.js'), + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + timeDateTime: { + type: DateTimeScalar, + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + timePeriod: { + type: require('./period.schema.js'), + description: + 'A record of the time or period when the specimen processing occurred. For example the time of sample fixation or the period of time the sample was in formalin.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuredefinition.schema.js b/src/resources/4_0_0/schemas/structuredefinition.schema.js new file mode 100644 index 00000000..8674de2f --- /dev/null +++ b/src/resources/4_0_0/schemas/structuredefinition.schema.js @@ -0,0 +1,310 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary StructureDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureDefinition', + description: + 'A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureDefinition_Enum_schema', + values: { StructureDefinition: { value: 'StructureDefinition' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the structure definition.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the structure definition.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this structure definition. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this structure definition. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the structure definition.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the structure definition.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the structure definition from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the structure definition from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the structure definition is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this structure definition is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this structure definition is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.', + }, + keyword: { + type: new GraphQLList(require('./coding.schema.js')), + description: + 'A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes.', + }, + _fhirVersion: { + type: require('./element.schema.js'), + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.0. for this version.', + }, + fhirVersion: { + type: CodeScalar, + description: + 'The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.0. for this version.', + }, + mapping: { + type: new GraphQLList(require('./structuredefinitionmapping.schema.js')), + description: 'An external specification that the content is mapped to.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'Defines the kind of structure that this definition is describing.', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines the kind of structure that this definition is describing.', + }, + _abstract: { + type: require('./element.schema.js'), + description: + 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', + }, + abstract: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether structure this definition describes is abstract or not - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged between systems.', + }, + context: { + type: new GraphQLList(require('./structuredefinitioncontext.schema.js')), + description: + 'Identifies the types of resource or data type elements to which the extension can be applied.', + }, + _contextInvariant: { + type: require('./element.schema.js'), + description: + 'A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.', + }, + contextInvariant: { + type: new GraphQLList(GraphQLString), + description: + 'A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true.', + }, + _type: { + type: require('./element.schema.js'), + description: + "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + type: { + type: new GraphQLNonNull(UriScalar), + description: + "The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. 'string' is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models.", + }, + _baseDefinition: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', + }, + baseDefinition: { + type: CanonicalScalar, + description: + 'An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.', + }, + _derivation: { + type: require('./element.schema.js'), + description: 'How the type relates to the baseDefinition.', + }, + derivation: { + type: CodeScalar, + description: 'How the type relates to the baseDefinition.', + }, + snapshot: { + type: require('./structuredefinitionsnapshot.schema.js'), + description: + 'A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.', + }, + differential: { + type: require('./structuredefinitiondifferential.schema.js'), + description: + 'A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuredefinitioncontext.schema.js b/src/resources/4_0_0/schemas/structuredefinitioncontext.schema.js new file mode 100644 index 00000000..fc9a6f62 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuredefinitioncontext.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureDefinitioncontext Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureDefinitioncontext', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: + 'Defines how to interpret the expression that defines what the context of the extension is.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Defines how to interpret the expression that defines what the context of the extension is.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'An expression that defines where an extension can be used in resources.', + }, + expression: { + type: new GraphQLNonNull(GraphQLString), + description: + 'An expression that defines where an extension can be used in resources.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuredefinitiondifferential.schema.js b/src/resources/4_0_0/schemas/structuredefinitiondifferential.schema.js new file mode 100644 index 00000000..7ab89f23 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuredefinitiondifferential.schema.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary StructureDefinitiondifferential Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureDefinitiondifferential', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.schema.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuredefinitionmapping.schema.js b/src/resources/4_0_0/schemas/structuredefinitionmapping.schema.js new file mode 100644 index 00000000..6a203115 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuredefinitionmapping.schema.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary StructureDefinitionmapping Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureDefinitionmapping', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _identity: { + type: require('./element.schema.js'), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + identity: { + type: new GraphQLNonNull(IdScalar), + description: + 'An Internal id that is used to identify this mapping set when specific mappings are made.', + }, + _uri: { + type: require('./element.schema.js'), + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + uri: { + type: UriScalar, + description: + 'An absolute URI that identifies the specification that this mapping is expressed to.', + }, + _name: { + type: require('./element.schema.js'), + description: 'A name for the specification that is being mapped to.', + }, + name: { + type: GraphQLString, + description: 'A name for the specification that is being mapped to.', + }, + _comment: { + type: require('./element.schema.js'), + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + comment: { + type: GraphQLString, + description: + 'Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuredefinitionsnapshot.schema.js b/src/resources/4_0_0/schemas/structuredefinitionsnapshot.schema.js new file mode 100644 index 00000000..0613aba8 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuredefinitionsnapshot.schema.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary StructureDefinitionsnapshot Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureDefinitionsnapshot', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + element: { + type: new GraphQLList( + new GraphQLNonNull(require('./elementdefinition.schema.js')), + ), + description: 'Captures constraints on each element within the resource.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremap.schema.js b/src/resources/4_0_0/schemas/structuremap.schema.js new file mode 100644 index 00000000..ffe2154c --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremap.schema.js @@ -0,0 +1,238 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary StructureMap Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMap', + description: + 'A Map of relationships between 2 structures that can be used to transform data.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'StructureMap_Enum_schema', + values: { StructureMap: { value: 'StructureMap' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the structure map.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the structure map.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this structure map. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this structure map. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the structure map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the structure map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the structure map.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the structure map.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the structure map from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the structure map from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure map instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the structure map is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this structure map is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this structure map is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map.', + }, + structure: { + type: new GraphQLList(require('./structuremapstructure.schema.js')), + description: + 'A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.', + }, + _import: { + type: require('./element.schema.js'), + description: 'Other maps used by this map (canonical URLs).', + }, + import: { + type: new GraphQLList(CanonicalScalar), + description: 'Other maps used by this map (canonical URLs).', + }, + group: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgroup.schema.js')), + ), + description: + 'Organizes the mapping into manageable chunks for human review/ease of maintenance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremapgroup.schema.js b/src/resources/4_0_0/schemas/structuremapgroup.schema.js new file mode 100644 index 00000000..17996c24 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremapgroup.schema.js @@ -0,0 +1,90 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroup Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMapgroup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'A unique name for the group for the convenience of human readers.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: + 'A unique name for the group for the convenience of human readers.', + }, + _extends: { + type: require('./element.schema.js'), + description: 'Another group that this group adds rules to.', + }, + extends: { + type: IdScalar, + description: 'Another group that this group adds rules to.', + }, + _typeMode: { + type: require('./element.schema.js'), + description: + 'If this is the default rule set to apply for the source type or this combination of types.', + }, + typeMode: { + type: new GraphQLNonNull(CodeScalar), + description: + 'If this is the default rule set to apply for the source type or this combination of types.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', + }, + documentation: { + type: GraphQLString, + description: + 'Additional supporting documentation that explains the purpose of the group and the types of mappings within it.', + }, + input: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgroupinput.schema.js')), + ), + description: + 'A name assigned to an instance of data. The instance must be provided when the mapping is invoked.', + }, + rule: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgrouprule.schema.js')), + ), + description: 'Transform Rule from source to target.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremapgroupinput.schema.js b/src/resources/4_0_0/schemas/structuremapgroupinput.schema.js new file mode 100644 index 00000000..21e72dcf --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremapgroupinput.schema.js @@ -0,0 +1,71 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroupinput Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMapgroupinput', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Name for this instance of data.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name for this instance of data.', + }, + _type: { + type: require('./element.schema.js'), + description: 'Type for this instance of data.', + }, + type: { + type: GraphQLString, + description: 'Type for this instance of data.', + }, + _mode: { + type: require('./element.schema.js'), + description: 'Mode for this instance of data.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'Mode for this instance of data.', + }, + _documentation: { + type: require('./element.schema.js'), + description: 'Documentation for this instance of data.', + }, + documentation: { + type: GraphQLString, + description: 'Documentation for this instance of data.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremapgrouprule.schema.js b/src/resources/4_0_0/schemas/structuremapgrouprule.schema.js new file mode 100644 index 00000000..a0f6d02e --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremapgrouprule.schema.js @@ -0,0 +1,70 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary StructureMapgrouprule Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMapgrouprule', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Name of the rule for internal references.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name of the rule for internal references.', + }, + source: { + type: new GraphQLList( + new GraphQLNonNull(require('./structuremapgrouprulesource.schema.js')), + ), + description: 'Source inputs to the mapping.', + }, + target: { + type: new GraphQLList(require('./structuremapgroupruletarget.schema.js')), + description: 'Content to create because of this mapping rule.', + }, + dependent: { + type: new GraphQLList( + require('./structuremapgroupruledependent.schema.js'), + ), + description: 'Which other rules to apply in the context of this rule.', + }, + _documentation: { + type: require('./element.schema.js'), + description: 'Documentation for this instance of data.', + }, + documentation: { + type: GraphQLString, + description: 'Documentation for this instance of data.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremapgroupruledependent.schema.js b/src/resources/4_0_0/schemas/structuremapgroupruledependent.schema.js new file mode 100644 index 00000000..838705c1 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremapgroupruledependent.schema.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroupruledependent Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMapgroupruledependent', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Name of a rule or group to apply.', + }, + name: { + type: new GraphQLNonNull(IdScalar), + description: 'Name of a rule or group to apply.', + }, + _variable: { + type: require('./element.schema.js'), + description: 'Variable to pass to the rule or group.', + }, + variable: { + type: new GraphQLList(new GraphQLNonNull(GraphQLString)), + description: 'Variable to pass to the rule or group.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremapgrouprulesource.schema.js b/src/resources/4_0_0/schemas/structuremapgrouprulesource.schema.js new file mode 100644 index 00000000..2f83cd39 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremapgrouprulesource.schema.js @@ -0,0 +1,487 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLBoolean, + GraphQLFloat, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary StructureMapgrouprulesource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMapgrouprulesource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _context: { + type: require('./element.schema.js'), + description: 'Type or variable this rule applies to.', + }, + context: { + type: new GraphQLNonNull(IdScalar), + description: 'Type or variable this rule applies to.', + }, + _min: { + type: require('./element.schema.js'), + description: + 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', + }, + min: { + type: GraphQLInt, + description: + 'Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content.', + }, + _max: { + type: require('./element.schema.js'), + description: + "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", + }, + max: { + type: GraphQLString, + description: + "Specified maximum cardinality for the element - a number or a '*'. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value).", + }, + _type: { + type: require('./element.schema.js'), + description: + 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', + }, + type: { + type: GraphQLString, + description: + 'Specified type for the element. This works as a condition on the mapping - use for polymorphic elements.', + }, + _defaultValueBase64Binary: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueBase64Binary: { + type: Base64BinaryScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueBoolean: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueBoolean: { + type: GraphQLBoolean, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueCanonical: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCanonical: { + type: CanonicalScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueCode: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCode: { + type: CodeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDate: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDate: { + type: DateScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDateTime: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDateTime: { + type: DateTimeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueDecimal: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDecimal: { + type: GraphQLFloat, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueId: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueId: { + type: IdScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueInstant: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueInstant: { + type: InstantScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueInteger: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueInteger: { + type: GraphQLInt, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueMarkdown: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMarkdown: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueOid: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueOid: { + type: OidScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValuePositiveInt: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValuePositiveInt: { + type: PositiveIntScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueString: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueString: { + type: GraphQLString, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueTime: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTime: { + type: TimeScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUnsignedInt: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUnsignedInt: { + type: UnsignedIntScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUri: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUri: { + type: UriScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUrl: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUrl: { + type: UrlScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + _defaultValueUuid: { + type: require('./element.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUuid: { + type: UuidScalar, + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAddress: { + type: require('./address.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAge: { + type: require('./age.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAnnotation: { + type: require('./annotation.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueAttachment: { + type: require('./attachment.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCoding: { + type: require('./coding.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueContactPoint: { + type: require('./contactpoint.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueCount: { + type: require('./count.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDistance: { + type: require('./distance.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDuration: { + type: require('./duration.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueHumanName: { + type: require('./humanname.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueIdentifier: { + type: require('./identifier.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueMoney: { + type: require('./money.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValuePeriod: { + type: require('./period.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueQuantity: { + type: require('./quantity.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRange: { + type: require('./range.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRatio: { + type: require('./ratio.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueReference: { + type: require('./resourcelist.schema'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueSampledData: { + type: require('./sampleddata.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueSignature: { + type: require('./signature.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTiming: { + type: require('./timing.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueContactDetail: { + type: require('./contactdetail.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueContributor: { + type: require('./contributor.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDataRequirement: { + type: require('./datarequirement.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueExpression: { + type: require('./expression.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueParameterDefinition: { + type: require('./parameterdefinition.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueRelatedArtifact: { + type: require('./relatedartifact.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueTriggerDefinition: { + type: require('./triggerdefinition.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueUsageContext: { + type: require('./usagecontext.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + defaultValueDosage: { + type: require('./dosage.schema.js'), + description: + 'A value to use if there is no existing value in the source object.', + }, + _element: { + type: require('./element.schema.js'), + description: 'Optional field for this source.', + }, + element: { + type: GraphQLString, + description: 'Optional field for this source.', + }, + _listMode: { + type: require('./element.schema.js'), + description: 'How to handle the list mode for this element.', + }, + listMode: { + type: CodeScalar, + description: 'How to handle the list mode for this element.', + }, + _variable: { + type: require('./element.schema.js'), + description: 'Named context for field, if a field is specified.', + }, + variable: { + type: IdScalar, + description: 'Named context for field, if a field is specified.', + }, + _condition: { + type: require('./element.schema.js'), + description: + 'FHIRPath expression - must be true or the rule does not apply.', + }, + condition: { + type: GraphQLString, + description: + 'FHIRPath expression - must be true or the rule does not apply.', + }, + _check: { + type: require('./element.schema.js'), + description: + 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', + }, + check: { + type: GraphQLString, + description: + 'FHIRPath expression - must be true or the mapping engine throws an error instead of completing.', + }, + _logMessage: { + type: require('./element.schema.js'), + description: + 'A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.', + }, + logMessage: { + type: GraphQLString, + description: + 'A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremapgroupruletarget.schema.js b/src/resources/4_0_0/schemas/structuremapgroupruletarget.schema.js new file mode 100644 index 00000000..d5effc89 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremapgroupruletarget.schema.js @@ -0,0 +1,98 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroupruletarget Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMapgroupruletarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _context: { + type: require('./element.schema.js'), + description: 'Type or variable this rule applies to.', + }, + context: { + type: IdScalar, + description: 'Type or variable this rule applies to.', + }, + _contextType: { + type: require('./element.schema.js'), + description: 'How to interpret the context.', + }, + contextType: { + type: CodeScalar, + description: 'How to interpret the context.', + }, + _element: { + type: require('./element.schema.js'), + description: 'Field to create in the context.', + }, + element: { + type: GraphQLString, + description: 'Field to create in the context.', + }, + _variable: { + type: require('./element.schema.js'), + description: + 'Named context for field, if desired, and a field is specified.', + }, + variable: { + type: IdScalar, + description: + 'Named context for field, if desired, and a field is specified.', + }, + _listMode: { + type: require('./element.schema.js'), + description: 'If field is a list, how to manage the list.', + }, + listMode: { + type: new GraphQLList(CodeScalar), + description: 'If field is a list, how to manage the list.', + }, + _listRuleId: { + type: require('./element.schema.js'), + description: 'Internal rule reference for shared list items.', + }, + listRuleId: { + type: IdScalar, + description: 'Internal rule reference for shared list items.', + }, + _transform: { + type: require('./element.schema.js'), + description: 'How the data is copied / created.', + }, + transform: { + type: CodeScalar, + description: 'How the data is copied / created.', + }, + parameter: { + type: new GraphQLList( + require('./structuremapgroupruletargetparameter.schema.js'), + ), + description: 'Parameters to the transform.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremapgroupruletargetparameter.schema.js b/src/resources/4_0_0/schemas/structuremapgroupruletargetparameter.schema.js new file mode 100644 index 00000000..542f10b0 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremapgroupruletargetparameter.schema.js @@ -0,0 +1,81 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary StructureMapgroupruletargetparameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMapgroupruletargetparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _valueId: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'Parameter value - variable or literal.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'Parameter value - variable or literal.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Parameter value - variable or literal.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'Parameter value - variable or literal.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'Parameter value - variable or literal.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'Parameter value - variable or literal.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/structuremapstructure.schema.js b/src/resources/4_0_0/schemas/structuremapstructure.schema.js new file mode 100644 index 00000000..2f01db39 --- /dev/null +++ b/src/resources/4_0_0/schemas/structuremapstructure.schema.js @@ -0,0 +1,73 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary StructureMapstructure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'StructureMapstructure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: 'The canonical reference to the structure.', + }, + url: { + type: new GraphQLNonNull(CanonicalScalar), + description: 'The canonical reference to the structure.', + }, + _mode: { + type: require('./element.schema.js'), + description: 'How the referenced structure is used in this mapping.', + }, + mode: { + type: new GraphQLNonNull(CodeScalar), + description: 'How the referenced structure is used in this mapping.', + }, + _alias: { + type: require('./element.schema.js'), + description: 'The name used for this type in the map.', + }, + alias: { + type: GraphQLString, + description: 'The name used for this type in the map.', + }, + _documentation: { + type: require('./element.schema.js'), + description: + 'Documentation that describes how the structure is used in the mapping.', + }, + documentation: { + type: GraphQLString, + description: + 'Documentation that describes how the structure is used in the mapping.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/subscription.schema.js b/src/resources/4_0_0/schemas/subscription.schema.js new file mode 100644 index 00000000..00b92964 --- /dev/null +++ b/src/resources/4_0_0/schemas/subscription.schema.js @@ -0,0 +1,142 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); + +/** + * @name exports + * @summary Subscription Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Subscription', + description: + "The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined 'channel' so that another system can take an appropriate action.", + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Subscription_Enum_schema', + values: { Subscription: { value: 'Subscription' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of the subscription, which marks the server state for managing the subscription.', + }, + contact: { + type: new GraphQLList(require('./contactpoint.schema.js')), + description: + 'Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.', + }, + _end: { + type: require('./element.schema.js'), + description: 'The time for the server to turn the subscription off.', + }, + end: { + type: InstantScalar, + description: 'The time for the server to turn the subscription off.', + }, + _reason: { + type: require('./element.schema.js'), + description: 'A description of why this subscription is defined.', + }, + reason: { + type: new GraphQLNonNull(GraphQLString), + description: 'A description of why this subscription is defined.', + }, + _criteria: { + type: require('./element.schema.js'), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + criteria: { + type: new GraphQLNonNull(GraphQLString), + description: + 'The rules that the server should use to determine when to generate notifications for this subscription.', + }, + _error: { + type: require('./element.schema.js'), + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + error: { + type: GraphQLString, + description: + 'A record of the last error that occurred when the server processed a notification.', + }, + channel: { + type: new GraphQLNonNull(require('./subscriptionchannel.schema.js')), + description: + 'Details where to send notifications when resources are received that meet the criteria.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/subscriptionchannel.schema.js b/src/resources/4_0_0/schemas/subscriptionchannel.schema.js new file mode 100644 index 00000000..9168866a --- /dev/null +++ b/src/resources/4_0_0/schemas/subscriptionchannel.schema.js @@ -0,0 +1,77 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary Subscriptionchannel Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Subscriptionchannel', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of channel to send notifications on.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of channel to send notifications on.', + }, + _endpoint: { + type: require('./element.schema.js'), + description: + 'The url that describes the actual end-point to send messages to.', + }, + endpoint: { + type: UrlScalar, + description: + 'The url that describes the actual end-point to send messages to.', + }, + _payload: { + type: require('./element.schema.js'), + description: + "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type 'text/plain' may also be used for Email and SMS subscriptions.", + }, + payload: { + type: CodeScalar, + description: + "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type 'text/plain' may also be used for Email and SMS subscriptions.", + }, + _header: { + type: require('./element.schema.js'), + description: + 'Additional headers / information to send as part of the notification.', + }, + header: { + type: new GraphQLList(GraphQLString), + description: + 'Additional headers / information to send as part of the notification.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substance.schema.js b/src/resources/4_0_0/schemas/substance.schema.js new file mode 100644 index 00000000..adb965ac --- /dev/null +++ b/src/resources/4_0_0/schemas/substance.schema.js @@ -0,0 +1,124 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary Substance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Substance', + description: 'A homogeneous material with a definite composition.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Substance_Enum_schema', + values: { Substance: { value: 'Substance' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'Unique identifier for the substance.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code to indicate if the substance is actively used.', + }, + status: { + type: CodeScalar, + description: 'A code to indicate if the substance is actively used.', + }, + category: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A code that classifies the general type of substance. This is used for searching, sorting and display purposes.', + }, + code: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'A code (or set of codes) that identify this substance.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + description: { + type: GraphQLString, + description: + 'A description of the substance - its appearance, handling requirements, and other usage notes.', + }, + instance: { + type: new GraphQLList(require('./substanceinstance.schema.js')), + description: + 'Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.', + }, + ingredient: { + type: new GraphQLList(require('./substanceingredient.schema.js')), + description: 'A substance can be composed of other substances.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substanceamount.schema.js b/src/resources/4_0_0/schemas/substanceamount.schema.js new file mode 100644 index 00000000..58f9bac8 --- /dev/null +++ b/src/resources/4_0_0/schemas/substanceamount.schema.js @@ -0,0 +1,70 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceAmount Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceAmount', + description: + 'Base StructureDefinition for SubstanceAmount Type: Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + amountQuantity: { + type: require('./quantity.schema.js'), + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + amountRange: { + type: require('./range.schema.js'), + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + _amountString: { + type: require('./element.schema.js'), + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + amountString: { + type: GraphQLString, + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + amountType: { + type: require('./codeableconcept.schema.js'), + description: + 'Most elements that require a quantitative value will also have a field called amount type. Amount type should always be specified because the actual value of the amount is often dependent on it. EXAMPLE: In capturing the actual relative amounts of substances or molecular fragments it is essential to indicate whether the amount refers to a mole ratio or weight ratio. For any given element an effort should be made to use same the amount type for all related definitional elements.', + }, + _amountText: { + type: require('./element.schema.js'), + description: 'A textual comment on a numeric value.', + }, + amountText: { + type: GraphQLString, + description: 'A textual comment on a numeric value.', + }, + referenceRange: { + type: require('./element.schema.js'), + description: 'Reference range of possible or expected values.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substanceamountreferencerange.schema.js b/src/resources/4_0_0/schemas/substanceamountreferencerange.schema.js new file mode 100644 index 00000000..cb6330b3 --- /dev/null +++ b/src/resources/4_0_0/schemas/substanceamountreferencerange.schema.js @@ -0,0 +1,35 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceAmountreferenceRange Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceAmountreferenceRange', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + lowLimit: { + type: require('./quantity.schema.js'), + description: 'Lower limit possible or expected.', + }, + highLimit: { + type: require('./quantity.schema.js'), + description: 'Upper limit possible or expected.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substanceingredient.schema.js b/src/resources/4_0_0/schemas/substanceingredient.schema.js new file mode 100644 index 00000000..429c7368 --- /dev/null +++ b/src/resources/4_0_0/schemas/substanceingredient.schema.js @@ -0,0 +1,64 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary Substanceingredient Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Substanceingredient', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + quantity: { + type: require('./ratio.schema.js'), + description: + 'The amount of the ingredient in the substance - a concentration ratio.', + }, + substanceCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'Another substance that is a component of this substance.', + }, + substanceReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: + 'SubstanceingredientsubstanceReference_substanceReference_Union', + description: + 'Another substance that is a component of this substance.', + types: () => [require('./substance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + ), + description: 'Another substance that is a component of this substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substanceinstance.schema.js b/src/resources/4_0_0/schemas/substanceinstance.schema.js new file mode 100644 index 00000000..2462f1b7 --- /dev/null +++ b/src/resources/4_0_0/schemas/substanceinstance.schema.js @@ -0,0 +1,52 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Substanceinstance Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Substanceinstance', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Identifier associated with the package/container (usually a label affixed directly).', + }, + _expiry: { + type: require('./element.schema.js'), + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + expiry: { + type: DateTimeScalar, + description: + 'When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.', + }, + quantity: { + type: require('./quantity.schema.js'), + description: 'The amount of the substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancenucleicacid.schema.js b/src/resources/4_0_0/schemas/substancenucleicacid.schema.js new file mode 100644 index 00000000..7a443f20 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancenucleicacid.schema.js @@ -0,0 +1,120 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLInt, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceNucleicAcid Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceNucleicAcid', + description: + 'Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceNucleicAcid_Enum_schema', + values: { SubstanceNucleicAcid: { value: 'SubstanceNucleicAcid' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + sequenceType: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of the sequence shall be specified based on a controlled vocabulary.', + }, + _numberOfSubunits: { + type: require('./element.schema.js'), + description: + 'The number of linear sequences of nucleotides linked through phosphodiester bonds shall be described. Subunits would be strands of nucleic acids that are tightly associated typically through Watson-Crick base pairing. NOTE: If not specified in the reference source, the assumption is that there is 1 subunit.', + }, + numberOfSubunits: { + type: GraphQLInt, + description: + 'The number of linear sequences of nucleotides linked through phosphodiester bonds shall be described. Subunits would be strands of nucleic acids that are tightly associated typically through Watson-Crick base pairing. NOTE: If not specified in the reference source, the assumption is that there is 1 subunit.', + }, + _areaOfHybridisation: { + type: require('./element.schema.js'), + description: + 'The area of hybridisation shall be described if applicable for double stranded RNA or DNA. The number associated with the subunit followed by the number associated to the residue shall be specified in increasing order. The underscore “” shall be used as separator as follows: “Subunitnumber Residue”.', + }, + areaOfHybridisation: { + type: GraphQLString, + description: + 'The area of hybridisation shall be described if applicable for double stranded RNA or DNA. The number associated with the subunit followed by the number associated to the residue shall be specified in increasing order. The underscore “” shall be used as separator as follows: “Subunitnumber Residue”.', + }, + oligoNucleotideType: { + type: require('./codeableconcept.schema.js'), + description: '(TBC).', + }, + subunit: { + type: new GraphQLList(require('./substancenucleicacidsubunit.schema.js')), + description: + 'Subunits are listed in order of decreasing length; sequences of the same length will be ordered by molecular weight; subunits that have identical sequences will be repeated multiple times.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancenucleicacidsubunit.schema.js b/src/resources/4_0_0/schemas/substancenucleicacidsubunit.schema.js new file mode 100644 index 00000000..56fca7d4 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancenucleicacidsubunit.schema.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceNucleicAcidsubunit Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceNucleicAcidsubunit', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _subunit: { + type: require('./element.schema.js'), + description: + 'Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.', + }, + subunit: { + type: GraphQLInt, + description: + 'Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + "Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured.", + }, + sequence: { + type: GraphQLString, + description: + "Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured.", + }, + _length: { + type: require('./element.schema.js'), + description: 'The length of the sequence shall be captured.', + }, + length: { + type: GraphQLInt, + description: 'The length of the sequence shall be captured.', + }, + sequenceAttachment: { + type: require('./attachment.schema.js'), + description: '(TBC).', + }, + fivePrime: { + type: require('./codeableconcept.schema.js'), + description: + "The nucleotide present at the 5’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the first position in the sequence. A separate representation would be redundant.", + }, + threePrime: { + type: require('./codeableconcept.schema.js'), + description: + "The nucleotide present at the 3’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the last position in the sequence. A separate representation would be redundant.", + }, + linkage: { + type: new GraphQLList( + require('./substancenucleicacidsubunitlinkage.schema.js'), + ), + description: 'The linkages between sugar residues will also be captured.', + }, + sugar: { + type: new GraphQLList( + require('./substancenucleicacidsubunitsugar.schema.js'), + ), + description: '5.3.6.8.1 Sugar ID (Mandatory).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancenucleicacidsubunitlinkage.schema.js b/src/resources/4_0_0/schemas/substancenucleicacidsubunitlinkage.schema.js new file mode 100644 index 00000000..428270cc --- /dev/null +++ b/src/resources/4_0_0/schemas/substancenucleicacidsubunitlinkage.schema.js @@ -0,0 +1,65 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceNucleicAcidsubunitlinkage Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceNucleicAcidsubunitlinkage', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _connectivity: { + type: require('./element.schema.js'), + description: + 'The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be specified.', + }, + connectivity: { + type: GraphQLString, + description: + 'The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be specified.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Each linkage will be registered as a fragment and have an ID.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage.', + }, + name: { + type: GraphQLString, + description: + 'Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage.', + }, + _residueSite: { + type: require('./element.schema.js'), + description: 'Residues shall be captured as described in 5.3.6.8.3.', + }, + residueSite: { + type: GraphQLString, + description: 'Residues shall be captured as described in 5.3.6.8.3.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancenucleicacidsubunitsugar.schema.js b/src/resources/4_0_0/schemas/substancenucleicacidsubunitsugar.schema.js new file mode 100644 index 00000000..c4e4f61b --- /dev/null +++ b/src/resources/4_0_0/schemas/substancenucleicacidsubunitsugar.schema.js @@ -0,0 +1,57 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceNucleicAcidsubunitsugar Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceNucleicAcidsubunitsugar', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'The Substance ID of the sugar or sugar-like component that make up the nucleotide.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of the sugar or sugar-like component that make up the nucleotide.', + }, + name: { + type: GraphQLString, + description: + 'The name of the sugar or sugar-like component that make up the nucleotide.', + }, + _residueSite: { + type: require('./element.schema.js'), + description: + 'The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5‘-3‘direction consistent with the base sequences listed above.', + }, + residueSite: { + type: GraphQLString, + description: + 'The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5‘-3‘direction consistent with the base sequences listed above.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancepolymer.schema.js b/src/resources/4_0_0/schemas/substancepolymer.schema.js new file mode 100644 index 00000000..f877f191 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancepolymer.schema.js @@ -0,0 +1,112 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstancePolymer Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstancePolymer', + description: 'Todo.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstancePolymer_Enum_schema', + values: { SubstancePolymer: { value: 'SubstancePolymer' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + class: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + geometry: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + copolymerConnectivity: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Todo.', + }, + _modification: { + type: require('./element.schema.js'), + description: 'Todo.', + }, + modification: { + type: new GraphQLList(GraphQLString), + description: 'Todo.', + }, + monomerSet: { + type: new GraphQLList(require('./substancepolymermonomerset.schema.js')), + description: 'Todo.', + }, + repeat: { + type: new GraphQLList(require('./substancepolymerrepeat.schema.js')), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancepolymermonomerset.schema.js b/src/resources/4_0_0/schemas/substancepolymermonomerset.schema.js new file mode 100644 index 00000000..ae9f3b76 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancepolymermonomerset.schema.js @@ -0,0 +1,42 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymermonomerSet Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstancePolymermonomerSet', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + ratioType: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + startingMaterial: { + type: new GraphQLList( + require('./substancepolymermonomersetstartingmaterial.schema.js'), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancepolymermonomersetstartingmaterial.schema.js b/src/resources/4_0_0/schemas/substancepolymermonomersetstartingmaterial.schema.js new file mode 100644 index 00000000..deb6c974 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancepolymermonomersetstartingmaterial.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymermonomerSetstartingMaterial Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstancePolymermonomerSetstartingMaterial', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + material: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + _isDefining: { + type: require('./element.schema.js'), + description: 'Todo.', + }, + isDefining: { + type: GraphQLBoolean, + description: 'Todo.', + }, + amount: { + type: require('./substanceamount.schema.js'), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancepolymerrepeat.schema.js b/src/resources/4_0_0/schemas/substancepolymerrepeat.schema.js new file mode 100644 index 00000000..0dc8dfd1 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancepolymerrepeat.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymerrepeat Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstancePolymerrepeat', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _numberOfUnits: { + type: require('./element.schema.js'), + description: 'Todo.', + }, + numberOfUnits: { + type: GraphQLInt, + description: 'Todo.', + }, + _averageMolecularFormula: { + type: require('./element.schema.js'), + description: 'Todo.', + }, + averageMolecularFormula: { + type: GraphQLString, + description: 'Todo.', + }, + repeatUnitAmountType: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + repeatUnit: { + type: new GraphQLList( + require('./substancepolymerrepeatrepeatunit.schema.js'), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunit.schema.js b/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunit.schema.js new file mode 100644 index 00000000..41bef636 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunit.schema.js @@ -0,0 +1,60 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymerrepeatrepeatUnit Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstancePolymerrepeatrepeatUnit', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + orientationOfPolymerisation: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + _repeatUnit: { + type: require('./element.schema.js'), + description: 'Todo.', + }, + repeatUnit: { + type: GraphQLString, + description: 'Todo.', + }, + amount: { + type: require('./substanceamount.schema.js'), + description: 'Todo.', + }, + degreeOfPolymerisation: { + type: new GraphQLList( + require('./substancepolymerrepeatrepeatunitdegreeofpolymerisation.schema.js'), + ), + description: 'Todo.', + }, + structuralRepresentation: { + type: new GraphQLList( + require('./substancepolymerrepeatrepeatunitstructuralrepresentation.schema.js'), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunitdegreeofpolymerisation.schema.js b/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunitdegreeofpolymerisation.schema.js new file mode 100644 index 00000000..b036e188 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunitdegreeofpolymerisation.schema.js @@ -0,0 +1,40 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymerrepeatrepeatUnitdegreeOfPolymerisation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstancePolymerrepeatrepeatUnitdegreeOfPolymerisation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + degree: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + amount: { + type: require('./substanceamount.schema.js'), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunitstructuralrepresentation.schema.js b/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunitstructuralrepresentation.schema.js new file mode 100644 index 00000000..19453e38 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancepolymerrepeatrepeatunitstructuralrepresentation.schema.js @@ -0,0 +1,48 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstancePolymerrepeatrepeatUnitstructuralRepresentation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstancePolymerrepeatrepeatUnitstructuralRepresentation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + _representation: { + type: require('./element.schema.js'), + description: 'Todo.', + }, + representation: { + type: GraphQLString, + description: 'Todo.', + }, + attachment: { + type: require('./attachment.schema.js'), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substanceprotein.schema.js b/src/resources/4_0_0/schemas/substanceprotein.schema.js new file mode 100644 index 00000000..e43942f8 --- /dev/null +++ b/src/resources/4_0_0/schemas/substanceprotein.schema.js @@ -0,0 +1,116 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLInt, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceProtein Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceProtein', + description: + 'A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceProtein_Enum_schema', + values: { SubstanceProtein: { value: 'SubstanceProtein' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + sequenceType: { + type: require('./codeableconcept.schema.js'), + description: + 'The SubstanceProtein descriptive elements will only be used when a complete or partial amino acid sequence is available or derivable from a nucleic acid sequence.', + }, + _numberOfSubunits: { + type: require('./element.schema.js'), + description: + 'Number of linear sequences of amino acids linked through peptide bonds. The number of subunits constituting the SubstanceProtein shall be described. It is possible that the number of subunits can be variable.', + }, + numberOfSubunits: { + type: GraphQLInt, + description: + 'Number of linear sequences of amino acids linked through peptide bonds. The number of subunits constituting the SubstanceProtein shall be described. It is possible that the number of subunits can be variable.', + }, + _disulfideLinkage: { + type: require('./element.schema.js'), + description: + 'The disulphide bond between two cysteine residues either on the same subunit or on two different subunits shall be described. The position of the disulfide bonds in the SubstanceProtein shall be listed in increasing order of subunit number and position within subunit followed by the abbreviation of the amino acids involved. The disulfide linkage positions shall actually contain the amino acid Cysteine at the respective positions.', + }, + disulfideLinkage: { + type: new GraphQLList(GraphQLString), + description: + 'The disulphide bond between two cysteine residues either on the same subunit or on two different subunits shall be described. The position of the disulfide bonds in the SubstanceProtein shall be listed in increasing order of subunit number and position within subunit followed by the abbreviation of the amino acids involved. The disulfide linkage positions shall actually contain the amino acid Cysteine at the respective positions.', + }, + subunit: { + type: new GraphQLList(require('./substanceproteinsubunit.schema.js')), + description: + 'This subclause refers to the description of each subunit constituting the SubstanceProtein. A subunit is a linear sequence of amino acids linked through peptide bonds. The Subunit information shall be provided when the finished SubstanceProtein is a complex of multiple sequences; subunits are not used to delineate domains within a single sequence. Subunits are listed in order of decreasing length; sequences of the same length will be ordered by decreasing molecular weight; subunits that have identical sequences will be repeated multiple times.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substanceproteinsubunit.schema.js b/src/resources/4_0_0/schemas/substanceproteinsubunit.schema.js new file mode 100644 index 00000000..02263383 --- /dev/null +++ b/src/resources/4_0_0/schemas/substanceproteinsubunit.schema.js @@ -0,0 +1,100 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceProteinsubunit Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceProteinsubunit', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _subunit: { + type: require('./element.schema.js'), + description: + 'Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.', + }, + subunit: { + type: GraphQLInt, + description: + 'Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.', + }, + _sequence: { + type: require('./element.schema.js'), + description: + 'The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.', + }, + sequence: { + type: GraphQLString, + description: + 'The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.', + }, + _length: { + type: require('./element.schema.js'), + description: + 'Length of linear sequences of amino acids contained in the subunit.', + }, + length: { + type: GraphQLInt, + description: + 'Length of linear sequences of amino acids contained in the subunit.', + }, + sequenceAttachment: { + type: require('./attachment.schema.js'), + description: + 'The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence.', + }, + nTerminalModificationId: { + type: require('./identifier.schema.js'), + description: + 'Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID.', + }, + _nTerminalModification: { + type: require('./element.schema.js'), + description: + 'The name of the fragment modified at the N-terminal of the SubstanceProtein shall be specified.', + }, + nTerminalModification: { + type: GraphQLString, + description: + 'The name of the fragment modified at the N-terminal of the SubstanceProtein shall be specified.', + }, + cTerminalModificationId: { + type: require('./identifier.schema.js'), + description: + 'Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID.', + }, + _cTerminalModification: { + type: require('./element.schema.js'), + description: 'The modification at the C-terminal shall be specified.', + }, + cTerminalModification: { + type: GraphQLString, + description: 'The modification at the C-terminal shall be specified.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancereferenceinformation.schema.js b/src/resources/4_0_0/schemas/substancereferenceinformation.schema.js new file mode 100644 index 00000000..d587ded1 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancereferenceinformation.schema.js @@ -0,0 +1,120 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceReferenceInformation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceReferenceInformation', + description: 'Todo.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceReferenceInformation_Enum_schema', + values: { + SubstanceReferenceInformation: { + value: 'SubstanceReferenceInformation', + }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _comment: { + type: require('./element.schema.js'), + description: 'Todo.', + }, + comment: { + type: GraphQLString, + description: 'Todo.', + }, + gene: { + type: new GraphQLList( + require('./substancereferenceinformationgene.schema.js'), + ), + description: 'Todo.', + }, + geneElement: { + type: new GraphQLList( + require('./substancereferenceinformationgeneelement.schema.js'), + ), + description: 'Todo.', + }, + classification: { + type: new GraphQLList( + require('./substancereferenceinformationclassification.schema.js'), + ), + description: 'Todo.', + }, + target: { + type: new GraphQLList( + require('./substancereferenceinformationtarget.schema.js'), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancereferenceinformationclassification.schema.js b/src/resources/4_0_0/schemas/substancereferenceinformationclassification.schema.js new file mode 100644 index 00000000..5586b2e9 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancereferenceinformationclassification.schema.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceReferenceInformationclassification Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceReferenceInformationclassification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + domain: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + classification: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + subtype: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Todo.', + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: + 'SubstanceReferenceInformationclassificationsource_source_Union', + description: 'Todo.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancereferenceinformationgene.schema.js b/src/resources/4_0_0/schemas/substancereferenceinformationgene.schema.js new file mode 100644 index 00000000..e16c48d0 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancereferenceinformationgene.schema.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceReferenceInformationgene Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceReferenceInformationgene', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + geneSequenceOrigin: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + gene: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SubstanceReferenceInformationgenesource_source_Union', + description: 'Todo.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancereferenceinformationgeneelement.schema.js b/src/resources/4_0_0/schemas/substancereferenceinformationgeneelement.schema.js new file mode 100644 index 00000000..d5302041 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancereferenceinformationgeneelement.schema.js @@ -0,0 +1,60 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceReferenceInformationgeneElement Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceReferenceInformationgeneElement', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + element: { + type: require('./identifier.schema.js'), + description: 'Todo.', + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SubstanceReferenceInformationgeneElementsource_source_Union', + description: 'Todo.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancereferenceinformationtarget.schema.js b/src/resources/4_0_0/schemas/substancereferenceinformationtarget.schema.js new file mode 100644 index 00000000..4791b3e7 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancereferenceinformationtarget.schema.js @@ -0,0 +1,92 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceReferenceInformationtarget Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceReferenceInformationtarget', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + target: { + type: require('./identifier.schema.js'), + description: 'Todo.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + interaction: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + organism: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + organismType: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + amountQuantity: { + type: require('./quantity.schema.js'), + description: 'Todo.', + }, + amountRange: { + type: require('./range.schema.js'), + description: 'Todo.', + }, + _amountString: { + type: require('./element.schema.js'), + description: 'Todo.', + }, + amountString: { + type: GraphQLString, + description: 'Todo.', + }, + amountType: { + type: require('./codeableconcept.schema.js'), + description: 'Todo.', + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SubstanceReferenceInformationtargetsource_source_Union', + description: 'Todo.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Todo.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancesourcematerial.schema.js b/src/resources/4_0_0/schemas/substancesourcematerial.schema.js new file mode 100644 index 00000000..1acd8336 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancesourcematerial.schema.js @@ -0,0 +1,169 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceSourceMaterial Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSourceMaterial', + description: + 'Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceSourceMaterial_Enum_schema', + values: { + SubstanceSourceMaterial: { value: 'SubstanceSourceMaterial' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + sourceMaterialClass: { + type: require('./codeableconcept.schema.js'), + description: + 'General high level classification of the source material specific to the origin of the material.', + }, + sourceMaterialType: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent.', + }, + sourceMaterialState: { + type: require('./codeableconcept.schema.js'), + description: 'The state of the source material when extracted.', + }, + organismId: { + type: require('./identifier.schema.js'), + description: + 'The unique identifier associated with the source material parent organism shall be specified.', + }, + _organismName: { + type: require('./element.schema.js'), + description: + 'The organism accepted Scientific name shall be provided based on the organism taxonomy.', + }, + organismName: { + type: GraphQLString, + description: + 'The organism accepted Scientific name shall be provided based on the organism taxonomy.', + }, + parentSubstanceId: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant).', + }, + _parentSubstanceName: { + type: require('./element.schema.js'), + description: + 'The parent substance of the Herbal Drug, or Herbal preparation.', + }, + parentSubstanceName: { + type: new GraphQLList(GraphQLString), + description: + 'The parent substance of the Herbal Drug, or Herbal preparation.', + }, + countryOfOrigin: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate.', + }, + _geographicalLocation: { + type: require('./element.schema.js'), + description: + 'The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.', + }, + geographicalLocation: { + type: new GraphQLList(GraphQLString), + description: + 'The place/region where the plant is harvested or the places/regions where the animal source material has its habitat.', + }, + developmentStage: { + type: require('./codeableconcept.schema.js'), + description: + 'Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum).', + }, + fractionDescription: { + type: new GraphQLList( + require('./substancesourcematerialfractiondescription.schema.js'), + ), + description: + 'Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels.', + }, + organism: { + type: require('./substancesourcematerialorganism.schema.js'), + description: + 'This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf.', + }, + partDescription: { + type: new GraphQLList( + require('./substancesourcematerialpartdescription.schema.js'), + ), + description: 'To do.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancesourcematerialfractiondescription.schema.js b/src/resources/4_0_0/schemas/substancesourcematerialfractiondescription.schema.js new file mode 100644 index 00000000..cf35cb7a --- /dev/null +++ b/src/resources/4_0_0/schemas/substancesourcematerialfractiondescription.schema.js @@ -0,0 +1,47 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialfractionDescription Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSourceMaterialfractionDescription', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _fraction: { + type: require('./element.schema.js'), + description: + 'This element is capturing information about the fraction of a plant part, or human plasma for fractionation.', + }, + fraction: { + type: GraphQLString, + description: + 'This element is capturing information about the fraction of a plant part, or human plasma for fractionation.', + }, + materialType: { + type: require('./codeableconcept.schema.js'), + description: + 'The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancesourcematerialorganism.schema.js b/src/resources/4_0_0/schemas/substancesourcematerialorganism.schema.js new file mode 100644 index 00000000..f9045d58 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancesourcematerialorganism.schema.js @@ -0,0 +1,74 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialorganism Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSourceMaterialorganism', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + family: { + type: require('./codeableconcept.schema.js'), + description: 'The family of an organism shall be specified.', + }, + genus: { + type: require('./codeableconcept.schema.js'), + description: + 'The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies.', + }, + species: { + type: require('./codeableconcept.schema.js'), + description: + 'The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies.', + }, + intraspecificType: { + type: require('./codeableconcept.schema.js'), + description: 'The Intraspecific type of an organism shall be specified.', + }, + _intraspecificDescription: { + type: require('./element.schema.js'), + description: + 'The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.', + }, + intraspecificDescription: { + type: GraphQLString, + description: + 'The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention.', + }, + author: { + type: new GraphQLList( + require('./substancesourcematerialorganismauthor.schema.js'), + ), + description: '4.9.13.6.1 Author type (Conditional).', + }, + hybrid: { + type: require('./substancesourcematerialorganismhybrid.schema.js'), + description: '4.9.13.8.1 Hybrid species maternal organism ID (Optional).', + }, + organismGeneral: { + type: require('./substancesourcematerialorganismorganismgeneral.schema.js'), + description: '4.9.13.7.1 Kingdom (Conditional).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancesourcematerialorganismauthor.schema.js b/src/resources/4_0_0/schemas/substancesourcematerialorganismauthor.schema.js new file mode 100644 index 00000000..ff929437 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancesourcematerialorganismauthor.schema.js @@ -0,0 +1,47 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialorganismauthor Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSourceMaterialorganismauthor', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + authorType: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name.', + }, + _authorDescription: { + type: require('./element.schema.js'), + description: + 'The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).', + }, + authorDescription: { + type: GraphQLString, + description: + 'The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancesourcematerialorganismhybrid.schema.js b/src/resources/4_0_0/schemas/substancesourcematerialorganismhybrid.schema.js new file mode 100644 index 00000000..e62dc15b --- /dev/null +++ b/src/resources/4_0_0/schemas/substancesourcematerialorganismhybrid.schema.js @@ -0,0 +1,76 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialorganismhybrid Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSourceMaterialorganismhybrid', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _maternalOrganismId: { + type: require('./element.schema.js'), + description: + 'The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.', + }, + maternalOrganismId: { + type: GraphQLString, + description: + 'The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.', + }, + _maternalOrganismName: { + type: require('./element.schema.js'), + description: + 'The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.', + }, + maternalOrganismName: { + type: GraphQLString, + description: + 'The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal.', + }, + _paternalOrganismId: { + type: require('./element.schema.js'), + description: + 'The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.', + }, + paternalOrganismId: { + type: GraphQLString, + description: + 'The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary.', + }, + _paternalOrganismName: { + type: require('./element.schema.js'), + description: + 'The name of the paternal species constituting the hybrid organism shall be specified.', + }, + paternalOrganismName: { + type: GraphQLString, + description: + 'The name of the paternal species constituting the hybrid organism shall be specified.', + }, + hybridType: { + type: require('./codeableconcept.schema.js'), + description: 'The hybrid type of an organism shall be specified.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancesourcematerialorganismorganismgeneral.schema.js b/src/resources/4_0_0/schemas/substancesourcematerialorganismorganismgeneral.schema.js new file mode 100644 index 00000000..12caae52 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancesourcematerialorganismorganismgeneral.schema.js @@ -0,0 +1,48 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialorganismorganismGeneral Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSourceMaterialorganismorganismGeneral', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + kingdom: { + type: require('./codeableconcept.schema.js'), + description: 'The kingdom of an organism shall be specified.', + }, + phylum: { + type: require('./codeableconcept.schema.js'), + description: 'The phylum of an organism shall be specified.', + }, + class: { + type: require('./codeableconcept.schema.js'), + description: 'The class of an organism shall be specified.', + }, + order: { + type: require('./codeableconcept.schema.js'), + description: 'The order of an organism shall be specified,.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancesourcematerialpartdescription.schema.js b/src/resources/4_0_0/schemas/substancesourcematerialpartdescription.schema.js new file mode 100644 index 00000000..09b68533 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancesourcematerialpartdescription.schema.js @@ -0,0 +1,42 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSourceMaterialpartDescription Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSourceMaterialpartDescription', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + part: { + type: require('./codeableconcept.schema.js'), + description: + 'Entity of anatomical origin of source material within an organism.', + }, + partLocation: { + type: require('./codeableconcept.schema.js'), + description: + 'The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecification.schema.js b/src/resources/4_0_0/schemas/substancespecification.schema.js new file mode 100644 index 00000000..0f89a68c --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecification.schema.js @@ -0,0 +1,233 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary SubstanceSpecification Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecification', + description: + 'The detailed description of a substance, typically at a level beyond what is used for prescribing.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SubstanceSpecification_Enum_schema', + values: { + SubstanceSpecification: { value: 'SubstanceSpecification' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Identifier by which this substance is known.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'High level categorization, e.g. polymer or nucleic acid.', + }, + status: { + type: require('./codeableconcept.schema.js'), + description: 'Status of substance within the catalogue e.g. approved.', + }, + domain: { + type: require('./codeableconcept.schema.js'), + description: 'If the substance applies to only human or veterinary use.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Textual description of the substance.', + }, + description: { + type: GraphQLString, + description: 'Textual description of the substance.', + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SubstanceSpecificationsource_source_Union', + description: 'Supporting literature.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Supporting literature.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Textual comment about this record of a substance.', + }, + comment: { + type: GraphQLString, + description: 'Textual comment about this record of a substance.', + }, + moiety: { + type: new GraphQLList( + require('./substancespecificationmoiety.schema.js'), + ), + description: 'Moiety, for structural modifications.', + }, + property: { + type: new GraphQLList( + require('./substancespecificationproperty.schema.js'), + ), + description: + 'General specifications for this substance, including how it is related to other substances.', + }, + referenceInformation: { + type: new GraphQLUnionType({ + name: + 'SubstanceSpecificationreferenceInformation_referenceInformation_Union', + description: 'General information detailing this substance.', + types: () => [require('./substancereferenceinformation.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SubstanceReferenceInformation') { + return require('./substancereferenceinformation.schema.js'); + } + }, + }), + description: 'General information detailing this substance.', + }, + structure: { + type: require('./substancespecificationstructure.schema.js'), + description: 'Structural information.', + }, + code: { + type: new GraphQLList(require('./substancespecificationcode.schema.js')), + description: 'Codes associated with the substance.', + }, + name: { + type: new GraphQLList(require('./substancespecificationname.schema.js')), + description: 'Names applicable to this substance.', + }, + relationship: { + type: new GraphQLList( + require('./substancespecificationrelationship.schema.js'), + ), + description: + 'A link between this substance and another, with details of the relationship.', + }, + nucleicAcid: { + type: new GraphQLUnionType({ + name: 'SubstanceSpecificationnucleicAcid_nucleicAcid_Union', + description: 'Data items specific to nucleic acids.', + types: () => [require('./substancenucleicacid.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SubstanceNucleicAcid') { + return require('./substancenucleicacid.schema.js'); + } + }, + }), + description: 'Data items specific to nucleic acids.', + }, + polymer: { + type: new GraphQLUnionType({ + name: 'SubstanceSpecificationpolymer_polymer_Union', + description: 'Data items specific to polymers.', + types: () => [require('./substancepolymer.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SubstancePolymer') { + return require('./substancepolymer.schema.js'); + } + }, + }), + description: 'Data items specific to polymers.', + }, + protein: { + type: new GraphQLUnionType({ + name: 'SubstanceSpecificationprotein_protein_Union', + description: 'Data items specific to proteins.', + types: () => [require('./substanceprotein.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SubstanceProtein') { + return require('./substanceprotein.schema.js'); + } + }, + }), + description: 'Data items specific to proteins.', + }, + sourceMaterial: { + type: new GraphQLUnionType({ + name: 'SubstanceSpecificationsourceMaterial_sourceMaterial_Union', + description: + 'Material or taxonomic/anatomical source for the substance.', + types: () => [require('./substancesourcematerial.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SubstanceSourceMaterial') { + return require('./substancesourcematerial.schema.js'); + } + }, + }), + description: 'Material or taxonomic/anatomical source for the substance.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationcode.schema.js b/src/resources/4_0_0/schemas/substancespecificationcode.schema.js new file mode 100644 index 00000000..9f66a860 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationcode.schema.js @@ -0,0 +1,79 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SubstanceSpecificationcode Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationcode', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'The specific code.', + }, + status: { + type: require('./codeableconcept.schema.js'), + description: 'Status of the code assignment.', + }, + _statusDate: { + type: require('./element.schema.js'), + description: + 'The date at which the code status is changed as part of the terminology maintenance.', + }, + statusDate: { + type: DateTimeScalar, + description: + 'The date at which the code status is changed as part of the terminology maintenance.', + }, + _comment: { + type: require('./element.schema.js'), + description: 'Any comment can be provided in this field, if necessary.', + }, + comment: { + type: GraphQLString, + description: 'Any comment can be provided in this field, if necessary.', + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SubstanceSpecificationcodesource_source_Union', + description: 'Supporting literature.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Supporting literature.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationmoiety.schema.js b/src/resources/4_0_0/schemas/substancespecificationmoiety.schema.js new file mode 100644 index 00000000..5eca145e --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationmoiety.schema.js @@ -0,0 +1,76 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationmoiety Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationmoiety', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + role: { + type: require('./codeableconcept.schema.js'), + description: 'Role that the moiety is playing.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Identifier by which this moiety substance is known.', + }, + _name: { + type: require('./element.schema.js'), + description: 'Textual name for this moiety substance.', + }, + name: { + type: GraphQLString, + description: 'Textual name for this moiety substance.', + }, + stereochemistry: { + type: require('./codeableconcept.schema.js'), + description: 'Stereochemistry type.', + }, + opticalActivity: { + type: require('./codeableconcept.schema.js'), + description: 'Optical activity type.', + }, + _molecularFormula: { + type: require('./element.schema.js'), + description: 'Molecular formula.', + }, + molecularFormula: { + type: GraphQLString, + description: 'Molecular formula.', + }, + amountQuantity: { + type: require('./quantity.schema.js'), + description: 'Quantitative value for this moiety.', + }, + _amountString: { + type: require('./element.schema.js'), + description: 'Quantitative value for this moiety.', + }, + amountString: { + type: GraphQLString, + description: 'Quantitative value for this moiety.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationname.schema.js b/src/resources/4_0_0/schemas/substancespecificationname.schema.js new file mode 100644 index 00000000..50d8da4d --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationname.schema.js @@ -0,0 +1,97 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationname Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationname', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'The actual name.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'The actual name.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: 'Name type.', + }, + status: { + type: require('./codeableconcept.schema.js'), + description: 'The status of the name.', + }, + _preferred: { + type: require('./element.schema.js'), + description: 'If this is the preferred name for this substance.', + }, + preferred: { + type: GraphQLBoolean, + description: 'If this is the preferred name for this substance.', + }, + language: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'Language of the name.', + }, + domain: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The jurisdiction where this name applies.', + }, + official: { + type: new GraphQLList( + require('./substancespecificationnameofficial.schema.js'), + ), + description: 'Details of the official nature of this name.', + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SubstanceSpecificationnamesource_source_Union', + description: 'Supporting literature.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Supporting literature.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationnameofficial.schema.js b/src/resources/4_0_0/schemas/substancespecificationnameofficial.schema.js new file mode 100644 index 00000000..1f1fd889 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationnameofficial.schema.js @@ -0,0 +1,49 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SubstanceSpecificationnameofficial Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationnameofficial', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + authority: { + type: require('./codeableconcept.schema.js'), + description: 'Which authority uses this official name.', + }, + status: { + type: require('./codeableconcept.schema.js'), + description: 'The status of the official name.', + }, + _date: { + type: require('./element.schema.js'), + description: 'Date of official name change.', + }, + date: { + type: DateTimeScalar, + description: 'Date of official name change.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationproperty.schema.js b/src/resources/4_0_0/schemas/substancespecificationproperty.schema.js new file mode 100644 index 00000000..9e764e8d --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationproperty.schema.js @@ -0,0 +1,95 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationproperty Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationproperty', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'A category for this property, e.g. Physical, Chemical, Enzymatic.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: 'Property type e.g. viscosity, pH, isoelectric point.', + }, + _parameters: { + type: require('./element.schema.js'), + description: + 'Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1).', + }, + parameters: { + type: GraphQLString, + description: + 'Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1).', + }, + definingSubstanceReference: { + type: new GraphQLUnionType({ + name: + 'SubstanceSpecificationpropertydefiningSubstanceReference_definingSubstanceReference_Union', + description: + 'A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol).', + types: () => [ + require('./substancespecification.schema.js'), + require('./substance.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'SubstanceSpecification') { + return require('./substancespecification.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + }, + }), + description: + 'A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol).', + }, + definingSubstanceCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol).', + }, + amountQuantity: { + type: require('./quantity.schema.js'), + description: 'Quantitative value for this property.', + }, + _amountString: { + type: require('./element.schema.js'), + description: 'Quantitative value for this property.', + }, + amountString: { + type: GraphQLString, + description: 'Quantitative value for this property.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationrelationship.schema.js b/src/resources/4_0_0/schemas/substancespecificationrelationship.schema.js new file mode 100644 index 00000000..d287c670 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationrelationship.schema.js @@ -0,0 +1,123 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationrelationship Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationrelationship', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + substanceReference: { + type: new GraphQLUnionType({ + name: + 'SubstanceSpecificationrelationshipsubstanceReference_substanceReference_Union', + description: + 'A pointer to another substance, as a resource or just a representational code.', + types: () => [require('./substancespecification.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SubstanceSpecification') { + return require('./substancespecification.schema.js'); + } + }, + }), + description: + 'A pointer to another substance, as a resource or just a representational code.', + }, + substanceCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'A pointer to another substance, as a resource or just a representational code.', + }, + relationship: { + type: require('./codeableconcept.schema.js'), + description: + "For example 'salt to parent', 'active moiety', 'starting material'.", + }, + _isDefining: { + type: require('./element.schema.js'), + description: + 'For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.', + }, + isDefining: { + type: GraphQLBoolean, + description: + 'For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.', + }, + amountQuantity: { + type: require('./quantity.schema.js'), + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + amountRange: { + type: require('./range.schema.js'), + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + amountRatio: { + type: require('./ratio.schema.js'), + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + _amountString: { + type: require('./element.schema.js'), + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + amountString: { + type: GraphQLString, + description: + 'A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.', + }, + amountRatioLowLimit: { + type: require('./ratio.schema.js'), + description: 'For use when the numeric.', + }, + amountType: { + type: require('./codeableconcept.schema.js'), + description: + "An operator for the amount, for example 'average', 'approximately', 'less than'.", + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SubstanceSpecificationrelationshipsource_source_Union', + description: 'Supporting literature.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Supporting literature.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationstructure.schema.js b/src/resources/4_0_0/schemas/substancespecificationstructure.schema.js new file mode 100644 index 00000000..b877787f --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationstructure.schema.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationstructure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationstructure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + stereochemistry: { + type: require('./codeableconcept.schema.js'), + description: 'Stereochemistry type.', + }, + opticalActivity: { + type: require('./codeableconcept.schema.js'), + description: 'Optical activity type.', + }, + _molecularFormula: { + type: require('./element.schema.js'), + description: 'Molecular formula.', + }, + molecularFormula: { + type: GraphQLString, + description: 'Molecular formula.', + }, + _molecularFormulaByMoiety: { + type: require('./element.schema.js'), + description: + 'Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot.', + }, + molecularFormulaByMoiety: { + type: GraphQLString, + description: + 'Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot.', + }, + isotope: { + type: new GraphQLList( + require('./substancespecificationstructureisotope.schema.js'), + ), + description: + 'Applicable for single substances that contain a radionuclide or a non-natural isotopic ratio.', + }, + source: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SubstanceSpecificationstructuresource_source_Union', + description: 'Supporting literature.', + types: () => [require('./documentreference.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'Supporting literature.', + }, + representation: { + type: new GraphQLList( + require('./substancespecificationstructurerepresentation.schema.js'), + ), + description: 'Molecular structural representation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationstructureisotope.schema.js b/src/resources/4_0_0/schemas/substancespecificationstructureisotope.schema.js new file mode 100644 index 00000000..432e42b5 --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationstructureisotope.schema.js @@ -0,0 +1,54 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationstructureisotope Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationstructureisotope', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: 'Substance identifier for each non-natural or radioisotope.', + }, + name: { + type: require('./codeableconcept.schema.js'), + description: 'Substance name for each non-natural or radioisotope.', + }, + substitution: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of isotopic substitution present in a single substance.', + }, + halfLife: { + type: require('./quantity.schema.js'), + description: 'Half life - for a non-natural nuclide.', + }, + molecularWeight: { + type: require('./substancespecificationstructureisotopemolecularweight.schema.js'), + description: + 'The molecular weight or weight range (for proteins, polymers or nucleic acids).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationstructureisotopemolecularweight.schema.js b/src/resources/4_0_0/schemas/substancespecificationstructureisotopemolecularweight.schema.js new file mode 100644 index 00000000..622ecfab --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationstructureisotopemolecularweight.schema.js @@ -0,0 +1,46 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationstructureisotopemolecularWeight Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationstructureisotopemolecularWeight', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + method: { + type: require('./codeableconcept.schema.js'), + description: 'The method by which the molecular weight was determined.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Type of molecular weight such as exact, average (also known as. number average), weight average.', + }, + amount: { + type: require('./quantity.schema.js'), + description: + 'Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/substancespecificationstructurerepresentation.schema.js b/src/resources/4_0_0/schemas/substancespecificationstructurerepresentation.schema.js new file mode 100644 index 00000000..1024d3fd --- /dev/null +++ b/src/resources/4_0_0/schemas/substancespecificationstructurerepresentation.schema.js @@ -0,0 +1,51 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary SubstanceSpecificationstructurerepresentation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SubstanceSpecificationstructurerepresentation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'The type of structure (e.g. Full, Partial, Representative).', + }, + _representation: { + type: require('./element.schema.js'), + description: + 'The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX.', + }, + representation: { + type: GraphQLString, + description: + 'The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX.', + }, + attachment: { + type: require('./attachment.schema.js'), + description: 'An attached file with the structural representation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/supplydelivery.schema.js b/src/resources/4_0_0/schemas/supplydelivery.schema.js new file mode 100644 index 00000000..99f592fb --- /dev/null +++ b/src/resources/4_0_0/schemas/supplydelivery.schema.js @@ -0,0 +1,238 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SupplyDelivery Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SupplyDelivery', + description: 'Record of delivery of what is supplied.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyDelivery_Enum_schema', + values: { SupplyDelivery: { value: 'SupplyDelivery' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Identifier for the supply delivery event that is used to identify it across multiple disparate systems.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyDeliverybasedOn_basedOn_Union', + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + types: () => [require('./supplyrequest.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'SupplyRequest') { + return require('./supplyrequest.schema.js'); + } + }, + }), + ), + description: + 'A plan, proposal or order that is fulfilled in whole or in part by this event.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyDeliverypartOf_partOf_Union', + description: + 'A larger event of which this particular event is a component or step.', + types: () => [ + require('./supplydelivery.schema.js'), + require('./contract.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'SupplyDelivery') { + return require('./supplydelivery.schema.js'); + } + if (data && data.resourceType === 'Contract') { + return require('./contract.schema.js'); + } + }, + }), + ), + description: + 'A larger event of which this particular event is a component or step.', + }, + _status: { + type: require('./element.schema.js'), + description: 'A code specifying the state of the dispense event.', + }, + status: { + type: CodeScalar, + description: 'A code specifying the state of the dispense event.', + }, + patient: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverypatient_patient_Union', + description: + 'A link to a resource representing the person whom the delivered item is for.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: + 'A link to a resource representing the person whom the delivered item is for.', + }, + type: { + type: require('./codeableconcept.schema.js'), + description: + 'Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.', + }, + suppliedItem: { + type: require('./supplydeliverysupplieditem.schema.js'), + description: 'The item that is being delivered or has been supplied.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'The date or time(s) the activity occurred.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'The date or time(s) the activity occurred.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'The date or time(s) the activity occurred.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: 'The date or time(s) the activity occurred.', + }, + supplier: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverysupplier_supplier_Union', + description: + 'The individual responsible for dispensing the medication, supplier or device.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: + 'The individual responsible for dispensing the medication, supplier or device.', + }, + destination: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverydestination_destination_Union', + description: + 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Identification of the facility/location where the Supply was shipped to, as part of the dispense event.', + }, + receiver: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyDeliveryreceiver_receiver_Union', + description: 'Identifies the person who picked up the Supply.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + ), + description: 'Identifies the person who picked up the Supply.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/supplydeliverysupplieditem.schema.js b/src/resources/4_0_0/schemas/supplydeliverysupplieditem.schema.js new file mode 100644 index 00000000..447ddbc9 --- /dev/null +++ b/src/resources/4_0_0/schemas/supplydeliverysupplieditem.schema.js @@ -0,0 +1,72 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SupplyDeliverysuppliedItem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SupplyDeliverysuppliedItem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + quantity: { + type: require('./quantity.schema.js'), + description: + 'The amount of supply that has been dispensed. Includes unit of measure.', + }, + itemCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + itemReference: { + type: new GraphQLUnionType({ + name: 'SupplyDeliverysuppliedItemitemReference_itemReference_Union', + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: + 'Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/supplyrequest.schema.js b/src/resources/4_0_0/schemas/supplyrequest.schema.js new file mode 100644 index 00000000..1abbb4e9 --- /dev/null +++ b/src/resources/4_0_0/schemas/supplyrequest.schema.js @@ -0,0 +1,310 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary SupplyRequest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SupplyRequest', + description: + 'A record of a request for a medication, substance or device used in the healthcare setting.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'SupplyRequest_Enum_schema', + values: { SupplyRequest: { value: 'SupplyRequest' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.', + }, + _status: { + type: require('./element.schema.js'), + description: 'Status of the supply request.', + }, + status: { + type: CodeScalar, + description: 'Status of the supply request.', + }, + category: { + type: require('./codeableconcept.schema.js'), + description: + 'Category of supply, e.g. central, non-stock, etc. This is used to support work flows associated with the supply process.', + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly this SupplyRequest should be addressed with respect to other requests.', + }, + itemCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + itemReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'SupplyRequestitemReference_itemReference_Union', + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + types: () => [ + require('./medication.schema.js'), + require('./substance.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Medication') { + return require('./medication.schema.js'); + } + if (data && data.resourceType === 'Substance') { + return require('./substance.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + ), + description: + 'The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.', + }, + quantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'The amount that is being ordered of the indicated item.', + }, + parameter: { + type: new GraphQLList(require('./supplyrequestparameter.schema.js')), + description: + 'Specific parameters for the ordered item. For example, the size of the indicated item.', + }, + _occurrenceDateTime: { + type: require('./element.schema.js'), + description: 'When the request should be fulfilled.', + }, + occurrenceDateTime: { + type: DateTimeScalar, + description: 'When the request should be fulfilled.', + }, + occurrencePeriod: { + type: require('./period.schema.js'), + description: 'When the request should be fulfilled.', + }, + occurrenceTiming: { + type: require('./timing.schema.js'), + description: 'When the request should be fulfilled.', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'When the request was made.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'When the request was made.', + }, + requester: { + type: new GraphQLUnionType({ + name: 'SupplyRequestrequester_requester_Union', + description: + 'The device, practitioner, etc. who initiated the request.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./relatedperson.schema.js'), + require('./device.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + }, + }), + description: 'The device, practitioner, etc. who initiated the request.', + }, + supplier: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyRequestsupplier_supplier_Union', + description: 'Who is intended to fulfill the request.', + types: () => [ + require('./organization.schema.js'), + require('./healthcareservice.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + }, + }), + ), + description: 'Who is intended to fulfill the request.', + }, + reasonCode: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The reason why the supply item was requested.', + }, + reasonReference: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'SupplyRequestreasonReference_reasonReference_Union', + description: 'The reason why the supply item was requested.', + types: () => [ + require('./condition.schema.js'), + require('./observation.schema.js'), + require('./diagnosticreport.schema.js'), + require('./documentreference.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Condition') { + return require('./condition.schema.js'); + } + if (data && data.resourceType === 'Observation') { + return require('./observation.schema.js'); + } + if (data && data.resourceType === 'DiagnosticReport') { + return require('./diagnosticreport.schema.js'); + } + if (data && data.resourceType === 'DocumentReference') { + return require('./documentreference.schema.js'); + } + }, + }), + ), + description: 'The reason why the supply item was requested.', + }, + deliverFrom: { + type: new GraphQLUnionType({ + name: 'SupplyRequestdeliverFrom_deliverFrom_Union', + description: 'Where the supply is expected to come from.', + types: () => [ + require('./organization.schema.js'), + require('./location.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: 'Where the supply is expected to come from.', + }, + deliverTo: { + type: new GraphQLUnionType({ + name: 'SupplyRequestdeliverTo_deliverTo_Union', + description: 'Where the supply is destined to go.', + types: () => [ + require('./organization.schema.js'), + require('./location.schema.js'), + require('./patient.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + description: 'Where the supply is destined to go.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/supplyrequestparameter.schema.js b/src/resources/4_0_0/schemas/supplyrequestparameter.schema.js new file mode 100644 index 00000000..5533cfa3 --- /dev/null +++ b/src/resources/4_0_0/schemas/supplyrequestparameter.schema.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary SupplyRequestparameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'SupplyRequestparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code or string that identifies the device detail being asserted.', + }, + valueCodeableConcept: { + type: require('./codeableconcept.schema.js'), + description: 'The value of the device detail.', + }, + valueQuantity: { + type: require('./quantity.schema.js'), + description: 'The value of the device detail.', + }, + valueRange: { + type: require('./range.schema.js'), + description: 'The value of the device detail.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the device detail.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the device detail.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/task.schema.js b/src/resources/4_0_0/schemas/task.schema.js new file mode 100644 index 00000000..b05e9cb4 --- /dev/null +++ b/src/resources/4_0_0/schemas/task.schema.js @@ -0,0 +1,441 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Task Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Task', + description: 'A task to be performed.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'Task_Enum_schema', + values: { Task: { value: 'Task' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'The business identifier for this task.', + }, + _instantiatesCanonical: { + type: require('./element.schema.js'), + description: + 'The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.', + }, + instantiatesCanonical: { + type: CanonicalScalar, + description: + 'The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.', + }, + _instantiatesUri: { + type: require('./element.schema.js'), + description: + 'The URL pointing to an *externally* maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.', + }, + instantiatesUri: { + type: UriScalar, + description: + 'The URL pointing to an *externally* maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task.', + }, + basedOn: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TaskbasedOn_basedOn_Union', + description: + "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a 'request' resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the 'request' resource the task is seeking to fulfill. This latter resource is referenced by FocusOn. For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: + "BasedOn refers to a higher-level authorization that triggered the creation of the task. It references a 'request' resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the 'request' resource the task is seeking to fulfill. This latter resource is referenced by FocusOn. For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient.", + }, + groupIdentifier: { + type: require('./identifier.schema.js'), + description: + 'An identifier that links together multiple tasks and other requests that were created in the same context.', + }, + partOf: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TaskpartOf_partOf_Union', + description: 'Task that this particular task is part of.', + types: () => [require('./task.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Task') { + return require('./task.schema.js'); + } + }, + }), + ), + description: 'Task that this particular task is part of.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current status of the task.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current status of the task.', + }, + statusReason: { + type: require('./codeableconcept.schema.js'), + description: + 'An explanation as to why this task is held, failed, was refused, etc.', + }, + businessStatus: { + type: require('./codeableconcept.schema.js'), + description: 'Contains business-specific nuances of the business state.', + }, + _intent: { + type: require('./element.schema.js'), + description: + "Indicates the 'level' of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.", + }, + intent: { + type: new GraphQLNonNull(CodeScalar), + description: + "Indicates the 'level' of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.", + }, + _priority: { + type: require('./element.schema.js'), + description: + 'Indicates how quickly the Task should be addressed with respect to other requests.', + }, + priority: { + type: CodeScalar, + description: + 'Indicates how quickly the Task should be addressed with respect to other requests.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A name or code (or both) briefly describing what the task involves.', + }, + _description: { + type: require('./element.schema.js'), + description: 'A free-text description of what is to be performed.', + }, + description: { + type: GraphQLString, + description: 'A free-text description of what is to be performed.', + }, + focus: { + type: new GraphQLUnionType({ + name: 'Taskfocus_focus_Union', + description: + 'The request being actioned or the resource being manipulated by this task.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The request being actioned or the resource being manipulated by this task.', + }, + for: { + type: new GraphQLUnionType({ + name: 'Taskfor_for_Union', + description: + 'The entity who benefits from the performance of the service specified in the task (e.g., the patient).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'The entity who benefits from the performance of the service specified in the task (e.g., the patient).', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'Taskencounter_encounter_Union', + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.', + }, + executionPeriod: { + type: require('./period.schema.js'), + description: + 'Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end).', + }, + _authoredOn: { + type: require('./element.schema.js'), + description: 'The date and time this task was created.', + }, + authoredOn: { + type: DateTimeScalar, + description: 'The date and time this task was created.', + }, + _lastModified: { + type: require('./element.schema.js'), + description: 'The date and time of last modification to this task.', + }, + lastModified: { + type: DateTimeScalar, + description: 'The date and time of last modification to this task.', + }, + requester: { + type: new GraphQLUnionType({ + name: 'Taskrequester_requester_Union', + description: 'The creator of the task.', + types: () => [ + require('./device.schema.js'), + require('./organization.schema.js'), + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: 'The creator of the task.', + }, + performerType: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: 'The kind of participant that should perform the task.', + }, + owner: { + type: new GraphQLUnionType({ + name: 'Taskowner_owner_Union', + description: + 'Individual organization or Device currently responsible for task execution.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + require('./careteam.schema.js'), + require('./healthcareservice.schema.js'), + require('./patient.schema.js'), + require('./device.schema.js'), + require('./relatedperson.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'CareTeam') { + return require('./careteam.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Device') { + return require('./device.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + }, + }), + description: + 'Individual organization or Device currently responsible for task execution.', + }, + location: { + type: new GraphQLUnionType({ + name: 'Tasklocation_location_Union', + description: + 'Principal physical location where the this task is performed.', + types: () => [require('./location.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + }, + }), + description: + 'Principal physical location where the this task is performed.', + }, + reasonCode: { + type: require('./codeableconcept.schema.js'), + description: + 'A description or code indicating why this task needs to be performed.', + }, + reasonReference: { + type: new GraphQLUnionType({ + name: 'TaskreasonReference_reasonReference_Union', + description: + 'A resource reference indicating why this task needs to be performed.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'A resource reference indicating why this task needs to be performed.', + }, + insurance: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Taskinsurance_insurance_Union', + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.', + types: () => [ + require('./coverage.schema.js'), + require('./claimresponse.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Coverage') { + return require('./coverage.schema.js'); + } + if (data && data.resourceType === 'ClaimResponse') { + return require('./claimresponse.schema.js'); + } + }, + }), + ), + description: + 'Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Free-text information captured about the task as it progresses.', + }, + relevantHistory: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TaskrelevantHistory_relevantHistory_Union', + description: + 'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.', + types: () => [require('./provenance.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Provenance') { + return require('./provenance.schema.js'); + } + }, + }), + ), + description: + 'Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.', + }, + restriction: { + type: require('./taskrestriction.schema.js'), + description: + 'If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned.', + }, + input: { + type: new GraphQLList(require('./taskinput.schema.js')), + description: + 'Additional information that may be needed in the execution of the task.', + }, + output: { + type: new GraphQLList(require('./taskoutput.schema.js')), + description: 'Outputs produced by the Task.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/taskinput.schema.js b/src/resources/4_0_0/schemas/taskinput.schema.js new file mode 100644 index 00000000..885d35c4 --- /dev/null +++ b/src/resources/4_0_0/schemas/taskinput.schema.js @@ -0,0 +1,332 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary Taskinput Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Taskinput', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A code or description indicating how the input is intended to be used as part of the task execution.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of the input parameter as a basic type.', + }, + _valueCanonical: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of the input parameter as a basic type.', + }, + _valueId: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of the input parameter as a basic type.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the input parameter as a basic type.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUrl: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUrl: { + type: new GraphQLNonNull(UrlScalar), + description: 'The value of the input parameter as a basic type.', + }, + _valueUuid: { + type: require('./element.schema.js'), + description: 'The value of the input parameter as a basic type.', + }, + valueUuid: { + type: new GraphQLNonNull(UuidScalar), + description: 'The value of the input parameter as a basic type.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueReference: { + type: new GraphQLNonNull(require('./resourcelist.schema')), + description: 'The value of the input parameter as a basic type.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueContactDetail: { + type: new GraphQLNonNull(require('./contactdetail.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueContributor: { + type: new GraphQLNonNull(require('./contributor.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueExpression: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueParameterDefinition: { + type: new GraphQLNonNull(require('./parameterdefinition.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueRelatedArtifact: { + type: new GraphQLNonNull(require('./relatedartifact.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueTriggerDefinition: { + type: new GraphQLNonNull(require('./triggerdefinition.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueUsageContext: { + type: new GraphQLNonNull(require('./usagecontext.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + valueDosage: { + type: new GraphQLNonNull(require('./dosage.schema.js')), + description: 'The value of the input parameter as a basic type.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/taskoutput.schema.js b/src/resources/4_0_0/schemas/taskoutput.schema.js new file mode 100644 index 00000000..c86f1f68 --- /dev/null +++ b/src/resources/4_0_0/schemas/taskoutput.schema.js @@ -0,0 +1,331 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLFloat, + GraphQLInt, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const Base64BinaryScalar = require('../scalars/base64binary.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); +const InstantScalar = require('../scalars/instant.scalar.js'); +const OidScalar = require('../scalars/oid.scalar.js'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const UrlScalar = require('../scalars/url.scalar.js'); +const UuidScalar = require('../scalars/uuid.scalar.js'); + +/** + * @name exports + * @summary Taskoutput Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Taskoutput', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The name of the Output parameter.', + }, + _valueBase64Binary: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueBase64Binary: { + type: new GraphQLNonNull(Base64BinaryScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueBoolean: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'The value of the Output parameter as a basic type.', + }, + _valueCanonical: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueCanonical: { + type: new GraphQLNonNull(CanonicalScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueCode: { + type: new GraphQLNonNull(CodeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDate: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDate: { + type: new GraphQLNonNull(DateScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDateTime: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueDecimal: { + type: new GraphQLNonNull(GraphQLFloat), + description: 'The value of the Output parameter as a basic type.', + }, + _valueId: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueId: { + type: new GraphQLNonNull(IdScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueInstant: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueInstant: { + type: new GraphQLNonNull(InstantScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueInteger: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The value of the Output parameter as a basic type.', + }, + _valueMarkdown: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueMarkdown: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + _valueOid: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueOid: { + type: new GraphQLNonNull(OidScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valuePositiveInt: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valuePositiveInt: { + type: new GraphQLNonNull(PositiveIntScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueString: { + type: new GraphQLNonNull(GraphQLString), + description: 'The value of the Output parameter as a basic type.', + }, + _valueTime: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueTime: { + type: new GraphQLNonNull(TimeScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUnsignedInt: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUnsignedInt: { + type: new GraphQLNonNull(UnsignedIntScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUri: { + type: new GraphQLNonNull(UriScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUrl: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUrl: { + type: new GraphQLNonNull(UrlScalar), + description: 'The value of the Output parameter as a basic type.', + }, + _valueUuid: { + type: require('./element.schema.js'), + description: 'The value of the Output parameter as a basic type.', + }, + valueUuid: { + type: new GraphQLNonNull(UuidScalar), + description: 'The value of the Output parameter as a basic type.', + }, + valueAddress: { + type: new GraphQLNonNull(require('./address.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAge: { + type: new GraphQLNonNull(require('./age.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAnnotation: { + type: new GraphQLNonNull(require('./annotation.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueAttachment: { + type: new GraphQLNonNull(require('./attachment.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCoding: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueContactPoint: { + type: new GraphQLNonNull(require('./contactpoint.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueCount: { + type: new GraphQLNonNull(require('./count.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDistance: { + type: new GraphQLNonNull(require('./distance.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDuration: { + type: new GraphQLNonNull(require('./duration.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueHumanName: { + type: new GraphQLNonNull(require('./humanname.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueIdentifier: { + type: new GraphQLNonNull(require('./identifier.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueMoney: { + type: new GraphQLNonNull(require('./money.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valuePeriod: { + type: new GraphQLNonNull(require('./period.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRatio: { + type: new GraphQLNonNull(require('./ratio.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueReference: { + type: new GraphQLNonNull(require('./resourcelist.schema')), + description: 'The value of the Output parameter as a basic type.', + }, + valueSampledData: { + type: new GraphQLNonNull(require('./sampleddata.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueSignature: { + type: new GraphQLNonNull(require('./signature.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueTiming: { + type: new GraphQLNonNull(require('./timing.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueContactDetail: { + type: new GraphQLNonNull(require('./contactdetail.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueContributor: { + type: new GraphQLNonNull(require('./contributor.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDataRequirement: { + type: new GraphQLNonNull(require('./datarequirement.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueExpression: { + type: new GraphQLNonNull(require('./expression.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueParameterDefinition: { + type: new GraphQLNonNull(require('./parameterdefinition.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueRelatedArtifact: { + type: new GraphQLNonNull(require('./relatedartifact.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueTriggerDefinition: { + type: new GraphQLNonNull(require('./triggerdefinition.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueUsageContext: { + type: new GraphQLNonNull(require('./usagecontext.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + valueDosage: { + type: new GraphQLNonNull(require('./dosage.schema.js')), + description: 'The value of the Output parameter as a basic type.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/taskrestriction.schema.js b/src/resources/4_0_0/schemas/taskrestriction.schema.js new file mode 100644 index 00000000..e0ecba5c --- /dev/null +++ b/src/resources/4_0_0/schemas/taskrestriction.schema.js @@ -0,0 +1,91 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); + +/** + * @name exports + * @summary Taskrestriction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Taskrestriction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _repetitions: { + type: require('./element.schema.js'), + description: + 'Indicates the number of times the requested action should occur.', + }, + repetitions: { + type: PositiveIntScalar, + description: + 'Indicates the number of times the requested action should occur.', + }, + period: { + type: require('./period.schema.js'), + description: 'Over what time-period is fulfillment sought.', + }, + recipient: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'Taskrestrictionrecipient_recipient_Union', + description: + 'For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?', + types: () => [ + require('./patient.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./relatedperson.schema.js'), + require('./group.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'RelatedPerson') { + return require('./relatedperson.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilities.schema.js b/src/resources/4_0_0/schemas/terminologycapabilities.schema.js new file mode 100644 index 00000000..7d743ed0 --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilities.schema.js @@ -0,0 +1,278 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilities Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilities', + description: + 'A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TerminologyCapabilities_Enum_schema', + values: { + TerminologyCapabilities: { value: 'TerminologyCapabilities' }, + }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the terminology capabilities.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the terminology capabilities.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this terminology capabilities. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this terminology capabilities. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the terminology capabilities was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes.', + }, + date: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and optionally time) when the terminology capabilities was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the terminology capabilities.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the terminology capabilities.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate terminology capabilities instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the terminology capabilities is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this terminology capabilities is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this terminology capabilities is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the terminology capabilities.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the terminology capabilities.', + }, + _kind: { + type: require('./element.schema.js'), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + kind: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase).', + }, + software: { + type: require('./terminologycapabilitiessoftware.schema.js'), + description: + 'Software that is covered by this terminology capability statement. It is used when the statement describes the capabilities of a particular software version, independent of an installation.', + }, + implementation: { + type: require('./terminologycapabilitiesimplementation.schema.js'), + description: + 'Identifies a specific implementation instance that is described by the terminology capability statement - i.e. a particular installation, rather than the capabilities of a software program.', + }, + _lockedDate: { + type: require('./element.schema.js'), + description: 'Whether the server supports lockedDate.', + }, + lockedDate: { + type: GraphQLBoolean, + description: 'Whether the server supports lockedDate.', + }, + codeSystem: { + type: new GraphQLList( + require('./terminologycapabilitiescodesystem.schema.js'), + ), + description: + 'Identifies a code system that is supported by the server. If there is a no code system URL, then this declares the general assumptions a client can make about support for any CodeSystem resource.', + }, + expansion: { + type: require('./terminologycapabilitiesexpansion.schema.js'), + description: + 'Information about the [ValueSet/$expand](valueset-operation-expand.html) operation.', + }, + _codeSearch: { + type: require('./element.schema.js'), + description: + 'The degree to which the server supports the code search parameter on ValueSet, if it is supported.', + }, + codeSearch: { + type: CodeScalar, + description: + 'The degree to which the server supports the code search parameter on ValueSet, if it is supported.', + }, + validateCode: { + type: require('./terminologycapabilitiesvalidatecode.schema.js'), + description: + 'Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation.', + }, + translation: { + type: require('./terminologycapabilitiestranslation.schema.js'), + description: + 'Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation.', + }, + closure: { + type: require('./terminologycapabilitiesclosure.schema.js'), + description: 'Whether the $closure operation is supported.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiesclosure.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiesclosure.schema.js new file mode 100644 index 00000000..b389106c --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiesclosure.schema.js @@ -0,0 +1,45 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiesclosure Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiesclosure', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _translation: { + type: require('./element.schema.js'), + description: 'If cross-system closure is supported.', + }, + translation: { + type: GraphQLBoolean, + description: 'If cross-system closure is supported.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiescodesystem.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiescodesystem.schema.js new file mode 100644 index 00000000..6d45748e --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiescodesystem.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiescodeSystem Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiescodeSystem', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _uri: { + type: require('./element.schema.js'), + description: 'URI for the Code System.', + }, + uri: { + type: CanonicalScalar, + description: 'URI for the Code System.', + }, + version: { + type: new GraphQLList( + require('./terminologycapabilitiescodesystemversion.schema.js'), + ), + description: + 'For the code system, a list of versions that are supported by the server.', + }, + _subsumption: { + type: require('./element.schema.js'), + description: + 'True if subsumption is supported for this version of the code system.', + }, + subsumption: { + type: GraphQLBoolean, + description: + 'True if subsumption is supported for this version of the code system.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiescodesystemversion.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiescodesystemversion.schema.js new file mode 100644 index 00000000..78cd2b92 --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiescodesystemversion.schema.js @@ -0,0 +1,88 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiescodeSystemversion Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiescodeSystemversion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'For version-less code systems, there should be a single version with no identifier.', + }, + code: { + type: GraphQLString, + description: + 'For version-less code systems, there should be a single version with no identifier.', + }, + _isDefault: { + type: require('./element.schema.js'), + description: 'If this is the default version for this code system.', + }, + isDefault: { + type: GraphQLBoolean, + description: 'If this is the default version for this code system.', + }, + _compositional: { + type: require('./element.schema.js'), + description: + 'If the compositional grammar defined by the code system is supported.', + }, + compositional: { + type: GraphQLBoolean, + description: + 'If the compositional grammar defined by the code system is supported.', + }, + _language: { + type: require('./element.schema.js'), + description: 'Language Displays supported.', + }, + language: { + type: new GraphQLList(CodeScalar), + description: 'Language Displays supported.', + }, + filter: { + type: new GraphQLList( + require('./terminologycapabilitiescodesystemversionfilter.schema.js'), + ), + description: 'Filter Properties supported.', + }, + _property: { + type: require('./element.schema.js'), + description: 'Properties supported for $lookup.', + }, + property: { + type: new GraphQLList(CodeScalar), + description: 'Properties supported for $lookup.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiescodesystemversionfilter.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiescodesystemversionfilter.schema.js new file mode 100644 index 00000000..8d19803a --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiescodesystemversionfilter.schema.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiescodeSystemversionfilter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiescodeSystemversionfilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: 'Code of the property supported.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: 'Code of the property supported.', + }, + _op: { + type: require('./element.schema.js'), + description: 'Operations supported for the property.', + }, + op: { + type: new GraphQLList(new GraphQLNonNull(CodeScalar)), + description: 'Operations supported for the property.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiesexpansion.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiesexpansion.schema.js new file mode 100644 index 00000000..c9a22eb8 --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiesexpansion.schema.js @@ -0,0 +1,75 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiesexpansion Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiesexpansion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _hierarchical: { + type: require('./element.schema.js'), + description: 'Whether the server can return nested value sets.', + }, + hierarchical: { + type: GraphQLBoolean, + description: 'Whether the server can return nested value sets.', + }, + _paging: { + type: require('./element.schema.js'), + description: 'Whether the server supports paging on expansion.', + }, + paging: { + type: GraphQLBoolean, + description: 'Whether the server supports paging on expansion.', + }, + _incomplete: { + type: require('./element.schema.js'), + description: 'Allow request for incomplete expansions?', + }, + incomplete: { + type: GraphQLBoolean, + description: 'Allow request for incomplete expansions?', + }, + parameter: { + type: new GraphQLList( + require('./terminologycapabilitiesexpansionparameter.schema.js'), + ), + description: 'Supported expansion parameter.', + }, + _textFilter: { + type: require('./element.schema.js'), + description: 'Documentation about text searching works.', + }, + textFilter: { + type: GraphQLString, + description: 'Documentation about text searching works.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiesexpansionparameter.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiesexpansionparameter.schema.js new file mode 100644 index 00000000..24d0fa9f --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiesexpansionparameter.schema.js @@ -0,0 +1,54 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiesexpansionparameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiesexpansionparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Expansion Parameter name.', + }, + name: { + type: new GraphQLNonNull(CodeScalar), + description: 'Expansion Parameter name.', + }, + _documentation: { + type: require('./element.schema.js'), + description: 'Description of support for parameter.', + }, + documentation: { + type: GraphQLString, + description: 'Description of support for parameter.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiesimplementation.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiesimplementation.schema.js new file mode 100644 index 00000000..b214e6eb --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiesimplementation.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UrlScalar = require('../scalars/url.scalar.js'); + +/** + * @name exports + * @summary TerminologyCapabilitiesimplementation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiesimplementation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _description: { + type: require('./element.schema.js'), + description: + 'Information about the specific installation that this terminology capability statement relates to.', + }, + description: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Information about the specific installation that this terminology capability statement relates to.', + }, + _url: { + type: require('./element.schema.js'), + description: 'An absolute base URL for the implementation.', + }, + url: { + type: UrlScalar, + description: 'An absolute base URL for the implementation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiessoftware.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiessoftware.schema.js new file mode 100644 index 00000000..4173c42a --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiessoftware.schema.js @@ -0,0 +1,55 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiessoftware Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiessoftware', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Name the software is known by.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Name the software is known by.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version identifier for the software covered by this statement.', + }, + version: { + type: GraphQLString, + description: + 'The version identifier for the software covered by this statement.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiestranslation.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiestranslation.schema.js new file mode 100644 index 00000000..b5ad4d8e --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiestranslation.schema.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiestranslation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiestranslation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _needsMap: { + type: require('./element.schema.js'), + description: 'Whether the client must identify the map.', + }, + needsMap: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether the client must identify the map.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/terminologycapabilitiesvalidatecode.schema.js b/src/resources/4_0_0/schemas/terminologycapabilitiesvalidatecode.schema.js new file mode 100644 index 00000000..c36bcebe --- /dev/null +++ b/src/resources/4_0_0/schemas/terminologycapabilitiesvalidatecode.schema.js @@ -0,0 +1,46 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TerminologyCapabilitiesvalidateCode Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TerminologyCapabilitiesvalidateCode', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _translations: { + type: require('./element.schema.js'), + description: 'Whether translations are validated.', + }, + translations: { + type: new GraphQLNonNull(GraphQLBoolean), + description: 'Whether translations are validated.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreport.schema.js b/src/resources/4_0_0/schemas/testreport.schema.js new file mode 100644 index 00000000..90bca498 --- /dev/null +++ b/src/resources/4_0_0/schemas/testreport.schema.js @@ -0,0 +1,184 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary TestReport Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReport', + description: + 'A summary of information based on the results of executing a TestScript.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestReport_Enum_schema', + values: { TestReport: { value: 'TestReport' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'Identifier for the TestScript assigned for external purposes outside the context of FHIR.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A free text natural language name identifying the executed TestScript.', + }, + name: { + type: GraphQLString, + description: + 'A free text natural language name identifying the executed TestScript.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The current state of this test report.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The current state of this test report.', + }, + testScript: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'TestReporttestScript_testScript_Union', + description: + 'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.', + types: () => [require('./testscript.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'TestScript') { + return require('./testscript.schema.js'); + } + }, + }), + ), + description: + 'Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`.', + }, + _result: { + type: require('./element.schema.js'), + description: 'The overall result from the execution of the TestScript.', + }, + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The overall result from the execution of the TestScript.', + }, + _score: { + type: require('./element.schema.js'), + description: + 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', + }, + score: { + type: GraphQLFloat, + description: + 'The final score (percentage of tests passed) resulting from the execution of the TestScript.', + }, + _tester: { + type: require('./element.schema.js'), + description: + 'Name of the tester producing this report (Organization or individual).', + }, + tester: { + type: GraphQLString, + description: + 'Name of the tester producing this report (Organization or individual).', + }, + _issued: { + type: require('./element.schema.js'), + description: + 'When the TestScript was executed and this TestReport was generated.', + }, + issued: { + type: DateTimeScalar, + description: + 'When the TestScript was executed and this TestReport was generated.', + }, + participant: { + type: new GraphQLList(require('./testreportparticipant.schema.js')), + description: + 'A participant in the test execution, either the execution engine, a client, or a server.', + }, + setup: { + type: require('./testreportsetup.schema.js'), + description: + 'The results of the series of required setup operations before the tests were executed.', + }, + test: { + type: new GraphQLList(require('./testreporttest.schema.js')), + description: 'A test executed from the test script.', + }, + teardown: { + type: require('./testreportteardown.schema.js'), + description: + 'The results of the series of operations required to clean up after all the tests were executed (successfully or otherwise).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreportparticipant.schema.js b/src/resources/4_0_0/schemas/testreportparticipant.schema.js new file mode 100644 index 00000000..1601ab51 --- /dev/null +++ b/src/resources/4_0_0/schemas/testreportparticipant.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary TestReportparticipant Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReportparticipant', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of participant.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of participant.', + }, + _uri: { + type: require('./element.schema.js'), + description: 'The uri of the participant. An absolute URL is preferred.', + }, + uri: { + type: new GraphQLNonNull(UriScalar), + description: 'The uri of the participant. An absolute URL is preferred.', + }, + _display: { + type: require('./element.schema.js'), + description: 'The display name of the participant.', + }, + display: { + type: GraphQLString, + description: 'The display name of the participant.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreportsetup.schema.js b/src/resources/4_0_0/schemas/testreportsetup.schema.js new file mode 100644 index 00000000..210ef2a1 --- /dev/null +++ b/src/resources/4_0_0/schemas/testreportsetup.schema.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReportsetup Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReportsetup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreportsetupaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreportsetupaction.schema.js b/src/resources/4_0_0/schemas/testreportsetupaction.schema.js new file mode 100644 index 00000000..e8a47ced --- /dev/null +++ b/src/resources/4_0_0/schemas/testreportsetupaction.schema.js @@ -0,0 +1,41 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary TestReportsetupaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReportsetupaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + operation: { + type: require('./testreportsetupactionoperation.schema.js'), + description: 'The operation performed.', + }, + assert: { + type: require('./testreportsetupactionassert.schema.js'), + description: + 'The results of the assertion performed on the previous operations.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreportsetupactionassert.schema.js b/src/resources/4_0_0/schemas/testreportsetupactionassert.schema.js new file mode 100644 index 00000000..d533977f --- /dev/null +++ b/src/resources/4_0_0/schemas/testreportsetupactionassert.schema.js @@ -0,0 +1,62 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary TestReportsetupactionassert Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReportsetupactionassert', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _result: { + type: require('./element.schema.js'), + description: 'The result of this assertion.', + }, + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The result of this assertion.', + }, + _message: { + type: require('./element.schema.js'), + description: 'An explanatory message associated with the result.', + }, + message: { + type: GraphQLString, + description: 'An explanatory message associated with the result.', + }, + _detail: { + type: require('./element.schema.js'), + description: 'A link to further details on the result.', + }, + detail: { + type: GraphQLString, + description: 'A link to further details on the result.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreportsetupactionoperation.schema.js b/src/resources/4_0_0/schemas/testreportsetupactionoperation.schema.js new file mode 100644 index 00000000..28bcf302 --- /dev/null +++ b/src/resources/4_0_0/schemas/testreportsetupactionoperation.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary TestReportsetupactionoperation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReportsetupactionoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _result: { + type: require('./element.schema.js'), + description: 'The result of this operation.', + }, + result: { + type: new GraphQLNonNull(CodeScalar), + description: 'The result of this operation.', + }, + _message: { + type: require('./element.schema.js'), + description: 'An explanatory message associated with the result.', + }, + message: { + type: GraphQLString, + description: 'An explanatory message associated with the result.', + }, + _detail: { + type: require('./element.schema.js'), + description: 'A link to further details on the result.', + }, + detail: { + type: UriScalar, + description: 'A link to further details on the result.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreportteardown.schema.js b/src/resources/4_0_0/schemas/testreportteardown.schema.js new file mode 100644 index 00000000..0c3faa66 --- /dev/null +++ b/src/resources/4_0_0/schemas/testreportteardown.schema.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReportteardown Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReportteardown', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreportteardownaction.schema.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreportteardownaction.schema.js b/src/resources/4_0_0/schemas/testreportteardownaction.schema.js new file mode 100644 index 00000000..a6d2aac5 --- /dev/null +++ b/src/resources/4_0_0/schemas/testreportteardownaction.schema.js @@ -0,0 +1,32 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary TestReportteardownaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReportteardownaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreporttest.schema.js b/src/resources/4_0_0/schemas/testreporttest.schema.js new file mode 100644 index 00000000..692e7e5c --- /dev/null +++ b/src/resources/4_0_0/schemas/testreporttest.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestReporttest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReporttest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testreporttestaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testreporttestaction.schema.js b/src/resources/4_0_0/schemas/testreporttestaction.schema.js new file mode 100644 index 00000000..5b56cd07 --- /dev/null +++ b/src/resources/4_0_0/schemas/testreporttestaction.schema.js @@ -0,0 +1,32 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary TestReporttestaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestReporttestaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscript.schema.js b/src/resources/4_0_0/schemas/testscript.schema.js new file mode 100644 index 00000000..7c7a9f26 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscript.schema.js @@ -0,0 +1,271 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary TestScript Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScript', + description: + 'A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'TestScript_Enum_schema', + values: { TestScript: { value: 'TestScript' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.', + }, + identifier: { + type: require('./identifier.schema.js'), + description: + 'A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the test script.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the test script.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this test script. Enables tracking the life-cycle of the content.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this test script. Enables tracking the life-cycle of the content.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + 'The date (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', + }, + date: { + type: DateTimeScalar, + description: + 'The date (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.', + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the test script.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the test script.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the test script from a consumer's perspective.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the test script from a consumer's perspective.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the test script is intended to be used.', + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this test script is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this test script is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.', + }, + origin: { + type: new GraphQLList(require('./testscriptorigin.schema.js')), + description: + 'An abstract server used in operations within this test script in the origin element.', + }, + destination: { + type: new GraphQLList(require('./testscriptdestination.schema.js')), + description: + 'An abstract server used in operations within this test script in the destination element.', + }, + metadata: { + type: require('./testscriptmetadata.schema.js'), + description: + 'The required capability must exist and are assumed to function correctly on the FHIR server being tested.', + }, + fixture: { + type: new GraphQLList(require('./testscriptfixture.schema.js')), + description: + 'Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.', + }, + profile: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'TestScriptprofile_profile_Union', + description: 'Reference to the profile to be used for validation.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'Reference to the profile to be used for validation.', + }, + variable: { + type: new GraphQLList(require('./testscriptvariable.schema.js')), + description: + 'Variable is set based either on element value in response body or on header field value in the response headers.', + }, + setup: { + type: require('./testscriptsetup.schema.js'), + description: + 'A series of required setup operations before tests are executed.', + }, + test: { + type: new GraphQLList(require('./testscripttest.schema.js')), + description: 'A test in this script.', + }, + teardown: { + type: require('./testscriptteardown.schema.js'), + description: + 'A series of operations required to clean up after all the tests are executed (successfully or otherwise).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptdestination.schema.js b/src/resources/4_0_0/schemas/testscriptdestination.schema.js new file mode 100644 index 00000000..ac1a61ab --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptdestination.schema.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptdestination Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptdestination', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _index: { + type: require('./element.schema.js'), + description: + 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', + }, + index: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.', + }, + profile: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The type of destination profile the test system supports.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptfixture.schema.js b/src/resources/4_0_0/schemas/testscriptfixture.schema.js new file mode 100644 index 00000000..0a5719d6 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptfixture.schema.js @@ -0,0 +1,74 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptfixture Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptfixture', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _autocreate: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + autocreate: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.', + }, + _autodelete: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + autodelete: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.', + }, + resource: { + type: new GraphQLUnionType({ + name: 'TestScriptfixtureresource_resource_Union', + description: + 'Reference to the resource (containing the contents of the resource needed for operations).', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + description: + 'Reference to the resource (containing the contents of the resource needed for operations).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptmetadata.schema.js b/src/resources/4_0_0/schemas/testscriptmetadata.schema.js new file mode 100644 index 00000000..9624cd1c --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptmetadata.schema.js @@ -0,0 +1,49 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptmetadata Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptmetadata', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + link: { + type: new GraphQLList(require('./testscriptmetadatalink.schema.js')), + description: + 'A link to the FHIR specification that this test is covering.', + }, + capability: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptmetadatacapability.schema.js')), + ), + description: + 'Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptmetadatacapability.schema.js b/src/resources/4_0_0/schemas/testscriptmetadatacapability.schema.js new file mode 100644 index 00000000..db7db278 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptmetadatacapability.schema.js @@ -0,0 +1,107 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary TestScriptmetadatacapability Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptmetadatacapability', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _required: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + required: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.', + }, + _validated: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + validated: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + description: { + type: GraphQLString, + description: + 'Description of the capabilities that this test script is requiring the server to support.', + }, + _origin: { + type: require('./element.schema.js'), + description: 'Which origin server these requirements apply to.', + }, + origin: { + type: new GraphQLList(GraphQLInt), + description: 'Which origin server these requirements apply to.', + }, + _destination: { + type: require('./element.schema.js'), + description: 'Which server these requirements apply to.', + }, + destination: { + type: GraphQLInt, + description: 'Which server these requirements apply to.', + }, + _link: { + type: require('./element.schema.js'), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + link: { + type: new GraphQLList(UriScalar), + description: + 'Links to the FHIR specification that describes this interaction and the resources involved in more detail.', + }, + _capabilities: { + type: require('./element.schema.js'), + description: + 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', + }, + capabilities: { + type: new GraphQLNonNull(CanonicalScalar), + description: + 'Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptmetadatalink.schema.js b/src/resources/4_0_0/schemas/testscriptmetadatalink.schema.js new file mode 100644 index 00000000..f18f3065 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptmetadatalink.schema.js @@ -0,0 +1,56 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); + +/** + * @name exports + * @summary TestScriptmetadatalink Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptmetadatalink', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + url: { + type: new GraphQLNonNull(UriScalar), + description: + 'URL to a particular requirement or feature within the FHIR specification.', + }, + _description: { + type: require('./element.schema.js'), + description: 'Short description of the link.', + }, + description: { + type: GraphQLString, + description: 'Short description of the link.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptorigin.schema.js b/src/resources/4_0_0/schemas/testscriptorigin.schema.js new file mode 100644 index 00000000..0c957b0b --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptorigin.schema.js @@ -0,0 +1,52 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptorigin Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptorigin', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _index: { + type: require('./element.schema.js'), + description: + 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', + }, + index: { + type: new GraphQLNonNull(GraphQLInt), + description: + 'Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.', + }, + profile: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: 'The type of origin profile the test system supports.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptsetup.schema.js b/src/resources/4_0_0/schemas/testscriptsetup.schema.js new file mode 100644 index 00000000..d52312e0 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptsetup.schema.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptsetup Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptsetup', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptsetupaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptsetupaction.schema.js b/src/resources/4_0_0/schemas/testscriptsetupaction.schema.js new file mode 100644 index 00000000..b45d92a9 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptsetupaction.schema.js @@ -0,0 +1,41 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary TestScriptsetupaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptsetupaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + operation: { + type: require('./testscriptsetupactionoperation.schema.js'), + description: 'The operation to perform.', + }, + assert: { + type: require('./testscriptsetupactionassert.schema.js'), + description: + 'Evaluates the results of previous operations to determine if the server under test behaves appropriately.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptsetupactionassert.schema.js b/src/resources/4_0_0/schemas/testscriptsetupactionassert.schema.js new file mode 100644 index 00000000..90814392 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptsetupactionassert.schema.js @@ -0,0 +1,250 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary TestScriptsetupactionassert Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptsetupactionassert', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _label: { + type: require('./element.schema.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _direction: { + type: require('./element.schema.js'), + description: 'The direction to use for the assertion.', + }, + direction: { + type: CodeScalar, + description: 'The direction to use for the assertion.', + }, + _compareToSourceId: { + type: require('./element.schema.js'), + description: + "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", + }, + compareToSourceId: { + type: GraphQLString, + description: + "Id of the source fixture used as the contents to be evaluated by either the 'source/expression' or 'sourceId/path' definition.", + }, + _compareToSourceExpression: { + type: require('./element.schema.js'), + description: + 'The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + compareToSourceExpression: { + type: GraphQLString, + description: + 'The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + _compareToSourcePath: { + type: require('./element.schema.js'), + description: + 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + compareToSourcePath: { + type: GraphQLString, + description: + 'XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.', + }, + _contentType: { + type: require('./element.schema.js'), + description: + "The mime-type contents to compare against the request or response message 'Content-Type' header.", + }, + contentType: { + type: CodeScalar, + description: + "The mime-type contents to compare against the request or response message 'Content-Type' header.", + }, + _expression: { + type: require('./element.schema.js'), + description: + 'The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.', + }, + expression: { + type: GraphQLString, + description: + 'The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.', + }, + _headerField: { + type: require('./element.schema.js'), + description: "The HTTP header field name e.g. 'Location'.", + }, + headerField: { + type: GraphQLString, + description: "The HTTP header field name e.g. 'Location'.", + }, + _minimumId: { + type: require('./element.schema.js'), + description: + 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', + }, + minimumId: { + type: GraphQLString, + description: + 'The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.', + }, + _navigationLinks: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + navigationLinks: { + type: GraphQLBoolean, + description: + 'Whether or not the test execution performs validation on the bundle navigation links.', + }, + _operator: { + type: require('./element.schema.js'), + description: + 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', + }, + operator: { + type: CodeScalar, + description: + 'The operator type defines the conditional behavior of the assert. If not defined, the default is equals.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + path: { + type: GraphQLString, + description: + 'The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.', + }, + _requestMethod: { + type: require('./element.schema.js'), + description: + 'The request method or HTTP operation code to compare against that used by the client system under test.', + }, + requestMethod: { + type: CodeScalar, + description: + 'The request method or HTTP operation code to compare against that used by the client system under test.', + }, + _requestURL: { + type: require('./element.schema.js'), + description: + 'The value to use in a comparison against the request URL path string.', + }, + requestURL: { + type: GraphQLString, + description: + 'The value to use in a comparison against the request URL path string.', + }, + _resource: { + type: require('./element.schema.js'), + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + _response: { + type: require('./element.schema.js'), + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + response: { + type: CodeScalar, + description: + 'okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.', + }, + _responseCode: { + type: require('./element.schema.js'), + description: 'The value of the HTTP response code to be tested.', + }, + responseCode: { + type: GraphQLString, + description: 'The value of the HTTP response code to be tested.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against.', + }, + _validateProfileId: { + type: require('./element.schema.js'), + description: 'The ID of the Profile to validate against.', + }, + validateProfileId: { + type: IdScalar, + description: 'The ID of the Profile to validate against.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The value to compare to.', + }, + value: { + type: GraphQLString, + description: 'The value to compare to.', + }, + _warningOnly: { + type: require('./element.schema.js'), + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + warningOnly: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not the test execution will produce a warning only on error for this assert.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptsetupactionoperation.schema.js b/src/resources/4_0_0/schemas/testscriptsetupactionoperation.schema.js new file mode 100644 index 00000000..f147046b --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptsetupactionoperation.schema.js @@ -0,0 +1,195 @@ +const { + GraphQLString, + GraphQLList, + GraphQLInt, + GraphQLNonNull, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary TestScriptsetupactionoperation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptsetupactionoperation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + type: { + type: require('./coding.schema.js'), + description: 'Server interaction or operation type.', + }, + _resource: { + type: require('./element.schema.js'), + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + resource: { + type: CodeScalar, + description: + 'The type of the resource. See http://build.fhir.org/resourcelist.html.', + }, + _label: { + type: require('./element.schema.js'), + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + label: { + type: GraphQLString, + description: + 'The label would be used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'The description would be used by test engines for tracking and reporting purposes.', + }, + _accept: { + type: require('./element.schema.js'), + description: + "The mime-type to use for RESTful operation in the 'Accept' header.", + }, + accept: { + type: CodeScalar, + description: + "The mime-type to use for RESTful operation in the 'Accept' header.", + }, + _contentType: { + type: require('./element.schema.js'), + description: + "The mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + contentType: { + type: CodeScalar, + description: + "The mime-type to use for RESTful operation in the 'Content-Type' header.", + }, + _destination: { + type: require('./element.schema.js'), + description: + 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', + }, + destination: { + type: GraphQLInt, + description: + 'The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.', + }, + _encodeRequestUrl: { + type: require('./element.schema.js'), + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + encodeRequestUrl: { + type: new GraphQLNonNull(GraphQLBoolean), + description: + 'Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.', + }, + _method: { + type: require('./element.schema.js'), + description: + 'The HTTP method the test engine MUST use for this operation regardless of any other operation details.', + }, + method: { + type: CodeScalar, + description: + 'The HTTP method the test engine MUST use for this operation regardless of any other operation details.', + }, + _origin: { + type: require('./element.schema.js'), + description: + 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', + }, + origin: { + type: GraphQLInt, + description: + 'The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.', + }, + _params: { + type: require('./element.schema.js'), + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + params: { + type: GraphQLString, + description: + 'Path plus parameters after [type]. Used to set parts of the request URL explicitly.', + }, + requestHeader: { + type: new GraphQLList( + require('./testscriptsetupactionoperationrequestheader.schema.js'), + ), + description: 'Header elements would be used to set HTTP headers.', + }, + _requestId: { + type: require('./element.schema.js'), + description: 'The fixture id (maybe new) to map to the request.', + }, + requestId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the request.', + }, + _responseId: { + type: require('./element.schema.js'), + description: 'The fixture id (maybe new) to map to the response.', + }, + responseId: { + type: IdScalar, + description: 'The fixture id (maybe new) to map to the response.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + sourceId: { + type: IdScalar, + description: + 'The id of the fixture used as the body of a PUT or POST request.', + }, + _targetId: { + type: require('./element.schema.js'), + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + targetId: { + type: IdScalar, + description: + 'Id of fixture used for extracting the [id], [type], and [vid] for GET requests.', + }, + _url: { + type: require('./element.schema.js'), + description: 'Complete request URL.', + }, + url: { + type: GraphQLString, + description: 'Complete request URL.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptsetupactionoperationrequestheader.schema.js b/src/resources/4_0_0/schemas/testscriptsetupactionoperationrequestheader.schema.js new file mode 100644 index 00000000..2ae47ce4 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptsetupactionoperationrequestheader.schema.js @@ -0,0 +1,53 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptsetupactionoperationrequestHeader Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptsetupactionoperationrequestHeader', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _field: { + type: require('./element.schema.js'), + description: "The HTTP header field e.g. 'Accept'.", + }, + field: { + type: new GraphQLNonNull(GraphQLString), + description: "The HTTP header field e.g. 'Accept'.", + }, + _value: { + type: require('./element.schema.js'), + description: "The value of the header e.g. 'application/fhir+xml'.", + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: "The value of the header e.g. 'application/fhir+xml'.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptteardown.schema.js b/src/resources/4_0_0/schemas/testscriptteardown.schema.js new file mode 100644 index 00000000..75d8e964 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptteardown.schema.js @@ -0,0 +1,43 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScriptteardown Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptteardown', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscriptteardownaction.schema.js')), + ), + description: 'The teardown action will only contain an operation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptteardownaction.schema.js b/src/resources/4_0_0/schemas/testscriptteardownaction.schema.js new file mode 100644 index 00000000..62704d49 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptteardownaction.schema.js @@ -0,0 +1,32 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary TestScriptteardownaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptteardownaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscripttest.schema.js b/src/resources/4_0_0/schemas/testscripttest.schema.js new file mode 100644 index 00000000..2943df71 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscripttest.schema.js @@ -0,0 +1,63 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary TestScripttest Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScripttest', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + name: { + type: GraphQLString, + description: + 'The name of this test used for tracking/logging purposes by test engines.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + description: { + type: GraphQLString, + description: + 'A short description of the test used by test engines for tracking and reporting purposes.', + }, + action: { + type: new GraphQLList( + new GraphQLNonNull(require('./testscripttestaction.schema.js')), + ), + description: 'Action would contain either an operation or an assertion.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscripttestaction.schema.js b/src/resources/4_0_0/schemas/testscripttestaction.schema.js new file mode 100644 index 00000000..317bb276 --- /dev/null +++ b/src/resources/4_0_0/schemas/testscripttestaction.schema.js @@ -0,0 +1,32 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); + +/** + * @name exports + * @summary TestScripttestaction Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScripttestaction', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/testscriptvariable.schema.js b/src/resources/4_0_0/schemas/testscriptvariable.schema.js new file mode 100644 index 00000000..8c0ffe7b --- /dev/null +++ b/src/resources/4_0_0/schemas/testscriptvariable.schema.js @@ -0,0 +1,116 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); + +/** + * @name exports + * @summary TestScriptvariable Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TestScriptvariable', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: 'Descriptive name for this variable.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: 'Descriptive name for this variable.', + }, + _defaultValue: { + type: require('./element.schema.js'), + description: + 'A default, hard-coded, or user-defined value for this variable.', + }, + defaultValue: { + type: GraphQLString, + description: + 'A default, hard-coded, or user-defined value for this variable.', + }, + _description: { + type: require('./element.schema.js'), + description: + 'A free text natural language description of the variable and its purpose.', + }, + description: { + type: GraphQLString, + description: + 'A free text natural language description of the variable and its purpose.', + }, + _expression: { + type: require('./element.schema.js'), + description: + 'The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + expression: { + type: GraphQLString, + description: + 'The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + _headerField: { + type: require('./element.schema.js'), + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + headerField: { + type: GraphQLString, + description: + 'Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.', + }, + _hint: { + type: require('./element.schema.js'), + description: + 'Displayable text string with hint help information to the user when entering a default value.', + }, + hint: { + type: GraphQLString, + description: + 'Displayable text string with hint help information to the user when entering a default value.', + }, + _path: { + type: require('./element.schema.js'), + description: + 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + path: { + type: GraphQLString, + description: + 'XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.', + }, + _sourceId: { + type: require('./element.schema.js'), + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + sourceId: { + type: IdScalar, + description: + 'Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/timing.schema.js b/src/resources/4_0_0/schemas/timing.schema.js new file mode 100644 index 00000000..546f47cd --- /dev/null +++ b/src/resources/4_0_0/schemas/timing.schema.js @@ -0,0 +1,51 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary Timing Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Timing', + description: + 'Base StructureDefinition for Timing Type: Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _event: { + type: require('./element.schema.js'), + description: 'Identifies specific times when the event occurs.', + }, + event: { + type: new GraphQLList(DateTimeScalar), + description: 'Identifies specific times when the event occurs.', + }, + repeat: { + type: require('./element.schema.js'), + description: 'A set of rules that describe when the event is scheduled.', + }, + code: { + type: require('./codeableconcept.schema.js'), + description: + 'A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/timingrepeat.schema.js b/src/resources/4_0_0/schemas/timingrepeat.schema.js new file mode 100644 index 00000000..69a45e61 --- /dev/null +++ b/src/resources/4_0_0/schemas/timingrepeat.schema.js @@ -0,0 +1,185 @@ +const { + GraphQLString, + GraphQLList, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const PositiveIntScalar = require('../scalars/positiveint.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const TimeScalar = require('../scalars/time.scalar.js'); +const UnsignedIntScalar = require('../scalars/unsignedint.scalar.js'); + +/** + * @name exports + * @summary Timingrepeat Schema + */ +module.exports = new GraphQLObjectType({ + name: 'Timingrepeat', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + boundsDuration: { + type: require('./duration.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsRange: { + type: require('./range.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + boundsPeriod: { + type: require('./period.schema.js'), + description: + 'Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.', + }, + _count: { + type: require('./element.schema.js'), + description: + 'A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values.', + }, + count: { + type: PositiveIntScalar, + description: + 'A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values.', + }, + _countMax: { + type: require('./element.schema.js'), + description: + 'If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.', + }, + countMax: { + type: PositiveIntScalar, + description: + 'If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.', + }, + _duration: { + type: require('./element.schema.js'), + description: + 'How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration.', + }, + duration: { + type: GraphQLFloat, + description: + 'How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration.', + }, + _durationMax: { + type: require('./element.schema.js'), + description: + 'If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.', + }, + durationMax: { + type: GraphQLFloat, + description: + 'If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.', + }, + _durationUnit: { + type: require('./element.schema.js'), + description: 'The units of time for the duration, in UCUM units.', + }, + durationUnit: { + type: CodeScalar, + description: 'The units of time for the duration, in UCUM units.', + }, + _frequency: { + type: require('./element.schema.js'), + description: + 'The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency.', + }, + frequency: { + type: PositiveIntScalar, + description: + 'The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency.', + }, + _frequencyMax: { + type: require('./element.schema.js'), + description: + 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + frequencyMax: { + type: PositiveIntScalar, + description: + 'If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.', + }, + _period: { + type: require('./element.schema.js'), + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.", + }, + period: { + type: GraphQLFloat, + description: + "Indicates the duration of time over which repetitions are to occur; e.g. to express '3 times per day', 3 would be the frequency and '1 day' would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length.", + }, + _periodMax: { + type: require('./element.schema.js'), + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + periodMax: { + type: GraphQLFloat, + description: + "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as 'do this once every 3-5 days.", + }, + _periodUnit: { + type: require('./element.schema.js'), + description: 'The units of time for the period in UCUM units.', + }, + periodUnit: { + type: CodeScalar, + description: 'The units of time for the period in UCUM units.', + }, + _dayOfWeek: { + type: require('./element.schema.js'), + description: + 'If one or more days of week is provided, then the action happens only on the specified day(s).', + }, + dayOfWeek: { + type: new GraphQLList(CodeScalar), + description: + 'If one or more days of week is provided, then the action happens only on the specified day(s).', + }, + _timeOfDay: { + type: require('./element.schema.js'), + description: 'Specified time of day for action to take place.', + }, + timeOfDay: { + type: new GraphQLList(TimeScalar), + description: 'Specified time of day for action to take place.', + }, + _when: { + type: require('./element.schema.js'), + description: + 'An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.', + }, + when: { + type: new GraphQLList(CodeScalar), + description: + 'An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.', + }, + _offset: { + type: require('./element.schema.js'), + description: + 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', + }, + offset: { + type: UnsignedIntScalar, + description: + 'The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/triggerdefinition.schema.js b/src/resources/4_0_0/schemas/triggerdefinition.schema.js new file mode 100644 index 00000000..4ca33b94 --- /dev/null +++ b/src/resources/4_0_0/schemas/triggerdefinition.schema.js @@ -0,0 +1,98 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary TriggerDefinition Schema + */ +module.exports = new GraphQLObjectType({ + name: 'TriggerDefinition', + description: + 'Base StructureDefinition for TriggerDefinition Type: A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + _type: { + type: require('./element.schema.js'), + description: 'The type of triggering event.', + }, + type: { + type: new GraphQLNonNull(CodeScalar), + description: 'The type of triggering event.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.', + }, + name: { + type: GraphQLString, + description: + 'A formal name for the event. This may be an absolute URI that identifies the event formally (e.g. from a trigger registry), or a simple relative URI that identifies the event in a local context.', + }, + timingTiming: { + type: require('./timing.schema.js'), + description: 'The timing of the event (if this is a periodic trigger).', + }, + timingReference: { + type: new GraphQLUnionType({ + name: 'TriggerDefinitiontimingReference_timingReference_Union', + description: 'The timing of the event (if this is a periodic trigger).', + types: () => [require('./schedule.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Schedule') { + return require('./schedule.schema.js'); + } + }, + }), + description: 'The timing of the event (if this is a periodic trigger).', + }, + _timingDate: { + type: require('./element.schema.js'), + description: 'The timing of the event (if this is a periodic trigger).', + }, + timingDate: { + type: DateScalar, + description: 'The timing of the event (if this is a periodic trigger).', + }, + _timingDateTime: { + type: require('./element.schema.js'), + description: 'The timing of the event (if this is a periodic trigger).', + }, + timingDateTime: { + type: DateTimeScalar, + description: 'The timing of the event (if this is a periodic trigger).', + }, + data: { + type: new GraphQLList(require('./datarequirement.schema.js')), + description: + 'The triggering data of the event (if this is a data trigger). If more than one data is requirement is specified, then all the data requirements must be true.', + }, + condition: { + type: require('./expression.schema.js'), + description: + 'A boolean-valued expression that is evaluated in the context of the container of the trigger definition and returns whether or not the trigger fires.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/usagecontext.schema.js b/src/resources/4_0_0/schemas/usagecontext.schema.js new file mode 100644 index 00000000..b057e1c9 --- /dev/null +++ b/src/resources/4_0_0/schemas/usagecontext.schema.js @@ -0,0 +1,97 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary UsageContext Schema + */ +module.exports = new GraphQLObjectType({ + name: 'UsageContext', + description: + 'Base StructureDefinition for UsageContext Type: Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.', + }, + code: { + type: new GraphQLNonNull(require('./coding.schema.js')), + description: + 'A code that identifies the type of context being specified by this usage context.', + }, + valueCodeableConcept: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + valueQuantity: { + type: new GraphQLNonNull(require('./quantity.schema.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + valueRange: { + type: new GraphQLNonNull(require('./range.schema.js')), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + valueReference: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'UsageContextvalueReference_valueReference_Union', + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + types: () => [ + require('./plandefinition.schema.js'), + require('./researchstudy.schema.js'), + require('./insuranceplan.schema.js'), + require('./healthcareservice.schema.js'), + require('./group.schema.js'), + require('./location.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'PlanDefinition') { + return require('./plandefinition.schema.js'); + } + if (data && data.resourceType === 'ResearchStudy') { + return require('./researchstudy.schema.js'); + } + if (data && data.resourceType === 'InsurancePlan') { + return require('./insuranceplan.schema.js'); + } + if (data && data.resourceType === 'HealthcareService') { + return require('./healthcareservice.schema.js'); + } + if (data && data.resourceType === 'Group') { + return require('./group.schema.js'); + } + if (data && data.resourceType === 'Location') { + return require('./location.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: + 'A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valueset.schema.js b/src/resources/4_0_0/schemas/valueset.schema.js new file mode 100644 index 00000000..9945725b --- /dev/null +++ b/src/resources/4_0_0/schemas/valueset.schema.js @@ -0,0 +1,237 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ValueSet Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSet', + description: + 'A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'ValueSet_Enum_schema', + values: { ValueSet: { value: 'ValueSet' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _url: { + type: require('./element.schema.js'), + description: + 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.', + }, + url: { + type: UriScalar, + description: + 'An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.', + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: + 'A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + version: { + type: GraphQLString, + description: + 'The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.', + }, + _name: { + type: require('./element.schema.js'), + description: + 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + name: { + type: GraphQLString, + description: + 'A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.', + }, + _title: { + type: require('./element.schema.js'), + description: + 'A short, descriptive, user-friendly title for the value set.', + }, + title: { + type: GraphQLString, + description: + 'A short, descriptive, user-friendly title for the value set.', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.', + }, + _experimental: { + type: require('./element.schema.js'), + description: + 'A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + experimental: { + type: GraphQLBoolean, + description: + 'A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.', + }, + _date: { + type: require('./element.schema.js'), + description: + "The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", + }, + date: { + type: DateTimeScalar, + description: + "The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", + }, + _publisher: { + type: require('./element.schema.js'), + description: + 'The name of the organization or individual that published the value set.', + }, + publisher: { + type: GraphQLString, + description: + 'The name of the organization or individual that published the value set.', + }, + contact: { + type: new GraphQLList(require('./contactdetail.schema.js')), + description: + 'Contact details to assist a user in finding and communicating with the publisher.', + }, + _description: { + type: require('./element.schema.js'), + description: + "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", + }, + description: { + type: GraphQLString, + description: + "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", + }, + useContext: { + type: new GraphQLList(require('./usagecontext.schema.js')), + description: + 'The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.', + }, + jurisdiction: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'A legal or geographic region in which the value set is intended to be used.', + }, + _immutable: { + type: require('./element.schema.js'), + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + immutable: { + type: GraphQLBoolean, + description: + "If this is set to 'true', then no new versions of the content logical definition can be created. Note: Other metadata might still change.", + }, + _purpose: { + type: require('./element.schema.js'), + description: + 'Explanation of why this value set is needed and why it has been designed as it has.', + }, + purpose: { + type: GraphQLString, + description: + 'Explanation of why this value set is needed and why it has been designed as it has.', + }, + _copyright: { + type: require('./element.schema.js'), + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + copyright: { + type: GraphQLString, + description: + 'A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.', + }, + compose: { + type: require('./valuesetcompose.schema.js'), + description: + 'A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).', + }, + expansion: { + type: require('./valuesetexpansion.schema.js'), + description: + "A value set can also be 'expanded', where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valuesetcompose.schema.js b/src/resources/4_0_0/schemas/valuesetcompose.schema.js new file mode 100644 index 00000000..792140c9 --- /dev/null +++ b/src/resources/4_0_0/schemas/valuesetcompose.schema.js @@ -0,0 +1,66 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary ValueSetcompose Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSetcompose', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _lockedDate: { + type: require('./element.schema.js'), + description: + 'The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.', + }, + lockedDate: { + type: DateScalar, + description: + 'The Locked Date is the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.', + }, + _inactive: { + type: require('./element.schema.js'), + description: + 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).', + }, + inactive: { + type: GraphQLBoolean, + description: + 'Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).', + }, + include: { + type: new GraphQLList( + new GraphQLNonNull(require('./valuesetcomposeinclude.schema.js')), + ), + description: + 'Include one or more codes from a code system or other value set(s).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valuesetcomposeinclude.schema.js b/src/resources/4_0_0/schemas/valuesetcomposeinclude.schema.js new file mode 100644 index 00000000..6bbfeecf --- /dev/null +++ b/src/resources/4_0_0/schemas/valuesetcomposeinclude.schema.js @@ -0,0 +1,77 @@ +const { GraphQLString, GraphQLList, GraphQLObjectType } = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CanonicalScalar = require('../scalars/canonical.scalar.js'); + +/** + * @name exports + * @summary ValueSetcomposeinclude Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSetcomposeinclude', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system from which the selected codes come from.', + }, + _version: { + type: require('./element.schema.js'), + description: + "The version of the code system that the codes are selected from, or the special version '*' for all versions.", + }, + version: { + type: GraphQLString, + description: + "The version of the code system that the codes are selected from, or the special version '*' for all versions.", + }, + concept: { + type: new GraphQLList( + require('./valuesetcomposeincludeconcept.schema.js'), + ), + description: 'Specifies a concept to be included or excluded.', + }, + filter: { + type: new GraphQLList( + require('./valuesetcomposeincludefilter.schema.js'), + ), + description: + 'Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.', + }, + _valueSet: { + type: require('./element.schema.js'), + description: + 'Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.', + }, + valueSet: { + type: new GraphQLList(CanonicalScalar), + description: + 'Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url. If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valuesetcomposeincludeconcept.schema.js b/src/resources/4_0_0/schemas/valuesetcomposeincludeconcept.schema.js new file mode 100644 index 00000000..2331b539 --- /dev/null +++ b/src/resources/4_0_0/schemas/valuesetcomposeincludeconcept.schema.js @@ -0,0 +1,65 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ValueSetcomposeincludeconcept Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSetcomposeincludeconcept', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _code: { + type: require('./element.schema.js'), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + code: { + type: new GraphQLNonNull(CodeScalar), + description: + 'Specifies a code for the concept to be included or excluded.', + }, + _display: { + type: require('./element.schema.js'), + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + display: { + type: GraphQLString, + description: + 'The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.', + }, + designation: { + type: new GraphQLList( + require('./valuesetcomposeincludeconceptdesignation.schema.js'), + ), + description: + 'Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valuesetcomposeincludeconceptdesignation.schema.js b/src/resources/4_0_0/schemas/valuesetcomposeincludeconceptdesignation.schema.js new file mode 100644 index 00000000..3e2d6924 --- /dev/null +++ b/src/resources/4_0_0/schemas/valuesetcomposeincludeconceptdesignation.schema.js @@ -0,0 +1,58 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ValueSetcomposeincludeconceptdesignation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSetcomposeincludeconceptdesignation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _language: { + type: require('./element.schema.js'), + description: 'The language this designation is defined for.', + }, + language: { + type: CodeScalar, + description: 'The language this designation is defined for.', + }, + use: { + type: require('./coding.schema.js'), + description: 'A code that represents types of uses of designations.', + }, + _value: { + type: require('./element.schema.js'), + description: 'The text value for this designation.', + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: 'The text value for this designation.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valuesetcomposeincludefilter.schema.js b/src/resources/4_0_0/schemas/valuesetcomposeincludefilter.schema.js new file mode 100644 index 00000000..84474c3a --- /dev/null +++ b/src/resources/4_0_0/schemas/valuesetcomposeincludefilter.schema.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ValueSetcomposeincludefilter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSetcomposeincludefilter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _property: { + type: require('./element.schema.js'), + description: + 'A code that identifies a property or a filter defined in the code system.', + }, + property: { + type: new GraphQLNonNull(CodeScalar), + description: + 'A code that identifies a property or a filter defined in the code system.', + }, + _op: { + type: require('./element.schema.js'), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + op: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The kind of operation to perform as a part of the filter criteria.', + }, + _value: { + type: require('./element.schema.js'), + description: + "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", + }, + value: { + type: new GraphQLNonNull(GraphQLString), + description: + "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valuesetexpansion.schema.js b/src/resources/4_0_0/schemas/valuesetexpansion.schema.js new file mode 100644 index 00000000..f3ca9913 --- /dev/null +++ b/src/resources/4_0_0/schemas/valuesetexpansion.schema.js @@ -0,0 +1,89 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ValueSetexpansion Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSetexpansion', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _identifier: { + type: require('./element.schema.js'), + description: + 'An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.', + }, + identifier: { + type: UriScalar, + description: + 'An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.', + }, + _timestamp: { + type: require('./element.schema.js'), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + timestamp: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The time at which the expansion was produced by the expanding system.', + }, + _total: { + type: require('./element.schema.js'), + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + total: { + type: GraphQLInt, + description: + 'The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.', + }, + _offset: { + type: require('./element.schema.js'), + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.', + }, + offset: { + type: GraphQLInt, + description: + 'If paging is being used, the offset at which this resource starts. I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.', + }, + parameter: { + type: new GraphQLList(require('./valuesetexpansionparameter.schema.js')), + description: + 'A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.', + }, + contains: { + type: new GraphQLList(require('./valuesetexpansioncontains.schema.js')), + description: 'The codes that are contained in the value set expansion.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valuesetexpansioncontains.schema.js b/src/resources/4_0_0/schemas/valuesetexpansioncontains.schema.js new file mode 100644 index 00000000..17712541 --- /dev/null +++ b/src/resources/4_0_0/schemas/valuesetexpansioncontains.schema.js @@ -0,0 +1,97 @@ +const { + GraphQLString, + GraphQLList, + GraphQLBoolean, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary ValueSetexpansioncontains Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSetexpansioncontains', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _system: { + type: require('./element.schema.js'), + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + system: { + type: UriScalar, + description: + 'An absolute URI which is the code system in which the code for this item in the expansion is defined.', + }, + _abstract: { + type: require('./element.schema.js'), + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + abstract: { + type: GraphQLBoolean, + description: + 'If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.', + }, + _inactive: { + type: require('./element.schema.js'), + description: + 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).', + }, + inactive: { + type: GraphQLBoolean, + description: + 'If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).', + }, + _version: { + type: require('./element.schema.js'), + description: + 'The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + version: { + type: GraphQLString, + description: + 'The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.', + }, + _code: { + type: require('./element.schema.js'), + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + code: { + type: CodeScalar, + description: + 'The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.', + }, + _display: { + type: require('./element.schema.js'), + description: 'The recommended display for this item in the expansion.', + }, + display: { + type: GraphQLString, + description: 'The recommended display for this item in the expansion.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/valuesetexpansionparameter.schema.js b/src/resources/4_0_0/schemas/valuesetexpansionparameter.schema.js new file mode 100644 index 00000000..e048fb60 --- /dev/null +++ b/src/resources/4_0_0/schemas/valuesetexpansionparameter.schema.js @@ -0,0 +1,109 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLBoolean, + GraphQLInt, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary ValueSetexpansionparameter Schema + */ +module.exports = new GraphQLObjectType({ + name: 'ValueSetexpansionparameter', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _name: { + type: require('./element.schema.js'), + description: + 'Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.', + }, + name: { + type: new GraphQLNonNull(GraphQLString), + description: + 'Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.', + }, + _valueString: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueString: { + type: GraphQLString, + description: 'The value of the parameter.', + }, + _valueBoolean: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueBoolean: { + type: GraphQLBoolean, + description: 'The value of the parameter.', + }, + _valueInteger: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueInteger: { + type: GraphQLInt, + description: 'The value of the parameter.', + }, + _valueDecimal: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueDecimal: { + type: GraphQLFloat, + description: 'The value of the parameter.', + }, + _valueUri: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueUri: { + type: UriScalar, + description: 'The value of the parameter.', + }, + _valueCode: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueCode: { + type: CodeScalar, + description: 'The value of the parameter.', + }, + _valueDateTime: { + type: require('./element.schema.js'), + description: 'The value of the parameter.', + }, + valueDateTime: { + type: DateTimeScalar, + description: 'The value of the parameter.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/verificationresult.schema.js b/src/resources/4_0_0/schemas/verificationresult.schema.js new file mode 100644 index 00000000..67e83acb --- /dev/null +++ b/src/resources/4_0_0/schemas/verificationresult.schema.js @@ -0,0 +1,187 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLString, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary VerificationResult Schema + */ +module.exports = new GraphQLObjectType({ + name: 'VerificationResult', + description: + 'Describes validation requirements, source(s), status and dates for one or more elements.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'VerificationResult_Enum_schema', + values: { VerificationResult: { value: 'VerificationResult' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + target: { + type: new GraphQLList( + new GraphQLUnionType({ + name: 'VerificationResulttarget_target_Union', + description: 'A resource that was validated.', + types: () => [require('./resource.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Resource') { + return require('./resource.schema.js'); + } + }, + }), + ), + description: 'A resource that was validated.', + }, + _targetLocation: { + type: require('./element.schema.js'), + description: + 'The fhirpath location(s) within the resource that was validated.', + }, + targetLocation: { + type: new GraphQLList(GraphQLString), + description: + 'The fhirpath location(s) within the resource that was validated.', + }, + need: { + type: require('./codeableconcept.schema.js'), + description: + 'The frequency with which the target must be validated (none; initial; periodic).', + }, + _status: { + type: require('./element.schema.js'), + description: + 'The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: + 'The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).', + }, + _statusDate: { + type: require('./element.schema.js'), + description: 'When the validation status was updated.', + }, + statusDate: { + type: DateTimeScalar, + description: 'When the validation status was updated.', + }, + validationType: { + type: require('./codeableconcept.schema.js'), + description: + 'What the target is validated against (nothing; primary source; multiple sources).', + }, + validationProcess: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).', + }, + frequency: { + type: require('./timing.schema.js'), + description: 'Frequency of revalidation.', + }, + _lastPerformed: { + type: require('./element.schema.js'), + description: + 'The date/time validation was last completed (including failed validations).', + }, + lastPerformed: { + type: DateTimeScalar, + description: + 'The date/time validation was last completed (including failed validations).', + }, + _nextScheduled: { + type: require('./element.schema.js'), + description: 'The date when target is next validated, if appropriate.', + }, + nextScheduled: { + type: DateScalar, + description: 'The date when target is next validated, if appropriate.', + }, + failureAction: { + type: require('./codeableconcept.schema.js'), + description: + 'The result if validation fails (fatal; warning; record only; none).', + }, + primarySource: { + type: new GraphQLList( + require('./verificationresultprimarysource.schema.js'), + ), + description: + 'Information about the primary source(s) involved in validation.', + }, + attestation: { + type: require('./verificationresultattestation.schema.js'), + description: 'Information about the entity attesting to information.', + }, + validator: { + type: new GraphQLList(require('./verificationresultvalidator.schema.js')), + description: 'Information about the entity validating information.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/verificationresultattestation.schema.js b/src/resources/4_0_0/schemas/verificationresultattestation.schema.js new file mode 100644 index 00000000..61660f22 --- /dev/null +++ b/src/resources/4_0_0/schemas/verificationresultattestation.schema.js @@ -0,0 +1,129 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateScalar = require('../scalars/date.scalar.js'); + +/** + * @name exports + * @summary VerificationResultattestation Schema + */ +module.exports = new GraphQLObjectType({ + name: 'VerificationResultattestation', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + who: { + type: new GraphQLUnionType({ + name: 'VerificationResultattestationwho_who_Union', + description: 'The individual or organization attesting to information.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + require('./organization.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + description: 'The individual or organization attesting to information.', + }, + onBehalfOf: { + type: new GraphQLUnionType({ + name: 'VerificationResultattestationonBehalfOf_onBehalfOf_Union', + description: + 'When the who is asserting on behalf of another (organization or individual).', + types: () => [ + require('./organization.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: + 'When the who is asserting on behalf of another (organization or individual).', + }, + communicationMethod: { + type: require('./codeableconcept.schema.js'), + description: + 'The method by which attested information was submitted/retrieved (manual; API; Push).', + }, + _date: { + type: require('./element.schema.js'), + description: 'The date the information was attested to.', + }, + date: { + type: DateScalar, + description: 'The date the information was attested to.', + }, + _sourceIdentityCertificate: { + type: require('./element.schema.js'), + description: + 'A digital identity certificate associated with the attestation source.', + }, + sourceIdentityCertificate: { + type: GraphQLString, + description: + 'A digital identity certificate associated with the attestation source.', + }, + _proxyIdentityCertificate: { + type: require('./element.schema.js'), + description: + 'A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.', + }, + proxyIdentityCertificate: { + type: GraphQLString, + description: + 'A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.', + }, + proxySignature: { + type: require('./signature.schema.js'), + description: + 'Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.', + }, + sourceSignature: { + type: require('./signature.schema.js'), + description: + 'Signed assertion by the attestation source that they have attested to the information.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/verificationresultprimarysource.schema.js b/src/resources/4_0_0/schemas/verificationresultprimarysource.schema.js new file mode 100644 index 00000000..3de9d214 --- /dev/null +++ b/src/resources/4_0_0/schemas/verificationresultprimarysource.schema.js @@ -0,0 +1,94 @@ +const { + GraphQLString, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary VerificationResultprimarySource Schema + */ +module.exports = new GraphQLObjectType({ + name: 'VerificationResultprimarySource', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + who: { + type: new GraphQLUnionType({ + name: 'VerificationResultprimarySourcewho_who_Union', + description: 'Reference to the primary source.', + types: () => [ + require('./organization.schema.js'), + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + description: 'Reference to the primary source.', + }, + type: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).', + }, + communicationMethod: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Method for communicating with the primary source (manual; API; Push).', + }, + validationStatus: { + type: require('./codeableconcept.schema.js'), + description: + 'Status of the validation of the target against the primary source (successful; failed; unknown).', + }, + _validationDate: { + type: require('./element.schema.js'), + description: 'When the target was validated against the primary source.', + }, + validationDate: { + type: DateTimeScalar, + description: 'When the target was validated against the primary source.', + }, + canPushUpdates: { + type: require('./codeableconcept.schema.js'), + description: + 'Ability of the primary source to push updates/alerts (yes; no; undetermined).', + }, + pushTypeAvailable: { + type: new GraphQLList(require('./codeableconcept.schema.js')), + description: + 'Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/verificationresultvalidator.schema.js b/src/resources/4_0_0/schemas/verificationresultvalidator.schema.js new file mode 100644 index 00000000..a7795a4e --- /dev/null +++ b/src/resources/4_0_0/schemas/verificationresultvalidator.schema.js @@ -0,0 +1,68 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); + +/** + * @name exports + * @summary VerificationResultvalidator Schema + */ +module.exports = new GraphQLObjectType({ + name: 'VerificationResultvalidator', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + organization: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'VerificationResultvalidatororganization_organization_Union', + description: 'Reference to the organization validating information.', + types: () => [require('./organization.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Organization') { + return require('./organization.schema.js'); + } + }, + }), + ), + description: 'Reference to the organization validating information.', + }, + _identityCertificate: { + type: require('./element.schema.js'), + description: + 'A digital identity certificate associated with the validator.', + }, + identityCertificate: { + type: GraphQLString, + description: + 'A digital identity certificate associated with the validator.', + }, + attestationSignature: { + type: require('./signature.schema.js'), + description: + 'Signed assertion by the validator that they have validated the information.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/visionprescription.schema.js b/src/resources/4_0_0/schemas/visionprescription.schema.js new file mode 100644 index 00000000..8c464882 --- /dev/null +++ b/src/resources/4_0_0/schemas/visionprescription.schema.js @@ -0,0 +1,179 @@ +const { + GraphQLNonNull, + GraphQLEnumType, + GraphQLList, + GraphQLUnionType, + GraphQLObjectType, +} = require('graphql'); +const IdScalar = require('../scalars/id.scalar.js'); +const UriScalar = require('../scalars/uri.scalar.js'); +const CodeScalar = require('../scalars/code.scalar.js'); +const DateTimeScalar = require('../scalars/datetime.scalar.js'); + +/** + * @name exports + * @summary VisionPrescription Schema + */ +module.exports = new GraphQLObjectType({ + name: 'VisionPrescription', + description: + 'An authorization for the provision of glasses and/or contact lenses to a patient.', + fields: () => ({ + resourceType: { + type: new GraphQLNonNull( + new GraphQLEnumType({ + name: 'VisionPrescription_Enum_schema', + values: { VisionPrescription: { value: 'VisionPrescription' } }, + }), + ), + description: 'Type of resource', + }, + _id: { + type: require('./element.schema.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.schema.js'), + description: + 'The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.', + }, + _implicitRules: { + type: require('./element.schema.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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + 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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.', + }, + _language: { + type: require('./element.schema.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.schema.js'), + description: + "A human-readable narrative that contains a summary of the resource and can 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(require('./resourcelist.schema')), + 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.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the resource. 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 can 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.schema.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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + identifier: { + type: new GraphQLList(require('./identifier.schema.js')), + description: 'A unique identifier assigned to this vision prescription.', + }, + _status: { + type: require('./element.schema.js'), + description: 'The status of the resource instance.', + }, + status: { + type: new GraphQLNonNull(CodeScalar), + description: 'The status of the resource instance.', + }, + _created: { + type: require('./element.schema.js'), + description: 'The date this resource was created.', + }, + created: { + type: new GraphQLNonNull(DateTimeScalar), + description: 'The date this resource was created.', + }, + patient: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'VisionPrescriptionpatient_patient_Union', + description: + 'A resource reference to the person to whom the vision prescription applies.', + types: () => [require('./patient.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Patient') { + return require('./patient.schema.js'); + } + }, + }), + ), + description: + 'A resource reference to the person to whom the vision prescription applies.', + }, + encounter: { + type: new GraphQLUnionType({ + name: 'VisionPrescriptionencounter_encounter_Union', + description: + 'A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.', + types: () => [require('./encounter.schema.js')], + resolveType(data) { + if (data && data.resourceType === 'Encounter') { + return require('./encounter.schema.js'); + } + }, + }), + description: + 'A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.', + }, + _dateWritten: { + type: require('./element.schema.js'), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + dateWritten: { + type: new GraphQLNonNull(DateTimeScalar), + description: + 'The date (and perhaps time) when the prescription was written.', + }, + prescriber: { + type: new GraphQLNonNull( + new GraphQLUnionType({ + name: 'VisionPrescriptionprescriber_prescriber_Union', + description: + 'The healthcare professional responsible for authorizing the prescription.', + types: () => [ + require('./practitioner.schema.js'), + require('./practitionerrole.schema.js'), + ], + resolveType(data) { + if (data && data.resourceType === 'Practitioner') { + return require('./practitioner.schema.js'); + } + if (data && data.resourceType === 'PractitionerRole') { + return require('./practitionerrole.schema.js'); + } + }, + }), + ), + description: + 'The healthcare professional responsible for authorizing the prescription.', + }, + lensSpecification: { + type: new GraphQLList( + new GraphQLNonNull( + require('./visionprescriptionlensspecification.schema.js'), + ), + ), + description: + 'Contain the details of the individual lens specifications and serves as the authorization for the fullfillment by certified professionals.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/visionprescriptionlensspecification.schema.js b/src/resources/4_0_0/schemas/visionprescriptionlensspecification.schema.js new file mode 100644 index 00000000..a02e4377 --- /dev/null +++ b/src/resources/4_0_0/schemas/visionprescriptionlensspecification.schema.js @@ -0,0 +1,144 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLInt, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary VisionPrescriptionlensSpecification Schema + */ +module.exports = new GraphQLObjectType({ + name: 'VisionPrescriptionlensSpecification', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + product: { + type: new GraphQLNonNull(require('./codeableconcept.schema.js')), + description: + 'Identifies the type of vision correction product which is required for the patient.', + }, + _eye: { + type: require('./element.schema.js'), + description: 'The eye for which the lens specification applies.', + }, + eye: { + type: new GraphQLNonNull(CodeScalar), + description: 'The eye for which the lens specification applies.', + }, + _sphere: { + type: require('./element.schema.js'), + description: 'Lens power measured in dioptres (0.25 units).', + }, + sphere: { + type: GraphQLFloat, + description: 'Lens power measured in dioptres (0.25 units).', + }, + _cylinder: { + type: require('./element.schema.js'), + description: + 'Power adjustment for astigmatism measured in dioptres (0.25 units).', + }, + cylinder: { + type: GraphQLFloat, + description: + 'Power adjustment for astigmatism measured in dioptres (0.25 units).', + }, + _axis: { + type: require('./element.schema.js'), + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + axis: { + type: GraphQLInt, + description: 'Adjustment for astigmatism measured in integer degrees.', + }, + prism: { + type: new GraphQLList( + require('./visionprescriptionlensspecificationprism.schema.js'), + ), + description: 'Allows for adjustment on two axis.', + }, + _add: { + type: require('./element.schema.js'), + description: + 'Power adjustment for multifocal lenses measured in dioptres (0.25 units).', + }, + add: { + type: GraphQLFloat, + description: + 'Power adjustment for multifocal lenses measured in dioptres (0.25 units).', + }, + _power: { + type: require('./element.schema.js'), + description: 'Contact lens power measured in dioptres (0.25 units).', + }, + power: { + type: GraphQLFloat, + description: 'Contact lens power measured in dioptres (0.25 units).', + }, + _backCurve: { + type: require('./element.schema.js'), + description: 'Back curvature measured in millimetres.', + }, + backCurve: { + type: GraphQLFloat, + description: 'Back curvature measured in millimetres.', + }, + _diameter: { + type: require('./element.schema.js'), + description: 'Contact lens diameter measured in millimetres.', + }, + diameter: { + type: GraphQLFloat, + description: 'Contact lens diameter measured in millimetres.', + }, + duration: { + type: require('./quantity.schema.js'), + description: 'The recommended maximum wear period for the lens.', + }, + _color: { + type: require('./element.schema.js'), + description: 'Special color or pattern.', + }, + color: { + type: GraphQLString, + description: 'Special color or pattern.', + }, + _brand: { + type: require('./element.schema.js'), + description: 'Brand recommendations or restrictions.', + }, + brand: { + type: GraphQLString, + description: 'Brand recommendations or restrictions.', + }, + note: { + type: new GraphQLList(require('./annotation.schema.js')), + description: + 'Notes for special requirements such as coatings and lens materials.', + }, + }), +}); diff --git a/src/resources/4_0_0/schemas/visionprescriptionlensspecificationprism.schema.js b/src/resources/4_0_0/schemas/visionprescriptionlensspecificationprism.schema.js new file mode 100644 index 00000000..fd451068 --- /dev/null +++ b/src/resources/4_0_0/schemas/visionprescriptionlensspecificationprism.schema.js @@ -0,0 +1,57 @@ +const { + GraphQLString, + GraphQLList, + GraphQLNonNull, + GraphQLFloat, + GraphQLObjectType, +} = require('graphql'); +const CodeScalar = require('../scalars/code.scalar.js'); + +/** + * @name exports + * @summary VisionPrescriptionlensSpecificationprism Schema + */ +module.exports = new GraphQLObjectType({ + name: 'VisionPrescriptionlensSpecificationprism', + description: '', + fields: () => ({ + _id: { + type: require('./element.schema.js'), + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + id: { + type: GraphQLString, + description: + 'Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.', + }, + extension: { + type: new GraphQLList(require('./extension.schema.js')), + description: + 'May be used to represent additional information that is not part of the basic definition of the element. 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 can 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.schema.js')), + description: + "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + }, + _amount: { + type: require('./element.schema.js'), + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + amount: { + type: new GraphQLNonNull(GraphQLFloat), + description: + 'Amount of prism to compensate for eye alignment in fractional units.', + }, + _base: { + type: require('./element.schema.js'), + description: 'The relative base, or reference lens edge, for the prism.', + }, + base: { + type: new GraphQLNonNull(CodeScalar), + description: 'The relative base, or reference lens edge, for the prism.', + }, + }), +}); diff --git a/src/utils/__mocks__/profile.no.export.js b/src/utils/__mocks__/profile.no.export.js new file mode 100644 index 00000000..24a072be --- /dev/null +++ b/src/utils/__mocks__/profile.no.export.js @@ -0,0 +1,4 @@ +/** +* Mock for router tests +*/ +module.exports = undefined; diff --git a/src/resources/3_0_1/profiles/__mocks__/no.schemas.export.js b/src/utils/__mocks__/profile.no.schema.js similarity index 61% rename from src/resources/3_0_1/profiles/__mocks__/no.schemas.export.js rename to src/utils/__mocks__/profile.no.schema.js index 9c471fd9..560c8066 100644 --- a/src/resources/3_0_1/profiles/__mocks__/no.schemas.export.js +++ b/src/utils/__mocks__/profile.no.schema.js @@ -1,4 +1,7 @@ +/** +* Mock for router tests +*/ module.exports = { - query: {}, mutation: {}, + query: {}, }; diff --git a/src/utils/router.utils.js b/src/utils/router.utils.js index 9d6ccd1e..2fcc8f89 100644 --- a/src/utils/router.utils.js +++ b/src/utils/router.utils.js @@ -92,6 +92,7 @@ function configureRoutes(server, options = {}) { resolveFromVersion(version, resourceConfig.profilesRelativePath), ); let configs = config_paths.map(require); + // Grab all the necessary properties from each config // Ignore instance_queries for now, we will add them in later let query_fields = {}, @@ -107,8 +108,8 @@ function configureRoutes(server, options = {}) { Object.assign(query_fields, config.query); Object.assign(mutation_fields, config.mutation); // Go ahead and add the endpoint for instances if it is defined - if (config.instance_query) { - let { path: instance_path, query, name } = config.instance_query; + if (config.instance) { + let { path: instance_path, query, name } = config.instance; server.app.use( // Path for this graphql endpoint diff --git a/src/utils/router.utils.test.js b/src/utils/router.utils.test.js index a21bc9db..f0bd6718 100644 --- a/src/utils/router.utils.test.js +++ b/src/utils/router.utils.test.js @@ -91,7 +91,7 @@ describe('Router Utils Test', () => { let { mock } = require('express-graphql'); // Create a mock resource config let mockResourceConfig = { - profilesRelativePath: 'profiles/__mocks__/*.js', + profilesRelativePath: '../../utils/__mocks__/*.js', }; // configure routes configureRoutes(server, { diff --git a/src/utils/schema.utils.test.js b/src/utils/schema.utils.test.js index 43525996..8aa5e5dc 100644 --- a/src/utils/schema.utils.test.js +++ b/src/utils/schema.utils.test.js @@ -1,9 +1,6 @@ const { mapJsonToSchema } = require('./schema.utils'); -const { - GraphQLInputObjectType, - GraphQLString, -} = require('graphql'); +const { GraphQLInputObjectType, GraphQLString } = require('graphql'); // Sample GraphQL Object Type let PersonSchema = new GraphQLInputObjectType({ diff --git a/src/utils/scope.utils.js b/src/utils/scope.utils.js deleted file mode 100644 index 017e29e8..00000000 --- a/src/utils/scope.utils.js +++ /dev/null @@ -1,124 +0,0 @@ -const { - internal, - insufficientScope, - formatErrorForGraphQL, -} = require('./error.utils'); - -const { defaultVersion } = require('../config').SERVER_CONFIG; - -/** - * @name allowedScopes - * @description Generate an array of expected scopes. If a user is accessing a - * protected resource, one of these scopes must be present in the user's defined - * scopes. - * @param { string } name - Profile name we are checking scopes for - * @param { string } action - read or write action - * @return { Array } - Array of scopes, one of which would be required - * for the request to be successful - */ -function allowedScopes(name, action) { - return [ - 'user/*.*', - `user/*.${action}`, - `user/${name}.*`, - `user/${name}.${action}`, - 'patient/*.*', - `patient/*.${action}`, - `patient/${name}.*`, - `patient/${name}.${action}`, - ]; -} - -/** - * @name parseScopes - * @description Parse scopes from scope string attached to the token - * In the future, scope may be in different formats, arrays, comma separated, - * etc., so we can add logic to handle that later - * @param { object } token - Tokenb containing a scope property - * @param { string } token.scope - Space separated list of scopes - * @return { Array } - Array of scopes - */ -function parseScopes(token) { - let scopes = (token && token.scope) || ''; - return scopes.split(' '); -} - -/** - * @name scopeInvariant - * @description Check the users scope's and context's and make sure they are - * allowed to access the resource they are attempting to access. If the user - * is not allowed to access the resource, a forbidden error should be triggered. - * @return { Function } A valid GraphQL resolver function - * @example Usage - * scopeInvariant({ action: 'read', name: 'Account', version: '3_0_1' }, accountResolver); - */ -function scopeInvariant(options = {}, resolver) { - let { action, name, version } = options; - - // If any of these arguments are missing, this check will not be able to work - // correctly, return an internal server error with a helpful message - if (!action || !name || !version) { - let errorMessage = 'Insufficent arguments provided to `scopeInvariant`. '; - errorMessage += 'You must provide an options object with name, action, '; - errorMessage += `and version. You provided ${JSON.stringify(options)}`; - - return formatErrorForGraphQL( - internal(version || defaultVersion, errorMessage), - ); - } - - // If the developer configured this incorrectly, let's give him a useful - // error message. - if (typeof resolver !== 'function') { - let errorMessage = 'The resolver function provided to `scopeInvariant` '; - errorMessage += 'must be a function. Did you forget to include your '; - errorMessage += 'resolver when you called scopeInvariant with ' + name; - - return formatErrorForGraphQL(internal(version, errorMessage)); - } - - return function scopeInvariantResolver(root, args, ctx, info) { - let req = ctx && ctx.req; - let server = ctx && ctx.server; - let serverEnv = server && server.env; - - // If authorization is disabled, just bail now - if (serverEnv && !serverEnv.AUTHENTICATION) { - return resolver(root, args, ctx, info); - } - - // NOTE: If you do not want graphiql to work when auth is enabled - // just delete this section below. If we are hitting a graphiql endpoint, - // this will bail, check the env as well to make sure we are not in prod - if ( - serverEnv && - !serverEnv.IS_PRODUCTION && - /\$graphiql$/.test(req.baseUrl) - ) { - return resolver(root, args, ctx, info); - } - - let expectedScopes = allowedScopes(name, action); - let userScopes = parseScopes(req && req.user); - - // Check if any of the expected scopes are present in the actual scopes - let hasSufficientScope = expectedScopes.some( - validScope => userScopes.indexOf(validScope) > -1, - ); - - // If not, throw an insufficientScope error - if (!hasSufficientScope) { - let errorMessage = `You do not have sufficient scope for ${action} `; - errorMessage += `access on this ${name} resource.`; - - return formatErrorForGraphQL(insufficientScope(version, errorMessage)); - } - // We have passed scope and context checks, pass the request off - // to the actual resolver now - return resolver(root, args, ctx, info); - }; -} - -module.exports = { - scopeInvariant, -}; diff --git a/src/utils/scope.utils.test.js b/src/utils/scope.utils.test.js deleted file mode 100644 index d7de2f9d..00000000 --- a/src/utils/scope.utils.test.js +++ /dev/null @@ -1,195 +0,0 @@ -const { scopeInvariant } = require('./scope.utils'); - -let noScopesContext = { - req: { - user: { scope: '' }, - }, -}; - -let scopesContext = { - req: { - user: { scope: 'user/Patient.read' }, - }, -}; - -let authDisabledContext = { - server: { - env: { AUTHENTICATION: false }, - }, -}; - -let developmentContext = { - req: { baseUrl: '/3_0_1/$graphiql' }, - server: { - env: { - IS_PRODUCTION: false, - AUTHENTICATION: true, - }, - }, -}; - -describe('Scope Utils Test', () => { - describe('scopeInvariant', () => { - test('should return an internal error for missing arguments', () => { - let results, issue; - // It requires name, version, and action to be present - results = scopeInvariant(); - - results = scopeInvariant({ name: 'Test' }); - expect(results.extensions.resource).toBeDefined(); - issue = results.extensions.resource.issue[0]; - expect(issue.code).toEqual('exception'); - expect(issue.severity).toEqual('error'); - - results = scopeInvariant({ name: 'Test', version: '3_0_1' }); - expect(results.extensions.resource).toBeDefined(); - issue = results.extensions.resource.issue[0]; - expect(issue.code).toEqual('exception'); - expect(issue.severity).toEqual('error'); - - results = scopeInvariant( - { - name: 'Test', - version: '3_0_1', - action: 'read', - }, - () => {}, - ); - - expect(results.extensions).toBeUndefined(); - }); - - test('should return an internal error for invalid arguments', () => { - // It requires the resolver to be of type function - let results = scopeInvariant({ - name: 'Test', - version: '3_0_1', - action: 'read', - }); - - expect(results.extensions.resource).toBeDefined(); - let issue = results.extensions.resource.issue[0]; - expect(issue.code).toEqual('exception'); - expect(issue.severity).toEqual('error'); - }); - - test('should return a resolver function if configured correctly', () => { - let resolver = scopeInvariant( - { - name: 'Test', - version: '3_0_1', - action: 'read', - }, - function mockResolver() {}, - ); - - expect(typeof resolver).toEqual('function'); - }); - - test('should return insufficient scope error if no user is logged in', () => { - let resolver = scopeInvariant( - { - name: 'Test', - version: '3_0_1', - action: 'read', - }, - function mockResolver() {}, - ); - - // invoking the resolver should return an insufficient scopes error since - // no user is associated to a request in context - let results = resolver(); - expect(results.extensions.resource).toBeDefined(); - let issue = results.extensions.resource.issue[0]; - expect(issue.code).toEqual('forbidden'); - expect(issue.severity).toEqual('error'); - }); - - test('should return insufficient scope error if no scopes are present', () => { - let resolver = scopeInvariant( - { - name: 'Test', - version: '3_0_1', - action: 'read', - }, - function mockResolver() {}, - ); - - // invoking the resolver should return an insufficient scopes error since - // no scopes are associated with the user - let results = resolver(null, null, noScopesContext); - expect(results.extensions.resource).toBeDefined(); - let issue = results.extensions.resource.issue[0]; - expect(issue.code).toEqual('forbidden'); - expect(issue.severity).toEqual('error'); - }); - - test('should return insufficient scope error if insufficient scopes are present', () => { - let resolver = scopeInvariant( - { - name: 'Test', - version: '3_0_1', - action: 'write', - }, - function mockResolver() {}, - ); - - // invoking the resolver should return an insufficient scopes error since - // no scopes are associated with the user - let results = resolver(null, null, scopesContext); - expect(results.extensions.resource).toBeDefined(); - let issue = results.extensions.resource.issue[0]; - expect(issue.code).toEqual('forbidden'); - expect(issue.severity).toEqual('error'); - }); - - test('should invoke the resolver without error if valid scopes are present', () => { - let mockResult = 'DATAAAAAAAAA'; - let resolver = scopeInvariant( - { - name: 'Patient', - version: '3_0_1', - action: 'read', - }, - () => mockResult, - ); - - let results = resolver(null, null, scopesContext); - expect(results).toEqual(mockResult); - }); - - test('should invoke the resolver if auth is disabled', () => { - let mockResult = 'DATAAAAAAAAA'; - let resolver = scopeInvariant( - { - name: 'Patient', - version: '3_0_1', - action: 'read', - }, - () => mockResult, - ); - - // In this case, the middleware should pass as auth is explicitly disabled - // even though they do not have any valid scopes - let results = resolver(null, null, authDisabledContext); - expect(results).toEqual(mockResult); - }); - - test('should invoke the resolver if we are in a development environment', () => { - let mockResult = 'DATAAAAAAAAA'; - let resolver = scopeInvariant( - { - name: 'Patient', - version: '3_0_1', - action: 'read', - }, - () => mockResult, - ); - - // In this case, the middleware should pass as auth is explicitly disabled - // even though they do not have any valid scopes - let results = resolver(null, null, developmentContext); - expect(results).toEqual(mockResult); - }); - }); -}); diff --git a/yarn.lock b/yarn.lock index c7d75057..41de8d4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,133 +7,167 @@ resolved "https://registry.yarnpkg.com/@asymmetrik/fhir-gql-schema-utils/-/fhir-gql-schema-utils-1.0.1.tgz#b384257d3f5ac5fb22b72239981efd5bc293dc7d" integrity sha512-1ed7y1fD5RrksyucassgFDU9+m71wA95cypc32Rq+ey/YVlM4y3nEEl9E6awdjbYFwINgg30BS7wTQ17DErEMA== -"@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.51" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz#bd71d9b192af978df915829d39d4094456439a0c" +"@asymmetrik/sof-graphql-invariant@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@asymmetrik/sof-graphql-invariant/-/sof-graphql-invariant-1.0.2.tgz#d9b0dc4eea214ddfc1cfa9a02ff8daf3d54fa1f4" + integrity sha512-OXYkEY+szK9v0x9qAxPNMLTO2qnPmpGsCL5tUTw9P7Ew0mHytChD4wtgNOp/sAgD7edBuWR+j0WFvsEVZzEFlQ== + dependencies: + "@asymmetrik/sof-scope-checker" "^1.0.1" + graphql "^14.0.2" + +"@asymmetrik/sof-scope-checker@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@asymmetrik/sof-scope-checker/-/sof-scope-checker-1.0.1.tgz#dd5a10088d015546c11c3160e786ed65ba9381d3" + integrity sha512-T6A24Llmrtpd46F6tfwU8Myd1ulUPKFCL3Tj6DZYLm+skQzrQ6/Bs9q3CeV7J3JX7IGw3pwh699Z78vuyDbUJQ== + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== dependencies: - "@babel/highlight" "7.0.0-beta.51" + "@babel/highlight" "^7.0.0" -"@babel/highlight@7.0.0-beta.51": - version "7.0.0-beta.51" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.51.tgz#e8844ae25a1595ccfd42b89623b4376ca06d225d" +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== dependencies: chalk "^2.0.0" esutils "^2.0.2" - js-tokens "^3.0.0" + js-tokens "^4.0.0" -abab@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" +JSONStream@^1.0.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +abab@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" + integrity sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w== abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -accepts@^1.3.0, accepts@~1.3.4, accepts@~1.3.5: +accepts@^1.3.0, accepts@~1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= dependencies: mime-types "~2.1.18" negotiator "0.6.1" acorn-globals@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" + version "4.3.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.0.tgz#e3b6f8da3c1552a95ae627571f7dd6923bb54103" + integrity sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw== dependencies: - acorn "^5.0.0" + acorn "^6.0.1" + acorn-walk "^6.0.1" -acorn-jsx@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" - dependencies: - acorn "^5.0.3" +acorn-jsx@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" + integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== -acorn@^5.0.0, acorn@^5.0.3, acorn@^5.3.0, acorn@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" +acorn-walk@^6.0.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" + integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== -ajv-keywords@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" +acorn@^5.5.3: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -ajv@^5.1.0, ajv@^5.3.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" +acorn@^6.0.1, acorn@^6.0.2: + version "6.0.5" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" + integrity sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg== -ajv@^6.0.1, ajv@^6.5.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" +add-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" + integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= + +ajv@^6.5.3, ajv@^6.5.5, ajv@^6.6.1: + version "6.6.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d" + integrity sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" - uri-js "^4.2.1" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + uri-js "^4.2.2" ansi-align@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" + integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= dependencies: string-width "^2.0.0" ansi-escapes@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" + integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9" + integrity sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w== ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== dependencies: micromatch "^3.1.4" normalize-path "^2.1.1" -append-transform@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + integrity sha1-126/jKlNJ24keja61EpLdKthGZE= dependencies: - default-require-extensions "^2.0.0" + default-require-extensions "^1.0.0" aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -141,104 +175,135 @@ are-we-there-yet@~1.1.2: argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= + dependencies: + arr-flatten "^1.0.1" + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= -arr-flatten@^1.1.0: +arr-flatten@^1.0.1, arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" +array-ify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= -array-uniq@^1.0.1, array-uniq@^1.0.2: +array-uniq@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= -arrify@^1.0.0, arrify@^1.0.1: +arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + integrity sha1-GdOGodntxufByF04iu28xW0zYC0= async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== -async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@^2.1.4, async@^2.6.0: +async@^2.1.4, async@^2.5.0, async@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" + integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== dependencies: lodash "^4.17.10" asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= atob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - -aws4@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= dependencies: chalk "^1.1.3" esutils "^2.0.2" @@ -247,6 +312,7 @@ babel-code-frame@^6.26.0: babel-core@^6.0.0, babel-core@^6.26.0: version "6.26.3" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== dependencies: babel-code-frame "^6.26.0" babel-generator "^6.26.0" @@ -271,6 +337,7 @@ babel-core@^6.0.0, babel-core@^6.26.0: babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" @@ -284,13 +351,15 @@ babel-generator@^6.18.0, babel-generator@^6.26.0: babel-helpers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.2.0.tgz#14a9d6a3f4122dfea6069d37085adf26a53a4dba" +babel-jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" + integrity sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew== dependencies: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.2.0" @@ -298,12 +367,14 @@ babel-jest@^23.2.0: babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= dependencies: babel-runtime "^6.22.0" babel-plugin-istanbul@^4.1.6: version "4.1.6" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" + integrity sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ== dependencies: babel-plugin-syntax-object-rest-spread "^6.13.0" find-up "^2.1.0" @@ -313,14 +384,17 @@ babel-plugin-istanbul@^4.1.6: babel-plugin-jest-hoist@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" + integrity sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc= babel-plugin-syntax-object-rest-spread@^6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= babel-preset-jest@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" + integrity sha1-jsegOhOPABoaj7HoETZSvxpV2kY= dependencies: babel-plugin-jest-hoist "^23.2.0" babel-plugin-syntax-object-rest-spread "^6.13.0" @@ -328,6 +402,7 @@ babel-preset-jest@^23.2.0: babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= dependencies: babel-core "^6.26.0" babel-runtime "^6.26.0" @@ -340,6 +415,7 @@ babel-register@^6.26.0: babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" @@ -347,6 +423,7 @@ babel-runtime@^6.22.0, babel-runtime@^6.26.0: babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= dependencies: babel-runtime "^6.26.0" babel-traverse "^6.26.0" @@ -354,9 +431,10 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.18.0, babel-traverse@^6.26.0: +babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= dependencies: babel-code-frame "^6.26.0" babel-messages "^6.23.0" @@ -368,9 +446,10 @@ babel-traverse@^6.18.0, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.18.0, babel-types@^6.26.0: +babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= dependencies: babel-runtime "^6.26.0" esutils "^2.0.2" @@ -380,14 +459,17 @@ babel-types@^6.18.0, babel-types@^6.26.0: babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== dependencies: cache-base "^1.0.1" class-utils "^0.3.5" @@ -400,31 +482,19 @@ base@^0.11.1: bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= dependencies: tweetnacl "^0.14.3" binary-extensions@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" - -body-parser@1.18.2: - version "1.18.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.1" - http-errors "~1.6.2" - iconv-lite "0.4.19" - on-finished "~2.3.0" - qs "6.5.1" - raw-body "2.3.2" - type-is "~1.6.15" + version "1.12.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" + integrity sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg== -body-parser@^1.18.3: +body-parser@1.18.3, body-parser@^1.18.3: version "1.18.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" + integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= dependencies: bytes "3.0.0" content-type "~1.0.4" @@ -440,6 +510,7 @@ body-parser@^1.18.3: boxen@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" + integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== dependencies: ansi-align "^2.0.0" camelcase "^4.0.0" @@ -452,13 +523,24 @@ boxen@^1.2.1: brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + braces@^2.3.0, braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== dependencies: arr-flatten "^1.1.0" array-unique "^0.3.2" @@ -472,36 +554,43 @@ braces@^2.3.0, braces@^2.3.1: to-regex "^3.0.1" browser-process-hrtime@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" + version "0.1.3" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" + integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== browser-resolve@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== dependencies: resolve "1.1.7" bser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= dependencies: node-int64 "^0.4.0" buffer-from@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== dependencies: collection-visit "^1.0.0" component-emitter "^1.2.1" @@ -513,56 +602,69 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" +callsites@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3" + integrity sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw== + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase-keys@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" + integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= + dependencies: + camelcase "^4.1.0" + map-obj "^2.0.0" + quick-lru "^1.0.0" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= camelcase@^4.0.0, camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= camelize@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" + integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= capture-exit@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" + integrity sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28= dependencies: rsvp "^3.3.3" capture-stack-trace@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" + version "1.0.1" + resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" + integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw== caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" @@ -570,21 +672,24 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chokidar@^2.0.2: +chokidar@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" + integrity sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ== dependencies: anymatch "^2.0.0" async-each "^1.0.0" @@ -601,21 +706,25 @@ chokidar@^2.0.2: optionalDependencies: fsevents "^1.2.2" -chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" +chownr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== -ci-info@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" +ci-info@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== dependencies: arr-union "^3.1.0" define-property "^0.2.5" @@ -625,141 +734,157 @@ class-utils@^0.3.5: cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" + integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= dependencies: restore-cursor "^2.0.0" cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== dependencies: string-width "^2.1.1" strip-ansi "^4.0.0" wrap-ansi "^2.0.0" -clorox@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clorox/-/clorox-1.0.3.tgz#6fa63653f280c33d69f548fb14d239ddcfa1590d" - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= dependencies: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd" - -color-convert@^1.9.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" +color-convert@^1.9.0, color-convert@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: - color-name "1.1.1" + color-name "1.1.3" -color-name@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" - -color-name@^1.0.0: +color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-string@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" +color-name@^1.0.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^1.5.2: + version "1.5.3" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" + integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw== dependencies: color-name "^1.0.0" + simple-swizzle "^0.2.2" -color@0.8.x: - version "0.8.0" - resolved "https://registry.yarnpkg.com/color/-/color-0.8.0.tgz#890c07c3fd4e649537638911cf691e5458b6fca5" +color@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/color/-/color-3.0.0.tgz#d920b4328d534a3ac8295d68f7bd4ba6c427be9a" + integrity sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w== dependencies: - color-convert "^0.5.0" - color-string "^0.3.0" + color-convert "^1.9.1" + color-string "^1.5.2" -colornames@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/colornames/-/colornames-0.0.2.tgz#d811fd6c84f59029499a8ac4436202935b92be31" +colornames@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/colornames/-/colornames-1.1.1.tgz#f8889030685c7c4ff9e2a559f5077eb76a816f96" + integrity sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y= colors@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.0.tgz#5f20c9fef6945cb1134260aab33bfbdc8295e04e" + version "1.3.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" + integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== -colorspace@1.0.x: - version "1.0.1" - resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.0.1.tgz#c99c796ed31128b9876a52e1ee5ee03a4a719749" +colorspace@1.1.x: + version "1.1.1" + resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.1.tgz#9ac2491e1bc6f8fb690e2176814f8d091636d972" + integrity sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw== dependencies: - color "0.8.x" - text-hex "0.0.x" + color "3.0.x" + text-hex "1.0.x" -combined-stream@1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" + integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== dependencies: delayed-stream "~1.0.0" commander@^2.9.0: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== -compare-versions@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.0.tgz#af93ea705a96943f622ab309578b9b90586f39c3" +commander@~2.17.1: + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== + +compare-func@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" + integrity sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg= + dependencies: + array-ify "^1.0.0" + dot-prop "^3.0.0" component-emitter@^1.2.0, component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= -compressible@~2.0.13: - version "2.0.14" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.14.tgz#326c5f507fbb055f54116782b969a81b67a29da7" +compressible@~2.0.14: + version "2.0.15" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.15.tgz#857a9ab0a7e5a07d8d837ed43fe2defff64fe212" + integrity sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw== dependencies: - mime-db ">= 1.34.0 < 2" + mime-db ">= 1.36.0 < 2" compression@^1.7.2: - version "1.7.2" - resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" + version "1.7.3" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" + integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== dependencies: - accepts "~1.3.4" + accepts "~1.3.5" bytes "3.0.0" - compressible "~2.0.13" + compressible "~2.0.14" debug "2.6.9" on-headers "~1.0.1" - safe-buffer "5.1.1" + safe-buffer "5.1.2" vary "~1.1.2" concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= configstore@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" + integrity sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw== dependencies: dot-prop "^4.1.0" graceful-fs "^4.1.2" @@ -771,50 +896,210 @@ configstore@^3.0.0: console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= content-disposition@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= content-security-policy-builder@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/content-security-policy-builder/-/content-security-policy-builder-2.0.0.tgz#8749a1d542fcbe82237281ea9f716ce68b394dd2" + integrity sha512-j+Nhmj1yfZAikJLImCvPJFE29x/UuBi+/MWqggGGc515JKaZrjuei2RhULJmy0MsstW3E3htl002bwmBNMKr7w== content-type@^1.0.4, content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +conventional-changelog-angular@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.2.tgz#39d945635e03b6d0c9d4078b1df74e06163dc66a" + integrity sha512-yx7m7lVrXmt4nKWQgWZqxSALEiAKZhOAcbxdUaU9575mB0CzXVbgrgpfSnSP7OqWDUTYGD0YVJ0MSRdyOPgAwA== + dependencies: + compare-func "^1.3.1" + q "^1.5.1" + +conventional-changelog-atom@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.1.tgz#dc88ce650ffa9ceace805cbe70f88bfd0cb2c13a" + integrity sha512-9BniJa4gLwL20Sm7HWSNXd0gd9c5qo49gCi8nylLFpqAHhkFTj7NQfROq3f1VpffRtzfTQp4VKU5nxbe2v+eZQ== + dependencies: + q "^1.5.1" + +conventional-changelog-cli@^2.0.11: + version "2.0.11" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-2.0.11.tgz#18210bfcd61660140e3160e6d00d68abe260e493" + integrity sha512-00Z4EZfpuQxvStA5fjJXdixXCtRd5/AUMUOhYKOomhH3cRFqzF/P0MP8vavT9wnGkR0eba9mrWsMuqeVszPRxQ== + dependencies: + add-stream "^1.0.0" + conventional-changelog "^3.0.5" + lodash "^4.2.1" + meow "^4.0.0" + tempfile "^1.1.1" + +conventional-changelog-codemirror@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.1.tgz#acc046bc0971460939a0cc2d390e5eafc5eb30da" + integrity sha512-23kT5IZWa+oNoUaDUzVXMYn60MCdOygTA2I+UjnOMiYVhZgmVwNd6ri/yDlmQGXHqbKhNR5NoXdBzSOSGxsgIQ== + dependencies: + q "^1.5.1" + +conventional-changelog-core@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.1.5.tgz#c2edf928539308b54fe1b90a2fc731abc021852c" + integrity sha512-iwqAotS4zk0wA4S84YY1JCUG7X3LxaRjJxuUo6GI4dZuIy243j5nOg/Ora35ExT4DOiw5dQbMMQvw2SUjh6moQ== + dependencies: + conventional-changelog-writer "^4.0.2" + conventional-commits-parser "^3.0.1" + dateformat "^3.0.0" + get-pkg-repo "^1.0.0" + git-raw-commits "2.0.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^2.0.2" + lodash "^4.2.1" + normalize-package-data "^2.3.5" + q "^1.5.1" + read-pkg "^3.0.0" + read-pkg-up "^3.0.0" + through2 "^2.0.0" + +conventional-changelog-ember@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.2.tgz#284ffdea8c83ea8c210b65c5b4eb3e5cc0f4f51a" + integrity sha512-qtZbA3XefO/n6DDmkYywDYi6wDKNNc98MMl2F9PKSaheJ25Trpi3336W8fDlBhq0X+EJRuseceAdKLEMmuX2tg== + dependencies: + q "^1.5.1" + +conventional-changelog-eslint@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.1.tgz#f65e0e7f63dc09c044244b8785313a602e628002" + integrity sha512-yH3+bYrtvgKxSFChUBQnKNh9/U9kN2JElYBm253VpYs5wXhPHVc9ENcuVGWijh24nnOkei7wEJmnmUzgZ4ok+A== + dependencies: + q "^1.5.1" + +conventional-changelog-express@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.1.tgz#fea2231d99a5381b4e6badb0c1c40a41fcacb755" + integrity sha512-G6uCuCaQhLxdb4eEfAIHpcfcJ2+ao3hJkbLrw/jSK/eROeNfnxCJasaWdDAfFkxsbpzvQT4W01iSynU3OoPLIw== + dependencies: + q "^1.5.1" + +conventional-changelog-jquery@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.4.tgz#7eb598467b83db96742178e1e8d68598bffcd7ae" + integrity sha512-IVJGI3MseYoY6eybknnTf9WzeQIKZv7aNTm2KQsiFVJH21bfP2q7XVjfoMibdCg95GmgeFlaygMdeoDDa+ZbEQ== + dependencies: + q "^1.5.1" + +conventional-changelog-jshint@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.1.tgz#11c0e8283abf156a4ff78e89be6fdedf9bd72202" + integrity sha512-kRFJsCOZzPFm2tzRHULWP4tauGMvccOlXYf3zGeuSW4U0mZhk5NsjnRZ7xFWrTFPlCLV+PNmHMuXp5atdoZmEg== + dependencies: + compare-func "^1.3.1" + q "^1.5.1" + +conventional-changelog-preset-loader@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.2.tgz#81d1a07523913f3d17da3a49f0091f967ad345b0" + integrity sha512-pBY+qnUoJPXAXXqVGwQaVmcye05xi6z231QM98wHWamGAmu/ghkBprQAwmF5bdmyobdVxiLhPY3PrCfSeUNzRQ== + +conventional-changelog-writer@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.2.tgz#eb493ed84269e7a663da36e49af51c54639c9a67" + integrity sha512-d8/FQY/fix2xXEBUhOo8u3DCbyEw3UOQgYHxLsPDw+wHUDma/GQGAGsGtoH876WyNs32fViHmTOUrgRKVLvBug== + dependencies: + compare-func "^1.3.1" + conventional-commits-filter "^2.0.1" + dateformat "^3.0.0" + handlebars "^4.0.2" + json-stringify-safe "^5.0.1" + lodash "^4.2.1" + meow "^4.0.0" + semver "^5.5.0" + split "^1.0.0" + through2 "^2.0.0" + +conventional-changelog@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.0.5.tgz#660a61c1c5c9c9ba967ff3d2f5e7e9d7e0680be6" + integrity sha512-JYSVGJbnOl9S2gkZwmoJ+wX2gxNVHodUmEiv+eIykeJBNX0zN5vJ3oa2xCvk2HiF7TZ+Les0eq/aX49dcymONA== + dependencies: + conventional-changelog-angular "^5.0.2" + conventional-changelog-atom "^2.0.1" + conventional-changelog-codemirror "^2.0.1" + conventional-changelog-core "^3.1.5" + conventional-changelog-ember "^2.0.2" + conventional-changelog-eslint "^3.0.1" + conventional-changelog-express "^2.0.1" + conventional-changelog-jquery "^3.0.4" + conventional-changelog-jshint "^2.0.1" + conventional-changelog-preset-loader "^2.0.2" + +conventional-commits-filter@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz#55a135de1802f6510b6758e0a6aa9e0b28618db3" + integrity sha512-92OU8pz/977udhBjgPEbg3sbYzIxMDFTlQT97w7KdhR9igNqdJvy8smmedAAgn4tPiqseFloKkrVfbXCVd+E7A== + dependencies: + is-subset "^0.1.1" + modify-values "^1.0.0" + +conventional-commits-parser@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz#fe1c49753df3f98edb2285a5e485e11ffa7f2e4c" + integrity sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg== + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^4.0.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" convert-source-map@^1.4.0, convert-source-map@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== + dependencies: + safe-buffer "~5.1.1" cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= cookiejar@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" + integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js@^2.4.0, core-js@^2.5.0: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + version "2.6.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.1.tgz#87416ae817de957a3f249b3b5ca475d4aaed6042" + integrity sha512-L72mmmEayPJBejKIWe2pYtGis5r0tQ5NaJekdhyXgeMQTpJoBsH0NL4ElY2LfSoV15xeQWKQ+XTTOZdyero5Xg== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= coveralls@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.2.tgz#f5a0bcd90ca4e64e088b710fa8dda640aea4884f" + integrity sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw== dependencies: growl "~> 1.10.0" js-yaml "^3.11.0" @@ -826,12 +1111,22 @@ coveralls@^3.0.2: create-error-class@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" + integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= dependencies: capture-stack-trace "^1.0.0" +cross-env@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2" + integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg== + dependencies: + cross-spawn "^6.0.5" + is-windows "^1.0.0" + cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= dependencies: lru-cache "^4.0.1" shebang-command "^1.2.0" @@ -840,6 +1135,7 @@ cross-spawn@^5.0.1: cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" @@ -850,197 +1146,249 @@ cross-spawn@^6.0.5: crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" + integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= cssfilter@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" + integrity sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4= cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.3" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.3.tgz#7b344769915759c2c9e3eb8c26f7fd533dbea252" + version "0.3.4" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" + integrity sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog== -"cssstyle@>= 0.3.1 < 0.4.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.3.1.tgz#6da9b4cff1bc5d716e6e5fe8e04fcb1b50a49adf" +cssstyle@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.1.1.tgz#18b038a9c44d65f7a8e428a653b9f6fe42faf5fb" + integrity sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog== dependencies: cssom "0.3.x" +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= + dependencies: + array-find-index "^1.0.1" + +dargs@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= + dependencies: + number-is-nan "^1.0.0" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= dependencies: assert-plus "^1.0.0" dasherize@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dasherize/-/dasherize-2.0.0.tgz#6d809c9cd0cf7bb8952d80fc84fa13d47ddb1308" + integrity sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg= data-urls@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.0.0.tgz#24802de4e81c298ea8a9388bb0d8e461c774684f" + version "1.1.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" + integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== dependencies: - abab "^1.0.4" - whatwg-mimetype "^2.0.0" - whatwg-url "^6.4.0" + abab "^2.0.0" + whatwg-mimetype "^2.2.0" + whatwg-url "^7.0.0" + +dateformat@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" + integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== dependencies: - ms "2.0.0" + ms "^2.1.1" + +debug@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize-keys@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= + dependencies: + decamelize "^1.1.0" + map-obj "^1.0.0" -decamelize@^1.0.0, decamelize@^1.1.1: +decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -default-require-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + integrity sha1-836hXT4T/9m0N9M+GnW1+5eHTLg= dependencies: - strip-bom "^3.0.0" + strip-bom "^2.0.0" define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" + object-keys "^1.0.12" define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= dependencies: is-descriptor "^0.1.0" define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= dependencies: is-descriptor "^1.0.0" define-property@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== dependencies: is-descriptor "^1.0.2" isobject "^3.0.1" -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -depd@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" - -depd@~1.1.1, depd@~1.1.2: +depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= dependencies: repeating "^2.0.0" detect-libc@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= -diagnostics@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/diagnostics/-/diagnostics-1.1.0.tgz#e1090900b49523e8527be20f081275205f2ae36a" +diagnostics@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/diagnostics/-/diagnostics-1.1.1.tgz#cab6ac33df70c9d9a727490ae43ac995a769b22a" + integrity sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ== dependencies: - colorspace "1.0.x" + colorspace "1.1.x" enabled "1.0.x" - kuler "0.0.x" + kuler "1.0.x" diff@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== dns-prefetch-control@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/dns-prefetch-control/-/dns-prefetch-control-0.1.0.tgz#60ddb457774e178f1f9415f0cabb0e85b0b300b2" + integrity sha1-YN20V3dOF48flBXwyrsOhbCzALI= doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== dependencies: esutils "^2.0.2" dom-serializer@0: version "0.1.0" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + integrity sha1-BzxpdUbOB4DOI75KKOKT5AvDDII= dependencies: domelementtype "~1.1.1" entities "~1.1.1" domelementtype@1, domelementtype@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + integrity sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs= -domexception@^1.0.0: +domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== dependencies: webidl-conversions "^4.0.2" domhandler@^2.3.0: version "2.4.2" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== dependencies: domelementtype "1" domutils@^1.5.1: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== dependencies: dom-serializer "0" domelementtype "1" @@ -1048,84 +1396,104 @@ domutils@^1.5.1: dont-sniff-mimetype@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dont-sniff-mimetype/-/dont-sniff-mimetype-1.0.0.tgz#5932890dc9f4e2f19e5eb02a20026e5e5efc8f58" + integrity sha1-WTKJDcn04vGeXrAqIAJuXl78j1g= + +dot-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" + integrity sha1-G3CK8JSknJoOfbyteQq6U52sEXc= + dependencies: + is-obj "^1.0.0" dot-prop@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== dependencies: is-obj "^1.0.0" duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - -duplexer@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= dependencies: jsbn "~0.1.0" + safer-buffer "^2.1.0" ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= enabled@1.0.x: version "1.0.2" resolved "https://registry.yarnpkg.com/enabled/-/enabled-1.0.2.tgz#965f6513d2c2d1c5f4652b64a2e3396467fc2f93" + integrity sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M= dependencies: env-variable "0.0.x" encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= entities@^1.1.1, entities@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== env-variable@0.0.x: - version "0.0.4" - resolved "https://registry.yarnpkg.com/env-variable/-/env-variable-0.0.4.tgz#0d6280cf507d84242befe35a512b5ae4be77c54e" + version "0.0.5" + resolved "https://registry.yarnpkg.com/env-variable/-/env-variable-0.0.5.tgz#913dd830bef11e96a039c038d4130604eba37f88" + integrity sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA== -error-ex@^1.2.0: +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" -es-abstract@^1.10.0, es-abstract@^1.5.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" +es-abstract@^1.5.1: + version "1.13.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" + integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== dependencies: - es-to-primitive "^1.1.1" + es-to-primitive "^1.2.0" function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" + has "^1.0.3" + is-callable "^1.1.4" is-regex "^1.0.4" + object-keys "^1.0.12" -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" +es-to-primitive@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" + integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== dependencies: - is-callable "^1.1.1" + is-callable "^1.1.4" is-date-object "^1.0.1" - is-symbol "^1.0.1" + is-symbol "^1.0.2" escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -escodegen@^1.9.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.10.0.tgz#f647395de22519fbd0d928ffcf1d17e0dec2603e" +escodegen@^1.9.1: + version "1.11.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" + integrity sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw== dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -1137,6 +1505,7 @@ escodegen@^1.9.0: eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" + integrity sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" @@ -1144,36 +1513,39 @@ eslint-scope@^4.0.0: eslint-utils@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" + integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q== eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== eslint@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.1.0.tgz#2ed611f1ce163c0fb99e1e0cda5af8f662dff645" + version "5.12.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.12.0.tgz#fab3b908f60c52671fb14e996a450b96c743c859" + integrity sha512-LntwyPxtOHrsJdcSwyQKVtHofPHdv+4+mFwEe91r2V13vqpM8yLr7b1sW+Oo/yheOPkWYsYlYJCkzlFAt8KV7g== dependencies: - ajv "^6.5.0" - babel-code-frame "^6.26.0" + "@babel/code-frame" "^7.0.0" + ajv "^6.5.3" chalk "^2.1.0" cross-spawn "^6.0.5" - debug "^3.1.0" + debug "^4.0.1" doctrine "^2.1.0" eslint-scope "^4.0.0" eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" - espree "^4.0.0" + espree "^5.0.0" esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^2.0.0" functional-red-black-tree "^1.0.1" glob "^7.1.2" globals "^11.7.0" - ignore "^3.3.3" + ignore "^4.0.6" + import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^5.2.0" - is-resolvable "^1.1.0" - js-yaml "^3.11.0" + inquirer "^6.1.0" + js-yaml "^3.12.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" lodash "^4.17.5" @@ -1184,75 +1556,72 @@ eslint@^5.1.0: path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" - regexpp "^1.1.0" - require-uncached "^1.0.3" - semver "^5.5.0" - string.prototype.matchall "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" strip-ansi "^4.0.0" strip-json-comments "^2.0.1" - table "^4.0.3" + table "^5.0.2" text-table "^0.2.0" -espree@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634" +espree@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.0.tgz#fc7f984b62b36a0f543b13fb9cd7b9f4a7f5b65c" + integrity sha512-1MpUfwsdS9MMoN7ZXqAr9e9UKdVHDcvrJpyx7mm1WuQlx/ygErEQBzgi5Nh5qBHIoYweprhtMkTCb9GhcAIcsA== dependencies: - acorn "^5.6.0" - acorn-jsx "^4.1.1" + acorn "^6.0.2" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== dependencies: estraverse "^4.0.0" esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== dependencies: estraverse "^4.1.0" estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - -event-stream@~3.3.0: - version "3.3.4" - resolved "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" - dependencies: - duplexer "~0.1.1" - from "~0" - map-stream "~0.1.0" - pause-stream "0.0.11" - split "0.3" - stream-combiner "~0.0.4" - through "~2.3.1" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= exec-sh@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" + integrity sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw== dependencies: merge "^1.2.0" execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -1265,10 +1634,19 @@ execa@^0.7.0: exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= + dependencies: + is-posix-bracket "^0.1.0" expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= dependencies: debug "^2.3.3" define-property "^0.2.5" @@ -1278,24 +1656,34 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + expect-ct@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/expect-ct/-/expect-ct-0.1.1.tgz#de84476a2dbcb85000d5903737e9bc8a5ba7b897" + integrity sha512-ngXzTfoRGG7fYens3/RMb6yYoVLvLMfmsSllP/mZPxNHgFq41TmPSLF/nLY7fwoclI2vElvAmILFWGUYqdjfCg== -expect@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.2.0.tgz#53a7e135e36fe27e75867b1178ff08aaacc2b0dd" +expect@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" + integrity sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w== dependencies: ansi-styles "^3.2.0" - jest-diff "^23.2.0" + jest-diff "^23.6.0" jest-get-type "^22.1.0" - jest-matcher-utils "^23.2.0" - jest-message-util "^23.2.0" - jest-regex-util "^23.0.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" express-graphql@^0.6.12: version "0.6.12" resolved "https://registry.yarnpkg.com/express-graphql/-/express-graphql-0.6.12.tgz#dfcb2058ca72ed5190b140830ad8cdbf76a9128a" + integrity sha512-ouLWV0hRw4hnaLtXzzwhdC79ewxKbY2PRvm05mPc/zOH5W5WVCHDQ1SmNxEPBQdUeeSNh29aIqW9zEQkA3kMuA== dependencies: accepts "^1.3.0" content-type "^1.0.4" @@ -1303,12 +1691,13 @@ express-graphql@^0.6.12: raw-body "^2.3.2" express@^4.16.3: - version "4.16.3" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53" + version "4.16.4" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" + integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== dependencies: accepts "~1.3.5" array-flatten "1.1.1" - body-parser "1.18.2" + body-parser "1.18.3" content-disposition "0.5.2" content-type "~1.0.4" cookie "0.3.1" @@ -1325,10 +1714,10 @@ express@^4.16.3: on-finished "~2.3.0" parseurl "~1.3.2" path-to-regexp "0.1.7" - proxy-addr "~2.0.3" - qs "6.5.1" + proxy-addr "~2.0.4" + qs "6.5.2" range-parser "~1.2.0" - safe-buffer "5.1.1" + safe-buffer "5.1.2" send "0.16.2" serve-static "1.13.2" setprototypeof "1.1.0" @@ -1340,12 +1729,14 @@ express@^4.16.3: extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= dependencies: is-extendable "^0.1.0" extend-shallow@^3.0.0, extend-shallow@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= dependencies: assign-symbols "^1.0.0" is-extendable "^1.0.1" @@ -1353,22 +1744,28 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: extend@^3.0.0, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -extend@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -external-editor@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" +external-editor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" + chardet "^0.7.0" + iconv-lite "^0.4.24" tmp "^0.0.33" +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= + dependencies: + is-extglob "^1.0.0" + extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== dependencies: array-unique "^0.3.2" define-property "^1.0.0" @@ -1382,64 +1779,93 @@ extglob@^2.0.4: extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fast-safe-stringify@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.4.tgz#4fe828718aa61dbcf9119c3c24e79cc4dea973b2" + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz#04b26106cc56681f51a044cfc0d76cf0008ac2c2" + integrity sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg== fb-watchman@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= dependencies: bser "^2.0.0" +feature-policy@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/feature-policy/-/feature-policy-0.2.0.tgz#22096de49ab240176878ffe2bde2f6ff04d48c43" + integrity sha512-2hGrlv6efG4hscYVZeaYjpzpT6I2OZgYqE2yDUzeAcKj2D1SH0AsEzqJNXzdoglEddcIXQQYop3lD97XpG75Jw== + fecha@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fecha/-/fecha-2.3.3.tgz#948e74157df1a32fd1b12c3a3c3cdcb6ec9d96cd" + integrity sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg== figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= dependencies: escape-string-regexp "^1.0.5" file-entry-cache@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + integrity sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= dependencies: flat-cache "^1.2.1" object-assign "^4.0.1" +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= + fileset@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + integrity sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA= dependencies: glob "^7.0.3" minimatch "^3.0.3" +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= dependencies: extend-shallow "^2.0.1" is-number "^3.0.0" @@ -1449,6 +1875,7 @@ fill-range@^4.0.0: finalhandler@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" + integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== dependencies: debug "2.6.9" encodeurl "~1.0.2" @@ -1461,84 +1888,97 @@ finalhandler@1.1.1: find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.1.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= dependencies: locate-path "^2.0.0" flat-cache@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + version "1.3.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" + integrity sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg== dependencies: circular-json "^0.3.1" - del "^2.0.2" graceful-fs "^4.1.2" + rimraf "~2.6.2" write "^0.2.1" -for-in@^1.0.2: +for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= + dependencies: + for-in "^1.0.1" forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@^2.3.1, form-data@~2.3.1, form-data@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" +form-data@^2.3.1, form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" - combined-stream "1.0.6" + combined-stream "^1.0.6" mime-types "^2.1.12" formidable@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.1.tgz#70fb7ca0290ee6ff961090415f4b3df3d2082659" + integrity sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg== forwarded@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= dependencies: map-cache "^0.2.2" frameguard@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/frameguard/-/frameguard-3.0.0.tgz#7bcad469ee7b96e91d12ceb3959c78235a9272e9" + integrity sha1-e8rUae57lukdEs6zlZx4I1qScuk= fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - -from@~0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= fs-minipass@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== dependencies: minipass "^2.2.1" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.2, fsevents@^1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" + integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== dependencies: nan "^2.9.2" node-pre-gyp "^0.10.0" @@ -1546,14 +1986,17 @@ fsevents@^1.2.2, fsevents@^1.2.3: function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" @@ -1565,33 +2008,104 @@ gauge@~2.7.3: wide-align "^1.1.0" get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-pkg-repo@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" + integrity sha1-xztInAbYDMVTbCyFP54FIyBWly0= + dependencies: + hosted-git-info "^2.1.4" + meow "^3.3.0" + normalize-package-data "^2.3.0" + parse-github-repo-url "^1.3.0" + through2 "^2.0.0" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= dependencies: assert-plus "^1.0.0" +git-raw-commits@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" + integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg== + dependencies: + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^4.0.0" + split2 "^2.0.0" + through2 "^2.0.0" + +git-remote-origin-url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" + integrity sha1-UoJlna4hBxRaERJhEq0yFuxfpl8= + dependencies: + gitconfiglocal "^1.0.0" + pify "^2.3.0" + +git-semver-tags@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.2.tgz#f506ec07caade191ac0c8d5a21bdb8131b4934e3" + integrity sha512-34lMF7Yo1xEmsK2EkbArdoU79umpvm0MfzaDkSNYSJqtM5QLAVTPWgpiXSVI5o/O9EvZPSrP4Zvnec/CqhSd5w== + dependencies: + meow "^4.0.0" + semver "^5.5.0" + +gitconfiglocal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + integrity sha1-QdBF84UaXqiPA/JMocYXgRRGS5s= + dependencies: + ini "^1.3.2" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= + dependencies: + is-glob "^2.0.0" + glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= dependencies: is-glob "^3.1.0" path-dirname "^1.0.0" -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" +glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -1603,31 +2117,24 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" + integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU= dependencies: ini "^1.3.4" globals@^11.7.0: - version "11.7.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" + version "11.10.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.10.0.tgz#1e09776dffda5e01816b3bb4077c8b59c24eaa50" + integrity sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ== globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== got@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" + integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= dependencies: create-error-class "^3.0.0" duplexer3 "^0.1.4" @@ -1642,80 +2149,87 @@ got@^6.7.1: url-parse-lax "^1.0.0" graceful-fs@^4.1.11, graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== graphql-outfields@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/graphql-outfields/-/graphql-outfields-0.9.1.tgz#9cc3524d818d4ae30b0fa1ac4353e673aa624d55" + integrity sha512-qSaGNOCwC3P1q0tU2R/O7C5L9V3wAL9Bw6RMsAHW3Cw7/NYcMdZyJuzUfxvg0zsVrtKwPXCTxyjgUqMTACM9FQ== -graphql@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.13.2.tgz#4c740ae3c222823e7004096f832e7b93b2108270" +graphql@^14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.0.2.tgz#7dded337a4c3fd2d075692323384034b357f5650" + integrity sha512-gUC4YYsaiSJT1h40krG3J+USGlwhzNTXSb4IOZljn9ag5Tj+RkoXrWp+Kh7WyE3t1NCfab5kzCuxBIvOMERMXw== dependencies: - iterall "^1.2.1" + iterall "^1.2.2" "growl@~> 1.10.0": version "1.10.5" resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -handlebars@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" +handlebars@^4.0.2, handlebars@^4.0.3: + version "4.0.12" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" + integrity sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA== dependencies: - async "^1.4.0" + async "^2.5.0" optimist "^0.6.1" - source-map "^0.4.4" + source-map "^0.6.1" optionalDependencies: - uglify-js "^2.6" + uglify-js "^3.1.4" har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= har-validator@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== dependencies: - ajv "^5.3.0" + ajv "^6.5.5" har-schema "^2.0.0" has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= dependencies: ansi-regex "^2.0.0" has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= dependencies: get-value "^2.0.3" has-values "^0.1.4" @@ -1724,6 +2238,7 @@ has-value@^0.3.1: has-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= dependencies: get-value "^2.0.6" has-values "^1.0.0" @@ -1732,39 +2247,50 @@ has-value@^1.0.0: has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= has-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= dependencies: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.1: +has@^1.0.1, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" -helmet-csp@2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/helmet-csp/-/helmet-csp-2.7.0.tgz#7934094617d1feb7bb2dc43bb7d9e8830f774716" +helmet-crossdomain@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/helmet-crossdomain/-/helmet-crossdomain-0.3.0.tgz#707e2df930f13ad61f76ed08e1bb51ab2b2e85fa" + integrity sha512-YiXhj0E35nC4Na5EPE4mTfoXMf9JTGpN4OtB4aLqShKuH9d2HNaJX5MQoglO6STVka0uMsHyG5lCut5Kzsy7Lg== + +helmet-csp@2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/helmet-csp/-/helmet-csp-2.7.1.tgz#e8e0b5186ffd4db625cfcce523758adbfadb9dca" + integrity sha512-sCHwywg4daQ2mY0YYwXSZRsgcCeerUwxMwNixGA7aMLkVmPTYBl7gJoZDHOZyXkqPrtuDT3s2B1A+RLI7WxSdQ== dependencies: camelize "1.0.0" content-security-policy-builder "2.0.0" dasherize "2.0.0" - lodash.reduce "4.6.0" platform "1.3.5" helmet@^3.12.1: - version "3.12.1" - resolved "https://registry.yarnpkg.com/helmet/-/helmet-3.12.1.tgz#8b05bbd60f3966d70f13dad0de2c1d6c1a8303f1" + version "3.15.0" + resolved "https://registry.yarnpkg.com/helmet/-/helmet-3.15.0.tgz#fe0bb80e05d9eec589e3cbecaf5384409a3a64c9" + integrity sha512-j9JjtAnWJj09lqe/PEICrhuDaX30TeokXJ9tW6ZPhVH0+LMoihDeJ58CdWeTGzM66p6EiIODmgAaWfdeIWI4Gg== dependencies: dns-prefetch-control "0.1.0" dont-sniff-mimetype "1.0.0" expect-ct "0.1.1" + feature-policy "0.2.0" frameguard "3.0.0" - helmet-csp "2.7.0" + helmet-crossdomain "0.3.0" + helmet-csp "2.7.1" hide-powered-by "1.0.0" hpkp "2.0.0" hsts "2.1.0" @@ -1776,104 +2302,133 @@ helmet@^3.12.1: hide-powered-by@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hide-powered-by/-/hide-powered-by-1.0.0.tgz#4a85ad65881f62857fc70af7174a1184dccce32b" + integrity sha1-SoWtZYgfYoV/xwr3F0oRhNzM4ys= home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - version "2.6.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.1.tgz#6e4cee78b01bb849dcf93527708c69fdbee410df" + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== hpkp@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/hpkp/-/hpkp-2.0.0.tgz#10e142264e76215a5d30c44ec43de64dee6d1672" + integrity sha1-EOFCJk52IVpdMMROxD3mTe5tFnI= hsts@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hsts/-/hsts-2.1.0.tgz#cbd6c918a2385fee1dd5680bfb2b3a194c0121cc" + integrity sha512-zXhh/DqgrTXJ7erTN6Fh5k/xjMhDGXCqdYN3wvxUvGUQvnxcFfUd8E+6vLg/nk3ss1TYMb+DhRl25fYABioTvA== html-encoding-sniffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== dependencies: whatwg-encoding "^1.0.1" -htmlparser2@^3.9.0: - version "3.9.2" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" +htmlparser2@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.0.tgz#5f5e422dcf6119c0d983ed36260ce9ded0bee464" + integrity sha512-J1nEUGv+MkXS0weHNWVKJJ+UrLfePxRWpN3C9bEi9fLxL2+ggW94DQvgYVXsaT30PGwYRIZKNZXuyMhp3Di4bQ== dependencies: domelementtype "^1.3.0" domhandler "^2.3.0" domutils "^1.5.1" entities "^1.1.1" inherits "^2.0.1" - readable-stream "^2.0.2" - -http-errors@1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" - dependencies: - depd "1.1.1" - inherits "2.0.3" - setprototypeof "1.0.3" - statuses ">= 1.3.1 < 2" + readable-stream "^3.0.6" -http-errors@1.6.3, http-errors@^1.3.0, http-errors@~1.6.2, http-errors@~1.6.3: +http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: version "1.6.3" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= dependencies: depd "~1.1.2" inherits "2.0.3" setprototypeof "1.1.0" statuses ">= 1.4.0 < 2" +http-errors@^1.3.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.1.tgz#6a4ffe5d35188e1c39f872534690585852e1f027" + integrity sha512-jWEUgtZWGSMba9I1N3gc1HmvpBUaNC9vDdA46yScAdp+C5rdEuKWUBLWTQpW9FwSWSbYYs++b6SDCxf9UEJzfw== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= dependencies: assert-plus "^1.0.0" jsprim "^1.2.2" sshpk "^1.7.0" -iconv-lite@0.4.19: - version "0.4.19" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" - -iconv-lite@0.4.23, iconv-lite@^0.4.17, iconv-lite@^0.4.4: +iconv-lite@0.4.23: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" ienoopen@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ienoopen/-/ienoopen-1.0.0.tgz#346a428f474aac8f50cf3784ea2d0f16f62bda6b" + integrity sha1-NGpCj0dKrI9QzzeE6i0PFvYr2ms= ignore-by-default@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" + integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk= ignore-walk@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== dependencies: minimatch "^3.0.4" -ignore@^3.3.3: - version "3.3.10" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +import-fresh@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390" + integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= import-local@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + integrity sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ== dependencies: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" @@ -1881,115 +2436,157 @@ import-local@^1.0.0: imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= + dependencies: + repeating "^2.0.0" + +indent-string@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.4, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -inquirer@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726" +inquirer@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.1.tgz#9943fc4882161bdb0b0c9276769c75b32dbfcd52" + integrity sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^2.1.0" + external-editor "^3.0.0" figures "^2.0.0" - lodash "^4.3.0" + lodash "^4.17.10" mute-stream "0.0.7" run-async "^2.2.0" - rxjs "^5.5.2" + rxjs "^6.1.0" string-width "^2.1.0" - strip-ansi "^4.0.0" + strip-ansi "^5.0.0" through "^2.3.6" -invariant@^2.2.2: +invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== dependencies: loose-envify "^1.0.0" invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= -ipaddr.js@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.6.0.tgz#e3fa357b773da619f26e95f049d055c72796f86b" +ip-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-3.0.0.tgz#0a934694b4066558c46294244a23cc33116bf732" + integrity sha512-T8wDtjy+Qf2TAPDQmBp0eGKJ8GavlWlUnamr3wRn6vvdZlKVuJXXMlSncYFRYgVHOM3If5NR1H4+OvVQU9Idvg== + +ipaddr.js@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" + integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= dependencies: kind-of "^3.0.2" is-accessor-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== dependencies: kind-of "^6.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= dependencies: binary-extensions "^1.0.0" is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= dependencies: builtin-modules "^1.0.0" -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" +is-callable@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== is-ci@^1.0.10: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" + integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== dependencies: - ci-info "^1.0.0" + ci-info "^1.5.0" is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= dependencies: kind-of "^3.0.2" is-data-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== dependencies: kind-of "^6.0.0" is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== dependencies: is-accessor-descriptor "^0.1.6" is-data-descriptor "^0.1.4" @@ -1998,60 +2595,95 @@ is-descriptor@^0.1.0: is-descriptor@^1.0.0, is-descriptor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== dependencies: is-accessor-descriptor "^1.0.0" is-data-descriptor "^1.0.0" kind-of "^6.0.2" +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= + dependencies: + is-primitive "^2.0.0" + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== dependencies: is-plain-object "^2.0.4" +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= is-generator-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" + integrity sha1-lp1J4bszKfa7fwkIm+JleLLd1Go= + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= dependencies: is-extglob "^2.1.0" is-glob@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= dependencies: is-extglob "^2.1.1" is-installed-globally@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" + integrity sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA= dependencies: global-dirs "^0.1.0" is-path-inside "^1.0.0" @@ -2059,180 +2691,235 @@ is-installed-globally@^0.1.0: is-npm@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" + integrity sha1-8vtjpl5JBbQGyGBydloaTceTufQ= + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= dependencies: kind-of "^3.0.2" +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + is-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - -is-path-in-cwd@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" - dependencies: - is-path-inside "^1.0.0" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= dependencies: path-is-inside "^1.0.1" +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= + is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" + integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= dependencies: has "^1.0.1" -is-resolvable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - is-retry-allowed@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" + integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= -is-symbol@^1.0.1: +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + integrity sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= + +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + dependencies: + has-symbols "^1.0.0" + +is-text-path@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= + dependencies: + text-extensions "^1.0.0" is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.2: +is-windows@^1.0.0, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= dependencies: isarray "1.0.0" isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= istanbul-api@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" + version "1.3.7" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" + integrity sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA== dependencies: async "^2.1.4" - compare-versions "^3.1.0" fileset "^2.0.2" - istanbul-lib-coverage "^1.2.0" - istanbul-lib-hook "^1.2.0" - istanbul-lib-instrument "^1.10.1" - istanbul-lib-report "^1.1.4" - istanbul-lib-source-maps "^1.2.4" - istanbul-reports "^1.3.0" + istanbul-lib-coverage "^1.2.1" + istanbul-lib-hook "^1.2.2" + istanbul-lib-instrument "^1.10.2" + istanbul-lib-report "^1.1.5" + istanbul-lib-source-maps "^1.2.6" + istanbul-reports "^1.5.1" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" - -istanbul-lib-hook@^1.2.0: +istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" + integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== + +istanbul-lib-hook@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" + integrity sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw== dependencies: - append-transform "^1.0.0" + append-transform "^0.4.0" -istanbul-lib-instrument@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" +istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" + integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" babylon "^6.18.0" - istanbul-lib-coverage "^1.2.0" + istanbul-lib-coverage "^1.2.1" semver "^5.3.0" -istanbul-lib-report@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" +istanbul-lib-report@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" + integrity sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw== dependencies: - istanbul-lib-coverage "^1.2.0" + istanbul-lib-coverage "^1.2.1" mkdirp "^0.5.1" path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.2.4: - version "1.2.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1" +istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" + integrity sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg== dependencies: debug "^3.1.0" - istanbul-lib-coverage "^1.2.0" + istanbul-lib-coverage "^1.2.1" mkdirp "^0.5.1" rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" +istanbul-reports@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" + integrity sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw== dependencies: handlebars "^4.0.3" -iterall@^1.2.1: +iterall@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7" + integrity sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA== -jest-changed-files@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.2.0.tgz#a145a6e4b66d0129fc7c99cee134dc937a643d9c" +jest-changed-files@^23.4.2: + version "23.4.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" + integrity sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA== dependencies: throat "^4.0.0" -jest-cli@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.2.0.tgz#3b543a3da5145dd8937931017282379fc696c45b" +jest-cli@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" + integrity sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -2245,22 +2932,22 @@ jest-cli@^23.2.0: istanbul-lib-coverage "^1.2.0" istanbul-lib-instrument "^1.10.1" istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.2.0" - jest-config "^23.2.0" - jest-environment-jsdom "^23.2.0" + jest-changed-files "^23.4.2" + jest-config "^23.6.0" + jest-environment-jsdom "^23.4.0" jest-get-type "^22.1.0" - jest-haste-map "^23.2.0" - jest-message-util "^23.2.0" - jest-regex-util "^23.0.0" - jest-resolve-dependencies "^23.2.0" - jest-runner "^23.2.0" - jest-runtime "^23.2.0" - jest-snapshot "^23.2.0" - jest-util "^23.2.0" - jest-validate "^23.2.0" - jest-watcher "^23.2.0" + jest-haste-map "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + jest-resolve-dependencies "^23.6.0" + jest-runner "^23.6.0" + jest-runtime "^23.6.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + jest-watcher "^23.4.0" jest-worker "^23.2.0" - micromatch "^3.1.10" + micromatch "^2.3.11" node-notifier "^5.2.1" prompts "^0.1.9" realpath-native "^1.0.0" @@ -2271,161 +2958,182 @@ jest-cli@^23.2.0: which "^1.2.12" yargs "^11.0.0" -jest-config@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.2.0.tgz#d2fb556fd5a2a19c39eb56d139dcca5dad2a1c88" +jest-config@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" + integrity sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ== dependencies: babel-core "^6.0.0" - babel-jest "^23.2.0" + babel-jest "^23.6.0" chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^23.2.0" - jest-environment-node "^23.2.0" + jest-environment-jsdom "^23.4.0" + jest-environment-node "^23.4.0" jest-get-type "^22.1.0" - jest-jasmine2 "^23.2.0" - jest-regex-util "^23.0.0" - jest-resolve "^23.2.0" - jest-util "^23.2.0" - jest-validate "^23.2.0" - pretty-format "^23.2.0" - -jest-diff@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.2.0.tgz#9f2cf4b51e12c791550200abc16b47130af1062a" + jest-jasmine2 "^23.6.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + pretty-format "^23.6.0" + +jest-diff@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" + integrity sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g== dependencies: chalk "^2.0.1" diff "^3.2.0" jest-get-type "^22.1.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" jest-docblock@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" + integrity sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c= dependencies: detect-newline "^2.1.0" -jest-each@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.2.0.tgz#a400f81c857083f50c4f53399b109f12023fb19d" +jest-each@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" + integrity sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg== dependencies: chalk "^2.0.1" - pretty-format "^23.2.0" + pretty-format "^23.6.0" -jest-environment-jsdom@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.2.0.tgz#3634603a08a975b0ca8a658320f56a54a8e04558" +jest-environment-jsdom@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" + integrity sha1-BWp5UrP+pROsYqFAosNox52eYCM= dependencies: jest-mock "^23.2.0" - jest-util "^23.2.0" + jest-util "^23.4.0" jsdom "^11.5.1" -jest-environment-node@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.2.0.tgz#b6fe41372e382093bb6f3d9bdf6c1c4ec0a50f18" +jest-environment-node@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" + integrity sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA= dependencies: jest-mock "^23.2.0" - jest-util "^23.2.0" + jest-util "^23.4.0" jest-get-type@^22.1.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" + integrity sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w== -jest-haste-map@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.2.0.tgz#d10cbac007c695948c8ef1821a2b2ed2d4f2d4d8" +jest-haste-map@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" + integrity sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg== dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" + invariant "^2.2.4" jest-docblock "^23.2.0" jest-serializer "^23.0.1" jest-worker "^23.2.0" - micromatch "^3.1.10" + micromatch "^2.3.11" sane "^2.0.0" -jest-jasmine2@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.2.0.tgz#aa670cdb1e4d5f8ec774c94dda5e105fe33d8bb4" +jest-jasmine2@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" + integrity sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ== dependencies: + babel-traverse "^6.0.0" chalk "^2.0.1" co "^4.6.0" - expect "^23.2.0" + expect "^23.6.0" is-generator-fn "^1.0.0" - jest-diff "^23.2.0" - jest-each "^23.2.0" - jest-matcher-utils "^23.2.0" - jest-message-util "^23.2.0" - jest-snapshot "^23.2.0" - jest-util "^23.2.0" - pretty-format "^23.2.0" - -jest-leak-detector@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.2.0.tgz#c289d961dc638f14357d4ef96e0431ecc1aa377d" - dependencies: - pretty-format "^23.2.0" - -jest-matcher-utils@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.2.0.tgz#4d4981f23213e939e3cedf23dc34c747b5ae1913" + jest-diff "^23.6.0" + jest-each "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + pretty-format "^23.6.0" + +jest-leak-detector@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" + integrity sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg== + dependencies: + pretty-format "^23.6.0" + +jest-matcher-utils@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" + integrity sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog== dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" -jest-message-util@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.2.0.tgz#591e8148fff69cf89b0414809c721756ebefe744" +jest-message-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" + integrity sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8= dependencies: "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" - micromatch "^3.1.10" + micromatch "^2.3.11" slash "^1.0.0" stack-utils "^1.0.1" jest-mock@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" + integrity sha1-rRxg8p6HGdR8JuETgJi20YsmETQ= -jest-regex-util@^23.0.0: - version "23.0.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0.tgz#dd5c1fde0c46f4371314cf10f7a751a23f4e8f76" +jest-regex-util@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" + integrity sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U= -jest-resolve-dependencies@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.2.0.tgz#6df8d5709c6406639cd07f54bff074e01b5c0458" +jest-resolve-dependencies@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" + integrity sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA== dependencies: - jest-regex-util "^23.0.0" - jest-snapshot "^23.2.0" + jest-regex-util "^23.3.0" + jest-snapshot "^23.6.0" -jest-resolve@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.2.0.tgz#a0790ad5a3b99002ab4dbfcbf8d9e2d6a69b3d99" +jest-resolve@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" + integrity sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA== dependencies: browser-resolve "^1.11.3" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.2.0.tgz#0d91967ea82f72b0c705910926086d2055ce75af" +jest-runner@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" + integrity sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA== dependencies: exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^23.2.0" + jest-config "^23.6.0" jest-docblock "^23.2.0" - jest-haste-map "^23.2.0" - jest-jasmine2 "^23.2.0" - jest-leak-detector "^23.2.0" - jest-message-util "^23.2.0" - jest-runtime "^23.2.0" - jest-util "^23.2.0" + jest-haste-map "^23.6.0" + jest-jasmine2 "^23.6.0" + jest-leak-detector "^23.6.0" + jest-message-util "^23.4.0" + jest-runtime "^23.6.0" + jest-util "^23.4.0" jest-worker "^23.2.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.2.0.tgz#62dcb01766a1c4c64696dc090209e76ce1aadcbc" +jest-runtime@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" + integrity sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw== dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^4.1.6" @@ -2434,15 +3142,15 @@ jest-runtime@^23.2.0: exit "^0.1.2" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.1.11" - jest-config "^23.2.0" - jest-haste-map "^23.2.0" - jest-message-util "^23.2.0" - jest-regex-util "^23.0.0" - jest-resolve "^23.2.0" - jest-snapshot "^23.2.0" - jest-util "^23.2.0" - jest-validate "^23.2.0" - micromatch "^3.1.10" + jest-config "^23.6.0" + jest-haste-map "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.6.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" realpath-native "^1.0.0" slash "^1.0.0" strip-bom "3.0.0" @@ -2452,43 +3160,52 @@ jest-runtime@^23.2.0: jest-serializer@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" + integrity sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU= -jest-snapshot@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.2.0.tgz#c7a3d017177bbad60c8a595869cf90a8782e6a7e" +jest-snapshot@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" + integrity sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg== dependencies: + babel-types "^6.0.0" chalk "^2.0.1" - jest-diff "^23.2.0" - jest-matcher-utils "^23.2.0" + jest-diff "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-resolve "^23.6.0" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" + semver "^5.5.0" -jest-util@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.2.0.tgz#62b770757696d96e094a04b8f1c373ca50a5ab2e" +jest-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" + integrity sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE= dependencies: callsites "^2.0.0" chalk "^2.0.1" graceful-fs "^4.1.11" is-ci "^1.0.10" - jest-message-util "^23.2.0" + jest-message-util "^23.4.0" mkdirp "^0.5.1" slash "^1.0.0" source-map "^0.6.0" -jest-validate@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.2.0.tgz#67c8b909e11af1701765238894c67ac3291b195e" +jest-validate@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" + integrity sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A== dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" leven "^2.1.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" -jest-watcher@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.2.0.tgz#678e852896e919e9d9a0eb4b8baf1ae279620ea9" +jest-watcher@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" + integrity sha1-0uKM50+NrWxq/JIrksq+9u0FyRw= dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -2497,23 +3214,32 @@ jest-watcher@^23.2.0: jest-worker@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" + integrity sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk= dependencies: merge-stream "^1.0.1" jest@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.2.0.tgz#828bf31a096d45dcf06824d1ea03013af7bcfc20" + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" + integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw== dependencies: import-local "^1.0.0" - jest-cli "^23.2.0" + jest-cli "^23.6.0" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-tokens@^3.0.0, js-tokens@^3.0.2: +js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@^3.11.0, js-yaml@^3.7.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" +js-yaml@^3.11.0, js-yaml@^3.12.0, js-yaml@^3.7.0: + version "3.12.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.1.tgz#295c8632a18a23e054cf5c9d3cecafe678167600" + integrity sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -2521,69 +3247,84 @@ js-yaml@^3.11.0, js-yaml@^3.7.0: jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= jsdom@^11.5.1: - version "11.11.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.11.0.tgz#df486efad41aee96c59ad7a190e2449c7eb1110e" + version "11.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" + integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== dependencies: - abab "^1.0.4" - acorn "^5.3.0" + abab "^2.0.0" + acorn "^5.5.3" acorn-globals "^4.1.0" array-equal "^1.0.0" cssom ">= 0.3.2 < 0.4.0" - cssstyle ">= 0.3.1 < 0.4.0" + cssstyle "^1.0.0" data-urls "^1.0.0" - domexception "^1.0.0" - escodegen "^1.9.0" + domexception "^1.0.1" + escodegen "^1.9.1" html-encoding-sniffer "^1.0.2" - left-pad "^1.2.0" - nwsapi "^2.0.0" + left-pad "^1.3.0" + nwsapi "^2.0.7" parse5 "4.0.0" pn "^1.1.0" - request "^2.83.0" + request "^2.87.0" request-promise-native "^1.0.5" sax "^1.2.4" symbol-tree "^3.2.2" - tough-cookie "^2.3.3" + tough-cookie "^2.3.4" w3c-hr-time "^1.0.1" webidl-conversions "^4.0.2" whatwg-encoding "^1.0.3" whatwg-mimetype "^2.1.0" whatwg-url "^6.4.1" - ws "^4.0.0" + ws "^5.2.0" xml-name-validator "^3.0.0" jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json-stringify-safe@~5.0.1: +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= dependencies: assert-plus "1.0.0" extsprintf "1.3.0" @@ -2593,60 +3334,72 @@ jsprim@^1.2.2: kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= dependencies: is-buffer "^1.1.5" kind-of@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= dependencies: is-buffer "^1.1.5" kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +kleur@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300" + integrity sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ== -kuler@0.0.x: - version "0.0.0" - resolved "https://registry.yarnpkg.com/kuler/-/kuler-0.0.0.tgz#b66bb46b934e550f59d818848e0abba4f7f5553c" +kuler@1.0.x: + version "1.0.1" + resolved "https://registry.yarnpkg.com/kuler/-/kuler-1.0.1.tgz#ef7c784f36c9fb6e16dd3150d152677b2b0228a6" + integrity sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ== dependencies: - colornames "0.0.2" + colornames "^1.1.1" latest-version@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" + integrity sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU= dependencies: package-json "^4.0.0" -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= dependencies: invert-kv "^1.0.0" lcov-parse@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + integrity sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM= -left-pad@^1.2.0: +left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" + integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" @@ -2654,6 +3407,7 @@ levn@^0.3.0, levn@~0.3.0: load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -2661,56 +3415,93 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= dependencies: p-locate "^2.0.0" path-exists "^3.0.0" +lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= lodash.escaperegexp@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" + integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= -lodash.mergewith@^4.6.0: +lodash.mergewith@^4.6.1: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" - -lodash.reduce@4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" + integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ== lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" +lodash.template@^4.0.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= + dependencies: + lodash._reinterpolate "~3.0.0" + +lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== log-driver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" + integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== -logform@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/logform/-/logform-1.9.0.tgz#7e02f7d6b7f70dcc8ae56fcd2d060f9547afbac2" +logform@^1.9.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-1.10.0.tgz#c9d5598714c92b546e23f4e78147c40f1e02012e" + integrity sha512-em5ojIhU18fIMOw/333mD+ZLE2fis0EzXl1ZwHx4iQzmpQi6odNiY/t+ITNr33JZhT9/KEaH+UPIipr6a9EjWg== dependencies: colors "^1.2.1" fast-safe-stringify "^2.0.4" @@ -2718,23 +3509,30 @@ logform@^1.9.0: ms "^2.1.1" triple-beam "^1.2.0" -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - loose-envify@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: - js-tokens "^3.0.0" + js-tokens "^3.0.0 || ^4.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" lowercase-keys@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== lru-cache@^4.0.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" @@ -2742,60 +3540,132 @@ lru-cache@^4.0.1: make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== dependencies: pify "^3.0.0" makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= dependencies: tmpl "1.0.x" map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= -map-stream@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" + integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= dependencies: object-visit "^1.0.0" +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w= + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= mem@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= dependencies: mimic-fn "^1.0.0" +meow@^3.3.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +meow@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975" + integrity sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A== + dependencies: + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist "^1.1.3" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= dependencies: readable-stream "^2.0.1" merge@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== methods@^1.1.1, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" -micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -2811,76 +3681,82 @@ micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: snapdragon "^0.8.1" to-regex "^3.0.2" -"mime-db@>= 1.34.0 < 2": - version "1.34.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.34.0.tgz#452d0ecff5c30346a6dc1e64b1eaee0d3719ff9a" - -mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - -mime-db@~1.35.0: - version "1.35.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47" +"mime-db@>= 1.36.0 < 2", mime-db@~1.37.0: + version "1.37.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" + integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" +mime-types@^2.1.12, mime-types@~2.1.18, mime-types@~2.1.19: + version "2.1.21" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" + integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== dependencies: - mime-db "~1.33.0" - -mime-types@~2.1.19: - version "2.1.19" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0" - dependencies: - mime-db "~1.35.0" + mime-db "~1.37.0" mime@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== -minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" +minimist-options@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^1.1.1, minimist@^1.2.0: +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.2.1, minipass@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" +minipass@^2.2.1, minipass@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" +minizlib@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" + integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== dependencies: minipass "^2.2.1" mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" @@ -2888,38 +3764,51 @@ mixin-deep@^1.2.0: mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" +modify-values@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" + integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== + moment-timezone@^0.5.21: - version "0.5.21" - resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.21.tgz#3cba247d84492174dbf71de2a9848fa13207b845" + version "0.5.23" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.23.tgz#7cbb00db2c14c71b19303cb47b0fb0a6d8651463" + integrity sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w== dependencies: moment ">= 2.9.0" "moment@>= 2.9.0": - version "2.22.2" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" + version "2.23.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.23.0.tgz#759ea491ac97d54bac5ad776996e2a58cc1bc225" + integrity sha512-3IE39bHVqFbWWaPOMHZF98Q9c3LDKGTmypMiTM2QygGXXElkFWIH7GxfmlwmY2vwa+wmNsoYZmG2iusf1ZjJoA== ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= nan@^2.9.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + version "2.12.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" + integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw== nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -2936,10 +3825,12 @@ nanomatch@^1.2.9: natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -needle@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" +needle@^2.2.1: + version "2.2.4" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" + integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== dependencies: debug "^2.1.2" iconv-lite "^0.4.4" @@ -2948,35 +3839,41 @@ needle@^2.2.0: negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= nice-try@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== nocache@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/nocache/-/nocache-2.0.0.tgz#202b48021a0c4cbde2df80de15a17443c8b43980" + integrity sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA= node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= node-notifier@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" + version "5.3.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.3.0.tgz#c77a4a7b84038733d5fb351aafd8a268bfe19a01" + integrity sha512-AhENzCSGZnZJgBARsUjnQ7DnZbzyP+HxlVXuD0xqAnvL8q+OqtSX7lGg9e8nHzwXkMMXNdVeqq4E2M3EUAqX6Q== dependencies: growly "^1.3.0" - semver "^5.4.1" + semver "^5.5.0" shellwords "^0.1.1" which "^1.3.0" node-pre-gyp@^0.10.0: - version "0.10.2" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.2.tgz#e8945c20ef6795a20aac2b44f036eb13cf5146e3" + version "0.10.3" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" + integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" - needle "^2.2.0" + needle "^2.2.1" nopt "^4.0.1" npm-packlist "^1.1.6" npmlog "^4.0.2" @@ -2986,23 +3883,25 @@ node-pre-gyp@^0.10.0: tar "^4" nodemon@^1.17.5: - version "1.17.5" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.17.5.tgz#e6a665c872fdf09d48bf2a81f3e85f8cfb39322a" + version "1.18.9" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.18.9.tgz#90b467efd3b3c81b9453380aeb2a2cba535d0ead" + integrity sha512-oj/eEVTEI47pzYAjGkpcNw0xYwTl4XSTUQv2NPQI6PpN3b75PhpuYk3Vb3U80xHCyM2Jm+1j68ULHXl4OR3Afw== dependencies: - chokidar "^2.0.2" + chokidar "^2.0.4" debug "^3.1.0" ignore-by-default "^1.0.1" minimatch "^3.0.4" - pstree.remy "^1.1.0" + pstree.remy "^1.1.6" semver "^5.5.0" supports-color "^5.2.0" touch "^3.1.0" undefsafe "^2.0.2" - update-notifier "^2.3.0" + update-notifier "^2.5.0" nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= dependencies: abbrev "1" osenv "^0.1.4" @@ -3010,31 +3909,36 @@ nopt@^4.0.1: nopt@~1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" + integrity sha1-bd0hvSoxQXuScn3Vhfim83YI6+4= dependencies: abbrev "1" -normalize-package-data@^2.3.2: +normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.1.1: +normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= dependencies: remove-trailing-separator "^1.0.1" npm-bundled@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + version "1.0.5" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" + integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== npm-packlist@^1.1.6: - version "1.1.10" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + version "1.2.0" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.2.0.tgz#55a60e793e272f00862c7089274439a4cc31fc7f" + integrity sha512-7Mni4Z8Xkx0/oegoqlcao/JpPCPEMtUvsmB0q7mgvlMinykJLSRTYuFqoQLYgGY8biuxIeiHO+QNJKbCfljewQ== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -3042,12 +3946,14 @@ npm-packlist@^1.1.6: npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= dependencies: path-key "^2.0.0" npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" @@ -3057,83 +3963,102 @@ npmlog@^4.0.2: number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -nwsapi@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.4.tgz#dc79040a5f77b97716dc79565fc7fc3ef7d50570" - -oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" +nwsapi@^2.0.7: + version "2.0.9" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016" + integrity sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ== oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= dependencies: copy-descriptor "^0.1.0" define-property "^0.2.5" kind-of "^3.0.3" -object-keys@^1.0.8: +object-keys@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" + integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= dependencies: isobject "^3.0.0" object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= dependencies: define-properties "^1.1.2" es-abstract "^1.5.1" +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= dependencies: ee-first "1.1.1" on-headers@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + integrity sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c= once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" one-time@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/one-time/-/one-time-0.0.4.tgz#f8cdf77884826fe4dff93e3a9cc37b1e4480742e" + integrity sha1-+M33eISCb+Tf+T46nMN7HkSAdC4= onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= dependencies: mimic-fn "^1.0.0" optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= dependencies: minimist "~0.0.1" wordwrap "~0.0.2" @@ -3141,6 +4066,7 @@ optimist@^0.6.1: optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" @@ -3152,10 +4078,12 @@ optionator@^0.8.1, optionator@^0.8.2: os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= os-locale@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== dependencies: execa "^0.7.0" lcid "^1.0.0" @@ -3164,10 +4092,12 @@ os-locale@^2.0.0: os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= osenv@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" @@ -3175,63 +4105,105 @@ osenv@^0.1.4: p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== dependencies: p-try "^1.0.0" p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= dependencies: p-limit "^1.1.0" p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= package-json@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" + integrity sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0= dependencies: got "^6.7.1" registry-auth-token "^3.0.1" registry-url "^3.0.3" semver "^5.1.0" +parent-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5" + integrity sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA== + dependencies: + callsites "^3.0.0" + +parse-github-repo-url@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" + integrity sha1-nn2LslKmy2ukJZUGC3v23z28H1A= + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= dependencies: error-ex "^1.2.0" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== parseurl@~1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= passport-http-bearer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/passport-http-bearer/-/passport-http-bearer-1.0.1.tgz#147469ea3669e2a84c6167ef99dbb77e1f0098a8" + integrity sha1-FHRp6jZp4qhMYWfvmdu3fh8AmKg= dependencies: passport-strategy "1.x.x" passport-strategy@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4" + integrity sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ= passport@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/passport/-/passport-0.4.0.tgz#c5095691347bd5ad3b5e180238c3914d16f05811" + integrity sha1-xQlWkTR71a07XhgCOMORTRbwWBE= dependencies: passport-strategy "1.x.x" pause "0.0.1" @@ -3239,123 +4211,153 @@ passport@^0.4.0: path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= dependencies: pinkie-promise "^2.0.0" path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= dependencies: graceful-fs "^4.1.2" pify "^2.0.0" pinkie-promise "^2.0.0" -pause-stream@0.0.11: - version "0.0.11" - resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== dependencies: - through "~2.3" + pify "^3.0.0" pause@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" + integrity sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10= performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -pify@^2.0.0: +pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= dependencies: find-up "^2.1.0" platform@1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.5.tgz#fb6958c696e07e2918d2eeda0f0bc9448d733444" + integrity sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q== pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postcss@^6.0.14: - version "6.0.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" +postcss@^7.0.5: + version "7.0.8" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.8.tgz#2a3c5f2bdd00240cd0d0901fd998347c93d36696" + integrity sha512-WudsIzuTKRw9IInRTPBgVXJ7DKR26HT09Rxp0g3w0Fqh3TUtYICcUmvC0xURj04o3vdcDtnjCAUCECg/p341iQ== dependencies: - chalk "^2.4.1" + chalk "^2.4.2" source-map "^0.6.1" - supports-color "^5.4.0" + supports-color "^6.0.0" prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= prettier@^1.15.3: version "1.15.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.3.tgz#1feaac5bdd181237b54dbe65d874e02a1472786a" integrity sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg== -pretty-format@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.2.0.tgz#3b0aaa63c018a53583373c1cb3a5d96cc5e83017" +pretty-format@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" + integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" @@ -3363,81 +4365,97 @@ pretty-format@^23.2.0: private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== progress@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== prompts@^0.1.9: - version "0.1.10" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.10.tgz#832cbf6116ecb121d6884e84643bb2cf92b3ed2c" + version "0.1.14" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2" + integrity sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w== dependencies: - clorox "^1.0.3" + kleur "^2.0.1" sisteransi "^0.1.1" -proxy-addr@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341" +proxy-addr@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" + integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== dependencies: forwarded "~0.1.2" - ipaddr.js "1.6.0" - -ps-tree@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014" - dependencies: - event-stream "~3.3.0" + ipaddr.js "1.8.0" pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= -psl@^1.1.24: - version "1.1.28" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.28.tgz#4fb6ceb08a1e2214d4fd4de0ca22dae13740bc7b" +psl@^1.1.24, psl@^1.1.28: + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" + integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== -pstree.remy@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.0.tgz#f2af27265bd3e5b32bbfcc10e80bac55ba78688b" - dependencies: - ps-tree "^1.1.0" +pstree.remy@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.6.tgz#73a55aad9e2d95814927131fbf4dc1b62d259f47" + integrity sha512-NdF35+QsqD7EgNEI5mkI/X+UwaxVEbQaz9f4IooEmMUv6ZPmlTQYGjBPJGgrlzNdjSvIy4MWMg6Q6vCgBO2K+w== punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= -punycode@^2.1.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qs@6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" +q@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qs@6.5.2, qs@^6.5.1, qs@~6.5.1, qs@~6.5.2: +qs@6.5.2, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +qs@^6.5.1: + version "6.6.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" + integrity sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA== + +quick-lru@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" + integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= + +randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - -raw-body@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" - dependencies: - bytes "3.0.0" - http-errors "1.6.2" - iconv-lite "0.4.19" - unpipe "1.0.0" + integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= raw-body@2.3.3, raw-body@^2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" + integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== dependencies: bytes "3.0.0" http-errors "1.6.3" @@ -3447,6 +4465,7 @@ raw-body@2.3.3, raw-body@^2.3.2: rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" ini "~1.3.0" @@ -3456,21 +4475,41 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= dependencies: find-up "^1.0.0" read-pkg "^1.0.0" +read-pkg-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= + dependencies: + find-up "^2.0.0" + read-pkg "^3.0.0" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" path-type "^1.0.0" -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.3.5, readable-stream@^2.3.6: +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -3480,49 +4519,81 @@ readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@^3.0.6: + version "3.1.1" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.1.1.tgz#ed6bbc6c5ba58b090039ff18ce670515795aeb06" + integrity sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" + graceful-fs "^4.1.11" + micromatch "^3.1.10" readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" realpath-native@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" + version "1.0.2" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.2.tgz#cd51ce089b513b45cf9b1516c82989b51ccc6560" + integrity sha512-+S3zTvVt9yTntFrBpm7TQmQ3tzpCrnA1a/y+3cUHAc9ZR6aIjG0WNLR+Rj79QpJktY+VeW/TQtFlQ1bzsehI8g== dependencies: util.promisify "^1.0.0" +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +redent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" + integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= + dependencies: + indent-string "^3.0.0" + strip-indent "^2.0.0" + referrer-policy@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/referrer-policy/-/referrer-policy-1.1.0.tgz#35774eb735bf50fb6c078e83334b472350207d79" + integrity sha1-NXdOtzW/UPtsB46DM0tHI1AgfXk= regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== + dependencies: + is-equal-shallow "^0.1.3" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== dependencies: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp.prototype.flags@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" - dependencies: - define-properties "^1.1.2" - -regexpp@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== registry-auth-token@^3.0.1: version "3.3.2" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" + integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== dependencies: rc "^1.1.6" safe-buffer "^5.0.1" @@ -3530,69 +4601,52 @@ registry-auth-token@^3.0.1: registry-url@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" + integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= dependencies: rc "^1.0.1" remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= dependencies: is-finite "^1.0.0" request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" + integrity sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY= dependencies: lodash "^4.13.1" request-promise-native@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" + integrity sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU= dependencies: request-promise-core "1.1.1" stealthy-require "^1.1.0" tough-cookie ">=2.3.3" -request@^2.83.0: - version "2.87.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - -request@^2.85.0: +request@^2.85.0, request@^2.87.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -3618,43 +4672,44 @@ request@^2.85.0: require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - -require-uncached@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= dependencies: resolve-from "^3.0.0" -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= dependencies: onetime "^2.0.0" signal-exit "^3.0.2" @@ -3662,56 +4717,55 @@ restore-cursor@^2.0.0: ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@~2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: - glob "^7.0.5" + glob "^7.1.3" rsvp@^3.3.3: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" + integrity sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw== run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= dependencies: is-promise "^2.1.0" -rxjs@^5.5.2: - version "5.5.11" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87" +rxjs@^6.1.0: + version "6.3.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" + integrity sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw== dependencies: - symbol-observable "1.0.1" - -safe-buffer@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sane@^2.0.0: version "2.5.2" resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" + integrity sha1-tNwYYcIbQn6SlQej51HiosuKs/o= dependencies: anymatch "^2.0.0" capture-exit "^1.2.0" @@ -3725,37 +4779,42 @@ sane@^2.0.0: fsevents "^1.2.3" sanitize-html@^1.18.2: - version "1.18.2" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-1.18.2.tgz#61877ba5a910327e42880a28803c2fbafa8e4642" + version "1.20.0" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-1.20.0.tgz#9a602beb1c9faf960fb31f9890f61911cc4d9156" + integrity sha512-BpxXkBoAG+uKCHjoXFmox6kCSYpnulABoGcZ/R3QyY9ndXbIM5S94eOr1IqnzTG8TnbmXaxWoDDzKC5eJv7fEQ== dependencies: - chalk "^2.3.0" - htmlparser2 "^3.9.0" + chalk "^2.4.1" + htmlparser2 "^3.10.0" lodash.clonedeep "^4.5.0" lodash.escaperegexp "^4.1.2" lodash.isplainobject "^4.0.6" lodash.isstring "^4.0.1" - lodash.mergewith "^4.6.0" - postcss "^6.0.14" + lodash.mergewith "^4.6.1" + postcss "^7.0.5" srcset "^1.0.0" - xtend "^4.0.0" + xtend "^4.0.1" sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" + integrity sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY= dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.5.1: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== send@0.16.2: version "0.16.2" resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== dependencies: debug "2.6.9" depd "~1.1.2" @@ -3774,6 +4833,7 @@ send@0.16.2: serve-static@1.13.2: version "1.13.2" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" @@ -3783,14 +4843,12 @@ serve-static@1.13.2: set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -3800,55 +4858,70 @@ set-value@^0.4.3: set-value@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" is-plain-object "^2.0.3" split-string "^3.0.1" -setprototypeof@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" - setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" sisteransi@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" + integrity sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g== slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= -slice-ansi@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" +slice-ansi@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.0.0.tgz#5373bdb8559b45676e8541c66916cdd6251612e7" + integrity sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ== dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== dependencies: define-property "^1.0.0" isobject "^3.0.0" @@ -3857,12 +4930,14 @@ snapdragon-node@^2.0.1: snapdragon-util@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== dependencies: kind-of "^3.2.0" snapdragon@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== dependencies: base "^0.11.1" debug "^2.2.0" @@ -3876,6 +4951,7 @@ snapdragon@^0.8.1: source-map-resolve@^0.5.0: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== dependencies: atob "^2.1.1" decode-uri-component "^0.2.0" @@ -3886,12 +4962,14 @@ source-map-resolve@^0.5.0: source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== dependencies: source-map "^0.5.6" source-map-support@^0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" + version "0.5.9" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" + integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -3899,117 +4977,130 @@ source-map-support@^0.5.6: source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: +source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== spdx-correct@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== spdx-expression-parse@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + version "3.0.3" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" + integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== dependencies: extend-shallow "^3.0.0" -split@0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" +split2@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" + integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== + dependencies: + through2 "^2.0.2" + +split@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== dependencies: through "2" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= srcset@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/srcset/-/srcset-1.0.0.tgz#a5669de12b42f3b1d5e83ed03c71046fc48f41ef" + integrity sha1-pWad4StC87HV6D7QPHEEb8SPQe8= dependencies: array-uniq "^1.0.2" number-is-nan "^1.0.0" sshpk@^1.7.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + version "1.16.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.0.tgz#1d4963a2fbffe58050aa9084ca20be81741c07de" + integrity sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - safer-buffer "^2.0.2" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" stack-trace@0.0.x: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= stack-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" + version "1.0.2" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" + integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= dependencies: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2": +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2": version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= statuses@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== stealthy-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - -stream-combiner@~0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" - dependencies: - duplexer "~0.1.1" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= dependencies: astral-regex "^1.0.0" strip-ansi "^4.0.0" @@ -4017,6 +5108,7 @@ string-length@^2.0.0: string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" @@ -4025,59 +5117,84 @@ string-width@^1.0.1: "string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string.prototype.matchall@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz#2af8fe3d2d6dc53ca2a59bd376b089c3c152b3c8" +string_decoder@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" + integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== dependencies: - define-properties "^1.1.2" - es-abstract "^1.10.0" - function-bind "^1.1.1" - has-symbols "^1.0.0" - regexp.prototype.flags "^1.2.0" + safe-buffer "~5.1.0" string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= dependencies: ansi-regex "^3.0.0" +strip-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.0.0.tgz#f78f68b5d0866c20b2c9b8c61b5298508dc8756f" + integrity sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow== + dependencies: + ansi-regex "^4.0.0" + strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= dependencies: is-utf8 "^0.2.0" strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= + dependencies: + get-stdin "^4.0.1" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= superagent@^3.8.3: version "3.8.3" resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128" + integrity sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA== dependencies: component-emitter "^1.2.0" cookiejar "^2.1.0" @@ -4093,109 +5210,149 @@ superagent@^3.8.3: supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= supports-color@^3.1.2: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= dependencies: has-flag "^1.0.0" -supports-color@^5.2.0, supports-color@^5.3.0, supports-color@^5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" +supports-color@^5.2.0, supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" +supports-color@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= -table@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" +table@^5.0.2: + version "5.1.1" + resolved "https://registry.yarnpkg.com/table/-/table-5.1.1.tgz#92030192f1b7b51b6eeab23ed416862e47b70837" + integrity sha512-NUjapYb/qd4PeFW03HnAuOJ7OMcBkJlqeClWxeNlQ0lXGSb52oZXGzkO0/I0ARegQ2eUT1g2VDJH0eUxDRcHmw== dependencies: - ajv "^6.0.1" - ajv-keywords "^3.0.0" - chalk "^2.1.0" - lodash "^4.17.4" - slice-ansi "1.0.0" + ajv "^6.6.1" + lodash "^4.17.11" + slice-ansi "2.0.0" string-width "^2.1.1" tar@^4: - version "4.4.4" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" + version "4.4.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" + integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== dependencies: - chownr "^1.0.1" + chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.3" - minizlib "^1.1.0" + minipass "^2.3.4" + minizlib "^1.1.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" yallist "^3.0.2" +tempfile@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + integrity sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I= + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" + term-size@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" + integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= dependencies: execa "^0.7.0" test-exclude@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" + version "4.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" + integrity sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA== dependencies: arrify "^1.0.1" - micromatch "^3.1.8" + micromatch "^2.3.11" object-assign "^4.1.0" read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -text-hex@0.0.x: - version "0.0.0" - resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-0.0.0.tgz#578fbc85a6a92636e42dd17b41d0218cce9eb2b3" +text-extensions@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" + integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== + +text-hex@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" + integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= + +through2@^2.0.0, through2@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" -through@2, through@^2.3.6, through@~2.3, through@~2.3.1: +through@2, "through@>=2.2.7 <3", through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= timed-out@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== dependencies: os-tmpdir "~1.0.2" tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= dependencies: kind-of "^3.0.2" to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= dependencies: is-number "^3.0.0" repeat-string "^1.6.1" @@ -4203,90 +5360,133 @@ to-regex-range@^2.1.0: to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== dependencies: define-property "^2.0.2" extend-shallow "^3.0.2" regex-not "^1.0.2" safe-regex "^1.1.0" +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" + integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== dependencies: nopt "~1.0.10" -tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.4.3: +tough-cookie@>=2.3.3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.0.tgz#d2bceddebde633153ff20a52fa844a0dc71dacef" + integrity sha512-LHMvg+RBP/mAVNqVbOX8t+iJ+tqhBA/t49DuI7+IDAWHrASnesqSu1vWbKB7UrE2yk+HMFUBMadRGMkB4VCfog== + dependencies: + ip-regex "^3.0.0" + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== dependencies: psl "^1.1.24" punycode "^1.4.1" -tough-cookie@~2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - dependencies: - punycode "^1.4.1" - tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= dependencies: punycode "^2.1.0" +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= + +trim-newlines@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" + integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= + +trim-off-newlines@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= + trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= triple-beam@^1.2.0, triple-beam@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" + integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== + +tslib@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" -type-is@~1.6.15, type-is@~1.6.16: +type-is@~1.6.16: version "1.6.16" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== dependencies: media-typer "0.3.0" mime-types "~2.1.18" -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" +uglify-js@^3.1.4: + version "3.4.9" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" + integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + commander "~2.17.1" + source-map "~0.6.1" undefsafe@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.2.tgz#225f6b9e0337663e0d8e7cfd686fc2836ccace76" + integrity sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY= dependencies: debug "^2.2.0" union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= dependencies: arr-union "^3.1.0" get-value "^2.0.6" @@ -4296,16 +5496,19 @@ union-value@^1.0.0: unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" + integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= dependencies: crypto-random-string "^1.0.0" unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= dependencies: has-value "^0.3.1" isobject "^3.0.0" @@ -4313,14 +5516,17 @@ unset-value@^1.0.0: unzip-response@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" + integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= upath@^1.0.5: version "1.1.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== -update-notifier@^2.3.0: +update-notifier@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" + integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== dependencies: boxen "^1.2.1" chalk "^2.0.1" @@ -4333,35 +5539,39 @@ update-notifier@^2.3.0: semver-diff "^2.0.0" xdg-basedir "^3.0.0" -uri-js@^4.2.1: +uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== dependencies: punycode "^2.1.0" urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= dependencies: prepend-http "^1.0.1" use@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" - dependencies: - kind-of "^6.0.2" + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== -util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= util.promisify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== dependencies: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" @@ -4369,29 +5579,40 @@ util.promisify@^1.0.0: utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho= -uuid@^3.1.0, uuid@^3.3.2: +uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== validate-npm-package-license@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" validator@^10.4.0: - version "10.4.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-10.4.0.tgz#ee99a44afb3bb5ed350a159f056ca72a204cfc3c" + version "10.10.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-10.10.0.tgz#a69ac298149f063a44361cb52182edb52dab59a4" + integrity sha512-DyZyLJlMXM3CGdVaVHE/EDzCagMRoPI3mmGdxxNQbqkGqh56+M3d1i0ZAWd69En8U21DHbPTn12aOdhO+hfm5w== vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" @@ -4400,18 +5621,21 @@ verror@1.10.0: w3c-hr-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" + integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= dependencies: browser-process-hrtime "^0.1.2" walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= dependencies: makeerror "1.0.x" watch@~0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + integrity sha1-KAlUdsbffJDJYxOJkMClQj60uYY= dependencies: exec-sh "^0.2.0" minimist "^1.2.0" @@ -4419,20 +5643,33 @@ watch@~0.18.0: webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== dependencies: - iconv-lite "0.4.19" + iconv-lite "0.4.24" -whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4" +whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== -whatwg-url@^6.4.0, whatwg-url@^6.4.1: +whatwg-url@^6.4.1: version "6.5.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +whatwg-url@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.1" @@ -4441,65 +5678,66 @@ whatwg-url@^6.4.0, whatwg-url@^6.4.1: which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= which@^1.2.12, which@^1.2.9, which@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== dependencies: string-width "^1.0.2 || 2" widest-line@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" + version "2.0.1" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" + integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== dependencies: string-width "^2.1.1" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - winston-transport@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.2.0.tgz#a20be89edf2ea2ca39ba25f3e50344d73e6520e5" + version "4.3.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.3.0.tgz#df68c0c202482c448d9b47313c07304c2d7c2c66" + integrity sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A== dependencies: readable-stream "^2.3.6" triple-beam "^1.2.0" winston@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/winston/-/winston-3.0.0.tgz#1f0b24a96586798bcf0cd149fb07ed47cb01a1b2" + version "3.1.0" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.1.0.tgz#80724376aef164e024f316100d5b178d78ac5331" + integrity sha512-FsQfEE+8YIEeuZEYhHDk5cILo1HOcWkGwvoidLrDgPog0r4bser1lEIOco2dN9zpDJ1M88hfDgZvxe5z4xNcwg== dependencies: async "^2.6.0" - diagnostics "^1.0.1" + diagnostics "^1.1.1" is-stream "^1.1.0" - logform "^1.9.0" + logform "^1.9.1" one-time "0.0.4" readable-stream "^2.3.6" stack-trace "0.0.x" triple-beam "^1.3.0" winston-transport "^4.2.0" -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" @@ -4507,10 +5745,12 @@ wrap-ansi@^2.0.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write-file-atomic@^2.0.0, write-file-atomic@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" @@ -4519,60 +5759,71 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0: write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + integrity sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= dependencies: mkdirp "^0.5.1" -ws@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289" +ws@^5.2.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== dependencies: async-limiter "~1.0.0" - safe-buffer "~5.1.0" x-xss-protection@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/x-xss-protection/-/x-xss-protection-1.1.0.tgz#4f1898c332deb1e7f2be1280efb3e2c53d69c1a7" + integrity sha512-rx3GzJlgEeZ08MIcDsU2vY2B1QEriUKJTSiNHHUIem6eg9pzVOr2TL3Y4Pd6TMAM5D5azGjcxqI62piITBDHVg== xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" + integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== xss@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/xss/-/xss-1.0.3.tgz#d04bd2558fd6c29c46113824d5e8b2a910054e23" + integrity sha512-LTpz3jXPLUphMMmyufoZRSKnqMj41OVypZ8uYGzvjkMV9C1EdACrhQl/EM8Qfh5htSAuMIQFOejmKAZGkJfaCg== dependencies: commander "^2.9.0" cssfilter "0.0.10" -xtend@^4.0.0: +xtend@^4.0.1, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= yallist@^3.0.0, yallist@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== yargs-parser@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= dependencies: camelcase "^4.1.0" yargs@^11.0.0: version "11.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" + integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== dependencies: cliui "^4.0.0" decamelize "^1.1.1" @@ -4586,12 +5837,3 @@ yargs@^11.0.0: which-module "^2.0.0" y18n "^3.2.1" yargs-parser "^9.0.2" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0"